/* iDesk owner shell — tokens copied from apps/web/app/globals.css (ADR 0013); layout after the
   Steady reference (ui-ia-lock-2026-09-18). One file, no build step. */
:root {
  color-scheme: light;
  --brand: oklch(0.42 0.062 192);
  --brand-strong: oklch(0.3 0.05 195);
  --brand-hover: oklch(0.36 0.056 194);
  --brand-tint: oklch(0.95 0.022 192);
  --accent: oklch(0.74 0.13 70);
  --accent-tint: oklch(0.95 0.04 75);
  --accent-line: oklch(0.86 0.07 75);
  --bg: oklch(0.985 0.006 95);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.972 0.008 95);
  --ink: oklch(0.24 0.012 200);
  --ink-soft: oklch(0.46 0.01 200);
  --ink-faint: oklch(0.5 0.011 200);
  --line: oklch(0.9 0.008 95);
  /* A form field's edge must reach 3:1 on the canvas (WCAG 1.4.11); the hairline is 1.3:1. */
  --line-control: oklch(0.64 0.012 200);
  --ok: oklch(0.55 0.11 155);
  --ok-ink: oklch(0.48 0.11 155); /* --ok is 4.4:1 on the canvas, short of AA for text */
  --ok-tint: oklch(0.95 0.03 155);
  --warn: oklch(0.66 0.13 75);
  --urgent: oklch(0.56 0.17 25);
  --urgent-tint: oklch(0.95 0.04 25);
  --urgent-line: oklch(0.87 0.06 25);
  --sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --serif: "Fraunces", ui-serif, Georgia, serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", monospace;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px;
  --touch: 48px;
  --tabbar-h: 56px;
  --gutter: 20px;
  --measure: 42rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 180ms;
  --z-bar: 10; --z-nav: 20;
}

/* ---- Base ------------------------------------------------------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%;
       /* Keep a focused field clear of the fixed bars on a phone. */
       scroll-padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); }
html:has(.work-bar) { scroll-padding-bottom: calc(var(--tabbar-h) + 104px + env(safe-area-inset-bottom)); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans);
       -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::placeholder { color: var(--ink-faint); opacity: 1; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: calc(var(--z-nav) + 1); padding: 12px 16px;
             border-radius: var(--r-md); background: var(--brand-strong); color: #fff; font-weight: 500;
             transform: translateY(-200%); }
.skip-link:focus-visible { transform: none; }
.main:focus { outline: none; } /* focused only as the skip link's target */

/* ---- Fast nav: instant dim, never a blank page ------------------------------------------ */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
                   overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* `static/nav.js` adds this the moment a fast-nav link is clicked, synchronously, in the same
   tick as the click. Old content stays exactly where it is (never removed, never swapped for a
   skeleton) -- just faded and inert -- so if the request errors there is nothing to restore:
   `nav.js` only has to remove this class again. */
.main.is-navigating { opacity: 0.55; pointer-events: none; transition: opacity 120ms var(--ease); }

/* ---- Chrome: phone top bar + bottom tabs, desktop rail -------------------------------- */
.shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
.rail { display: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
          min-height: 56px; padding: env(safe-area-inset-top) var(--gutter) 0; }
.topbar .brand { font-size: 22px; }
.topbar-business { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
                   color: var(--ink-soft); font-size: 14px; }
.main { min-width: 0; max-width: 1120px;
        padding: 12px max(var(--gutter), env(safe-area-inset-right))
                 calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom))
                 max(var(--gutter), env(safe-area-inset-left)); }
