/* VermisDimorph — a focused interface for dorsal morphology.
   Restrained green and red distinguish the two estimates.
   Mobile is the base layout; wide screens only add room where it helps. */

:root {
  --ink: #04060b;
  --ink-raised: #090e17;
  --ink-line: #16202f;
  --text: #dbe6f2;
  --text-dim: #7b8ca3;
  --text-faint: #4d5c70;

  --male: #22e0ff;
  --female: #ff2fb9;
  --signal: #9dff3c;      /* structural accent: never used for a verdict */
  --warning: #ffbf47;

  --radius: 14px;
  --gutter: 16px;         /* page edge; widens with the viewport */
  --pad: 18px;            /* panel inner padding */
  --tap: 46px;            /* smallest thing a thumb is asked to hit */
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Hiragino Sans", "Yu Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  /* Safari inflates text in landscape unless told not to, which breaks every
     size decision below. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body { overflow-x: hidden; }

/* A faint grid, plus a slow wash of colour from the two verdict hues so the
   page feels lit rather than merely dark. The grid pitch is set in absolute
   pixels, so on a phone it has to shrink or it reads as three stripes. */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(60rem 40rem at 12% -10%, rgba(34, 224, 255, 0.10), transparent 60%),
    radial-gradient(50rem 36rem at 88% 8%, rgba(255, 47, 185, 0.09), transparent 62%),
    linear-gradient(var(--ink-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 34px 34px, 34px 34px;
  opacity: 0.55;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 100%);
}

main, .topbar, footer { position: relative; z-index: 1; }

/* One rule owns the horizontal frame for all three bands, so the notch inset
   can be applied once instead of being forgotten in two places. */
.topbar, main, footer {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:where(button, .button, summary):focus-visible,
#fileInput:focus-visible + .button {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

/* ---- header ---------------------------------------------------------- */

.topbar {
  padding-top: 26px;
  padding-bottom: 10px;
  display: grid;
  grid-template-areas: "mark" "tag" "status";
  gap: 2px;
}

.wordmark {
  grid-area: mark;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.mark-name { white-space: nowrap; }

.mark-version {
  margin-top: 2px;
  padding-left: 9px;
  border-left: 1px solid var(--signal);
  color: var(--signal);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  text-shadow: 0 0 12px rgba(157, 255, 60, 0.28);
  white-space: nowrap;
}

.mark-vermis {
  color: var(--male);
  text-shadow: 0 0 18px rgba(34, 224, 255, 0.55), 0 0 44px rgba(34, 224, 255, 0.22);
}

.mark-dimorph {
  color: var(--female);
  text-shadow: 0 0 18px rgba(255, 47, 185, 0.5), 0 0 44px rgba(255, 47, 185, 0.2);
}

.mark-dot {
  color: var(--text-faint);
  margin: 0 0.12em;
  text-shadow: none;
}

.tagline {
  grid-area: tag;
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 12.5px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tagline i { font-style: italic; }

.status {
  grid-area: status;
  justify-self: start;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  background: rgba(9, 14, 23, 0.8);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0;
  color: var(--text-dim);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--text-faint);
}

.status[data-state="ready"] .status-dot { background: var(--signal); box-shadow: 0 0 10px var(--signal); }
.status[data-state="busy"] .status-dot { background: var(--signal); animation: pulse 1s ease-in-out infinite; }
.status[data-state="warning"] { color: var(--warning); border-color: rgba(255, 191, 71, 0.35); }
.status[data-state="warning"] .status-dot { background: var(--warning); box-shadow: 0 0 10px rgba(255, 191, 71, 0.7); }
.status[data-state="error"] .status-dot { background: #ff5b5b; box-shadow: 0 0 10px #ff5b5b; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---- layout ---------------------------------------------------------- */

main {
  padding-top: 16px;
  padding-bottom: 48px;
  display: grid;
  gap: 14px;
}

.panel {
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(11, 17, 27, 0.94), rgba(6, 10, 17, 0.94));
  padding: var(--pad);
}

.panel h2 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hash { color: var(--signal); margin-right: 6px; }

.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.counter {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  white-space: nowrap;
}

.counter[data-ready="true"] { color: var(--signal); }

.lede { margin: 0 0 16px; color: var(--text-dim); font-size: 14px; line-height: 1.75; }
.lede b { color: var(--text); font-weight: 600; }

/* ---- collapsible 撮影条件 --------------------------------------------- */

/* A panel that holds a <details> gives up its own padding so the summary can
   run edge to edge: a tap target that stops short of the border is a tap
   target people miss. The padding moves inside, onto the head and the body. */
.panel.conditions,
.panel.intake { padding: 0; }

.collapsible-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 14px var(--pad);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.collapsible-head::-webkit-details-marker { display: none; }
.collapsible-head h2 { margin: 0; }

/* The counter belongs to the summary now, so it stays legible while the
   photograph panel is folded: 4 / 3 is the whole state of that section. */
.collapsible-head .counter { margin-left: auto; }
.collapsible-head .collapsible-hint + .counter { margin-left: 0; }
.collapsible-head .counter + .chevron { margin-left: 10px; }

.collapsible-hint {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  white-space: nowrap;
}

/* visibility, not display: the chevron must not slide sideways on open. */
.collapsible[open] > .collapsible-head .collapsible-hint { visibility: hidden; }

.chevron {
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-right: 1.5px solid var(--text-dim);
  border-bottom: 1.5px solid var(--text-dim);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s ease;
}

.collapsible[open] > .collapsible-head .chevron { transform: translateY(2px) rotate(-135deg); }

.collapsible-body { padding: 0 var(--pad) var(--pad); }
.collapsible-body .lede { margin-bottom: 14px; }

/* Closed, the head is the whole panel, so it stops leaning on the body below
   it for the bottom half of its breathing room. */
.collapsible:not([open]) > .collapsible-head { padding-bottom: 14px; }

.conditions-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}

.conditions-list b { color: var(--text); font-weight: 600; }
.conditions-list::marker, .conditions-list li::marker { color: var(--signal); font-family: var(--mono); }

/* ---- slots ----------------------------------------------------------- */

/* 120px keeps two columns on a 320px screen; auto-fill takes the rest. */
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.slot {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  border: 1px dashed var(--ink-line);
  border-radius: 12px;
  background: rgba(4, 6, 11, 0.7);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.slot[data-required="true"] { border-color: #23384d; }
.slot[data-filled="true"] { border-style: solid; border-color: #26506a; }
.slot[data-feedback="true"] { border-color: rgba(255, 191, 71, 0.72); }

/* An empty slot is a promise, not a picture, and five square promises push
   the 画像を追加 button off a phone screen. Empty ones stay short; a filled
   one takes its square back so the photograph is worth looking at. */
.slot[data-filled="false"] { aspect-ratio: 3 / 2; }

.slot-index {
  position: absolute;
  top: 8px;
  left: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  z-index: 2;
}

.slot-tag {
  position: absolute;
  top: 8px;
  right: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  z-index: 2;
  color: var(--text-faint);
}

.slot[data-required="true"] .slot-tag { color: var(--signal); }

.slot-image { width: 100%; height: 100%; object-fit: cover; display: none; }
.slot[data-filled="true"] .slot-image { display: block; }

.slot-caption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}

.slot[data-filled="true"] .slot-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 44px 8px 10px;   /* right gutter keeps the name clear of × */
  background: linear-gradient(180deg, transparent, rgba(4, 6, 11, 0.92));
  color: var(--text-dim);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-remove {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 6;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--ink-line);
  background: rgba(4, 6, 11, 0.85);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

/* A rejected photograph is a normal abstention, not a server failure. Put the
   explanation on the photograph so it remains obvious which frame needs to be
   replaced, especially on a phone where the detailed result rows sit below it. */
.slot-feedback {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 22px 12px 44px;
  background: rgba(4, 6, 11, 0.84);
  color: var(--text);
  text-align: center;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.slot-feedback[hidden] { display: none; }

.slot-feedback-title {
  max-width: 100%;
  color: var(--warning);
  font-size: 12px;
  line-height: 1.45;
}

.slot-feedback-detail {
  max-width: 100%;
  color: var(--text-dim);
  font-size: 10.5px;
  line-height: 1.55;
}

/* ---- slot progress --------------------------------------------------- */

/* Uploading is the slow step on a phone and the one with nothing on screen to
   show for it, so it is reported where the photographs are rather than in the
   status pill alone. --signal carries it: green is the page's structural
   accent and is never allowed to mean a verdict, so a progress bar cannot be
   misread as an answer. */
.slot-progress {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 6px;
  background: rgba(4, 6, 11, 0.78);
  text-align: center;
}

.slot[data-stage] .slot-progress { display: flex; }
.slot[data-stage] .slot-remove { display: none; }
.slot[data-stage] { border-style: solid; border-color: #35521f; }

.slot-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(157, 255, 60, 0.2);
  border-top-color: var(--signal);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.slot-progress-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--signal);
}

.slot-progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(157, 255, 60, 0.14);
  overflow: hidden;
}

.slot-progress-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--signal);
  transition: width 0.2s linear;
}

/* Reading a file and waiting on the model have no percentage to report, so
   they sweep rather than lie about how far along they are. */
.slot[data-stage="preparing"] .slot-progress-bar i,
.slot[data-stage="scoring"] .slot-progress-bar i {
  width: 38%;
  animation: sweep 1.2s ease-in-out infinite;
}

@keyframes sweep {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(370%); }
}

