/* Operating Desk landing, waitlist and pricing.
   Built from Zara's option A mockups (design-kit/mockups/od-screens.html, spec in Notion,
   2026-11-16) and tokens.css. Option A is Zara's recommendation and waits for Tate's pick.
   Rules: action blue is a button fill only, with text.primary on it. Links are text.primary,
   underlined. No pure black. Every status has a text label. No motion until its Desk options
   are picked, except the 120ms tap response from the brand guide. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--color-canvas-base);
  color: var(--color-text-secondary);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body);
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-text-primary); text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--color-lane-coordinator);
  outline-offset: 2px;
  border-radius: var(--radius-button);
}

.skip-link {
  position: absolute; left: var(--space-md); top: -48px; z-index: 10;
  background: var(--color-surface-raised); padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-button);
}
.skip-link:focus { top: var(--space-md); }
[tabindex="-1"]:focus { outline: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-md); }
@media (min-width: 720px) { .wrap { padding: 0 var(--space-xl); } }
.narrow { max-width: 760px; }
.narrower { max-width: 640px; }

/* Draft banner and placeholders: amber mono, so nothing unapproved passes as real. */
.draft-banner {
  background: var(--color-status-review-bg); color: var(--color-status-review-text);
  font-size: var(--font-size-meta); line-height: 16px; text-align: center;
  padding: var(--space-xs) var(--space-md);
}
.draft-banner b { letter-spacing: 0.04em; }
.ph {
  font-family: var(--font-family-mono); font-size: var(--font-size-body); line-height: 20px;
  color: var(--color-status-review-text); background: var(--color-status-review-bg);
  padding: 2px 6px; border-radius: var(--radius-button); white-space: normal; overflow-wrap: anywhere; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.ph.lg { font-size: 20px; line-height: 32px; }

/* Offline banner (Zara's spec: amber banner, form disabled). */
.offline-banner {
  display: none; gap: var(--space-xs); align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-status-review-bg); color: var(--color-status-review-text);
}
.offline-banner b { font-weight: 600; }
html.is-offline .offline-banner { display: flex; }

/* Nav */
nav.site { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: var(--space-xs); color: var(--color-text-primary); font-weight: 600; text-decoration: none; letter-spacing: 0.02em; }
.brand img { width: 28px; height: 28px; border-radius: var(--radius-button); }
.navlinks { display: flex; gap: var(--space-lg); align-items: center; }
.navlinks a { color: var(--color-text-secondary); text-decoration: none; }
.navlinks a[aria-current="page"] { color: var(--color-text-primary); }
.navlinks .btn { height: 36px; }
@media (max-width: 719px) { .navlinks .btn { display: none; } }

/* Type */
.display { font-size: var(--font-size-display); line-height: 40px; font-weight: 700; color: var(--color-text-primary); letter-spacing: -0.01em; }
/* Departure 1 in Zara's spec: 48/56 on the desktop hero only. Needs Tate's yes or a token. */
@media (min-width: 880px) { .display.hero { font-size: 48px; line-height: 56px; } }
h2 { font-size: var(--font-size-h1); line-height: 32px; font-weight: 600; color: var(--color-text-primary); }
h3, .h3 { font-size: var(--font-size-h2); line-height: 24px; font-weight: 600; color: var(--color-text-primary); }
/* Departure 3: lead text 16/24 has no token yet. */
.lead { font-size: 16px; line-height: 24px; color: var(--color-text-secondary); }
.lead.gap { margin-top: var(--space-sm); }
.meta { font-size: var(--font-size-meta); line-height: 16px; font-weight: 500; }
.example { display: block; font-size: var(--font-size-meta); line-height: 16px; font-weight: 500; color: var(--color-text-muted); letter-spacing: 0.04em; text-transform: uppercase; }

/* Buttons and field */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  height: 44px; padding: 0 var(--space-md); border-radius: var(--radius-button);
  font: 600 var(--font-size-body)/20px var(--font-family-sans);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color var(--motion-tap);
}
.btn-primary { background: var(--color-action-primary); color: var(--color-text-primary); }
.btn-primary:hover { background: var(--color-action-hover); }
.btn-secondary { background: var(--color-surface-raised); color: var(--color-text-primary); border-color: var(--color-border-strong); }
.btn-secondary:hover { border-color: var(--color-text-muted); }
/* Secondary (filled) and Secondary, destructive (DESK-232, Zara's kit spec under Buttons). Existing tokens only.
   Matches the primary beside it in height, radius, padding and type; only the fill and text change. Never a red fill. */
