/* costerra — homepage. "Field ledger" theme: paper, ink, one vermilion accent.
   No build step, no framework. */

:root {
  --paper: #f2ede3;
  --paper-2: #e9e2d4;
  --paper-3: #fbf9f4;
  --ink: #16140f;
  --ink-2: #4a463d;
  --ink-3: #857f70;
  --rule: rgba(22, 20, 15, 0.16);
  --rule-2: rgba(22, 20, 15, 0.32);
  --red: #e5482f;
  --red-ink: #c63a22;
  --green: #2e6a45;
  --amber: #b9800f;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .75, .15, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16.5px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* paper grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .55; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .4  0 0 0 0 .32  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: inherit; text-decoration: none; }
img { display: block; }
pre { margin: 0; }
code { font: 500 .86em var(--mono); background: rgba(22, 20, 15, .06); padding: .08em .35em; border-radius: 3px; }
em { font-style: italic; }
::selection { background: var(--red); color: var(--paper-3); }

.container { width: min(1240px, 100% - 56px); margin-inline: auto; }
.sec-mark { display: inline-block; font: 500 .74rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.sec-mark.light { color: var(--paper); opacity: .85; }

/* ───────────── Top line ───────────── */
.topline { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 8px 20px; background: var(--ink); color: var(--paper); font: 400 .78rem var(--mono); letter-spacing: .02em; flex-wrap: wrap; }
.tl-tag { background: var(--red); color: var(--paper-3); padding: 1px 7px; font-weight: 600; letter-spacing: .1em; }
.tl-sep, .tl-dim { color: #9c968a; }
.tl-arrow { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--red); }
.topline:hover .tl-arrow { color: var(--red); }

/* ───────────── Nav ───────────── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(242, 237, 227, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-color: var(--rule-2); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 1.42rem/1 var(--serif); letter-spacing: -.02em; font-variation-settings: "opsz" 72; }
.brand img { transition: transform .6s var(--ease); }
.brand:hover img { transform: rotate(-6deg); }
.nav-links { display: flex; gap: 2px; margin-left: 12px; }
.nav-links a { position: relative; padding: .4em .7em; font: 500 .9rem var(--sans); color: var(--ink-2); transition: color .2s; }
.nav-links a i { font: 400 .66rem var(--mono); font-style: normal; color: var(--ink-3); margin-right: 5px; vertical-align: .25em; }
.nav-links a::after { content: ""; position: absolute; left: .7em; right: .7em; bottom: .15em; height: 1.5px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-cta { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.nav-gh { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: .92rem; color: var(--ink-2); }
.nav-gh:hover { color: var(--ink); }
.burger { display: none; width: 40px; height: 40px; border: 1px solid var(--rule-2); background: transparent; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span:first-child { top: 15px; } .burger span:last-child { top: 23px; }
.burger[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ───────────── Buttons ───────────── */
.btn { position: relative; display: inline-flex; align-items: center; gap: .55em; padding: .9em 1.35em; font: 600 .98rem var(--sans); border: 1.5px solid var(--ink); cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s; white-space: nowrap; }
.btn-sm { padding: .55em 1em; font-size: .88rem; }
.btn .arr { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-ink { background: var(--ink); color: var(--paper); box-shadow: 0 0 0 var(--red); }
.btn-ink:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--red); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-paper { background: var(--paper-3); color: var(--ink); border-color: var(--paper-3); }
.btn-paper:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--ink); }
.btn-line.light { color: var(--paper-3); border-color: var(--paper-3); }
.btn-line.light:hover { background: var(--paper-3); color: var(--red-ink); }

