/* jeremyfreelove.com, site-wide styles.
   Visual language: a spreadsheet. Square cells, shared gridlines, Excel's selection green as the only accent.
   Pages may vary from this base (their own opening, markers, occasionally accent) but start here. */
:root {
  --bg: #fbfcfb;
  --surface: #ffffff;
  --surface-2: #f1f4f2;
  --fg: #1c211e;
  --fg-2: #39413c;
  --muted: #5d6761;
  --line: #d9dfdb;
  --line-2: #b9c2bc;
  --accent: #107c41;
  --accent-soft: #e2f0e7;
  --warn: #a35700;
  --warn-soft: #fcf0df;
  --ok: #107c41;
  --ok-soft: #e2f0e7;
  --bad: #c42b1c;
  --bad-soft: #fbe8e5;
  --hi: #6546b0;
  --hi-soft: #eeeaf8;
  --lo: #0a6f80;
  --lo-soft: #e0f1f3;
  --note: #fffbe3;
  --note-line: #ddd193;
  --comment: #7a52c7;
  --display: Bahnschrift, "DIN Alternate", "DIN 2014", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji";
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, "Liberation Mono", monospace, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji";
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1c1b; --surface: #212422; --surface-2: #2a2e2b; --fg: #e6ebe7; --fg-2: #c2cac4; --muted: #929b95;
    --line: #373c38; --line-2: #4c544e; --accent: #4cc281; --accent-soft: #1b3727; --warn: #efa34f; --warn-soft: #382915;
    --ok: #4cc281; --ok-soft: #1b3727; --bad: #ff7d6e; --bad-soft: #3c1f1b; --hi: #b59eff; --hi-soft: #2b2440; --lo: #62cfdf; --lo-soft: #13333a;
    --note: #2f2d1d; --note-line: #5d5734; --comment: #b08cff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1c1b; --surface: #212422; --surface-2: #2a2e2b; --fg: #e6ebe7; --fg-2: #c2cac4; --muted: #929b95;
  --line: #373c38; --line-2: #4c544e; --accent: #4cc281; --accent-soft: #1b3727; --warn: #efa34f; --warn-soft: #382915;
  --ok: #4cc281; --ok-soft: #1b3727; --bad: #ff7d6e; --bad-soft: #3c1f1b; --hi: #b59eff; --hi-soft: #2b2440; --lo: #62cfdf; --lo-soft: #13333a;
  --note: #2f2d1d; --note-line: #5d5734; --comment: #b08cff; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.65 var(--sans);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: var(--accent); text-underline-offset: 2px; }
code, kbd, pre, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 2px; padding: 0 .3em; white-space: nowrap; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: 0; padding: .85rem 1rem; overflow-x: auto; line-height: 1.55; margin: 1rem 0; }
pre code { background: none; border: 0; padding: 0; white-space: pre; font-size: .86rem; }
.cp { color: var(--accent); }
.f { color: var(--fg); }
.g { font-family: var(--mono); font-size: 1.15em; }
strong { font-weight: 650; }
h1, h2, h3, h4 { font-family: var(--display); text-wrap: balance; }