.tabbar { position: fixed; inset: auto 0 0 0; z-index: var(--z-nav); display: grid;
          grid-template-columns: repeat(4, 1fr); background: var(--bg); border-top: 1px solid var(--line);
          padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.tab { position: relative; min-height: var(--tabbar-h); display: flex; align-items: center;
       justify-content: center; gap: 6px; text-decoration: none; color: var(--ink-soft); font-weight: 500;
       -webkit-tap-highlight-color: transparent; }
.tab:focus-visible { outline-offset: -4px; border-radius: var(--r-md); }
.tab.is-active { color: var(--ink); font-weight: 600; }
/* The active place is marked by weight and a bar, not by colour alone. */
.tab.is-active::before { content: ""; position: absolute; top: -1px; left: 50%; width: 28px; height: 3px;
                         margin-left: -14px; border-radius: 0 0 3px 3px; background: var(--brand); }
.count { font: 500 13px/1 var(--mono); color: var(--urgent); font-variant-numeric: tabular-nums; }

@media (min-width: 900px) {
  html, html:has(.work-bar) { scroll-padding-bottom: 0; }
  .shell { grid-template-columns: 240px minmax(0, 1fr); }
  .topbar, .tabbar { display: none; }
  .rail { display: flex; flex-direction: column; padding: 32px 24px 24px; border-right: 1px solid var(--line);
          position: sticky; top: 0; height: 100dvh; }
  .main { padding: 44px 48px 72px; }
}
.brand { font: italic 400 26px/1.1 var(--serif); text-decoration: none; color: var(--brand-strong); }
.brand-line { margin: 8px 0 32px; color: var(--ink-faint); font-size: 14px; line-height: 1.45; }
.rail-nav { display: grid; gap: 2px; margin: 0 -12px; }
.rail-link { display: flex; justify-content: space-between; align-items: center; min-height: var(--touch);
             padding: 0 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink-soft);
             font-weight: 500; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.rail-link:hover { background: var(--surface-2); color: var(--ink); }
.rail-link.is-active { background: var(--brand-tint); color: var(--ink); font-weight: 600; }
.rail-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.rail-business { margin: 0; font-weight: 500; }
.link-button { display: inline-flex; align-items: center; min-height: 40px; padding: 0; background: none;
               border: 0; color: var(--ink-soft); font: inherit; font-size: 14px; cursor: pointer;
               text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: var(--ink); }

/* ---- Type ------------------------------------------------------------------------------ */
.eyebrow { margin: 0; color: var(--ink-faint); font-size: 14px; }
h1 { margin: 4px 0 8px; font: 600 28px/1.15 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
@media (min-width: 900px) { h1 { font-size: 36px; } }
.main h2 { margin: 0 0 12px; font: 600 20px/1.25 var(--serif); letter-spacing: -0.005em; text-wrap: balance; }
.lede { margin: 0 0 28px; color: var(--ink-soft); max-width: 60ch; text-wrap: pretty; }
.meta { font: 400 13px/1.45 var(--mono); color: var(--ink-faint); }
.quiet { margin: 0; color: var(--ink-soft); }

/* ---- Notes and states ------------------------------------------------------------------ */
.preview-note { max-width: var(--measure); margin: 0 0 24px; padding: 10px 14px; border-radius: var(--r-sm);
                background: var(--accent-tint); border: 1px solid var(--accent-line); color: var(--ink);
                font-size: 14px; }
.notice { max-width: var(--measure); margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r-sm);
          background: var(--urgent-tint); border: 1px solid var(--urgent-line); color: var(--ink);
          font-size: 15px; }
/* "Nothing waiting" is the good outcome, so it is drawn as one. */
.empty { max-width: var(--measure); margin: 0; padding: 28px 0 32px; border-top: 1px solid var(--line);
         font: 400 22px/1.3 var(--serif); color: var(--ink-soft); }
.empty::before { content: ""; display: block; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 50%;
                 background: var(--ok-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23156f41' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }

/* ---- Buttons and fields ---------------------------------------------------------------- */
.btn { min-height: var(--touch); padding: 0 20px; border-radius: var(--r-md); border: 1px solid var(--line);
       background: var(--surface); color: var(--ink); font: 500 16px var(--sans); cursor: pointer;
       display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
       text-decoration: none; -webkit-tap-highlight-color: transparent;
       transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
                   color var(--dur) var(--ease), transform 120ms var(--ease); }
.btn:not([disabled]):hover { background: var(--surface-2); border-color: var(--line-control); }
.btn:not([disabled]):active { transform: translateY(1px); }
.btn-primary { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.btn-primary:not([disabled]):hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ink-soft); padding: 0 14px; }
.btn-quiet:not([disabled]):hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
/* Sending: still clearly the primary action, just busy. Not greyed out like "switched off". */
.btn[aria-busy="true"] { opacity: .8; cursor: progress; }
.login-form input, .draft, .composer-input {
  width: 100%; border: 1px solid var(--line-control); border-radius: var(--r-md); background: var(--surface);
  color: var(--ink); font: inherit; transition: border-color var(--dur) var(--ease); }
.login-form input:focus-visible, .draft:focus-visible, .composer-input:focus-visible {
  outline-offset: 1px; border-color: var(--brand); }

/* ---- Login ----------------------------------------------------------------------------- */
.login-body { display: grid; place-items: center; min-height: 100dvh; padding: var(--gutter); }
.login { width: min(400px, 100%); }
.login .brand { display: inline-block; margin: 0 0 20px; }
.login .lede { margin-bottom: 24px; }
.login-form { display: grid; gap: 16px; }
.login-form label { display: grid; gap: 6px; font-weight: 500; }
.login-form input { min-height: var(--touch); padding: 0 14px; }
.login-form .btn { margin-top: 4px; }
.login .notice { margin-bottom: 16px; }

/* ---- Today: the waiting queue ---------------------------------------------------------- */
.queue { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.queue-item { border-top: 1px solid var(--line); }
.queue-item:last-child { border-bottom: 1px solid var(--line); }
.queue-item a, .queue-item-static { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 2px;
                margin: 0 -16px; padding: 18px 16px 20px; border-radius: var(--r-md); text-decoration: none;
                transition: background-color var(--dur) var(--ease); }
.queue-item a > *, .queue-item-static > * { grid-column: 1; }
.queue-item .meta { grid-row: 1; }
.queue-item a::after { content: ""; grid-column: 2; grid-row: 1 / span 3; align-self: center; width: 8px; height: 8px;
                       margin-right: 4px; border-top: 2px solid var(--ink-faint); border-right: 2px solid var(--ink-faint);
                       transform: rotate(45deg); transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.queue-item a:hover { background: var(--surface-2); }
.queue-item a:hover::after { border-color: var(--ink); transform: translateX(3px) rotate(45deg); }
.queue-item strong { margin-top: 2px; font: 600 22px/1.2 var(--serif); letter-spacing: -0.005em; }
.queue-summary { color: var(--ink-soft); }
/* Escalations and failed deliveries say so in words; colour only reinforces it. */
.queue-item.is-escalation .meta, .queue-item.is-undelivered .meta { color: var(--urgent); }

/* ---- Work item ------------------------------------------------------------------------- */
.back { display: inline-flex; align-items: center; gap: 8px; min-height: var(--touch); margin: -8px 0 12px;
        color: var(--ink-soft); text-decoration: none; }
.back:hover { color: var(--ink); }
.work { display: grid; gap: 36px; }
.work-context > .meta { margin: 0; }
.work-context > .meta.is-undelivered { color: var(--urgent); }
.work-context > .lede { margin-bottom: 0; }
.said { display: grid; gap: 10px; max-width: var(--measure); margin-top: 32px; }
.said h2 { margin-bottom: 2px; }
.said .notice { margin: 0; }
.bubble { width: fit-content; max-width: min(34rem, 88%); margin: 0; padding: 10px 14px 12px;
          border-radius: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.who { display: block; margin-bottom: 2px; font: 500 12px/1.4 var(--mono); color: var(--ink-faint); }
/* Them on the left in plain white; the business (and, on Ask, you) on the right in teal. */
.bubble-inbound { justify-self: start; background: var(--surface); border: 1px solid var(--line);
                  border-bottom-left-radius: 6px; }
.bubble-outbound { justify-self: end; background: var(--brand-tint); border: 1px solid var(--brand-tint);
                   border-bottom-right-radius: 6px; }
.bubble-outbound .who { color: var(--brand); }
.reply { max-width: var(--measure); }
.draft { display: block; min-height: 168px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.draft[readonly] { background: var(--surface-2); }
.work-bar { margin-top: 14px; }
.work-note { font-size: 14px; color: var(--ink-soft); }
.work-note:not(:empty) { margin: 0 0 10px; }
.work-actions { display: flex; align-items: center; gap: 8px; }
.work-actions .btn-primary { flex: 1 1 auto; }
.done { flex: 1 1 auto; margin: 0; font-weight: 500; }
.done.ok { color: var(--ok-ink); } .done.held { color: var(--urgent); }
.done.ok::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 8px;
                   vertical-align: -3px; border-radius: 50%;
                   background: var(--ok-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23156f41' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
/* Phone: the decision stays under the thumb, pinned above the tabs (Steady's work item). */
@media (max-width: 899.98px) {
  .work { padding-bottom: 100px; }
  .work-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
              z-index: var(--z-bar); margin: 0;
              padding: 12px max(var(--gutter), env(safe-area-inset-right)) 12px max(var(--gutter), env(safe-area-inset-left));
              background: var(--bg); border-top: 1px solid var(--line); }
  .work-actions .btn-quiet { padding: 0 12px; }
}
/* Wide desktop: what they said on the left, your reply beside it (Steady's work item). */
@media (min-width: 1100px) {
  .work { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; align-items: start; }
  .reply { position: sticky; top: 44px; padding-top: 48px; }
}

/* ---- Diary ----------------------------------------------------------------------------- */
.week-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 28px; }
.week { display: grid; gap: 16px; }
.day-head { display: grid; gap: 2px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.day-name { font-weight: 600; }
.day.is-today .day-head { padding-bottom: 9px; border-bottom: 2px solid var(--brand); }
.day.is-today .day-name { color: var(--brand-strong); }
.slot { display: grid; gap: 1px; margin-bottom: 16px; }
.slot strong { font-weight: 600; }
.slot-service { color: var(--ink-soft); font-size: 14px; }
.day-closed, .day-free { margin: 0; color: var(--ink-faint); }
/* Phone: one day at a time, swiped sideways; the next day peeks in so the swipe is obvious.
   It opens on today where the browser supports scroll-initial-target, and on Monday elsewhere.
   Tablets get the same strip with narrower days, since seven columns don't fit until 1100px. */
@media (max-width: 1099.98px) {
  .week { --bleed: var(--gutter); grid-auto-flow: column; grid-auto-columns: 84%; gap: 20px; overflow-x: auto;
          overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
          margin-inline: calc(-1 * var(--bleed)); padding: 0 var(--bleed) 8px; scroll-padding-inline: var(--bleed); }
  .day { scroll-snap-align: start; }
  .day.is-today { scroll-initial-target: nearest; }
}
@media (min-width: 600px) and (max-width: 1099.98px) { .week { grid-auto-columns: 200px; } }
@media (min-width: 900px) and (max-width: 1099.98px) { .week { --bleed: 48px; } }
@media (min-width: 1100px) {
  .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
  .slot-service { overflow-wrap: anywhere; }
}

/* ---- Ask ------------------------------------------------------------------------------- */
.ask-log { display: grid; gap: 10px; max-width: var(--measure); margin-bottom: 16px; }
.ask-log:empty { margin: 0; }
.composer { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); display: flex; gap: 8px;
            max-width: var(--measure); padding: 12px 0; background: var(--bg); }
@media (min-width: 900px) { .composer { bottom: 0; padding-bottom: 24px; } }
.composer-input { flex: 1; min-width: 0; min-height: var(--touch); padding: 0 16px; }

/* ---- Practice: read-only, hairline sections (Steady's business page) ------------------- */
.practice-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
                 gap: 12px 20px; max-width: var(--measure); }
.detail-switch { flex: 0 0 auto; margin-top: 4px; }
.practice { max-width: var(--measure); }
.part { padding: 22px 0 26px; border-top: 1px solid var(--line); }
.part-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
             column-gap: 16px; margin-bottom: 6px; }
.part-head h2 { margin: 0; }
.part-link { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--brand);
             font-weight: 500; text-underline-offset: 3px; }
.part-link:hover { color: var(--brand-strong); }
.part p { margin: 0 0 4px; }
.part .notice { margin: 4px 0 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0;
           border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
/* A readiness row's status + its Edit link, kept together on the right (voice agent room). */
.row-status { display: flex; align-items: baseline; gap: 12px; flex: 0 0 auto; }
.hours { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin: 0; }
.hours dt, .hours dd { padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours dd { margin: 0; color: var(--ink-soft); text-align: right; font-variant-numeric: tabular-nums; }
.hours dt:nth-last-of-type(1), .hours dd:last-of-type { border-bottom: 0; }
/* Plan & usage: one meter per module the plan sells (billing core W5) — read-only, no controls. */
.meters { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 16px; }
.meter { display: grid; gap: 6px; }
.meter-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px;
              font-size: 14px; color: var(--ink); }
.meter-bar { display: block; width: 100%; height: 8px; }
.meter-bar::-webkit-meter-bar { height: 8px; border: none; border-radius: 999px; background: var(--surface-2); }
.meter-bar::-webkit-meter-optimum-value { border-radius: 999px; background: var(--brand); }
.meter-bar::-webkit-meter-suboptimum-value { border-radius: 999px; background: var(--warn); }
.meter-bar::-webkit-meter-even-less-good-value { border-radius: 999px; background: var(--urgent); }
.meter-bar::-moz-meter-bar { border-radius: 999px; background: var(--brand); }
.meter-bar:-moz-meter-optimum::-moz-meter-bar { background: var(--brand); }
.meter-bar:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--warn); }
.meter-bar:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--urgent); }
.meter-note { margin: 0; color: var(--ink-soft); font-size: 13px; }
.meter-note.is-exhausted { color: var(--urgent); }
.checkout-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.checkout-form select { min-height: var(--touch); padding: 0 12px; border: 1px solid var(--line-control);
                         border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; }