/* ---- buttons --------------------------------------------------------- */

/* Two rows on a phone: 追加 spans the width because it is the step every visit
   starts with, then 外す / 判定 share the line under the thumb. */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.actions .primary { grid-column: 1 / -1; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--ink-line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s, background 0.15s, transform 0.08s;
}

.button:disabled,
#fileInput:disabled + .button { opacity: 0.35; cursor: not-allowed; }
.button:active:not(:disabled) { transform: scale(0.985); }

.button.primary { border-color: #24455c; color: var(--male); }

.button.run {
  border-color: var(--signal);
  color: var(--ink);
  background: var(--signal);
  font-weight: 700;
}

.button.run:disabled { background: transparent; color: var(--text-faint); border-color: var(--ink-line); }

/* Hover states only where a pointer exists — on a touch screen they stick to
   the last thing tapped and read as a selection that isn't there. */
@media (hover: hover) and (pointer: fine) {
  .button:hover:not(:disabled) { border-color: var(--text-dim); }
  .button.primary:hover { box-shadow: 0 0 18px rgba(34, 224, 255, 0.2); border-color: var(--male); }
  .button.run:hover:not(:disabled) { box-shadow: 0 0 26px rgba(157, 255, 60, 0.35); }
  .slot-remove:hover { color: var(--female); border-color: var(--female); }
}

.hint { margin: 12px 0 0; font-family: var(--mono); font-size: 11.5px; line-height: 1.7; color: var(--text-faint); }

/* ---- result ---------------------------------------------------------- */

.result { border-color: #1d2a3c; }

.verdict { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }

.glyph {
  width: 74px;
  height: 74px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid var(--ink-line);
  font-size: 40px;
  line-height: 1;
  color: var(--text-faint);
}

.verdict[data-label="male"] .glyph {
  color: var(--male);
  border-color: var(--male);
  box-shadow: 0 0 34px rgba(34, 224, 255, 0.3), inset 0 0 26px rgba(34, 224, 255, 0.09);
  text-shadow: 0 0 22px rgba(34, 224, 255, 0.7);
}

.verdict[data-label="female"] .glyph {
  color: var(--female);
  border-color: var(--female);
  box-shadow: 0 0 34px rgba(255, 47, 185, 0.28), inset 0 0 26px rgba(255, 47, 185, 0.09);
  text-shadow: 0 0 22px rgba(255, 47, 185, 0.65);
}

.verdict[data-label="unknown"] .glyph {
  color: var(--warning);
  border-color: var(--warning);
  box-shadow: inset 0 0 22px rgba(255, 191, 71, 0.08);
}

.verdict-text { min-width: 0; }

.verdict-label {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.verdict[data-label="male"] .verdict-label { color: var(--male); }
.verdict[data-label="female"] .verdict-label { color: var(--female); }
.verdict[data-label="unknown"] .verdict-label { color: var(--warning); }

.verdict-sub { margin-top: 8px; color: var(--text-dim); font-size: 13px; line-height: 1.6; }

.meter-row { display: flex; align-items: center; gap: 12px; }
.meter-group[hidden] { display: none; }

.meter-cap { font-size: 17px; width: 18px; flex: none; text-align: center; }
.meter-cap.male { color: var(--male); }
.meter-cap.female { color: var(--female); }

.meter {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 224, 255, 0.16), rgba(255, 47, 185, 0.16));
  overflow: hidden;
}

.meter span {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--text);
  box-shadow: 0 0 12px currentColor;
  transition: left 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  left: 50%;
}

