:root {
  --gold: #f8c702;
  --ink: #292829;
  --gray: #48484a;
  --line: #d6d7d6;
  --bg: #fafafa;
  --teal: #1a7e96;
  --great: #1f8a4c;
  --good: #2f9e5b;
  --mixed: #b7791f;
  --bad: #c2410c;
  --awful: #b91c1c;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f2f2f2; --gray: #b5b5b8; --line: #3a3a3c; --bg: #18181a; --teal: #5cc3dc; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 40rem;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(2rem, env(safe-area-inset-bottom));
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--teal); }
header { padding: 0.5rem 0 1rem; }
.kicker { margin: 0; font-weight: 900; letter-spacing: 0.08em; font-size: 0.8rem; }
.kicker span { font-weight: 300; }
h1 {
  margin: 0;
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  background: linear-gradient(transparent 62%, var(--gold) 62%);
  display: inline;
}
.sub { margin: 0.75rem 0 0; color: var(--gray); }
h2 { font-size: 1rem; margin: 1.5rem 0 0.5rem; text-transform: uppercase; letter-spacing: 0.06em; }
textarea {
  width: 100%;
  font: inherit;
  font-size: 17px; /* >=16px stops iOS zooming on focus */
  padding: 0.85rem;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: inherit;
  resize: vertical;
  min-height: 9rem;
}
textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 30%, transparent); }
.status { min-height: 1.5em; margin: 0.4rem 0; color: var(--gray); font-size: 0.9rem; }
.ready .status:empty { display: none; }
.muted { color: var(--gray); }
.small { font-size: 0.85rem; }
.samples-wrap p { margin: 0.25rem 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip, .views button, .share {
  font: inherit;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  touch-action: manipulation;
}
.chip:active, .views button:active, .share:active { transform: scale(0.97); }
#result { margin-top: 1.25rem; }
.views { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.views button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.score {
  --tone: var(--mixed);
  border-radius: 18px;
  padding: 1.1rem 1.2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "big num" "label label";
  align-items: center;
  gap: 0.25rem 1rem;
  background: color-mix(in srgb, var(--tone) 12%, transparent);
  border: 2px solid var(--tone);
}
.score[data-tone="great"] { --tone: var(--great); }
.score[data-tone="good"] { --tone: var(--good); }
.score[data-tone="mixed"] { --tone: var(--mixed); }
.score[data-tone="bad"] { --tone: var(--bad); }
.score[data-tone="awful"] { --tone: var(--awful); }
.score .big { grid-area: big; font-size: 3rem; line-height: 1; }
.score .grade { font-weight: 900; color: var(--tone); font-size: 3.4rem; }
.score .num { grid-area: num; font-size: 2.4rem; font-weight: 800; font-variant-numeric: tabular-nums; justify-self: end; }
.score .num small { font-size: 1rem; font-weight: 500; color: var(--gray); }
.score .label { grid-area: label; font-size: 1.25rem; font-weight: 700; color: var(--tone); }
.meter { grid-area: big; position: relative; width: min(55vw, 16rem); height: 16px; border-radius: 999px;
  background: linear-gradient(90deg, var(--awful), var(--bad) 35%, var(--mixed) 55%, var(--good) 75%, var(--great)); }
.meter .fill { position: absolute; inset: 0 0 0 var(--p); background: color-mix(in srgb, var(--bg) 75%, transparent); border-radius: 0 999px 999px 0; }
.meter .tick { position: absolute; left: var(--p); top: -6px; width: 4px; height: 28px; margin-left: -2px; background: var(--ink); border-radius: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .score { transition: background-color 200ms ease-out, border-color 200ms ease-out; }
  .meter .fill, .meter .tick { transition: left 200ms ease-out, inset 200ms ease-out; }
}
.drag { margin: 0.75rem 0 0; padding: 0.7rem 0.9rem; border-left: 4px solid var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); border-radius: 0 10px 10px 0; }
.flags { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.flags li { border: 1px solid var(--line); border-radius: 14px; padding: 0.8rem 0.9rem; }
.flags li.ok { border-color: var(--good); }
.flags p { margin: 0.3rem 0 0; }
.flag-head { display: flex; justify-content: space-between; gap: 1rem; }
.conf { color: var(--gray); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.fix { color: var(--gray); }
.ex { font-size: 0.9rem; }
.share { margin-top: 1rem; }
.about { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.about summary { cursor: pointer; font-weight: 700; }
footer { margin-top: 2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font-size: 0.85em; background: color-mix(in srgb, var(--line) 50%, transparent); padding: 0.1em 0.3em; border-radius: 4px; }
.norms { padding-left: 1.1rem; } .norms li { margin: 0.3rem 0; }
.beta { font-weight: 700; font-size: 0.65rem; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 999px; padding: 0.05rem 0.4rem; margin-left: 0.3rem; vertical-align: middle; }

/* ---- 2026-11-19 UX pass: one job on screen, the rest behind disclosure ---- */
header { padding-bottom: 0.75rem; }
textarea { min-height: 5.5rem; resize: none; field-sizing: content; }
.hint { margin: 0.5rem 0 0; color: var(--gray); font-size: 0.9rem; }
.link { font: inherit; color: var(--teal); background: none; border: 0; padding: 0.75rem 0.25rem; margin: -0.75rem 0; text-decoration: underline; cursor: pointer; touch-action: manipulation; }
#result { margin-top: 1rem; }
.reasons { margin-top: 0.75rem; display: grid; gap: 0.5rem; }
.reason { border: 1px solid var(--line); border-radius: 14px; padding: 0 0.9rem; }
.reason summary, .more summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; font-weight: 700; list-style: none; touch-action: manipulation; }
.reason summary::-webkit-details-marker, .more summary::-webkit-details-marker { display: none; }
.reason summary::after, .more summary::after { content: "+" / ""; font-weight: 400; font-size: 1.4rem; color: var(--gray); }
.reason[open] summary::after, .more[open] summary::after { content: "–" / ""; }
.reason p { margin: 0 0 0.7rem; }
.note { margin: 0; color: var(--gray); }
.more { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.more h2 { margin: 1.1rem 0 0.5rem; font-size: 0.8rem; color: var(--gray); }
.more .chip { min-height: 44px; padding: 0.5rem 0.9rem; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.more a { padding: 0.2rem 0; }
