/* Outerloop — Orbit Workshop, square revision (HS-03R-1 / HS-03R-4).
   Every colour is a #rrggbb custom property declared in :root and re-declared
   for the dark scheme. No raw hex lives outside a :root block (legContrast,
   UX-2). Type, space and radius scales are tokens too. System font stack only:
   no font file, no CDN, no external asset. */

:root {
  /* Colour tokens — light scheme. */
  --fg: #1a2b6d;
  --muted: #555b70;
  --accent: #175c88;
  --accent-strong: #124967;
  --on-accent: #fffcf5;
  --line: #d7cbb6;
  --line-strong: #77788d;
  --surface: #fff7e8;
  --surface-2: #f2e9d8;
  --surface-raised: #fffcf5;
  --code-bg: #f2e9d8;
  --action: #00b4d8;
  --action-hover: #25c3de;
  --on-action: #1a2b6d;
  --action-edge: #1a2b6d;
  --terminal: #141d38;
  --on-terminal: #fff7e8;
  --terminal-muted: #b9bed0;
  --terminal-edge: #8793ab;
  --focus: #175c88;
  --success: #236348;
  --price: #784300;
  --coral: #ff8a70;
  --yellow: #ffd45c;
  --warn-bg: #fff0ce;
  --warn-line: #95651d;
  --danger: #a82435;
  --danger-bg: #ffe8e2;
  --pending: #175c88;
  --pending-bg: #e5eff5;
  --success-bg: #e6f1e7;
  --price-bg: #fff0ce;
  --badge-rec-fg: #236348;
  --badge-rec-bg: #e6f1e7;
  --badge-cand-fg: #555b70;
  --badge-cand-bg: #f2e9d8;
  --badge-paid-fg: #784300;
  --badge-paid-bg: #fff0ce;
  --badge-neutral-fg: #555b70;
  --badge-neutral-bg: #f2e9d8;

  /* Scene palette subset (handle-reserve HR-5 reads these names; do not rename). */
  --sky: #cfe8ff;
  --rock: #b8b2a7;
  --water: #7fb3d5;
  --foam: #ffffff;
  --light: #fff4d6;
  --fog: #eef2f6;

  /* Type scale. */
  --text-xs: 0.875rem;
  --text-sm: 0.9rem;
  --text-base: 1rem;
  --text-lg: 1.1rem;
  --text-xl: 1.25rem;
  --text-2xl: 2rem;

  /* Spacing scale. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  /* One square geometry and one hard offset. Quiet reading rules stay thin. */
  --radius-sm: 0;
  --radius: 0;
  --radius-lg: 0;
  --radius-pill: 0;
  --stroke: 3px;
  --stroke-quiet: 1px;
  --shadow-offset: 5px;
  --shadow: var(--shadow-offset) var(--shadow-offset) 0 0 var(--fg);
  --control-height: 3.5rem;
  --field-height: 4rem;
  /* VE-19: a secondary target (link or disclosure) never drops below 44px. */
  --target-secondary: 2.75rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #f8efdd;
    --muted: #b9bed0;
    --accent: #83ddea;
    --accent-strong: #b1ecf3;
    --on-accent: #11182f;
    --line: #37415b;
    --line-strong: #8793ab;
    --surface: #11182f;
    --surface-2: #283149;
    --surface-raised: #1b2541;
    --code-bg: #283149;
    --action: #45cee3;
    --action-hover: #78dfed;
    --on-action: #11182f;
    --action-edge: #11182f;
    --terminal: #0c1224;
    --on-terminal: #f8efdd;
    --terminal-muted: #b9bed0;
    --terminal-edge: #8793ab;
    --focus: #83ddea;
    --success: #94dcb3;
    --price: #efca83;
    --coral: #ff9a82;
    --yellow: #efc761;
    --warn-bg: #342c1c;
    --warn-line: #d9b35d;
    --danger: #ffa294;
    --danger-bg: #402333;
    --pending: #83ddea;
    --pending-bg: #1c344b;
    --success-bg: #183c30;
    --price-bg: #342c1c;
    --badge-rec-fg: #94dcb3;
    --badge-rec-bg: #183c30;
    --badge-cand-fg: #b9bed0;
    --badge-cand-bg: #283149;
    --badge-paid-fg: #efca83;
    --badge-paid-bg: #342c1c;
    --badge-neutral-fg: #b9bed0;
    --badge-neutral-bg: #283149;

    /* Scene palette subset — dark scheme. */
    --sky: #0b1a2a;
    --rock: #3a3f45;
    --water: #1b3a52;
    --foam: #cfe0ee;
    --light: #5a4a1f;
    --fog: #10161d;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light dark;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--text-base);
  color: var(--fg);
  background: var(--surface);
  line-height: 1.55;
}

