:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #1c1b18;
  --muted: #6b6760;
  --line: #e4e1d9;
  --accent: #2f5bd3;
  --accent-soft: #e6ecfb;
  --track: #ebe8e1;
  --good: #1f7a4d;
  --good-soft: #e1f3e8;
  --warn: #9a5b12;
  --warn-soft: #fbefdc;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

/* Dark palette: follows the OS unless the host stamps data-theme="light"; an explicit dark stamp also wins. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141412;
    --surface: #1d1c1a;
    --ink: #eceae4;
    --muted: #a09c94;
    --line: #2f2d2a;
    --accent: #8aa8ff;
    --accent-soft: #232b40;
    --track: #2c2a27;
    --good: #6ccf9b;
    --good-soft: #1d3327;
    --warn: #f0b36a;
    --warn-soft: #3a2c19;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141412;
  --surface: #1d1c1a;
  --ink: #eceae4;
  --muted: #a09c94;
  --line: #2f2d2a;
  --accent: #8aa8ff;
  --accent-soft: #232b40;
  --track: #2c2a27;
  --good: #6ccf9b;
  --good-soft: #1d3327;
  --warn: #f0b36a;
  --warn-soft: #3a2c19;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
/* The same width and header as the home page (home-redesign.css). */
.page { width: min(100% - 48px, 1200px); margin: 0 auto; padding: 0 0 32px; }
a { color: var(--accent); }

