/*
 * Atlas redesign — design system bundle.
 *
 * This file is loaded ONLY on pages that opt in via `<% content_for :body_class, "atlas-shell" %>`
 * in the view. Existing pages render unchanged because every rule below is scoped under
 * `.atlas-shell`. Fonts in app/assets/fonts/ are vendored from Google Fonts (OFL).
 *
 * See docs/redesign-plan.md and docs/redesign/{pulse,matter,meeting}.html.
 */


/* ============================================================
 * FONTS — self-hosted WOFF2, variable, with unicode-range routing
 * ============================================================ */

/* Fraunces — display + italic flourishes */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("/assets/fraunces-italic-vietnamese-a809fa0a.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("/assets/fraunces-italic-latin-ext-340fb213.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("/assets/fraunces-italic-latin-1de9fc36.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/assets/fraunces-roman-vietnamese-8069e2da.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/assets/fraunces-roman-latin-ext-d9fd39a1.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/assets/fraunces-roman-latin-8950e2ee.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter Tight — UI sans */
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/inter-tight-roman-cyrillic-ext-74851864.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/inter-tight-roman-cyrillic-b8f5f254.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/inter-tight-roman-greek-ext-219360e9.woff2") format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/inter-tight-roman-greek-74fec6a1.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/inter-tight-roman-vietnamese-681f2ccd.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/inter-tight-roman-latin-ext-e83a7ed0.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/inter-tight-roman-latin-0a534b34.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono — codes / dates */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/jbm-roman-cyrillic-ext-6cda8d1b.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/jbm-roman-cyrillic-d2321e1a.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/jbm-roman-greek-eba6198f.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/jbm-roman-vietnamese-d233173a.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/jbm-roman-latin-ext-b0c48b7a.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/jbm-roman-latin-68dbce1c.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ============================================================
 * TOKENS — palette, type stack, spacing
 * Custom properties live on :root so they're inert until referenced.
 * ============================================================ */

:root {
  --atlas-paper:        #f1ece2;
  --atlas-paper-deep:   #e7e0d2;
  --atlas-paper-edge:   #d6cdb8;
  --atlas-ink:          #1a1a1f;
  --atlas-ink-soft:     #3a3a44;
  /* ink-mute darkened from #6a6a72 to pass WCAG AA (4.5:1) on paper-deep
     when used at mono-caps sizes (~10-11px). Still visibly softer than
     ink-soft, preserving the three-step ink hierarchy. */
  --atlas-ink-mute:     #56565d;
  --atlas-rule:         #c9bfa7;
  --atlas-oxblood:      #7a1f2b;
  --atlas-oxblood-deep: #5a161f;
  --atlas-slate:        #455362;
  --atlas-heat:         #d9663f;
  /* heat-deep is the small-text-safe variant of heat. The flagship heat
     orange fails AA for body copy <18px on paper; heat-deep passes ~4.8:1
     on paper. Use heat for borders, fills, icons, and large display;
     swap to heat-deep when the heat is text under ~16px. */
  --atlas-heat-deep:    #a64a2c;
  --atlas-heat-soft:    #efb89c;
  --atlas-sage:         #6f8068;
  --atlas-amber:        #b89048;

  --atlas-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --atlas-sans:  "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --atlas-mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --atlas-r:    2px;
  --atlas-r-lg: 4px;

  --atlas-pad: clamp(20px, 3vw, 44px);
  --atlas-content-max: 1320px;
}


/* ============================================================
 * BASE — applies only inside the .atlas-shell body class.
 * Existing pages have no .atlas-shell class so nothing below fires.
 * ============================================================ */

.atlas-shell {
  background: var(--atlas-paper);
  color: var(--atlas-ink);
  font-family: var(--atlas-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(rgba(122, 31, 43, 0.025) 1px, transparent 1px),
    radial-gradient(rgba(26, 26, 31, 0.02) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}

.atlas-shell *,
.atlas-shell *::before,
.atlas-shell *::after { box-sizing: border-box; }

.atlas-shell a { color: inherit; text-decoration: none; }
.atlas-shell a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.atlas-shell h1, .atlas-shell h2, .atlas-shell h3,
.atlas-shell h4, .atlas-shell h5, .atlas-shell h6 {
  font-family: var(--atlas-serif);
  font-weight: 450;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

/* Global focus-visible — consistent oxblood ring around any keyboard-focused
   interactive element. Component-specific focus rules (search lozenge, filter
   inputs) override below where they need a tighter look. */
.atlas-shell a:focus-visible,
.atlas-shell button:focus-visible,
.atlas-shell select:focus-visible,
.atlas-shell summary:focus-visible,
.atlas-shell [tabindex]:focus-visible {
  outline: 2px solid var(--atlas-oxblood);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Skip-to-main-content link lives in application.css so it works on every
   page (Atlas and non-Atlas) without depending on atlas.css being loaded.
   Don't redeclare it here — the global rule is the contract. */

.atlas-shell .atlas-wrap {
  max-width: var(--atlas-content-max);
  margin: 0 auto;
  padding: 0 var(--atlas-pad);
}

/* Editorial flourish helper: italic Fraunces with the wonky/soft variant.
   Used for "in <em>brief</em>" style accents in headings. */
.atlas-shell .atlas-em {
  font-family: var(--atlas-serif);
  font-style: italic;
  font-variation-settings: "opsz" 9, "SOFT" 100, "WONK" 1;
  font-weight: 350;
  color: var(--atlas-oxblood);
}

/* Mono caps eyebrow used for section labels / status tags. */
.atlas-shell .atlas-eyebrow {
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--atlas-ink-mute);
}


/* ============================================================
 * TOPBAR — brand wordmark, command search, primary nav
 * ============================================================ */

/* Two-row layout: row 1 puts brand on the left and nav on the right,
   row 2 gives the search lozenge the full width so its placeholder isn't
   truncated. Flex-wrap + `order` keeps the semantic source order
   (brand → search → nav) while visually rendering brand → nav → search. */
.atlas-shell .atlas-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 28px;
  row-gap: 16px;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--atlas-rule);
}

.atlas-shell .atlas-topbar .atlas-brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  order: 0;
  flex-shrink: 0;
}

.atlas-shell .atlas-topbar .atlas-brand-mark {
  font-family: var(--atlas-serif);
  /* WONK 0: sober terminals on the non-italic wordmark. The italic flourishes
     elsewhere (.atlas-em, brand-sub, hero italics) still ride WONK 1 — the
     playful J/g/a only feel right in italic. */
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 0;
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--atlas-ink);
}

.atlas-shell .atlas-topbar .atlas-brand-sub {
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 9, "SOFT" 100, "WONK" 1;
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: var(--atlas-oxblood);
}
/* .atlas-shell .atlas-topbar .atlas-brand-sub::before {
  content: "— ";
  color: var(--atlas-rule);
  margin-right: 2px;
} */

.atlas-shell .atlas-topbar nav {
  display: flex;
  gap: 22px;
  justify-content: flex-end;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-ink-soft);
  order: 1;
  flex-shrink: 0;
}
.atlas-shell .atlas-topbar nav a[aria-current="page"] {
  color: var(--atlas-oxblood);
  border-bottom: 1px solid var(--atlas-oxblood);
  padding-bottom: 4px;
}

.atlas-shell .atlas-cmd {
  /* Search sits on its own row beneath the brand/nav row. Full width within
     the content wrap so the placeholder reads in full. */
  order: 2;
  flex: 1 1 100%;
  width: 100%;
  max-width: none;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-rule);
  border-radius: 999px;
  padding: 10px 18px 10px 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.atlas-shell .atlas-cmd:hover,
.atlas-shell .atlas-cmd:focus-within {
  border-color: var(--atlas-oxblood);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 2px rgba(122, 31, 43, 0.08);
}
.atlas-shell .atlas-cmd::before {
  content: "⌖";
  color: var(--atlas-oxblood);
  margin-right: 12px;
  font-size: 18px;
  flex: none;
}
.atlas-shell .atlas-cmd input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--atlas-sans);
  font-size: 15px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--atlas-ink);
  outline: none;
  min-width: 0;
}
.atlas-shell .atlas-cmd input::placeholder { color: var(--atlas-ink-mute); }
.atlas-shell .atlas-cmd input:focus-visible {
  outline: 2px solid var(--atlas-oxblood);
  outline-offset: 4px;
  border-radius: 2px;
}
.atlas-shell .atlas-cmd kbd {
  font-family: var(--atlas-mono);
  font-size: 11px;
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-rule);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 2px 6px;
  color: var(--atlas-ink-mute);
}


/* ============================================================
 * SECTION HEADING — the three-column title + rule + label pattern
 * ============================================================ */

.atlas-shell .atlas-section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: baseline;
  margin: 0 0 24px;
}
.atlas-shell .atlas-section-head h2 {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 72, "SOFT" 50, "WONK" 0;
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1;
  letter-spacing: -0.022em;
}
.atlas-shell .atlas-section-head h2 em,
.atlas-shell .atlas-section-head h2 .atlas-em {
  font-style: italic;
  font-variation-settings: "opsz" 9, "SOFT" 100, "WONK" 1;
  color: var(--atlas-oxblood);
  font-weight: 350;
}
.atlas-shell .atlas-section-head .atlas-rule {
  height: 1px;
  background: var(--atlas-rule);
  align-self: center;
  margin-bottom: 6px;
}
.atlas-shell .atlas-section-head .atlas-section-label {
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--atlas-ink-mute);
  align-self: center;
  margin-bottom: 6px;
}


/* ============================================================
 * SUMMARY CARD — paper-on-paper with oxblood left rule
 * Used for AI summaries on matter (per attachment) and meeting pages.
 * ============================================================ */

.atlas-shell .atlas-summary {
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-rule);
  border-left: 3px solid var(--atlas-oxblood);
  border-radius: var(--atlas-r-lg);
  padding: 22px 24px 18px;
}
.atlas-shell .atlas-summary-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.atlas-shell .atlas-summary-head .atlas-summary-label {
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--atlas-oxblood);
}
.atlas-shell .atlas-summary-head .atlas-summary-label::before { content: "◇ "; }
.atlas-shell .atlas-summary-head .atlas-ai-pill {
  font-family: var(--atlas-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--atlas-ink-mute);
  border: 1px solid var(--atlas-rule);
  border-radius: 999px;
  padding: 2px 8px 1px;
}
.atlas-shell .atlas-summary p {
  margin: 0 0 12px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-summary h5 {
  margin: 16px 0 8px;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--atlas-ink);
  font-weight: 500;
}
.atlas-shell .atlas-summary h5.keys::before  { content: "▣ "; color: var(--atlas-oxblood); }
.atlas-shell .atlas-summary h5.limits        { color: var(--atlas-heat-deep); }
.atlas-shell .atlas-summary h5.limits::before { content: "▽ "; }
.atlas-shell .atlas-summary ul {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
}
.atlas-shell .atlas-summary ul li {
  position: relative;
  padding: 6px 0 6px 24px;
  border-top: 1px dashed var(--atlas-paper-edge);
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-summary ul li:first-child { border-top: 0; }
.atlas-shell .atlas-summary ul li::before {
  content: "";
  position: absolute;
  left: 4px; top: 14px;
  width: 10px; height: 1px;
  background: var(--atlas-oxblood);
}
.atlas-shell .atlas-summary ul.limits-list li::before { background: var(--atlas-heat); }
.atlas-shell .atlas-summary .atlas-ai-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--atlas-paper-edge);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.atlas-shell .atlas-summary .atlas-ai-note svg { color: var(--atlas-heat); flex: none; }

