/* =====================================================================
   CLIPPER website components  -  components.css
   Website-ready copies of the desktop app's design system
   (clipper/ui/static_next/css/base.css + components.css + shell.css).
   Requires app-tokens.css first. Uses ONLY tokens (no raw colours).

   Naming, same spirit as the app:
     c-*      components, IDENTICAL names + values to the app (c-btn, c-card ...)
     site-*   the marketing page frame (the app calls its frame shell-*)
     t-* and u-*  type + utility helpers, same as the app's base.css
     states   is-* classes or ARIA attributes (aria-pressed, aria-checked, aria-selected)

   Index:
     0 base   1 buttons   2 forms   3 badges/dots/status/platform   4 cards/kpi/plan
     5 bar/spinner   6 table   7 tabs + segmented   8 notice   9 steps
     10 layout (pagehead, section, facts, more/FAQ, divider, empty, countdown)
     11 clip card   12 site frame (header, hero, footer, app-window mock)   13 phone
   ===================================================================== */

/* ================================ 0. BASE ================================
   = app base.css: reset, plain canvas, serif headings, focus, scrollbars. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; tab-size: 4; background: var(--ground); scroll-padding-top: calc(var(--site-header-h) + var(--s-4)); }
html, body { margin: 0; }
body {
  min-height: 100vh; background: var(--ground); color: var(--ink);
  font-family: var(--font-sans); font-size: var(--fs-md); line-height: var(--lh-md); font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
a { color: var(--bunsen); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
hr { border: 0; height: 1px; background: var(--line); margin: var(--s-4) 0; }
table { border-collapse: collapse; width: 100%; }
code, kbd, pre, samp { font-family: var(--font-mono); font-size: .92em; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
[hidden] { display: none !important; }

h1, h2, h3, h4, h5, h6, p { margin: 0; }
h1, .t-h1 { font-family: var(--font-serif); font-size: var(--fs-2xl); line-height: var(--lh-2xl); font-weight: 600; letter-spacing: 0; text-wrap: balance; }
h2, .t-h2 { font-family: var(--font-serif); font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: 600; letter-spacing: 0; text-wrap: balance; }
h3, .t-h3 { font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: 600; }
h4, .t-h4 { font-size: var(--fs-md); line-height: var(--lh-md); font-weight: 600; }
.t-serif   { font-family: var(--font-serif); }
.t-display { font-family: var(--font-serif); font-size: var(--fs-hero); line-height: var(--lh-hero); font-weight: 600; text-wrap: balance; }
.t-kpi     { font-size: var(--fs-3xl); line-height: var(--lh-3xl); font-weight: 600; font-variant-numeric: tabular-nums; }
.t-lead    { font-size: var(--fs-md); line-height: var(--lh-md); color: var(--ink-soft); max-width: 68ch; }
.t-lead--lg { font-size: var(--fs-lg); line-height: var(--lh-lg); }
.t-sm      { font-size: var(--fs-sm); line-height: var(--lh-sm); }
.t-xs      { font-size: var(--fs-xs); line-height: var(--lh-xs); }
.t-over    { font-size: var(--fs-xs); line-height: var(--lh-xs); font-weight: 600; color: var(--ink-soft); }   /* sentence case, never caps */
.t-mono    { font-family: var(--font-mono); font-size: .92em; }
.t-num     { font-variant-numeric: tabular-nums; }
.t-soft    { color: var(--ink-soft); }
.t-accent  { color: var(--bunsen); } .t-success { color: var(--ok); } .t-warn { color: var(--warn-ink); } .t-danger { color: var(--danger); }
.t-strong  { font-weight: 600; }
.t-strike  { text-decoration: line-through; color: var(--ink-soft); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--bunsen); outline-offset: 2px; }
a:focus-visible { border-radius: var(--r-xs); }
::selection { background: color-mix(in srgb, var(--bunsen) 25%, transparent); color: var(--ink); }
* { scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }

.u-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.u-row { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.u-wrap { flex-wrap: wrap; }
.u-stack { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.u-stack-4 { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.u-grow { flex: 1 1 auto; min-width: 0; }
.u-end { margin-left: auto; }
.u-grid-auto { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 240px)), 1fr)); }

