/* atslint web. Tokens and components come from design/style-guide.html;
   change them there first, then here. */
:root {
  /* surfaces: warm off-white */
  --paper: #f6f4ee;  --surface: #fffdf8;  --sunken: #efece3;
  --line: #d9d4c6;   --line-strong: #8f8a7a;
  /* ink */
  --ink: #1a2420;    --ink-2: #44504a;    --ink-3: #5f6a64;
  /* brand: pine */
  --pine-50: #e8f1ee; --pine-100: #cfe3dd; --pine-300: #7fb3a6;
  --pine-500: #1f6f61; --pine-600: #175a4e; --pine-700: #10453c; --pine-900: #0a2a25;
  --action: var(--pine-600); --action-hover: var(--pine-700); --on-action: #ffffff; --link: var(--pine-600);
  /* semantic: text / background / border */
  --error: #a4302a;  --error-bg: #fbeae7;  --error-line: #c2473f;
  --warn: #7a4f00;   --warn-bg: #fbf0d3;   --warn-line: #c9a13c;
  --ok: #17604f;     --ok-bg: #e4f2ec;     --ok-line: #7fb3a6;
  --info: #2a4d7a;   --info-bg: #e8eef7;   --info-line: #9db4d4;
  /* clay: the one warm accent. used for the People icon on the landing page */
  --clay: #9a4725;   --clay-bg: #f8e6dc;   --clay-line: #e0b29c;
  /* the highlighter: hidden characters, marked like a proof */
  --wash: var(--pine-50); --mark: #ffe66b;   --on-mark: #1a2420;
  /* type: system stacks only, so the page loads nothing from anyone else */
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --t-xs: 0.75rem; --t-sm: 0.875rem; --t-base: 1rem; --t-md: 1.125rem; --t-lg: 1.25rem;
  --t-xl: 1.563rem; --t-2xl: 1.953rem; --t-3xl: 2.441rem; --t-4xl: 3.052rem;
  /* space: 4 px base */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem;
  --measure: 44rem;          /* the page column */
  /* shape */
  --r-1: 2px; --r-2: 8px; --r-3: 14px; --r-4: 20px; --r-pill: 999px;
  --lift: 0 1px 0 rgba(26,36,32,.03), 0 14px 32px -18px rgba(26,36,32,.30);
  --focus: 0 0 0 2px var(--paper), 0 0 0 4px var(--pine-500);
  /* motion */
  --fast: 120ms; --base: 200ms; --slow: 320ms; --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #101613; --surface: #17201c; --sunken: #0c110f; --line: #2a3630; --line-strong: #6b7a72;
  --ink: #e8ece6; --ink-2: #b4beb7; --ink-3: #8f9b94;
  --action: #58b8a4; --action-hover: #7fd0bd; --on-action: #06211c; --link: #7fd0bd;
  --error: #f2a39b; --error-bg: #3a1a17; --error-line: #e07a70;
  --warn: #f0cd7a; --warn-bg: #33290f; --warn-line: #a88a3a;
  --ok: #8fd6bf; --ok-bg: #12302a; --ok-line: #3f7f70;
  --info: #a9c4ea; --info-bg: #172338; --info-line: #46618c;
  --clay: #eba882; --clay-bg: #3a2318; --clay-line: #7a4a33;
  --wash: #12302a; --mark: #f2d94e; --on-mark: #1a1500;
  --lift: 0 1px 0 rgba(0,0,0,.3), 0 14px 32px -16px rgba(0,0,0,.75);
  --focus: 0 0 0 2px var(--paper), 0 0 0 4px #7fd0bd;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --paper: #101613; --surface: #17201c; --sunken: #0c110f; --line: #2a3630; --line-strong: #6b7a72;
  --ink: #e8ece6; --ink-2: #b4beb7; --ink-3: #8f9b94;
  --action: #58b8a4; --action-hover: #7fd0bd; --on-action: #06211c; --link: #7fd0bd;
  --error: #f2a39b; --error-bg: #3a1a17; --error-line: #e07a70;
  --warn: #f0cd7a; --warn-bg: #33290f; --warn-line: #a88a3a;
  --ok: #8fd6bf; --ok-bg: #12302a; --ok-line: #3f7f70;
  --info: #a9c4ea; --info-bg: #172338; --info-line: #46618c;
  --clay: #eba882; --clay-bg: #3a2318; --clay-line: #7a4a33;
  --wash: #12302a; --mark: #f2d94e; --on-mark: #1a1500;
  --lift: 0 1px 0 rgba(0,0,0,.3), 0 14px 32px -16px rgba(0,0,0,.75);
  --focus: 0 0 0 2px var(--paper), 0 0 0 4px #7fd0bd;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; color: var(--ink); font: 400 var(--t-base)/1.55 var(--sans);
  background: radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--pine-300) 14%, transparent), transparent 60%) fixed,
    radial-gradient(70% 40% at 0% 8%, color-mix(in srgb, var(--clay) 9%, transparent), transparent 60%) fixed, var(--paper); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
