/* The Burbs Almanac: print-editorial stylesheet. Ink on warm paper, one spot colour (lake green). */
:root {
  --paper: #f2ebdc;
  --paper-2: #e8dfca;
  --paper-3: #ded3ba;
  --ink: #1b1814;
  --ink-2: #4b4439;
  --lake: #1c574e;
  --lake-soft: #d5ddcc;
  --hair: #1b181455;
  --focus: #b3401a;
  --text: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --display: "Besley", "Clarendon", "Rockwell", Georgia, serif;
  --narrow: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --col-rail: 12.5rem;
  --col-text: 35rem;
  --col-notes: 16.5rem;
  --gap: 3rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 106.25%; scroll-padding-top: 4rem; -webkit-text-size-adjust: 100%; }
@media (min-width: 1000px) { html { font-size: 112.5%; scroll-padding-top: 1.5rem; } }
@media (min-width: 1700px) { html { font-size: 125%; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--text); font-size: 1rem; line-height: 1.58;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--lake); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 1px; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; text-wrap: pretty; hanging-punctuation: first; }
h1, h2, h3, h4 { text-wrap: balance; }
.num, table, .lining { font-variant-numeric: lining-nums tabular-nums; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 50; font-family: var(--narrow); }
.skip:focus { left: .5rem; top: .5rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- running head (narrow screens) ---------- */
.runhead {
  position: sticky; top: 0; z-index: 20; background: var(--paper);
  border-bottom: 1px solid var(--ink); display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .35rem 1rem; font-family: var(--narrow); font-size: .86rem; min-height: 2.75rem;
}
.runhead b { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.runhead .rh-ch { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.runhead a { display: inline-flex; align-items: center; min-height: 2.6rem; padding: 0 .25rem; font-weight: 600; white-space: nowrap; }
@media (min-width: 1240px) { .runhead { display: none; } }

/* ---------- masthead ---------- */
.mast { max-width: calc(var(--col-rail) + var(--col-text) + var(--col-notes) + 2 * var(--gap)); margin: 0 auto; padding: 1rem 1rem 0; }
.mast-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-family: var(--narrow); font-size: .86rem; padding-bottom: .45rem; border-bottom: 1px solid var(--ink); }
.mast-top span:last-child { text-align: right; }
.mast h1 { margin: 0; text-align: center; font-weight: 400; }
.np {
  display: block; font-family: var(--display); font-weight: 800; letter-spacing: -.035em; line-height: .92;
  font-size: clamp(3rem, 14.6vw, 5.4rem); padding: .2em 0 .12em; font-variant-numeric: lining-nums;
}
@media (min-width: 760px) { .np { font-size: min(8.1vw, 6.1rem); white-space: nowrap; padding: .22em 0 .14em; } }
.ed {
  display: block; font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(1.35rem, 3.4vw, 2.3rem); line-height: 1.15; padding: 0 0 .5em; font-variant-numeric: lining-nums;
}
.ears {
  display: grid; grid-template-columns: 1fr; gap: .2rem; text-align: center;
  border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); position: relative;
  padding: .7rem 0 .55rem; font-family: var(--narrow); font-size: .92rem; line-height: 1.35;
}
.ears::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid var(--ink); }
.ears .mid { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .82rem; }
@media (min-width: 760px) {
  .ears { grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 1.5rem; }
  .ears .l { text-align: left; } .ears .r { text-align: right; }
}

/* ---------- book grid ---------- */
.book { max-width: calc(var(--col-rail) + var(--col-text) + var(--col-notes) + 2 * var(--gap)); margin: 0 auto; padding: 0 1rem 3rem; }
main { min-width: 0; overflow-x: clip; }
@media (min-width: 1240px) {
  .book { display: grid; grid-template-columns: var(--col-rail) minmax(0, 1fr); column-gap: var(--gap); }
}