/* ---------- Site header: name + sheet tabs ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.site-header .bar, .site-footer .bar { max-width: 1240px; margin: 0 auto; padding-inline: clamp(16px, 3vw, 28px); display: flex; gap: .9rem; }
.site-header .bar { align-items: flex-end; padding-top: .5rem; }
.brand { font: 600 1.05rem/1 var(--display); color: var(--fg); text-decoration: none; white-space: nowrap; padding-bottom: .62rem; letter-spacing: .01em; }
.brand:hover { color: var(--accent); }
/* Sheet tabs: the active one is lifted onto the page colour with Excel's green underline */
.tabs { display: flex; margin-bottom: -1px; min-width: 0; }
.tabs a { padding: .45rem .95rem .55rem; font: .88rem/1 var(--sans); color: var(--fg-2); text-decoration: none; border: 1px solid transparent; border-bottom: 0; white-space: nowrap; }
.tabs a:hover { background: var(--surface); color: var(--fg); }
.tabs a[aria-current="page"], .tabs a.current { background: var(--bg); border-color: var(--line-2); color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.actions { margin-left: auto; display: flex; gap: .4rem; padding-bottom: .42rem; }
.btn {
  font: 500 .85rem/1 var(--sans); color: var(--fg); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 2px; padding: .42rem .65rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible, summary:focus-visible, input:focus-visible, a:focus-visible, .try:focus-visible, .preset:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn svg { width: 1rem; height: 1rem; }
#tocToggle { display: none; }

/* ---------- Site footer ---------- */
/* Short pages keep the footer at the bottom of the window */
body { display: flex; flex-direction: column; min-height: 100vh; }
.page, .shell { width: 100%; }
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--surface-2); }
.site-footer .bar { padding-block: .9rem; align-items: center; justify-content: space-between; font-size: .84rem; color: var(--muted); }
.site-footer a { color: var(--muted); }
.footer-links { display: flex; gap: 1.2rem; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Layout ---------- */
.shell {
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px);
  max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 28px);
}
/* Contents: styled like a column of row headers */
.toc {
  position: sticky; top: 3.4rem; align-self: start; max-height: calc(100vh - 4rem); overflow-y: auto;
  padding: 2rem 0; font-size: .86rem;
}
.toc h2 { font: 600 .82rem/1 var(--display); color: var(--muted); margin: 0 0 .6rem; letter-spacing: .02em; }
.toc ol { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); background: var(--surface); }
.toc li + li { border-top: 1px solid var(--line); }
.toc li a {
  display: grid; grid-template-columns: 3.6rem 1fr; align-items: baseline;
  padding: .34rem .6rem; color: var(--fg-2); text-decoration: none; line-height: 1.3;
}
.toc li a .n { font: .7rem/1 var(--mono); color: var(--muted); }
.toc li a:hover { background: var(--surface-2); color: var(--fg); }
.toc li a.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset -3px 0 0 var(--accent); font-weight: 600; }
.toc li a.active .n { color: var(--accent); }
.toc .foot { margin-top: 1rem; color: var(--muted); font-size: .78rem; line-height: 1.5; }

main { min-width: 0; padding: 2.5rem 0 6rem; }
.prose { max-width: 46rem; }
section { padding-top: 1rem; margin-bottom: 4.5rem; }
section > h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.1vw, 1.9rem); font-weight: 600; line-height: 1.15; letter-spacing: -.005em; margin: 0 0 1.1rem;
  display: flex; align-items: flex-end; gap: .9rem;
}
/* Section marker: a Unicode code-chart cell (glyph in a box, hex code underneath) */
.mark { display: inline-grid; justify-items: center; gap: .2rem; flex: none; }
.mark b { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border: 1px solid var(--line-2); background: var(--surface); font: 400 1.45rem/1 var(--mono); color: var(--fg); }
.mark b .inv { font-size: .6rem; }
.mark i { font: 500 .6rem/1 var(--mono); font-style: normal; color: var(--muted); letter-spacing: .02em; }
section > h2 .htext { padding-bottom: 1.05rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin: 2rem 0 .6rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.1rem; color: var(--fg-2); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }

