/* horizontal.one/builds: 新模型作品追踪 · New Model Builds (tools/builds/build.mjs makes the pages). On top of site.css and
   cases.css: their tokens, type scale, spacing steps, cards and chips. A model's colour only repeats its name: Fable in
   the accent amber, GPT in the sky blue. */
.chip.m-chip.m-fable { color: var(--accent); border-color: rgb(242 180 90 / 0.5); }
.chip.m-chip.m-gpt { color: var(--sky); border-color: rgb(124 196 255 / 0.5); }
.chip.k-chip { color: var(--soft); }
.chip.off { color: var(--text); background: var(--raised); border-color: var(--raised); }
.chip.ran { color: var(--live); border-color: rgb(111 211 154 / 0.5); }
.chip.broke { color: #ffb4a8; border-color: rgb(255 180 168 / 0.5); }

/* ---------------------------------------------------------------- the models */
.b-models { padding: 8px 0 24px; }
.m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.m-panel { display: grid; align-content: start; gap: 12px; padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.m-top { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--faint); font-size: 14px; line-height: 20px; }
.m-panel h2 { font-size: 24px; line-height: 32px; }
.m-said { margin: 0; color: var(--soft); text-wrap: pretty; }
.m-facts { margin: 0; display: grid; gap: 8px; }
.m-facts div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; font-size: 14px; line-height: 20px; }
.m-facts dt { color: var(--faint); }
.m-facts dd { margin: 0; color: var(--soft); }
.m-facts code { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; line-height: 20px; padding: 2px 8px; border-radius: 8px; background: var(--raised); color: var(--text); }
.m-foot { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; font-size: 14px; line-height: 20px; }
.m-foot a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-underline-offset: 4px; transition: color 300ms var(--ease); }
.m-foot a:hover { color: var(--text); }
.m-foot .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- the filters */
.b-filters { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-bottom: 16px; }
.b-filters[hidden] { display: none; }
.b-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.b-label { color: var(--faint); font-size: 14px; line-height: 20px; margin-right: 4px; }
.b-toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; line-height: 20px; cursor: pointer; }
.b-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.f-chip:focus-visible, .b-toggle input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- the builds */
.b-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.build[hidden] { display: none; }
.b-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color 300ms var(--ease); }
.b-card:hover { border-color: #5a5a5a; }
.b-card a.case-media:hover img { transform: scale(1.03); }
.case-media.ph { display: grid; place-items: center; }
.case-media .ph .icon, .case-media.ph .icon { width: 48px; height: 48px; color: var(--faint); }
.b-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 24px; }
.b-body h2 { font-size: 20px; line-height: 28px; }
.b-body p { margin: 0; }
.b-by { color: var(--faint); font-size: 14px; line-height: 20px; }
.b-by a { color: var(--muted); text-underline-offset: 4px; }
.b-by a:hover { color: var(--text); }
.b-what { color: var(--soft); text-wrap: pretty; }
.b-how { color: var(--muted); font-size: 14px; line-height: 24px; text-wrap: pretty; }
.b-how b { color: var(--soft); font-weight: 600; }
.b-how .who { color: var(--faint); }
.b-how.none { color: var(--faint); }
.b-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto !important; padding-top: 4px; }
.b-links .btn { min-height: 40px; font-size: 14px; line-height: 20px; }
.b-links .btn .icon { width: 16px; height: 16px; }
.b-links .btn:hover .icon { transform: none; }
.b-src { padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.b-src summary { width: fit-content; cursor: pointer; color: var(--muted); transition: color 300ms var(--ease); }
.b-src summary:hover { color: var(--text); }
.b-src summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.b-src ol { margin: 8px 0 0; padding-left: 1.2em; display: grid; gap: 8px; }
.b-src a { color: var(--text); text-underline-offset: 4px; }
.b-src li span { display: block; color: var(--faint); font-size: 12px; line-height: 16px; }
.b-empty { display: grid; justify-items: center; gap: 12px; padding: 64px 24px; border-radius: 16px; background: var(--surface); border: 1px dashed var(--line); color: var(--muted); text-align: center; }
.b-empty .icon { width: 48px; height: 48px; color: var(--faint); }
.b-empty p { margin: 0; max-width: 32em; }

/* ---------------------------------------------------------------- make one, and what we list */
.b-cta { padding: 0 0 48px; }
.b-cta-box { display: grid; justify-items: start; gap: 12px; padding: 32px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.b-cta-box h2 { font-size: 24px; line-height: 32px; }
.b-cta-box p { margin: 0 0 4px; max-width: 40em; color: var(--muted); text-wrap: pretty; }
.b-method { padding: 0 0 64px; }
.b-method h2 { font-size: 24px; line-height: 32px; margin-bottom: 16px; }
.b-method dl { margin: 0; display: grid; gap: 12px; max-width: 880px; }
.b-method dl div { display: grid; grid-template-columns: 128px 1fr; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.b-method dt { font-weight: 600; }
.b-method dd { margin: 0; color: var(--muted); text-wrap: pretty; }
.b-suggest { margin: 24px 0 0; color: var(--muted); }
.b-suggest a { color: var(--text); text-underline-offset: 4px; }

/* the list's names lead to their pages */
.b-body h2 a { color: inherit; text-decoration: none; }
.b-body h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.b-body h2 a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
/* (Chinese headings break at spaces and punctuation, not in the middle of a word; a run too long for the line still wraps) */
html[lang="zh-CN"] .bd-head h1, html[lang="zh-CN"] .b-body h2 { word-break: keep-all; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- a build's page */
.bd-wrap { width: min(880px, 100% - 32px); }
.bd .bd-wrap { display: grid; gap: 32px; padding: 32px 0 48px; }
.bd-head { display: grid; gap: 16px; }
.bd-head h1 { font-size: 48px; line-height: 56px; letter-spacing: -0.02em; }
.bd-head .lede { color: var(--soft); }
.bd-shot { aspect-ratio: 16 / 9; border-radius: 16px; border: 1px solid var(--line); }
.bd-shot:hover img { transform: scale(1.02); }
.bd-shot.ph .icon { width: 64px; height: 64px; color: var(--faint); }
.bd-sec { display: grid; gap: 12px; }
.bd-sec h2 { font-size: 24px; line-height: 32px; }
.bd-sec > p { margin: 0; color: var(--soft); text-wrap: pretty; }
.bd-sec > p.bd-who { color: var(--faint); font-size: 14px; line-height: 20px; }
.bd-facts { margin: 0; display: grid; }
.bd-facts div { display: grid; grid-template-columns: 128px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.bd-facts dt { color: var(--faint); }
.bd-facts dd { margin: 0; color: var(--soft); }
.bd-facts a, .bd-src a { color: var(--text); text-underline-offset: 4px; }
.bd-src { margin: 0; padding-left: 1.2em; display: grid; gap: 12px; }
.bd-src span { display: block; color: var(--faint); font-size: 14px; line-height: 20px; }
.bd-rel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.bd-rel-list a { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color 300ms var(--ease); }
.bd-rel-list a:hover { border-color: #5a5a5a; }
.bd-rel-list a:hover .case-media img { transform: scale(1.03); }
.bd-rel-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bd-rel-body { display: grid; gap: 4px; padding: 16px; }
.bd-rel-body b { font-size: 16px; line-height: 24px; font-weight: 600; }
.bd-rel-body small { color: var(--muted); font-size: 14px; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bd-all { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; line-height: 20px; text-underline-offset: 4px; transition: color 300ms var(--ease); }
.bd-all:hover { color: var(--text); }
.bd-all .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 640px) {
  .m-panel, .b-body { padding: 16px; }
  .b-cta-box { padding: 24px 16px; }
  .b-method dl div { grid-template-columns: 1fr; gap: 4px; }
  .m-facts div { grid-template-columns: 80px 1fr; }
  .bd-head h1 { font-size: 36px; line-height: 40px; }
  .bd-facts div { grid-template-columns: 96px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .b-card a.case-media:hover img { transform: none; }
}
@media (max-width: 640px) { .builds-site h1 br { display: none; } }   /* (the line break is for wide screens: on a phone the heading wraps on its own) */
