/* =====================================================================
   Poel Capital — Policy Portfolio
   Visual system follows the Poel Capital site: monochrome, high contrast,
   hairline rules, no shadows, mono uppercase micro-labels, pill actions.

   Chart palette is deliberately a one-hue two-shade ramp (near-black →
   mid gray), not a categorical hue set — the same "1 hue, 2 shades"
   pattern used for before/after comparisons. Validated at surface
   contrast >= 3:1 in both modes, with pair separation ΔE 50.5 light /
   33.5 dark against a floor of 15. The palette validator's categorical
   hue/chroma checks are intentionally not applicable here.
   ===================================================================== */

@font-face {
  font-family: 'Inter Tight';
  src: url('/fonts/inter-tight-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('/fonts/inter-tight-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('/fonts/inter-tight-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('/fonts/inter-tight-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light;
  --surface-1:      #ffffff;
  --page:           #ffffff;
  --raised:         #ffffff;
  --sunken:         #f7f7f7;
  --text-primary:   #0a0a0a;
  --text-secondary: #5c5c5c;
  --text-muted:     #8f8f8f;
  --grid:           #ededed;
  --axis:           #d6d6d6;
  --border:         #e6e6e6;
  --border-strong:  #d0d0d0;

  /* one-hue, two-shade data ramp */
  --series-1: #0a0a0a;
  --series-2: #8f8f8f;
  --series-3: #5c5c5c;

  /* status stays chromatic — meaning must not rest on gray alone */
  --good:     #0ca30c;
  --warning:  #d99000;
  --serious:  #d2691e;
  --critical: #c62828;
  --success-text: #0a7a0a;

  --accent:     #0a0a0a;
  --accent-ink: #ffffff;

  --radius: 4px;
  --radius-sm: 3px;
  --pill: 999px;
  --font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-1:      #131313;
  --page:           #0d0d0d;
  --raised:         #1c1c1c;
  --sunken:         #191919;
  --text-primary:   #fafafa;
  --text-secondary: #b0b0b0;
  --text-muted:     #8f8f8f;
  --grid:           #262626;
  --axis:           #3a3a3a;
  --border:         #292929;
  --border-strong:  #3d3d3d;

  --series-1: #fafafa;
  --series-2: #8f8f8f;
  --series-3: #c4c4c4;

  --warning:  #fab219;
  --serious:  #ec835a;
  --critical: #e05a5a;
  --success-text: #0ca30c;

  --accent:     #fafafa;
  --accent-ink: #0a0a0a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: var(--font);
  background: var(--page);
  color: var(--text-primary);
  font-size: 14px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text-primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Mono micro-label — the "INDEX / DOMAIN / EST." treatment */
.eyebrow, .stat .label, table.data th, .card-head h2, .legend .item,
.tabs button, .badge {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ------------------------------- chrome ------------------------------ */

.topbar {
  display: flex; align-items: center; gap: 28px;
  height: 62px; padding: 0 26px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 16px; letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-mark {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-primary); flex: none;
}
.brand-divider { width: 1px; height: 18px; background: var(--border); }
.brand-sub {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.11em; color: var(--text-muted); white-space: nowrap;
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 7px 13px; border-radius: var(--pill);
  color: var(--text-muted); font-weight: 500; font-size: 14px;
}
.nav a:hover { color: var(--text-primary); text-decoration: none; }
.nav a.active { color: var(--text-primary); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; padding-left: 8px; }

.main { padding: 30px 26px 70px; max-width: 1600px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 {
  margin: 0; font-size: 34px; font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.02;
}
.page-head .sub { color: var(--text-muted); margin-top: 8px; font-size: 13.5px; }
.page-head .spacer { flex: 1; }

/* ------------------------------ controls ----------------------------- */

button, .btn {
  font: inherit; font-family: var(--font); font-weight: 500; font-size: 13.5px;
  padding: 8px 16px; border-radius: var(--pill);
  border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-primary);
  cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
button:hover, .btn:hover { border-color: var(--text-primary); text-decoration: none; }
button:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary, button.primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover, button.primary:hover { opacity: .85; border-color: var(--accent); }
.btn-danger { color: var(--critical); border-color: var(--border); }
.btn-danger:hover { border-color: var(--critical); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-icon { padding: 6px 10px; }

input, select, textarea {
  font: inherit; font-family: var(--font); color: var(--text-primary);
  background: var(--raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px; width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 1.5px solid var(--text-primary); outline-offset: -1px; border-color: transparent;
}
label {
  display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-muted); margin-bottom: 5px;
}
.field { margin-bottom: 14px; }
.field-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar input, .toolbar select { width: auto; min-width: 150px; border-radius: var(--pill); padding: 8px 14px; }
.toolbar .grow { flex: 1; min-width: 240px; }

/* ------------------------------- cards ------------------------------- */

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card + .card, .card + .grid-2, .grid-2 + .card,
.grid-2 + .grid-2, .card + .grid-3, .grid-3 + .card { margin-top: 18px; }
.card-head {
  padding: 15px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.card-head h2 { margin: 0; font-size: 10.5px; font-weight: 600; color: var(--text-secondary); }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }

.grid-2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(390px, 100%), 1fr)); }
.grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

/* ----------------------------- stat tiles ---------------------------- */

.kpi-row {
  display: grid; gap: 0; margin-bottom: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--surface-1); padding: 18px 20px 20px;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat .label { font-size: 10px; font-weight: 500; color: var(--text-muted); margin-bottom: 10px; }
.stat .value {
  font-size: 30px; font-weight: 600; letter-spacing: -0.04em; line-height: 1;
}
.stat .value.hero { font-size: 42px; letter-spacing: -0.045em; }
.stat .note { font-size: 12px; color: var(--text-muted); margin-top: 8px; letter-spacing: 0; }

/* ------------------------------ tables ------------------------------- */

.table-wrap { overflow-x: auto; }
.table-wrap.sticky-head { overflow: auto; max-height: calc(100vh - 250px); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-size: 10px; font-weight: 500; color: var(--text-muted);
  padding: 11px 12px; border-bottom: 1px solid var(--axis);
  background: var(--surface-1); position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--text-primary); }
table.data th .arrow { color: var(--text-primary); margin-left: 3px; }
table.data td {
  padding: 10px 12px; border-bottom: 1px solid var(--grid);
  white-space: nowrap; vertical-align: middle;
}
table.data tbody tr:hover { background: var(--sunken); }
table.data tbody tr.clickable { cursor: pointer; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.strong { font-weight: 600; }
table.data tfoot td {
  padding: 12px; border-top: 1px solid var(--axis); font-weight: 600;
  font-variant-numeric: tabular-nums;
  position: sticky; bottom: 0; background: var(--surface-1); z-index: 2;
  box-shadow: 0 -1px 0 var(--axis);
}
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }

/* ------------------------------ badges ------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: var(--pill); font-size: 10px; font-weight: 500;
  border: 1px solid var(--border-strong); color: var(--text-secondary);
  white-space: nowrap;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.inforce { color: var(--text-primary); border-color: var(--text-primary); }
.badge.grace   { color: var(--serious); border-color: var(--serious); }
.badge.lapsed  { color: var(--critical); border-color: var(--critical); }
.badge.matured, .badge.sold, .badge.pending { color: var(--text-muted); }

.sev { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 12.5px; }
.sev .ic {
  width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #fff; flex: none;
  font-family: var(--font);
}
.sev.critical .ic { background: var(--critical); }
.sev.serious  .ic { background: var(--serious); }
.sev.warning  .ic { background: var(--warning); color: #0a0a0a; }
.sev.info     .ic { background: var(--text-muted); }
.sev.critical { color: var(--critical); }
.sev.serious  { color: var(--serious); }

.alert-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--grid);
}
.alert-row:last-child { border-bottom: none; }
.alert-row .who { font-weight: 600; }
.alert-row .meta { color: var(--text-muted); font-size: 12.5px; margin-top: 3px; }
.alert-row .spacer { flex: 1; }

/* ------------------------------- tabs -------------------------------- */

.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button {
  border: none; background: none; border-bottom: 1.5px solid transparent;
  border-radius: 0; padding: 11px 0 12px; color: var(--text-muted);
  font-weight: 500; font-size: 10.5px;
}
.tabs button:hover { color: var(--text-primary); border-color: transparent; }
.tabs button.active { color: var(--text-primary); border-bottom-color: var(--text-primary); font-weight: 600; }

/* ------------------------------ charts ------------------------------- */

.chart { width: 100%; height: auto; display: block; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.chart text { fill: var(--text-muted); font-size: 10.5px; font-family: var(--mono); }
.chart text.value-label { fill: var(--text-secondary); font-weight: 500; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .marker { stroke: var(--surface-1); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .crosshair { stroke: var(--axis); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .bar { rx: 2; }

.legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 12px 2px; }
.legend .item { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; color: var(--text-muted); font-weight: 500; }
.legend .swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; }

.tooltip {
  position: fixed; z-index: 90; pointer-events: none;
  background: var(--text-primary); color: var(--surface-1);
  border-radius: var(--radius); padding: 9px 11px; font-size: 12.5px; min-width: 140px;
}
.tooltip .t-title {
  font-weight: 600; margin-bottom: 6px; font-family: var(--mono);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; opacity: .75;
}
.tooltip .t-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.tooltip .t-row .swatch { width: 8px; height: 8px; border-radius: 2px; flex: none; outline: 1px solid rgba(127,127,127,.5); }
.tooltip .t-row .v { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.tooltip .t-row.muted { opacity: .7; }

/* ------------------------------- login ------------------------------- */

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; border: none; }
.login-card .card-body { padding: 0; }
.login-brand {
  display: flex; align-items: center; gap: 10px; margin-bottom: 30px;
  font-size: 20px; font-weight: 600; letter-spacing: -0.025em;
}
.login-head {
  font-size: 40px; font-weight: 700; letter-spacing: -0.04em;
  line-height: 1.0; margin-bottom: 6px;
}
.login-head .dim { color: var(--text-muted); }
.login-sub {
  color: var(--text-muted); margin-bottom: 32px; font-family: var(--mono);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em;
}
.login-meta {
  margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; font-family: var(--mono);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-muted);
}

/* ------------------------------ misc --------------------------------- */

.empty { padding: 46px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
.error-box {
  border: 1px solid var(--critical); color: var(--critical);
  padding: 10px 13px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 14px; font-weight: 500;
}
.ok-box {
  border: 1px solid var(--border-strong); color: var(--text-primary);
  padding: 10px 13px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 14px; font-weight: 500;
}
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--text-primary); color: var(--surface-1);
  padding: 11px 20px; border-radius: var(--pill); z-index: 100; font-weight: 500;
  font-size: 13px;
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; font-size: 13px; }
.kv dt {
  color: var(--text-muted); font-weight: 500; font-family: var(--mono);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em;
  align-self: center;
}
.kv dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }

dialog {
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface-1); color: var(--text-primary);
  padding: 0; max-width: 92vw; width: 560px;
}
dialog::backdrop { background: rgba(10,10,10,.45); }
.dialog-head {
  padding: 18px 22px 16px; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 19px; letter-spacing: -0.025em;
}
.dialog-body { padding: 22px; max-height: 66vh; overflow: auto; }
.dialog-foot { padding: 15px 22px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

.dropzone {
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 42px 20px; text-align: center; color: var(--text-muted);
  background: var(--sunken); cursor: pointer;
}
.dropzone.over { border-color: var(--text-primary); color: var(--text-primary); }

.spin {
  width: 13px; height: 13px; border: 1.5px solid var(--axis);
  border-top-color: var(--text-primary); border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media screen and (max-width: 860px) {
  .topbar { height: auto; flex-wrap: wrap; gap: 10px; padding: 10px 14px; position: static; }
  .nav {
    order: 3; width: 100%; margin-left: 0;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 11px; font-size: 13px; }
  .brand-divider, .brand-sub { display: none; }
  .topbar-right { margin-left: auto; gap: 8px; padding-left: 0; }
  .topbar-right span { display: none; }
  .main { padding: 18px 14px 56px; }
  .table-wrap.sticky-head { max-height: none; }
  .page-head h1 { font-size: 26px; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
  .stat .value.hero { font-size: 32px; }
  dialog { width: 96vw; }
  .field-row { grid-template-columns: 1fr; }
}


/* ============================ reports ================================= */

.rpt-picker { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.rpt-choice {
  display: block; padding: 13px 15px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); cursor: pointer; margin: 0;
  font-family: var(--font); text-transform: none; letter-spacing: normal;
}
.rpt-choice:hover { border-color: var(--text-primary); }
.rpt-choice.selected { border-color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--text-primary); }
.rpt-choice input {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden;   /* hidden but still focusable */
}
.rpt-choice:has(input:focus-visible) { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.rpt-choice-name { display: block; font-weight: 600; font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
.rpt-choice-blurb { display: block; font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.rpt-toggle {
  display: flex; align-items: center; gap: 9px; font-family: var(--font);
  text-transform: none; letter-spacing: normal; font-size: 13px;
  color: var(--text-primary); font-weight: 400; margin: 0;
}
.rpt-toggle input { width: auto; }
select[multiple] { padding: 6px; }

.rpt-hint {
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 12px 15px; margin: 18px 0; font-size: 13px; color: var(--text-secondary);
  line-height: 1.55;
}

.rpt-output { margin-top: 20px; }
.rpt-sheet {
  background: #ffffff; color: #0a0a0a;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 44px 46px; margin-bottom: 20px;
  max-width: 1100px;
}
:root[data-theme="dark"] .rpt-sheet { border-color: var(--border-strong); }

.rpt-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-bottom: 16px; border-bottom: 2px solid #0a0a0a; margin-bottom: 22px;
}
.rpt-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 17px; letter-spacing: -0.02em; color: #0a0a0a;
}
.rpt-brand .brand-mark { background: #0a0a0a; }
.rpt-brand-sub {
  font-family: var(--mono); font-size: 9.5px; text-transform: uppercase;
  letter-spacing: 0.13em; color: #8f8f8f; margin-top: 5px; margin-left: 15px;
}
.rpt-head-right { text-align: right; }
.rpt-title { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; color: #0a0a0a; }
.rpt-meta {
  font-family: var(--mono); font-size: 9.5px; text-transform: uppercase;
  letter-spacing: 0.09em; color: #8f8f8f; margin-top: 4px;
}
.rpt-confidential {
  font-family: var(--mono); font-size: 9px; text-transform: uppercase;
  letter-spacing: 0.1em; color: #8f8f8f; margin-bottom: 20px;
}
.rpt-h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.035em; margin: 0 0 18px; color: #0a0a0a; }
.rpt-h3 {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: #5c5c5c; margin: 0 0 10px;
  padding-bottom: 6px; border-bottom: 1px solid #ededed;
}
.rpt-block { margin-bottom: 24px; }
.rpt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.rpt-note { font-size: 11.5px; line-height: 1.6; color: #5c5c5c; margin: 0; }

.rpt-tiles {
  display: grid; gap: 0; margin-bottom: 26px;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  border: 1px solid #ededed;
}
/* Balance the strip rather than leaving a ragged final row. */
.rpt-tiles[data-count="6"] { grid-template-columns: repeat(3, 1fr); }
.rpt-tiles[data-count="5"] { grid-template-columns: repeat(5, 1fr); }
.rpt-tiles[data-count="6"] .rpt-tile:nth-child(3n) { border-right: none; }
.rpt-tiles[data-count="6"] .rpt-tile:nth-child(-n+3) { border-bottom: 1px solid #ededed; }
.rpt-tile { padding: 13px 15px; border-right: 1px solid #ededed; }
.rpt-tile:last-child { border-right: none; }
.rpt-tile-label {
  font-family: var(--mono); font-size: 8.5px; text-transform: uppercase;
  letter-spacing: 0.1em; color: #8f8f8f; margin-bottom: 7px;
}
.rpt-tile-value { font-size: 22px; font-weight: 600; letter-spacing: -0.035em; line-height: 1; color: #0a0a0a; }
.rpt-tile-note { font-size: 10px; color: #8f8f8f; margin-top: 6px; line-height: 1.4; }

table.rpt-table { width: 100%; border-collapse: collapse; font-size: 11.5px; color: #0a0a0a; }
table.rpt-table th {
  font-family: var(--mono); font-size: 8.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: #5c5c5c; text-align: left;
  padding: 7px 8px; border-bottom: 1px solid #c4c4c4; white-space: nowrap;
}
table.rpt-table td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; }
table.rpt-table tfoot td {
  padding: 8px; border-top: 1px solid #c4c4c4; border-bottom: none;
  font-weight: 600; background: #fafafa;
}
table.rpt-table .num { text-align: right; font-variant-numeric: tabular-nums; }
table.rpt-table .strong { font-weight: 600; }
table.rpt-table .muted { color: #8f8f8f; }
table.rpt-table-tight { font-size: 10px; }
table.rpt-table-tight th { padding: 6px 5px; font-size: 8px; }
table.rpt-table-tight td { padding: 5px; }
/* Policy numbers and dates must not break mid-token. */
.rpt-nowrap { white-space: nowrap; }
.rpt-dim td { color: #b8b8b8; }
.rpt-overdue { color: #c62828; font-weight: 600; }

table.rpt-kv { width: 100%; border-collapse: collapse; font-size: 11.5px; }
table.rpt-kv td { padding: 5px 0; border-bottom: 1px solid #f4f4f4; }
table.rpt-kv td:first-child {
  font-family: var(--mono); font-size: 8.5px; text-transform: uppercase;
  letter-spacing: 0.07em; color: #8f8f8f; width: 45%;
}
table.rpt-kv td:last-child { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

.rpt-footer {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 26px; padding-top: 10px; border-top: 1px solid #ededed;
  font-family: var(--mono); font-size: 8.5px; text-transform: uppercase;
  letter-spacing: 0.09em; color: #8f8f8f;
}

/* Reports always render on white, even when the app is in dark mode —
   they are documents, not screens. */
.rpt-sheet .chart text { fill: #8f8f8f; }
.rpt-sheet .chart .gridline { stroke: #ededed; }
.rpt-sheet .chart .axis-line { stroke: #c4c4c4; }
.rpt-sheet .chart .line { stroke: #0a0a0a; }
.rpt-sheet .chart .marker { stroke: #ffffff; fill: #0a0a0a; }
.rpt-sheet .chart .bar { fill: #0a0a0a; }
.rpt-sheet .chart text.value-label { fill: #5c5c5c; }
.rpt-sheet .legend .item { color: #5c5c5c; }

@media screen and (max-width: 860px) {
  .rpt-sheet { padding: 22px 18px; }
  .rpt-cols { grid-template-columns: 1fr; }
}

@media print {
  /* Page geometry is set at generate time by #printPageStyle so a wide
     schedule can go landscape while everything else stays portrait. */
  html, body { background: #ffffff !important; }
  :root { --surface-1: #ffffff; --page: #ffffff; }

  .topbar, .toolbar, .tabs, .page-head, .no-print,
  button, .btn, dialog, .toast, .tooltip { display: none !important; }

  .main { padding: 0 !important; max-width: none !important; }
  .rpt-output { margin: 0 !important; }
  .rpt-sheet {
    border: none !important; border-radius: 0 !important;
    padding: 0 !important; margin: 0 !important; max-width: none !important;
    background: #ffffff !important; color: #0a0a0a !important;
  }

  /* Repeat table headers across pages; never split a row or a stat strip. */
  thead { display: table-header-group; }
  tfoot { display: table-row-group; }
  tr, img, svg { break-inside: avoid; }
  .avoid-break, .rpt-tiles { break-inside: avoid; }
  .rpt-h3 { break-after: avoid; }
  .page-break-after { break-after: page; }
  .page-break-before { break-before: page; }
  .rpt-sheet + .rpt-sheet { break-before: page; }

  a { text-decoration: none !important; color: #0a0a0a !important; }
  .card { border: none !important; }
}

