/* Tellus Resource Guides
 * Tokens mirror tellus-website/src/app/globals.css so the guides read as part of www.tellusapp.com.
 */

@font-face { font-family: "Tenon"; src: url("/fonts/tenon-light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Tenon"; src: url("/fonts/tenon-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Tenon"; src: url("/fonts/tenon-medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Tenon"; src: url("/fonts/tenon-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --graphite: #0e0f0f;
  --graphite-80: rgba(14, 15, 15, 0.8);
  --muted: #555b66;
  --subtle: #5f6571;
  --pearl: #f9f9f9;
  --slate: #f1f5f9;
  --slate-2: #e8ecf2;
  --steel-light: #d2d9e1;
  --steel-dark: #424653;
  --hover: #f4f6f8;
  --blue: #0067ff;
  --link: #0052cc;
  --purple: #651dff;
  --white: #ffffff;
  --border: rgba(14, 15, 15, 0.1);
  --border-strong: rgba(14, 15, 15, 0.24);
  --focus: #0067ff;

  --font-body: "Tenon", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-ui: "Chivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --tracking-button: 0.08em;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow-card: 0 1px 2px rgba(14, 15, 15, 0.04), 0 8px 24px rgba(14, 15, 15, 0.06);
  --shadow-lift: 0 2px 4px rgba(14, 15, 15, 0.05), 0 16px 40px rgba(14, 15, 15, 0.1);

  --container: 1240px;
  --gutter: 24px;
  --header-h: 72px;
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 64px; }
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--white);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--graphite); color: var(--white);
  font-family: var(--font-ui); font-size: 14px; text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  color: var(--muted);
}

.display { font-weight: 300; letter-spacing: -0.02em; }
.display strong, .display b { font-weight: 700; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px;
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  letter-spacing: var(--tracking-button); text-transform: uppercase; line-height: 1;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-dark { background: var(--graphite); color: var(--white); }
.btn-dark:hover { background: #2a2c2f; }
.btn-outline { background: var(--white); color: var(--graphite); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--graphite); color: var(--white); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  display: flex; align-items: center; gap: 24px;
  height: var(--header-h);
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
}
.site-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.site-logo img { height: 24px; width: auto; }
.site-logo-label {
  padding-left: 10px; border-left: 1px solid var(--border-strong);
  font-family: var(--font-ui); font-size: 13px; color: var(--muted); letter-spacing: 0.01em;
}

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-family: var(--font-ui); font-size: 14px; color: var(--graphite-80); text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--hover); color: var(--graphite); }
.site-nav a[aria-current="page"], .site-nav a.is-active { background: var(--slate); color: var(--graphite); font-weight: 600; }
.site-header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--white); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 1.5px; background: var(--graphite); border-radius: 2px; position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .site-logo-label { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header-cta { display: none; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 20px; display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 12px 14px; font-size: 16px; border-radius: var(--radius-sm); }
  .site-nav .site-nav-cta { display: block; margin-top: 12px; }
  .site-nav .site-nav-cta a { text-align: center; padding: 0; }
}
@media (min-width: 961px) { .site-nav .site-nav-cta { display: none; } }

/* ---------- Search ---------- */

.search { position: relative; width: 100%; max-width: 640px; }
.search-form { display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 6px 6px 20px; box-shadow: var(--shadow-card); }
.search-form:focus-within { border-color: var(--graphite); }
.search-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.search-input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: var(--font-body); font-size: 16px; color: var(--graphite); padding: 8px 4px;
}
.search-input::placeholder { color: var(--subtle); }
.search-input:focus-visible { outline: none; }
.search-results {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 8px);
  margin: 0; padding: 6px; list-style: none;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); max-height: min(60vh, 420px); overflow-y: auto;
}
.search-results[hidden] { display: none; }
.search-results li a {
  display: block; padding: 10px 12px; border-radius: var(--radius-sm); text-decoration: none;
}
.search-results li a .search-result-title { display: block; font-size: 15px; line-height: 1.35; }
.search-results li a .search-result-meta { display: block; margin-top: 2px; font-family: var(--font-ui); font-size: 12px; color: var(--muted); }
.search-results li[aria-selected="true"] a, .search-results li a:hover { background: var(--slate); }
.search-results .search-empty { padding: 12px; color: var(--muted); font-size: 15px; }

