:root {
  --bg-canvas: #ffffff;
  --bg-surface: #f8fafc;
  --bg-alt: #f1f5f9;
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --accent-cobalt: #1d4ed8;
  --accent-cobalt-hover: #1e40af;
  --accent-soft: #dbeafe;
  --border-grid: #e2e8f0;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: Consolas, "SF Mono", Monaco, "Liberation Mono", monospace;
  --shadow-subtle: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  --shadow-lift: 0 12px 28px -4px rgba(15, 23, 42, 0.12);
  --max-w: 1200px;
  --read-w: 70ch;
}

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

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

/* Ribbons & Header */
.top-ribbon {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-grid);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.45rem 1.5rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header {
  position: static;
  background: #ffffff;
  border-bottom: 1px solid var(--border-grid);
  padding: 1.1rem 1.5rem;
}

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-anchor {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  background: var(--accent-cobalt);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  font-weight: 600;
}

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

.desktop-nav a {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.15s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--accent-cobalt);
}

.mobile-menu-trigger {
  display: none;
  background: transparent;
  border: 1px solid var(--border-grid);
  padding: 0.35rem 0.7rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-primary);
  cursor: pointer;
}

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

.mobile-nav-panel.open {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

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

/* Shared Layout Containers */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.prose-container {
  max-width: var(--read-w);
  margin: 0 auto;
}

/* Sections */
section {
  padding: 4.5rem 0;
}

.bg-pattern {
  background-color: #ffffff;
  background-image: radial-gradient(#cbd5e1 0.75px, transparent 0.75px);
  background-size: 16px 16px;
}

.bg-band {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border-grid);
  border-bottom: 1px solid var(--border-grid);
}

/* Typography Elements */
h1, h2, h3, h4 {
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 1.85rem;
  margin-bottom: 1rem;
}

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

p {
  margin-bottom: 1.2rem;
  color: var(--text-primary);
}

.lead {
  font-size: 1.15rem;
  color: #334155;
  line-height: 1.65;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cobalt);
  margin-bottom: 0.75rem;
  display: block;
}

/* Button & Action */
.btn-square {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent-cobalt);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--accent-cobalt);
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-square:hover {
  background: var(--accent-cobalt-hover);
  border-color: var(--accent-cobalt-hover);
  box-shadow: var(--shadow-subtle);
}

.btn-outline {
  background: transparent;
  color: var(--accent-cobalt);
  border: 1px solid var(--accent-cobalt);
}

.btn-outline:hover {
  background: var(--accent-soft);
  color: var(--accent-cobalt-hover);
}

/* Hero Split */
.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  padding: 4rem 0 3rem;
}

.hero-visual {
  position: relative;
}

.hero-img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: 0;
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--border-grid);
}

.metric-badge-floating {
  position: absolute;
  bottom: -20px;
  right: -15px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--accent-cobalt);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 8px 16px rgba(29, 78, 216, 0.35);
  font-family: var(--font-mono);
}

.metric-badge-floating strong {
  font-size: 1.3rem;
  line-height: 1;
}

.metric-badge-floating span {
  font-size: 0.65rem;
  text-transform: uppercase;
}

/* Grids & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.card-lab {
  background: #ffffff;
  padding: 2rem;
  border-radius: 0;
  border: none;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.card-lab:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.card-img-wrap {
  margin: -2rem -2rem 1.5rem -2rem;
  overflow: hidden;
  height: 210px;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-alt);
  color: var(--accent-cobalt);
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

/* Metric Pill */
.metric-row {
  display: flex;
  gap: 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.metric-item strong {
  color: var(--accent-cobalt);
  font-size: 1.1rem;
  display: block;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid var(--border-grid);
  background: #ffffff;
}

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

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

th {
  background: var(--bg-alt);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

/* Callouts */
.callout-box {
  background: var(--bg-surface);
  border-left: 3px solid var(--accent-cobalt);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

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

/* Calculator Section */
.calc-card {
  background: #ffffff;
  border: 1px solid var(--border-grid);
  padding: 2.2rem;
  box-shadow: var(--shadow-lift);
}

.calc-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.calc-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.calc-field input, .calc-field select, .calc-field textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-grid);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  background: var(--bg-surface);
  color: var(--text-primary);
}

.calc-field input:focus, .calc-field textarea:focus {
  outline: none;
  border-color: var(--accent-cobalt);
  background: #ffffff;
}

.calc-output {
  background: var(--bg-alt);
  border: 1px solid var(--border-grid);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.calc-output-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.calc-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-cobalt);
  font-family: var(--font-mono);
}

.calc-status {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Accordion FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-grid);
}

.faq-question {
  width: 100%;
  padding: 1.2rem 1.4rem;
  text-align: left;
  background: transparent;
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-icon {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--accent-cobalt);
  transition: transform 0.2s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 1.4rem;
}

.faq-item.active .faq-answer {
  padding: 0 1.4rem 1.25rem 1.4rem;
}

/* Footer */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-grid);
  padding: 3.5rem 0 2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

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

.footer-col a:hover {
  color: var(--accent-cobalt);
}

.footer-bottom {
  border-top: 1px solid var(--border-grid);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
}

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Responsive Queries */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-ribbon {
    display: none;
  }
  .desktop-nav {
    display: none;
  }
  .mobile-menu-trigger {
    display: block;
  }
  .hero-split {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0;
  }
  .hero-img {
    height: 320px;
  }
  .metric-badge-floating {
    width: 80px;
    height: 80px;
    bottom: -10px;
    right: 5px;
  }
  h1 {
    font-size: 1.95rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

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