/* AGENTS.md for Empirical Legal Scholars: one Markdown file, rendered for reading.
   Body text in Playfair, justified; headings and the interface in IBM Plex Sans; code in IBM Plex Mono.
   Colors are tokens. White is the default; dark follows the reader's system setting
   unless they choose with the toggle (stored as <html data-theme>). Text size is
   --reading-scale, set by the size buttons. */
:root {
  color-scheme: light;
  --reading-scale: 1;
  --bg: #ffffff;
  --text: #1d1b20;
  --muted: #666170;
  --faint: #aba5ae;
  --rule: rgba(29, 27, 32, 0.1);
  --border: rgba(29, 27, 32, 0.14);
  --bar: #f7f7f8;
  --panel: #fafafa;
  --accent: #8a2432;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(138, 36, 50, 0.07);
  --accent-select: rgba(138, 36, 50, 0.16);
  --draft: #8a5300;
  --draft-soft: #fff8ec;
  --code-bg: #f5f4f2;
  --mark: rgba(255, 214, 102, 0.5);
  --del: #a3222a;
  --del-soft: rgba(196, 43, 52, 0.09);
  --ins: #17643a;
  --ins-soft: rgba(30, 132, 73, 0.11);
  --good: #17643a;
  --good-soft: #f1f8f3;
  --warn: #8a5300;
  --warn-soft: #fff8ec;
  --bad: #a3222a;
  --bad-soft: #fdf3f3;
  --mine: #1f55c7;
  --mine-soft: rgba(31, 85, 199, 0.09);
  --others: #b25600;
  --others-soft: rgba(230, 126, 34, 0.11);
  --pending: #6a46c2;
  --pending-soft: rgba(106, 70, 194, 0.09);
  --old: #6e5332;
  --old-contrast: #ffffff;
  --old-soft: #f9f4ea;
  --old-bar: #f1e9da;
  --old-line: rgba(110, 83, 50, 0.3);
  --old-tint: rgba(110, 83, 50, 0.09);
  --comment: #946200;
  --comment-soft: rgba(255, 190, 0, 0.16);
  --highlight: rgba(255, 228, 0, 0.42);
  --shadow: 0 1px 2px rgba(29, 27, 32, 0.04), 0 10px 30px rgba(29, 27, 32, 0.06);
  --serif: "Playfair", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 46rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131217;
  --text: #ece7df;
  --muted: #aaa3a0;
  --faint: #6f6a72;
  --rule: rgba(236, 231, 223, 0.1);
  --border: rgba(236, 231, 223, 0.14);
  --bar: #1b1a20;
  --panel: #1a191f;
  --accent: #e9a2aa;
  --accent-contrast: #1d1216;
  --accent-soft: rgba(233, 162, 170, 0.1);
  --accent-select: rgba(233, 162, 170, 0.24);
  --draft: #f2c26b;
  --draft-soft: #231e14;
  --code-bg: #1d1c22;
  --mark: rgba(242, 194, 107, 0.26);
  --del: #f19a9f;
  --del-soft: rgba(241, 154, 159, 0.13);
  --ins: #8fd6a8;
  --ins-soft: rgba(143, 214, 168, 0.13);
  --good: #8fd6a8;
  --good-soft: #15201a;
  --warn: #f2c26b;
  --warn-soft: #231e14;
  --bad: #f19a9f;
  --bad-soft: #251718;
  --mine: #8fb4ff;
  --mine-soft: rgba(143, 180, 255, 0.15);
  --others: #f2a35e;
  --others-soft: rgba(242, 163, 94, 0.15);
  --pending: #b9a3f5;
  --pending-soft: rgba(185, 163, 245, 0.15);
  --old: #d8bb8e;
  --old-contrast: #1b1408;
  --old-soft: #1c1a16;
  --old-bar: #24211b;
  --old-line: rgba(216, 187, 142, 0.3);
  --old-tint: rgba(216, 187, 142, 0.1);
  --comment: #e8c463;
  --comment-soft: rgba(232, 196, 99, 0.15);
  --highlight: rgba(250, 220, 90, 0.27);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131217;
    --text: #ece7df;
    --muted: #aaa3a0;
    --faint: #6f6a72;
    --rule: rgba(236, 231, 223, 0.1);
    --border: rgba(236, 231, 223, 0.14);
    --bar: #1b1a20;
    --panel: #1a191f;
    --accent: #e9a2aa;
    --accent-contrast: #1d1216;
    --accent-soft: rgba(233, 162, 170, 0.1);
    --accent-select: rgba(233, 162, 170, 0.24);
    --draft: #f2c26b;
    --draft-soft: #231e14;
    --code-bg: #1d1c22;
    --mark: rgba(242, 194, 107, 0.26);
    --del: #f19a9f;
    --del-soft: rgba(241, 154, 159, 0.13);
    --ins: #8fd6a8;
    --ins-soft: rgba(143, 214, 168, 0.13);
    --good: #8fd6a8;
    --good-soft: #15201a;
    --warn: #f2c26b;
    --warn-soft: #231e14;
    --bad: #f19a9f;
    --bad-soft: #251718;
    --mine: #8fb4ff;
    --mine-soft: rgba(143, 180, 255, 0.15);
    --others: #f2a35e;
    --others-soft: rgba(242, 163, 94, 0.15);
    --pending: #b9a3f5;
    --pending-soft: rgba(185, 163, 245, 0.15);
    --old: #d8bb8e;
    --old-contrast: #1b1408;
    --old-soft: #1c1a16;
    --old-bar: #24211b;
    --old-line: rgba(216, 187, 142, 0.3);
    --old-tint: rgba(216, 187, 142, 0.1);
    --comment: #e8c463;
    --comment-soft: rgba(232, 196, 99, 0.15);
    --highlight: rgba(250, 220, 90, 0.27);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-kerning: normal;
  font-variant-numeric: lining-nums proportional-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}
