/* maran.dog — site styles. No external requests: fonts are self-hosted (IBM Plex, SIL OFL 1.1). */

@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Condensed"; src: url("fonts/ibm-plex-sans-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --paper: #F5F2EA;
  --panel: #ECE7DB;
  --ink: #1B1A17;
  --ink-2: #57534A;
  --rule: #D3CCBC;
  --rule-strong: #1B1A17;
  --accent: #D4470E;      /* marks and large type only (3.99:1 on paper) */
  --accent-ink: #A8380B;  /* small accent text (5.8:1 on paper) */
  --on-accent: #FFFFFF;
  --built: #2E6A3E;
  --wip: #8A5F00;

  --sans: "Plex Sans", "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cond: "Plex Condensed", "IBM Plex Sans Condensed", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --mono: "Plex Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "DejaVu Sans Mono", monospace;

  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --head-h: 3.75rem;
  --head-total: var(--head-h);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131311;
    --panel: #1C1B18;
    --ink: #EDE9E0;
    --ink-2: #A39E93;
    --rule: #34312B;
    --rule-strong: #EDE9E0;
    --accent: #FF7438;
    --accent-ink: #FF8A55;
    --on-accent: #131311;
    --built: #7CC48F;
    --wip: #E0B04A;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: light dark; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--cond); font-weight: 600; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--gutter); top: -5rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .8rem 1rem;
  font: 500 .875rem/1 var(--mono); text-decoration: none;
}
.skip:focus { top: .5rem; color: var(--paper); }

.label {
  font: 500 .75rem/1.35 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2);
}

/* ---------- Masthead ---------- */

.masthead { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--rule); }
.masthead__bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--head-h); }

.brand { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; text-decoration: none; }
.brand:hover { color: inherit; }
.brand__mark { width: 1.75rem; height: 1.75rem; flex: none; color: var(--accent); }
.brand__word { font: 600 1.375rem/1 var(--cond); letter-spacing: .09em; }

.nav ul { display: flex; gap: .1rem; list-style: none; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: .6rem;
  font: 500 .75rem/1 var(--mono); letter-spacing: .07em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-2);
}
.nav a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); border-radius: 2px;
  font: 500 .8125rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #FFFFFF; }
