/* Apple-style tokens (apple.com): text #1d1d1f / #6e6e73 / #86868b, fills #f5f5f7 / #e8e8ed, hairline #d2d2d7,
   links #0066cc, buttons #0071e3, pill radius 980px, 48px translucent nav, 18px card radius. */
:root {
  --bg: #fff;
  --bg-alt: #f5f5f7;
  --card: #fff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --hairline: #d2d2d7;
  --fill: #e8e8ed;
  --seg-on: #fff;
  --link: #0066cc;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --ok: #008009;
  --bad: #e30000;
  --kimi: #009e73;   /* Okabe-Ito, the colours of the report's figures; Kimi high = Kimi's colour, hatched */
  --ds: #d55e00;
  --mm: #0072b2;
  --nav: rgba(250, 250, 252, 0.8);
  --code-bg: #f5f5f7;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --bg-alt: #161617;
    --card: #1d1d1f;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --hairline: #424245;
    --fill: #333336;
    --seg-on: #636366;
    --link: #2997ff;
    --ok: #30d158;
    --bad: #ff453a;
    --nav: rgba(22, 22, 23, 0.8);
    --code-bg: #1d1d1f;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47059;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 0.88em; }
sup { font-size: 0.7em; line-height: 0; }

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 48px;
  background: var(--nav);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.nav-in {
  max-width: 1024px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; }
.nav ul { display: flex; gap: 32px; margin: 0; padding: 0; list-style: none; }
.nav ul a { color: var(--text); font-size: 12px; opacity: 0.8; transition: opacity 0.24s cubic-bezier(0.4, 0, 0.6, 1); }
.nav ul a:hover { opacity: 1; text-decoration: none; }
.nav ul a[aria-current="page"] { opacity: 1; font-weight: 600; }

/* layout */
.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }
.section { padding: 80px 0; }
.section.alt { background: var(--bg-alt); }
.section.tight { padding-top: 48px; }

h1, h2, h3 { font-weight: 600; margin: 0; text-wrap: balance; }
.hero .lead, .sub { text-wrap: balance; }
h2 { font-size: 40px; line-height: 1.1; margin-bottom: 12px; }
h3 { font-size: 24px; line-height: 1.17; margin: 56px 0 16px; }
h2 + h3 { margin-top: 32px; }
.sub { font-size: 21px; line-height: 1.38; color: var(--text-2); margin: 0 0 40px; max-width: 760px; }
p { margin: 0 0 16px; }

/* hero */
.hero { text-align: center; padding: 88px 0 72px; }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--text-2); margin: 0 0 10px; }
.hero h1 { font-size: 56px; line-height: 1.07143; letter-spacing: -0.005em; }
.hero .lead { font-size: 24px; line-height: 1.25; margin: 16px auto 0; max-width: 760px; }
.ctas { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: center; align-items: center; margin-top: 32px; }
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  border-radius: 980px;
  padding: 10px 22px;
  font-size: 17px;
  line-height: 1.2;
}
.btn:hover { background: var(--blue-hover); text-decoration: none; }
.more::after { content: " ›"; }

