:root {
  --bg-canvas: #1e2530;
  --bg-surface: #293341;
  --text-primary: #ffffff;
  --text-muted: #c5ced8;
  --accent-primary: #a3e635;
  --border-subtle: #617083;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 20px;
  --max-w: 1200px;
}

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

html {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-primary);
  color: #1e2530;
  padding: 0.5rem 1rem;
  font-weight: 700;
  z-index: 1000;
  border-radius: var(--radius);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: static;
  width: 100%;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 1.5rem;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-marker {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: var(--accent-primary);
  border-radius: 50%;
}

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

.nav-desktop a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-desktop a:hover, .nav-desktop a[aria-current="page"] {
  color: var(--accent-primary);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  position: absolute;
  top: 65px;
  right: 1.5rem;
  left: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.5rem;
  z-index: 100;
  box-shadow: 0 16px 32px rgba(0,0,0,0.5);
}

.mobile-drawer.open {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-drawer a {
  text-decoration: none;
  font-size: 1.05rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(97, 112, 131, 0.3);
  color: var(--text-primary);
}

/* Layout Core */
main {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) 1.5rem;
}

.chronicle-stream {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--accent-primary);
}

.chronicle-chapter {
  position: relative;
  margin-bottom: 4.5rem;
  padding-left: 1.5rem;
}

.chronicle-chapter::before {
  content: "";
  position: absolute;
  left: -2.35rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-canvas);
  border: 3px solid var(--accent-primary);
}

.chapter-number {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  font-weight: 700;
  color: var(--accent-primary);
  opacity: 0.85;
  display: block;
  margin-bottom: 0.25rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  hyphens: auto;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin-bottom: 1rem;
  max-width: 22ch;
}

h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-muted);
  max-width: 68ch;
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.lead-p {
  font-size: 1.2rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Hero Overlap Layout */
.hero-editorial {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.hero-tri-photos {
  position: relative;
  min-height: 380px;
}

.hero-photo {
  position: absolute;
  border-radius: var(--radius);
  object-fit: cover;
  border: 3px solid var(--bg-surface);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.hero-photo-1 {
  width: 68%;
  height: 250px;
  top: 0;
  left: 0;
  z-index: 1;
}

.hero-photo-2 {
  width: 62%;
  height: 220px;
  top: 100px;
  right: 0;
  z-index: 2;
}

.hero-photo-3 {
  width: 55%;
  height: 190px;
  bottom: 0;
  left: 20%;
  z-index: 3;
}

/* Button */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-primary);
  color: #1e2530;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, background-color 0.15s ease;
  min-height: 44px;
}

.btn-pill:hover {
  background-color: #bef264;
  color: #1e2530;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  margin-left: 0.75rem;
}

.btn-secondary:hover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

/* Thin Divider List Rows (No Cards) */
.list-rows {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
}

.list-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.list-row:first-child {
  border-top: 1px solid var(--border-subtle);
}

.icon-category {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.row-body h3 {
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}

.row-body p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.row-action {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
  white-space: nowrap;
}

/* Surface Panel */
.panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  margin: 2rem 0;
}

.media-caption-pair {
  margin: 2rem 0;
}

.media-frame {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
  background: #11161d;
}

.media-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 2px solid var(--accent-primary);
  padding-left: 0.75rem;
}

/* Evidence vs Folklore DL */
.evidence-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.matrix-item {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 4px solid var(--accent-primary);
}

.matrix-item dt {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.matrix-item dd {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.matrix-item dd:last-child {
  margin-bottom: 0;
}

.tag-label {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(163, 230, 53, 0.15);
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

/* Chronological Strip */
.timeline-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.timeline-cell {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border-subtle);
}

.timeline-year {
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 700;
  text-transform: uppercase;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 0.3rem 0;
  color: var(--text-primary);
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* Data Table wrapper */
.table-scroll {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background-color: var(--bg-surface);
  font-size: 0.95rem;
}

th, td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background-color: #212934;
  color: var(--accent-primary);
  font-family: var(--font-serif);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

/* Accordion FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

details.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
}

details.faq-item summary {
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent-primary);
  font-weight: 400;
}

details.faq-item[open] summary::after {
  content: "–";
}

details.faq-item .faq-answer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(97, 112, 131, 0.4);
}

/* Contact drafting tool */
.drafting-form {
  display: grid;
  gap: 1.25rem;
  max-width: 650px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

input, textarea, select {
  background-color: #212934;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 1rem;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.preview-output {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background-color: #1a202a;
  border: 1px dashed var(--border-subtle);
  border-radius: 12px;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background-color: #171d26;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 1.5rem 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(97, 112, 131, 0.3);
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

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

.footer-meta {
  max-width: var(--max-w);
  margin: 1.5rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-editorial {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-tri-photos {
    min-height: 280px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .chronicle-stream {
    padding-left: 1.25rem;
  }
  .chronicle-chapter {
    padding-left: 1rem;
    margin-bottom: 3.5rem;
  }
  .chronicle-chapter::before {
    left: -1.7rem;
    width: 12px;
    height: 12px;
  }
  .list-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .icon-category {
    margin-bottom: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