/* ---------- Opening ---------- */
.hero { max-width: 50rem; margin-bottom: 3rem; }
.hero h1 { font-size: clamp(2.3rem, 1.5rem + 3vw, 3.4rem); font-weight: 700; line-height: 1.05; letter-spacing: -.01em; margin: 0 0 .35rem; }
.hero h1 code { font: 600 .92em/1 var(--mono); background: none; border: 0; padding: 0; color: var(--accent); }
.hero .kicker { font-size: 1.05rem; color: var(--muted); margin: 0 0 .5rem; }
.hero .byline { font-size: .92rem; color: var(--muted); margin: 0 0 1.6rem; }
.hero .byline a { color: var(--fg); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.hero .byline a:hover { color: var(--accent); border-color: var(--accent); }
.cite-this { font-size: .9rem; background: var(--surface); border: 1px solid var(--line); padding: .7rem .9rem; max-width: 46rem; }
.hero p { font-size: 1.08rem; color: var(--fg-2); max-width: 42rem; }

/* A small working spreadsheet: formula bar + two cells */
.sheet { border: 1px solid var(--line-2); background: var(--surface); width: min(100%, 30rem); margin: 1.2rem 0 1.4rem; font-family: var(--sans); }
.sheet .fbar { display: grid; grid-template-columns: 3.4rem 2.2rem 1fr; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.sheet .fbar > span { padding: .35rem .55rem; border-right: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.sheet .fbar > span:last-child { border-right: 0; font-family: var(--mono); }
.sheet .namebox { color: var(--fg-2); }
.sheet .fx { font-style: italic; color: var(--muted); font-family: Cambria, Georgia, serif; text-align: center; }
.sheet .cells { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) minmax(0, 1fr); }
.sheet .cells > span { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 2.9rem; display: flex; align-items: center; padding: 0 .6rem; }
.sheet .cells > span:nth-child(3n) { border-right: 0; }
.sheet .cells > span:nth-last-child(-n+3) { border-bottom: 0; }
.sheet .hd { background: var(--surface-2); color: var(--muted); font-size: .78rem; justify-content: center; min-height: 1.6rem !important; }
.sheet .hd.sel { background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.sheet .rh.sel { box-shadow: inset -2px 0 0 var(--accent); }
.sheet .emoji { font-size: 1.9rem; }
.sheet .val { justify-content: flex-end; font: 600 1.7rem/1 var(--sans); font-variant-numeric: tabular-nums; position: relative; outline: 2px solid var(--accent); outline-offset: -2px; }
.sheet .val::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 7px; height: 7px; background: var(--accent); border: 1px solid var(--surface); }

.learn { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 2rem; }
.learn li { border-top: 1px solid var(--line); padding: .6rem 0 .8rem; font-size: .93rem; line-height: 1.5; color: var(--fg-2); }
.learn li b { display: block; font: 600 1rem/1.3 var(--display); color: var(--fg); margin-bottom: .15rem; }

/* ---------- Panels, notes ---------- */
.card { background: var(--surface); border: 1px solid var(--line-2); padding: 1.1rem; }
/* Callouts are Excel cell notes: pale yellow, a bold author-style label, a coloured corner marker */
.callout { position: relative; background: var(--note); border: 1px solid var(--note-line); padding: .8rem 1.1rem .85rem; margin: 1.3rem 0; }
.callout::after { content: ""; position: absolute; top: -1px; right: -1px; border-style: solid; border-width: 0 11px 11px 0; border-color: transparent var(--comment) transparent transparent; }
.callout.warn::after { border-right-color: var(--bad); }
.callout.ok::after { border-right-color: var(--accent); }
.callout p:last-child { margin-bottom: 0; }
.callout .label { font: 700 .9rem/1.3 var(--sans); display: block; margin-bottom: .3rem; color: var(--fg); }
.callout .label::after { content: ":"; }
.rule { font-weight: 600; }

/* ---------- Tables: gridlines and row numbers, like a sheet ---------- */
.tablewrap { overflow-x: auto; margin: 1.1rem 0 1.4rem; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .5rem .75rem; border: 1px solid var(--line); vertical-align: top; }
th { font: 600 .82rem/1.3 var(--sans); color: var(--fg-2); background: var(--surface-2); white-space: nowrap; }
.tablewrap table { counter-reset: row; }
.tablewrap tr { counter-increment: row; }
.tablewrap tr::before {
  content: counter(row); display: table-cell; width: 2.1rem; min-width: 2.1rem; text-align: center; vertical-align: middle;
  background: var(--surface-2); color: var(--muted); font: .72rem/1 var(--mono); border: 1px solid var(--line); padding: 0 .2rem;
}
.tablewrap td.mono { overflow-wrap: anywhere; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td .g, td.g { font-size: 1.35rem; line-height: 1.2; }
.t { color: var(--ok); font-family: var(--mono); font-weight: 600; }
.fa { color: var(--bad); font-family: var(--mono); font-weight: 600; }

/* ---------- Code point chips ---------- */
.seq { display: inline-flex; flex-wrap: wrap; gap: .25rem; align-items: center; vertical-align: middle; }
.chip { font: 500 .8rem/1 var(--mono); padding: .28rem .4rem; border-radius: 2px; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg-2); white-space: nowrap; }
.chip.inv { background: var(--warn-soft); color: var(--warn); border: 1px dashed var(--warn); }
.chip.acc { color: var(--accent); }
.plus { color: var(--muted); font-family: var(--mono); font-size: .8rem; }

/* ---------- Glyph examples ---------- */
.examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 1.2rem 0 1.5rem; }
.ex { background: var(--surface); padding: .9rem 1rem; }
.ex .glyph { font-family: var(--mono); font-size: 2.2rem; line-height: 1.1; margin-bottom: .5rem; }
.ex .desc { font-size: .84rem; color: var(--muted); margin-top: .5rem; line-height: 1.45; }

/* ---------- Key section: drawn as an Excel selection, with its fill handle ---------- */
.payoff { position: relative; border: 2px solid var(--accent); padding: clamp(1.1rem, 3vw, 1.8rem); background: var(--surface); }
.payoff::after { content: ""; position: absolute; right: -6px; bottom: -6px; width: 10px; height: 10px; background: var(--accent); border: 2px solid var(--bg); }
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 1.2rem 0; border: 1px solid var(--line-2); }
.versus > div { padding: 1rem 1.1rem; background: var(--surface); }
.versus > div + div { border-left: 1px solid var(--line-2); }
.versus h4 { margin: .2rem 0 .3rem; font: 600 1.25rem/1.2 var(--mono); }
.versus .tag { font: 600 .8rem/1 var(--sans); color: var(--muted); }
.versus .loose .tag { color: var(--warn); }
.versus .strict .tag { color: var(--ok); }
.versus ul { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .93rem; }