.meter-mid {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--text-faint);
  opacity: 0.5;
}

.meter-note { margin: 10px 0 20px; font-family: var(--mono); font-size: 11.5px; line-height: 1.6; color: var(--text-faint); }

.per-image { display: grid; gap: 8px; }

/* Two lines on a phone rather than dropping the probability: the number is
   the reason someone scrolls this far, and a narrow screen is not a reason
   to be told less. */
.image-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas:
    "thumb name vote"
    "thumb prob prob";
  align-items: center;
  column-gap: 10px;
  row-gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 12px;
}

.image-row img { grid-area: thumb; width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.image-row .row-name { grid-area: name; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--sans); }
.image-row .row-vote { grid-area: vote; letter-spacing: 0.1em; white-space: nowrap; }
.image-row .row-p { grid-area: prob; color: var(--text-faint); font-size: 11px; }
.image-row[data-vote="male"] .row-vote { color: var(--male); }
.image-row[data-vote="female"] .row-vote { color: var(--female); }
.image-row[data-vote="rejected"] .row-vote { color: var(--warning); }
.image-row[data-vote="usable"] .row-vote { color: var(--text-dim); }
.image-row[data-weak="true"] { border-style: dashed; }

.caveat { margin: 18px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--text-faint); }
.caveat b { color: var(--signal); font-weight: 600; }

/* ---- consent line + legal page ---------------------------------------- */

/* Links are --signal, the structural accent. Neither verdict colour is spent
   on navigation: cyan and magenta have to stay reserved for the answer. */
a {
  color: var(--signal);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-thickness: 2px; }
}

.consent {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-faint);
}

/* A legal page is read, not scanned, so it gets a longer measure and more
   air between headings than the instrument does. */
.legal { max-width: 760px; }
.legal .panel { padding: var(--pad); }

.legal h3 {
  margin: 26px 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
}

.legal .panel > h2 + h3 { margin-top: 18px; }

.legal p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.95;
  color: var(--text-dim);
}

.legal b { color: var(--text); font-weight: 600; }
.legal .dim { color: var(--text-faint); font-size: 12.5px; line-height: 1.9; }
.legal .lede { margin-bottom: 12px; }
.legal .lead-consent { color: var(--text); }

.legal ul {
  margin: 0 0 14px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-dim);
}

.legal li::marker { color: var(--signal); }

.legal code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--ink-line);
  background: rgba(4, 6, 11, 0.7);
  color: var(--text);
  overflow-wrap: anywhere;
}

/* The data path is the one line people came to check, so it is set apart
   rather than buried in a paragraph. */
