/* ============================================================================
   Asteroid Works — field equipment at dusk, not a military console.
   Authority: design/ASTEROID_WORKS_DESIGN_LAW.md §3 (hex/type/px values are law).
   Scoped under .ast-screen (class kept for the capture harnesses). The old gunmetal
   --ao-* voice is deleted, not restyled: warm brown neutrals, soft-shadow depth,
   sentence case everywhere, Instrument Sans / Spline Sans Mono / Bricolage Grotesque.
   Visible chrome is law §6.1 (crest) + §6.2 (rig cluster) + §6.3 (the earned build palette,
   which has no DOM at all until a Core is owned) + §6.4 (the cursor lens) and nothing else.
   ============================================================================ */

.ast-screen {
  /* law §3.2 — chrome palette; the entire blue-gray family is banned on this screen */
  --aw-bg: #171310;
  --aw-surface: #221c15;
  --aw-raised: #2d251b;
  --aw-line: #3a3126;
  --aw-ink: #f2e8d5;
  --aw-ink-2: #bfae94;
  --aw-ink-3: #8a7a66;
  --aw-gold: #ffb648;
  --aw-mint: #7cd9a2;
  --aw-coral: #ff6242;
  --aw-sky: #5cc8f2;
  --aw-heat: #9a6f4a;
  --aw-font: "Instrument Sans", system-ui, "Segoe UI", sans-serif;
  --aw-mono: "Spline Sans Mono", ui-monospace, Consolas, monospace;
  --aw-name-font: "Bricolage Grotesque", var(--aw-font);

  /* ORRERY Surface 1 — the instrument light. Bone at rest, one amber verb, red only
     for threat. Deckplate tokens where the route provides them, literals where not. */
  --orr-bone: #ece6d8;
  --orr-bone-hot: #fffdf6;
  --orr-bone-dim: #b7b4a6;
  --orr-phos: #dfeeff;
  --orr-hand: var(--dp-hand, #f2b950);
  --orr-hand-hot: var(--dp-hand-hot, #ffd98c);
  --orr-hand-ink: #1a1206;
  --orr-glass: var(--dp-glass, rgb(8 11 16 / .62));
  --orr-danger: var(--dp-danger, #ff5038);

  display: flex;
  flex-direction: column;
  /* Fill the screen shell. The shell is 100vw until an ultrawide, where the grammar safe-frame
     (content must stay ≤ 98% of 2560) clamps it. 100vw here would force that shell back open. */
  width: 100%;
  height: 100%;
  margin: 0;
  box-sizing: border-box;
  pointer-events: auto;
  background: var(--aw-bg);
  color: var(--aw-ink-2);
  font-family: var(--aw-font);
  font-size: 13px;
  overflow: hidden;
  text-transform: none;
}

/* The measured grammar root is the screen shell, not this wrap. Full-bleed at 1280 and 1920.
   At 2560 a hard 2508px cap is 97.97% of the viewport — under the 98% stretch line — and still
   leaves the board above the 88% glass floor. #screens centers the shell, so the spare is a
   margin, not a stretched console. */
#screens > .screen[data-screen="drill"] {
  width: 100vw;
  height: 100vh;
  max-width: 2508px;
  box-sizing: border-box;
}
/* The shell's 150ms fade is a CSS transition from opacity 0. Headless Chromium freezes that
   transition, so the open mine stays invisible to the grammar probe (and to the player, in that
   browser) even after the class says it has arrived. This screen already fades in on the dock
   veil. Skip the second fade so the board is actually there when the approach finishes. */
#screens > .screen[data-screen="drill"]:not(.sf-screen--exiting) {
  opacity: 1;
  transition: none;
}

.ast-screen *, .ast-screen *::before, .ast-screen *::after {
  box-sizing: border-box;
  /* law §3.3: zero uppercase transforms on this screen — ui.css ships global tracked-caps rules
     that would otherwise compute through the inheritance chain */
  text-transform: none;
}

.ast-screen button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.ast-screen button:focus-visible { outline: 2px solid var(--k-bone, #eae6df); outline-offset: 2px; border-radius: 8px; }
.ast-screen button:disabled { cursor: default; opacity: 0.45; }

/* ============================================================================
   FIELD HARDWARE (design/frontend/direction/FIELD_HARDWARE_PROGRAM.md).
   The chrome on this screen was drawn by hand: soft rounded rectangles, flat
   --aw-raised fills and a generic drop shadow standing in for machined metal.
   Everything below now wears the PRODUCED kit instead — the nine-slice plates,
   keys, gauge bezels and lights under assets/ui/kit/assets/, which are modelled
   and rendered, not CSS-approximated. The kit's own plate colours (#1A1714 /
   #26211B) are the same warm brown family law §3.2 asks for, so the screen's
   voice is unchanged; only the manufacture is real now.

   TYPE STAYS SENTENCE CASE. Field Hardware normally speaks in tracked stencil
   caps, but law §3.3 bans every uppercase transform on this screen and
   scripts/check-asteroid-theater.mjs enforces it on every visible element. The
   Field Hardware voice therefore arrives here as QUIET TYPE — display tracking
   (--fh-track-display, 0.02em — the law's cap, so legend tracking stays out), the
   kit's own size ramp, tabular numerals and the legend amber for lit state — and
   never as tracked caps.

   Slices are often rendered NARROWER than the sprite's authored slice (e.g.
   `border-image-slice: 16 fill` drawn at `border-width: 8px`). That is deliberate:
   it keeps HUD furniture inside the geometry the theater check pins (a 20px lens
   chip, a 40px crest) while still drawing the real machined corner.
   ============================================================================ */

/* ---------------------------------------------------------------- §6.1 crest */
.aw-crest {
  position: relative;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 0 18px;
  /* ORRERY Surface 1 (F4): a real glass crest — deep tint, a bone rule the band is
     measured against (≥2:1 on the glass), corner ticks instead of an edge. */
  background-color: rgb(8 11 16 / .82);
  background-image: linear-gradient(180deg, transparent calc(100% - 2px), rgb(236 230 216 / .42) 0);
  background-repeat: no-repeat;
  background-position: bottom left;
  background-size: 100% 100%;
}
.aw-crest::before,
.aw-crest::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 16px;
  height: 12px;
  pointer-events: none;
}
.aw-crest::before {
  left: 0;
  background-image:
    linear-gradient(180deg, rgb(236 230 216 / .8) 0 2px, transparent 2px),
    linear-gradient(90deg, rgb(236 230 216 / .8) 0 2px, transparent 2px);
  background-size: 16px 2px, 2px 12px;
  background-position: left bottom, left bottom;
  background-repeat: no-repeat;
}
.aw-crest::after {
  right: 0;
  background-image:
    linear-gradient(180deg, rgb(236 230 216 / .8) 0 2px, transparent 2px),
    linear-gradient(90deg, transparent calc(100% - 2px), rgb(236 230 216 / .8) 0);
  background-size: 16px 2px, 2px 12px;
  background-position: right bottom, right bottom;
  background-repeat: no-repeat;
}
.aw-crest-name {
  font: 600 20px/1 var(--aw-name-font);
  color: var(--aw-ink);
  white-space: nowrap;
  letter-spacing: var(--fh-track-display);
  /* The name is "AST-<id>". A figure that is not tabular fails the grammar numeral face. */
  font-variant-numeric: tabular-nums;
}
/* ORRERY Surface 1 (F9): the name is demoted to a small crest label — bone-dim with a
   scale tick, equipment-tagged rather than stranded between hero and label. The pinned
   Bricolage 600/20px rule above is untouched; this only re-inks it. */
.ast-screen .aw-crest-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orr-bone-dim);
}
.ast-screen .aw-crest-name::before {
  content: "";
  flex: 0 0 auto;
  width: 2px;
  height: 14px;
  background: rgb(236 230 216 / .55);
}
/* The claim and assay readings are bare words on the glass — no strips, no pills. State
   is the ink: bone for settled, red for at-risk (an unanchored claim or a volatile assay
   is a loss waiting to happen, which is what red is for). */
