:root {
  --eco: #0b7c62;
  --eco-dark: #075b49;
  --ink: #16231f;
  --muted: #66726d;
  --paper: #f5f7f3;
  --surface: #ffffff;
  --line: #dce4df;
  --soft: #e9f3ef;
  --warm: #f5eedb;
  --bad: #9b3030;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-underline-offset: .18em; }
a:hover { color: var(--eco); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--eco); outline-offset: 3px; }

.shell { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.skip { position: absolute; top: -5rem; left: 1rem; z-index: 10; padding: .7rem 1rem; background: var(--ink); color: white; }
.skip:focus { top: 1rem; }

header, footer { border-color: var(--line); border-style: solid; border-width: 0; }
header { border-bottom-width: 1px; }
footer { border-top-width: 1px; padding: 2.5rem 0 3rem; color: var(--muted); }
.nav, .footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.nav { min-height: 74px; }
.footer { align-items: flex-start; }
nav { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .94rem; font-weight: 700; }
nav a, .brand { text-decoration: none; }
.brand { color: var(--eco); font-size: 2rem; font-weight: 900; letter-spacing: -.06em; line-height: 1; }
.brand.small { font-size: 1.45rem; }

.hero, .page-hero, .score-hero { padding-top: clamp(4rem, 9vw, 7rem); }
.hero { padding-bottom: clamp(3rem, 7vw, 5rem); }
.page-hero, .score-hero { padding-bottom: 2rem; }
.kicker { margin: 0 0 .55rem; color: var(--eco); font-size: .78rem; font-weight: 900; letter-spacing: .065em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.05; letter-spacing: -.04em; }
h1 { margin-bottom: 1rem; font-size: clamp(3rem, 9vw, 6.6rem); }
h2 { margin-bottom: 1rem; font-size: clamp(2rem, 5vw, 3.25rem); }
h3 { margin-bottom: .55rem; font-size: 1.3rem; }
.hero h1 span { color: var(--eco); }
.lede, .page-hero > p:not(.kicker), .intro { max-width: 760px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.28rem); }

.lookup { max-width: 760px; margin-top: 2rem; }
.lookup > label { display: block; margin-bottom: .6rem; font-weight: 850; }
.lookup > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; }
.lookup input { min-height: 58px; border: 2px solid var(--ink); border-radius: 999px; background: white; padding: .8rem 1.15rem; }
.lookup p { margin-top: .5rem; color: var(--muted); font-size: .9rem; }

button, .button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: var(--eco); color: white; padding: .72rem 1.15rem; font-weight: 850; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--eco-dark); color: white; }
.button.secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.button.secondary:hover { border-color: var(--eco); color: var(--eco); }
.lookup button { min-height: 58px; }