.legal .route {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 2;
  color: var(--text);
  padding: 12px 14px;
  border: 1px solid var(--ink-line);
  border-left: 2px solid var(--signal);
  border-radius: 8px;
  background: rgba(4, 6, 11, 0.6);
  overflow-wrap: anywhere;
}

.legal .back { margin: 0 0 4px; font-family: var(--mono); font-size: 12px; }
.legal .back:last-child { margin: 4px 0 0; }

/* ---- about / footer -------------------------------------------------- */

.about p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--text-dim); }
.about p + p { margin-top: 12px; }
.about b { color: var(--text); }
.about .dim { color: var(--text-faint); }
.about .version-summary {
  padding-left: 12px;
  border-left: 2px solid var(--signal);
  color: var(--text);
}
.about .about-link { margin-top: 18px; font-family: var(--mono); font-size: 12px; }

/* ---- model comparison ------------------------------------------------ */

.comparison { max-width: 820px; }
.comparison-lead { color: var(--text) !important; }

.comparison-grid {
  margin-top: 18px;
  border-top: 1px solid var(--ink-line);
}

.comparison-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(72px, 0.7fr) minmax(72px, 0.7fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-line);
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.5;
}

.comparison-head {
  min-height: 38px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10.5px;
}

.comparison-good { color: var(--signal); }
.comparison-caption { margin-top: 14px !important; }
.comparison-row code { display: block; width: fit-content; margin-top: 6px; }
.comparison-models .comparison-row {
  grid-template-columns: minmax(120px, 0.85fr) minmax(0, 1.25fr) minmax(0, 1.55fr);
  align-items: start;
}
.comparison-current { border-left: 2px solid var(--signal); padding-left: 12px; }
.comparison-current > :first-child b { color: var(--signal); }
.comparison-delta .comparison-row {
  grid-template-columns: minmax(78px, 1fr) repeat(3, minmax(62px, 0.8fr));
  font-variant-numeric: tabular-nums;
}
.comparison-delta .comparison-row > :not(:first-child) { text-align: right; }
.comparison-note {
  margin-top: 16px !important;
  padding-left: 12px;
  border-left: 2px solid var(--signal);
  color: var(--text) !important;
}

@media (max-width: 699px) {
  .comparison-models .comparison-head { display: none; }
  .comparison-models .comparison-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding-top: 15px;
    padding-bottom: 15px;
  }
  .comparison-models .comparison-row [data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--text-faint);
    font-family: var(--mono);
    font-size: 10px;
  }
  .comparison-current { padding-left: 10px; }
  .comparison-delta .comparison-row {
    grid-template-columns: minmax(68px, 1fr) repeat(3, minmax(52px, 0.8fr));
    gap: 6px;
    font-size: 11px;
  }
  .comparison-delta .comparison-head { font-size: 9px; }
}

footer {
  padding-top: 0;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--text-faint);
}

.sep { color: var(--ink-line); }

footer a { color: var(--text-dim); }
@media (hover: hover) and (pointer: fine) { footer a:hover { color: var(--signal); } }

/* ---- wider viewports ------------------------------------------------- */

@media (min-width: 700px) {
  :root { --gutter: 24px; --pad: 22px; --tap: 40px; }

  .grid-bg { background-size: 100% 100%, 100% 100%, 46px 46px, 46px 46px; }

  .topbar {
    padding-top: 44px;
    padding-bottom: 12px;
    grid-template-columns: 1fr auto;
    grid-template-areas: "mark status" "tag status";
    align-items: center;
    gap: 2px 16px;
  }

  .wordmark { font-size: 46px; }
  .mark-version { margin-top: 4px; font-size: 11px; }
  .tagline { font-size: 13px; letter-spacing: 0; }
  .status { justify-self: end; margin-top: 0; }

  main { padding-top: 20px; padding-bottom: 64px; gap: 20px; }

  .panel { padding: var(--pad) 24px; }
  .panel.conditions,
  .panel.intake { padding: 0; }
  .collapsible-head { padding: var(--pad) 24px 10px; min-height: 0; }
  .collapsible:not([open]) > .collapsible-head { padding-bottom: var(--pad); }
  .collapsible-body { padding: 0 24px var(--pad); }

  .lede, .conditions-list, .about p { font-size: 13.5px; }
  .legal p, .legal ul { font-size: 13.5px; }
  .legal .panel { padding: var(--pad) 24px; }
  .conditions-list { gap: 7px; }

  .slots { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin-bottom: 18px; }
  .slot[data-filled="false"] { aspect-ratio: 1; }

  .actions { display: flex; flex-wrap: wrap; }
  .button { font-size: 12px; padding: 11px 20px; }

  .verdict { gap: 22px; margin-bottom: 22px; }
  .glyph { width: 96px; height: 96px; border-radius: 20px; font-size: 54px; }
  .verdict-label { font-size: 34px; letter-spacing: 0; }
  .verdict-sub { font-size: 13.5px; }

  .image-row {
    grid-template-columns: 40px minmax(0, 1fr) auto auto;
    grid-template-areas: "thumb name vote prob";
    column-gap: 12px;
    padding: 9px 12px;
  }

  .image-row img { width: 40px; height: 40px; }
  .image-row .row-p { font-size: 12px; }

  footer { padding-bottom: 48px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }

  /* A frozen spinner reads as a broken graphic. Without the rotation the ring
     is just a ring, and the label under it carries the news instead. */
  .slot-spinner { border-color: var(--signal); }
  .slot[data-stage="preparing"] .slot-progress-bar i,
  .slot[data-stage="scoring"] .slot-progress-bar i { width: 100%; opacity: 0.5; }
}

