/* GoodShortcut v3 runtime tokens and components, adopted from
   docs/design/v3/goodshortcut-brand.css. Keep design references read-only.
   app.css retains current page geometry until each ordered v3 layout step. */

:root {
  color-scheme: light;

  /* Core palette (existing names) */
  --ink: #101c2d;          /* text, wordmark-adjacent ink · 16.9:1 on white */
  --muted: #536274;        /* secondary text · 6.3:1 on white, 5.7:1 on canvas */
  --teal: #006f65;         /* primary actions, links, selection · 6.0:1 on white */
  --teal-dark: #075a53;    /* hover, featured card ground */
  --brand: #00ac9a;        /* logo teal · decoration only, 2.8:1, never body text */
  --canvas: #f1f3f6;       /* page ground */
  --panel: #fff;           /* cards, lists, sheets */
  --line: #dfe5eb;         /* dividers */

  /* Tool tints (existing) + paired icon inks (new) */
  --mint: #d8f3eb;     --mint-ink: #006f65;
  --lavender: #ece8ff; --lavender-ink: #5b3fb5;
  --blue: #e3edff;     --blue-ink: #2b5bb8;
  --coral: #ffe7db;    --coral-ink: #b4441c;
  --gold: #fff1cf;     --gold-ink: #8a5a00;
  --aqua: #dcf2f4;     --aqua-ink: #0b6a78;

  /* Surfaces and lines (new) */
  --surface-sunken: #e8ecf1;  /* trays, table heads, wells */
  --line-strong: #8a97a6;     /* input borders, switch track · 3:1 on white */
  --teal-tint: #dff3ee;       /* tonal buttons, current nav item */
  --prose: #2b3747;           /* long-form reading text · 12:1 on white */

  /* Status (new) — every fg ≥ 4.5:1 on its bg */
  --ready-fg: #075a53;    --ready-bg: #d8f3eb;
  --concept-fg: #5b3fb5;  --concept-bg: #ece8ff;
  --planned-fg: #4a5868;  --planned-bg: #e6eaef;
  --success-fg: #11683f;  --success-bg: #dcf2e5;
  --warning-fg: #8a4b00;  --warning-bg: #fff1cf; --warning-line: #e9c27a;
  --danger-fg: #b3261e;   --danger-bg: #fce8e6;  --danger-line: #eeb0aa;
  --info-fg: #2b5bb8;     --info-bg: #e3edff;

  /* Shape — One UI 9 direction: still soft, a little squarer than v2 */
  --radius-hero: 32px;
  --radius-card: 26px;
  --radius-inner: 18px;
  --radius-control: 14px;
  --radius-icon: 18px;
  --radius-ad: 12px;       /* deliberately less round than tool cards */
  --radius-pill: 999px;

  /* Elevation */
  --shadow: 0 9px 30px rgb(16 28 45 / 4%);
  --shadow-1: 0 1px 2px rgb(16 28 45 / 5%), 0 2px 8px rgb(16 28 45 / 4%);
  --shadow-float: 0 10px 30px rgb(16 28 45 / 16%), 0 2px 6px rgb(16 28 45 / 8%);

  /* Type — system fonts only: no third-party font requests */
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Space — 4px base */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-7: 32px; --space-8: 40px; --space-9: 48px; --space-10: 64px;

  --focus: #006f65;
  --target: 44px;
  --page-width: 1240px;
}

/* ---------- Base ---------- */
.page { container: page / inline-size; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
.page *, .page *::before, .page *::after { box-sizing: border-box; }
.page :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.page-width { width: 100%; max-width: var(--page-width); margin-inline: auto; padding-inline: var(--space-7); }
.page p, .page h1, .page h2, .page h3, .page h4 { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.display { font-size: clamp(34px, 3.6cqi, 52px); line-height: 1.06; font-weight: 750; letter-spacing: -.025em; }
.title-1 { font-size: 32px; line-height: 1.12; font-weight: 750; letter-spacing: -.02em; }
.title-2 { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; }
.title-3 { font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.lead { font-size: 18px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.mono { font-family: var(--font-mono); font-size: .9em; }
.link { color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--teal-dark); }
.icon { width: 22px; height: 22px; flex: none; }

/* ---------- Header + navigation ---------- */
.site-header { display: flex; align-items: center; gap: var(--space-4); min-height: 88px; }
.brand { display: inline-flex; align-items: center; min-height: var(--target); border-radius: 12px; flex: 1 1 auto; }
.brand img { display: block; width: 228px; height: auto; margin: -20px 0 -20px -18px; }
.nav-tray { display: flex; gap: 4px; padding: 4px; background: var(--surface-sunken); border-radius: var(--radius-pill); }
.nav-tray a { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 20px; border-radius: var(--radius-pill); color: var(--muted); font-weight: 600; text-decoration: none; }
.nav-tray a:hover { color: var(--ink); }
.nav-tray a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); }
.account-button { display: inline-flex; align-items: center; gap: 8px; min-height: var(--target); padding: 0 18px 0 12px; border-radius: var(--radius-pill); background: var(--panel); color: var(--ink); font-weight: 600; text-decoration: none; box-shadow: var(--shadow-1); }
.account-button .avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--teal-tint); color: var(--teal); }

