/* public/procedure.css — the procedure engine.
 *
 * ── THE IDEA ────────────────────────────────────────────────────────────────
 * This is an instrument, not a page. It should feel like something that was
 * switched ON: it boots, its gauges settle, you set operands, you press a
 * physical-feeling key, and it prints a derivation line by line.
 *
 * That reading is doing real work. The product's whole claim here is
 * "computed, not generated" — and a page that looks like every other web form
 * quietly argues the opposite. Monospace, gauges, a lamp and a printed trace
 * say "deterministic machine" before a word is read.
 *
 * Standalone: it does NOT import the chat app's stylesheet. Those tokens are
 * built for a conversational product in two themes; this is one committed
 * dark instrument, and sharing a palette would drag it back towards the app.
 */

/* ── Ground ─────────────────────────────────────────────────────────────── */

/* LIGHT is the base; dark is the override under html.dark — the same class
 * and the same localStorage key ("tinman-theme") the chat app uses, so the
 * theme carries across when you move between them.
 *
 * The instrument reading survives the switch because it never depended on
 * darkness — it depends on monospace, gauges, a lamp and a printed trace.
 * What DOES have to change is how the signal colours are made: on a dark
 * face a lamp reads as EMITTED light, so it is a bright hue plus a glow. On
 * a light face nothing emits, and the same treatment reads as a smudge. So
 * light mode uses darker, denser hues at full saturation and drops the glow
 * to a tight ring — printed-and-lacquered rather than lit-from-behind.
 * That is why these are not simply inverted values.
 */
:root {
  --ink:        oklch(14% 0.005 60);   /* readout text — Suzie ink */
  --ink-2:      oklch(30% 0.008 60);
  --ink-3:      oklch(38% 0.010 60);
  --panel:      oklch(99% 0.006 90);   /* card / parchment brighter */
  --panel-2:    oklch(94% 0.014 90);   /* recessed — Suzie raised */
  --bezel:      oklch(14% 0.005 60 / 0.18);
  --bezel-2:    oklch(14% 0.005 60 / 0.30);
  --void:       oklch(96.5% 0.012 90); /* parchment ground */

  /* Signal hues — preserve live/caution readability on parchment, fault and beam go Bauhaus. */
  --live:       #0f6234;   /* engine ready / verified — keep forest green for AA on parchment */
  --caution:    #7a5006;   /* proviso */
  --fault:      oklch(42% 0.150 27);   /* oxblood — was #a52a1c */
  --beam:       oklch(78% 0.155 78);   /* saffron — was #9c0f28 cherry */

  /* Glow strength — Bauhaus uses hairlines, not glows in light mode. */
  --glow-live:   0 0 0 1px oklch(78% 0.155 78 / 0.0);
  --glow-fault:  0 0 0 1px oklch(42% 0.150 27 / 0.45);
  --lift:        none;   /* Bauhaus: no drop shadows, hairline borders only */
  --face:        linear-gradient(180deg, oklch(99% 0.006 90), oklch(96.5% 0.012 90));
  --head-face:   linear-gradient(180deg, oklch(99% 0.006 90), oklch(94% 0.014 90));
  /* Hairlines — ink at low alpha, matching Suzie. */
  --hair:        oklch(14% 0.005 60 / 0.16);
  --hair-soft:   oklch(14% 0.005 60 / 0.10);
  --sheen:       oklch(14% 0.005 60 / 0.06);
  --scan:        rgba(16,18,22,.020);
  --wash-live:   rgba(15,98,52,.13);
  --wash-caution:rgba(122,80,6,.15);
  --wash-fault:  oklch(42% 0.150 27 / 0.10);
  --fault-ink:   oklch(42% 0.150 27);
  --caution-ink: #4d3304;
  --key-face:    linear-gradient(180deg, oklch(78% 0.155 78), oklch(70% 0.150 72));
  --key-edge:    oklch(78% 0.155 78);
  --key-shadow:  0 1px 0 oklch(70% 0.150 72), 0 0 0 1px oklch(78% 0.155 78 / 0.28);
  --vignette:    oklch(78% 0.155 78 / 0.05);

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --disp: "Archivo", "IBM Plex Sans", system-ui, sans-serif;

  --r: 0;
  --ease: cubic-bezier(.2,.7,.2,1);
}