/* ---- field edition --------------------------------------------------- */

:root {
  color-scheme: light;
  --ink: #f4f5f1;
  --ink-raised: #fbfcf8;
  --ink-line: #d3d8d0;
  --text: #242d27;
  --text-dim: #59645c;
  --text-faint: #7d877f;
  --male: #315e4c;
  --female: #9b4d4b;
  --signal: #426a4e;
  --warning: #94612b;
  --radius: 4px;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --mono: var(--sans);
}

* { letter-spacing: 0; }
html, body { background: var(--ink); color: var(--text); }
html, body { font-family: var(--sans); }
body { overflow-x: clip; }
.grid-bg { display: none; }
main, .topbar, footer { max-width: 1120px; }

:where(button, .button, summary):focus-visible,
#fileInput:focus-visible + .button {
  outline-color: var(--signal);
  outline-offset: 3px;
}

.topbar {
  padding-top: 22px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--ink-line);
  grid-template-areas: "mark" "tag" "status";
  gap: 5px;
}

.wordmark {
  align-items: baseline;
  gap: 12px;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
}
.mark-name { white-space: normal; }
.mark-vermis, .mark-dimorph, .mark-dot {
  color: var(--text);
  text-shadow: none;
}
.mark-version {
  margin: 0;
  padding-left: 10px;
  border-color: var(--ink-line);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  text-shadow: none;
}
.tagline {
  margin-top: 2px;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-transform: none;
}
.status {
  justify-self: start;
  margin-top: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-faint);
  font-family: var(--sans);
  font-size: 11px;
}
.status-dot { width: 6px; height: 6px; }
.status[data-state="ready"] .status-dot,
.status[data-state="busy"] .status-dot,
.status[data-state="warning"] .status-dot,
.status[data-state="error"] .status-dot { box-shadow: none; }
.status[data-state="ready"] .status-dot,
.status[data-state="busy"] .status-dot { background: var(--signal); }
.status[data-state="warning"] { color: var(--warning); border: 0; }
.status[data-state="warning"] .status-dot { background: var(--warning); }
.status[data-state="error"] .status-dot { background: var(--female); }

main {
  padding-top: 12px;
  padding-bottom: 52px;
  gap: 0;
}