.bottom-nav { display: none; position: sticky; bottom: 12px; z-index: 20; margin: 0 12px 12px; padding: 6px; background: var(--panel); border-radius: 28px; box-shadow: var(--shadow-float); }
.bottom-nav a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border-radius: 22px; color: var(--muted); font-size: 12.5px; font-weight: 650; text-decoration: none; }
.bottom-nav a[aria-current="page"] { color: var(--teal-dark); background: var(--teal-tint); }

/* ---------- Buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--radius-pill); font: 650 16px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s, box-shadow .15s; }
.button-primary { background: var(--teal); color: #fff; }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { background: var(--teal-tint); color: var(--teal-dark); }
.button-secondary:hover { background: #c9ebe3; }
.button-outline { background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.button-outline:hover { background: var(--canvas); }
.button-quiet { background: transparent; color: var(--teal); padding: 0 14px; }
.button-quiet:hover { background: var(--teal-tint); }
.button-small { min-height: var(--target); padding: 0 16px; font-size: 15px; }
.button-block { width: 100%; }
.button[disabled], .button[aria-disabled="true"] { background: var(--surface-sunken); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: var(--target); height: var(--target); border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-button:hover { background: var(--surface-sunken); color: var(--ink); }
.icon-button[aria-pressed="true"] { color: var(--gold-ink); }

/* ---------- Containers and lists ---------- */
.panel { background: var(--panel); border-radius: var(--radius-card); padding: var(--space-7); }
.panel-tight { padding: var(--space-5); }
.list-group { background: var(--panel); border-radius: var(--radius-card); overflow: hidden; list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: var(--space-4); min-height: 64px; padding: 14px 20px; position: relative; }
.list-row + .list-row::before { content: ""; position: absolute; top: 0; left: 20px; right: 20px; border-top: 1px solid var(--line); }
.list-row-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row-title { font-weight: 650; }
.list-row-sub { font-size: 14px; color: var(--muted); }

/* ---------- Form controls ---------- */
.field label, .field .label { display: block; font-size: 15px; font-weight: 650; margin-bottom: 8px; }
.input, .select { width: 100%; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-control); background: var(--panel); color: var(--ink); font: 400 16px/1.2 var(--font); }
.input::placeholder { color: var(--muted); }
.input:hover, .select:hover { border-color: var(--muted); }
.page .input:focus-visible, .page .select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--teal); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger-fg); }
.field-hint { margin-top: 6px; font-size: 14px; color: var(--muted); }
.field-error { margin-top: 6px; font-size: 14px; font-weight: 650; color: var(--danger-fg); }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: var(--target); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--teal); flex: none; }

.switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 52px; height: 32px; margin: 0; border-radius: var(--radius-pill); background: var(--line-strong); cursor: pointer; transition: background-color .15s; }
.switch::before { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(16 28 45 / 25%); transition: transform .15s; }
.switch:checked { background: var(--teal); }
.switch:checked::before { transform: translateX(20px); }
.switch:disabled { opacity: .55; cursor: not-allowed; }
.check .switch { width: 52px; height: 32px; margin: 0; }
.tool-card.is-featured .icon-button[aria-pressed="true"] { color: #ffd76a; }

.search { position: relative; }
.search .search-icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { min-height: 64px; padding: 0 120px 0 58px; border-radius: var(--radius-pill); border-color: transparent; font-size: 18px; box-shadow: var(--shadow-1); }
.search .input:hover { border-color: var(--line); }
.search .search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }

.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: var(--target); padding: 0 18px; border: 0; border-radius: var(--radius-pill); background: var(--panel); color: var(--muted); font: 650 15px/1 var(--font); cursor: pointer; }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip .count { font-weight: 500; opacity: .75; font-variant-numeric: tabular-nums; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-sunken); border-radius: var(--radius-pill); }
.segmented button { display: inline-flex; align-items: center; gap: 8px; min-height: var(--target); padding: 0 18px; border: 0; border-radius: var(--radius-pill); background: none; color: var(--muted); font: 650 15px/1 var(--font); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); }
.segmented .count { font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: var(--radius-pill); background: var(--canvas); font-size: 13px; }

/* ---------- Status labels ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px; border-radius: var(--radius-pill); font: 650 13px/1 var(--font); white-space: nowrap; }
.status svg { width: 15px; height: 15px; }
.status-ready { color: var(--ready-fg); background: var(--ready-bg); }
.status-concept { color: var(--concept-fg); background: var(--concept-bg); }
.status-planned { color: var(--planned-fg); background: var(--planned-bg); }
.status-sample { color: var(--info-fg); background: var(--info-bg); }
.status-success { color: var(--success-fg); background: var(--success-bg); }
.status-warning { color: var(--warning-fg); background: var(--warning-bg); }
.status-danger { color: var(--danger-fg); background: var(--danger-bg); }
.status-on-dark { color: #fff; background: rgb(255 255 255 / 16%); }

/* ---------- Tool icon + card ---------- */
.tool-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: var(--radius-icon); flex: none; }
.tool-icon svg { width: 28px; height: 28px; }
.tint-mint { background: var(--mint); color: var(--mint-ink); }
.tint-lavender { background: var(--lavender); color: var(--lavender-ink); }
.tint-blue { background: var(--blue); color: var(--blue-ink); }
.tint-coral { background: var(--coral); color: var(--coral-ink); }
.tint-gold { background: var(--gold); color: var(--gold-ink); }
.tint-aqua { background: var(--aqua); color: var(--aqua-ink); }