.btn--quiet { background: transparent; color: var(--ink); }
.btn--quiet:hover { background: transparent; color: var(--accent-ink); border-color: var(--accent-ink); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(19rem, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }

.eyebrow {
  font: 500 .8125rem/1.45 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 1.25rem;
}
.hero__title {
  font-size: clamp(5rem, 1rem + 15vw, 12.5rem); line-height: .82; letter-spacing: .005em;
  margin: 0 0 1.75rem -.045em;
}
.hero__lead { font-size: clamp(1.25rem, 1rem + .9vw, 1.625rem); line-height: 1.38; max-width: 33ch; margin-bottom: .9rem; }
.hero__lead strong { font-weight: 600; }
.hero__sub { color: var(--ink-2); max-width: 54ch; margin: 0; }

/* Status plate */
.plate { border: 1.5px solid var(--rule-strong); }
.plate__head {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .75rem 1rem; border-bottom: 1.5px solid var(--rule-strong);
}
.plate__head .label:first-child { color: var(--ink); display: inline-flex; align-items: center; gap: .5rem; }
.plate__head .label:first-child::before { content: ""; width: .55rem; height: .55rem; background: var(--accent); }
.plate dl > div { display: grid; grid-template-columns: 6.75rem minmax(0, 1fr); gap: 1rem; padding: .68rem 1rem; border-bottom: 1px solid var(--rule); }
.plate dl > div:last-child { border-bottom: 0; }
.plate dt { font: 500 .6875rem/1.7 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.plate dd { font-size: .96875rem; line-height: 1.45; }

/* Band strip */
.bands { margin-top: clamp(3rem, 6vw, 4.5rem); }
.bands__scroll { overflow-x: auto; padding-bottom: .25rem; }
.bands__chart { position: relative; min-width: 46rem; height: 8rem; list-style: none; }
.bands__base { position: absolute; left: 0; right: 0; top: 3.9rem; border-top: 1px solid var(--rule-strong); }

.band { position: absolute; top: 0; bottom: 0; left: var(--at); width: max(3px, var(--w)); }
.band__seg { position: absolute; left: 0; right: 0; top: 3.4rem; height: 1rem; background: var(--accent); }
.band__name {
  position: absolute; top: 1.5rem; left: 50%; transform: translateX(-50%);
  font: 500 .75rem/1.1rem var(--mono); white-space: nowrap;
}
.band::before { content: ""; position: absolute; left: 50%; top: 2.65rem; height: .75rem; border-left: 1px solid var(--ink-2); }
.band--hi .band__name { top: 0; }
.band--hi::before { top: 1.15rem; height: 2.25rem; }
.band--end .band__name { left: auto; right: -2px; transform: none; }

.tick { position: absolute; top: 4.4rem; left: var(--at); height: .45rem; border-left: 1px solid var(--ink-2); }
.tick span {
  position: absolute; top: .6rem; left: 0; transform: translateX(-50%);
  font: 400 .6875rem/1 var(--mono); color: var(--ink-2); white-space: nowrap;
}
.tick--first span { transform: none; }
.tick--last { left: auto; right: 0; }
.tick--last span { left: auto; right: 0; transform: none; }

.region {
  position: absolute; top: 6.55rem; left: var(--from); width: var(--span);
  text-align: center; font: 500 .75rem/1 var(--mono); letter-spacing: .1em; color: var(--ink);
}
.region::before { content: ""; position: absolute; left: .3rem; right: .3rem; top: -.5rem; border-top: 1.5px solid var(--rule); }

.caption { font-size: .9375rem; color: var(--ink-2); margin: 1rem 0 0; max-width: 70ch; }

/* ---------- Sections ---------- */

section[id] { scroll-margin-top: calc(var(--head-total) + .5rem); }

.sec { border-top: 1px solid var(--rule); padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.sec__grid { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); }
.sec__head { align-self: start; position: sticky; top: calc(var(--head-total) + 1.75rem); }
.sec__num { font: 500 .8125rem/1 var(--mono); letter-spacing: .07em; color: var(--accent-ink); margin-bottom: .85rem; }
.sec__head h2 { font-size: clamp(1.875rem, 1.3rem + 1.3vw, 2.5rem); }
.sec__body { min-width: 0; }

.lede { font-size: clamp(1.1875rem, 1rem + .5vw, 1.375rem); line-height: 1.45; max-width: 46ch; margin-bottom: 2.25rem; }

/* Traffic manifest */
.manifest { width: 100%; border-collapse: collapse; }
.manifest th {
  text-align: left; padding: 0 1rem .65rem 0; border-bottom: 1.5px solid var(--rule-strong);
  font: 500 .75rem/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2);
}
.manifest td { padding: .95rem 1rem .95rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.manifest td:first-child { width: 34%; font-weight: 600; }
.manifest td:last-child { padding-right: 0; }

.uses { margin-top: 2.75rem; }
.versions { margin-top: clamp(2.5rem, 5vw, 3.5rem); max-width: 40rem; }
.uses ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; margin-top: .9rem; }
.uses li { padding: .7rem 0 .75rem; border-top: 1px solid var(--rule); font-family: var(--cond); font-weight: 600; font-size: 1.1875rem; line-height: 1.25; }

/* Signal path diagram */
.fig { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.path {
  display: grid; align-items: stretch;
  grid-template-columns: minmax(0, 1fr) 5.75rem minmax(0, 1.05fr) 5.75rem minmax(0, 1.2fr) 5.75rem minmax(0, 1fr);
}
.node { border: 1.5px solid var(--rule-strong); padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .45rem; }
.node h3 { font-size: 1.375rem; }
.node p { margin: 0; font-size: .9375rem; line-height: 1.5; }
.node ul { list-style: none; display: grid; gap: .55rem; margin-top: .15rem; }
.node li { font-size: .9375rem; line-height: 1.45; padding-top: .55rem; border-top: 1px solid var(--rule); }
.node li:first-child { padding-top: 0; border-top: 0; }
.node li b { display: block; font-weight: 600; }
.node .label { font-size: .75rem; line-height: 1.35; }
.node--core { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.node--core .label { color: var(--paper); opacity: .78; }

.wire { position: relative; display: flex; align-items: center; justify-content: center; }
.wire::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid var(--rule-strong); }
.wire span {
  position: relative; background: var(--paper); padding: .2rem .3rem; text-align: center;
  font: 500 .6875rem/1.25 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2);
}

.note { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); margin-top: 2.25rem; }
.note p { margin: 0; max-width: 62ch; }