.atlas-shell .atlas-summary .atlas-summary-status {
  margin: -4px 0 12px;
  padding: 8px 10px;
  background: rgba(217, 102, 63, 0.08);
  border-left: 2px solid var(--atlas-heat);
  font-family: var(--atlas-mono);
  font-size: 11px;
  color: var(--atlas-heat-deep);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* ============================================================
 * FACTS STRIP — horizontal mono-caps facts header
 * ============================================================ */

.atlas-shell .atlas-facts-strip {
  display: grid;
  grid-template-columns: repeat(var(--cols, 6), 1fr);
  border-top: 1px solid var(--atlas-rule);
  border-bottom: 1px solid var(--atlas-rule);
  background: var(--atlas-paper-deep);
  margin: 0;
}
.atlas-shell .atlas-facts-strip > div {
  padding: 14px 16px;
  border-right: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-facts-strip > div:last-child { border-right: 0; }
.atlas-shell .atlas-facts-strip dt {
  font-family: var(--atlas-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--atlas-ink-mute);
  margin-bottom: 6px;
}
.atlas-shell .atlas-facts-strip dd {
  margin: 0;
  font-family: var(--atlas-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.atlas-shell .atlas-facts-strip dd.unknown {
  color: var(--atlas-ink-mute);
  font-weight: 400;
  font-style: italic;
}
.atlas-shell .atlas-facts-strip dd.mono {
  font-family: var(--atlas-mono);
  font-weight: 400;
  font-size: 13px;
}
.atlas-shell .atlas-facts-strip dd a {
  color: var(--atlas-oxblood);
  border-bottom: 1px solid var(--atlas-oxblood);
  padding-bottom: 1px;
}


/* ============================================================
 * DATE PLATE — used for meeting hero, calendar strip, sidebar entries
 * Variants: .atlas-date--xs / --sm / --md / --lg
 * ============================================================ */

.atlas-shell .atlas-date {
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r-lg);
  text-align: center;
  line-height: 1;
  position: relative;
  overflow: hidden;
  display: inline-block;
  text-decoration: none;
}
.atlas-shell .atlas-date::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient( 32deg, rgba(122, 31, 43, 0.05) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(-32deg, rgba(69, 83, 98, 0.04) 0 1px, transparent 1px 22px);
  mix-blend-mode: multiply;
  opacity: 0.6;
}
.atlas-shell .atlas-date > * { position: relative; z-index: 1; display: block; }

.atlas-shell .atlas-date .atlas-date-dow {
  font-family: var(--atlas-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--atlas-ink-mute);
}
.atlas-shell .atlas-date .atlas-date-mo {
  font-family: var(--atlas-mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--atlas-oxblood);
}
.atlas-shell .atlas-date .atlas-date-day {
  font-family: var(--atlas-sans);
  font-weight: 500;
  letter-spacing: -0.05em;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
}
.atlas-shell .atlas-date .atlas-date-yr {
  font-family: var(--atlas-mono);
  letter-spacing: 0.18em;
  color: var(--atlas-ink-mute);
}

/* Sizes */
.atlas-shell .atlas-date--lg { padding: 14px 16px 12px; min-width: 130px; }
.atlas-shell .atlas-date--lg .atlas-date-dow { font-size: 11px; margin-bottom: 8px; }
.atlas-shell .atlas-date--lg .atlas-date-mo  { font-size: 12px; margin-bottom: 6px; }
.atlas-shell .atlas-date--lg .atlas-date-day { font-size: 88px; }
.atlas-shell .atlas-date--lg .atlas-date-yr  { font-size: 11px; margin-top: 6px; }

.atlas-shell .atlas-date--md { padding: 10px 14px 10px; min-width: 96px; }
.atlas-shell .atlas-date--md .atlas-date-mo  { font-size: 12px; margin-bottom: 4px; }
.atlas-shell .atlas-date--md .atlas-date-day { font-size: 44px; }
.atlas-shell .atlas-date--md .atlas-date-yr  { font-size: 10px; margin-top: 4px; }

.atlas-shell .atlas-date--sm { padding: 8px 12px 8px; min-width: 64px; }
.atlas-shell .atlas-date--sm .atlas-date-mo  { font-size: 10px; margin-bottom: 2px; }
.atlas-shell .atlas-date--sm .atlas-date-day { font-size: 28px; }
.atlas-shell .atlas-date--sm .atlas-date-yr  { font-size: 9.5px; margin-top: 4px; }

.atlas-shell .atlas-date--xs { padding: 6px 8px 6px; min-width: 50px; }
.atlas-shell .atlas-date--xs .atlas-date-mo  { font-size: 9px; margin-bottom: 2px; }
.atlas-shell .atlas-date--xs .atlas-date-day { font-size: 22px; }
.atlas-shell .atlas-date--xs .atlas-date-yr  { display: none; }


/* ============================================================
 * TILE — theme or body tile (same shape, different content)
 * Contour-line texture makes it read as a map plate rather than a card.
 * Size variants: --xl --l --m --s
 * Trend variants: --up --hot --flat --down
 * ============================================================ */

.atlas-shell .atlas-tile {
  position: relative;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r-lg);
  padding: 16px 18px 14px;
  color: var(--atlas-ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.atlas-shell .atlas-tile::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient( 32deg, rgba(122, 31, 43, 0.04) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(-32deg, rgba(69, 83, 98, 0.035) 0 1px, transparent 1px 22px);
  mix-blend-mode: multiply;
  opacity: 0.55;
}
.atlas-shell a.atlas-tile:hover {
  transform: translateY(-2px);
  border-color: var(--atlas-oxblood);
  box-shadow: 0 6px 0 -3px var(--atlas-oxblood);
  text-decoration: none;
}

.atlas-shell .atlas-tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.atlas-shell .atlas-tile-name {
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--atlas-ink);
  max-width: 80%;
  margin: 0;
}

.atlas-shell .atlas-tile-trend {
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 3px 7px 2px;
  border-radius: 999px;
  border: 1px solid var(--atlas-rule);
  background: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-tile-trend--up   { color: var(--atlas-oxblood); border-color: var(--atlas-oxblood); background: rgba(122, 31, 43, 0.06); }
.atlas-shell .atlas-tile-trend--hot  { color: var(--atlas-heat);    border-color: var(--atlas-heat);    background: rgba(217, 102, 63, 0.08); }
.atlas-shell .atlas-tile-trend--flat { color: var(--atlas-ink-mute); }
.atlas-shell .atlas-tile-trend--down { color: var(--atlas-slate); border-color: var(--atlas-slate); }

.atlas-shell .atlas-tile svg.atlas-spark {
  margin-top: 8px;
  width: 100%;
  height: 26px;
  color: var(--atlas-slate);
}
.atlas-shell .atlas-tile--up  svg.atlas-spark { color: var(--atlas-oxblood); }
.atlas-shell .atlas-tile--hot svg.atlas-spark { color: var(--atlas-heat); }

.atlas-shell .atlas-tile-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.atlas-shell .atlas-tile-count {
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 36px;
  line-height: 0.9;
  letter-spacing: -0.035em;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.atlas-shell .atlas-tile-count-label {
  font-family: var(--atlas-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-ink-mute);
  text-align: right;
}

/* Tile size variants */
.atlas-shell .atlas-tile--xl .atlas-tile-name  { font-size: 30px; max-width: 70%; }
.atlas-shell .atlas-tile--xl .atlas-tile-count { font-size: 76px; letter-spacing: -0.045em; }
.atlas-shell .atlas-tile--xl svg.atlas-spark   { height: 56px; }

.atlas-shell .atlas-tile--l .atlas-tile-name  { font-size: 22px; }
.atlas-shell .atlas-tile--l .atlas-tile-count { font-size: 54px; letter-spacing: -0.04em; }
.atlas-shell .atlas-tile--l svg.atlas-spark   { height: 36px; }

.atlas-shell .atlas-tile--m .atlas-tile-name  { font-size: 17px; }
.atlas-shell .atlas-tile--m .atlas-tile-count { font-size: 40px; }

.atlas-shell .atlas-tile--s              { padding: 12px 14px 10px; }
.atlas-shell .atlas-tile--s .atlas-tile-name  { font-size: 14px; max-width: 70%; }
.atlas-shell .atlas-tile--s .atlas-tile-count { font-size: 22px; }
.atlas-shell .atlas-tile--s svg.atlas-spark   { display: none; }
.atlas-shell .atlas-tile--s .atlas-tile-bottom { margin-top: 0; }

/* Optional surfaced footer (e.g. "Latest matter" inside an XL tile) */
.atlas-shell .atlas-tile-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--atlas-paper-edge);
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 12, "SOFT" 50, "WONK" 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--atlas-ink-soft);
  max-width: 92%;
  position: relative; z-index: 1;
}
.atlas-shell .atlas-tile-foot b {
  font-family: var(--atlas-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--atlas-oxblood);
  text-transform: uppercase;
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}


/* ============================================================
 * BODY TILE — same paper / contour as theme tile, different content shape.
 * Header row: name + acronym chip. Count. Label. Optional CTA link.
 * ============================================================ */

.atlas-shell .atlas-body-tile {
  position: relative;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r-lg);
  padding: 14px 16px 14px;
  color: var(--atlas-ink);
  overflow: hidden;
  display: block;
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.atlas-shell .atlas-body-tile::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient( 32deg, rgba(122, 31, 43, 0.04) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(-32deg, rgba(69, 83, 98, 0.035) 0 1px, transparent 1px 22px);
  mix-blend-mode: multiply;
  opacity: 0.55;
}
.atlas-shell a.atlas-body-tile:hover { border-color: var(--atlas-oxblood); text-decoration: none; }
.atlas-shell .atlas-body-tile > * { position: relative; z-index: 1; }

.atlas-shell .atlas-body-tile-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.atlas-shell .atlas-body-tile-name {
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 24, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0;
  max-width: 75%;
}
.atlas-shell .atlas-body-tile-acronym {
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--atlas-oxblood);
  border: 1px solid var(--atlas-oxblood);
  border-radius: 999px;
  padding: 2px 7px 1px;
  background: rgba(122, 31, 43, 0.05);
}
.atlas-shell .atlas-body-tile-count {
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.035em;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
  margin: 8px 0 0;
  line-height: 1;
}
.atlas-shell .atlas-body-tile-label {
  font-family: var(--atlas-mono);
  font-size: 10px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-top: 4px;
}
.atlas-shell .atlas-body-tile-cta {
  margin-top: 12px;
  display: block;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  color: var(--atlas-oxblood);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.atlas-shell .atlas-body-tile-cta::after { content: " →"; }


/* ============================================================
 * SPARKLINE — SVG styling. Path color inherits from currentColor
 * so trend variants on the parent tile drive the line color.
 * ============================================================ */

.atlas-shell svg.atlas-spark { display: block; }
/* `vector-effect: non-scaling-stroke` keeps the stroke a uniform 1.6px even
   though `preserveAspectRatio="none"` non-uniformly stretches the viewBox
   to the tile. Without it, near-vertical segments rendered noticeably thinner
   than near-horizontal ones. `stroke-linecap: round` also gives the final
   point a rounded terminator so the trailing dot reads as a uniform circle
   regardless of the aspect ratio. */
.atlas-shell svg.atlas-spark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.atlas-shell svg.atlas-spark circle {
  fill: currentColor;
  /* The circle is a fall-through emphasis dot on top of the linecap. Without
     a vector-effect for fill we can't fully cancel non-uniform scaling, but
     the linecap dot underneath maintains a uniform appearance. */
}


/* ============================================================
 * STATUS / TAG CHIPS — small reusable chip vocabulary
 * ============================================================ */

.atlas-shell .atlas-chip {
  display: inline-block;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r);
  padding: 3px 7px 2px;
  color: var(--atlas-ink);
  background: var(--atlas-paper-deep);
  line-height: 1.4;
  font-weight: 500;
}
.atlas-shell .atlas-chip--pill   { border-radius: 999px; }
.atlas-shell .atlas-chip--oxblood { color: var(--atlas-oxblood); border-color: var(--atlas-oxblood); background: rgba(122, 31, 43, 0.04); }
.atlas-shell .atlas-chip--sage   { color: var(--atlas-sage);    border-color: var(--atlas-sage);    background: transparent; }
.atlas-shell .atlas-chip--heat   { color: var(--atlas-heat);    border-color: var(--atlas-heat);    background: transparent; }
.atlas-shell .atlas-chip--slate  { color: var(--atlas-slate);   border-color: var(--atlas-slate);   background: transparent; }
.atlas-shell .atlas-chip--mute   { color: var(--atlas-ink-mute); }


/* ============================================================
 * FOOTER
 * ============================================================ */

.atlas-shell .atlas-footer {
  border-top: 1px solid var(--atlas-rule);
  margin-top: 28px;
  padding: 24px 0 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-family: var(--atlas-mono);
  font-size: 11px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  flex-wrap: wrap;
}
.atlas-shell .atlas-footer .atlas-em {
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}
.atlas-shell .atlas-footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.atlas-shell .atlas-footer a:hover { color: var(--atlas-oxblood); }


/* ============================================================
 * ANIMATIONS — used sparingly for entrance, with reduced-motion override
 * ============================================================ */

@keyframes atlas-rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.atlas-shell .atlas-rise { animation: atlas-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }

@media (prefers-reduced-motion: reduce) {
  .atlas-shell *,
  .atlas-shell *::before,
  .atlas-shell *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
}


/* ============================================================
 * BREADCRUMB — shared across detail pages.
 * ============================================================ */

.atlas-shell .atlas-crumbs {
  padding: 18px 0 0;
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-ink-mute);
}
.atlas-shell .atlas-crumbs a:hover { color: var(--atlas-oxblood); }
.atlas-shell .atlas-crumbs .atlas-crumbs-sep {
  color: var(--atlas-paper-edge);
  margin: 0 8px;
}