.btn-filled { background: var(--color-border-strong); color: var(--color-text-primary); border-color: transparent; transition: background-color var(--motion-tap); }
.btn-filled:active { background: var(--color-border-subtle); }
.btn-filled.btn-destructive { color: var(--color-status-failed-text); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.field {
  height: 44px; width: 100%; padding: 0 var(--space-sm); border-radius: var(--radius-button);
  background: var(--color-surface-subtle); border: 1px solid var(--color-border-strong);
  color: var(--color-text-primary); font: 400 var(--font-size-body)/20px var(--font-family-sans);
}
.field::placeholder { color: var(--color-text-muted); }
.field[aria-invalid="true"] { border-color: var(--color-status-failed-text); }
.field[disabled], .field[readonly] { opacity: 0.6; }
.lbl { display: block; color: var(--color-text-primary); font-size: var(--font-size-meta); line-height: 16px; font-weight: 500; margin-bottom: var(--space-xs); }
.form-row { display: flex; flex-direction: column; gap: var(--space-xs); }
@media (min-width: 720px) { .form-row { flex-direction: row; } }
.help { margin-top: var(--space-xs); font-size: var(--font-size-meta); line-height: 16px; color: var(--color-text-secondary); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.formwrap { margin-top: var(--space-lg); }
@media (min-width: 720px) { .formwrap { margin-top: var(--space-xl); } }

.msg { display: flex; gap: var(--space-xs); align-items: flex-start; margin-top: var(--space-xs); color: var(--color-text-primary); }
.msg:empty { display: none; }
.msg .ico { flex: none; width: 20px; height: 20px; }
.done-card { display: none; }
.done-card .msg { margin: 0; }
.done-card b { color: var(--color-text-primary); }
.done-card span.sub { color: var(--color-text-secondary); }
form.is-done .form-body { display: none; }
form.is-done .done-card { display: block; }

.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(248, 250, 252, 0.35); border-top-color: var(--color-text-primary); animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Badges: colour plus text, never colour alone. */
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--space-xs); border-radius: var(--radius-button); font: 500 var(--font-size-meta)/16px var(--font-family-sans); letter-spacing: 0.04em; text-transform: uppercase; }
.b-ok { background: var(--color-status-passed-bg); color: var(--color-status-passed-text); }
.b-rev { background: var(--color-status-review-bg); color: var(--color-status-review-text); }
.b-nc { background: var(--color-status-uncheck-bg); color: var(--color-status-uncheck-text); }

/* Cards */
.card { background: var(--color-surface-subtle); border: 1px solid var(--color-border-strong); border-radius: var(--radius-card); padding: var(--space-md); }
.sheet { background: var(--color-surface-raised); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sheet); padding: var(--space-lg); box-shadow: var(--shadow-tinted); }

/* Hero, option A: split on desktop, stacked on phone. */
.hero-a { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); padding: var(--space-lg) 0 var(--space-xl); }
@media (min-width: 880px) { .hero-a { grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding: 64px 0 80px; } }
.hero-a .lead { margin-top: var(--space-md); }

/* Example decision card */
.dcard .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-md); }
.dcard .who { display: flex; align-items: center; gap: var(--space-xs); color: var(--color-text-secondary); font-size: var(--font-size-meta); line-height: 16px; font-weight: 500; }
.lane { width: 8px; height: 8px; border-radius: 2px; background: var(--color-lane-theo); }
.dcard .h3 { margin-top: var(--space-xs); }
.dcard .proof { margin-top: var(--space-sm); display: flex; gap: var(--space-xs); flex-wrap: wrap; }
.dcard .checks { margin-top: var(--space-xs); color: var(--color-text-secondary); }
.dcard .rec { display: block; margin-top: var(--space-sm); padding: var(--space-sm); border-radius: var(--radius-button); background: var(--color-surface-subtle); border: 1px solid var(--color-border-subtle); }
.dcard .rec b { color: var(--color-text-primary); font-weight: 600; }
.dcard .acts { display: flex; gap: var(--space-xs); margin-top: var(--space-md); }
.dcard .acts .btn { flex: 1; height: 40px; pointer-events: none; }

/* Hero motion (row 5): plays once on load, about 2.4s, then rests. Stacked layers: .f0 is the
   starting frame, .f1 the resting frame. Without CSS animation support the resting frame shows.
   waitlist.js removes each .f0 layer once it has faded, so the badges close up to their resting widths. */