.checkout-form #checkout-note:not([hidden]) { flex-basis: 100%; margin: 0; }
/* Always visible, at every width: the rail's sign out is desktop-only (hidden under 900px). */
.signout { max-width: var(--measure); margin: 24px 0 0; }

/* ---- Practice edit rooms (business/hours/services/autonomy/channels/plan) -------------- */
.room-form { display: grid; gap: 16px; max-width: 30rem; margin: 20px 0 0; }
.room-form label { display: grid; gap: 6px; font-weight: 500; }
.room-form input, .room-form select, .room-form textarea {
  min-height: var(--touch); padding: 0 14px; border: 1px solid var(--line-control);
  border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; }
.room-form textarea { padding: 10px 14px; min-height: 88px; resize: vertical; }
.room-form .btn { justify-self: start; margin-top: 4px; }
.room-fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: none; }
.room-fieldset legend { padding: 0 0 4px; font-weight: 600; }
.room-check { display: flex; align-items: center; gap: 10px; min-height: var(--touch); font-weight: 400; }
.room-list { list-style: none; margin: 16px 0 0; padding: 0; max-width: 30rem; }
.room-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px;
                 padding: 10px 0; border-bottom: 1px solid var(--line); }
.room-list form { margin: 0; }
.channel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.channel-actions form { margin: 0; }

