:root {
  --bg-canvas: #1e2530;
  --bg-surface: #263238;
  --bg-surface-elevated: #2f3e46;
  --text-primary: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-primary: #a3e635;
  --accent-hover: #bef264;
  --accent-dim: #4d7c0f;
  --border-subtle: #334155;
  --border-strong: #475569;
  --border-lime: #a3e635;
  --shadow-block: 4px 4px 0px #000000;
  --shadow-block-sm: 2px 2px 0px #000000;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-content-width: 1040px;
  --reading-width: 70ch;
}

*, *::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);
  font-size: 16px;
  line-height: 1.65;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
  hyphens: auto;
  border: 1px solid var(--border-subtle);
  margin: 8px;
}

@media (min-width: 1024px) {
  body {
    margin: 16px;
  }
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover, a:focus-visible {
  color: var(--accent-hover);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: normal;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2rem);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
}

p {
  margin-bottom: 1.25rem;
  color: #e2e8f0;
}

/* Header & Navigation */
.site-header {
  position: static;
  width: 100%;
  border-bottom: 1px solid var(--border-subtle);
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.header-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  text-align: left;
  text-decoration: none;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: var(--accent-primary);
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}

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

.nav-desktop a {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  padding: 0.25rem 0.5rem;
  border: 1px solid transparent;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary);
}

.mobile-nav-toggle {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--accent-primary);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}

.mobile-nav-dropdown {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 2px solid var(--accent-primary);
  padding: 1rem 1.5rem;
}

.mobile-nav-dropdown.is-open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-list a {
  text-decoration: none;
  font-size: 1rem;
  color: var(--text-primary);
  display: block;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-list a.active,
.mobile-nav-list a:hover {
  color: var(--accent-primary);
}

/* Layout Framework */
.main-wrapper {
  flex: 1;
  max-width: var(--max-content-width);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.editorial-column {
  max-width: var(--reading-width);
  margin: 0 auto;
}

/* Typographic Banner Hero */
.hero-editorial {
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 2rem;
  margin-bottom: 3rem;
}

.hero-meta {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  display: block;
}

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

/* Buttons with 4px tactile drop shadow */
.btn-lime {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-primary);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid #000000;
  box-shadow: var(--shadow-block);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  border-radius: 0;
}

.btn-lime:hover {
  background-color: var(--accent-hover);
  color: #000000;
}

.btn-lime:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-block-sm);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-block);
  cursor: pointer;
  border-radius: 0;
}

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

.btn-secondary:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-block-sm);
}

/* Ledger List Rows */
.ledger-list {
  list-style: none;
  margin: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--border-subtle);
}

.ledger-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 0;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  align-items: start;
}

.ledger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background-color: var(--bg-surface);
  color: var(--accent-primary);
  font-family: monospace;
  font-size: 1.1rem;
  border: 1px solid var(--border-subtle);
}

.ledger-content h4 {
  font-size: 1.1rem;
  font-family: var(--font-sans);
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.ledger-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

/* Breakout Pull Quote */
.breakout-quote {
  margin: 2.5rem -1.5rem;
  padding: 1.5rem 2rem;
  background-color: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
  border-right: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .breakout-quote {
    margin: 3rem -3rem;
    padding: 2rem 3rem;
  }
}

.breakout-quote p {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.5;
  color: #f1f5f9;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.breakout-quote cite {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-style: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Wide Technical Diagram / Illustration Container */
.schematic-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  padding: 1.25rem;
  margin: 2.5rem 0;
}

.schematic-box img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border-subtle);
  filter: contrast(1.05) brightness(0.95);
}

.schematic-caption {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.5rem;
  font-family: monospace;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

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

th {
  background-color: var(--bg-surface);
  color: var(--accent-primary);
  font-family: var(--font-serif);
  font-weight: normal;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

tr:nth-child(even) td {
  background-color: rgba(38, 50, 56, 0.4);
}

/* Diagnostic Triage Tool Component */
.tool-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-lime);
  padding: 1.75rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-block);
}

.tool-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.tool-header h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--accent-primary);
}

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

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

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  border-radius: 0;
}

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

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.tool-output {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background-color: var(--bg-canvas);
  border: 1px dashed var(--border-strong);
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #e2e8f0;
}

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

/* FAQ Accordion */
.faq-block {
  margin-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.faq-entry {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 0;
}

.faq-question {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--text-primary);
}

.faq-question:hover {
  color: var(--accent-primary);
}

.faq-symbol {
  font-family: monospace;
  color: var(--accent-primary);
  font-size: 1.25rem;
}

.faq-answer {
  margin-top: 0.75rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--border-subtle);
}

/* Site Footer */
.site-footer {
  border-top: 2px solid var(--border-strong);
  background-color: var(--bg-surface);
  padding: 3rem 1.5rem 2rem;
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

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

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

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

.legal-waiver {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-dim);
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-bottom a {
  color: var(--text-primary);
  font-weight: 600;
}

/* Micro-interaction scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .breakout-quote {
    margin: 2rem 0;
    padding: 1.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}}