@keyframes c-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes c-spin    { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ============================== 1. BUTTONS ==============================
   = app .c-btn. Primary is the only filled colour on a screen; one per view. */
.c-btn {
  --btn-h: var(--h-md);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--btn-h); min-width: var(--btn-h); padding: 0 var(--s-4);
  border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-size: var(--fs-sm); line-height: 1; font-weight: 600;
  white-space: nowrap; user-select: none; -webkit-user-select: none; text-decoration: none;
  transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1);
}
.c-btn:hover { background: var(--panel2); text-decoration: none; }
.c-btn:active:not(:disabled) { transform: scale(.98); }
.c-btn:disabled, .c-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.c-btn svg { width: 16px; height: 16px; margin: 0 -2px; }
.c-btn[aria-pressed="true"], .c-btn.is-on { background: var(--bunsen-soft); border-color: var(--accent-line); color: var(--bunsen); }

.c-btn--primary { background: var(--bunsen); border-color: var(--bunsen); color: var(--on-bunsen); }
.c-btn--primary:hover { background: var(--bunsen-hover); border-color: var(--bunsen-hover); }
.c-btn--primary:disabled, .c-btn--primary[aria-disabled="true"] { background: var(--panel2); border-color: var(--line); color: var(--ink-soft); opacity: 1; }
.c-btn--secondary { /* = default .c-btn */ }
.c-btn--ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.c-btn--ghost:hover { background: var(--panel2); color: var(--ink); }
.c-btn--soft { background: var(--bunsen-soft); border-color: transparent; color: var(--bunsen); }
.c-btn--soft:hover { background: color-mix(in srgb, var(--bunsen) 16%, var(--panel)); }
.c-btn--danger { background: var(--panel); border-color: var(--danger); color: var(--danger); }
.c-btn--danger:hover { background: var(--danger-soft); }

.c-btn--sm { --btn-h: var(--h-sm); padding: 0 var(--s-3); border-radius: var(--r-md); }
.c-btn--lg { --btn-h: var(--h-lg); padding: 0 var(--s-5); font-size: var(--fs-md); }
.c-btn--lg svg { width: 18px; height: 18px; }
.c-btn--icon { padding: 0; width: var(--btn-h); }
.c-btn--block { width: 100%; }

.c-btn.is-loading { color: transparent !important; pointer-events: none; }
.c-btn.is-loading > * { visibility: hidden; }
.c-btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--ink-soft); border-right-color: transparent; animation: c-spin .7s linear infinite; visibility: visible;
}
.c-btn--primary.is-loading::after { border-color: var(--on-bunsen); border-right-color: transparent; }

.c-link { color: var(--bunsen); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.c-link:hover { text-decoration: underline; }
.c-link--arrow { display: inline-flex; align-items: center; gap: var(--s-1); }
.c-link--arrow svg { width: 16px; height: 16px; }

/* =============================== 2. FORMS =============================== */
.c-field { display: grid; gap: var(--s-1-5); min-width: 0; }
.c-field + .c-field { margin-top: var(--s-4); }
.c-label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: 600; color: var(--ink); }
.c-label__sub { font-weight: 400; color: var(--ink-soft); font-size: var(--fs-xs); }
.c-hint { font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--ink-soft); }
.c-error { display: flex; align-items: center; gap: var(--s-1-5); font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--danger); }
.c-error svg { width: 14px; height: 14px; }

.c-input, .c-select, .c-textarea {
  width: 100%; height: var(--h-md); padding: 0 var(--s-3); border-radius: var(--r-md);
  background: var(--panel); border: 1px solid var(--line); box-shadow: none;
  color: var(--ink); font-size: var(--fs-sm); line-height: var(--lh-sm); font-variant-numeric: tabular-nums;
  transition: border-color var(--dur-1);
}
.c-input::placeholder, .c-textarea::placeholder { color: var(--ink-soft); opacity: .8; }
.c-input:hover, .c-select:hover, .c-textarea:hover { border-color: var(--line-3); }
.c-input:focus-visible, .c-select:focus-visible, .c-textarea:focus-visible,
.c-input:focus, .c-select:focus, .c-textarea:focus { outline: 2px solid var(--bunsen); outline-offset: -1px; border-color: var(--bunsen); }
.c-input:disabled, .c-select:disabled, .c-textarea:disabled { opacity: .55; cursor: not-allowed; background: var(--panel2); }
.c-input[aria-invalid="true"], .c-field.is-invalid .c-input, .c-field.is-invalid .c-select { border-color: var(--danger); }
.c-input[aria-invalid="true"]:focus, .c-field.is-invalid .c-input:focus { outline-color: var(--danger); }
.c-input--lg { height: var(--h-lg); font-size: var(--fs-md); padding: 0 var(--s-4); }
.c-textarea { height: auto; min-height: 96px; padding: var(--s-2-5) var(--s-3); resize: vertical; line-height: 20px; }
/* The app draws the chevron with an inline SVG data-URI; here it is two token-coloured gradients (same 16px chevron). */
.c-select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.c-select option { background: var(--panel); color: var(--ink); }

