/* Quiet product page: one strong map, everything else calm and precise. */
:root {
  --bg: #f5f5f1;
  --surface: #fcfcfa;
  --ink: #121a17;
  --muted: #57605c;
  --line: #d9dbd3;
  --faint: #e6e7e0;
  --changed: #1d58d6;
  --changed-soft: rgba(29, 88, 214, .13);
  --broken: #bf4508;
  --broken-soft: rgba(191, 69, 8, .14);
  --ok: #23714f;
  --inv-bg: #121a17;
  --inv-ink: #f5f5f1;
  --font: 'Schibsted Grotesk', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --radius: 4px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1110; --surface: #131917; --ink: #e8ebe6; --muted: #9aa39e; --line: #29312d; --faint: #1b211f;
    --changed: #80a8ff; --changed-soft: rgba(128, 168, 255, .16); --broken: #ff9254; --broken-soft: rgba(255, 146, 84, .16); --ok: #6fd0a0;
    --inv-bg: #18201d; --inv-ink: #e8ebe6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1110; --surface: #131917; --ink: #e8ebe6; --muted: #9aa39e; --line: #29312d; --faint: #1b211f;
  --changed: #80a8ff; --changed-soft: rgba(128, 168, 255, .16); --broken: #ff9254; --broken-soft: rgba(255, 146, 84, .16); --ok: #6fd0a0;
  --inv-bg: #18201d; --inv-ink: #e8ebe6;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ol, ul, blockquote, pre { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--changed); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: var(--radius); }
.skip:focus { top: 12px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -.02em; text-decoration: none; }
.nav { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.theme { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.theme:hover { border-color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: var(--radius); background: var(--ink); color: var(--bg); border: 1px solid var(--ink); font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--changed); border-color: var(--changed); color: #fff; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: transparent; color: var(--changed); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { padding-block: 44px 40px; }
.hero-copy { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: 24px 56px; margin-bottom: 32px; }
.hero h1 { font-size: clamp(54px, 7.4vw, 112px); line-height: .92; letter-spacing: -.055em; font-weight: 700; margin-left: -.04em; }
.oneliner { margin-top: 18px; font-size: clamp(21px, 1.9vw, 27px); line-height: 1.3; letter-spacing: -.015em; font-weight: 500; max-width: 30ch; }
/* The two words carry the map's own line styles: solid for changed, dashed for broken. */
.u-changed, .u-broken { text-decoration-line: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; text-decoration-skip-ink: none; }
.u-changed { text-decoration-color: var(--changed); }
.u-broken { text-decoration-color: var(--broken); text-decoration-style: dashed; }
.hero-side { display: grid; gap: 20px; padding-bottom: 6px; }
.sub { font-size: 17px; color: var(--muted); max-width: 46ch; }

/* Map module (moves between the hero slot and the How it works slot) */
.slot { container-type: inline-size; }
#hero-slot { min-height: 600px; }
.mapmod { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 0 rgba(18, 26, 23, .03), 0 24px 48px -32px rgba(18, 26, 23, .22); }
.mm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.mapmod .mm-title h2 { font-size: 17px; line-height: 1.35; letter-spacing: -.01em; margin: 0; max-width: none; }
.mm-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.demo-tag { font: 400 12.5px var(--mono); color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.demo-tag span { font-weight: 500; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; }
.mm-count { position: absolute; z-index: 3; top: 12px; left: 14px; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; pointer-events: none; }
.mm-count span { font: 500 12.5px/1 var(--mono); padding: 7px 9px; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: color .3s, border-color .3s, background-color .3s; }
.mm-count span[hidden] { display: none; }
.mm-count .c-paths.on { color: var(--changed); border-color: var(--changed); background: color-mix(in srgb, var(--surface) 82%, var(--changed)); }
.mm-count .c-data.on { color: var(--broken); border-color: var(--broken); background: color-mix(in srgb, var(--surface) 82%, var(--broken)); }
[data-state="fixed"] .mm-count .c-paths, .mm-count .c-check { color: var(--ok); border-color: var(--ok); }
.mm-stage:has(.map2d) .mm-count { position: static; padding: 12px 14px 0; }
.mm-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-controls button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); background: transparent; border-radius: var(--radius); font-size: 14px; font-weight: 500; cursor: pointer; }
.mm-controls button:hover { border-color: var(--ink); }
.mm-controls button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mm-controls .replay { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.mm-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.mm-stage { position: relative; height: clamp(440px, 62vh, 600px); background: radial-gradient(circle at 1px 1px, var(--faint) 1px, transparent 1.4px) 0 0 / 22px 22px; border-right: 1px solid var(--line); overflow: hidden; }
.mm-stage:has(.map2d) { height: auto; }
.stage-note { position: absolute; inset: 50% 0 auto; text-align: center; font: 13px var(--mono); color: var(--muted); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.mm-side { display: flex; flex-direction: column; min-width: 0; }
.mm-side section { padding: 16px 18px; }
.mm-side section + section { border-top: 1px solid var(--line); }
.mm-side h3 { font-size: 15px; margin-bottom: 8px; }
.summary { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.findings { list-style: none; padding: 0; display: grid; gap: 10px; }
.findings li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 1.45; }
.findings b { font-weight: 600; display: block; }
.findings span { color: var(--muted); }
.sw { width: 10px; height: 10px; margin-top: 5px; border-radius: 2px; background: var(--ok); }
.sw.broken { background: var(--broken); }
.sw.changed { background: var(--changed); }
.sw.risk { background: transparent; border: 2px dotted var(--ink); }
.ev-title { font: 500 13px var(--mono); margin-bottom: 8px; overflow-wrap: anywhere; }
.ev { font: 12px/1.6 var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ev-note { margin-top: 8px; font-size: 13px; color: var(--muted); }
.ins-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ins-label { font-size: 15px; font-weight: 600; }
.ins-label span { font: 400 12.5px var(--mono); color: var(--muted); }
.ins-step { display: flex; gap: 4px; }
.ins-step button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; font: 500 14px var(--mono); cursor: pointer; }
.ins-step button:hover, .ins-select:hover { border-color: var(--ink); }
.ins-select { width: 100%; min-height: 36px; margin-bottom: 10px; padding: 0 8px; font: 500 13px var(--mono); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.mm-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.lg { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--muted); }
.lg-broken { border-top: 3px dashed var(--broken); }
.lg-changed { border-top: 3px solid var(--changed); }
.lg-fixed { border-top: 3px solid var(--ok); }
.noscript { padding: 16px 18px; font-size: 15px; }

@container (max-width: 980px) {
  .mm-body { grid-template-columns: minmax(0, 1fr); }
  .mm-stage { border-right: 0; border-bottom: 1px solid var(--line); }
  .mm-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mm-side section + section { border-top: 0; border-left: 1px solid var(--line); }
}
@container (max-width: 640px) {
  .mm-side { grid-template-columns: minmax(0, 1fr); }
  .mm-side section + section { border-left: 0; border-top: 1px solid var(--line); }
  .mm-stage { min-height: 0; }
  .mapmod .mm-title { display: grid; }
}

/* 3D stage pieces */
.stage3d { position: absolute; inset: 0; }
.stage3d canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.labels { position: absolute; inset: 0; pointer-events: none; }
.lbl { pointer-events: auto; font: 500 12px/1.15 var(--mono); padding: 4px 7px; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; transition: border-color .3s, color .3s, opacity .3s, box-shadow .3s; }
.lbl small { display: none; color: var(--muted); font-size: 10px; }
.lbl:hover small, .lbl:focus-visible small, .lbl.sel small { display: block; }
.lbl.quiet { width: 18px; height: 14px; padding: 0; border-radius: 3px; border: 0; background: transparent; }
.lbl.quiet > * { display: none; }
.lbl.quiet:hover, .lbl.quiet:focus-visible, .lbl.quiet.sel { width: auto; height: auto; padding: 3px 6px; border-radius: 3px; z-index: 5; }
.lbl.quiet:hover > span:first-child, .lbl.quiet:focus-visible > span:first-child, .lbl.quiet.sel > span:first-child { display: inline; }
.lbl.broken, .lbl.affected { border-color: var(--broken); color: var(--broken); opacity: 1; }
.lbl.broken { box-shadow: 0 0 0 3px var(--broken-soft); }
.lbl.changed { border-color: var(--changed); color: var(--changed); box-shadow: 0 0 0 3px var(--changed-soft); opacity: 1; }
.lbl.risk { border-style: dotted; border-width: 2px; opacity: 1; }
.lbl.closed, .lbl.fixed { border-color: var(--ok); color: var(--ok); opacity: 1; }
.lbl.sel { outline: 2px solid var(--ink); outline-offset: 2px; }
.lbl.dim { opacity: .35; }
.lbl .tag { display: block; font-size: 11px; margin-top: 2px; }
.lbl .tag[hidden] { display: none; }
.layer-name { font: 500 11px var(--mono); color: var(--muted); white-space: nowrap; pointer-events: none; transition: opacity .4s; }
.zoomed .layer-name { opacity: 0; }
.edge-lbl { font: 500 12px var(--mono); padding: 3px 6px; border-radius: 3px; background: var(--surface); white-space: nowrap; pointer-events: none; }
.edge-lbl.broken { color: var(--broken); border: 1px solid var(--broken); }
.edge-lbl.changed { color: var(--changed); border: 1px solid var(--changed); }
.edge-lbl.risk, .edge-lbl.blocked, .edge-lbl.closed, .edge-lbl.ok { color: var(--muted); border: 1px solid var(--line); }

/* 2D stage */
.map2d { overflow-x: auto; overscroll-behavior-x: contain; }
.map2d-inner { position: relative; width: 980px; height: 640px; margin: 12px; }
.map2d .edge-lbl { z-index: 2; }
.map2d svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.e2 { fill: none; stroke: var(--line); stroke-width: 1.5; transition: stroke .3s; }
.e2.host { stroke-dasharray: 2 4; }
.e2.flow { stroke: var(--muted); stroke-opacity: .55; }
.e2.broken { stroke: var(--broken); stroke-width: 3; stroke-dasharray: 7 6; stroke-opacity: 1; }
.e2.affected { stroke: var(--broken); stroke-width: 2.25; stroke-opacity: 1; }
.e2.changed { stroke: var(--changed); stroke-width: 3; }
.e2.risk { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 1 5; stroke-linecap: round; }
.e2.blocked, .e2.closed { stroke-dasharray: 3 5; }
.e2.pulse { stroke-dasharray: 2 10; animation: flow 1.2s linear infinite; stroke: var(--muted); stroke-opacity: .9; }
@keyframes flow { to { stroke-dashoffset: -12; } }
.n2 { position: absolute; transform: translate(-50%, -50%); width: 128px; padding: 5px 7px; text-align: left; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); cursor: pointer; font: 500 11px/1.2 var(--mono); transition: border-color .3s, box-shadow .3s; }
.n2 small { display: block; color: var(--muted); font-size: 10px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n2 .tag { display: block; font-size: 10px; margin-top: 2px; }
.n2.broken, .n2.affected { border-color: var(--broken); color: var(--broken); }
.n2.broken { box-shadow: 0 0 0 3px var(--broken-soft); }
.n2.changed { border-color: var(--changed); color: var(--changed); box-shadow: 0 0 0 3px var(--changed-soft); }
.n2.risk { border: 2px dotted var(--ink); }
.n2.closed, .n2.fixed { border-color: var(--ok); color: var(--ok); }
.n2.sel { outline: 2px solid var(--ink); outline-offset: 2px; }
.n2.actor { border-style: dashed; }
.row-name { position: absolute; left: 0; font: 500 11px var(--mono); color: var(--muted); }
.map2d.compact { overflow: hidden; }
.map2d.compact .n2 { width: 104px; padding: 5px 6px; font-size: 10.5px; }
.map2d.compact .n2 small { white-space: normal; }
.map2d.compact .edge-lbl { font-size: 11px; }

/* Sections */
.sec { padding-block: 112px; border-top: 1px solid var(--line); }
.sec h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.08; letter-spacing: -.028em; max-width: 24ch; margin-bottom: 16px; }
.lead { font-size: 19px; color: var(--muted); max-width: 62ch; margin-bottom: 48px; }
.sec-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 48px; align-items: start; margin-bottom: 48px; }
.sec-head h2 { margin-bottom: 0; }
.sec-head .lead { margin-bottom: 0; padding-top: 6px; }
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.lead-stack .lead + .lead { margin-top: 14px; padding-top: 0; }

.how-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; }
.steps { list-style: none; padding: 0; }
.step { min-height: 48vh; padding-block: 20px; border-top: 1px solid var(--line); opacity: .6; transition: opacity .3s; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 12px; align-content: start; }
.step.on { opacity: 1; }
.step-n { font: 500 13px var(--mono); color: var(--muted); padding-top: 6px; }
.step h3 { font-size: 24px; letter-spacing: -.015em; }
.step p { grid-column: 2; color: var(--muted); }
.how-pin { position: relative; }
#steps-slot { position: sticky; top: 80px; }
#steps-slot .mm-stage { height: clamp(340px, 48vh, 520px); }
#steps-slot .mm-side section { padding: 12px 16px; }
#steps-slot .findings { display: none; }
#steps-slot .ev { max-height: 96px; overflow: auto; }
#steps-slot .ev-note { display: none; }

.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 16px; }
thead th { border-top: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
tbody th { font-weight: 600; width: 34%; }

/* Vision schematic */
.boundary { margin: 0; padding-top: 8px; }
.b-zone { position: relative; border: 1.5px dashed var(--ink); border-radius: 10px; padding: 34px 22px 18px; }
.b-name { position: absolute; top: -12px; left: 18px; padding: 0 8px; background: var(--bg); font: 500 13px/22px var(--mono); }
.b-parts { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.b-parts li { display: grid; gap: 4px; align-content: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.b-parts b { font-weight: 600; font-size: 17px; }
.b-parts span { font-size: 14.5px; color: var(--muted); line-height: 1.4; }
.b-parts li:nth-child(2) { border-color: var(--ink); }
.b-flow { gap: 28px; }
.b-flow li { position: relative; }
.b-flow li + li::before { content: "\2192"; position: absolute; left: -21px; top: 50%; transform: translateY(-50%); font: 500 14px var(--mono); color: var(--muted); }

/* Results so far */
.res { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 40px 56px; align-items: start; }
.res-lead { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.res-caveat { font: 500 14px var(--mono); color: var(--ink); }
.res-study { border-top: 1px solid var(--ink); padding-top: 14px; }
.res-study .res-caveat { margin-bottom: 10px; }
.bio { font-size: 19px; max-width: 58ch; }
.frame { aspect-ratio: 16 / 9; background: var(--inv-bg); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.frame video { display: block; width: 100%; height: 100%; object-fit: contain; }
.term { margin-top: 16px; padding: 14px 16px; font-size: 13px; background: var(--surface); white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.notes { margin-top: 56px; }

.partner { background: var(--inv-bg); color: var(--inv-ink); padding-block: 112px; border-top: 1px solid var(--line); }
.partner-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: end; }
.partner h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -.035em; margin-bottom: 16px; }
.partner-act { display: grid; gap: 18px; }
.btn-inv { background: var(--inv-ink); color: var(--inv-bg); border-color: var(--inv-ink); }
.btn-inv:hover { background: var(--changed); border-color: var(--changed); color: #fff; }

.foot { padding-block: 28px 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot .email { font-family: var(--mono); }

/* Narrow */
@media (max-width: 960px) {
  .hero-copy, .how-grid, .sec-head, .partner-grid, .res { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 20ch; }
  #steps-slot { display: none; }
  .wide-only { display: none; }
  .how-grid { gap: 0; }
  .step { min-height: 0; opacity: 1; }
  .nav { display: none; }
  .top-actions { margin-left: auto; }
  #hero-slot { min-height: 0; }
}
@media (max-width: 640px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .hero { padding-block: 32px 24px; }
  .sec, .partner { padding-block: 72px; }
  .cases, .b-parts { grid-template-columns: minmax(0, 1fr); }
  .b-flow li + li::before { content: "\2193"; left: 50%; top: -24px; transform: translateX(-50%); }
  .hero .ctas .btn { flex: 1 1 100%; justify-content: center; }
  .sec-head { margin-bottom: 32px; }
  th, td { padding: 12px 12px; font-size: 15px; }
  .lead { margin-bottom: 28px; }
  .b-zone { padding: 30px 14px 14px; }
  .btn-small { display: none; }
  .mm-controls { width: 100%; }
  .mm-controls button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