/* ============================================================
 * MATTER DETAIL PAGE — composition for /public/matters/:id (Phase 3).
 * Matter header, two-column body grid (main + side rail), numbered "papers"
 * with summary cards and collapsible extracts, side-rail components.
 * ============================================================ */

/* Header — eyebrow + big title + meta on the left, doc count on the right. */
.atlas-shell .atlas-matter-header {
  padding: 28px 0 28px;
  border-bottom: 1px solid var(--atlas-rule);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: end;
}
.atlas-shell .atlas-matter-eyebrow {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--atlas-oxblood);
  margin: 0 0 14px;
}
.atlas-shell .atlas-matter-eyebrow .atlas-matter-code {
  font-weight: 500;
  border: 1px solid var(--atlas-oxblood);
  border-radius: var(--atlas-r);
  padding: 3px 8px 2px;
  margin-left: 8px;
  background: rgba(122, 31, 43, 0.04);
}
.atlas-shell .atlas-matter-title {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 120, "SOFT" 50, "WONK" 0;
  font-weight: 400;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--atlas-ink);
  max-width: 22ch;
}
.atlas-shell .atlas-matter-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-family: var(--atlas-mono);
  font-size: 11.5px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.atlas-shell .atlas-matter-meta .atlas-matter-theme-tag {
  color: var(--atlas-ink);
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r);
  padding: 4px 8px 3px;
}
.atlas-shell .atlas-matter-meta .atlas-matter-body-name {
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-matter-side {
  text-align: right;
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-ink-mute);
  line-height: 1.8;
}
.atlas-shell .atlas-matter-side .atlas-matter-docs-count {
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 56px;
  color: var(--atlas-ink);
  letter-spacing: -0.04em;
  line-height: 0.9;
  display: block;
  font-variant-numeric: tabular-nums;
  text-transform: none;
}

/* Body grid — main column + 320px sticky rail. */
.atlas-shell .atlas-matter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  padding: 44px 0 56px;
  align-items: start;
}

/* Section heading for "The papers" inherits .atlas-section-head from base. */

/* Jump-to-paper chip nav above the papers. */
.atlas-shell .atlas-papers-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--atlas-rule);
}
.atlas-shell .atlas-papers-toc a {
  font-family: var(--atlas-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 9px 4px;
  border: 1px solid var(--atlas-rule);
  border-radius: 999px;
  color: var(--atlas-ink-soft);
  background: var(--atlas-paper);
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}
.atlas-shell .atlas-papers-toc a:hover {
  border-color: var(--atlas-oxblood);
  color: var(--atlas-oxblood);
  text-decoration: none;
}
.atlas-shell .atlas-papers-toc a .atlas-papers-toc-num {
  font-family: var(--atlas-sans);
  font-weight: 500;
  color: var(--atlas-oxblood);
  font-variant-numeric: tabular-nums;
}

/* Single paper card — numbered marker + body. */
.atlas-shell .atlas-paper {
  margin: 0 0 32px;
  padding: 0 0 32px;
  border-bottom: 1px solid var(--atlas-rule);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
}
.atlas-shell .atlas-paper:last-child { border-bottom: 0; }
.atlas-shell .atlas-paper-num {
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 36px;
  line-height: 1;
  color: var(--atlas-oxblood);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  padding-top: 6px;
}
.atlas-shell .atlas-paper-num small {
  display: block;
  font-size: 10px;
  color: var(--atlas-ink-mute);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 6px;
  font-variant-numeric: normal;
}
.atlas-shell .atlas-paper-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.atlas-shell .atlas-paper h3 {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.atlas-shell .atlas-paper-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.atlas-shell .atlas-paper-file {
  margin-top: 4px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-family: var(--atlas-mono);
  font-size: 11px;
  color: var(--atlas-ink-mute);
}
.atlas-shell .atlas-paper-file .atlas-paper-file-k {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-right: 4px;
}
.atlas-shell .atlas-paper-file .atlas-paper-file-v { color: var(--atlas-ink-soft); }
.atlas-shell .atlas-paper-file .atlas-paper-file-src-missing { color: var(--atlas-heat-deep); }

/* Manual-import disclosure note inside a paper. */
.atlas-shell .atlas-paper-manual {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: rgba(217, 102, 63, 0.06);
  border-left: 2px solid var(--atlas-heat);
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 12, "SOFT" 50, "WONK" 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--atlas-ink-soft);
  border-radius: var(--atlas-r);
}

/* Extracted-text accordion. */
.atlas-shell .atlas-paper-extract {
  margin-top: 14px;
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
  background: var(--atlas-paper-deep);
  overflow: hidden;
}
.atlas-shell .atlas-paper-extract > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--atlas-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-paper-extract > summary::-webkit-details-marker { display: none; }
.atlas-shell .atlas-paper-extract > summary::after {
  content: "+";
  font-family: var(--atlas-sans);
  color: var(--atlas-oxblood);
  font-size: 18px;
  line-height: 1;
}
.atlas-shell .atlas-paper-extract[open] > summary::after { content: "−"; }
.atlas-shell .atlas-paper-extract[open] > summary {
  border-bottom: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-paper-extract-body {
  padding: 16px 18px 18px;
  font-family: var(--atlas-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--atlas-ink-soft);
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.atlas-shell .atlas-paper-extract-body::-webkit-scrollbar { width: 8px; }
.atlas-shell .atlas-paper-extract-body::-webkit-scrollbar-thumb {
  background: var(--atlas-paper-edge);
  border-radius: 999px;
}

/* Inline status note when no extracted text / summary is available. */
.atlas-shell .atlas-paper-status-note {
  margin: 8px 0 0;
  font-family: var(--atlas-mono);
  font-size: 11px;
  color: var(--atlas-ink-mute);
  letter-spacing: 0.06em;
}


/* ============================================================
 * SIDE RAIL — shared sidebar cards (matter + meeting detail pages).
 * ============================================================ */

.atlas-shell .atlas-rail {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.atlas-shell .atlas-rail-card {
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
  padding: 18px;
}
.atlas-shell .atlas-rail-card h4 {
  margin: 0 0 10px;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--atlas-ink-mute);
  font-weight: 500;
}
.atlas-shell .atlas-rail-card h4::before {
  content: "—  ";
  color: var(--atlas-paper-edge);
}

/* Heard-at meeting card. */
.atlas-shell .atlas-rail-mtg {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: start;
}
.atlas-shell .atlas-rail-card .atlas-rail-mtg + .atlas-rail-mtg {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--atlas-paper-edge);
}
.atlas-shell .atlas-rail-mtg .atlas-rail-mtg-body {
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 18, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.atlas-shell .atlas-rail-mtg .atlas-rail-mtg-body a:hover {
  color: var(--atlas-oxblood);
  text-decoration: none;
  border-bottom: 1px solid var(--atlas-oxblood);
}
.atlas-shell .atlas-rail-mtg .atlas-rail-mtg-pos {
  font-family: var(--atlas-mono);
  font-size: 11px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0;
}
.atlas-shell .atlas-rail-mtg .atlas-rail-mtg-pos b {
  color: var(--atlas-oxblood);
  font-weight: 500;
  margin-right: 2px;
}

/* Source record card — definition list of source metadata. */
.atlas-shell .atlas-rail-source dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
}
.atlas-shell .atlas-rail-source dt {
  font-family: var(--atlas-mono);
  font-size: 10px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  align-self: baseline;
}
.atlas-shell .atlas-rail-source dd {
  margin: 0;
  font-family: var(--atlas-sans);
  font-size: 13px;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
}
.atlas-shell .atlas-rail-source dd.atlas-mono {
  font-family: var(--atlas-mono);
  font-size: 12px;
}
.atlas-shell .atlas-rail-source-link {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-oxblood);
  border-bottom: 1px solid var(--atlas-oxblood);
  padding-bottom: 2px;
}
.atlas-shell .atlas-rail-source-link::after { content: " ↗"; }

/* Adjacent matters card — sibling matters from the most recent meeting. */
.atlas-shell .atlas-rail-adjacent .atlas-rail-adjacent-row {
  display: block;
  padding: 10px 0;
  border-top: 1px dashed var(--atlas-paper-edge);
  text-decoration: none;
  color: inherit;
}
.atlas-shell .atlas-rail-adjacent .atlas-rail-adjacent-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.atlas-shell .atlas-rail-adjacent .atlas-rail-adjacent-row:hover .atlas-rail-adjacent-title {
  color: var(--atlas-oxblood);
}
.atlas-shell .atlas-rail-adjacent-title {
  display: block;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 16, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--atlas-ink);
  margin: 0 0 4px;
}
.atlas-shell .atlas-rail-adjacent-meta {
  display: block;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}


/* ============================================================
 * DATA HEALTH — transparency / ingestion status at /data.
 * Header + freshness banner + facts-strip ("what we have") + sections of
 * stat cards + rate meters for reliability + closing about block.
 * ============================================================ */

.atlas-shell .atlas-data-header {
  padding: 28px 0 16px;
  border-bottom: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-data-header .atlas-eyebrow {
  color: var(--atlas-oxblood);
}
.atlas-shell .atlas-data-header h1 {
  margin: 8px 0 12px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.atlas-shell .atlas-data-header p {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 18, "SOFT" 50, "WONK" 0;
  font-weight: 350;
  font-size: 18px;
  line-height: 1.5;
  color: var(--atlas-ink-soft);
  max-width: 70ch;
}

/* Empty-state card for when nothing has been ingested. */
.atlas-shell .atlas-data-empty {
  margin: 28px 0 0;
  padding: 28px 32px;
  background: var(--atlas-paper);
  border: 1px dashed var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
}
.atlas-shell .atlas-data-empty h2 {
  margin: 0 0 8px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 22px;
  letter-spacing: -0.015em;
}
.atlas-shell .atlas-data-empty p {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--atlas-ink-soft);
  max-width: 70ch;
}
.atlas-shell .atlas-data-empty code {
  font-family: var(--atlas-mono);
  font-size: 13px;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r);
  padding: 1px 6px;
}

/* Freshness banner (status dot + last-sync time + source). */
.atlas-shell .atlas-data-freshness {
  margin: 28px 0 0;
  padding: 14px 18px;
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-rule);
  border-left: 3px solid var(--atlas-sage);
  border-radius: var(--atlas-r-lg);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.atlas-shell .atlas-data-freshness--amber   { border-left-color: var(--atlas-amber); }
.atlas-shell .atlas-data-freshness--red     { border-left-color: var(--atlas-heat); }
.atlas-shell .atlas-data-freshness--unknown { border-left-color: var(--atlas-ink-mute); }