html.dark {
  --ink:        oklch(94% 0.010 90);
  --ink-2:      oklch(80% 0.012 80);
  --ink-3:      oklch(64% 0.012 80);
  --panel:      oklch(13% 0.008 80);
  --panel-2:    oklch(17% 0.010 80);
  --bezel:      oklch(94% 0.010 90 / 0.16);
  --bezel-2:    oklch(94% 0.010 90 / 0.22);
  --void:       oklch(13% 0.008 80);

  --live:       #4fdd92;
  --caution:    #f5b950;
  --fault:      oklch(58% 0.180 27);
  --beam:       oklch(78% 0.155 78);   /* saffron */

  --glow-live:   0 0 9px rgba(79,221,146,.8);
  --glow-fault:  0 0 9px oklch(58% 0.180 27 / 0.75);
  --lift:        none;
  --face:        linear-gradient(180deg, oklch(13% 0.008 80), oklch(17% 0.010 80));
  --head-face:   linear-gradient(180deg, oklch(17% 0.010 80), oklch(13% 0.008 80));
  --hair:        oklch(94% 0.010 90 / 0.16);
  --hair-soft:   oklch(94% 0.010 90 / 0.10);
  --sheen:       oklch(94% 0.010 90 / 0.06);
  --scan:        rgba(255,255,255,.014);
  --wash-live:   rgba(72,209,138,.09);
  --wash-caution:rgba(224,164,65,.12);
  --wash-fault:  oklch(58% 0.180 27 / 0.12);
  --fault-ink:   oklch(94% 0.010 90);
  --caution-ink: #f0dcb6;
  --key-face:    linear-gradient(180deg, oklch(78% 0.155 78), oklch(70% 0.150 72));
  --key-edge:    oklch(78% 0.155 78);
  --key-shadow:  0 1px 0 oklch(13% 0.008 80), 0 0 0 1px oklch(78% 0.155 78 / 0.28);
  --vignette:    oklch(78% 0.155 78 / 0.10);
}

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

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

body.eng {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  /* Faint scanline + vignette. Texture, not decoration: it reads as a screen
     rather than a document, which is the whole point. */
  background-image:
    repeating-linear-gradient(180deg, var(--scan) 0 1px, transparent 1px 3px),
    radial-gradient(120% 80% at 50% 0%, var(--vignette), transparent 60%);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  padding: 20px 16px 48px;
}

.eng__frame {
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid var(--bezel);
  border-radius: 2px;
  background: var(--face);
  box-shadow: var(--lift);
  overflow: hidden;
}

/* ── Head ───────────────────────────────────────────────────────────────── */

.eng__head {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bezel);
  background: var(--head-face);
}
.eng__back {
  color: var(--ink-3); text-decoration: none; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  padding: 6px 2px;
}
.eng__back:hover { color: var(--ink); }

.eng__id { display: flex; align-items: center; gap: 9px; flex: 1 1 auto; min-width: 0; }
/* A small etched sigil — the engine's "plate". */
.eng__mark {
  width: 13px; height: 13px; flex: 0 0 auto; border-radius: 2px;
  background: conic-gradient(from 45deg, var(--beam), oklch(60% 0.140 70), var(--beam));
  box-shadow: 0 0 8px oklch(78% 0.155 78 / 0.35), inset 0 0 0 1px rgba(255,255,255,.16);
}
.eng__name {
  margin: 0; font-size: 12px; font-weight: 400; letter-spacing: .14em;
  color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.eng__name b { color: var(--ink); font-weight: 700; }

/* Theme toggle. Sized and spaced like the lamp beside it so the head reads
   as one row of instruments, not a control bolted onto an instrument. Icon
   swap is pure CSS off html.dark — no JS touches the SVGs. */
.eng__theme {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0;
  border: 1px solid var(--bezel-2); border-radius: var(--r);
  background: transparent; color: var(--ink-3);
  cursor: pointer; transition: color .15s var(--ease), border-color .15s var(--ease);
}
.eng__theme:hover { color: var(--ink); border-color: var(--ink-3); }
.eng__theme:focus-visible { outline: 2px solid var(--beam); outline-offset: 2px; }
.theme-icon-sun { display: block; }
.theme-icon-moon { display: none; }
html.dark .theme-icon-sun { display: none; }
html.dark .theme-icon-moon { display: block; }

/* ── Live ticker ───────────────────────────────────────────────────────────
   A tally of what EVERYONE has computed, not what this visitor has. It sits
   between the rule-pack strip and the creed, and stays deliberately quiet:
   the instrument's readings are the subject of this page, and a counter that
   competed with them would be the tail wagging the dog. */
.eng__ticker {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px;
  padding: 8px 16px 9px;
  border-bottom: 1px solid var(--bezel);
  background: var(--panel-2);
  font-size: 10.5px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.eng__ticker:empty { display: none; }   /* before the first poll lands */

.eng__ticker-live {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--live); letter-spacing: .14em; font-weight: 700;
}
.eng__ticker-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--live); box-shadow: var(--glow-live);
  animation: eng-ticker-pulse 2s ease-in-out infinite;
}
.eng__ticker-item { white-space: nowrap; }
.eng__ticker-n {
  color: var(--ink); font-weight: 700;
  /* Tabular figures: without them every tick shifts the label beside the
     number left and right, and the whole row appears to twitch. */
  font-variant-numeric: tabular-nums;
}
.eng__ticker-n.is-tick { animation: eng-ticker-tick .5s ease-out; }

