/* District Desk — shared styles for every tool.
   Full-width layout: a sticky top bar, a slim section rail, and the worksheet
   itself using the whole viewport. No centered column, no wide side margins. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #eceff3;
  --surface-3: #dfe4ea;
  --ink: #111820;
  --ink-2: #3d4854;
  --ink-3: #68737f;
  --line: #d6dce4;
  --line-2: #bfc8d3;

  --accent: #0b5c8c;
  --accent-2: #094b72;
  --accent-ink: #ffffff;
  --accent-soft: #e4eff7;
  --accent-line: #9cc3dc;

  --out-bg: #edf5fb;
  --out-ink: #0a3a5a;
  --out-line: #b9d5e8;

  --ok: #1a7a4a;
  --ok-soft: #e2f3ea;
  --warn: #9a5a00;
  --warn-soft: #fff2da;
  --bad: #b3261e;
  --bad-soft: #fde7e5;

  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --gutter: 20px;
  --topbar-h: 54px;
  --side-w: 236px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141a; --surface: #161d25; --surface-2: #1d2630; --surface-3: #27323e;
    --ink: #e7ebf0; --ink-2: #b4bdc8; --ink-3: #8691a0; --line: #2a3542; --line-2: #3a4756;
    --accent: #5fb0dd; --accent-2: #7cc0e6; --accent-ink: #061420; --accent-soft: #15283a; --accent-line: #2e5a78;
    --out-bg: #142a3c; --out-ink: #d4e8f6; --out-line: #2c5473;
    --ok: #4fc187; --ok-soft: #12302a; --warn: #e2a33b; --warn-soft: #3a2b10; --bad: #f08a83; --bad-soft: #3d1a18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141a; --surface: #161d25; --surface-2: #1d2630; --surface-3: #27323e;
  --ink: #e7ebf0; --ink-2: #b4bdc8; --ink-3: #8691a0; --line: #2a3542; --line-2: #3a4756;
  --accent: #5fb0dd; --accent-2: #7cc0e6; --accent-ink: #061420; --accent-soft: #15283a; --accent-line: #2e5a78;
  --out-bg: #142a3c; --out-ink: #d4e8f6; --out-line: #2c5473;
  --ok: #4fc187; --ok-soft: #12302a; --warn: #e2a33b; --warn-soft: #3a2b10; --bad: #f08a83; --bad-soft: #3d1a18;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 var(--font); font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
p { margin: 0 0 10px; }
a { color: var(--accent); }
small, .dd-muted { color: var(--ink-3); }
.dd-muted { font-size: 13px; }
code, kbd { font-family: var(--mono); font-size: .92em; }
kbd { border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; background: var(--surface-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.dd-topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px; padding: 0 var(--gutter);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.dd-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); flex: none; }
.dd-brand-mark {
  width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--accent-ink);
  display: inline-grid; place-items: center; font-weight: 800; font-size: 12px; letter-spacing: .02em;
}
.dd-brand-name { font-weight: 650; font-size: 14px; color: var(--ink-2); }
.dd-titles { min-width: 0; flex: 1 1 auto; }
.dd-titles h1 { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-titles .dd-sub { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-actions { margin-left: auto; display: flex; gap: 6px; flex: none; }
@media (max-width: 760px) {
  .dd-brand-name { display: none; }
  .dd-actions .dd-btn { padding: 6px 8px; }
  .dd-actions .dd-btn-label { display: none; }
}

/* ---------- layout ---------- */
.dd-layout {
  display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100vh - var(--topbar-h));
  background: linear-gradient(90deg, var(--surface) 0 var(--side-w), var(--line) var(--side-w) calc(var(--side-w) + 1px), transparent calc(var(--side-w) + 1px));
}
.dd-layout--single { background: none; }
.dd-layout--single { grid-template-columns: minmax(0, 1fr); }
.dd-layout--single .dd-side { display: none; }
.dd-side {
  position: sticky; top: var(--topbar-h); align-self: start; height: calc(100vh - var(--topbar-h));
  overflow: auto; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--surface);
}
.dd-side .dd-side-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 0 10px 8px; }
.dd-side a {
  display: block; padding: 7px 10px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: 13px;
  line-height: 1.3; overflow-wrap: anywhere;
}
.dd-side a:hover { background: var(--surface-2); color: var(--ink); }
.dd-side a.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.dd-main { padding: 18px var(--gutter) 64px; min-width: 0; }
@media (max-width: 900px) {
  .dd-layout { grid-template-columns: minmax(0, 1fr); background: none; }
  .dd-side {
    height: auto; display: flex; gap: 2px; overflow-x: auto; padding: 6px 10px;
    border-right: 0; border-bottom: 1px solid var(--line); z-index: 40;
  }
  .dd-side .dd-side-title { display: none; }
  .dd-side a { padding: 6px 10px; flex: none; }
  .dd-main { padding: 14px 14px 64px; }
  :root { --gutter: 14px; }
}