.atlas-shell .atlas-data-freshness-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--atlas-sage);
  flex: none;
}
.atlas-shell .atlas-data-freshness--amber   .atlas-data-freshness-dot { background: var(--atlas-amber); }
.atlas-shell .atlas-data-freshness--red     .atlas-data-freshness-dot { background: var(--atlas-heat); }
.atlas-shell .atlas-data-freshness--unknown .atlas-data-freshness-dot { background: var(--atlas-ink-mute); }

.atlas-shell .atlas-data-freshness-status {
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--atlas-ink);
}
.atlas-shell .atlas-data-freshness-source {
  margin-left: auto;
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-ink-mute);
}

/* Section heading + content blocks. */
.atlas-shell .atlas-data-section { padding-top: 44px; }
.atlas-shell .atlas-data-section .atlas-section-head { margin-bottom: 18px; }
.atlas-shell .atlas-data-section-note {
  margin: 0 0 14px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--atlas-ink-soft);
  max-width: 75ch;
}

/* Grid of stat cards. */
.atlas-shell .atlas-data-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0;
}
.atlas-shell .atlas-data-stat {
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r-lg);
  padding: 14px 16px;
}
.atlas-shell .atlas-data-stat dt {
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--atlas-ink-mute);
  margin-bottom: 6px;
}
.atlas-shell .atlas-data-stat dd {
  margin: 0;
}
.atlas-shell .atlas-data-stat strong {
  display: inline-block;
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
}
.atlas-shell .atlas-data-stat span {
  display: block;
  margin-top: 4px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 12, "SOFT" 50, "WONK" 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-data-stat .atlas-data-stat-sep {
  display: inline-block;
  color: var(--atlas-paper-edge);
  margin: 0 8px;
  font-weight: 400;
}

/* Rate meters — coverage percentages. */
.atlas-shell .atlas-data-rate {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
}
.atlas-shell .atlas-data-rate-label {
  font-family: var(--atlas-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--atlas-ink);
  margin-bottom: 8px;
}
.atlas-shell .atlas-data-rate-bar {
  background: var(--atlas-paper-edge);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
.atlas-shell .atlas-data-rate-fill {
  height: 100%;
  background: var(--atlas-sage);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.atlas-shell .atlas-data-rate-fill--mid { background: var(--atlas-amber); }
.atlas-shell .atlas-data-rate-fill--low { background: var(--atlas-heat); }
.atlas-shell .atlas-data-rate-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-ink-mute);
}
.atlas-shell .atlas-data-rate-value strong {
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
  text-transform: none;
}

/* Closing "About this page" block. */
.atlas-shell .atlas-data-about {
  margin-top: 44px;
  padding: 22px 24px;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r-lg);
}
.atlas-shell .atlas-data-about h3 {
  margin: 0 0 10px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 24, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 18px;
  letter-spacing: -0.012em;
}
.atlas-shell .atlas-data-about p {
  margin: 0 0 12px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-data-about p:last-child { margin-bottom: 0; }
.atlas-shell .atlas-data-about ul {
  margin: 0 0 12px 0;
  padding-left: 18px;
}
.atlas-shell .atlas-data-about ul ul { margin: 4px 0; }
.atlas-shell .atlas-data-about li {
  font-family: var(--atlas-serif);
  font-size: 14px;
  line-height: 1.45;
  color: var(--atlas-ink-soft);
  margin: 4px 0;
}
.atlas-shell .atlas-data-about code {
  font-family: var(--atlas-mono);
  font-size: 12.5px;
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r);
  padding: 1px 5px;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-data-about a {
  color: var(--atlas-oxblood);
  border-bottom: 1px dotted var(--atlas-oxblood);
  padding-bottom: 1px;
}
.atlas-shell .atlas-data-about a:hover {
  text-decoration: none;
  border-bottom-style: solid;
}

/* AI-disclaimer line at the bottom. */
.atlas-shell .atlas-data-ai-note {
  margin-top: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--atlas-mono);
  font-size: 11px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-top: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-data-ai-note svg {
  color: var(--atlas-heat);
  flex: none;
}


/* ============================================================
 * ROUNDUPS — monthly recap index (/roundups) and show
 * (/roundups/:period). Index is a grid of period cards. Show
 * is an editorial article: hero + storyline + numbered lists
 * of decisions / introductions / meeting highlights.
 * ============================================================ */

.atlas-shell .atlas-roundups-header {
  padding: 28px 0 16px;
  border-bottom: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-roundups-header .atlas-eyebrow {
  color: var(--atlas-oxblood);
}
.atlas-shell .atlas-roundups-header h1 {
  margin: 8px 0 12px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.atlas-shell .atlas-roundups-header p {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 18, "SOFT" 50, "WONK" 0;
  font-weight: 350;
  font-size: 18px;
  line-height: 1.5;
  color: var(--atlas-ink-soft);
}

/* Index — grid of past months. */
.atlas-shell .atlas-roundups-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.atlas-shell .atlas-roundup-period-card {
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
  padding: 18px 22px 16px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.atlas-shell .atlas-roundup-period-card:hover {
  border-color: var(--atlas-oxblood);
  box-shadow: inset 3px 0 0 var(--atlas-oxblood);
  text-decoration: none;
}
.atlas-shell .atlas-roundup-period-label {
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 72, "SOFT" 50, "WONK" 0;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--atlas-ink);
}
.atlas-shell .atlas-roundup-period-cta {
  margin-top: 6px;
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-oxblood);
}
.atlas-shell .atlas-roundup-period-cta::after { content: " →"; }

/* Show — editorial hero. */
.atlas-shell .atlas-roundup-hero {
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-roundup-hero .atlas-eyebrow {
  color: var(--atlas-oxblood);
}
.atlas-shell .atlas-roundup-hero h1 {
  margin: 8px 0 14px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--atlas-ink);
}
.atlas-shell .atlas-roundup-intro {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 20, "SOFT" 50, "WONK" 0;
  font-weight: 350;
  font-size: 19px;
  line-height: 1.5;
  color: var(--atlas-ink-soft);
  max-width: 70ch;
}

/* Storyline — paper-on-paper card with oxblood left rule. */
.atlas-shell .atlas-roundup-storyline {
  margin-top: 32px;
  padding: 24px 28px 22px;
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-rule);
  border-left: 3px solid var(--atlas-oxblood);
  border-radius: var(--atlas-r-lg);
}
.atlas-shell .atlas-roundup-storyline > .atlas-eyebrow {
  color: var(--atlas-oxblood);
}
.atlas-shell .atlas-roundup-storyline > .atlas-eyebrow::before { content: "◇ "; }
.atlas-shell .atlas-roundup-highlights {
  margin: 14px 0 18px;
  padding: 0;
  list-style: none;
}
.atlas-shell .atlas-roundup-highlights li {
  position: relative;
  padding: 6px 0 6px 24px;
  border-top: 1px dashed var(--atlas-paper-edge);
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 16, "SOFT" 50, "WONK" 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-roundup-highlights li:first-child { border-top: 0; }
.atlas-shell .atlas-roundup-highlights li::before {
  content: "";
  position: absolute;
  left: 4px; top: 16px;
  width: 10px; height: 1px;
  background: var(--atlas-oxblood);
}
.atlas-shell .atlas-roundup-storyline p {
  margin: 0 0 12px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 16, "SOFT" 50, "WONK" 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-roundup-storyline p:last-child { margin-bottom: 0; }

/* Numbered item lists (decisions / introduced / meetings). */
.atlas-shell .atlas-roundup-section { padding: 44px 0 0; }
.atlas-shell .atlas-roundup-items {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-roundup-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--atlas-rule);
  align-items: start;
}
.atlas-shell .atlas-roundup-item-num {
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 32px;
  line-height: 1;
  color: var(--atlas-oxblood);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.atlas-shell .atlas-roundup-item-body { min-width: 0; }
.atlas-shell .atlas-roundup-item-code {
  display: inline-block;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--atlas-oxblood);
  border: 1px solid var(--atlas-oxblood);
  border-radius: var(--atlas-r);
  padding: 2px 7px 1px;
  background: rgba(122, 31, 43, 0.04);
  margin-bottom: 8px;
  font-weight: 500;
  line-height: 1.4;
}
.atlas-shell .atlas-roundup-item-title {
  display: block;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--atlas-ink);
  margin: 0 0 6px;
}
.atlas-shell .atlas-roundup-item-title a {
  color: inherit;
  text-decoration: none;
}
.atlas-shell .atlas-roundup-item-title a:hover {
  color: var(--atlas-oxblood);
  text-decoration: none;
  border-bottom: 1px solid var(--atlas-oxblood);
}
.atlas-shell .atlas-roundup-item-meta {
  display: block;
  font-family: var(--atlas-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--atlas-ink-mute);
  margin-bottom: 6px;
}
.atlas-shell .atlas-roundup-item-blurb {
  margin: 8px 0 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--atlas-ink-soft);
}

/* Empty state on the index. */
.atlas-shell .atlas-roundups-empty {
  margin-top: 28px;
  padding: 36px 28px;
  background: var(--atlas-paper);
  border: 1px dashed var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 18, "SOFT" 50, "WONK" 0;
  font-size: 18px;
  color: var(--atlas-ink-soft);
  text-align: center;
}


/* ============================================================
 * GLOSSARY — plain-language reference page at /glossary.
 * Header + intro note + grouped grids of term cards + sources block.
 * ============================================================ */

