:root {
  --ink: #112235;
  --navy: #102a43;
  --navy-2: #0b1f33;
  --slate: #52606d;
  --muted: #7b8794;
  --paper: #f5f7fa;
  --white: #ffffff;
  --line: #d9e2ec;
  --teal: #16866b;
  --teal-soft: #dff3ed;
  --amber: #d97706;
  --red: #c2413b;
  --shadow: 0 22px 70px rgba(15, 35, 55, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  padding: 0 5vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  background: rgba(245, 247, 250, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217, 226, 236, 0.9);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 14px; font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--navy); color: white; font-size: 12px; letter-spacing: .08em; }
nav { display: flex; gap: 28px; }
nav a { color: var(--slate); text-decoration: none; font-size: 13px; font-weight: 600; }
nav a:hover { color: var(--navy); }
.github-link { justify-self: end; color: var(--navy); font-size: 13px; font-weight: 700; text-decoration: none; }

.hero {
  min-height: 720px;
  padding: 110px 7vw 90px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 7vw;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(16,42,67,.035) 1px, transparent 1px),
    linear-gradient(rgba(16,42,67,.035) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
}
.eyebrow, .panel-kicker, .brief-head, .section-number {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--teal); font-weight: 500; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px rgba(22,134,107,.12); }
h1 { margin: 24px 0 24px; max-width: 820px; font-size: clamp(48px, 5.4vw, 82px); line-height: 1.02; letter-spacing: -.055em; font-weight: 600; }
.hero-lead { max-width: 760px; color: var(--slate); font-size: 18px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--navy); text-decoration: none; font-size: 13px; font-weight: 700; }
.button.primary { background: var(--navy); color: white; }
.button.secondary { background: transparent; color: var(--navy); }
.button.light { border-color: white; color: var(--navy); background: white; }
.scope-note { color: var(--muted); font-size: 12px; }
.hero-brief { padding: 30px; background: var(--navy); color: white; box-shadow: var(--shadow); }
.brief-head { display: flex; justify-content: space-between; color: #9fb3c8; }
.hero-brief h2 { margin: 55px 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.hero-brief > p { margin: 0; font-size: 22px; line-height: 1.5; letter-spacing: -.02em; }
.brief-rule { height: 1px; background: #334e68; margin: 34px 0 20px; }
.hero-brief dl { margin: 0; }
.hero-brief dl div { display: flex; justify-content: space-between; gap: 30px; padding: 12px 0; border-bottom: 1px solid rgba(159,179,200,.16); }
.hero-brief dt { color: #9fb3c8; font-size: 12px; }
.hero-brief dd { margin: 0; text-align: right; font-size: 12px; font-weight: 600; }

.metric-strip { padding: 0 5vw; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-strip article { padding: 30px 2vw; border-right: 1px solid var(--line); }
.metric-strip article:last-child { border: 0; }
.metric-label { display: block; color: var(--slate); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.metric-strip strong { display: block; margin: 9px 0 4px; font-size: 32px; letter-spacing: -.04em; }
.metric-strip small { color: var(--muted); }

.section { padding: 105px 7vw; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 42px; }
.section-heading > div { display: flex; align-items: baseline; gap: 18px; }
.section-heading h2 { margin: 0; font-size: clamp(32px, 3.2vw, 48px); letter-spacing: -.045em; font-weight: 600; }
.section-number { color: var(--teal); }
.section-heading > p { max-width: 450px; margin: 0; color: var(--slate); line-height: 1.65; font-size: 14px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 18px; }
.panel { background: var(--white); border: 1px solid var(--line); padding: 28px; box-shadow: 0 8px 30px rgba(15,35,55,.035); }
.panel, .queue-panel, .bank-detail { min-width: 0; }
.panel-wide { min-height: 410px; }
.panel-full { grid-column: 1 / -1; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; margin-bottom: 26px; }
.panel-heading h3, .model-guardrails h3 { margin: 7px 0 0; font-size: 20px; letter-spacing: -.025em; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.panel-kicker { color: var(--muted); }
.chart-legend { color: var(--muted); font-size: 11px; }
.legend-line { display: inline-block; width: 18px; height: 2px; margin-right: 7px; background: var(--teal); vertical-align: middle; }
.svg-chart { min-height: 290px; width: 100%; }
.svg-chart svg { width: 100%; height: 290px; overflow: visible; }
.model-summary-card { display: flex; flex-direction: column; }
.model-summary-card h3 { margin: 8px 0 18px; font-size: 20px; }
.score-ring { width: 140px; height: 140px; margin: 12px auto 24px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: conic-gradient(var(--teal) 0 73.5%, #e7edf3 73.5%); position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: white; }
.score-ring span, .score-ring small { position: relative; z-index: 1; }
.score-ring span { font-size: 31px; font-weight: 700; }
.score-ring small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.model-summary-card > p { color: var(--slate); font-size: 13px; line-height: 1.6; }
.mini-stat { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); font-size: 12px; }
.mini-stat span { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 11px 12px; text-align: left; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; border-bottom: 1px solid var(--line); }
td { padding: 16px 12px; border-bottom: 1px solid #edf1f5; }
tbody tr:last-child td { border-bottom: 0; }

.dark-section { background: var(--navy-2); color: white; }
.section-heading.inverse > p { color: #9fb3c8; }
.section-heading.inverse .section-number { color: #5ee0bd; }
.review-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 18px; }
.queue-panel, .bank-detail { background: #102a43; border: 1px solid #334e68; }
.queue-controls { padding: 22px; display: flex; justify-content: space-between; align-items: center; gap: 22px; border-bottom: 1px solid #334e68; }
.queue-controls label { color: #bcccdc; font-size: 12px; }
.queue-controls input { width: min(300px, 50%); height: 38px; padding: 0 12px; background: #0b1f33; border: 1px solid #486581; color: white; font: inherit; font-size: 12px; }
.queue-header, .bank-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 70px; gap: 16px; align-items: center; }
.queue-header { padding: 13px 22px; color: #829ab1; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid #334e68; }
.bank-list { max-height: 530px; overflow-y: auto; }
.bank-row { width: 100%; padding: 15px 22px; background: none; color: white; border: 0; border-bottom: 1px solid rgba(72,101,129,.5); text-align: left; font: inherit; cursor: pointer; }
.bank-row:hover, .bank-row.active { background: #163a5a; }
.bank-row strong { display: block; font-size: 12px; font-weight: 600; }
.bank-row small { color: #9fb3c8; font-size: 10px; }
.bank-row .risk-value { color: #f6ad55; font-family: "IBM Plex Mono", monospace; }
.bank-row .roa-value { color: #bcccdc; font-family: "IBM Plex Mono", monospace; }
.bank-detail { padding: 28px; position: sticky; top: 92px; align-self: start; }
.detail-topline { display: flex; justify-content: space-between; align-items: center; color: #9fb3c8; font-size: 11px; }
.alert-pill { padding: 5px 8px; color: #ffd8d4; background: rgba(194,65,59,.24); border: 1px solid rgba(255,153,143,.3); text-transform: uppercase; letter-spacing: .08em; font-size: 9px; }
.bank-detail h3 { margin: 26px 0 7px; font-size: 24px; line-height: 1.25; letter-spacing: -.03em; }
.detail-peer { color: #9fb3c8; font-size: 12px; }
.detail-score { margin: 28px 0; padding: 22px 0; border-top: 1px solid #334e68; border-bottom: 1px solid #334e68; }
.detail-score span { display: block; font-size: 42px; font-weight: 600; }
.detail-score small { color: #9fb3c8; text-transform: uppercase; letter-spacing: .08em; }
.detail-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #334e68; }
.detail-metrics div { padding: 14px; background: #102a43; }
.detail-metrics span { display: block; color: #9fb3c8; font-size: 10px; }
.detail-metrics strong { display: block; margin-top: 5px; font-size: 17px; }
.driver-box { margin-top: 25px; }
.driver-box h4 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.driver-box ul { margin: 0; padding: 0; list-style: none; }
.driver-box li { position: relative; padding: 10px 0 10px 18px; color: #d9e2ec; font-size: 12px; line-height: 1.45; border-top: 1px solid rgba(72,101,129,.45); }
.driver-box li::before { content: ""; position: absolute; left: 0; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: #f6ad55; }
.detail-note { margin: 22px 0 0; color: #829ab1; font-size: 10px; line-height: 1.5; }

.model-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.bar-row { display: grid; grid-template-columns: minmax(150px, .8fr) 2fr 56px; gap: 14px; align-items: center; margin: 14px 0; }
.bar-row label { color: var(--slate); font-size: 12px; }
.bar-track { height: 7px; background: #e7edf3; }
.bar-fill { height: 100%; background: var(--teal); }
.bar-value { text-align: right; color: var(--muted); font: 10px "IBM Plex Mono", monospace; }
.model-guardrails ol { margin: 28px 0 0; padding: 0; list-style: none; counter-reset: guardrail; }
.model-guardrails li { counter-increment: guardrail; display: grid; grid-template-columns: 34px 1fr; padding: 17px 0; border-top: 1px solid var(--line); }
.model-guardrails li::before { content: "0" counter(guardrail); color: var(--teal); font: 11px "IBM Plex Mono", monospace; }
.model-guardrails li strong, .model-guardrails li span { grid-column: 2; }
.model-guardrails li strong { font-size: 13px; }
.model-guardrails li span { margin-top: 4px; color: var(--muted); font-size: 12px; }

.methodology { background: #eef2f6; }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--white); }
.process-grid article { min-height: 220px; padding: 25px; border-right: 1px solid var(--line); }
.process-grid article:last-child { border: 0; }
.process-grid article > span { color: var(--teal); font: 11px "IBM Plex Mono", monospace; }
.process-grid h3 { margin: 48px 0 10px; font-size: 19px; }
.process-grid p { color: var(--slate); font-size: 12px; line-height: 1.65; }
.sql-card { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; background: var(--navy); color: white; }
.sql-copy { padding: 42px; }
.sql-copy .panel-kicker { color: #9fb3c8; }
.sql-copy h3 { margin: 14px 0; font-size: 27px; letter-spacing: -.03em; }
.sql-copy p { color: #bcccdc; font-size: 13px; line-height: 1.7; }
.sql-copy a { display: inline-block; margin-top: 14px; color: white; font-size: 12px; font-weight: 700; }
pre { margin: 0; padding: 42px; display: flex; align-items: center; overflow-x: auto; background: #071827; color: #d9e2ec; font: 13px/1.9 "IBM Plex Mono", monospace; }
.sql-keyword { color: #5ee0bd; }

.closing-section { padding: 110px 12vw; text-align: center; background: var(--teal); color: white; }
.closing-section .eyebrow { justify-content: center; color: #dffbf3; }
.closing-section h2 { max-width: 900px; margin: 22px auto; font-size: clamp(38px, 5vw, 64px); line-height: 1.12; letter-spacing: -.05em; }
.closing-section > p:not(.eyebrow) { color: #dffbf3; }
.closing-section .button { margin-top: 22px; }
footer { min-height: 80px; padding: 0 5vw; display: flex; justify-content: space-between; align-items: center; gap: 24px; background: #071827; color: #829ab1; font-size: 10px; letter-spacing: .04em; }

.chart-grid { stroke: #d9e2ec; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--teal); stroke-width: 3; }
.chart-area { fill: url(#areaGradient); }
.chart-point { fill: var(--teal); stroke: white; stroke-width: 2; }
.chart-label { fill: #7b8794; font: 10px "IBM Plex Mono", monospace; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 80px; }
  .hero-brief { max-width: 600px; }
  .dashboard-grid, .review-layout, .model-grid { grid-template-columns: minmax(0, 1fr); }
  .bank-detail { position: static; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .process-grid article:nth-child(2) { border-right: 0; }
  .process-grid article { border-bottom: 1px solid var(--line); }
  .sql-card { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .site-header { min-height: 64px; padding: 0 20px; }
  .brand span:last-child { display: none; }
  .hero { min-height: auto; padding: 70px 22px; }
  h1 { font-size: 48px; }
  .hero-lead { font-size: 16px; }
  .hero-brief { padding: 24px; }
  .metric-strip { grid-template-columns: 1fr 1fr; padding: 0; }
  .metric-strip article:nth-child(2) { border-right: 0; }
  .metric-strip article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section { padding: 72px 22px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 16px; }
  .section-heading > div { display: block; }
  .section-number { display: block; margin-bottom: 10px; }
  .panel { padding: 20px; }
  .process-grid { grid-template-columns: 1fr; }
  .process-grid article { border-right: 0; }
  .queue-controls { display: block; }
  .queue-controls input { width: 100%; margin-top: 12px; }
  .queue-header, .bank-row { grid-template-columns: minmax(0, 1fr) 74px 52px; }
  .bar-row { grid-template-columns: 120px 1fr 44px; }
  .sql-copy, pre { padding: 26px; }
  footer { padding: 24px; flex-direction: column; align-items: flex-start; }
}