/* ---------- sections ---------- */
.dd-section {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px 20px; margin-bottom: 16px; scroll-margin-top: calc(var(--topbar-h) + 12px);
}
.dd-section > h2 { font-size: 17px; font-weight: 650; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.dd-section > .dd-lead { color: var(--ink-2); font-size: 14px; margin: 0 0 14px; max-width: 90ch; }
.dd-section > h3, .dd-h3 { font-size: 14px; font-weight: 650; color: var(--ink-2); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.dd-section > h3:first-of-type, .dd-grid + .dd-h3 { margin-top: 14px; }
.dd-step {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 12.5px; font-weight: 700; flex: none;
}
.dd-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.dd-intro { color: var(--ink-2); font-size: 14px; max-width: 100ch; margin-bottom: 14px; }

/* ---------- fields ---------- */
.dd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 16px; }
.dd-grid--wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.dd-grid--narrow { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.dd-grid + .dd-grid { margin-top: 12px; }
.dd-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dd-field > label, .dd-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dd-field .dd-help { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.dd-field.is-out > label::after { content: " · calculated"; font-weight: 500; color: var(--ink-3); font-size: 11.5px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-full { grid-column: 1 / -1; }
@media (max-width: 560px) { .span-2, .span-3 { grid-column: span 1; } }

.dd-input, .dd-field input, .dd-field select, .dd-field textarea, .dd-table input, .dd-table select, .dd-affix > input {
  appearance: none; -webkit-appearance: none; width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 10px; min-height: 36px;
  transition: border-color .12s, box-shadow .12s;
}
.dd-field textarea { min-height: 72px; resize: vertical; }
.dd-field select, .dd-table select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 26px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
input[data-type="money"], input[data-type="number"], input[data-type="percent"], input[data-type="int"] { text-align: right; font-variant-numeric: tabular-nums; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }
/* the text-input rule above sets appearance:none on every .dd-field / .dd-table input; give boxes their tick back */
input[type="checkbox"], input[type="radio"],
.dd-field input[type="checkbox"], .dd-field input[type="radio"], .dd-table input[type="checkbox"], .dd-table input[type="radio"] {
  appearance: auto; -webkit-appearance: auto; width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--accent); margin: 0; flex: none;
}
.dd-check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--ink); min-height: 36px; line-height: 1.35; padding-top: 7px; }
.dd-check input { flex: none; margin-top: 2px; }
.dd-affix { position: relative; display: block; width: 100%; }
.dd-affix > span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; font-size: 13px; }
.dd-affix > input { padding-left: 22px; }
.dd-affix--suffix > span { left: auto; right: 10px; }
.dd-affix--suffix > input { padding-left: 10px; padding-right: 26px; }
input:disabled, select:disabled, input[readonly] { background: var(--surface-2); color: var(--ink-2); }