.aw-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0;
  box-sizing: border-box;
  background: none;
  font: 500 var(--fh-size-fine)/1.4 var(--aw-font);
  letter-spacing: var(--fh-track-display);
  font-variant-numeric: tabular-nums;
  color: var(--orr-bone-dim);
  white-space: nowrap;
  border: 0;
  box-shadow: none;
}
.aw-chip.ok {
  color: var(--orr-bone);
  background: none;
  box-shadow: none;
}
.aw-chip.bad {
  color: var(--orr-danger);
  background: none;
  box-shadow: none;
}
.aw-chip.warn {
  color: var(--orr-bone-hot);
  background: none;
  box-shadow: none;
}

/* one alert slot — empty and invisible by default */
.aw-alert {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 500 13px/1.2 var(--aw-font);
  text-align: center;
  visibility: hidden;
  color: var(--orr-bone-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aw-alert.live { visibility: visible; }
.aw-alert.warn { color: var(--orr-bone-hot); }
.aw-alert.bad { color: var(--orr-danger); }
.aw-alert.good { color: var(--orr-bone); }
/* 601–1100px: with the claim, assay and site readings up, the crest leaves the alert about
   110px. A one-line centred flex slot clipped "Loading mining equipment…" at both ends (an
   anonymous flex line never ellipsizes). Let it set on two 13px lines — 30px inside the
   40px crest — and end any longer banner on an ellipsis after the second. */
@media (min-width: 601px) and (max-width: 1100px) {
  .ast-screen .aw-alert.live {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal;
    line-height: 1.15;
    overflow-wrap: break-word;
  }
}

.aw-crest-right {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}
.aw-credits {
  /* A reading, in the reading voice: thin Archivo numerals, ice-white. */
  font-family: "Archivo", var(--aw-font);
  font-weight: 250;
  font-stretch: 100%;
  font-size: 15px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--orr-phos);
}
/* ORRERY Surface 1 (F6): no session, no hold to meter — the scale and the yield only
   exist once a session does, so the cold crest never shows dead blocks. */
.ast-screen:not([data-session]) .aw-hold,
.ast-screen:not([data-session]) .aw-credits {
  display: none;
}

/* ---- the hold scale (§6.1) --------------------------------------------------
   ORRERY Surface 1 (F6): the 8 dead blocks are folded into the crest as a Scale with
   a light cursor — a ruled line, ticked, with a bead riding the fill head. Bone until
   the hold is genuinely full, which is the one state that stops the mine (red). */
.aw-hold { display: flex; align-items: center; gap: 8px; }
.aw-gauge-track {
  position: relative;
  box-sizing: border-box;
  background: none;
  border: 0;
  box-shadow: none;
}
.aw-hold-track {
  position: relative;
  width: 112px;
  height: 18px;
  box-sizing: border-box;
  border: 0;
  background-color: transparent;
  background-image:
    repeating-linear-gradient(90deg, rgb(236 230 216 / .55) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgb(236 230 216 / .85) 0 2px, transparent 2px 56px),
    linear-gradient(180deg, transparent 8px, rgb(236 230 216 / .5) 8px 10px, transparent 10px);
  background-size: 100% 6px, 100% 9px, 100% 18px;
  background-position: left top, left top, left top;
  background-repeat: repeat-x, repeat-x, no-repeat;
  box-shadow: none;
}
.aw-hold-track .ticks { display: none; }
/* setBar() publishes the hold cursor under the `aw-gauge-fill` class with `hot`/`full`
   states — the selector below is that contract, not a leftover. */
.aw-hold .aw-gauge-fill {
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 0%;
  background: rgb(236 230 216 / .9);
  background-image: none;
  transition: width 160ms var(--k-ease), background-color 160ms var(--k-ease);
}
.aw-hold .aw-gauge-fill::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -5px;
  width: 2px;
  height: 12px;
  background: var(--orr-bone);
  box-shadow: 0 0 6px rgb(236 230 216 / .8);
}
.aw-hold .aw-gauge-fill.hot { background-color: var(--orr-bone-hot); }
.aw-hold .aw-gauge-fill.full { background-color: var(--orr-danger); }
.aw-hold .aw-gauge-fill.full::after {
  background: var(--orr-danger);
  box-shadow: 0 0 6px rgb(255 80 56 / .8);
}

/* ORRERY Surface 1 (F7): Leave is a bone ghost key — no plate, no slab. The Esc hint
   rides its own scale tick. (The fh-key markers stay; this paint outranks the kit.) */
.ast-screen .aw-leave {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  padding: 0 4px;
  box-sizing: border-box;
  background: none;
  font: 600 var(--fh-size-fine)/1 var(--aw-font);
  letter-spacing: var(--fh-track-display);
  color: var(--orr-bone-dim);
  transition: color 120ms var(--k-ease);
  border: 0;
  box-shadow: none;
}
.ast-screen .aw-leave:hover {
  color: var(--orr-bone);
  background: none;
  box-shadow: none;
  transform: none;
}
.ast-screen .aw-leave:focus-visible {
  background: none;
  box-shadow: none;
}
.ast-screen .aw-leave:active {
  background: none;
  box-shadow: none;
  transform: none;
  color: var(--orr-bone-hot);
}
/* The Esc hint rides its own scale tick (F7) — engraved, never a second box. Bone-dim
   holds 4.5:1 on the glass; amber is reserved for the screen's one Lamp Key. */
.aw-key {
  position: relative;
  font: 500 var(--fh-size-fine)/1 var(--aw-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--fh-track-display);
  color: var(--orr-bone-dim);
  background: none;
  padding: 0 0 0 10px;
}
.aw-key::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  translate: 0 -50%;
  width: 2px;
  height: 12px;
  background: rgb(236 230 216 / .55);
}

/* ---------------------------------------------------------------- §4 the board */
.aw-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  background: var(--bg); /* law §3.5 space behind the rock */
  overflow: hidden;
}
.ast-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}
.ast-canvas:focus-visible {
  /* The board is a focusable control (it owns the rig keys), so keyboard focus must be seen:
     a 2px bone bracket inset from the frame — the rubric's focus bracket, not chrome. */
  outline: 2px solid rgb(236 230 216 / .55);
  outline-offset: -6px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- empty state
   ORRERY Surface 1 (F1/F2): with no claim the rock stages dimly behind the screen's
   one Lamp Key. The layer never intercepts the board — only the key takes the pointer —
   so a live-but-unclaimed rock stays drivable around it. */
.aw-empty {
  position: absolute;
  inset: 0;
  z-index: 4; /* under the §6.4 lens (6) and the §6.6 sheet (7), over the board */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* The staged rock is the empty screen's hero: it arrives with the glass, it does not pop when
     a claim is abandoned and the layer returns. */
  animation: aw-empty-in 240ms var(--k-ease) both;
}
@keyframes aw-empty-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.aw-empty[hidden] { display: none !important; }
.aw-guide[hidden] { display: none !important; }
/* The card arrives, it does not pop: one quiet rise when the section is first shown (display
   flipping from none restarts the animation, and repeat `hidden=false` writes do not). */
.aw-guide:not([hidden]) { animation: aw-guide-in 200ms var(--k-ease) both; }
@keyframes aw-guide-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.aw-guide {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 5;
  width: min(340px, calc(100% - 170px));
  padding: 12px 16px;
  /* The edge is a scale tick in bone — the screen's rule language (.aw-key, .aw-crest-name) —
     never amber: amber on this screen is the one verb's channel, and the verb word below carries
     it. */
  border: 1px solid rgb(236 230 216 / .16);
  border-left: 2px solid rgb(236 230 216 / .55);
  border-radius: 0 8px 8px 0;
  background: var(--dp-glass-deep);
  color: var(--dp-ink);
  pointer-events: auto;
}
.aw-guide h2 { margin: 0 0 8px; font: 600 16px var(--dp-face-label); }
.aw-guide p { margin: 0 0 8px; font: 14px/1.45 var(--aw-font); }
.ast-screen .aw-guide button { min-height: 40px; color: var(--orr-hand); }
.ast-screen .aw-guide button { transition: color 120ms var(--k-ease); }
.ast-screen .aw-guide button:hover { color: var(--orr-hand-hot); }
/* In build mode the palette's armed key carries the Hand, and this screen keeps exactly one
   amber leader: the guide's verb steps down to bone (its hover still brightens it). */
.ast-screen[data-mode="build"] .aw-guide button { color: var(--orr-bone); }
.ast-screen[data-mode="build"] .aw-guide button:hover { color: var(--orr-bone-hot); }
@media (max-width: 600px) {
  .aw-guide { left: 8px; top: 8px; padding: 8px; }
  .aw-guide p { font-size: 12px; }
}
.aw-empty-rock {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.aw-empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 45%, transparent 46%, rgb(5 7 10 / .45) 100%);
  pointer-events: none;
}
/* The one primary verb: an amber field, dark ink, one 45° cut, a sheen crossing every
   6s. Sentence case — the law bans every uppercase transform on this screen. Scoped under
   .ast-screen like .aw-build-key: the bare class loses to `.ast-screen button { background:
   none }` (0,1,1 beats 0,1,0) and degrades to naked inherited text. */