p { margin: 0 0 var(--s-4); } a { color: var(--link); text-underline-offset: 0.18em; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-2); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The honeypot: in the form, out of sight, out of the tab order and the accessibility tree. */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 2.75rem; padding: 0 var(--s-5); border: 1px solid transparent; border-radius: var(--r-pill); font: 600 var(--t-base)/1 var(--sans); cursor: pointer; text-decoration: none; transition: background var(--fast), border-color var(--fast), transform var(--fast) var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--action); color: var(--on-action); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--action) 70%, transparent); } .btn-primary:hover { background: var(--action-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); } .btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--link); padding: 0 var(--s-3); } .btn-ghost:hover { background: var(--sunken); }
.btn-danger { background: var(--surface); color: var(--error); border-color: var(--error-line); } .btn-danger:hover { background: var(--error-bg); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 2.25rem; padding: 0 var(--s-3); font-size: var(--t-sm); position: relative; }
.btn-sm::after { content: ""; position: absolute; inset: -4px 0; }           /* 36 px tall, 44 px tap area */
.btn-lg { min-height: 3.25rem; padding: 0 var(--s-6); font-size: var(--t-md); }

.field { display: grid; gap: var(--s-2); }
.field label, .label { font: 600 var(--t-sm)/1.3 var(--sans); }
.field .hint { font-size: var(--t-sm); color: var(--ink-3); }
.input, .textarea { width: 100%; min-height: 2.75rem; padding: var(--s-2) var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-2); background: var(--surface); color: var(--ink); font: 400 var(--t-base)/1.4 var(--sans); transition: border-color var(--fast), box-shadow var(--fast); }
.textarea { min-height: 7rem; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:hover, .textarea:hover { border-color: var(--ink); }
.input:focus-visible, .textarea:focus-visible { box-shadow: var(--focus); border-color: var(--action); }
.input[disabled] { background: var(--sunken); color: var(--ink-3); border-color: var(--line); }
.field.bad .input, .field.bad .textarea { border-color: var(--error-line); border-width: 2px; background: var(--error-bg); }
.field .msg { display: flex; gap: var(--s-2); font: 600 var(--t-sm)/1.4 var(--sans); color: var(--error); }
.field .msg::before { content: "✕"; }
.field .foot { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--t-sm); color: var(--ink-3); }
.field .count { font-family: var(--mono); white-space: nowrap; }
.field.bad .count { color: var(--error); font-weight: 700; }
.pointer { font-size: var(--t-sm); color: var(--ink-2); margin: 0; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-1) var(--s-3); border-top: 1px solid var(--line); padding-top: var(--s-3); font-size: var(--t-sm); }
.links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.prose h3 { font: 600 var(--t-md)/1.3 var(--sans); letter-spacing: 0; margin: var(--s-5) 0 var(--s-1); }
.todo { background: var(--mark); color: var(--on-mark); padding: 0 0.3em; border-radius: var(--r-1); font-weight: 600; }
.prose h2 { font-size: var(--t-xl); margin: var(--s-5) 0 var(--s-2); } .prose ul { margin: 0 0 var(--s-4); padding-left: 1.2rem; } .prose li { margin-bottom: var(--s-2); }
.check { display: flex; gap: var(--s-3); align-items: flex-start; min-height: 2.75rem; padding: var(--s-2) 0; cursor: pointer; }
.check input { appearance: none; flex: none; width: 1.375rem; height: 1.375rem; margin: 2px 0 0; border: 1.5px solid var(--line-strong); border-radius: var(--r-1); background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: background var(--fast), border-color var(--fast); }
.check input::after { content: ""; width: 0.7rem; height: 0.4rem; border: solid var(--on-action); border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform var(--fast) var(--ease); }
.check input:checked { background: var(--action); border-color: var(--action); } .check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }

.drop { display: grid; justify-items: center; gap: var(--s-2); padding: var(--s-6) var(--s-5); border: 1.5px dashed var(--pine-300); border-radius: var(--r-3); background: var(--wash); text-align: center; cursor: pointer; transition: border-color var(--fast), background var(--fast), transform var(--base) var(--ease); }
.drop .ic { width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--surface); color: var(--action); display: grid; place-items: center; box-shadow: var(--lift); }
.drop.has { background: var(--surface); border-color: var(--line-strong); }
.drop:hover, .drop.over { border-color: var(--action); background: var(--wash); }
.drop b { font: 600 var(--t-lg)/1.2 var(--serif); } .drop span { color: var(--ink-3); font-size: var(--t-sm); }
.drop.has { border-style: solid; grid-template-columns: auto 1fr auto; justify-items: start; text-align: left; align-items: center; padding: var(--s-4) var(--s-5); cursor: default; }
.drop.bad { border-color: var(--error-line); border-style: solid; border-width: 2px; background: var(--error-bg); }
.doc { width: 2.25rem; height: 2.75rem; border: 1.5px solid var(--ink); border-radius: var(--r-1); position: relative; background: var(--paper); }
.doc::before { content: ""; position: absolute; inset: 9px 6px auto; height: 1.5px; background: var(--ink); box-shadow: 0 6px 0 var(--ink), 0 12px 0 var(--ink-3); }

.alert { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid; border-left-width: 4px; border-radius: var(--r-2); font-size: var(--t-sm); }
.alert b { display: block; font-size: var(--t-base); }
.alert.error { color: var(--error); background: var(--error-bg); border-color: var(--error-line); }
.alert.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.alert.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.alert.info { color: var(--info); background: var(--info-bg); border-color: var(--info-line); }
.alert p { margin: 0; color: var(--ink); }
dialog.confirm { width: min(26rem, calc(100vw - 2 * var(--s-4))); margin: auto; padding: var(--s-5); border: 1px solid var(--line-strong); border-radius: var(--r-3); background: var(--surface); color: var(--ink); box-shadow: var(--lift); }
.confirm::backdrop { background: rgba(10, 20, 17, .5); }
.confirm h2 { font-size: var(--t-xl); margin: 0 0 var(--s-2); }
.confirm p { margin: 0 0 var(--s-5); color: var(--ink-2); }

