/* sovereign.css — State Capacity AI
   Dark-first editorial design. Forensic Architecture-inspired.
   WCAG AA compliant. High contrast.
   ================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   DESIGN TOKENS
   ============================================ */

:root {
  --bg: #873260;
  --bg-surface: #9d4070;
  --bg-elevated: #b34e80;
  --text: #f5f5f5;
  --text-heading: #ffffff;
  --text-muted: #e4c4d4;
  --text-strong: #ffffff;
  --accent: #FFCE1B;
  --accent-hover: #ffd842;
  --accent-bg: rgba(255, 206, 27, 0.1);
  --accent-border: rgba(255, 206, 27, 0.3);
  --border: rgba(255, 255, 255, 0.15);
  --border-strong: rgba(255, 255, 255, 0.3);
  --code-bg: #9d4070;
  --code-text: #f5e5f0;
  --blockquote-bg: #9d4070;
  --blockquote-border: #FFCE1B;
  --callout-bg: rgba(255, 206, 27, 0.08);
  --callout-border: rgba(255, 206, 27, 0.2);
  --table-stripe: rgba(255, 255, 255, 0.05);
  --shadow: none;
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --highlight: #FFCE1B;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-surface: #fafafa;
  --bg-elevated: #f5f5f5;
  --text: #262626;
  --text-heading: #0a0a0a;
  --text-muted: #737373;
  --text-strong: #171717;
  --accent: #98FBCB;
  --accent-hover: #7fe8b8;
  --accent-bg: rgba(152, 251, 203, 0.1);
  --accent-border: rgba(152, 251, 203, 0.3);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --code-bg: #f5f5f5;
  --code-text: #525252;
  --blockquote-bg: #f5f5f5;
  --blockquote-border: #98FBCB;
  --callout-bg: rgba(152, 251, 203, 0.05);
  --callout-border: rgba(152, 251, 203, 0.2);
  --table-stripe: rgba(0, 0, 0, 0.02);
  --shadow: none;
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.06);
  --highlight: #98FBCB;
}

/* ============================================
   BASE
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3 {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
  border-bottom: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text-muted);
}

h3 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

h5 {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

p {
  margin-bottom: 0.875rem;
  max-width: 65ch;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-border);
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--text-heading);
  outline-offset: 2px;
  border-radius: 2px;
}

strong {
  color: var(--text-strong);
  font-weight: 600;
}

blockquote {
  border-left: 2px solid var(--blockquote-border);
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  background: var(--blockquote-bg);
}

blockquote p {
  margin-bottom: 0;
}

ul, ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
  max-width: 65ch;
}

li {
  margin-bottom: 0.4rem;
}

li p {
  margin-bottom: 0.25rem;
}

code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  background: var(--code-bg);
  padding: 0.15rem 0.35rem;
  border-radius: 2px;
  font-size: 0.875rem;
  color: var(--code-text);
  border: 1px solid var(--border);
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.825rem;
  color: var(--text);
  border: none;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

th.col-narrow {
  width: 30%;
}

tr:nth-child(even) {
  background: var(--table-stripe);
}

/* ============================================
   LAYOUT — Header
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  transition: background-color 0.3s ease;
}

.site-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-heading);
  text-decoration: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.site-title:hover {
  color: var(--text-muted);
}

.header-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 2px;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-bg);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.35rem;
  cursor: pointer;
  border-radius: 2px;
  line-height: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.mobile-menu-toggle:hover {
  color: var(--text-heading);
  border-color: var(--text-heading);
}

.mobile-nav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem 1.25rem;
  position: sticky;
  top: 56px;
  z-index: 99;
}

.mobile-nav-section {
  padding: 0.5rem 0;
}

.mobile-nav-section + .mobile-nav-section {
  border-top: 1px solid var(--border);
}

.mobile-nav-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.35rem;
  padding: 0.25rem 0;
}

.mobile-nav-link {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.mobile-nav-link:hover {
  color: var(--text-heading);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 0.7rem;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.2s ease;
  font-weight: 500;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-bg);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--text-heading);
  outline-offset: 2px;
}

button:focus-visible {
  outline: 2px solid var(--text-heading);
  outline-offset: 2px;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 0.75rem;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-toggle:hover {
  color: var(--text-heading);
  border-color: var(--text-heading);
}

/* ============================================
   LAYOUT — Two-column (guide pages)
   ============================================ */

