:root {
  --ink: #15232c;
  --ink-soft: #3d4d57;
  --paper: #f4efe6;
  --paper-2: #fffdf8;
  --rule: #d7cec0;
  --teal: #0f5e5b;
  --teal-deep: #0a3f3d;
  --gold: #b8872d;
  --green: #2a6b45;
  --amber: #9a6b12;
  --red: #8f2d2d;
  --green-bg: #e5f0e8;
  --amber-bg: #f6ead2;
  --red-bg: #f4e2e0;
  --shadow: 0 18px 50px rgba(21, 35, 44, 0.08);
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
}

a { color: var(--teal-deep); }
img { max-width: 100%; display: block; }

.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 12px; background: #fff; padding: 8px; }

.mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 7vw;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.mark {
  width: 36px; height: 36px;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
  line-height: 1.1;
}
.brand-name span {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
nav { display: flex; gap: 22px; flex-wrap: wrap; }
nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
}
nav a[aria-current="page"], nav a:hover { color: var(--teal-deep); }

.hero {
  padding: 72px 7vw 56px;
  max-width: 1100px;
}
.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 14px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 5vw, 4.1rem); margin: 0 0 18px; }
.lede { font-size: 1.25rem; max-width: 42rem; color: var(--ink-soft); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.95rem;
  border: 1px solid var(--ink);
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); }

.band { padding: 56px 7vw; }
.band-ink { background: var(--ink); color: var(--paper); }
.band-ink a { color: #d7ecea; }
.grid-3, .grid-4, .cards { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.cards { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card, .principle, .mp-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.principle h3 { margin: 0 0 8px; font-size: 1.25rem; }
.principle p { margin: 0; color: var(--ink-soft); }

.mp-card { padding: 0; overflow: hidden; text-decoration: none; color: inherit; display: block; }
.mp-card img { width: 100%; height: 220px; object-fit: cover; object-position: top; background: #ddd; }
.mp-body { padding: 16px 16px 18px; }
.mp-meta { font-size: 0.8rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.rag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
}
.rag-green { background: var(--green-bg); color: var(--green); }
.rag-amber { background: var(--amber-bg); color: var(--amber); }
.rag-red { background: var(--red-bg); color: var(--red); }
.score-xl { font-family: var(--serif); font-size: 2.6rem; margin: 6px 0 0; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; font-size: 0.78rem; color: var(--ink-soft); }
.pillars b { display: block; color: var(--ink); font-size: 1rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--paper-2); }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
th { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

.person-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: start;
}
.person-hero img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  height: 340px;
  object-position: top;
}
.bars { margin: 20px 0; }
.bar-row { margin: 10px 0 16px; }
.bar-row span { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 6px; }
.track { height: 8px; background: #e7e0d5; border-radius: 99px; overflow: hidden; }
.fill { height: 100%; background: var(--teal); }

.notice {
  border-left: 4px solid var(--gold);
  padding: 12px 16px;
  background: #f8efd8;
  margin: 24px 0;
}
.footer {
  padding: 36px 7vw 48px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.footer strong { color: var(--ink); }
.footer .ai-note {
  margin-top: 16px;
  max-width: 46rem;
  color: var(--ink);
}
.tiny { font-size: 0.82rem; color: var(--ink-soft); }
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 18px; }

.lookup {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin: 8px 0 28px;
}
.lookup label { display: block; font-weight: 700; margin-bottom: 8px; }
.lookup select, .lookup input {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: #fff;
}
.lookup-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.chamber-wrap {
  background: #101820;
  color: #e8e2d6;
  border-radius: 18px;
  padding: 22px 16px 16px;
  overflow-x: auto;
}
.chamber-svg { width: 100%; min-width: 720px; height: auto; }
.chamber-key { display: flex; flex-wrap: wrap; gap: 12px 18px; font-size: 0.82rem; margin-top: 12px; color: var(--ink-soft); }
.chamber-key i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.result-box { margin-top: 14px; }
.track-card { margin-top: 36px; }
.track-svg { width: 100%; height: auto; background: #fffdf8; border: 1px solid var(--rule); border-radius: 14px; }

@media (max-width: 800px) {
  .mast { flex-direction: column; align-items: flex-start; }
  .person-hero { grid-template-columns: 1fr; }
  .person-hero img { height: 260px; }
  .lookup-row { grid-template-columns: 1fr; }
}