/* Spec rows (link, equipment) */
.spec > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.25rem; padding: .95rem 0; border-top: 1px solid var(--rule); }
.spec > div:last-child { border-bottom: 1px solid var(--rule); }
.spec dt { font: 500 .75rem/1.95 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.spec dd { max-width: 60ch; }
.spec--wide dt { font: 600 1.1875rem/1.35 var(--cond); letter-spacing: .01em; text-transform: none; color: var(--ink); }
.spec--wide > div { grid-template-columns: 10.5rem minmax(0, 1fr); }

/* Mode ladder */
.ladder { margin: 0 0 2.25rem; max-width: 40rem; }
.ladder__bars { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 5px; align-items: end; height: 6.5rem; border-bottom: 1.5px solid var(--rule-strong); }
.ladder__bars i { display: block; height: var(--h); background: var(--ink); }
.ladder__bars i:last-child { background: var(--accent); }
.ladder__ends { display: flex; justify-content: space-between; gap: 1rem; margin-top: .55rem; }
.ladder figcaption { margin-top: .75rem; font-size: .9375rem; color: var(--ink-2); }

/* Console index */
.index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.index > div { padding: .95rem 0 1rem; border-top: 1px solid var(--rule); }
.index dt { font: 600 1.25rem/1.2 var(--cond); letter-spacing: .02em; margin-bottom: .3rem; }
.index dd { color: var(--ink-2); font-size: .96875rem; line-height: 1.5; }
.more { margin: 1.75rem 0 0; padding-top: 1rem; border-top: 1.5px solid var(--rule-strong); color: var(--ink-2); }
.more strong { color: var(--ink); font-weight: 600; }

/* Rules */
.rules { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; border-bottom: 1px solid var(--rule); }
.rules li { padding: 1rem 0 1.2rem; border-top: 1px solid var(--rule); }
.rules h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: .01em; margin-bottom: .35rem; }
.rules p { margin: 0; max-width: 46ch; font-size: .96875rem; line-height: 1.55; }

.notice { margin-top: 2.5rem; border: 1.5px solid var(--rule-strong); padding: 1.25rem 1.5rem 1.4rem; max-width: 46rem; }
.notice .label { color: var(--accent-ink); display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.notice .label::before { content: ""; width: .55rem; height: .55rem; background: var(--accent); }
.notice h3 { font-size: 1.625rem; margin-bottom: .6rem; }
.notice p { margin: 0; max-width: 62ch; }

/* Status board */
.status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1.5px solid var(--rule-strong); }
.status__col { padding: 1.25rem 1.5rem 0 0; }
.status__col + .status__col { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.status h3 { display: flex; align-items: center; gap: .55rem; font-size: 1.375rem; }
.status h3::before { content: ""; flex: none; width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid currentColor; }
.status__col--built h3 { color: var(--built); }
.status__col--built h3::before { background: currentColor; }
.status__col--wip h3 { color: var(--wip); }
.status__col--wip h3::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.status__sub { margin: .35rem 0 .9rem; }
.status ul { list-style: none; }
.status li { padding: .6rem 0 .65rem; border-top: 1px solid var(--rule); font-size: .96875rem; line-height: 1.45; }

/* ---------- Footer ---------- */

.foot { border-top: 1.5px solid var(--rule-strong); padding-block: 2.5rem 3.5rem; color: var(--ink-2); font-size: .9375rem; }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 2rem; }
.foot .brand { color: var(--ink); margin-bottom: .4rem; }
.foot p { max-width: 60ch; }
.foot p:last-child { margin-bottom: 0; }

/* ---------- 404 ---------- */

.lost { min-height: calc(100vh - var(--head-h) - 1px); display: grid; align-content: center; padding-block: 4rem; }
.lost h1 { font-size: clamp(3.5rem, 2rem + 8vw, 7.5rem); line-height: .95; margin-bottom: 1.75rem; }
.lost p:not(.eyebrow) { font-size: 1.25rem; max-width: 40ch; }

/* ---------- Responsive ---------- */

@media (max-width: 64rem) {
  .path { grid-template-columns: minmax(0, 1fr); }
  .wire { justify-content: flex-start; min-height: 2.75rem; }
  .wire::before { left: 1.5rem; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1.5px solid var(--rule-strong); }
  .wire span { margin-left: 2.25rem; background: none; padding: 0; }
  .wire br { display: none; }
}

@media (max-width: 52rem) {
  :root { --head-total: 6.5rem; }
  .masthead__bar { flex-wrap: wrap; gap: 0; }
  .nav { width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); overflow-x: auto; border-top: 1px solid var(--rule); scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav ul { width: max-content; padding-inline: calc(var(--gutter) - .6rem); }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .sec__grid, .note { grid-template-columns: minmax(0, 1fr); }
  .sec__head { position: static; }
  .status { grid-template-columns: minmax(0, 1fr); }
  .status__col + .status__col { padding-left: 0; border-left: 0; margin-top: 1.5rem; }
  .foot__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 40rem) {
  .index, .uses ul { grid-template-columns: minmax(0, 1fr); }
  .spec > div, .spec--wide > div { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .manifest td:first-child { width: 40%; }
}

@media print {
  .masthead, .skip, .actions { display: none; }
  .sec__head { position: static; }
  .bands__scroll { overflow: visible; }
}
