/* ==========================================================================
   2026 Populist Realignment Map — Stylesheet
   Print publication aesthetic. Dense, readable long-form text.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Custom properties (light mode)
   -------------------------------------------------------------------------- */
:root {
  --bg: #fdf9f4;
  --bg-alt: #f5f0e8;
  --bg-dashboard: #e8e0d4;
  --text: #1c1a17;
  --text-muted: #4a4540;
  --text-light: #7a7068;
  --link: #8b1a1a;
  --link-visited: #5c3a6e;
  --link-hover: #600000;
  --border: #c8c0b4;
  --border-light: #e0d8cc;
  --rule: #c8c0b4;
  --table-alt: #f5f0e8;
  --table-border: #d0c8bc;
  --blockquote-border: #8b1a1a;
  --badge-bg: #e8e0d4;
  --badge-text: #3a3228;
  --header-bg: #1c1a17;
  --header-border: #3a3228;
  --header-text: #f0ece4;
  --header-text-muted: #a09888;
  --toc-active: #8b1a1a;
  --toc-bg: #faf6f0;
  --font-body: Georgia, 'Times New Roman', Times, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --measure: 680px;
  --font-size-body: 18px;
  --font-size-small: 16px;
  --font-size-micro: 14px;
  --line-height-body: 1.78;
  --line-height-heading: 1.25;
}

/* --------------------------------------------------------------------------
   Dark mode
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1814;
    --bg-alt: #241f1a;
    --bg-dashboard: #2c2520;
    --text: #e8e4d8;
    --text-muted: #a89880;
    --text-light: #6a5c50;
    --link: #d4806a;
    --link-visited: #b08ab8;
    --link-hover: #e8a090;
    --border: #3c3028;
    --border-light: #302820;
    --rule: #3c3028;
    --table-alt: #241f1a;
    --table-border: #3c3028;
    --blockquote-border: #d4806a;
    --badge-bg: #2c2520;
    --badge-text: #c8b8a0;
    --header-bg: #100e0c;
    --header-border: #3c3028;
    --header-text: #e8e4d8;
    --header-text-muted: #a89880;
    --toc-active: #d4806a;
    --toc-bg: #1c1814;
  }
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-body);
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Site header / nav
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-home {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--header-text);
  text-decoration: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nav-logo {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 3px;
}

.nav-home:hover {
  color: var(--link);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--header-text-muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--header-text);
}

.rss-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* --------------------------------------------------------------------------
   Layout: document page
   -------------------------------------------------------------------------- */
.layout-wrapper {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 120px);
}

/* On very wide screens, nudge content toward center by giving sidebar more weight */
@media (min-width: 1300px) {
  .toc-sidebar {
    width: 280px;
  }
  .document-main {
    padding: 2rem 4rem 4rem 3rem;
  }
}

/* --------------------------------------------------------------------------
   ToC sidebar
   -------------------------------------------------------------------------- */
.toc-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 49px; /* below header */
  height: calc(100vh - 49px);
  overflow-y: auto;
  padding: 1.5rem 0 2rem 1.5rem;
  border-right: 1px solid var(--border-light);
  background: var(--toc-bg);
  scrollbar-width: thin;
}