.ast-screen .aw-stake-key {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  min-width: 200px;
  min-height: 56px;
  padding: 0 34px;
  box-sizing: border-box;
  background: var(--orr-hand);
  color: var(--orr-hand-ink);
  font-family: "Archivo", var(--aw-font);
  font-weight: 800;
  font-stretch: 125%;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.02em;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  overflow: hidden;
  transition: background-color 120ms var(--k-ease);
}
.aw-stake-key:hover { background: var(--orr-hand-hot); }
.aw-stake-key:active { background: #e0a33e; }
.ast-screen .aw-stake-key:focus-visible {
  outline: 2px solid var(--orr-bone);
  outline-offset: 4px;
}
.aw-stake-key::after {
  content: "";
  position: absolute;
  inset: 0;
  /* The crossing sheen travels as background-position, not transform: a translated slab
     sticks out past the key and inflates its scroll overflow, which the bench reads as
     "Stake claim is cut off". Backgrounds never affect scroll overflow. Same 6s beat,
     same left-to-right crossing. */
  background: linear-gradient(105deg, transparent 42%, rgb(255 255 255 / .38) 50%, transparent 58%);
  background-size: 280% 100%;
  background-position: 115% 0;
  background-repeat: no-repeat;
  animation: aw-stake-sheen 6s var(--k-ease) infinite;
  pointer-events: none;
}
@keyframes aw-stake-sheen {
  0% { background-position: 115% 0; }
  22%, 100% { background-position: -15% 0; }
}

/* ---------------------------------------------------------------- §6.2 rig cluster */
/* ORRERY Surface 1 (F5): the rig is an instrument on glass — the Arc Gauge pair sits on a deep
   tint inside one hairline edge, never a heavy plate. */
/* Scoped under `.ast-screen`, not left bare, because asteroidScreen.js marks this element with
   the kit's own `fh-plate` family and index.html loads kit.css AFTER this sheet: at a bare
   (0,1,0) this rule TIES `.fh-plate` and loses the tie, so the cluster would silently take the
   kit's 24px border and 16px padding instead of the geometry chosen here — whichever
   `--raised/--sunk/--edge` variant the marker names. Same for `.aw-drawer` and `.aw-site-block`
   below. Keep all three selectors scoped if the markers are ever re-pointed. */
.ast-screen .aw-rig {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 10px;
  box-sizing: border-box;
  background: rgb(8 11 16 / .66);
  /* A hairline card edge (bone ~20%, radius 10) like the rest of the menus' cards. The four bone
     corner ticks it used to wear read as loose brackets floating over the stage. */
  border: 1px solid rgb(236 230 216 / .2);
  border-radius: 10px;
  box-shadow: none;
}
.aw-gauge { display: flex; align-items: center; gap: 10px; }
/* The reading's name: small, dim, equipment-tagged. The value keeps full ink so the
   eye lands on the number, not its label. */
.aw-gauge-label {
  flex: 0 0 auto;
  /* Floor, not a cap: English stays the 56px the rig was measured at; a longer
     reading (pseudo-locale) grows instead of clipping inside the label. */
  min-width: 56px;
  width: auto;
  font: 600 var(--fh-size-fine)/1 var(--aw-font);
  letter-spacing: var(--fh-track-display);
  color: var(--orr-bone-dim);
}
.aw-gauge-track { width: 120px; height: 66px; flex: 0 0 auto; }
/* The Arc Gauge: a bone track that exists before it has data, a ghost delta trailing
   the value, a bloom head riding the tip. Red is threat-only (overheated, depleted);
   a hot-but-running rig reads as brighter bone, never amber — amber is the Lamp Key. */
.aw-arc { display: block; width: 120px; height: 66px; overflow: visible; }
.aw-arc-trackbloom {
  fill: none;
  stroke: rgb(236 230 216 / .14);
  stroke-width: 6;
  stroke-linecap: round;
}
.aw-arc-track {
  fill: none;
  stroke: rgb(236 230 216 / .42);
  stroke-width: 2;
  stroke-linecap: round;
}
.aw-arc-tick {
  stroke: rgb(236 230 216 / .55);
  stroke-width: 2;
  stroke-linecap: butt;
}
.aw-arc-ghost {
  fill: none;
  stroke: rgb(236 230 216 / .7);
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke-dashoffset 600ms var(--k-ease);
}
.aw-arc-value {
  fill: none;
  stroke: var(--orr-bone);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 180ms var(--k-ease);
}
.aw-arc.warn .aw-arc-value { stroke: var(--orr-bone-hot); }
.aw-arc.warn .aw-arc-head { fill: var(--orr-bone-hot); }
.aw-arc.bad .aw-arc-value { stroke: var(--orr-danger); }
.aw-arc.bad .aw-arc-ghost { stroke: rgb(255 80 56 / .55); }
.aw-arc.bad .aw-arc-head { fill: var(--orr-danger); }
.aw-arc.bad .aw-arc-headbloom { fill: rgb(255 80 56 / .3); }
.aw-arc-headbloom { fill: rgb(236 230 216 / .25); }
.aw-arc-head { fill: var(--orr-bone); }
.aw-arc-headbloom, .aw-arc-head { r: 6; }
.aw-arc-head { r: 2.6; }
.aw-gauge-val {
  flex: 0 0 auto;
  min-width: 46px;
  text-align: right;
  font-family: "Archivo", var(--aw-font);
  font-weight: 250;
  font-stretch: 100%;
  font-size: 16px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--orr-bone);
}
.aw-gauge-val.bad { color: var(--orr-danger); }

/* ---------------------------------------------------------------- §6.3 build palette
   "A short row of tactile lit keys, like a hardware sampler, that gets longer as the game
   grows." Earned, not shown: this rule set has no hidden state and no placeholder state
   because the palette is simply not in the DOM until a Core is owned (see buildPalette.js).
   Bottom edge, right of centre; the row is exactly its keys plus 6px gaps — no card, no
   padding, no background behind them — and it stops 16px clear of the §6.2 rig cluster. */