.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); list-style: none; margin: 0; padding: 0; }
.tool-card { position: relative; display: flex; flex-direction: column; gap: 14px; height: 100%; padding: var(--space-6); background: var(--panel); border-radius: var(--radius-card); transition: box-shadow .15s; }
.tool-card:hover { box-shadow: var(--shadow-float); }
.tool-card:has(.tool-card-link:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.tool-card-link { color: inherit; text-decoration: none; }
.tool-card-link:focus-visible { outline: none; }
.tool-card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tool-card .above-link { position: relative; z-index: 1; }
.tool-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tool-card-desc { color: var(--muted); }
.tool-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.tool-card-cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--teal); }
.tool-card-cta .arrow { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--teal-tint); }
.tool-card.is-featured { background: var(--teal-dark); color: #fff; }
.tool-card.is-featured .tool-card-desc { color: rgb(255 255 255 / 88%); }
.tool-card.is-featured .tool-card-cta { color: #fff; }
.tool-card.is-featured .tool-card-cta .arrow { background: rgb(255 255 255 / 16%); }
.tool-card.is-featured .format { background: rgb(255 255 255 / 14%); color: #fff; }
.tool-card.is-featured .icon-button { color: rgb(255 255 255 / 85%); }
.formats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.format { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 8px; background: var(--surface-sunken); color: #3a4757; font: 650 12.5px/1 var(--font-mono); letter-spacing: .02em; }

/* ---------- Notices ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-inner); color: var(--ink); }
.notice > svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.notice-info { background: var(--info-bg); } .notice-info > svg { color: var(--info-fg); }
.notice-success { background: var(--success-bg); } .notice-success > svg { color: var(--success-fg); }
.notice-warning { background: var(--warning-bg); } .notice-warning > svg { color: var(--warning-fg); }
.notice-danger { background: var(--danger-bg); } .notice-danger > svg { color: var(--danger-fg); }
.notice-neutral { background: var(--canvas); } .notice-neutral > svg { color: var(--muted); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.step { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px 0 10px; border-radius: var(--radius-pill); background: var(--panel); color: var(--muted); font-weight: 650; font-size: 15px; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-sunken); font-size: 14px; font-weight: 750; flex: none; }
.step.is-current { color: var(--ink); box-shadow: inset 0 0 0 2px var(--teal); }
.step.is-current .step-n { background: var(--teal); color: #fff; }
.step.is-done { color: var(--ink); }
.step.is-done .step-n { background: var(--mint); color: var(--teal-dark); }
.steps-compact { display: none; }

/* ---------- Progress + Now-bar status capsule ---------- */
.progress { position: relative; height: 8px; border-radius: var(--radius-pill); background: var(--surface-sunken); overflow: hidden; }
.progress::after { content: ""; position: absolute; top: 0; bottom: 0; left: -35%; width: 35%; border-radius: inherit; background: var(--teal); animation: gs-slide 1.4s ease-in-out infinite; }
/* Task dock: a light floating card for a running browser task. The tool's own
   icon sits inside a turning ring; a hairline track runs along the bottom edge. */
.task-dock { position: sticky; bottom: 16px; z-index: 30; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; width: min(560px, calc(100% - 24px)); margin: 0 auto; padding: 12px 12px 16px; background: var(--panel); border-radius: 22px; box-shadow: var(--shadow-float), inset 0 0 0 1px var(--line); overflow: hidden; }
.task-dock-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); }
.task-dock-icon > svg { width: 24px; height: 24px; }
.task-dock-ring { position: absolute; inset: -4px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--teal); border-right-color: var(--teal); animation: gs-spin 1.1s linear infinite; }
.task-dock-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.task-dock-title { font-weight: 700; }
.task-dock-sub { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-dock-track { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--surface-sunken); overflow: hidden; }
.task-dock-track::after { content: ""; position: absolute; top: 0; bottom: 0; left: -35%; width: 35%; background: var(--teal); animation: gs-slide 1.4s ease-in-out infinite; }
.task-dock.is-done .task-dock-icon { background: var(--success-bg); color: var(--success-fg); }
.task-dock.is-done .task-dock-ring { display: none; }
.task-dock.is-done .task-dock-track::after { animation: none; left: 0; width: 100%; background: var(--success-fg); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgb(255 255 255 / 30%); border-top-color: #fff; animation: gs-spin .9s linear infinite; flex: none; }
.spinner-dark { border-color: var(--surface-sunken); border-top-color: var(--teal); }
@keyframes gs-spin { to { transform: rotate(360deg); } }
@keyframes gs-slide { to { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .spinner, .progress::after, .task-dock-ring, .task-dock-track::after { animation: none; }
  .progress::after, .task-dock-track::after { left: 0; width: 100%; opacity: .35; }
}

/* ---------- Tables + files ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-inner); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.data-table th { text-align: left; padding: 10px 14px; background: var(--surface-sunken); color: #3a4757; font-weight: 650; white-space: nowrap; }
.data-table td { padding: 10px 14px; border-top: 1px solid var(--line); white-space: nowrap; }
.source { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 6px; font: 700 12px/1 var(--font); }
.source-a { background: var(--mint); color: var(--ready-fg); }
.source-b { background: var(--blue); color: var(--blue-ink); }
.file-slot { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: var(--space-5); border-radius: var(--radius-inner); background: var(--canvas); box-shadow: inset 0 0 0 1.5px var(--line); }
.file-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-inner); background: var(--canvas); }

/* ---------- Advertising (Guest/Free only) ---------- */
.ad-slot { display: flex; flex-direction: column; gap: 8px; }
.ad-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* Reserved ad box: exact IAB size held before any ad loads, so the page never jumps. */
.ad-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; max-width: 100%; border-radius: var(--radius-ad); background: var(--surface-sunken); box-shadow: inset 0 0 0 1.5px var(--line-strong); text-align: center; padding: 8px; }
.ad-size { font: 700 15px/1.2 var(--font-mono); color: #3a4757; }
.ad-note { font-size: 12.5px; color: var(--muted); }
.ad-frame { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 112px; padding: 20px 24px; border-radius: var(--radius-ad); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ---------- Plans ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.plan-card { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-7); background: var(--panel); border-radius: var(--radius-card); }
.plan-card.is-highlighted { box-shadow: inset 0 0 0 2px var(--teal); }
.price { font-size: 40px; line-height: 1; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; }
.feature-list svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--teal); }

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--space-8) var(--space-10); color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { color: var(--muted); display: inline-flex; align-items: center; min-height: var(--target); }
.footer-links a:hover { color: var(--ink); }

