/* Copyright (c) 2026 alfu32. All rights reserved. See LICENSE in the repository root. */
/* Ascension public site: navy and brass, light and dark, no web fonts. */
:root {
  --bg: #f4f1e8;
  --surface: #fffdf7;
  --ink: #172033;
  --muted: #586174;
  --line: #ddd4c0;
  --brass: #8f6a1f;
  --brass-soft: #f1e6cb;
  --navy: #14213d;
  --navy-ink: #f2ead8;
  --navy-brass: #d8b25e;
  --code-bg: #efe9da;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 4px 16px rgba(20, 33, 61, .06);
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #121b2f; --ink: #e8e3d5; --muted: #a2a9b7; --line: #263249;
    --brass: #d6ad55; --brass-soft: #2a2414; --navy: #0e1729; --navy-ink: #efe7d3;
    --navy-brass: #d6ad55; --code-bg: #182339; --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #121b2f; --ink: #e8e3d5; --muted: #a2a9b7; --line: #263249;
  --brass: #d6ad55; --brass-soft: #2a2414; --navy: #0e1729; --navy-ink: #efe7d3;
  --navy-brass: #d6ad55; --code-bg: #182339; --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--brass); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 6px 12px; z-index: 10; }
.skip:focus { left: 16px; }

/* Header and footer */
.bar { max-width: 1180px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.site-head { background: var(--navy); color: var(--navy-ink); border-bottom: 2px solid var(--navy-brass); position: sticky; top: 0; z-index: 5; }
.site-head .bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy-ink); text-decoration: none; }
.brand img { display: block; width: 40px; height: 40px; }
.brand span { font-family: var(--display); font-size: 22px; line-height: 1.05; letter-spacing: .02em; }
.brand small { display: block; font-family: var(--body); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--navy-brass); }
.site-head nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 4px; }
.site-head nav a { color: var(--navy-ink); text-decoration: none; font-size: 15px; padding: 6px 10px; border-radius: 6px; }
.site-head nav a:hover { background: rgba(255, 255, 255, .08); }
.site-head nav a[aria-current="page"] { color: var(--navy-brass); box-shadow: inset 0 -2px 0 var(--navy-brass); border-radius: 0; }
@media (max-width: 640px) {
  html { scroll-padding-top: 130px; }
  .site-head { position: static; }
  .site-head nav { width: 100%; }
  .site-head nav a { padding: 4px 8px; font-size: 14px; }
}
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; margin-top: 56px; }
.site-foot .bar { padding-block: 20px 32px; }
.site-foot p { margin: 4px 0; }

/* Page body */
main { max-width: 1180px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-left, 0px)) 0; }
main.prose { max-width: 860px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(32px, 5.5vw, 48px); margin: .2em 0 .4em; }
h2 { font-size: clamp(24px, 3.6vw, 30px); margin: 1.6em 0 .5em; }
h3 { font-size: 21px; margin: 1.4em 0 .4em; }
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); font-weight: 600; margin: 0; }
.lead { font-size: 18px; color: var(--muted); max-width: 66ch; }
.lead p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); padding: .1em .35em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
pre code { background: none; padding: 0; font-size: 1em; }
hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
blockquote { margin: 1em 0; padding: .2em 1.1em; border-left: 3px solid var(--brass); color: var(--muted); }

/* Rendered Markdown (home, privacy) */
.md p[align="center"], .md h1[align="center"] { text-align: center; }
.md > p:first-child img { width: 128px; }
.md table { border-collapse: collapse; width: 100%; font-size: 15px; }
.md th, .md td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.md th { font-size: 13px; color: var(--muted); font-weight: 600; }
.md td[align="center"] { text-align: center; color: var(--muted); font-size: 14px; border-bottom: none; padding-top: 0; }
.md table:has(img) { table-layout: fixed; margin: 1em 0 1.5em; }
.md table:has(img) td { border-bottom: none; padding: 4px; }
.md td img { display: block; width: 100%; border-radius: 6px; }
.md p > img { border-radius: 8px; }
.table-scroll { overflow-x: auto; margin: 1em 0; }
.table-scroll table { margin: 0; }
.md .table-scroll:has(img) { overflow: visible; }

/* Players: the main title and each age's main theme */
.player { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.player .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.player audio { width: 100%; }

/* Catalogue: the model review page's layout (task 136) — an overview first, then one chapter
   per age with its story and theme, then one wide card per model, picture left, facts and
   sounds right. */
main.catalogue { display: grid; gap: 28px; }
.intro { display: grid; gap: 12px; }
.intro h1, .intro .lead { margin: 0; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.jump a { display: inline-flex; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: .02em; padding: 3px 10px; border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--brass-soft); border: 1px solid transparent; }
.jump a:hover { border-color: var(--brass); }
.jump .num { color: var(--brass); }
.jump .n { color: var(--muted); font-weight: 400; font-size: 12px; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.how div { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.how strong { color: var(--ink); display: block; font-weight: 600; margin-bottom: 2px; }
.chapter { display: grid; gap: 18px; padding-top: 10px; border-top: 2px solid var(--brass); }
.chapter-head { display: grid; gap: 12px; }
.chapter-head h2 { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.chapter-head .num { font-size: .8em; color: var(--brass); min-width: 1.2em; }
.chapter-head .era { flex-basis: 100%; font-size: .6em; color: var(--muted); font-style: italic; }
.chapter-head .lead { margin: 0; font-size: 16px; }
.tale { font-family: var(--display); font-size: 19px; line-height: 1.55; font-style: italic; margin: 0; padding: 0 0 0 18px; border-left: 3px solid var(--brass); color: var(--ink); max-width: 72ch; }
.tale p { margin: 0; }
.chapter-head .player { max-width: 560px; }
.kind { margin: 6px 0 -6px; font-size: 20px; display: flex; align-items: baseline; gap: 10px; }
.kind small { font-family: var(--body); font-size: 13px; color: var(--muted); font-weight: 400; }
.models { display: grid; gap: 22px; }
.model { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; box-shadow: var(--shadow); }
.model:target { outline: 2px solid var(--brass); outline-offset: 2px; }
@media (max-width: 860px) { .model { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 14px; } }
.model .pic { display: block; min-width: 0; align-self: start; }
.model .pic img { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--line); background: var(--line); }
.side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.side h4 { font-family: var(--display); font-weight: 500; font-size: 26px; line-height: 1.15; margin: 0; text-wrap: balance; }
.side dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.side dt { color: var(--muted); }
.side dd { margin: 0; font-variant-numeric: tabular-nums; }
.snd-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; gap: 8px; }
.snd-box .label { font-size: 13px; font-weight: 600; }
.plays { display: flex; flex-wrap: wrap; gap: 6px; }
.play { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.play::before { content: "\25B6\FE0E"; font-size: 10px; margin-right: 6px; color: var(--brass); }
.play:hover { border-color: var(--brass); }
.play[aria-pressed="true"] { background: var(--brass-soft); border-color: var(--brass); }
.play[aria-pressed="true"]::before { content: "\25A0\FE0E"; }
.play .x { color: var(--muted); font-size: 12px; margin-left: 4px; }
.lib { display: grid; gap: 14px; }
.lib-group { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.lib-group h3 { margin: 0; font-size: 20px; }
.nojs { color: var(--muted); }
.js .nojs { display: none; }