header.site,
main,
footer.site {
  max-width: 73rem;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

header.site {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: var(--stroke) solid var(--fg);
  flex-wrap: wrap;
}

header.site .brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--fg);
  text-decoration: none;
}

picture {
  display: block;
}

.brand picture {
  min-width: 0;
  max-width: 100%;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.brand img {
  width: 15.5rem;
  min-width: 0;
  max-width: 100%;
  /* Intrinsic SVG dimensions also keep older published lockups proportional. */
  aspect-ratio: auto;
}

nav.site {
  display: flex;
  gap: var(--space-5);
  margin-left: auto;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

nav.site a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

nav.site a[aria-current="page"] {
  color: var(--fg);
  font-weight: 600;
}

nav.site a:hover,
nav.site a:focus {
  text-decoration: underline;
}

/* Same action hierarchy in static and generated shells; no hover movement. */
nav.site a:is(.nav-claim, .button) {
  min-height: var(--control-height);
  max-width: 100%;
  padding: var(--space-3) var(--space-4);
  border: var(--stroke) solid var(--action-edge);
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--on-action);
  font-size: var(--text-base);
  font-weight: 800;
  box-shadow: var(--shadow);
}

nav.site a:is(.nav-claim, .button):hover {
  background: var(--action-hover);
  color: var(--on-action);
}

nav.site a:is(.nav-claim, .button)[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: var(--stroke);
}

main {
  min-width: 0;
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}

h1 {
  font-size: var(--text-2xl);
  line-height: 1.25;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-7);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-5);
}

p.lede {
  font-size: var(--text-lg);
}

p {
  max-width: 68ch;
}

p, li, td, dd, a, code {
  overflow-wrap: anywhere;
}

section, aside, form, figure, fieldset {
  min-width: 0;
}

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

a:hover {
  color: var(--accent-strong);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--code-bg);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

pre {
  max-width: 100%;
  min-width: 0;
  background: var(--code-bg);
  border: var(--stroke) solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  overflow-x: auto;
  font-size: var(--text-sm);
}

pre code {
  background: none;
  padding: 0;
  overflow-wrap: normal;
}

table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  width: 100%;
  margin: var(--space-2) 0;
}

/* Reading tables size labels to their text, not to a breakable character.
   Keep prose columns readable; narrow screens scroll inside the table. */
.reading-table :is(th, td):first-child {
  width: 1%;
  white-space: nowrap;
  overflow-wrap: normal;
}

.reading-table :is(th, td):not(:first-child) {
  min-width: 24ch;
  overflow-wrap: normal;
}

.reading-table .badge {
  max-width: none;
}

th,
td {
  text-align: left;
  padding: 0.8rem 1.5rem 0.8rem 0;
  border-bottom: var(--stroke-quiet) solid var(--line);
  vertical-align: top;
}

/* Code block with a copy control (the shell grammar for "run this"). */
.codeblock {
  position: relative;
}

.codeblock pre {
  margin: 0;
  padding-right: 5.5rem;
  min-height: calc(var(--control-height) + var(--space-4));
}

.codeblock .copy {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
}

/* Badge row + the four trust badges. Colour never carries the meaning alone:
   each badge also carries its word as text. */
