/* Roadmarker, shared across the index and the three solution pages.
 *
 * The palette is the renderer's own: --paper is `--bg` from
 * visualization/src/theme.css, so a capture dropped on the page has no edge.
 * Nothing is introduced here that the instrument does not already use.
 *
 * The page commits to one light look rather than following the viewer's
 * theme. The captures are light and cannot be inverted, and a dark page
 * around a bone-white scene would put the seam back that matching the ground
 * removed. */

:root {
  --paper: #F0EDE8;
  --paper-2: #E7E3DC;
  --ink: #14150F;
  --ink-2: #45473C;
  --ink-3: #86887C;
  --rule: #D6D1C7;
  --point: #3D5AA8;
  --signal: #2FBF71;
  --cross: 1.25rem;
  --step: 0.9rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.sheet { margin: var(--cross); border: 1px solid var(--rule); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--point);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------- nav */

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  padding: 0.7rem var(--step);
  border-bottom: 1px solid var(--rule);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav a { color: var(--ink-3); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav .brand { color: var(--ink); font-weight: 600; margin-right: auto; }

/* -------------------------------------------------------------- masthead */

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: end;
  padding: 2.5rem var(--step) 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  margin: 0;
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(2.25rem, 8vw, 4.75rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.standfirst {
  margin: 1rem 0 0;
  max-width: 48ch;
  color: var(--ink-2);
}

.stamp {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: right;
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.stamp b { color: var(--ink); font-weight: 600; }

.dot {
  display: inline-block;
  width: 0.4rem; height: 0.4rem;
  border-radius: 50%;
  background: var(--signal);
  margin-right: 0.4rem;
}

/* --------------------------------------------------------------- section */

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem var(--step);
  border-bottom: 1px solid var(--rule);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.section-no { color: var(--ink-3); }

.prose { padding: 1.5rem var(--step); border-bottom: 1px solid var(--rule); }
.prose p { margin: 0 0 0.85rem; max-width: 68ch; color: var(--ink-2); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

.prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-family: Archivo, sans-serif;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
}
.prose h3:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- figure */

figure { margin: 0; border-bottom: 1px solid var(--rule); }
/* No rule under the image: its ground is the page's ground, so a hairline
   would draw a box around something with no edge. */
figure img { display: block; width: 100%; height: auto; }
figcaption {
  padding: 0.625rem var(--step);
  font-size: 0.625rem;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ rows */

.rows { border-bottom: 1px solid var(--rule); }

.row {
  display: grid;
  grid-template-columns: 3rem 12rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem var(--step);
  align-items: baseline;
}

.row + .row { border-top: 1px solid var(--rule); }
.row-no { font-size: 0.625rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.row-name { font-weight: 600; }
.row-body { color: var(--ink-2); }

.row-body code, .prose code {
  color: var(--ink);
  background: var(--paper-2);
  padding: 0.05rem 0.3rem;
  font-size: 0.75rem;
}

/* ----------------------------------------------------------------- specs */

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  border-bottom: 1px solid var(--rule);
}

.spec { padding: 1.25rem var(--step); border-left: 1px solid var(--rule); }
.spec:first-child { border-left: 0; }

.spec dt {
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.spec dd {
  margin: 0.35rem 0 0;
  font-family: Archivo, sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.spec dd small {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

/* ------------------------------------------------------------------- kit */

.kit { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); border-bottom: 1px solid var(--rule); }
.kit-item { padding: 1.25rem var(--step); border-left: 1px solid var(--rule); }
.kit-item:first-child { border-left: 0; }
.kit-item h4 {
  margin: 0 0 0.4rem;
  font-family: Archivo, sans-serif;
  font-size: 0.875rem;
}
.kit-item p { margin: 0; color: var(--ink-2); font-size: 0.75rem; }
.kit-tag {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  padding: 0.1rem 0.4rem;
}

/* ------------------------------------------------------------------ join */

.join { padding: 1.75rem var(--step); border-bottom: 1px solid var(--rule); }
.join h2 {
  margin: 0 0 0.5rem;
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: clamp(1.25rem, 4vw, 2rem);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.join p { margin: 0 0 1.1rem; max-width: 58ch; color: var(--ink-2); }

.join form { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 42rem; }

.join input[type="email"], .join textarea {
  flex: 1 1 16rem;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  font: inherit;
  padding: 0.6rem 0.7rem;
}

.join textarea { flex-basis: 100%; resize: vertical; min-height: 3.5rem; }
.join input::placeholder, .join textarea::placeholder { color: var(--ink-3); }

.join button {
  flex: none;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  transition: opacity 0.12s ease;
}

.join button:hover { opacity: 0.86; }
.join button[disabled] { opacity: 0.5; cursor: default; }

.join-note { margin: 0.9rem 0 0; font-size: 0.6875rem; color: var(--ink-3); }
.join-status { margin: 0.75rem 0 0; font-size: 0.75rem; min-height: 1.2rem; }
.join-status[data-state="ok"] { color: var(--ink); }
.join-status[data-state="err"] { color: #A63D2F; }

/* ----------------------------------------------------------------- cards */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); border-bottom: 1px solid var(--rule); }
.card { padding: 1.4rem var(--step); border-left: 1px solid var(--rule); text-decoration: none; color: inherit; display: block; }
.card:first-child { border-left: 0; }
.card:hover { background: var(--paper-2); }
.card h4 { margin: 0.35rem 0 0.4rem; font-family: Archivo, sans-serif; font-size: 1.0625rem; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--ink-2); font-size: 0.75rem; }
.card .go { display: block; margin-top: 0.7rem; font-size: 0.5625rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.card:hover .go { color: var(--ink); }

/* ---------------------------------------------------------------- footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem var(--step);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.foot a:hover { border-bottom-color: var(--ink); color: var(--ink); }

@media (max-width: 40rem) {
  .masthead { grid-template-columns: 1fr; align-items: start; }
  .stamp { text-align: left; }
  .row { grid-template-columns: 2.25rem 1fr; }
  .row-body { grid-column: 2; }
  .spec, .kit-item, .card { border-left: 0; border-top: 1px solid var(--rule); }
  .spec:first-child, .kit-item:first-child, .card:first-child { border-top: 0; }
}