.site-layout {
  display: flex;
  min-height: calc(100vh - 56px);
}

.sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  transition: background-color 0.3s ease;
}

.sidebar-section {
  margin-bottom: 1.25rem;
}

.sidebar-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 0 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.sidebar-back {
  display: block;
  padding: 0.35rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 0.75rem;
}

.sidebar-back:hover {
  color: var(--text-heading);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin: 0;
}

.sidebar-nav a {
  display: block;
  padding: 0.35rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
}

.sidebar-nav a:hover {
  color: var(--text-heading);
  border-left-color: var(--border-strong);
}

.sidebar-nav a.active {
  color: var(--text-heading);
  border-left-color: var(--text-heading);
  font-weight: 500;
}

/* Main content */

.main-content {
  flex: 1;
  max-width: 740px;
  padding: 2.5rem 3rem;
  min-width: 0;
}

/* ============================================
   LAYOUT — Landing page
   ============================================ */

.landing-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
}

.landing-hero {
  margin-bottom: 7rem;
  max-width: 900px;
}

.landing-hero h1 {
  font-size: 5rem;
  margin-bottom: 1.75rem;
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.landing-hero .tagline {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.landing-hero p {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.7;
  max-width: 70ch;
}

.landing-hero .hero-emphasis {
  color: var(--text-heading);
  font-weight: 600;
  font-size: 1.05rem;
}

.landing-section {
  margin-bottom: 6rem;
}

.landing-section h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-bottom: none;
  margin-top: 0;
  margin-bottom: 2rem;
  padding-bottom: 0;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

/* Skip link (accessibility) */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  background: var(--text-heading);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 0 0 2px 2px;
  font-size: 0.875rem;
  text-decoration: none;
  font-weight: 500;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  color: var(--bg);
}

/* Screen reader only */

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

/* Search filter */

.search-filter {
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg);
  color: var(--text);
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-border);
  background: var(--bg);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.search-no-results {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 0;
}

/* Guide cards — editorial grid */

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  background: transparent;
  border: none;
}

.guide-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.5rem 2rem;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
  transition: all 0.2s ease;
  min-height: 160px;
}

.guide-card:hover {
  background: var(--bg);
  border-color: var(--accent-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.guide-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.guide-card.hidden {
  display: none;
}

.guide-card-icon {
  display: none;
}

.guide-card-body {
  flex: 1;
  min-width: 0;
}

.guide-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  color: var(--text-heading);
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.badge-soon {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.guide-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 55ch;
  line-height: 1.6;
}

.guide-card-arrow {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--accent);
  transition: color 0.15s ease, transform 0.15s ease;
  align-self: flex-end;
}

.guide-card:hover .guide-card-arrow {
  color: var(--accent-hover);
  transform: translateX(4px);
}

.guide-card:hover .guide-card-title {
  color: var(--accent);
}

/* External link button */

.ext-btn {
  display: inline-block;
  background: transparent;
  color: var(--text-heading);
  text-decoration: none;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 1.25rem;
  letter-spacing: 0.02em;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ext-btn:hover {
  border-color: var(--text-heading);
  background: var(--accent-bg);
  color: var(--text-heading);
}

/* About section on landing */

.landing-about {
  margin-top: 6rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.landing-about h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-weight: 600;
}

.landing-about p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.7;
  max-width: 70ch;
}

.landing-about a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
}

.landing-about a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent);
}

/* ============================================
   COMPONENTS
   ============================================ */

.lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.method-number {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  margin-bottom: 0.35rem;
  display: block;
}

/* CTA box */

.cta-box {
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
  border-radius: 2px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-box p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
}

