/* /check: the in-browser checker. Tokens come from styles.css. */
.check { padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(48px, 7vw, 96px); display: grid; gap: 22px; }
.check h1 { font-family: var(--font-display); font-stretch: 78%; font-weight: 800; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); line-height: 1.05; margin: 0 0 10px; }
.check .lede { font-size: 1.1rem; color: var(--muted); margin: 0; max-width: 60ch; }
.check h2 { font-family: var(--font-display); font-stretch: 82%; font-weight: 750; font-size: 1.5rem; margin: 0; }
.check h3 { font-size: 1rem; font-weight: 700; margin: 0 0 8px; }

.drop { position: relative; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface); transition: border-color 120ms, background 120ms; }
.drop.is-over, .drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.drop__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop__label { display: grid; gap: 6px; padding: clamp(26px, 5vw, 46px) 20px 12px; text-align: center; }
.drop__title { font-size: 1.2rem; font-weight: 650; }
.drop__pick { color: var(--accent); text-decoration: underline; }
.drop__formats { color: var(--muted); font-size: 0.9rem; }
.drop__state { text-align: center; margin: 0; padding: 0 20px 18px; }

.country { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 0.92rem; }
.country input { font: inherit; font-family: var(--font-mono); text-transform: uppercase; width: 4.2em; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }

.results { display: grid; gap: 18px; }
.results[hidden] { display: none; }
.results__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.results__head p { margin: 0; }

.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.tile b { font-family: var(--font-display); font-stretch: 80%; font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.tile span { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }
.tile--ok b { color: var(--ok); }
.tile--warn b { color: var(--warn); }
.tile--bad b { color: var(--bad); }
.tile.is-zero b { color: var(--muted); }

.banner { border: 1px solid var(--line); border-left: 3px solid var(--warn); background: var(--warn-bg); border-radius: 8px; padding: 10px 14px; margin: 0; font-size: 0.94rem; }
.banner--bad { border-left-color: var(--bad); background: var(--bad-bg); }
.banner[hidden] { display: none; }
.banner p { margin: 0 0 6px; }
.banner p:last-child { margin: 0; }
.banner code { font-family: var(--font-mono); font-size: 0.86em; }

.findings[hidden], .console[hidden], .next[hidden] { display: none; }
.findings__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.findings__list li { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 0.94rem; }
.findings__list .count { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); white-space: nowrap; }

.console { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.console__bar { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.console__note { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.batch { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
.batch th { text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: 0.74rem; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); }
.batch td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.batch tr:last-child td { border-bottom: 0; }
.batch td.plot { font-family: var(--font-mono); font-size: 0.82rem; white-space: nowrap; }
.batch td.shape { white-space: nowrap; color: var(--muted); }
.batch td.shape svg { vertical-align: middle; margin-right: 8px; color: var(--accent); }
.batch td.shape svg path { fill: currentColor; fill-opacity: 0.14; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; fill-rule: evenodd; }
.batch td.shape svg circle { fill: currentColor; }
.batch td.found { min-width: 22ch; }
.batch td.found small { display: block; color: var(--muted); }
.batch tr.is-queued td.found, .batch tr.is-queued td.shape { opacity: 0.35; }
.batch tr.is-checking td { background: var(--accent-soft); }
.batch tr.is-done td { animation: settle 420ms ease-out; }
@keyframes settle {
  from { background: var(--accent-soft); }
  to { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .batch tr.is-done td { animation: none; }
}

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 650; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--ok { color: var(--ok); background: var(--ok-bg); }
.chip--warn { color: var(--warn); background: var(--warn-bg); }
.chip--bad { color: var(--bad); background: var(--bad-bg); }
.chip--idle { color: var(--muted); background: var(--sunken); }

.next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 18px 20px; }
.next p { margin: 0; color: var(--muted); max-width: 62ch; }
.note { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; background: var(--surface); }

.sample-line { margin: -8px 0 0; }
.linklike { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

.mapping { display: grid; gap: 10px; }
.mapping:empty { display: none; }
.mapping details { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.mapping details[open] { border-color: var(--warn); }
.mapping summary { padding: 10px 14px; cursor: pointer; font-weight: 650; }
.mapping summary code { font-family: var(--font-mono); font-size: 0.86em; font-weight: 400; }
.mapping__body { padding: 0 14px 14px; display: grid; gap: 10px; }
.mapping__body p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.mapping table { border-collapse: collapse; font-size: 0.84rem; }
.mapping th, .mapping td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; white-space: nowrap; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; }
.mapping th { background: var(--sunken); font-weight: 600; }
.mapping td { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.mapping select { font: inherit; font-size: 0.82rem; padding: 3px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); max-width: 20ch; }
.mapping select.is-set { border-color: var(--accent); color: var(--accent); font-weight: 650; }
.mapping label { font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