.badge-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  position: relative;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius);
  border: var(--stroke) solid var(--line-strong);
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-fg);
  font-size: var(--text-xs);
  font-weight: 600;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.badge--recommended {
  isolation: isolate;
  border-color: var(--badge-rec-fg);
  background: var(--badge-rec-fg);
  color: var(--badge-rec-fg);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

/* Inset fill retains the heavy edge along the two chamfers. Only passive badges
   are clipped; action focus rings always remain outside their square borders. */
.badge--recommended::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--badge-rec-bg);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.badge--candidate {
  border-color: var(--line-strong);
  background: var(--badge-cand-bg);
  color: var(--badge-cand-fg);
}

/* A price is never a trust signal (R5): amber, square, a different token. */
.badge--paid {
  border-radius: var(--radius);
  clip-path: none;
  border-color: var(--badge-paid-fg);
  background: var(--badge-paid-bg);
  color: var(--badge-paid-fg);
}

/* Identity row: owner/name@version + the immutable checksum. */
.identity {
  margin: var(--space-3) 0;
}

.identity .id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.identity .checksum {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--text-xs);
  color: var(--muted);
  overflow-wrap: anywhere;
}

details > summary {
  width: fit-content;
  max-width: 100%;
  min-height: var(--control-height);
  padding: var(--space-2) 0;
  cursor: pointer;
}

details code {
  overflow-wrap: anywhere;
}

/* A namespace section on the profile and config pages. Each one carries its
   own empty state, so an empty section reads as a statement rather than a
   gap (UX-6/UX-7). */
.listing {
  margin: var(--space-4) 0;
}

.listing > h2 {
  margin-top: 0;
}

.listing .empty {
  color: var(--muted);
  margin: var(--space-2) 0;
}

/* MI-11: the profile's daily activity graph. Bars are real percentages, so no
   canvas and no client library: the external script only sets style.height. */
.graph-box {
  margin: var(--space-2) 0;
}

.graph {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 96px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
}

.graph-bar {
  flex: 1 1 0;
  min-width: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.graph-box .muted {
  margin: var(--space-1) 0 0;
  font-size: 0.875rem;
}

/* Fact table: one visual language for "this is exactly what you will run". */
.facts th {
  width: 12rem;
  color: var(--muted);
  font-weight: 600;
}

/* Facet bar (the /explore filter). */
.facets {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  flex-wrap: wrap;
  margin: var(--space-4) 0;
}

.facets fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.facets legend {
  font-size: var(--text-xs);
  color: var(--muted);
}

/* Row list (the /explore index), in the registries' grammar. */
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  padding: var(--space-3) 0;
  border-bottom: var(--stroke-quiet) solid var(--line);
}

.row .row-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.row .row-meta {
  color: var(--muted);
  font-size: var(--text-sm);
}

.notice {
  border: var(--stroke) solid var(--warn-line);
  background: var(--warn-bg);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
}

.strip {
  margin: var(--space-5) 0;
}

.strip p {
  margin: var(--space-1) 0;
}

.strip strong {
  display: inline-block;
  min-width: 7.5rem;
}

footer.site {
  padding-top: var(--space-5);
  padding-bottom: var(--space-6);
  border-top: var(--stroke) solid var(--fg);
  color: var(--muted);
  font-size: var(--text-sm);
}

:focus-visible {
  outline: var(--stroke) solid var(--focus);
  outline-offset: 4px;
  scroll-margin-block: var(--space-4);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  position: static;
  display: inline-block;
  margin: var(--space-2) var(--space-5);
}

form label {
  display: block;
  font-size: var(--text-xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
}

input,
select,
textarea {
  font: inherit;
  color: var(--fg);
  background: var(--surface-raised);
  padding: var(--space-3) var(--space-4);
  border: var(--stroke) solid var(--fg);
  border-radius: var(--radius);
  min-height: var(--field-height);
  min-width: 0;
  max-width: 100%;
  font-size: var(--text-xl);
  line-height: 1.5;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--accent);
}

input[aria-busy="true"],
select[aria-busy="true"],
textarea[aria-busy="true"] {
  border-color: var(--pending);
  border-style: dashed;
  background: var(--pending-bg);
  color: var(--pending);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
  border-style: double;
  background: var(--danger-bg);
  color: var(--danger);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  min-width: 0;
  max-width: 100%;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
  overflow-wrap: anywhere;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  border: var(--stroke) solid var(--action-edge);
  background: var(--action);
  color: var(--on-action);
  cursor: pointer;
  transition: background-color 100ms;
}

