/* Reserve Regs — static site styles. No build step; tokens first, rules after. */

:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface-1: #fcfcfb;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  /* categorical slots, fixed order: model-law, model-regulation, actuarial-guideline, valuation-manual, mortality-table */
  --cat-model-law: #2a78d6;
  --cat-model-regulation: #eb6834;
  --cat-actuarial-guideline: #1baf7a;
  --cat-valuation-manual: #eda100;
  --cat-mortality-table: #e87ba4;
  --status-warning: #fab219;
  --link: #9f1239;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface-1: #1a1a19;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --cat-model-law: #3987e5;
    --cat-model-regulation: #d95926;
    --cat-actuarial-guideline: #199e70;
    --cat-valuation-manual: #c98500;
    --cat-mortality-table: #d55181;
    --status-warning: #fab219;
    --link: #fb7185;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface-1: #1a1a19;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --cat-model-law: #3987e5;
  --cat-model-regulation: #d95926;
  --cat-actuarial-guideline: #199e70;
  --cat-valuation-manual: #c98500;
  --cat-mortality-table: #d55181;
  --status-warning: #fab219;
  --link: #fb7185;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  font-size: 16px;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--grid);
  background: var(--surface-1);
}
.site-header .wrap {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-top: 18px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.01em; color: var(--text-primary); }
.brand .thin { font-weight: 400; color: var(--text-secondary); }
.site-nav { display: flex; gap: 16px; font-size: 0.92rem; }
.site-nav a { color: var(--text-secondary); }
.site-nav a[aria-current="page"] { color: var(--text-primary); font-weight: 600; }

.line-badge {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  border: 1px solid var(--grid);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

/* ---------- intro ---------- */
.intro { padding: 34px 0 8px; }
.intro h1 { font-size: 1.7rem; margin: 0 0 10px; line-height: 1.25; }
.intro p.lede { color: var(--text-secondary); max-width: 72ch; margin: 0 0 8px; }
.intro p.note { color: var(--text-muted); font-size: 0.88rem; max-width: 72ch; }

/* ---------- generic section ---------- */
section.block { padding: 26px 0 6px; }
section.block > h2 { font-size: 1.18rem; margin: 0 0 4px; }
section.block > p.sub { color: var(--text-secondary); font-size: 0.92rem; margin: 0 0 16px; max-width: 78ch; }

/* ---------- product filter ---------- */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0 2px; }
.pf-btn {
  font: inherit; font-size: 0.86rem;
  color: var(--text-secondary);
  background: var(--surface-1);
  border: 1px solid var(--grid);
  border-radius: 999px;
  padding: 4px 14px;
  cursor: pointer;
}
.pf-btn:hover { color: var(--text-primary); border-color: var(--axis); }
.pf-btn[aria-pressed="true"] {
  color: var(--text-primary);
  font-weight: 700;
  border-color: var(--text-primary);
}
.pf-btn[aria-pressed="true"]::before { content: "✓ "; font-weight: 700; }

.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge.product { border-style: dashed; }
.product-notes { color: var(--text-muted); font-size: 0.86rem; max-width: 78ch; margin: 6px 0 0; }