/* ---------- outputs ---------- */
.dd-out {
  display: block; width: 100%; background: var(--out-bg); color: var(--out-ink); border: 1px solid var(--out-line);
  border-radius: var(--radius-sm); padding: 7px 10px; min-height: 36px; text-align: right; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dd-out.is-text, .dd-out--left { text-align: left; }
.dd-out.is-text { white-space: normal; overflow: visible; text-overflow: clip; }
.dd-out--inline { display: inline; width: auto; background: none; border: 0; padding: 0; min-height: 0; color: inherit; font-weight: 650; }
.dd-out.is-ok { color: var(--ok); border-color: var(--ok); background: var(--ok-soft); }
.dd-out.is-warn { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.dd-out.is-bad { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }
.dd-neg { color: var(--bad); }

/* ---------- stat tiles ---------- */
.dd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0 0 16px; }
.dd-stat {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow); min-width: 0;
}
.dd-stat .k { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.dd-stat .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-stat .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.dd-stat.is-ok, .dd-stat--ok { border-left-color: var(--ok); }
.dd-stat.is-warn, .dd-stat--warn { border-left-color: var(--warn); }
.dd-stat.is-bad, .dd-stat--bad { border-left-color: var(--bad); }
.dd-stat.is-ok .v { color: var(--ok); }
.dd-stat.is-warn .v { color: var(--warn); }
.dd-stat.is-bad .v { color: var(--bad); }
/* phones: two tiles a row so the first screen is not all tiles; long figures wrap rather than hide behind an ellipsis */
@media (max-width: 560px) {
  .dd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dd-stat { padding: 9px 11px; }
  .dd-stat .k { font-size: 10.5px; letter-spacing: .03em; }
  .dd-stat .v { font-size: 18px; }
  .dd-stat .s { font-size: 11.5px; }
  .dd-stats > .dd-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- tables ---------- */
.dd-scroll { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-width: 100%; }
.dd-scroll-hint {
  position: sticky; left: 0; padding: 5px 10px; font-size: 12px; color: var(--ink-3); text-align: right;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.dd-scroll-hint[hidden] { display: none; }
.dd-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.dd-table caption { text-align: left; font-weight: 650; padding: 10px 12px 6px; color: var(--ink-2); font-size: 13.5px; }
.dd-table th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--ink-2); font-weight: 600; text-align: left;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px;
}
.dd-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dd-table tbody tr:last-child td { border-bottom: 0; }
.dd-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.dd-table .num, .dd-table th.num, .dd-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dd-table .ctr { text-align: center; }
.dd-table td input, .dd-table td select { min-height: 32px; padding: 4px 8px; }
.dd-table td .dd-affix > input { padding-left: 20px; }
.dd-table td .dd-affix--suffix > input { padding-left: 8px; padding-right: 24px; }
.dd-table td .dd-out { min-height: 32px; padding: 4px 8px; }
.dd-table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--line-2); border-bottom: 0; }
.dd-table .w-xs { width: 64px; } .dd-table .w-sm { width: 110px; } .dd-table .w-md { width: 150px; } .dd-table .w-lg { width: 220px; }
.dd-table .rownum { color: var(--ink-3); font-size: 12.5px; width: 36px; text-align: right; }
.dd-table--compact td { padding: 3px 6px; }
.dd-table--plain th { position: static; }
.dd-row-tools { white-space: nowrap; width: 1%; }
.dd-row-tools .dd-btn { min-height: 28px; padding: 2px 7px; }
.dd-table-foot { display: flex; gap: 8px; align-items: center; padding: 10px 0 0; }
.dd-subrow td { color: var(--ink-2); font-style: italic; }
.dd-total-row td { font-weight: 700; }

/* ---------- buttons ---------- */
.dd-btn {
  appearance: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 6px 11px; min-height: 34px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; line-height: 1; text-decoration: none;
}
.dd-btn:hover { border-color: var(--accent); color: var(--accent); }
.dd-btn:active { transform: translateY(1px); }
.dd-btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.dd-btn--primary:hover { background: var(--accent-2); color: var(--accent-ink); border-color: var(--accent-2); }
.dd-btn--ghost { border-color: transparent; background: transparent; }
.dd-btn--sm { min-height: 28px; padding: 3px 8px; font-size: 12.5px; }
.dd-btn--danger:hover { border-color: var(--bad); color: var(--bad); }
.dd-btn svg { width: 15px; height: 15px; flex: none; }
.dd-btn:disabled { opacity: .5; cursor: default; }
.dd-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }

/* ---------- callouts, badges ---------- */
.dd-callout {
  border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--accent-soft);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; margin: 0 0 12px;
}
.dd-callout--ok { border-left-color: var(--ok); background: var(--ok-soft); }
.dd-callout--warn { border-left-color: var(--warn); background: var(--warn-soft); }
.dd-callout--bad { border-left-color: var(--bad); background: var(--bad-soft); }
.dd-callout strong { font-weight: 650; }
.dd-callout p:last-child { margin-bottom: 0; }
[data-warnings]:empty { display: none; }
.dd-badge {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); vertical-align: middle;
}
.dd-badge--ok { background: var(--ok-soft); color: var(--ok); }
.dd-badge--warn { background: var(--warn-soft); color: var(--warn); }
.dd-badge--bad { background: var(--bad-soft); color: var(--bad); }
.dd-badge--accent { background: var(--accent-soft); color: var(--accent); }
details.dd-details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; margin: 10px 0; background: var(--surface); }
details.dd-details > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
details.dd-details[open] > summary { margin-bottom: 8px; }
.dd-kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 14px; }
.dd-kv dt { color: var(--ink-3); } .dd-kv dd { margin: 0; font-weight: 600; text-align: right; }
.dd-source { font-size: 12.5px; color: var(--ink-3); }

