:root {
  --bg-canvas: #1e1612;
  --bg-surface: #2a201b;
  --bg-surface-hover: #352923;
  --text-primary: #f5ecdf;
  --text-muted: #b9a998;
  --accent-primary: #f59e0b;
  --accent-secondary: #d97706;
  --border-subtle: #42332a;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 0px;
  --space-unit: 8px;
  --shadow-elevation: 0 4px 18px rgba(0, 0, 0, 0.45);
}

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

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

body {
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--accent-primary);
  color: #1e1612;
  padding: 10px 18px;
  font-weight: 700;
  z-index: 1000;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
}

/* Header & Floating Inset Box */
.site-header {
  position: static;
  width: 100%;
  padding: 24px 20px 12px;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 12px 28px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-mark {
  width: 28px;
  height: 28px;
  fill: var(--accent-primary);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-primary);
}

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

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 6px 4px;
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}

/* Layout Core */
.main-content {
  flex: 1 0 auto;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* Hero pure typography */
.hero-editorial {
  padding: 48px 0 56px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.hero-tagline {
  color: var(--accent-primary);
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  font-weight: 600;
}

.hero-editorial h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--text-primary);
  font-weight: normal;
  max-width: 22ch;
}

.hero-lede {
  font-size: 1.1875rem;
  color: var(--text-muted);
  max-width: 68ch;
  line-height: 1.7;
  margin-bottom: 32px;
}

.btn-square {
  display: inline-block;
  padding: 14px 28px;
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-square:hover,
.btn-square:focus-visible {
  background: var(--accent-primary);
  color: #1e1612;
}

/* Stat strip metric component */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background-color: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  margin: 40px 0;
}

.stat-item {
  background-color: var(--bg-surface);
  padding: 24px 20px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Sections */
.content-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.section-label {
  color: var(--accent-primary);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.content-section h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text-primary);
  font-weight: normal;
}

.prose {
  font-size: 1.0625rem;
  color: var(--text-primary);
  line-height: 1.75;
}

.prose p {
  margin-bottom: 18px;
}

/* Topic Card Style */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 32px;
}

.pedestrian-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #140e0b;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.card-badge {
  position: absolute;
  bottom: -12px;
  left: 16px;
  background: var(--accent-primary);
  color: #1e1612;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 0;
}

.card-body {
  padding: 28px 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin-bottom: 12px;
  line-height: 1.25;
}

.card-title a {
  color: var(--text-primary);
  text-decoration: none;
}

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

.card-text {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.card-link {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  align-self: flex-start;
  border-bottom: 1px solid transparent;
}

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

/* Secondary Panels: Tabbed & Accordions */
.tab-module {
  margin-top: 32px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.tab-button {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 16px 24px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.tab-button:hover,
.tab-button.active {
  background: #352923;
  color: var(--accent-primary);
}

.tab-panel {
  display: none;
  padding: 32px 28px;
}

.tab-panel.active {
  display: block;
}

.accordion-group {
  margin-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.accordion-item {
  border-bottom: 1px solid var(--border-subtle);
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 20px 8px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: normal;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.accordion-trigger:hover {
  color: var(--accent-primary);
}

.accordion-trigger::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.accordion-trigger[aria-expanded="true"]::after {
  content: "−";
}

.accordion-content {
  display: none;
  padding: 0 8px 24px;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.accordion-content[data-visible="true"] {
  display: block;
}

/* Contact message generator tool */
.contact-tool {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 32px 28px;
  margin-top: 32px;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-input,
.form-textarea {
  width: 100%;
  background: #1e1612;
  border: 1px solid var(--border-subtle);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 0;
}

.form-input:focus,
.form-textarea:focus {
  outline: 1px solid var(--accent-primary);
  border-color: var(--accent-primary);
}

.form-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Table wrap */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--border-subtle);
}

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

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

th {
  background: #251c17;
  color: var(--accent-primary);
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
}

tr:nth-child(even) td {
  background: #231a15;
}

/* Subtle glow layer */
.amber-glow {
  position: relative;
}
.amber-glow::after {
  content: "";
  position: absolute;
  top: 20%;
  right: -5%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.04) 0%, rgba(30, 22, 18, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Footer Specifications */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  padding: 48px 20px 36px;
  margin-top: 48px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

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

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-bottom a {
  color: var(--accent-primary);
  text-decoration: none;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .site-header {
    padding: 16px 12px 8px;
  }
  .header-container {
    border-radius: 0;
    padding: 12px 18px;
  }
  .nav-toggle {
    display: block;
  }
  .site-nav {
    position: absolute;
    top: 72px;
    left: 12px;
    right: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 20px;
    display: none;
    z-index: 100;
  }
  .site-nav.open {
    display: block;
  }
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .hero-editorial h1 {
    font-size: 2.1rem;
  }
  .tab-nav {
    flex-direction: column;
  }
  .tab-button {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
  }
}

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