.toc-inner {
  padding-right: 1rem;
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.toc-label {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.toc-close {
  display: none; /* shown only on mobile */
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.25rem;
}

.toc-nav ul {
  list-style: none;
}

.toc-nav li {
  line-height: 1.3;
}

.toc-h2 {
  margin-top: 0.5rem;
}

.toc-h3 {
  padding-left: 0.75rem;
}

.toc-link {
  display: block;
  padding: 0.25rem 0;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.35;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
  margin-left: -0.5rem;
  transition: color 0.15s, border-color 0.15s;
}

.toc-link:hover,
.toc-link.active {
  color: var(--toc-active);
  border-left-color: var(--toc-active);
}

/* Mobile ToC toggle button */
.toc-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 1.25rem;
}

.toc-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Main document content
   -------------------------------------------------------------------------- */
.document-main {
  flex: 1;
  min-width: 0;
  padding: 2rem 2rem 4rem;
}

.document-header {
  max-width: var(--measure);
  margin: 0 auto 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.document-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.document-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.document-meta {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.document-meta a {
  color: var(--link);
}

.document-meta a:hover {
  color: var(--link-hover);
}

.meta-sep {
  color: var(--border);
}

/* --------------------------------------------------------------------------
   Document body — typography
   -------------------------------------------------------------------------- */
.document-body {
  max-width: var(--measure);
  margin: 0 auto;
}

.document-body h1,
.document-body h2,
.document-body h3,
.document-body h4 {
  scroll-margin-top: 64px; /* sticky header height + breathing room */
}

.document-body h1 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: var(--line-height-heading);
  margin: 2.5rem 0 0.75rem;
  color: var(--text);
}

.document-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: var(--line-height-heading);
  margin: 3rem 0 0.75rem;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.35rem;
}

/* First h2 (Dashboard) has no top margin */
.document-body h2:first-of-type {
  margin-top: 0;
}

.document-body h3 {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: var(--line-height-heading);
  margin: 2.5rem 0 0.6rem;
  color: var(--text);
  padding-left: 0.65rem;
  border-left: 3px solid var(--border);
}

.document-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: var(--line-height-heading);
  margin: 1.75rem 0 0.4rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: var(--font-ui);
}

.document-body p {
  margin-bottom: 1.35rem;
}

.document-body p:last-child {
  margin-bottom: 0;
}

.document-body ul,
.document-body ol {
  margin: 0.75rem 0 1.35rem 1.5rem;
}

.document-body li {
  margin-bottom: 0.45rem;
  line-height: 1.7;
}

.document-body li p {
  margin-bottom: 0.45rem;
}

.document-body strong {
  font-weight: 700;
  color: var(--text);
}

.document-body em {
  font-style: italic;
}

/* Horizontal rules */
.document-body hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2.5rem 0;
  opacity: 0.7;
}

/* Blockquotes */
.document-body blockquote {
  margin: 1.25rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 3px solid var(--blockquote-border);
  color: var(--text-muted);
  font-style: italic;
}

.document-body blockquote p {
  margin-bottom: 0.4rem;
}

/* Links */
.document-body a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.document-body a:visited {
  color: var(--link-visited);
}

.document-body a:hover {
  color: var(--link-hover);
  background: color-mix(in srgb, var(--link) 8%, transparent);
  border-radius: 2px;
}

/* Citation superscripts */
.document-body sup {
  font-size: 0.72em;
  line-height: 0;
  position: relative;
  top: -0.45em;
}

.citation {
  color: var(--link);
  text-decoration: none;
  font-family: var(--font-ui);
  padding: 0 0.15em;
}

.citation:hover {
  text-decoration: underline;
}

/* Source entries */
.source-entry {
  display: inline;
}

.source-backlink {
  margin-left: 0.3em;
  font-size: 0.8em;
  color: var(--text-light);
  text-decoration: none;
  font-family: var(--font-ui);
}

.source-backlink:hover {
  color: var(--link);
}

/* Lead paragraph — first <p> after an h2 or h3 gets slightly larger treatment */
.document-body h2 + p,
.document-body h3 + p {
  font-size: 1.04em;
  line-height: 1.82;
  color: var(--text);
}

/* Asterisked annotation lines (italicized maintenance notes) */
.document-body p em:only-child,
.document-body em {
  /* Let em stay as italic — no special treatment needed */
}

/* Small text for dashboard notes */
.document-body .dashboard-section + p,
.document-body p:has(strong:first-child) {
  /* Can't easily target "Dashboard notes" specifically — handled via dashboard-section class */
}

/* --------------------------------------------------------------------------
   Dashboard section special treatment
   -------------------------------------------------------------------------- */
.dashboard-section {
  background: var(--bg-dashboard);
  border: 1px solid var(--border);
  border-left: 3px solid var(--link);
  border-radius: 4px;
  padding: 1.25rem 1.25rem 0.75rem;
  margin: 0 -1.25rem 1.5rem;
}

