:root {
  --navy: #1b2a47;
  --gold: #c8962e;
  --teal: #0f6f73;
  --teal-soft: #dcefef;
  --ink: #1b2533;
  --muted: #5b6676;
  --line: #d9dfe7;
  --panel: #eef1f6;
  --bg: #f5f6fa;
  --card: #ffffff;
  --green: #1d7a46;
  --green-soft: #ddf3e5;
  --amber: #a26a00;
  --amber-soft: #fcefd2;
  --red: #b42318;
  --red-soft: #fde4e1;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--teal); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); margin: 0 0 .4em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.masthead { background: var(--navy); color: #fff; border-bottom: 4px solid var(--gold); }
.masthead .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 18px; gap: 16px; }
.eyebrow { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.masthead .eyebrow { color: #c9d2e3; font-weight: 400; }
.masthead .title { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: #fff; }
.masthead .who { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: #c9d2e3; }
.role-pill { border: 1.5px solid var(--gold); color: var(--gold); border-radius: 999px; padding: 4px 14px; font-weight: 700; }
.masthead a { color: #fff; }

.tabs { background: #fff; border-bottom: 1px solid var(--line); }
.tabs .wrap { display: flex; gap: 6px; overflow-x: auto; }
.tabs a { color: var(--muted); padding: 14px 18px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--teal); }
.tabs a:hover { text-decoration: none; color: var(--ink); }

main { padding: 32px 0 120px; }
.lede { color: var(--muted); max-width: 760px; margin-top: 0; }
.back { display: inline-block; margin-bottom: 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 22px; }
.card > .body { padding: 22px 26px; }
.card > .head { background: var(--panel); border-bottom: 1px solid var(--line); padding: 16px 26px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-radius: 8px 8px 0 0; }
.card > .head h2 { margin: 0; }
.card > .head .num { color: var(--teal); font-family: var(--serif); font-weight: 700; margin-right: 10px; }
.weight { color: var(--gold); font-weight: 700; white-space: nowrap; }

.banner { display: grid; grid-template-columns: 2fr repeat(4, auto); gap: 28px; align-items: end; padding: 18px 26px; border-left: 5px solid var(--gold); }
.banner .value { font-weight: 700; font-size: 1.05rem; }
.banner .name { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }

.badge { display: inline-block; border-radius: 999px; padding: 2px 12px; font-size: .85rem; font-weight: 700; background: var(--panel); color: var(--muted); white-space: nowrap; }
.badge.green, .badge.advance, .badge.submitted, .badge.pass { background: var(--green-soft); color: var(--green); }
.badge.teal, .badge.revealed { background: var(--teal-soft); color: var(--teal); }
.badge.amber, .badge.conditional, .badge.in_progress { background: var(--amber-soft); color: var(--amber); }
.badge.red, .badge.decline, .badge.fail, .badge.recused { background: var(--red-soft); color: var(--red); }

.btn { display: inline-block; font: inherit; font-weight: 700; border-radius: 6px; padding: 9px 16px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 5px 12px; font-size: .9rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
form.inline { display: inline; }

label { display: block; font-weight: 700; margin-bottom: 6px; }
label .hint, .hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; padding: 9px 12px; border: 1px solid #b9c2cf; border-radius: 6px; background: #f7f9fc; color: var(--ink);
}
textarea { resize: vertical; min-height: 90px; }
.grid { display: grid; gap: 16px 20px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.field { margin-bottom: 14px; }
.wordcount { text-align: right; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.wordcount.over { color: var(--red); font-weight: 700; }
.errorlist { color: var(--red); margin: 4px 0; padding-left: 18px; }

.messages { list-style: none; padding: 0; margin: 0 0 20px; }
.messages li { padding: 10px 16px; border-radius: 6px; margin-bottom: 8px; background: var(--teal-soft); }
.messages li.error { background: var(--red-soft); color: var(--red); }

table.data { width: 100%; border-collapse: collapse; background: #fff; }
table.data th { text-align: left; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--panel); padding: 12px 14px; }
table.data td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
table.data td.num, table.data th.num { text-align: right; }
table.data tr.spread td { background: var(--amber-soft); }
.table-card { border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; margin-bottom: 22px; }
.sub { color: var(--muted); font-size: .92rem; }

.list-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; }
.list-item h3 { margin-bottom: 2px; }

.anchors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 10px 0 16px; }
.anchor { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font-size: .92rem; }
.anchor strong { font-family: var(--serif); display: block; }
details > summary { cursor: pointer; color: var(--teal); font-weight: 700; margin: 6px 0; }

.killer { border-top: 1px solid var(--line); padding: 16px 0; }
.killer:first-child { border-top: 0; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0; }
.check input { width: 18px; height: 18px; }

.checklist { list-style: none; padding: 0; }
.checklist li { padding: 3px 0; }
.checklist li.ok::before { content: "✓ "; color: var(--green); font-weight: 700; }
.checklist li.todo { color: var(--red); }
.checklist li.todo::before { content: "○ "; }

.split { display: grid; grid-template-columns: 1.4fr 1fr; }
.split > div { padding: 22px 26px; }
.split > div + div { border-left: 1px solid var(--line); }
.prose { white-space: pre-wrap; }
.scores { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 8px 0; }
.scores label { margin: 0; }
.scores input { position: absolute; opacity: 0; }
.scores span { display: block; text-align: center; padding: 10px 0; border: 1px solid #b9c2cf; border-radius: 6px; font-weight: 700; font-size: 1.15rem; cursor: pointer; background: #fff; }
.scores input:checked + span { background: var(--teal); color: #fff; border-color: var(--teal); }
.scores input:focus-visible + span { outline: 2px solid var(--gold); }
.toggle { display: inline-flex; border: 1px solid #b9c2cf; border-radius: 6px; overflow: hidden; }
.toggle label { margin: 0; }
.toggle input { position: absolute; opacity: 0; }
.toggle span, .toggle a { display: block; padding: 7px 16px; font-weight: 700; cursor: pointer; color: var(--muted); background: #fff; }
.toggle input:checked + span.pass, .toggle a.on { background: var(--green-soft); color: var(--green); }
.toggle input:checked + span.fail { background: var(--red-soft); color: var(--red); }
.toggle a + a, .toggle label + label { border-left: 1px solid #b9c2cf; }
.toggle a:hover { text-decoration: none; }
.coi { background: var(--teal-soft); border-radius: 8px; padding: 16px 22px; margin-bottom: 22px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] { opacity: .45; }

.stickybar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(20, 30, 50, .08); z-index: 5; }
.stickybar .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; padding-bottom: 12px; gap: 16px; }
.stickybar .big { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; }
.stat .value { font-family: var(--serif); font-size: 2rem; font-weight: 700; }

.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.process div { border-top: 4px solid var(--teal); padding-top: 10px; }
.process strong { font-family: var(--serif); }
.bar { height: 10px; border-radius: 6px; background: var(--teal); }

.hero { padding: 60px 0; }
.hero h1 { font-size: 2.8rem; }

@media (max-width: 800px) {
  .grid.two, .grid.three, .grid.four, .anchors, .split, .stats, .process, .banner { grid-template-columns: 1fr; }
  .split > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .masthead .wrap { flex-direction: column; align-items: flex-start; }
  .list-item { flex-direction: column; align-items: flex-start; }
}

.view-as { display: flex; align-items: center; gap: 8px; margin: 0; }
.view-as label { margin: 0; font-weight: 400; color: #c9d2e3; }
.view-as select { width: auto; padding: 5px 10px; background: #fff; border-color: var(--gold); font-weight: 700; }
.role-checks { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.role-checks label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
