/* horizontal.one/cases: 智能体案例库 · Agent Cases (tools/cases/build.mjs makes the pages). On top of site.css: its tokens,
   type scale, spacing steps and easing. The chips say what they mean in words; their colour only repeats it: verified in
   the live green, a screenshot in the amber, an estimate in the logo's blue, a bare claim in grey. */
.cases-site main { padding-top: 112px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.links a.lang { color: var(--text); background: var(--raised); border: 1px solid var(--line); font-weight: 600; }
.links a.lang:hover { background: var(--hover); }

/* ---------------------------------------------------------------- the list */
.cases-head { padding: 32px 0; }
.cases-head .wrap { display: grid; gap: 16px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0.02em; }
.cases-head h1 { font-size: 48px; line-height: 56px; }
.lede { margin: 0; max-width: 40em; color: var(--muted); font-size: 18px; line-height: 32px; }
.head-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--faint); font-size: 14px; line-height: 20px; }
.head-meta a { color: var(--muted); text-underline-offset: 4px; }
.head-meta a:hover { color: var(--text); }
.cases-body { padding: 16px 0 64px; }

.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 16px; }
.filters[hidden] { display: none; }
.f-types { display: flex; flex-wrap: wrap; gap: 8px; }
.f-chip { font: inherit; font-size: 14px; line-height: 20px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: background-color 300ms var(--ease), color 300ms var(--ease); }
.f-chip:hover { color: var(--text); background: var(--raised); }
.f-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.f-field { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; line-height: 20px; }
.f-field select, .f-field input { font: inherit; font-size: 14px; line-height: 20px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.f-search { flex: 1 1 240px; }
.f-search input { width: 100%; }
.f-count { margin: 0 0 16px; color: var(--faint); font-size: 14px; line-height: 20px; }
.f-none { margin: 24px 0 0; color: var(--muted); }

.case-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.case[hidden] { display: none; }
.case-link { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: background-color 300ms var(--ease), border-color 300ms var(--ease); }
.case-link:hover { background: var(--raised); border-color: #5a5a5a; }
.case-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 20px 24px 24px; }

/* the picture on top of a card (.case-media, .play) and the chips are in site.css: the home page shows them too */
.case-link:hover .case-media img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .case-media img { transition: none; } .case-link:hover .case-media img { transform: none; } }
.case-link h2 { font-size: 20px; line-height: 28px; }
.case-link p { margin: 0; color: var(--muted); font-size: 15px; line-height: 26px; }
.case-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.case-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.money { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.tools { color: var(--faint); }

.rep-high { color: var(--live); border-color: rgb(111 211 154 / 0.5); }
.rep-medium { color: var(--accent); border-color: rgb(242 180 90 / 0.5); }

/* ---------------------------------------------------------------- a case, and the method page */
.wrap.narrow { width: min(760px, 100% - 32px); }
.case-page .wrap { display: grid; gap: 24px; padding: 32px 0 64px; }
.crumbs a { color: var(--muted); font-size: 14px; line-height: 20px; text-decoration: none; }
.crumbs a::before { content: "‹ "; }
.crumbs a:hover { color: var(--text); }
.case-page h1 { font-size: 36px; line-height: 44px; }
.case-page h2 { font-size: 24px; line-height: 32px; }
.case-page section { display: grid; gap: 12px; }
.case-page p { margin: 0; line-height: 30px; }
.case-page .lede { line-height: 32px; }
.figure { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.money.big { font-size: 40px; line-height: 48px; font-weight: 700; }
.figure-meta { display: grid; gap: 4px; color: var(--muted); font-size: 14px; line-height: 24px; }
.facts { display: grid; margin: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 10em minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--faint); font-size: 14px; line-height: 28px; }
.facts dd { margin: 0; line-height: 28px; }
.facts dd a, .sources a { color: var(--text); text-underline-offset: 4px; }
.defs > div { grid-template-columns: 9em minmax(0, 1fr); }
@media (max-width: 560px) { .facts > div, .defs > div { grid-template-columns: 1fr; gap: 4px; } .cases-head h1 { font-size: 36px; line-height: 44px; } }
.case-steps { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; line-height: 28px; }
.repro .chip { margin-right: 8px; }
.sources { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; line-height: 26px; }
.sources span { color: var(--faint); font-size: 14px; }
.note { padding: 16px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 14px; }
.case-page .note { line-height: 24px; }
.related .case-list { grid-template-columns: 1fr; }

/* a case's picture, and the ways out to the product and its video */
.shot { margin: 0; display: grid; gap: 8px; }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); }
.shot.app { justify-items: center; padding: 24px 0 0; border-radius: 16px; background: radial-gradient(120% 90% at 50% 100%, #3a3a3a, #232323); border: 1px solid var(--line); overflow: hidden; }
.shot.app img { width: auto; max-width: 100%; max-height: 520px; border: 0; border-radius: 0; background: none; }
.shot.app figcaption { justify-self: stretch; padding: 8px 16px 12px; background: var(--surface); }
.shot figcaption { color: var(--faint); font-size: 13px; line-height: 20px; }
.case-links { display: flex; flex-wrap: wrap; gap: 8px; }
