:root {
  --bg-canvas: #1e1612;
  --bg-surface: #32251d;
  --bg-panel: #261c16;
  --text-primary: #f5ecdf;
  --text-muted: #d9c5ae;
  --accent-primary: #f59e0b;
  --border-subtle: #8b725b;
  --espresso: #1a120d;
}

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

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  overflow-wrap: anywhere;
  hyphens: auto;
  min-height: 100vh;
}

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

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-primary);
  color: var(--espresso);
  padding: 0.5rem 1rem;
  font-weight: 700;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}

/* Header - Rounded end header box inset from page edges */
.site-header {
  max-width: 1200px;
  margin: 14px auto 20px auto;
  padding: 0 1rem;
  position: relative;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 10px 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: auto;
}
.brand-mark {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--accent-primary);
  border-radius: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav-link {
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.3rem;
  line-height: 1;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 0;
  letter-spacing: 2px;
}

.mobile-menu {
  display: none;
  margin-top: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  flex-direction: column;
  gap: 0.75rem;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu .nav-link {
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(139, 114, 91, 0.2);
}

/* Base Layout Containers */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.5rem);
}
.prose-container {
  max-width: 72ch;
  margin: 0 auto;
}

h1, h2, h3, h4 {
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 800; margin-top: 2rem; }
h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.5rem; }

p { margin-bottom: 1.25rem; color: var(--text-muted); }
p strong { color: var(--text-primary); }

.tag-label {
  display: inline-block;
  background: var(--accent-primary);
  color: var(--espresso);
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  margin-bottom: 0.75rem;
  border-radius: 0;
}

/* Button with 4px 4px 0 hard shadow */
.btn-polar {
  display: inline-block;
  background: var(--accent-primary);
  color: var(--espresso);
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 22px;
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--border-subtle);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn-polar:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--border-subtle);
  color: var(--espresso);
}
.btn-polar:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 transparent;
}

/* Hero Section */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3.5rem;
  align-items: start;
}
@media (min-width: 860px) {
  .hero-layout {
    grid-template-columns: 1.3fr 0.9fr;
  }
}

.hero-media {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  border-radius: 0;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.hero-media figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

.hero-fact-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: clamp(1.2rem, 2.5vw, 2rem);
  border-radius: 0;
}

.fact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.fact-item {
  border-left: 3px solid var(--accent-primary);
  padding-left: 1rem;
}
.fact-item .fact-title {
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.fact-item .fact-desc {
  margin: 0.25rem 0 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Stat Strip Component */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  margin: 2.5rem 0;
  border-radius: 0;
}
.stat-box {
  border-left: 2px solid var(--border-subtle);
  padding-left: 1rem;
}
.stat-val {
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1.2;
}
.stat-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Card Grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.polar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.polar-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
  border-radius: 0;
}
.polar-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}
.polar-card p {
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

/* Split Card */
.split-card {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  margin: 2rem 0;
  border-radius: 0;
}
@media (min-width: 768px) {
  .split-card {
    grid-template-columns: 1fr 1.2fr;
  }
}
.split-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.split-card-content {
  padding: clamp(1.2rem, 3vw, 2rem);
}

/* Accordion (Native <details>) */
.polar-accordion {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  margin-bottom: 1rem;
  border-radius: 0;
}
.polar-accordion summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-panel);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.polar-accordion summary::-webkit-details-marker {
  display: none;
}
.polar-accordion summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--accent-primary);
}
.polar-accordion[open] summary::after {
  content: "—";
}
.accordion-body {
  padding: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}
.accordion-body p:last-child {
  margin-bottom: 0;
}

/* Table Wrapper */
.table-scroll-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  margin: 2rem 0;
  background: var(--bg-surface);
}
table.polar-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
table.polar-table th, table.polar-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
table.polar-table th {
  background: var(--bg-panel);
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  font-weight: 700;
}
table.polar-table tr:last-child td {
  border-bottom: none;
}

/* Form Styles */
.draft-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 0;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group label {
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}
.draft-form input, .draft-form select, .draft-form textarea {
  background: var(--espresso);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 10px 12px;
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
  border-radius: 0;
}
.draft-form textarea {
  min-height: 130px;
  resize: vertical;
}
.draft-output {
  margin-top: 1.5rem;
  background: var(--espresso);
  border: 1px dashed var(--border-subtle);
  padding: 1rem;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  display: none;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Footer */
.site-footer {
  max-width: 1200px;
  margin: 4rem auto 2rem auto;
  padding: 2rem 1rem 1rem 1rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-nav {
  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 {
  font-size: 0.8rem;
  line-height: 1.5;
  border-top: 1px solid rgba(139, 114, 91, 0.3);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
}

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