.verdict { display: grid; grid-template-columns: auto 1fr; gap: var(--s-5); align-items: center; padding: var(--s-5); min-height: 7.5rem; border-radius: var(--r-4); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--lift); transition: background var(--slow), border-color var(--slow); }
.verdict .glyph { width: 3.75rem; height: 3.75rem; border-radius: 50%; display: grid; place-items: center; font: 700 var(--t-xl)/1 var(--sans); background: var(--sunken); color: var(--ink-2); transition: background var(--slow), color var(--slow); }
.verdict .glyph .spin { width: 1.75rem; height: 1.75rem; border-width: 3px; }
.verdict.block .glyph { background: var(--error); color: var(--error-bg); } .verdict.improve .glyph { background: var(--warn); color: var(--warn-bg); } .verdict.clean .glyph { background: var(--ok); color: var(--ok-bg); }
.verdict .bar { height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; margin-top: var(--s-3); max-width: 20rem; }
.verdict .bar i { display: block; width: 40%; height: 100%; border-radius: 3px; background: var(--action); animation: slide 1.4s var(--ease) infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.pop { display: grid; place-items: center; animation: pop 420ms var(--ease) both; } @keyframes pop { from { transform: scale(.6); opacity: 0; } }
.verdict h3 { font-size: var(--t-xl); color: var(--ink); } .verdict p { margin: var(--s-1) 0 0; color: var(--ink-2); }
.verdict.block { border-color: var(--error-line); background: var(--error-bg); }
.verdict.improve { border-color: var(--warn-line); background: var(--warn-bg); }
.verdict.clean { border-color: var(--ok-line); background: var(--ok-bg); }
.readers { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.reader { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s-3); align-items: center; padding: var(--s-4) var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); }
.reader small { font: 600 var(--t-xs)/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.reader b { font: 600 var(--t-lg)/1.3 var(--serif); grid-column: 2; } .reader .subtext { grid-column: 2; font-size: var(--t-sm); color: var(--ink-2); }
.reader .dot { grid-row: span 3; width: 2.5rem; height: 2.5rem; border: 1px solid transparent; transition: background var(--slow), color var(--slow), border-color var(--slow); }
.reader.wait b { color: var(--ink-3); } .reader.wait .dot { background: var(--sunken); color: var(--ink-3); }
.reader.sev-ok .dot { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.reader.sev-should .dot { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.reader.sev-must .dot { background: var(--error-bg); color: var(--error); border-color: var(--error-line); }
.dot { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; }
.dot.robot { background: var(--pine-50); color: var(--action); } .dot.people { background: var(--clay-bg); color: var(--clay); } .dot.file { background: var(--sunken); color: var(--ink-2); }
.areas { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.area { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.area:last-child { border-bottom: 0; } a.area:hover { background: var(--sunken); }
.area .st { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; font: 700 var(--t-xs)/1 var(--sans); border: 1px solid; }
.area .st.wait { border: 2px solid var(--line); border-top-color: var(--action); animation: spin 800ms linear infinite; }
.area .st.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.area .st.should { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.area .st.must { background: var(--error-bg); color: var(--error); border-color: var(--error-line); }
.area b { font-weight: 600; } .area .what { display: block; font-size: var(--t-xs); color: var(--ink-3); }
.area .res { font-size: var(--t-sm); color: var(--ink-2); text-align: right; }
.area .res .tag { display: block; font-weight: 600; } .area .tag.ok { color: var(--ok); } .area .tag.should { color: var(--warn); } .area .tag.must { color: var(--error); }
.area .res .what { color: var(--ink-2); }
.resolve { animation: resolve var(--slow) var(--ease) both; } @keyframes resolve { from { opacity: 0; transform: translateY(3px); } }
.logo { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 10px; background: var(--action); color: var(--on-action); display: grid; place-items: center; }
.hero h1 { font-size: clamp(var(--t-2xl), 6vw, 2.75rem); max-width: none; }
.hero .need { font-size: 1.1875rem; line-height: 1.5; color: var(--ink); margin: var(--s-4) 0 0; max-width: 38rem; }
.landing .hero, .landing .how, .landing .pointer, .landing > h2.sub { text-align: center; } .landing .hero .need { margin-inline: auto; }
.landing .card > .row, .landing details.jd > summary { justify-content: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-4); box-shadow: var(--lift); padding: var(--s-5); }
.card .how { font-weight: 600; margin: 0; }
details.jd { border-top: 1px solid var(--line); padding-top: var(--s-2); }
details.jd > summary { color: var(--link); } details.jd[open] > summary { margin-bottom: var(--s-2); }
.covers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.covers > div { background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); border-radius: var(--r-3); padding: var(--s-4); font-size: var(--t-sm); color: var(--ink-2); }
.covers b { display: flex; align-items: center; gap: var(--s-2); color: var(--ink); font-size: 0.9375rem; margin-bottom: var(--s-1); }
.done { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: center; padding: var(--s-5); border-radius: var(--r-3); background: var(--surface); border: 1px solid var(--line); } .done p { margin: 0; }

.badge { display: inline-flex; align-items: center; gap: 0.35em; padding: 0.2em 0.7em; border-radius: var(--r-pill); border: 1px solid; font: 600 var(--t-xs)/1.4 var(--sans); letter-spacing: 0.03em; white-space: nowrap; }
.badge.must { color: var(--error); background: var(--error-bg); border-color: var(--error-line); } .badge.must::before { content: "✕"; }
.badge.should { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); } .badge.should::before { content: "▲"; }
.badge.note { color: var(--info); background: var(--info-bg); border-color: var(--info-line); } .badge.note::before { content: "·"; font-weight: 900; }
.badge.fixed { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); } .badge.fixed::before { content: "✓"; }
.who { font: 500 var(--t-xs)/1.4 var(--sans); color: var(--ink-3); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 0.15em 0.7em; }
.impact { display: inline-flex; flex-direction: column; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--r-2); overflow: hidden; flex: none; line-height: 1.2; }
.impact .label { background: var(--ink-3); color: var(--surface); font: 600 0.625rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.06em; padding: 1px var(--s-2); }
.impact .value { background: var(--surface); color: var(--ink); font: 600 var(--t-xs)/1.2 var(--sans); padding: 2px var(--s-2); white-space: nowrap; }

.finding { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: var(--s-5); }
.finding header { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; margin-bottom: var(--s-3); }
.finding h3 { font-size: var(--t-lg); flex: 1 1 14rem; }
.finding > p { margin-bottom: var(--s-3); }
.finding dl { margin: 0; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--s-2) var(--s-3); font-size: var(--t-sm); }
.finding dt { font: 600 var(--t-xs)/1.9 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.finding dd { margin: 0; color: var(--ink-2); } .finding dd.quote { font-family: var(--mono); color: var(--ink); background: var(--sunken); border-radius: var(--r-1); padding: 2px var(--s-2); overflow-wrap: anywhere; }
.finding dd.fix { color: var(--ink); font-weight: 500; }
.fixlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.fixlist .badge { margin-left: var(--s-2); vertical-align: 1px; }
.fixlist > * { padding: var(--s-2) var(--s-5); border-bottom: 1px solid var(--line); } .fixlist > *:last-child { border-bottom: 0; }
.fixlist .check span b { display: block; } .fixlist .check span small { color: var(--ink-2); font-size: var(--t-sm); }
.fixlist .all { background: var(--sunken); border-radius: var(--r-3) var(--r-3) 0 0; font-weight: 600; }

.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--line-strong); overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; min-height: 2.75rem; padding: 0 var(--s-4); border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: none; color: var(--ink-2); font: 500 var(--t-base)/1 var(--sans); cursor: pointer; transition: color var(--fast), border-color var(--fast); }
.tabs button:hover { color: var(--ink); } .tabs button[disabled] { opacity: 0.45; cursor: default; } .tabs button[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--action); }
.tabs .count { font: 600 var(--t-xs)/1 var(--mono); margin-left: var(--s-2); padding: 2px 6px; border-radius: var(--r-pill); background: var(--sunken); color: var(--ink-2); }
.seg { display: inline-flex; padding: 3px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-pill); }
.seg button { min-height: 2.25rem; padding: 0 var(--s-4); border: 0; border-radius: var(--r-pill); background: none; color: var(--ink-2); font: 500 var(--t-sm)/1 var(--sans); cursor: pointer; position: relative; transition: background var(--fast), color var(--fast); }
.seg button::after { content: ""; position: absolute; inset: -5px 0; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 0 0 1px var(--line-strong); }
.textview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: var(--s-4); font: 400 var(--t-sm)/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 16rem; overflow: auto; }
.textview .pg { display: block; color: var(--ink-3); border-bottom: 1px dashed var(--line-strong); margin: 0 0 var(--s-2); }
.chip { background: var(--mark); color: var(--on-mark); border-radius: var(--r-1); padding: 0 0.3em; font-size: 0.85em; font-weight: 600; }
.meta { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); }
.meta .mrow { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.meta .mrow:last-child { border-bottom: 0; } .meta .cur { font-size: var(--t-sm); color: var(--ink-2); overflow-wrap: anywhere; }
.meta .neq { color: var(--warn); font-weight: 700; }
.progress { display: flex; align-items: center; gap: var(--s-3); color: var(--ink-2); }
.spin { width: 1.25rem; height: 1.25rem; border: 2px solid var(--line); border-top-color: var(--action); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stack > * + * { margin-top: var(--s-4); }
.page { background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r-3); padding: var(--s-6) var(--s-5); max-width: calc(var(--measure) + 3rem); }
.page h1 { font-size: var(--t-3xl); } .page .lede { color: var(--ink-2); font-size: var(--t-md); margin: var(--s-3) 0 var(--s-5); }
.page .filebar { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: baseline; justify-content: space-between; margin-bottom: var(--s-4); color: var(--ink-3); font-size: var(--t-sm); }
.actions { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-3) 0; background: linear-gradient(transparent, var(--paper) 30%); }
.actions .grow { flex: 1; }


