/*
 * Nineholds - the public site's one stylesheet.
 *
 * Matches the launcher's register: steel neutrals, frost for eyebrows, links and hairlines, ember
 * for exactly one control per page. Dark first, light through prefers-color-scheme.
 *
 * What this file may not do, and why:
 *   - no imported stylesheet, no remote url(), no web font. The gateway serves this beside the
 *     client payload and red line 2 forbids a third-party font or script on the site. System
 *     stacks only.
 *   - no image but the three launcher assets under assets/ (lockup, icon, backdrop). The hero
 *     plate is CSS.
 *   - no colour outside the generated block below, which is EMITTED from openrp-shared/design/ and
 *     must not be hand-edited.
 *
 * ⚠ Until DR-072 the block below was hand-copied and this comment claimed every value came from the
 * launcher's primitives. Two of them did not: `--font-body` and `--font-mono` had been abbreviated
 * and had lost four fallback families between them. Nothing could see it, because a hand-copy has
 * no gate. It is generated now, and `openrp-tools/tests/siteRules.test.mjs` fails if it drifts.
 */

/* >>> nineholds:palette — GENERATED by openrp-tools/build-style.mjs from openrp-shared/design/*.json. DO NOT EDIT. <<< */
:root {
  color-scheme: dark;

  --canvas: #100E0B;
  --raised: #26211B;
  --console: #1A1612;
  --border: #3A342C;
  --border-strong: #524A40;
  --text: #F0E9DA;
  --text-2: #BCB4AA;
  --muted: #9F9587;

  --frost: #8FC4E8;
  --hairline: #3B8CC4;

  --ember: #E06A13;
  --ember-hover: #E88B3F;
  --on-ember: #100E0B;

  --brand-steel: #BCB4AA;
  --brand-frost: #8FC4E8;
  --brand-edge: #645B50;
  --brand-muted: #9F9587;

  /* The hero plate is theme-invariant: the lockup is silver and needs a dark ground in both. */
  --plate: #100E0B;
  --plate-glow: rgba(143, 196, 232, 0.18);
  --plate-edge: #3A342C;
  --plate-frost: #8FC4E8;

  --font-display: 'Bahnschrift SemiCondensed', 'Bahnschrift', 'Segoe UI Semibold', 'Arial Narrow', system-ui, sans-serif;
  --font-body: system-ui, 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', 'Cascadia Code', Consolas, 'Liberation Mono', Menlo, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --canvas: #EAE2D2;
    --raised: #FFFFFF;
    --console: #F0E9DA;
    --border: #D6CCB9;
    --border-strong: #BCB4AA;
    --text: #1A1612;
    --text-2: #524A40;
    --muted: #645B50;

    --frost: #215677;
    --hairline: #2B6E9E;

    --brand-steel: #524A40;
    --brand-frost: #2B6E9E;
    --brand-edge: #9F9587;
    --brand-muted: #645B50;
  }
}
/* >>> /nineholds:palette <<< */

/* ------------------------------------------------------------------ base */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--frost);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--text);
}

a:focus-visible,
.cta:focus-visible {
  outline: 2px solid var(--hairline);
  outline-offset: 3px;
}

p,
li {
  color: var(--text-2);
}

p {
  margin: 0 0 1rem;
}

strong {
  color: var(--text);
  font-weight: 600;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--text);
  background: var(--console);
  border: 1px solid var(--border);
  padding: 0.08em 0.4em;
  border-radius: 3px;
}

ol,
ul {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.5rem;
}

li:last-child {
  margin-bottom: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ------------------------------------------------------------ typography */

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.5rem;
  margin: 2.75rem 0 0.9rem;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.eyebrow {
  font-family: var(--font-display);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  font-size: 1rem;
  font-weight: 600;
  color: var(--frost);
  margin: 0 0 0.5rem;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-2);
}

.fine {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ------------------------------------------------------------------ frame */

.wrap {
  max-width: 54rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

main {
  padding: 2.5rem 0 4rem;
}

/*
 * A framed panel with a corner tick at top-left and bottom-right: the hairline register the mark's
 * chevron sets. The ticks are pseudo-elements so they cost no markup.
 */
.panel {
  position: relative;
  background: var(--raised);
  border: 1px solid var(--border);
  padding: 1.25rem 1.4rem;
  margin: 1.25rem 0;
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}

.panel::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--hairline);
  border-left: 2px solid var(--hairline);
}

.panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--hairline);
  border-bottom: 2px solid var(--hairline);
}

.panel > :last-child {
  margin-bottom: 0;
}

.panel h2 {
  margin-top: 0;
}

.notice {
  background: var(--console);
}

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

.site-nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin: 1.25rem 0 0;
  padding: 0.7rem 1rem;
  background: var(--raised);
  border: 1px solid var(--border);
}

.site-nav::before,
.site-nav::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}

.site-nav::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--hairline);
  border-left: 2px solid var(--hairline);
}

.site-nav::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--hairline);
  border-bottom: 2px solid var(--hairline);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand:hover {
  color: var(--frost);
}