.aw-palette {
  position: absolute;
  /* Re-derived for the Arc Gauge rig: 16px right margin + the rig's real width
     (14+14 padding, then 56 label + 10 + 120 arc + 10 + 46 value = 242) = 286px,
     plus 30px of clear air. The check in scripts/check-asteroid-theater.mjs asserts
     these two boxes never intersect; re-derive this if the rig's padding, the arc
     width or the --fh type step changes. */
  right: 316px;
  bottom: 16px;
  z-index: 5;   /* under the §6.4 lens (6), over the board */
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

/* ORRERY Surface 1 (populated path): the sampler key is a slip of glass — a deep tint
   with a bone crown line, the 22px silhouette floating over the board. The geometry is
   pinned, not the paint: law §6.3, the render test and the theater check pin this key to
   exactly 46x46 with an 8px radius, and the theater check reads computed
   `backgroundColor` per state precisely because this key lost its plate once before
   to `.ast-screen button { background: none }`. Every state below keeps a declared,
   opaque-to-the-check colour for that reason. */
.ast-screen .aw-build-key {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: rgb(8 11 16 / .88);
  background-image: linear-gradient(180deg, rgb(236 230 216 / .5) 0 2px, transparent 2px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  color: var(--orr-bone);
  transition:
    background-color 120ms var(--k-ease),
    color 120ms var(--k-ease),
    box-shadow 120ms var(--k-ease);
}
.ast-screen .aw-build-key:focus-visible {
  outline: 2px solid var(--orr-bone);
  outline-offset: 2px;
}
/* The silhouette IS the key. 22px of filled mass in currentColor, so every state tints it free. */
.aw-build-glyph {
  display: block;
  width: 22px;
  height: 22px;
}
.aw-build-hotkey {
  position: absolute;
  top: 4px;
  right: 5px;
  font: 500 var(--fh-size-fine)/1 var(--aw-mono);
  font-variant-numeric: tabular-nums;
  color: var(--orr-bone-dim);
  pointer-events: none;
}

/* ready — glass at rest, bone glyph; hover brightens the glass and the glyph. No lift:
   the light is the feedback, here as on every other ghost on this screen. */
.ast-screen .aw-build-key:hover {
  background-color: rgb(16 21 29 / .92);
  color: var(--orr-bone-hot);
}
.ast-screen .aw-build-key:active {
  background-color: rgb(8 11 16 / .88);
  color: var(--orr-bone-dim);
}

/* armed — one key is always armed, even in drive, so outside build mode the ring reads
   as a quiet bone inner hint instead of shouting a selection the player is not making.
   The inset ring is what the theater check reads as "armed carries its own shadow". */
.ast-screen .aw-build-key.armed {
  color: var(--orr-bone-hot);
  box-shadow:
    inset 0 0 0 2px rgb(236 230 216 / .55),
    0 4px 14px rgba(0, 0, 0, 0.5);
}
/* live + armed is the populated state's one amber thing: the chosen key, carrying the
   Hand's own meaning (yours, chosen, actionable — §3.3). The stake Lamp Key stands down
   once a site exists, so this ring never shares the frame with it. */
.ast-screen .aw-palette.live .aw-build-key.armed {
  color: var(--orr-hand);
  background-color: rgb(14 11 5 / .92);
  background-image: linear-gradient(180deg, rgb(242 185 80 / .65) 0 2px, transparent 2px);
  box-shadow: 0 0 0 2px var(--orr-hand), 0 4px 16px rgba(0, 0, 0, 0.55);
}

/* unaffordable — flat dim glass, dimmed glyph; the hover tip carries the shortfall.
   Armed still rings it, in bone: "this is what you are aiming, and you cannot pay for
   it." Ready and unaffordable are two distinct paints (bg and ink both differ) and the
   flat key carries no shadow — the theater check reads all three. */
.ast-screen .aw-build-key.poor,
.ast-screen .aw-build-key.poor:hover {
  background-color: rgb(8 11 16 / .55);
  background-image: none;
  box-shadow: none;
  color: rgb(236 230 216 / .38);
}
.ast-screen .aw-palette.live .aw-build-key.poor.armed {
  color: rgb(236 230 216 / .55);
  background-color: rgb(8 11 16 / .55);
  background-image: none;
  box-shadow: 0 0 0 2px rgb(236 230 216 / .55);
}

/* The key's name lives here and nowhere else (law §2.5): hidden — not merely transparent —
   so it costs the default drive view zero words, revealed on hover or keyboard focus. */
.aw-build-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 12px 8px;
  box-sizing: border-box;
  /* a slip of glass over the board — no plate, no edge. */
  background: rgb(8 11 16 / .9);
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  border: 0;
  box-shadow: 0 8px 24px rgb(0 0 0 / .5);
}
.ast-screen .aw-build-key:hover .aw-build-tip,
.ast-screen .aw-build-key:focus-visible .aw-build-tip {
  visibility: visible;
  opacity: 1;
}
.aw-build-tip-name {
  font: 500 13px/1.15 var(--aw-font);
  color: var(--orr-bone);
}
.aw-build-tip-cost {
  font: 500 12px/1.15 var(--aw-mono);
  font-variant-numeric: tabular-nums;
  color: var(--orr-bone-dim);
}
.aw-build-tip-cost:empty { display: none; }

/* law §9 — the first Core makes the interface visibly grow: one settle, once. Frontend Task D §2
   reconciled the duration and easing to the kit's motion floor (spec §7: settles ≤ 160 ms, --k-ease). */
@keyframes aw-palette-settle {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.aw-palette.settle { animation: aw-palette-settle 160ms var(--k-ease) both; }
/* At phone widths the default right-hand placement runs over the Arc Gauge and Plan key. Keep
   the earned build keys in a wrapped rail above the rig; desktop has its own higher-specificity
   narrow-window rail and remains unchanged. */
@media (max-width: 600px) {
  .aw-palette {
    left: 12px;
    right: 12px;
    bottom: 186px;
    flex-wrap: wrap;
    align-content: flex-end;
  }
}

/* ---------------------------------------------------------------- §6.4 cursor lens
   "A little field-notebook tag next to their cursor — a colour, a number, two or three
   stamps." Max 260px, a slip of glass with a bone crown line, NO border box. Absolutely
   placed inside the stage (not fixed to the viewport) so a transformed screen stack
   cannot shift it, and pointer-transparent so the card can never eat the hover that
   created it. */
.aw-lens {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px 11px;
  box-sizing: border-box;
  background: rgb(8 11 16 / .88);
  background-image: linear-gradient(180deg, rgb(236 230 216 / .5) 0 2px, transparent 2px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  color: var(--orr-bone-dim);
  pointer-events: none;
  overflow: hidden;
  contain: layout style;
  border: 0;
  box-shadow: 0 10px 30px rgb(0 0 0 / .55);
}
.aw-lens[hidden] { display: none !important; }

.aw-lens-head {
  display: flex;
  align-items: center;
  gap: 4px 9px;
  min-width: 0;
  /* A two-word material name plus its assay can exceed 260px. Wrapping keeps the NAME whole (the
     identity is the point) and costs one extra line, which a tile card has spare — it never has a
     body line. `.nowrap` is applied whenever a body line is present. */
  flex-wrap: wrap;
}
.aw-lens-head.nowrap { flex-wrap: nowrap; }
.aw-lens-head.nowrap .aw-lens-num { overflow: hidden; text-overflow: ellipsis; }
/* 22px rounded swatch sampling the actual board material (law §6.4). */
.aw-lens-swatch {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 7px;
}
.aw-lens-swatch[hidden] { display: none; }
/* Claim-formation membership, wordless: a solid bone ring is committed to the claim
   record, a dashed ring is assayed but still volatile (it wants a Core). The inline
   box-shadow from the material sampler is the inner ring; these add the outer one. */
.aw-lens-swatch.claim-mint { outline: 2px solid var(--orr-bone); outline-offset: 2px; }
.aw-lens-swatch.claim-gold { outline: 2px dashed rgb(236 230 216 / .8); outline-offset: 2px; }
/* Machines and placement ghosts trade the swatch for a status lamp. Running is a filled
   bone lamp; throttled/starved is the same lamp as a hollow ring; a fault is red. */
.aw-lens-swatch.lamp {
  width: 12px;
  height: 12px;
  margin: 0 5px;
  border-radius: 50%;
  background: var(--orr-bone-dim);
}
.aw-lens-swatch.lamp.mint { background: var(--orr-bone); box-shadow: 0 0 9px rgb(236 230 216 / .5); }
.aw-lens-swatch.lamp.gold { background: transparent; outline: 2px solid var(--orr-bone); box-shadow: none; }
.aw-lens-swatch.lamp.coral { background: var(--orr-danger); box-shadow: 0 0 9px rgb(255 80 56 / .5); }
.aw-lens-swatch.lamp.idle { background: var(--orr-bone-dim); }

/* The name is the identity: it never shrinks. When the row is tight the NUMERALS give way — a
   truncated "Geol…" is a broken card, a truncated rate is a missing decimal. */
.aw-lens-name {
  flex: 0 0 auto;
  max-width: 100%;
  font: 500 14px/1.25 var(--aw-font);
  color: var(--orr-bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aw-lens-num {
  flex: 0 1 auto;
  min-width: 0;
  font: 500 13px/1.25 var(--aw-mono);
  font-variant-numeric: tabular-nums;
  color: var(--orr-bone-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aw-lens-num[hidden] { display: none; }
/* "hp 60% as a tiny bar, not a sentence" — only present once the cell has actually been bitten. */
.aw-lens-hp {
  flex: 0 0 auto;
  width: 34px;
  height: 6px;
  border-radius: 3px;
  background: rgb(236 230 216 / .16);
  overflow: hidden;
}
.aw-lens-hp i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--orr-bone-dim);
}
.aw-lens-hp i.low { background: var(--orr-bone-hot); }

/* Stamp chips: 20px tall, icon glyph + word. Bare words on the glass — settled reads
   bone, a fault reads red, nothing else spends a hue. */
.aw-lens-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
}
.aw-lens-chips[hidden] { display: none; }
.aw-lens-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  padding: 0;
  box-sizing: border-box;
  background: none;
  font: 500 var(--fh-size-fine)/1.4 var(--aw-font);
  color: var(--orr-bone-dim);
  white-space: nowrap;
  border: 0;
  box-shadow: none;
}
.aw-lens-chip.gold,
.aw-lens-chip.mint {
  background: none;
  box-shadow: none;
}
.aw-lens-chip.coral {
  background: none;
  box-shadow: none;
}
.aw-lens-chip svg { flex: 0 0 auto; display: block; }
.aw-lens-chip.gold { color: var(--orr-bone-hot); }
.aw-lens-chip.mint { color: var(--orr-bone); }
.aw-lens-chip.coral { color: var(--orr-danger); }

/* One body line, max — the machine's cause. Never tutorial copy. */
.aw-lens-body {
  font: 500 13px/1.3 var(--aw-font);
  color: var(--orr-bone-dim);
}
.aw-lens-body[hidden] { display: none; }

/* The contact-ring schematic, inside the card, small and captionless. */
.aw-lens-ring {
  display: grid;
  grid-template-columns: repeat(3, 10px);
  grid-auto-rows: 10px;
  gap: 2px;
}
.aw-lens-ring[hidden] { display: none; }
/* ORRERY Surface 1 (populated path): the survey ring reads on the bone ramp — a
   surveyed cell is lit bone, an unsurveyed one a faint tick. */
.aw-lens-ring-cell {
  border-radius: 2px;
  background: rgb(236 230 216 / .55);
}
.aw-lens-ring-cell.hollow { background: rgb(236 230 216 / .14); }
.aw-lens-ring-cell.center {
  background: transparent;
  box-shadow: none;
}

/* ---------------------------------------------------------------- extraction report
   (post-exit modal — same warm voice; sentence case, no tracked caps) */
.ast-summary-modal {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 160ms var(--k-ease);
  pointer-events: auto;
}
.ast-summary-modal.active { opacity: 1; }
/* ORRERY Surface 1 (populated path): the report is a slip of glass over the world —
   an Archivo display title, bone ledger rows, the yield numerals in full bone. Its one
   verb stays the kit's PRIMARY key: wave-c4-drill-kit pins the className and the two
   fh-key rules below, and the amber plate is this overlay's own Lamp Key. */
.ast-summary-box {
  max-height: calc(100dvh - 24px);
  overflow: auto;
  background: var(--sf-pop-glass);
  box-sizing: border-box;
  padding: 22px 26px 24px;
  width: min(420px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--orr-bone-dim);
  font-family: var(--aw-font, system-ui, sans-serif);
  text-transform: none;
  border: 1px solid var(--sf-pop-seam);
  border-top: 2px solid var(--dp-phos);
  box-shadow: var(--sf-pop-shadow);
}
.ast-summary-box .title {
  font-family: "Archivo", var(--aw-font, sans-serif);
  font-weight: 800;
  font-stretch: 125%;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: var(--fh-track-display);
  color: var(--orr-bone);
  padding-bottom: 10px;
  border: 0;
  background-image: linear-gradient(180deg, rgb(236 230 216 / .3) 1px, transparent 0);
  background-repeat: repeat-x;
  background-position: bottom left;
}
.ast-summary-box .row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}
.ast-summary-box .row .val {
  font-family: var(--aw-mono, monospace);
  font-variant-numeric: tabular-nums;
  color: var(--orr-bone);
}
.ast-summary-box .sf-btn { align-self: center; min-width: 150px; }
/* The report's close verb is a kit fh-key: keep the visible focus ring on it and take the hover
   ink-swap off — the primary plate already reads as the one verb. The !important is load-bearing:
   styles/ui.css carries a legacy `*:focus-visible` accent rule with !important of its own. */
.ast-summary-box .fh-key:focus-visible { outline: 2px solid var(--dp-lamp) !important; outline-offset: 3px; }
.ast-summary-box .fh-key:is(:hover, :focus-visible, :active) {
  color: #1a1206; translate: none; box-shadow: none; filter: none;
}
.ast-screen .sf-btn,
.ast-summary-box .sf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  box-sizing: border-box;
  background: transparent;
  font: 600 var(--fh-size-fine)/1.1 var(--aw-font);
  letter-spacing: var(--fh-track-display);
  color: var(--fh-ground);
  transition: transform 120ms var(--k-ease), color 120ms var(--k-ease);
  border: 14px solid transparent;
  background: var(--dp-cap-live) border-box;
  box-shadow: var(--dp-cap-live-lift);
}
.ast-screen .sf-btn:hover,
.ast-summary-box .sf-btn:hover {
  transform: translateY(-1px);
  background: var(--dp-cap-live-hover) border-box;
}
.ast-screen .sf-btn:focus-visible,
.ast-summary-box .sf-btn:focus-visible {
  box-shadow: var(--dp-cap-live-lift);
}
.ast-screen .sf-btn:active,
.ast-summary-box .sf-btn:active {
  transform: translateY(1px);
  background: var(--dp-cap-press) border-box;
  box-shadow: var(--dp-cap-sink);
}
.ast-screen .sf-btn:disabled,
.ast-summary-box .sf-btn:disabled {
  color: var(--aw-ink-3);
  transform: none;
  background: var(--dp-cap-off) border-box;
  box-shadow: var(--dp-cap-off-edge);
}

/* ---------------------------------------------------------------- a11y + modes */
.ast-sr-status {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  /* Opacity 0 stays in the accessibility tree (unlike visibility:hidden) and keeps this
     1px clip box out of the grammar probe, which would otherwise call the announcement a clip. */
  opacity: 0;
}

/* Pseudo-locale growth. The crest is a single 40px row in English. Expanded words wrap
   onto a taller crest instead of overflowing a nowrap strip (that overflow is a grammar clip). */
html:not([data-locale="en-US"]) .ast-screen > .aw-crest {
  flex: 0 0 auto;
  height: auto;
  min-height: 40px;
  flex-wrap: wrap;
  row-gap: 4px;
}
html:not([data-locale="en-US"]) .aw-crest-name,
html:not([data-locale="en-US"]) .aw-chip,
html:not([data-locale="en-US"]) .aw-gauge-label,
html:not([data-locale="en-US"]) .aw-alert {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: 100%;
}

/* Narrow + densify short-desktop (≤800 wide, not the phone layout — e.g. 390×844 / 700×461):
   the one-row crest ran its status line and the Log / Leave keys off the right edge, so there
   was no visible way out. At 700×461 LeaveEsc sat past the right edge (Esc offR ~30); 801 was
   already clear. Like the phone sheet (mobileScreenLayouts.js), the name and the keys hold the
   first row and the readings wrap underneath. Band raised 600→800 for densify 651–800. */
@media (max-width: 800px) {
  html:not([data-sf-mobile="1"]) .ast-screen > .aw-crest {
    flex: 0 0 auto;
    min-height: 40px;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 6px 12px;
  }
  html:not([data-sf-mobile="1"]) .ast-screen .aw-crest-right { order: 1; margin-left: auto; gap: 10px; }
  html:not([data-sf-mobile="1"]) .ast-screen .aw-chip,
  html:not([data-sf-mobile="1"]) .ast-screen .aw-alert { order: 2; white-space: normal; max-width: 100%; }
}

/* The crest can wrap through 800px without moving the mining tool palette. Keep its separate
   narrow-stage composition at the original 600px breakpoint. */
@media (max-width: 600px) {
  /* The narrow desktop stage has room for the guide and palette side by side. Keep the authored
     keys in a right-hand rail above the Arc Gauge, leaving the guide's existing left column clear.
     The phone composition has its own layout. */
  html:not([data-sf-mobile="1"]) .ast-screen .aw-palette {
    left: auto;
    right: 16px;
    top: 16px;
    bottom: auto;
    display: grid;
    grid-template-columns: repeat(2, 46px);
    align-items: start;
    gap: 6px;
  }
  html:not([data-sf-mobile="1"]) .ast-screen .aw-palette .aw-build-tip {
    left: auto;
    right: calc(100% + 8px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ast-summary-modal, .aw-hold-fill, .aw-gauge-fill, .aw-build-key,
  .ast-screen .aw-leave, .ast-screen .sf-btn, .ast-summary-box .sf-btn { transition: none; }
  .aw-leave:hover, .aw-build-key:hover,
  .ast-screen .sf-btn:hover, .ast-summary-box .sf-btn:hover { transform: none; }
  .aw-palette.settle, .aw-guide:not([hidden]), .aw-empty { animation: none; }
  .aw-arc-ghost, .aw-arc-value { transition: none; }
  .aw-stake-key::after { animation: none; }
}
html.sf-reduce-motion .ast-summary-modal,
html.sf-reduce-motion .aw-hold-fill,
html.sf-reduce-motion .aw-build-key,
html.sf-reduce-motion .ast-screen .aw-leave,
html.sf-reduce-motion .ast-screen .sf-btn,
html.sf-reduce-motion .ast-summary-box .sf-btn,
html.sf-reduce-motion .aw-gauge-fill,
html.sf-reduce-motion .aw-arc-ghost,
html.sf-reduce-motion .aw-arc-value { transition: none; }
html.sf-reduce-motion .aw-palette.settle,
html.sf-reduce-motion .aw-guide:not([hidden]),
html.sf-reduce-motion .aw-empty,
html.sf-reduce-motion .aw-stake-key::after { animation: none; }
html.sf-reduce-motion .aw-build-key:hover,
html.sf-reduce-motion .ast-screen .sf-btn:hover,
html.sf-reduce-motion .ast-summary-box .sf-btn:hover { transform: none; }

/* FORCED COLOURS STRIPS THE KIT, NOT THE STRUCTURE.
   A nine-slice `border-image` is NOT removed by forced-colors mode: left alone, every
   plate and key above would ship as a 9-24px solid frame in the user's own palette and
   the screen would read as a stack of thick boxes. So each nine-slice is explicitly
   returned to a 1px system border here, and the sprite-backed keys and lamps fall back
   to system paint. This is the same reason the produced kit's own chrome carries a
   forced-colors branch. */
@media (forced-colors: active) {
  .ast-screen .aw-leave,
  .ast-screen .aw-drawer-key,
  .ast-screen .aw-drawer-tab,
  .ast-screen .aw-verb-chip,
  .ast-screen .aw-verb-btn,
  .ast-screen .aw-verb-step,
  .ast-screen .aw-verb-select,
  .ast-screen .sf-btn,
  .ast-summary-box,
  .ast-summary-box .sf-btn,
  /* these three carry `.ast-screen` for the same reason their base rules do: a bare class here
     would tie their (0,2,0) base rule and lose, leaving a 12-16px nine-slice frame standing in
     the user's own palette */
  .ast-screen .aw-rig, .ast-screen .aw-drawer, .ast-screen .aw-site-block,
  .aw-chip, .aw-rate-chip, .aw-help-keys,
  .aw-lens, .aw-lens-chip, .aw-build-tip,
  .aw-hold-track, .aw-gauge-track {
    border-image-source: none;
    border-style: solid;
    border-width: 1px;
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
  }
  .ast-screen, .aw-crest { border: 1px solid CanvasText; }
  .aw-crest { background-image: none; }
  .aw-build-key {
    border: 1px solid CanvasText;
    background-image: none;
    background-color: Canvas;
    color: CanvasText;
  }
  .aw-build-key.armed { outline: 2px solid Highlight; outline-offset: 1px; }
  .aw-build-key.poor { color: GrayText; }
  .ast-screen, .aw-leave { background: Canvas; color: CanvasText; }
  .aw-hold-track .ticks, .aw-gauge-track .ticks { background-image: none; }
  .aw-hold-fill, .aw-gauge-fill { background-color: Highlight; background-image: none; }
  .ast-screen .aw-drawer-tab.on, .ast-screen .aw-verb-chip.on {
    color: CanvasText;
    outline: 2px solid Highlight;
    outline-offset: 1px;
  }
  .aw-ledger-row + .aw-ledger-row { background-image: none; border-top: 1px solid CanvasText; }
  .ast-summary-box .title { background-image: none; border-bottom: 1px solid CanvasText; }
  .aw-lens-swatch, .aw-lens-ring-cell { border: 1px solid CanvasText; }
  .aw-lens-hp i { background: Highlight; }
  .aw-key { color: CanvasText; }
  .aw-drawer-label { color: CanvasText; }
  /* Without its own edge the amber field flattens onto the canvas and the one verb
     vanishes; a system edge keeps it a key. Scoped: the bare class loses to
     `.ast-screen button { background: none }` here too. */
  .ast-screen .aw-stake-key {
    border: 1px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }
  .aw-stake-key::after { display: none; }
  .aw-arc-track, .aw-arc-value, .aw-arc-ghost { stroke: CanvasText; }
  .aw-arc-trackbloom, .aw-arc-headbloom { stroke: none; fill: none; }
  .aw-arc-head { fill: CanvasText; }
  .aw-arc-tick { stroke: CanvasText; }
  /* The resets above clear the RESTING sprite, but fh.css owns the STATE sprites — `.fh-key:hover`,
     `.fh-key--primary:hover/:active` and `.fh-key--legend[aria-selected='true']` are all (0,2,0),
     exactly the weight of the rules here, and styles/kit.css loads later, so each of them wins the
     tie and paints its nine-slice straight back. The selected drawer tab is the bad one: it carries
     `aria-selected`, so it leaks its lit plate AT REST, not just under the pointer, and the
     Highlight outline that is supposed to say "this tab is open" lands on top of a sprite the mode
     exists to remove. `!important` is how the produced kit's own forced-colours block settles the
     same tie (styles/kit.css, FORCED COLOURS section). */
  .ast-screen .fh-key,
  .ast-summary-box .fh-key { border-image-source: none !important; }
}

/* ---------------------------------------------------------------- §6.6 drawers
   A bottom sheet over the board's BOTTOM EDGE only: max 280px tall, --aw-surface,
   r10 on the top corners, soft shadow, a grabber handle, a 200ms ease. Law §6.6 —
   "a drawer never covers the middle of the board and closes on Esc or outside click".

   THE CLOSED STATE IS display:none, NOT an off-screen transform. Law §2.5 counts the
   default drive view and scripts/check-asteroid-theater.mjs walks every visible element
   under .ast-screen; a translated sheet still owns client rects and would spend the whole
   15-word budget on bookkeeping. The [hidden] rule below needs !important for exactly the
   reason .aw-lens[hidden] does: a plain class rule with `display:flex` outranks the UA
   sheet's `[hidden] { display: none }`. */
/* The sheet is borderless glass over the board's bottom edge — the pinned law §6.6
   declarations (280px cap, bottom edge, r10 top corners, surface token, 200ms ease)
   stay exactly as the drawers test reads them; only the plate layers are gone. */
.ast-screen .aw-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;   /* over the palette (5) and the §6.4 lens (6): an open sheet owns the bottom */
  max-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 18px 14px;
  box-sizing: border-box;
  border-radius: 10px 10px 0 0;
  background: var(--aw-surface);
  background: rgb(8 11 16 / .9);
  color: var(--orr-bone-dim);
  transform: translateY(102%);
  opacity: 0;
  transition: transform 200ms var(--k-ease), opacity 200ms var(--k-ease);
  overflow: hidden;
  border: 0;
  box-shadow: 0 -14px 44px rgb(0 0 0 / .55);
}
.aw-drawer[hidden] { display: none !important; }
.aw-drawer.open { transform: translateY(0); opacity: 1; }

/* the grabber: the sheet says "I pull up from here" without a word */
.aw-drawer-grab {
  flex: 0 0 auto;
  width: 44px;
  height: 4px;
  margin: 0 auto;
  background: rgb(236 230 216 / .35);
  border-radius: 2px;
}

.aw-drawer-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 20px;
  align-items: center;
}
/* Tabs are bone words; the open tab carries a light cursor under its word. */
.ast-screen .aw-drawer-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 2px;
  box-sizing: border-box;
  background: none;
  color: var(--orr-bone-dim);
  font: 600 var(--fh-size-fine)/1.1 var(--aw-font);
  letter-spacing: var(--fh-track-display);
  transition: color 120ms var(--k-ease);
  border: 0;
  box-shadow: none;
}
.ast-screen .aw-drawer-tab:hover {
  color: var(--orr-bone);
  background: none;
  box-shadow: none;
}
.ast-screen .aw-drawer-tab:focus-visible {
  background: none;
  box-shadow: none;
}
.ast-screen .aw-drawer-tab.on {
  color: var(--orr-bone);
  background: none;
  box-shadow: none;
}
.ast-screen .aw-drawer-tab.on::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: var(--orr-bone);
  box-shadow: 0 0 6px rgb(236 230 216 / .7);
}

