@font-face { font-family: 'Atkinson Hyperlegible'; src: url(/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url(/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url(/fonts/courier-prime-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
:root {
  --tin: #2b6a64; --tin-deep: #1f504b; --ground: #dce8e5; --card: #fff; --rule: #c9dcec; --red: #c4362c; --red-deep: #a32a21;
  --ink: #1b2838; --soft: #44546a; --manila: #ead9a7; --manila-soft: #f7efd6; --slate: #46607f;
  --sans: 'Atkinson Hyperlegible', system-ui, sans-serif; --mono: 'Courier Prime', 'Courier New', monospace;
  --r: 6px; --gut: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.1875rem/1.6 var(--sans); }
::selection { background: var(--manila); color: var(--ink); }
a { color: var(--tin-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red-deep); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 10px 14px; z-index: 9; }
.skip:focus { left: 8px; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
h2 { font-size: 1.35rem; margin: 2.2em 0 .6em; }
p, li { text-wrap: pretty; }

/* the tin: brand band with manila divider tabs */
.tin { background: var(--tin); color: #fff; }
.tin-in { max-width: 1040px; margin: 0 auto; padding: 14px var(--gut) 0; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 24px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.25rem; padding-bottom: 12px; }
.logo:hover { color: #fff; }
.tabs { display: flex; gap: 6px; }
.tabs a { display: block; background: var(--manila); color: var(--ink); text-decoration: none; font-weight: 700; padding: 12px 18px 10px; min-height: 48px; border-radius: 10px 10px 0 0; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .08); }
.tabs a:hover { background: #f3e6bd; color: var(--ink); }
.tabs a[aria-current] { background: var(--ground); box-shadow: none; }

main { max-width: 1040px; margin: 0 auto; padding: 18px var(--gut) 56px; }
.crumbs { font-size: 1rem; margin: 0 0 12px; color: var(--soft); }
.crumbs a { color: var(--soft); }

/* the index card */
.card { background: var(--card); border-radius: var(--r); box-shadow: 0 1px 2px rgb(27 40 56 / .08), 0 10px 28px -12px rgb(27 40 56 / .22); padding: 28px clamp(16px, 4vw, 48px) 32px; max-width: 820px; }
.card h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); margin: 0 0 18px; padding-bottom: 14px; border-bottom: 3px solid var(--red); }
.answer { font-size: 1.3rem; line-height: 1.5; margin: 0 0 20px; max-width: 64ch; }
.answer .cite, .method .cite { white-space: nowrap; }
.plan { margin: 0 0 8px; }
.plan svg { display: block; width: 100%; height: auto; max-width: 560px; border: 1.5px solid var(--rule); border-radius: 4px; }
.plan figcaption { font-size: 1rem; color: var(--soft); margin-top: 8px; max-width: 560px; }
.fact { font-size: 1.05rem; color: var(--soft); }
.steps { padding-left: 1.4em; } .steps li { margin: .5em 0; }

.tw { overflow-x: auto; margin: 28px 0 0; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 1rem; }
caption { text-align: left; font-weight: 700; font-size: 1.1rem; padding-bottom: 8px; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-size: .95rem; color: var(--soft); border-bottom: 2px solid var(--ink); }
tbody th, tbody td:nth-child(2), tbody td:nth-child(3) { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; }
tbody td:last-child { font-family: var(--sans); font-weight: 400; }

.method ul { padding-left: 1.2em; } .method li { margin: .4em 0; }
.note { background: var(--manila-soft); padding: 12px 16px; border-radius: var(--r); font-size: 1.05rem; }

/* the shopping slip */
.shop { margin: 32px 0 0; background: var(--manila-soft); border-top: 2px dashed #c9b57a; border-radius: 0 0 var(--r) var(--r); padding: 18px 20px 14px; }
.shop h2 { margin: 0 0 4px; font-size: 1.2rem; }
.shop p { margin: 0 0 12px; font-size: 1.05rem; }
.shop ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.buy { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 18px; background: var(--red); color: #fff; font-weight: 700; text-decoration: none; border-radius: var(--r); }
.buy:hover { background: var(--red-deep); color: #fff; }
.shop .disc { font-size: .95rem; color: var(--soft); margin: 0; }

.sources { margin-top: 32px; font-size: 1rem; }
.sources h2 { font-size: 1.1rem; margin: 0 0 6px; }
.sources ol { padding-left: 1.4em; margin: 0; } .sources li { margin: .3em 0; }
.sources li:target { background: var(--manila-soft); }
.updated { font-size: .95rem; color: var(--soft); margin: 20px 0 0; }

/* neighbouring cards */
.next { max-width: 820px; }
.next h2 { margin: 40px 0 12px; }
.next ul, .qs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.next a, .qs a { display: flex; flex-direction: column; gap: 2px; height: 100%; min-height: 48px; background: var(--card); border-top: 3px solid var(--red); border-radius: 0; padding: 12px 14px; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgb(27 40 56 / .08); }
.next a:hover, .qs a:hover { box-shadow: 0 6px 18px -8px rgb(27 40 56 / .35); color: var(--ink); }
.qs.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.qs a small { font-size: 1rem; color: var(--soft); margin-top: 4px; }
.next a span, .qs a span { font-family: var(--mono); font-weight: 700; color: var(--red-deep); }

/* hubs and home */
.hub h1, .home h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem); margin: 8px 0 10px; }
.lede { font-size: 1.25rem; max-width: 60ch; margin: 0 0 24px; }
.home .plan { max-width: 560px; margin-bottom: 28px; }
.drawers { display: grid; gap: 8px 28px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.drawers h2 { margin: 18px 0 10px; }
.drawers .qs { grid-template-columns: 1fr; }

/* planners */
.planner { margin: 0 0 20px; display: grid; gap: 14px; }
.planner fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.planner legend { font-weight: 700; margin-bottom: 6px; width: 100%; }
.planner fieldset label { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 14px; border: 1.5px solid var(--rule); border-radius: var(--r); background: #fff; cursor: pointer; }
.planner fieldset label:has(input:checked) { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.planner input[type=radio] { accent-color: var(--red); width: 20px; height: 20px; margin: 0; }
.planner p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.planner p > label { font-weight: 700; }
.planner input[type=number], .planner select { font: 700 1.15rem var(--mono); min-height: 48px; padding: 6px 10px; border: 1.5px solid var(--slate); border-radius: var(--r); width: 7.5em; background: #fff; color: var(--ink); }
.planner select { width: auto; font-family: var(--sans); }
[hidden] { display: none !important; }

.prose { font-size: 1.1rem; } .prose h2 { font-size: 1.25rem; }

footer.site { background: var(--tin-deep); color: #e8f1ef; padding: 36px var(--gut) 40px; }
.fin { max-width: 1040px; margin: 0 auto; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
footer.site h2 { font-size: 1rem; margin: 0 0 8px; color: #fff; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin: 0; }
footer.site a { color: #fff; display: inline-block; padding: 6px 0; min-height: 44px; }
.fine { max-width: 1040px; margin: 20px auto 0; font-size: .95rem; color: #cfe0dc; }

@media (max-width: 560px) {
  body { font-size: 1.125rem; }
  .tin-in { justify-content: center; }
  .logo { padding-bottom: 6px; }
  .tabs { width: 100%; } .tabs a { flex: 1; text-align: center; padding: 12px 6px 10px; }
  .card { padding-top: 22px; }
  .answer { font-size: 1.2rem; }
  table { min-width: 0; font-size: .95rem; }
}
@media print { .tin, footer.site, .shop, .next, .planner { display: none; } body { background: #fff; } .card { box-shadow: none; } }