/* Checkbox / radio / switch: the native <input> itself (keeps semantics + keyboard). */
.c-check, .c-radio, .c-switch {
  -webkit-appearance: none; appearance: none; margin: 0; flex: none; cursor: pointer; display: inline-block; vertical-align: middle;
  position: relative; border: 1.5px solid var(--line-4); background: var(--panel);
  transition: background-color var(--dur-1), border-color var(--dur-1);
}
.c-check { width: 18px; height: 18px; border-radius: 5px; }
.c-check:hover, .c-radio:hover { border-color: var(--ink-soft); }
.c-check:checked { border-color: var(--bunsen); background: var(--bunsen); }
.c-check:checked::after {
  content: ""; position: absolute; left: 4.5px; top: 1px; width: 5px; height: 10px;
  border: solid var(--on-bunsen); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.c-radio { width: 18px; height: 18px; border-radius: 50%; }
.c-radio:checked { border-color: var(--bunsen); background: var(--bunsen); box-shadow: inset 0 0 0 3.5px var(--panel); }
.c-switch { width: 38px; height: 22px; border-radius: var(--r-pill); border: 0; background: var(--line-3); }
.c-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--knob); box-shadow: var(--knob-shadow); transition: left var(--dur-1);
}
.c-switch:checked { background: var(--bunsen); }
.c-switch:checked::after { left: 18px; }
.c-check:disabled, .c-radio:disabled, .c-switch:disabled { opacity: .45; cursor: not-allowed; }
.c-check:focus-visible, .c-radio:focus-visible, .c-switch:focus-visible { outline-offset: 3px; }

/* <label class="c-choice"><input class="c-check"> <span class="c-choice__text">..<span class="c-choice__sub">..</span></span></label> */
.c-choice { display: inline-flex; align-items: flex-start; gap: var(--s-2-5); min-height: 36px; padding: 8px 0; cursor: pointer; font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--ink); }
.c-choice > input { margin-top: 1px; }
.c-choice > .c-switch { margin-top: -1px; }
.c-choice__text { display: grid; gap: 2px; min-width: 0; }
.c-choice__sub { color: var(--ink-soft); font-size: var(--fs-xs); line-height: var(--lh-xs); }
.c-choice--block { display: flex; }

/* Radio card (e.g. plan picker) */
.c-rcard {
  position: relative; display: flex; flex-direction: column; gap: var(--s-2); text-align: left; min-width: 0;
  padding: var(--s-3) var(--s-4); border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer;
  transition: border-color var(--dur-1), background-color var(--dur-1);
}
.c-rcard:hover { border-color: var(--line-3); background: var(--panel2); }
.c-rcard[aria-checked="true"], .c-rcard:has(input:checked) { border: 2px solid var(--bunsen); padding: calc(var(--s-3) - 1px) calc(var(--s-4) - 1px); background: var(--bunsen-soft); }
.c-rcard:has(input:focus-visible) { outline: 2px solid var(--bunsen); outline-offset: 2px; }
.c-rcard__title { font-weight: 600; font-size: var(--fs-sm); }
.c-rcard__sub { font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--ink-soft); }

/* ============== 3. BADGES / DOTS / LIVE / STATUS / PLATFORM ============== */
.c-badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-sm);
  background: var(--panel2); border: 0; color: var(--ink-soft);
  font-size: var(--fs-xs); line-height: 1; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.c-badge svg { width: 12px; height: 12px; }
.c-badge--lg { height: 24px; padding: 0 10px; }
.c-badge--accent, .c-badge--info { color: var(--bunsen); background: var(--bunsen-soft); }
.c-badge--danger { color: var(--danger); background: var(--danger-soft); }
.c-badge--success { color: var(--ok); background: var(--success-soft); }
.c-badge--warn { color: var(--warn-ink); background: var(--warn-soft); }
.c-badge--solid { background: var(--ink); color: var(--ground); }

.c-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; display: inline-block; }
.c-dot--success { background: var(--ok); } .c-dot--warn { background: var(--warn); } .c-dot--danger { background: var(--danger); }
.c-dot--info { background: var(--bunsen); } .c-dot--off { background: var(--ink-soft); } .c-dot--lg { width: 10px; height: 10px; }

.c-live { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: var(--fs-xs); line-height: 1.2; font-weight: 600; white-space: nowrap; }
.c-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; }
.c-live--off { color: var(--ink-soft); font-weight: 400; }
.c-live--off::before { background: var(--ink-soft); }

