/* =====================================================================
   Polarius · future-v1 — "The evidence instrument"
   Loaded after styles.css. Square, ruled, mono-annotated controls;
   the page reads as one continuous run of the system.
   ===================================================================== */
:root {
  --rail-x: calc(max(0px, (100vw - 1336px) / 2) + var(--pad));
  --tick: rgba(242, 244, 245, .55);
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- control system ---------------------------------------- */
/* .ctl = square, ruled control. Variants: primary (solid), ghost (hairline). */
.ctl {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  height: 44px;
  border: 1px solid rgba(242, 244, 245, .30);
  border-radius: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color .15s, background-color .15s, color .15s, box-shadow .15s;
}
.ctl > span:not(.sr) { display: flex; align-items: center; }
.ctl .ctl-lamp { width: 7px; padding: 0; margin-left: 14px; }
.ctl .ctl-lamp::before {
  content: ""; width: 7px; height: 7px; background: var(--aurora-1);
  box-shadow: 0 0 0 3px rgba(63, 224, 208, .16), 0 0 10px rgba(63, 224, 208, .7);
}
.ctl .ctl-label { padding: 0 16px 0 12px; }
.ctl .ctl-meta { padding: 0 14px; border-left: 1px solid currentColor; border-left-color: inherit; gap: 8px; font-size: 10.5px; opacity: .72; }
.ctl .ctl-meta i { font-style: normal; display: inline-block; transition: transform .2s; }
.ctl:hover .ctl-meta i { transform: translate(2px, -2px); }

/* corner ticks — the "instrument" detail */
.ctl::before, .ctl::after {
  content: ""; position: absolute; width: 6px; height: 6px; pointer-events: none;
  border: 0 solid var(--aurora-1); opacity: 0; transition: opacity .15s, inset .15s;
}
.ctl::before { top: -5px; left: -5px; border-width: 1px 0 0 1px; }
.ctl::after { bottom: -5px; right: -5px; border-width: 0 1px 1px 0; }
.ctl:hover::before, .ctl:hover::after, .ctl:focus-visible::before, .ctl:focus-visible::after { opacity: 1; }
.ctl:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

.ctl-ghost { height: 40px; }
.ctl-ghost:hover { border-color: var(--text); background: rgba(242, 244, 245, .04); }

.ctl-primary {
  height: 52px;
  background: #F2F4F5;
  border-color: #F2F4F5;
  color: var(--ink);
}
.ctl-primary .ctl-label { font-family: var(--sans); font-size: 16px; letter-spacing: -.005em; text-transform: none; padding: 0 22px 0 12px; }
.ctl-primary .ctl-meta { border-left-color: rgba(12, 13, 16, .2); opacity: .66; }
.ctl-primary .ctl-lamp::before { background: #0FB8A8; box-shadow: 0 0 0 3px rgba(15, 184, 168, .18); }
.ctl-primary:hover { background: #FFFFFF; border-color: #FFFFFF; box-shadow: 0 0 0 4px rgba(94, 234, 212, .10), 0 10px 40px -12px rgba(63, 224, 208, .45); }
.ctl-block { display: flex; width: 100%; }
.ctl-block .ctl-label { flex: 1; }

/* tag: bracketed mono label, no container */
.tag {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; vertical-align: 2px; margin-left: 6px;
}
.tag::before { content: "["; color: var(--faint); }
.tag::after { content: "]"; color: var(--faint); }

/* retire the old pill / glow buttons */
.btn-primary::before { display: none; }

/* ---------- nav ---------------------------------------------------- */
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--aurora-1); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav-links a:hover::after, .nav-links a.is-here::after { transform: scaleX(1); }
.nav-links a.is-here { color: var(--text); }

/* ---------- hero --------------------------------------------------- */
.hero-cta { gap: 22px; }
.caption b { padding: 0 .6em; }
.hero-glow { translate: calc(var(--mx, 0) * 16px) calc(var(--my, 0) * 10px); transition: translate .9s cubic-bezier(.2, .7, .2, 1); }
.grid-lamp {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .6s;
  background-image: linear-gradient(to right, rgba(94, 234, 212, .16) 1px, transparent 1px);
  background-size: calc((min(100vw, 1336px) - 96px) / 12) 100%;
  background-position: center;
  -webkit-mask-image: radial-gradient(280px circle at var(--lx, 50%) var(--ly, 50%), #000, transparent 70%);
  mask-image: radial-gradient(280px circle at var(--lx, 50%) var(--ly, 50%), #000, transparent 70%);
}
.hero.is-lit .grid-lamp { opacity: 1; }

.gate-ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.gate-hit {
  position: absolute; pointer-events: auto; background: transparent; border: 0; padding: 0; cursor: crosshair;
}
.gate-hit:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.gf .gf-gates rect { transition: stroke .2s, fill-opacity .2s; }
.gf .gf-gates rect.is-hot { stroke: #5EEAD4; stroke-opacity: 1; }
.gf .gt.is-hot { fill: #F2F4F5; }

.readout {
  position: absolute; z-index: 3; width: 352px; pointer-events: none;
  background: rgba(12, 13, 16, .88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--hairline-2);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted);
  opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s;
}
.readout.is-on { opacity: 1; transform: none; }
.readout::before, .readout::after { content: ""; position: absolute; width: 8px; height: 8px; border: 0 solid var(--accent); }
.readout::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.readout::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.readout .ro-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--hairline); color: var(--text); letter-spacing: .12em; text-transform: uppercase; }
.readout .ro-head b { font-weight: 500; color: var(--accent); }
.readout dl { padding: 6px 14px 8px; }
.readout dl div { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--hairline); }
.readout dl div:last-child { border-bottom: 0; }
.readout dt { color: var(--faint); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; padding-top: 1px; }
.readout dd { color: #DDE3E8; font-family: var(--sans); font-size: 13px; letter-spacing: 0; line-height: 1.4; }
.readout dd .n { font-family: var(--mono); font-size: 12px; color: var(--text); }
.readout dd .ok { color: var(--accent); }

.gate-hint {
  position: absolute; z-index: 2; right: var(--rail-x); bottom: 26px;
  display: flex; align-items: center; gap: 10px;
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint);
}
.hero.is-inspecting .gate-hint { opacity: 0; }
.gate-hint { transition: opacity .15s; }
.gate-hint i { width: 7px; height: 7px; border: 1px solid var(--accent); }
.gate-hint .hint-touch { display: none; }

/* ---------- the system: one continuous run ------------------------ */
.system { position: relative; }
.rail { position: absolute; top: 0; bottom: 0; left: var(--rail-x); width: 1px; background: var(--hairline); z-index: 1; pointer-events: none; }
.rail-fill { position: absolute; left: 0; top: 0; width: 1px; height: var(--fill, 0px); background: linear-gradient(var(--aurora-2), var(--aurora-1)); box-shadow: 0 0 8px rgba(63, 224, 208, .5); }

.station { position: relative; padding: 128px 0 40px; }
.station + .station { padding-top: 96px; }
.station-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 40px; }
.station-meta { position: relative; align-self: start; position: sticky; top: 110px; padding-left: 26px; display: flex; flex-direction: column; gap: 6px; color: var(--faint); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.station-meta::before { content: ""; position: absolute; left: -4px; top: 4px; width: 9px; height: 9px; background: var(--ink); border: 1px solid var(--faint); transition: background .3s, border-color .3s, box-shadow .3s; z-index: 2; }
.station.is-reached .station-meta::before { background: var(--aurora-1); border-color: var(--aurora-1); box-shadow: 0 0 10px rgba(63, 224, 208, .6); }
.st-num { color: var(--accent); }
.st-name { color: var(--text); }
.st-note { color: var(--faint); }
.key { list-style: none; margin-top: 26px; display: grid; gap: 10px; color: var(--muted); font-size: 10.5px; }
.key li { display: flex; align-items: center; gap: 10px; }
.key i { width: 9px; height: 9px; flex: none; }
.k-ai { border: 1px solid var(--faint); }
.k-team { background: var(--aurora-1); box-shadow: 0 0 8px rgba(63, 224, 208, .6); }

.station-body { border-top: 1px solid var(--hairline); padding-top: 34px; min-width: 0; }
.station-body h2 { max-width: 19ch; }

/* ledger rows (problem) */
.ledger { list-style: none; margin-top: 64px; border-top: 1px solid var(--hairline); }
.lrow { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1.25fr); gap: 0 32px; padding: 30px 0 32px; border-bottom: 1px solid var(--hairline); transition: background .2s; }
.lrow:hover { background: linear-gradient(90deg, rgba(242, 244, 245, .025), transparent); }
.l-id { color: var(--faint); font-size: 11px; padding-top: 7px; letter-spacing: .12em; }
.lrow:hover .l-id { color: var(--accent); }
.lrow h3 { font-weight: 300; font-size: 26px; line-height: 1.2; letter-spacing: -.015em; }
.lrow p { color: var(--muted); font-size: 16.5px; padding-top: 4px; }

/* the run (approach) */
.run { list-style: none; margin-top: 64px; border-top: 1px solid var(--hairline); }
.run-step { display: grid; grid-template-columns: 96px minmax(0, .9fr) minmax(0, 1.35fr); gap: 0 32px; padding: 26px 0; transition: opacity .5s; }
.run-step h3 { font-weight: 500; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 5px; transition: color .4s; }
.run-step p { color: var(--muted); font-size: 16.5px; }
.r-id { font-size: 11px; letter-spacing: .12em; color: var(--faint); padding-top: 6px; transition: color .4s; }
.run-step.is-on h3 { color: var(--text); }
.run-step.is-on .r-id { color: var(--accent); }
.run-step.is-final.is-on h3 { color: var(--accent); }
.run-gate { position: relative; display: flex; align-items: center; gap: 14px; height: 30px; padding-left: 128px; color: var(--faint); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.run-gate::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--hairline-2); }
.run-gate i { position: relative; width: 9px; height: 9px; border: 1px solid var(--faint); background: var(--ink); transition: all .4s; }
.run-gate span { position: relative; background: var(--ink); padding-right: 14px; transition: color .4s; }
.run-gate.is-on i { background: var(--aurora-1); border-color: var(--aurora-1); box-shadow: 0 0 10px rgba(63, 224, 208, .6); }
.run-gate.is-on span { color: var(--accent); }