.aw-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--fh-edge) transparent;
}
.aw-drawer-body > [hidden] { display: none !important; }

/* the crest affordance (F8): a labelled ghost key — the glyph plus its bone word, no
   plate, no mystery. The aria-label still names all three drawers for assistive tech. */
.ast-screen .aw-drawer-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  height: 30px;
  padding: 0 6px;
  box-sizing: border-box;
  background: none;
  color: var(--orr-bone-dim);
  transition: color 120ms var(--k-ease);
  border: 0;
  box-shadow: none;
}
.ast-screen .aw-drawer-key:hover {
  color: var(--orr-bone);
  transform: none;
  background: none;
  box-shadow: none;
}
.ast-screen .aw-drawer-key:focus-visible {
  background: none;
  box-shadow: none;
}
.ast-screen .aw-drawer-key[aria-expanded="true"] {
  color: var(--orr-bone);
  background: none;
  box-shadow: none;
}
.aw-drawer-key svg { display: block; }
/* The crest's Guide toggle stands down on a sessionless screen (F6); its inline-flex base rule
   would out-rank the UA [hidden] sheet exactly like .aw-lens[hidden] above. */
.ast-screen .aw-drawer-key[hidden] { display: none !important; }
.aw-drawer-label {
  font: 500 12px/1 var(--aw-font);
  letter-spacing: var(--fh-track-display);
}

