/* trstctl.com — one stylesheet for the landing page, /47days and the docs shell.
   Tokens are the console's own (trstctl/web/src/index.css), stored as bare HSL
   triplets exactly as the product stores them, so the site and the console
   are one design language: warm paper, forest action, mint focus, gold only
   for caution. Light is the default; dark follows the system or the visitor's
   stored choice, which is the same localStorage key the console reads
   ("trstctl-theme"), so the choice carries into the demo. */

@import url('/fonts.css');

:root {
  /* palette — light */
  --background: 45 33% 95%;
  --foreground: 167 16% 11%;
  --card: 48 100% 99%;
  --card-foreground: 167 16% 11%;
  --muted: 75 12% 94%;
  --muted-foreground: 163 7% 38%;
  --primary: 166 55% 20%;
  --primary-foreground: 48 100% 99%;
  --border: 120 7% 86%;
  --brand-accent: 166 55% 20%;
  --focus: 167 48% 33%;
  --sidebar: 60 15% 92%;
  --sidebar-hover: 108 10% 89%;
  --sidebar-active: 150 20% 89%;
  --sidebar-foreground: 163 14% 22%;
  --destructive: 3 53% 35%;
  --status-success: 166 55% 20%;
  --status-warning: 40 86% 30%;
  --status-info: 199 49% 31%;
  --status-neutral: 163 7% 38%;
  --risk-critical: 3 53% 35%;
  --risk-high: 24 70% 38%;
  --risk-medium: 40 86% 30%;
  --observe: 199 49% 31%;
  --elevation-1: 0 1px 2px 0 hsl(216 28% 9% / 0.08);
  --elevation-2: 0 8px 22px -14px hsl(216 28% 9% / 0.35);
  --elevation-3: 0 22px 60px -30px hsl(216 28% 9% / 0.45);

  /* shape, motion, density — the console's values */
  --radius-control: 0.375rem;
  --radius-panel: 0.5rem;
  --motion-fast: 160ms;
  --motion-base: 220ms;
  --density: 1.25rem;

  /* type */
  --font-sans: 'Sora Variable', Sora, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Syne Variable', Syne, 'Sora Variable', Sora, ui-sans-serif, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --text-caption: 0.75rem;
  --text-data: 0.875rem;
  --text-body: 1rem;
  --text-lede: 1.1875rem;
  --text-title: 1.125rem;
  --text-heading: 1.5rem;
  --text-display: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  --text-hero: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);

  /* layout */
  --max: 75rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 4rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: 165 17% 7%;
    --foreground: 45 22% 93%;
    --card: 160 16% 10%;
    --card-foreground: 45 22% 93%;
    --muted: 156 13% 15%;
    --muted-foreground: 156 7% 70%;
    --primary: 162 34% 68%;
    --primary-foreground: 165 20% 8%;
    --border: 156 10% 22%;
    --brand-accent: 162 34% 68%;
    --focus: 171 77% 64%;
    --sidebar: 165 18% 8%;
    --sidebar-hover: 160 16% 12%;
    --sidebar-active: 159 18% 16%;
    --sidebar-foreground: 156 7% 70%;
    --destructive: 0 100% 71%;
    --status-success: 158 64% 52%;
    --status-warning: 32 95% 54%;
    --status-info: 218 100% 77%;
    --status-neutral: 207 12% 65%;
    --risk-critical: 0 100% 71%;
    --risk-high: 24 95% 58%;
    --risk-medium: 45 93% 56%;
    --observe: 171 77% 64%;
    --elevation-1: 0 1px 2px 0 hsl(220 40% 2% / 0.5);
    --elevation-2: 0 12px 30px -18px hsl(220 40% 2% / 0.8);
    --elevation-3: 0 28px 70px -34px hsl(220 40% 2% / 0.9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --background: 165 17% 7%;
  --foreground: 45 22% 93%;
  --card: 160 16% 10%;
  --card-foreground: 45 22% 93%;
  --muted: 156 13% 15%;
  --muted-foreground: 156 7% 70%;
  --primary: 162 34% 68%;
  --primary-foreground: 165 20% 8%;
  --border: 156 10% 22%;
  --brand-accent: 162 34% 68%;
  --focus: 171 77% 64%;
  --sidebar: 165 18% 8%;
  --sidebar-hover: 160 16% 12%;
  --sidebar-active: 159 18% 16%;
  --sidebar-foreground: 156 7% 70%;
  --destructive: 0 100% 71%;
  --status-success: 158 64% 52%;
  --status-warning: 32 95% 54%;
  --status-info: 218 100% 77%;
  --status-neutral: 207 12% 65%;
  --risk-critical: 0 100% 71%;
  --risk-high: 24 95% 58%;
  --risk-medium: 45 93% 56%;
  --observe: 171 77% 64%;
  --elevation-1: 0 1px 2px 0 hsl(220 40% 2% / 0.5);
  --elevation-2: 0 12px 30px -18px hsl(220 40% 2% / 0.8);
  --elevation-3: 0 28px 70px -34px hsl(220 40% 2% / 0.9);
  color-scheme: dark;
}

