/* Engineering economy practice: an engineering computation pad. Pale green ruled paper, graphite ink, one garnet
   accent for the amount to find (the dashed arrow, the set code). DIN-style condensed headings, tabular mono figures,
   and a factor written the way it is on paper: (P/A, 8%, 6) with its table value under it. */
:root {
  --bg: #e6ede1; --paper: #f8fbf5; --ink: #1d2620; --muted: #445048; --line: #c3cfbf; --line2: #74837a;
  --grid: rgba(70, 120, 90, 0.10);
  --accent: #9a1c3c; --accent-ink: #ffffff; --accent-soft: #f5e1e6;
  --insert: #edf2e8;
  --ok: #1b6a37; --ok-soft: #ddf0e2; --bad: #a3261b; --bad-soft: #fbe4e1; --warn: #735000; --warn-soft: #f6ebcd;
  --head: Bahnschrift, "DIN Alternate", "DIN Next", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --r: 2px; --r2: 6px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131915; --paper: #1a221c; --ink: #e2eae0; --muted: #a8b6aa; --line: #34403a; --line2: #6d7d72;
    --grid: rgba(150, 200, 165, 0.07);
    --accent: #ff8fa8; --accent-ink: #2a0b14; --accent-soft: #3a1c25;
    --insert: #212b24;
    --ok: #7fd39b; --ok-soft: #16301f; --bad: #ff9b8f; --bad-soft: #3d1f1b; --warn: #efc46a; --warn-soft: #382e15;
  }
}
* { 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: 1100px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 9; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; font-weight: 700; }

/* hero */
.hero { padding: 22px 0 4px; }
.hero h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin: 0 0 8px; font-stretch: condensed; }
.lede { margin: 4px 0 0; max-width: 64ch; color: var(--muted); }

/* setup */
.setup { margin: 14px 0 10px; display: grid; gap: 10px; }
.setup fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.setup legend { font-weight: 700; margin-bottom: 4px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: flex; align-items: center; min-height: 44px; padding: 6px 14px; border: 1px solid var(--line2); background: var(--paper); border-radius: var(--r2); white-space: nowrap; }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.setrow { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.inline { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
select, input { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line2); border-radius: var(--r); }
select { min-height: 44px; padding: 6px 10px; max-width: 100%; }
.btn { font: inherit; min-height: 44px; padding: 8px 16px; border-radius: var(--r2); border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; font-weight: 600; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.small { padding: 6px 14px; }
.btn:hover { filter: brightness(0.96); }
.link { font: inherit; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 10px 4px; min-height: 44px; }
.note { margin: 8px 0; padding: 10px 12px; background: var(--warn-soft); border-radius: var(--r); }
#store-note { overflow-wrap: anywhere; }
.note.info { background: var(--paper); border: 1px solid var(--line); }
@media (max-width: 600px) {
  .hero { padding-top: 12px; }
  .setup { gap: 6px; margin-top: 8px; }
  .chips { gap: 4px; }
  #levels { display: grid; grid-template-columns: 1fr 1fr; }
  .chip span { padding: 6px 8px; white-space: normal; line-height: 1.2; }
  .sheet { padding: 12px 10px 14px; }
}

/* the sheet: computation paper */
.sheet { background-color: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 20px 20px; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px 16px; margin: 10px 0 18px; }
.sheet:focus { outline: none; }
.sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.sheet-head h2 { margin: 0; font-size: 1.35rem; }
.code { font-family: var(--mono); letter-spacing: 0.08em; color: var(--accent); }
.lvname { font-family: var(--sans); font-size: 1rem; font-weight: 400; color: var(--muted); }
.score { margin: 0; color: var(--muted); }
.rules { margin: 6px 0 2px; }
.rules summary, .work summary, .recent summary, .faq summary, .xtd > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 600; list-style: none; }
.rules summary::-webkit-details-marker, .work summary::-webkit-details-marker, .recent summary::-webkit-details-marker, .faq summary::-webkit-details-marker, .xtd > summary::-webkit-details-marker { display: none; }
.rules summary::before, .work summary::before, .recent summary::before, .faq summary::before, .xtd > summary::before { content: ""; flex: none; width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent currentColor; }
.rules[open] > summary::before, .work[open] > summary::before, .recent[open] > summary::before, .faq[open] > summary::before, .xtd[open] > summary::before { transform: rotate(90deg); }
.rules ul { margin: 4px 0 8px; padding-left: 20px; max-width: 80ch; }
.rules li { margin: 0 0 4px; }
.qs { list-style: none; margin: 0; padding: 0; }
.q { padding: 16px 0 6px; border-top: 2px solid var(--ink); margin-top: 12px; container-type: inline-size; }
.q:first-child { margin-top: 6px; }
.qhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; margin: 0 0 6px; }
.qhead .see { font-weight: 600; }
.q h3 { margin: 0; font-size: 1.25rem; display: flex; gap: 10px; align-items: baseline; }
.qn { font-family: var(--mono); color: var(--paper); background: var(--ink); border-radius: 2px; padding: 0 7px; font-size: 1rem; }
.scen { margin: 0 0 10px; max-width: 75ch; }

