:root {
  --bg-canvas: #3b0d1a;
  --bg-surface: #501c2a;
  --text-primary: #fff7e8;
  --text-muted: #dccbb9;
  --accent-primary: #e8d5a8;
  --border-subtle: #957466;
  --champagne-bg: #e8d5a8;
  --champagne-text: #3b0d1a;
  --champagne-muted: #5e2a36;
  --focus-ring: #ffd276;
  --font-family: "Trebuchet MS", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-primary);
  color: var(--champagne-text);
  padding: 0.5rem 1rem;
  font-weight: bold;
  text-decoration: none;
  z-index: 9999;
  border: 2px solid var(--border-subtle);
}
.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover {
  color: #fff;
}

/* Slim Non-Sticky Header with Far-Left Brand */
.site-header {
  position: relative;
  width: 100%;
  padding: 10px clamp(1rem, 4vw, 2.5rem);
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.brand-wrapper {
  margin-right: auto;
}

.site-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.nav-cta-btn {
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  background: transparent;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.nav-cta-btn:hover {
  background: var(--accent-primary);
  color: var(--champagne-text);
}

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

/* Main Layout Elements */
main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 4vw, 2.5rem);
}

.reading-column {
  max-width: 72ch;
  margin: 0 auto;
}

/* Editorial Hero */
.hero-editorial {
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-left h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  color: var(--accent-primary);
  margin-bottom: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero-lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-ledger {
  display: inline-block;
  border: 1px solid var(--accent-primary);
  background: transparent;
  color: var(--accent-primary);
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  line-height: 1.2;
}

.btn-ledger:hover {
  background: var(--accent-primary);
  color: var(--champagne-text);
}

.hero-right-render {
  position: relative;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 1rem;
}

.hero-img-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #250810;
  display: block;
}

.hero-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.render-meta {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  border-left: 2px solid var(--accent-primary);
  padding-left: 0.75rem;
}

/* Bold Champagne Full-Width Blocks */
.champagne-strip {
  background-color: var(--champagne-bg);
  color: var(--champagne-text);
  padding: clamp(2rem, 4vw, 4rem) 0;
  border-top: 2px solid var(--border-subtle);
  border-bottom: 2px solid var(--border-subtle);
}

.champagne-strip h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  color: var(--champagne-text);
  margin-bottom: 1.25rem;
  font-weight: 800;
}

.champagne-strip p {
  color: var(--champagne-muted);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.champagne-strip .btn-ledger {
  border-color: var(--champagne-text);
  color: var(--champagne-text);
}

.champagne-strip .btn-ledger:hover {
  background: var(--champagne-text);
  color: var(--accent-primary);
}

/* Ledger List Rows with Artefact Category Icons (No Cards Rule) */
.ledger-list {
  display: flex;
  flex-direction: column;
}

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

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

.ledger-icon-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.artefact-icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent-primary);
}

.ledger-id-col h3 {
  font-size: 1.25rem;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}

.provenance-tag {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.ledger-desc-col p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.ledger-action-col {
  text-align: right;
}

/* Paired Evidence Blocks (Find vs Scholarly Interpretation) */
.paired-evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2.5rem 0;
}

.evidence-side {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 1.75rem;
}

.evidence-side.interpretation {
  background: rgba(232, 213, 168, 0.04);
  border-style: dashed;
}

.evidence-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  padding: 2px 6px;
  border: 1px solid var(--border-subtle);
}

.evidence-side h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.evidence-side p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.evidence-side p:last-child {
  margin-bottom: 0;
}

/* Chronological Timeline Component */
.timeline-ledger {
  position: relative;
  margin: 3rem 0;
  border-left: 2px solid var(--accent-primary);
  padding-left: 2rem;
}

.timeline-entry {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -2.45rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-canvas);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}

.timeline-entry h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-entry p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Lead Block & Two-Column Grid (Editorial Style Direction) */
.editorial-lead-block {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
}

.editorial-lead-block h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.editorial-lead-block p {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.two-col-evidence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.evidence-item {
  border-top: 2px solid var(--accent-primary);
  padding-top: 1.25rem;
}

.evidence-item h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.evidence-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.evidence-img-container {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 1rem 0;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: #250810;
}

.evidence-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.faq-disclosure {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.faq-disclosure summary {
  padding: 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.faq-disclosure summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 1rem;
}

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

.faq-disclosure .faq-body {
  padding: 0 1.25rem 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  border-top: 1px solid rgba(149, 116, 102, 0.3);
}

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

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  min-width: 580px;
}

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

.ledger-table th {
  background: var(--bg-surface);
  color: var(--accent-primary);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.ledger-table tr:hover {
  background: rgba(232, 213, 168, 0.05);
}

/* Contact Drafting Tool */
.drafting-tool-wrapper {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  margin: 2rem 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #250810;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}

.form-control:focus {
  border-color: var(--accent-primary);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

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

.status-feedback {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  min-height: 1.2rem;
}

/* Site Footer */
.site-footer {
  background: #250810;
  border-top: 2px solid var(--border-subtle);
  padding: 3rem clamp(1rem, 4vw, 2.5rem) 2rem clamp(1rem, 4vw, 2.5rem);
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  display: inline-block;
  text-decoration: none;
}

.footer-meta p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.footer-links-group h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.footer-links-group ul {
  list-style: none;
}

.footer-links-group li {
  margin-bottom: 0.5rem;
}

.footer-links-group a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links-group a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.footer-bottom-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(149, 116, 102, 0.4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-editorial {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ledger-row {
    grid-template-columns: 60px 1.2fr 1.8fr;
  }
  .ledger-action-col {
    grid-column: 2 / -1;
    text-align: left;
    margin-top: 0.5rem;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 2px solid var(--accent-primary);
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
  }

  .site-nav.is-active {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 8px 0;
    font-size: 1.05rem;
  }

  .nav-cta-btn {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
    padding: 10px;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .two-col-evidence,
  .paired-evidence-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .ledger-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .ledger-icon-col {
    justify-content: flex-start;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-ledger {
    width: 100%;
    text-align: center;
  }
}

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