/* ---------- footer, toast, print header ---------- */
.dd-foot { color: var(--ink-3); font-size: 12.5px; padding: 8px 0 0; border-top: 1px solid var(--line); margin-top: 18px; line-height: 1.5; }
.dd-toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 100; background: var(--ink); color: var(--bg);
  padding: 9px 14px; border-radius: 6px; font-size: 13.5px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  animation: dd-toast-in .18s ease-out;
}
.dd-toast--ok { background: var(--ok); color: #fff; }
.dd-toast--bad { background: var(--bad); color: #fff; }
@keyframes dd-toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dd-print-header { display: none; }

/* ---------- launcher (index.html) ---------- */
.dd-home-main { padding: 22px var(--gutter) 64px; }
.dd-hero { margin: 4px 0 18px; }
.dd-hero h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.dd-hero p { color: var(--ink-2); font-size: 15px; max-width: 80ch; margin-top: 6px; }
.dd-search { flex: 1 1 320px; max-width: 520px; min-height: 36px; }
.dd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.dd-chip {
  appearance: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; cursor: pointer;
}
.dd-chip.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.dd-chip.is-active .dd-muted { color: inherit; opacity: .8; }
.dd-group-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 8px; }
.dd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.dd-card {
  display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); text-decoration: none; color: inherit; min-height: 118px; transition: border-color .12s, transform .12s;
}
.dd-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.dd-card .t { font-weight: 650; font-size: 15px; }
.dd-card .b { color: var(--ink-2); font-size: 13.5px; flex: 1; }
.dd-card .m { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-3); }
.dd-empty { color: var(--ink-3); padding: 30px 0; }

/* ---------- print ---------- */
@media print {
  :root { color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #f1f1f1; --ink: #000; --ink-2: #222; --ink-3: #555; --line: #bbb; --line-2: #999; --out-bg: #f3f3f3; --out-ink: #000; --out-line: #999; --accent: #000; --accent-ink: #fff; --accent-soft: #f3f3f3; }
  @page { margin: 12mm; }
  body { background: #fff; color: #000; font-size: 11.5px; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  @page landscape { size: landscape; margin: 10mm; }
  body.dd-print-landscape { page: landscape; }
  .dd-topbar, .dd-actions, .dd-side, .dd-noprint, .dd-toast, .dd-brand, [data-add], [data-remove], [data-move], button[data-action], button[data-copy], .dd-row-tools, .dd-table-foot { display: none !important; }
  .dd-print-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 11px; color: #444; border-bottom: 1px solid #999; padding-bottom: 4px; margin-bottom: 10px; }
  .dd-print-header .dd-print-title { font-size: 14px; font-weight: 700; color: #000; }
  .dd-print-header .dd-print-sub { color: #444; }
  .dd-layout { background: none; }
  input[type="checkbox"], input[type="radio"] { appearance: auto; -webkit-appearance: auto; }
  .dd-layout { display: block; min-height: 0; }
  .dd-main { padding: 0; }
  .dd-section { break-inside: avoid; box-shadow: none; border-color: #bbb; padding: 8px 10px; margin-bottom: 8px; }
  .dd-section > h2 { font-size: 13px; }
  .dd-stat { box-shadow: none; border-color: #bbb; border-left-color: #000; padding: 6px 10px; }
  .dd-stat .v { font-size: 16px !important; white-space: normal !important; overflow-wrap: anywhere; }
  .dd-grid { gap: 6px 12px; }
  .dd-field > label { font-size: 10.5px; }
  input, select, textarea { border: 1px solid #bbb !important; background: #fff !important; color: #000 !important; min-height: 24px !important; padding: 2px 6px !important; font-size: 11px !important; }
  .dd-out { background: #f3f3f3 !important; border-color: #999 !important; color: #000 !important; min-height: 24px; padding: 2px 6px; font-size: 11px; }
  .dd-scroll { overflow: visible; border-color: #bbb; max-width: 100%; }
  .dd-scroll-hint { display: none !important; }
  .dd-table th { position: static; background: #f1f1f1 !important; color: #000; white-space: normal; }
  .dd-table { font-size: 10px; width: 100%; }
  .dd-table th, .dd-table td { padding: 2px 4px; overflow-wrap: break-word; }
  .dd-table td.num, .dd-table th.num { white-space: nowrap; }
  .dd-table .w-xs, .dd-table .w-sm, .dd-table .w-md, .dd-table .w-lg { width: auto; }
  .dd-table input, .dd-table select { min-width: 0; }
  .dd-foot { margin-top: 10px; font-size: 9.5px; color: #555; }
  a { color: #000; text-decoration: none; }
  .dd-callout { background: #f7f7f7; border-left-color: #000; }
  .dd-print-break { break-before: page; }
}