.atlas-shell .atlas-glossary-header {
  padding: 28px 0 16px;
  border-bottom: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-glossary-header .atlas-eyebrow {
  color: var(--atlas-oxblood);
}
.atlas-shell .atlas-glossary-header h1 {
  margin: 8px 0 12px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.atlas-shell .atlas-glossary-header p {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 18, "SOFT" 50, "WONK" 0;
  font-weight: 350;
  font-size: 18px;
  line-height: 1.5;
  color: var(--atlas-ink-soft);
}

.atlas-shell .atlas-glossary-note {
  margin: 24px 0 0;
  padding: 16px 20px;
  background: var(--atlas-paper-deep);
  border-radius: var(--atlas-r-lg);
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-glossary-note p { margin: 0; }

.atlas-shell .atlas-glossary-section {
  padding: 44px 0 0;
}

.atlas-shell .atlas-glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.atlas-shell .atlas-glossary-term {
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
  padding: 18px 20px 16px;
}
.atlas-shell .atlas-glossary-term h3 {
  margin: 0 0 8px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--atlas-ink);
}
.atlas-shell .atlas-glossary-term p {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-glossary-term p + p { margin-top: 10px; }
.atlas-shell .atlas-glossary-term--wide {
  grid-column: 1 / -1;
  margin-top: 16px;
  border-left: 3px solid var(--atlas-oxblood);
}
.atlas-shell .atlas-glossary-term--wide h3 { font-size: 20px; }
.atlas-shell .atlas-glossary-term--wide p { font-size: 15.5px; }
.atlas-shell .atlas-glossary-term code {
  font-family: var(--atlas-mono);
  font-size: 12.5px;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r);
  padding: 1px 5px;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-glossary-term a {
  color: var(--atlas-oxblood);
  border-bottom: 1px dotted var(--atlas-oxblood);
  padding-bottom: 1px;
}
.atlas-shell .atlas-glossary-term a:hover {
  text-decoration: none;
  border-bottom-style: solid;
}

/* Sources block — references list at the bottom. */
.atlas-shell .atlas-glossary-sources {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-glossary-sources ol {
  margin: 16px 0 0;
  padding-left: 22px;
}
.atlas-shell .atlas-glossary-sources li {
  margin: 8px 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 12, "SOFT" 50, "WONK" 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-glossary-sources li a {
  color: var(--atlas-oxblood);
  border-bottom: 1px dotted var(--atlas-oxblood);
  padding-bottom: 1px;
}


/* ============================================================
 * MEETINGS INDEX — listing page for /public/meetings (Phase 5).
 * Same general shape as the matters index (header, banner, filter form,
 * list of rows, empty state) but rows lead with a medium date plate and
 * surface agenda-item previews. Adds a month-nav strip above the list.
 * ============================================================ */

.atlas-shell .atlas-meetings-header {
  padding: 28px 0 16px;
  border-bottom: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-meetings-header .atlas-eyebrow {
  color: var(--atlas-oxblood);
}
.atlas-shell .atlas-meetings-header h1 {
  margin: 8px 0 12px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
  font-weight: 400;
  font-size: clamp(44px, 6.5vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.atlas-shell .atlas-meetings-header .atlas-meetings-header-lede {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 18, "SOFT" 50, "WONK" 0;
  font-weight: 350;
  font-size: 18px;
  line-height: 1.45;
  color: var(--atlas-ink-soft);
}

/* Month nav strip (prev / current / next), filter-preserving. */
.atlas-shell .atlas-meetings-monthnav {
  margin: 22px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 18px;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r-lg);
}
.atlas-shell .atlas-meetings-monthnav a {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-oxblood);
  border-bottom: 1px solid var(--atlas-oxblood);
  padding-bottom: 1px;
}
.atlas-shell .atlas-meetings-monthnav a:hover { color: var(--atlas-oxblood-deep); text-decoration: none; }
.atlas-shell .atlas-meetings-monthnav strong {
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 36, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--atlas-ink);
}

/* Active-filter banner (body filter only — query is implicit in the form). */
.atlas-shell .atlas-meetings-banner {
  margin: 22px 0 0;
  padding: 14px 18px;
  background: var(--atlas-paper-deep);
  border-left: 3px solid var(--atlas-oxblood);
  border-radius: var(--atlas-r-lg);
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  font-size: 15px;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-meetings-banner strong {
  color: var(--atlas-ink);
  font-weight: 500;
}
.atlas-shell .atlas-meetings-banner .atlas-meetings-banner-clear {
  margin-left: 8px;
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-oxblood);
  border-bottom: 1px solid var(--atlas-oxblood);
  padding-bottom: 1px;
}

/* Search + body-filter form (matches matters-filter shape). */
.atlas-shell .atlas-meetings-filter {
  margin: 22px 0 36px;
  display: grid;
  gap: 10px 12px;
}
.atlas-shell .atlas-meetings-filter > label {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--atlas-ink-mute);
}
.atlas-shell .atlas-meetings-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.atlas-shell .atlas-meetings-filter input[type="search"] {
  flex: 1 1 280px;
  min-width: 0;
  font-family: var(--atlas-sans);
  font-size: 15px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
  padding: 10px 14px;
  color: var(--atlas-ink);
  outline: none;
}
.atlas-shell .atlas-meetings-filter input[type="search"]:focus {
  border-color: var(--atlas-oxblood);
  box-shadow: 0 0 0 2px rgba(122, 31, 43, 0.08);
}
.atlas-shell .atlas-meetings-filter select {
  font-family: var(--atlas-sans);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
  padding: 10px 28px 10px 14px;
  color: var(--atlas-ink);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--atlas-oxblood) 50%),
                    linear-gradient(135deg, var(--atlas-oxblood) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}
.atlas-shell .atlas-meetings-filter input[type="submit"] {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-paper);
  background: var(--atlas-oxblood);
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
}
.atlas-shell .atlas-meetings-filter input[type="submit"]:hover { background: var(--atlas-oxblood-deep); }
.atlas-shell .atlas-meetings-filter .atlas-meetings-filter-clear {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-ink-mute);
  border-bottom: 1px dotted var(--atlas-rule);
  padding-bottom: 1px;
  margin-left: 4px;
}
.atlas-shell .atlas-meetings-filter .atlas-meetings-filter-clear:hover {
  color: var(--atlas-oxblood);
  border-bottom-color: var(--atlas-oxblood);
  text-decoration: none;
}

/* Results count line. */
.atlas-shell .atlas-meetings-count {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-ink-mute);
  margin: 0 0 12px;
}
.atlas-shell .atlas-meetings-count strong {
  color: var(--atlas-ink);
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Results list. */
.atlas-shell .atlas-meetings-results {
  border-top: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-meeting-row {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  column-gap: 24px;
  align-items: start;
  padding: 22px 16px 22px 14px;
  border-bottom: 1px solid var(--atlas-rule);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  border-radius: var(--atlas-r-lg);
}
.atlas-shell .atlas-meeting-row:hover {
  background: rgba(122, 31, 43, 0.04);
  box-shadow: inset 3px 0 0 var(--atlas-oxblood);
}
.atlas-shell .atlas-meeting-row-body { min-width: 0; }

.atlas-shell .atlas-meeting-row h2 {
  margin: 0 0 8px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--atlas-ink);
}
.atlas-shell .atlas-meeting-row h2 a { color: inherit; text-decoration: none; }
.atlas-shell .atlas-meeting-row h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--atlas-r-lg);
  z-index: 0;
}
.atlas-shell .atlas-meeting-row:hover h2 a { color: var(--atlas-oxblood); }

.atlas-shell .atlas-meeting-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  font-family: var(--atlas-mono);
  font-size: 11.5px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.atlas-shell .atlas-meeting-row-meta .atlas-meeting-row-body-name {
  color: var(--atlas-ink-soft);
}

/* Agenda items preview inside the row. */
.atlas-shell .atlas-meeting-row-preview {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--atlas-paper-edge);
}
.atlas-shell .atlas-meeting-row-preview-label {
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-oxblood);
  margin: 0 0 6px;
}
.atlas-shell .atlas-meeting-row-preview-label::before { content: "◇ "; }
.atlas-shell .atlas-meeting-row-preview ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.atlas-shell .atlas-meeting-row-preview li {
  margin: 4px 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 12, "SOFT" 50, "WONK" 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-meeting-row-preview li a {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--atlas-oxblood);
  border-bottom: 1px dotted var(--atlas-oxblood);
  margin-right: 8px;
  padding-bottom: 1px;
}
.atlas-shell .atlas-meeting-row-preview .atlas-meeting-row-preview-more {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-ink-mute);
  border-bottom: 1px dotted var(--atlas-rule);
  padding-bottom: 1px;
}
.atlas-shell .atlas-meeting-row-preview .atlas-meeting-row-preview-more:hover {
  color: var(--atlas-oxblood);
  border-bottom-color: var(--atlas-oxblood);
  text-decoration: none;
}

/* Right-side facts column for the row. */
.atlas-shell .atlas-meeting-row-facts {
  margin: 0;
  align-self: center;
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px 16px;
}
.atlas-shell .atlas-meeting-row-facts > div {
  display: flex;
  flex-direction: column;
}
.atlas-shell .atlas-meeting-row-facts dt {
  font-family: var(--atlas-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-ink-mute);
  margin-bottom: 2px;
}
.atlas-shell .atlas-meeting-row-facts dd {
  margin: 0;
  font-family: var(--atlas-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
}
.atlas-shell .atlas-meeting-row-facts dd.unknown {
  color: var(--atlas-ink-mute);
  font-style: italic;
  font-weight: 400;
}

/* Empty state. */
.atlas-shell .atlas-meetings-empty {
  padding: 36px 28px;
  background: var(--atlas-paper);
  border: 1px dashed var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 18, "SOFT" 50, "WONK" 0;
  font-size: 18px;
  color: var(--atlas-ink-soft);
  text-align: center;
}


/* ============================================================
 * MEETING DETAIL — composition for /public/events/:id (Phase 4).
 * Header (date plate + body title + status chips + matters count),
 * facts strip, AI summary card, tiered agenda
 * (sections + substantive matter rows + folded notices), side rail.
 * ============================================================ */

.atlas-shell .atlas-mtg-header {
  padding: 28px 0;
  border-bottom: 1px solid var(--atlas-rule);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: end;
}
.atlas-shell .atlas-mtg-headline {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: end;
}
.atlas-shell .atlas-mtg-eyebrow {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--atlas-oxblood);
  margin: 0 0 12px;
}
.atlas-shell .atlas-mtg-title {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 120, "SOFT" 50, "WONK" 0;
  font-weight: 400;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--atlas-ink);
}
.atlas-shell .atlas-mtg-title em,
.atlas-shell .atlas-mtg-title .atlas-em {
  font-variation-settings: "opsz" 9, "SOFT" 100, "WONK" 1;
  color: var(--atlas-oxblood);
  font-style: italic;
  font-weight: 350;
}
.atlas-shell .atlas-mtg-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-family: var(--atlas-mono);
  font-size: 11.5px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.atlas-shell .atlas-mtg-side {
  text-align: right;
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-ink-mute);
  line-height: 1.8;
}
.atlas-shell .atlas-mtg-side .atlas-mtg-matters-count {
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 64px;
  color: var(--atlas-ink);
  letter-spacing: -0.045em;
  line-height: 0.9;
  display: block;
  font-variant-numeric: tabular-nums;
  text-transform: none;
}

/* Body grid for meeting detail — same shape as matter page. */
.atlas-shell .atlas-mtg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  padding: 44px 0 56px;
  align-items: start;
}
.atlas-shell .atlas-mtg-grid > .atlas-mtg-main { min-width: 0; }

/* Agenda container. */
.atlas-shell .atlas-agenda {
  display: flex;
  flex-direction: column;
}

/* Section heading row — agenda scope marker like (a), (b), (d). */
.atlas-shell .atlas-ag-section {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  padding: 24px 0 14px;
  border-top: 1px solid var(--atlas-rule);
  align-items: baseline;
}
.atlas-shell .atlas-ag-section:first-child { border-top: 0; }
.atlas-shell .atlas-ag-section .atlas-ag-marker {
  font-family: var(--atlas-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--atlas-oxblood);
  text-transform: uppercase;
  padding-top: 6px;
}
.atlas-shell .atlas-ag-section h3 {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 36, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--atlas-ink);
}
.atlas-shell .atlas-ag-section h3 em,
.atlas-shell .atlas-ag-section h3 .atlas-em {
  font-variation-settings: "opsz" 9, "SOFT" 100, "WONK" 1;
  color: var(--atlas-ink-mute);
  font-style: italic;
  font-weight: 350;
  font-size: 16px;
}
.atlas-shell .atlas-ag-section .atlas-ag-note {
  margin-top: 6px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 12, "SOFT" 50, "WONK" 0;
  font-size: 14px;
  color: var(--atlas-ink-mute);
  line-height: 1.5;
  max-width: 70ch;
}

/* Substantive matter row inside the agenda. Stretched-link pattern. */
.atlas-shell .atlas-ag-matter {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  column-gap: 22px;
  align-items: start;
  padding: 20px 16px 20px 14px;
  margin-left: 24px;
  border-top: 1px dashed var(--atlas-paper-edge);
  border-radius: var(--atlas-r-lg);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.atlas-shell .atlas-ag-matter:first-of-type { border-top: 0; }
.atlas-shell .atlas-ag-matter:hover {
  background: rgba(122, 31, 43, 0.04);
  box-shadow: inset 3px 0 0 var(--atlas-oxblood);
}
.atlas-shell .atlas-ag-matter .atlas-ag-item-num {
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 32px;
  color: var(--atlas-oxblood);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding-top: 2px;
}
.atlas-shell .atlas-ag-matter .atlas-ag-item-num small {
  display: block;
  font-family: var(--atlas-mono);
  font-size: 9.5px;
  color: var(--atlas-ink-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 6px;
  font-weight: 500;
}
.atlas-shell .atlas-ag-matter .atlas-ag-item-body { min-width: 0; }
.atlas-shell .atlas-ag-matter .atlas-ag-item-code {
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--atlas-oxblood);
  border: 1px solid var(--atlas-oxblood);
  border-radius: var(--atlas-r);
  padding: 2px 7px 1px;
  background: rgba(122, 31, 43, 0.04);
  display: inline-block;
  margin-bottom: 10px;
  font-weight: 500;
  line-height: 1.4;
}
.atlas-shell .atlas-ag-matter h4 {
  margin: 0 0 10px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--atlas-ink);
}
.atlas-shell .atlas-ag-matter h4 a { color: inherit; text-decoration: none; }
.atlas-shell .atlas-ag-matter h4 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--atlas-r-lg);
  z-index: 0;
}
.atlas-shell .atlas-ag-matter:hover h4 a { color: var(--atlas-oxblood); }
.atlas-shell .atlas-ag-matter .atlas-ag-item-theme {
  display: inline-block;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--atlas-ink);
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r);
  padding: 3px 7px 2px;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}
