@font-face {
  font-family: "Mona Sans";
  src: url("./fonts/MonaSansVF.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #16181f;
  --navy: #1e2a4a;
  --muted: #5d5f67;
  --line: #e3e1da;
  --paper: #f3f1ec;
  --white: #fff;
  --saffron: #f0b43a;
  --saffron-ink: #7a5200;
  --saffron-wash: #fdf4dc;
  --sage: #5ba58a;
  --sage-ink: #2c7259;
  --sage-wash: #e3f1ea;
  --tomato: #e5664a;
  --tomato-ink: #b93a20;
  --tomato-wash: #fdece7;
  --periwinkle: #7c8ce0;
  --periwinkle-wash: #f2f4fa;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--white); color: var(--ink);
  font: 16px/1.5 "Mona Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
b, strong { font-weight: 650; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: .92em; overflow-wrap: anywhere; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 8px 12px; background: var(--ink); color: #fff; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* header */
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.name { display: inline-flex; align-items: center; gap: 10px; font-weight: 720; font-stretch: 112%; font-size: 18px; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.links { display: flex; gap: 20px; font-size: 15px; font-weight: 550; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }

/* buttons */
.btn {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer;
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--white);
}
.btn:hover { background: var(--paper); }
.btn.quiet { border-color: transparent; background: none; text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 4px; padding-inline: 6px; }
.btn.quiet:hover { text-decoration-color: var(--ink); }
.btn.solid { background: var(--ink); color: #fff; }
.btn.solid:hover { background: var(--navy); }
.btn.icon { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; }
.btn:disabled { color: #a9aab0; border-color: #c6c7cc; background: none; cursor: default; }
.linkish { text-decoration: underline; text-underline-offset: 3px; }

/* start */
.hero { padding: clamp(24px, 6vw, 64px) 0 56px; max-width: 760px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(30px, 5.2vw, 50px); line-height: 1.06; font-weight: 760; font-stretch: 112%; letter-spacing: -.025em; text-wrap: balance; }
.lede { margin: 16px auto 0; max-width: 620px; font-size: clamp(16px, 2vw, 18px); color: var(--muted); text-wrap: pretty; }
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 32px; padding: clamp(32px, 6vw, 52px) 20px;
  background: var(--paper); border-radius: 22px; cursor: pointer; color: var(--ink);
  outline: 2px dashed transparent; outline-offset: -10px; transition: outline-color .15s, background-color .15s;
}
.drop:hover, .dragging .drop { outline-color: var(--ink); }
.drop:focus-within { outline: 2px solid var(--navy); outline-offset: 3px; }
.drop-art { margin-bottom: 14px; }
.drop-title { font-size: 20px; font-weight: 680; }
.drop-sub { color: var(--muted); }
.under-drop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 16px; font-size: 15px; text-align: left; }
.private { display: inline-flex; align-items: center; gap: 7px; color: var(--sage-ink); font-weight: 550; }
.examples { color: var(--muted); }
.cli { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; margin-top: 44px; font-size: 15px; color: var(--muted); }
.cli code { font-family: var(--mono); font-size: 14px; color: var(--ink); background: var(--paper); padding: 8px 14px; border-radius: 10px; }

/* results */
.work { padding: 12px 0 64px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-bottom: 18px; }
.bar-file { min-width: 0; }
.bar h2 { font-size: 22px; font-weight: 720; letter-spacing: -.01em; overflow-wrap: anywhere; outline: none; }
#tally { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; color: var(--muted); font-size: 15px; min-height: 26px; }
.tally-parts { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 13px; font-weight: 620; padding: 3px 10px; border-radius: 999px; }
.pill.fail, .verdict.fail { background: var(--tomato-wash); color: var(--tomato-ink); }
.pill.check, .verdict.check { background: var(--saffron-wash); color: var(--saffron-ink); }
.pill.ok, .verdict.ok { background: var(--sage-wash); color: var(--sage-ink); }
.bar-actions { display: flex; align-items: center; gap: 8px; }

.ask { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; padding: 14px 18px; background: var(--periwinkle-wash); border-radius: var(--radius); font-size: 15px; }
.ask-field { display: inline-flex; align-items: center; gap: 6px; }
.ask input { font: inherit; width: 96px; padding: 7px 10px; border: 1.5px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); }

.grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.stage { position: sticky; top: 16px; max-height: calc(100vh - 32px); background: var(--paper); border-radius: 22px; padding: clamp(14px, 2.4vw, 28px); min-height: 220px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -6px 0 12px; font-size: 15px; font-weight: 600; }
.sheet { display: flex; justify-content: center; }
.page-wrap { position: relative; width: min(100%, calc((100vh - 180px) * var(--ratio, 1))); min-width: min(100%, 200px); box-shadow: 0 1px 2px rgb(22 24 31 / .12), 0 10px 30px rgb(22 24 31 / .10); background: #fff; }
.page { display: block; width: 100%; height: auto; }

.box { position: absolute; margin: -5px; padding: 0; box-sizing: content-box; border: 5px solid transparent; background: none; cursor: pointer; border-radius: 6px; font: inherit; }
.box::before { content: ""; position: absolute; inset: -5px; border: 2.5px solid var(--c); border-radius: 6px; transition: box-shadow .15s, background-color .15s; }
.box.ok { --c: var(--sage); --w: rgb(91 165 138 / .16); }
.box.check { --c: var(--saffron); --w: rgb(240 180 58 / .18); }
.box.fail { --c: var(--tomato); --w: rgb(229 102 74 / .14); }
.box:hover::before { background: var(--w); }
.box[aria-pressed="true"]::before { background: var(--w); box-shadow: 0 0 0 4px var(--w); border-width: 3px; }
.box:focus-visible { outline: none; }
.box:focus-visible::before { outline: 2px solid var(--navy); outline-offset: 2px; }
.tag { position: absolute; top: -17px; right: -17px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; box-shadow: 0 0 0 2px #fff; }
.box.check .tag { color: var(--ink); }

.status { display: none; align-items: center; justify-content: center; gap: 10px; padding: 16px 0 2px; font-size: 15px; font-weight: 550; color: var(--muted); }
[data-state="working"] .status { display: flex; }
[data-state="working"] .sheet:empty { min-height: 160px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

/* cards */
.cards { display: grid; gap: 14px; min-width: 0; }
.card { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px 18px 6px; background: #fff; scroll-margin: 16px; transition: border-color .15s, box-shadow .15s; outline: none; }
.card.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.card:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.card-head { display: flex; gap: 16px; align-items: center; }
.crop { flex: none; display: grid; place-items: center; width: 136px; height: 96px; background: var(--paper); border-radius: 10px; padding: 6px; overflow: hidden; }
.crop canvas { display: block; max-width: 100%; max-height: 84px; width: auto; height: auto; }
.card-title { min-width: 0; display: grid; gap: 6px; justify-items: start; }
.card-title h3 { font-size: 19px; font-weight: 700; letter-spacing: -.005em; }
.card-title h3 .muted { font-weight: 500; font-size: 15px; }
.verdict { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 650; padding: 3px 11px 3px 8px; border-radius: 999px; }
.find { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.find:hover { color: var(--ink); text-decoration-color: var(--ink); }

.issues { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.issues li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 15px; line-height: 1.4; text-wrap: pretty; }
.mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; margin-top: -1px; }
.issues .fail .mark { background: var(--tomato); color: #fff; }
.issues .check .mark { background: var(--saffron); color: var(--ink); }

.rows { margin-top: 12px; }
.row { border-top: 1px solid var(--line); }
.row summary { display: grid; grid-template-columns: 8px 112px minmax(0, 1fr) 22px; gap: 10px; align-items: start; padding: 10px 0; cursor: pointer; list-style: none; font-size: 15px; border-radius: 6px; }
.row summary::-webkit-details-marker { display: none; }
.row-label { color: var(--muted); }
.row-value { display: grid; gap: 4px; min-width: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; }
.dot.ok { background: var(--sage); } .dot.check { background: var(--saffron); } .dot.fail { background: var(--tomato); } .dot.none { background: var(--line); }
.what { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1; margin-top: 1px; }
.row summary:hover .what, .row[open] .what { border-color: var(--ink); color: var(--ink); }
.row[open] .what { background: var(--ink); color: #fff; }
.explain a { white-space: nowrap; }
.explain { scroll-margin: 16px; margin: 0 32px 12px 18px; padding: 10px 14px; background: var(--paper); border-radius: 10px; font-size: 14px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }

.range { position: relative; display: block; height: 30px; margin: 4px 14px 0 0; }
.range::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 6px; border-radius: 3px; background: var(--line); }
.range-ok { position: absolute; top: 5px; height: 6px; border-radius: 3px; background: var(--sage); }
.range-dot { position: absolute; top: 0; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; border: 3px solid #fff; background: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }
.range-dot.fail { background: var(--tomato); box-shadow: 0 0 0 1.5px var(--tomato); }
.range-dot.check { background: var(--saffron); box-shadow: 0 0 0 1.5px var(--saffron-ink); }
.range-end { position: absolute; top: 15px; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.sides { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 4px 12px; }
.side { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.side-name { color: var(--muted); min-width: 52px; }
.side.fail b { color: var(--tomato-ink); }
.side.fail .muted { color: var(--tomato-ink); }
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.swatch { width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgb(22 24 31 / .25); }
.swatch:not(:first-child) { margin-left: 8px; }
.grade { display: flex; gap: 12px; align-items: center; }
.letter { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-size: 21px; font-weight: 760; background: var(--sage-wash); color: var(--sage-ink); }
.letter.fail { background: var(--tomato-wash); color: var(--tomato-ink); }
.letter.check { background: var(--saffron-wash); color: var(--saffron-ink); }

.note { padding: 22px; border: 1.5px solid var(--line); border-radius: var(--radius); display: grid; gap: 8px; }
.note h3 { font-size: 19px; font-weight: 700; }
.note.bad { border-color: var(--tomato); background: var(--tomato-wash); }

/* footer */
.foot { border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 18px; padding-bottom: 22px; }
.foot .soft { text-decoration-color: var(--line); }

@media (max-width: 860px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .stage { position: static; max-height: none; }
  .page-wrap { width: min(100%, calc(62vh * var(--ratio, 1))); }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .under-drop { justify-content: center; text-align: center; }
  .row summary { grid-template-columns: 8px minmax(0, 1fr) 22px; }
  .row-label { grid-column: 2; font-size: 13px; }
  .row-value { grid-column: 2; grid-row: 2; }
  .what { grid-column: 3; grid-row: 1; }
  .explain { margin-right: 0; }
  .crop { width: 104px; height: 80px; }
  .crop canvas { max-height: 68px; }
  .card { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; scroll-behavior: auto !important; }
  .spin { animation: none; border-color: var(--ink); border-style: dotted; }
}
