/* ==========================================================================
   A'Erth · Crimson Twilight
   Codex chrome + page treatments for the therolles-aerth child theme.
   Approved direction pass 01. Ships items 1 to 11, 13, 15, 16, 18 of the
   punch list. Items 12 (kind glyph sprite) and 14 (alphabetical section
   rules) are deferred and intentionally absent.

   Load order: after Kadence, before nothing. Enqueue with the Google
   Fonts handle as a dependency (see hooks-and-templates.md).

   SELECTOR NOTE: class names below follow the mockups and the brief's
   description of production markup. Where a selector does not exist on the
   live pages, map it to the real one; nothing here relies on markup that
   the punch list did not already call out.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1 · Tokens
   Existing values unchanged. Two additions, both approved: --ash and
   --vellum, used only on Where We Are, the conjunction callout, and the GM
   aside. Canvas stays #0e0e0f.
   -------------------------------------------------------------------------- */
body.aerth-context {
  --bg:       #0e0e0f;
  --panel:    #17181a;
  --panel-2:  #1e2023;
  --border:   #2d2f33;
  --text:     #e4e4e7;
  --muted:    #8b8d92;
  --red:      #c53131;
  --red-hi:   #e84545;
  --gold:     #dda15e;

  /* new, approved */
  --ash:      #241b18;   /* warm callout ground */
  --ash-line: #3f2f26;   /* its border */
  --vellum:   #e8dcc0;   /* quoted lore text, never a page background */
  --vellum-2: #f0e6d2;   /* body text on ash */
  --vellum-3: #a0876a;   /* meta text on ash */
  --tarnish:  #6b5a3e;   /* dividers, hover borders, corner flourishes */

  /* type */
  --font-mark:    'IM Fell English SC', Georgia, serif;
  --font-display: 'Marcellus', Georgia, serif;
  --font-caps:    'Marcellus SC', Georgia, serif;
  --font-body:    'Cardo', Georgia, serif;
  --font-label:   'Alegreya Sans SC', system-ui, -apple-system, sans-serif;

  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   2 · Type stack (punch list 01)
   Replaces Roboto Slab headings and system Roboto body across /aerth/*.
   Body minimum 17px so Cardo stays legible on a phone.
   -------------------------------------------------------------------------- */
body.aerth-context h1,
body.aerth-context h2,
body.aerth-context h3,
body.aerth-context h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text);
}
body.aerth-context .aerth-page-title,
body.aerth-context .aerth-section-title,
body.aerth-context .aerth-card-title {
  font-family: var(--font-caps);
  letter-spacing: 0.03em;
}
body.aerth-context p,
body.aerth-context li,
body.aerth-context td { font-family: var(--font-body); }
body.aerth-context strong { font-weight: 700; color: var(--text); }

/* eyebrows, nav, kind badges, meta */
body.aerth-context .aerth-eyebrow,
body.aerth-context .aerth-kind,
body.aerth-context .aerth-meta,
body.aerth-context .aerth-nav a,
body.aerth-context .aerth-header-auth {
  font-family: var(--font-label);
}
body.aerth-context .aerth-eyebrow {
  font-size: 15px;
  letter-spacing: 0.26em;
  text-transform: none;      /* the face is already small caps */
  color: var(--gold);
  margin: 0 0 8px;
}
body.aerth-context .aerth-kind { font-size: 13px; letter-spacing: 0.14em; }
body.aerth-context .aerth-meta { font-size: 14px; letter-spacing: 0.14em; color: #5d5f64; }

body.aerth-context a { color: var(--gold); text-decoration: none; }
body.aerth-context a:hover,
body.aerth-context a:focus-visible { color: var(--red-hi); }
body.aerth-context :focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   3 · Codex header (punch list 02, 03, 11)
   Was a flat black banner with a 1px bottom border. Now two radial glows, a
   1px grain, a gold diamond flourish rule, and a gradient tarnish divider.
   -------------------------------------------------------------------------- */
.aerth-header {
  position: relative;
  overflow: hidden;
  background: #0b0b0c;
  border-bottom: 0;
  padding: 0 0 0;
  text-align: center;
}
.aerth-header::before,
.aerth-header::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.aerth-header::before {
  background:
    radial-gradient(120% 95% at 50% -12%, rgba(197,49,49,0.17) 0%, rgba(197,49,49,0.04) 40%, rgba(0,0,0,0) 72%),
    radial-gradient(90% 70% at 50% 125%, rgba(221,161,94,0.07) 0%, rgba(0,0,0,0) 65%);
}
/* parchment grain: two 1px repeating gradients, no image request */
.aerth-header::after {
  opacity: 0.55;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.016) 0 1px, rgba(0,0,0,0) 1px 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.15) 0 1px, rgba(0,0,0,0) 1px 4px);
}
.aerth-header > * { position: relative; z-index: 1; }