/* contents rail */
.rail { font-family: var(--narrow); font-size: .95rem; line-height: 1.3; padding: 1.4rem 0 .5rem; }
.rail h2 { font-family: var(--display); font-size: 1.05rem; font-weight: 700; margin: 0 0 .5rem; padding-bottom: .35rem; border-bottom: 1px solid var(--ink); }
.rail ol { list-style: none; margin: 0 0 1rem; padding: 0; }
.rail li { border-bottom: 1px solid var(--hair); }
.rail a { display: grid; grid-template-columns: 2.1rem 1fr; gap: .1rem; padding: .5rem 0; text-decoration: none; min-height: 2.6rem; align-items: center; }
.rail a .rn { font-family: var(--display); font-weight: 600; font-size: .86rem; color: var(--lake); }
.rail a[aria-current="true"] { font-weight: 700; }
.rail a { position: relative; }
.rail a[aria-current="true"]::before { content: ""; position: absolute; left: -.95rem; top: 50%; width: .42rem; height: .42rem; margin-top: -.21rem; background: var(--lake); transform: rotate(45deg); }
@media (max-width: 1239px) { .rail a[aria-current="true"]::before { display: none; } }
.rail .rail-note { color: var(--ink-2); font-size: .86rem; margin: .2rem 0 0; }
.rail .rail-note a { display: inline; padding: 0; min-height: 0; text-decoration: underline; }
@media (max-width: 1239px) {
  .book { display: flex; flex-direction: column; overflow-x: clip; }
  main { display: contents; }
  .front { order: 1; }
  .rail { order: 2; margin-top: 2rem; border-top: 3px solid var(--ink); }
  main > :not(.front) { order: 3; }
  .rail { border-bottom: 1px solid var(--ink); margin-bottom: .5rem; }
  .rail ol { columns: 2; column-gap: 1.5rem; }
  .rail li { break-inside: avoid; }
}
@media (max-width: 520px) { .rail ol { columns: 1; } }
@media (min-width: 1240px) {
  .rail { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow: auto; padding-top: 2.2rem; }
  .rail a { min-height: 0; padding: .42rem 0; }
}

/* rows: text plus margin notes */
.row, .ch-head, .wide, .solo { max-width: var(--col-text); margin-inline: auto; }
.row > :first-child { margin-bottom: 1em; }
.grp > p:last-child { margin-bottom: 0; }
.wide { max-width: calc(var(--col-text) + var(--gap) + var(--col-notes)); }
@media (min-width: 760px) {
  .row, .ch-head, .wide { max-width: calc(var(--col-text) + var(--gap) + var(--col-notes)); }
  .row { display: grid; grid-template-columns: minmax(0, var(--col-text)) minmax(12.5rem, var(--col-notes)); column-gap: clamp(1.6rem, 3.4vw, var(--gap)); align-items: start; }
  .solo { max-width: calc(var(--col-text) + var(--gap) + var(--col-notes)); margin-inline: auto; }
  .solo > * { max-width: var(--col-text); }
}
@media (min-width: 1240px) { .row, .ch-head, .wide, .solo { margin-inline: 0; } }

/* note references and margin notes */
sup { line-height: 0; font-size: 1em; vertical-align: baseline; }
.ref {
  font-family: var(--narrow); font-weight: 700; font-size: .72em; color: var(--lake); text-decoration: none;
  font-variant-numeric: lining-nums; vertical-align: .55em; margin-left: .04em; padding: .1em .1em; position: relative; border-radius: 2px;
}
.ref::after { content: ""; position: absolute; inset: -.5rem -.5rem; }
.ref:hover, .ref.on { background: var(--lake); color: var(--paper); }
.ref[aria-expanded="true"] { background: var(--lake); color: var(--paper); }
.mnotes { font-family: var(--narrow); font-size: .86rem; line-height: 1.36; color: var(--ink); font-variant-numeric: lining-nums; }
.mn { margin: 0 0 .7rem; padding: .05rem 0 .05rem 1.7rem; position: relative; border-radius: 2px; }
.mn-no { position: absolute; left: 0; top: .05rem; font-weight: 700; color: var(--lake); min-width: 1.3rem; }
.mn-src { color: var(--ink-2); }
.mn a { overflow-wrap: anywhere; }
.mn.on, .mn:target { background: var(--lake-soft); box-shadow: -.4rem 0 0 var(--lake-soft), .4rem 0 0 var(--lake-soft); }
@media (max-width: 759px) {
  .mnotes { margin: -.35rem 0 1.1rem; border-left: 2px solid var(--lake); padding-left: .7rem; }
  .mnotes:empty { display: none; }
  .js .mn { display: none; }
  .js .mn.open { display: block; }
  .js .mnotes:not(:has(.open)) { display: none; }
}
@media (min-width: 760px) {
  .mnotes { padding-top: .28rem; }
  .mnotes.inl { border-left: 2px solid var(--lake); padding-left: .7rem; }
}

/* front matter */
.front { padding-top: 1.6rem; }
.lede .grp p:first-child { font-size: 1.24rem; line-height: 1.46; }
.lede .grp p:first-child::first-letter {
  font-family: var(--display); font-weight: 800; float: left; font-size: 4.05em; line-height: .78; padding: .09em .08em 0 0; color: var(--lake);
}