.hours-form { max-width: 34rem; }
.hours-grid { display: grid; gap: 10px; margin: 20px 0; }
.hours-row { display: grid; grid-template-columns: 92px 1fr 1fr auto; gap: 8px; align-items: center; }
.hours-row input[type=time] { min-height: var(--touch); padding: 0 10px; border: 1px solid var(--line-control);
                               border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; }
.hours-day { font-weight: 500; }
.hours-closed { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 599.98px) {
  .hours-row { grid-template-columns: 1fr 1fr; grid-template-areas: "day day" "open close" "closed closed"; }
  .hours-row .hours-day { grid-area: day; } .hours-row input:nth-of-type(1) { grid-area: open; }
  .hours-row input[type=time]:nth-of-type(2) { grid-area: close; } .hours-row .hours-closed { grid-area: closed; }
}

.catalogue { list-style: none; margin: 16px 0 0; padding: 0; max-width: 40rem; display: grid; gap: 4px; }
.catalogue-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.catalogue-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.catalogue-detail { display: grid; grid-template-columns: max-content 1fr; gap: 2px 16px; margin: 10px 0 0; }
.catalogue-detail dt { color: var(--ink-faint); font-size: 13px; }
.catalogue-detail dd { margin: 0; }
@media (min-width: 900px) {
  .catalogue { max-width: none; }
  .catalogue-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 24px;
                    align-items: start; padding: 16px 0; }
  .catalogue-detail { grid-template-columns: repeat(2, max-content 1fr); }
}

