/*
 * tells showcase. One accent (cobalt, the proofreader's blue pencil), one
 * radius (3px), two vendored typefaces: Source Serif 4 for the manuscript
 * column only, Source Sans 3 for everything else. No external request.
 */

@font-face { font-family: "Source Serif 4"; src: url(fonts/source-serif-4-variable.woff2) format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(fonts/source-sans-3-variable.woff2) format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }

:root {
  --bg: #eef0f3;
  --band: #e3e6eb;
  --paper: #fdfdfb;
  --ink: #15181e;
  --muted: #4b5361;
  --rule: #cdd2da;
  --rule-strong: #727b89;
  --accent: #1a43bf;
  --mark: #e1e8ff;
  --code: #e2e5ea;
  --bar-human: #667080;
  --solid-bg: #15181e;
  --solid-ink: #fdfdfb;
  --radius: 3px;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101216; --band: #171a20; --paper: #191c23; --ink: #e5e7eb; --muted: #a3aab6; --rule: #2d323b; --rule-strong: #6b7381;
    --accent: #93b2ff; --mark: #202b4d; --code: #1f232b; --bar-human: #8a93a1; --solid-bg: #e5e7eb; --solid-ink: #101216;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101216; --band: #171a20; --paper: #191c23; --ink: #e5e7eb; --muted: #a3aab6; --rule: #2d323b; --rule-strong: #6b7381;
  --accent: #93b2ff; --mark: #202b4d; --code: #1f232b; --bar-human: #8a93a1; --solid-bg: #e5e7eb; --solid-ink: #101216;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.55 var(--sans); overflow-wrap: break-word; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, pre { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code, pre { font-family: var(--mono); font-size: .875em; }
code { background: var(--code); padding: 1px 5px; border-radius: var(--radius); overflow-wrap: anywhere; }
pre code { background: none; padding: 0; font-size: 1em; overflow-wrap: normal; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }

.skip { position: absolute; left: var(--gutter); top: -4rem; background: var(--solid-bg); color: var(--solid-ink); padding: .5rem .75rem; border-radius: var(--radius); z-index: 2; }
.skip:focus { top: .5rem; }

.nav, .foot { width: min(100% - 2 * var(--gutter), 1180px); margin-inline: auto; }
main > section { padding: 3.5rem max(var(--gutter), (100% - 1180px) / 2); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem); line-height: 1.15; font-weight: 650; letter-spacing: -.012em; margin-bottom: 1rem; text-wrap: balance; }
h3.sub { font-size: 1.0625rem; font-weight: 650; margin: 2.5rem 0 1rem; }
.lede { max-width: 68ch; color: var(--muted); margin-bottom: 2rem; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .55rem 1.05rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: transparent; color: var(--ink); font: 600 .9375rem/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.solid { background: var(--solid-bg); color: var(--solid-ink); border-color: var(--solid-bg); }

/* ---- nav ---- */
.nav { display: flex; align-items: center; gap: 1rem; min-height: 64px; border-bottom: 1px solid var(--rule); }
.wordmark { font: 700 1.375rem/1 var(--serif); letter-spacing: -.01em; text-decoration: none; margin-right: auto; text-decoration: underline dotted var(--accent) 2px; text-underline-offset: 5px; }
.nav nav { display: flex; gap: clamp(.75rem, 2vw, 1.5rem); font-size: .9375rem; }
.nav nav a { text-decoration: none; padding: .75rem 0; }
.nav nav a:hover { text-decoration: underline; }
.nav .btn { min-height: 2.25rem; padding: .3rem .7rem; font-size: .875rem; }
.nav-wide { display: none; }
@media (min-width: 560px) { .nav-wide { display: inline; } }

/* ---- hero ---- */
main > section.hero { padding-block: clamp(2rem, 5vw, 3.5rem) 3.5rem; }
h1 { font-size: clamp(1.875rem, 1.2rem + 3.2vw, 3.25rem); line-height: 1.06; font-weight: 680; letter-spacing: -.022em; max-width: 26ch; text-wrap: balance; }
.sub { margin-top: 1rem; font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); color: var(--muted); max-width: 46ch; }
.cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; align-items: stretch; }
.copy { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.copy code { display: flex; align-items: center; background: none; padding: .4rem .8rem; font-size: .8125rem; min-width: 0; }
.copy .btn { border: 0; border-left: 1px solid var(--rule-strong); border-radius: 0 var(--radius) var(--radius) 0; min-width: 5.25rem; }
@media (max-width: 479px) {
  .cta > .btn { width: 100%; }
  .copy { display: grid; width: 100%; }
  .copy code { font-size: .75rem; white-space: nowrap; overflow-wrap: normal; justify-content: center; padding: .7rem .5rem; }
  .copy .btn { border-left: 0; border-top: 1px solid var(--rule-strong); border-radius: 0 0 var(--radius) var(--radius); }
}

.manuscript { margin-top: 2.5rem; }
.ms-row { display: grid; grid-template-columns: minmax(0, 1fr); }
.ms-text { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: .5rem; background: var(--paper); border-inline: 1px solid var(--rule); padding: .45rem 1rem .45rem .5rem; }
.ms-row:first-child .ms-text { border-top: 1px solid var(--rule); padding-top: 1.5rem; border-radius: var(--radius) var(--radius) 0 0; }
.ms-row:last-child > :last-child { border-bottom: 1px solid var(--rule); padding-bottom: 1.75rem; border-radius: 0 0 var(--radius) var(--radius); }
.ms-ln { font: 400 .75rem/2.35 var(--mono); color: var(--muted); text-align: right; user-select: none; }
.ms-stack { position: relative; min-width: 0; }
.ms-layer { font: 400 1.0625rem/1.62 var(--serif); font-optical-sizing: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.is-heading .ms-layer { font-weight: 650; }
.ms-under { position: absolute; inset: 0; color: transparent; pointer-events: none; user-select: none; }
.ms-over { position: relative; }
.ms-over mark { background: none; color: inherit; }
.u { background: var(--mark); text-decoration-line: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-skip-ink: none; }
.u.weak { text-decoration-style: dotted; }
.u.moderate { text-decoration-style: solid; }
.u.strong { text-decoration-style: double; }
.ms-layer sup { font: 650 .6875rem/0 var(--sans); color: var(--accent); margin-left: 1px; vertical-align: super; font-variant-numeric: tabular-nums; }
.ms-under sup { color: transparent; }

.ms-notes { background: var(--paper); border-inline: 1px solid var(--rule); padding: .1rem 1rem .6rem 2.75rem; font-size: .875rem; line-height: 1.4; }
.ms-notes li { display: grid; grid-template-columns: 1.35rem minmax(0, 1fr); gap: .15rem; padding: .2rem 0 .2rem .6rem; border-left: 2px solid var(--accent); }
.ms-notes li + li { margin-top: .3rem; }
.ms-notes b { color: var(--accent); font-weight: 650; font-variant-numeric: tabular-nums; }
.ms-notes code { background: none; padding: 0; font: 600 .875rem var(--sans); }
.ms-notes i { font-style: normal; color: var(--muted); }

@media (min-width: 900px) {
  .ms-row { grid-template-columns: minmax(0, 68ch) minmax(0, 1fr); column-gap: 2rem; font-size: 1.125rem; }
  .ms-row { grid-template-columns: minmax(0, 46rem) minmax(0, 1fr); }
  .ms-text { grid-template-columns: 2rem minmax(0, 68ch); gap: 1rem; padding: .5rem 2.25rem .5rem 1rem; }
  .ms-layer { font-size: 1.125rem; }
  .ms-notes { background: none; border: 0; padding: .7rem 0 .5rem; }
  .ms-row:first-child .ms-notes { padding-top: 1.7rem; }
  .ms-row:last-child > .ms-notes { border: 0; }
  .ms-row:last-child > .ms-text { border-bottom: 1px solid var(--rule); padding-bottom: 1.75rem; border-radius: 0 0 var(--radius) var(--radius); }
}

/* The rest of the sample, one keystroke away. */
.ms-more { margin-top: .35rem; }
.ms-more > summary { padding: .65rem 1.6rem .65rem .25rem; font-size: .9375rem; font-weight: 600; cursor: pointer; position: relative; list-style: none; }
.ms-more > summary::-webkit-details-marker { display: none; }
.ms-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ms-more[open] > summary { border-bottom: 1px solid var(--rule); margin-bottom: .35rem; }

/* A mark's number is a link to its note. */
.ms-over sup a { color: inherit; text-decoration: none; }
.ms-over sup a:hover { text-decoration: underline; }
.ms-over sup a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ms-notes li:target { background: var(--mark); }

.ms-foot { margin-top: 1rem; font-size: .9375rem; color: var(--muted); max-width: 46rem; }
.ms-foot p + p { margin-top: .35rem; }
.key-u { color: var(--ink); text-decoration: underline var(--accent) 2px; text-underline-offset: 4px; }
.key-u.weak { text-decoration-style: dotted; }
.key-u.strong { text-decoration-style: double; }

/* Findings arrive in reading order. Opacity and transform only. */
.fx { transition: opacity .45s ease, transform .45s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--i) * var(--step, 60ms)); }
.reveal-pending .manuscript .fx { opacity: 0; transition: none; }
.reveal-pending .manuscript li.fx { transform: translateX(10px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fx { transition: none; }
  .reveal-pending .manuscript .fx { opacity: 1; }
  .reveal-pending .manuscript li.fx { transform: none; }
  .btn:active { transform: none; }
}

/* ---- try it ---- */
.try { border-top: 1px solid var(--rule); }
.try-grid { display: grid; gap: 1.25rem; }
.try-input label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: .4rem; }
textarea { display: block; width: 100%; min-height: 16rem; resize: vertical; padding: .9rem 1rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: 400 1rem/1.5 var(--sans); }
.privacy { font-weight: 600; max-width: 34ch; }
.buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.loaded { margin-top: .9rem; font-size: .9375rem; color: var(--muted); min-height: 3em; max-width: 44ch; }
@media (min-width: 900px) {
  .try-grid { grid-template-columns: minmax(0, 46rem) minmax(0, 1fr); column-gap: 2rem; }
  .try-side { padding-top: 1.85rem; }
}