/* ---------- timeline ---------- */
.panel {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 18px 14px;
}
.tl-scroll { overflow-x: auto; }
.timeline { min-width: 760px; position: relative; }
.tl-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 0.82rem; color: var(--text-secondary);
  padding-bottom: 12px; border-bottom: 1px solid var(--grid); margin-bottom: 10px;
}
.tl-legend .key { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend .swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.tl-grid { position: relative; }
.tl-years {
  position: relative; height: 20px; margin-left: var(--label-w, 250px);
  color: var(--text-muted); font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.tl-years span { position: absolute; transform: translateX(-50%); }
.tl-row { display: flex; align-items: center; min-height: 30px; position: relative; }
.tl-row + .tl-row { border-top: 1px solid transparent; }
.tl-label {
  flex: 0 0 var(--label-w, 250px);
  padding-right: 14px;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-label a { color: inherit; }
.tl-track { position: relative; flex: 1; height: 30px; }
.tl-gridline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.tl-bar {
  position: absolute; top: 8px; height: 14px;
  border-radius: 4px;
  cursor: pointer;
  min-width: 6px;
}
.tl-bar.open-ended { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tl-bar:hover, .tl-bar:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 1px; }
.tl-cat-head {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); padding: 12px 0 2px;
}

.tl-tip {
  position: absolute; z-index: 10; pointer-events: none;
  background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.14);
  padding: 8px 11px; font-size: 0.82rem; max-width: 300px;
  display: none;
}
.tl-tip .t { font-weight: 600; }
.tl-tip .d { color: var(--text-secondary); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 4px solid var(--grid);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.card h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.card h3 a { color: var(--text-primary); }
.card .ref { color: var(--text-muted); font-size: 0.8rem; }
.card .years { color: var(--text-secondary); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.card p { margin: 2px 0 0; color: var(--text-secondary); font-size: 0.88rem; }

.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  border-radius: 999px; padding: 1px 9px; border: 1px solid var(--grid);
  color: var(--text-secondary); width: fit-content;
}
.badge.current { border-color: var(--cat-actuarial-guideline); }
.badge.closed-block, .badge.superseded { color: var(--text-muted); }
.badge.pending {
  border-color: var(--status-warning);
  color: var(--text-secondary);
}
.badge.pending::before { content: "⚠ "; }

/* ---------- detail page ---------- */
.detail-head { padding: 30px 0 4px; }
.detail-head .crumbs { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.detail-head h1 { margin: 0 0 4px; font-size: 1.55rem; line-height: 1.25; }
.detail-head .meta { color: var(--text-secondary); font-size: 0.92rem; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; padding: 20px 0 40px; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-main h2 { font-size: 1.05rem; margin: 22px 0 8px; }
.detail-main h2:first-child { margin-top: 0; }
.detail-main p { color: var(--text-secondary); margin: 0 0 10px; }

.hist { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--grid); }
.hist li { padding: 0 0 14px 16px; position: relative; }
.hist li::before {
  content: ""; position: absolute; left: -6px; top: 7px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface-1); border: 2px solid var(--axis);
}
.hist .y { font-weight: 700; font-variant-numeric: tabular-nums; }
.hist .e { color: var(--text-primary); }
.hist .dtl { color: var(--text-secondary); font-size: 0.9rem; }
.hist .src { font-size: 0.8rem; }

.side .panel + .panel { margin-top: 14px; }
.side h2 { font-size: 0.95rem; margin: 0 0 8px; }
.side p, .side li { font-size: 0.87rem; color: var(--text-secondary); }
.side ul { margin: 6px 0 0; padding-left: 18px; }
.src-list { list-style: none; padding: 0; margin: 0; }
.src-list li { padding: 7px 0; border-top: 1px solid var(--grid); font-size: 0.84rem; }
.src-list li:first-child { border-top: 0; }
.src-list .pub { color: var(--text-muted); }
.src-list .flag { color: var(--text-muted); font-size: 0.78rem; }

/* ---------- binding page ---------- */
.prose { max-width: 76ch; padding-bottom: 40px; }
.prose h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text-secondary); }
.prose .chain {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 18px; margin: 14px 0; color: var(--text-primary);
  font-size: 0.92rem;
}
.prose .chain b { display: block; margin-bottom: 4px; }

/* ---------- product page ---------- */
.regime-band {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.regime-card {
  display: grid; grid-template-columns: 240px minmax(0, 1fr);
  gap: 0 20px; padding: 12px 16px; border-top: 1px solid var(--grid);
}
.regime-card:first-child { border-top: 0; }
.rc-name { grid-column: 1; font-weight: 700; font-size: 0.93rem; }
.rc-window { grid-column: 1; color: var(--text-muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; margin-top: 2px; }
.rc-desc { grid-column: 2; grid-row: 1 / span 2; color: var(--text-secondary); font-size: 0.86rem; align-self: center; }
@media (max-width: 640px) {
  .regime-card { grid-template-columns: 1fr; }
  .rc-desc { grid-column: 1; grid-row: auto; margin-top: 4px; }
}

.matrix-scroll { overflow-x: auto; padding: 0; }
table.matrix { border-collapse: collapse; width: 100%; min-width: 860px; font-size: 0.88rem; }
.matrix th, .matrix td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--grid); }
.matrix thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 2px solid var(--axis); }
.matrix tbody th { font-weight: 600; white-space: nowrap; }
.matrix tbody th a { color: var(--text-primary); }
.matrix td a { color: var(--text-secondary); }
.matrix td a:hover { color: var(--link); }
.matrix .na { color: var(--text-muted); }
.panel.answer-panel { border-left: 4px solid var(--cat-model-law); margin: 18px 0 6px; }
.panel.answer-panel h2 { margin: 0 0 8px; font-size: 1.05rem; }
.panel.answer-panel p { color: var(--text-primary); margin: 0 0 8px; max-width: 84ch; }