/* severity dot — the ledger's whole severity vocabulary, no words spent on it. Bone
   carries every settled state (brightness is the rank); red is fault and loss. */
.aw-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  background: none;
  background-image: radial-gradient(closest-side, rgb(236 230 216 / .35) 98%, transparent);
  background-size: 12px 12px;
  background-repeat: no-repeat;
}
.aw-dot.mint { background-image: radial-gradient(closest-side, var(--orr-bone) 98%, transparent); }
.aw-dot.gold { background-image: radial-gradient(closest-side, transparent 28%, var(--orr-bone) 32%, var(--orr-bone) 62%, transparent 66%); }
.aw-dot.coral { background-image: radial-gradient(closest-side, var(--orr-danger) 98%, transparent); }
.aw-dot.sky { background-image: radial-gradient(closest-side, var(--orr-bone-dim) 98%, transparent); }
.aw-dot.ink { background-image: radial-gradient(closest-side, rgb(236 230 216 / .5) 98%, transparent); }

/* ---- Ledger tab: newest first, mono clock, one line per event ---- */
.aw-ledger { margin: 0; padding: 0; list-style: none; }
.aw-ledger-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 2px;
  font: 400 13px/1.35 var(--aw-font);
  color: var(--orr-bone-dim);
}
.aw-ledger-row + .aw-ledger-row {
  background-image: linear-gradient(180deg, rgb(236 230 216 / .14) 1px, transparent 0);
  background-repeat: repeat-x;
  background-position: top left;
}
.aw-ledger-row .aw-dot { align-self: center; }
.aw-ledger-clock {
  flex: 0 0 auto;
  font: 500 var(--fh-size-fine)/1.35 var(--aw-mono);
  font-variant-numeric: tabular-nums;
  color: var(--orr-bone-dim);
}
.aw-ledger-text { color: var(--orr-bone); }
.aw-ledger-empty {
  padding: 8px 2px;
  font: 400 13px/1.35 var(--aw-font);
  color: var(--orr-bone-dim);
}