/* twelve figures */
.figs { margin: 1.6rem auto 0; padding: 0; }
.figs-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); margin: 0; }
.figs-grid > div { padding: .7rem .8rem .65rem 0; border-bottom: 1px solid var(--hair); }
.figs-grid > div:nth-child(even) { padding-left: .8rem; border-left: 1px solid var(--hair); }
.figs-grid dt { font-family: var(--narrow); font-size: .86rem; line-height: 1.25; color: var(--ink-2); }
.figs-grid dd { margin: .1rem 0 0; font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.12; letter-spacing: -.015em; font-variant-numeric: lining-nums; }
.figs-grid dd small { display: block; font-family: var(--narrow); font-weight: 400; font-size: .86rem; letter-spacing: 0; color: var(--ink); margin-top: .15rem; }
.figs-grid dd a { text-decoration: none; }
@media (min-width: 700px) {
  .figs-grid { grid-template-columns: repeat(4, 1fr); }
  .figs-grid > div { padding-left: .8rem; border-left: 1px solid var(--hair); }
  .figs-grid > div:nth-child(4n+1) { padding-left: 0; border-left: 0; }
  .figs-grid > div:nth-last-child(-n+4) { border-bottom: 0; }
}
@media (max-width: 699px) { .figs-grid > div:nth-last-child(-n+2) { border-bottom: 0; } }

/* chapter heads */
.chapter { padding-top: 3.2rem; }
.ch-head {
  border-top: 3px solid var(--ink); position: relative; padding: 1.1rem 0 .4rem; margin-bottom: 1.3rem;
  display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: end;
}
.ch-head::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid var(--ink); }
.ch-no { font-family: var(--narrow); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: .82rem; color: var(--lake); margin: 0 0 .3rem; }
.ch-head h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.028em; font-size: clamp(2.05rem, 5.6vw, 3rem); line-height: 1.0; margin: 0 0 .55rem; font-variant-numeric: lining-nums; }
.deck { font-style: italic; font-size: 1.2rem; line-height: 1.4; margin: 0; max-width: 33rem; }
.cut { width: 9.5rem; height: auto; color: var(--ink); display: block; }
.cut .p { stroke: var(--paper); fill: none; stroke-linecap: round; }
.cut .pf { fill: var(--paper); }
.cut .k { fill: currentColor; }
.cut .ks { stroke: currentColor; fill: none; stroke-linecap: round; }
@media (min-width: 640px) {
  .ch-head { grid-template-columns: minmax(0, 1fr) auto; column-gap: 2rem; }
  .cut { width: 12.6rem; }
}
h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.2; letter-spacing: -.012em; margin: 1.7rem 0 .55rem; font-variant-numeric: lining-nums; }
.solo h3 { max-width: var(--col-text); }
h4 { font-family: var(--narrow); font-size: .95rem; font-weight: 700; letter-spacing: .04em; margin: 1.2rem 0 .3rem; }

/* pull quote in Dianne's words */
.quote { margin: 1.3rem 0 1.4rem; padding: .1rem 0 .1rem 1.2rem; border-left: 4px solid var(--lake); }
.quote p { font-size: 1.32rem; line-height: 1.36; font-style: italic; margin: 0 0 .45rem; }
.quote footer { font-family: var(--narrow); font-size: .9rem; font-style: normal; color: var(--ink); }
.quote footer b { font-weight: 700; }