/* model comparison */
.compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; text-align: center; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; }
.dot.kimi, .kimi-bg { background: var(--kimi); }
.dot.ds, .ds-bg { background: var(--ds); }
.dot.mm, .mm-bg { background: var(--mm); }
.dot.kimih, .kimih-bg { background: repeating-linear-gradient(45deg, var(--kimi) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1.5px var(--kimi); }
.compare.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.model h3 { margin: 12px 0 4px; font-size: 24px; overflow-wrap: anywhere; }
.model .id { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.big { font-size: 56px; font-weight: 600; line-height: 1.07; margin: 28px 0 4px; font-variant-numeric: tabular-nums; }
.cap { font-size: 14px; color: var(--text-2); }
.specs { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--hairline); }
/* rows line up across the three columns: each column is a subgrid spanning --rows rows */
@supports (grid-template-rows: subgrid) {
  .compare { grid-template-rows: repeat(var(--rows, 9), auto); }
  .compare .model { display: grid; grid-row: span var(--rows, 9); grid-template-rows: subgrid; row-gap: 0; }
  .compare .specs { display: contents; }
  .compare .specs li:first-child { border-top: 1px solid var(--hairline); margin-top: 28px; }
}
.specs li { padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.specs b { display: block; font-size: 24px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.specs span { font-size: 14px; color: var(--text-2); }
.specs .t { display: block; font-size: 14px; line-height: 1.43; color: var(--text); margin-bottom: 2px; }
.short { display: none; }

/* cards */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--bg-alt); border-radius: 18px; padding: 32px 30px; }
.alt .card { background: var(--card); }
.card.wide { grid-column: 1 / -1; }
.card .k { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 0 0 6px; }
.card .v { font-size: 40px; font-weight: 600; line-height: 1.1; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.card p:last-child { margin-bottom: 0; }
.card h4 { font-size: 19px; margin: 0 0 8px; }
a.card { display: block; color: var(--text); transition: transform 0.3s cubic-bezier(0, 0, 0.5, 1); }
a.card:hover { text-decoration: none; transform: scale(1.01); }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.steps .card { padding: 24px 22px; }
.steps .card::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.steps h4 { font-size: 17px; margin: 0 0 6px; }
.steps p { font-size: 14px; color: var(--text-2); margin: 0; }

/* lists */
.list { margin: 0 0 16px; padding-left: 1.2em; }
.list li { margin: 0 0 10px; }

/* tables */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.43; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hairline); }
thead th { font-size: 12px; font-weight: 600; color: var(--text-2); border-bottom-color: var(--text-3); white-space: nowrap; vertical-align: bottom; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.n { text-align: right; white-space: nowrap; }
.c { text-align: center; white-space: nowrap; }
.nw { white-space: nowrap; }
.best { font-weight: 600; }
.note { font-size: 12px; line-height: 1.5; color: var(--text-2); margin: 8px 0 0; }
td .sec { color: var(--text-2); font-size: 12px; }
tr.grp td { border-bottom-color: var(--text-3); }
tr.blk td { font-weight: 600; font-size: 12px; color: var(--text-2); padding-top: 18px; }
th.grp-h { border-bottom: 1px solid var(--hairline); }
h4.tcap { font-size: 17px; font-weight: 600; margin: 28px 0 8px; }

.ok { color: var(--ok); }
.bad { color: var(--bad); }
.pill { display: inline-block; font-size: 12px; line-height: 1.5; padding: 1px 9px; border-radius: 980px; background: var(--fill); color: var(--text-2); white-space: nowrap; }

/* segmented control */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill); }
.seg button {
  appearance: none;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 5px 14px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--seg-on); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }
#plist tbody tr { cursor: pointer; }
#plist tbody tr:hover td { background: var(--bg-alt); }
.alt #plist tbody tr:hover td { background: var(--card); }

