:root {
  --bg-canvas: #faf6ef;
  --bg-surface: #fffdf8;
  --text-primary: #2b211a;
  --text-muted: #5e5045;
  --accent-primary: #c2562e;
  --accent-primary-hover: #9c4323;
  --accent-secondary: #6b7a3a;
  --border-subtle: rgba(43, 33, 26, 0.15);
  
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 8px 24px -4px rgba(43, 33, 26, 0.12);
  --grid-pattern: 
    linear-gradient(to right, rgba(43,33,26,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(43,33,26,0.05) 1px, transparent 1px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Strict 0px radius */
}

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

h1, h2, h3, h4, h5, h6, .mono, .label, .metric, nav a, .btn {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s var(--ease-kinetic);
}

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

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: static;
}

.brand-wrapper {
  flex-shrink: 0;
}

.brand-name {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.2rem;
  letter-spacing: 0;
  text-transform: none;
}

.desktop-nav {
  display: flex;
  gap: 2rem;
}

.desktop-nav a {
  color: var(--text-primary);
  font-size: 0.85rem;
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 2rem;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* Layout Engine */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

section {
  padding: 4rem 0;
}

.bg-grid {
  background-image: var(--grid-pattern);
  background-size: 40px 40px;
}

/* Hero Section */
.hero {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Hero Overlapping Illustrations */
.hero-visuals {
  position: relative;
  height: 400px;
}

.illustration-layer {
  position: absolute;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  box-shadow: var(--shadow-elevation);
}

.layer-1 { top: 0; left: 0; width: 60%; z-index: 1; transform: rotate(-3deg); }
.layer-2 { top: 40px; right: 0; width: 50%; z-index: 2; transform: rotate(2deg); border-top: 4px solid var(--accent-secondary); }
.layer-3 { bottom: 0; left: 20%; width: 70%; z-index: 3; border-top: 4px solid var(--accent-primary); }

.mock-stat-bar { height: 8px; background: var(--border-subtle); margin-bottom: 8px; width: 100%; }
.mock-stat-bar.w-70 { width: 70%; background: var(--accent-primary); }
.mock-stat-bar.w-40 { width: 40%; background: var(--accent-secondary); }

/* Components */
.btn {
  display: inline-block;
  background-color: var(--accent-primary);
  color: var(--bg-surface) !important;
  padding: 0.8rem 1.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-kinetic);
  border-radius: 999px !important; /* Button pills only per brief */
  font-size: 0.85rem;
}

.btn:hover {
  background-color: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(194, 86, 46, 0.3);
}

.btn-secondary {
  background-color: var(--text-primary);
}
.btn-secondary:hover {
  background-color: var(--text-muted);
  box-shadow: 0 4px 12px rgba(43, 33, 26, 0.3);
}

/* Cards (Bento/Ledger style) */
.ledger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.ledger-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  position: relative;
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic);
}

.ledger-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevation);
}

.badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background-color: var(--accent-secondary);
  color: var(--bg-surface);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-family: monospace;
}

.badge.terracotta {
  background-color: var(--accent-primary);
}

.card-img-wrapper {
  width: calc(100% + 4rem);
  margin-left: -2rem;
  margin-top: -2rem;
  margin-bottom: 1.5rem;
  height: 200px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stat-strip {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.5rem 0;
  margin: 1rem 0;
  font-family: monospace;
  font-size: 0.8rem;
}

.stat-val {
  color: var(--accent-primary);
  font-weight: bold;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

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

th {
  background-color: var(--bg-surface);
  font-family: monospace;
  text-transform: uppercase;
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: system-ui, sans-serif;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* Editorial Content */
.article-header {
  text-align: center;
  padding: 4rem 0 2rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 3rem;
}

.article-content h2 {
  margin: 3rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border-subtle);
  color: var(--accent-secondary);
}

.article-content h3 {
  margin: 2rem 0 1rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.pull-quote {
  border-left: 4px solid var(--accent-primary);
  padding: 1rem 0 1rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.1rem;
  background-color: var(--bg-surface);
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
  background: var(--bg-surface);
}

.faq-q {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: monospace;
  font-weight: bold;
}

.faq-q::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--accent-primary);
}

.faq-item.open .faq-q::after {
  content: '-';
}

.faq-a {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-kinetic), padding 0.3s;
}

.faq-item.open .faq-a {
  padding: 0 1.5rem 1.5rem;
  max-height: 500px;
}

/* Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  margin-bottom: 3rem;
}

.footer-col h4 {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.footer-col ul {
  list-style: none;
}

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

.footer-col a {
  color: var(--text-primary);
  font-size: 0.9rem;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: monospace;
}

/* Animation Classes */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-kinetic), transform 0.7s var(--ease-kinetic);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .desktop-nav {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-visuals {
    height: 300px;
  }
  .article-header h1 {
    font-size: 2rem;
  }
}