.c-status { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); white-space: nowrap; }
.c-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-soft); flex: none; }
.c-status--live::before { background: var(--danger); } .c-status--ok::before { background: var(--ok); }
.c-status--warn::before { background: var(--warn); } .c-status--info::before { background: var(--bunsen); }
.c-status--danger { color: var(--danger); } .c-status--danger::before { background: var(--danger); }
.c-status--off { color: var(--ink-soft); } .c-status--off::before { background: var(--ink-soft); }

/* Platform label: coloured glyph, plain text (platform colour NEVER on text, borders or backgrounds) */
.c-plat { --plat: var(--ink-soft); display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: var(--fs-xs); line-height: 1.2; white-space: nowrap; }
.c-plat svg { width: 14px; height: 14px; color: var(--plat); }
.c-plat--lg { font-size: var(--fs-sm); gap: var(--s-1-5); } .c-plat--lg svg { width: 18px; height: 18px; }
.c-platmark { --plat: var(--ink-soft); width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center; color: var(--plat); background: var(--panel2); border: 1px solid var(--line); flex: none; }
.c-platmark svg { width: 20px; height: 20px; }
.c-plat--twitch, .c-platmark--twitch { --plat: var(--twitch); }
.c-plat--kick, .c-platmark--kick { --plat: var(--kick); }
.c-plat--youtube, .c-platmark--youtube { --plat: var(--youtube); }
.c-plat--tiktok, .c-platmark--tiktok { --plat: var(--tiktok); }
.c-plat--instagram, .c-platmark--instagram { --plat: var(--instagram); }

/* ========================= 4. CARDS / KPI / PLAN ========================= */
.c-card {
  --card-pad: var(--s-5);
  position: relative; min-width: 0; padding: var(--card-pad); border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.c-card--tight { --card-pad: var(--s-4); }
.c-card--roomy { --card-pad: var(--s-6); }
.c-card--flat { box-shadow: none; }
.c-card--sunken { background: var(--panel2); box-shadow: none; }
.c-card--dashed { background: transparent; border-style: dashed; border-color: var(--line-3); box-shadow: none; }
.c-card--interactive { cursor: pointer; transition: border-color var(--dur-1); }
.c-card--interactive:hover { border-color: var(--line-3); }
.c-card__head { display: flex; align-items: center; gap: var(--s-3); min-height: 32px; margin-bottom: var(--s-4); min-width: 0; flex-wrap: wrap; }
.c-card__icon { width: 32px; height: 32px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--panel2); color: var(--ink-soft); flex: none; }
.c-card__icon svg { width: 16px; height: 16px; }
.c-card__titles { display: grid; gap: 2px; min-width: min(100%, 160px); flex: 1 1 0; }
.c-card__title { font-family: var(--font-serif); font-size: 18px; line-height: 24px; font-weight: 600; color: var(--ink); }
.c-card__sub { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--ink-soft); }
.c-card__actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; flex-wrap: wrap; }
.c-card__foot {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--s-2); flex-wrap: wrap;
  margin: var(--card-pad) calc(var(--card-pad) * -1) calc(var(--card-pad) * -1); padding: var(--s-3) var(--card-pad);
  border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r);
}
.c-card__foot > :first-child:not(.c-btn) { margin-right: auto; }

.c-kpi { display: flex; flex-direction: column; gap: var(--s-1-5); padding: var(--s-4) var(--s-5); border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.c-kpi__label { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--ink-soft); }
.c-kpi__value { font-size: var(--fs-3xl); line-height: var(--lh-3xl); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.c-kpi__unit { font-size: var(--fs-md); font-weight: 400; color: var(--ink-soft); margin-left: .3em; }
.c-kpi__foot { margin-top: auto; font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--ink-soft); }

/* Plan card (website only, built from c-card + c-kpi pieces). The chosen plan gets the app's selected
   treatment (2px bunsen border, as .c-rcard[aria-checked]); never a gradient, glow or "popular" ribbon. */
.c-plan { display: flex; flex-direction: column; gap: var(--s-4); }
.c-plan.is-featured { border: 2px solid var(--bunsen); padding: calc(var(--card-pad) - 1px); }
.c-plan.is-soon { box-shadow: none; }
.c-plan__head { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.c-plan__name { font-family: var(--font-serif); font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: 600; }
.c-plan__price { display: flex; align-items: baseline; gap: var(--s-1); }
.c-plan__amount { font-size: var(--fs-4xl); line-height: var(--lh-4xl); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.c-plan__per { font-size: var(--fs-md); color: var(--ink-soft); }
.c-plan__note { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--ink-soft); }
.c-plan__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); font-size: var(--fs-sm); line-height: var(--lh-sm); }
.c-plan__list li { display: flex; gap: var(--s-2); align-items: flex-start; }
.c-plan__list svg { width: 16px; height: 16px; margin-top: 2px; color: var(--ok); }
.c-plan__list li.is-soon svg { color: var(--ink-soft); }
.c-plan__foot { margin-top: auto; display: grid; gap: var(--s-2); }