@keyframes eng-ticker-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .3; transform: scale(.75); }
}
@keyframes eng-ticker-tick {
  0%   { color: var(--live); }
  100% { color: var(--ink); }
}

/* The account badge — same lamp language (a lit dot + a label), shown only
   once /api/auth/me confirms a session. It exists to say the one thing the
   free-computation wall depends on: whether THIS visit is unlimited. */
.eng__account {
  display: flex; align-items: center; gap: 6px; flex: 0 0 auto;
  font-size: 10px; letter-spacing: .08em; color: var(--live);
  padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--live) 40%, transparent); border-radius: 999px;
  background: var(--wash-live);
}
.eng__account[hidden] { display: none; }
.eng__account-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--live); box-shadow: var(--glow-live);
}
.eng__account-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }

/* The lamp. Three states, and it is the page's single most honest element:
   it says what the engine is actually doing right now. */
.eng__lamp {
  display: flex; align-items: center; gap: 7px; flex: 0 0 auto;
  font-size: 10px; letter-spacing: .1em; color: var(--ink-3);
}
.eng__lamp-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-3); box-shadow: 0 0 0 0 transparent;
  transition: background .2s, box-shadow .2s;
}
.eng__lamp[data-state="boot"] .eng__lamp-dot { background: var(--caution); animation: pulse 1s infinite; }
.eng__lamp[data-state="ready"] .eng__lamp-dot { background: var(--live); box-shadow: var(--glow-live); }
.eng__lamp[data-state="ready"] .eng__lamp-text { color: var(--live); }
.eng__lamp[data-state="busy"] .eng__lamp-dot { background: var(--beam); animation: pulse .55s infinite; }
.eng__lamp[data-state="fault"] .eng__lamp-dot { background: var(--fault); box-shadow: var(--glow-fault); }
.eng__lamp[data-state="fault"] .eng__lamp-text { color: var(--fault); }
@keyframes pulse { 50% { opacity: .25; } }

/* ── Status strip ───────────────────────────────────────────────────────── */

.eng__strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--bezel);
  background: var(--panel-2);
}
.eng__gauge {
  padding: 11px 8px; text-align: center;
  border-right: 1px solid var(--hair-soft);
  display: flex; flex-direction: column; gap: 2px;
}
.eng__gauge:last-child { border-right: 0; }
.eng__gauge b {
  font-size: 19px; font-weight: 500; letter-spacing: -.02em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.eng__gauge i {
  font-style: normal; font-size: 9px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3); line-height: 1.25;
}
.eng__gauge[data-k="verified"] b { color: var(--live); }
.eng__gauge[data-k="proviso"] b { color: var(--caution); }
/* Shown in fault red ONLY when it is non-zero — the count of what the pack
   is NOT sure of is published deliberately, and hiding it would make this
   strip marketing. */
.eng__gauge[data-k="unsupported"] b.is-nonzero { color: var(--fault); }
.eng__gauge--zero b { color: var(--live); }

/* A gauge that has just landed ticks up rather than appearing. */
.eng__gauge b.is-set { animation: land .5s var(--ease) both; }
@keyframes land { from { opacity: 0; transform: translateY(-4px); } }

.eng__creed {
  margin: 0; padding: 12px 16px;
  border-bottom: 1px solid var(--bezel);
  font-size: 11.5px; line-height: 1.6; color: var(--ink-3);
}
.eng__creed b { color: var(--ink-2); font-weight: 500; }

/* ── Operands ───────────────────────────────────────────────────────────── */

.eng__body { padding: 16px; }

