@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ─── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  --bg:             #F8F3EA;
  --bg-alt:         #F0EBE0;
  --nav-bg:         #000000;
  --nav-border:     rgba(255, 255, 255, 0.07);
  --accent:         #f2a20c;
  --accent-hover:   #d08d0a;
  --text:           #161310;
  --text-muted:     #6B6255;
  --border:         #DDD6C8;
  --card-bg:        #FFFFFF;
  --card-shadow:    0 1px 3px rgba(22, 19, 16, 0.07), 0 1px 2px rgba(22, 19, 16, 0.04);
  --card-shadow-lg: 0 8px 28px rgba(22, 19, 16, 0.12), 0 3px 8px rgba(22, 19, 16, 0.06);
  --critical:       #B91C1C;
  --critical-bg:    #FEF2F2;
  --critical-border:#FECACA;
  --elevated:       #C2410C;
  --elevated-bg:    #FFF7ED;
  --elevated-border:#FED7AA;
  --healthy:        #15803D;
  --healthy-bg:     #F0FDF4;
  --healthy-border: #BBF7D0;
  --radius:         8px;
  --radius-lg:      12px;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */
.site-nav {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--nav-border);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-mark {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #FFFFFF;
}
.logo-sep {
  color: rgba(255, 255, 255, 0.2);
  font-weight: 300;
  font-size: 18px;
}
.logo-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
  letter-spacing: 0.01em;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-link:hover { color: #FFFFFF; }
.nav-link.active { color: var(--accent); }
.nav-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(245, 197, 24, 0.12);
  color: var(--accent);
  border: 1px solid rgba(245, 197, 24, 0.22);
  border-radius: 100px;
  padding: 3px 11px;
}

/* ─── Hero (index) ───────────────────────────────────────────────────────── */
.hero {
  background: var(--nav-bg);
  padding: 88px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 70% 50%, rgba(245, 197, 24, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(245, 197, 24, 0.35) 50%, transparent 100%);
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.08;
  color: #FFFFFF;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
  max-width: 640px;
}
.hero-desc {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.55);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 52px;
}
.hero-stats {
  display: flex;
  gap: 52px;
}
.hero-stat {}
.stat-number {
  display: block;
  font-size: 38px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ─── Section structure ──────────────────────────────────────────────────── */
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.2;
}
.section-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.7;
}
.section-header { margin-bottom: 40px; }

/* ─── Overview section ───────────────────────────────────────────────────── */
.overview {
  padding: 80px 0 64px;
}

/* ─── Maturity scale cards ───────────────────────────────────────────────── */
.scale-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 64px;
}
.scale-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: border-top-color 0.2s;
}
.scale-card:hover { border-top-color: var(--accent); }
.scale-score {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.scale-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.scale-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── Risk tier cards ────────────────────────────────────────────────────── */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.tier-card {
  border-radius: var(--radius);
  padding: 22px 24px;
  border: 1px solid;
}
.tier-card.critical {
  background: var(--critical-bg);
  border-color: var(--critical-border);
}
.tier-card.elevated {
  background: var(--elevated-bg);
  border-color: var(--elevated-border);
}
.tier-card.healthy {
  background: var(--healthy-bg);
  border-color: var(--healthy-border);
}
.tier-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.tier-card.critical .tier-dot { background: var(--critical); }
.tier-card.elevated .tier-dot { background: var(--elevated); }
.tier-card.healthy .tier-dot { background: var(--healthy); }
.tier-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}
.tier-card.critical .tier-badge { color: var(--critical); }
.tier-card.elevated .tier-badge { color: var(--elevated); }
.tier-card.healthy .tier-badge { color: var(--healthy); }
.tier-range {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.tier-card.critical .tier-range { color: var(--critical); }
.tier-card.elevated .tier-range { color: var(--elevated); }
.tier-card.healthy .tier-range { color: var(--healthy); }
.tier-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── Pillars grid ───────────────────────────────────────────────────────── */
.pillars {
  padding: 80px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.pillar-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.pillar-card:hover {
  box-shadow: var(--card-shadow-lg);
  transform: translateY(-2px);
  border-color: rgba(245, 197, 24, 0.5);
}
.pillar-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pillar-id {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--nav-bg);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pillar-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 9px;
  letter-spacing: 0.02em;
}
.pillar-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.35;
}
.pillar-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}
.pillar-arrow {
  margin-top: 18px;
  font-size: 16px;
  color: var(--accent);
  font-weight: 600;
  display: inline-block;
  transition: transform 0.2s ease;
}
.pillar-card:hover .pillar-arrow {
  transform: translateX(5px);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--nav-bg);
  padding: 44px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #FFFFFF;
}
.footer-logo-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 16px;
}
.footer-logo-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  transition: color 0.15s;
}
.footer-links a:hover { color: rgba(255, 255, 255, 0.85); }
.footer-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}