/* ---------- Teaching components ---------- */
.try { font: 600 .8rem/1 var(--sans); color: var(--fg); background: var(--surface); border: 1px solid var(--line-2); border-radius: 2px; padding: .38rem .6rem; cursor: pointer; white-space: nowrap; vertical-align: middle; }
.try::before { content: "▸ "; color: var(--accent); }
.try:hover { border-color: var(--accent); background: var(--accent-soft); }
.walk { display: grid; margin: 1.4rem 0; border: 1px solid var(--line-2); }
.stage { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); background: var(--surface); }
.stage + .stage { border-top: 1px solid var(--line-2); }
.stage > div:last-child { padding: .9rem 1.1rem 1rem; }
.stage .sn { display: grid; place-items: start center; padding-top: 1.05rem; height: 100%; font: 600 .85rem/1 var(--mono); background: var(--surface-2); color: var(--muted); border-right: 1px solid var(--line-2); }
.stage > div:first-child:not(.sn) { display: contents; }
.stage h4 { margin: 0 0 .3rem; font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.stage p { margin: 0 0 .6rem; font-size: .95rem; }
.stage .count { font: 600 .95rem/1 var(--mono); padding: .25rem .5rem; border: 1px solid var(--line); }
.stage.s1 .count { background: var(--surface-2); color: var(--fg); }
.stage.s2 .count { background: var(--accent-soft); color: var(--accent); }
.stage.s3 .count { background: var(--warn-soft); color: var(--warn); }
.pieces { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin: .4rem 0 .2rem; }
.piece { display: grid; gap: .25rem; justify-items: center; }
.piece .pg { font-family: var(--mono); font-size: 1.8rem; line-height: 1.1; min-height: 2.1rem; display: grid; place-items: center; }
.piece .boxes { display: flex; gap: 1px; }
.piece .box { font: 600 .7rem/1 var(--mono); padding: .35rem .3rem; background: var(--surface-2); color: var(--fg-2); }
.piece .box.h { background: var(--hi-soft); color: var(--hi); }
.piece .box.l { background: var(--lo-soft); color: var(--lo); }
.piece .lab { font-size: .72rem; color: var(--muted); font-family: var(--mono); }
.tally { font-family: var(--mono); font-size: .95rem; margin-top: .5rem; }
.tally b { color: var(--warn); }
details.more { border: 1px solid var(--line-2); background: var(--surface); margin: 1rem 0 1.4rem; }
details.more > summary { cursor: pointer; padding: .6rem 1rem; font-weight: 600; font-size: .93rem; list-style: none; background: var(--surface-2); }
details.more[open] > summary { border-bottom: 1px solid var(--line); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; display: inline-block; width: 1.1rem; font-family: var(--mono); color: var(--accent); }
details.more[open] > summary::before { content: "−"; }
details.more > .inner { padding: .8rem 1rem 1rem; }
details.more > .inner > :last-child { margin-bottom: 0; }
.analogy { margin: 1.2rem 0; padding-left: 1.1rem; border-left: 1px dotted var(--line-2); font-size: .98rem; color: var(--fg-2); font-style: italic; }
.analogy code { font-style: normal; }
a.term { color: inherit; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
a.term:hover { color: var(--accent); }
.gloss { display: grid; grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr); border: 1px solid var(--line); background: var(--surface); }
.gloss dt, .gloss dd { margin: 0; padding: .55rem .85rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
.gloss dt { font-weight: 650; background: var(--surface-2); border-right: 1px solid var(--line); }
.gloss dt:target, .gloss dt:target + dd { background: var(--accent-soft); }
.gloss dt:last-of-type, .gloss dd:last-of-type { border-bottom: 0; }
@media (max-width: 560px) { .gloss { grid-template-columns: 1fr; } .gloss dt { border-bottom: 0; border-right: 0; padding-bottom: .1rem; } }

/* ---------- Citations ---------- */
sup.ref { font-size: .68em; line-height: 0; vertical-align: super; margin-left: 1px; white-space: nowrap; }
sup.ref a { text-decoration: none; font-family: var(--sans); }
sup.ref a:hover { text-decoration: underline; }
.reflist { font-size: .88rem; line-height: 1.5; padding-left: 2.2rem; margin: 0 0 1.5rem; columns: 2 26rem; column-gap: 2.5rem; }
.reflist.notes { list-style: lower-alpha; }
.reflist li { margin-bottom: .45rem; break-inside: avoid; padding: .1rem .3rem; }
.reflist li:target { background: var(--accent-soft); }
.reflist .back { font-weight: 600; }
.reflist .back a { text-decoration: none; }
.reflist .back sup { font-size: .75em; margin-right: .15rem; }
.reflist .back sup a { font-style: italic; }
sup.ref:target { background: var(--accent-soft); }

/* ---------- Simple pages: home index, notes, 404 ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 2.5rem clamp(16px, 3vw, 28px) 4rem; }
.page h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.8rem); font-weight: 700; line-height: 1.1; margin: 0 0 .4rem; }
.page .lede { margin-bottom: 2rem; }
.kind { font: 600 .85rem/1 var(--sans); color: var(--accent); margin: 0 0 .5rem; }
.byline { font-size: .92rem; color: var(--muted); margin: 0 0 1.6rem; }
.index-table { max-width: 60rem; }
.index-table td.date, .index-table td.type { width: 1%; }
.index-table td.date { white-space: nowrap; font-family: var(--mono); font-size: .86rem; font-variant-numeric: tabular-nums; }
.index-table td.type { white-space: nowrap; color: var(--fg-2); }
.index-table td.title a { font-weight: 600; }
.index-table td.title .desc { display: block; color: var(--muted); font-size: .88rem; margin-top: .1rem; }
.error-code { font: 700 clamp(3rem, 2rem + 5vw, 5.5rem)/1 var(--mono); color: var(--bad); margin: 0 0 .5rem; }

/* ---------- End of a piece: author note + more writing ---------- */
.more-writing { border: 1px solid var(--line-2); background: var(--surface); padding: 1.1rem 1.2rem; max-width: 46rem; margin: 0 0 4rem; }
.more-writing .who { font: 600 1.1rem/1.2 var(--display); margin: 0 0 .3rem; }
.more-writing .who a { color: var(--fg); text-decoration: none; }
.more-writing .who a:hover { color: var(--accent); }
.more-writing .profile { margin: -.4rem 0 1rem; font-size: .92rem; }
.more-writing h2 { font-size: 1rem; margin: 1.1rem 0 .4rem; }
.more-list { margin: 0 0 .8rem; padding-left: 1.1rem; }
.more-writing > :last-child { margin-bottom: 0; }

/* ---------- In-page footer (e.g. an article's technical notes) ---------- */
main footer { color: var(--muted); font-size: .84rem; border-top: 1px solid var(--line); padding-top: 1.5rem; max-width: 46rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  #tocToggle { display: inline-flex; }
  .toc {
    position: fixed; top: calc(3rem + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 25;
    max-height: calc(100vh - 3.2rem); background: var(--bg); border-bottom: 1px solid var(--line-2);
    padding: 1rem 16px 1.2rem; display: none;
  }
  .toc.open { display: block; }
  main { padding-top: 1.5rem; }
}
@media (max-width: 720px) {
  .versus { grid-template-columns: 1fr; }
  .versus > div + div { border-left: 0; border-top: 1px solid var(--line-2); }
  .mark b { width: 2.3rem; height: 2.3rem; font-size: 1.2rem; }
  section > h2 .htext { padding-bottom: .9rem; }
  .index-table td.type { display: none; }
  .index-table thead th:nth-child(2) { display: none; }
}
@media (max-width: 480px) { .site-header .btn .lbl { display: none; } .site-header .btn { padding: .42rem .55rem; } .tabs a { padding-inline: .7rem; } }
