/* STORY-023 library pages. Tokens and base styles mirror the /learn/ guides
   (landing/learn/learn.css) and landing/index.html; this page loads no app CSS. */
:root {
  --bg: #000;
  --panel: #0b0b0d;
  --line: rgba(255,255,255,0.08);
  --text: #f5f5f4;
  --muted: #a1a1aa;
  --gold: #FCA311;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 17px/1.7 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--gold); }
.wrap { max-width: 860px; margin: 0 auto; padding: 32px 16px 72px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); display: inline-block; padding: 10px 0; }
h1 { font-size: clamp(28px, 5.5vw, 40px); line-height: 1.15; margin: 32px 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 23px; line-height: 1.3; margin: 44px 0 12px; letter-spacing: -0.01em; }
p, li { color: var(--muted); }
p + p { margin-top: 14px; }
.lede { color: var(--text); font-size: 19px; }

/* Same shape as the landing .btn-light / learn .cta a. */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; background: var(--text); color: #000; font-weight: 600; text-decoration: none; padding: 12px 22px; border-radius: 999px; }
.btn-quiet { background: transparent; color: var(--text); border: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { font-size: 13px; line-height: 1; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }

.hero { display: grid; gap: 20px; }
.hero img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); display: block; }
@media (min-width: 760px) { .hero { grid-template-columns: 1.1fr 1fr; align-items: center; } .hero h1 { margin-top: 0; } }

.words { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.words li { color: var(--text); font-weight: 600; padding: 6px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }

.sentences { list-style: none; margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.sentences li + li { border-top: 1px solid var(--line); }
.sentences a { display: flex; gap: 14px; padding: 12px 16px; min-height: 48px; color: var(--text); text-decoration: none; }
.sentences a:hover { background: rgba(255,255,255,0.04); }
.ts { flex: none; width: 48px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; padding-top: 2px; }

.cards { list-style: none; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 16px; }
.card { padding: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.card[hidden] { display: none; }
.card a { display: block; color: var(--text); text-decoration: none; }
.card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #111; }
.card-title { display: block; padding: 12px 14px 0; font-weight: 600; line-height: 1.35; }
.card .chips { padding: 0 14px; }
.card .chip { font-size: 12px; padding: 6px 9px; }

.pick { margin-top: 28px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); display: grid; gap: 16px; }
.pick img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; display: block; }
.pick-label { color: var(--gold); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.pick-title { color: var(--text); font-size: 20px; font-weight: 700; line-height: 1.3; margin-top: 4px; }
@media (min-width: 760px) { .pick { grid-template-columns: 300px 1fr; align-items: center; } }

.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.filters label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.filters select { min-height: 44px; min-width: 150px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 15px; }
.count { margin-top: 16px; font-size: 14px; }

.note { font-size: 14px; margin-top: 36px; }
footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
footer a { color: var(--muted); display: inline-block; padding: 10px 0; }
footer p { flex-basis: 100%; font-size: 13px; }
