/* ==========================================================================
   RepeatWell — premium staging design system
   Local-first: system font stacks only, no external assets, no trackers.
   ========================================================================== */

:root {
  --ink: #16302b;
  --ink-soft: #48605a;
  --pine: #1e4d44;
  --pine-deep: #0f2f29;
  --pine-ink: #0b221e;
  --moss: #3f6b61;
  --mint: #e3ede6;
  --mint-deep: #cfe0d5;
  --cream: #f4efe4;
  --paper: #fbf9f3;
  --white: #ffffff;
  --brass: #b97f3e;
  --brass-soft: #d9a05e;
  /* Darker than --brass specifically for small/normal text set directly on light
     backgrounds (paper/white) — --brass itself stays at 3.2-3.4:1 there, which fails
     WCAG 1.4.3 (needs 4.5:1). --brass remains unchanged for backgrounds/borders/
     decorative accents, where the lower non-text 3:1 requirement already applies.
     Kept well above the 4.5:1 minimum (6.1-7.5:1 nominal) rather than just clearing it:
     an automated contrast scan found that browser anti-aliasing on small/thin bold
     glyphs can shift the *sampled* pixel color by a few percent between renders, so a
     value only marginally over 4.5:1 could occasionally measure as a false failure. */
  --brass-text: #7a4a10;
  --line: #e0dccd;
  --line-dark: #2c554c;
  --ok: #2e6b48;
  /* Darkened from #a05a1f (4.45:1, just under 4.5:1) with the same margin-for-
     anti-aliasing-noise reasoning as --brass-text above. */
  --warn: #7a4113;
  --risk: #9c3c2e;
  --shadow-1: 0 1px 2px rgba(15, 47, 41, .06), 0 8px 24px rgba(15, 47, 41, .07);
  --shadow-2: 0 2px 6px rgba(15, 47, 41, .08), 0 24px 60px rgba(15, 47, 41, .14);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Inter, system-ui, -apple-system, Arial, sans-serif;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* WCAG 1.4.4/1.4.10: long unbroken tokens must wrap rather than force horizontal
     scroll when text is resized up to 200% at a fixed viewport width. */
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: inherit; }
code {
  padding: .1em .4em;
  background: rgba(30, 77, 68, .09);
  border-radius: 4px;
  font-size: .92em;
}
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: fixed; z-index: 200; top: -4rem; left: 1rem; padding: .7rem 1.1rem; color: var(--pine-deep); background: #fff; border-radius: var(--r-sm); box-shadow: var(--shadow-2); font-weight: 700; text-decoration: none; transition: top .15s ease; }
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 3px; }

.shell { width: min(var(--shell), calc(100% - 48px)); margin-inline: auto; }
.section { padding-block: clamp(58px, 7vw, 96px); }

