/* Traverse Practice: a surveyor's computation sheet. Pale squared paper, blue rules, a red margin rule after the
   station column, slab headings like a field book cover, a deep survey-teal accent for actions, and numbers in a
   monospace so the columns of Gale's table line up. Black on white with ruled blanks on paper. */
:root {
  --bg: #eef1ec;
  --paper: #fbfcf8;
  --ink: #18232a;
  --muted: #4a5860;
  --line: #cfd8d3;
  --edge: #7c8a86;
  --accent: #0b5f73;
  --accent-ink: #ffffff;
  --accent-soft: #d8ecef;
  --info: #1f5a86;
  --ok: #17663a;
  --ok-soft: #dcefe2;
  --close: #7a5300;
  --close-soft: #f6ebd2;
  --bad: #a2261f;
  --bad-soft: #f8e1de;
  --focus: #1b5fd0;
  --rule: #a9c0d6;
  --margin: #c8513c;
  --thead: #dde6e1;
  --void: #e3e9e5;
  --smudge: #b9b9a6;
  --grid: #dbe6ee;
  --trav: #0b5f73;
  --miss: #b23a1d;
  --head: Rockwell, "Roboto Slab", "Zilla Slab", "Bookman Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --r: 3px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10171a;
    --paper: #172126;
    --ink: #e4ecea;
    --muted: #a6b5b4;
    --line: #2b3a3f;
    --edge: #62747a;
    --accent: #6fcde0;
    --accent-ink: #032029;
    --accent-soft: #12343c;
    --info: #8cc3f0;
    --ok: #8adca6;
    --ok-soft: #14301f;
    --close: #f0c56b;
    --close-soft: #352a12;
    --bad: #ff9c8f;
    --bad-soft: #3a1c18;
    --focus: #8ab8ff;
    --rule: #34495a;
    --margin: #b4553f;
    --thead: #1f2c31;
    --void: #1b262a;
    --smudge: #4d5347;
    --grid: #22323a;
    --trav: #6fcde0;
    --miss: #ff9c7a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
a { color: var(--info); text-underline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.hero { padding: 18px 0 4px; max-width: 860px; }
h1 { font: 700 clamp(1.8rem, 5.4vw, 2.6rem)/1.08 var(--head); margin: 0 0 8px; letter-spacing: 0; }
.lede { margin: 0 0 12px; color: var(--muted); max-width: 70ch; }
h2 { font: 700 1.3rem/1.2 var(--head); margin: 0 0 10px; }

.tool { display: flex; flex-direction: column; }
.setup { order: 1; margin: 8px 0 4px; padding-top: 10px; border-top: 2px solid var(--ink); }
.work-area { order: 2; min-width: 0; }
.refcard { order: 3; }
@media (min-width: 1020px) {
  .tool { display: grid; grid-template-columns: minmax(0, 1fr) 320px; column-gap: 34px; align-items: start; }
  .setup { grid-column: 1; grid-row: 1; }
  .refcard { grid-column: 2; grid-row: 1 / span 2; margin-top: 8px; }
  .work-area { grid-column: 1; grid-row: 2; }
}
fieldset { border: 0; padding: 0; margin: 0 0 10px; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.seg { display: grid; border: 1px solid var(--edge); border-radius: var(--r); overflow: hidden; }
.seg2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 760px) { .seg6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.sg { position: relative; display: block; cursor: pointer; border-left: 1px solid var(--edge); border-top: 1px solid var(--edge); margin: -1px 0 0 -1px; }
.sg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sg > span { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; height: 100%; padding: 4px 6px; text-align: center; font-size: 0.9rem; font-weight: 600; background: var(--paper); line-height: 1.15; }
.sg.lvb b { font-family: var(--mono); color: var(--accent); }
.sg input:checked + span { background: var(--accent); color: var(--accent-ink); }
.sg input:checked + span b { color: var(--accent-ink); }
.sg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
.setgrid { display: grid; gap: 0 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (min-width: 700px) { .setgrid { gap: 0 20px; } }
.lvhint { margin: 5px 0 0; font-size: 0.86rem; color: var(--muted); }
.lvhint:empty { display: none; }
.setrow { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
label.inline { display: flex; align-items: center; gap: 8px; font-weight: 600; }
select, input { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--edge); border-radius: var(--r); min-height: 44px; padding: 6px 10px; }
select { max-width: 100%; }
.btn { font: inherit; font-weight: 650; min-height: 44px; padding: 8px 16px; border-radius: var(--r); border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.small { padding: 6px 14px; }
.btn:hover { filter: brightness(0.95); }
.link { font: inherit; background: none; border: 0; padding: 10px 0; min-height: 44px; color: var(--info); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* the conventions card, like the inside cover of a field book */
.refcard { margin: 16px 0 6px; padding: 10px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); max-width: 560px; font-size: 1rem; }
.refcard h2 { font-size: 1.05rem; margin: 0 0 4px; }
.refcard dl { margin: 0; }
.refcard dt { font-weight: 650; padding-top: 5px; border-top: 1px solid var(--line); }
.refcard dt:first-child { border-top: 0; padding-top: 0; }
.refcard dd { margin: 0 0 5px; color: var(--muted); line-height: 1.35; }

.note { overflow-wrap: anywhere; margin: 12px 0; padding: 10px 12px; border: 1px solid var(--close); background: var(--close-soft); border-radius: var(--r); }
.note.info { border-color: var(--info); background: var(--paper); }
.note .link { min-height: 0; padding: 0; font-weight: 600; }

/* the sheet */
.sheet { margin: 12px 0 0; }
.sheet:focus { outline: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.sheet-head h2 { margin: 0; font-size: 1.3rem; }
.code { font-family: var(--mono); letter-spacing: 0.08em; color: var(--accent); }
.score { margin: 0; font-size: 0.95rem; color: var(--muted); }
.practice { margin: 6px 0 0; font-size: 0.93rem; color: var(--muted); }
.qs { list-style: none; margin: 0; padding: 0; }
.q { border-bottom: 1px solid var(--line); padding: 20px 0 10px; }
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.q h3 { font: 700 1.18rem/1.25 var(--head); margin: 0 0 4px; }
.q h3 .qn { color: var(--accent); margin-right: 6px; }
.qtop { display: grid; gap: 4px 18px; }
@media (min-width: 640px) { .qtop { grid-template-columns: minmax(0, 1fr) 250px; align-items: start; } }
.q .scen { margin: 0 0 6px; max-width: 75ch; }
.skfig { margin: 0 0 8px; max-width: 300px; }
.zoom { flex: none; background: transparent; }
@media (min-width: 900px) { .zoom { display: none; } }

/* the field sketch */
svg.sketch { display: block; width: 100%; height: auto; background: var(--paper); border: 1px solid var(--line); }
.sketch .sk-line { stroke: var(--ink); stroke-width: 1.6; }
.sketch .sk-miss { stroke: var(--miss); stroke-width: 1.6; stroke-dasharray: 6 4; }
.sketch .sk-arrow { fill: var(--ink); }
.sketch .sk-st { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.sketch .sk-lab { font: 700 18px var(--sans); fill: var(--ink); text-anchor: middle; }
.sketch .sk-q { font: 700 16px var(--sans); fill: var(--miss); text-anchor: middle; }
.sketch .sk-n line { stroke: var(--ink); stroke-width: 1.4; }
.sketch .sk-n path { fill: var(--ink); }
.sketch .sk-n text { font: 700 12px var(--sans); fill: var(--ink); text-anchor: middle; }
.sketch .sk-note { font: italic 10px var(--sans); fill: var(--muted); text-anchor: end; }

/* the tables: field book and Gale's table */
.tblock { margin: 8px 0 10px; }
.tcap { margin: 0 0 3px; font-weight: 650; font-size: 0.95rem; }
.gwrap { overflow-x: auto; max-width: 100%; }
table.gt { border-collapse: separate; border-spacing: 0; background: var(--paper); font-variant-numeric: tabular-nums; border: 1px solid var(--edge); }
table.gt th, table.gt td { padding: 0 6px; height: 40px; border-bottom: 1px solid var(--rule); border-left: 1px solid var(--line); white-space: nowrap; }
table.gt thead th { background: var(--thead); font: 650 0.84rem/1.2 var(--sans); text-align: center; height: 34px; border-bottom: 2px solid var(--edge); white-space: normal; min-width: 4.5em; }
table.gt tbody th { text-align: left; font-weight: 650; border-right: 2px solid var(--margin); position: sticky; left: 0; background: var(--paper); z-index: 1; min-width: 3.2em; }
table.gt thead th:first-child { background: var(--thead); position: sticky; left: 0; z-index: 2; }
table.gt .num { font-family: var(--mono); text-align: right; font-size: 0.93rem; }
table.gt td.c-line { font-weight: 650; }
table.gt td.blank { padding: 0 2px; }
table.gt td.blank input { width: 7.6em; min-height: 36px; border: 0; border-bottom: 1px dashed var(--edge); border-radius: 0; background: transparent; padding: 4px; font-family: var(--mono); text-align: right; }
table.gt td.c-brg input, table.gt td.c-conv input, table.gt td.c-bb input, table.gt td.c-cfb input, table.gt td.c-cbb input, table.gt td.c-ang input, table.gt td.c-cor input, table.gt td.c-obs input { width: 9.6em; }
table.gt td.blank input:focus { background: var(--accent-soft); }
table.gt td.blank input::placeholder { color: var(--miss); font-weight: 700; opacity: 1; }
table.gt td.is-right { background: var(--ok-soft); }
table.gt td.is-right input { border-bottom: 2px solid var(--ok); }
table.gt td.is-wrong, table.gt td.is-unread { background: var(--bad-soft); }
table.gt td.is-wrong input, table.gt td.is-unread input { border-bottom: 2px solid var(--bad); }
table.gt td.is-close { background: var(--close-soft); }
table.gt td.is-close input { border-bottom: 2px solid var(--close); }
table.gt td.blank.smudge:not([class*="is-"]) { background: color-mix(in srgb, var(--smudge) 30%, var(--paper)); }
table.gt td.void { background: var(--void); }
table.gt tr.sumrow th, table.gt tr.sumrow td { border-top: 3px double var(--edge); }
table.gt .kv { font-weight: 700; color: var(--accent); }
@media (max-width: 760px) {
  table.gt th, table.gt td { padding: 0 4px; }
  table.gt td.blank input { width: 6.6em; }
  table.gt td.c-brg input, table.gt td.c-conv input, table.gt td.c-bb input, table.gt td.c-cfb input, table.gt td.c-cbb input, table.gt td.c-ang input, table.gt td.c-cor input { width: 8.6em; }
  .swipe { display: block; }
}
.swipe { display: none; margin: -4px 0 8px; font-size: 0.86rem; color: var(--muted); }
.cellnotes:empty { display: none; }
.cellfb { margin: 4px 0 10px; padding-left: 1.2em; max-width: 75ch; font-size: 0.94rem; }
.cellfb li { margin: 2px 0; }
.cellfb li.wrong, .cellfb li.unread { color: var(--bad); }
.cellfb li.close { color: var(--close); }

/* the plotted key */
.keyfig { max-width: 640px; margin: 6px 0 8px; }
svg.plot { display: block; width: 100%; height: auto; max-width: 640px; background: var(--paper); }
.plot .pg { stroke: var(--grid); stroke-width: 0.25; }
.plot .pgl { font: 2.6px var(--sans); fill: var(--muted); text-anchor: middle; }
.plot .pgl.pgy { text-anchor: end; }
.plot .pbox { fill: none; stroke: var(--edge); stroke-width: 0.3; }
.plot .ptrav { fill: color-mix(in srgb, var(--trav) 8%, transparent); stroke: var(--trav); stroke-width: 0.5; stroke-linejoin: round; }
.plot .pmiss { stroke: var(--miss); stroke-width: 0.8; }
.plot .pst { fill: var(--ink); }
.plot .plab { font: 700 3.8px var(--sans); fill: var(--ink); text-anchor: middle; }
.plot .pang { font: 2.5px var(--mono); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: var(--paper); stroke-width: 0.8px; }
.plot .parea { font: 600 3.4px var(--sans); fill: var(--ink); text-anchor: middle; }
.plot .pinset { fill: var(--paper); stroke: var(--edge); stroke-width: 0.3; }
.plot .pinl { font: 2.4px var(--sans); fill: var(--ink); text-anchor: middle; }
.plot .perr { stroke: var(--miss); stroke-width: 0.6; }
.plot .pn line { stroke: var(--ink); stroke-width: 0.4; }
.plot .pn path { fill: var(--ink); }
.plot .pn text { font: 700 3px var(--sans); fill: var(--ink); text-anchor: middle; }
.plot .pscale line { stroke: var(--ink); stroke-width: 0.4; }
.plot .pscale text { font: 2.6px var(--sans); fill: var(--ink); }
.figview { overflow: hidden; }
.qs.zoomed .figview { overflow-x: auto; }
.qs.zoomed .figview > svg { width: 200%; max-width: none; }
@media (min-width: 900px) { .qs.zoomed .figview > svg { width: 100%; } .qs.zoomed .figview { overflow: hidden; } }

/* loose questions */
.qparts { max-width: 760px; display: grid; gap: 0 20px; margin: 4px 0 6px; }
@media (min-width: 700px) { .qparts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.part { margin: 0 0 12px; min-width: 0; }
.part > .prompt, .part legend { display: block; font-weight: 600; margin: 0 0 6px; }
.opts { display: grid; gap: 4px; }
.opts.row { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.opt { position: relative; display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); cursor: pointer; }
.opt input { margin: 3px 0 0; min-height: 0; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.opt:has(input:checked) { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.ain { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.ain input { width: 11em; max-width: 100%; font-family: var(--mono); }
.ain .unit { color: var(--muted); white-space: nowrap; }
.qfoot { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; }
.fbwrap:empty { display: none; }
.fb { margin: 6px 0 0; padding: 6px 10px; border-radius: var(--r); max-width: 70ch; }
.fb.right { background: var(--ok-soft); color: var(--ok); }
.fb.close { background: var(--close-soft); color: var(--close); }
.fb.wrong, .fb.unread { background: var(--bad-soft); color: var(--bad); }
.part.is-right .ain input { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.part.is-wrong .ain input, .part.is-unread .ain input { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.part.is-close .ain input { border-color: var(--close); box-shadow: inset 0 0 0 1px var(--close); }
.work { margin-top: 4px; }
.work > summary { cursor: pointer; color: var(--muted); font-size: 0.93rem; padding: 10px 0; min-height: 44px; display: flex; align-items: center; list-style: none; }
.work > summary::-webkit-details-marker { display: none; }
.work > summary::before { content: "+"; margin-right: 6px; font-weight: 700; font-family: var(--mono); }
.work[open] > summary::before { content: "−"; }
.work .ans { margin: 8px 0 2px; }
.steps { margin: 2px 0 8px; padding-left: 1.3em; font-size: 0.94rem; overflow-wrap: anywhere; }
.ask { display: inline-flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; padding: 6px 10px; background: var(--close-soft); border-radius: var(--r); }
.ask .link { padding: 0 4px; }
.ask[hidden] { display: none; }
.sheet-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 0; }

.share { margin: 10px 0 8px; }
.print-row { display: flex; align-items: flex-end; gap: 8px 10px; flex-wrap: wrap; }
.print-row label, .share-out label { display: flex; flex-direction: column; gap: 3px; font-size: 0.9rem; font-weight: 600; }
.share-out input { width: 100%; }
.recent { margin-top: 12px; border-top: 1px solid var(--line); }
.recent summary { cursor: pointer; padding: 11px 0; font-weight: 600; min-height: 44px; }
.recent ul { list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 4px 0; }
.recent small { display: block; color: var(--muted); }
.hint { color: var(--muted); font-size: 0.9rem; margin: 8px 0 10px; }

.toast { position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 160%); background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--r); max-width: calc(100% - 32px); transition: transform 0.2s; z-index: 20; }
.toast.on { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* content */
.content { padding: 22px 0 8px; max-width: 840px; }
.content h2 { margin-top: 30px; }
.content p { max-width: 70ch; }
.ltab { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.ltab th, .ltab td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ltab th { font-size: 0.88rem; color: var(--muted); font-weight: 600; }
.ltab td:first-child { font-weight: 600; white-space: nowrap; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 11px 0; font-weight: 600; min-height: 44px; }
.faq details p { margin: 0 0 12px; }
.sources { font-size: 0.92rem; color: var(--muted); overflow-wrap: anywhere; margin-top: 22px; }

footer { border-top: 1px solid var(--line); margin-top: 20px; padding: 16px 0 28px; color: var(--muted); font-size: 0.92rem; }
.indep { margin: 0 0 10px; }
.sb-footer p { margin: 6px 0; }
.sb-more { line-height: 1.8; }
.sb-footer a { color: var(--ink); }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }

@media (max-width: 600px) {
  .sg > span { font-size: 0.84rem; }
  .ltab { font-size: 0.92rem; }
  .ltab thead { display: none; }
  .ltab tr { display: block; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .ltab td { display: block; border: 0; padding: 1px 0; }
}

/* print: worksheet and key only; tables ruled with room to write */
.print-root { display: none; }
@page { margin: 0.45in 0.5in; }
@media print {
  :root { --ink: #000; --muted: #333; --line: #999; --paper: #fff; --edge: #555; --rule: #888; --margin: #000; --thead: #fff; --void: #fff;
    --grid: #c8c8c8; --trav: #000; --miss: #000; --accent: #000; }
  body { background: #fff; color: #000; font: 10.5pt/1.38 var(--sans); }
  main, footer, .toast, .skip { display: none !important; }
  .print-root { display: block; }
  svg { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  table.pt { width: 100%; border-collapse: collapse; }
  table.pt > tbody > tr > td, table.pt > thead > tr > td { padding: 0; }
  .prun { font: 8.5pt var(--sans); color: #444; text-align: right; padding-bottom: 6pt !important; }
  .ph { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2pt solid #000; margin-bottom: 3pt; }
  .ph h2 { font: 700 15pt var(--head); margin: 0; }
  .ph p { margin: 0; }
  .pconv { margin: 0 0 4pt; font-size: 9pt; }
  .pmeta { display: flex; justify-content: space-between; gap: 12pt; margin: 4pt 0 5pt; }
  .prules { margin: 0 0 3pt; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1pt 5mm; font-size: 7.6pt; line-height: 1.22; }
  .prules div { display: block; }
  .prules dt { font-weight: 700; display: inline; }
  .prules dt::after { content: ":"; }
  .prules dd { margin: 0 0 0 3pt; display: inline; }
  .prulebox { break-inside: avoid; page-break-inside: avoid; border-top: 0.75pt solid #999; padding-top: 4pt; }
  .prulebox h3 { font: 700 10pt var(--head); margin: 0 0 2pt; }
  .plabel { margin: 0 0 4pt; font-size: 9pt; font-style: italic; }
  .pq { list-style: none; margin: 0; padding: 0; }
  .pq > li { padding: 4pt 0 6pt; border-top: 0.75pt solid #999; break-inside: avoid; page-break-inside: avoid; }
  .pqtop { display: grid; grid-template-columns: 1fr 46mm; gap: 5mm; align-items: start; }
  .pq h3 { font: 700 11.5pt var(--head); margin: 0 0 2pt; }
  .pq .pscen { margin: 0 0 4pt; }
  .psk svg.sketch { width: 46mm; height: 33mm; border: 0.6pt solid #999; }
  .tblock { margin: 3pt 0 4pt; break-inside: avoid; page-break-inside: avoid; }
  .tcap { font-size: 9pt; margin: 0 0 1pt; }
  .gwrap { overflow: visible; }
  table.gt { width: 100%; table-layout: fixed; border-collapse: collapse; border: 1pt solid #000; font-size: 9pt; }
  table.gt th, table.gt td { height: 5.7mm; border: 0.6pt solid #777; padding: 0 3pt; position: static; white-space: nowrap; overflow: hidden; }
  table.gt thead th { height: 6mm; border-bottom: 1.2pt solid #000; font-size: 8pt; background: #fff; white-space: normal; line-height: 1.1; min-width: 0; }
  table.gt thead th:first-child { width: 15mm; position: static; }
  table.gt thead th.c-line { width: 11mm; }
  table.gt thead th.c-st { width: 19mm; }
  table.gt thead th.c-brg, table.gt thead th.c-ofb, table.gt thead th.c-obb, table.gt thead th.c-cfb, table.gt thead th.c-cbb, table.gt thead th.c-fb, table.gt thead th.c-conv, table.gt thead th.c-bb { width: 31mm; }
  table.gt thead th.c-len { width: 20mm; }
  table.gt tbody th { border-right: 1.2pt solid #000; min-width: 0; background: #fff; }
  table.gt .num { font-size: 9pt; }
  table.gt td.void { background: #e4e4e4; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  table.gt tr.sumrow th, table.gt tr.sumrow td { border-top: 1.6pt double #000; }
  table.gt td.smudge .sm { display: inline-block; padding: 0 4pt; border: 0.8pt dashed #000; font-weight: 700; }
  table.gt .kv { color: #000; }
  .pparts { font-size: 9.5pt; display: grid; grid-template-columns: 1fr 1fr; gap: 0 8mm; margin: 2pt 0; }
  .pparts .pp { margin: 0 0 3pt; break-inside: avoid; page-break-inside: avoid; }
  .pparts .pp { display: flex; align-items: flex-end; gap: 4pt; }
  .pparts .pp p { margin: 0; }
  .pparts .pline { flex: none; margin: 0 !important; }
  .pparts .pp:has(.popts) { display: block; }
  .pparts .popts { font-size: 8.8pt; line-height: 1.3; }
  .pparts .popts span { margin-right: 8pt; white-space: nowrap; }
  .pkey { break-before: page; page-break-before: always; }
  .pk { margin: 0; padding-left: 0; list-style: none; }
  .pk > li { padding: 4pt 0 6pt; border-top: 0.75pt solid #bbb; }
  .pk h3 { font: 700 10.5pt var(--head); margin: 0 0 3pt; break-after: avoid; page-break-after: avoid; }
  .pk > li { break-before: auto; }
  .pkt { break-inside: auto; }
  /* the last table (coordinates, or the main table) and the memo rows (misclose, closing error, precision) stay together */
  .pkend { break-inside: avoid; page-break-inside: avoid; }
  .pkend .pkt { break-inside: avoid; page-break-inside: avoid; }
  .pkfig { break-inside: avoid; page-break-inside: avoid; break-after: avoid; page-break-after: avoid; margin: 0 0 2mm; }
  .pkfig svg.plot { width: auto; height: auto; max-width: 100%; }
  .pktabs table.gt th, .pktabs table.gt td { height: 5.2mm; font-size: 8.5pt; }
  .pkt { width: 100%; border-collapse: collapse; font-size: 8.6pt; margin: 3pt 0; }
  .pkt td { border-bottom: 0.5pt solid #bbb; padding: 1.5pt 4pt 1.5pt 0; vertical-align: top; }
  .pkt tr { break-inside: avoid; page-break-inside: avoid; }
  .pkt .pkq { width: 30%; }
  .pkt .pka { width: 20%; font-weight: 700; }
  .pkch { font-weight: 600; font-size: 9pt; margin: 3pt 0 1pt; break-after: avoid; page-break-after: avoid; }
  .pkc { columns: 2; column-gap: 8mm; margin: 0; padding-left: 12pt; font-size: 8.3pt; line-height: 1.28; }
  .pkc li { break-inside: avoid; }
}