.swap { display: inline-grid; }
.swap > span { grid-area: 1 / 1; }
.s-rec { display: grid; }
.dcard .rec.wait { font-family: var(--font-family-mono); font-size: var(--font-size-code); color: var(--color-text-muted); }
.dcard .f0 { opacity: 0; visibility: hidden; white-space: nowrap; animation: od-out var(--motion-tap) both; }
.dcard .f1 { animation: od-in var(--motion-tap) both; }
.dcard .s-c1 .f0, .dcard .s-c1 .f1 { animation-delay: 600ms; }
.dcard .s-c2 .f0, .dcard .s-c2 .f1 { animation-delay: 1200ms; }
.dcard .s-head .f0, .dcard .s-head .f1 { animation-delay: calc(1200ms + var(--motion-stagger)); }
.dcard .s-rec .f0 { animation: od-out var(--motion-move) both; animation-delay: calc(1200ms + 2 * var(--motion-stagger)); }
.dcard .s-rec .f1 { animation: od-rise var(--motion-move) both; animation-delay: calc(1200ms + 2 * var(--motion-stagger)); }
.dcard .acts { animation: od-dim var(--motion-move) both; animation-delay: calc(1200ms + 3 * var(--motion-stagger)); }
@keyframes od-out { from { opacity: 1; visibility: visible; } to { opacity: 0; visibility: hidden; } }
@keyframes od-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes od-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes od-dim { from { opacity: 0.35; } to { opacity: 1; } }

/* Bands */
section.band { padding: 40px 0; border-top: 1px solid var(--color-border-subtle); }
@media (min-width: 720px) { section.band { padding: 64px 0; } }
.steps { display: grid; grid-template-columns: 1fr; gap: var(--space-md); margin-top: var(--space-lg); list-style: none; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps .n { font-family: var(--font-family-mono); font-size: var(--font-size-code); color: var(--color-text-muted); margin-bottom: var(--space-xs); }
.steps p { margin-top: var(--space-xs); }
/* Proof ledger (row 6): horizontal track on desktop, vertical on phone. */
.ledger { margin-top: var(--space-lg); }
.ledger .row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
.ledger h3 { margin-top: var(--space-xs); }
.mono { font-family: var(--font-family-mono); font-size: var(--font-size-code); line-height: 18px; }
.muted { color: var(--color-text-muted); }
.lanes { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-md); }
.lanes span { display: flex; align-items: center; gap: 6px; font-size: var(--font-size-meta); line-height: 16px; color: var(--color-text-secondary); }
.lanes i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.l-theo { background: var(--color-lane-theo); }
.l-coord { background: var(--color-lane-coordinator); }
.track { list-style: none; margin-top: var(--space-lg); display: grid; grid-template-columns: 1fr; }
.step { position: relative; display: flex; flex-direction: column; padding: 0 0 20px 28px; }
.step .dot { position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--color-status-passed-text); box-shadow: 0 0 0 4px var(--color-status-passed-bg); z-index: 1; }
.step::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: var(--color-status-passed-bg); }
.step.wait::before { display: none; }
.step.wait .dot { background: var(--color-status-review-text); box-shadow: 0 0 0 4px var(--color-status-review-bg); }
.step .nm { color: var(--color-text-primary); font-weight: 600; }
.step .pf { margin-top: 4px; color: var(--color-text-secondary); display: flex; flex-direction: column; align-items: flex-start; }
.step .wf { margin-top: 4px; }
@media (min-width: 720px) {
  .track { grid-template-columns: repeat(4, 1fr); }
  .step { padding: 0 var(--space-md) 0 0; }
  .step .dot { position: relative; left: auto; top: auto; margin-bottom: var(--space-sm); }
  .step::before { left: 12px; right: 0; top: 5px; bottom: auto; width: auto; height: 2px; }
}
.proof-lead { margin-top: var(--space-sm); max-width: 640px; }
.example.gap { margin-top: var(--space-lg); }
.never { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-lg); list-style: none; }
.never li { padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-button); background: var(--color-surface-subtle); border: 1px solid var(--color-border-strong); color: var(--color-text-primary); }
.never-note { margin-top: var(--space-md); }

footer.site { border-top: 1px solid var(--color-border-subtle); color: var(--color-text-muted); font-size: var(--font-size-meta); line-height: 16px; }
footer.site .wrap { display: flex; flex-direction: column; gap: var(--space-xs); padding-top: var(--space-lg); padding-bottom: 40px; }
@media (min-width: 720px) { footer.site .wrap { flex-direction: row; justify-content: space-between; } }
footer.site a { color: var(--color-text-secondary); }