/* ---- Help tab: the keys, taught once ---- */
.aw-helpmap {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr max-content 1fr;
  align-items: center;
  gap: 6px 12px;
}
/* A key in the help map is bright bone mono with a scale tick — the control map as
   an equipment list, not a tray of caps. */
.aw-help-keys {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 0;
  box-sizing: border-box;
  background: none;
  font: 500 var(--fh-size-fine)/1.1 var(--aw-mono);
  font-variant-numeric: tabular-nums;
  color: var(--orr-bone);
  white-space: nowrap;
  border: 0;
  box-shadow: none;
}
.aw-help-keys::before {
  content: "";
  flex: 0 0 auto;
  width: 2px;
  height: 12px;
  background: rgb(236 230 216 / .55);
}
.aw-help-label {
  margin: 0;
  font: 400 13px/1.3 var(--aw-font);
  color: var(--orr-bone-dim);
}

/* ---- Site tab: production totals, courier log, the four operator verbs ---- */
.aw-site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px 18px;
  align-items: start;
}
/* each block is a breath of shade on the sheet — a recess tint with a bone crown,
   never a box. */
.ast-screen .aw-site-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 11px;
  box-sizing: border-box;
  background: rgb(236 230 216 / .045);
  background-image: linear-gradient(180deg, rgb(236 230 216 / .3) 0 2px, transparent 2px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border: 0;
  box-shadow: none;
}
.aw-site-title {
  margin: 0 0 2px;
  font: 600 var(--fh-size-fine)/1.2 var(--aw-font);
  letter-spacing: var(--fh-track-display);
  color: var(--orr-bone);
}
.aw-site-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font: 400 13px/1.4 var(--aw-font);
}
.aw-site-stat-label { color: var(--orr-bone-dim); }
.aw-site-stat-val {
  font: 500 var(--fh-size-data)/1.4 var(--aw-mono);
  font-variant-numeric: tabular-nums;
  color: var(--orr-bone);
}
.aw-site-rates, .aw-verb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
/* a rate is a live production numeral, bare on the shade */
.aw-rate-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0;
  box-sizing: border-box;
  background: none;
  font: 500 var(--fh-size-fine)/1.3 var(--aw-mono);
  font-variant-numeric: tabular-nums;
  color: var(--orr-bone);
  border: 0;
  box-shadow: none;
}
.aw-site-flights { margin: 4px 0 0; padding: 0; list-style: none; }
.aw-site-flight {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font: 400 13px/1.3 var(--aw-font);
  color: var(--orr-bone-dim);
}

/* The four operator verbs — ghost words bound straight to the owner APIs. A toggle
   that is ON carries a bone bead ahead of its word; hover only brightens the ink. */