.atlas-shell .atlas-ag-matter .atlas-ag-att-line {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-family: var(--atlas-mono);
  font-size: 11px;
  color: var(--atlas-ink-mute);
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}
.atlas-shell .atlas-ag-matter .atlas-ag-att-count {
  color: var(--atlas-ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.atlas-shell .atlas-ag-matter .atlas-ag-att-count::after {
  content: "·";
  color: var(--atlas-paper-edge);
  margin-left: 8px;
}
.atlas-shell .atlas-ag-matter .atlas-ag-att-line a.atlas-ag-att {
  color: var(--atlas-ink-soft);
  border-bottom: 1px dotted var(--atlas-rule);
  padding-bottom: 1px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11.5px;
}
.atlas-shell .atlas-ag-matter .atlas-ag-att-line a.atlas-ag-att + a.atlas-ag-att::before {
  content: "·";
  color: var(--atlas-paper-edge);
  margin-right: 8px;
  margin-left: -2px;
  border-bottom: 0;
}
.atlas-shell .atlas-ag-matter .atlas-ag-att-line a.atlas-ag-att:hover {
  color: var(--atlas-oxblood);
  border-bottom-color: var(--atlas-oxblood);
  text-decoration: none;
}
.atlas-shell .atlas-ag-matter .atlas-ag-arrow {
  align-self: center;
  font-family: var(--atlas-mono);
  font-size: 18px;
  color: var(--atlas-ink-mute);
  padding-left: 8px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.atlas-shell .atlas-ag-matter:hover .atlas-ag-arrow {
  color: var(--atlas-oxblood);
  transform: translateX(3px);
}

/* Matter-pending hint (Linked matter sync pending). */
.atlas-shell .atlas-ag-matter-pending {
  font-family: var(--atlas-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--atlas-heat-deep);
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

/* Folded notices panel. */
.atlas-shell .atlas-notices {
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r-lg);
  padding: 22px 24px 8px;
  margin-top: 32px;
}
.atlas-shell .atlas-notices-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 10px;
}
.atlas-shell .atlas-notices-head h3 {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.015em;
}
.atlas-shell .atlas-notices-head h3 em,
.atlas-shell .atlas-notices-head h3 .atlas-em {
  font-variation-settings: "opsz" 9, "SOFT" 100, "WONK" 1;
  color: var(--atlas-oxblood);
  font-style: italic;
  font-weight: 350;
}
.atlas-shell .atlas-notices-head .atlas-notices-src {
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.atlas-shell details.atlas-notice {
  border-top: 1px dashed var(--atlas-paper-edge);
  padding: 12px 0;
}
.atlas-shell details.atlas-notice:first-of-type {
  border-top: 1px solid var(--atlas-rule);
  margin-top: 14px;
}
.atlas-shell details.atlas-notice > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--atlas-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--atlas-ink);
  letter-spacing: -0.005em;
}
.atlas-shell details.atlas-notice > summary::-webkit-details-marker { display: none; }
.atlas-shell details.atlas-notice > summary .atlas-notice-icn {
  font-family: var(--atlas-mono);
  color: var(--atlas-oxblood);
  font-size: 16px;
  line-height: 1;
  flex: none;
}
.atlas-shell details.atlas-notice > summary .atlas-notice-icn::before { content: "+"; }
.atlas-shell details.atlas-notice[open] > summary .atlas-notice-icn::before { content: "−"; }
.atlas-shell details.atlas-notice .atlas-notice-body {
  margin-top: 10px;
  padding-left: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 12, "SOFT" 50, "WONK" 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--atlas-ink-soft);
  max-width: 70ch;
  white-space: pre-wrap;
}

/* Side-rail themes-on-agenda mini list. */
.atlas-shell .atlas-rail-themes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.atlas-shell .atlas-rail-themes a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--atlas-sans);
  font-size: 14px;
  padding: 8px 12px;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r-lg);
  color: var(--atlas-ink);
  text-decoration: none;
}
.atlas-shell .atlas-rail-themes a:hover {
  border-color: var(--atlas-oxblood);
  text-decoration: none;
}
.atlas-shell .atlas-rail-themes .atlas-rail-themes-count {
  font-family: var(--atlas-mono);
  font-size: 10px;
  color: var(--atlas-oxblood);
  border: 1px solid var(--atlas-oxblood);
  border-radius: 999px;
  padding: 2px 7px 1px;
  background: rgba(122, 31, 43, 0.05);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Adjacent meeting sibling row. */
.atlas-shell .atlas-rail-sibling {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px dashed var(--atlas-paper-edge);
  text-decoration: none;
  color: inherit;
}
.atlas-shell .atlas-rail-sibling:first-of-type { border-top: 0; padding-top: 0; }
.atlas-shell .atlas-rail-sibling:hover { background: rgba(122, 31, 43, 0.025); border-radius: var(--atlas-r-lg); }
.atlas-shell .atlas-rail-sibling .atlas-rail-sibling-where {
  font-family: var(--atlas-sans);
  font-size: 13px;
  color: var(--atlas-ink);
  line-height: 1.25;
}
.atlas-shell .atlas-rail-sibling .atlas-rail-sibling-where small {
  display: block;
  font-family: var(--atlas-mono);
  font-size: 10px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-top: 2px;
}
.atlas-shell .atlas-rail-sibling .atlas-rail-sibling-arrow {
  font-family: var(--atlas-mono);
  font-size: 14px;
  color: var(--atlas-ink-mute);
}
.atlas-shell .atlas-rail-sibling:hover .atlas-rail-sibling-arrow { color: var(--atlas-oxblood); }


/* ============================================================
 * MATTERS INDEX — listing page for /public/matters (Phase 5 early).
 * Page header + theme-active banner + filter form + scrollable list of
 * matter rows. Rows reuse the agenda-matter pattern: date plate, code chip,
 * serif title, theme tag, attachment count, with a stretched primary link.
 * ============================================================ */

.atlas-shell .atlas-matters-header {
  padding: 28px 0 16px;
  border-bottom: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-matters-header .atlas-eyebrow {
  color: var(--atlas-oxblood);
}
.atlas-shell .atlas-matters-header h1 {
  margin: 8px 0 12px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
  font-weight: 400;
  font-size: clamp(44px, 6.5vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.atlas-shell .atlas-matters-header .atlas-matters-header-lede {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 18, "SOFT" 50, "WONK" 0;
  font-weight: 350;
  font-size: 18px;
  line-height: 1.45;
  color: var(--atlas-ink-soft);
  max-width: 60ch;
}

/* Theme-active banner ("Showing matters tagged Housing…") */
.atlas-shell .atlas-matters-banner {
  margin: 22px 0 0;
  padding: 14px 18px;
  background: var(--atlas-paper-deep);
  border-left: 3px solid var(--atlas-oxblood);
  border-radius: var(--atlas-r-lg);
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  font-size: 15px;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-matters-banner strong {
  color: var(--atlas-ink);
  font-weight: 500;
}
.atlas-shell .atlas-matters-banner .atlas-matters-banner-clear {
  margin-left: 8px;
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-oxblood);
  border-bottom: 1px solid var(--atlas-oxblood);
  padding-bottom: 1px;
}

/* Filter form — search + theme select + submit + clear */
.atlas-shell .atlas-matters-filter {
  margin: 28px 0 36px;
  display: grid;
  gap: 10px 12px;
}
.atlas-shell .atlas-matters-filter > label {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--atlas-ink-mute);
}
.atlas-shell .atlas-matters-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.atlas-shell .atlas-matters-filter input[type="search"] {
  flex: 1 1 280px;
  min-width: 0;
  font-family: var(--atlas-sans);
  font-size: 15px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
  padding: 10px 14px;
  color: var(--atlas-ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.atlas-shell .atlas-matters-filter input[type="search"]::placeholder {
  color: var(--atlas-ink-mute);
}
.atlas-shell .atlas-matters-filter input[type="search"]:focus {
  border-color: var(--atlas-oxblood);
  box-shadow: 0 0 0 2px rgba(122, 31, 43, 0.08);
}
.atlas-shell .atlas-matters-filter select {
  font-family: var(--atlas-sans);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
  padding: 10px 28px 10px 14px;
  color: var(--atlas-ink);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--atlas-oxblood) 50%),
                    linear-gradient(135deg, var(--atlas-oxblood) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}
.atlas-shell .atlas-matters-filter input[type="submit"] {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-paper);
  background: var(--atlas-oxblood);
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.atlas-shell .atlas-matters-filter input[type="submit"]:hover {
  background: var(--atlas-oxblood-deep);
}
.atlas-shell .atlas-matters-filter .atlas-matters-filter-clear {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-ink-mute);
  border-bottom: 1px dotted var(--atlas-rule);
  padding-bottom: 1px;
  margin-left: 4px;
}
.atlas-shell .atlas-matters-filter .atlas-matters-filter-clear:hover {
  color: var(--atlas-oxblood);
  border-bottom-color: var(--atlas-oxblood);
  text-decoration: none;
}

/* Results count line — small mono caps. */
.atlas-shell .atlas-matters-count {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-ink-mute);
  margin: 0 0 12px;
}
.atlas-shell .atlas-matters-count strong {
  color: var(--atlas-ink);
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* List of matter rows. */
.atlas-shell .atlas-matters-results {
  border-top: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-matter-row {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  column-gap: 24px;
  align-items: start;
  padding: 22px 16px 22px 14px;
  border-bottom: 1px solid var(--atlas-rule);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  border-radius: var(--atlas-r-lg);
}
.atlas-shell .atlas-matter-row:hover {
  background: rgba(122, 31, 43, 0.04);
  box-shadow: inset 3px 0 0 var(--atlas-oxblood);
}
.atlas-shell .atlas-matter-row-body { min-width: 0; }

.atlas-shell .atlas-matter-row-code {
  display: inline-block;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--atlas-oxblood);
  border: 1px solid var(--atlas-oxblood);
  border-radius: var(--atlas-r);
  padding: 2px 7px 1px;
  background: rgba(122, 31, 43, 0.04);
  margin-bottom: 10px;
  font-weight: 500;
  line-height: 1.4;
}

.atlas-shell .atlas-matter-row h2 {
  margin: 0 0 8px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--atlas-ink);
}
.atlas-shell .atlas-matter-row h2 a {
  color: inherit;
  text-decoration: none;
}
/* Stretched-link overlay — the title link spans the whole row. */
.atlas-shell .atlas-matter-row h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--atlas-r-lg);
  z-index: 0;
}
.atlas-shell .atlas-matter-row:hover h2 a { color: var(--atlas-oxblood); }

.atlas-shell .atlas-matter-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  font-family: var(--atlas-mono);
  font-size: 11.5px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.atlas-shell .atlas-matter-row-meta .atlas-matter-row-body-name {
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-matter-row-tag {
  display: inline-block;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--atlas-ink);
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r);
  padding: 3px 7px 2px;
  position: relative;
  z-index: 1;
  line-height: 1.4;
}
.atlas-shell .atlas-matter-row-tag:hover {
  border-color: var(--atlas-oxblood);
  color: var(--atlas-oxblood);
  text-decoration: none;
}