/* Native fieldset enabling and pending changes must swap text and fill together.
   A background-only transition can paint the new text on the previous fill. */
#reserve-submit {
  transition: none;
}

button:hover,
.button:hover {
  background: var(--action-hover);
  color: var(--on-action);
}

button:disabled {
  cursor: default;
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line-strong);
  box-shadow: none;
}

button[aria-busy="true"],
.button[aria-busy="true"] {
  border-color: var(--pending);
  border-style: dashed;
  background: var(--pending-bg);
  color: var(--pending);
  box-shadow: none;
  cursor: progress;
}

button[aria-pressed="true"],
.alts .alt[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--pending-bg);
  color: var(--pending);
  text-decoration: underline;
  text-decoration-thickness: var(--stroke);
}

.error {
  display: block;
  color: var(--danger);
  background: var(--danger-bg);
  border: var(--stroke) double var(--danger);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-3);
  font-size: var(--text-base);
  font-weight: 700;
}

/* MVP-1: the availability hint. Deliberately not `.error` — a probe result is
   information, not a failure, and colouring it as a failure would punish the reader
   for typing. `min-height` reserves the line so the page does not jump when the
   hint appears. */
.hint {
  display: block;
  min-height: 1.55em;
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--text-base);
}

.hint[data-tone],
.hint[aria-busy="true"] {
  padding: var(--space-3) var(--space-4);
  border: var(--stroke) solid var(--line-strong);
  font-weight: 700;
}

.hint[data-tone="available"] {
  color: var(--success);
  border-color: var(--success);
  border-left-width: calc(2 * var(--stroke));
  background: var(--success-bg);
}

.hint[data-tone="priced"] {
  color: var(--price);
  border-color: var(--price);
  border-style: double;
  background: var(--price-bg);
}

.hint[data-tone="unavailable"] {
  color: var(--danger);
  border-color: var(--danger);
  border-style: double;
  background: var(--danger-bg);
}

.hint[data-tone="pending"],
.hint[aria-busy="true"] {
  color: var(--pending);
  border-color: var(--pending);
  border-style: dashed;
  background: var(--pending-bg);
}

/* Narrow viewport (H-071): wrap the nav and keep form fields contained.
   Tables and code use the base scrolling rules. */
@media (max-width: 40rem) {
  header.site {
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
  }

  nav.site {
    flex-wrap: wrap;
  }

  form input {
    min-width: 0;
    width: 100%;
  }
}

/* MVP-5: the near-miss suggestions. Wrapped so they cannot push the submit button
   around as they appear and disappear between keystrokes. */
.alts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.alts .alt {
  min-height: var(--control-height);
  padding: 0.6rem 0.9rem;
  border: var(--stroke) solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--accent-strong);
  cursor: pointer;
  font: inherit;
  font-size: var(--text-base);
}

.alts .alt:hover {
  background: var(--code-bg);
}

