:root {
  --bg-canvas: #202225;
  --bg-surface: #2a2d31;
  --bg-surface-hover: #32363b;
  --text-primary: #ffffff;
  --text-muted: #b6bcc4;
  --accent-primary: #a3e635;
  --accent-secondary: #bef264;
  --accent-ink: #181a1c;
  --border-subtle: #3b3f45;
  --font-display: system-ui, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, "Segoe UI", Roboto, sans-serif;
  --radius-card: 16px;
  --radius-frame: 20px;
  --space-unit: 8px;
  --measure: 68ch;
  --ease-kinetic: cubic-bezier(0.22, 0.61, 0.36, 1);
  --duration: 380ms;
  --shadow-offset: 4px 4px 0 #141618;
  --shadow-elevation: 0 8px 24px rgba(0, 0, 0, 0.22);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-primary);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 10px 16px;
  z-index: 100;
  text-decoration: none;
  border-radius: 8px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

.site-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Static Floating Rounded Header */
.site-header {
  position: relative;
  margin-top: 18px;
  margin-bottom: 32px;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 12px 20px;
  box-shadow: var(--shadow-elevation);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 44px;
}

.brand-link:hover {
  color: var(--accent-primary);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background-color: var(--accent-primary);
  color: var(--accent-ink);
  flex-shrink: 0;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.nav-desktop a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background-color var(--duration) var(--ease-kinetic), color var(--duration) var(--ease-kinetic);
}

.nav-desktop a:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

.nav-desktop a[aria-current="page"] {
  background-color: var(--bg-canvas);
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.nav-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.nav-mobile {
  display: none;
  margin-top: 10px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 12px;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-elevation);
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-mobile a:hover,
.nav-mobile a[aria-current="page"] {
  background-color: var(--bg-canvas);
  color: var(--accent-primary);
}

/* Typography & Column */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  margin-bottom: 14px;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

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

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

.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 10px;
}

.column-wrap {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

.breakout-wrap {
  max-width: 960px;
  margin: 32px auto;
}

/* Hero Section */
.hero-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-frame);
  padding: 36px;
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.hero-inner-page {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-frame);
  padding: 32px;
  margin-bottom: 36px;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  background-color: var(--accent-primary);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid var(--accent-primary);
  border-radius: 10px;
  box-shadow: var(--shadow-offset);
  cursor: pointer;
  transition: transform var(--duration) var(--ease-kinetic), box-shadow var(--duration) var(--ease-kinetic), background-color var(--duration) var(--ease-kinetic);
}

.btn:hover {
  color: var(--accent-ink);
  background-color: var(--accent-secondary);
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 #141618;
}

.btn-secondary {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  border: 2px solid var(--border-subtle);
  box-shadow: var(--shadow-offset);
}

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

/* Surface Bands */
.band {
  padding: 40px 0;
}

.band-surface {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 44px 20px;
  margin: 28px -20px;
}

/* Diagrams & Frames */
.diagram-frame {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-frame);
  padding: 20px;
}

.diagram-frame svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram-caption {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Pull Quote */
.pull-quote {
  margin: 28px 0;
  padding: 20px 24px;
  background-color: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

.pull-quote p {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}

.pull-quote cite {
  font-style: normal;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 22px;
  transition: transform var(--duration) var(--ease-kinetic), border-color var(--duration) var(--ease-kinetic);
}

.band-surface .card {
  background-color: var(--bg-canvas);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

.card-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background-color: var(--bg-surface);
}

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

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

th {
  font-weight: 700;
  color: var(--accent-primary);
  background-color: var(--bg-canvas);
}

tr:last-child td {
  border-bottom: 0;
}

/* Lists */
ul.clean-list, ol.clean-list {
  padding-left: 20px;
  margin-bottom: 1.25rem;
}

ul.clean-list li, ol.clean-list li {
  margin-bottom: 8px;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.breadcrumbs a {
  color: var(--text-muted);
}

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

/* Contact Tool Form */
.tool-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 24px;
  margin: 24px 0;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-weight: 700;
  font-size: 0.92rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
}

.form-field textarea {
  min-height: 130px;
  resize: vertical;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tool-output {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
  color: var(--text-primary);
}

.status-note {
  font-size: 0.9rem;
  color: var(--accent-primary);
  min-height: 1.4em;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-bottom: 18px;
  list-style: none;
  padding: 0;
}

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

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

.footer-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer-disclaimer {
  max-width: 64ch;
  margin: 0 auto;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--duration) var(--ease-kinetic), transform var(--duration) var(--ease-kinetic);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .card, a {
    transition: none;
  }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-panel {
    grid-template-columns: 1fr;
    padding: 26px;
  }
  .nav-desktop a {
    padding: 8px 7px;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .hero-panel, .hero-inner-page {
    padding: 22px;
  }
  .band-surface {
    margin: 20px -20px;
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  .site-shell {
    padding: 0 14px;
  }
  .header-bar {
    padding: 10px 14px;
  }
  .band-surface {
    margin: 20px -14px;
    padding: 28px 14px;
  }
}