/* Generated by tools/i18n/build.py (rtlcss@4.3.0) from data.css for the Arabic pages: left and right exchanged. Do not edit; edit the English stylesheet and run the generator. */
/* Numa Koudsie · data panel (scripts/datalog.js)
   A bookkeeper's ledger of every number a simulation computes: the headline numbers with sparklines, a toolbar,
   one table in causal sections (values aligned on the decimal point), the books that must balance, a recorder
   for one round, the three-way check.
   Uses the site tokens from sim.css; colours missing from older copies of sim.css have fallbacks. */

:root { --dp-w: 600px; }
@media (min-width: 1500px) { :root { --dp-w: 640px; } }

/* ---------- the "Data" tab on the right edge ---------- */
.dp-tab {
  position: fixed; left: 0; top: 50%; z-index: 40; transform: translateY(-50%);
  display: flex; align-items: center; gap: 10px; padding: 18px 10px;
  writing-mode: vertical-rl;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: #fff; background: var(--accent); border: 0; border-radius: 0 10px 10px 0;
  box-shadow: var(--shadow); cursor: pointer; transition: background var(--dur-s) var(--ease), padding var(--dur-s) var(--ease);
}
.dp-tab:hover { background: var(--accent-dark); padding-left: 13px; }
.dp-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dp-tab svg { flex-shrink: 0; }
.dp-open .dp-tab { display: none; }

/* ---------- the panel ---------- */
.dp {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  width: var(--dp-w); max-width: 100vw;
  display: flex; flex-direction: column;
  background: var(--card); color: var(--ink);
  border-right: 1px solid var(--rule);
  box-shadow: 24px 0 48px -36px rgba(28, 21, 24, .55);
  transform: translateX(-100%); visibility: hidden;
  transition: transform var(--dur) var(--ease), visibility 0s var(--dur);
  font-size: 15px; line-height: 1.5;
  container: dp / inline-size;
}
.dp-open .dp { transform: none; visibility: visible; transition: transform var(--dur) var(--ease); }
.dp sub, .dp sup { font-size: 70%; }