/* ───────────── Reveal ───────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ───────────── Hero ───────────── */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; border-bottom: 1px solid var(--rule-2); }
.contours { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .contours { mask-image: linear-gradient(90deg, rgba(0,0,0,.45), #000 55%); -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.45), #000 55%); }
.reg { position: absolute; width: 22px; height: 22px; z-index: 1; }
.reg::before, .reg::after { content: ""; position: absolute; background: var(--ink); }
.reg::before { left: 10px; top: 0; width: 1px; height: 22px; }
.reg::after { top: 10px; left: 0; height: 1px; width: 22px; }
.reg-tl { top: 18px; left: 18px; } .reg-tr { top: 18px; right: 18px; } .reg-bl { bottom: 18px; left: 18px; } .reg-br { bottom: 18px; right: 18px; }
.coords { position: absolute; z-index: 1; font: .68rem var(--mono); letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; }
.coords-l { left: 52px; bottom: 22px; } .coords-r { right: 52px; top: 22px; }

.hero-grid > *, .install-grid > *, .sec-head > *, .spec > *, .survey > *, .audit-row > * { min-width: 0; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 64px; align-items: start; }
.kicker { margin: 18px 0 26px; font: 500 .82rem var(--mono); color: var(--ink-2); letter-spacing: .02em; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.hero-title { font: 400 clamp(2.9rem, 6.2vw, 5.6rem)/.98 var(--serif); letter-spacing: -.012em; word-spacing: .04em; margin: 0 0 30px; font-variation-settings: "opsz" 144; }
.rot-wrap { position: relative; display: inline-block; white-space: nowrap; }
.rot { font-style: italic; color: var(--red); font-weight: 400; display: inline-block; font-variation-settings: "opsz" 144; }
.rot.out { animation: rotOut .38s var(--ease) forwards; }
.rot.in { animation: rotIn .5s var(--ease) forwards; }
@keyframes rotOut { to { opacity: 0; transform: translateY(-.25em) skewX(-8deg); } }
@keyframes rotIn { from { opacity: 0; transform: translateY(.3em) skewX(8deg); } to { opacity: 1; transform: none; } }
.scribble { position: absolute; left: -2%; width: 104%; bottom: -.18em; height: .26em; overflow: visible; }
.scribble path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; }
.scribble path:nth-child(2) { stroke-width: 2; opacity: .7; }
.scribble.draw path { animation: draw .9s var(--ease) forwards; }
.scribble.draw path:nth-child(2) { animation-delay: .18s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.lede { font-size: 1.18rem; line-height: 1.6; color: var(--ink-2); max-width: 600px; margin: 0 0 34px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.strip { margin-top: 30px; max-width: 600px; display: flex; align-items: center; gap: 12px; padding: 4px 4px 4px 14px; border: 1.5px dashed var(--rule-2); background: rgba(251, 249, 244, .7); font: .82rem var(--mono); }
.strip code { background: none; padding: 0; flex: 1; white-space: nowrap; overflow-x: auto; scrollbar-width: none; font-weight: 400; }
.strip code::-webkit-scrollbar { display: none; }
.strip-p { color: var(--red); }
.copy { flex: none; padding: 7px 12px; border: 1px solid var(--ink); background: transparent; font: 500 .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; color: inherit; transition: background .2s, color .2s; }
.copy:hover { background: var(--ink); color: var(--paper); }
.copy.done { background: var(--green); border-color: var(--green); color: var(--paper-3); }
.hero-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 0; margin: 26px 0 0; font: .8rem var(--mono); color: var(--ink-3); }
.hero-meta b { color: var(--ink); font-weight: 600; }
.hero-meta li::before { content: "◆"; color: var(--red); font-size: .6em; margin-right: 8px; vertical-align: .2em; }

/* Receipt printer */
.hero-visual { margin: 0; position: relative; justify-self: center; width: min(420px, 100%); }
.printer { position: relative; height: 34px; margin: 0 -14px; background: var(--ink); border-radius: 6px 6px 3px 3px; box-shadow: 0 10px 22px -10px rgba(22,20,15,.6); z-index: 3; }
.printer-slot { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 4px; background: #000; border-radius: 2px; box-shadow: inset 0 1px 2px rgba(255,255,255,.08); }
.printer-led { position: absolute; right: 16px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: #3d3a33; }
.printer.busy .printer-led { background: var(--red); box-shadow: 0 0 8px var(--red); animation: led .5s steps(2) infinite; }
@keyframes led { 50% { opacity: .35; } }
.receipt-wrap { position: relative; margin-top: -6px; }
.receipt { position: relative; z-index: 2; min-height: 40px; padding: 22px 22px 34px; background: var(--paper-3); color: #2b2822; font: 500 12px/1.65 var(--mono); box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 26px 50px -24px rgba(22,20,15,.5); transform-origin: top center; transform: rotate(-1.2deg);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%; }
.receipt::before { content: ""; position: absolute; inset: 0 0 auto; height: 18px; background: linear-gradient(rgba(22,20,15,.18), transparent); pointer-events: none; }
.rc { display: flex; justify-content: space-between; gap: 12px; white-space: pre; overflow: hidden; animation: feed .28s var(--ease) both; }
.rc.c { justify-content: center; }
.rc.dim { color: #8b8578; }
.rc.b { font-weight: 600; color: var(--ink); }
.rc.big { font: 600 15px/1.8 var(--mono); color: var(--ink); }
.rc.red { color: var(--red-ink); }
.rc.rule { color: #b9b2a2; letter-spacing: -.05em; }
.rc.title { font: 700 20px/1.4 var(--serif); letter-spacing: .14em; color: var(--ink); font-variation-settings: "opsz" 24; }
.rc.barcode { height: 40px; margin-top: 10px; gap: 0; justify-content: center; align-items: stretch; }
.rc.barcode i { display: block; background: var(--ink); margin-right: 2px; }
@keyframes feed { from { max-height: 0; opacity: 0; } to { max-height: 3em; opacity: 1; } }

.stamp { position: absolute; z-index: 4; left: -38px; bottom: 34px; display: grid; justify-items: center; padding: 10px 16px 9px; border: 3px solid var(--red); outline: 1.5px solid var(--red); outline-offset: 3px; color: var(--red); transform: rotate(-13deg) scale(2.4); opacity: 0; pointer-events: none; mix-blend-mode: multiply;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  -3.2 0 0 0 2.35'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  -3.2 0 0 0 2.35'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>"); }
.stamp.hit { animation: stamp .42s cubic-bezier(.3, 1.5, .5, 1) forwards; }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-20deg) scale(2.4); } 70% { opacity: .95; transform: rotate(-12deg) scale(.94); } 100% { opacity: .92; transform: rotate(-13deg) scale(1); } }
.receipt-wrap.shake { animation: shake .3s ease-out; }
@keyframes shake { 30% { transform: translate(1px, 3px); } 60% { transform: translate(-1px, -1px); } }
.stamp-top { font: 800 1.55rem/1 var(--serif); letter-spacing: .12em; }
.stamp-mid { font: 600 1.15rem/1.3 var(--mono); }
.stamp-bot { font: 600 .56rem var(--mono); letter-spacing: .16em; }
.hero-visual figcaption { margin-top: 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: .74rem var(--mono); color: var(--ink-3); }
.hero-visual figcaption code { font-size: 1em; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--red); }
.link-btn:hover { color: var(--red); }

/* ───────────── Readings ───────────── */
.readings { padding: 0 0 36px; border-bottom: 1px solid var(--rule-2); background: var(--paper); position: relative; }
.readings-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-left: 1px solid var(--rule); }
.reading { display: grid; gap: 4px; padding: 28px 22px 24px; border-right: 1px solid var(--rule); position: relative; }
.reading::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 10px; height: 6px; background: repeating-linear-gradient(90deg, var(--rule-2) 0 1px, transparent 1px 8px); mask-image: linear-gradient(90deg, #000, transparent); -webkit-mask-image: linear-gradient(90deg, #000, transparent); }
.r-label { font: 500 .7rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.r-num { font: 400 clamp(2.4rem, 4vw, 3.4rem)/1.05 var(--serif); font-feature-settings: "tnum" 1, "lnum" 1; letter-spacing: -.03em; font-variation-settings: "opsz" 144; display: flex; align-items: baseline; gap: 6px; }
.r-num small { font: 500 .8rem var(--mono); letter-spacing: 0; color: var(--red); }
.r-note { font-size: .84rem; color: var(--ink-2); }
.odo { display: inline-flex; font-variant-numeric: tabular-nums; }
.odo-d { display: inline-block; height: 1.05em; overflow: hidden; }
.odo-s { display: flex; flex-direction: column; transition: transform 2.2s cubic-bezier(.15, .7, .1, 1); }
.odo-s span { height: 1.05em; line-height: 1.05; }
.works-with { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 26px; font: 500 .98rem var(--serif); color: var(--ink-2); font-style: italic; }
.works-with i { color: var(--rule-2); font-style: normal; }
.ww-label { font: 500 .7rem var(--mono); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-right: 6px; }
.ww-gap { margin-left: 28px; }

/* ───────────── Sections ───────────── */
.sec { padding: 120px 0 40px; position: relative; }
.sec-head { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px 64px; align-items: end; padding-bottom: 30px; margin-bottom: 0; border-bottom: 1.5px solid var(--ink); }
.sec-head h2 { font: 400 clamp(2.1rem, 4.2vw, 3.6rem)/1.06 var(--serif); letter-spacing: -.01em; word-spacing: .03em; margin: 14px 0 0; font-variation-settings: "opsz" 144; }
.sec-head h2 em { color: var(--ink-2); }
.sec-head p { margin: 0; color: var(--ink-2); font-size: 1.04rem; }
.h-code { font-size: .78em; padding: 0 .2em; vertical-align: .06em; background: transparent; border: 1.5px solid var(--ink); border-radius: 0; }

/* Spec sheet (features) */
.spec { display: grid; grid-template-columns: repeat(6, 1fr); border-left: 1px solid var(--rule); }
.spec-cell { position: relative; padding: 32px 30px 34px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transition: background .35s; }
.spec-cell:hover { background: rgba(251, 249, 244, .65); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; }
.spec-n { font: 500 .74rem var(--mono); color: var(--red); letter-spacing: .1em; }
.spec-cell h3 { font: 500 1.75rem/1.15 var(--serif); letter-spacing: -.02em; margin: 10px 0 10px; font-variation-settings: "opsz" 60; }
.spec-cell p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.spec-cell .fig { margin-top: 26px; }
.spec-cell::before { content: ""; position: absolute; left: -1px; top: -1px; width: 0; height: 2px; background: var(--red); transition: width .5s var(--ease); }
.spec-cell:hover::before { width: calc(100% + 1px); }

.speed { display: grid; gap: 12px; }
.speed-row { display: grid; grid-template-columns: 118px 1fr 72px; gap: 14px; align-items: center; font: .78rem var(--mono); color: var(--ink-2); }
.speed-row b { text-align: right; font-weight: 600; color: var(--ink); }
.speed-track { height: 14px; border: 1px solid var(--ink); }
.speed-bar { height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--ink) 0 2px, transparent 2px 6px); transition: width 1.4s var(--ease) .3s; }
.speed-row:first-child .speed-bar, .speed-row:nth-child(2) .speed-bar { background: var(--ink); }
.speed-row.skip { color: var(--ink-3); }
.speed-row.skip .speed-track { border-style: dashed; border-color: var(--ink-3); }
.speed-row.skip .speed-bar { background: repeating-linear-gradient(-45deg, var(--rule-2) 0 1px, transparent 1px 6px); }
.speed-row.skip b { color: var(--red); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.in .speed-bar { width: var(--w); }

.ledger-tick { height: 156px; overflow: hidden; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent); }
.lt-track { animation: tick 20s linear infinite; }
.spec-cell:hover .lt-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateY(-50%); } }
.lt-track div { display: flex; gap: 10px; padding: 7px 0; font: .78rem var(--mono); border-bottom: 1px dotted var(--rule-2); }
.lt-track span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.lt-track b { font-weight: 600; white-space: nowrap; }

.compare { display: grid; gap: 10px; }
.cmp { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; font: .78rem var(--mono); color: var(--ink-2); }
.cmp b { color: var(--ink); font-weight: 600; }
.cmp-bar { height: 12px; width: 0; transition: width 1.2s var(--ease) .3s; }
.cmp-bar.pub { background: repeating-linear-gradient(-45deg, var(--ink-3) 0 1px, transparent 1px 5px); border: 1px solid var(--ink-3); }
.cmp-bar.you { background: var(--red); }
.in .cmp-bar.pub { width: 100%; } .in .cmp-bar.you { width: 80.3%; }
.cmp-note { margin: 4px 0 0 !important; font: .78rem var(--mono) !important; text-align: right; }
.cmp-note b { color: var(--green); }

.pipeline { list-style: none; padding: 0; display: grid; gap: 0; font: .78rem var(--mono); border-top: 1px solid var(--rule-2); }
.pipeline li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule-2); opacity: 0; transform: translateX(-8px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.pipeline li b { color: var(--red); }
.in .pipeline li { opacity: 1; transform: none; }
.in .pipeline li:nth-child(2) { transition-delay: .5s; } .in .pipeline li:nth-child(3) { transition-delay: 1s; }
.pl { width: 18px; height: 18px; display: grid; place-items: center; font-size: .72rem; font-weight: 700; border: 1px solid; }
.pl.ok { color: var(--green); } .pl.fail { color: var(--paper-3); background: var(--red); border-color: var(--red); }

.seg { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--ink); }
.seg button { position: relative; z-index: 1; background: none; border: 0; padding: 8px 0; font: 500 .8rem var(--mono); color: var(--ink-2); cursor: pointer; transition: color .25s; }
.seg button.on { color: var(--paper); }
.seg-glider { position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% / 3); background: var(--ink); transition: transform .45s var(--ease); }
.profile-out { margin-top: 14px; display: grid; gap: 6px; }
.profile-out div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 1px dotted var(--rule-2); padding-bottom: 4px; }
.profile-out small { font: .74rem var(--mono); color: var(--ink-3); }
.profile-out b { font: 600 1.1rem var(--mono); font-variant-numeric: tabular-nums; }
.profile-out div:last-child b { color: var(--green); }