/* ------------------------------------------------------------- base ---- */
*, *::before, *::after { box-sizing: border-box; border-color: hsl(var(--border)); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "rlig" 1, "calt" 1;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
img, svg, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: var(--text-hero); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: var(--text-display); }
h3 { font-size: var(--text-title); font-weight: 600; }
strong { font-weight: 600; color: hsl(var(--foreground)); }
code, kbd, .mono { font-family: var(--font-mono); font-size: 0.9em; }
::selection { background: hsl(var(--primary) / 0.35); }
:focus-visible { outline: 2px solid hsl(var(--focus)); outline-offset: 2px; border-radius: 4px; }
* { scrollbar-width: thin; scrollbar-color: hsl(var(--border)) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: hsl(var(--border)); border: 3px solid transparent; background-clip: content-box; border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground)); background-clip: content-box; }
table { font-variant-numeric: tabular-nums; }
.tabular, .num { font-variant-numeric: tabular-nums; }
.num { font-family: var(--font-mono); }
.muted { color: hsl(var(--muted-foreground)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.wrap { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-inline: auto; position: relative; }
.skip { position: absolute; left: 0.5rem; top: 0.5rem; z-index: 100; transform: translateY(-200%); padding: 0.5rem 0.75rem; border-radius: var(--radius-control); background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-weight: 500; }
.skip:focus { transform: none; }

/* typographic primitives shared with the console */
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--text-caption); font-weight: 600; color: hsl(var(--muted-foreground)); }
.eyebrow .num { color: hsl(var(--brand-accent)); font-weight: 500; }
.lede { font-size: var(--text-lede); line-height: 1.55; color: hsl(var(--muted-foreground)); max-width: 42rem; }
.lede strong { color: hsl(var(--foreground)); }
.intro { color: hsl(var(--muted-foreground)); max-width: 44rem; margin-top: 0.875rem; font-size: 1.0625rem; }
.section-head { max-width: 46rem; margin-bottom: 2.25rem; display: grid; gap: 0.75rem; }
.section-head h2 { margin-top: 0.125rem; }

