/* ============================================================
   DATASITR — SITE REBUILD SHARED STYLES ("The Honest Layer")
   Shared across all rebuilt pages. Design tokens live in style.css :root
   (--surface-primary #F4EDE4, --green #4A7C59, Space Grotesk / IBM Plex).
   This file holds the reusable section + component layer.
   ============================================================ */

  /* ============================================================
     DATASITR — SITE REBUILD ("The Honest Layer")
     Layout for new sections only. Tokens come from style.css :root.
     Mobile-first; one green accent; reading spine.
     ============================================================ */

  main#page { display: block; }
  [hidden] { display: none !important; }

  /* --- Reading spine --- */
  .rb-section { border-bottom: 1px solid var(--rule); }
  .rb-inner {
    max-width: 60rem;
    margin: 0 auto;
    padding: var(--space-12) 1.5rem;
  }
  @media (min-width: 721px) {
    .rb-inner { padding: var(--space-16) 2rem; }
  }

  /* --- Mono eyebrow --- */
  .rb-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--green);
    display: flex; align-items: center; gap: 0.7rem;
    margin: 0 0 var(--space-3);
  }
  .rb-eyebrow .rb-num { color: var(--text-tertiary); }

  /* --- Headline + lede --- */
  .rb-h {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.12;
    color: var(--text-primary);
    font-size: clamp(1.9rem, 6vw, 3rem);
    margin: 0;
    max-width: 20ch;
  }
  .rb-lede {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.6;
    margin: var(--space-3) 0 0;
    max-width: 46ch;
  }

  /* --- One-phrase green underline that draws on scroll --- */
  .rb-underline {
    background-image: linear-gradient(var(--green), var(--green));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 2px;
    padding-bottom: 0.1em;
    transition: background-size 900ms cubic-bezier(0.22,0.61,0.36,1);
  }
  .rb-underline.visible { background-size: 100% 2px; }
  [dir="rtl"] .rb-underline { background-position: 100% 100%; }

  @media (prefers-reduced-motion: reduce) {
    .rb-underline { transition: none; background-size: 100% 2px; }
    .animate-in { opacity: 1 !important; transform: none !important; }
  }

  /* ==== PER-SECTION STYLES (inserted as sections are built) ==== */
  /* SECTION-CSS:START */

  /* ---- S2 · The quiet leak ---- */
  .s-tension .rb-h { max-width: 22ch; }
  .tension-scenes {
    display: grid; grid-template-columns: 1fr; gap: var(--space-6);
    margin-top: var(--space-8);
  }
  @media (min-width: 721px) {
    .tension-scenes { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  }
  .scene { margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--border-strong); }
  .scene-tag {
    display: block; font-size: 0.6875rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-tertiary); margin-bottom: var(--space-2);
  }
  .scene-text { font-size: 1.2rem; line-height: 1.5; color: var(--text-secondary); margin: 0; }
  .scene-conseq { font-size: 1.2rem; line-height: 1.5; color: var(--text-primary); font-weight: 500; margin: var(--space-2) 0 0; }
  .tension-close {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(1.4rem, 4vw, 2.1rem); line-height: 1.32;
    color: var(--text-primary); margin: var(--space-12) 0 0; max-width: 26ch;
  }

  /* ---- S3 · One layer. Three jobs. ---- */
  .s-suite .rb-sub {
    color: var(--text-secondary); font-size: 1.0625rem; line-height: 1.6;
    margin: var(--space-3) 0 0; max-width: 52ch;
  }
  .prod-grid {
    display: grid; grid-template-columns: 1fr; gap: var(--space-3);
    margin-top: var(--space-8); align-items: start;
  }
  @media (min-width: 721px) {
    .prod-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
  }
  .prod-card {
    background: var(--surface-card); border: 1px solid var(--border);
    border-radius: 14px; padding: var(--space-4); box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column;
  }
  .pill {
    align-self: flex-start; font-family: var(--font-mono); font-size: 0.625rem;
    letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 9px;
    border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
    margin-bottom: var(--space-3);
  }
  .pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
  .pill-live { color: var(--green); background: var(--green-dim); }
  .pill-live::before { background: var(--green); }
  .pill-pilot { color: #876016; background: rgba(196,145,59,0.16); }
  .pill-pilot::before { background: var(--amber); }
  .pill-dev { color: var(--text-secondary); background: rgba(44,44,44,0.06); }
  .pill-dev::before { background: var(--text-tertiary); }
  .prod-name {
    font-family: var(--font-display); font-size: 1.3rem; font-weight: 600;
    letter-spacing: -0.01em; color: var(--text-primary); margin: 0 0 var(--space-2);
  }
  .prod-benefit {
    font-size: 1.0625rem; line-height: 1.45; font-weight: 500;
    color: var(--text-primary); margin: 0 0 var(--space-2);
  }
  .prod-surface {
    font-size: 0.95rem; line-height: 1.55; color: var(--text-secondary);
    margin: 0 0 var(--space-3);
  }
  .disclosure-btn {
    margin-top: auto; background: none; border: none;
    border-top: 1px solid var(--border); padding: var(--space-2) 0 0;
    font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--green); cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; transition: color 150ms;
  }
  .disclosure-btn:hover { color: var(--green-bright); }
  .disclosure-btn .chev { transition: transform 250ms; font-size: 0.85rem; }
  .disclosure-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
  .disclosure-panel { max-height: 0; overflow: hidden; transition: max-height 350ms cubic-bezier(0.4,0,0.2,1); }
  .disclosure-inner { padding-top: var(--space-2); }
  .disclosure-inner p { font-size: 0.9rem; line-height: 1.6; color: var(--text-secondary); margin: 0 0 var(--space-2); }
  .prod-link { font-family: var(--font-mono); font-size: 0.75rem; color: var(--green); display: inline-block; }
  .prod-link:hover { text-decoration: underline; }
  .suite-note {
    font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-tertiary);
    line-height: 1.7; margin: var(--space-8) 0 0; max-width: 64ch;
  }

  /* ---- S4 · See it work (interactive demo) ---- */
  .s-demo .rb-sub { color: var(--text-secondary); font-size: 1.0625rem; line-height: 1.6; margin: var(--space-3) 0 0; max-width: 54ch; }
  .demo { margin-top: var(--space-8); }
  .demo-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--space-3); }
  .demo-chip {
    font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.03em;
    padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong);
    background: transparent; color: var(--text-secondary); cursor: pointer; transition: all 150ms;
  }
  .demo-chip:hover { border-color: var(--green); color: var(--text-primary); }
  .demo-chip.is-active { background: var(--green); color: #fff; border-color: var(--green); }
  .demo-stage {
    background: var(--surface-card-strong); border: 1px solid var(--border-strong);
    border-radius: 14px; padding: var(--space-4); box-shadow: var(--shadow-md);
  }
  .demo-msg-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: var(--space-3); }
  .demo-msg-label { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary); }
  .demo-synthetic { font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: #876016; border: 1px solid rgba(196,145,59,0.4); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
  .demo-msg { font-size: 1.0625rem; line-height: 2; color: var(--text-primary); margin: 0; min-height: 6em; }
  .ent { border-radius: 3px; padding: 1px 4px; transition: background 400ms, color 400ms, box-shadow 400ms; font-weight: 500; }
  .ent.raw { background: rgba(196,145,59,0.16); color: #876016; box-shadow: inset 0 -1px 0 rgba(196,145,59,0.5); }
  .ent.tok { background: var(--green-dim); color: var(--green); font-family: var(--font-mono); font-size: 0.82em; box-shadow: none; }
  .ent.tok.withheld { background: rgba(184,92,56,0.14); color: var(--red); }
  .demo-controls { display: flex; gap: 1rem; align-items: center; margin-top: var(--space-3); }
  .demo-toggle { background: none; border: none; color: var(--text-tertiary); cursor: pointer; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }
  .demo-toggle:hover { color: var(--green); }
  .demo-result { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border); }
  .demo-result-label { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary); display: block; margin-bottom: 0.6rem; }
  .demo-entities { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: var(--space-3); }
  .demo-ent-chip { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 4px; background: var(--green-dim); color: var(--green); }
  .demo-ent-chip.cat { background: rgba(184,92,56,0.14); color: var(--red); }
  .demo-lane { display: flex; align-items: center; gap: 0.6rem; }
  .demo-lane-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
  .demo-lane-name { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
  .demo-lane-note { font-size: 0.92rem; line-height: 1.55; color: var(--text-secondary); margin: 0.4rem 0 0; }
  .lane-green .demo-lane-dot { background: var(--green); } .lane-green .demo-lane-name { color: var(--green); }
  .lane-amber .demo-lane-dot { background: var(--amber); } .lane-amber .demo-lane-name { color: #876016; }
  .lane-red .demo-lane-dot { background: var(--red); } .lane-red .demo-lane-name { color: var(--red); }
  .demo-audit { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-tertiary); margin: var(--space-3) 0 0; letter-spacing: 0.02em; }
  .demo-foot { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-tertiary); line-height: 1.65; margin: var(--space-3) 0 0; }
  .demo-foot a { color: var(--green); }

  /* ---- S5 · The guarantee (the honest peak) ---- */
  .s-guarantee .rb-inner { padding-top: var(--space-16); padding-bottom: var(--space-16); }
  .guarantee-h { font-size: clamp(2rem, 6vw, 3.4rem); max-width: 18ch; line-height: 1.16; }
  .guarantee-proof { margin: var(--space-12) 0 0; max-width: 46ch; display: grid; gap: var(--space-4); }
  .guarantee-proof p { font-size: 1.15rem; line-height: 1.55; color: var(--text-secondary); margin: 0; }
  .guarantee-kicker {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.2;
    color: var(--text-primary); margin: var(--space-12) 0 0; max-width: 20ch;
  }

  /* ---- S6 · What we can't do (the only --red moment, on the eyebrow) ---- */
  .limits-eyebrow { color: var(--red); }
  .limits-eyebrow .rb-num { color: var(--red); opacity: 0.55; }
  .s-limits .rb-h { max-width: 14ch; }
  .limits-lead { font-size: 1.15rem; line-height: 1.6; color: var(--text-secondary); margin: var(--space-4) 0 0; max-width: 48ch; }
  .limits-list { list-style: none; margin: var(--space-8) 0 0; padding: 0; max-width: 56ch; }
  .limits-list li { padding: var(--space-4) 0; border-top: 1px solid var(--border-strong); }
  .limits-list li:last-child { border-bottom: 1px solid var(--border-strong); }
  .limits-list strong {
    display: block; font-family: var(--font-display); font-weight: 600;
    font-size: 1.25rem; line-height: 1.3; color: var(--text-primary); margin-bottom: 0.4rem;
  }
  .limits-list span { display: block; font-size: 1rem; line-height: 1.55; color: var(--text-secondary); }
  .limits-close {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.3;
    color: var(--text-primary); margin: var(--space-12) 0 0; max-width: 24ch;
  }

  /* ---- S7 · Why it holds up (trust + sovereignty) ---- */
  .s-trust .rb-sub { color: var(--text-secondary); font-size: 1.0625rem; line-height: 1.6; margin: var(--space-3) 0 0; max-width: 52ch; }
  .trust-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    background: var(--border-strong); border: 1px solid var(--border-strong);
    border-radius: 12px; overflow: hidden; margin-top: var(--space-8);
  }
  @media (min-width: 721px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
  .trust-cell { background: var(--surface-primary); padding: var(--space-4); display: flex; flex-direction: column; gap: 0.35rem; }
  .tc-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary); }
  .tc-value { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--text-primary); line-height: 1.1; }
  .tc-detail { font-size: 0.7rem; color: var(--green); }
  .trust-key {
    border-inline-start: 3px solid var(--green); padding: var(--space-1) 0 var(--space-1) var(--space-3);
    margin: var(--space-8) 0 0; font-size: 1.0625rem; line-height: 1.6; color: var(--text-primary); max-width: 62ch;
  }
  .trust-links { font-family: var(--font-mono); font-size: 0.78rem; line-height: 2.1; margin: var(--space-6) 0 0; color: var(--text-tertiary); }
  .trust-links a { color: var(--green); }
  .trust-links a:hover { text-decoration: underline; }

  /* ---- S8 · The calm answer (close, echoes the hero) ---- */
  .s-close { border-bottom: none; }
  .s-close .rb-inner { padding-top: var(--space-16); padding-bottom: var(--space-16); }
  .close-h {
    font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
    font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.12; color: var(--text-primary);
    margin: var(--space-3) 0 0; max-width: 18ch;
  }
  .close-line { font-size: 1.15rem; line-height: 1.6; color: var(--text-secondary); margin: var(--space-4) 0 0; max-width: 50ch; }
  .close-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin-top: var(--space-8); }
  .close-ghost { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.04em; color: var(--green); }
  .close-ghost:hover { text-decoration: underline; }

  /* footer honesty sign-off */
  .footer-signoff { color: var(--green-bright); margin-bottom: var(--space-2); }

  /* SECTION-CSS:END */