.tree { font: .8rem/2 var(--mono); }
.tree div { display: flex; gap: 8px; align-items: center; white-space: nowrap; opacity: 0; transition: opacity .5s var(--ease); }
.in .tree div { opacity: 1; }
.in .tree div:nth-child(2) { transition-delay: .15s; } .in .tree div:nth-child(3) { transition-delay: .3s; } .in .tree div:nth-child(4) { transition-delay: .45s; } .in .tree div:nth-child(5) { transition-delay: .6s; }
.t-br { color: var(--ink-3); } .t-dir { font-weight: 600; }
.t-tag { font-size: .68rem; padding: 0 6px; line-height: 1.6; border: 1px solid var(--ink-3); color: var(--ink-2); }
.t-tag.red { border-color: var(--red); color: var(--red); }
.t-dots { flex: 1; border-bottom: 1px dotted var(--ink-3); transform: translateY(-4px); min-width: 20px; }
.t-cost { font-weight: 600; }

.code-mini { font: .8rem/1.75 var(--mono); padding: 14px 16px; background: var(--ink); color: #d8d2c4; overflow-x: auto; }
.code-mini .k, pre .k { color: #e9a07a; }
.code-mini .s, pre .s { color: #b9cf8f; }
.redact { position: relative; display: inline-block; }
.redact::after { content: ""; position: absolute; inset: 1px -3px; background: #000; transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease) 1s; }
.redact::before { content: "REDACTED"; position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; font: 600 .62rem var(--mono); letter-spacing: .2em; color: var(--red); opacity: 0; transition: opacity .3s 1.6s; }
.in .redact::after { transform: scaleX(1); }
.in .redact::before { opacity: 1; }

/* ───────────── Method / survey chain ───────────── */
.survey { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 58px; }
.chain { position: absolute; top: 26px; left: 0; right: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--ink-3) 0 10px, transparent 10px 16px); }
.chain-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--red); height: 2px; }
.chain-fill::after { content: ""; position: absolute; right: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(229, 72, 47, .2); }
.station { position: relative; padding: 0 28px 0 0; }
.bench { position: absolute; top: -53px; left: 0; width: 26px; height: 22px; background: var(--ink); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.bench::after { content: ""; position: absolute; inset: 0; background: var(--paper); clip-path: polygon(50% 22%, 86% 90%, 14% 90%); transition: background .3s; }
.station.hit .bench::after { background: var(--red); }
.st-n { font: 500 .72rem var(--mono); letter-spacing: .14em; color: var(--ink-3); transition: color .3s; }
.station.hit .st-n { color: var(--red); }
.station h3 { font: 500 2rem/1.1 var(--serif); letter-spacing: -.02em; margin: 6px 0 10px; font-variation-settings: "opsz" 72; }
.station p { color: var(--ink-2); font-size: .97rem; margin: 0 0 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font: .72rem var(--mono); padding: 2px 8px; border: 1px solid var(--rule-2); }

/* ───────────── Audit ledger ───────────── */
.audit { margin-top: 0; }
.audit-head, .audit-row { display: grid; grid-template-columns: 1.55fr 1.2fr .6fr .6fr .7fr; gap: 20px; align-items: center; }
.audit-head .num { font: inherit; }
.audit-head { padding: 14px 0; font: 500 .7rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--rule-2); }
.audit-row { padding: 18px 0; border-bottom: 1px solid var(--rule); transition: background .25s; }
.audit-row:hover { background: rgba(251, 249, 244, .7); }
.num { text-align: right; font: 500 .92rem var(--mono); font-variant-numeric: tabular-nums; }
.a-find { font: 500 1.08rem/1.35 var(--serif); font-variation-settings: "opsz" 24; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.a-res { font: .76rem/1.55 var(--mono); color: var(--ink-2); }
.a-res code { background: none; padding: 0; font-size: 1em; color: var(--ink-3); font-weight: 400; }
.a-save { color: var(--red); font-weight: 600; font-size: 1.05rem; }
.a-note { font: italic 400 .86rem/1.3 var(--serif); color: var(--ink-3); }
.audit-row.alt .a-find, .audit-row.alt .num { color: var(--ink-3); }
.sev { font: 600 .62rem var(--mono); letter-spacing: .1em; padding: 2px 6px; border: 1px solid; align-self: center; }
.sev.med { color: var(--amber); } .sev.low { color: var(--ink-2); } .sev.alt { color: var(--ink-3); border-style: dashed; }
.src { font: 500 .64rem var(--mono); letter-spacing: .06em; padding: 1px 6px; background: var(--ink); color: var(--paper); text-transform: lowercase; align-self: center; }
.src.g { background: #2f5d9e; } .src.r { background: #b8551d; }
/* red-pen strike-through */
.audit-row s { position: relative; text-decoration: none; color: var(--ink-3); }
.audit-row s::after { content: ""; position: absolute; left: -4px; right: -4px; top: 52%; height: 2px; background: var(--red); transform: scaleX(0) rotate(-6deg); transform-origin: left; transition: transform .45s var(--ease); }
.audit.in .audit-row s::after { transform: scaleX(1) rotate(-6deg); }
.audit.in .audit-row:nth-of-type(2) s::after { transition-delay: .5s; }
.audit.in .audit-row:nth-of-type(3) s::after { transition-delay: .8s; }
.audit.in .audit-row:nth-of-type(5) s::after { transition-delay: 1.1s; }
.audit.in .audit-row:nth-of-type(6) s::after { transition-delay: 1.4s; }
.audit-total { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding: 30px 0 0; }
.a-foot { margin: 0; max-width: 560px; color: var(--ink-2); font-size: .95rem; }
.a-sum { text-align: right; }
.a-sum > span { display: block; font: 500 .7rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.a-sum b { font: 400 clamp(2.6rem, 5vw, 4.2rem)/1.15 var(--serif); letter-spacing: -.03em; font-variant-numeric: tabular-nums; font-variation-settings: "opsz" 144; }
.a-sum small { font: 500 .9rem var(--mono); color: var(--ink-3); letter-spacing: 0; margin-left: 4px; }
.circled { position: relative; display: inline-block; padding: 0 .12em; }
.circled svg { position: absolute; left: -8%; top: -18%; width: 116%; height: 136%; overflow: visible; pointer-events: none; }
.circled path { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 800; stroke-dashoffset: 800; transition: stroke-dashoffset 1.2s var(--ease) 1.8s; }
.audit.in .circled path { stroke-dashoffset: 0; }

/* ───────────── Dark section (CI) ───────────── */
.sec-dark { background: var(--ink); color: var(--paper); margin-top: 120px; padding-bottom: 120px; }
.sec-dark .sec-head { border-color: var(--paper); }
.sec-dark .sec-head h2 em, .sec-dark .sec-head p { color: #b8b1a2; }
.sec-dark code { background: rgba(242, 237, 227, .1); }
.tabs { margin-top: 40px; }
.tab-list { display: flex; gap: 28px; border-bottom: 1px solid rgba(242, 237, 227, .2); margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.tab-list button { position: relative; background: none; border: 0; padding: 12px 0; font: 500 .8rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #9c968a; cursor: pointer; white-space: nowrap; transition: color .2s; }
.tab-list button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.tab-list button:hover { color: var(--paper); }
.tab-list button.on { color: var(--paper); }
.tab-list button.on::after { transform: scaleX(1); }
.tab-panel { display: none; }
.tab-panel.on { display: block; animation: panelIn .5s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } }

.pr { max-width: 900px; background: var(--paper-3); color: var(--ink); box-shadow: 10px 10px 0 var(--red); }
.pr-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--rule); font-size: .9rem; background: var(--paper-2); }
.pr-head img { border-radius: 50%; }
.pr-bot { font: .66rem var(--mono); padding: 0 6px; border: 1px solid var(--rule-2); color: var(--ink-2); }
.pr-time { color: var(--ink-3); }
.pr-body { padding: 22px 24px 24px; }
.pr-body h4 { font: 600 1.35rem var(--serif); margin: 0 0 6px; font-variation-settings: "opsz" 36; }
.pr-body p { margin: 0 0 18px; color: var(--ink-2); }
.up { color: var(--red-ink); }
.dim { color: var(--ink-3); }
.pr-table { border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.pr-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; padding: 9px 4px; font: .82rem var(--mono); border-top: 1px solid var(--rule); }
.pr-row span:not(:first-child) { text-align: right; }
.pr-th { border-top: 0; font: 500 .68rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.tab-panel.on .pr-row:not(.pr-th) { animation: rowIn .5s var(--ease) both; }
.tab-panel.on .pr-row:nth-child(3) { animation-delay: .08s; } .tab-panel.on .pr-row:nth-child(4) { animation-delay: .16s; } .tab-panel.on .pr-row:nth-child(5) { animation-delay: .24s; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } }
.pr-policy { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.pp { font: 500 .74rem var(--mono); padding: 4px 10px; border: 1px solid; }
.pp.ok { color: var(--green); }
.pp.fail { color: var(--paper-3); background: var(--red); border-color: var(--red); }
.pr-details { border: 1px dashed var(--rule-2); padding: 10px 14px; }
.pr-details summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.pr-details ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; font-size: .9rem; }
.pr-details li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pr-details li b { margin-left: auto; font: 600 .88rem var(--mono); color: var(--red-ink); }

.code-card { max-width: 900px; border: 1px solid rgba(242, 237, 227, .22); background: #0e0d0a; }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid rgba(242, 237, 227, .14); font: .74rem var(--mono); color: #9c968a; }
.code-card .copy { border-color: rgba(242, 237, 227, .4); color: #d8d2c4; }
.code-card .copy:hover { background: var(--paper); color: var(--ink); }
.code-card pre { padding: 18px 20px; font: .84rem/1.75 var(--mono); color: #d8d2c4; overflow-x: auto; }
pre .c { color: #7d776b; font-style: italic; }
pre .p { color: var(--red); user-select: none; }
pre .r { color: #f08a74; }
pre .a { color: #f2c46d; font-weight: 600; }

/* ───────────── Coverage ───────────── */
.ticker { margin-top: 0; background: var(--ink); color: var(--paper); overflow: hidden; border-block: 1px solid var(--ink); }
.ticker-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span { padding: 14px 26px; font: 500 .82rem var(--mono); letter-spacing: .12em; white-space: nowrap; border-right: 1px solid rgba(242, 237, 227, .16); }
.ticker b { color: #7fc79a; font-size: .7em; margin-left: 6px; vertical-align: .15em; }
@keyframes marquee { to { transform: translateX(-50%); } }
.index { list-style: none; padding: 0; margin: 40px 0 0; columns: 2; column-gap: 64px; counter-reset: ix; }
.index li { break-inside: avoid; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--rule); counter-increment: ix; }
.ix-t { font: 500 1.3rem var(--serif); font-variation-settings: "opsz" 36; letter-spacing: -.01em; }
.ix-t::before { content: counter(ix, upper-roman) "."; font: .72rem var(--mono); color: var(--red); margin-right: 10px; vertical-align: .2em; display: inline-block; min-width: 30px; }
.ix-d { border-bottom: 1.5px dotted var(--ink-3); transform: translateY(-7px); align-self: end; }
.ix-p { grid-column: 1 / -1; color: var(--ink-2); font-size: .9rem; padding-left: 40px; margin-top: 2px; }
.index li:hover .ix-t { color: var(--red); }

/* ───────────── Install ───────────── */
.install-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; margin-top: 40px; align-items: start; }
.install-grid .tabs { margin-top: 0; }
.folder .tab-list { gap: 4px; border-bottom: 1.5px solid var(--ink); margin-bottom: 0; }
.folder .tab-list button { padding: 9px 18px; color: var(--ink-2); border: 1.5px solid transparent; border-bottom: 0; }
.folder .tab-list button::after { display: none; }
.folder .tab-list button:hover { color: var(--ink); }
.folder .tab-list button.on { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.folder .code-card { max-width: none; border: 1.5px solid var(--ink); border-top: 0; }
.link-u { display: inline-block; margin-top: 14px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.link-u:hover { color: var(--red); }
.steps { list-style: none; padding: 0; margin: 0; border-top: 1.5px solid var(--ink); }
.steps li { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.step-n { flex: none; width: 48px; font: italic 400 2rem/1 var(--serif); color: var(--red); }
.steps b { display: block; font: 500 1.25rem var(--serif); margin-bottom: 6px; }
.steps code { display: inline-block; margin-bottom: 6px; background: var(--ink); color: var(--paper); padding: .2em .55em; }
.steps small { display: block; color: var(--ink-2); font-size: .88rem; }
.steps small code { background: rgba(22, 20, 15, .06); color: var(--ink); padding: .05em .3em; margin: 0; }

/* ───────────── CTA ───────────── */
.cta { position: relative; margin-top: 120px; padding: 120px 0 130px; background: var(--red); color: var(--paper-3); overflow: hidden; }
.cta-inner { position: relative; z-index: 1; }
.cta h2 { font: 400 clamp(2.8rem, 7.4vw, 6.6rem)/.98 var(--serif); letter-spacing: -.015em; word-spacing: .04em; margin: 18px 0 26px; max-width: 13ch; font-variation-settings: "opsz" 144; }
.cta p { font-size: 1.15rem; max-width: 560px; margin: 0 0 36px; color: rgba(251, 249, 244, .88); }

/* ───────────── Footer ───────────── */
.footer { padding: 64px 0 34px; border-top: 1.5px solid var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.1fr; gap: 40px; }
.footer-grid p { color: var(--ink-2); font-size: .92rem; margin: 12px 0 0; max-width: 360px; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; align-content: start; }
.footer-links a { color: var(--ink-2); font-size: .93rem; width: max-content; background: linear-gradient(var(--red), var(--red)) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease), color .2s; }
.footer-links a:hover { color: var(--ink); background-size: 100% 1.5px; }
.colophon p { font: italic 400 .95rem/1.5 var(--serif); }
.footer-legal { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: .72rem/1.6 var(--mono); color: var(--ink-3); }
.footer-legal p { margin: 0; max-width: 680px; }

/* ───────────── Responsive ───────────── */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .hero-visual { width: min(440px, 100%); }
  .readings-grid { grid-template-columns: repeat(3, 1fr); }
  .reading { border-bottom: 1px solid var(--rule); }
  .sec-head { grid-template-columns: 1fr; align-items: start; }
  .survey { grid-template-columns: 1fr 1fr; row-gap: 56px; }
  .chain { display: none; }
  .survey { padding-top: 0; }
  .bench { position: relative; top: 0; display: block; margin-bottom: 12px; }
  .install-grid { grid-template-columns: 1fr; }
  .audit-head { display: none; }
  .audit-row { grid-template-columns: 1fr auto auto auto; grid-template-areas: "find find find find" "res before after save"; row-gap: 8px; }
  .a-find { grid-area: find; } .a-res { grid-area: res; }
  .audit-row > :nth-child(3) { grid-area: before; } .audit-row > :nth-child(4) { grid-area: after; } .audit-row > :nth-child(5) { grid-area: save; }
}
@media (max-width: 860px) {
  .nav-links { position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; margin: 0; padding: 8px 28px 20px; background: var(--paper); border-bottom: 1.5px solid var(--ink); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: .8em 0; font-size: 1.05rem; border-bottom: 1px solid var(--rule); }
  .nav-links a::after { display: none; }
  .burger { display: block; }
  .nav-gh span { display: none; }
  .spec { grid-template-columns: 1fr 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
  .spec > :nth-child(1), .spec > :nth-child(2), .spec > :nth-child(6), .spec > :nth-child(7) { grid-column: span 2; }
  .index { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .coords { display: none; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 36px); }
  .topline { font-size: .7rem; gap: 8px; }
  .topline .tl-dim, .topline .tl-sep, .topline .tl-arrow { display: none; }
  .hero { padding: 48px 0 64px; }
  .readings-grid { grid-template-columns: 1fr 1fr; }
  .reading:last-child { grid-column: span 2; }
  .spec { grid-template-columns: 1fr; }
  .spec > * { grid-column: span 1 !important; }
  .spec-cell { padding: 26px 20px; }
  .survey { grid-template-columns: 1fr; }
  .speed-row { grid-template-columns: 100px 1fr 60px; gap: 10px; }
  .receipt { font-size: 10.5px; padding: 18px 16px 30px; }
  .stamp { left: -4px; transform: rotate(-13deg) scale(.85); }
  .stamp.hit { animation-name: stampSm; }
  @keyframes stampSm { 0% { opacity: 0; transform: rotate(-20deg) scale(2); } 70% { opacity: .95; transform: rotate(-12deg) scale(.8); } 100% { opacity: .92; transform: rotate(-13deg) scale(.85); } }
  .audit-row { grid-template-columns: 1fr 1fr 1fr; grid-template-areas: "find find find" "res res res" "before after save"; }
  .audit-total { grid-template-columns: 1fr; }
  .a-sum { text-align: left; }
  .pr { box-shadow: 6px 6px 0 var(--red); }
  .pr-row { grid-template-columns: 1.3fr 1fr 1fr .9fr; font-size: .68rem; }
  .pr-body { padding: 18px 16px; }
  .sec { padding-top: 88px; }
  .nav-cta .btn { display: none; }
  .ww-gap { margin-left: 0; width: 100%; margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