/* ---- Public book page (/book/{key}) — no owner chrome, no nav bars --------------------- */
.book-body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans);
             -webkit-font-smoothing: antialiased; }
.book { max-width: var(--measure); margin: 0 auto;
        padding: max(28px, calc(env(safe-area-inset-top) + 16px)) var(--gutter) 56px; }
.book-services { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.book-card { display: flex; align-items: center; justify-content: space-between; gap: 16px;
             min-height: var(--touch); padding: 16px 18px; border: 1px solid var(--line);
             border-radius: var(--r-lg); background: var(--surface); text-decoration: none; color: var(--ink);
             transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.book-card:hover { border-color: var(--line-control); background: var(--surface-2); }
.book-card strong { font: 600 18px/1.3 var(--serif); }
.date-strip { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 24px; padding: 2px 2px 6px;
              scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.date-chip { scroll-snap-align: start; flex: 0 0 auto; display: flex; flex-direction: column;
             align-items: center; gap: 2px; min-width: 64px; min-height: var(--touch); padding: 8px 10px;
             border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink);
             font-weight: 500; transition: border-color var(--dur) var(--ease),
             background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.date-chip:hover { border-color: var(--line-control); }
.date-chip.is-selected { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.date-chip-more { color: var(--ink-soft); }
.slot-chips { list-style: none; margin: 0; padding: 0;
              display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.slot-chip { display: flex; align-items: center; justify-content: center; min-height: var(--touch);
             padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none;
             color: var(--ink); font: 500 15px/1 var(--mono); font-variant-numeric: tabular-nums;
             transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.slot-chip:hover { border-color: var(--brand); background: var(--brand-tint); }
.book-form { display: grid; gap: 16px; margin-top: 20px; max-width: 30rem; }
.book-form label { display: grid; gap: 6px; font-weight: 500; }
.book-form input, .book-form textarea { min-height: var(--touch); padding: 10px 14px; line-height: 1.4; }
.book-form textarea { min-height: 88px; resize: vertical; }
@media (min-width: 600px) {
  .book { padding-top: 64px; }
  .book-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Setup wizard (/setup/*) ------------------------------------------------------------ */
.setup-progress { display: flex; gap: 6px; max-width: var(--measure); margin: 0 0 20px; }
.setup-progress-dot { flex: 1 1 0; height: 4px; border-radius: 999px; background: var(--line); }
.setup-progress-dot.is-done { background: var(--brand); }
.setup-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; max-width: var(--measure); }
.setup-score { margin: 4px 0 10px; font: 600 40px/1 var(--serif); color: var(--brand-strong); }
.industry-picker { display: grid; gap: 8px; max-width: 30rem; margin-top: 4px; }
.industry-choice { justify-content: flex-start; flex-direction: column; align-items: flex-start; gap: 2px;
                    min-height: auto; padding: 12px 16px; text-align: left; white-space: normal; }
/* A visually-hidden radio drives selection natively (works with no JS at all) -- `:has()`
   reflects its real checked state rather than a class that would need JS to stay in sync. */
.industry-choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.industry-choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.industry-choice-label { font-weight: 600; }
/* ---- Business address autocomplete (Google Places, proxied — see setup_address.py) ------ */
.address-suggestions { list-style: none; margin: 4px 0 0; padding: 0; max-width: 30rem; }
.address-suggestions:empty { display: none; }
.address-suggestions li { border: 1px solid var(--line); border-top: none; }
.address-suggestions li:first-child { border-top: 1px solid var(--line); border-radius: var(--r-md) var(--r-md) 0 0; }
.address-suggestions li:last-child { border-radius: 0 0 var(--r-md) var(--r-md); }
.address-suggestion { display: block; width: 100%; min-height: var(--touch); padding: 8px 14px;
                       text-align: left; background: var(--surface); border: 0; cursor: pointer;
                       font: inherit; color: var(--ink); }
.address-suggestion:hover, .address-suggestion:focus-visible { background: var(--surface-2); }
.review-item { flex-wrap: wrap; align-items: flex-start; gap: 10px 16px; }
.setup-card { display: block; max-width: var(--measure); margin: 0 0 20px; padding: 16px 18px;
              border: 1px solid var(--accent-line); border-radius: var(--r-lg); background: var(--accent-tint);
              text-decoration: none; color: var(--ink); transition: border-color var(--dur) var(--ease); }
.setup-card:hover { border-color: var(--brand); }
.setup-card strong { display: block; font: 600 18px/1.3 var(--serif); }
/* ---- Practice → Phone number ------------------------------------------------------------ */
.number-search { display: flex; align-items: end; gap: 12px; max-width: 30rem; margin: 20px 0 16px; }
.number-search label { flex: 1 1 auto; display: grid; gap: 6px; font-weight: 500; }
.number-search input { min-height: var(--touch); padding: 10px 14px; }
.number-live { font: 600 28px/1.2 var(--serif); font-variant-numeric: tabular-nums; margin: 12px 0 4px; }
.connect-lane { max-width: 30rem; margin-top: 24px; }
.connect-lane summary { min-height: var(--touch); display: flex; align-items: center;
                         color: var(--ink-soft); cursor: pointer; }
.connect-lane .room-form { margin-top: 12px; }
/* ---- Setup → Phone (radio "cards", R17/R18/R27's three choices) ------------------------- */
.choice-card { display: block; max-width: var(--measure); margin: 0 0 12px; padding: 14px 16px;
               border: 1px solid var(--line); border-radius: var(--r-lg); }
.choice-card.is-selected { border-color: var(--brand); background: var(--brand-tint); }
.choice-head { display: flex; align-items: center; gap: 10px; min-height: var(--touch); font-weight: 600; }
.choice-body { margin: 4px 0 0 30px; display: grid; gap: 8px; }
.choice-connect { max-width: var(--measure); margin-top: 12px; }
/* ---- Practice → Services / setup → Services -------------------------------------------- */
.starter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; max-width: 30rem; }
.starter-chips form { margin: 0; }
.starter-chip { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px;
                background: var(--surface); color: var(--ink); font-weight: 500; }
.starter-chip:not([disabled]):hover { border-color: var(--brand); background: var(--brand-tint); }

/* ---- Motion: state changes only -------------------------------------------------------- */
@keyframes arrive { from { opacity: 0; transform: translateY(4px); } }
.ask-log .bubble, .done { animation: arrive 220ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; transition: none !important; }
}