/* gradient tarnish divider replaces the hairline bottom border */
.aerth-header {
  border-image: linear-gradient(90deg,
    rgba(45,47,51,0) 0%, #3a3c41 18%, var(--tarnish) 50%, #3a3c41 82%, rgba(45,47,51,0) 100%) 1;
  border-bottom: 1px solid transparent;
  border-bottom-style: solid;
}

.aerth-header-auth {
  display: flex; justify-content: flex-end; align-items: center; gap: 14px;
  max-width: 1180px; margin: 0 auto; padding: 22px 28px 0;
}
.aerth-header-auth .auth-user { font-size: 14px; letter-spacing: 0.06em; color: var(--muted); }
.aerth-header-auth .auth-link {
  font-size: 13px; letter-spacing: 0.2em; color: var(--gold);
  padding: 6px 15px; border: 1px solid #34363b; border-radius: 2px;
  background: linear-gradient(180deg, rgba(221,161,94,0.08), rgba(0,0,0,0));
  transition: color .15s, border-color .15s;
}
.aerth-header-auth .auth-link:hover { color: var(--red-hi); border-color: #5a4a34; }

/* flourish rule · punch list 11, template part adds .aerth-flourish */
.aerth-flourish {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 22px 0 18px;
}
.aerth-flourish span:first-child,
.aerth-flourish span:last-child { width: 100px; height: 1px; }
.aerth-flourish span:first-child { background: linear-gradient(90deg, rgba(221,161,94,0) 0%, rgba(221,161,94,0.5) 100%); }
.aerth-flourish span:last-child  { background: linear-gradient(90deg, rgba(221,161,94,0.5) 0%, rgba(221,161,94,0) 100%); }
.aerth-flourish .diamond { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); opacity: 0.85; }

.aerth-wordmark {
  font-family: var(--font-mark);
  font-size: clamp(38px, 6.4vw, 74px);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
  margin: 0;
}
.aerth-wordmark a {
  color: var(--red-hi);
  text-shadow: 0 0 44px rgba(197,49,49,0.34), 0 2px 0 rgba(0,0,0,0.7);
}
.aerth-subtitle {
  font-family: var(--font-label);
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin: 12px 0 0;
  text-transform: none;
}
.aerth-subtitle::before, .aerth-subtitle::after {
  content: '·'; font-style: normal; opacity: 0.6; margin: 0 0.7em;
}

/* nav becomes underline tabs · punch list 03 */
.aerth-nav {
  margin-top: 22px;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg,
    rgba(45,47,51,0) 0%, var(--border) 14%, var(--border) 86%, rgba(45,47,51,0) 100%) 1;
  padding: 0;
}
.aerth-nav .aerth-nav-menu {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
}
.aerth-nav .aerth-nav-menu li { padding: 0; }
.aerth-nav .aerth-nav-menu li + li { border-left: 0; }   /* pipes removed */
.aerth-nav .aerth-nav-menu a {
  display: block;
  font-size: 15px; letter-spacing: 0.2em;
  color: var(--muted);
  padding: 13px 22px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.aerth-nav .aerth-nav-menu a:hover { color: var(--text); border-bottom-color: #4a3a28; }
.aerth-nav .aerth-nav-menu .current-menu-item a,
.aerth-nav .aerth-nav-menu a[aria-current="page"] {
  color: var(--gold); border-bottom-color: var(--red);
}

/* --------------------------------------------------------------------------
   4 · Shell + welcome bar
   -------------------------------------------------------------------------- */
.aerth-container { max-width: 1180px; margin: 0 auto; padding: 0 28px 90px; }
.aerth-container--wide { max-width: 1240px; }

.aerth-welcome {
  text-align: center;
  padding: 42px 0 30px;
  border-bottom: 1px solid #1e2023;
  margin-bottom: 32px;
}
.aerth-welcome-name {
  font-family: var(--font-caps);
  font-size: clamp(30px, 4vw, 40px);
  letter-spacing: 0.03em;
  margin: 0;
}
.aerth-welcome-date {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  margin: 12px 0 0;
}

/* --------------------------------------------------------------------------
   5 · Vellum callout · Where We Are, GM aside (punch list 07)
   Ash brown ground, gold gradient spine, ruled grain, ::first-letter drop
   cap so GM block content needs no editing.
   -------------------------------------------------------------------------- */
.aerth-callout {
  position: relative;
  background: var(--ash);
  border: 1px solid var(--ash-line);
  border-radius: 3px;
  padding: 30px 32px 28px;
  margin-bottom: 26px;
  overflow: hidden;
}
.aerth-callout::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--tarnish) 100%);
}
.aerth-callout::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: repeating-linear-gradient(90deg, rgba(0,0,0,0.12) 0 1px, rgba(0,0,0,0) 1px 5px);
}
.aerth-callout > * { position: relative; z-index: 1; }
.aerth-callout p { font-size: 20px; line-height: 1.75; color: var(--vellum-2); max-width: 74ch; text-wrap: pretty; }
.aerth-callout .aerth-meta { color: var(--vellum-3); letter-spacing: 0.16em; }