/* chart */
.chart { width: 100%; height: auto; display: block; margin: 8px 0 0; }
.chart text { fill: var(--text-2); font-size: 12px; font-family: inherit; }
.chart text.val { fill: var(--text); font-weight: 600; }
.chart text.cat { fill: var(--text); font-size: 14px; }
.chart .grid { stroke: var(--hairline); stroke-width: 1; }
.chart .kimi { fill: var(--kimi); }
.chart .ds { fill: var(--ds); }
.chart .mm { fill: var(--mm); }
.chart .kimih { fill: url(#hatch); stroke: var(--kimi); stroke-width: 1.2; }
.chart .hatch line { stroke: var(--kimi); stroke-width: 2.2; }
.chart .whisker { stroke: var(--text); stroke-width: 1; }
.chart .ref { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 4 3; }
.chart .faint { opacity: 0.3; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; font-size: 14px; color: var(--text-2); margin: 0; padding: 0; list-style: none; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--text-3); }
.legend i.faint { opacity: 0.3; }

/* problem page */
.crumb { font-size: 14px; color: var(--text-2); margin: 0 0 20px; }
.ptitle { font-size: 48px; line-height: 1.08; }
.meta { font-size: 17px; color: var(--text-2); margin: 12px 0 24px; }
.summary { font-size: 21px; line-height: 1.38; max-width: 760px; }
.verdict { font-size: 48px; font-weight: 600; line-height: 1; margin: 24px 0 8px; }
.compare.small .specs b { font-size: 19px; }
.codehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.copy { appearance: none; border: 0; background: none; color: var(--link); font: inherit; font-size: 14px; cursor: pointer; padding: 0; }
.code { background: var(--code-bg); border-radius: 12px; padding: 18px 20px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.55; }
.code pre { margin: 0; font: inherit; }
.empty { background: var(--code-bg); border-radius: 12px; padding: 18px 20px; color: var(--text-2); font-size: 14px; }
[data-panel][hidden] { display: none; }
.pager { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding: 0 0 56px; }

/* citations, references, command blocks */
.cite { font-size: 0.8em; color: var(--text-2); white-space: nowrap; }
.refs { margin: 0; padding-left: 1.6em; font-size: 14px; line-height: 1.5; }
.refs li { margin: 0 0 10px; overflow-wrap: anywhere; }
.refs li:target { background: var(--fill); border-radius: 6px; }
.cmd { position: relative; margin: 0 0 16px; }
.cmd .copy { position: absolute; top: 12px; right: 16px; font-size: 13px; }
.cmd pre.code { margin: 0; padding-right: 64px; }
.cmd code { font-size: inherit; }

/* small segmented control for samples inside a model's code panel */
.seg.sm button { font-size: 12px; padding: 3px 10px; }
.samples { margin: 0 0 12px; }

/* footer */
footer { background: var(--bg-alt); color: var(--text-2); font-size: 12px; line-height: 1.5; }
footer .wrap { padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--hairline); }
.section.alt + footer .wrap { border-top-color: var(--hairline); }
footer p { margin: 0 0 6px; }
footer a { color: var(--text); }

@media (max-width: 1068px) {
  .hero h1 { font-size: 48px; }
}

@media (max-width: 734px) {
  .wrap, .nav-in { padding-left: 16px; padding-right: 16px; }
  .nav ul { gap: 14px; }
  .section { padding: 56px 0; }
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: 36px; line-height: 1.1; }
  .hero .lead { font-size: 19px; }
  h2 { font-size: 32px; }
  h3 { font-size: 21px; margin-top: 40px; }
  .sub { font-size: 17px; margin-bottom: 28px; }
  .compare { gap: 10px; }
  .compare.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .model h3 { font-size: 15px; }
  .long { display: none; }
  .short { display: inline; }
  .model .id { display: none; }
  .big { font-size: 30px; margin-top: 16px; }
  .cap { font-size: 12px; }
  .specs b, .compare.small .specs b { font-size: 16px; }
  .specs span { font-size: 11px; }
  .specs .t { font-size: 12px; overflow-wrap: anywhere; }
  .verdict { font-size: 30px; }
  .tiles { grid-template-columns: 1fr; }
  .card { padding: 24px 20px; }
  .card .v { font-size: 32px; }
  .ptitle { font-size: 32px; }
  .summary { font-size: 17px; }
  .hide-sm { display: none; }
  table { font-size: 13px; }
  th, td { padding: 8px 8px; }
}
.legend i.kimi-bg { background: var(--kimi); }
.legend i.ds-bg { background: var(--ds); }
.legend i.mm-bg { background: var(--mm); }
.legend i.kimih-bg { background: repeating-linear-gradient(45deg, var(--kimi) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1.5px var(--kimi); }

/* official statements on the problem pages */
.stmt-sec { padding-bottom: 56px; }
.stmt { max-width: 820px; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.stmt p { margin: 0 0 12px; }
.stmt h3, .stmt h4 { font-size: 16px; font-weight: 600; margin: 22px 0 8px; }
.stmt pre { background: var(--code-bg); border-radius: 10px; padding: 12px 16px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.5; }
.stmt img { display: block; max-width: 100%; height: auto; margin: 12px 0; background: #fff; border-radius: 6px; }
.stmt.plain { white-space: pre-wrap; font-size: 15px; }
.stmt .katex { font-size: 1.05em; }
.pdfpages img { display: block; width: 100%; max-width: 820px; height: auto; margin: 0 0 16px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px var(--hairline); }
.more.jump { margin-left: 28px; }
.stmt-sec .note { margin: 0 0 20px; }