/* ---------------------------------------------------------- controls ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.5rem; padding: 0 1rem; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--radius-control);
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  font: inherit; font-size: 0.9375rem; font-weight: 500; line-height: 1; cursor: pointer;
  box-shadow: var(--elevation-1);
  transition: color var(--motion-fast), background-color var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast), filter var(--motion-fast);
}
.btn:hover { filter: brightness(1.05); }
.btn:active { filter: brightness(0.95); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--focus)); }
.btn svg { width: 1rem; height: 1rem; flex: none; }
.btn.secondary { background: hsl(var(--foreground) / 0.03); color: hsl(var(--foreground)); border-color: hsl(var(--border)); box-shadow: none; }
.btn.secondary:hover { filter: none; border-color: hsl(var(--brand-accent) / 0.6); color: hsl(var(--brand-accent)); }
.btn.ghost { background: transparent; color: hsl(var(--foreground)); box-shadow: none; }
.btn.ghost:hover { filter: none; background: hsl(var(--foreground) / 0.05); }
.btn.icon { width: 2.25rem; min-height: 2.25rem; padding: 0; }
.btn.lg { min-height: 2.75rem; padding: 0 1.25rem; font-size: 1rem; }

.chip {
  display: inline-flex; align-items: center; gap: 0.375rem; max-width: 100%;
  padding: 0.125rem 0.5rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius-control);
  background: hsl(var(--muted) / 0.6); color: hsl(var(--foreground));
  font-family: var(--font-mono); font-size: var(--text-caption); line-height: 1.4;
  transition: border-color var(--motion-fast), color var(--motion-fast);
}
a.chip:hover { border-color: hsl(var(--brand-accent) / 0.6); color: hsl(var(--brand-accent)); }
.chip.accent { border-color: hsl(var(--brand-accent) / 0.4); color: hsl(var(--brand-accent)); background: hsl(var(--primary) / 0.06); }
.chip.warning { border-color: hsl(var(--status-warning) / 0.4); color: hsl(var(--status-warning)); background: hsl(var(--status-warning) / 0.1); }

.status { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 1.5rem; font-size: var(--text-caption); font-weight: 500; line-height: 1; color: hsl(var(--muted-foreground)); }
.status::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: 50%; background: currentColor; flex: none; }
.status.success { color: hsl(var(--status-success)); }
.status.warning { color: hsl(var(--status-warning)); }
.status.info { color: hsl(var(--status-info)); }
.status.critical { color: hsl(var(--risk-critical)); }
.status.foreground { color: hsl(var(--foreground)); }

kbd { font-family: var(--font-mono); font-size: 0.625rem; padding: 0.125rem 0.375rem; border: 1px solid hsl(var(--border)); border-radius: 0.25rem; color: hsl(var(--muted-foreground)); }

/* ------------------------------------------------------------ panels ---- */
.card { border: 1px solid hsl(var(--border)); border-radius: var(--radius-panel); background: hsl(var(--card)); color: hsl(var(--card-foreground)); padding: var(--density); box-shadow: none; transition: border-color var(--motion-base); }
.card:hover { border-color: hsl(var(--brand-accent) / 0.4); }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: hsl(var(--muted-foreground)); font-size: var(--text-data); line-height: 1.55; }
.card .glyph { width: 2.25rem; height: 2.25rem; margin-bottom: 1rem; border-radius: 50%; display: grid; place-items: center; background: hsl(var(--primary) / 0.08); color: hsl(var(--brand-accent)); }
.card .glyph svg { width: 1.125rem; height: 1.125rem; }

.panel { border: 1px solid hsl(var(--border)); border-radius: var(--radius-panel); background: hsl(var(--card)); overflow: hidden; }
.panel-bar { display: flex; align-items: center; gap: 0.75rem; min-height: 2.5rem; padding: 0 0.875rem; border-bottom: 1px solid hsl(var(--border)); font-family: var(--font-mono); font-size: var(--text-caption); color: hsl(var(--muted-foreground)); }
.panel-bar .status { margin-left: auto; }
.panel-body { padding: 1rem 1.125rem; font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.85; color: hsl(var(--muted-foreground)); overflow-x: auto; }
.panel-body .t { color: hsl(var(--muted-foreground) / 0.75); }
.panel-body .k { color: hsl(var(--brand-accent)); }
.panel-body .i { color: hsl(var(--status-info)); }
.panel-body .w { color: hsl(var(--status-warning)); }
.panel-body .f { color: hsl(var(--foreground)); }
.panel-body .ok { color: hsl(var(--status-success)); }

.shot { border: 1px solid hsl(var(--border)); border-radius: var(--radius-panel); background: hsl(var(--card)); overflow: hidden; box-shadow: var(--elevation-2); }
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.shot-bar { display: flex; align-items: center; gap: 0.5rem; height: 2.25rem; padding: 0 0.75rem; border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--sidebar)); font-family: var(--font-mono); font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
.shot-bar .url { margin-left: auto; padding: 0.125rem 0.5rem; border-radius: 999px; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); }

/* ------------------------------------------------------------ header ---- */
.studiobar { display: flex; align-items: center; justify-content: center; gap: 0.625rem; padding: 0.375rem var(--gutter); background: hsl(var(--sidebar)); border-bottom: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); font-size: var(--text-caption); font-weight: 500; line-height: 1.4; text-align: center; transition: color var(--motion-fast); }
.studiobar:hover { color: hsl(var(--foreground)); }
.studiobar strong { color: hsl(var(--foreground)); }
.studiobar-mark { width: 0.8125rem; height: 0.8125rem; flex: none; color: hsl(var(--brand-accent)); }
.studiobar-more { display: inline-flex; align-items: center; gap: 0.625rem; white-space: nowrap; }
.studiobar-more::before { content: ""; width: 1px; height: 0.75rem; background: hsl(var(--border)); }
@media (max-width: 45em) { .studiobar-more { display: none; } }