.cta-box .cta-link {
  display: inline-block;
  background: var(--text-heading);
  color: var(--bg);
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.cta-box .cta-link:hover {
  opacity: 0.85;
  color: var(--bg);
}

@media (max-width: 768px) {
  .cta-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

.callout {
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
  border-radius: 2px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.callout p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.callout p + p {
  margin-top: 0.5rem;
}

.intro-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.intro-box p:last-child {
  margin-bottom: 0;
}

.case-study {
  background: var(--bg-surface);
  border-left: 2px solid var(--text-heading);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0;
}

.case-study h5 {
  margin-top: 0;
}

.case-study p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.principle-block {
  margin-bottom: 2rem;
}

.experiment-card {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.15s ease;
}

.experiment-card:hover {
  border-color: var(--border-strong);
}

.experiment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.exp-number {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.exp-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  font-weight: 500;
}

.exp-badge.in-progress {
  background: var(--accent-bg);
  color: var(--text-heading);
  border: 1px solid var(--border);
}

.exp-badge.planned {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.experiment-card h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.experiment-card p {
  font-size: 0.9rem;
}

.background-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.25rem;
  margin-top: 2.5rem;
}

.background-section h3 {
  margin-top: 0;
}

.background-section ul {
  margin-bottom: 0;
}

.related-link {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-heading);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.3rem 0.65rem;
  border-radius: 2px;
  margin-top: 0.75rem;
  transition: all 0.15s ease;
}

.related-link:hover {
  border-color: var(--text-heading);
}

/* Page navigation (prev/next) */

.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.page-nav a {
  text-decoration: none;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.15s ease;
}

.page-nav a:hover {
  color: var(--text-heading);
}

.page-nav a span {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-heading);
  margin-top: 0.25rem;
  text-transform: none;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.page-nav a:hover span {
  color: var(--text-heading);
}

.page-nav .next {
  text-align: right;
  margin-left: auto;
}

/* ============================================
   BOTTOM BADGE (shields.io style)
   ============================================ */

.site-badge {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
}

.has-sidebar .site-badge {
  margin-left: 260px;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .sidebar-toggle {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 56px;
    left: -260px;
    z-index: 99;
    transition: left 0.25s ease;
    box-shadow: none;
    background: var(--bg);
  }

  .sidebar.open {
    left: 0;
    box-shadow: var(--shadow-lg);
  }

  .main-content {
    padding: 1.5rem 1.25rem;
  }

  .has-sidebar .site-badge {
    margin-left: 0;
  }

  .site-badge {
    padding: 1.5rem 1.25rem;
  }

  pre {
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
  }

  table {
    font-size: 0.825rem;
  }

  th, td {
    padding: 0.5rem 0.6rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 0.75rem;
  }

  .landing-layout {
    padding: 3rem 1.25rem 4rem;
  }

  .landing-hero {
    margin-bottom: 4rem;
  }

  .landing-hero h1 {
    font-size: 2.75rem;
    line-height: 1;
  }

  .landing-hero .tagline {
    font-size: 1.15rem;
    margin-bottom: 1.75rem;
  }

  .landing-section {
    margin-bottom: 4rem;
  }

  .guide-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .guide-card {
    min-height: auto;
    padding: 2rem 1.5rem;
  }

  .header-links a.desktop-only {
    display: none;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .landing-hero h1 {
    font-size: 2.25rem;
    line-height: 1.05;
  }

  .landing-hero .tagline {
    font-size: 1rem;
  }

  .site-header {
    padding: 0 1.25rem;
  }
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 98;
}

.sidebar-overlay.visible {
  display: block;
}

/* ============================================
   PRINT
   ============================================ */

@media print {
  .site-header,
  .sidebar,
  .sidebar-overlay,
  .sidebar-toggle,
  .theme-toggle,
  .site-badge,
  .site-footer,
  .page-nav {
    display: none;
  }

  .main-content {
    padding: 0;
    max-width: none;
  }

  body {
    background: white;
    color: black;
  }
}