/* ========================== 5. BAR / SPINNER ========================== */
/* <div class="c-bar" role="progressbar" aria-valuenow="15" style="--val:15%"><i></i></div> */
.c-bar { --val: 0%; position: relative; height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; min-width: 40px; }
.c-bar > i { position: absolute; inset: 0 auto 0 0; width: var(--val); border-radius: inherit; background: var(--bunsen); }
.c-bar--ok > i { background: var(--ok); } .c-bar--warn > i { background: var(--warn); } .c-bar--danger > i { background: var(--danger); }
.c-spinner { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-3); border-right-color: var(--bunsen); animation: c-spin .7s linear infinite; vertical-align: middle; flex: none; }

/* =============================== 6. TABLE =============================== */
.c-table-wrap { overflow-x: auto; min-width: 0; }
.c-table-wrap--card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.c-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); line-height: var(--lh-sm); }
.c-table th {
  text-align: left; white-space: nowrap; padding: var(--s-2-5) var(--s-3); border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs); line-height: var(--lh-xs); font-weight: 600; color: var(--ink-soft); background: var(--panel2);
}
.c-table td { padding: var(--s-3); border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.c-table tr:last-child td { border-bottom: 0; }
.c-table tbody tr:hover td { background: color-mix(in srgb, var(--panel2) 60%, var(--panel)); }
.c-table th:first-child, .c-table td:first-child { padding-left: var(--s-4); }
.c-table th:last-child, .c-table td:last-child { padding-right: var(--s-4); }
.c-table-wrap--card .c-table tr:first-child th:first-child { border-top-left-radius: var(--r); }
.c-table-wrap--card .c-table tr:first-child th:last-child { border-top-right-radius: var(--r); }
.c-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.c-table .is-muted { color: var(--ink-soft); }
.c-table tr.is-total td { font-weight: 600; background: var(--panel2); }
.c-table--fixed { table-layout: fixed; }

/* ======================= 7. TABS + SEGMENTED CONTROL ======================= */
.c-tabs { display: flex; gap: var(--s-6); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.c-tabs::-webkit-scrollbar { display: none; }
.c-tab {
  position: relative; display: inline-flex; align-items: center; gap: var(--s-1-5); height: 44px; padding: 0 2px;
  color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; transition: color var(--dur-1);
}
.c-tab:hover { color: var(--ink); text-decoration: none; }
.c-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.c-tab[aria-selected="true"] { color: var(--bunsen); }
.c-tab[aria-selected="true"]::after { background: var(--bunsen); }
.c-tab:focus-visible { outline-offset: -2px; }
.c-tab svg { width: 15px; height: 15px; }
.c-tabpanel { padding-top: var(--s-5); }

/* Segmented control: role="radiogroup" > button.c-seg__btn[role=radio][aria-checked] (the app's theme toggle) */
.c-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r); background: var(--panel2); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.c-seg__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1-5); height: 32px; padding: 0 var(--s-3);
  border-radius: 7px; border: 1px solid transparent; color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
  transition: color var(--dur-1), background-color var(--dur-1);
}
.c-seg__btn:hover { color: var(--ink); }
.c-seg__btn[aria-checked="true"], .c-seg__btn[aria-selected="true"] { color: var(--ink); background: var(--panel); border-color: var(--line); }
.c-seg__btn svg { width: 15px; height: 15px; }
.c-seg__btn:focus-visible { outline-offset: -1px; }

/* ============================ 8. NOTICE / BANNER ============================ */
.c-notice {
  --tone: var(--ink-soft);
  display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line); font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--ink);
}
.c-notice > svg, .c-notice__icon { width: 18px; height: 18px; margin-top: 1px; color: var(--tone); flex: none; display: inline-flex; }
.c-notice__icon svg { width: 100%; height: 100%; }
.c-notice__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.c-notice__title { color: var(--ink); font-weight: 600; }
.c-notice__actions { display: flex; gap: var(--s-2); align-self: center; flex-wrap: wrap; }
.c-notice--info    { --tone: var(--bunsen); background: var(--bunsen-soft); border-color: var(--info-line); }
.c-notice--warn    { --tone: var(--warn);   background: var(--warn-soft);    border-color: var(--warn-line); }
.c-notice--danger  { --tone: var(--danger); background: var(--danger-soft);  border-color: var(--danger-line); }
.c-notice--success { --tone: var(--ok);     background: var(--success-soft); border-color: var(--success-line); }
.c-notice--banner { border-radius: 0; border-width: 0 0 1px; }

