:root {
  --bg-canvas: #13261d;
  --bg-surface: #1c3529;
  --bg-surface-hover: #234233;
  --text-primary: #efe6d2;
  --text-muted: #b5a990;
  --accent-primary: #b8923a;
  --accent-secondary: #d4ae58;
  --border-subtle: #2d4f3e;
  --border-brass: #b8923a;
  --font-stack: "Trebuchet MS", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-kinetic: cubic-bezier(0.22, 0.61, 0.36, 1);
  --duration: 300ms;
  --shadow-offset: 4px 4px 0px #09130e;
}

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

html {
  font-family: var(--font-stack);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.7;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-wrap: anywhere;
  hyphens: auto;
  border: 1px solid var(--border-subtle);
  margin: 12px;
}

@media (max-width: 600px) {
  body {
    margin: 4px;
    border: none;
  }
}

a {
  color: var(--accent-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--duration) var(--ease-kinetic);
}

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

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

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

/* Header & Navigation */
header.site-header {
  position: static;
  width: 100%;
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
}

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

.brand-wrapper:hover {
  color: var(--accent-secondary);
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent-primary);
  border-radius: 50%;
  display: grid;
  place-content: center;
  color: var(--accent-primary);
  font-weight: bold;
  font-size: 0.85rem;
}

.brand-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

nav.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.25rem;
}

nav.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-bottom: 2px solid transparent;
  transition: all var(--duration) var(--ease-kinetic);
}

nav.main-nav a:hover, nav.main-nav a[aria-current="page"] {
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent-primary);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--accent-primary);
  font-size: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }
  nav.main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 2px solid var(--accent-primary);
    padding: 1.5rem;
  }
  nav.main-nav.active {
    display: block;
  }
  nav.main-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Common Layout Components */
main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.hero-panel {
  text-align: center;
  padding: 3.5rem 1rem 3rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 3.5rem;
  background: radial-gradient(circle at center, #1c3529 0%, #13261d 80%);
}

.hero-tagline {
  color: var(--accent-primary);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-left: 3px solid var(--accent-primary);
  padding-left: 0.75rem;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--accent-secondary);
}

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

.hero-intro {
  max-width: 68ch;
  margin: 0 auto 2rem auto;
  font-size: 1.15rem;
  color: var(--text-primary);
}

/* Buttons */
.btn-brass {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #13261d;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.8rem 1.75rem;
  border: 1px solid #d4ae58;
  border-radius: 0;
  text-decoration: none;
  box-shadow: var(--shadow-offset);
  cursor: pointer;
  transition: transform 0.15s var(--ease-kinetic), box-shadow 0.15s var(--ease-kinetic);
}

.btn-brass:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #09130e;
  color: #13261d;
}

.btn-brass:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* Sequential Vertical Spine Layout */
.vertical-chronicle {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 3.5rem;
}

.vertical-chronicle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14px;
  width: 2px;
  background-color: var(--border-brass);
  opacity: 0.6;
}

.chronicle-node {
  position: relative;
  margin-bottom: 3.5rem;
}

.chronicle-marker {
  position: absolute;
  left: -2.5rem;
  top: 0.25rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.chronicle-content {
  background-color: transparent;
}

/* Divided Horizontal List Rows */
.divided-list-container {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-brass);
  margin: 2rem 0;
}

.list-row {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.list-row-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--accent-primary);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-weight: bold;
}

.list-row-body {
  flex: 1;
}

@media (max-width: 600px) {
  .vertical-chronicle {
    padding-left: 1.75rem;
  }
  .vertical-chronicle::before {
    left: 8px;
  }
  .chronicle-marker {
    left: -1.75rem;
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
  }
  .list-row {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Offset Stat Blocks */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-block {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  box-shadow: var(--shadow-offset);
  position: relative;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Imagery */
.isometric-frame {
  width: 100%;
  margin: 2rem 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.isometric-frame img {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: cover;
  display: block;
}

.caption-plate {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  background: #112018;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
}

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

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

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

td {
  color: var(--text-muted);
}

/* Field Inquiry / FAQ Accordions */
.inquiry-group {
  margin: 2.5rem 0;
  border-top: 1px solid var(--border-brass);
}

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

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

.inquiry-item summary::-webkit-details-marker {
  display: none;
}

.inquiry-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent-primary);
  transition: transform 0.2s ease;
}

.inquiry-item[open] summary::after {
  transform: rotate(45deg);
}

.inquiry-item p {
  margin-top: 1rem;
  padding-left: 0.5rem;
}

/* Form Styles */
.field-form {
  display: grid;
  gap: 1.5rem;
  max-width: 650px;
  margin: 2rem 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  font-weight: 600;
}

.form-group input, .form-group textarea, .form-group select {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.85rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}

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

.output-panel {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--accent-primary);
  box-shadow: var(--shadow-offset);
  display: none;
}

.output-panel.visible {
  display: block;
}

/* Footer */
footer.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background-color: #0d1a13;
  padding: 3rem 1.5rem 2rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

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

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

.footer-col a {
  text-decoration: none;
  color: var(--text-muted);
}

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

.footer-legal-bar {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid #1c3529;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
}

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