.atlas-shell .atlas-matter-row-facts {
  margin: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: center;
}
.atlas-shell .atlas-matter-row-facts > div {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.atlas-shell .atlas-matter-row-facts dt {
  font-family: var(--atlas-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--atlas-ink-mute);
  margin-bottom: 2px;
}
.atlas-shell .atlas-matter-row-facts dd {
  margin: 0;
  font-family: var(--atlas-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.atlas-shell .atlas-matter-row-facts dd.unknown {
  font-style: italic;
  color: var(--atlas-ink-mute);
  font-weight: 400;
}

/* Document text match snippets (when search returns hits). */
.atlas-shell .atlas-matter-row-doc-hits {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--atlas-paper-edge);
}
.atlas-shell .atlas-matter-row-doc-hits-label {
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-oxblood);
  margin: 0 0 6px;
}
.atlas-shell .atlas-matter-row-doc-hits-label::before {
  content: "◇ ";
}
.atlas-shell .atlas-matter-row-doc-hits ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.atlas-shell .atlas-matter-row-doc-hits li {
  margin: 6px 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 12, "SOFT" 50, "WONK" 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-matter-row-doc-hits li a {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--atlas-oxblood);
  margin-right: 8px;
  border-bottom: 1px dotted var(--atlas-oxblood);
  padding-bottom: 1px;
}
.atlas-shell .atlas-matter-row-doc-hits li mark {
  background: rgba(217, 102, 63, 0.18);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

/* Empty state. */
.atlas-shell .atlas-matters-empty {
  padding: 36px 28px;
  background: var(--atlas-paper);
  border: 1px dashed var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 18, "SOFT" 50, "WONK" 0;
  font-size: 18px;
  color: var(--atlas-ink-soft);
  text-align: center;
}


/* ============================================================
 * PULSE PAGE — composition specific to the homepage (Phase 2).
 * Hero, theme atlas grid, heating-up rail, in-session list, calendar
 * strip, ledger, and body-filter form.
 * ============================================================ */

.atlas-shell .atlas-pulse-hero {
  padding: 60px 0 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  border-bottom: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-pulse-hero h1 {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--atlas-ink);
}
.atlas-shell .atlas-pulse-hero h1 em,
.atlas-shell .atlas-pulse-hero h1 .atlas-em {
  font-style: italic;
  font-variation-settings: "opsz" 9, "SOFT" 100, "WONK" 1;
  color: var(--atlas-oxblood);
  font-weight: 300;
}
.atlas-shell .atlas-pulse-dateline {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--atlas-ink-mute);
  text-align: right;
  line-height: 1.7;
}
.atlas-shell .atlas-pulse-dateline strong {
  color: var(--atlas-ink);
  font-weight: 500;
}
.atlas-shell .atlas-pulse-lede {
  margin: 20px 0 0;
  max-width: 720px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 18, "SOFT" 50, "WONK" 0;
  font-weight: 350;
  font-size: 20px;
  line-height: 1.45;
  color: var(--atlas-ink-soft);
}

/* Body filter form — subtle, under the hero. */
.atlas-shell .atlas-body-filter {
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
}
.atlas-shell .atlas-body-filter label {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--atlas-ink-mute);
}
.atlas-shell .atlas-body-filter select {
  font-family: var(--atlas-sans);
  font-size: 13px;
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r);
  padding: 6px 28px 6px 10px;
  color: var(--atlas-ink);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--atlas-oxblood) 50%),
                    linear-gradient(135deg, var(--atlas-oxblood) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}
.atlas-shell .atlas-body-filter input[type="submit"],
.atlas-shell .atlas-body-filter button {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-oxblood);
  background: transparent;
  border: 1px solid var(--atlas-oxblood);
  border-radius: 999px;
  padding: 5px 12px 4px;
  cursor: pointer;
}
.atlas-shell .atlas-body-filter input[type="submit"]:hover,
.atlas-shell .atlas-body-filter button:hover {
  background: rgba(122, 31, 43, 0.06);
}
.atlas-shell .atlas-body-filter .atlas-body-filter-clear {
  font-family: var(--atlas-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-ink-mute);
  border-bottom: 1px dotted var(--atlas-rule);
}

/* Theme Atlas grid — dense flow packs tiles around the XL anchor. */
.atlas-shell .atlas-pulse-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 84px;
  gap: 6px;
  grid-auto-flow: dense;
}
.atlas-shell .atlas-pulse-grid .atlas-tile--xl { grid-column: span 5; grid-row: span 3; }
.atlas-shell .atlas-pulse-grid .atlas-tile--l  { grid-column: span 4; grid-row: span 2; }
.atlas-shell .atlas-pulse-grid .atlas-tile--m  { grid-column: span 3; grid-row: span 2; }
.atlas-shell .atlas-pulse-grid .atlas-tile--s  { grid-column: span 3; grid-row: span 1; }

/* Legend underneath the grid. */
.atlas-shell .atlas-pulse-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 18px;
  font-family: var(--atlas-mono);
  font-size: 11px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.atlas-shell .atlas-pulse-legend .atlas-pulse-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 10px;
  border: 1px solid var(--atlas-rule);
  margin-right: 6px;
  vertical-align: middle;
}
.atlas-shell .atlas-pulse-legend .atlas-pulse-legend-swatch--hot  { background: rgba(217, 102, 63, 0.25); border-color: var(--atlas-heat); }
.atlas-shell .atlas-pulse-legend .atlas-pulse-legend-swatch--up   { background: rgba(122, 31, 43, 0.12); border-color: var(--atlas-oxblood); }
.atlas-shell .atlas-pulse-legend .atlas-pulse-legend-swatch--flat { background: var(--atlas-paper-deep); }

/* Heating-up rail — four cards with bigger sparklines. */
.atlas-shell .atlas-heat-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.atlas-shell .atlas-heat-card {
  display: block;
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-rule);
  border-top: 3px solid var(--atlas-heat);
  border-radius: var(--atlas-r-lg);
  padding: 18px 18px 16px;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.atlas-shell a.atlas-heat-card:hover { border-color: var(--atlas-heat); text-decoration: none; }
.atlas-shell .atlas-heat-card .atlas-heat-num {
  position: absolute;
  top: 14px; right: 16px;
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 13px;
  color: var(--atlas-heat);
  line-height: 1;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
}
.atlas-shell .atlas-heat-card h3 {
  margin: 0 0 8px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 80%;
}
.atlas-shell .atlas-heat-card .atlas-heat-delta {
  font-family: var(--atlas-mono);
  font-size: 12px;
  color: var(--atlas-heat-deep);
  letter-spacing: 0.04em;
}
.atlas-shell .atlas-heat-card .atlas-heat-meta {
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--atlas-ink-mute);
  margin-top: 6px;
}
.atlas-shell .atlas-heat-card svg.atlas-spark {
  margin-top: 12px;
  width: 100%;
  height: 44px;
  color: var(--atlas-heat);
}

/* In-session — numbered editorial entries. */
.atlas-shell .atlas-session-list {
  border-top: 1px solid var(--atlas-rule);
}
.atlas-shell .atlas-session-row {
  display: grid;
  grid-template-columns: 96px 1.4fr 1fr;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--atlas-rule);
  align-items: start;
}
.atlas-shell .atlas-session-num {
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 56px;
  line-height: 0.85;
  color: var(--atlas-oxblood);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.atlas-shell .atlas-session-row h3 {
  margin: 0 0 10px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 60, "SOFT" 50, "WONK" 0;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--atlas-ink);
}
.atlas-shell .atlas-session-row h3 a:hover {
  color: var(--atlas-oxblood);
  text-decoration: none;
  border-bottom: 1px solid var(--atlas-oxblood);
}
.atlas-shell .atlas-session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  font-family: var(--atlas-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
}
.atlas-shell .atlas-session-meta .atlas-session-code {
  color: var(--atlas-oxblood);
  border: 1px solid var(--atlas-oxblood);
  border-radius: var(--atlas-r);
  padding: 2px 6px 1px;
  background: rgba(122, 31, 43, 0.04);
}
.atlas-shell .atlas-session-meta .atlas-session-theme {
  color: var(--atlas-ink);
  background: var(--atlas-paper-deep);
  border: 1px solid var(--atlas-paper-edge);
  border-radius: var(--atlas-r);
  padding: 2px 6px 1px;
}
.atlas-shell .atlas-session-summary {
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--atlas-ink-soft);
  margin: 0;
}
.atlas-shell .atlas-session-ai-flag {
  margin-top: 12px;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  color: var(--atlas-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.atlas-shell .atlas-session-ai-flag::before {
  content: "◇ ";
  color: var(--atlas-oxblood);
}

/* Calendar strip — horizontal scroll of meeting cards. */
.atlas-shell .atlas-calendar {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scroll-snap-type: x mandatory;
}
.atlas-shell .atlas-calendar::-webkit-scrollbar { height: 6px; }
.atlas-shell .atlas-calendar::-webkit-scrollbar-thumb {
  background: var(--atlas-paper-edge);
  border-radius: 999px;
}
.atlas-shell .atlas-cal-card {
  flex: 0 0 230px;
  scroll-snap-align: start;
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-r-lg);
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.atlas-shell a.atlas-cal-card:hover { border-color: var(--atlas-oxblood); text-decoration: none; }
.atlas-shell .atlas-cal-card h4 {
  margin: 0;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 18, "SOFT" 50, "WONK" 0;
  font-weight: 450;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.atlas-shell .atlas-cal-card .atlas-cal-status {
  margin-top: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Ledger — bottom-of-page stats row. */
.atlas-shell .atlas-pulse-ledger {
  margin: 64px 0 28px;
  padding-top: 28px;
  border-top: 1px solid var(--atlas-rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.atlas-shell .atlas-pulse-ledger .atlas-pulse-ledger-cell strong {
  display: block;
  font-family: var(--atlas-sans);
  font-weight: 500;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
}
.atlas-shell .atlas-pulse-ledger .atlas-pulse-ledger-cell span {
  display: block;
  margin-top: 6px;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--atlas-ink-mute);
}

/* "Not enough activity yet" empty-state card for Pulse changes. */
.atlas-shell .atlas-empty-state {
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-rule);
  border-left: 3px solid var(--atlas-ink-mute);
  border-radius: var(--atlas-r-lg);
  padding: 22px 24px;
  font-family: var(--atlas-serif);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--atlas-ink-soft);
}
.atlas-shell .atlas-empty-state h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 450;
}


/* ============================================================
 * RESPONSIVE — narrow viewport adjustments to shared components.
 * Page-specific responsive rules belong with their page in Phase 2-4.
 * ============================================================ */

@media (max-width: 1060px) {
  .atlas-shell .atlas-matter-grid,
  .atlas-shell .atlas-mtg-grid { grid-template-columns: 1fr; }
  .atlas-shell .atlas-rail { position: static; }
  .atlas-shell .atlas-matter-header,
  .atlas-shell .atlas-mtg-header { grid-template-columns: 1fr; }
  .atlas-shell .atlas-matter-side,
  .atlas-shell .atlas-mtg-side { text-align: left; }
}

@media (max-width: 960px) {
  /* On narrow viewports nav wraps to its own row beneath the brand. Left-align
     it so it sits flush with the wordmark rather than pinned to the right. */
  .atlas-shell .atlas-topbar { row-gap: 12px; }
  .atlas-shell .atlas-topbar nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    flex: 1 1 100%;
  }
  .atlas-shell .atlas-facts-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .atlas-shell .atlas-facts-strip > div:nth-child(3n) { border-right: 0; }
  .atlas-shell .atlas-facts-strip > div { border-top: 1px solid var(--atlas-rule); }
  .atlas-shell .atlas-facts-strip > div:nth-child(-n + 3) { border-top: 0; }

  /* Pulse-page composition collapses on the same breakpoint — merged here
     from a second 960px block so a future contributor adding a 960px rule
     has one obvious place to put it. */
  .atlas-shell .atlas-pulse-hero { grid-template-columns: 1fr; }
  .atlas-shell .atlas-pulse-dateline { text-align: left; }
  .atlas-shell .atlas-heat-rail { grid-template-columns: repeat(2, 1fr); }
  .atlas-shell .atlas-pulse-ledger { grid-template-columns: repeat(2, 1fr); }
  .atlas-shell .atlas-pulse-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 80px;
  }
  .atlas-shell .atlas-pulse-grid .atlas-tile--xl { grid-column: span 6; grid-row: span 3; }
  .atlas-shell .atlas-pulse-grid .atlas-tile--l  { grid-column: span 6; grid-row: span 2; }
  .atlas-shell .atlas-pulse-grid .atlas-tile--m  { grid-column: span 3; grid-row: span 2; }
  .atlas-shell .atlas-pulse-grid .atlas-tile--s  { grid-column: span 3; grid-row: span 1; }
}