.eng__inputs { display: flex; flex-direction: column; gap: 0; }

.eng__row {
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--hair);
}
.eng__key {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
}
.eng__val {
  width: 100%;
  font-family: var(--mono); font-size: 13px; color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--bezel-2);
  border-radius: var(--r);
  padding: 8px 10px;
  min-height: 38px;
}
.eng__val:focus-visible { outline: 2px solid var(--beam); outline-offset: 1px; border-color: var(--beam); }
/* Native date/select pickers are white-on-white in a dark shell without this. */
.eng__val::-webkit-calendar-picker-indicator { filter: invert(.7); cursor: pointer; }
select.eng__val { appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: right 14px center, right 9px center;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  padding-right: 30px;
}
.eng__hint { grid-column: 2; font-size: 10.5px; color: var(--ink-3); margin: -2px 0 0; }

/* Checkbox rows for the affidavit checker. */
.eng__checks { display: flex; flex-direction: column; gap: 1px; }
.eng__check {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 10px; border-radius: var(--r);
  font-size: 12px; line-height: 1.45; color: var(--ink-2); cursor: pointer;
}
.eng__check:hover { background: var(--sheen); color: var(--ink); }
.eng__check input { margin: 2px 0 0; accent-color: var(--live); flex: 0 0 auto; width: 15px; height: 15px; }

/* ── The key ────────────────────────────────────────────────────────────── */

.eng__actions { display: flex; align-items: center; gap: 14px; padding-top: 16px; flex-wrap: wrap; }

.eng__go {
  position: relative; overflow: hidden;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .16em;
  color: #fff;
  background: var(--key-face);
  border: 1px solid var(--key-edge);
  border-radius: var(--r);
  padding: 11px 26px;
  cursor: pointer;
  box-shadow: var(--key-shadow);
  transition: transform .06s var(--ease), box-shadow .12s, filter .12s;
}
.eng__go:hover:not(:disabled) { filter: brightness(1.1); }
/* It depresses. A key that moves is a key you believe did something. */
.eng__go:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 #5e0a18, 0 4px 12px -8px rgba(232,177,58,.8); }
.eng__go:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.eng__go:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }

/* A sweep across the key while the engine is working. */
.eng__go-bar {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-100%);
}
.eng__go.is-busy .eng__go-bar { animation: sweep .9s linear infinite; }
@keyframes sweep { to { transform: translateX(100%); } }

.eng__quota { font-size: 10.5px; letter-spacing: .06em; color: var(--ink-3); }
.eng__quota b { color: var(--ink-2); font-weight: 500; }
.eng__quota.is-out { color: var(--caution); }
.eng__quota a { color: var(--live); text-decoration: underline; text-underline-offset: 2px; }

/* ── Readout ────────────────────────────────────────────────────────────── */

.eng__out { margin-top: 20px; }
.eng__out:empty { display: none; }

.eng__panelout {
  border: 1px solid var(--bezel);
  border-radius: var(--r);
  background: var(--panel-2);
  overflow: hidden;
}
.eng__panelout + .eng__panelout { margin-top: 12px; }

.eng__cap {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 12px;
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--bezel);
  background: var(--sheen);
}

/* The trace. Each line lands in sequence — the engine printing, not a page
   appearing. Staggered by an inline --i set in JS. */
