/* Page scaffold (per-tool by design — the fermi/flow centred column) + the
   alarm-specific surface. Shared bits come from tokens/about/controls/mobile.css. */
/* instrument tier: the dot canvas re-flows to the wrap (more dots/row); the distribution
   SVG measures on screen but exports pinned at DIST_W (alarm/app.js). */
.wrap{max-width:var(--w-instrument);margin:0 auto;padding-inline:16px;display:flex;flex-direction:column;gap:20px}
main{display:flex;flex-direction:column;gap:20px}
.card{background:var(--card);border:1px solid var(--border);border-radius:0;
  box-shadow:var(--shadow);padding:22px}
.card h2{font-family:"Helvetica Neue",Helvetica,"Segoe UI",Roboto,sans-serif;font-size:16px;margin:0 0 10px}
.cardintro{color:var(--muted);font-size:13.5px;margin:0 0 16px;max-width:70ch}
.cardintro b{color:var(--ink);font-weight:600}

.chips{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:16px}
.chip.on{border-color:var(--accent);color:var(--accent-ink)}
.chip.ghost{border-style:dashed;color:var(--muted)}
.chip.claimed{background:var(--accent);color:var(--card);border-color:var(--accent);
  font-weight:600;cursor:default}

/* distribution plot: full-width SVG, panning on phones (never shrunk) */
#distwrap{margin:4px 0 18px;overflow-x:auto}
/* board-width rule: the distribution PANS on a phone (min-width floor), never
   shrinks below legibility — app.js floors the render width to match, so the
   authored px == displayed px (scale 1) and the ≥8px label gate holds honestly */
#distwrap svg{display:block;width:100%;min-width:520px;height:auto;touch-action:pan-y}
#distwrap [data-drag]{cursor:ew-resize}
#distwrap [data-drag]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:18px 28px}
@media (max-width:640px){.controls{grid-template-columns:1fr}}
.ctl label{display:flex;justify-content:space-between;align-items:baseline;
  font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted);margin-bottom:8px}
.ctl output{font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  font-variant-numeric:tabular-nums;font-size:14px;font-weight:600;color:var(--ink);
  text-transform:none;letter-spacing:0}
input[type=range]{width:100%;accent-color:var(--accent);--fill:50%;
  -webkit-appearance:none;appearance:none;height:6px;border-radius:0;
  background:linear-gradient(90deg,var(--accent) var(--fill),var(--track) var(--fill))}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;
  width:22px;height:22px;border-radius:50%;background:var(--accent);
  border:2px solid var(--card);box-shadow:var(--shadow)}
input[type=range]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;
  background:var(--accent);border:2px solid var(--card)}
input[type=range]:focus-visible,button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* the gate canvas re-flows to its container width (a genuine narrow relayout,
   not a pan) — layoutFlow re-packs the 1,000 dots and app.js shrinks the dot
   radius on narrow; exports are the wide distribution SVG, never the canvas */
#gate{display:block;width:100%;height:360px}

/* verdict — the quotable readout. The alarm-bin line is the page's ONE Swiss 6b
   verdict block (assets/page.css owns its type); miss and fine are its supporting
   lines and stay body-sized. The block opens the readout card, so it drops the
   shared 40px top margin here. */
.readout .verdict-block{margin-top:0}
.verdict-miss{font-size:15.5px;color:var(--ink);margin:8px 0 0;max-width:66ch}
.verdict-fine{font-size:12.5px;color:var(--muted);margin:6px 0 0;
  font-variant-numeric:tabular-nums}

/* natural-frequency 2x2 box + capsule chips */
.fqbox{margin-top:18px}
.fq-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fq-cell{border:1px solid var(--border);border-radius:0;padding:12px 14px;
  display:flex;flex-direction:column;gap:2px;background:var(--bg)}
.fq-cell b{font-family:ui-monospace,Menlo,monospace;font-size:22px;font-weight:700;
  font-variant-numeric:tabular-nums;line-height:1}
.fq-cell span{font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.fq-tp b{color:var(--accent-ink)} .fq-fp b{color:var(--st-risk-ink)}
.fq-fn b{color:var(--st-blocked-ink)} .fq-tn b{color:var(--muted)}
.fq-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.cap{display:inline-flex;align-items:baseline;gap:6px;padding:4px 10px;border-radius:0;
  background:color-mix(in srgb,var(--accent) 12%,transparent);
  font-size:12.5px;font-variant-numeric:tabular-nums;color:var(--ink)}
.cap i{font-style:normal;color:var(--accent-ink);font-weight:600;
  text-transform:uppercase;letter-spacing:.04em;font-size:11px}

.method{color:var(--muted);font-size:12.5px}

/* claim popover */
.claim-pop{position:fixed;left:50%;top:20%;transform:translateX(-50%);z-index:20;
  background:var(--card);border:1px solid var(--border);border-radius:0;
  box-shadow:var(--shadow);padding:18px 20px;max-width:340px;width:calc(100% - 40px)}
.claim-pop p{margin:0 0 12px;font-size:13.5px;color:var(--muted)}
.claim-row{display:flex;gap:14px;flex-wrap:wrap}
.claim-row label{font-size:12.5px;color:var(--ink);display:flex;align-items:center;gap:6px}
.claim-row input{width:64px;font-size:16px;padding:6px 8px;border:1px solid var(--border);
  border-radius:0;background:var(--bg);color:var(--ink);
  font-family:ui-monospace,Menlo,monospace}
.claim-actions{display:flex;gap:10px;margin-top:16px}

@media (pointer:coarse){
  .btn,.chip{min-height:44px;display:inline-flex;align-items:center}
  .claim-row input{min-height:44px}
}

/* Phone edge system — "16px prose / 10px surface" (Camp A, assets/workspace.css):
   the reading gutter lives on the base .wrap (unconditional — prose sat flush
   through the 640→max-width tablet band too); ≤640 cards full-bleed as native
   sheets (side borders + radius dropped, top/bottom hairlines kept). */
@media (max-width:640px){
  .card{margin-inline:-16px;border-inline:none;border-radius:0;padding-inline:12px}
}