/* comparison table on assumption pages */
table.cmp { min-width: 1240px; table-layout: fixed; font-size: 0.85rem; }
table.cmp thead th { position: sticky; top: 0; background: var(--surface-1); z-index: 2; }
table.cmp th:first-child, table.cmp td:first-child {
  position: sticky; left: 0; background: var(--surface-1); z-index: 1;
  width: 118px; min-width: 118px; white-space: normal;
}
table.cmp thead th:first-child { z-index: 3; }
table.cmp tbody th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; vertical-align: top; }
table.cmp td { color: var(--text-secondary); }
table.cmp td b { color: var(--text-primary); }
.cmp-regime { font-size: 0.92rem; font-weight: 700; color: var(--text-primary); text-transform: none; letter-spacing: 0; }
.cmp-window { font-size: 0.74rem; font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; margin-top: 2px; }
table.cmp blockquote.regquote { margin: 0 0 10px; padding: 9px 12px; max-width: none; }
table.cmp blockquote.regquote p { font-size: 0.83rem; }
table.cmp blockquote.regquote footer { font-size: 0.76rem; }
table.cmp .drill-links { margin: 0; padding-left: 16px; }
table.cmp .drill-links li { padding: 2px 0; }
.pin { font-weight: 700; color: var(--text-primary); }

details.qfold summary {
  cursor: pointer; color: var(--link); font-size: 0.82rem; font-weight: 600;
  list-style-position: inside; padding: 2px 0;
}
details.qfold[open] summary { margin-bottom: 6px; }

.appl {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  border-radius: 999px; padding: 0 9px; margin-bottom: 6px;
  border: 1px solid var(--grid); color: var(--text-secondary);
}
.appl-yes { border-color: var(--cat-actuarial-guideline); }
.appl-no { color: var(--text-muted); }
.cell-cite { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }
table.vmcmp { min-width: 1080px; }
table.cmp tbody th .delta { font-size: 0.76rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-secondary); margin-top: 5px; }

.assumption-body { max-width: 860px; padding-bottom: 10px; }
.regime-detail { padding: 22px 0 6px; border-bottom: 1px solid var(--grid); }
.regime-detail:last-child { border-bottom: 0; }
.regime-detail h2 { font-size: 1.1rem; margin: 0 0 6px; }
.regime-detail h2 .window { font-weight: 400; color: var(--text-muted); font-size: 0.82rem; margin-left: 8px; }
.regime-detail p { color: var(--text-secondary); max-width: 80ch; }
.regime-detail .verdict { color: var(--text-primary); font-size: 1rem; }
.regime-detail .commentary { border-left: 3px solid var(--axis); padding-left: 12px; }
.regime-detail .drill { margin: 10px 0 2px; font-size: 0.85rem; color: var(--text-muted); }
.drill-links { margin: 2px 0 8px; padding-left: 20px; font-size: 0.88rem; }

blockquote.regquote {
  margin: 12px 0; padding: 12px 16px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 4px solid var(--cat-actuarial-guideline);
  border-radius: 8px;
  max-width: 80ch;
}
blockquote.regquote p { margin: 0 0 8px; color: var(--text-primary); font-size: 0.92rem; font-style: italic; }
blockquote.regquote footer { font-size: 0.82rem; color: var(--text-secondary); font-style: normal; }
blockquote.regquote .flag { color: var(--text-muted); }

nav.pager { display: flex; justify-content: space-between; padding: 20px 0 40px; max-width: 860px; font-size: 0.92rem; }