/* ---------- Long-form documents (legal, about) ---------- */
.doc-layout { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: flex-start; }
.doc-toc { flex: 1 1 240px; max-width: 290px; padding: 8px; }
.doc-toc a { display: flex; align-items: center; min-height: var(--target); padding: 0 14px; border-radius: 12px; color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none; }
.doc-toc a:hover { background: var(--canvas); color: var(--ink); }
.doc-body { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-5); }
.toc-details { background: var(--panel); border-radius: var(--radius-inner); }
.toc-details summary { display: flex; align-items: center; min-height: 52px; padding: 0 18px; font-weight: 650; cursor: pointer; }
.toc-details a { display: flex; align-items: center; min-height: var(--target); padding: 0 18px; color: var(--teal); font-weight: 600; text-decoration: none; }
.prose { max-width: 72ch; }
.prose section { scroll-margin-top: 24px; }
.prose section + section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.prose h2 { font-size: 21px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; margin-bottom: 10px; }
.prose p { color: var(--prose); }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 10px; }
.prose ul { margin: 0; padding-left: 20px; color: var(--prose); display: flex; flex-direction: column; gap: 6px; }
.def-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0; }
.def-list > div { padding: 12px 14px; border-radius: 14px; background: var(--canvas); }
.def-list dt { font-size: 13px; font-weight: 650; color: var(--muted); }
.def-list dd { margin: 2px 0 0; font-weight: 650; }

/* ---------- FAQ accordion (native details/summary) ---------- */
.faq { list-style: none; margin: 0; padding: 0; background: var(--panel); border-radius: var(--radius-card); overflow: hidden; }
.faq > li + li { border-top: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 20px; font-weight: 650; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-top: -4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq summary:focus-visible { outline-offset: -3px; }
.faq .answer { padding: 0 20px 18px; color: var(--prose); }

/* ---------- Support conversations ---------- */
.input.textarea { min-height: 150px; padding: 12px 16px; line-height: 1.5; resize: vertical; }
.ticket { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; border: 0; border-radius: 16px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ticket:hover { background: var(--canvas); }
.ticket[aria-current="true"] { background: var(--teal-tint); }
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 18px; background: var(--canvas); color: var(--prose); }
.msg-me { align-self: flex-end; background: var(--teal-tint); border-bottom-right-radius: 6px; }
.msg-them { align-self: flex-start; border-bottom-left-radius: 6px; }
.msg-meta { display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 650; color: var(--muted); }

/* ---------- Consent banner: equal-weight choices, never blocks the page ---------- */
.consent { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; max-width: 1040px; margin: 0 auto; padding: 20px 24px; background: var(--panel); border-radius: 24px; box-shadow: var(--shadow-float), inset 0 0 0 1px var(--line); }
.consent-body { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Responsive: container queries, so one source renders every frame width ---------- */
@container page (max-width: 1080px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container page (max-width: 760px) {
  .page-width { padding-inline: var(--space-4); }
  .site-header { min-height: 72px; }
  .brand img { width: 186px; margin: -16px 0 -16px -15px; }
  .nav-tray, .hide-sm { display: none !important; }
  .account-button { padding: 0 6px; }
  .account-button .label { display: none; }
  .bottom-nav { display: flex; gap: 4px; }
  .tool-grid, .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: var(--space-5); }
  .plan-card { padding: var(--space-6); }
  .title-1 { font-size: 28px; }
  .lead { font-size: 16px; }
  .search .input { min-height: 56px; font-size: 16px; padding-right: 16px; padding-left: 52px; }
  .search .search-clear { display: none; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--space-4) * -1); padding: 2px var(--space-4) 6px; }
  .chip { flex: none; }
  .steps { display: none; }
  .steps-compact { display: flex; }
  .stack-sm { flex-direction: column !important; align-items: stretch !important; }
  .stack-sm > .button { width: 100%; }
  .task-dock { bottom: 96px; }
  .doc-toc { display: none; }
  .consent { padding: 18px; border-radius: 22px; }
  .consent-actions { width: 100%; }
  .consent-actions .button { flex: 1 1 140px; }
  .msg { max-width: 92%; }
}
@container page (min-width: 761px) {
  .show-sm { display: none !important; }
}