/* On a phone the software keyboard covers half the viewport and the results
   sat under the input, so a typing reader saw the input and none of the
   output. Results come first at narrow widths; the limits stay under them and
   are never collapsed. */
.try-body { display: flex; flex-direction: column; }
.try-results { order: -1; }
@media (min-width: 900px) { .try-body { display: block; } }

.results { margin-top: 1.75rem; }
.summary { color: var(--muted); margin-bottom: 1rem; }
.notice { border: 1px solid var(--ink); border-radius: var(--radius); padding: .7rem .9rem; margin-bottom: 1rem; max-width: 68ch; }

.rt { font-size: .9375rem; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.rt-row { display: grid; grid-template-columns: minmax(0, 1fr) 3.5rem 4.25rem; grid-template-areas: "rule n r" "w b b" "w m m"; column-gap: .75rem; padding: .5rem 0; }
.rt-row + .rt-row { border-top: 1px solid var(--rule); }
.rt-head { font-weight: 650; font-size: .8125rem; color: var(--muted); }
.rt-head .c-w, .rt-head .c-b, .rt-head .c-m { display: none; }
.rt-head .c-rule::after { content: ", weight, published baseline"; }
.c-rule { grid-area: rule; min-width: 0; }
.c-w { grid-area: w; color: var(--muted); font-size: .8125rem; }
.c-n { grid-area: n; text-align: right; font-variant-numeric: tabular-nums; }
.c-r { grid-area: r; text-align: right; font-variant-numeric: tabular-nums; }
.c-b { grid-area: b; color: var(--muted); font-size: .8125rem; }
.c-m { grid-area: m; color: var(--muted); font-size: .8125rem; }
.rt-row { grid-template-areas: "rule n r" "w w w" "b b b" "m m m"; }
.rt-row .no-base, .rt-row .c-m:empty { display: none; }
.rt code { background: none; padding: 0; font-weight: 600; font-size: .875rem; }
.is-zero .c-n, .is-zero .c-r, .is-zero code { color: var(--muted); font-weight: 400; }
.is-above .c-m { color: var(--ink); font-weight: 650; }
.is-above .c-m::before { content: ""; display: inline-block; width: .55em; height: .55em; margin-right: .4em; background: var(--ink); transform: rotate(45deg); }
@media (min-width: 760px) {
  .rt-row { grid-template-columns: minmax(10rem, 1.1fr) 5.5rem 3.5rem 4.5rem minmax(0, 2.6fr) 8rem; grid-template-areas: "rule w n r b m"; column-gap: 1rem; padding: .4rem 0; align-items: baseline; }
  .rt-row .c-w, .rt-row .no-base, .rt-row .c-m:empty, .rt-head .c-w, .rt-head .c-b, .rt-head .c-m { display: block; }
  .rt-head .c-rule::after { content: none; }
  .c-w, .c-b, .c-m { font-size: .875rem; }
}

.findings { display: grid; gap: 1.5rem 2.5rem; }
@media (min-width: 900px) { .findings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fg h4 { font-size: .9375rem; font-weight: 400; color: var(--muted); padding-bottom: .35rem; border-bottom: 1px solid var(--rule); }
.fg h4 code { background: none; padding: 0; color: var(--ink); font: 650 .9375rem var(--sans); margin-right: .35rem; }
.fg li { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); gap: .5rem; padding: .4rem 0; font-size: .9375rem; }
.loc { font: 400 .8125rem/1.8 var(--mono); color: var(--muted); }
.ex { min-width: 0; }
.ex mark { background: var(--mark); color: inherit; text-decoration: underline var(--accent) 2px; text-underline-offset: 3px; }
.more, .empty { color: var(--muted); font-size: .9375rem; }

.limits { margin-top: 2.5rem; border-top: 2px solid var(--ink); padding-top: 1rem; max-width: 46rem; }
.limits h3 { font-size: 1.0625rem; font-weight: 650; margin-bottom: .5rem; }
.limits ol { list-style: decimal; padding-left: 1.25rem; }
.limits li { padding: .15rem 0; }
.limits p { margin-top: .6rem; font-size: .9375rem; color: var(--muted); }

/* ---- limits, as a statement ---- */
main > section.statement { background: var(--band); padding-block: clamp(3.5rem, 8vw, 6rem); }
.statements { counter-reset: s; display: grid; gap: clamp(1.25rem, 3vw, 2rem); margin-top: 2rem; }
.statements li { counter-increment: s; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); font-size: clamp(1.3125rem, 1rem + 1.9vw, 2.25rem); line-height: 1.2; font-weight: 500; letter-spacing: -.012em; max-width: 30em; }
.statements li::before { content: counter(s); font-size: 1rem; line-height: 2; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.statements strong { font-weight: 750; }
.statement-source { margin-top: 1rem; max-width: 70ch; color: var(--muted); font-size: .9375rem; }
.refuses { margin-top: 2.25rem; max-width: 58ch; font-size: clamp(1.0625rem, 1rem + .5vw, 1.3125rem); line-height: 1.45; }

/* ---- rules ---- */
.rule { border-top: 1px solid var(--rule); }
.rule > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; padding: .7rem 1.6rem .7rem 0; cursor: pointer; position: relative; list-style: none; }
.rule > summary::-webkit-details-marker { display: none; }
.rule > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rule > summary code { background: none; padding: 0; font: 650 1.0625rem var(--sans); }
.rule-name { font-size: .9375rem; }
.rule-w, .rule-off { font-size: .875rem; color: var(--muted); }
.rule-off code { background: var(--code); padding: 0 .25rem; font: 600 .8125rem var(--mono); }
.rule-body { display: grid; gap: .75rem 2.5rem; font-size: .9875rem; padding: 0 0 1.1rem; }
.rule-what, .rule-ref { display: grid; gap: .5rem; align-content: start; max-width: 68ch; }
.rule-ref { font-size: .9375rem; }
@media (min-width: 1080px) { .rule-body { grid-template-columns: minmax(0, 1fr) minmax(0, 19rem); } }
.rule-body b { font-weight: 650; }
.sources { font-size: .875rem; color: var(--muted); display: grid; gap: .15rem; }