/* Home: one frame, one action, static pixel artwork. */
.eyebrow {
  margin: 0 0 var(--space-4);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-page {
  padding-top: 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--space-7);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-copy h1 {
  margin: 0;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.08;
}

.hero-copy h1 span {
  display: block;
}

.hero-copy .lede {
  margin: var(--space-5) 0;
  max-width: 48ch;
}

.install-tray {
  padding: var(--space-4) var(--space-5);
  border: var(--stroke) solid var(--terminal-edge);
  border-radius: var(--radius-lg);
  background: var(--terminal);
  color: var(--on-terminal);
}

.install-tray h2 {
  margin: 0 0 var(--space-2);
  color: var(--terminal-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0;
}

.install-tray pre {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: var(--text-sm);
  line-height: 1.7;
  white-space: pre-wrap;
}

.install-tray code {
  font-size: inherit;
  overflow-wrap: anywhere;
  user-select: text;
}

.install-tray :focus-visible {
  outline-color: var(--terminal-edge);
}

/* MF-7: the facet pills. Colour never carries the selection alone: the pressed
   pill also carries aria-pressed and the is-active class. */
.facet-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
}

.facet-pill {
  min-height: var(--control-height);
  padding: var(--space-1) var(--space-3);
  border: var(--stroke) solid var(--terminal-edge);
  border-radius: var(--radius);
  background: var(--terminal);
  color: var(--on-terminal);
  font: inherit;
  font-size: var(--text-xs);
  cursor: pointer;
}

.facet-pill.is-active {
  background: var(--on-terminal);
  color: var(--terminal);
}

.facet-description,
.facet-empty {
  margin: var(--space-2) 0 0;
  color: var(--terminal-muted);
  font-size: var(--text-xs);
}

/* The recessed class-matrix link is secondary to Copy/browse, so it must not
   push them out of the first view at 360×800 (gate 1): drop the default <p>
   block margins and keep it on the tray's small type. */
.class-matrix-link {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
}

/* MI-5: the machine chip. Client-only (hidden and empty until a session
   profile arrives). Always visible when shown — never hover-only — and its
   controls meet the same target-size and focus rules as every other control. */
.machine-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  border: var(--stroke) solid var(--fg);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--fg);
  box-shadow: var(--shadow);
}

.machine-chip-text {
  margin: 0;
  font-weight: 700;
}

.machine-chip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.machine-chip button {
  min-height: var(--control-height);
  padding: var(--space-1) var(--space-3);
  border: var(--stroke) solid var(--fg);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--fg);
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
}

.badge--facet,
.badge--facet-secondary {
  border-color: var(--line-strong);
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-fg);
}

.badge--facet-secondary {
  border-style: dashed;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.primary-copy {
  min-height: var(--control-height);
  min-width: min(10.5rem, 100%);
  box-shadow: var(--shadow);
}

.browse-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  font-weight: 700;
}

.copy-status {
  min-height: 3.1em;
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.hero-art {
  margin: 0;
  padding: var(--space-4);
  border: var(--stroke) solid var(--fg);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.hero-art img {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
}

.hero-art figcaption {
  margin: var(--space-3) var(--space-4) 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
  margin: 3.5rem 0 0;
  padding: var(--space-6) 0;
  border-top: var(--stroke) solid var(--fg);
  border-bottom: var(--stroke-quiet) solid var(--line);
}

.trust-strip p {
  margin: 0;
  font-size: var(--text-sm);
}

.trust-strip strong {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-base);
}

.trust-strip code {
  white-space: nowrap;
}

.home-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-7);
  padding: 3.5rem 0;
  border-bottom: var(--stroke-quiet) solid var(--line);
}

.home-section h2 {
  margin: 0;
  font-size: 1.6rem;
}

.home-section > div > :first-child {
  margin-top: 0;
}

.home-section > div > :last-child {
  margin-bottom: 0;
}

.home-section h3 {
  margin-top: var(--space-6);
}

.home-section table {
  font-size: var(--text-sm);
}

.home-section ol {
  padding-left: var(--space-5);
}

/* LP-4a — generated landing structure (INTERIM). The visual design of the new
   home blocks belongs to the landing style ticket this wave; this block only
   gives the generated markup a sane zero-JS layout so `/` stays valid until
   that lands. Reconcile before LP-8. */
.home-steps,
.featured-band {
  padding: 3.5rem 0;
  border-bottom: var(--stroke-quiet) solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  margin: 0;
  padding-top: var(--space-3);
  border-top: var(--stroke) solid var(--fg);
}

.steps li::before {
  content: counter(step) ".";
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 800;
}

.term {
  margin: 0;
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--terminal);
  color: var(--on-terminal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--text-sm);
  line-height: 1.7;
}