/* slip: a placeholder for Dianne's note */
.slip { margin: 1.2rem 0 1.5rem; padding: .85rem 1rem .9rem; border: 1.5px dashed var(--lake); background: var(--paper-2); position: relative; }
.slip .slip-h { font-family: var(--display); font-weight: 700; font-size: 1.02rem; color: var(--lake); margin: 0 0 .2rem; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.slip .slip-h span { font-family: var(--narrow); font-weight: 400; font-size: .86rem; color: var(--ink-2); }
.slip p { margin: 0; font-size: .97rem; line-height: 1.45; }

/* gap notice */
.gap { font-family: var(--narrow); font-size: .97rem; line-height: 1.4; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: .6rem 0; margin: 1rem 0 1.3rem; }
.gap b { font-weight: 700; }

/* tables */
.facts { margin: 2rem auto 2.2rem; padding: 0; }
@media (min-width: 1240px) { .facts { margin-inline: 0; } }
.facts figcaption { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: baseline; justify-content: space-between; padding-bottom: .45rem; }
.facts .cap { font-family: var(--display); font-weight: 700; font-size: 1.08rem; line-height: 1.25; font-variant-numeric: lining-nums; }
.facts .cap .tno { color: var(--lake); margin-right: .45rem; font-weight: 800; }
.tools { display: flex; flex-wrap: wrap; gap: .4rem; font-family: var(--narrow); font-size: .86rem; }
.tools a, .tools button, .btn {
  font: inherit; font-family: var(--narrow); font-size: .86rem; font-weight: 600; color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 2px;
  padding: .28rem .6rem; min-height: 2rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; line-height: 1.1;
}
.tools a:hover, .tools button:hover, .btn:hover { background: var(--ink); color: var(--paper); }
html:not(.js) .tools button { display: none; }
@media (max-width: 760px) { .tools a, .tools button { min-height: 2.6rem; padding-inline: .75rem; } }
.tool-out { font-family: var(--narrow); font-size: .86rem; line-height: 1.35; margin: .5rem 0 0; padding: .45rem .6rem; background: var(--lake-soft); border-left: 3px solid var(--lake); overflow-wrap: anywhere; }
.tool-out:empty { display: none; }
.scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroller:focus-visible { outline-offset: 0; }
table { border-collapse: collapse; width: 100%; font-family: var(--narrow); font-size: .93rem; line-height: 1.28; }
thead th { text-align: left; font-weight: 700; vertical-align: bottom; padding: .45rem .7rem .4rem 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
tbody th { text-align: left; font-weight: 600; }
tbody th, tbody td { padding: .42rem .7rem .4rem 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 1px solid var(--ink); }
td.n, th.n { text-align: right; white-space: nowrap; }
td.fig { font-weight: 600; }
td.src, td.asof { color: var(--ink-2); }
td.src a { overflow-wrap: anywhere; }
.facts .tnote { font-family: var(--narrow); font-size: .86rem; line-height: 1.38; color: var(--ink); margin: .55rem 0 0; max-width: 46rem; }
tr.sum th, tr.sum td { border-top: 1px solid var(--ink); font-weight: 700; }
td.todo { font-style: italic; color: var(--lake); font-weight: 600; }
@media (min-width: 700px) { .fact-item { min-width: 11rem; } }
@media (max-width: 640px) {
  .facts table { font-size: .9rem; }
  thead th, tbody th, tbody td { padding-right: .5rem; }
  .kv thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .kv table, .kv tbody, .kv tr { display: block; }
  .kv tbody { border-top: 2px solid var(--ink); }
  .kv tr { padding: .5rem 0 .55rem; border-bottom: 1px solid var(--hair); }
  .kv tr:last-child { border-bottom: 1px solid var(--ink); }
  .kv tbody th, .kv tbody td { display: block; border: 0 !important; padding: 0; text-align: left; white-space: normal; }
  .kv tbody th { font-weight: 400; color: var(--ink-2); font-size: .9rem; }
  .kv tbody td.fig, .kv tbody td.todo { font-size: 1.08rem; font-weight: 700; line-height: 1.25; margin: .05rem 0 .1rem; }
  .kv tbody td:not(.fig):not(.todo) { display: inline; font-size: .86rem; color: var(--ink-2); }
  .kv tbody td:empty { display: none; }
  .kv tbody td:not(.fig):not(.todo):not(:empty) ~ td:not(:empty)::before { content: " \00b7  "; }
  .kv tr.sum { border-top: 1px solid var(--ink); }
  .kv tr.sum th { color: var(--ink); font-weight: 700; }
}

/* photographs as newsprint plates */
.plate { margin: 1.8rem auto 1.9rem; }
.plate .ph { background: var(--paper-2); border: 1px solid var(--ink); padding: .35rem; }
.plate img { width: 100%; filter: grayscale(1) contrast(1.06) brightness(1.05); mix-blend-mode: multiply; }
.plate figcaption { font-family: var(--narrow); font-size: .86rem; line-height: 1.36; padding-top: .45rem; }
.plate figcaption b { font-weight: 700; }
.plate figcaption .cr { display: block; color: var(--ink-2); }
@media (min-width: 760px) {
  .plate.row { align-items: end; }
  .plate.row figcaption { padding-top: 0; border-top: 1px solid var(--ink); padding-block: .4rem 0; }
}

/* the planned video plate */
.video { border: 1px solid var(--ink); padding: .35rem; margin: 1.6rem 0 1.7rem; background: var(--paper-2); }
.video-in { aspect-ratio: 16 / 9; display: grid; grid-template-rows: auto 1fr auto; padding: 1rem 1.15rem; position: relative; overflow: hidden; background: var(--ink); color: var(--paper); }
.video-in svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .2; }
.video-in > * { position: relative; }
.video-tag { font-family: var(--narrow); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; }
.video-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.35rem, 4.4vw, 2.15rem); line-height: 1.06; letter-spacing: -.02em; align-self: center; max-width: 16ch; margin: 0; }
.video-meta { font-family: var(--narrow); font-size: .9rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.video-cap { font-family: var(--narrow); font-size: .86rem; line-height: 1.36; margin: .45rem .1rem .1rem; }

/* ordered rules list */
.rules { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rule-no { font-family: var(--display); font-weight: 800; font-size: 1.9rem; line-height: 1; color: var(--lake); font-variant-numeric: lining-nums; float: left; width: 2.1rem; margin-top: .1rem; }
.rule-body { margin-left: 2.4rem; }
.rule-body h3 { margin-top: 0; }

/* calendar */
.cal { display: grid; grid-template-columns: 1fr; gap: 0 2rem; margin: 1.4rem auto 1rem; }
@media (min-width: 720px) { .cal { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1240px) { .cal { margin-inline: 0; } }
.season { border-top: 2px solid var(--ink); padding: .6rem 0 1.2rem; }
.season h3 { margin: 0; font-size: 1.2rem; }
.season .span { font-family: var(--narrow); font-size: .86rem; color: var(--ink-2); margin: .1rem 0 .5rem; }
.season ol { list-style: none; margin: 0; padding: 0; }
.season li { display: grid; grid-template-columns: 4.3rem 1fr; gap: .7rem; padding: .45rem 0; border-top: 1px solid var(--hair); font-family: var(--narrow); font-size: .95rem; line-height: 1.34; }
.season li time, .season li .when { font-family: var(--display); font-weight: 700; font-size: .92rem; font-variant-numeric: lining-nums; color: var(--lake); line-height: 1.3; }
.season li.past { color: var(--ink-2); }
.season li small { display: block; font-size: .86rem; color: var(--ink-2); }
.standing { columns: 1; margin: 0; padding: 0; list-style: none; font-family: var(--narrow); font-size: .95rem; line-height: 1.36; }
.standing li { padding: .4rem 0; border-top: 1px solid var(--hair); break-inside: avoid; }
.standing b { font-weight: 700; }
@media (min-width: 720px) { .standing { columns: 2; column-gap: 2rem; } }

/* towns chapter */
.towns-top { display: grid; grid-template-columns: 1fr; gap: 1.2rem 2.5rem; align-items: start; margin-inline: auto; }
@media (min-width: 860px) { .towns-top { grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); } }
@media (min-width: 1240px) { .towns-top { margin-inline: 0; } }
.map { margin: 0; }
.map svg { width: 100%; height: auto; display: block; border: 1px solid var(--ink); background: var(--paper); }
.map figcaption { font-family: var(--narrow); font-size: .86rem; line-height: 1.36; padding-top: .4rem; }
.map .town path { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.1; transition: fill .15s; }
.map .town text { font-family: var(--narrow); font-size: 16.5px; font-weight: 600; fill: var(--ink); text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: var(--paper-2); stroke-width: 3.5px; stroke-linejoin: round; }
.map .town.home path { fill: var(--lake); }
.map .town.home text { fill: var(--paper); font-weight: 700; font-size: 19px; stroke: var(--lake); }
.map a.town:hover path, .map a.town:focus path, .map .town.on path { fill: var(--paper-3); }
.map a.town.home:hover path, .map a.town.home:focus path, .map .town.home.on path { fill: #123d37; }
.map a.town:focus { outline: none; }
.map a.town:focus-visible path { stroke: var(--focus); stroke-width: 3; }
.map .rail-a { fill: none; stroke: var(--ink); stroke-width: 2.3; stroke-linejoin: round; stroke-linecap: round; }
.map .rail-b { display: none; }
.map .tl { font-family: var(--narrow); font-size: 16.5px; font-weight: 600; fill: var(--ink); text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: var(--paper-2); stroke-width: 4px; stroke-linejoin: round; }
.map .tl.home { fill: var(--paper); font-weight: 700; font-size: 19px; stroke: var(--lake); }
.map .stn { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.map .lake { fill: var(--paper); stroke: var(--paper); stroke-width: .6; }
.map .lbl { font-family: var(--narrow); font-size: 14.5px; fill: var(--ink); }
.map .lbl.b { font-weight: 700; letter-spacing: .12em; }
.reckon { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); padding: .8rem 0 .9rem; margin: 1.2rem 0 0; display: grid; gap: .5rem 1.2rem; grid-template-columns: 1fr; align-items: end; font-family: var(--narrow); }
@media (min-width: 700px) { .reckon { grid-template-columns: auto auto 1fr; } }
.reckon label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .25rem; }
.reckon .field { display: flex; align-items: stretch; gap: .3rem; }
.reckon input[type="text"], .reckon select, .corr input[type="email"], .corr input[type="text"] {
  font: inherit; font-family: var(--narrow); font-size: 1.05rem; padding: .45rem .6rem; border: 1.5px solid var(--ink); border-radius: 2px; background: #fbf7ee; color: var(--ink); min-height: 2.75rem;
  font-variant-numeric: lining-nums tabular-nums;
}
.reckon input[type="text"] { width: 9.5rem; }
.reckon select { width: 100%; max-width: 19rem; }
.reckon .step { width: 2.75rem; min-height: 2.75rem; font-size: 1.3rem; font-weight: 700; justify-content: center; padding: 0; }
.reckon .hint { font-size: .86rem; line-height: 1.36; color: var(--ink); margin: 0; }
#towns { table-layout: fixed; font-size: .9rem; }
#towns thead th { padding-right: .7rem; white-space: normal; line-height: 1.18; }
#towns thead th button {
  font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: .2rem 0; margin: 0; text-align: inherit; cursor: pointer; display: block; width: 100%; min-height: 2.6rem; line-height: 1.18;
}
#towns thead th { vertical-align: bottom; }
.js #towns thead th button { text-decoration: underline dotted var(--ink-2) 1px; text-underline-offset: .22em; }
#towns thead th[aria-sort] button { color: var(--lake); text-decoration: underline solid var(--lake) 2px; }
#towns thead th[aria-sort] button::before { content: ""; display: inline-block; width: 0; height: 0; border-left: .32rem solid transparent; border-right: .32rem solid transparent; margin-right: .3rem; vertical-align: .06rem; }
#towns thead th[aria-sort="ascending"] button::before { border-bottom: .5rem solid var(--lake); }
#towns thead th[aria-sort="descending"] button::before { border-top: .5rem solid var(--lake); }
#towns thead th button:hover { color: var(--lake); }
html:not(.js) #towns thead th button { pointer-events: none; }
#towns td, #towns tbody th { padding-right: .7rem; }
#towns td.n { white-space: normal; }
#towns tbody th { position: sticky; left: 0; background: var(--paper); z-index: 1; white-space: nowrap; }
#towns tbody th a { text-decoration: none; }
#towns td small { display: block; color: var(--ink-2); font-size: .8rem; line-height: 1.25; white-space: normal; }
#towns tr.home th, #towns tr.home td { background: var(--lake-soft); }
#towns tr.on th, #towns tr.on td, #towns tr:target th, #towns tr:target td { background: var(--paper-3); }
#towns td.calc { font-weight: 700; color: var(--lake); }
#towns col.c-town { width: 10%; } #towns col.c-rate { width: 7.6%; } #towns col.c-bill { width: 8.6%; } #towns col.c-calc { width: 9.4%; }
#towns col.c-train { width: 14.6%; } #towns col.c-pass { width: 7.4%; } #towns col.c-drive { width: 8.6%; } #towns col.c-sewer { width: 12.6%; } #towns col.c-trash { width: 11.4%; } #towns col.c-value { width: 9.8%; }
#towns { min-width: 51rem; }
#towns thead th:last-child, #towns td:last-child { padding-right: 0; }
#towns tbody th a:hover { text-decoration: underline; }
.swipe { font-family: var(--narrow); font-size: .86rem; margin: .3rem 0 .4rem; }
@media (min-width: 1100px) { .swipe { display: none; } }
@media (prefers-reduced-motion: no-preference) { #towns tbody tr.moving { transition: transform .45s cubic-bezier(.2,.7,.2,1); } }

/* gazetteer */
.gaz { columns: 1; column-gap: 2.2rem; margin: 1.2rem auto 0; padding: 0; }
@media (min-width: 720px) { .gaz { columns: 2; } }
@media (min-width: 1240px) { .gaz { margin-inline: 0; } }
.gaz { border-top: 2px solid var(--ink); }
.gaz > div { break-inside: avoid; padding: .6rem 0 .7rem; border-bottom: 1px solid var(--hair); }
.gaz dt { font-family: var(--display); font-weight: 700; font-size: 1.04rem; line-height: 1.25; }
.gaz dt span { font-family: var(--narrow); font-weight: 400; font-size: .86rem; color: var(--ink-2); margin-left: .35rem; }
.gaz dd { margin: .15rem 0 0; font-size: .95rem; line-height: 1.46; }
.gaz dd .s { display: block; font-family: var(--narrow); font-size: .86rem; color: var(--ink-2); margin-top: .12rem; }

/* corrections */
.corr-grid { display: grid; grid-template-columns: 1fr; gap: 1.6rem 3rem; margin-inline: auto; }
@media (min-width: 900px) { .corr-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
@media (min-width: 1240px) { .corr-grid { margin-inline: 0; } }
.corr { border: 2px solid var(--ink); padding: 1.1rem 1.2rem 1.2rem; background: var(--paper-2); }
.corr h3 { margin: 0 0 .4rem; font-size: 1.45rem; }
.corr p { font-size: .98rem; line-height: 1.48; }
.corr label { display: block; font-family: var(--narrow); font-weight: 700; font-size: .95rem; margin: .7rem 0 .25rem; }
.corr label span { font-weight: 400; color: var(--ink-2); }
.corr input[type="email"], .corr input[type="text"] { width: 100%; }
.corr .send { margin-top: 1rem; background: var(--lake); color: var(--paper); border-color: var(--lake); font-size: 1.02rem; min-height: 2.9rem; padding: .5rem 1.1rem; }
.corr .send:hover { background: var(--ink); border-color: var(--ink); }
.corr .fine { font-family: var(--narrow); font-size: .86rem; line-height: 1.38; margin: .7rem 0 0; color: var(--ink); }
.corr .done { border-top: 1px solid var(--ink); margin-top: 1rem; padding-top: .8rem; }
.corr .done h4 { font-family: var(--display); font-size: 1.1rem; letter-spacing: 0; margin: 0 0 .3rem; }
.corr .proto { font-family: var(--narrow); font-size: .86rem; color: var(--ink-2); }
.corr details { margin-top: .5rem; font-family: var(--narrow); font-size: .9rem; }
.corr summary { cursor: pointer; font-weight: 700; padding: .4rem 0; min-height: 2.4rem; }
.corr pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .8rem; line-height: 1.45; background: #fbf7ee; border: 1px solid var(--ink); padding: .7rem; overflow-x: auto; margin: .3rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-variant-numeric: lining-nums; }
.watch { list-style: none; margin: 0; padding: 0; font-family: var(--narrow); font-size: .95rem; line-height: 1.38; }
.watch li { padding: .5rem 0; border-top: 1px solid var(--hair); display: grid; grid-template-columns: 1.4rem 1fr; }
.watch li::before { content: ""; width: .5rem; height: .5rem; border: 1.5px solid var(--lake); transform: rotate(45deg); margin-top: .38rem; }
.watch li:first-child { border-top: 2px solid var(--ink); }
.watch b { font-weight: 700; }

/* agent block */
.agent { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 1rem 0 .4rem; margin-top: 1.5rem; }
.agent h3 { margin-top: 0; }

/* colophon */
.colophon h3 { margin-top: 1.5rem; }
.colophon p, .colophon li { font-size: .95rem; line-height: 1.5; }
.sources { margin: .6rem auto 0; padding: 0; list-style: none; columns: 1; column-gap: 2.2rem; font-family: var(--narrow); font-size: .86rem; line-height: 1.36; counter-reset: s; }
@media (min-width: 720px) { .sources { columns: 2; } }
@media (min-width: 1240px) { .sources { margin-inline: 0; } }
.sources { border-top: 2px solid var(--ink); }
.sources li { break-inside: avoid; padding: .36rem 0 .36rem 1.1rem; border-bottom: 1px solid var(--hair); position: relative; }
.sources li::before { content: ""; position: absolute; left: .1rem; top: .82rem; width: .34rem; height: .34rem; background: var(--lake); transform: rotate(45deg); }
.sources a { overflow-wrap: anywhere; }
.sources .d { color: var(--ink-2); }
.credits { font-family: var(--narrow); font-size: .86rem; line-height: 1.4; }

.orn { display: flex; align-items: center; gap: .8rem; margin: 3rem auto 0; color: var(--ink); max-width: 12rem; }
.orn::before, .orn::after { content: ""; flex: 1; border-top: 1px solid var(--ink); }
.orn i { width: .55rem; height: .55rem; background: var(--lake); transform: rotate(45deg); display: block; }

/* footer */
.foot { border-top: 3px solid var(--ink); margin-top: 3rem; position: relative; padding: 1.2rem 0 1rem; font-family: var(--narrow); font-size: .93rem; line-height: 1.45; display: grid; gap: 1rem 2.5rem; grid-template-columns: 1fr; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid var(--ink); }
@media (min-width: 760px) { .foot { grid-template-columns: 1.2fr 1fr 1fr; } }
.foot p { margin: 0 0 .4rem; }
.foot b { font-family: var(--display); font-weight: 700; font-size: 1rem; }
.foot a { display: inline-block; padding: .15rem 0; }
.proto-strip { background: var(--ink); color: var(--paper); font-family: var(--narrow); font-size: .9rem; line-height: 1.4; }
.proto-strip div { max-width: calc(var(--col-rail) + var(--col-text) + var(--col-notes) + 2 * var(--gap)); margin: 0 auto; padding: .6rem 1rem; display: flex; gap: .6rem 1.2rem; align-items: center; flex-wrap: wrap; }
.proto-strip p { margin: 0; flex: 1 1 22rem; }
.proto-strip a { color: var(--paper); font-weight: 700; display: inline-flex; align-items: center; min-height: 2.5rem; }
.proto-strip a:hover { color: var(--paper); text-decoration-thickness: 2px; }
.proto-strip button { font: inherit; color: var(--paper); background: transparent; border: 1px solid var(--paper); border-radius: 2px; padding: .3rem .7rem; min-height: 2.5rem; cursor: pointer; }
html:not(.js) .proto-strip button { display: none; }
.proto-strip :focus-visible { outline-color: #f4b393; }

@media print {
  .runhead, .rail, .tools, .proto-strip, .corr form { display: none; }
  body { background: #fff; }
}

/* additions */
.figs figcaption { padding-bottom: .45rem; display: flex; flex-wrap: wrap; gap: .2rem 1rem; align-items: baseline; }
.figs .cap { font-family: var(--display); font-weight: 700; font-size: 1.08rem; }
.capnote { font-family: var(--narrow); font-size: .86rem; color: var(--ink-2); }
.mnotes.inl { margin: -.4rem 0 1rem; padding-top: 0; }
.plates2 { display: grid; gap: 1.2rem 2rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin: 1.6rem auto 0; align-items: start; }
.plates2 .plate { margin: 0; }
@media (min-width: 1240px) { .plates2 { margin-inline: 0; } }
.calsrc { font-family: var(--narrow); font-size: .86rem; line-height: 1.38; margin: 0; }
.corr .err { color: #8f2a0c; font-weight: 700; margin: .3rem 0 0; }
.corr .err:empty { display: none; }
.watch-h { margin-top: 0; }
.agent { max-width: calc(var(--col-text) + var(--gap) + var(--col-notes)); margin-inline: auto; }
@media (min-width: 1240px) { .agent { margin-inline: 0; } }
td.n.todo { text-align: right; white-space: normal; }

.facts.slim { max-width: var(--col-text); }
.facts.slim table { max-width: 26rem; }

.plate.light img { filter: grayscale(1) contrast(.92) brightness(1.3); }
@media (min-width: 760px) and (max-width: 999px) { html { scroll-padding-top: 4rem; } }
html { scroll-padding-top: 4rem; }
@media (min-width: 1240px) { html { scroll-padding-top: 1.5rem; } }
html:not(.js) .reckon, html:not(.js) .swipe + .none { display: none; }
@media (min-width: 700px) and (max-width: 999px) { .reckon { grid-template-columns: auto 1fr; } .reckon .hint { grid-column: 1 / -1; } }

/* design fixes 2026-11-11 (critic pass): slim placeholder notes, larger margin notes, status column width */
.slip { margin: .9rem 0 1.1rem; padding: .1rem 0 .1rem .8rem; border: 0; border-left: 2px solid var(--lake); background: transparent; font-family: var(--narrow); font-size: .92rem; line-height: 1.4; }
.slip .slip-h { display: inline; font-family: var(--narrow); font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--lake); margin: 0 .45rem 0 0; }
.slip .slip-h span { display: none; }
.slip p:not(.slip-h) { display: inline; font-size: .92rem; line-height: 1.4; color: var(--ink-2); font-style: italic; }
.mnotes { font-size: .93rem; line-height: 1.4; }
@media (min-width: 760px) { td.n.todo, td.todo { min-width: 10.5rem; } }