/* ---- corpus ---- */
.corpus { border-top: 1px solid var(--rule); }
.facts { display: grid; gap: 1.75rem 3rem; max-width: 62rem; }
.facts li { max-width: 60ch; }
.facts code { background: none; padding: 0; font-weight: 600; }
.facts strong { display: block; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); line-height: 1.15; font-weight: 680; letter-spacing: -.015em; margin-bottom: .3rem; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.defs { position: absolute; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-size: .9375rem; color: var(--muted); margin-bottom: 1.25rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend svg { width: 12px; height: 12px; flex: none; }
.multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.5rem 1.25rem; }
@media (min-width: 760px) { .multiples { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2rem 2rem; } }
.sm svg { display: block; width: 100%; height: auto; aspect-ratio: 200 / 150; overflow: visible; }
.sm figcaption { display: grid; gap: .1rem; margin-top: .3rem; font-size: .8125rem; line-height: 1.35; color: var(--muted); }
.sm figcaption code { background: none; padding: 0; color: var(--ink); font: 650 .9375rem var(--sans); }
.bar.human { fill: var(--bar-human); }
.bar.machine { fill: var(--accent); }
.bar.hybrid { stroke: var(--accent); stroke-width: 1; }
.bar.zero { fill: var(--rule-strong); stroke: none; }
.hatch-bg { fill: var(--bg); }
.hatch-line { stroke: var(--accent); stroke-width: 2.4; }
.axis { stroke: var(--rule-strong); stroke-width: 1; }
.axis.faint { stroke: var(--rule); }
.ref { stroke-width: 1; stroke-dasharray: 3 3; }
.ref-human { stroke: var(--ink); }
.ref-machine { stroke: var(--accent); }
.yl, .gl { font: 400 11px var(--sans); fill: var(--muted); }
.order { margin-top: 1.5rem; font-size: .875rem; color: var(--muted); max-width: 90ch; }
.order code { background: none; padding: 0; }
.corpus-notes { margin-top: 2rem; display: grid; gap: .9rem; max-width: 46rem; }
.insample { border-top: 2px solid var(--ink); padding-top: 1rem; }
.observed { font-size: .9375rem; color: var(--muted); }

