:root {
  --bg: 251 251 250;
  --surface: 255 255 255;
  --raised: 255 255 255;
  --ink: 11 11 10;
  --muted: 92 90 82;
  --faint: 138 135 125;
  --line: 231 229 222;
  --forest: 27 67 50;
  --champagne: 166 130 74;
}
.dark {
  --bg: 11 11 10;
  --surface: 20 20 18;
  --raised: 26 26 23;
  --ink: 243 241 236;
  --muted: 168 165 154;
  --faint: 122 120 111;
  --line: 40 40 35;
  --forest: 106 158 128;
  --champagne: 212 180 131;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}
body {
  background-color: rgb(var(--bg));
  color: rgb(var(--ink));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .6s ease, color .6s ease;
  line-height: 1.7; /* Increased for better readability */
  font-size: 1rem; /* Base font size */
}
section[id],
article[id],
main[id] {
  scroll-margin-top: 6.5rem;
}
::selection { background: rgb(var(--champagne) / .28); }

.grain::before {
  content: "";
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.dark .grain::before { mix-blend-mode: screen; opacity: .05; }

.font-serif { font-family: 'Playfair Display', Georgia, serif; }
.display { font-family: 'Playfair Display', Georgia, serif; line-height: .98; letter-spacing: -0.015em; }
.eyebrow { font-size: .72rem; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 600; }

/* Focus styles */
:focus-visible {
  outline: 2px solid rgb(var(--champagne));
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* Entrance / scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); }
.html.js .reveal, .js .reveal { will-change: transform, opacity; }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .9s cubic-bezier(.16,.84,.44,1), transform .9s cubic-bezier(.16,.84,.44,1);
}

/* Magnetic buttons */
.magnetic {
  transition: transform .35s cubic-bezier(.16,.84,.44,1), box-shadow .35s ease, background-color .3s ease, color .3s ease;
}
.magnetic .mag-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: transform .35s cubic-bezier(.16,.84,.44,1);
}
.magnetic:hover {
  box-shadow: 0 18px 40px -16px rgb(var(--forest) / .55);
}

/* Inputs */
.field {
  transition: box-shadow .3s ease, border-color .3s ease, background-color .3s ease;
}
.field:focus {
  outline: none;
  border-color: rgb(var(--champagne));
  box-shadow: 0 0 0 4px rgb(var(--champagne) / .18), 0 0 22px -2px rgb(var(--champagne) / .35);
}

/* Featured image / card art */
.art {
  background:
    radial-gradient(120% 120% at 12% 8%, rgb(var(--champagne) / .32), transparent 46%),
    radial-gradient(140% 120% at 92% 96%, rgb(var(--forest) / .55), transparent 52%),
    linear-gradient(135deg, rgb(var(--forest)) 0%, rgb(var(--forest) / .82) 42%, #0e2419 100%);
}
.art-mini {
  background:
    radial-gradient(120% 130% at 88% 12%, rgb(var(--champagne) / .34), transparent 50%),
    linear-gradient(160deg, rgb(var(--forest) / .9), #10251a 96%);
}
.art-fig {
  position:absolute; inset:0; opacity:.5; mix-blend-mode:soft-light;
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,.14) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(25deg, rgba(255,255,255,.06) 0 1px, transparent 1px 34px);
}
.zoomable { transition: transform 1.1s cubic-bezier(.16,.84,.44,1); }
.group:hover .zoomable { transform: scale(1.06); }

/* Card title underline sweep */
.sweep {
  background-image: linear-gradient(rgb(var(--champagne)), rgb(var(--champagne)));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .5s cubic-bezier(.16,.84,.44,1);
}
.group:hover .sweep, a:hover > .sweep {
  background-size: 100% 1.5px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(120deg, #071016 0%, #132c31 34%, #203a3f 100%);
  min-height: clamp(36rem, 80vh, 56rem);
}

.hero-section > .mx-auto {
  position: relative;
  z-index: 1;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.hero-video video,
.hero-video img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  filter: saturate(1.08) contrast(1.04);
}

.hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 10, 14, 0.74) 0%, rgba(3, 10, 14, 0.4) 45%, rgba(3, 10, 14, 0.24) 100%);
  pointer-events: none;
}