/* =============================== 9. STEPS =============================== */
.c-steps { display: flex; align-items: center; gap: var(--s-3); list-style: none; margin: 0; padding: 0; counter-reset: c-step; }
.c-step { display: flex; align-items: center; gap: var(--s-2-5); flex: 1; min-width: 0; color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 600; counter-increment: c-step; }
.c-step::after { content: ""; flex: 1; height: 1px; min-width: 12px; background: var(--line); }
.c-step:last-child { flex: none; } .c-step:last-child::after { display: none; }
.c-step__num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px solid var(--line-3); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-soft); background: var(--panel); }
.c-step__num:empty::before { content: counter(c-step); }
.c-step__num svg { width: 14px; height: 14px; }
.c-step.is-done .c-step__num { background: var(--bunsen); border-color: var(--bunsen); color: var(--on-bunsen); }
.c-step.is-current { color: var(--ink); }
.c-step.is-current .c-step__num { border-color: var(--bunsen); color: var(--bunsen); }
.c-steps--v { flex-direction: column; align-items: stretch; gap: 0; }
.c-steps--v .c-step { flex-wrap: wrap; align-items: flex-start; gap: 0 var(--s-3); position: relative; padding-bottom: var(--s-5); }
.c-steps--v .c-step::after { position: absolute; left: 12.5px; top: 30px; bottom: 4px; width: 1px; height: auto; min-width: 0; flex: none; }
.c-steps--v .c-step:last-child { padding-bottom: 0; }
.c-step__body { flex: 1; min-width: 0; display: grid; gap: 2px; padding-top: 3px; }
.c-step__title { color: var(--ink); font-weight: 600; }
.c-step__text { color: var(--ink-soft); font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: 400; }

/* =============================== 10. LAYOUT =============================== */
/* Page head: serif h1 + one plain sentence + up to 2 buttons (= app .c-pagehead) */
.c-pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4) var(--s-6); flex-wrap: wrap; margin-bottom: var(--s-8); }
.c-pagehead__titles { display: grid; gap: var(--s-2); min-width: 0; flex: 1 1 360px; }
.c-pagehead__intro { font-size: var(--fs-md); line-height: var(--lh-md); color: var(--ink-soft); max-width: 62ch; }
.c-pagehead__actions { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; padding-top: 4px; }
/* Section: serif h2 + optional sentence + optional actions right (= app .c-section) */
.c-section__head { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-4); }
.c-section__title { font-family: var(--font-serif); font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: 600; }
.c-section__sub { flex-basis: 100%; color: var(--ink-soft); font-size: var(--fs-sm); line-height: var(--lh-sm); margin-top: -4px; }
.c-section__actions { margin-left: auto; display: flex; gap: var(--s-2); flex-wrap: wrap; }

.c-facts { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: var(--s-2) var(--s-6); margin: 0; font-size: var(--fs-sm); line-height: var(--lh-sm); }
.c-facts > dt { color: var(--ink-soft); }
.c-facts > dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.c-facts--lined { gap: 0 var(--s-6); }
.c-facts--lined > dt, .c-facts--lined > dd { padding: var(--s-2) 0; border-top: 1px solid var(--line); }

/* Disclosure (app "More options"), reused as the FAQ item:
   <details class="c-more"><summary>Question</summary><div class="c-more__body">Answer</div></details> */