.announce { display: flex; align-items: center; justify-content: center; gap: 0.625rem; padding: 0.5rem var(--gutter); background: hsl(var(--status-warning) / 0.1); border-bottom: 1px solid hsl(var(--status-warning) / 0.25); color: hsl(var(--foreground)); font-size: var(--text-data); line-height: 1.4; text-align: center; transition: background-color var(--motion-fast); }
.announce:hover { background: hsl(var(--status-warning) / 0.16); }
.announce strong { color: hsl(var(--status-warning)); }
.announce .ad { width: 0.375rem; height: 0.375rem; border-radius: 50%; background: hsl(var(--status-warning)); flex: none; }
.announce .ar { color: hsl(var(--brand-accent)); }
@media (max-width: 35em) { .announce { font-size: var(--text-caption); } }

header.site { position: sticky; top: 0; z-index: 30; background: hsl(var(--card) / 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid hsl(var(--border)); }
header.site nav { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.625rem; font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.02em; color: hsl(var(--foreground)); }
.mark { width: 1.75rem; height: 1.75rem; flex: none; border-radius: 50%; display: grid; place-items: center; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); box-shadow: 0 0 0 1px hsl(var(--primary) / 0.2); }
.mark svg { width: 1rem; height: 1rem; }
.mark.lg { width: 3rem; height: 3rem; } .mark.lg svg { width: 1.75rem; height: 1.75rem; }
.navlinks { display: flex; align-items: center; gap: 1.5rem; color: hsl(var(--muted-foreground)); font-size: var(--text-data); font-weight: 500; }
.navlinks a { transition: color var(--motion-fast); }
.navlinks a:hover { color: hsl(var(--foreground)); }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.menu { display: none; }
.theme-toggle .sun, .theme-toggle .moon { width: 1rem; height: 1rem; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
@media (max-width: 54em) {
  .menu { display: inline-flex; }
  .navlinks { position: absolute; left: 0; right: 0; top: var(--header-h); display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1rem; background: hsl(var(--card)); border-bottom: 1px solid hsl(var(--border)); box-shadow: var(--elevation-2); }
  header.site.nav-open .navlinks { display: flex; }
  .navlinks a { padding: 0.75rem 0; border-bottom: 1px solid hsl(var(--border)); }
  .navlinks a:last-child { border-bottom: 0; }
  .nav-actions .btn:not(.icon):not(.menu) { display: none; }
}

/* ------------------------------------------------------------- bands ---- */
section.band { padding: clamp(4rem, 8vw, 6rem) 0; border-bottom: 1px solid hsl(var(--border)); }
section.band.alt { background: hsl(var(--card) / 0.6); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.split { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (max-width: 56em) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 40em) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.feature-list { display: grid; gap: 1.25rem; margin-top: 1.75rem; }
.feature { display: grid; grid-template-columns: 1.75rem 1fr; gap: 0.75rem; }
.feature .arrow { color: hsl(var(--brand-accent)); font-family: var(--font-mono); padding-top: 0.125rem; }
.feature h3 { margin-bottom: 0.25rem; }
.feature p { color: hsl(var(--muted-foreground)); font-size: var(--text-data); line-height: 1.55; }

.cta-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.note { color: hsl(var(--muted-foreground)); font-size: var(--text-caption); }

footer.site { border-top: 1px solid hsl(var(--border)); background: hsl(var(--sidebar)); padding: 2.5rem 0; color: hsl(var(--muted-foreground)); font-size: var(--text-data); }
.foot { display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.foot-links { display: flex; gap: 1.125rem; flex-wrap: wrap; }
.foot-links a { transition: color var(--motion-fast); }
.foot-links a:hover { color: hsl(var(--foreground)); }
.foot .src { flex-basis: 100%; font-size: var(--text-caption); line-height: 1.6; max-width: 48rem; }
.foot .src a { text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------ motion ---- */
/* Content is visible by default. The fade only engages once the script has
   added .reveal-ready, so a blocked script, a failed observer, or a tab loaded
   in the background can never leave the page blank. */
.reveal { opacity: 1; transition: opacity var(--motion-base) ease-out; }
:root.reveal-ready .reveal { opacity: 0; }
:root.reveal-ready .reveal.in { opacity: 1; }
:root.reveal-done .reveal { opacity: 1; transition: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* =========================================================== landing ==== */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem); border-bottom: 1px solid hsl(var(--border)); background: radial-gradient(70% 60% at 100% 0%, hsl(var(--primary) / 0.07), transparent 65%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy { display: grid; gap: 1.25rem; justify-items: start; }
.hero-copy h1 { max-width: 14ch; }
.hero-copy .cta-row { margin-top: 0.25rem; }
.hero-copy .note { margin-top: -0.5rem; }
.proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0 0; max-width: 40rem; width: 100%; }
.proof div { border-left: 1px solid hsl(var(--border)); padding-left: 0.875rem; }
.proof dt { font-size: var(--text-heading); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.proof dt .num { color: hsl(var(--brand-accent)); }
.proof dd { margin: 0.25rem 0 0; color: hsl(var(--muted-foreground)); font-size: var(--text-caption); line-height: 1.5; }
.hero-shot { margin: 0; }
@media (max-width: 56em) {
  .hero-grid { grid-template-columns: 1fr; }
  .proof { grid-template-columns: 1fr; gap: 0.75rem; }
}

.families { border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--card) / 0.6); }
.families-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: hsl(var(--border)); border-inline: 1px solid hsl(var(--border)); }
.families-grid li { background: hsl(var(--card)); padding: 1rem 1.125rem; display: grid; gap: 0.25rem; align-content: start; }
.families-grid b { font-size: var(--text-data); font-weight: 600; }
.families-grid span { font-size: var(--text-caption); color: hsl(var(--muted-foreground)); line-height: 1.5; }
@media (max-width: 64em) { .families-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 36em) { .families-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tour { display: grid; gap: 1.25rem; }
.tour-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid hsl(var(--border)); }
.tour-tabs [role="tab"] { -webkit-appearance: none; appearance: none; margin-bottom: -1px; display: inline-flex; min-height: 2.5rem; align-items: center; gap: 0.5rem; padding: 0 0.75rem; border: 0; border-bottom: 2px solid transparent; background: none; color: hsl(var(--muted-foreground)); font: inherit; font-size: var(--text-data); font-weight: 500; cursor: pointer; transition: color var(--motion-fast), border-color var(--motion-fast); }
.tour-tabs [role="tab"]:hover { color: hsl(var(--foreground)); border-bottom-color: hsl(var(--border)); }
.tour-tabs [role="tab"][aria-selected="true"] { color: hsl(var(--foreground)); border-bottom-color: hsl(var(--primary)); }
.tour-tabs [role="tab"]:focus-visible { outline: none; box-shadow: inset 0 0 0 2px hsl(var(--focus)); border-radius: var(--radius-control); }
.tour-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.tour-panel[hidden] { display: none; }
.tour-copy { display: grid; gap: 0.75rem; justify-items: start; padding-top: 0.25rem; }
.tour-copy h3 { font-size: var(--text-heading); line-height: 1.25; }
.tour-copy p { color: hsl(var(--muted-foreground)); }
.tour-copy .btn { margin-top: 0.25rem; }
.tour-panel .shot { margin: 0; }
.shared { margin-top: 2.5rem; }
@media (max-width: 56em) { .tour-panel { grid-template-columns: 1fr; } .tour-tabs { overflow-x: auto; flex-wrap: nowrap; } .tour-tabs [role="tab"] { white-space: nowrap; } }

.qa .q { font-weight: 500; line-height: 1.45; color: hsl(var(--foreground)); display: flex; gap: 0.625rem; }
.qa .q::before { content: ""; flex: none; margin-top: 0.55rem; width: 0.375rem; height: 0.375rem; border-radius: 50%; background: hsl(var(--brand-accent)); }
.qa .a { margin-top: 0.625rem; }

.rail { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.step .num { display: block; font-size: var(--text-caption); color: hsl(var(--brand-accent)); margin-bottom: 1rem; }
.step h3 { margin-bottom: 0.375rem; }
@media (max-width: 64em) { .rail { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 40em) { .rail { grid-template-columns: 1fr; } }

.security { display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.875rem; align-items: start; }
.security .glyph { margin: 0; }
.security h3 { margin-bottom: 0.25rem; }

.deploy { align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.chips + .chips { margin-top: 0.625rem; }

.cta { padding: clamp(4rem, 9vw, 6.5rem) 0; text-align: center; background: radial-gradient(50% 60% at 50% 0%, hsl(var(--primary) / 0.08), transparent 70%); }
.cta .wrap { display: grid; gap: 1rem; justify-items: center; }
.cta h2 { max-width: 22ch; }
.cta p { color: hsl(var(--muted-foreground)); font-size: 1.0625rem; max-width: 38rem; }
.cta .cta-row { justify-content: center; margin-top: 0.5rem; }

/* ============================================================ 47days ==== */
.hero-47 .wrap { display: grid; gap: 2rem; }
.hero-47 .hero-copy h1 { max-width: 18ch; }
.hero-47 h1 .em { color: hsl(var(--status-warning)); }
.hero-note { color: hsl(var(--muted-foreground)); }
.hero-note strong { color: hsl(var(--foreground)); }
.ladder { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.rung { position: relative; overflow: hidden; border: 1px solid hsl(var(--border)); border-radius: var(--radius-panel); background: hsl(var(--card)); padding: 1.125rem 1.125rem 1rem; display: grid; gap: 0.125rem; justify-items: start; transition: opacity var(--motion-base); }
.rung .n { font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); font-weight: 500; line-height: 1; color: hsl(var(--muted-foreground)); letter-spacing: -0.02em; }
.rung .u { font-size: var(--text-caption); color: hsl(var(--muted-foreground)); }
.rung .when { font-family: var(--font-mono); font-size: 0.6875rem; color: hsl(var(--muted-foreground)); margin-top: 0.625rem; }
.rung .chip { margin-top: 0.5rem; }
.rung.past { opacity: 0.55; }
.rung.now { border-color: hsl(var(--brand-accent) / 0.6); }
.rung.now .n { color: hsl(var(--brand-accent)); }
.rung.now::after, .rung.final::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: hsl(var(--primary)); }
.rung.final .n { color: hsl(var(--status-warning)); }
.rung.final::after { background: hsl(var(--status-warning)); }
.rung.final.now { border-color: hsl(var(--status-warning) / 0.6); }
.proofrow { margin-top: 0.5rem; }
@media (max-width: 40em) { .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cd-strip { padding: 3rem 0; border-bottom: 1px solid hsl(var(--border)); text-align: center; background: hsl(var(--card) / 0.6); }
.cd-strip .wrap { display: grid; gap: 1rem; justify-items: center; }
.cd-grid { display: inline-flex; align-items: flex-start; gap: 1rem; }
.cd-unit { min-width: 5.25rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.cd-n { font-size: clamp(2.5rem, 1.5rem + 4.5vw, 4.125rem); font-weight: 500; line-height: 1; color: hsl(var(--foreground)); letter-spacing: -0.02em; }
.cd-u { font-size: var(--text-caption); font-weight: 600; color: hsl(var(--muted-foreground)); }
.cd-sep { font-family: var(--font-mono); font-size: clamp(1.75rem, 1rem + 3vw, 3rem); line-height: 1; color: hsl(var(--border)); padding-top: 0.25rem; }
@media (max-width: 35em) { .cd-grid { gap: 0.5rem; } .cd-unit { min-width: 3.75rem; } .cd-sep { display: none; } }

.rail-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step .dv { display: block; margin-top: 0.75rem; padding-top: 0.5rem; border-top: 1px solid hsl(var(--border)); font-family: var(--font-mono); font-size: var(--text-caption); color: hsl(var(--brand-accent)); }
.step.past { opacity: 0.6; }
.step.now { border-color: hsl(var(--brand-accent) / 0.6); }
@media (max-width: 64em) { .rail-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40em) { .rail-4 { grid-template-columns: 1fr; } }
.dcv-note { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; margin-top: 1rem; }
.dcv-note h3 { margin-bottom: 0.5rem; }
.dcv-note p { font-size: var(--text-body); }
@media (max-width: 35em) { .dcv-note { grid-template-columns: 1fr; } }
.solve { display: grid; gap: 0.75rem; }
.solve .feature { grid-template-columns: 1.75rem 1fr; }
.solve .feature h3 { margin-bottom: 0.25rem; }
.solve .feature p { font-size: var(--text-body); }