.mark {
  display: block;
  width: 36px;
  height: 36px;
  flex: none;
}

.mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

/*
 * The mark carries ink ROLES, not colours. Each role resolves here, per theme. The chevron and the
 * inner hairline are open strokes with fill="none" in the file, and that must survive the role
 * rule, so it is restated after them.
 */
.mark [data-ink="steel"] {
  fill: var(--brand-steel);
}

.mark [data-ink="frost"] {
  fill: var(--brand-frost);
  stroke: var(--brand-frost);
}

.mark [data-ink="muted"] {
  fill: var(--brand-muted);
}

.mark [data-ink="edge"] {
  fill: var(--brand-edge);
  stroke: var(--brand-edge);
}

.mark [fill="none"] {
  fill: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li {
  margin: 0;
}

.site-nav ul a {
  font-family: var(--font-display);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}

.site-nav ul a:hover {
  color: var(--frost);
}

.site-nav ul a[aria-current="page"] {
  color: var(--frost);
  border-bottom-color: var(--hairline);
}

/* ------------------------------------------------------------------- hero */

/*
 * The plate is dark in both themes. The lockup is silver on transparency and would vanish on a
 * light canvas, so the band keeps its own ground and its own text colours.
 */
.hero {
  position: relative;
  margin: 1.25rem 0 0;
  padding: 2.5rem 1.5rem 2.25rem;
  background:
    radial-gradient(ellipse 60% 70% at 50% 40%, var(--plate-glow), transparent 70%),
    var(--plate);
  border: 1px solid var(--plate-edge);
  text-align: center;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}

.hero::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--hairline);
  border-left: 2px solid var(--hairline);
}

.hero::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--hairline);
  border-bottom: 2px solid var(--hairline);
}

.hero img {
  display: block;
  margin: 0 auto 1rem;
  width: auto;
  height: 260px;
  max-width: 100%;
}

.hero .eyebrow {
  color: var(--plate-frost);
  margin: 0;
}

/* ---------------------------------------------------------------- content */

.intro {
  padding-top: 2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.grid .panel {
  margin: 0;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}

.steps > li {
  counter-increment: step;
  margin: 0 0 1rem;
}

.steps > li > .panel {
  margin: 0;
  padding-left: 4.25rem;
}

.steps .num {
  position: absolute;
  left: 1.2rem;
  top: 1.15rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--frost);
}

.how {
  padding-left: 1.6rem;
}

.how li {
  padding-left: 0.3rem;
  margin-bottom: 0.7rem;
}

.how li::marker {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--frost);
}

dl.pairs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.25rem;
  margin: 0 0 1rem;
}

dl.pairs dt {
  color: var(--text);
  font-weight: 600;
}

dl.pairs dd {
  margin: 0;
  color: var(--text-2);
}

@media (max-width: 30rem) {
  dl.pairs {
    grid-template-columns: 1fr;
    gap: 0.15rem 0;
  }

  dl.pairs dd {
    margin-bottom: 0.6rem;
  }
}

.legal h2 {
  font-size: 1.3rem;
  margin-top: 2.25rem;
}

.legal .version {
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ---------------------------------------------------------------- actions */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin: 2rem 0 0;
}

.cta,
.quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.7rem 1.6rem;
  border: 1px solid transparent;
}

/*
 * Hot metal with near-black text. White on this orange fails WCAG AA; near-black passes. The one
 * hot thing on a cold page.
 */
.cta {
  background: var(--ember);
  color: var(--on-ember);
  border-color: var(--ember);
}

.cta:hover {
  background: var(--ember-hover);
  border-color: var(--ember-hover);
  color: var(--on-ember);
}

.quiet {
  color: var(--text);
  border-color: var(--border-strong);
}

.quiet:hover {
  color: var(--frost);
  border-color: var(--hairline);
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 3rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer p {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.site-footer li {
  margin: 0;
  color: var(--muted);
}

.site-footer a {
  color: var(--frost);
}

/* The same supplied valley sits behind the emblem on both surfaces. */
.hero { overflow: hidden; background: linear-gradient(var(--plate-glow), var(--plate)), url('/assets/backdrop.webp') center / cover; }
.hero::before { inset: -10%; width: auto; height: auto; border: 0; background: radial-gradient(ellipse at 30% 60%, var(--plate-frost), transparent 55%); opacity: 0.08; animation: fog-drift 90s ease-in-out infinite alternate; }
@keyframes fog-drift { from { transform: translateX(-4%); } to { transform: translateX(4%); } }
.download-form { display: grid; gap: 0.75rem; max-width: 28rem; }
.download-form label { font-weight: 600; }
main code { overflow-wrap: anywhere; }
.download-form input { width: 100%; padding: 0.75rem; background: var(--raised); color: var(--text); border: 1px solid var(--border-strong); border-radius: 0.25rem; font: inherit; }
.form-error { color: var(--text); border-left: 3px solid var(--ember); padding-left: 0.75rem; }
@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } }
