/* Records and checks pages: the docs sheet, set for tables, maps and step-by-step checks. */
.inner .dhead { padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(44px, 6vw, 92px); }
.inner .dhead h1 { margin: 10px 0 14px; font: 800 clamp(42px, 6.4vw, 96px)/.92 var(--title); letter-spacing: -.035em; max-width: 16ch; }
.inner .dhead .lead { font-size: clamp(17px, 1.3vw, 20px); max-width: 60ch; margin: 0 0 14px; }
.inner .ch { padding-top: clamp(52px, 7vw, 104px); padding-bottom: clamp(52px, 7vw, 104px); }
.inner .ch h2 { font-size: clamp(30px, 3.6vw, 54px); }
.inner .ch h3.sub { margin: 28px 0 10px; font: 800 24px/1.1 var(--title); }
.inner .ch p { max-width: 70ch; }
.dhead .kick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.dhead .kick .stamp { margin-right: 0; }
.bound { margin: 0; font-size: 15px; color: var(--ink-2); max-width: 60ch; }
.rebound { box-shadow: inset 0 -3px 0 var(--now); }
.src { font-size: 14px; color: var(--ink-2); margin: 8px 0 0; }
.ch.ink .src { color: rgba(251, 240, 196, .78); }
.linkish { background: none; border: 0; padding: 6px 0; min-height: 44px; font: 600 15px/1 var(--body); color: inherit; text-decoration: underline; cursor: pointer; }
.ok-line { font-family: var(--body); font-weight: 600; }
.facts { margin: 0 0 18px; padding-left: 1.1em; display: grid; gap: 8px; font-size: 18px; max-width: 66ch; }
.stepsdoc { margin: 0 0 18px; padding-left: 1.3em; display: grid; gap: 10px; font-size: 18px; max-width: 68ch; }
.stepsdoc code { white-space: normal; }
.aside { padding: 12px 16px; border: 1.5px solid var(--ink); outline: 1px solid var(--ink); outline-offset: -5px; border-radius: 4px; background: rgba(251, 240, 196, .5); font-size: 16px !important; }
.checks .wide { grid-column: 1 / -1; }
.dtable.api td:first-child { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.dtable.api td { height: auto; padding-top: 10px; padding-bottom: 10px; }

/* a note about the program's state, said once on the pages where it matters */
.pnote { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 0; padding: 12px 16px; border: 2px dashed var(--ink); border-radius: 10px;
  font-size: 16px; line-height: 1.45; max-width: 66ch; background: rgba(255, 248, 220, .55); }
.pnote::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--sun); }

/* small labels */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 5px; border: 1.5px solid var(--ink); border-radius: 999px; font: 700 13px/1.15 var(--body);
  background: var(--straw); color: var(--ink); white-space: nowrap; }
.pill.on { background: var(--ink); color: var(--straw); }
.pill.warn { background: var(--sun); }
.pill.bad { background: var(--now); color: #fff; border-color: var(--ink); }
.pill.soft { background: transparent; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.sidetag { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sidetag svg { flex: none; }
.sidetag b { font: 800 1em/1 var(--title); }

/* key and value rows (hashes, addresses, slots) */
.kv { margin: 0; display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); border-top: 2px solid currentColor; }
.kv > div { display: contents; }
.kv dt { padding: 12px 14px 12px 0; font-weight: 700; border-bottom: 1px solid var(--hair); font-size: 16px; }
.kv dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--hair); font: 400 15px/1.45 var(--mono); word-break: break-all; min-width: 0; }
.kv dd.txt { font-family: var(--body); font-size: 16px; word-break: normal; }
.ch.ink .kv dt, .ch.ink .kv dd { border-color: rgba(251, 240, 196, .22); }
.kv .copy { margin-left: 8px; }
.copy { font: 700 12px/1 var(--body); padding: 5px 8px; border: 1.5px solid currentColor; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; vertical-align: 1px; min-height: 28px; }
.copy:hover { background: var(--sun); color: var(--ink); }
a.addr { font-family: var(--mono); }

/* empty and error states */
.empty { border: 2px dashed currentColor; border-radius: 12px; padding: 20px 22px; max-width: 66ch; }
.empty b { display: block; font: 800 22px/1.15 var(--title); margin-bottom: 6px; }
.empty p { margin: 0; font-size: 17px; }
.err-box { border: 2px solid var(--wick); border-radius: 12px; padding: 16px 18px; background: #fff8dc; color: var(--ink); max-width: 66ch; }

/* the steps of a check */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 6px 14px; align-items: start; padding: 14px 16px; border: 2px solid var(--ink);
  border-radius: 10px; background: var(--straw); color: var(--ink); }
