/* Text pages (about, contact, privacy, terms, articles). Loaded after styles.css. */

.page { max-width: 760px; margin: 0 auto; padding: 88px var(--gutter) 0; }
.page h1 { font-size: clamp(38px, 5.6vw, 64px); font-weight: 600; }
.page .lede { max-width: none; margin: 22px 0 8px; }
.page .updated { margin: 18px 0 8px; color: var(--muted); font: 13px var(--mono); }

.prose { color: #c9d1db; font-size: 17px; line-height: 1.7; }
.prose h2 { margin: 56px 0 14px; color: var(--text); font-size: 28px; font-weight: 600; }
.prose h3 { margin: 32px 0 10px; color: var(--text); font-size: 20px; font-weight: 600; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(51, 204, 255, 0.4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { color: var(--text); font-weight: 600; }
.prose figure { margin: 32px 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); text-align: center; }
.prose figure svg { width: min(240px, 100%); height: auto; }
.prose figcaption { margin-top: 14px; color: var(--muted); font-size: 14px; }
.prose .card { margin: 28px 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.prose .card p:last-child { margin-bottom: 0; }

.page-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 48px 0 0; }
.page-cta a { text-decoration: none; }

/* Generated pages (tools/pages.mjs): gallery rows and their index, Learn articles and their index. */

.page-wide { max-width: 1160px; }
.page-wide .lede, .page-wide .prose, .page-wide .related, .page-wide .sources { max-width: 760px; }
.crumbs { display: flex; gap: 10px; margin-bottom: 18px; color: var(--muted); font: 13px var(--mono); }
.crumbs a { color: var(--accent); }

.row-presets { margin: 40px 0 8px; }
.set-name { margin: 40px 0 16px; font-size: 22px; font-weight: 600; }
.set-name span { color: var(--muted); font: 13px var(--mono); }
.row-presets .set-name:first-child { margin-top: 0; }
.row-presets .card-art { display: block; }
.row-presets .card-actions a { text-decoration: none; }

.related { margin: 48px 0 0; }
.related h2 { margin-bottom: 14px; font-size: 22px; font-weight: 600; }
.related ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.related li { padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.related a { color: var(--accent); font-weight: 600; }
.related span { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin: 48px 0 0; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; }
.pager a:last-child { text-align: right; }
.pager a:hover { border-color: var(--accent); }
.pager span { color: var(--muted); font: 12px var(--mono); }

.row-index-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 40px 0 0; padding: 0; list-style: none; }
.row-index-list a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); transition: border-color 0.2s; }
.row-index-list a:hover { border-color: var(--accent); }
.ri-name { font-size: 19px; font-weight: 600; }
.ri-blurb { flex: 1; color: var(--muted); font-size: 14px; line-height: 1.45; }
.ri-count { color: var(--muted); font: 12px var(--mono); }

.learn-topics { margin: 36px calc(-1 * var(--gutter)) 0; }
.learn-topics[hidden] { display: none; }
.learn-featured, .learn-group { margin: 44px 0 0; }
.learn-featured[hidden], .learn-group[hidden] { display: none; }

@media (max-width: 640px) {
  /* The header is in the flow (sticky), so on a phone the page starts just below it, not a header's height further. */
  .page { padding-top: 24px; }
  .row-presets .card-body p { display: block; font-size: 13px; }
  .pager a { flex: 1; }
}

.sources { margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.sources h2 { margin-bottom: 12px; font-size: 18px; font-weight: 600; }
.sources ol { margin: 0; padding-left: 22px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.sources li { margin-bottom: 8px; overflow-wrap: anywhere; }
.sources a { color: var(--accent); }

/* A scene's own page (/i/<id>) */

.scene-page h1 { font-size: clamp(34px, 5vw, 56px); }
.scene-page .art { margin: 20px 0 0; aspect-ratio: 1; max-height: min(78vh, 760px); width: 100%; max-width: 860px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #000; }
.scene-page .art canvas { display: block; width: 100%; height: 100%; }
.scene-page .blurb { max-width: 640px; margin: 18px 0 0; font-size: 18px; }
.scene-page .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.scene-page .actions a { text-decoration: none; }
.scene-page .actions + .fine { margin-top: 10px; }
.scene-page .about-row { max-width: 860px; margin-top: 32px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.scene-page .about-row p:not(.eyebrow) { max-width: 640px; margin: 8px 0 12px; color: var(--muted); }
.scene-page .about-row a { color: var(--accent); }
.scene-page .row-presets { margin-top: 48px; }
.scene-page .row-presets .card { color: var(--text); text-decoration: none; }
.scene-page .row-presets .card:hover h3 { color: var(--accent); }
.row-presets h3 a { color: inherit; text-decoration: none; }

/* Today's Daily (js/today.js), on scene pages and Learn articles. */
.today-card { margin: 40px 0 0; }
.today-card[hidden] { display: none; }
.today-card a { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 12px 18px 12px 12px; border: 1px solid rgba(51, 204, 255, 0.35); border-radius: var(--radius); background: linear-gradient(180deg, rgba(51, 204, 255, 0.06), var(--panel) 70%); color: var(--text); text-decoration: none; transition: border-color 0.2s; }
.today-card a:hover { border-color: var(--accent); }
.today-card-art { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #000; }
.today-card-art canvas { display: block; width: 100%; height: 100%; }
.today-card-text { display: grid; gap: 4px; }
.today-card-text .eyebrow { margin: 0; }
.today-card-text b { font-size: 22px; font-weight: 600; }
.today-card-text > span:last-child { color: var(--muted); font-size: 14px; }
@media (max-width: 560px) {
  .today-card a { grid-template-columns: 88px minmax(0, 1fr); }
  .today-card .btn { grid-column: 1 / -1; justify-content: center; }
}