.ast-screen .aw-verb-chip,
.ast-screen .aw-verb-btn,
.ast-screen .aw-verb-step {
  /* the shared row height (--dp-row 34px): the drawer's verbs stay palm-sized, not thumb-fiddly */
  min-height: 34px;
  box-sizing: border-box;
  background: none;
  border: 0;
  color: var(--orr-bone-dim);
  font: 500 var(--fh-size-fine)/1.1 var(--aw-font);
  letter-spacing: var(--fh-track-display);
  transition: color 120ms var(--k-ease);
}
.ast-screen .aw-verb-chip,
.ast-screen .aw-verb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  background: none;
  box-shadow: none;
}
.ast-screen .aw-verb-chip::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(236 230 216 / .3);
}
.ast-screen .aw-verb-chip.on::before {
  background: var(--orr-bone);
  box-shadow: 0 0 6px rgb(236 230 216 / .8);
}
.ast-screen .aw-verb-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  padding: 0;
  font-family: var(--aw-mono);
  font-size: 15px;
  letter-spacing: normal;
  background: none;
  box-shadow: none;
}
.ast-screen .aw-verb-chip:hover:not(:disabled),
.ast-screen .aw-verb-btn:hover:not(:disabled) {
  color: var(--orr-bone);
  transform: none;
  background: none;
  box-shadow: none;
}
.ast-screen .aw-verb-step:hover:not(:disabled) {
  color: var(--orr-bone);
  transform: none;
  background: none;
  box-shadow: none;
}
.ast-screen .aw-verb-chip:focus-visible,
.ast-screen .aw-verb-btn:focus-visible {
  background: none;
  box-shadow: none;
}
.ast-screen .aw-verb-step:focus-visible {
  background: none;
  box-shadow: none;
}
.ast-screen .aw-verb-step:active:not(:disabled) {
  background: none;
  box-shadow: none;
  color: var(--orr-bone-hot);
}
.ast-screen .aw-verb-chip.on {
  color: var(--orr-bone);
  background: none;
  box-shadow: none;
}
.ast-screen .aw-verb-chip:disabled,
.ast-screen .aw-verb-btn:disabled {
  color: rgb(236 230 216 / .38);
  transform: none;
  background: none;
  box-shadow: none;
}
.ast-screen .aw-verb-step:disabled {
  color: rgb(236 230 216 / .38);
  transform: none;
  background: none;
  box-shadow: none;
}
.aw-verb-num {
  min-width: 42px;
  text-align: center;
  font: 500 var(--fh-size-emphasis)/1.1 var(--aw-mono);
  font-variant-numeric: tabular-nums;
  color: var(--orr-bone);
}
/* a picker is bone words on breath of shade — no channel, no underline */
.ast-screen .aw-verb-select {
  min-height: 34px;
  max-width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
  background: rgb(236 230 216 / .06);
  color: var(--orr-bone);
  font: 500 var(--fh-size-fine)/1.2 var(--aw-font);
  text-transform: none;
  border: 0;
  box-shadow: none;
}
.ast-screen .aw-verb-select:focus-visible {
  background: rgb(236 230 216 / .12);
  box-shadow: none;
}
.ast-screen .aw-verb-select:disabled {
  color: rgb(236 230 216 / .38);
  background: transparent;
  box-shadow: none;
}
.ast-screen .aw-verb-select option { background: var(--aw-surface); color: var(--aw-ink); }
.aw-site-reason {
  margin: 4px 0 0;
  font: 400 13px/1.3 var(--aw-font);
  color: var(--orr-bone-dim);
}
.aw-site-reason[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .aw-drawer, .aw-drawer-tab, .aw-drawer-key, .aw-verb-chip, .aw-verb-btn, .aw-verb-step { transition: none; }
  .aw-drawer-key:hover, .aw-verb-chip:hover, .aw-verb-btn:hover, .aw-verb-step:hover { transform: none; }
}
html.sf-reduce-motion .aw-drawer,
html.sf-reduce-motion .aw-drawer-tab,
html.sf-reduce-motion .aw-drawer-key,
html.sf-reduce-motion .aw-verb-chip,
html.sf-reduce-motion .aw-verb-btn,
html.sf-reduce-motion .aw-verb-step { transition: none; }
html.sf-reduce-motion .aw-drawer-key:hover,
html.sf-reduce-motion .aw-verb-chip:hover,
html.sf-reduce-motion .aw-verb-btn:hover,
html.sf-reduce-motion .aw-verb-step:hover { transform: none; }

@media (forced-colors: active) {
  .aw-drawer, .aw-drawer-tab, .aw-drawer-key, .aw-site-block,
  .aw-verb-chip, .aw-verb-btn, .aw-verb-step, .aw-verb-select, .aw-help-keys {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }
  .aw-drawer-tab.on, .aw-verb-chip.on { outline: 2px solid Highlight; outline-offset: 1px; }
  /* the `background` shorthand also clears the kit lamp sprite; keep it round */
  .aw-drawer-grab, .aw-dot { background: CanvasText; }
  .aw-dot { border-radius: 999px; }
  .aw-drawer-key svg { stroke: CanvasText; }
  .aw-site-reason, .aw-ledger-empty { color: GrayText; }
}

/* ============================================================================================
   THE KIT'S CLASSES, IN THIS SCREEN'S VOICE.

   `src/ui/asteroid/asteroidScreen.js` marks these controls with the kit's own `fh-key` and
   `fh-plate` families, so the markup names the hardware it is wearing and the programme's
   asset-coverage grep (FIELD_HARDWARE_PROGRAM.md §3 rule 4) finds this screen. That module calls
   the classes MARKERS, not painters — true of the JS painters in
   `src/ui/station/screens/fhChrome.js`, but NOT of `assets/ui/kit/kit/fh.css`, which really does
   style `.fh-key`. Almost every property it attaches there is out-ranked by the
   `.ast-screen .aw-*` rules above — deliberately, because those rules ARE the kit, applied at
   this screen's law: the same produced sprites, at law §6.1-§6.3's geometry, in sentence case.

   THREE properties are not, and they are the whole reason this block exists. All are load-order
   traps, not taste:

   1. `text-transform`. fh.css sets `uppercase` on `.fh-key`, because a kit key is a POSTER/BENCH
      register control and those are stencilled hull markings. `.ast-screen *` at the top of this
      file already says `none` — but at (0,1,0) it merely TIES `.fh-key`, and index.html loads
      styles/kit.css AFTER styles/asteroid-ops.css, so the tie goes to the kit and every verb on
      this screen SHOUTS. That is ASTEROID_WORKS_DESIGN_LAW §3.3's deleted voice returning
      ("harsh fonts ... everything about it is lame" is the owner on exactly this), and law §11.4
      fails the screen on one uppercase computed style — scripts/check-asteroid-theater.mjs walks
      every visible element and counts them. Naming the element's own class as well makes this
      (0,2,0) and settles it.

   1b. `letter-spacing`. Same `.fh-key` rule sets `.1em`, and `.ast-screen *` declares no
      letter-spacing at all — so nothing even ties it, and every `fh-key` element here inherits
      the bench track unless its own class sets one. `.aw-drawer-key` is that element: an icon
      button with no tracking of its own. The law caps tracking at .02em (§3.4), which is what
      `--fh-track-display` already is; naming it here reaches every marker key at once.

   2. `min-width`. fh.css floors a key at 120px (88px small, 96px legend) because it is sized for
      a bench at 1920. This screen's controls are a 30px stepper, a 30px icon button and a crest key inside
      a 40px strip; the small key's 88px floor alone would treble the icon button and push the
      crest's right cluster off the end of its own strip. `width` does not beat `min-width`, so
      zeroing the floor is what lets the `width: 30px` above mean 30px.

   `font-variation-settings` is a third, quieter one. fh.css pins `'wght' 600, 'wdth' 62` for
   Archivo's width axis; the faces here are Instrument Sans and Spline Sans Mono, which have no
   width axis but ARE variable in weight, so the `wght` half lands and outranks the `font: 500`
   the rules above authored — every verb on the screen would come back one step heavier than it
   was drawn. `normal` hands the weight back to the shorthand.

   Nothing else is neutralised here. The kit keeps the sprite states, the focus ring, the cursor
   and the transparent ground — those agree with the law already. */
.ast-screen .fh-key,
.ast-summary-box .fh-key {
  text-transform: none;
  letter-spacing: var(--fh-track-display);
  font-variation-settings: normal;
}
/* The width floor is released for the SCREEN only. The extraction report's one verb is the one
   control here that genuinely wants a wide key — `.ast-summary-box .sf-btn { min-width: 150px }`
   above — and that 150px already out-ranks fh.css's 120px on specificity, so it needs no help.
   Zeroing it in the shared rule would instead out-rank the 150px from further down the file and
   shrink-wrap the button to the word "Acknowledge". */
.ast-screen .fh-key { min-width: 0; }
/* Every other control declares its own `min-height: 30px` at (0,2,0), which beats the kit's
   floors. The drawer key declares `height` and no `min-height`, so `.fh-key--small`'s 36px still
   binds — used height is the LARGER of the two — and the crest's one icon would stand 6px taller
   than the leave key beside it. Released here and nowhere else: in the shared rule above, a
   `min-height: 0` would tie those 30px floors and beat them on order. */
.ast-screen .aw-drawer-key.fh-key { min-height: 0; }