.eng__trace { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.eng__line {
  display: grid; grid-template-columns: 132px 1fr; gap: 10px;
  font-size: 12px;
  animation: print .26s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes print { from { opacity: 0; transform: translateX(-5px); } }
.eng__line dt { color: var(--ink-3); letter-spacing: .04em; }
.eng__line dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.eng__line dd small { color: var(--ink-3); }
.eng__line--rule { grid-column: 1 / -1; border-top: 1px solid var(--bezel); margin: 5px 0; padding: 0; }

/* The answer. It gets the display serif — the one place the instrument
   stops being a machine and states a date a person will write down. */
.eng__answer {
  padding: 16px 12px 18px; text-align: center;
  border-top: 1px solid var(--bezel);
  background:
    radial-gradient(80% 120% at 50% 0%, var(--wash-live), transparent 70%);
  animation: print .4s var(--ease) both; animation-delay: .35s;
}
.eng__answer b {
  display: block; font-family: var(--disp); font-weight: 600;
  font-size: clamp(26px, 7vw, 40px); line-height: 1.1; letter-spacing: -.01em;
  color: var(--ink);
}
.eng__answer i {
  display: block; font-style: normal; margin-top: 6px;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
}
.eng__answer--caution { background: radial-gradient(80% 120% at 50% 0%, var(--wash-caution), transparent 70%); }
.eng__answer--fault   { background: radial-gradient(80% 120% at 50% 0%, var(--wash-fault), transparent 70%); }

/* Verification badge — carried on every answer, never folded away. */
.eng__stamp {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid currentColor;
}
.eng__stamp--verified { color: var(--live); }
.eng__stamp--proviso  { color: var(--caution); }
.eng__stamp--unsupported { color: var(--fault); }

/* Warnings and provisos sit ABOVE the fold of the answer, at full weight. A
   date that is only conditionally right must not read as settled. */
.eng__warn {
  margin: 0; padding: 10px 12px;
  border-top: 1px solid var(--bezel);
  border-left: 2px solid var(--caution);
  background: var(--wash-caution);
  font-size: 11.5px; line-height: 1.55; color: var(--caution-ink);
}
.eng__warn--fault { border-left-color: var(--fault); background: var(--wash-fault); color: var(--fault-ink); }

.eng__steps { list-style: none; margin: 0; padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.eng__step {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: baseline;
  padding: 7px 0; border-bottom: 1px dashed var(--hair);
  font-size: 12px;
  animation: print .24s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms);
}
.eng__step:last-child { border-bottom: 0; }
.eng__step-n { color: var(--ink-3); font-size: 10px; }
.eng__step-d { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.eng__step-d.is-pending { color: var(--ink-3); }

/* The wall. */
.eng__wall { padding: 20px 16px; text-align: center; }
.eng__wall h2 {
  margin: 0 0 8px; font-family: var(--disp); font-size: 20px; font-weight: 600; color: var(--ink);
}
.eng__wall p { margin: 0 auto 16px; max-width: 44ch; font-size: 12px; color: var(--ink-2); line-height: 1.6; }
.eng__wall-go {
  display: inline-block; text-decoration: none;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em;
  color: #fff; background: var(--key-face);
  border: 1px solid var(--key-edge); border-radius: var(--r); padding: 10px 22px;
}
.eng__wall-go:hover { filter: brightness(1.1); }

.eng__foot { padding: 12px 16px 14px; border-top: 1px solid var(--bezel); }
.eng__foot p { margin: 0; font-size: 10.5px; line-height: 1.55; color: var(--ink-3); }

.eng__noscript { max-width: 820px; margin: 16px auto; padding: 12px 16px;
  border: 1px solid var(--bezel); border-radius: var(--r); color: var(--ink-2); font-size: 12px; }
.eng__noscript a { color: var(--live); }

/* ── Narrow ─────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  body.eng { padding: 10px 8px 32px; font-size: 13px; }
  .eng__strip { grid-template-columns: repeat(3, 1fr); }
  .eng__gauge { border-bottom: 1px solid var(--hair-soft); }
  .eng__gauge:nth-child(3n) { border-right: 0; }
  .eng__gauge b { font-size: 17px; }
  /* Label above field: 128px of gutter is most of a phone. */
  .eng__row { grid-template-columns: 1fr; gap: 5px; }
  .eng__hint { grid-column: 1; }
  .eng__line { grid-template-columns: 106px 1fr; gap: 8px; font-size: 11.5px; }
  .eng__step { grid-template-columns: 20px 1fr; }
  .eng__step-d { grid-column: 2; }
  .eng__go { width: 100%; min-height: 46px; }
  .eng__actions { gap: 10px; }
}

/* Thumbs. */
@media (pointer: coarse) {
  .eng__val { min-height: 44px; }
  .eng__check { min-height: 44px; align-items: center; }
  .eng__back { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Motion is decoration here — the readout must be complete and legible with
   every animation switched off. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .eng__line, .eng__answer, .eng__step, .eng__gauge b { opacity: 1; transform: none; }
  .eng__ticker-dot, .eng__ticker-n.is-tick { animation: none; }
}

/* A printed answer is a working document. Ink on paper, no chrome. */
@media print {
  body.eng { background: #fff; color: #000; padding: 0; }
  .eng__frame { border: 0; box-shadow: none; background: #fff; }
  .eng__head, .eng__inputs, .eng__creed, .eng__back { display: none; }
  .eng__answer b, .eng__line dd, .eng__gauge b { color: #000; }
  .eng__panelout { border-color: #999; background: #fff; break-inside: avoid; }
}