/* Pricing, option A */
.p-head { padding: var(--space-lg) 0; }
@media (min-width: 720px) { .p-head { text-align: center; padding: 56px 0 40px; max-width: 640px; margin: 0 auto; } }
.plans { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(2, minmax(0, 400px)); justify-content: center; } }
.plan { display: flex; flex-direction: column; padding: var(--space-lg); }
.plan .tag { margin-top: 4px; }
.plan .price { margin: var(--space-md) 0 4px; display: flex; align-items: baseline; gap: var(--space-xs); flex-wrap: wrap; }
.plan .price .big { font-size: var(--font-size-display); line-height: 40px; font-weight: 700; color: var(--color-text-primary); }
.plan .sub { color: var(--color-text-secondary); }
.plan .btn { margin-top: var(--space-lg); width: 100%; }
.plan .note { margin-top: var(--space-xs); color: var(--color-text-muted); font-size: var(--font-size-meta); line-height: 16px; }
.ticks { list-style: none; margin-top: var(--space-lg); display: grid; gap: var(--space-sm); }
.ticks li { display: flex; gap: var(--space-xs); color: var(--color-text-secondary); }
.ticks li svg { flex: none; margin-top: 2px; }
.talkline { max-width: 816px; margin: var(--space-lg) auto 0; color: var(--color-text-secondary); }
@media (min-width: 720px) { .talkline { text-align: center; } }
.every { max-width: 816px; margin: var(--space-xl) auto 0; }
.every .h3 { font-size: var(--font-size-body); line-height: 20px; }
.every .ticks { margin-top: var(--space-xs); gap: var(--space-xs); }
/* DESK-164: the pricing "now" state (Zara's board-pricing-ladder.png). Paid is the highlighted plan; the
   ticks sit under a rule; one main button per card; On every plan is a quiet row under a rule. */
.plan .h3 { font-size: var(--font-size-body); }
.plan .price { padding-bottom: var(--space-md); border-bottom: 1px solid var(--color-border-subtle); }
.plan .ticks { flex: 1; margin-top: var(--space-md); }
.plan .ticks li { color: var(--color-text-primary); }
.plan .ticks li svg path, .every-row .ticks li svg path, .every-row .ticks li svg circle { stroke: var(--color-action-primary); }
.plan-featured { border: 1px solid var(--color-action-primary); }
.tick-sub { display: block; margin-top: 2px; color: var(--color-text-muted); font-size: var(--font-size-meta); line-height: 16px; }
.every-row { background: none; border: 0; box-shadow: none; padding: var(--space-lg) 0 0; border-top: 1px solid var(--color-border-subtle); border-radius: 0; }
.every-row .h3 { color: var(--color-text-muted); font-size: var(--font-size-meta); font-weight: 500; }
@media (min-width: 720px) {
  .every-row { display: grid; grid-template-columns: 140px 1fr; gap: var(--space-md); align-items: start; }
  .every-row .ticks { grid-template-columns: repeat(3, 1fr); margin-top: 0; gap: var(--space-md); }
}
.faq { max-width: 816px; margin: 56px auto 64px; }
.faq h2 { margin-bottom: var(--space-md); }
.faq details { border-top: 1px solid var(--color-border-subtle); padding: var(--space-md) 0; }
.faq summary { color: var(--color-text-primary); font-weight: 600; list-style: none; display: flex; justify-content: space-between; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq p { margin-top: var(--space-xs); }

.page { padding-top: var(--space-xl); padding-bottom: 64px; max-width: 760px; }
.page p { margin-top: var(--space-md); }
.page h2 { margin-top: var(--space-xl); font-size: 20px; line-height: 28px; }
.page ul.plain { margin-top: var(--space-sm); padding-left: 20px; }
.page ul.plain li { margin-top: var(--space-xs); }
.page a { color: var(--color-text-primary); }

/* Page changes cross-fade (DESK-115, Tate on the DESK-113 card). Every page shares this
   stylesheet, so each opts in. Browsers without view transitions load the page plainly.
   Timing is --motion-move (320ms, its easing), spelled out because it is a shorthand. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: 320ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--motion-reduced); }
  .btn { transition: none; }
  .dcard .f1, .dcard .acts, .dcard .s-rec .f1 { animation: none; }
  .dcard .f0 { display: none; }
  .spin { animation: none; border-color: var(--color-text-primary); opacity: 0.6; }
}