.term .tl {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* LP-5 — terminal motion graphic. The server-rendered final frame is static;
   home-anim.js adds .term--live only while it plays (and leaves it on the
   held final frame). The cursor blink is the one permitted loop (hub-style
   gate 9) and exists only behind that class plus the reduced-motion guard
   below; nothing else on the page animates without a user action. */
.term {
  position: relative;
}

.term .cur {
  display: inline-block;
}

.term--live .cur {
  animation: cur-blink 1.1s step-end infinite;
}

@keyframes cur-blink {
  50% {
    opacity: 0;
  }
}

/* The fast-forward caption is JS-added during accelerated segments only. */
.term .ff-cap {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  padding: 0 var(--space-2);
  border: var(--stroke-quiet) solid var(--on-terminal);
  border-radius: var(--radius);
  background: var(--terminal);
  color: var(--on-terminal);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  .term--live .cur {
    animation: none;
  }
}

.tray-note {
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.home-closing {
  padding-top: 3.5rem;
  font-weight: 700;
}

@media (max-width: 40rem) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Claim: keep labels, field hints, API quotes, and reservation results distinct. */
.claim-page > h1 {
  margin: 0 0 var(--space-4);
  font-size: 3rem;
  font-weight: 800;
}

.claim-page > .lede {
  margin-bottom: var(--space-7);
}

.claim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
}

.reserve-card,
.claim-result {
  padding: var(--space-6);
  border: var(--stroke) solid var(--fg);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.reserve-card {
  box-shadow: var(--shadow);
}

/* The fieldset gates the no-JS form. The card supplies its visible frame. */
.reserve-card > fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
}

.reserve-card button[type="submit"] {
  min-height: var(--field-height);
  font-size: var(--text-xl);
}

.reserve-card > p {
  margin: 0 0 var(--space-6);
}

.reserve-card > p:last-child {
  margin-bottom: 0;
}

.reserve-card input {
  width: 100%;
}

.field-help {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--muted);
}

.claim-result {
  margin-top: var(--space-5);
}

#reserve-result {
  border-color: var(--success);
  border-left-width: calc(2 * var(--stroke));
  background: var(--success-bg);
  color: var(--success);
}

#purchase {
  border-color: var(--price);
  background: var(--price-bg);
  color: var(--price);
}

.claim-result h2 {
  margin-top: 0;
}

.purchase-line {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

#price {
  color: var(--price);
  font-weight: 700;
  font-size: var(--text-xl);
}

.claim-aside {
  padding-top: var(--space-4);
}

.claim-aside .orbit-mark {
  width: 96px;
  margin-bottom: var(--space-5);
}

.claim-aside h2 {
  margin-top: 0;
}

.claim-aside pre {
  padding: var(--space-4);
  white-space: pre-wrap;
}

.claim-aside pre code {
  overflow-wrap: anywhere;
}

@media (max-width: 60rem) {
  header.site {
    gap: var(--space-2) var(--space-5);
  }

  nav.site {
    gap: var(--space-4);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    max-width: 32rem;
    width: 100%;
  }

  .hero-copy h1 {
    max-width: 20ch;
  }

  .claim-layout {
    gap: var(--space-6);
  }
}

@media (max-width: 40rem) {
  header.site, main, footer.site {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  header.site {
    padding-top: var(--space-4);
    padding-bottom: var(--space-2);
  }

  nav.site {
    width: 100%;
    margin-left: 0;
    gap: var(--space-2) var(--space-4);
  }

  nav.site a {
    font-size: var(--text-xs);
  }

  main, .home-page {
    padding-top: var(--space-5);
  }

  .eyebrow {
    margin-bottom: var(--space-3);
  }

  .hero-copy h1, .claim-page > h1 {
    font-size: 2rem;
  }

  .hero-copy .lede {
    margin: var(--space-4) 0 var(--space-5);
    font-size: var(--text-base);
  }

  .install-tray {
    padding: var(--space-3) var(--space-4);
  }

  /* Gate 1: keep install + Copy + browse in the first 360×800 view. */
  .hero-actions {
    margin-top: var(--space-2);
  }

  .primary-copy {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .hero-grid {
    gap: var(--space-5);
  }

  .trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
    margin-top: var(--space-7);
  }

  .home-section, .claim-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
  }

  .home-section {
    padding: var(--space-7) 0;
  }

  .reserve-card, .claim-result {
    padding: var(--space-5);
  }

  .reserve-card button[type="submit"] {
    width: 100%;
  }

  .facts th {
    width: auto;
  }

  .codeblock pre {
    padding: var(--space-4);
  }

  .codeblock .copy {
    position: static;
    margin-top: var(--space-2);
  }
}