@media (max-width: 720px) {
  /* Brand stacks below 720px. At its desktop size the brand-mark
     ("Jurisdiction Civic Gallery") plus brand-sub tagline render around
     ~500px wide and atlas-brand carries flex-shrink: 0, so without this
     override the brand busts a sub-500px viewport — confirmed by the
     narrow-viewport system test at 375px. Stacking the mark above the
     tagline and dropping their type sizes lets the topbar fit. */
  .atlas-shell .atlas-topbar .atlas-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
  }
  .atlas-shell .atlas-topbar .atlas-brand-mark { font-size: 22px; }
  .atlas-shell .atlas-topbar .atlas-brand-sub  { font-size: 14px; }
  .atlas-shell .atlas-facts-strip { grid-template-columns: repeat(2, 1fr); }
  .atlas-shell .atlas-facts-strip > div:nth-child(3n) { border-right: 1px solid var(--atlas-rule); }
  .atlas-shell .atlas-facts-strip > div:nth-child(2n) { border-right: 0; }
  .atlas-shell .atlas-date--lg .atlas-date-day { font-size: 64px; }
  .atlas-shell .atlas-footer { flex-direction: column; align-items: flex-start; }
  .atlas-shell .atlas-session-row {
    grid-template-columns: 64px 1fr;
  }
  .atlas-shell .atlas-session-row .atlas-session-summary { grid-column: 2; }
  .atlas-shell .atlas-session-num { font-size: 44px; }
  .atlas-shell .atlas-heat-rail { grid-template-columns: 1fr; }
  .atlas-shell .atlas-paper {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .atlas-shell .atlas-paper-num { font-size: 28px; }
  .atlas-shell .atlas-matter-side .atlas-matter-docs-count { font-size: 42px; }
  .atlas-shell .atlas-ag-matter {
    grid-template-columns: 44px 1fr;
    margin-left: 0;
  }
  .atlas-shell .atlas-ag-matter .atlas-ag-arrow { display: none; }
  .atlas-shell .atlas-ag-section { grid-template-columns: 44px 1fr; gap: 14px; }
  .atlas-shell .atlas-mtg-headline { grid-template-columns: 1fr; gap: 18px; }
  .atlas-shell .atlas-mtg-side .atlas-mtg-matters-count { font-size: 48px; }
  .atlas-shell .atlas-meeting-row {
    grid-template-columns: 1fr;
    row-gap: 12px;
    padding: 18px 12px;
  }
  .atlas-shell .atlas-meeting-row-facts {
    grid-template-columns: repeat(2, 1fr);
    align-self: start;
  }
  .atlas-shell .atlas-meetings-monthnav {
    flex-direction: column;
    gap: 8px;
  }
  .atlas-shell .atlas-matter-row {
    grid-template-columns: 1fr;
    row-gap: 8px;
    padding: 18px 12px;
  }
  .atlas-shell .atlas-matter-row-facts {
    flex-direction: row;
    text-align: left;
    align-self: start;
    gap: 18px;
  }
  .atlas-shell .atlas-matter-row-facts > div { align-items: flex-start; }
}


/* ============================================================
 * PRINT — civic researchers routinely print matter and meeting
 * pages for annotation. Strip the topbar / nav / sidebar; keep
 * the title, facts, AI summaries (with disclaimer), agenda, and
 * matter papers; expand hidden extracts and adjacent rails so the
 * full record fits on paper. Tested at A4 and US Letter.
 * ============================================================ */

@media print {
  /* Page setup */
  @page { margin: 14mm 16mm; }

  /* Drop interactive page chrome and decorative backgrounds. */
  .atlas-shell {
    background: white !important;
    background-image: none !important;
    color: black;
    font-family: var(--atlas-serif);
    font-size: 11pt;
    line-height: 1.45;
  }

  /* Hide non-content. */
  .atlas-shell .atlas-topbar,
  .atlas-shell .atlas-footer,
  .atlas-shell .atlas-cmd,
  .atlas-shell .atlas-skip-link,
  .atlas-shell .atlas-pulse-dateline,
  .atlas-shell .atlas-body-filter,
  .atlas-shell .atlas-matters-filter,
  .atlas-shell .atlas-meetings-filter,
  .atlas-shell .atlas-meetings-monthnav,
  .atlas-shell .atlas-rail,
  .atlas-shell .atlas-papers-toc,
  .atlas-shell .atlas-pulse-grid,
  .atlas-shell .atlas-heat-rail,
  .atlas-shell .atlas-calendar,
  .atlas-shell .atlas-pulse-legend,
  .atlas-shell .atlas-pulse-ledger,
  .atlas-shell .atlas-data-rate,
  .atlas-shell .atlas-meetings-banner,
  .atlas-shell .atlas-matters-banner,
  .atlas-shell .atlas-ag-arrow,
  .atlas-shell .atlas-open-arrow,
  .atlas-shell .atlas-tile,
  .atlas-shell .atlas-body-tile,
  .atlas-shell .atlas-rail-themes,
  .atlas-shell .atlas-data-freshness-source {
    display: none !important;
  }

  /* Layout grids collapse to single column on paper. */
  .atlas-shell .atlas-wrap { max-width: none; padding: 0; }
  .atlas-shell .atlas-matter-grid,
  .atlas-shell .atlas-mtg-grid {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    padding: 0;
  }

  /* Header treatment — flatten ornaments. */
  .atlas-shell .atlas-matter-header,
  .atlas-shell .atlas-mtg-header {
    display: block;
    border-bottom: 1px solid #999;
    padding: 0 0 12pt;
    margin-bottom: 18pt;
  }
  .atlas-shell .atlas-matter-side,
  .atlas-shell .atlas-mtg-side { display: none; }
  .atlas-shell .atlas-matter-title,
  .atlas-shell .atlas-mtg-title {
    font-family: var(--atlas-serif);
    font-size: 22pt;
    font-weight: 500;
    line-height: 1.15;
    margin: 6pt 0 8pt;
    color: black;
  }
  .atlas-shell .atlas-matter-title em,
  .atlas-shell .atlas-mtg-title em,
  .atlas-shell .atlas-em {
    font-style: italic;
    color: black;
  }
  .atlas-shell .atlas-matter-eyebrow,
  .atlas-shell .atlas-mtg-eyebrow,
  .atlas-shell .atlas-eyebrow {
    font-family: var(--atlas-mono);
    font-size: 9pt;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 4pt;
  }

  /* Date plate in the meeting hero — print-friendly. */
  .atlas-shell .atlas-date {
    background: white !important;
    border: 1px solid #999 !important;
  }
  .atlas-shell .atlas-date::after { display: none !important; }
  .atlas-shell .atlas-date-day { color: black; }
  .atlas-shell .atlas-date-mo { color: #555; }

  /* Facts strip — keep as a table-like row. */
  .atlas-shell .atlas-facts-strip {
    background: white !important;
    border: 1px solid #999;
    page-break-inside: avoid;
    margin-bottom: 16pt;
  }
  .atlas-shell .atlas-facts-strip > div { border-right: 1px solid #ccc; }
  .atlas-shell .atlas-facts-strip dd { color: black; }

  /* Section headings — keep visual hierarchy but lighter. */
  .atlas-shell .atlas-section-head {
    margin: 18pt 0 8pt;
    page-break-after: avoid;
  }
  .atlas-shell .atlas-section-head h2 { font-size: 16pt; color: black; }
  .atlas-shell .atlas-section-head .atlas-rule { display: none; }
  .atlas-shell .atlas-section-head .atlas-section-label {
    font-family: var(--atlas-mono);
    font-size: 9pt;
    color: #666;
  }

  /* AI summary card — flatten. */
  .atlas-shell .atlas-summary {
    background: white !important;
    border: 1px solid #999;
    border-left: 3pt solid #555;
    page-break-inside: avoid;
    padding: 10pt 12pt;
  }
  .atlas-shell .atlas-summary p { color: black; }
  .atlas-shell .atlas-summary .atlas-summary-label,
  .atlas-shell .atlas-summary .atlas-ai-pill {
    color: #555;
    border-color: #999;
  }
  .atlas-shell .atlas-summary h5 { color: black; }
  .atlas-shell .atlas-summary ul li { color: black; border-color: #ccc; }
  .atlas-shell .atlas-summary ul li::before { background: #555; }
  .atlas-shell .atlas-summary .atlas-ai-note { color: #555; }
  .atlas-shell .atlas-summary .atlas-summary-status {
    background: transparent;
    border-left-color: #999;
    color: #555;
  }

  /* Paper cards (matter attachments). */
  .atlas-shell .atlas-paper {
    page-break-inside: auto;
    border-bottom: 1px solid #ccc;
  }
  .atlas-shell .atlas-paper-num { color: #555; }
  .atlas-shell .atlas-paper h3 { color: black; page-break-after: avoid; }
  .atlas-shell .atlas-paper-chips .atlas-chip {
    background: white !important;
    border-color: #999 !important;
    color: black !important;
  }
  .atlas-shell .atlas-paper-file { color: #555; }
  .atlas-shell .atlas-paper-file .atlas-paper-file-src-missing { color: #555; }

  /* Expand the collapsed extracts so the full text prints. */
  .atlas-shell .atlas-paper-extract {
    background: white !important;
    border-color: #999 !important;
  }
  .atlas-shell .atlas-paper-extract > summary::after { display: none; }
  .atlas-shell .atlas-paper-extract > summary {
    border-bottom: 1px solid #ccc;
    color: #555;
    cursor: default;
  }
  .atlas-shell .atlas-paper-extract[open] > summary { border-bottom: 1px solid #ccc; }
  .atlas-shell .atlas-paper-extract:not([open]) > summary + .atlas-paper-extract-body {
    display: block;
  }
  .atlas-shell .atlas-paper-extract-body {
    max-height: none !important;
    overflow: visible !important;
    color: black;
  }

  /* Meeting agenda — keep the tiered layout, drop hover affordances. */
  .atlas-shell .atlas-ag-section { border-top: 1px solid #ccc; page-break-after: avoid; }
  .atlas-shell .atlas-ag-section .atlas-ag-marker { color: #555; }
  .atlas-shell .atlas-ag-section h3 { color: black; }
  .atlas-shell .atlas-ag-matter {
    page-break-inside: avoid;
    background: white !important;
    box-shadow: none !important;
    border-top: 1px dashed #ccc;
  }
  .atlas-shell .atlas-ag-matter:hover {
    background: white !important;
    box-shadow: none !important;
  }
  .atlas-shell .atlas-ag-item-num,
  .atlas-shell .atlas-ag-item-code {
    color: #555;
    background: white !important;
    border-color: #999 !important;
  }
  .atlas-shell .atlas-ag-item-theme {
    background: white !important;
    border-color: #999 !important;
    color: black !important;
  }
  .atlas-shell .atlas-ag-att-line { color: #555; page-break-inside: avoid; }

  /* Notices panel — expand all accordions so the boilerplate prints. */
  .atlas-shell .atlas-notices {
    background: white !important;
    border-color: #999 !important;
    page-break-before: auto;
  }
  .atlas-shell details.atlas-notice > summary::-webkit-details-marker { display: none; }
  .atlas-shell details.atlas-notice > summary .atlas-notice-icn { display: none; }
  .atlas-shell details.atlas-notice .atlas-notice-body { display: block !important; }

  /* Show URL after external/source links so a printed page is verifiable. */
  .atlas-shell a[href^="http"]::after,
  .atlas-shell a[target="_blank"]::after {
    content: " (" attr(href) ")";
    font-family: var(--atlas-mono);
    font-size: 9pt;
    color: #555;
    word-break: break-all;
  }
  /* Don't print URLs for in-page nav or footnote anchors. */
  .atlas-shell a[href^="#"]::after,
  .atlas-shell .atlas-glossary-sources a::after { content: ""; }

  /* Generic links: keep them visible but no underline noise. */
  .atlas-shell a { color: black; text-decoration: none; }

  /* Avoid awkward page breaks. */
  .atlas-shell h1, .atlas-shell h2, .atlas-shell h3, .atlas-shell h4 { page-break-after: avoid; }
  .atlas-shell p, .atlas-shell li { orphans: 3; widows: 3; }

  /* Drop the dev/test page badge if it ever prints. */
  .atlas-shell .atlas-badge { display: none !important; }
}