/* ---------------- Header ---------------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(251, 249, 243, .96); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 14px; width: min(1280px, calc(100% - 40px)); min-height: 72px; margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-glyph { width: 30px; height: 30px; flex: none; }
.brand-word { font-size: 1.14rem; font-weight: 700; letter-spacing: -.02em; color: var(--pine-deep); }
.brand-word b { color: var(--brass-text); font-weight: 700; }
.staging-pill { padding: 4px 10px; color: var(--warn); background: #f7ead8; border: 1px solid #e8d3b4; border-radius: 99px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-left: auto; font-size: .88rem; font-weight: 600; }
.site-nav a { padding: 4px 2px; text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--brass); }
.nav-cta { padding: 9px 16px !important; color: #fff !important; background: var(--pine); border-radius: var(--r-sm); border-bottom: 0 !important; transition: background .15s ease; }
.nav-cta:hover { background: var(--pine-deep); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; width: 20px; height: 2px; margin: 5px auto; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-of-type(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(-0px) rotate(-45deg); margin-top: -7px; }

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 22px; border-radius: var(--r-sm); border: 1.5px solid transparent; font: 700 .92rem var(--sans); text-decoration: none; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0); }
.btn-primary { color: #fff; background: var(--pine); }
.btn-primary:hover { background: var(--pine-deep); }
.btn-secondary { color: var(--pine-deep); border-color: var(--pine); background: transparent; }
.btn-secondary:hover { background: rgba(30, 77, 68, .06); }
.btn-light { color: var(--pine-deep); background: #fff; }
.btn-ghost { color: #f0f4f0; border-color: rgba(255, 255, 255, .45); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn-quiet { display: inline-block; margin-top: 16px; color: var(--pine-deep); font-weight: 700; font-size: .9rem; text-decoration: none; border-bottom: 2px solid var(--mint-deep); padding-bottom: 2px; }
.btn-quiet:hover { border-bottom-color: var(--brass); }

/* ---------------- Kickers / eyebrows ---------------- */
.kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--brass-text); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.kicker-mark { width: 22px; height: 2px; background: var(--brass); flex: none; }
.kicker.light { color: var(--brass-soft); }
.eyebrow { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; color: var(--brass-text); font-size: .74rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow span { font-family: var(--serif); font-size: .95rem; letter-spacing: 0; color: var(--moss); }
.eyebrow.light, .eyebrow.light span { color: var(--brass-soft); }
.sec-head { max-width: 780px; margin-bottom: clamp(28px, 3.6vw, 46px); }
.sec-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.12; }
.sec-sub { max-width: 700px; margin-top: 16px; color: var(--ink-soft); font-size: 1.02rem; }
.sec-sub.light { color: #b9cec6; }
.fine { color: var(--ink-soft); font-size: .87rem; line-height: 1.6; }
.fine.light { color: #a7bfb6; }

/* ---------------- Hero ---------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 7vw, 96px) clamp(72px, 8vw, 110px); background: linear-gradient(180deg, var(--paper) 0%, #f6f2e7 100%); }
.hero::after { content: ""; position: absolute; inset: 0 0 0 52%; background: repeating-linear-gradient(0deg, transparent 0 34px, rgba(22, 48, 43, .05) 34px 35px); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
@media (min-width: 1240px) {
  .hero-grid { grid-template-columns: .92fr 1.08fr; }
}
.hero h1 { font-size: clamp(2.55rem, 4.9vw, 4.35rem); line-height: 1.03; letter-spacing: -.035em; max-width: 620px; }
.hero h1 em { display: block; color: var(--pine); font-style: italic; }
.lede { max-width: 560px; margin: 24px 0 28px; color: var(--ink-soft); font-size: 1.06rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row.center { justify-content: center; }
.assurance { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 30px 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: .8rem; font-weight: 600; }
.assurance li { display: flex; align-items: center; gap: 7px; }
.assurance li::before { content: "✓"; color: var(--ok); font-weight: 900; }

/* App-frame product mock */
.hero-visual { margin: 0; min-width: 0; }
.app-frame { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.app-chrome { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: #f1f3ef; border-bottom: 1px solid var(--line); }
.app-chrome span { width: 9px; height: 9px; border-radius: 50%; background: #c5cfc6; }
.app-chrome span:first-child { background: var(--brass-soft); }
.app-chrome em { margin-left: 8px; color: var(--ink-soft); font-size: .66rem; font-style: normal; font-weight: 600; letter-spacing: .02em; }
.app-body { display: grid; grid-template-columns: 27% 73%; }
.app-body > * { min-width: 0; }
.app-side { padding: 18px 12px; background: #f6f8f5; border-right: 1px solid #e6eae4; font-size: .72rem; color: #526b62; }
.app-side-title { margin: 0 8px 14px; color: var(--ink); font-weight: 800; }
.app-side ul { margin: 0; padding: 0; list-style: none; }
.app-side li { margin: 2px 0; padding: 6px 9px; border-radius: 5px; }
.app-side li.is-active { color: var(--pine-deep); background: var(--mint); font-weight: 800; }
.app-main { padding: 20px 22px 22px; }
.demo-tag { display: inline-block; margin: 0 0 6px; padding: 2px 8px; color: var(--warn); background: #f7ead8; border-radius: 4px; font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.app-title { margin: 2px 0 14px; font-family: var(--serif); font-size: 1.42rem; letter-spacing: -.01em; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { padding: 11px 10px; background: var(--cream); border-radius: var(--r-sm); }
.stat strong { display: block; font-family: var(--serif); font-size: 1.45rem; line-height: 1.1; }
.stat span { display: block; margin-top: 2px; color: var(--ink-soft); font-size: .6rem; line-height: 1.3; }
.stat.is-risk strong { color: var(--risk); }
.panel { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.panel-title { margin: 0 0 8px; font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.wrow, .crow { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: .74rem; }
.wname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { flex: none; padding: 2px 8px; border-radius: 99px; font-size: .6rem; font-weight: 700; }
.chip-progress { color: var(--pine-deep); background: var(--mint); }
.chip-due { color: var(--warn); background: #f7ead8; }
.chip-blocked { color: #fff; background: var(--risk); }
.chip-ok { color: #fff; background: var(--ok); }
.meter { flex: none; width: 84px; height: 6px; background: #e8e4d8; border-radius: 99px; overflow: hidden; }
.meter i { display: block; width: var(--w, 50%); height: 100%; background: var(--pine); border-radius: 99px; }
.cstate { flex: none; color: var(--ink-soft); font-size: .62rem; font-weight: 700; }
.visual-caption { margin-top: 10px; color: var(--ink-soft); font-size: .72rem; text-align: right; }

/* ---------------- Definition band ---------------- */
.define-band { padding-block: clamp(36px, 4vw, 52px); color: #eef3ee; background: var(--pine-deep); }
.define-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
.define-lead { font-family: var(--serif); font-size: clamp(1.25rem, 2.1vw, 1.7rem); line-height: 1.35; letter-spacing: -.01em; }
.define-side { padding-left: 22px; border-left: 2px solid var(--brass); color: #b9cec6; font-size: .92rem; }

/* ---------------- Signature visualization ---------------- */
.how-section { background: var(--paper); }
.sysviz-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-1); overflow: hidden; }
.sysviz-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 18px; background: #f6f4ec; border-bottom: 1px solid var(--line); }
.stage-btn { display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink-soft); font: 700 .8rem var(--sans); cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.stage-btn:hover { border-color: var(--moss); color: var(--ink); }
.stage-btn[aria-pressed="true"] { color: #fff; background: var(--pine); border-color: var(--pine); }
.stage-num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(185, 127, 62, .18); color: var(--brass-text); font-size: .68rem; }
.stage-btn[aria-pressed="true"] .stage-num { background: rgba(255, 255, 255, .2); color: #fff; }

.viz-canvas { position: relative; height: 460px; margin: 18px; background: repeating-linear-gradient(0deg, transparent 0 32px, rgba(22, 48, 43, .04) 32px 33px), #fbfaf5; border: 1px solid #eeeadd; border-radius: var(--r-md); overflow: hidden; }
.viz-chip { position: absolute; left: var(--x); top: var(--y); width: 27%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 2px 8px rgba(15, 47, 41, .07); font-size: .74rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: rotate(var(--r, 0deg)); transition: left .8s cubic-bezier(.5, .1, .2, 1), top .8s cubic-bezier(.5, .1, .2, 1), transform .8s cubic-bezier(.5, .1, .2, 1), box-shadow .4s ease; }
.viz-chip .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #c9c2ad; transition: background .5s ease .4s; }

/* Stage 1 — scattered */
.sysviz[data-stage="1"] .c1 { --x: 3%;  --y: 6%;  --r: -6deg; }
.sysviz[data-stage="1"] .c2 { --x: 33%; --y: 2%;  --r: 4deg; }
.sysviz[data-stage="1"] .c3 { --x: 63%; --y: 7%;  --r: -3deg; }
.sysviz[data-stage="1"] .c4 { --x: 14%; --y: 26%; --r: 7deg; }
.sysviz[data-stage="1"] .c5 { --x: 47%; --y: 30%; --r: -8deg; }
.sysviz[data-stage="1"] .c6 { --x: 71%; --y: 38%; --r: 3deg; }
.sysviz[data-stage="1"] .c7 { --x: 5%;  --y: 52%; --r: -4deg; }
.sysviz[data-stage="1"] .c8 { --x: 34%; --y: 58%; --r: 6deg; }
.sysviz[data-stage="1"] .c9 { --x: 64%; --y: 66%; --r: -5deg; }
.sysviz[data-stage="1"] .c10 { --x: 18%; --y: 80%; --r: 4deg; }

/* Stage 2 & 3 — organized inside the frame */
.sysviz[data-stage="2"] .viz-chip, .sysviz[data-stage="3"] .viz-chip { --r: 0deg; box-shadow: 0 1px 3px rgba(15, 47, 41, .06); }
.sysviz[data-stage="2"] .c1, .sysviz[data-stage="3"] .c1 { --x: 7%;    --y: 27%; }
.sysviz[data-stage="2"] .c2, .sysviz[data-stage="3"] .c2 { --x: 7%;    --y: 41%; }
.sysviz[data-stage="2"] .c8, .sysviz[data-stage="3"] .c8 { --x: 7%;    --y: 55%; }
.sysviz[data-stage="2"] .c5, .sysviz[data-stage="3"] .c5 { --x: 7%;    --y: 69%; }
.sysviz[data-stage="2"] .c9, .sysviz[data-stage="3"] .c9 { --x: 7%;    --y: 83%; }
.sysviz[data-stage="2"] .c3, .sysviz[data-stage="3"] .c3 { --x: 35.5%; --y: 27%; }
.sysviz[data-stage="2"] .c4, .sysviz[data-stage="3"] .c4 { --x: 35.5%; --y: 41%; }
.sysviz[data-stage="2"] .c10, .sysviz[data-stage="3"] .c10 { --x: 35.5%; --y: 55%; }
.sysviz[data-stage="2"] .c6, .sysviz[data-stage="3"] .c6 { --x: 35.5%; --y: 69%; }
.sysviz[data-stage="2"] .c7, .sysviz[data-stage="3"] .c7 { --x: 35.5%; --y: 83%; }
.sysviz[data-stage="2"] .dot, .sysviz[data-stage="3"] .dot { background: var(--ok); }

.viz-frame { position: absolute; left: 4%; top: 8%; width: 62%; height: 86%; border: 1.5px solid var(--mint-deep); border-radius: var(--r-md); background: rgba(227, 237, 230, .35); opacity: 0; transition: opacity .6s ease .15s; }
.viz-frame-title { margin: 12px 16px 2px; color: var(--pine-deep); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.viz-frame-cols { display: flex; gap: 26%; margin: 2px 16px 0; color: var(--ink-soft); font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.sysviz[data-stage="2"] .viz-frame, .sysviz[data-stage="3"] .viz-frame { opacity: 1; }

.viz-flow { position: absolute; left: 67.5%; top: 40%; width: 6%; display: grid; gap: 16px; opacity: 0; transition: opacity .5s ease .3s; }
.viz-flow i { display: block; height: 2px; background: linear-gradient(90deg, var(--mint-deep), var(--brass)); border-radius: 2px; position: relative; }
.viz-flow i::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left-color: var(--brass); }
.viz-report { position: absolute; left: 74.5%; top: 24%; width: 22.5%; padding: 14px; background: var(--pine-deep); border-radius: var(--r-md); color: #e9efe9; opacity: 0; transform: translateX(12px); transition: opacity .6s ease .35s, transform .6s ease .35s; }
.viz-report-title { margin: 0 0 10px; font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--brass-soft); }
.viz-line { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .68rem; }
.viz-line b { font-weight: 700; }
.viz-line .ok { color: #8fd0a8; }
.viz-line .warn { color: var(--brass-soft); }
.sysviz[data-stage="3"] .viz-flow { opacity: 1; }
.sysviz[data-stage="3"] .viz-report { opacity: 1; transform: translateX(0); }

.stage-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; padding: 18px; background: #f6f4ec; border-top: 1px solid var(--line); list-style: none; counter-reset: none; }
.stage-steps li { padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid transparent; color: var(--ink-soft); font-size: .84rem; line-height: 1.5; transition: border-color .3s ease, background .3s ease, color .3s ease; }
.stage-steps b { display: block; margin-bottom: 3px; color: var(--ink); font-family: var(--serif); font-size: .98rem; font-weight: 600; }
.sysviz[data-stage="1"] ~ * , .sysviz .stage-steps { }
.sysviz[data-stage="1"] .stage-steps li[data-step="1"],
.sysviz[data-stage="2"] .stage-steps li[data-step="2"],
.sysviz[data-stage="3"] .stage-steps li[data-step="3"] { background: #fff; border-color: var(--brass-soft); }

/* ---------------- Problem ---------------- */
.problem-section { background: var(--cream); border-block: 1px solid #ebe5d5; }
.prob-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 4vw, 72px); align-items: start; }
.prob-grid .sec-head { margin-bottom: 0; }
.prob-list { display: grid; gap: 0; }
.prob { padding: 20px 0; border-top: 1px solid #ddd5c2; }
.prob:first-child { border-top: 0; padding-top: 4px; }
.prob h3 { font-size: 1.12rem; margin-bottom: 6px; }
.prob p { color: var(--ink-soft); font-size: .95rem; line-height: 1.55; }

/* ---------------- Tools grid ---------------- */
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.tool-card { padding: 26px 24px 30px; background: var(--paper); transition: background .2s ease; }
.tool-card:hover { background: #fff; }
.tool-card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.tool-card p { color: var(--ink-soft); font-size: .92rem; line-height: 1.55; }

/* ---------------- Alongside ---------------- */
.along-section { background: var(--mint); }
.along-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.along-card { padding: 30px 28px; background: #fff; border-top: 4px solid var(--pine); border-radius: 0 0 var(--r-md) var(--r-md); box-shadow: var(--shadow-1); }
.along-card h3 { font-size: 1.22rem; margin-bottom: 12px; }
.along-card p { color: var(--ink-soft); font-size: .95rem; line-height: 1.55; }

/* ---------------- Workflows ---------------- */
.flows-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.flow-card { display: flex; flex-direction: column; gap: 10px; padding: 26px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); transition: box-shadow .2s ease, transform .2s ease; }
.flow-card:hover { box-shadow: var(--shadow-1); transform: translateY(-2px); }
.flow-card h3 { font-size: 1.18rem; }
.flow-card > p { color: var(--ink-soft); font-size: .94rem; line-height: 1.55; flex: 1; }
.mini { margin-top: 4px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); }
.mini-title { margin: 0 0 8px; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.mini-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: .8rem; }
.mini-row.muted { color: var(--ink-soft); font-size: .7rem; }
.tick { flex: none; width: 14px; height: 14px; border: 1.5px solid #a9b6ac; border-radius: 4px; position: relative; }
.tick.done { background: var(--ok); border-color: var(--ok); }
.tick.done::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .6rem; font-weight: 900; }
.who { font-weight: 700; font-size: .74rem; }
.arrow { color: var(--brass-text); font-weight: 800; }

/* ---------------- Demo (dark) ---------------- */
.demo-section { color: #edf2ed; background: linear-gradient(180deg, var(--pine-deep), var(--pine-ink)); }
.demo-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.demo-copy h2 { color: #f4f7f3; }
.demo-copy > p { margin-top: 14px; color: #c0d2c9; font-size: .96rem; }
.demo-copy .fine { margin-top: 12px; color: #93aca2; }
.demo-cmd { margin-top: 24px; padding: 18px 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r-md); }
.demo-cmd span, .demo-cmd small { display: block; color: #9db8ad; font-size: .7rem; }
.demo-cmd code { display: block; margin: 8px 0; padding: 0; background: none; color: #fff; font-size: .88rem; overflow-wrap: anywhere; }
.demo-visuals { display: grid; gap: 16px; min-width: 0; }
.doc-card { padding: 20px 22px; color: var(--ink); background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.doc-card.alt { margin-left: 34px; background: var(--cream); }
.doc-head { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-family: var(--serif); font-size: 1.02rem; }
.doc-row { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-top: 1px solid var(--line); font-size: .85rem; }
.doc-row span { color: var(--ink-soft); }
.doc-row b { font-weight: 700; text-align: right; }
.doc-body { padding: 4px 0 8px; font-size: .9rem; }
.doc-foot { margin-top: 8px; color: var(--ink-soft); font-size: .72rem; }

/* ---------------- Scorecard ---------------- */
.score-section { background: var(--cream); border-block: 1px solid #ebe5d5; }
.score-grid { display: flex; flex-direction: column; gap: 4px; }
.score-group-heading { margin: 18px 0 10px; color: var(--brass-text); font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.score-group-heading:first-child { margin-top: 0; }
.score-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.score-question { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); }
.score-question label { display: block; margin-bottom: 8px; font-weight: 700; font-size: .95rem; }
.score-question label small { display: block; margin-top: 4px; color: var(--ink-soft); font-size: .82rem; font-weight: 400; line-height: 1.5; }
.score-question select { width: 100%; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #b9c4ba; border-radius: var(--r-sm); font: inherit; font-size: .88rem; }
.score-actions { display: flex; gap: 12px; margin-top: 20px; }
.score-result { margin-top: 26px; padding: 30px 32px; background: #fff; border-left: 5px solid var(--brass); border-radius: 0 var(--r-md) var(--r-md) 0; box-shadow: var(--shadow-1); }
.score-result h3 { font-size: 1.7rem; margin-bottom: 8px; }
.score-result p { color: var(--ink-soft); font-size: .92rem; margin-bottom: 6px; }
.score-result .cta-row { margin-top: 16px; }

/* ---------------- Trust (dark) ---------------- */
.trust-section { color: #edf2ed; background: linear-gradient(160deg, #123b33, var(--pine-deep)); }
.trust-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(30px, 4vw, 72px); align-items: start; }
.trust-grid .sec-head { margin-bottom: 0; }
.trust-grid h2 { color: #f4f7f3; }
.trust-list { margin: 0; padding: 0; list-style: none; }
.trust-list li { display: grid; grid-template-columns: 200px 1fr; gap: 18px; padding: 15px 0; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .92rem; line-height: 1.55; }
.trust-list li:first-child { border-top: 0; padding-top: 0; }
.trust-list b { color: #f0f4f0; font-weight: 700; }
.trust-list span { color: #b9cec6; }

/* ---------------- Setup ---------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0 0 34px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.steps li { padding: 22px 22px 8px 0; border-right: 1px solid var(--line); }
.steps li + li { padding-left: 22px; }
.steps li:last-child { border-right: 0; padding-right: 0; }
.step-n { color: var(--brass-text); font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.steps h3 { margin: 26px 0 8px; font-size: 1.22rem; }
.steps p { color: var(--ink-soft); font-size: .86rem; }
.setup-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.setup-box { padding: 26px 28px; background: var(--cream); border-radius: var(--r-md); }
.setup-box h3 { font-size: 1.18rem; margin-bottom: 10px; }
.setup-box > p { color: var(--ink-soft); font-size: .94rem; line-height: 1.55; margin-bottom: 12px; }
.fmt-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.fmt-list li { padding: 7px 13px; background: #fff; border: 1px solid var(--line); border-radius: 99px; font-size: .78rem; font-weight: 700; }
.tech-details { margin-top: 4px; }
.tech-details summary { cursor: pointer; color: var(--pine); font-size: .82rem; font-weight: 700; list-style: none; }
.tech-details summary::-webkit-details-marker { display: none; }
.tech-details summary::before { content: "+ "; color: var(--brass-text); font-weight: 800; }
.tech-details[open] summary::before { content: "– "; }
.tech-details .fine { margin-top: 8px; }

/* ---------------- Editions ---------------- */
.editions-section { background: var(--paper); }
.ed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.ed-card { display: flex; flex-direction: column; padding: 30px 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.ed-card.is-featured { color: #eef3ee; background: var(--pine-deep); border-color: var(--pine-deep); box-shadow: var(--shadow-2); }
.ed-label { margin: 0 0 14px; color: var(--brass-text); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.is-featured .ed-label { color: var(--brass-soft); }
.ed-price { margin: 0; font-family: var(--serif); font-size: 2rem; }
.ed-price small { display: block; margin-top: 4px; font-family: var(--sans); font-size: .66rem; font-weight: 600; opacity: .72; }
.ed-placeholder-badge { display: inline-block; margin-top: 12px; padding: 4px 10px; color: var(--warn); background: #f7ead8; border: 1px solid #e8d3b4; border-radius: 99px; font-size: .68rem; font-weight: 800; letter-spacing: .02em; }
.is-featured .ed-placeholder-badge { color: #3a2a13; background: var(--brass-soft); border-color: var(--brass-soft); }
.ed-for { margin: 12px 0 0; min-height: 44px; color: var(--ink-soft); font-size: .92rem; line-height: 1.5; }
.is-featured .ed-for { color: #c0d2c9; }
.ed-card ul { flex: 1; margin: 18px 0 22px; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; }
.is-featured ul { border-color: rgba(255, 255, 255, .18); }
.ed-card li { position: relative; margin: 9px 0; padding-left: 18px; font-size: .87rem; line-height: 1.5; }
.ed-card li::before { content: "—"; position: absolute; left: 0; color: var(--brass-text); }
.ed-btn { width: 100%; }
.is-featured .btn-primary { color: var(--pine-deep); background: #fff; }
.is-featured .btn-primary:hover { background: var(--cream); }
.price-note { margin-top: 26px; padding: 22px 26px; background: #f7ead8; border-left: 5px solid var(--brass); border-radius: 0 var(--r-md) var(--r-md) 0; }
.price-note h3 { font-size: 1.05rem; margin-bottom: 6px; }
.price-note p { color: #6b5233; font-size: .9rem; line-height: 1.55; }
.price-note a { color: #6b5233; font-weight: 700; text-decoration: underline; }
.billing-explain { margin: 0 0 12px; padding-left: 0; list-style: none; }
.billing-explain li { margin: 8px 0; color: #6b5233; font-size: .9rem; line-height: 1.55; }
.billing-explain b { color: #4a3a1e; }

/* --- Billing selector (CSS-only; usable without JavaScript) --- */
.billing-toggle { margin: 0 auto 22px; padding: 0; border: 0; text-align: center; }
.billing-toggle legend { padding: 0; margin: 0 0 10px; color: var(--ink-soft); font-size: .82rem; font-weight: 700; }
.billing-options { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 6px; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; }
.billing-radio { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.billing-options label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; color: var(--ink-soft); font-size: .9rem; font-weight: 700; cursor: pointer; }
.billing-radio:checked + label { color: #fff; background: var(--pine-deep); }
.billing-radio:focus-visible + label { outline: 3px solid var(--brass); outline-offset: 2px; }
.bv-badge { display: inline-block; padding: 2px 9px; background: var(--brass-soft); color: var(--pine-deep); border-radius: 999px; font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.billing-radio:checked + label .bv-badge { background: var(--brass-soft); }

.ed-prices { margin: 0; }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 4px 0; font-family: var(--serif); font-size: 2rem; }
.price-row small { flex-basis: 100%; font-family: var(--sans); font-size: .66rem; font-weight: 600; opacity: .72; }
.ed-license { margin: 12px 0 0; font-size: .82rem; font-weight: 700; color: var(--brass-text); }
.is-featured .ed-license { color: var(--brass-soft); }
.ed-larger { margin: 18px 0 0; color: var(--ink-soft); font-size: .86rem; }
.ed-larger a { color: var(--pine); font-weight: 700; }
.foot-support a { color: inherit; text-decoration: underline; }

/* One checkout control per billing option; the billing radio selects which shows.
   Falls back to showing all three (each labeled) when :has() is unsupported. */
.ed-checkout-group { display: flex; flex-direction: column; gap: 8px; }
.ed-checkout { width: 100%; }
.ed-checkout .sandbox-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--brass-soft); color: var(--pine-deep); font-size: .6rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; vertical-align: middle;
}
.ed-checkout.is-unavailable {
  display: block; width: 100%; padding: 10px 14px; border: 1px dashed var(--line);
  border-radius: var(--r-sm, 8px); background: transparent; color: var(--ink-soft);
  font-size: .82rem; text-align: center; cursor: default;
}
.ed-checkout.is-unavailable a { color: var(--pine); font-weight: 700; }
.is-featured .ed-checkout.is-unavailable { color: #c0d2c9; border-color: rgba(255,255,255,.28); }
/* The is-unavailable span above sets a light color for the dark --pine-deep featured-card
   background, but its nested <a> is still matched by the darker `.ed-checkout.is-unavailable a`
   rule (needed for the light-background non-featured cards), which was leaving the link nearly
   invisible on the dark card (~1.5:1, axe-confirmed). Re-override it to match the span here. */
.is-featured .ed-checkout.is-unavailable a { color: #c0d2c9; }

/* Fallback (no :has support): every billing price/control stays visible and labeled. When
   :has() is available, show only the selected period so the selector filters live. */
@supports selector(:has(*)) {
  .pricing-block:has(.billing-radio:checked) .price-row,
  .pricing-block:has(.billing-radio:checked) .ed-checkout { display: none; }
  .pricing-block:has(#bill-monthly:checked) .price-row[data-billing="monthly"],
  .pricing-block:has(#bill-yearly:checked) .price-row[data-billing="yearly"],
  .pricing-block:has(#bill-onetime:checked) .price-row[data-billing="one-time"] { display: flex; }
  .pricing-block:has(#bill-monthly:checked) .ed-checkout[data-billing="monthly"],
  .pricing-block:has(#bill-yearly:checked) .ed-checkout[data-billing="yearly"],
  .pricing-block:has(#bill-onetime:checked) .ed-checkout[data-billing="one-time"] { display: inline-flex; }
  .pricing-block:has(#bill-monthly:checked) .ed-checkout.is-unavailable[data-billing="monthly"],
  .pricing-block:has(#bill-yearly:checked) .ed-checkout.is-unavailable[data-billing="yearly"],
  .pricing-block:has(#bill-onetime:checked) .ed-checkout.is-unavailable[data-billing="one-time"] { display: block; }
}

/* ---------------- FAQ ---------------- */
.faq-shell { max-width: 860px; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 18px 34px 18px 2px; cursor: pointer; font-weight: 700; font-size: .98rem; list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--brass-text); font-family: var(--serif); font-size: 1.4rem; transition: transform .2s ease; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list summary:hover { color: var(--pine); }
.faq-list details p { max-width: 760px; padding: 0 2px 20px; color: var(--ink-soft); font-size: .95rem; line-height: 1.6; }

/* ---------------- Closing ---------------- */
.closing-section { padding-block: clamp(64px, 8vw, 104px); color: #eef3ee; text-align: center; background: linear-gradient(180deg, var(--pine-deep), var(--pine-ink)); }
.closing-inner { max-width: 760px; }
.closing-inner .kicker { justify-content: center; }
.closing-inner h2 { font-size: clamp(2.1rem, 4vw, 3.3rem); color: #f4f7f3; }
.closing-inner > p { margin: 18px auto 28px; max-width: 620px; color: #c0d2c9; font-size: 1rem; }
.closing-inner .fine { margin-top: 22px; }

/* ---------------- Footer ---------------- */
.site-footer { padding-block: 44px 40px; background: var(--paper); border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.1fr .9fr 1fr; gap: 30px; align-items: start; }
.foot-brand p { margin-top: 12px; color: var(--ink-soft); font-size: .8rem; max-width: 300px; }
.foot-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin: 4px 0 0; padding: 0; list-style: none; font-size: .84rem; font-weight: 600; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--pine); text-decoration: underline; }
.foot-meta { color: var(--ink-soft); font-size: .74rem; text-align: right; }
.foot-meta p { margin: 3px 0; }

/* ---------------- Reveal-on-scroll (JS + motion-ok only) ---------------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
  .js [data-reveal].in { opacity: 1; transform: none; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .flows-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-list li { grid-template-columns: 168px 1fr; }
}

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero::after { inset: auto 0 0 0; height: 46%; }
  .hero-visual { max-width: 660px; }
  .define-grid, .prob-grid, .demo-grid, .trust-grid { grid-template-columns: 1fr; }
  .define-side { border-left: 0; border-top: 2px solid var(--brass); padding: 18px 0 0; }
  .along-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:nth-child(2n) { border-right: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .setup-cols { grid-template-columns: 1fr; }
  .ed-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-meta { text-align: left; }
  .staging-pill { display: none; }
  .site-nav { position: absolute; top: 71px; right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 18px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: 0; }
  .nav-cta { margin-top: 10px; text-align: center; }
  .nav-toggle { display: block; }
}

@media (max-width: 680px) {
  .shell { width: calc(100% - 32px); }
  .cta-row .btn { width: 100%; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat:last-child { grid-column: span 2; }
  .app-body { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .flows-grid, .tools-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: 0; padding-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
  .score-group { grid-template-columns: 1fr; }
  .score-actions { flex-direction: column; }
  .score-actions .btn { width: 100%; }
  .trust-list li { grid-template-columns: 1fr; gap: 4px; }
  .doc-card.alt { margin-left: 14px; }
  .stage-steps { grid-template-columns: 1fr; }
  .sysviz-tabs { gap: 6px; padding: 12px; }
  .stage-btn { padding: 8px 12px; font-size: .74rem; }
  /* Mobile signature-viz layout: taller canvas, wide chips, report below frame */
  .viz-canvas { height: 560px; margin: 12px; }
  .viz-chip { width: 44%; font-size: .64rem; padding: 7px 9px; }
  .sysviz[data-stage="1"] .c1 { --x: 4%;  --y: 4%; }
  .sysviz[data-stage="1"] .c2 { --x: 52%; --y: 8%; }
  .sysviz[data-stage="1"] .c3 { --x: 10%; --y: 18%; }
  .sysviz[data-stage="1"] .c4 { --x: 48%; --y: 24%; }
  .sysviz[data-stage="1"] .c5 { --x: 6%;  --y: 34%; }
  .sysviz[data-stage="1"] .c6 { --x: 50%; --y: 40%; }
  .sysviz[data-stage="1"] .c7 { --x: 12%; --y: 50%; }
  .sysviz[data-stage="1"] .c8 { --x: 46%; --y: 56%; }
  .sysviz[data-stage="1"] .c9 { --x: 8%;  --y: 68%; }
  .sysviz[data-stage="1"] .c10 { --x: 44%; --y: 76%; }
  .viz-frame { left: 3%; top: 3%; width: 94%; height: 58%; }
  .viz-frame-cols { gap: 18%; }
  .sysviz[data-stage="2"] .c1, .sysviz[data-stage="3"] .c1 { --x: 6%;  --y: 12%; }
  .sysviz[data-stage="2"] .c2, .sysviz[data-stage="3"] .c2 { --x: 6%;  --y: 21%; }
  .sysviz[data-stage="2"] .c8, .sysviz[data-stage="3"] .c8 { --x: 6%;  --y: 30%; }
  .sysviz[data-stage="2"] .c5, .sysviz[data-stage="3"] .c5 { --x: 6%;  --y: 39%; }
  .sysviz[data-stage="2"] .c9, .sysviz[data-stage="3"] .c9 { --x: 6%;  --y: 48%; }
  .sysviz[data-stage="2"] .c3, .sysviz[data-stage="3"] .c3 { --x: 52%; --y: 12%; }
  .sysviz[data-stage="2"] .c4, .sysviz[data-stage="3"] .c4 { --x: 52%; --y: 21%; }
  .sysviz[data-stage="2"] .c10, .sysviz[data-stage="3"] .c10 { --x: 52%; --y: 30%; }
  .sysviz[data-stage="2"] .c6, .sysviz[data-stage="3"] .c6 { --x: 52%; --y: 39%; }
  .sysviz[data-stage="2"] .c7, .sysviz[data-stage="3"] .c7 { --x: 52%; --y: 48%; }
  .viz-flow { left: 46%; top: 63%; width: 8%; transform: rotate(90deg); }
  .viz-report { left: 6%; top: 70%; width: 88%; transform: translateY(10px); }
  .sysviz[data-stage="3"] .viz-report { transform: translateY(0); }
}