/* LP-2: the /setups card grid. One card per catalog entry, in the square
   grammar: a --surface-raised card with a 3px --fg stroke and the one 5px hard
   shadow (same grammar as .reserve-card). The copy control on each card is
   secondary, so it carries no shadow of its own. */
.setup-grid,
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr));
  gap: var(--space-6);
  margin: var(--space-5) 0;
}

.setup-card .card-headline {
  grid-area: headline;
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
}

.setup-card .card-blurb {
  grid-area: blurb;
  margin: 0;
  color: var(--muted);
}

.setup-card .card-more {
  grid-area: more;
  margin: 0;
  font-size: var(--text-sm);
}

.setup-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head badge"
    "facts facts"
    "tray tray"
    "details details";
  gap: var(--space-3) var(--space-4);
  align-items: start;
  padding: var(--space-5);
  border: var(--stroke) solid var(--fg);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

/* LP-6: a featured card is a .setup-card with the sidecar's headline and blurb
   between the badge row and the facts, and a details LINK in place of the
   disclosure (the disclosure stays on the grid card the link points to). The
   band lives outside #setup-grid, so the facet filter never counts or hides
   these cards.
   RT-17: this variant MUST follow the base `.setup-card` rule — both are
   single-class selectors, so the later one wins. Ordered before the base (as it
   was), the base `grid-template-areas` overrode this one and the featured-only
   `headline`/`blurb`/`more` areas collapsed, breaking the Home + /setups band. */
.setup-card--featured {
  grid-template-areas:
    "head badge"
    "headline headline"
    "blurb blurb"
    "facts facts"
    "tray tray"
    "more more";
}

.setup-card .card-id {
  grid-area: head;
  min-width: 0;
  margin: 0;
  font-size: var(--text-lg);
  overflow-wrap: anywhere;
}

.setup-card .card-id code {
  font-size: inherit;
}

.setup-card .card-version {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--text-sm);
}

.setup-card .card-badge {
  grid-area: badge;
  justify-self: end;
  margin: 0;
}

.setup-card .card-facts {
  grid-area: facts;
  margin: 0;
  font-size: var(--text-sm);
}

.setup-card .card-facts > div {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: var(--stroke-quiet) solid var(--line);
}

.setup-card .card-facts > div:last-child {
  border-bottom: 0;
}

.setup-card .card-facts dt {
  flex: none;
  width: 5.5rem;
  color: var(--muted);
  font-weight: 600;
}

.setup-card .card-facts dd {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

/* The mini dark tray: the start command scrolls inside its tray on narrow
   screens; the copy control sits beside it, quiet and unshadowed. */
.setup-card .card-tray {
  grid-area: tray;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  border: var(--stroke) solid var(--terminal-edge);
  border-radius: var(--radius);
  background: var(--terminal);
  color: var(--on-terminal);
}

.setup-card .card-tray code {
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--space-2) 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow-x: auto;
  overflow-wrap: normal;
}

.setup-card .card-copy {
  flex: none;
  min-height: var(--control-height);
  border-color: var(--terminal-edge);
  background: transparent;
  color: var(--on-terminal);
  box-shadow: none;
}

.setup-card .card-copy:hover {
  background: var(--terminal-edge);
  color: var(--terminal);
}

.setup-card .card-details {
  grid-area: details;
  min-width: 0;
}

.setup-card .card-details > summary {
  font-weight: 700;
}

.setup-card .card-details h4 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--text-base);
}

.setup-card .card-details table {
  font-size: var(--text-sm);
}

.setup-card .card-details td:first-child {
  color: var(--muted);
  font-weight: 600;
}

.setup-card .card-details code {
  overflow-wrap: anywhere;
}

