:root {
  --paper: #f3f5f7;
  --paper-2: #e7ecf1;
  --card: #fbfcfd;
  --ink: #13233a;
  --ink-2: #4a5a70;
  --ink-3: #6f7d90;
  --rule: #cdd5de;
  --navy: #1d3a66;
  --stood: #2f6b4f;
  --trimmed: #b7791f;
  --excluded: #8c2f39;
  --undecided: #9aa6b4;
  --sponsor: #e9eef6;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1722; --paper-2: #16202e; --card: #131d2a; --ink: #e6ecf3; --ink-2: #b3bfcd; --ink-3: #8795a7;
    --rule: #28364a; --navy: #9dbbe8; --stood: #5fae88; --trimmed: #e0a84a; --excluded: #e07884; --undecided: #6b7a8c; --sponsor: #1b2a40;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1722; --paper-2: #16202e; --card: #131d2a; --ink: #e6ecf3; --ink-2: #b3bfcd; --ink-3: #8795a7;
  --rule: #28364a; --navy: #9dbbe8; --stood: #5fae88; --trimmed: #e0a84a; --excluded: #e07884; --undecided: #6b7a8c; --sponsor: #1b2a40;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--trimmed); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -0.005em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 500; }
h2 { font-size: 1.5rem; margin-top: 2.2rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; max-width: 72ch; }
.muted { color: var(--ink-3); }
.small { font-size: .88rem; }
.num { font-variant-numeric: tabular-nums; }

.top { border-bottom: 1px solid var(--rule); background: var(--card); }
.top .in { max-width: 1120px; margin: 0 auto; padding: 14px 16px; display: flex; gap: 1.2rem; align-items: baseline; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand span { color: var(--ink-3); font-weight: 400; }
.top nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); text-decoration: underline; }
.top nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }

main { max-width: 1120px; margin: 0 auto; padding: 28px 16px 64px; }
.hero { padding: 18px 0 8px; }
.hero h1 { max-width: 22ch; }
.hero p.lede { font-family: var(--serif); font-size: 1.2rem; color: var(--ink-2); max-width: 60ch; }

.ask { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 16px; margin: 22px 0 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.ask label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--ink-2); }
.ask select, .ask input, form input, form select, form textarea { font: inherit; font-size: .95rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: .45rem .55rem; }
.ask .q { grid-column: 1 / -1; }
.answer { font-family: var(--serif); font-size: 1.1rem; margin: 14px 0 6px; min-height: 1.6em; }