.c-more { border-top: 1px solid var(--line); }
.c-more:last-child { border-bottom: 1px solid var(--line); }
.c-more > summary { display: flex; align-items: center; gap: var(--s-2); min-height: 52px; padding: 0 2px; color: var(--ink); font-size: var(--fs-md); font-weight: 600; border-radius: var(--r-md); }
.c-more > summary:hover { color: var(--bunsen); }
.c-more > summary::before { content: ""; width: 7px; height: 7px; margin: 0 6px 0 2px; flex: none; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.c-more[open] > summary::before { transform: rotate(45deg); margin-top: -4px; }
.c-more__body { padding: 0 0 var(--s-4) var(--s-6); color: var(--ink-soft); max-width: 72ch; }
.c-more--card { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 0 var(--s-4); }

.c-divider { height: 1px; border: 0; background: var(--line); margin: var(--s-4) 0; }
.c-divider--label { display: flex; align-items: center; gap: var(--s-3); height: auto; background: none; color: var(--ink-soft); font-size: var(--fs-xs); font-weight: 600; }
.c-divider--label::before, .c-divider--label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.c-empty { display: grid; justify-items: start; gap: var(--s-2); padding: var(--s-6) 0; }
.c-empty__icon { width: 40px; height: 40px; margin-bottom: var(--s-1); border-radius: var(--r); display: grid; place-items: center; color: var(--ink-soft); background: var(--panel2); }
.c-empty__icon svg { width: 20px; height: 20px; }
.c-empty__title { font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: 600; }
.c-empty__text { color: var(--ink-soft); max-width: 60ch; }

/* Countdown: a quiet line of numbers, not digit boxes (= app .c-countdown) */
.c-countdown { display: flex; gap: var(--s-5); }
.c-countdown__val { display: block; font-size: var(--fs-3xl); line-height: 32px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.c-countdown__lab { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--ink-soft); }

/* ============================ 11. CLIP CARD ============================
   = app .c-clip: 9:16 media, dark chips over the video, info under it. */
.c-clip { position: relative; display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.c-clip__media { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden; background: var(--panel2); border: 1px solid var(--line); isolation: isolate; }
.c-clip__media img, .c-clip__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.c-clip__ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-4); background: var(--panel2); }
.c-clip__ph svg { width: 32px; height: 32px; }
.c-clip__top { position: absolute; z-index: 2; top: var(--s-2); left: var(--s-2); right: var(--s-2); display: flex; align-items: center; gap: var(--s-1-5); }
.c-clip__score, .c-clip__dur { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: var(--r-sm); background: var(--media-scrim); color: var(--on-media); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.c-clip__score svg { width: 12px; height: 12px; }
.c-clip__dur { margin-left: auto; }
.c-clip__hook { position: absolute; z-index: 2; left: 10%; right: 10%; top: 15%; padding: var(--s-1) var(--s-2); border-radius: var(--r-sm); background: var(--clip-hook-bg); color: var(--clip-hook-ink); text-align: center; font-family: var(--clip-font); font-size: var(--fs-xs); line-height: var(--lh-xs); font-weight: 600; box-shadow: var(--knob-shadow); }
.c-clip__caption { position: absolute; z-index: 2; left: var(--s-2); right: var(--s-2); bottom: 26%; text-align: center; color: var(--clip-caption); font-family: var(--clip-font); font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: 600; text-transform: uppercase; text-shadow: -1.5px -1.5px 0 var(--clip-caption-outline), 1.5px -1.5px 0 var(--clip-caption-outline), -1.5px 1.5px 0 var(--clip-caption-outline), 1.5px 1.5px 0 var(--clip-caption-outline), 0 2px 4px var(--clip-caption-outline); }
.c-clip__caption b { color: var(--clip-caption-hype); font-weight: 600; }
.c-clip__info { display: grid; gap: 2px; min-width: 0; padding: 0 2px; }
.c-clip__name { display: flex; align-items: center; gap: var(--s-1-5); font-size: var(--fs-sm); font-weight: 600; color: var(--ink); min-width: 0; }
.c-clip__meta { font-size: var(--fs-xs); color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-clip-grid { display: grid; gap: var(--s-6) var(--s-4); grid-template-columns: repeat(auto-fill, minmax(var(--min, 180px), 1fr)); }

/* ============================ 12. SITE FRAME ============================
   The marketing page's own frame. Same materials as the app shell:
   --ground canvas, 1px --line hairlines, serif wordmark, no hero gradient. */
.site-skip { position: fixed; z-index: var(--z-tooltip); top: 8px; left: 8px; padding: 8px 12px; border-radius: var(--r-md); background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: var(--fs-sm); font-weight: 600; transform: translateY(-160%); }
.site-skip:focus-visible { transform: none; text-decoration: none; }

.site-wrap { width: 100%; max-width: var(--site-max); margin: 0 auto; padding: 0 var(--site-pad); }

/* header: = app phone top bar, at desktop width */
.site-header { position: sticky; top: 0; z-index: var(--z-topbar); background: var(--ground); border-bottom: 1px solid var(--line); }
.site-header__in { display: flex; align-items: center; gap: var(--s-6); height: var(--site-header-h); }
.site-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); border-radius: var(--r-md); }
.site-brand:hover { text-decoration: none; }
.site-logo { display: inline-flex; flex: none; color: var(--ink-soft); }   /* = .shell-logo: the mark is ink-soft, the word is ink */
.site-brand__word { font-family: var(--font-serif); font-size: 20px; line-height: 24px; font-weight: 600; color: var(--ink); }
.site-brand__sub { font-size: var(--fs-micro); line-height: var(--lh-micro); color: var(--ink-soft); }
.site-brand__text { display: grid; gap: 1px; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a { display: inline-flex; align-items: center; height: 36px; padding: 0 10px; border-radius: var(--r); color: var(--ink-soft); font-size: var(--fs-sm); transition: background-color var(--dur-1), color var(--dur-1); }
.site-nav a:hover { background: var(--panel2); color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { background: var(--bunsen-soft); color: var(--bunsen); font-weight: 600; }
.site-header__end { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.site-theme { flex: none; }   /* one icon button: Light <-> Dark */

.site-main { display: block; }
.site-section { padding: var(--site-section-gap) 0 0; }
.site-section:last-child { padding-bottom: var(--site-section-gap); }
.site-section__head { display: grid; gap: var(--s-2); margin-bottom: var(--s-8); max-width: 68ch; }
.site-section__head > p { color: var(--ink-soft); }

.site-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-10); align-items: center; padding-top: var(--s-16); }
.site-hero__copy { display: grid; gap: var(--s-5); justify-items: start; }
.site-hero__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.site-hero__fine { font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--ink-soft); }