@media (max-width: 40rem) {
  /* Single column, badge on its own grid row so it can never cover the title. */
  .setup-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "badge"
      "head"
      "facts"
      "tray"
      "details";
    padding: var(--space-4);
  }

  /* RT-17: this mobile base must NOT override the featured variant (both are
     single-class selectors). Re-declare the featured mobile template after it,
     keeping headline/blurb/more — otherwise a featured card collapses to the
     base areas at <=640px and its values wrap one character per line. */
  .setup-card--featured {
    grid-template-areas:
      "badge"
      "head"
      "headline"
      "blurb"
      "facts"
      "tray"
      "more";
  }

  .setup-card .card-badge {
    justify-self: start;
  }
}

/* PANEL-1 / VE-19: the stepped/chamfered evidence panel (HS-04 shared visual
   system, HS-03R-1 square geometry). The evidence shape is the same two-corner
   chamfer the recommended badge uses, so it reads as evidence, not as an
   action. It holds the Orbit Workshop contract in every state — dense records,
   sparse, and failure/unavailable: a 3px outline, the zero-blur 5px hard
   shadow, >=44px secondary targets, and a visible 3px focus ring set outside
   the outline. `clip-path` clips a `box-shadow`, so the one restrained shadow
   is drawn with `drop-shadow`, which follows the clipped silhouette and never
   competes with Home's install action. */
.evidence-panel {
  margin: var(--space-5) 0;
  border: var(--stroke) solid var(--fg);
  background: var(--surface-raised);
  padding: var(--space-4) var(--space-5);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  filter: drop-shadow(var(--shadow-offset) var(--shadow-offset) 0 var(--fg));
}

.evidence-panel > h2 {
  margin-top: 0;
}

.evidence-panel h3 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--text-base);
}

.evidence-panel h4 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-base);
}

/* Calm evidence, quiet rows: the heavy edge belongs to the panel, not to each
   record. Result state is carried in words as well as shape and colour. */
.operator-record {
  margin: var(--space-4) 0;
  padding: var(--space-3) 0;
  border-bottom: var(--stroke-quiet) solid var(--line);
}

.operator-record:last-of-type {
  border-bottom: 0;
}

.operator-record[data-result="fail"],
.operator-record[data-result="pending"] {
  border-left: var(--stroke) solid var(--line-strong);
  padding-left: var(--space-3);
}

.operator-record[data-result="fail"] {
  border-left-color: var(--danger);
}

.operator-record[data-result="pending"] {
  border-left-color: var(--pending);
}

.operator-result {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  border: var(--stroke) solid var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.operator-record[data-result="pass"] .operator-result {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}

.operator-record[data-result="fail"] .operator-result {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.operator-record[data-result="pending"] .operator-result {
  border-color: var(--pending);
  background: var(--pending-bg);
  color: var(--pending);
}

.operator-default {
  font-weight: 700;
}

.operator-pins {
  margin: var(--space-2) 0;
  padding-left: var(--space-5);
  font-size: var(--text-sm);
}

.operator-pins li {
  margin: var(--space-1) 0;
}

.operator-hardware,
.operator-test,
.operator-measured,
.operator-date,
.operator-boundary,
.community-runs,
.publisher-runs,
.evidence-snapshot {
  margin: var(--space-2) 0;
  font-size: var(--text-sm);
}

.operator-boundary,
.evidence-snapshot {
  color: var(--muted);
}

.evidence-panel .evidence-facts,
.evidence-panel .evidence-method {
  color: var(--muted);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.evidence-panel .warning {
  border-left: var(--stroke) solid var(--warn-line);
  background: var(--warn-bg);
  padding: var(--space-2) var(--space-3);
}

.evidence-panel table {
  font-size: var(--text-sm);
}

/* VE-19: a link or disclosure inside the evidence block is a secondary target
   (>=44px); a real primary control in the block keeps the 56-64px rule. */
.evidence-panel a,
.evidence-panel summary {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-secondary);
}

.evidence-panel button,
.evidence-panel .button {
  min-height: var(--control-height);
}

.evidence-panel :focus-visible {
  outline: var(--stroke) solid var(--focus);
  outline-offset: var(--space-1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
