/* recompute.css — the in-browser GEOMETRY recompute island. Matches the INDEX
   (door) verification treatment exactly, so every case page's recompute reads as
   the same instrument as the door's Beat-2 record: a surface card (radius 16 +
   soft elevation), an uppercase micro-label heading, olive solid buttons, and a
   LIGHT readout — mono hex on a --chip with uppercase row labels — plus a colour
   verdict. Leans on each page's tokens (--accent, --surface, --hairline,
   --ink-900, --muted, --text, --chip, --pass, --fail, --mono, --sans, --bg). */

.recompute { margin: 4rem 0 0; padding: clamp(1.4rem, 2.6vw, 1.8rem);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 20px 40px -18px rgba(16,24,40,0.14); }
.recompute h2 { margin: 0 0 0.9rem; font-family: var(--sans); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.recompute-lede { font-size: 0.98rem; line-height: 1.65; color: var(--text); margin: 0 0 0.4rem; max-width: 62ch; }
.recompute-lede em { font-style: normal; font-weight: 600; color: var(--accent); }
.recompute-lede .mono { font-size: 0.86em; }
.mono { font-family: var(--mono, ui-monospace, SFMono-Regular, monospace); font-weight: 400; }

/* actions — the door's verify-run, verbatim */
.recompute-actions { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin: 1.4rem 0 0; }
.recompute-run { padding: 0.7rem 1.3rem; font: inherit; font-size: 0.95rem; font-weight: 600; color: var(--bg, #fff);
  background: var(--accent); border: 1px solid var(--accent); border-radius: 9px; cursor: pointer; white-space: nowrap; }
.recompute-run:hover:not(:disabled) { background: #3a3d08; }
.recompute-run:disabled { opacity: 0.5; cursor: default; }
.recompute-run:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* hierarchy: "Recompute the number" (baseline) is primary/solid; the two "try to fool it"
   actions shift to a lighter olive tint — same family, visibly a different kind of action */
.recompute-run[data-op="reorder"], .recompute-run[data-op="tamper"] {
  background: rgba(76,80,11,0.09); color: var(--accent); border-color: rgba(76,80,11,0.28); }
.recompute-run[data-op="reorder"]:hover:not(:disabled), .recompute-run[data-op="tamper"]:hover:not(:disabled) {
  background: rgba(76,80,11,0.17); }

/* the readout — the door's light record display (mono hex on a chip, uppercase labels) */
.recompute-readout { margin: 1.5rem 0 0; }
.recompute-lcd { display: grid; gap: 0.5rem; }
.recompute-line { display: flex; gap: 0.7rem; align-items: baseline; flex-wrap: wrap; }
.recompute-key { font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); min-width: 8.4rem; }
.recompute-geom, .recompute-file { font-family: var(--mono, ui-monospace, SFMono-Regular, monospace);
  font-weight: 400; font-size: 0.78rem; color: var(--ink-900); background: var(--chip);
  padding: 0.2rem 0.5rem; border-radius: 6px; overflow-wrap: anywhere; max-width: 100%; }

.recompute-result { font-size: 0.95rem; line-height: 1.6; margin: 1.1rem 0 0; min-height: 1em; overflow-wrap: anywhere; }
.recompute-result.recompute-pass { color: var(--pass); font-weight: 600; }
.recompute-result.recompute-ring { color: var(--fail); font-weight: 600; }
.recompute-result.recompute-bad { color: var(--fail); }
.recompute-note { font-size: 0.8rem; color: var(--muted); line-height: 1.6; margin: 0.5rem 0 0; }

.recompute-caveat { font-size: 0.8rem; color: var(--muted); line-height: 1.65; margin: 1.8rem 0 0;
  padding-top: 1.4rem; border-top: 1px solid var(--hairline); max-width: 62ch; }
.recompute-boundary { font-size: 0.8rem; color: var(--muted); line-height: 1.65; margin: 0.9rem 0 0; max-width: 62ch; }
.recompute-caveat code, .recompute-boundary code { font-family: var(--mono, ui-monospace, SFMono-Regular, monospace); font-size: 0.82em; }
.recompute-caveat a { color: var(--accent); text-underline-offset: 3px; }

/* the two reveals — "what just happened" (mechanism) + "what this proves" (scope) */
.recompute-fold { margin-top: 1.3rem; border-top: 1px solid var(--hairline); padding-top: 0.9rem; }
.recompute-fold > summary { font-size: 0.85rem; font-weight: 600; color: var(--accent); cursor: pointer;
  list-style: none; padding: 0.25rem 0; }
.recompute-fold > summary::-webkit-details-marker { display: none; }
.recompute-fold > summary::before { content: "\25B8\00a0"; font-weight: 400; }
.recompute-fold[open] > summary::before { content: "\25BE\00a0"; }
.recompute-fold-body { font-size: 0.82rem; color: var(--muted); line-height: 1.65; margin-top: 0.55rem; max-width: 62ch; }
.recompute-fold-body p { margin-top: 0.6rem; }
.recompute-fold-body p:first-child { margin-top: 0; }
.recompute-fold-body em { font-style: normal; font-weight: 600; color: var(--accent); }
.recompute-fold-body code { font-family: var(--mono, ui-monospace, SFMono-Regular, monospace); font-size: 0.82em; }
.recompute-fold-body a { color: var(--accent); text-underline-offset: 3px; }