.section { padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.tint { background: var(--soft); }
.heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.2rem; }
.heading > div { max-width: 760px; }
.card { position: relative; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 1.2rem; }
.card p { color: var(--muted); }
.categories { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; }
.weight { position: absolute; top: 1rem; right: 1rem; color: var(--eco); font-size: .82rem; font-weight: 850; }
.categories .card h3 { margin-top: 2rem; }
.tracked { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: 1.2rem; }
.tracked span { border: 1px solid var(--line); border-radius: 999px; background: white; padding: .4rem .7rem; font-size: .88rem; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.split article > p:not(.kicker) { color: var(--muted); font-size: 1.06rem; }
.callout { border-top: 1px solid var(--line); margin-bottom: 3rem; }
.callout > p:not(.kicker) { max-width: 760px; color: var(--muted); }

.filters { display: flex; align-items: end; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.filters label { display: grid; gap: .3rem; color: var(--muted); font-size: .85rem; font-weight: 750; }
.filters input, .filters select { min-height: 44px; border: 1px solid #bac9c2; border-radius: 10px; background: white; padding: .65rem .75rem; }

.rankings { display: grid; gap: .7rem; }
.ranking { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 2.7rem 4.7rem 3.6rem 7rem; align-items: center; gap: .8rem; border: 1px solid var(--line); border-radius: 16px; background: white; padding: .85rem 1rem; text-decoration: none; }
.ranking:hover { border-color: #b9cdc3; color: inherit; }
.number, .date, .change { color: var(--muted); font-variant-numeric: tabular-nums; }
.number { font-weight: 800; }
.site { min-width: 0; }
.site strong, .site small { display: block; overflow-wrap: anywhere; }
.site small, .score small { color: var(--muted); }
.score { text-align: right; }
.score strong { display: block; font-size: 1.18rem; }
.grade { display: inline-flex; width: 2.6rem; height: 2.6rem; align-items: center; justify-content: center; border-radius: 50%; font-weight: 900; }
.grade-a, .grade-b { background: #dff2e9; color: var(--eco-dark); }
.grade-c { background: #eff0d3; color: #5c6200; }
.grade-d { background: #f8e8bd; color: #755000; }
.grade-e, .grade-f { background: #f5dddd; color: #8b2828; }
.change { text-align: right; font-weight: 850; }
.up { color: var(--eco); }
.down { color: var(--bad); }

.history { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: white; }
.history-head, .history-row { min-width: 1080px; display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(7, minmax(76px, .6fr)) minmax(110px, .8fr); gap: .7rem; align-items: center; padding: .8rem 1rem; }
.history-head { color: var(--muted); font-size: .76rem; font-weight: 850; text-transform: uppercase; }
.history-row { border-top: 1px solid var(--line); text-decoration: none; font-variant-numeric: tabular-nums; }
.history-row:hover { background: var(--soft); color: inherit; }
.history-row span:first-child strong, .history-row span:first-child small { display: block; }
.history-row small { color: var(--muted); }
.pager { display: flex; align-items: center; gap: .65rem; margin-top: 1rem; }
.pager span { margin-right: auto; color: var(--muted); font-weight: 500; }

.score-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; }
.score-hero > div:first-child p { color: var(--muted); }
.mark { min-width: 170px; display: grid; justify-items: end; }
.mark .grade { width: 4rem; height: 4rem; font-size: 1.7rem; }
.mark > strong { font-size: clamp(3.5rem, 8vw, 6rem); line-height: .95; letter-spacing: -.07em; }
.mark small { color: var(--muted); }
.summary { padding-bottom: 1rem; }
.summary > p { max-width: 800px; font-size: 1.18rem; }
.summary small { color: var(--muted); overflow-wrap: anywhere; }
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.detail { display: grid; gap: 1rem; }
.detail:last-child:nth-child(odd) { grid-column: 1 / -1; }
.detail-top { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.detail-top > span { color: var(--muted); font-size: .9rem; }
.big-score { display: block; font-size: 3rem; line-height: 1; letter-spacing: -.06em; }
.detail > p, .evidence { color: var(--muted); }
.evidence { font-size: .92rem; }
.action { border-radius: 14px; background: var(--soft); padding: 1rem; }
.action.medium { background: var(--warm); }
.action.high { background: #f7e4df; }
.action small { color: var(--eco-dark); font-weight: 900; letter-spacing: .05em; }
.action.high small { color: var(--bad); }
.action p { margin-bottom: 0; color: var(--ink); }
.timeline { border: 1px solid var(--line); border-radius: 18px; background: white; overflow: hidden; }
.timeline a { display: grid; grid-template-columns: 2.7rem 6rem minmax(0, 1fr) 3.5rem; align-items: center; gap: .8rem; padding: .9rem 1rem; border-top: 1px solid var(--line); text-decoration: none; }
.timeline a:first-child { border-top: 0; }
.timeline a:hover { background: var(--soft); color: inherit; }

.status { display: inline-block; margin-left: .35rem; border-radius: 999px; padding: .1rem .4rem; background: var(--warm); color: #755000; font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.status-withdrawn { background: #f5dddd; color: var(--bad); }
.correction { width: min(1120px, calc(100% - 2rem)); margin: 2rem auto 0; border-left: 4px solid var(--bad); border-radius: 0 12px 12px 0; background: #f7e4df; padding: 1rem 1.1rem; }
.criteria { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .8rem 0; }
.criteria summary { cursor: pointer; color: var(--eco-dark); font-weight: 800; }
.criteria ul { display: grid; gap: .55rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.criteria li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: start; }
.criteria li span:first-child strong, .criteria li span:first-child small { display: block; }
.criteria li small { color: var(--muted); }
.criteria li > span:last-child { white-space: nowrap; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.version-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.algorithm-steps { max-width: 850px; padding-left: 1.3rem; }
.algorithm-steps li + li { margin-top: .55rem; }
code { border-radius: 6px; background: #dfe9e4; padding: .08rem .3rem; font: .92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.rubric { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; margin-top: 1.5rem; }
.rubric div { border: 1px solid var(--line); border-radius: 12px; background: white; padding: .9rem; }
.rubric strong, .rubric span { display: block; }
.rubric strong { color: var(--eco); font-size: 1.15rem; }
.rubric span { margin-top: .3rem; color: var(--muted); font-size: .88rem; }
.method-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.method-categories .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.method-categories ul { padding-left: 1.1rem; }
.method-categories li + li { margin-top: .7rem; }
.method-categories li span { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 900px) {
  .categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .details, .score-hero, .method-categories { grid-template-columns: 1fr; }
  .detail:last-child:nth-child(odd), .method-categories .card:last-child:nth-child(odd) { grid-column: auto; }
  .mark { justify-items: start; }
  .ranking { grid-template-columns: 2.2rem minmax(0, 1fr) 2.7rem 4.5rem; }
  .ranking .change, .ranking .date { grid-column: 2 / -1; text-align: left; }
  .rubric { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 1.25rem, 1120px); }
  .nav { padding-block: 1rem; }
  .nav nav { width: 100%; }
  .lookup > div { grid-template-columns: 1fr; }
  .lookup button { width: 100%; }
  .categories, .rubric { grid-template-columns: 1fr; }
  .heading { align-items: start; flex-direction: column; }
  .ranking { grid-template-columns: 2rem minmax(0, 1fr) 2.7rem; }
  .ranking .score, .ranking .change, .ranking .date { grid-column: 2 / -1; text-align: left; }
  .timeline a { grid-template-columns: 2.7rem 1fr auto; }
  .timeline a .change { grid-column: 2 / -1; }
  .criteria li { grid-template-columns: 1fr; }
  .criteria li > span:last-child { white-space: normal; }
  .pager { align-items: flex-start; flex-wrap: wrap; }
  .pager span { width: 100%; }
}