/* cash flow diagrams: the wide drawing in boxes of 560 px and more, the narrow one below */
.cfds { display: grid; gap: 6px 24px; margin: 0 0 10px; }
.cfdw { margin: 0; min-width: 0; }
.cfdw figcaption { font-weight: 600; color: var(--muted); }
svg.cfd { display: block; max-width: 100%; height: auto; font-family: var(--sans); font-size: 16px; }
svg.cfd.wide { display: none; }
@container (min-width: 560px) { svg.cfd.wide { display: block; } svg.cfd.narrow { display: none; } }
@container (min-width: 324px) { .q .twrap.rows.xt:not(.long) tr { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cfd .ax { stroke: var(--ink); stroke-width: 1.6; }
.cfd .tk { stroke: var(--ink); stroke-width: 1.2; }
.cfd .tn { fill: var(--muted); font-family: var(--mono); font-size: 15px; paint-order: stroke; stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round; }
.cfd line.ar { stroke: var(--ink); stroke-width: 1.8; }
.cfd path.ar { fill: var(--ink); stroke: none; }
.cfd line.ar.uk { stroke: var(--accent); stroke-dasharray: 5 3; }
.cfd path.ar.uk { fill: var(--accent); }
.cfd .lb { fill: var(--ink); font-family: var(--mono); font-size: 16px; }
.cfd .lb.uk { fill: var(--accent); font-weight: 700; }

/* tables */
.twrap { max-width: 100%; margin: 0 0 12px; }
table.dt { border-collapse: collapse; font-variant-numeric: tabular-nums; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.dt caption, .ft caption { text-align: left; font-family: var(--head); font-weight: 700; font-size: 1.05rem; padding: 0 0 4px; }
.dt th, .dt td { padding: 5px 10px; text-align: left; vertical-align: middle; font-weight: 400; }
.dt thead th { font-weight: 700; border-bottom: 1px solid var(--ink); vertical-align: bottom; }
.dt .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.dt thead th.num { font-family: var(--sans); }
.dt tbody th[scope="row"] { font-weight: 600; white-space: nowrap; }
.content .dt.facs td:last-child { font-family: var(--mono); font-size: 1rem; }

/* the factor table extract: a page from the back of the book, behind its summary line on screen */
.xtd { margin: 0 0 8px; }
.xtd > summary { font-family: var(--head); }
.xtd .ft caption { display: none; }
table.ft { border-collapse: collapse; background: var(--insert); font-variant-numeric: tabular-nums; border: 1px solid var(--line2); }
.ft th, .ft td { padding: 3px 8px; text-align: right; }
.ft td { font-family: var(--mono); }
.ft thead th { font-weight: 700; }
.ft thead tr:last-child th { border-bottom: 1px solid var(--line2); }
.ft thead th.grp { text-align: center; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.ft th.nn { text-align: right; font-family: var(--mono); font-weight: 700; }
.ft thead th.nn { font-family: var(--sans); vertical-align: bottom; border-bottom: 1px solid var(--line2); }
.ft tr.g th { text-align: left; font-weight: 700; padding-top: 6px; font-family: var(--head); }
.ft tbody + tbody tr.g th { border-top: 1px solid var(--line2); }

/* the equation, written as on paper */
.eqs-wrap { display: grid; gap: 8px; margin: 6px 0 4px; }
.eq { display: grid; gap: 6px; }
.eqrow, .eqans, .effrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.effrow { display: flex; }
.lhs { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.term { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.amt { font-family: var(--mono); white-space: nowrap; }
.op { font-family: var(--mono); color: var(--muted); }
.fx { display: inline-grid; gap: 4px; padding: 4px 8px 6px; border: 1px solid var(--line2); border-radius: var(--r2); background: var(--paper); min-width: 0; max-width: 100%; }
.fn, .fv { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-family: var(--mono); }
.fv { justify-content: flex-end; }
.nend { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.nw { white-space: nowrap; }
.br { font-size: 1.5rem; line-height: 1; color: var(--muted); }
.cm { color: var(--muted); }
.fixed { padding: 0 2px; }
.nlab, .eqs, .u, .cur { font-family: var(--mono); color: var(--muted); }
.same { font-family: var(--mono); color: var(--muted); }
.eqans { padding-top: 2px; }

input.cell { min-height: 44px; padding: 6px 8px; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; max-width: 100%; }
input.cell { width: calc(var(--w, 8) * 1ch + 22px); }
select.cell.fac { font-family: var(--mono); padding: 6px 4px 6px 8px; min-width: 5.2em; }
.cell.is-right { border-color: var(--ok); background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok); }
.cell.is-wrong, .cell.is-unread { border-color: var(--bad); background: var(--bad-soft); box-shadow: inset 0 0 0 1px var(--bad); }
.cell.is-close { border-color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn); }
.cell.is-own { border-color: var(--warn); border-style: dashed; box-shadow: inset 0 0 0 1px var(--warn); }

/* the choice of machine */
.arow { display: grid; grid-template-columns: minmax(0, 14em) minmax(0, 1fr); align-items: center; justify-content: start; gap: 4px 16px; padding: 4px 0; }
.alab { font-weight: 600; }
.aval { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-width: 0; max-width: 100%; }
.asel .aval { display: flex; width: 100%; }
.cwopts { display: flex; align-items: flex-start; gap: 6px; width: 100%; }
.cwopts .mk { align-self: flex-start; margin-top: 12px; }
.opts { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.opt { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line2); border-radius: var(--r2); background: var(--paper); cursor: pointer; min-width: 0; }
.opt input.cell { flex: none; width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; padding: 0; border: 0; background: none; box-shadow: none; accent-color: var(--ink); cursor: pointer; }
.opt span { min-width: 0; overflow-wrap: anywhere; }
.opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opts.is-right .opt:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok); }
.opts.is-wrong .opt:has(input:checked), .opts.is-unread .opt:has(input:checked) { border-color: var(--bad); background: var(--bad-soft); box-shadow: inset 0 0 0 1px var(--bad); }
.opts.is-own .opt:has(input:checked) { border-color: var(--warn); border-style: dashed; }
@media (max-width: 640px) { .arow { grid-template-columns: minmax(0, 1fr); } }
.kv { font-family: var(--mono); font-weight: 700; }

/* tables that do not fit (fit.js measures them; screen only): each row becomes a block, each value labelled with its column */
@media screen {
  .twrap.rows { width: 100%; }
  .twrap.rows table, .twrap.rows tbody { display: block; width: 100%; }
  .twrap.rows table.dt { border-bottom: 0; }
  .twrap.rows caption { display: block; }
  .twrap.rows thead { display: none; }
  .twrap.rows tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5em, 1fr)); gap: 2px 16px; padding: 6px 8px; border-bottom: 1px solid var(--line2); }
  .twrap.rows tbody th[scope="row"], .twrap.rows tr.g th { grid-column: 1 / -1; }
  .twrap.rows th, .twrap.rows td { border: 0; padding: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-width: 0; }
  .twrap.rows th { justify-content: flex-start; font-weight: 700; color: var(--ink); }
  .twrap.rows th.nn::before { content: "n = "; font-family: var(--sans); }
  .twrap.rows td::before { content: attr(data-l); font: 600 1rem var(--sans); color: var(--muted); }
  .twrap.rows.mach tr { grid-template-columns: repeat(auto-fill, minmax(13em, 1fr)); }
  /* the extract, stacked: each n a block of short cells, the factor's name over its value */
  .twrap.rows.xt tr { grid-template-columns: repeat(auto-fill, minmax(4.4em, 1fr)); gap: 2px 8px; padding: 4px 2px; }
  .twrap.rows.xt.long tr { grid-template-columns: repeat(auto-fill, minmax(6.8em, 1fr)); }
  .twrap.rows.xt td { display: grid; justify-content: start; text-align: left; gap: 0; }
  .twrap.rows.xt td::before { font-size: 1rem; line-height: 1.2; }
  .twrap.rows.xt tr.g th { font-size: 1.05rem; }
}
/* the factor list in the page text stacks on narrow screens by CSS alone */
@media screen and (max-width: 560px) {
  .content .twrap table, .content .twrap tbody { display: block; width: 100%; }
  .content .twrap caption { display: block; }
  .content .twrap thead { display: none; }
  .content .twrap tr { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
  .content .twrap th, .content .twrap td { border: 0; padding: 0; display: flex; gap: 10px; min-width: 0; }
  .content .twrap td::before { content: attr(data-l); flex: none; width: 5em; font: 600 1rem var(--sans); color: var(--muted); }
  .content .dt.facs td:last-child { font-size: 1rem; }
}

/* feedback */
.fbwrap { margin: 6px 0; }
.fbl { margin: 4px 0; padding: 0 0 0 2.2em; max-width: 78ch; }
.fb { margin: 4px 0; padding: 6px 10px; border-radius: var(--r); background: var(--bad-soft); max-width: 78ch; }
.fbl .fb::marker { font-weight: 700; }
.fb.right { background: var(--ok-soft); }
.fb.close { background: var(--warn-soft); }
.fb.own { background: var(--paper); border: 1px dashed var(--warn); }
.fb.empty { background: var(--paper); border: 1px solid var(--line); }
.cw { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; min-width: 0; }
.cw > .cell { flex: none; }
.mk { flex: none; min-width: 1.2em; font-weight: 700; font-size: 1.1rem; line-height: 1; white-space: nowrap; }
.mk:empty { min-width: 0; }
.mn { font-size: 1rem; font-family: var(--mono); }
.mk-right { color: var(--ok); }
.mk-close, .mk-own { color: var(--warn); }
.mk-wrong, .mk-unread { color: var(--bad); }
.qfoot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.work { margin: 4px 0 8px; }
.keyfig { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.kpart { min-width: 0; }
.kh { margin: 8px 0 2px; font-weight: 700; }
.kq { display: none; }
.steps { margin: 4px 0 8px; padding-left: 2.6em; font-family: var(--mono); font-size: 1rem; max-width: 92ch; }
.steps li { margin: 3px 0; overflow-wrap: anywhere; }

.sheet-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; padding-top: 10px; border-top: 2px solid var(--ink); }
.confirm { flex-basis: 100%; margin: 0; padding: 10px; background: var(--warn-soft); border-radius: var(--r); }
.save-hint { flex-basis: 100%; margin: 0; color: var(--muted); }

/* print and share */
.share { margin: 0 0 24px; }
.print-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.print-row label { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; flex-wrap: wrap; }
.share-out label { display: grid; gap: 4px; font-weight: 600; }
.share-out input { width: 100%; min-height: 44px; padding: 6px 10px; font-family: var(--mono); }
.recent { margin-top: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 12px; }
.recent ul { list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; justify-content: space-between; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding: 6px 0; }
.recent .when { display: block; color: var(--muted); }
.hint { color: var(--muted); }

/* content */
.content { max-width: 75ch; padding-bottom: 20px; }
.content h2 { font-size: 1.5rem; margin: 28px 0 8px; }
.content .dt { margin: 6px 0 10px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details p { margin: 0 0 12px; }
.sources { color: var(--muted); overflow-wrap: anywhere; }
footer { border-top: 2px solid var(--ink); padding: 18px 0 30px; color: var(--muted); }
.indep { margin: 0 0 10px; }
.sb-footer p { margin: 6px 0; }
.sb-more { line-height: 1.8; }
.sb-more a { color: var(--muted); }
.sb-credit a { color: var(--accent); }

.toast { position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 140%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r2); max-width: min(92vw, 560px); z-index: 20; pointer-events: none; transition: transform 0.2s; }
.toast.on { transform: translate(-50%, 0); }
.toast.top { top: 16px; bottom: auto; transform: translate(-50%, -140%); }
.toast.top.on { transform: translate(-50%, 0); }
@media (max-width: 600px) {
  .toast { left: 8px; right: 8px; bottom: 8px; max-width: none; text-align: center; transform: translateY(140%); }
  .toast.top { top: 8px; bottom: auto; transform: translateY(-140%); }
  .toast.on, .toast.top.on { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
[hidden] { display: none !important; }
.print-root { display: none; }

/* ---------- print ---------- */
@page { margin: 12mm; }
@media print {
  :root { --ink: #000; --muted: #333; --line: #888; --line2: #444; --paper: #fff; --bg: #fff; --accent: #000; --insert: #fff; }
  body { background: #fff; color: #000; font: 10.5pt/1.35 var(--sans); }
  main, footer, .skip, .toast { display: none !important; }
  .print-root { display: block; }
  .psheet, .pkey { break-after: page; }
  .pkey:last-child, .psheet:last-child { break-after: auto; }
  table.pt { width: 100%; border-collapse: collapse; }
  .pt > thead .prun { font-size: 10pt; color: #333; padding-bottom: 4px; border-bottom: 0.5pt solid #888; text-align: left; font-weight: 400; }
  .ph { display: flex; justify-content: space-between; align-items: baseline; gap: 6pt 12pt; flex-wrap: wrap; margin-bottom: 4pt; }
  .ph h2 { margin: 4px 0 0; font-size: 15pt; }
  .pmeta { display: flex; gap: 14pt; margin: 0; }
  .prules { margin: 4px 0 6px; padding-left: 14pt; font-size: 10pt; columns: 2; column-gap: 18pt; }
  .prules li { margin: 0 0 2px; break-inside: avoid; }
  .pq, .pk { list-style: none; margin: 0; padding: 0; }
  .pq > li { margin: 0 0 8pt; padding-top: 6pt; border-top: 1.2pt solid #000; break-inside: avoid; }
  .pk > li { margin: 0 0 8pt; padding-top: 4pt; border-top: 1pt solid #000; break-inside: avoid; }
  .pq h3, .pk h3 { font-size: 12pt; margin: 0 0 3pt; break-after: avoid; }
  .scen { margin: 0 0 4pt; max-width: none; }
  .cfds { display: grid; gap: 2pt; margin: 0 0 4pt; }
  .cfdw figcaption { font-size: 9.5pt; color: #333; }
  svg.cfd.narrow { display: none; }
  /* one scale for every diagram on paper (0.8: labels about 9.5pt), so a short diagram is not blown up */
  svg.cfd.wide { display: block; width: 496px; max-width: 100%; height: auto; }
  .cfds:has(> .cfdw + .cfdw) svg.cfd.wide { width: 430px; }
  .cfdw { break-inside: avoid; }
  /* a problem stays on one page (the tallest, compare two, fits a page under the running header) */
  .pq .scen, .pq .mach { break-after: avoid; }
  .eqs-wrap, .eq, .fx, .eqrow, .eqans, .asel, .kpart .steps li { break-inside: avoid; }
  .cfd .tn, .cfd .lb { fill: #000; }
  .cfd line.ar.uk { stroke: #000; }
  .cfd path.ar.uk { fill: #000; }
  .twrap { break-inside: avoid; margin: 0 0 4pt; }
  table.dt { font-size: 10pt; border-top: 1.2pt solid #000; border-bottom: 1.2pt solid #000; }
  .dt caption, .ft caption { font-size: 10pt; padding-bottom: 2pt; }
  .dt th, .dt td { padding: 1.5pt 7pt; }
  table.ft { font-size: 10pt; border: 0.75pt solid #000; }
  .ft th, .ft td { padding: 0 5pt; line-height: 1.2; }
  .ft tr.g th { padding-top: 1pt; }
  .eqs-wrap { gap: 3pt; margin: 4pt 0 0; }
  .eq { gap: 4pt; }
  .fx { border: 0.75pt solid #000; padding: 2pt 5pt 3pt; gap: 3pt; }
  .pblank { display: inline-block; border-bottom: 0.75pt solid #000; height: 16pt; vertical-align: bottom; }
  .eqans .pblank { border: 0.75pt solid #000; height: 18pt; }
  .br { font-size: 13pt; }
  .arow.asel { display: flex; align-items: baseline; gap: 6pt 14pt; flex-wrap: wrap; padding: 2pt 0 0; }
  .psheet .arow.asel .alab::after { content: " (circle one)"; font-weight: 400; color: #333; }
  .popts { display: flex; gap: 4pt 22pt; margin: 0; padding-left: 0; list-style: upper-alpha inside; }
  .keyfig { display: block; }
  .kh { margin: 2pt 0 1pt; font-size: 10pt; }
  .steps { font-size: 10pt; margin: 0; padding-left: 26pt; max-width: none; }
  .kq { display: inline; }
  .steps li { margin: 0.5pt 0; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