.steps .mk { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--ink); font: 700 16px/1 var(--mono); }
.steps .ok .mk { background: var(--fern); color: var(--straw); }
.steps .bad { box-shadow: 0 0 0 3px var(--now); }
.steps .bad .mk { background: var(--now); color: #fff; }
.steps .na { background: #f6e9b4; }
.steps .lbl { font-weight: 700; font-size: 17px; padding-top: 4px; }
.steps .st { font: 700 12px/1 var(--body); text-transform: uppercase; letter-spacing: .07em; padding: 6px 8px; border-radius: 6px; border: 1.5px solid var(--ink); margin-top: 3px; white-space: nowrap; }
.steps .ok .st { background: var(--ink); color: var(--straw); }
.steps code { grid-column: 2 / -1; font-size: 13.5px; line-height: 1.5; word-break: break-all; color: var(--ink-2); }
.steps li.in { animation: stepIn 420ms var(--ease) both; animation-delay: calc(var(--i) * 70ms); transform-origin: 50% 0; }
@keyframes stepIn { from { opacity: 0; transform: perspective(900px) rotateX(-40deg); } }
.verdict { margin: 18px 0 0; padding: 16px 18px; border: 2px solid var(--ink); border-radius: 12px; font: 800 clamp(20px, 2vw, 26px)/1.2 var(--title); background: var(--straw); color: var(--ink); }
.verdict.ok { background: var(--fern); color: var(--straw); }
.verdict.bad { background: var(--now); color: #fff; }
.verdict.na { background: var(--sun); }

/* progress, hatched like the plate */
.prog { margin: 16px 0 0; }
.prog .bar { height: 16px; border: 2px solid var(--ink); border-radius: 8px; background: #fff8dc; overflow: hidden; }
.prog i { display: block; height: 100%; width: 100%; transform: scaleX(var(--p, 0)); transform-origin: left; background: repeating-linear-gradient(135deg, var(--ink) 0 2px, transparent 2px 6px), var(--sun);
  transition: transform 220ms var(--ease); }
.prog span { display: block; margin-top: 8px; font: 600 15px/1.4 var(--body); }
.prog.busy span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .9s linear infinite; vertical-align: -1px; }

/* independence of the chain reads */
.indep { border: 2px solid var(--ink); border-radius: 12px; padding: 18px 20px; background: var(--straw); color: var(--ink); }
.indep .lab { margin: 0 0 6px; font: 800 clamp(26px, 2.6vw, 36px)/1 var(--title); }
.indep.no .lab { color: var(--wick); }
.indep.yes .lab { color: var(--fern); }
.indep .counts { font-size: 14px; color: var(--ink-2); }
.indep form { margin-top: 14px; border-top: 1px solid var(--hair); padding-top: 14px; }
.indep label, .form label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 16px; }
.paste input[type="url"], .paste input[type="number"] { font-family: var(--mono); }

/* forms */
.form { display: grid; gap: 16px; max-width: 640px; }
.form .field input, .form .field select { width: 100%; height: 48px; border: 2px solid var(--ink); border-radius: 10px; background: #fff8dc; padding: 0 12px; font: 400 16px/1 var(--body); color: var(--ink); }
.form .field input[type="file"] { padding: 10px; height: auto; }
.form .field input:focus-visible, .form .field select:focus-visible { outline: 3px solid var(--now); outline-offset: 1px; }
.form .field input[aria-invalid="true"] { border-color: var(--wick); }
.form .field small { display: block; margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.form .acts { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* the land: a plate below, the pointer above */
.land-box { position: relative; aspect-ratio: 5 / 4; width: 100%; }
.land-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.land-box canvas.over { cursor: crosshair; touch-action: manipulation; }
.land-box canvas.over:focus-visible { outline: 3px solid var(--now); outline-offset: 2px; }
.tip { position: absolute; z-index: 3; pointer-events: none; width: max-content; max-width: min(300px, 80%); background: var(--straw); border: 2px solid var(--ink); border-radius: 10px;
  padding: 9px 12px; font-size: 14px; line-height: 1.4; box-shadow: 0 4px 0 var(--ink); }
.tip b { font-family: var(--title); }
.maps2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.maps2 figure, .mapfig { margin: 0; }
.maps2 figcaption, .mapfig figcaption { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.maps2 figcaption b, .mapfig figcaption b { color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0; font-size: 15px; align-items: center; }
.legend i { display: inline-block; width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }
.legend .mv { border: 3px solid var(--now); border-radius: 4px; }
.legend .bc { border-radius: 50%; border: 1.5px solid var(--ink); background: radial-gradient(circle at 50% 55%, var(--now) 0 35%, var(--straw) 37%); }

/* side counts */
.sidecards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sidecard { border: 2px solid var(--ink); border-radius: 10px; padding: 14px; background: var(--straw); color: var(--ink); display: grid; gap: 4px; }
.sidecard .n { font: 700 clamp(34px, 3.6vw, 52px)/1 var(--mono); letter-spacing: -.03em; }
.sidecard .d { font-size: 14px; color: var(--ink-2); }

/* the count of a night: four sides across */
.count { width: 100%; border-collapse: collapse; font-size: 16px; }
.count caption { text-align: left; font-weight: 700; padding-bottom: 8px; }
.count th, .count td { padding: 10px 8px; border-bottom: 1px solid var(--hair); text-align: right; font-variant-numeric: tabular-nums; }
.count td { font-family: var(--mono); font-size: 15px; }
.count th[scope="row"] { text-align: left; font-family: var(--body); font-weight: 600; font-size: 15px; }
.count th[scope="row"] small { display: block; font-weight: 400; color: var(--ink-2); font-size: 13px; }
.count thead th { border-bottom: 2px solid var(--ink); }
.count thead th .sidetag { justify-content: flex-end; }
.count tr.res td { font-family: var(--body); font-weight: 700; }
.count td.won { background: rgba(46, 122, 98, .16); }
.count td.hit { background: rgba(255, 74, 28, .16); }
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* the night list */
.nlist { display: grid; gap: 12px; }
.nrow { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; padding: 12px; border: 2px solid var(--ink); border-radius: 12px;
  background: var(--straw); color: var(--ink); }
.nrow .thumb { position: relative; width: 170px; aspect-ratio: 5 / 4; display: block; }
.nrow .thumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.nrow h3 { margin: 0 0 4px; font: 800 clamp(24px, 2.4vw, 32px)/1 var(--title); }
.nrow h3 a { text-decoration: none; }
.nrow h3 a:hover { text-decoration: underline; }
.nrow p { margin: 4px 0 0; font-size: 16px; }
.nrow .when { font-size: 14px; color: var(--ink-2); }
.nrow .go { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.nrow.wait { grid-template-columns: minmax(0, 1fr) auto; background: transparent; border-style: dashed; }

/* runs */
.runs { width: 100%; border-collapse: collapse; font-size: 15px; }
.runs th, .runs td { padding: 8px; border-bottom: 1px solid var(--hair); text-align: left; }
.runs th { font-size: 13px; border-bottom: 2px solid var(--ink); }
.runs td.r, .runs th.r { text-align: right; font-family: var(--mono); }
.runcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.runcol h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font: 800 22px/1 var(--title); }
.runcol h3 small { font: 600 14px/1 var(--body); color: var(--ink-2); margin-left: auto; }
details.more { margin-top: 18px; }
details.more summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }

/* season strips */
.minis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.mini { position: relative; display: block; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--straw); color: var(--ink); text-decoration: none; overflow: hidden;
  transition: transform var(--press), box-shadow var(--press); }
a.mini:hover { box-shadow: 0 4px 0 var(--ink); transform: translateY(-2px); }
.mini .cv { position: relative; aspect-ratio: 5 / 4; }
.mini canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mini span { display: flex; justify-content: space-between; gap: 4px; padding: 4px 6px; font: 600 12px/1.2 var(--body); border-top: 1px solid var(--hair); }
.mini.empty-slot { border-style: dashed; background: transparent; }
.mini.empty-slot .cv { display: grid; place-items: center; font: 700 13px/1 var(--mono); color: var(--ink-2); }
.season { border-top: 2px solid var(--ink); padding-top: 22px; margin-top: 30px; }
.season:first-child { margin-top: 0; }
.season h3 { margin: 0 0 6px; font: 800 clamp(28px, 3vw, 42px)/1 var(--title); }
.banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 12px; background: var(--sun); color: var(--ink); margin: 12px 0 16px; max-width: 640px; }
.banner b { font: 800 26px/1 var(--title); }
.chart.small canvas { height: 260px; }

/* the engine file */
.codeview { max-height: 72vh; overflow: auto; border: 2px solid var(--ink); border-radius: 8px; background: #fff8dc; color: var(--ink); }
.codeview pre { margin: 0; padding: 12px 0; font: 400 13.5px/1.55 var(--mono); counter-reset: ln; }
.codeview .l { display: block; padding-right: 16px; white-space: pre; }
.codeview .l::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 4.6em; padding-right: 1.2em; text-align: right; color: var(--ink-3); user-select: none; }
.codeview .l.sec { background: var(--sun); font-weight: 700; }
.filetoc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.filetoc button { font: 600 14px/1 var(--body); padding: 8px 10px; min-height: 36px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--straw); color: var(--ink); cursor: pointer; }
.filetoc button:hover { background: #fff6d2; }
.hashbig { font: 700 clamp(16px, 1.9vw, 26px)/1.35 var(--mono); word-break: break-all; margin: 6px 0 14px; letter-spacing: -.01em; }

/* program tables */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 2px solid currentColor; border-radius: 10px; overflow: hidden; }
.two > div { padding: 18px 20px; }
.two > div + div { border-left: 2px solid currentColor; }
.two h3 { margin: 0 0 10px; font: 800 22px/1.1 var(--title); }
.two ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; font-size: 16px; }
.dtable.wrapcells td { height: auto; padding-top: 10px; padding-bottom: 10px; vertical-align: top; }

.keyrow { display: inline-flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }

@media (max-width: 900px) {
  .maps2, .runcols, .two, .cols2, .mapcols, .inner .dsplit, .inner .dfront, .inner .checks { grid-template-columns: minmax(0, 1fr); }
  .two > div + div { border-left: 0; border-top: 2px solid currentColor; }
  .sidecards { grid-template-columns: 1fr 1fr; }
  .minis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nrow { grid-template-columns: 110px minmax(0, 1fr); }
  .nrow .thumb { width: 110px; }
  .nrow .go { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { border-bottom: 0; padding-bottom: 2px; }
  .kv dd { padding-top: 0; }
  .steps li { grid-template-columns: 34px minmax(0, 1fr); }
  .steps .st { grid-column: 2; justify-self: start; }
  .dtable.api td:first-child { white-space: normal; word-break: break-all; }
}
@media (max-width: 520px) {
  .minis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inner .dhead h1 { font-size: 40px; }
}

/* odds and ends */
.big-result { font: 800 clamp(24px, 2.6vw, 36px)/1.25 var(--title) !important; letter-spacing: -.01em; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.big-result .sidetag { font-size: 1em; }
.why { font-size: 14px; color: var(--ink-2); }
.menu-head { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.codeview { position: relative; }
.mapcols { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.tilecard { border: 2px solid var(--ink); border-radius: 12px; padding: 16px 18px; background: var(--straw); min-height: 140px; }
.tilecard > b { font: 800 26px/1.1 var(--title); }
.tilecard p { margin: 8px 0 0; font-size: 16px; }
.tilecard .facts { margin-top: 10px; font-size: 16px; }
.sponsor-sign { position: absolute; right: 14px; bottom: 14px; z-index: 2; max-width: 34%; }
.sponsor-sign a { display: grid; gap: 4px; padding: 6px; background: var(--straw); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 3px 0 var(--ink); text-decoration: none; font: 700 12px/1.1 var(--body); }
.sponsor-sign img { width: 100%; max-height: 90px; object-fit: contain; }

@media (max-width: 900px) { .mapcols { grid-template-columns: minmax(0, 1fr); } }
.inner [hidden] { display: none !important; }
/* long hashes, addresses and labels wrap instead of pushing the page sideways */
.inner code, .inner .mono, .steps .lbl, .inner .src, .facts li, .verdict, .tilecard, .indep p { overflow-wrap: anywhere; }
.steps .lbl { min-width: 0; }
.inner .toc a { white-space: nowrap; }
.big-result { display: block !important; }
.big-result .sidetag { display: inline-flex; vertical-align: -5px; margin-right: 4px; }
.count th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--straw); min-width: 10rem; }
@media (max-width: 900px) {
  .big-result { font-size: 22px !important; }
  .count th[scope="row"] { min-width: 8.5rem; box-shadow: 1px 0 0 var(--hair); }
}
.codeview .l.flash { animation: lineFlash 1.6s var(--ease); }
@keyframes lineFlash { 0%, 40% { background: var(--now); color: #fff; } }
.count small.raw { display: block; font-size: 12px; color: var(--ink-2); font-weight: 400; }

/* an optional slower check, under the form fields */
.form .opt { display: flex; gap: 10px; align-items: flex-start; font: 600 15px/1.4 var(--body); cursor: pointer; max-width: 62ch; }
.form .opt input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.form .opt small { display: block; font-weight: 400; color: var(--ink-2); }