.product-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.product-card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
}
.product-card h3 { margin: 0; font-size: 1rem; }
.product-card h3 a { color: var(--text-primary); }
.product-card .pc-note { color: var(--text-muted); font-size: 0.82rem; }
.product-card.planned { opacity: 0.65; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--grid);
  margin-top: 30px; padding: 18px 0 34px;
  color: var(--text-muted); font-size: 0.82rem;
}
.site-footer .wrap { max-width: 1060px; }
.site-footer p { max-width: 84ch; margin: 4px 0; }

/* actuarail merge: brand anchor + subsite tag */
a.brand { color: var(--text-primary); }
a.brand:hover { text-decoration: none; }
.brand-sub { font-weight: 400; font-size: 1.05rem; color: var(--text-muted); margin-left: 6px; }

/* oxblood brand accent on the wordmark "ai" */
a.brand .thin { color: var(--link); font-weight: 700; }

/* ================================================================
   2026-08-18 rework: progressive drill-down components, shared by
   every reserves page (breadcrumbs, kicker, entry cards, drill-next
   band, how-to-read hint, practice panel, drill-steps strip).
   ================================================================ */

.kicker {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--link); margin: 0 0 8px;
}

.crumbs-bar { padding: 22px 0 0; font-size: 0.85rem; color: var(--text-muted); }
.crumbs-bar a { color: var(--text-secondary); }
.crumbs-bar .sep { margin: 0 6px; color: var(--text-muted); }

/* 2026-08-23: list rows instead of boxy tiles — header left, description
   right, one entry per line. */
.entry-cards {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.entry-card {
  display: grid; grid-template-columns: 240px minmax(0, 1fr);
  gap: 2px 20px; align-items: baseline;
  padding: 12px 16px; text-decoration: none; color: inherit;
  border-top: 1px solid var(--grid); border-left: 3px solid transparent;
}
.entry-card:first-child { border-top: 0; }
.entry-card:hover { background: var(--page); text-decoration: none; }
.entry-card:hover h3 { text-decoration: underline; }
.entry-card h3 { margin: 0; font-size: 0.95rem; color: var(--link); font-weight: 600; }
.entry-card p { margin: 0; font-size: 0.85rem; color: var(--text-secondary); }
.entry-card.lead { border-left-color: var(--link); }
@media (max-width: 640px) { .entry-card { grid-template-columns: 1fr; } }

.drill-steps {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 0.85rem; color: var(--text-secondary); margin: 10px 0 0;
}
.drill-steps .step {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 13px; white-space: nowrap;
}
.drill-steps .step b { color: var(--text-primary); }
.drill-steps .arrow { color: var(--text-muted); }

.hint {
  background: var(--surface-1); border: 1px solid var(--border);
  border-left: 3px solid var(--axis); border-radius: 8px;
  padding: 10px 14px; font-size: 0.86rem; color: var(--text-secondary);
  max-width: 86ch; margin: 12px 0 4px;
}
.hint b { color: var(--text-primary); }

.next-band { padding: 26px 0 44px; }
.next-band h2 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted); margin: 0 0 10px;
}
.next-band .entry-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.panel.practice-panel { border-left: 4px solid var(--cat-valuation-manual); margin: 18px 0 6px; }
.panel.practice-panel h2 { margin: 0 0 8px; font-size: 1.05rem; }
.panel.practice-panel ul { margin: 0; padding-left: 18px; }
.panel.practice-panel li { color: var(--text-secondary); font-size: 0.9rem; padding: 3px 0; }
.panel.practice-panel .pn-note { color: var(--text-muted); font-size: 0.84rem; }

.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { padding: 10px 0; border-top: 1px solid var(--grid); font-size: 0.9rem; }
.doc-list li:first-child { border-top: 0; }
.doc-list .doc-title { font-weight: 600; }
.doc-list .doc-meta { color: var(--text-muted); font-size: 0.82rem; }
.doc-list .doc-desc { color: var(--text-secondary); font-size: 0.87rem; margin-top: 2px; max-width: 90ch; }

/* ================================================================
   2026-08-23 formatting pass (Spencer): fewer/lighter tables, wide
   comparison tables break out to full page width (less side-scroll),
   and clear visual delineation between page sections.
   ================================================================ */

/* Wide tables: full-bleed to the viewport (minus gutters) so multi-
   column comparisons use the whole page instead of scrolling. */
.breakout {
  margin-left: calc(50% - 50vw + 22px);
  margin-right: calc(50% - 50vw + 22px);
}
@media (max-width: 1104px) { .breakout { margin-left: 0; margin-right: 0; } }

