/* Tokens: light by default, dark by the reader's system, or the theme the reader chose (data-theme on <html>). */
:root {
  color-scheme: light;
  --bg: #fcfcfb; --panel: #ffffff; --fg: #1a1a18; --muted: #5f5e5a; --line: #e1e0d9; --axis: #c3c2b7;
  --link: #1c5cab; --accent: #eb6834; --code: #f3f2ee; --shadow: 0 6px 24px rgba(0, 0, 0, .12);
  --c-claude: #eb6834; --c-google: #2a78d6; --c-openai: #1baf7a; --c-xai: #8a5cd0; --c-alibaba: #c79a1e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #171716; --panel: #1f1f1d; --fg: #ecebe6; --muted: #a3a29b; --line: #34332f; --axis: #55544e;
    --link: #86b6ef; --code: #262623; --shadow: 0 6px 24px rgba(0, 0, 0, .5);
    --c-claude: #f08455; --c-google: #5c9be6; --c-openai: #3fc394; --c-xai: #a887e0; --c-alibaba: #d9b340;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171716; --panel: #1f1f1d; --fg: #ecebe6; --muted: #a3a29b; --line: #34332f; --axis: #55544e;
  --link: #86b6ef; --code: #262623; --shadow: 0 6px 24px rgba(0, 0, 0, .5);
  --c-claude: #f08455; --c-google: #5c9be6; --c-openai: #3fc394; --c-xai: #a887e0; --c-alibaba: #d9b340;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--link); text-underline-offset: .15em; }
.site-head { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.site-name { font-weight: 600; color: var(--fg); text-decoration: none; }
.site-head nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.site-head nav a { color: var(--muted); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--fg); }
.site-head nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .4em; text-decoration-thickness: 2px; }
main { margin: 0 auto; padding: 28px 16px 56px; }
main.text { max-width: 760px; }
main.wide { max-width: 1120px; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 18px; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: 22px; line-height: 1.3; margin: 40px 0 12px; }
h3 { font-size: 18px; margin: 28px 0 8px; }
p, ul, ol { margin: 0 0 16px; }
li { margin: 0 0 6px; }
.lead { color: var(--muted); max-width: 70ch; }
figure { margin: 22px 0; }
figure img, article img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fcfcfb; }
pre { background: var(--code); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--code); padding: 1px 4px; border-radius: 4px; }
pre code { background: none; padding: 0; font-size: inherit; }
.table-box { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
table.data { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); }
table.data td { white-space: nowrap; }
table.data td:nth-child(2) { white-space: normal; min-width: 10.5em; }
table.data td.place { color: var(--muted); }
.mark { width: 11px; height: 11px; margin-right: 7px; vertical-align: -1px; }
.mark-claude { fill: var(--c-claude); } .mark-google { fill: var(--c-google); } .mark-openai { fill: var(--c-openai); } .mark-xai { fill: var(--c-xai); } .mark-alibaba { fill: var(--c-alibaba); }
table.data th { vertical-align: bottom; line-height: 1.25; }
table.data tr:last-child td { border-bottom: 0; }
table.data th { font-weight: 600; color: var(--muted); background: var(--panel); position: sticky; top: 0; }
table.data .n { text-align: right; }
table.data th[data-sort] { cursor: pointer; user-select: none; }
table.data th[aria-sort="ascending"]::after { content: " ↑"; }
table.data th[aria-sort="descending"]::after { content: " ↓"; }
h1 a.title { color: inherit; text-decoration: none; }
h1 a.title:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.more { display: inline-block; margin-top: 8px; padding: 9px 18px; border-radius: 8px; background: var(--link); color: var(--bg); font-weight: 600; text-decoration: none; }
.more:hover { filter: brightness(1.1); }
.more:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
#more { scroll-margin-top: 16px; }
.site-foot { border-top: 1px solid var(--line); padding: 18px 16px 28px; color: var(--muted); font-size: 14px; text-align: center; }
/* A table of an article may be wider than its column of text, up to the page's width. */
main.text .table-box { width: min(900px, calc(100vw - 32px)); margin-left: 50%; transform: translateX(-50%); }
@media (max-width: 560px) { table.data { font-size: 13px; } table.data th, table.data td { padding: 6px 7px; } }
/* The chart inside an article breaks out of the text column as a table does. */
main.text .hb-embed { width: min(900px, calc(100vw - 32px)); margin: 22px 0 22px 50%; transform: translateX(-50%); font-size: 15px; }
main.text .hb-embed img { margin: 0 auto; }
/* The line under an article's title, as a blog has it: the author, the date, the share button. */
.byline { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: -4px 0 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.byline .author { display: inline-flex; align-items: center; gap: 7px; color: var(--fg); font-weight: 600; text-decoration: none; }
.byline .author:hover { text-decoration: underline; }
.byline .gh { width: 16px; height: 16px; fill: currentColor; }
.byline .share { margin-left: auto; }
.byline-end { margin: 36px 0 0; padding: 14px 0 0; border-bottom: 0; border-top: 1px solid var(--line); }
.share { font: inherit; font-size: 14px; color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; cursor: pointer; }
.share:hover, .share[aria-expanded="true"] { border-color: var(--axis); }
.share:focus-visible, .share-menu > :focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.share-menu { position: absolute; right: 0; top: calc(100% - 8px); z-index: 5; display: flex; flex-direction: column; min-width: 200px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.byline-end .share-menu { top: auto; bottom: calc(100% - 6px); }
.share-menu > * { display: block; text-align: left; font: inherit; font-size: 15px; color: var(--fg); background: none; border: 0; border-radius: 6px; padding: 7px 10px; text-decoration: none; cursor: pointer; }
.share-menu > :hover { background: var(--code); }
/* The theme switch: light, dark, or as the system has it. */
.theme { display: inline-flex; margin-left: auto; align-self: center; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; }
.theme button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.theme button:hover { color: var(--fg); }
.theme button[aria-pressed="true"] { background: var(--code); color: var(--fg); }
.theme button:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .site-name { flex: 1; } .theme { order: 1; } .site-head nav { order: 2; width: 100%; } }
.site-foot p { margin: 0 0 6px; }
.site-foot p:last-child { margin: 0; }