@media (max-width: 640px) {
  .hero-video video,
  .hero-video img {
    object-position: center 24%;
  }
}

/* Drop cap */
.dropcap::first-letter {
  font-family: 'Playfair Display', serif;
  float: left;
  font-size: 4.4rem;
  line-height: .78;
  font-weight: 700;
  padding: .35rem .5rem 0 0;
  color: rgb(var(--champagne));
}

/* Theme toggle knob */
.theme-knob { transition: transform .5s cubic-bezier(.5,1.6,.5,1); }
.dark .theme-knob { transform: translateX(20px); }
.icon-sun, .icon-moon {
  transition: opacity .4s ease, transform .5s ease;
}
.icon-moon {
  opacity: 0;
  transform: rotate(-40deg) scale(.6);
  position:absolute;
}
.dark .icon-moon {
  opacity: 1;
  transform: none;
}
.dark .icon-sun  {
  opacity: 0;
  transform: rotate(40deg) scale(.6);
}

/* Drawer */
.drawer { transition: transform .55s cubic-bezier(.16,.84,.44,1); }
.drawer-open .drawer { transform: translateX(0) !important; }
.drawer-backdrop { transition: opacity .5s ease; }

.hairline {
  height:1px;
  background: linear-gradient(90deg, transparent, rgb(var(--line)) 12%, rgb(var(--line)) 88%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .zoomable, .magnetic, .magnetic .mag-label, .theme-knob { transition: none !important; }
}

/* Existing component styles */
.issue-card-cover {
  height: 220px;
  width: 100%;
  object-fit: cover;
  border-radius: 1.15rem;
}

.content-manager-card {
  border-radius: 1.35rem;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface));
}

.content-manager-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 1.15rem;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--bg));
}

.content-manager-item h4 {
  font-size: 1rem;
  margin: 0;
}

.content-manager-item p {
  margin: 0.35rem 0 0;
  color: rgb(var(--muted));
  font-size: 0.95rem;
}

.issue-modal-content p {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.8;
  color: rgb(var(--muted));
}

.issue-modal-content h2,
.issue-modal-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  color: rgb(var(--ink));
}

/* Typography enhancements */
p {
  margin-bottom: 1.5rem; /* Increased paragraph spacing */
}
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2; /* Tighter line height for headings */
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Screen-reader only — visually hidden but accessible */
.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;
}

/* ─── Rules / Legal page ────────────────────────────────────────── */

/* Page layout helpers */
.page-wrap {
  max-width: 88rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 640px) {
  .page-wrap { padding-inline: 2rem; }
}

/* Sticky site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgb(var(--line));
  background: rgb(var(--bg) / .8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}
.site-header .back-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  font-weight: 500;
  color: rgb(var(--muted));
  text-decoration: none;
  transition: color .2s ease;
}
.site-header .back-link:hover { color: rgb(var(--ink)); }
.site-header .back-link svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.header-label {
  font-size: .72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgb(var(--faint));
}
@media (max-width: 639px) { .header-label { display: none; } }

/* Theme toggle button */
.theme-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 3.25rem;
  height: 1.875rem;
  border-radius: 9999px;
  border: 1.5px solid rgb(var(--champagne) / .45);
  background: rgb(var(--raised));
  box-shadow: 0 0 0 3px rgb(var(--champagne) / .08), inset 0 1px 3px rgb(0 0 0 / .12);
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
  cursor: pointer;
  flex-shrink: 0;
}
.theme-btn:hover {
  border-color: rgb(var(--champagne) / .7);
  box-shadow: 0 0 0 4px rgb(var(--champagne) / .14), inset 0 1px 3px rgb(0 0 0 / .12);
}
.theme-btn .knob {
  position: absolute;
  left: .1875rem;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgb(var(--champagne)), rgb(var(--champagne) / .8));
  box-shadow: 0 2px 6px rgb(0 0 0 / .22), 0 0 0 1px rgb(var(--champagne) / .3);
  transition: transform .5s cubic-bezier(.5,1.6,.5,1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
}
.dark .theme-btn .knob { transform: translateX(22px); }