/* Section delineation: every block starts with a rule + an accent-
   underlined heading, so sections are easy to tell apart at a scan. */
section.block { border-top: 1px solid var(--grid); margin-top: 26px; padding-top: 24px; }
section.block > h2::after,
.next-band h2::after {
  content: ""; display: block; width: 34px; height: 3px; border-radius: 2px;
  background: var(--link); margin-top: 6px;
}
section.block > h2 { margin-bottom: 10px; }
.next-band { border-top: 1px solid var(--grid); margin-top: 26px; padding-top: 24px; }

/* Lighter comparison tables: the assumption page keeps only the
   summary + regulation-text rows side by side; detail moves to prose. */
table.cmp.cmp-light { min-width: 900px; }
table.cmp td { line-height: 1.5; }

/* Per-regime detail prose (replaces the Detail/Commentary/References
   table rows on assumption pages). */
.regime-prose { max-width: 92ch; }
.regime-prose h3 { font-size: 1.02rem; margin: 22px 0 2px; }
.regime-prose h3 .window { font-weight: 400; color: var(--text-muted); font-size: 0.8rem; margin-left: 8px; }
.regime-prose > div { border-left: 3px solid var(--grid); padding-left: 14px; }
.regime-prose p.detail { color: var(--text-secondary); margin: 8px 0; }
.regime-prose p.commentary { color: var(--text-secondary); font-size: 0.92rem; border-left: 3px solid var(--cat-valuation-manual); padding-left: 10px; margin: 8px 0; }
.regime-prose .refs { font-size: 0.88rem; margin: 6px 0 2px; padding-left: 18px; }

/* ================================================================
   2026-08-23 mobile overhaul: below tablet width the comparison
   tables restack as labeled blocks — one dimension as a heading,
   each regime's answer as its own labeled card. No squeezed sticky
   columns, no sideways scrolling, no clipped text.
   ================================================================ */

table.cmp th:first-child { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .matrix-scroll { overflow-x: visible; padding: 4px 0; border: 0; background: none; }
  table.matrix, table.matrix tbody, table.matrix tr, table.matrix th, table.matrix td {
    display: block; width: 100%; min-width: 0;
  }
  table.matrix, table.cmp, table.cmp.cmp-light, table.matrix.cmp.vmcmp { min-width: 0; table-layout: auto; }
  table.matrix thead { display: none; }
  table.cmp th:first-child, table.cmp td:first-child {
    position: static; width: auto; min-width: 0; background: none;
  }
  table.matrix tr { margin: 0 0 18px; }
  table.matrix tbody th {
    white-space: normal; border-bottom: 0; padding: 6px 2px;
    font-size: 0.8rem; color: var(--text-primary);
  }
  table.matrix tbody th::after {
    content: ""; display: block; width: 28px; height: 3px; border-radius: 2px;
    background: var(--link); margin-top: 5px;
  }
  table.matrix td {
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface-1); padding: 10px 12px; margin: 0 0 8px;
  }
  table.matrix td::before {
    content: attr(data-l); display: block;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px;
  }
  table.matrix td:not([data-l])::before { content: none; }
  table.cmp tbody th .delta { margin-top: 4px; }
  table.cmp blockquote.regquote { margin-left: 0; margin-right: 0; }
  .breakout { margin-left: 0; margin-right: 0; }
}

/* VM dimension drill page: no row-header column — all framework columns equal. */
table.vmdim th:first-child, table.vmdim td:first-child {
  position: static; width: auto; min-width: 0; background: none;
}
table.vmdim th, table.vmdim td { width: 33.33%; }
@media (max-width: 760px) { table.vmdim th, table.vmdim td { width: 100%; } }

/* VM comparison: the dimension column carries a name plus the difference
   summary — give it real width whenever the side-by-side table renders
   (desktop and landscape phones alike). */
table.vmcmp th:first-child, table.vmcmp td:first-child {
  width: 250px; min-width: 250px;
}

/* Granular comparison on dimension pages: aspect labels read as titles. */
table.vmgran tbody th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: 0.85rem; }
table.vmgran th:first-child, table.vmgran td:first-child { width: 190px; min-width: 190px; }