/* ─── Pillar page: Hero ──────────────────────────────────────────────────── */
.pillar-hero {
  background: var(--nav-bg);
  padding: 52px 0 64px;
  position: relative;
  overflow: hidden;
}
.pillar-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 80% 50%, rgba(245, 197, 24, 0.05) 0%, transparent 65%);
  pointer-events: none;
}
.pillar-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(245, 197, 24, 0.3) 50%, transparent 100%);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 13px;
  position: relative;
}
.breadcrumb a {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  transition: color 0.15s;
}
.breadcrumb a:hover { color: rgba(255, 255, 255, 0.85); }
.breadcrumb-sep { color: rgba(255, 255, 255, 0.2); font-size: 12px; }
.breadcrumb-current { color: rgba(255, 255, 255, 0.65); font-weight: 500; }
.pillar-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 197, 24, 0.1);
  border: 1px solid rgba(245, 197, 24, 0.2);
  border-radius: 100px;
  padding: 5px 14px 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
  position: relative;
}
.badge-letter {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(245, 197, 24, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.pillar-hero h1 {
  font-size: 40px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.12;
  position: relative;
}
.pillar-hero p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.55);
  max-width: 580px;
  line-height: 1.75;
  position: relative;
}

/* ─── Controls list ──────────────────────────────────────────────────────── */
.controls-section {
  padding: 60px 0 80px;
}
.controls-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.control-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  transition: box-shadow 0.2s ease;
}
.control-card:hover {
  box-shadow: var(--card-shadow-lg);
}
.control-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.control-id {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--nav-bg);
  color: var(--accent);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.control-title-block {}
.control-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.control-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.control-body {
  padding-left: 56px;
}
.control-body p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}
.control-body code {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Cascadia Code', monospace;
  font-size: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--text);
}

/* ─── Maturity reference bar ─────────────────────────────────────────────── */
.maturity-ref {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 44px 0;
}
.maturity-ref-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.maturity-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}
.maturity-item {
  padding: 18px 22px;
  border-right: 1px solid var(--border);
}
.maturity-item:last-child { border-right: none; }
.maturity-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 5px;
  letter-spacing: -0.02em;
}
.maturity-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.maturity-dsc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── Pillar page nav (prev / next) ──────────────────────────────────────── */
.page-nav {
  background: var(--nav-bg);
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.page-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.page-nav-item {
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: background 0.15s;
}
.page-nav-item:first-child {
  padding-right: 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.page-nav-item:last-child {
  padding-left: 32px;
  text-align: right;
  align-items: flex-end;
}
.page-nav-item.disabled { opacity: 0.3; pointer-events: none; }
.page-nav-dir {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
}
.page-nav-name {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.15s;
}
.page-nav-item:hover .page-nav-name { color: var(--accent); }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .scale-grid { grid-template-columns: repeat(2, 1fr); }
  .maturity-bar { grid-template-columns: repeat(2, 1fr); }
  .maturity-bar .maturity-item:nth-child(2) { border-right: none; }
  .maturity-bar .maturity-item:nth-child(3),
  .maturity-bar .maturity-item:nth-child(4) { border-top: 1px solid var(--border); }
  .hero h1 { font-size: 40px; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer-links { justify-content: center; }
  .pillars-grid { grid-template-columns: 1fr; }
  .scale-grid { grid-template-columns: repeat(2, 1fr); }
  .tier-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .hero-stats { gap: 28px; flex-wrap: wrap; }
  .control-body { padding-left: 0; }
  .page-nav-inner { grid-template-columns: 1fr; }
  .page-nav-item:first-child { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .page-nav-item:last-child { padding-left: 0; text-align: left; align-items: flex-start; }
  .logo-sub { display: none; }
  .logo-sep { display: none; }
}