table.ledger { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.ledger th { text-align: left; font-weight: 500; font-size: .8rem; color: var(--ink-3); padding: 6px 8px; border-bottom: 1.5px solid var(--rule); }
table.ledger td { padding: 12px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.ledger td.name a { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; text-decoration: none; color: var(--ink); }
table.ledger td.name a:hover { text-decoration: underline; }
table.ledger tr.sponsored td { background: var(--sponsor); }
.tag { display: inline-block; font-size: .72rem; padding: 0 .4rem; border-radius: 4px; border: 1px solid var(--rule); color: var(--ink-2); margin: 2px 4px 0 0; line-height: 1.6; }
.tag.sp { border-color: var(--navy); color: var(--navy); }
.tag.claimed { border-color: var(--stood); color: var(--stood); }
.tag.pending { border-style: dashed; }
@media (max-width: 720px) { table.ledger .hide-sm { display: none; } }

/* The ledger strip: one mark per ruling, oldest first. */
.strip { display: inline-flex; gap: 3px; align-items: flex-end; height: 22px; vertical-align: middle; }
.strip i { display: block; width: 9px; height: 22px; border-radius: 2px; }
.strip i.stood { background: var(--stood); }
.strip i.trimmed { background: linear-gradient(to top, var(--trimmed) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--trimmed); }
.strip i.excluded { box-shadow: inset 0 0 0 1.5px var(--excluded); background: linear-gradient(to top right, transparent calc(50% - 1px), var(--excluded) calc(50% - 1px), var(--excluded) calc(50% + 1px), transparent calc(50% + 1px)); }
.strip i.undecided { height: 8px; background: var(--undecided); }
.strip.big i { width: 14px; height: 34px; }
.strip.big { height: 34px; gap: 4px; }
.strip.big i.undecided { height: 12px; }
.key { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); margin: 6px 0 0; }
.key span { display: inline-flex; align-items: center; gap: 6px; }

.profile-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; border-bottom: 1px solid var(--rule); padding-bottom: 16px; }
@media (max-width: 720px) { .profile-head { grid-template-columns: 1fr; } }
.summary { font-family: var(--serif); font-size: 1.15rem; color: var(--ink-2); max-width: 64ch; }
ol.rulings { list-style: none; padding: 0; margin: 0; }
ol.rulings li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
ol.rulings li .mark { padding-top: 4px; }
ol.rulings h3 { font-size: 1.05rem; margin-bottom: 2px; }
ol.rulings .meta { font-size: .85rem; color: var(--ink-3); margin-bottom: 6px; }
ol.rulings blockquote { margin: 8px 0; padding: 0 0 0 12px; border-left: 3px solid var(--rule); font-family: var(--serif); color: var(--ink-2); max-width: 70ch; }
.outcome { font-weight: 600; }
.outcome.stood { color: var(--stood); } .outcome.trimmed { color: var(--trimmed); } .outcome.excluded { color: var(--excluded); } .outcome.undecided { color: var(--ink-3); }
.history { font-size: .88rem; background: var(--paper-2); border-radius: 6px; padding: 6px 10px; display: inline-block; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
table.stats { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.stats th, table.stats td { padding: 7px 8px; border-bottom: 1px solid var(--rule); text-align: right; font-variant-numeric: tabular-nums; }
table.stats th:first-child, table.stats td:first-child { text-align: left; }
table.stats th { font-weight: 500; color: var(--ink-3); font-size: .8rem; }
.bar { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: var(--paper-2); min-width: 120px; gap: 2px; }
.bar b { display: block; }
.bar .stood { background: var(--stood); } .bar .trimmed { background: var(--trimmed); } .bar .excluded { background: var(--excluded); }

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 20px 0; }
.tier { border: 1px solid var(--rule); border-radius: 10px; padding: 20px; background: var(--card); display: flex; flex-direction: column; }
.tier.premier { border-color: var(--navy); border-width: 2px; }
.tier h3 { font-size: 1.3rem; }
.tier .price { font-family: var(--serif); font-size: 2rem; margin: 4px 0 10px; }
.tier .price small { font-family: var(--sans); font-size: .9rem; color: var(--ink-3); }
.tier ul { padding-left: 1.1rem; margin: 0 0 16px; flex: 1; }
.tier li { margin-bottom: .35rem; }
.rule-box { border-left: 4px solid var(--navy); background: var(--card); padding: 12px 16px; border-radius: 0 8px 8px 0; font-family: var(--serif); font-size: 1.1rem; max-width: 70ch; }

.btn { display: inline-block; font: inherit; font-weight: 500; background: var(--navy); color: var(--paper); border: 0; border-radius: 6px; padding: .55rem 1rem; text-decoration: none; cursor: pointer; }
.btn.quiet { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
form.intake { display: grid; gap: 12px; max-width: 640px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 20px; }
form.intake label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--ink-2); }
form.intake .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { form.intake .row { grid-template-columns: 1fr; } }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--paper-2); font-size: .92rem; max-width: 72ch; }
.notice.warn { border-left: 4px solid var(--trimmed); }
.foot { max-width: 1120px; margin: 0 auto; padding: 20px 16px 48px; font-size: .85rem; color: var(--ink-3); border-top: 1px solid var(--rule); }

.score { display: grid; grid-template-columns: auto 1fr; gap: 20px 32px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px; margin: 18px 0; }
@media (max-width: 640px) { .score { grid-template-columns: 1fr; } }
.score p { grid-column: 1 / -1; margin: 0; }
.score-main { display: flex; flex-direction: column; }
.score-label { font-size: .85rem; color: var(--ink-2); }
.score-value { font-family: var(--serif); font-size: 3.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.score-range { font-size: .85rem; color: var(--ink-3); }
.score dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; font-size: .92rem; }
.score dt { color: var(--ink-2); }
.score dd { margin: 0; font-variant-numeric: tabular-nums; }
.locked { border: 1px dashed var(--navy); border-radius: 10px; padding: 16px 18px; margin: 18px 0; background: var(--card); max-width: 72ch; }
.locked p { margin: 0 0 .6rem; }
ul.cases { padding-left: 1.1rem; }
ul.cases li { margin-bottom: .3rem; }
.adjusted { font-size: .95rem; max-width: 72ch; background: var(--paper-2); border-radius: 8px; padding: 10px 14px; }