.site-grid-2 { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-grid-3 { display: grid; gap: var(--s-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }

.site-footer { border-top: 1px solid var(--line); padding: var(--s-8) 0 var(--s-10); color: var(--ink-soft); font-size: var(--fs-sm); line-height: var(--lh-sm); }
.site-footer__in { display: flex; gap: var(--s-6) var(--s-10); flex-wrap: wrap; justify-content: space-between; }
.site-footer__cols { display: flex; gap: var(--s-10); flex-wrap: wrap; }
.site-footer__col { display: grid; gap: var(--s-1-5); align-content: start; }
.site-footer__col b { color: var(--ink); font-weight: 600; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }

/* App window mock: a miniature of the real app shell (rail + content), built from the same tokens.
   Use it instead of glossy device mock-ups or stock imagery. */
.site-window { border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--ground); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.site-window__bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--s-3); background: var(--panel); border-bottom: 1px solid var(--line); }
.site-window__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-3); }
.site-window__bar span { margin-left: var(--s-2); font-size: var(--fs-micro); color: var(--ink-soft); }
.site-window__body { display: grid; grid-template-columns: 148px minmax(0, 1fr); min-height: 320px; }
.site-window__rail { display: grid; align-content: start; gap: 2px; padding: var(--s-3) var(--s-2); border-right: 1px solid var(--line); }
.site-window__brand { display: flex; align-items: center; gap: 6px; margin: 0 6px var(--s-3); font-family: var(--font-serif); font-weight: 600; font-size: var(--fs-md); }
.site-window__brand .site-logo svg { width: 20px; height: 20px; }
.site-window__group { padding: var(--s-2) 8px 4px; font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.site-window__nav { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: var(--r-md); color: var(--ink-soft); font-size: var(--fs-micro); }
.site-window__nav svg { width: 14px; height: 14px; }
.site-window__nav.is-on { background: var(--bunsen-soft); color: var(--bunsen); font-weight: 600; }
.site-window__main { padding: var(--s-4); display: grid; gap: var(--s-3); align-content: start; min-width: 0; }
.site-window__title { font-family: var(--font-serif); font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: 600; }
.site-window .c-table { font-size: var(--fs-micro); line-height: var(--lh-micro); }
.site-window .c-table th { font-size: 11px; padding: 6px 8px; }
.site-window .c-table td { padding: 7px 8px; }
.site-window .c-table th:first-child, .site-window .c-table td:first-child { padding-left: var(--s-3); }

/* ============================ 13. PHONE (<= 700px) ============================ */
@media (max-width: 960px) {
  .site-hero { grid-template-columns: minmax(0, 1fr); gap: var(--s-8); padding-top: var(--s-10); }
  .site-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .site-nav { display: none; }
}
@media (max-width: 700px) {
  .c-input, .c-select, .c-textarea { font-size: 16px; height: var(--h-lg); }   /* no iOS zoom, 44px targets */
  .c-textarea { height: auto; }
  .c-btn { --btn-h: var(--h-lg); }
  .c-btn--sm { --btn-h: 40px; }
  .c-notice { flex-wrap: wrap; } .c-notice__actions { width: 100%; padding-left: 30px; }
  .c-pagehead { margin-bottom: var(--s-6); }
  .c-facts { grid-template-columns: minmax(0, 1fr); gap: 0; } .c-facts > dd { margin-bottom: var(--s-2); }
  .site-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .site-brand__sub { display: none; }
  .site-header__in { gap: var(--s-3); }
  .site-window__body { grid-template-columns: minmax(0, 1fr); }
  .site-window__rail { display: none; }
  .c-steps:not(.c-steps--v) { flex-direction: column; align-items: stretch; }
  .c-steps:not(.c-steps--v) .c-step::after { display: none; }
}