.kicker { margin: 0 0 14px; color: var(--accent); font-size: 13px; font-weight: 700; }
h1 { margin: 0; font-size: clamp(32px, 6vw, 52px); letter-spacing: -.02em; line-height: 1.2; }
.h1-machine { display: block; margin-bottom: 6px; font-size: .62em; letter-spacing: 0; }
.lede { max-width: 680px; margin: 20px 0 0; color: var(--muted); font-size: 16px; line-height: 1.9; }
.spec { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); max-width: 680px; margin: 24px 0 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.spec > div { min-width: 0; padding: 14px 18px; border-left: 1px solid var(--line); }
.spec > div:first-child { border-left: 0; }
.spec dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.spec dd { margin: 4px 0 0; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.spec .spec-main { background: var(--accent-soft); }
.spec .spec-main dt { color: var(--accent); }
.spec .spec-main dd { color: var(--accent); font-size: 34px; line-height: 1.1; }
.spec-note { max-width: 680px; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }

section { margin-top: 52px; }
h2 { margin: 0 0 16px; font-size: 21px; letter-spacing: -.01em; }
/* Words of a heading that stay together: a narrow screen breaks the line between them, not inside. */
.phrase { display: inline-block; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.status { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.pick { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pick-title { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.pick-model { margin: 8px 0 4px; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.pick-reason { margin: 0; color: var(--muted); font-size: 13px; }

.sorter { display: flex; flex-wrap: wrap; gap: 6px; }
.sorter button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.sorter button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.cards { display: grid; gap: 16px; }
.card { padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.card-head h3 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.tag { padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; }
.intro { max-width: 720px; margin: 12px 0 0; font-size: 14px; line-height: 1.8; }
.intro-by { margin-left: 4px; color: var(--muted); font-size: 12px; }
.tag.accent { background: var(--accent-soft); color: var(--accent); }

.metrics { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 20px; margin-top: 20px; }
.metric { min-width: 0; }
.metric.wide { grid-column: 1 / -1; }
.scores.two { grid-template-columns: repeat(2, 1fr); gap: 10px 28px; }
.metric-title { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0; }
.metric-sub { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.big { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.big.muted { color: var(--muted); font-size: 18px; }
.of { color: var(--muted); font-size: 13px; }
.pill { padding: 2px 9px; border-radius: 999px; background: var(--bg); font-size: 12px; font-weight: 700; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }

.meter { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--fill), var(--track) var(--fill)); }
.scores { display: grid; gap: 10px; }
.score-row { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 2px 8px; }
.score-row .meter { grid-column: 1 / -1; margin-top: 2px; }
.score-label { font-size: 13px; }
.score-value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.score-margin { min-width: 4.5em; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.more { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.more > summary { color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer; }
.raw { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 20px; margin: 14px 0 0; }
.raw dt { color: var(--muted); font-size: 11px; font-weight: 700; }
.raw dd { margin: 3px 0 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.raw-title { margin: 18px 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.task { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; }
.task summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 14px; cursor: pointer; font-size: 13px; }
.task-title { font-weight: 700; }
.task-score { font-variant-numeric: tabular-nums; }
.task-note { margin-left: auto; color: var(--muted); font-size: 12px; }
.qa { padding: 0 14px 12px; }
.qa-label { margin: 4px 0 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.qa pre { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--bg); font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.try-kind { margin: 24px 0 10px; font-size: 16px; }
.try-kind:first-of-type { margin-top: 0; }
.aside { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.steps { margin: 0; padding: 20px 20px 20px 40px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); line-height: 1.9; }
.steps li + li { margin-top: 8px; }
.command { display: block; margin-top: 8px; padding: 10px 14px; border-radius: 8px; background: var(--bg); font: 14px ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

.glossary { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0; }
.glossary > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.notes ul { margin: 0; padding: 20px 20px 20px 38px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 14px; line-height: 1.9; }
.notes strong { color: var(--ink); }
.footer { margin-top: 40px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.footer p { margin: 0; }

.compare-wrap { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow-x: auto; }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.compare thead th { border-top: 0; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.compare .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.compare tbody th { position: sticky; left: 0; background: var(--surface); font-weight: 400; }
.compare-name { display: block; color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.compare-name:hover { color: var(--accent); text-decoration: underline; }
.compare-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 12px; }
.gen { padding: 1px 7px; border-radius: 999px; background: var(--bg); font-size: 11px; font-weight: 700; }
.gen-new { background: var(--good-soft); color: var(--good); }
.compare .best { color: var(--accent); font-weight: 700; }
.compare .muted { color: var(--muted); }
.compare-note { min-width: 12em; color: var(--muted); font-size: 13px; }
.card { scroll-margin-top: 16px; }

.section-lede { max-width: 680px; margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.role { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.role-name { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.role-model { margin: 8px 0 4px; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.role-model.pending-model { color: var(--muted); }
.role-meta { margin: 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.role-desc { margin: 10px 0 0; font-size: 13px; line-height: 1.7; }
.role-table { min-width: 520px; }
.role-table-wrap { margin-top: 12px; }
.updates { margin: 0; }
.history { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.8; }

.site-nav { display: flex; gap: 6px; margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { flex: none; white-space: nowrap; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.site-nav a[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.site-nav .lang-switch { margin-left: auto; }
.site-nav.has-brand { align-items: center; gap: 24px; min-height: 94px; margin-bottom: 48px; padding: 0; border-bottom: 1px solid var(--line); }
.site-nav.has-brand a { padding: 5px 0; border: 0; border-radius: 0; background: transparent; font-size: 13px; }
.site-nav.has-brand a:hover { color: var(--accent); }
.site-nav.has-brand a[aria-current="page"] { background: transparent; color: var(--accent); }
.site-nav.has-brand .nav-brand { flex: none; margin-right: auto; color: var(--ink); font-size: 16px; font-weight: 800; line-height: 1.25; letter-spacing: -.04em; }
.site-nav.has-brand .nav-brand::before { content: "m•"; display: inline-block; margin-right: 10px; color: var(--accent); font-size: 34px; vertical-align: middle; letter-spacing: -.16em; }
.site-nav.has-brand .lang-switch { margin-left: 10px; padding-left: 20px; border-left: 1px solid var(--line); }
@media (max-width: 1000px) {
  .site-nav.has-brand { gap: 14px; }
  .site-nav.has-brand a { font-size: 12px; }
  .site-nav.has-brand .nav-brand { font-size: 14px; }
}
@media (max-width: 760px) {
  .page { width: min(100% - 32px, 600px); }
  .site-nav.has-brand { min-height: 0; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 36px; padding: 20px 0 14px; }
  .site-nav.has-brand .nav-brand { width: 100%; }
  .site-nav.has-brand .lang-switch { margin-left: 0; padding-left: 0; border-left: 0; }
}

.image-models { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.stat { min-width: 0; }
.stat .big { margin: 0; font-size: 20px; }
.pending { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.prerender { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.series-grid > .prerender { grid-column: 1 / -1; columns: 2 280px; }  /* the list shown before series.js runs */
.auto-added { display: block; margin: 8px 0 0; font-size: 13px; line-height: 1.7; }
.text-check { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 16px 0 0; }
.text-check .metric-title { margin: 0; }
.text-read { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

.prompt-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.prompt-tabs button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.prompt-tabs button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.prompt-text { margin: 14px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.shot { margin: 0; min-width: 0; }
.shot-button { display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--track); cursor: zoom-in; }
.shot-button img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.shot-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.shot-empty { display: grid; place-items: center; aspect-ratio: 1; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; }
.shot figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; margin-top: 8px; font-size: 13px; }
.shot-model { font-weight: 700; }
.shot-time { color: var(--muted); font-variant-numeric: tabular-nums; }

.section-lede { margin: -6px 0 16px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.video-card .stats { max-width: 560px; }
.clips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.clip { margin: 0; min-width: 0; }
.clip video { display: block; width: 100%; height: auto; aspect-ratio: var(--ratio, 16 / 9); border-radius: 12px; background: var(--track); }
.clip figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; margin-top: 8px; font-size: 13px; }

.lightbox { max-width: min(92vw, 900px); padding: 16px; border: 0; border-radius: 16px; background: var(--surface); color: var(--ink); }
.lightbox::backdrop { background: rgb(0 0 0 / .7); }
.lightbox img { display: block; width: 100%; height: auto; border-radius: 10px; }
.lightbox p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.lightbox form { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.lightbox .close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .clips { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .image-models { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .spec { grid-template-columns: 1fr 1fr; }
  .spec > div:nth-child(3) { border-left: 0; }
  .spec > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .page { padding-top: 32px; }
  .card { padding: 18px; }
  .metrics { grid-template-columns: 1fr; gap: 18px; }
  .scores.two { grid-template-columns: 1fr; }
  .task-note { margin-left: 0; width: 100%; }
}

/* Home: leaders, agents, rejected drafts, people on the loop, how it works */
.hero h1 { font-size: clamp(34px, 6.5vw, 56px); }
@media (max-width: 370px) {
  h1, .hero h1 { font-size: 8.5vw; }  /* the longest title line (10 characters) stays on one line from 320px */
}
a.champion { display: block; color: inherit; text-decoration: none; }
a.champion:hover { border-color: var(--accent); }
a.champion .pick-title::after { content: " →"; }
.agents { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.agent { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.agent-portrait { display: block; width: 100%; max-width: 240px; height: auto; aspect-ratio: 1; margin: 0 auto 14px; border-radius: 12px; object-fit: cover; }
.agent-head { display: flex; align-items: center; gap: 10px; }
.agent-head h3 { margin: 0; font-size: 16px; }
.agent-badge { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 700; }
.agent-model { margin: 10px 0 0; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.agent-facts { margin: 12px 0 0; }
.agent-facts > div + div { margin-top: 8px; }
.agent-facts dt { color: var(--muted); font-size: 11px; font-weight: 700; }
.agent-facts dd { margin: 2px 0 0; font-size: 13px; line-height: 1.7; }
.portrait-history { display: grid; gap: 16px; margin: 12px 0 0; padding: 0; list-style: none; }
.portrait-set-head { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.portrait-row { display: flex; flex-wrap: wrap; gap: 10px; }
.portrait-row figure { margin: 0; width: 96px; text-align: center; }
.portrait-row img { display: block; width: 96px; height: 96px; border-radius: 10px; object-fit: cover; }
.portrait-row figcaption { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.drafts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.draft { padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.draft-head { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.draft blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--line); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.draft-failed { margin: 0; color: var(--warn); font-size: 12px; }
.humans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.human { padding: 16px 18px; border: 1px dashed var(--line); border-radius: 14px; }
.human h3 { margin: 0; font-size: 15px; }
.human p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.flow { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.flow li { position: relative; padding: 14px 18px 14px 52px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 13px; line-height: 1.8; counter-increment: step; }
.flow li::before { content: counter(step); position: absolute; left: 18px; top: 14px; color: var(--ink); font-weight: 700; }
.flow strong { display: block; color: var(--ink); font-size: 15px; }
.flow-who { float: right; margin-left: 8px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.flow-who.by-agent { background: var(--accent-soft); color: var(--accent); }
.flow-who.by-program { background: var(--bg); color: var(--muted); }
.examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; margin-top: 14px; }
.examples .qa { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.examples .qa.reference { border-color: var(--accent); }
.examples .qa pre { padding: 0; background: none; font: 14px/1.8 inherit; font-family: inherit; }

/* Series page (series.html): the list, the trend chart and one card per series. */
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.series-card { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.series-card:hover { border-color: var(--accent); }
.series-card.minor { background: transparent; }
.series-card .pick-model { margin: 4px 0 6px; }
.series-card .pick-reason { margin-top: 6px; }
.series-share { margin: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.series-picker { margin-bottom: 12px; }
.trend { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.trend-plot { position: relative; }
.trend-svg { display: block; width: 100%; height: auto; overflow: visible; }
.trend-grid { stroke: var(--line); stroke-width: 1; }
.trend-axis { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.trend-series .trend-line { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .35; }
.trend-series .trend-dot { fill: var(--muted); stroke: var(--surface); stroke-width: 2; opacity: .45; cursor: pointer; }
.trend-series.chosen .trend-line { stroke: var(--accent); stroke-width: 2.5; opacity: 1; }
.trend-series.chosen .trend-dot { fill: var(--accent); opacity: 1; }
.trend-dot:focus { outline: none; stroke: var(--ink); }
.trend-label { fill: var(--ink); font-size: 13px; font-weight: 700; }
.trend-tip { position: absolute; width: 220px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 12px; line-height: 1.6; box-shadow: 0 4px 16px rgba(0, 0, 0, .12); pointer-events: none; }
.series-detail { min-width: 0; }
.series-detail .compare { min-width: 760px; }
.series-table { margin-top: 16px; }
.series-status { font-size: 12px; white-space: nowrap; }
.series-margin { margin-left: 4px; color: var(--muted); font-size: 12px; }
.cut-note { display: block; color: var(--muted); font-size: 12px; font-weight: normal; }
.series-change { display: block; max-width: 14em; margin: 4px 0 0 auto; color: var(--muted); font-size: 12px; line-height: 1.5; white-space: normal; text-align: right; }
.series-others { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.8; }

/* Details for readers who want them: the heading stays in view, the rest opens on request. */
.fold > details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; list-style: none; }
.fold > details > summary::-webkit-details-marker { display: none; }
.fold > details > summary:hover { border-color: var(--accent); }
.fold > details > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fold > details > summary h2 { margin: 0; font-size: 17px; }
.fold > details > summary::after { content: "開く"; flex: none; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.fold > details[open] > summary::after { content: "閉じる"; }
:root[lang="en"] .fold > details > summary::after { content: "Show"; }
:root[lang="en"] .fold > details[open] > summary::after { content: "Hide"; }
.fold > details[open] > summary { margin-bottom: 16px; }
.fold + .fold { margin-top: 12px; }

/* What the measuring loop is doing (operations page; one line on the home page). */
.live { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.live > div { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.live-model { margin: 4px 0 6px; font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.live-model.muted { color: var(--muted); font-size: 16px; }
.live-counts { margin-top: 12px; }
.live-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.9; }
.live-list li span + .tag { margin-left: 8px; white-space: nowrap; }
.home-live { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { .live { grid-template-columns: 1fr; } }

/* Recommendations by use (common.js renderRecommendations). */
.recs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.rec { display: flex; flex-direction: column; min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
a.rec:hover { border-color: var(--accent); }
.rec-use { margin: 0; color: var(--accent); font-size: 14px; font-weight: 800; }
.rec-rule { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.rec-model { margin: 14px 0 0; font-size: 19px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.rec-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 16px; margin: 12px 0 0; }
.rec-stats dt { color: var(--muted); font-size: 11px; font-weight: 700; }
.rec-stats dd { margin: 2px 0 0; font-size: 14px; font-weight: 700; white-space: nowrap; }
.rec-stats .key dt, .rec-stats .key dd { color: var(--accent); }
.rec-tie { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.rec-command { display: block; margin-top: auto; padding-top: 14px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.section-note { max-width: 720px; margin: -4px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.series-changes { margin: 0 0 16px; padding: 14px 18px; border-radius: 12px; background: var(--accent-soft); }
.series-changes-title { margin: 0 0 6px; color: var(--accent); font-size: 13px; font-weight: 800; }
.series-changes ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.8; }
.name-parts { display: flex; flex-wrap: wrap; gap: 14px 6px; align-items: flex-start; margin: 0; padding: 22px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); list-style: none; }
.name-parts li { display: grid; gap: 8px; justify-items: center; text-align: center; }
.name-parts code { padding: 8px 14px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font: 700 20px ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.name-parts span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.name-parts .name-sep { padding-top: 8px; color: var(--muted); font: 700 20px ui-monospace, SFMono-Regular, Menlo, monospace; }
.guide-table th code { white-space: normal; }
@media (max-width: 600px) {
  .guide-table { min-width: 0; }
  .guide-table thead { display: none; }
  .guide-table tr { display: block; padding: 14px 16px; border-top: 1px solid var(--line); }
  .guide-table tbody tr:first-child { border-top: 0; }
  .guide-table th, .guide-table td { display: block; padding: 0; border: 0; position: static; }
  .guide-table td { margin-top: 6px; }
  .guide-example::before { content: attr(data-label); }
  .guide-none { display: none !important; }
}
.guide-text { max-width: 720px; margin: 0 0 14px; font-size: 15px; line-height: 1.9; }
.guide-list { max-width: 720px; margin: 0; padding-left: 22px; font-size: 15px; line-height: 1.9; }
.guide-list li + li { margin-top: 6px; }
.guide-sub { margin: 28px 0 12px; font-size: 16px; }
@media (max-width: 600px) {
  .guide-first { min-width: 0; }
  .guide-first thead { display: none; }
  .guide-first tr { display: block; padding: 14px 16px; border-top: 1px solid var(--line); }
  .guide-first tbody tr:first-child { border-top: 0; }
  .guide-first th, .guide-first td { display: inline-block; padding: 0; border: 0; position: static; text-align: left; }
  .guide-first th { display: block; margin-bottom: 4px; font-weight: 700; }
  .guide-first td:nth-child(2) { display: block; }
  .guide-first td.num { margin: 8px 16px 0 0; color: var(--muted); font-size: 13px; }
  .guide-first td.num::before { content: attr(data-label); }
}
