/* Driftworlds, direction A "Salvage OS" (Claude Design handoff, VCL#92). No radius, no shadows: structure is 1px rules. */
:root {
  --bg: #0B0A10; --panel: #1C1A33; --panel2: #13121D; --ink: #ECE6DD; --muted: #9A97A6; --line: #2A2740;
  --rust: #B5532E; --ochre: #D99A5B; --green: #7BE3A1; --copper: #4E9C8A; --steel: #5D6168; --amber: #F2A33A;
  --on-green: #0B0A10;
  --fh: "Big Shoulders Stencil Display", "Big Shoulders Stencil", "Big Shoulders Display", Impact, sans-serif;
  --fb: Barlow, system-ui, sans-serif;
  --fm: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --photo-ink: #ECE6DD; --photo-bg: rgba(11, 10, 16, .7);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #ECE6DD; --panel: #DED5C7; --panel2: #E4DCD0; --ink: #0B0A10; --muted: #55525F; --line: #C2B9AB;
  --rust: #9A4224; --ochre: #7E521E; --green: #1E7A4A; --copper: #2F6E61; --steel: #4A4E55; --amber: #8F5208;
  --on-green: #F4EFE7;
  color-scheme: light;
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--fb); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--green); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
::selection { background: var(--green); color: var(--bg); }
button { font: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 1320px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 48px); }
.grow { flex: 1; }
.t-muted { color: var(--muted); } .t-green { color: var(--green); } .t-amber { color: var(--amber); } .t-ochre { color: var(--ochre); }
.tnum { font-variant-numeric: tabular-nums; }
.lbl { font-family: var(--fm); font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.photo-label { position: absolute; top: 10px; left: 10px; font-family: var(--fm); font-size: 11px; letter-spacing: .12em; color: var(--photo-ink); background: var(--photo-bg); padding: 4px 8px; pointer-events: none; }
.grid-rule { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-rule > * { background: var(--bg); }
.dot { width: 8px; height: 8px; flex: none; background: var(--amber); }

/* type */
.wordmark { font-family: var(--fh); font-weight: 900; font-size: 28px; letter-spacing: .03em; line-height: 1; }
.wordmark span { color: var(--amber); }
.wordmark--lg { font-size: 40px; letter-spacing: 0; }
.kicker { font-family: var(--fm); font-size: 12px; letter-spacing: .14em; color: var(--green); }
.kicker-mono { font-family: var(--fm); font-size: 12px; letter-spacing: .14em; }
.h1, .h2, .h3 { margin: 0; font-family: var(--fh); font-weight: 900; text-transform: uppercase; text-wrap: balance; }
.h1 { font-size: clamp(76px, 11.5vw, 176px); line-height: .84; letter-spacing: .005em; }
.h1 > span { display: block; }
.h2 { font-size: clamp(44px, 6.4vw, 96px); line-height: .88; }
.h2--board { font-size: clamp(64px, 9vw, 140px); line-height: .84; }
.h3 { font-size: 44px; line-height: .9; }

/* buttons */
.btn { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 56px; padding: 0 20px; font-family: var(--fm); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; border: 1px solid; }
.btn--primary { min-width: 240px; background: var(--green); border-color: var(--green); color: var(--on-green); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--secondary:hover { border-color: var(--green); color: var(--green); }
.btn-sm { display: flex; align-items: center; height: 44px; padding: 0 16px; background: var(--green); color: var(--on-green); font-family: var(--fm); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-decoration: none; }
.btn-sm:hover { background: var(--ink); color: var(--bg); }
.btn-outline { min-height: 48px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: transparent; border: 1px solid var(--ink); color: var(--ink); font-family: var(--fm); font-size: 13px; font-weight: 700; letter-spacing: .08em; cursor: pointer; }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.icon-btn { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer; padding: 0; }
.icon-btn:hover { border-color: var(--green); color: var(--green); }
.i-moon, .i-x { display: none; }
[data-theme="light"] .i-sun { display: none; } [data-theme="light"] .i-moon { display: block; }
[aria-expanded="true"] .i-menu { display: none; } [aria-expanded="true"] .i-x { display: block; }

/* header */
.bar { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar__in { height: 64px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__os { font-family: var(--fm); font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.nav { display: flex; gap: 2px; }
.nav a { font-family: var(--fm); font-size: 12px; letter-spacing: .1em; color: var(--muted); text-decoration: none; padding: 0 12px; height: 44px; display: flex; align-items: center; }
.nav a:hover { color: var(--ink); }
.mob { display: none; }
.menu { display: flex; flex-direction: column; border-top: 1px solid var(--line); background: var(--bg); padding-block: 8px 16px; }
.menu a { font-family: var(--fm); font-size: 14px; letter-spacing: .1em; color: var(--ink); text-decoration: none; height: 52px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.menu a.menu__cta { margin-top: 16px; justify-content: space-between; height: 56px; padding: 0 18px; border: 0; background: var(--green); color: var(--on-green); font-weight: 700; letter-spacing: .08em; }
@media (max-width: 819.98px) {
  .nav, .desk { display: none; }
  .mob { display: flex; }
  .brand__os { display: none; }
}
@media (min-width: 820px) { .menu { display: none !important; } }

/* sections */
.sec { border-bottom: 1px solid var(--line); }
.sec > .wrap { padding-block: clamp(56px, 8vw, 112px); }
.sec--alt { background: var(--panel2); }
.sec-head { margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head--row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.sec-head__main { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.sec-head--stack { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
.sec-head__aside { margin: 0; font-size: 17px; line-height: 1.5; color: var(--muted); max-width: 40ch; }
.lede { margin: 0; font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 52ch; }

/* 1. hero */
.sec--hero > .wrap.hero { padding-block: clamp(28px, 5vw, 64px) clamp(40px, 6vw, 80px); }
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: clamp(28px, 4vw, 56px); align-items: stretch; }
.hero__copy { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.boot { font-family: var(--fm); font-size: 12px; line-height: 1.9; color: var(--muted); letter-spacing: .06em; }
.badge { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; border: 1px solid var(--line); padding: 0 14px; min-height: 40px; font-family: var(--fm); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.badge__label { font-weight: 700; color: var(--amber); }
.hero__sub { margin: 0; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.45; max-width: 30ch; text-wrap: pretty; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.cam { position: relative; min-height: clamp(380px, 48vw, 640px); border: 1px solid var(--line); background: var(--panel2); display: flex; flex-direction: column; min-width: 0; }
.cam__feed { position: relative; flex: 1; overflow: hidden; filter: contrast(1.05) saturate(.9); }
.cam__img { position: absolute; inset: -4% 0; }
.cam__img picture, .cam__img img { width: 100%; height: 100%; }
.cam__img img { object-fit: cover; object-position: 40% 60%; }
.scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(11, 10, 16, .22) 0 1px, transparent 1px 4px); }
.corner { position: absolute; width: 22px; height: 22px; pointer-events: none; border: 0 solid var(--green); }
.corner.tl { top: 14px; left: 14px; border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: 14px; right: 14px; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: 14px; left: 14px; border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: 14px; right: 14px; border-bottom-width: 2px; border-right-width: 2px; }
.cam__label { top: 18px; left: 46px; }
.readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.readout > div { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.readout > div + div { border-left: 1px solid var(--line); }
.readout .lbl { font-size: 10px; }
.readout .val { font-family: var(--fm); font-size: clamp(13px, 1.3vw, 16px); font-weight: 700; overflow-wrap: anywhere; }

/* 2. journey */
.systems { display: flex; flex-direction: column; gap: 10px; min-width: 220px; }
.systems__count { font-family: var(--fm); font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.systems__count b { color: var(--ink); }
.lights { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.lights i { height: 10px; background: var(--amber); transition: background .4s; }
.lights i.on { background: var(--green); }
.journey { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.step { display: flex; flex-direction: column; }
.step__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--line); }
.step__img picture, .step__img img { width: 100%; height: 100%; }
.step__img img { object-fit: cover; }
.step__img--empty { background: var(--panel2); display: flex; align-items: center; justify-content: center; }
.step__img--empty span { font-family: var(--fm); font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.step__body { padding: 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.step__body p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.step__meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--fm); font-size: 11px; letter-spacing: .12em; }
.state { display: flex; align-items: center; gap: 8px; color: var(--amber); transition: color .4s; }
.state i { width: 8px; height: 8px; background: currentColor; }
.step.is-on .state { color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.chips span { font-family: var(--fm); font-size: 11px; letter-spacing: .06em; border: 1px solid var(--line); padding: 5px 8px; }
.parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: auto; font-family: var(--fm); font-size: 11px; letter-spacing: .06em; }
.parts span { background: var(--bg); padding: 8px 10px; }

/* 3. planets */
.nav-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: clamp(24px, 4vw, 56px); align-items: start; }
.map { position: relative; width: 100%; max-width: 620px; aspect-ratio: 1; justify-self: center; }
.ring { position: absolute; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; transition: border-color .3s; }
.ring.is-sel { border: 2px solid var(--green); }
.map__sweep-host { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.map__sweep { position: absolute; left: 0; top: -1px; width: min(310px, 49vw); height: 2px; transform-origin: 0 50%; background: linear-gradient(90deg, var(--green), transparent); }
.pdot { position: absolute; width: 0; height: 0; pointer-events: none; }
.pdot b { position: absolute; border-radius: 50%; width: 8px; height: 8px; left: -4px; top: -4px; background: var(--steel); }
.pdot.is-home b { background: var(--rust); }
.pdot.is-sel b { width: 14px; height: 14px; left: -7px; top: -7px; background: var(--green); }
.pdot span { position: absolute; top: -9px; left: 14px; white-space: nowrap; font-family: var(--fm); font-size: 12px; letter-spacing: .06em; color: var(--ink); background: var(--panel2); padding: 1px 6px; }
.pdot.flip span { left: auto; right: 14px; }
.map__center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin-top: 22px; pointer-events: none; font-family: var(--fm); font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.nav-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.chapters { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.chapters button { min-height: 48px; border: 0; background: var(--bg); color: var(--ink); font-family: var(--fm); font-size: 12px; font-weight: 700; letter-spacing: .08em; cursor: pointer; text-align: left; padding: 0 12px; }
.chapters button[aria-pressed="true"] { background: var(--green); color: var(--on-green); }
.chapter { border: 1px solid var(--line); background: var(--bg); }
.chapter__head { padding: 24px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.chapter__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-family: var(--fm); font-size: 12px; letter-spacing: .12em; }
.chapter__name { font-family: var(--fh); font-weight: 900; font-size: clamp(48px, 6vw, 80px); line-height: .85; text-transform: uppercase; }
.planets { list-style: none; margin: 0; padding: 0; }
.planets li { display: flex; align-items: baseline; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.planets .idx { font-family: var(--fm); font-size: 12px; color: var(--muted); }
.planets .name { font-size: 20px; font-weight: 600; flex: 1; }
.planets .note { font-family: var(--fm); font-size: 11px; letter-spacing: .08em; color: var(--green); text-transform: uppercase; }
.chapter__img { position: relative; aspect-ratio: 16 / 7; overflow: hidden; }
.chapter__img picture, .chapter__img img { width: 100%; height: 100%; }
.chapter__img img { object-fit: cover; }

/* 4. ranks */
.ladder { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.rung-col { display: flex; flex-direction: column; }
.rung-col__head { padding: 14px 14px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.rung-col__head b { font-family: var(--fm); font-size: 12px; letter-spacing: .1em; }
.rung-col__head span { font-family: var(--fm); font-size: 11px; color: var(--muted); }
.rungs { display: flex; flex-direction: column-reverse; flex: 1; }
.rung { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; border: 0; border-top: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; transition: background .25s, color .25s; text-align: left; }
.rung:last-child { border-top: 0; }
.rung__roman { font-family: var(--fh); font-weight: 900; font-size: 34px; line-height: 1; }
.rung.is-on { background: color-mix(in oklab, var(--green) 14%, var(--bg)); color: var(--green); }
.rung[aria-pressed="true"] { background: var(--green); color: var(--on-green); box-shadow: inset 0 0 0 2px var(--green); }
.rank-readout { margin-top: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.rank-readout > .rr { background: var(--panel2); padding: 20px 24px; }
.rr--num { display: flex; align-items: baseline; gap: 16px; }
.rr--num .lbl { font-size: 12px; }
.rr__roman { font-family: var(--fh); font-weight: 900; font-size: 56px; line-height: .9; color: var(--green); }
.rr--needs { display: flex; flex-direction: column; justify-content: center; gap: 8px; font-family: var(--fm); font-size: 13px; letter-spacing: .04em; }
.rr--note { display: flex; align-items: center; font-size: 16px; line-height: 1.45; color: var(--muted); }

/* 5. updates */
.notes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.note { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.note__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--fm); font-size: 11px; letter-spacing: .12em; }
.note__tag { border: 1px solid var(--green); color: var(--green); padding: 3px 8px; text-transform: uppercase; }
.note .h3 { font-size: 36px; line-height: .92; }
.note__summary { margin: 0; font-size: 16px; line-height: 1.5; }
.note__groups { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.group { display: flex; flex-direction: column; gap: 6px; }
.group__name { font-family: var(--fm); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.group li { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.group li > i { font-family: var(--fm); font-style: normal; flex: none; }
.group strong { color: var(--ink); font-weight: 700; }
.group--New .group__name, .group--New li > i { color: var(--green); }
.group--Changed .group__name, .group--Changed li > i { color: var(--ochre); }
.group--Fixed .group__name, .group--Fixed li > i { color: var(--copper); }
.log-empty { border: 1px dashed var(--line); background: var(--bg); padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.log-empty__title { font-family: var(--fh); font-weight: 900; font-size: clamp(40px, 5vw, 64px); line-height: .9; text-transform: uppercase; }
.log-empty p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--muted); max-width: 46ch; }
.log-empty a { min-height: 48px; display: flex; align-items: center; font-family: var(--fm); font-size: 13px; font-weight: 700; letter-spacing: .08em; }

/* 6. board */
.board { border: 2px solid var(--green); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.board__copy { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 20px; justify-content: space-between; }
.board__copy p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 36ch; }
.board__side { display: flex; flex-direction: column; border-left: 1px solid var(--line); min-width: 0; }
.specs { margin: 0; display: flex; flex-direction: column; font-family: var(--fm); }
.specs > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--line); min-height: 64px; flex-wrap: wrap; }
.specs dt { font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.specs dd { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.specs dd > span { overflow-wrap: anywhere; }
.copy-btn { min-width: 44px; height: 44px; padding: 0 10px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line); color: var(--ink); font-family: var(--fm); font-size: 11px; cursor: pointer; }
.copy-btn:hover { border-color: var(--green); color: var(--green); }
.board__cta { flex: 1; min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(20px, 3vw, 32px); background: var(--green); color: var(--on-green); font-family: var(--fh); font-weight: 900; font-size: clamp(32px, 4vw, 48px); text-transform: uppercase; text-decoration: none; line-height: 1; }
.board__cta:hover { background: var(--ink); color: var(--bg); }
.board__cta svg { flex: none; }
@media (max-width: 940px) { .board__side { border-left: 0; border-top: 1px solid var(--line); } }

/* 7. footer */
.foot__in { padding-block: 40px 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; align-items: end; }
.foot__brand { display: flex; flex-direction: column; gap: 6px; }
.foot__brand .lbl { font-size: 12px; }
.foot__link { font-family: var(--fm); font-size: 13px; letter-spacing: .08em; min-height: 44px; display: flex; align-items: center; }
.foot__legal { font-family: var(--fm); font-size: 11px; letter-spacing: .06em; color: var(--muted); line-height: 1.6; }

@media (max-width: 420px) {
  .btn--primary, .btn--secondary { flex: 1 1 100%; min-width: 0; }
  .h3 { font-size: 40px; }
}

/* VCL#118 fog of war: uncharted rings */
.pdot.ring-tag span { left: 50%; transform: translateX(-50%); top: -22px; color: var(--amber); letter-spacing: .14em; }
.planets li.uncharted .name { color: var(--muted); font-style: italic; }
.planets li.uncharted .note { color: var(--amber); }