/* spec sheet (platform) */
.spec-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.spec-head p { color: var(--muted); font-size: 18px; max-width: 48ch; }
.spec { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.schematic { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 64px 32px 40px 0; border-right: 1px solid var(--hairline); }
.sch-lbl { position: absolute; top: 18px; left: 0; color: var(--faint); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.sch-row { position: relative; display: grid; grid-template-columns: 1fr 32px 1.2fr 32px 1fr; align-items: center; padding: 28px 20px; border: 1px dashed rgba(94, 234, 212, .35); }
.sch-col { display: grid; gap: 10px; }
.node { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--hairline-2); background: var(--surface); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; text-align: center; color: var(--text); }
.node small { font-size: 9.5px; color: var(--faint); letter-spacing: .12em; }
.node-planned { border-style: dashed; background: transparent; color: var(--muted); }
.node-core { min-height: 64px; border-color: rgba(94, 234, 212, .5); box-shadow: inset 0 0 24px -10px rgba(63, 224, 208, .5), 0 0 30px -14px rgba(63, 224, 208, .6); }
.wire { height: 1px; background: rgba(242, 244, 245, .3); position: relative; }
.wire::after { content: ""; position: absolute; right: 0; top: -2px; width: 5px; height: 5px; background: rgba(242, 244, 245, .55); }
.spec-table div { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 20px 0 20px 32px; border-bottom: 1px solid var(--hairline); }
.spec-table div:last-child { border-bottom: 0; }
.spec-table dt { color: var(--faint); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding-top: 4px; }
.spec-table dd { font-size: 17px; line-height: 1.5; }

/* provenance (trust) */
.trust-grid { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.props { list-style: none; border-top: 1px solid var(--hairline); }
.props li { display: grid; grid-template-columns: 40px 1fr; padding: 24px 0; border-bottom: 1px solid var(--hairline); cursor: default; outline: none; transition: background .2s; }
.props li > .mono { color: var(--faint); font-size: 11px; padding-top: 12px; }
.props h3 { font-weight: 300; font-size: 34px; letter-spacing: -.025em; line-height: 1.1; }
.props h3 em { font-style: normal; color: var(--accent); }
.props p { margin-top: 8px; color: var(--muted); font-size: 16px; max-width: 40ch; }
.props li:hover, .props li:focus-visible { background: linear-gradient(90deg, rgba(94, 234, 212, .05), transparent 70%); }
.props li:focus-visible { box-shadow: inset 2px 0 0 var(--accent); }
.props li:hover > .mono, .props li:focus-visible > .mono { color: var(--accent); }

.record { position: relative; border: 1px solid var(--hairline-2); background: rgba(17, 21, 27, .6); }
.record::before, .record::after { content: ""; position: absolute; width: 10px; height: 10px; border: 0 solid var(--tick); }
.record::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.record::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.record figcaption { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--hairline); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.record dl { padding: 6px 20px 10px; }
.record dl div { display: grid; grid-template-columns: 100px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--hairline); transition: opacity .25s, box-shadow .25s; }
.record dl div:last-child { border-bottom: 0; }
.record dt { color: var(--faint); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; padding-top: 3px; }
.record dd { font-size: 15.5px; color: #DDE3E8; }
.record.has-focus dl div { opacity: .45; }
.record.has-focus dl div.is-hot { opacity: 1; box-shadow: inset 2px 0 0 var(--accent); padding-left: 12px; }

/* next step (final station) */
.station-final { padding-bottom: 180px; overflow: hidden; }
.final-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.final-body h2 { font-size: clamp(40px, 5vw, 72px); line-height: 1.02; letter-spacing: -.035em; max-width: 12ch; }
.slip { border-top: 1px solid var(--hairline-2); }
.slip-row { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--hairline); font-size: 17px; }
.slip-row .mono { color: var(--faint); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding-top: 4px; }
.slip .ctl { margin-top: 28px; }
.horizon {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 340px; object-fit: cover; object-position: 50% 78%;
  mix-blend-mode: screen; opacity: .5; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 70%); mask-image: linear-gradient(transparent, #000 70%);
}

/* footer */
.foot { border-top: 1px solid var(--hairline); padding: 0; }
.foot-grid { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 0; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.foot-grid > * { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 0 22px; border-left: 1px solid var(--hairline); }
.foot-grid > :first-child { padding-left: 0; border-left: 0; }
.foot-grid a:hover { color: var(--text); }
.foot-grid .dim { color: var(--faint); }
.foot-grid img { height: 22px; }

/* ---------- reduced motion: everything still ----------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero-glow { translate: none !important; transition: none; }
  .grid-lamp { display: none; }
  .ctl, .ctl .ctl-meta i, .readout, .run-step, .run-gate *, .station-meta::before { transition: none !important; }
}

/* ---------- responsive --------------------------------------------- */
@media (max-width: 1180px) {
  .station-grid { grid-template-columns: 170px minmax(0, 1fr); gap: 0 28px; }
  .spec { grid-template-columns: 1fr; }
  .schematic { border-right: 0; border-bottom: 1px solid var(--hairline); padding-right: 0; }
  .spec-table div { padding-left: 0; }
}
@media (max-width: 900px) {
  .station { padding: 72px 0 24px; }
  .station + .station { padding-top: 56px; }
  .station-grid { grid-template-columns: 1fr; }
  .station-meta { position: relative; top: auto; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 22px; padding-left: 20px; }
  .station-meta .key { width: 100%; margin-top: 10px; }
  .station-body { padding-left: 20px; padding-top: 26px; }
  .lrow, .run-step { grid-template-columns: 1fr; gap: 8px; }
  .lrow h3 { font-size: 22px; }
  .run-gate { padding-left: 0; }
  .spec-head, .trust-grid, .final-body { grid-template-columns: 1fr; gap: 28px; }
  .sch-row { grid-template-columns: 1fr; gap: 0; padding: 18px; }
  .sch-row .wire { width: 1px; height: 22px; margin: 6px auto; }
  .sch-row .wire::after { right: -2px; top: auto; bottom: 0; }
  .spec-table div { grid-template-columns: 1fr; gap: 6px; }
  .record dl div { grid-template-columns: 84px 1fr; }
  .props h3 { font-size: 28px; }
  .gate-hint { top: 376px; bottom: auto; left: 24px; right: auto; font-size: 10px; }
  .gate-hint .hint-desk { display: none; }
  .gate-hint .hint-touch { display: inline; }
  .readout { width: auto; left: 16px !important; right: 16px; }
  .foot-grid { grid-template-columns: 1fr 1fr; padding-top: 12px; padding-bottom: 20px; }
  .foot-grid > * { border-left: 0; padding: 0; min-height: 40px; }
  .foot-grid > :first-child, .foot-grid > :nth-child(2) { grid-column: 1 / -1; }
  .ctl-primary .ctl-label { padding-right: 16px; }
}