.dp__head { padding: 14px 20px 10px; }
.dp__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.dp__kicker { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.dp__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.08; letter-spacing: -.015em; color: var(--ink); }
.dp__dot { color: var(--accent); }
.dp__sub { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-3); }
.dp__tools { display: flex; align-items: center; gap: 8px; }
.dp__state { margin-left: 4px; display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.dp__state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--rule); }
.dp__state.is-live, .dp__state.is-recording { color: var(--accent); }
.dp__state.is-live::before, .dp__state.is-recording::before { background: var(--accent); animation: dp-pulse 1.4s ease-in-out infinite; }
@keyframes dp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.dp__icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; color: var(--ink-3); background: transparent; border: 1px solid var(--rule); border-radius: 9px; cursor: pointer; transition: color .2s ease, border-color .2s ease; }
.dp__icon:hover { color: var(--accent); border-color: var(--accent); }
.dp__icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- the headline: the numbers the animation is about ---------- */
.dp-hl { padding: 0 20px 10px; }
.dp-hl__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.dp-hl__i { min-width: 0; padding: 7px 10px 5px; background: var(--card-soft); border: 1px solid var(--rule); border-radius: 10px; }
.dp-hl__k { display: flex; align-items: baseline; gap: 7px; margin: 0; min-width: 0; }
.dp-hl__k .dp-sym { font-size: 18px; }
.dp-hl__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
.dp-hl__v { margin: 1px 0 0; white-space: nowrap; }
.dp-hl__v b { font-family: var(--mono); font-size: 19px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.dp-hl__sp { display: block; width: 100%; height: 24px; margin-top: 2px; }
.dp-bk { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; width: 100%; margin-top: 8px; padding: 7px 11px; font-family: var(--sans); font-size: 13.5px; text-align: right; color: var(--ink-2); background: var(--card); border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; }
.dp-bk:hover { border-color: var(--accent); }
.dp-bk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dp-bk > b { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.dp-bk span { display: inline-flex; align-items: center; gap: 5px; }
.dp-bk span.is-ok svg { color: var(--tan-ink); }
.dp-bk span.is-bad { color: var(--accent); font-weight: 600; }
.dp-bk span.is-na { color: var(--muted); }
.dp-bk i { font-family: var(--mono); font-size: 12px; font-style: normal; color: var(--ink-3); }
.dp-bk em { font-size: 12px; font-style: normal; color: var(--muted); }

/* ---------- the toolbar: Record, Read values, Live, Catch now, Save ---------- */
.dp-rec { margin: 0 20px 10px; }
.dp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dp-tool { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--accent); background: var(--card); border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.dp-tool[hidden] { display: none; }
.dp-tool:hover { border-color: var(--accent); }
.dp-tool:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dp-tool[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.dp-tool--rec { color: #fff; background: var(--accent); border-color: var(--accent); }
.dp-tool--rec:hover { background: var(--accent-dark); }
.dp-rec__dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.dp-rec.is-rec .dp-tool--rec { color: var(--accent); background: var(--card); }
.dp-rec.is-rec .dp-rec__dot { border-radius: 2px; background: var(--accent); }
.dp-rec__what { margin: 7px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.dp-rec__what b { font-weight: 600; color: var(--ink-2); }
.dp-rec__prog { margin-top: 8px; }
.dp-rec__prog[hidden] { display: none; }
.dp-rec__bar { height: 7px; overflow: hidden; background: var(--card); border: 1px solid var(--rule); border-radius: 99px; }
.dp-rec__bar i { display: block; width: 0; height: 100%; background: repeating-linear-gradient(45deg, var(--accent) 0 8px, var(--accent-dark) 8px 16px); border-radius: 99px; transition: width .12s linear; }
.dp-rec__st { margin: 6px 0 0; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dp-rec__st b { font-family: var(--sans); color: var(--accent); }

/* ---------- tabs ---------- */
.dp__tabs { display: flex; gap: 8px; padding: 0 20px; border-bottom: 1px solid var(--rule); }
.dp__tabs button { margin: 0 0 -1px 18px; padding: 6px 2px 9px; font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--ink-3); background: none; border: 0; border-bottom: 2.5px solid transparent; cursor: pointer; }
.dp__tabs button:hover { color: var(--accent); }
.dp__tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.dp__tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dp__count { margin-right: 6px; padding: 1px 8px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); background: #f0eae0; border-radius: 9px; }

.dp__body { position: relative; flex: 1; min-height: 0; }
.dp__pane { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; }
.dp__pane[hidden] { display: none; }

/* ---------- buttons ---------- */
.dp-btn { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; padding: 7px 14px; font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--accent); background: var(--card); border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.dp-btn:hover { border-color: var(--accent); }
.dp-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dp-btn--solid { color: #fff; background: var(--accent); border-color: var(--accent); }
.dp-btn--solid:hover { background: var(--accent-dark); }
.dp-back { padding: 7px 13px; font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--accent); background: transparent; border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; }
.dp-back:hover { border-color: var(--accent); }
.dp-chk { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 28px; height: 28px; padding: 0; color: var(--ink-3); background: var(--card); border: 1px solid var(--rule); border-radius: 50%; cursor: pointer; vertical-align: middle; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.dp-chk:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.dp-chk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dp-chk.is-ok { color: var(--tan-ink); background: var(--tan); border-color: #e3cfa3; }
.dp-chk.is-bad { color: #fff; background: var(--accent); border-color: var(--accent); }
.dp-chk.is-in, .dp-chk.is-na { color: var(--muted); border-style: dashed; }
.dp-chk--text { width: auto; height: 30px; padding: 0 12px; margin-right: 10px; font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--accent); border-radius: 8px; }
.dp-live { display: inline-flex; align-items: center; gap: 8px; padding: 0 4px; font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; user-select: none; }
.dp-live input { appearance: none; -webkit-appearance: none; position: relative; width: 36px; height: 21px; margin: 0; background: var(--rule); border-radius: 99px; cursor: pointer; transition: background .2s ease; }
.dp-live input::after { content: ''; position: absolute; right: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 2px rgba(28, 21, 24, .3); transition: right .2s ease; }
.dp-live input:checked { background: var(--accent); }
.dp-live input:checked::after { right: 18px; }
.dp-live input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- the ledger: the instant, the pinned point, the table ---------- */
.dp-instant { margin: 0; padding: 9px 20px; font-size: 13px; line-height: 1.45; color: var(--ink-3); border-bottom: 1px solid var(--rule-soft); }
.dp-instant b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.dp-probe { padding: 12px 20px; background: var(--card-soft); border-bottom: 1px solid var(--rule); }
.dp-probe[hidden] { display: none; }
.dp-probe__label { margin: 0 0 4px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.dp-probe__title { margin: 0 0 6px; font-family: var(--tex); font-style: italic; font-size: 16px; line-height: 1.35; color: var(--ink); }
.dp-probe__title span { font-family: var(--mono); font-style: normal; font-size: 12px; color: var(--muted); }
.dp-probe__table { border-collapse: collapse; }
.dp-probe__table th { padding: 2px 0 2px 18px; text-align: right; font-family: var(--tex); font-style: italic; font-weight: 400; font-size: 16px; color: var(--ink-2); white-space: nowrap; }
.dp-probe__table td { padding: 2px 0 2px 12px; font-family: var(--mono); font-size: 14px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dp-probe__table td:last-child { padding-left: 0; }
.dp-probe__table .dp-chk { width: 26px; height: 26px; }

.dp-sym { font-family: var(--tex); font-style: italic; font-size: 19px; line-height: 1.2; color: var(--ink); }
.dp-u { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.dp-sw { display: inline-block; width: 13px; height: 13px; margin: 0 0 -1px 8px; border: 1px solid var(--rule); border-radius: 3px; vertical-align: baseline; }

.dp-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.dp-tbl > thead > tr > th[scope] { position: sticky; top: 0; z-index: 3; padding: 8px 6px 6px; font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; text-align: right; white-space: nowrap; color: var(--muted); background: var(--card); box-shadow: inset 0 -1px 0 var(--rule); }
/* numbers read left to right in every language, so their alignment is not mirrored on Arabic pages */
.dp-tbl > thead > tr > th.c-val, .dp-tbl > thead > tr > th.c-d { text-align: right; }
.dp-tbl th, .dp-tbl td { padding: 6px 5px; vertical-align: baseline; }
.dp-tbl .c-sym { width: 1%; min-width: 2.2em; padding-right: 18px; text-align: right; font-weight: 400; }
.dp-tbl tbody .c-sym .dp-sym { display: inline-block; max-width: 5em; font-size: 18px; }
.dp-tbl .c-mean { font-size: 13px; line-height: 1.35; color: var(--ink-3); -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; }
.dp-f { display: block; margin-top: 2px; font-family: var(--tex); font-style: italic; font-size: 14px; color: var(--ink-2); }
.dp-shape { display: block; margin-top: 2px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.dp-tbl .c-val, .dp-book__t .c-val { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 14.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.vf { display: inline-block; min-width: var(--frac, 5ch); text-align: left; }
.vi.is-word { display: inline-block; max-width: 9em; white-space: normal; text-align: right; font-family: var(--sans); font-size: 13.5px; line-height: 1.3; }
.vi.is-word + .vf, .vi.is-html + .vf { display: none; }
.dp-tbl .c-unit, .dp-book__t .c-unit { width: 1%; white-space: nowrap; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.dp-tbl .c-d { width: 1%; min-width: 4.5em; text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dp-tbl .c-d.is-up { color: var(--accent); }
.dp-tbl .c-d.is-dn { color: var(--tan-ink); }
.dp-tbl .c-how { width: 1%; white-space: nowrap; }
.dp-how { display: inline-block; padding: 1px 7px; font-family: var(--mono); font-size: 10.5px; line-height: 1.6; color: var(--ink-3); background: #f0eae0; border-radius: 4px; }
.dp-how--set { color: var(--accent-dark); background: var(--accent-rose); }
.dp-how--formula { color: var(--tan-ink); background: var(--tan); }
.dp-how--run { color: var(--ink-2); background: var(--rule-soft); }
.dp-tbl .c-chk { width: 1%; padding-left: 16px; text-align: center; }
.dp-tbl tr.dp-r > * { border-bottom: 1px solid var(--rule-soft); transition: background .3s ease; }
.dp-tbl tr.dp-r--arr { cursor: pointer; }
.dp-tbl tr.dp-r--arr:hover > *, .dp-tbl tr.dp-r--arr:focus-visible > * { background: var(--card-soft); }
.dp-tbl tr.dp-r--arr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dp-tbl tr.is-open > * { background: var(--card-soft); border-bottom-color: transparent; }
.dp-spk { display: inline-block; width: 72px; height: 22px; vertical-align: middle; }
.dp-cur { display: block; font-size: 12px; color: var(--ink-3); }
.dp-exp { display: inline-block; font-family: var(--sans); font-size: 20px; line-height: 1; color: var(--accent); transition: transform var(--dur) var(--ease); }
tr.is-open .dp-exp { transform: rotate(-90deg); }
/* a row that starts to change blinks once; one that keeps changing shows only its Δ */
.dp-tbl tr.is-blink0 > * { animation: dp-blink-a .9s ease-out; }
.dp-tbl tr.is-blink1 > * { animation: dp-blink-b .9s ease-out; }
@keyframes dp-blink-a { from { background: rgba(122, 31, 43, .13); } to { background: transparent; } }
@keyframes dp-blink-b { from { background: rgba(122, 31, 43, .13); } to { background: transparent; } }
/* cause and effect: the input that moved, and every row that depends on it */
.dp-tbl tr.is-cause > * { background: rgba(122, 31, 43, .14); }
.dp-tbl tr.is-cause > .c-sym { box-shadow: inset -3px 0 0 var(--accent); }
.dp-tbl tr.is-effect > * { background: var(--tan); }
.dp-tbl tbody.is-effect .dp-sec__hd th { background: var(--tan); }

.dp-sec__hd th { padding: 16px 20px 6px 16px; text-align: right; background: var(--card); border-bottom: 1px solid var(--accent); }
.dp-sec__btn { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 0; font: inherit; text-align: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.dp-sec__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.dp-sec__n { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--accent); }
.dp-sec__t { font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
.dp-sec__c { margin-right: auto; font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--muted); }
.dp-sec__ar { font-size: 15px; color: var(--accent); transition: transform var(--dur) var(--ease); }
.dp-sec.is-folded .dp-sec__ar { transform: rotate(90deg); }
.dp-sec__note { margin: 2px 0 0; font-size: 13px; font-weight: 400; line-height: 1.4; color: var(--muted); }
.dp-sec.is-folded tr:not(.dp-sec__hd) { display: none; }
/* a section of the table that opens: its rows rise in one after another; one that closes fades its rows first (datalog.js).
   An opened row's detail rises in the same way. */
.dp-sec tr:not(.dp-sec__hd) { transition: opacity var(--dur-s) var(--ease); }
.dp-sec.is-closing tr:not(.dp-sec__hd) { opacity: 0; }
.dp-sec.is-rising tr:not(.dp-sec__hd) { animation: m-rise var(--rise-dur) var(--ease) both; animation-delay: calc(var(--i, 0) * var(--rise-step) + var(--rise-wait)); }
.dp-x__in, .dp-dt__in { animation: m-rise var(--rise-dur) var(--ease) both; }
.dp-sec.is-folded .dp-sec__hd th { border-bottom-color: var(--rule); }

.dp-x > td, .dp-dt > td { padding: 0; border-bottom: 1px solid var(--rule); }
.dp-x__in, .dp-dt__in { padding: 10px 20px 14px; background: var(--card-soft); }
.dp-x__mean { margin: 0 0 4px; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }
.dp-x__mean em { color: var(--muted); }
.dp-x .dg { height: 300px; margin-top: 10px; border: 1px solid var(--rule); border-radius: 8px; }
.dp-x .dp-arr__probe { padding: 10px 0 0; border-top: 0; }
.dp-dt__in p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }
.dp-dt__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.dp-dt__row code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.dp-dt__row .dp-chk--text { margin-right: auto; }

/* ---------- the books ---------- */
.dp-books { padding: 22px 20px 28px; border-top: 1px solid var(--accent); }
.dp-books__hd h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.2; color: var(--ink); }
.dp-books__hd p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.dp-book { margin: 14px 0 0; padding: 12px 14px 14px; background: var(--card-soft); border: 1px solid var(--rule); border-radius: 10px; }
.dp-book figcaption h4 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 19px; line-height: 1.2; color: var(--ink); }
.dp-book figcaption p { margin: 2px 0 8px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.dp-book__t { width: 100%; border-collapse: collapse; }
.dp-book__t th, .dp-book__t td { padding: 5px 6px; vertical-align: baseline; border-bottom: 1px solid var(--rule-soft); }
.dp-book__t .c-sym { width: 1%; padding-right: 0; text-align: right; white-space: nowrap; font-weight: 400; }
.dp-book__t .c-mean { font-size: 13px; line-height: 1.35; color: var(--ink-3); }
.dp-book__t .b-sg { width: 1.2em; padding-right: 0; padding-left: 2px; font-family: var(--mono); font-size: 16px; color: var(--accent); }
.dp-book__t .b-total > * { border-top: 1.5px solid var(--ink); border-bottom: 0; }
.dp-book__t .b-total .c-val { font-weight: 600; }
.dp-book__res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 0; }
.dp-book__res div { min-width: 0; padding: 6px 9px; background: var(--card); border: 1px solid var(--rule-soft); border-radius: 7px; }
.dp-book__res dt { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.dp-book__res dd { margin: 2px 0 0; font-family: var(--mono); font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.dp-book__v { display: block; margin: 10px 0 0; padding: 9px 12px; font-size: 14px; line-height: 1.45; border-radius: 8px; }
.dp-book__v svg { margin-bottom: -1px; }
.dp-book__v.is-ok { color: var(--ink); background: var(--tan); border: 1px solid #e3cfa3; }
.dp-book__v.is-bad { color: #fff; background: var(--accent); }
.dp-book__v.is-na { color: var(--ink-3); background: var(--card); border: 1px dashed var(--rule); }

/* ---------- an array opened in place: its statistics, the copy, the virtual table ---------- */
.dp-arr__top { padding: 14px 24px 14px; border-bottom: 1px solid var(--rule); }
.dp-arr__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.dp-arr__stats div { min-width: 0; padding: 7px 10px; background: var(--card-soft); border: 1px solid var(--rule-soft); border-radius: 8px; }
.dp-arr__stats .wide { grid-column: span 3; }
.dp-arr__stats dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dp-arr__stats dd { margin: 2px 0 0; font-family: var(--mono); font-size: 14px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.dp-arr__snap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 12px; }
.dp-arr__when { margin: 0; font-size: 14px; color: var(--ink-3); }
.dp-arr__when b { font-weight: 600; color: var(--ink); }
.dp-arr__probe { margin: 0; min-height: 48px; padding: 12px 24px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.dp-arr__probe b { font-family: var(--tex); font-style: italic; font-weight: 400; font-size: 17px; color: var(--accent); }
.dp-arr__probe span { display: block; color: var(--muted); }

.dg { position: relative; flex: 1; min-height: 0; overflow: auto; font-family: var(--mono); font-size: 13px; background: var(--card); overscroll-behavior: contain; }
.dg:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dg__top { position: sticky; top: 0; z-index: 3; display: flex; width: max-content; min-width: 100%; }
.dg__corner { position: sticky; right: 0; z-index: 4; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 11px; letter-spacing: .08em; color: var(--muted); background: #f0eae0; border-left: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.dg__cols { position: relative; flex: 0 0 auto; background: var(--card-soft); border-bottom: 1px solid var(--rule); }
.dg__main { display: flex; width: max-content; }
.dg__rows { position: sticky; right: 0; z-index: 2; flex: 0 0 auto; background: var(--card-soft); border-left: 1px solid var(--rule); }
.dg__cells { position: relative; flex: 0 0 auto; }
.dg__h { position: absolute; top: 0; height: 100%; display: flex; align-items: center; justify-content: flex-end; padding: 0 9px; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.dg__h--row { right: 0; left: 0; height: auto; }
.dg__c { position: absolute; display: flex; align-items: center; justify-content: flex-end; padding: 0 8px; white-space: nowrap; overflow: hidden; color: var(--ink); font-variant-numeric: tabular-nums; box-shadow: inset 1px -1px 0 rgba(28, 21, 24, .08); cursor: crosshair; }
.dg__c.is-hot { z-index: 1; box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- Check view ---------- */
.dp-check { overflow: auto; }
.dp-check__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dp-check__body { padding: 4px 24px 28px; }
.dp-check__hd { margin: 14px 0 16px; }
.dp-check__hd .dp-sym { font-size: 30px; }
.dp-check__hd p { margin: 6px 0 0; font-size: 15px; color: var(--ink-3); }
.dp-check__hd .dp-check__when { font-size: 13.5px; color: var(--muted); }
.dp-check__sec { padding: 16px 0 18px; border-top: 1px solid var(--rule-soft); }
.dp-check__sec h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.dp-check__sec h4 span { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; font-size: 12.5px; letter-spacing: 0; color: #fff; background: var(--accent); border-radius: 50%; }
.dp-check__big { margin: 6px 0 12px; font-family: var(--mono); font-size: 24px; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dp-check__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.dp-check__meta div { min-width: 0; padding: 8px 11px; background: var(--card-soft); border: 1px solid var(--rule-soft); border-radius: 8px; }
.dp-check__meta .wide { grid-column: 1 / -1; }
.dp-check__meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dp-check__meta dd { margin: 3px 0 0; font-family: var(--mono); font-size: 14px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.dp-check__formula { margin: 0 0 12px; padding: 10px 14px; font-family: var(--tex); font-style: italic; font-size: 19px; color: var(--ink); background: var(--card-soft); border-right: 3px solid var(--accent); border-radius: 8px 0 0 8px; }
.dp-check__in { border-collapse: collapse; margin: 0 0 8px; }
.dp-check__in th { padding: 4px 0 4px 18px; text-align: right; font-family: var(--tex); font-style: italic; font-weight: 400; font-size: 17px; color: var(--ink-2); }
.dp-check__in td { padding: 4px 0 4px 12px; font-family: var(--mono); font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.dp-check__in td:last-child { color: var(--muted); font-size: 13px; }
.dp-check__verdict { display: flex; align-items: flex-start; gap: 9px; margin: 12px 0 0; padding: 11px 14px; font-size: 15px; line-height: 1.45; border-radius: 8px; }
.dp-check__verdict svg { flex-shrink: 0; margin-top: 4px; }
.dp-check__verdict.is-ok { color: var(--ink); background: var(--tan); border: 1px solid #e3cfa3; }
.dp-check__verdict.is-bad { color: #fff; background: var(--accent); }
.dp-check__verdict.is-na { color: var(--ink-3); background: var(--card-soft); border: 1px dashed var(--rule); }
.dp-check__note { margin: 10px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-3); }

/* ---------- Rounds ---------- */
.dp-empty { padding: 28px 24px; }
.dp-empty__k { margin: 0 0 6px; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.dp-empty h3 { margin: 0 0 10px; font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.2; }
.dp-empty p { margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: var(--ink-3); }
.dp-rd { padding: 16px 24px 28px; }
.dp-rd__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dp-chip { padding: 6px 13px; font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink-3); background: var(--card); border: 1px solid var(--rule); border-radius: 99px; cursor: pointer; }
.dp-chip:hover { border-color: var(--accent); color: var(--accent); }
.dp-chip.is-on { color: #fff; background: var(--ink); border-color: var(--ink); }
.dp-rd__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.dp-rd__hd h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.1; letter-spacing: -.01em; }
.dp-rd__sum { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.dp-rd__par { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; font-family: var(--mono); font-size: 13.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dp-rd__par i { font-family: var(--tex); font-size: 16px; color: var(--ink); }
.dp-rd__tools { display: flex; flex-wrap: wrap; gap: 8px; }
.dp-rd__read { min-height: 46px; margin: 18px 0 8px; padding: 10px 14px; font-size: 14px; line-height: 1.5; color: var(--ink-3); background: var(--card-soft); border-radius: 8px; font-variant-numeric: tabular-nums; }
.dp-rd__read b { color: var(--ink); font-weight: 600; }
.dp-rd__vals { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 4px; font-family: var(--mono); font-size: 13.5px; color: var(--ink); }
.dp-rd__vals i { font-family: var(--tex); font-size: 16px; color: var(--ink-2); }
.dp-rd__charts { display: grid; gap: 4px; touch-action: pan-y; }
.dp-ch { margin: 0; padding: 8px 0 6px; border-bottom: 1px solid var(--rule-soft); }
.dp-ch figcaption { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.dp-ch figcaption .dp-sym { font-size: 18px; }
.dp-ch figcaption em { font-size: 12.5px; font-style: normal; color: var(--muted); }
.dp-ch figcaption b { margin-right: auto; font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dp-ch canvas { display: block; width: 100%; height: 64px; cursor: crosshair; font-family: var(--sans); }
.dp-rd__note { margin: 10px 0 0; font-size: 14px; color: var(--ink-3); }
.dp-rd__still { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0 0; font-family: var(--mono); font-size: 13.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.dp-rd__still b { flex-basis: 100%; font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink-3); }
.dp-rd__still i { font-family: var(--tex); font-size: 16px; color: var(--ink-2); }
.dp-rd__still em { font-family: var(--sans); font-style: normal; font-size: 12px; color: var(--muted); }
.dp-rd__tbl { margin-top: 18px; border: 1px solid var(--rule); border-radius: 10px; }
.dp-rd__tbl summary { padding: 11px 14px; font-family: var(--sans); font-size: 14.5px; font-weight: 500; color: var(--accent); cursor: pointer; }
.dp-rd__wrap { max-height: 420px; overflow: auto; border-top: 1px solid var(--rule); overscroll-behavior: contain; }
.dp-rd__wrap table { min-width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.dp-rd__wrap thead th { position: sticky; top: 0; z-index: 1; padding: 9px 10px 7px; text-align: left; font-weight: 400; background: var(--card-soft); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.dp-rd__wrap thead th .dp-sym { font-size: 17px; }
.dp-rd__wrap thead th small { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.dp-rd__wrap thead th:first-child { font-size: 12px; color: var(--muted); }
.dp-rd__wrap td, .dp-rd__wrap tbody th { padding: 5px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--rule-soft); color: var(--ink); }
.dp-rd__wrap tbody th { font-weight: 400; color: var(--muted); }

/* ---------- Read values: the switch in the caption, the marker layer, the strip under the figure ---------- */
.stage__canvas > canvas.dp-overlay { pointer-events: none; z-index: 5; }
.stage__canvas.dp-reading { cursor: crosshair; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.stage__canvas.dp-reading > canvas, .stage__canvas.dp-reading > svg { cursor: crosshair; }
.dp-readbtn { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; padding: 4px 9px 4px 11px; font-family: var(--sans); font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--accent); background: var(--card); border: 1px solid var(--rule); border-radius: 99px; cursor: pointer; transition: color .2s ease, background .2s ease, border-color .2s ease; }
.dp-readbtn:hover { border-color: var(--accent); }
.dp-readbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dp-readbtn[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.dp-read { padding: 10px 14px 11px; background: var(--card-soft); border-top: 1px solid var(--rule-soft); }
.dp-read[hidden] { display: none; }
.dp-read__hint { margin: 0; min-height: 22px; font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.dp-read__pin[hidden] { display: none; }
.dp-read__title { margin: 0 0 6px; font-family: var(--tex); font-style: italic; font-size: 15.5px; line-height: 1.35; color: var(--ink); }
.dp-read__title span { font-family: var(--mono); font-style: normal; font-size: 12px; color: var(--muted); }
.dp-read__vals { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.dp-read__v { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 9px; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--rule-soft); border-radius: 7px; }
button.dp-read__v { cursor: pointer; }
button.dp-read__v:hover { border-color: var(--accent); }
button.dp-read__v:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dp-read__v i { font-family: var(--tex); font-size: 15px; color: var(--ink-2); }
.dp-read__v i sub, .dp-read__v i sup { font-size: 70%; }
.dp-read__v b { display: inline-block; min-width: 8ch; text-align: left; font-family: var(--mono); font-size: 14px; font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.dp-read__v u { text-decoration: none; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
@media (max-width: 640px) {
  .dp-read { padding: 9px 12px 10px; }
  .dp-read__v b { min-width: 7ch; font-size: 13.5px; }
}

/* ---------- the explanation at the foot ---------- */
.dp-about { border-top: 1px solid var(--rule); font-size: 14.5px; color: var(--ink-3); }
.dp-about summary { padding: 12px 24px; cursor: pointer; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); list-style: none; }
.dp-about summary::-webkit-details-marker { display: none; }
.dp-about summary::before { content: '› '; color: var(--accent); }
.dp-about[open] summary::before { content: '⌄ '; }
.dp-about summary:hover { color: var(--accent); }
.dp-about__body { max-height: 40vh; overflow: auto; padding: 0 24px 16px; }
.dp-about__body p { margin: 0 0 10px; line-height: 1.6; }

/* ---------- layout around the panel ---------- */
/* wide screens: the page makes room instead of being covered */
@media (min-width: 1360px) {
  body.dp-open { padding-left: var(--dp-w); }
}
/* phones: the panel becomes a bottom sheet and the tab a pill */
@media (max-width: 640px) {
  .dp { top: auto; right: 0; width: 100%; height: 88vh; height: 88dvh; border-right: 0; border-top: 1px solid var(--rule); border-radius: 18px 18px 0 0; transform: translateY(100%); }
  .dp-tab { top: auto; left: 16px; bottom: 16px; transform: none; writing-mode: horizontal-tb; padding: 10px 16px; border-radius: 999px; font-size: 12px; transition: transform var(--dur-s) var(--ease), background var(--dur-s) var(--ease); }
  .dp-tab:hover { padding-left: 16px; }
  .dp-tab--away { transform: translateY(calc(100% + 24px)); }
  .dp__head { padding: 10px 16px 6px; }
  .dp__state { display: none; }
  .dp__title { font-size: 21px; }
  .dp__icon { width: 34px; height: 34px; }
  .dp-hl, .dp-rec { margin-right: 0; margin-left: 0; padding-right: 16px; padding-left: 16px; }
  .dp-rec { margin-bottom: 8px; }
  .dp-hl { padding-bottom: 8px; }
  .dp-hl__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .dp-hl__i { padding: 5px 7px 3px; border-radius: 8px; }
  .dp-hl__k .dp-sym { font-size: 15.5px; }
  .dp-hl__t { display: none; }
  .dp-hl__v b { font-size: 15px; }
  .dp-hl__v .dp-u { font-size: 11px; }
  .dp-hl__sp { height: 16px; }
  .dp-bk { margin-top: 6px; padding: 5px 9px; font-size: 12.5px; }
  .dp-tool { padding: 5px 10px; font-size: 13px; }
  .dp-tool span:not(.dp-rec__dot) { white-space: nowrap; }
  .dp-tool[data-save] span { display: none; }
  .dp-tools { gap: 6px; }
  .dp-rec__what { display: none; }
  .dp-rec.is-rec .dp-rec__what, .dp-rec__what:has(.dp-rec__why) { display: block; }   /* a reason the round cannot start shows on phones too */
  .dp-more-txt { display: none; }
  .dp__tabs { padding: 0 16px; }
  .dp__tabs button { padding: 5px 2px 8px; font-size: 14.5px; }
  .dp-instant { padding: 7px 16px; font-size: 12.5px; }
  .dp-probe, .dp-check__body, .dp-rd, .dp-empty, .dp-books { padding-right: 16px; padding-left: 16px; }
  .dp-rd { padding-top: 12px; }
  .dp-rd__hd h3 { font-size: 22px; }
  .dp-rd__top .dp-btn { padding: 6px 11px; font-size: 13.5px; }
  .dp-rd__sum { margin-top: 6px; font-size: 13.5px; line-height: 1.4; }
  .dp-rd__par { flex-wrap: nowrap; overflow-x: auto; margin-top: 6px; padding-bottom: 2px; white-space: nowrap; font-size: 12.5px; scrollbar-width: none; }
  .dp-rd__par::-webkit-scrollbar { display: none; }
  .dp-rd__read { min-height: 0; margin: 10px 0 4px; padding: 7px 10px; font-size: 13px; }
  .dp-ch { padding: 5px 0 4px; }
  .dp-ch figcaption { margin-bottom: 2px; }
  .dp-ch figcaption .dp-sym { font-size: 16.5px; }
  .dp-ch canvas { height: 52px; }
  .dp-arr__top { padding-right: 16px; padding-left: 16px; }
  .dp-arr__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-arr__stats .wide { grid-column: 1 / -1; }
  .dp-about summary { padding: 10px 16px; font-size: 11px; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dp-about__body { padding: 0 16px 14px; }
}
/* a narrow panel keeps symbol, value, unit and change; meaning, how and check fold into the row's detail */
@container dp (max-width: 539px) {
  .dp-tbl .c-mean, .dp-tbl .c-how, .dp-tbl .c-chk { display: none; }
  .dp-tbl tr.dp-r { cursor: pointer; }
  .dp-tbl .c-sym { padding-right: 16px; }
  .dp-tbl .c-d { padding-left: 16px; }
  .dp-sec__hd th { padding-right: 16px; padding-left: 16px; }
  .dp-x__in, .dp-dt__in { padding-right: 16px; padding-left: 16px; }
  .dp-book__t .c-mean { display: none; }
  .dp-book__res { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-book__res div:last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .dp, .dp-open .dp { transition: none; }
  .dp__state.is-live::before, .dp__state.is-recording::before { animation: none; }
  .dp-tbl tr.is-blink0 > *, .dp-tbl tr.is-blink1 > * { animation: none; }
  .dp-rec__bar i { transition: none; }
}
@media print {
  .dp, .dp-tab { display: none !important; }
  body.dp-open { padding-left: 0; }
}