/* Hero section */
.legal-hero {
  border-bottom: 1px solid rgb(var(--line));
  background: rgb(var(--surface) / .6);
  padding-block: 4rem 5rem;
}
@media (min-width: 640px) { .legal-hero { padding-block: 6rem; } }
.legal-hero .eyebrow-label {
  display: block;
  margin-bottom: 1rem;
  font-size: .72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgb(var(--champagne));
}
.legal-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -0.015em;
  margin-top: 0;
  margin-bottom: 1.25rem;
  max-width: 32rem;
}
.legal-hero .subtitle {
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.7;
  color: rgb(var(--muted));
  margin-bottom: 2rem;
}

/* Jump-to nav pills */
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.jump-nav a {
  display: inline-block;
  border-radius: 9999px;
  border: 1px solid rgb(var(--line));
  padding: .375rem 1rem;
  font-size: .75rem;
  font-weight: 600;
  color: rgb(var(--muted));
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease;
}
.jump-nav a:hover {
  color: rgb(var(--ink));
  border-color: rgb(var(--champagne));
}

/* Main content grid */
.legal-grid {
  display: block;
  padding-block: 3.5rem 5rem;
}
@media (min-width: 1024px) {
  .legal-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 4rem;
    padding-block: 5rem;
  }
}

/* Sticky TOC sidebar */
.toc-sidebar {
  display: none;
}
@media (min-width: 1024px) {
  .toc-sidebar {
    display: block;
  }
  .toc-sidebar nav {
    position: sticky;
    top: 6rem;
  }
}
.toc-sidebar .toc-heading {
  font-size: .72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgb(var(--faint));
  margin-bottom: 1rem;
  display: block;
}
.toc-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-sidebar ul li + li { margin-top: .125rem; }
.toc-link {
  display: block;
  font-size: .8125rem;
  color: rgb(var(--faint));
  padding: .375rem 0 .375rem .875rem;
  border-left: 2px solid rgb(var(--line));
  transition: color .2s ease, border-color .2s ease;
  text-decoration: none;
}
.toc-link:hover,
.toc-link.active {
  color: rgb(var(--ink));
  border-left-color: rgb(var(--champagne));
}

/* Legal sections */
.legal-sections { display: flex; flex-direction: column; gap: 1.5rem; }

.legal-section {
  scroll-margin-top: 5.5rem;
  border: 1px solid rgb(var(--line));
  border-radius: 1.5rem;
  background: rgb(var(--surface));
  padding: 2.5rem 2rem;
  transition: border-color .3s ease;
}
.legal-section:hover { border-color: rgb(var(--champagne) / .35); }
@media (min-width: 768px) { .legal-section { padding: 3rem; } }

/* Section badge */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .875rem;
  border-radius: 9999px;
  border: 1px solid rgb(var(--line));
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgb(var(--champagne));
  background: rgb(var(--champagne) / .06);
  margin-bottom: 1.25rem;
}

/* Legal prose typography */
.prose-legal h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: rgb(var(--ink));
  margin-top: 0;
  margin-bottom: 1.1rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.prose-legal h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: rgb(var(--ink));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  line-height: 1.2;
}
.prose-legal p {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: rgb(var(--muted));
  margin-bottom: 1.25rem;
}
.prose-legal ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.25rem;
}
.prose-legal ul li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: rgb(var(--muted));
  margin-bottom: .55rem;
}
.prose-legal ul li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: rgb(var(--champagne));
  font-weight: 600;
}
.prose-legal a {
  color: rgb(var(--champagne));
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity .2s ease;
}
.prose-legal a:hover { opacity: .75; }
.prose-legal strong { color: rgb(var(--ink)); font-weight: 600; }
.prose-legal code {
  font-family: 'Courier New', Courier, monospace;
  font-size: .875rem;
  background: rgb(var(--line) / .4);
  border-radius: .25rem;
  padding: .15rem .45rem;
  color: rgb(var(--ink));
}

/* Site footer */
.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgb(var(--line));
  margin-top: 2rem;
}
.site-footer .inner {
  padding-block: 2.5rem;
}
.footer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: .75rem;
  color: rgb(var(--faint));
  text-align: center;
}
@media (min-width: 640px) {
  .footer-row {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.footer-row p { margin: 0; }
.footer-row a {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  text-decoration: none;
  color: rgb(var(--faint));
  transition: color .2s ease;
}
.footer-row a:hover { color: rgb(var(--ink)); }
.footer-row a svg { width: .875rem; height: .875rem; }