/* ---- page layout */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding-top: var(--s-4); padding-bottom: 0; }
.top .btn { flex: none; }
.top .site { font: 600 var(--t-lg)/1.2 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -0.02em; display: flex; align-items: center; column-gap: var(--s-3); min-width: 0; min-height: 2.75rem; }
.top .site .aside { font-family: var(--serif); font-weight: 400; font-size: var(--t-base); letter-spacing: normal; color: var(--ink-3); white-space: nowrap; }
.top + main.wrap { padding-top: var(--s-5); }
.meta .mrow { grid-template-columns: 6.5rem minmax(0, 1fr) auto; }
.meta .mrow .state { display: block; margin-top: var(--s-1); font-size: var(--t-sm); color: var(--ink-3); }
.meta .mrow .state b { color: var(--warn); }
.meta .mrow .side { display: flex; gap: var(--s-2); }
.pointer { font-size: var(--t-sm); color: var(--ink-2); margin: 0; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-1) var(--s-3); border-top: 1px solid var(--line); padding-top: var(--s-3); font-size: var(--t-sm); }
.links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.links a + a::before { content: "|"; display: inline-block; margin-right: var(--s-3); color: var(--ink-3); }   /* a divider; inline-block keeps the link underline off it */
.foot { padding-top: 0; padding-bottom: var(--s-6); }
.credit { margin: 0; font-size: var(--t-sm); color: var(--ink-3); }
main.wrap { padding-bottom: var(--s-6); }
.prose h2 { font-size: var(--t-xl); margin: var(--s-5) 0 var(--s-2); } .prose ul { margin: 0 0 var(--s-4); padding-left: 1.2rem; } .prose li { margin-bottom: var(--s-2); }
.prose h3 { font: 600 var(--t-md)/1.3 var(--sans); letter-spacing: 0; margin: var(--s-5) 0 var(--s-1); }
.todo { background: var(--mark); color: var(--on-mark); padding: 0 0.3em; border-radius: var(--r-1); font-weight: 600; }
.field .foot { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--t-sm); color: var(--ink-3); padding: 0; }
.field .count { font-family: var(--mono); white-space: nowrap; }
.field.bad .count { color: var(--error); font-weight: 700; }
.drop:focus-within { box-shadow: var(--focus); }
.drop .name { font: 600 var(--t-base)/1.3 var(--sans); color: var(--ink); overflow-wrap: anywhere; }
.drop .msg { color: var(--error); font-weight: 600; font-size: var(--t-sm); }
.verdict h2 { font-size: var(--t-xl); color: var(--ink); }
.verdict h2:focus-visible { box-shadow: none; text-decoration: underline; text-decoration-thickness: 2px; }
.wrap { max-width: calc(var(--measure) + 2 * var(--s-5)); margin: 0 auto; padding: var(--s-7) var(--s-5) var(--s-8); }
.wrap > .stack > h1, .prose > h1 { font-size: clamp(var(--t-2xl), 5vw, var(--t-3xl)); }
.lede { color: var(--ink-2); font-size: var(--t-md); margin: var(--s-3) 0 0; }
h2.sub { font: 600 var(--t-xs)/1.2 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); margin: var(--s-6) 0 var(--s-3); }
.panel > h2.sub:first-child { margin-top: var(--s-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.stack > * + * { margin-top: var(--s-4); }
.note { color: var(--ink-2); font-size: var(--t-sm); }
.filebar { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; justify-content: space-between; color: var(--ink-3); font-size: var(--t-sm); }
.filebar b { color: var(--ink); }
.actions { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-4) 0 var(--s-3); background: linear-gradient(transparent, var(--paper) 35%); }
.actions .grow { flex: 1; }
.panel { animation: appear var(--slow) var(--ease) both; }
@keyframes appear { from { opacity: 0; } }
.fyi { margin: 0; padding-left: 1.2rem; color: var(--ink-2); font-size: var(--t-sm); } .fyi li { margin-bottom: var(--s-1); }
.kw { width: 100%; border-collapse: collapse; font-size: var(--t-sm); background: var(--surface); border: 1px solid var(--line); }
.kw th, .kw td { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); vertical-align: top; }
.kw th { font: 600 var(--t-xs)/1.4 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.checks { margin: var(--s-2) 0 0; padding-left: 0; list-style: none; font-size: var(--t-sm); color: var(--ink); }
details > summary { cursor: pointer; min-height: 2.75rem; display: flex; align-items: center; font-weight: 600; }
.fixlist .side { margin-left: auto; flex: none; }
.fixlist .check { align-items: center; } .fixlist .check input { margin-top: 0; }
.fixlist .plain { display: flex; gap: var(--s-3); align-items: center; min-height: 2.75rem; }

@media (max-width: 48rem) {
  .wrap { padding: var(--s-5) var(--s-4) var(--s-7); }
  .meta .mrow { grid-template-columns: 1fr; gap: var(--s-1); }
  .input, .textarea { font-size: 1rem; }
  .covers, .readers { grid-template-columns: 1fr; } .verdict { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  .spin { animation: none; border-right-color: var(--action); }
}