/* ---- use it ---- */
.code-col { max-width: 46rem; }
.code-col h3 { font-size: 1.0625rem; font-weight: 650; margin: 2rem 0 .6rem; }
.code-col h3:first-child { margin-top: .5rem; }
.code-col p { margin-top: .6rem; color: var(--muted); font-size: .9875rem; }
pre { background: var(--code); color: var(--ink); padding: .9rem 1rem; border-radius: var(--radius); overflow-x: auto; line-height: 1.55; font-size: .8438rem; }
pre.out { margin-top: .75rem; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: visible; }
pre.out code { overflow-wrap: anywhere; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--rule); padding-block: 2rem 3rem; font-size: .9375rem; color: var(--muted); display: grid; gap: .4rem; }

@media (min-width: 760px) { :root { --gutter: 32px; } }

/* The disclosure affordance. A chevron drawn with two borders, because a
   summary laid out with flex loses its ::marker in Chromium. */
.rule > summary::after, .ms-more > summary::after {
  content: ""; position: absolute; right: .35rem; top: 50%;
  width: .45rem; height: .45rem; margin-top: -.35rem;
  border-right: 2px solid var(--rule-strong); border-bottom: 2px solid var(--rule-strong);
  transform: rotate(45deg); transition: transform .15s ease;
}
.rule[open] > summary::after, .ms-more[open] > summary::after { transform: rotate(225deg); margin-top: -.1rem; }
@media (prefers-reduced-motion: reduce) { .rule > summary::after, .ms-more > summary::after { transition: none; } }