::selection { background: var(--accent-select); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Reading progress: a hairline across the top. */
.progress { position: fixed; inset: 0 0 auto; z-index: 20; height: 2px; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }

/* Header */
.site-header {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  max-width: 80rem;
  margin: 0.75rem auto 0;
  padding: 0.45rem 0.55rem 0.45rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.brand { margin-right: auto; color: var(--text); font-size: 1rem; text-decoration: none; line-height: 1.25; }
.brand-file { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.brand-for { font-family: var(--serif); font-style: italic; font-size: 1.06em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.15rem; }
.site-nav a {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { color: var(--text); background: var(--accent-soft); }
.site-nav a.nav-icon { display: inline-grid; place-items: center; padding: 0.3rem 0.6rem; }
.icon-github { width: 1.15rem; height: 1.15rem; }
body[data-mode="published"] [data-nav="file"],
body[data-mode="archive"] [data-nav="file"],
body[data-mode="drafter"] [data-nav="drafter"],
body[data-mode="join"] [data-nav="join"],
body[data-mode="maintainers"] [data-nav="maintainers"],
body[data-mode="declined"] [data-nav="maintainers"],
body[data-mode="check"] [data-nav="check"] { color: var(--accent-contrast); background: var(--accent); }
body[data-old] [data-nav="file"],
body[data-old] [data-nav="drafter"] { color: var(--muted); background: none; }
body[data-mode="history"] [data-nav="history"],
body[data-old] [data-nav="history"] { color: var(--old-contrast); background: var(--old); }
body[data-mode="history"] [data-nav="history"]:hover,
body[data-old] [data-nav="history"]:hover { color: var(--old-contrast); background: var(--old); }

/* Reading controls: text size and light or dark. */
.reader-controls { display: flex; align-items: center; gap: 0.2rem; padding-left: 0.6rem; border-left: 1px solid var(--rule); }
.control {
  display: inline-grid;
  place-items: center;
  min-width: 2.15rem;
  height: 2.15rem;
  padding: 0 0.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.control:hover { color: var(--text); background: var(--accent-soft); }
.control:disabled { opacity: 0.35; cursor: default; background: none; }
.control .a-small { font-size: 0.82rem; font-weight: 600; }
.control .a-large { font-size: 1.12rem; font-weight: 600; }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle[data-current="dark"] .icon-sun { display: block; }
.theme-toggle[data-current="dark"] .icon-moon { display: none; }
/* Phones: everything centered, the menu wraps so every item shows, and the taller header scrolls away. */
@media (max-width: 760px) {
  .site-header {
    position: relative;
    top: auto;
    justify-content: center;
    gap: 0.3rem 0.5rem;
    margin: 0.5rem 0.5rem 0;
    padding: 0.7rem 0.7rem 0.6rem;
    border-radius: 22px;
    text-align: center;
  }
  .brand { flex: 1 0 100%; margin-right: 0; }
  .site-nav { order: 2; flex: 1 0 100%; flex-wrap: wrap; justify-content: center; gap: 0.15rem; }
  .site-nav a { flex: none; padding: 0.28rem 0.75rem; }
  .reader-controls { order: 3; border-left: 0; padding-left: 0; }
}

/* Layout: the outline sits to the left of the file on wide screens. */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: calc(var(--measure) + 2.5rem);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
@media (min-width: 1100px) {
  .layout {
    max-width: 80rem;
    grid-template-columns: 12rem minmax(0, 50rem) 12rem;
    justify-content: center;
    column-gap: 2.5rem;
    align-items: start;
  }
  .toc { position: sticky; top: 6rem; max-height: calc(100vh - 8rem); overflow: auto; }
  /* Fixed columns, so pages without an outline (Join, Check a copy) stay centered too. */
  .layout > .toc { grid-column: 1; }
  .layout > main { grid-column: 2; }
}

/* Outline */
.toc { margin-bottom: 1.25rem; font-size: 0.9rem; line-height: 1.35; }
.toc details { padding: 0.7rem 0.95rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); }
.toc summary { color: var(--muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; cursor: pointer; }
.toc ol { margin: 0.65rem 0 0; padding: 0; list-style: none; }
.toc li { margin: 0.32rem 0; }
.toc a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.toc a:hover, .toc a.current { color: var(--accent); }
.toc a.current { font-weight: 600; }
@media (min-width: 1100px) {
  .toc details { padding: 0.2rem 0 0; border: 0; background: none; }
}

/* The introduction at the top of a page (Suggest Edits, Maintainers, and others) */
.intro { margin: 0 0 1.75rem; }
.intro h1 { margin: 0 0 0.45rem; font-family: var(--sans); font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em; }
.intro .lede { margin: 0 0 1rem; color: var(--muted); font-family: var(--serif); font-size: 1.15rem; line-height: 1.6; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 0.6rem; }
.steps li {
  position: relative;
  padding: 0.85rem 1rem 0.85rem 3rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--panel);
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.55;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0.85rem;
  left: 1rem;
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font: 600 0.8rem/1 var(--sans);
}
.steps strong { font-family: var(--sans); font-weight: 600; }

/* The file: a bar with its name and actions, then the rendered Markdown. */
.file {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.file-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  padding: 0.65rem 0.75rem 0.65rem 1rem;
  border-bottom: 1px solid var(--rule);
  border-radius: 14px 14px 0 0;
  background: var(--bar);
  font-size: 0.9rem;
}
.file-name { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--mono); font-weight: 500; }
.file-icon { width: 1.05rem; height: 1.05rem; color: var(--muted); }
.file-meta { color: var(--muted); }
.file-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-left: auto; }
.badge {
  display: inline-block;
  padding: 0.08rem 0.6rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-draft { background: var(--draft); color: #fff; }
:root[data-theme="dark"] .badge-draft { color: #1b1408; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge-draft { color: #1b1408; } }

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
}
.button:hover { filter: brightness(1.08); }
.button.secondary { border-color: var(--border); background: var(--bg); color: var(--text); }
.button.secondary:hover { border-color: var(--accent); color: var(--accent); filter: none; }
button.button { appearance: none; }

/* The rendered Markdown. */
.doc {
  padding: 2.25rem 3.25rem 3rem 4rem;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: calc(1.2rem * var(--reading-scale));
  line-height: 1.72;
  font-variant-ligatures: common-ligatures;
}
@media (max-width: 760px) { .doc { padding: 1.5rem 1.15rem 2rem; font-size: calc(1.08rem * var(--reading-scale)); line-height: 1.66; } }
.doc > :first-child { margin-top: 0; }
.doc p, .doc li {
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 6 3 3;
  overflow-wrap: break-word;
}
.doc p, .doc ul, .doc ol { margin: 0 0 1em; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li { margin: 0.4em 0; padding-left: 0.2em; }
.doc li::marker { color: var(--faint); font-family: var(--sans); font-size: 0.85em; }
.doc ol > li::marker { color: var(--accent); font-weight: 600; }
.doc strong { font-weight: 650; }
.doc em { font-style: italic; }

/* Headings: bold sans, with their Markdown marker hanging in the margin. */
.doc h1, .doc h2, .doc h3, .doc h4 {
  position: relative;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.doc h1 { margin: 0 0 0.4em; font-size: 1.95em; line-height: 1.15; }
.doc h2 { margin: 2.1em 0 0.6em; padding-top: 0.9em; border-top: 1px solid var(--rule); font-size: 1.32em; line-height: 1.25; }
.doc h3 { margin: 1.7em 0 0.5em; font-size: 1.1em; line-height: 1.3; }
.doc h4 { margin: 1.4em 0 0.4em; font-size: 1em; }
@media (min-width: 761px) {
  .doc h1::before, .doc h2::before, .doc h3::before, .doc h4::before {
    content: attr(data-md);
    position: absolute;
    right: 100%;
    margin-right: 0.55em;
    color: var(--faint);
    font-family: var(--mono);
    font-size: 0.72em;
    font-weight: 400;
    letter-spacing: 0;
    white-space: nowrap;
  }
  /* Offsets are in the marker's own em (0.72 of the heading): centered on the heading's first line,
     plus, for h2, the padding above it. */
  .doc h1::before { top: 0.3em; }
  .doc h2::before { top: 1.5em; }
  .doc h3::before, .doc h4::before { top: 0.25em; }
}
.doc h1 + p { color: var(--muted); font-size: 0.8em; line-height: 1.55; text-align: left; hyphens: manual; overflow-wrap: anywhere; }
.doc h1 + p + p { margin-bottom: 1.6em; font-size: 1.05em; }
.doc hr { margin: 2em 0; border: 0; border-top: 1px solid var(--rule); }
.doc blockquote { margin: 0.4em 0 1.3em; padding: 0.1em 0 0.1em 1.15em; border-left: 2px solid var(--accent); font-style: italic; }
.doc blockquote p { margin: 0; }
.doc code { padding: 0.08em 0.32em; border-radius: 4px; background: var(--code-bg); font-family: var(--mono); font-size: 0.78em; font-style: normal; }
.doc pre {
  position: relative;
  margin: 0.4em 0 1.4em;
  padding: 1.1em 1.15em;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--code-bg);
  font-size: 0.7em;
  line-height: 1.6;
}
.doc pre.has-copy { padding-top: 2.6em; }
.doc pre code { padding: 0; background: none; font-size: inherit; white-space: pre; }
.doc.raw { padding: 1.5rem 1.25rem 2rem; }
.doc.raw pre.raw-file { margin: 0; font-size: 0.72em; }
.doc.raw pre.raw-file code { white-space: pre-wrap; overflow-wrap: anywhere; }
.copy {
  position: absolute;
  top: 0.6em;
  right: 0.6em;
  padding: 0.15em 0.7em;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  cursor: pointer;
}
.copy:hover { color: var(--accent); border-color: var(--accent); }
.doc .targeted { border-radius: 6px; background: var(--mark); box-shadow: 0 0 0 0.4em var(--mark); }
.loading, .muted { color: var(--muted); }
.loading { font-style: italic; }
.error { color: #c0392b; }

/* After the file: the note on the published page, and every version on Suggest Edits. */
.note {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--panel);
  font-family: var(--serif);
  font-size: 1.02rem;
}
.note p { margin: 0 0 0.6rem; }
.note p:last-child { margin: 0; }
.note strong { font-family: var(--sans); font-weight: 600; }
.versions { margin-top: 2.5rem; }
.versions h2 { margin: 0 0 0.4rem; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
.versions > p { margin: 0 0 0.9rem; font-family: var(--serif); }
.table-wrap { overflow-x: auto; }
table.log { width: 100%; border-collapse: collapse; font-size: 0.9rem; line-height: 1.45; font-variant-numeric: lining-nums tabular-nums; }
table.log th, table.log td { padding: 0.6rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
table.log th { color: var(--muted); font-weight: 600; }
table.log tbody tr:hover { background: var(--accent-soft); }
table.log td.actions { white-space: nowrap; }

/* Tracked changes: deleted words struck through, new words underlined. */
del, ins { border-radius: 3px; padding: 0 0.12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
del { color: var(--del); background: var(--del-soft); text-decoration: line-through; text-decoration-thickness: 1px; }
ins { color: var(--ins); background: var(--ins-soft); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

/* How to write a proposal */
.proposal-count { margin: 1rem 0 0; font-weight: 500; }
.proposal-count:empty { display: none; }

/* Proposals */
.proposals h3 { margin: 1.5rem 0 0.6rem; color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }
.proposal { margin: 0 0 0.75rem; padding: 0.9rem 1.05rem; border: 1px solid var(--rule); border-left: 3px solid var(--border); border-radius: 12px; background: var(--bg); }
.proposal.is-open, .proposal.is-new { border-left-color: var(--accent); }
.proposal.is-needs-fix { border-left-color: var(--warn); }
.proposal.is-adopted { border-left-color: var(--good); }
/* The publishing queue: approved (or disapproved) suggestions the robot hasn't carried out yet. */
.queue { margin: 0 0 1rem; padding: 0.85rem 0.9rem 0.15rem; border: 1px solid var(--pending); border-radius: 14px; background: var(--pending-soft); }
.queue > h3 { margin-top: 0 !important; color: var(--pending); }
.queue > p.muted { margin: 0 0 0.75rem; }
.proposal.is-approved, .proposal.is-disapproved { border-left-color: var(--pending); }
.proposal.is-approved .proposal-status strong, .proposal.is-disapproved .proposal-status strong { color: var(--pending); }
.proposal.just-done { animation: just-done 2.4s ease-out; }
@keyframes just-done { from { background: var(--good-soft); box-shadow: 0 0 0 3px var(--good-soft); } to { background: var(--bg); box-shadow: none; } }
.proposal.is-declined, .proposal.is-withdrawn, .proposal.is-cannot-apply { border-left-color: var(--faint); }
.proposal p { margin: 0.35rem 0 0; }
.proposal-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.65rem; font-size: 0.9rem; }
.kind { padding: 0.05rem 0.55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.78rem; font-weight: 600; }
.proposal-status { color: var(--muted); }
.proposal-status strong { color: var(--text); font-weight: 600; }
.proposal-version { margin-left: auto; font-weight: 600; }
.change { margin: 0.55rem 0 0.2rem; padding: 0.55rem 0.8rem; border-radius: 8px; background: var(--panel); font-family: var(--serif); font-size: 1.05rem; line-height: 1.65; }
.change p { margin: 0; }
.change p + p { margin-top: 0.35rem; }
.change .context { color: var(--muted); }
.proposal-reason { font-family: var(--serif); font-style: italic; }
.proposal-note { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.is-needs-fix .proposal-note { color: var(--warn); }
.proposal-meta, .votes, .proposal-links { color: var(--muted); font-size: 0.88rem; }
.votes strong { color: var(--text); font-weight: 600; }
.proposals .empty { font-family: var(--serif); }

/* Members */
.member-list { margin: 0 0 0.9rem; padding: 0; list-style: none; }
.member-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.member-list .badge { margin-left: 0.45rem; vertical-align: 0.08em; }
.badge-soft { background: var(--accent-soft); color: var(--accent); }
.versions > p.muted { font-size: 0.95rem; }

/* Fingerprints */
.fingerprint { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.35rem; margin: 0.3rem 0; font-size: 0.85rem; }
.fingerprint code, table.fingerprints code { font-family: var(--mono); font-size: 0.82rem; overflow-wrap: anywhere; word-break: break-all; }
.copy-inline { padding: 0.05rem 0.5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--muted); font-family: var(--sans); font-size: 0.78rem; cursor: pointer; }
.copy-inline:hover { color: var(--accent); border-color: var(--accent); }
.versions pre { position: relative; margin: 0.4rem 0 1rem; padding: 1rem 5rem 1rem 1.1rem; overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--code-bg); font-size: 0.85rem; }
.versions pre code { font-family: var(--mono); white-space: pre; }

/* Check a copy */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.checker { display: grid; gap: 0.7rem; margin-top: 1.2rem; }
.checker p { margin: 0; }
.drop { display: block; padding: 1.4rem 1rem; border: 1.5px dashed var(--border); border-radius: 12px; background: var(--panel); text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { color: var(--accent); font-weight: 600; }
.check-text { width: 100%; padding: 0.75rem 0.85rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: 0.85rem/1.5 var(--mono); resize: vertical; }
.check-text:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.check-result { margin-top: 1.1rem; }
.check-result:empty { display: none; }
.verdict { padding: 1rem 1.15rem; border: 1px solid var(--rule); border-left: 4px solid; border-radius: 12px; font-family: var(--serif); }
.verdict p { margin: 0.4rem 0 0; }
.verdict .fingerprint { font-family: var(--sans); }
.verdict-title { margin: 0 !important; font-family: var(--sans); font-size: 1.08rem; font-weight: 700; }
.verdict-good { border-left-color: var(--good); background: var(--good-soft); }
.verdict-good .verdict-title { color: var(--good); }
.verdict-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.verdict-warn .verdict-title { color: var(--warn); }
.verdict-bad { border-left-color: var(--bad); background: var(--bad-soft); }
.verdict-busy { border-left-color: var(--faint); background: var(--panel); }
.verdict-busy .verdict-title { color: var(--muted); }
.verdict-bad .verdict-title { color: var(--bad); }
.line-diff { margin: 0.6rem 0 0.2rem; padding: 0; list-style: none; font: 0.8rem/1.5 var(--mono); }
.line-diff li { display: flex; gap: 0.5rem; padding: 0.15rem 0; }
.line-diff .sign { flex: none; width: 1rem; color: var(--muted); text-align: center; }
.line-diff del, .line-diff ins { overflow-wrap: anywhere; }
table.fingerprints td:first-child { font-weight: 600; white-space: nowrap; }

/* Votes, sign-in, and the accordions that hold how-to text */
.button.small { padding: 0.18rem 0.65rem; font-size: 0.8rem; }
.button:disabled { opacity: 0.45; cursor: default; filter: none; }
.key-input { flex: 1 1 16rem; min-width: 0; padding: 0.45rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: 0.85rem var(--mono); }
.key-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.vote { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--rule); }
.vote-buttons { margin: 0 !important; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.step-select { padding: 0.2rem 0.45rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: 0.82rem var(--sans); }
.vote-status { margin: 0.45rem 0 0 !important; font-size: 0.9rem; }
.vote-status:empty { display: none; }
.vote-status.pending { color: var(--muted); }
.vote-status.done { color: var(--good); font-weight: 600; }
.vote-status.failed { color: var(--bad); }
.reason-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.6rem 0 0 !important; }
.reason-input { font-family: var(--sans); font-size: 0.88rem; }
details.how { margin: 1rem 0 0; }
details.how + details.how { margin-top: 0.4rem; }
details.how > summary { list-style: none; cursor: pointer; }
details.how > summary::-webkit-details-marker { display: none; }
details.how > summary h2 { display: inline; font-size: 1.15rem; }
details.how > summary::after { content: " ▸"; color: var(--muted); }
details.how[open] > summary::after { content: " ▾"; }
details.how[open] > summary { margin-bottom: 0.7rem; }
.intro .member-list { margin-top: 0.4rem; }
/* The Maintainers page, for a lead maintainer: add a maintainer, or remove one. */
.manage { margin-top: 1rem; font-family: var(--sans); }
.manage h2 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.manage .muted { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.manage-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.5rem 0; }
.manage-input { flex: 1 1 12rem; font: 0.92rem var(--sans); }
.manage-status { margin: 0.2rem 0 0.4rem; color: var(--muted); font-size: 0.88rem; }
.manage-status:empty { display: none; }
.manage-list { margin-top: 0.6rem; font-size: 0.9rem; }
.manage-list p { margin: 0 0 0.2rem; }
.manage-list ul { margin: 0; padding-left: 1.2rem; }
.manage-remove { font-family: var(--sans); font-size: 0.88rem; }
.manage-confirm .button { margin-left: 0.2rem; }
/* Emails to a maintainer: how often, on the Maintainers page. */
.email-choice { display: flex; flex-direction: column; gap: 0.35rem; margin: 0.5rem 0 0.3rem; padding: 0; border: 0; font-size: 0.92rem; }
.email-choice label { display: flex; align-items: center; gap: 0.45rem; width: fit-content; cursor: pointer; }
.email-choice input { margin: 0; accent-color: var(--accent); }
/* A suggestion or comment opened from a link in one of those emails. */
.proposal.from-link, .comment-card.from-link { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Suggest Edits: until a reader verifies an email address, the page shows only a popup asking them to. */
.gated #intro, .gated .file, .gated #after, .gated #toc { display: none !important; }
.gate {
  max-width: 31rem;
  margin: clamp(1.5rem, 8vh, 4.5rem) auto 3rem;
  padding: 1.5rem 1.6rem 1.35rem;
  border: 1px solid var(--border);
  border-top: 4px solid var(--mine);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.gate[hidden] { display: none; }
.gate h2 { margin: 0 0 0.45rem; font-family: var(--sans); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.015em; }
.gate p { margin: 0 0 0.85rem; font-family: var(--serif); font-size: 1.04rem; line-height: 1.55; }
.gate p:last-child { margin-bottom: 0; }
.gate-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.75rem; }
.gate-row .key-input { flex: 1 1 14rem; min-width: 0; padding: 0.6rem 0.8rem; font: 1rem var(--sans); }
.gate-row .code-input { flex: 1 1 9rem; max-width: 13rem; font: 500 1.2rem var(--mono); letter-spacing: 0.3em; }
.gate-row .button { padding-top: 0.55rem; padding-bottom: 0.55rem; }
.gate .gate-fine { color: var(--muted); font-family: var(--sans); font-size: 0.88rem; line-height: 1.5; margin-bottom: 0.35rem; }
.gate .gate-links { font-family: var(--sans); font-size: 0.9rem; }
.gate .gate-note { color: var(--warn); font-family: var(--sans); font-size: 0.92rem; }
.gate .gate-note:empty { display: none; }

/* Suggest Edits: the bar at the top of the text while editing, with track changes always on. It stays there: it
   doesn't follow the reader down the page. */
@media (max-width: 760px) {
  .suggest-help { display: none; }  /* the steps above the text say the same */
  .suggest-bar { padding: 0.55rem 0.7rem 0.5rem; }
}
.suggest-bar { padding: 0.75rem 1rem 0.6rem; border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--bg) 90%, var(--mine)); }
.suggest-bar p { margin: 0; }
.suggest-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.7rem; font-size: 0.9rem; line-height: 1.5; }
.suggest-line .badge { margin-left: 0.4rem; vertical-align: 0.08em; }
.mine-name { color: var(--mine); overflow-wrap: anywhere; }
.save-status { color: var(--muted); font-size: 0.86rem; }
.save-status:empty { display: none; }
.save-status.problem { color: var(--warn); }
.check-status { color: var(--muted); font-size: 0.86rem; font-style: italic; }
.signin-note { color: var(--muted); font-size: 0.86rem; }
.signin-note:empty { display: none; }
.suggest-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin-top: 0.45rem !important; }
.suggest-buttons { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; }
.suggest-help { flex: 1 1 20rem; color: var(--muted); font-size: 0.84rem; line-height: 1.45; }
/* A short message at the bottom of the screen, seen wherever the reader is on the page. */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 40;
  max-width: min(34rem, calc(100vw - 2rem));
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow);
  font: 0.9rem/1.45 var(--sans);
  transform: translateX(-50%);
}
.toast[hidden] { display: none; }
.linklike { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 0.86rem; text-decoration: underline; cursor: pointer; }
.doc.suggesting { caret-color: var(--mine); outline: none; }
.doc.suggesting:focus-visible { outline: none; }
.suggesting-mode .doc { box-shadow: inset 3px 0 0 var(--mine); }

/* Your own changes: struck-out words, and new words in blue with your name (your email address). */
.doc ins.track.mine { color: var(--mine); background: var(--mine-soft); text-decoration: none; border-bottom: 1px solid var(--mine); border-radius: 2px; }
.doc del.track.mine { color: var(--del); background: var(--del-soft); }
.doc ins.track.mine::before, .doc .track.others::before, .doc .track-rule.others::before, .doc .track-section-others::before {
  content: attr(data-by);
  display: inline-block;
  max-width: 16em;
  overflow: hidden;
  margin: 0 0.15em 0 0.05em;
  padding: 0 0.3em;
  border-radius: 4px;
  font: 600 0.55em/1.6 var(--sans);
  text-overflow: ellipsis;
  vertical-align: 0.5em;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.doc ins.track.mine::before { background: var(--mine); color: var(--bg); }
.doc .track-new.mine { box-shadow: inset 2px 0 0 var(--mine); }

/* Everyone else's suggestions: orange, with the suggester's name. */
.doc del.track.others { color: var(--others); background: var(--others-soft); text-decoration-color: var(--others); cursor: pointer; }
.doc del.track.others::before { content: none; }
.doc ins.track.others.added { background: none; text-decoration: none; cursor: pointer; }
.doc ins.track.others.added::after { content: attr(data-text); color: var(--others); background: var(--others-soft); border-bottom: 1px solid var(--others); border-radius: 2px; }
.doc ins.track.others::before { background: var(--others); color: var(--bg); }
.doc .track-rule.others { color: var(--others); cursor: pointer; }
.doc .track-rule.others::after { content: attr(data-text); background: var(--others-soft); border-bottom: 1px solid var(--others); }
.doc .track-rule.others::before, .doc .track-section-others::before { background: var(--others); color: var(--bg); }

/* Several changes to the same words: a "+1" beside the one drawn opens all of them. */
.doc .also-here { margin: 0 0.15em; padding: 0 0.45em; border: 1px solid var(--others); border-radius: 999px; background: var(--bg); color: var(--others);
  font: 700 0.6em/1.55 var(--sans); vertical-align: 0.2em; cursor: pointer; }
.doc .also-here:hover, .doc .also-here:focus-visible { background: var(--others); color: var(--bg); }

/* New sections: a "+ New section" control at the end of each section while editing; yours in blue, others' in orange. */
.doc .add-here { margin: 0.5em 0 0.3em; }
.doc:not(.suggesting) .add-here { display: none; }
.doc .add-section { padding: 0.1rem 0.75rem; border: 1px dashed var(--border); border-radius: 999px; background: none; color: var(--muted);
  font: 600 0.7rem/1.7 var(--sans); cursor: pointer; }
.doc .add-section:hover, .doc .add-section:focus-visible { border-color: var(--mine); color: var(--mine); }
.doc h2.track-section { border-top-style: dashed; }
.doc .track-section[data-empty] ins.track.mine::after { color: var(--faint); font-weight: 400; }
.doc h2.track-section[data-empty] ins.track.mine::after { content: "Name the new section"; }
.doc li.track-section[data-empty] ins.track.mine::after { content: "A rule for the new section"; }
.doc .track-section-others { margin: 1.4em 0 1em; padding: 0.45em 0.75em; border-left: 3px solid var(--others); border-radius: 0 8px 8px 0;
  background: var(--others-soft); color: var(--others); cursor: pointer; }
.doc .track-section-others .ts-title { margin: 0.2em 0 0.3em; font: 700 1.1em/1.3 var(--sans); }
.doc .track-section-others .ts-rule { margin: 0.25em 0 0 1em; text-indent: -0.8em; }
.doc .track-section-others .ts-rule::before { content: "• "; }
.change .new-section-title { font-family: var(--sans); font-weight: 700; }

/* Comments (amber, dotted underline) and highlights (yellow) on words; overlapping ones get darker. */
.doc mark.c-mark { color: inherit; border-radius: 2px; cursor: pointer; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.doc mark.c-comment { background: var(--comment-soft); border-bottom: 2px dotted var(--comment); }
.doc mark.c-highlight { background: var(--highlight); }
.doc mark.c-pending { border-bottom-style: dashed; }

/* Above selected words while editing: Comment and Highlight. */
.sel-tools { position: absolute; z-index: 35; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg); box-shadow: var(--shadow); }
.sel-tools button { padding: 0.28rem 0.8rem; border: 0; border-radius: 999px; background: none; color: var(--text); font: 600 0.82rem/1.4 var(--sans); cursor: pointer; }
.sel-tools button:hover, .sel-tools button:focus-visible { background: var(--comment-soft); color: var(--comment); }
.doc [data-proposal]:focus-visible { outline: 2px solid var(--others); outline-offset: 2px; }
.doc .flash { outline: 2px solid var(--others); outline-offset: 3px; border-radius: 3px; }
/* An approved change, shown as part of the text while the robot publishes it. */
.doc .accepted { background: var(--pending-soft); border-bottom: 1px solid var(--pending); border-radius: 2px; }
.doc .flash.mine, .doc [data-sid].flash { outline-color: var(--mine); }
.spot-pop {
  position: absolute;
  z-index: 30;
  width: min(28rem, calc(100vw - 24px));
  max-height: min(70vh, 40rem);
  overflow: auto;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}
.spot-pop p { margin: 0.35rem 0 0; }
.spot-pop .pop-head { margin: 0; padding-right: 1.4rem; color: var(--muted); overflow-wrap: anywhere; }
.spot-pop .pop-head strong { color: var(--text); }
.pop-close { position: absolute; top: 0.25rem; right: 0.45rem; padding: 0 0.3rem; border: 0; background: none; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.spot-suggestion { margin: 0.2rem 0 0.7rem; padding-left: 0.7rem; border-left: 3px solid var(--others); }
.spot-suggestion + .spot-suggestion { padding-top: 0.6rem; border-top: 1px solid var(--rule); }
.spot-suggestion .different { margin-top: 0.3rem; }
.c-thread { margin: 0.6rem 0 0.3rem; padding-left: 0.7rem; border-left: 3px solid var(--comment); }
.c-thread.resolved { opacity: 0.8; }
.c-item + .c-item { margin-top: 0.55rem; padding-top: 0.5rem; border-top: 1px solid var(--rule); }
.c-head { margin: 0 !important; padding-right: 1.4rem; color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.c-head strong { color: var(--text); }
.c-body { margin: 0.2rem 0 0 !important; font-family: var(--serif); font-size: 0.98rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-quote { margin: 0 0 0.35rem !important; color: var(--muted); font-family: var(--serif); font-size: 0.92rem; font-style: italic; overflow-wrap: anywhere; }
.c-state { margin: 0 0 0.25rem !important; color: var(--good); font-size: 0.82rem; font-weight: 600; }
.c-pending .c-head { color: var(--warn); }
.c-input { box-sizing: border-box; width: 100%; margin-top: 0.5rem; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font: 0.92rem/1.45 var(--sans); resize: vertical; }
.c-input:focus { outline: 2px solid var(--comment-soft); border-color: var(--comment); }
.c-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; margin: 0.4rem 0 0 !important; color: var(--muted); font-size: 0.86rem; }
.c-highlights { margin: 0.4rem 0; padding-left: 0.7rem; border-left: 3px solid var(--highlight); }

/* "This change may repeat or contradict another rule": for the person making it, and for the maintainers. */
.rule-check { border-left: 3px solid var(--warn); }
.rule-check-title { margin: 0 0 0.3rem !important; color: var(--warn); font: 700 0.95rem var(--sans); }
.rule-check .muted { color: var(--muted); font-size: 0.84rem; }
.rule-match { font-size: 0.88rem; overflow-wrap: anywhere; }
.rule-match + .rule-match { margin-top: 0.45rem; }
.rule-match.conflict strong { color: var(--bad); }
.rule-why { color: var(--text); }
p.rule-why { margin-top: 0.15rem !important; }
.similar-note.fine { border-left-color: var(--good); background: var(--good-soft); }
.similar-note .muted { color: var(--muted); font-size: 0.8rem; }
.similar-note { margin: 0.5rem 0 0; padding: 0.4rem 0.65rem; border-left: 3px solid var(--warn); border-radius: 0 8px 8px 0; background: var(--warn-soft);
  font-family: var(--sans); font-size: 0.85rem; overflow-wrap: anywhere; }
.similar-note p { margin: 0.1rem 0 0 !important; }
.proposal-builds { color: var(--muted); font-family: var(--sans); font-size: 0.88rem; }
.lost-changes { margin-top: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid var(--warn); border-radius: 8px; background: var(--warn-soft); font-size: 0.86rem; }
.lost-changes ul { margin: 0.3rem 0; padding-left: 1.2rem; }

/* Comments in the right margin on wide screens: each beside its words, joined to them by a dotted line. */
.comment-rail { display: none; }
@media (min-width: 1100px) {
  body[data-mode="drafter"] .layout { grid-template-columns: 12rem minmax(0, 50rem) 17rem; }
  html:not(.gated) body[data-mode="drafter"] .comment-rail { display: block; position: relative; grid-column: 3; grid-row: 1; align-self: start; }
}
.rail-card { position: absolute; left: 0; right: 0; padding: 0.55rem 0.75rem 0.6rem; border: 1px solid var(--rule); border-left: 3px solid var(--comment);
  border-radius: 0 10px 10px 0; background: var(--bg); box-shadow: var(--shadow); font-family: var(--sans); font-size: 0.82rem; line-height: 1.4;
  cursor: pointer; transition: top 0.15s ease, box-shadow 0.15s ease; }
.rail-card p { margin: 0; }
.rail-card .c-body { margin-top: 0.2rem !important; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 4; -webkit-box-orient: vertical; font-size: 0.9rem; }
.rail-card.open { z-index: 3; cursor: default; }
.rail-card.open .c-thread { margin: 0; padding: 0; border: 0; }
.rail-card.open .c-body { display: block; overflow: visible; }
.rail-card.hot, .rail-card.open { border-color: var(--comment); box-shadow: 0 0 0 2px var(--comment-soft), var(--shadow); }
.rail-card:focus-visible { outline: 2px solid var(--comment); outline-offset: 2px; }
.rail-replies { margin-top: 0.25rem !important; color: var(--muted); font-size: 0.78rem; }
.comment-lines { position: absolute; top: 0; left: 0; z-index: 1; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.comment-lines path { fill: none; stroke: var(--comment); stroke-width: 1.3; stroke-dasharray: 2 4; stroke-linecap: round; opacity: 0.5; }
.comment-lines circle { fill: var(--comment); opacity: 0.5; }
.comment-lines .hot { opacity: 1; }
.comment-lines path.hot { stroke-width: 1.7; }
.doc mark.c-comment.hot { background: color-mix(in srgb, var(--comment) 28%, transparent); }

/* Open comments, below the suggestions on Suggest Edits. */
.comments-list { margin: 1.4rem 0 1rem; }
.comment-card { margin: 0 0 0.6rem; padding: 0.7rem 0.9rem; border: 1px solid var(--rule); border-left: 3px solid var(--comment); border-radius: 0 10px 10px 0; background: var(--bg); }
.comment-card p { margin: 0.2rem 0 0; }
.comment-card .c-body { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* Join the community */
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1.4rem; }
@media (max-width: 640px) { .ways { grid-template-columns: minmax(0, 1fr); } }
.way { padding: 1.1rem 1.2rem 1.15rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--panel); }
.way h2 { margin: 0 0 0.2rem; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.way-for { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.92rem; }
.way ol { margin: 0 0 0.9rem; padding-left: 1.3rem; font-family: var(--serif); font-size: 1.02rem; line-height: 1.55; }
.way li { margin: 0.3rem 0; }
.way p { margin: 0.6rem 0 0; }
.address { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.4rem; }
.address code { padding: 0.2rem 0.45rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg); font-family: var(--mono); font-size: 0.86rem; overflow-wrap: break-word; }
.versions code { font-family: var(--mono); font-size: 0.88em; overflow-wrap: anywhere; }

/* Footer */
.site-footer {
  max-width: calc(var(--measure) + 2.5rem);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: var(--muted); }
.site-footer .made-by a { color: var(--text); }

/* History: every version, with the changes from the one before it marked. The past is in sepia: the sheet of an
   old text, the History tab, and the labels on what changed. */
.is-history .file { border-color: var(--old-line); background: var(--old-soft); }
.is-history .file-bar { border-bottom-color: var(--old-line); background: var(--old-bar); }
.is-history .file-icon { color: var(--old); }
.badge-old { background: var(--old); color: var(--old-contrast); }
.old-note { border-color: var(--old-line); background: var(--old-soft); }
.old-note strong { color: var(--old); }
.button.button-old { border-color: var(--old); background: var(--old); color: var(--old-contrast); }

/* Numbers at a glance (Suggest Edits and History): waiting, being published, published. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.6rem; margin: 1rem 0 1.5rem; font-family: var(--sans); }
.stat { display: grid; align-content: start; gap: 0.2rem; padding: 0.7rem 0.85rem; border: 1px solid var(--rule); border-top: 3px solid var(--stat, var(--border)); border-radius: 10px; background: var(--panel); color: var(--text); text-decoration: none; }
a.stat:hover { border-color: var(--stat); }
.stat strong { color: var(--stat); font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.stat span { color: var(--muted); font-size: 0.82rem; line-height: 1.3; }
.stat-waiting { --stat: var(--accent); }
.stat-queue { --stat: var(--pending); }
.stat-done { --stat: var(--old); }
.stat-declined { --stat: var(--faint); }
.stat-comment { --stat: var(--comment); }

/* Suggest Edits, below the queue: what was published while the page was open, and the way to History. */
.just-published { margin: 0 0 1rem; font-family: var(--sans); font-size: 0.92rem; line-height: 1.5; }
.just-published p { margin: 0.3rem 0; padding: 0.35rem 0.6rem; border-radius: 8px; color: var(--good); }
.just-published p.just-done { animation: just-done 2.4s ease-out; }
.history-cta { margin: 1.25rem 0 1rem; }

/* History's list of every change, newest first and by day. Each opens that version, with the change marked. */
html.history-list-mode .file, html.history-list-mode .history-summary, html.history-list-mode .history-panel,
html.history-list-mode #toc { display: none !important; }
html:not(.history-list-mode) .history-all { display: none; }
.history-all > .stats { margin-top: 0; }
.history-all > h3 { margin: 1.6rem 0 0.6rem; color: var(--old); font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.change-rows { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.change-row { display: grid; gap: 0.35rem; padding: 0.8rem 1rem; border: 1px solid var(--old-line); border-left: 4px solid var(--old); border-radius: 0 12px 12px 0; background: var(--old-soft); color: var(--text); font-family: var(--sans); text-decoration: none; }
.change-row:hover { background: color-mix(in srgb, var(--old-soft) 70%, var(--old-tint)); border-color: var(--old); }
.change-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.change-row-what { font-family: var(--serif); font-size: 1.05rem; line-height: 1.5; }
.change-row .change { margin: 0; background: var(--bg); font-size: 0.98rem; }
.change-row .change p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.change-row-who { color: var(--muted); font-size: 0.84rem; overflow-wrap: anywhere; }
.history-more { margin-top: 1rem; }

/* The versions: beside the text on wide screens, above it (folded) on narrow ones. */
.history-panel { margin-bottom: 1.25rem; font-family: var(--sans); font-size: 0.86rem; line-height: 1.35; }
.history-versions { padding: 0.7rem 0.95rem; border: 1px solid var(--old-line); border-radius: 12px; background: var(--old-soft); }
.history-versions > summary { color: var(--old); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; cursor: pointer; }
.history-list { margin: 0.6rem 0 0; padding: 0; list-style: none; }
.history-list li + li { margin-top: 0.15rem; }
.history-list a { display: grid; gap: 0.12rem; padding: 0.5rem 0.6rem; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; color: var(--text); text-decoration: none; }
.history-list a:hover { background: var(--old-tint); }
.history-list a[aria-current="page"] { border-left-color: var(--old); background: var(--old-tint); }
.history-version { font-weight: 700; }
.history-now { margin-left: 0.45rem; color: var(--old); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.history-date, .history-who { color: var(--muted); font-size: 0.78rem; }
.history-who { overflow-wrap: anywhere; }
.history-line { display: -webkit-box; overflow: hidden; color: var(--muted); -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
@media (min-width: 1100px) {
  body[data-mode="history"] .layout { grid-template-columns: 12rem minmax(0, 50rem) 15rem; }
  .layout > .history-panel { position: sticky; top: 6rem; grid-column: 3; grid-row: 1; max-height: calc(100vh - 8rem); margin: 0; overflow: auto; }
  .history-versions { padding: 0.2rem 0 0; border: 0; background: none; }
  .history-versions > summary { pointer-events: none; list-style: none; }
  .history-versions > summary::-webkit-details-marker { display: none; }
}

/* The chosen version: what changed, who suggested and approved it, and links to each change in the text. */
.history-summary { margin: 0 0 1.25rem; padding: 0.95rem 1.1rem; border: 1px solid var(--old-line); border-left: 4px solid var(--old); border-radius: 12px; background: var(--old-soft); font-family: var(--sans); scroll-margin-top: 6rem; }
.history-summary p { margin: 0; }
.history-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; }
.history-eyebrow { color: var(--old); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.history-eyebrow .badge { margin-left: 0.3rem; letter-spacing: 0.02em; vertical-align: 0.06em; }
.history-steps { display: inline-flex; gap: 0.4rem; }
.history-what { margin-top: 0.45rem !important; font-family: var(--serif); font-size: 1.12rem; line-height: 1.5; }
.history-people { margin-top: 0.3rem !important; color: var(--muted); font-size: 0.88rem; overflow-wrap: anywhere; }
.history-count { margin-top: 0.7rem !important; font-size: 0.9rem; font-weight: 600; }
.history-changes ul { margin: 0.45rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; font-size: 0.9rem; line-height: 1.45; }
.history-changes a { color: var(--text); }
.history-changes .muted { margin-top: 0.45rem; font-size: 0.86rem; }
.history-key { margin: 0; color: var(--muted); font-family: var(--sans); font-size: 0.9rem; line-height: 1.9; }
.edit-log { margin-top: 2.5rem; }
.edit-log > p { font-family: var(--serif); }

/* In the text: each changed, added, or removed rule is tinted and labeled with the version that changed it; old words
   are struck out and new ones underlined. Removed rules are put back where they were. */
.doc .h-mark { border-radius: 6px; scroll-margin-top: 7rem; }
.doc .h-changed, .doc .h-formatted { background: var(--old-tint); box-shadow: 0 0 0 0.35em var(--old-tint); }
.doc .h-added { background: var(--ins-soft); box-shadow: 0 0 0 0.35em var(--ins-soft); }
.doc .h-removed { background: var(--del-soft); box-shadow: 0 0 0 0.35em var(--del-soft); }
.doc .h-removed::marker { color: var(--del); }
.doc .h-mark.targeted { box-shadow: 0 0 0 0.35em var(--mark); }
.doc .h-added > ins, .doc .h-removed > del { padding: 0; background: none; }
.h-label, .h-key {
  display: inline-block;
  padding: 0.1em 0.55em;
  border-radius: 999px;
  font: 600 0.62rem/1.5 var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.doc .h-label { margin-right: 0.5em; font-size: 0.6em; text-align: left; text-indent: 0; vertical-align: 0.2em; }
.h-key { margin-right: 0.15rem; font-size: 0.7rem; vertical-align: 0.1em; }
/* On a phone the label gets a line of its own, so justified text doesn't stretch around it. */
@media (max-width: 760px) { .doc .h-label { display: block; width: fit-content; margin: 0 0 0.3em; } }
.h-changed > .h-label, .h-formatted > .h-label, .h-key-changed, .h-key-formatted { background: var(--old); color: var(--old-contrast); }
.h-added > .h-label, .h-key-added { background: var(--ins); color: var(--bg); }
.h-removed > .h-label, .h-key-removed { background: var(--del); color: var(--bg); }
/* "Hide the changes": the chosen version's text alone. */
.doc.hide-changes .h-removed, .doc.hide-changes .h-old, .doc.hide-changes .h-label { display: none; }
.doc.hide-changes .h-mark { background: none; box-shadow: none; }
.doc.hide-changes ins { padding: 0; background: none; color: inherit; text-decoration: none; }

@media print {
  .progress, .site-header, .toc, .file-actions, .copy, .copy-inline, .site-footer, #after, #intro { display: none !important; }
  body { background: #fff; color: #000; }
  .file { border: 0; box-shadow: none; }
  .file-bar { border: 0; background: none; padding: 0 0 1rem; }
  .doc { padding: 0; font-size: 11.5pt; }
}
