:root {
  --bg-canvas: #1e2530;
  --bg-surface: #2b333e;
  --bg-surface-hover: #353f4d;
  --text-primary: #ffffff;
  --text-muted: #b0b8c4;
  --accent-primary: #a3e635;
  --accent-secondary: #84cc16;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 16px 32px -4px rgba(0, 0, 0, 0.45);
  --glow-accent: 0 0 28px -4px rgba(163, 230, 53, 0.35);
  --glass-backdrop: blur(20px) saturate(190%);
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html, body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  font-size: 16px;
  overflow-wrap: anywhere;
  hyphens: auto;
}

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

a:hover, a:focus-visible {
  color: #bef264;
  text-decoration: underline;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

h1 { font-size: clamp(2.25rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.15rem); }
h3 { font-size: 1.35rem; }

p { margin-bottom: 1.15rem; color: var(--text-muted); }
p strong { color: var(--text-primary); }

.grid-bg {
  background-image: 
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  position: relative;
}

.orb-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(163, 230, 53, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: floatOrb 15s ease-in-out infinite alternate;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, -30px); }
}

@media (prefers-reduced-motion: reduce) {
  .orb-glow { animation: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.prose {
  max-width: 70ch;
  margin: 0 auto;
}

/* Header & Navigation */
.site-header {
  position: relative;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease;
}

.site-header.scrolled {
  background-color: var(--bg-surface);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  margin-right: auto;
}

.brand-logo:hover { text-decoration: none; color: var(--accent-primary); }

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

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

.nav-desktop a {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

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

.nav-toggle {
  display: none;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: none;
  padding: 0.5rem 0.85rem;
  font-size: 1.35rem;
  cursor: pointer;
  border-radius: 9999px;
}

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

.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.nav-mobile a { color: var(--text-primary); font-weight: 500; display: block; padding: 0.35rem 0; }

/* Buttons (Pill only) */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-primary);
  color: #111827;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease-kinetic), background-color 0.2s ease;
}

.btn-pill:hover, .btn-pill:focus-visible {
  background-color: #bef264;
  color: #090d16;
  text-decoration: none;
  transform: translateY(-2px);
}

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

.btn-pill-secondary:hover {
  background-color: var(--accent-primary);
  color: #111827;
}

/* Labels & Strip Headings */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 2rem;
  border-left: 3px solid var(--accent-primary);
  padding-left: 1rem;
}

.compact-label {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
}

/* Hero Section */
.hero-section {
  padding: 4rem 0;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-visual {
  position: relative;
}

.hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 0;
  box-shadow: var(--shadow-elevation);
}

.floating-check-card {
  background-color: var(--bg-surface);
  padding: 1.75rem;
  box-shadow: var(--shadow-elevation);
  border-radius: 0;
  position: relative;
  z-index: 2;
}

.check-list {
  list-style: none;
  margin: 1rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.check-marker {
  display: inline-block;
  min-width: 10px;
  height: 10px;
  background: var(--accent-primary);
  margin-top: 0.45rem;
}

/* Specification Strip */
.spec-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background-color: var(--border-subtle);
  margin: 2.5rem 0;
  box-shadow: var(--shadow-elevation);
}

.spec-cell {
  background-color: var(--bg-surface);
  padding: 1.15rem 1.35rem;
}

.spec-cell .spec-key {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.spec-cell .spec-val {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--accent-primary);
  font-weight: 700;
}

/* Sections & Cards (0px radius, borderless, soft shadow) */
section {
  padding: 4rem 0;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.card-panel {
  background-color: var(--bg-surface);
  padding: 1.75rem;
  border-radius: 0;
  border: none;
  box-shadow: var(--shadow-elevation);
  transition: transform 0.4s var(--ease-kinetic), box-shadow 0.4s var(--ease-kinetic);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-panel:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}

.card-img-43 {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 1.25rem;
  border-radius: 0;
  display: block;
}

.card-img-11 {
  width: 80px;
  height: 80px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
  flex-shrink: 0;
}

.wide-example-row {
  background-color: var(--bg-surface);
  padding: 2rem;
  margin-top: 1.75rem;
  box-shadow: var(--shadow-elevation);
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
  align-items: center;
}

/* CSS Garage Footprint Diagram */
.footprint-diagram {
  background-color: var(--bg-canvas);
  padding: 1.5rem;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.75rem;
  text-align: center;
  box-shadow: inset 0 0 0 1px var(--border-subtle);
}

.zone-corridor {
  background-color: rgba(163, 230, 53, 0.12);
  color: var(--accent-primary);
  font-size: 0.8rem;
  padding: 0.5rem;
  font-weight: 600;
}

.zone-bike-bay {
  background-color: var(--bg-surface);
  padding: 1.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-weight: 700;
  box-shadow: 0 0 0 2px var(--accent-primary);
}

/* Tabs */
.tabs-wrapper {
  margin-top: 1.5rem;
}

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  border: none;
  padding: 0.65rem 1.35rem;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn[aria-selected="true"] {
  background-color: var(--accent-primary);
  color: #111827;
}

.tab-panel {
  display: none;
  background-color: var(--bg-surface);
  padding: 1.75rem;
  box-shadow: var(--shadow-elevation);
}

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

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

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

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

th {
  color: var(--accent-primary);
  font-family: var(--font-serif);
  font-size: 1rem;
  background-color: rgba(0, 0, 0, 0.2);
}

/* Drawer-Style Tool Lists */
.drawer-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-row {
  background-color: var(--bg-surface);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-elevation);
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 1.25rem;
  align-items: center;
}

.drawer-tag {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent-primary);
}

/* Accordions */
.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.accordion-item {
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-elevation);
}

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.accordion-trigger span.icon {
  color: var(--accent-primary);
  font-family: var(--font-sans);
  font-size: 1.25rem;
}

.accordion-content {
  display: none;
  padding: 0 1.5rem 1.35rem;
  color: var(--text-muted);
}

.accordion-item.open .accordion-content {
  display: block;
}

/* Forms (0px input radius) */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

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

.form-control:focus {
  outline: 2px solid var(--accent-primary);
  border-color: transparent;
}

.note-preview {
  background-color: var(--bg-canvas);
  padding: 1.25rem;
  font-family: monospace;
  font-size: 0.88rem;
  color: var(--accent-primary);
  white-space: pre-wrap;
  margin: 1rem 0;
  min-height: 110px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: all 0.7s var(--ease-kinetic);
}

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

/* Footer */
.site-footer {
  background-color: #161b24;
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2.5rem;
  margin-top: 4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

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

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-grid, .wide-example-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: inline-flex; }
  .drawer-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  section { padding: 2.75rem 0; }
  .card-panel { padding: 1.25rem; }
}