.aerth-callout > p:first-of-type::first-letter {
  font-family: var(--font-mark);
  font-size: 64px;
  line-height: 0.82;
  color: var(--red-hi);
  float: left;
  margin: 4px 12px 0 0;
}
/* one drop cap per page, not per paragraph */
.aerth-callout > p:first-of-type ~ p::first-letter { font: inherit; float: none; margin: 0; color: inherit; }

/* --------------------------------------------------------------------------
   6 · Four Moons (punch list 08, 13, plus the orphan fix)
   Fixed track counts. auto-fit dropped the fourth moon alone onto a second
   row between roughly 780px and 1100px.
   -------------------------------------------------------------------------- */
.aerth-moons {
  position: relative;
  background: #141517;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 26px;
  padding: 30px;
}
.aerth-moons::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 120% at 50% 0%, rgba(92,127,168,0.10) 0%, rgba(0,0,0,0) 62%);
}
/* ecclesiastical rule replaces the flat 2px red top border */
.aerth-moons::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, rgba(197,49,49,0) 0%, var(--red) 28%, var(--gold) 50%, var(--red) 72%, rgba(197,49,49,0) 100%);
}
.aerth-moons > * { position: relative; z-index: 1; }

.aerth-moons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.aerth-moon {
  text-align: center;
  background: linear-gradient(180deg, var(--panel-2) 0%, #191b1d 100%);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 22px 16px 18px;
  transition: border-color .15s;
}
.aerth-moon:hover { border-color: #4d4f55; }
.aerth-moon svg { width: 122px; height: auto; }
.aerth-moon-name {
  font-family: var(--font-caps);
  font-size: 19px; letter-spacing: 0.08em;
  margin: 0 0 5px;
}
.aerth-moon-phase {
  font-family: var(--font-label);
  font-size: 14px; letter-spacing: 0.16em; color: var(--gold);
  margin: 0 0 9px;
}
.aerth-moon-detail { font-size: 16px; color: var(--muted); margin: 0; line-height: 1.6; }

/* full moon gets the colour matched halo and a lifted panel */
.aerth-moon.is-full {
  background: linear-gradient(180deg, #212630 0%, #191b1d 100%);
  border-color: #3a4553;
  box-shadow: inset 0 0 40px rgba(92,127,168,0.14);
}

/* conjunction callout tolls · punch list 08 */
.aerth-moons-callout {
  position: relative;
  margin-top: 24px;
  background: var(--ash);
  border: 1px solid var(--ash-line);
  border-left: 3px solid var(--red);
  border-radius: 0 3px 3px 0;
  padding: 18px 22px 18px 20px;
  overflow: hidden;
  display: flex; gap: 18px; align-items: flex-start;
  font-size: 18px; color: var(--text);
}
.aerth-moons-callout::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 140% at 0% 50%, rgba(197,49,49,0.22) 0%, rgba(0,0,0,0) 70%);
}
.aerth-moons-callout > * { position: relative; z-index: 1; }
.aerth-bell {
  position: relative; flex: 0 0 auto;
  width: 38px; height: 38px; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
}
.aerth-bell .bead {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 14px rgba(221,161,94,0.8);
}
.aerth-bell::before,
.aerth-bell::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid rgba(221,161,94,0.55); border-radius: 50%;
  animation: aerth-toll 3.2s ease-out infinite;
}
.aerth-bell::after { border-color: rgba(221,161,94,0.35); animation-delay: 1.6s; }
@keyframes aerth-toll {
  0%   { transform: scale(0.5); opacity: 0.55; }
  75%  { transform: scale(2.1); opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}
.aerth-moons-callout .aerth-eyebrow { letter-spacing: 0.24em; margin-bottom: 6px; }

/* --------------------------------------------------------------------------
   7 · Cards (punch list 05, 15)
   Corner flourishes are two pseudo elements carrying two borders each.
   -------------------------------------------------------------------------- */
.aerth-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);   /* four menu destinations */
  gap: 16px;
  margin-bottom: 26px;
}
.aerth-card {
  position: relative;
  display: block;
  background: linear-gradient(180deg, #191b1d 0%, #15171a 100%);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 26px 24px 22px;
  overflow: hidden;
  color: inherit;
  transition: border-color .18s, background .18s;
}
.aerth-card::before,
.aerth-card::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border-color: var(--tarnish); border-style: solid; opacity: 0.7;
  transition: border-color .18s, opacity .18s;
}
.aerth-card::before {
  top: 0; left: 0; border-width: 1px 0 0 1px;
  box-shadow: none;
}
.aerth-card::after {
  bottom: 0; right: 0; border-width: 0 1px 1px 0;
}
.aerth-card:hover { border-color: var(--tarnish); }
.aerth-card:hover::before,
.aerth-card:hover::after { border-color: var(--gold); opacity: 1; }
.aerth-card-num {
  font-family: var(--font-label);
  font-size: 14px; letter-spacing: 0.24em; color: var(--muted);
  margin: 0 0 14px;
}
.aerth-card-title {
  font-family: var(--font-caps);
  font-size: 24px; letter-spacing: 0.03em;
  margin: 0 0 8px;
}
.aerth-card:hover .aerth-card-title { color: #fff; }
.aerth-card-desc { font-size: 17px; color: var(--muted); margin: 0; line-height: 1.6; }

/* --------------------------------------------------------------------------
   8 · What's New
   -------------------------------------------------------------------------- */
.aerth-whats-new { background: var(--panel); border: 1px solid var(--border); border-radius: 3px; padding: 28px 30px 24px; }
.aerth-whats-new-list { list-style: none; margin: 8px 0 0; padding: 0; }
.aerth-whats-new-list li { border-bottom: 1px solid #222427; }
.aerth-whats-new-list li:last-child { border-bottom: 0; }
.aerth-whats-new-list a {
  display: flex; align-items: baseline; gap: 16px;
  padding: 14px 0; color: inherit;
}
.aerth-whats-new-list a:hover { color: #fff; }
.aerth-whats-new-list .aerth-kind { flex: 0 0 100px; }
.aerth-whats-new-list .title { flex: 1; font-family: var(--font-display); font-size: 19px; color: var(--text); }
.aerth-whats-new-list .when { font-family: var(--font-label); font-size: 14px; color: #6b6d72; }

/* kind colours, unchanged from production */
.aerth-kind.is-character { color: #6a9455; }
.aerth-kind.is-faction   { color: var(--red); }
.aerth-kind.is-location  { color: var(--gold); }
.aerth-kind.is-region    { color: #b8955c; }
.aerth-kind.is-item      { color: #a68ac9; }
.aerth-kind.is-creature  { color: #7ea2c8; }
.aerth-kind.is-lore      { color: var(--gold); }
.aerth-kind.is-language  { color: var(--muted); }
.aerth-kind.is-session   { color: var(--gold); }

/* --------------------------------------------------------------------------
   9 · Gazetteer index tabs (punch list 04)
   The existing chip markup is enough. Counts already render.
   -------------------------------------------------------------------------- */
.aerth-filters {
  position: relative;
  border-bottom: 1px solid #3a3c41;
  margin-bottom: 6px;
}
.aerth-filters-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px;
}
.aerth-chip {
  font-family: var(--font-label);
  font-size: 15px; letter-spacing: 0.16em;
  color: #9a9ca1;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 2px 2px 0 0;
  padding: 9px 15px;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.aerth-chip:hover { color: var(--text); background: #24262a; }
.aerth-chip.is-active,
.aerth-chip[aria-pressed="true"] {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
  position: relative; top: 1px;      /* seats the open chapter on the rule */
  padding: 10px 17px;
}
.aerth-chip .count { opacity: 0.75; }

/* search loses the box and becomes a ledger rule */
.aerth-search-wrap { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #4a4c52; padding: 0 4px 9px; min-width: 210px; }
.aerth-search {
  background: none; border: 0; padding: 0;
  font-family: var(--font-body); font-size: 17px; color: var(--text);
  min-width: 0; width: 100%;
}
.aerth-search:focus { outline: none; }
.aerth-search::placeholder { color: #6b6d72; font-style: italic; }
.aerth-search-wrap:focus-within { border-bottom-color: var(--gold); }

.aerth-results-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 10px; padding: 16px 2px 22px;
}
.aerth-results-meta .count { font-family: var(--font-label); font-size: 14px; letter-spacing: 0.16em; color: #6b6d72; }
.aerth-results-meta .sort { font-style: italic; font-size: 17px; color: #6b6d72; }

/* results grid · continuous, no letter rules in this pass (item 14 deferred) */
.aerth-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 14px;
}
.aerth-entry {
  position: relative; display: block;
  background: #191b1d;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 2px;
  padding: 18px 18px 16px;
  color: inherit;
  transition: border-color .18s, background .18s;
}
.aerth-entry:hover { border-color: var(--tarnish); background: #1c1e21; }
.aerth-entry:hover .aerth-entry-title { color: #fff; }
.aerth-entry-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.aerth-entry-title { font-family: var(--font-display); font-size: 21px; margin: 0 0 6px; color: var(--text); }
.aerth-entry-excerpt { font-size: 16px; color: var(--muted); margin: 0 0 10px; line-height: 1.55; }
.aerth-entry-cite { font-family: var(--font-label); font-size: 13px; letter-spacing: 0.1em; color: #5d5f64; margin: 0; }
.aerth-entry-cite .glyph { color: var(--red); margin-right: 0.35em; }

/* left stripe per kind */
.aerth-entry.is-character { border-left-color: #6a9455; }
.aerth-entry.is-faction   { border-left-color: var(--red); }
.aerth-entry.is-location  { border-left-color: var(--gold); }
.aerth-entry.is-region    { border-left-color: #b8955c; }
.aerth-entry.is-item      { border-left-color: #a68ac9; }
.aerth-entry.is-creature  { border-left-color: #7ea2c8; }
.aerth-entry.is-lore      { border-left-color: var(--gold); }
.aerth-entry.is-language  { border-left-color: var(--muted); }

/* --------------------------------------------------------------------------
   10 · Sealed state (punch list 06)
   Reads as sealed, not disabled. Wax seal is a background data URI, so the
   existing locked markup needs no change.
   -------------------------------------------------------------------------- */
.aerth-entry.is-sealed {
  background: #131416;
  border: 1px dashed #34363b;
  border-left: 1px dashed #34363b;
  cursor: default;
  overflow: hidden;
}
.aerth-entry.is-sealed:hover { background: #131416; border-color: #34363b; }
.aerth-entry.is-sealed::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.45;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 1px, rgba(0,0,0,0) 1px 7px);
}
.aerth-entry.is-sealed::after {
  content: ""; position: absolute; top: 16px; right: 16px; width: 22px; height: 22px;
  background-repeat: no-repeat; background-size: 22px 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8' fill='%237d1f1f' fill-opacity='0.55' stroke='%23c53131' stroke-opacity='0.7'/%3E%3Cpath d='M11 6v10M6.5 11h9' stroke='%23e84545' stroke-opacity='0.55'/%3E%3C/svg%3E");
}
.aerth-entry.is-sealed .aerth-entry-title { color: #7d7f84; }
.aerth-entry.is-sealed .aerth-entry-excerpt { font-style: italic; color: #6b6d72; }
.aerth-entry.is-sealed .aerth-kind { color: #5d5f64; }

/* --------------------------------------------------------------------------
   11 · Section rules, page titles, footer (punch list 16)
   -------------------------------------------------------------------------- */
.aerth-page-head { text-align: center; padding: 44px 0 28px; }
.aerth-page-title { font-family: var(--font-caps); font-size: clamp(34px, 5vw, 48px); letter-spacing: 0.03em; margin: 0; line-height: 1.1; }
.aerth-page-sub { font-size: 19px; color: var(--muted); margin: 14px auto 0; max-width: 60ch; text-wrap: pretty; }

.aerth-rule { display: flex; align-items: center; gap: 16px; margin: 48px 0 18px; }
.aerth-rule > .label { font-family: var(--font-label); font-size: 15px; letter-spacing: 0.26em; color: var(--gold); margin: 0; white-space: nowrap; }
.aerth-rule > .line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border) 0%, rgba(45,47,51,0) 100%); }

.aerth-footer { border-top: 1px solid #1e2023; background: #0b0b0c; padding: 26px 28px 34px; text-align: center; }
.aerth-footer .aerth-flourish { margin: 0 0 12px; }
.aerth-footer .aerth-flourish span:first-child,
.aerth-footer .aerth-flourish span:last-child { width: 60px; }
.aerth-footer .aerth-flourish .diamond { background: var(--tarnish); }
.aerth-footer p { font-family: var(--font-label); font-size: 14px; letter-spacing: 0.2em; color: #5d5f64; margin: 0; }

/* --------------------------------------------------------------------------
   12 · Mobile ornament budget (punch list 09, 18)
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .aerth-moons-grid { grid-template-columns: repeat(2, 1fr); }
  .aerth-cards      { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body.aerth-context { font-size: 17px; }
  .aerth-wordmark { font-size: 34px; }
  .aerth-header .aerth-flourish { display: none; }
  .aerth-subtitle { font-size: 14px; letter-spacing: 0.24em; }
  .aerth-header-auth { padding: 16px 18px 0; }
  .aerth-container, .aerth-container--wide { padding-left: 18px; padding-right: 18px; }
  .aerth-callout { padding: 24px 20px 22px; }
  .aerth-callout p { font-size: 18px; }
  .aerth-moons { padding: 24px 18px 26px; }
  .aerth-moon svg { width: 84px; }
  .aerth-card::before, .aerth-card::after { display: none; }

  /* nav and filter tabs scroll instead of wrapping into ragged lines */
  .aerth-nav .aerth-nav-menu,
  .aerth-filters-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .aerth-nav .aerth-nav-menu::-webkit-scrollbar,
  .aerth-filters-row::-webkit-scrollbar { display: none; }
  .aerth-nav .aerth-nav-menu a { padding: 13px 16px; white-space: nowrap; }
  .aerth-chip { white-space: nowrap; }

  /* gold edge fade, hidden by JS at the end of the track · item 18 */
  .aerth-filters::after {
    content: ""; position: absolute; right: 0; bottom: 1px; top: 0; width: 44px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(14,14,15,0) 0%, rgba(14,14,15,0.9) 60%, #0e0e0f 100%);
    box-shadow: inset -1px 0 0 rgba(221,161,94,0.25);
    transition: opacity .2s;
  }
  .aerth-filters.is-scroll-end::after { opacity: 0; }

  .aerth-whats-new-list a { flex-wrap: wrap; gap: 4px 12px; }
  .aerth-whats-new-list .aerth-kind { flex: 0 0 auto; }
  .aerth-whats-new-list .title { flex: 1 1 100%; font-size: 18px; }
}
@media (max-width: 560px) {
  .aerth-cards { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  /* zodiacal ring drops, disc keeps its shading */
  .aerth-moon .zodiac { display: none; }
}

/* --------------------------------------------------------------------------
   13 · Motion and print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  body.aerth-context *,
  body.aerth-context *::before,
  body.aerth-context *::after { animation: none !important; transition: none !important; }
}
@media print {
  .aerth-header::before, .aerth-header::after,
  .aerth-moons::before, .aerth-callout::after { display: none; }
}