/* Dashboard notes paragraph (the bold "Dashboard notes:" paragraph) */
.dashboard-section ~ p:first-of-type,
.document-body p strong:first-child {
  /* handled below with .dashboard-notes class added via JS if needed */
}

/* The paragraph immediately after the dashboard table that starts with "Dashboard notes:" */
/* We target it via CSS sibling — handled by wrapping in dashboard-section div */

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-figure {
  margin: 1rem 0;
  position: relative;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 32px;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
}

.document-body table,
.dashboard-snapshot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-small);
  line-height: 1.4;
}

.document-body th,
.dashboard-snapshot-table th {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 0.55rem 0.85rem;
  border-bottom: 2px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-muted);
  white-space: nowrap;
}

.document-body td,
.dashboard-snapshot-table td {
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--table-border);
  vertical-align: top;
  line-height: 1.5;
}

.document-body tr:last-child td,
.dashboard-snapshot-table tr:last-child td {
  border-bottom: none;
}

/* Alternating row shading */
.document-body tr:nth-child(even) td {
  background: var(--table-alt);
}

/* Right-align columns that are likely numbers (heuristic: short cells) */
.document-body td:last-child:not(:first-child) {
  /* This is too broad — leave as left-aligned and let natural reading work */
}

/* Sticky first column on wide tables */
.document-body table th:first-child,
.document-body table td:first-child {
  /* No sticky — causes issues on small screens */
}

/* Dashboard table gets the dashboard background */
.dashboard-section .table-scroll table th {
  background: var(--bg-dashboard);
}

/* --------------------------------------------------------------------------
   Updates pages
   -------------------------------------------------------------------------- */
.updates-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.updates-header {
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 1.25rem;
}

.updates-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0.5rem 0 0.5rem;
  color: var(--text);
}

