/* Earthwork Practice: a highway plan sheet. Near-white drafting film with heavy black title-block rules, condensed
   bold headings like a DOT sheet title, construction yellow for the chosen options and main actions, earth brown
   for cut and olive green for fill, and numbers in a monospace so the earthwork columns line up. Black on white
   with ruled blanks on paper. */
:root {
  --bg: #f3f3ef;
  --paper: #ffffff;
  --ink: #17170f;
  --muted: #4d4c43;
  --line: #d6d5cc;
  --edge: #6f6e64;
  --accent: #f2b705;
  --accent-ink: #17170f;
  --accent-soft: #fdf1c7;
  --act: #17170f;
  --info: #1d55a0;
  --ok: #17663a;
  --ok-soft: #dcefe2;
  --close: #7a5300;
  --close-soft: #f6ebd2;
  --bad: #a2261f;
  --bad-soft: #f8e1de;
  --focus: #1b5fd0;
  --rule: #c9c8bd;
  --margin: #17170f;
  --thead: #ecebe3;
  --void: #ecebe5;
  --grid: #dcdcd2;
  --cut: #8a4b1f;
  --cut-soft: #e9cdb4;
  --fill: #4f6b22;
  --fill-soft: #d5e2bd;
  --grade: #1d55a0;
  --curve: #17170f;
  --over: #b23a1d;
  --head: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", "Liberation Sans Narrow", Arial, sans-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: 2px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16150f;
    --paper: #201f18;
    --ink: #ecebe2;
    --muted: #b1afa2;
    --line: #34332a;
    --edge: #7a786b;
    --accent: #f5c02b;
    --accent-ink: #1a1500;
    --accent-soft: #3a3010;
    --act: #ecebe2;
    --info: #8cbcf0;
    --ok: #8adca6;
    --ok-soft: #14301f;
    --close: #f0c56b;
    --close-soft: #352a12;
    --bad: #ff9c8f;
    --bad-soft: #3a1c18;
    --focus: #8ab8ff;
    --rule: #3b3a30;
    --margin: #ecebe2;
    --thead: #2a2920;
    --void: #25241c;
    --grid: #2f2e26;
    --cut: #e3a274;
    --cut-soft: #4a3020;
    --fill: #b4cf82;
    --fill-soft: #2f3a1c;
    --grade: #8cbcf0;
    --curve: #ecebe2;
    --over: #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 6px; max-width: 900px; border-bottom: 5px solid var(--ink); margin-bottom: 4px; }
h1 { font: 700 clamp(1.85rem, 5.6vw, 2.75rem)/1.04 var(--head); font-stretch: condensed; margin: 0 0 8px; letter-spacing: -0.01em; }
.lede { margin: 0 0 12px; color: var(--muted); max-width: 70ch; }
h2 { font: 700 1.36rem/1.2 var(--head); font-stretch: condensed; margin: 0 0 10px; }

.tool { display: flex; flex-direction: column; }
.setup { order: 1; margin: 8px 0 4px; padding-top: 6px; }
.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(--muted); }
.sg input:checked + span { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 -4px 0 var(--act); }
.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: 4px 16px; grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 560px) { .setgrid { grid-template-columns: minmax(0, 1fr) auto; } }
.setgrid fieldset { margin: 0; }
.rules { margin: 8px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rules > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.rulegrid { display: grid; gap: 8px 14px; grid-template-columns: minmax(0, 1fr); padding: 0 0 10px; }
@media (min-width: 700px) { .rulegrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rulegrid label { display: flex; flex-direction: column; gap: 3px; font-size: 0.9rem; font-weight: 600; }
.rulegrid label.unused { color: var(--muted); font-weight: 500; }
.rulegrid select { width: 100%; }
.lvhint { margin: 5px 0 0; font-size: 0.9rem; 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(--act); }
.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: 2px solid var(--ink); max-width: 560px; font-size: 0.92rem; }
.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; background: var(--accent); color: var(--accent-ink); padding: 0 5px; }
.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.22rem/1.25 var(--head); font-stretch: condensed; margin: 0 0 4px; }
.q h3 .qn { margin-right: 6px; }
.q .scen { margin: 0 0 6px; max-width: 75ch; }
.qfig { margin: 0 0 8px; }
.fig-sections .figview { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.secwrap { flex: 1 1 300px; max-width: 420px; min-width: 0; }
.fig-profile, .fig-mass { max-width: 720px; }
.zoom { flex: none; background: transparent; }
@media (min-width: 900px) { .zoom { display: none; } }

/* drawings: cross sections, profile, mass diagram */
svg.xsec, svg.prof, svg.mass { display: block; width: 100%; height: auto; background: var(--paper); border: 1px solid var(--line); }
.xsec .xg, .prof .pgd, .mass .mg { stroke: var(--grid); stroke-width: 0.2; }
.xsec .xcut { fill: var(--cut-soft); stroke: none; }
.xsec .xfill { fill: var(--fill-soft); stroke: none; }
.xsec .xground { fill: none; stroke: var(--cut); stroke-width: 0.5; stroke-linejoin: round; }
.xsec .xtempl { fill: none; stroke: var(--ink); stroke-width: 0.7; stroke-linejoin: round; }
.xsec .xcl { stroke: var(--muted); stroke-width: 0.25; stroke-dasharray: 1.6 0.8 0.4 0.8; }
.xsec .xcll { font: 600 2.3px var(--sans); fill: var(--muted); text-anchor: middle; }
.xsec .xpt { fill: var(--ink); }
.xsec .xh { font: 600 2.3px var(--sans); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: var(--paper); stroke-width: 0.6px; }
.xsec .xo { font: 2.2px var(--mono); fill: var(--ink); text-anchor: middle; }
.xsec .xo.xq { font: 700 2.8px var(--sans); fill: var(--over); }
.xsec .xnote { font: 1.9px var(--sans); fill: var(--muted); text-anchor: end; }
.xsec .xst { font: 700 2.6px var(--sans); fill: var(--ink); }
.prof .pcut { fill: var(--cut-soft); }
.prof .pfill { fill: var(--fill-soft); }
.prof .pground { fill: none; stroke: var(--cut); stroke-width: 0.5; }
.prof .pgrade { stroke: var(--grade); stroke-width: 0.6; }
.prof .ptick { stroke: var(--ink); stroke-width: 0.25; }
.prof .psta { font: 2.9px var(--sans); fill: var(--ink); text-anchor: middle; }
.prof .pc { font: 600 2.9px var(--sans); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: var(--paper); stroke-width: 0.5px; }
.prof .pel { font: 2.7px var(--sans); fill: var(--muted); text-anchor: end; }
.prof .pnote { font: 2.6px var(--sans); fill: var(--muted); text-anchor: end; }
.mass .mgl { font: 2.9px var(--sans); fill: var(--muted); text-anchor: end; }
.mass .mbal { stroke: var(--ink); stroke-width: 0.45; }
.mass .mcurve { fill: none; stroke: var(--curve); stroke-width: 0.6; stroke-linejoin: round; }
.mass .mpt { fill: var(--curve); }
.mass .mbp { fill: var(--paper); stroke: var(--over); stroke-width: 0.4; }
.mass .mbl { font: 600 2.9px var(--sans); fill: var(--over); text-anchor: start; paint-order: stroke; stroke: var(--paper); stroke-width: 0.5px; }
.mass .mover { fill: color-mix(in srgb, var(--over) 28%, transparent); stroke: none; }
.mass .mfree { fill: color-mix(in srgb, var(--fill) 22%, transparent); stroke: none; }
.mass .mchord { stroke: var(--over); stroke-width: 0.5; }
.mass .mcl { font: 600 2.9px var(--sans); fill: var(--over); text-anchor: middle; paint-order: stroke; stroke: var(--paper); stroke-width: 0.5px; }
.mass .mend { stroke: var(--grade); stroke-width: 0.6; stroke-dasharray: 1 0.6; }
.mass .mel { font: 600 2.9px var(--sans); fill: var(--grade); text-anchor: end; }
.mass .msta { font: 2.8px var(--sans); fill: var(--ink); text-anchor: middle; }
.mass .mnote { font: 2.6px 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: collapse; 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.c-st { font-family: var(--mono); font-size: 0.92rem; }
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); }
table.gt .num { font-family: var(--mono); text-align: right; font-size: 0.93rem; }
table.gt td.blank { padding: 0 2px; }
table.gt td.blank input { width: 6.8em; 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.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.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(--info); }
@media (max-width: 760px) {
  table.gt th, table.gt td { padding: 0 4px; }
  table.gt td.blank input { width: 6.2em; }
  .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 key's drawing */
.keyfig { margin: 6px 0 8px; }
.figview { overflow: hidden; }
.qs.zoomed .figview { overflow-x: auto; }
.qs.zoomed .figview > svg { width: 200%; max-width: none; }
.qs.zoomed .fig-sections .figview { flex-wrap: nowrap; }
.qs.zoomed .secwrap { flex: none; width: 200%; max-width: none; }
@media (min-width: 900px) { .qs.zoomed .figview > svg { width: 100%; } .qs.zoomed .figview { overflow: hidden; } .qs.zoomed .secwrap { width: auto; flex: 1 1 300px; max-width: 420px; } .qs.zoomed .fig-sections .figview { flex-wrap: wrap; } }

/* 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: #cfcfcf; --accent: #000; --accent-ink: #fff; --info: #000; --cut: #6b3a14; --cut-soft: #ead7c6; --fill: #3f561a; --fill-soft: #dfe8cf;
    --grade: #1d4f91; --curve: #000; --over: #9a2f15; }
  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; margin-top: 4pt; }
  .prulebox.ptop { border-top: 0; padding-top: 0; margin: 0 0 4pt; border-bottom: 0.75pt solid #999; padding-bottom: 3pt; }
  .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; }
  .pq h3 { font: 700 11.5pt var(--head); margin: 0 0 2pt; }
  .pq .pscen { margin: 0 0 3pt; font-size: 9.2pt; line-height: 1.3; }
  .psheet table.gt th, .psheet table.gt td { height: 5.2mm; }
  .pfig { margin: 1mm 0 2mm; break-inside: avoid; page-break-inside: avoid; }
  .pfig.fig-sections, .pkfig.fig-sections { display: flex; gap: 4mm; align-items: flex-start; }
  .pfig svg, .pkfig svg { border: 0.6pt solid #aaa; max-width: 100%; height: auto; }
  .pfig.fig-sections svg, .pkfig.fig-sections svg { width: auto; flex: none; } /* drawn for paper: true scale */
  .pfig.fig-sections .secwrap, .pkfig.fig-sections .secwrap { flex: none; max-width: none; }
  .pfig.fig-profile svg { width: 104mm; }
  .pfig .prof .psta, .pfig .prof .pc { font-size: 3.5px; }
  .pfig .prof .pel, .pfig .prof .pnote { font-size: 3.1px; }
  .pfig.fig-mass svg, .pkfig.fig-mass svg { width: auto; }
  .pside { display: flex; gap: 5mm; align-items: flex-start; break-inside: avoid; page-break-inside: avoid; }
  .pside .pfig.fig-mass svg { width: auto; }
  .pside .pfig { flex: none; }
  .pside .tblock { margin-top: 1mm; }
  .pside table.gt th, .pside table.gt td { height: 4.6mm; font-size: 8.5pt; }
  .pside table.cols-2 { min-width: 50mm; }
  .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: 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; }
  table.gt thead th.c-st { width: 18mm; }
  table.gt thead th.c-pt { width: 30mm; }
  table.cols-2, table.cols-3 { width: auto; min-width: 90mm; }
  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; }
  .code { background: none; padding: 0; }
  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; }
  .pkfig { break-inside: avoid; page-break-inside: avoid; break-after: avoid; page-break-after: avoid; margin: 0 0 2mm; }
  .pkfig { margin: 0 0 2mm; }
  .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; }
}