.panel {
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--ink-line);
  border-radius: 0;
  background: transparent;
}
.panel.conditions, .panel.intake { padding: 0; }
.panel.about { border-bottom: 1px solid var(--ink-line); }
.panel h2 {
  margin-bottom: 12px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.hash { display: none; }
.collapsible-head { padding: 16px 0; }
.collapsible:not([open]) > .collapsible-head { padding-bottom: 16px; }
.collapsible-body { padding: 0 0 18px; }
.collapsible-hint { color: var(--text-faint); font-family: var(--sans); letter-spacing: 0; }
.counter { color: var(--text-dim); }
.counter[data-ready="true"] { color: var(--signal); }
.lede, .conditions-list, .conditions-list b { color: var(--text-dim); }
.lede b, .conditions-list b { color: var(--text); }
.conditions-list li::marker { color: var(--signal); }

.slots { gap: 9px; }
.slot {
  border-color: #cbd2c8;
  border-radius: 3px;
  background: #ecefea;
}
.slot[data-required="true"] { border-color: #8b9a8d; }
.slot[data-filled="true"] { border-color: #aab5aa; }
.slot[data-feedback="true"] { border-color: var(--warning); }
.slot-index, .slot-tag { color: var(--text-dim); font-family: var(--mono); letter-spacing: 0; }
.slot[data-required="true"] .slot-tag { color: var(--signal); }
.slot-caption { color: var(--text-dim); font-family: var(--sans); }
.slot[data-filled="true"] .slot-caption { background: rgba(24, 31, 26, 0.72); color: #fff; }
.slot-remove {
  border-color: rgba(255,255,255,.72);
  border-radius: 3px;
  background: rgba(30, 39, 32, .78);
  color: #fff;
}
.slot-feedback { background: rgba(248, 249, 245, .93); color: var(--text); backdrop-filter: none; }
.slot-feedback-title { color: var(--warning); }
.slot-feedback-detail { color: var(--text-dim); }
.slot-progress { background: rgba(248, 249, 245, .92); }
.slot[data-stage] { border-color: var(--signal); }
.slot-spinner { border-color: #d8e0d6; border-top-color: var(--signal); }
.slot-progress-label { color: var(--signal); font-family: var(--sans); letter-spacing: 0; }
.slot-progress-bar { background: #e0e7dd; }
.slot-progress-bar i { background: var(--signal); }

.actions { gap: 8px; }
.button {
  border-color: #c6cec5;
  border-radius: 3px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  transition: border-color .15s, color .15s, background .15s, transform .08s;
}
.button.primary { border-color: var(--signal); color: var(--signal); }
.button.run { border-color: var(--signal); background: var(--signal); color: #fff; }
.button.run:disabled { border-color: var(--ink-line); background: transparent; color: var(--text-faint); }
.button:disabled, #fileInput:disabled + .button { opacity: .55; }
.button:active:not(:disabled) { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) {
  .button:hover:not(:disabled) { border-color: var(--signal); }
  .button.primary:hover, .button.run:hover:not(:disabled) { box-shadow: none; }
}
.hint { color: var(--text-faint); font-family: var(--sans); }
.consent { color: var(--text-faint); }
.consent a, .about-link a, a { text-underline-offset: 3px; }

.result { border-color: var(--ink-line); }
.verdict { gap: 18px; }
.glyph {
  width: 64px;
  height: 64px;
  border: 0;
  border-right: 1px solid var(--ink-line);
  border-radius: 0;
  color: var(--text-dim);
  font-family: var(--sans);
}
.verdict[data-label="male"] .glyph,
.verdict[data-label="female"] .glyph {
  border-color: var(--ink-line);
  box-shadow: none;
  text-shadow: none;
}
.verdict[data-label="male"] .glyph,
.verdict[data-label="male"] .verdict-label { color: var(--male); }
.verdict[data-label="female"] .glyph,
.verdict[data-label="female"] .verdict-label { color: var(--female); }
.verdict[data-label="unknown"] .glyph { border-color: var(--ink-line); box-shadow: none; }
.verdict-label {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}
.verdict-sub { color: var(--text-dim); }
.meter { height: 6px; border-radius: 0; background: linear-gradient(90deg, rgba(49,94,76,.17), rgba(155,77,75,.17)); }
.meter span { width: 2px; height: 14px; top: -4px; border-radius: 0; box-shadow: none; }
.meter-cap.male { color: var(--male); }
.meter-cap.female { color: var(--female); }
.meter-note { color: var(--text-faint); font-family: var(--sans); }
.per-image { border-top: 1px solid var(--ink-line); }
.image-row {
  border: 0;
  border-bottom: 1px solid var(--ink-line);
  border-radius: 0;
  font-family: var(--sans);
}
.image-row img { border-radius: 2px; }
.image-row .row-name, .image-row .row-p { color: var(--text-dim); }
.image-row .row-vote { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.image-row[data-vote="male"] .row-vote { color: var(--male); }
.image-row[data-vote="female"] .row-vote { color: var(--female); }
.image-row[data-vote="rejected"] .row-vote { color: var(--warning); }
.caveat { color: var(--text-faint); }

.about p { color: var(--text-dim); }
.about p + p { margin-top: 14px; }
.about b { color: var(--text); }
.about .dim { color: var(--text-faint); }
.about .version-summary { border-color: var(--signal); color: var(--text); }
.about .about-link { font-family: var(--sans); }

.legal .panel { padding: 22px 0; }
.legal .route { border-radius: 2px; background: #eaeee8; color: var(--text); }
.legal code { border-radius: 2px; background: #eaeee8; }
.legal li::marker { color: var(--signal); }
.comparison-grid { border-color: var(--ink-line); }
.comparison-row { border-color: var(--ink-line); color: var(--text-dim); }
.comparison-head { color: var(--text-faint); }
.comparison-good, .comparison-current > :first-child b { color: var(--signal); }
.comparison-note { border-color: var(--signal); color: var(--text) !important; }
.comparison-current { border-color: var(--signal); }
.comparison-row code { color: var(--text-dim); }

footer {
  padding-top: 14px;
  border-top: 1px solid var(--ink-line);
  color: var(--text-faint);
  font-family: var(--sans);
  font-size: 10.5px;
}
.sep { color: #aeb8ae; }
footer a { color: var(--text-dim); }

@media (min-width: 700px) {
  .topbar {
    padding-top: 24px;
    padding-bottom: 16px;
    grid-template-areas: "mark status" "tag status";
    align-items: center;
  }
  .wordmark { font-size: 24px; }
  .status { justify-self: end; margin-top: 0; }
  main { padding-top: 16px; }
  .panel { padding: 24px 0; }
  .panel.conditions, .panel.intake { padding: 0; }
  .collapsible-head { padding: 17px 0; }
  .collapsible:not([open]) > .collapsible-head { padding-bottom: 17px; }
  .collapsible-body { padding: 0 0 20px; }
  .panel.about { padding-block: 28px; }
  .actions { gap: 10px; }
}

@media (max-width: 699px) {
  .topbar { padding-top: 17px; }
  .wordmark { font-size: 20px; }
  main { padding-top: 10px; }
  .panel h2 { font-size: 16px; }
  .panel.about { padding-block: 22px; }
  .verdict-label { font-size: 24px; }
  .comparison-row { font-size: 12px; }
}

/* ---- specimen ledger -------------------------------------------------
   Paper, ruled margins and a contact sheet give the tool a field-work
   character. Verdict colours are reserved for answers, never decoration. */

:root {
  --ink: #f3f0e8;
  --ink-raised: #faf8f2;
  --ink-line: #cbc6ba;
  --text: #292c29;
  --text-dim: #565b55;
  --text-faint: #747b72;
  --male: #315c70;
  --female: #9b5049;
  --signal: #345249;
  --warning: #885b2d;
  --radius: 0;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", Georgia, serif;
  --roman: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

html, body { background: var(--ink); }
body { color: var(--text); }
main, .topbar, footer { max-width: 1120px; }

.topbar {
  padding-top: 24px;
  padding-bottom: 28px;
  border-top: 4px solid var(--text);
  border-bottom: 1px solid var(--ink-line);
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "mark status"
    "tag tag"
    "note note";
  gap: 0 14px;
}
.wordmark {
  align-items: center;
  gap: 12px;
  font-family: var(--roman);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.2;
}
.mark-name { white-space: nowrap; }
.mark-vermis, .mark-dimorph { color: var(--text); }
.mark-dot { color: var(--female); margin: 0 .28em; }
.mark-version {
  margin: 0;
  padding-left: 12px;
  border-color: var(--ink-line);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .06em;
}
.topbar .tagline {
  margin: 32px 0 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -.035em;
}
.tagline i { font-family: var(--roman); font-weight: 400; }
.title-tail { white-space: nowrap; }
.header-note {
  grid-area: note;
  margin: 10px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
}
.topbar.subpage { padding-bottom: 22px; }
.topbar.subpage .tagline { margin-top: 24px; font-size: clamp(25px, 4vw, 38px); }
.status {
  justify-self: end;
  align-self: start;
  margin: 0;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.4;
}
.status-dot { width: 6px; height: 6px; }

main { padding-top: 0; padding-bottom: 48px; gap: 0; }
.panel {
  border: 0;
  border-bottom: 1px solid var(--ink-line);
  padding: 26px 0 30px;
  background: transparent;
}
.panel.intake, .panel.conditions { padding: 0; }
.panel h2 {
  margin-bottom: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
}
.hash { display: none; }
.intake h2::before, .conditions h2::before, .about h2::before {
  display: inline-block;
  margin-right: 14px;
  color: var(--female);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .05em;
  vertical-align: .15em;
}
.intake h2::before { content: "01 /"; }
.conditions h2::before { content: "02 /"; }
.about h2::before { content: "03 /"; }
.collapsible-head { min-height: 64px; padding: 17px 0; }
.collapsible:not([open]) > .collapsible-head { padding-bottom: 17px; }
.collapsible-body { padding: 0 0 28px; }
.collapsible-hint { font-family: var(--sans); font-size: 11px; }
.chevron { border-color: var(--text); }
.counter {
  padding: 5px 8px 4px;
  border: 1px solid var(--ink-line);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.counter[data-ready="true"] { color: var(--signal); border-color: var(--signal); }
.lede { max-width: 66ch; margin-bottom: 20px; color: var(--text-dim); font-size: 13px; line-height: 1.85; }
.lede b { color: var(--text); }

.slots {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 18px;
}
.slot {
  border: 1px solid var(--ink-line);
  border-radius: 0;
  background: #e9e5da;
}
.slot[data-required="true"] { border-color: #a9a99f; }
.slot[data-filled="true"] { border-color: var(--text); }
.slot[data-feedback="true"] { border: 2px solid var(--warning); }
.slot[data-filled="false"] { aspect-ratio: 1.35; }
.slot-index, .slot-tag {
  top: 8px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.slot-index { left: 8px; }
.slot-tag { right: 8px; }
.slot[data-required="true"] .slot-tag { color: var(--signal); }
.slot-caption { color: var(--text-faint); font-size: 11px; }
.slot[data-filled="true"] .slot-caption { background: rgba(24, 28, 25, .82); }
.slot-remove {
  width: 34px;
  height: 34px;
  border-color: #fff;
  border-radius: 0;
  background: rgba(24, 28, 25, .85);
  color: #fff;
}
.slot-feedback { background: rgba(250, 248, 242, .95); }
.slot-progress { background: rgba(250, 248, 242, .90); }
.slot[data-stage] { border-color: var(--signal); }
.slot-spinner { border-color: #cad7ce; border-top-color: var(--signal); }
.slot-progress-label { color: var(--signal); }
.slot-progress-bar { background: #dce4dd; }
.slot-progress-bar i { background: var(--signal); }

.actions { gap: 8px; }
.button {
  border-radius: 0;
  border-color: var(--ink-line);
  min-height: 48px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}
.button.primary { border-color: var(--text); background: var(--text); color: var(--ink-raised); }
.button.ghost { border-color: transparent; color: var(--text-dim); }
.button.run { border-color: var(--signal); background: var(--signal); color: #fff; }
.button.run:disabled { border-color: var(--ink-line); background: transparent; color: var(--text-faint); }
.button:disabled, #fileInput:disabled + .button { opacity: .52; }
.button:active:not(:disabled) { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) {
  .button.primary:hover { border-color: var(--signal); background: var(--signal); box-shadow: none; }
  .button.run:hover:not(:disabled) { border-color: var(--text); background: var(--text); box-shadow: none; }
  .button.ghost:hover:not(:disabled) { color: var(--text); border-color: var(--ink-line); }
}
.hint { margin-top: 10px; color: var(--text-dim); font-family: var(--sans); font-size: 11px; }
.consent { margin-top: 16px; color: var(--text-faint); }

.conditions-list {
  gap: 0;
  padding-left: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.75;
  counter-reset: condition;
}
.conditions-list li {
  position: relative;
  padding: 11px 0 11px 31px;
  border-top: 1px solid var(--ink-line);
  counter-increment: condition;
}
.conditions-list li::before {
  content: counter(condition, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--female);
  font-family: var(--mono);
  font-size: 10px;
}
.conditions-list b { display: block; color: var(--text); font-weight: 600; }

.result { border-top: 3px solid var(--signal); }
.verdict { gap: 22px; }
.glyph {
  width: 62px;
  height: 62px;
  border: 0;
  border-right: 1px solid var(--ink-line);
  font-family: var(--roman);
  font-size: 42px;
}
.verdict-label { font-family: var(--serif); font-size: clamp(24px, 4vw, 36px); font-weight: 600; }
.verdict-sub { color: var(--text-dim); }
.meter { border-radius: 0; background: linear-gradient(90deg, #dce7e8, #eddfd9); }
.meter span { box-shadow: none; }
.meter-note { color: var(--text-dim); font-family: var(--mono); font-size: 11px; }
.per-image { gap: 0; border-top: 1px solid var(--ink-line); }
.image-row {
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--ink-line);
  border-radius: 0;
  font-family: var(--sans);
}
.image-row img { border-radius: 0; }
.image-row .row-vote { font-weight: 700; }
.caveat { max-width: 78ch; color: var(--text-dim); }
.caveat b { color: var(--signal); }

.about { display: grid; gap: 0; }
.about h2 { margin: 0 0 20px; }
.about p { max-width: 82ch; color: var(--text-dim); font-size: 13px; line-height: 1.9; }
.about p + p { margin-top: 14px; }
.about .version-summary {
  padding: 0;
  border: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.75;
}
.about .about-link { margin-top: 22px; font-family: var(--sans); font-size: 12px; }

a { color: var(--signal); }
.legal { max-width: 840px; }
.legal .panel { padding: 28px 0 34px; }
.legal .panel h2 { margin-bottom: 20px; }
.legal h3 { font-family: var(--serif); font-size: 17px; }
.legal p, .legal ul { line-height: 1.9; }
.legal .route, .legal code { border-radius: 0; background: #e9e5da; }
.legal .route { border-left-color: var(--signal); }
.comparison-row code { color: var(--text-dim); }
.comparison-current, .comparison-note { border-left-color: var(--signal); }

footer {
  border-top: 1px solid var(--ink-line);
  padding-top: 18px;
  color: var(--text-faint);
  font-family: var(--sans);
  font-size: 10px;
}

@media (min-width: 700px) {
  .topbar { padding-top: 30px; padding-bottom: 37px; }
  .topbar .tagline { margin-top: 44px; }
  .topbar.subpage .tagline { margin-top: 30px; }
  main { padding-top: 0; }
  .panel { padding-block: 32px 38px; }
  .collapsible-head { padding-block: 24px 18px; }
  .collapsible:not([open]) > .collapsible-head { padding-bottom: 24px; }
  .collapsible-body { padding-bottom: 34px; }
  .slots { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .slot[data-filled="false"] { aspect-ratio: 1; }
  .actions { display: flex; }
  .actions .primary { grid-column: auto; }
  .button { min-width: 136px; }
  .about { grid-template-columns: 240px minmax(0, 1fr); column-gap: 38px; }
  .about h2 { grid-column: 1; grid-row: 1 / span 5; }
  .about p { grid-column: 2; }
}

@media (min-width: 900px) {
  main:not(.legal) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 272px;
    column-gap: 48px;
    align-items: start;
  }
  .intake { grid-column: 1; grid-row: 1; }
  .result { grid-column: 1; }
  .conditions {
    grid-column: 2;
    grid-row: 1;
    border-left: 1px solid var(--ink-line);
    border-bottom: 0;
    padding-left: 24px !important;
  }
  .conditions .collapsible-head { padding-top: 24px; }
  .conditions .collapsible-hint { display: none; }
  .conditions .collapsible-body { padding-bottom: 0; }
  .conditions .lede { font-size: 12px; }
  .about { grid-column: 1 / -1; }
}

@media (max-width: 699px) {
  .topbar { padding-top: 20px; padding-bottom: 24px; }
  .topbar .tagline { margin-top: 27px; }
  .wordmark { gap: 8px; font-size: 13px; }
  .mark-version { padding-left: 8px; font-size: 9px; }
  .status { font-size: 10px; }
  .header-note { margin-top: 8px; font-size: 12px; }
  .panel h2 { font-size: 19px; }
  .intake h2::before, .conditions h2::before, .about h2::before { margin-right: 10px; }
  .collapsible-head { gap: 8px; }
  .collapsible-hint { display: none; }
  .collapsible-head .counter { margin-left: auto; }
  .collapsible-head .counter + .chevron { margin-left: 3px; }
  .verdict { gap: 14px; }
  .glyph { width: 52px; height: 60px; font-size: 37px; }
  .about { padding-block: 26px 32px; }
  .legal .panel { padding-block: 24px 30px; }
}