.updates-intro {
  font-size: var(--font-size-small);
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.updates-intro a {
  color: var(--link);
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.update-card {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.update-card:first-child {
  padding-top: 0.5rem;
}

.update-card-header {
  margin-bottom: 0.75rem;
}

.update-date {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.update-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.update-title a {
  color: var(--text);
  text-decoration: none;
}

.update-title a:hover {
  color: var(--link);
}

.sections-changed {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.sections-label {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--text-muted);
  margin-right: 0.2rem;
}

.section-badge {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
}

.update-excerpt {
  font-size: var(--font-size-small);
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.update-excerpt ul {
  margin-left: 1.25rem;
}

.update-excerpt li {
  margin-bottom: 0.25rem;
}

.update-changelog-preview {
  font-size: var(--font-size-small);
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.update-card-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.read-more {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.read-more:hover {
  text-decoration: underline;
}

.view-doc {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--text-muted);
  text-decoration: none;
}

.view-doc:hover {
  color: var(--link);
}

.no-updates {
  font-size: var(--font-size-small);
  color: var(--text-muted);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Individual update page
   -------------------------------------------------------------------------- */
.update-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.update-nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.update-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--border);
}

.update-header .update-date {
  margin-bottom: 0.4rem;
}

.update-header .update-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.update-section-label {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  border: none;
  padding: 0;
}

.update-headlines {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.headlines-body {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

.headlines-body ul {
  margin-left: 1.5rem;
}

.headlines-body li {
  margin-bottom: 0.5rem;
}

.headlines-body a {
  color: var(--link);
}

.update-changelog {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.changelog-text {
  font-size: var(--font-size-small);
  color: var(--text-muted);
  line-height: 1.55;
}

.update-dashboard {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.dashboard-snapshot-table {
  font-size: var(--font-size-small);
}

.update-footer-links {
  margin-top: 2rem;
}

.btn-view-doc {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--link);
  border-radius: 4px;
}

.btn-view-doc:hover {
  background: var(--link);
  color: var(--bg);
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0;
  display: inline-block;
}

.breadcrumb:hover {
  color: var(--link);
}

/* --------------------------------------------------------------------------
   Site footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border-light);
  padding: 1.5rem;
  text-align: center;
  margin-top: 4rem;
}

.site-footer p {
  font-family: var(--font-ui);
  font-size: var(--font-size-micro);
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--link);
}

.footer-note {
  color: var(--text-light) !important;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Responsive — tablet (≤1100px): hide sidebar ToC
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .toc-sidebar {
    position: fixed;
    top: 49px; /* sits directly below sticky header */
    left: 0;
    width: 100vw;
    height: calc(100vh - 49px); /* full remaining height — no cutoff */
    overflow-y: auto;
    z-index: 200;
    padding: 1rem 1.25rem 2rem;
    border-right: none;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    transform: translateY(-110%); /* push fully offscreen above header */
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .toc-sidebar.toc-open {
    transform: translateY(0);
  }

  .toc-close {
    display: block;
  }

  .toc-toggle {
    display: inline-flex;
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 150;
    margin-bottom: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    white-space: nowrap;
  }

  .layout-wrapper {
    display: block;
  }

  .document-main {
    padding: 1.5rem 1.25rem 5rem; /* extra bottom padding so content clears the floating button */
  }
}

/* --------------------------------------------------------------------------
   Responsive — mobile (≤600px)
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  html {
    font-size: 17px;
  }

  body {
    line-height: 1.82;
  }

  .document-body p {
    margin-bottom: 1.2rem;
  }

  .site-nav {
    padding: 0.5rem 1rem;
  }

  .nav-home {
    font-size: 0.8rem;
  }

  .document-main {
    padding: 1rem 1rem 2.5rem;
  }

  .document-title {
    font-size: 1.4rem;
  }

  .document-header {
    margin-bottom: 1.5rem;
  }

  .updates-main,
  .update-main {
    padding: 1.25rem 1rem 3rem;
  }

  .update-header .update-title {
    font-size: 1.25rem;
  }

  .document-body h2 {
    font-size: 1.2rem;
  }

  .document-body h3 {
    font-size: 1.08rem;
  }

  .dashboard-section {
    margin: 0 -1rem 1.5rem;
    padding: 1rem 1rem 0.5rem;
  }

  /* ToC toggle and close — mobile tap targets */
  .toc-toggle {
    min-height: 44px;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    width: auto;
    justify-content: center;
    border-radius: 999px;
    margin-bottom: 0;
  }

  .toc-close {
    min-width: 44px;
    min-height: 44px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .toc-link {
    padding: 0.55rem 0.5rem;
    font-size: 0.88rem;
  }

  .toc-h3 {
    padding-left: 1.25rem;
  }

  /* Navigation tap targets */
  .nav-links a {
    font-size: 0.9rem;
    padding: 0.5rem 0.25rem;
  }

  .rss-link {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* List spacing */
  .document-body li {
    margin-bottom: 0.6rem;
  }

  /* Update card footer */
  .update-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .read-more {
    font-size: 1rem;
  }

  .document-meta {
    gap: 0.4rem;
    font-size: 0.8rem;
  }

  /* Section badges */
  .sections-changed {
    gap: 0.4rem;
  }

  .section-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
  }
}

/* --------------------------------------------------------------------------
   Print stylesheet
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .toc-sidebar,
  .toc-toggle,
  .site-footer,
  .document-header .document-meta,
  .updates-main .breadcrumb {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 11pt;
  }

  .document-main {
    padding: 0;
    max-width: 100%;
  }

  .document-body {
    max-width: 100%;
  }

  .layout-wrapper {
    display: block;
  }

  .document-body a {
    color: black;
    text-decoration: none;
  }

  .document-body a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #555;
  }

  /* Don't add URLs for citation links or anchor links */
  .citation::after,
  .source-backlink::after,
  a[href^="#"]::after {
    content: none !important;
  }

  .document-body table {
    page-break-inside: avoid;
  }

  .document-body h2,
  .document-body h3 {
    page-break-after: avoid;
  }

  hr {
    border-top: 1px solid #ccc;
  }

  .table-scroll {
    overflow: visible;
  }

  .document-body tr:nth-child(even) td {
    background: #f5f5f5;
  }

  .document-body th {
    background: #eee;
  }
}