@media (max-width: 640px) {
  .search-form .btn { padding: 0 16px; }
}

/* ---------- Hero ---------- */

.hero-home {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 520px; display: flex; align-items: flex-end;
  color: var(--white);
  background: var(--graphite) center / cover no-repeat;
}
.hero-home::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(14, 15, 15, 0.62) 0%, rgba(14, 15, 15, 0.35) 45%, rgba(14, 15, 15, 0) 75%),
    linear-gradient(180deg, rgba(14, 15, 15, 0.1) 0%, rgba(14, 15, 15, 0.2) 45%, rgba(14, 15, 15, 0.7) 100%);
}
.hero-home .container { padding-top: 120px; padding-bottom: 56px; }
.hero-home h1 { font-size: clamp(36px, 5.4vw, 64px); max-width: 15em; }
.hero-home .hero-lede { margin-top: 16px; max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); color: rgba(255, 255, 255, 0.88); }
.hero-home .search { margin-top: 28px; color: var(--graphite); }

.hero-guide {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--slate);
  border-bottom: 1px solid var(--border);
}
.hero-guide::after {
  content: ""; position: absolute; z-index: -1;
  right: -60px; top: -40px; width: 520px; height: 350px;
  background: url("/images/brand-mark-outline.png") right top / contain no-repeat;
  opacity: 0.35; pointer-events: none;
}
.hero-guide .container { padding-top: 48px; padding-bottom: 48px; }
.hero-guide h1 { margin-top: 10px; font-size: clamp(32px, 4.4vw, 52px); max-width: 16em; }
.hero-guide .hero-lede { margin-top: 14px; max-width: 40em; font-size: 18px; color: var(--muted); }
.hero-guide .search { margin-top: 28px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; font-family: var(--font-ui); font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  .hero-home { min-height: 460px; }
  .hero-home .container { padding-bottom: 36px; }
  .hero-guide::after { width: 300px; height: 200px; right: -80px; opacity: 0.6; }
  .hero-guide .container { padding-top: 32px; padding-bottom: 32px; }
}

/* ---------- Sections and cards ---------- */

.section { padding: 64px 0; }
.section-slate { background: var(--slate); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); }
.section-head p { color: var(--muted); max-width: 36em; margin-top: 8px; }
@media (max-width: 640px) { .section { padding: 44px 0; } }

.guide-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 760px) { .guide-cards { grid-template-columns: 1fr; } }

.guide-card {
  position: relative; display: grid; grid-template-columns: 200px 1fr; overflow: hidden;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.guide-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.guide-card-media { background: var(--slate-2) center / cover no-repeat; min-height: 100%; }
.guide-card-body { padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 10px; }
.guide-card h3 { font-size: 24px; }
.guide-card h3 a { text-decoration: none; }
.guide-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.guide-card p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.guide-card-meta { margin-top: auto; font-family: var(--font-ui); font-size: 12px; letter-spacing: var(--tracking-button); text-transform: uppercase; color: var(--muted); }
@media (max-width: 480px) {
  .guide-card { grid-template-columns: 1fr; }
  .guide-card-media { min-height: 150px; }
}

.category-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 1000px) { .category-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .category-cards { grid-template-columns: 1fr; } }
.category-card {
  display: flex; flex-direction: column; gap: 12px; padding: 22px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.category-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.category-card h3 { font-size: 20px; }
.category-card h3 a { text-decoration: none; }
.category-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.category-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.category-card li a { font-size: 15px; line-height: 1.4; color: var(--steel-dark); text-decoration: none; }
.category-card li a:hover { color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; }
.category-card-foot { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-ui); font-size: 13px; color: var(--muted); }
.category-card-foot a { color: var(--graphite); font-weight: 600; text-decoration: none; }
.category-card-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

.state-grid { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--border-strong);
  font-family: var(--font-ui); font-size: 13px; color: var(--graphite); text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.chip:hover { background: var(--graphite); color: var(--white); border-color: var(--graphite); }
.chip[aria-current="page"] { background: var(--graphite); color: var(--white); border-color: var(--graphite); }

.recent-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
@media (max-width: 760px) { .recent-list { grid-template-columns: 1fr; } }
.recent-list li { border-top: 1px solid var(--border); }
.recent-list a { display: block; padding: 16px 0; text-decoration: none; }
.recent-list a:hover .recent-title { text-decoration: underline; text-underline-offset: 3px; }
.recent-title { display: block; font-size: 17px; font-weight: 500; line-height: 1.35; }
.recent-meta { display: block; margin-top: 4px; font-family: var(--font-ui); font-size: 12px; letter-spacing: var(--tracking-button); text-transform: uppercase; color: var(--muted); }

/* ---------- Listing layout ---------- */

.listing { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; padding-top: 40px; padding-bottom: 72px; }
@media (max-width: 960px) { .listing { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; } }

.side-nav { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.side-nav-title { margin-bottom: 10px; }
.side-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-nav a {
  display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 15px; line-height: 1.35; color: var(--steel-dark); text-decoration: none;
}
.side-nav a:hover { background: var(--hover); color: var(--graphite); }
.side-nav a[aria-current="page"] { background: var(--slate); color: var(--graphite); font-weight: 600; }
.side-nav-count { font-family: var(--font-ui); font-size: 12px; color: var(--muted); }
.side-nav details { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.side-nav summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; border-radius: var(--radius-sm); }
.side-nav summary::-webkit-details-marker { display: none; }
.side-nav summary::after { content: "+"; font-family: var(--font-ui); color: var(--muted); }
.side-nav details[open] summary::after { content: "\2212"; }
.side-nav details ul { margin-top: 6px; }

@media (max-width: 960px) {
  .side-nav { position: static; }
  .side-nav > ul { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .side-nav > ul a { white-space: nowrap; border: 1px solid var(--border-strong); border-radius: 999px; padding: 8px 14px; font-family: var(--font-ui); font-size: 13px; }
  .side-nav > ul a[aria-current="page"] { background: var(--graphite); color: var(--white); border-color: var(--graphite); }
  .side-nav-count { display: none; }
}

.listing-head h2 { font-size: clamp(28px, 3.2vw, 38px); }
.listing-head p { margin-top: 10px; color: var(--muted); }
.listing-group { margin-top: 36px; }
.listing-group-title { padding-bottom: 10px; border-bottom: 1px solid var(--border); line-height: 1; }
.listing-group-title .eyebrow { font-size: 13px; font-weight: 600; }
.listing-group:first-child { margin-top: 0; }

.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li { border-bottom: 1px solid var(--border); }
.article-list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 18px 4px; text-decoration: none; border-radius: var(--radius-sm); }
.article-list a:hover { background: var(--pearl); }
.article-list a:hover .article-list-title { text-decoration: underline; text-underline-offset: 3px; }
.article-list-title { font-size: 18px; font-weight: 500; line-height: 1.35; }
.article-list-desc { grid-column: 1 / 2; color: var(--muted); font-size: 15px; line-height: 1.5; }
.article-list-meta { grid-row: 1 / 3; grid-column: 2; align-self: center; font-family: var(--font-ui); font-size: 12px; color: var(--subtle); white-space: nowrap; }
.badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--slate); font-family: var(--font-ui); font-size: 11px; font-weight: 600; letter-spacing: var(--tracking-button); text-transform: uppercase; vertical-align: middle; color: var(--steel-dark); }
@media (max-width: 640px) {
  .article-list a { grid-template-columns: 1fr; }
  .article-list-meta { grid-row: auto; grid-column: 1; }
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs { padding-top: 24px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; list-style: none; margin: 0; padding: 0; font-family: var(--font-ui); font-size: 13px; color: var(--muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: var(--steel-light); }
.breadcrumbs a { color: var(--steel-dark); text-decoration: none; }
.breadcrumbs a:hover { color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs [aria-current="page"] { color: var(--graphite); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .breadcrumbs li:last-child { display: none; } }

/* ---------- Article ---------- */

.article-layout { display: grid; grid-template-columns: 240px minmax(0, 720px) 220px; justify-content: space-between; gap: 48px; padding-top: 28px; padding-bottom: 80px; }
@media (max-width: 1200px) { .article-layout { grid-template-columns: minmax(0, 720px) 220px; } .article-layout > .side-nav { display: none; } }
@media (max-width: 960px) { .article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; } .toc-rail { display: none; } }

.article-header { padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.article-header .eyebrow a { color: inherit; text-decoration: none; }
.article-header .eyebrow a:hover { color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; }
.article-header h1 { margin-top: 12px; font-size: clamp(32px, 4.2vw, 48px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.article-lede { margin-top: 16px; font-size: 20px; line-height: 1.5; color: var(--steel-dark); }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 20px; font-family: var(--font-ui); font-size: 13px; color: var(--muted); }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta a { color: inherit; }

.toc-mobile { margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--pearl); }
.toc-mobile summary { cursor: pointer; padding: 14px 16px; font-family: var(--font-ui); font-size: 14px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; color: var(--muted); }
.toc-mobile[open] summary::after { content: "\2212"; }
.toc-mobile ol { margin: 0; padding: 0 16px 14px 34px; display: grid; gap: 8px; font-size: 15px; }
.toc-mobile a { color: var(--steel-dark); text-decoration: none; }
@media (min-width: 961px) { .toc-mobile { display: none; } }

.toc-rail { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; max-height: calc(100vh - var(--header-h) - 56px); overflow-y: auto; }
.toc-rail ol { list-style: none; margin: 10px 0 0; padding: 0; border-left: 1px solid var(--border); display: grid; gap: 2px; }
.toc-rail a { display: block; margin-left: -1px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.4; color: var(--muted); text-decoration: none; }
.toc-rail a:hover { color: var(--graphite); }
.toc-rail a.is-active { color: var(--graphite); border-left-color: var(--graphite); font-weight: 500; }

/* Prose */
.prose { margin-top: 32px; font-size: 18px; line-height: 1.72; color: #1d1f22; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: 28px; font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; color: var(--graphite); }
.prose h3 { margin-top: 1.7em; font-size: 21px; font-weight: 500; line-height: 1.3; color: var(--graphite); }
.prose h4, .prose h5 { margin-top: 1.5em; font-size: 18px; font-weight: 700; color: var(--graphite); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.6em; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--graphite); }
.prose strong { font-weight: 700; color: var(--graphite); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--subtle); }
.prose blockquote {
  margin-left: 0; margin-right: 0; padding: 18px 22px;
  background: var(--slate); border-radius: var(--radius); border-left: 3px solid var(--graphite);
  color: var(--steel-dark); font-size: 17px;
}
.prose blockquote > * + * { margin-top: 0.7em; }
.prose .callout { padding: 20px 22px; background: var(--slate); border-radius: var(--radius); }
.prose .callout-label { margin-bottom: 6px; font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-button); text-transform: uppercase; color: var(--steel-dark); }
.prose .callout blockquote { padding: 0; background: none; border: 0; margin: 0; }
.prose .table-scroll { overflow-x: auto; border-radius: 4px; }
.prose .table-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose thead td { border-bottom: 1px solid var(--border-strong); }
.prose thead th { text-align: left; font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-button); text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border-strong); padding: 10px 12px; white-space: nowrap; }
.prose tbody td { border-bottom: 1px solid var(--border); padding: 12px; vertical-align: top; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.2em 0; }
.prose code { font-size: 0.9em; background: var(--slate); padding: 1px 5px; border-radius: 4px; }

@media (max-width: 640px) {
  .prose { font-size: 17px; }
  .prose h2 { font-size: 24px; }
  .article-lede { font-size: 18px; }
}

/* Sources, disclaimer, related */
.article-section { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); }
.article-section > h2 { font-size: 22px; font-weight: 500; }
.sources-list { margin: 16px 0 0; padding-left: 1.4em; display: grid; gap: 10px; font-size: 15px; line-height: 1.5; color: var(--steel-dark); }
.sources-list a { color: var(--link); text-underline-offset: 3px; overflow-wrap: anywhere; }
.sources-publisher { color: var(--muted); }

.disclaimer { margin-top: 40px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; line-height: 1.55; color: var(--muted); background: var(--pearl); }
.disclaimer strong { color: var(--steel-dark); }

.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; list-style: none; padding: 0; }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr; } }
.related-grid a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; transition: border-color 0.15s ease, background-color 0.15s ease; }
.related-grid a:hover { border-color: var(--border-strong); background: var(--pearl); }
.related-title { font-size: 16px; font-weight: 500; line-height: 1.35; }
.related-meta { font-family: var(--font-ui); font-size: 12px; letter-spacing: var(--tracking-button); text-transform: uppercase; color: var(--muted); }

.state-table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 15px; }
.state-table th { text-align: left; font-family: var(--font-ui); font-size: 12px; letter-spacing: var(--tracking-button); text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border-strong); padding: 8px 10px; }
.state-table td { border-bottom: 1px solid var(--border); padding: 10px; vertical-align: top; }
.state-table td:first-child { white-space: nowrap; font-weight: 500; }
.state-table a { color: var(--link); text-underline-offset: 3px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }

.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-family: var(--font-ui); font-size: 13px; color: var(--steel-dark); text-decoration: none; }
.back-link:hover { color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- CTA band ---------- */

.cta-band { margin-top: 64px; padding: 32px; border-radius: var(--radius-lg); background: var(--graphite); color: var(--white); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; position: relative; overflow: hidden; isolation: isolate; }
.cta-band::after { content: ""; position: absolute; z-index: -1; right: -40px; bottom: -60px; width: 320px; height: 220px; background: url("/images/brand-mark-outline.png") center / contain no-repeat; opacity: 0.5; filter: invert(1); }
.cta-band h2 { font-size: 24px; font-weight: 300; }
.cta-band h2 strong { font-weight: 700; }
.cta-band p { margin-top: 6px; color: rgba(255, 255, 255, 0.75); font-size: 15px; max-width: 34em; }
.cta-band .btn-outline { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.4); }
.cta-band .btn-outline:hover { background: var(--white); color: var(--graphite); }

/* ---------- Footer ---------- */

.site-footer { background: var(--graphite); color: var(--steel-light); padding: 64px 0 36px; font-size: 14px; }
.footer-top { display: grid; grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 900px) { .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
.footer-brand img { height: 24px; width: auto; }
.footer-brand p { margin-top: 14px; max-width: 22em; color: rgba(210, 217, 225, 0.75); line-height: 1.55; }
.footer-col h2 { font-family: var(--font-ui); font-size: 12px; font-weight: 500; letter-spacing: var(--tracking-button); text-transform: uppercase; color: rgba(210, 217, 225, 0.6); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--white); text-decoration: none; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2); }
.footer-social a:hover { background: rgba(255, 255, 255, 0.1); }
.footer-legal { margin-top: 48px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 12px; line-height: 1.6; color: rgba(210, 217, 225, 0.7); display: grid; gap: 10px; }
.footer-legal a { color: var(--white); }
.footer-legal-title { font-family: var(--font-ui); letter-spacing: var(--tracking-button); text-transform: uppercase; color: rgba(210, 217, 225, 0.6); }
.footer-bottom { margin-top: 28px; font-family: var(--font-ui); font-size: 12px; color: rgba(210, 217, 225, 0.6); }

/* ---------- Simple pages (404, search, tags) ---------- */

.simple-page { padding-top: 56px; padding-bottom: 96px; max-width: 820px; }
.simple-page h1 { font-size: clamp(32px, 4vw, 48px); }
.simple-page > p { margin-top: 14px; color: var(--muted); font-size: 18px; }
.simple-page .search { margin-top: 28px; }
.simple-page .article-list { margin-top: 28px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .side-nav, .toc-rail, .toc-mobile, .cta-band, .search { display: none !important; }
  .article-layout { display: block; }
  .prose a::after { content: " (" attr(href) ")"; font-size: 0.85em; color: var(--muted); }
}

.state-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; list-style: none; padding: 0; }
