/* DAOx app-factory template — deep-blue brand system */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700;800&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --bg: #eef2f6;
  --card: #ffffff;
  --border: #d7e0e8;
  --ink: #16202a;
  --muted: #4e5d6b;
  --brand: #1a5f96;
  --brand-deep: #0b2a47;
  --brand-bright: #2b7cb8;
  --brand-mid: #1b5a8b;
  --brand-tint: #e8eff5;
  --gradient: linear-gradient(121deg, #0b2a47, #1b5a8b);
  --ok: #1f8a4c;
  --err: #b3261e;
  --radius: 16px;
  --shadow: 0 2px 6px rgba(11, 42, 71, .08), 0 10px 30px rgba(11, 42, 71, .12);
  --sans: "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 16.5px/1.7 var(--serif);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--sans); color: var(--ink); letter-spacing: -.2px; }

/* ---------- nav ---------- */
.nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky; top: 0; z-index: 10;
}
.nav .wrap { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--sans); font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -.3px; }
.logo em { font-style: normal; color: var(--brand-mid); }
.logo:hover { text-decoration: none; }
.nav nav { display: flex; gap: 22px; align-items: center; }
.nav nav a { font-family: var(--sans); color: var(--muted); font-weight: 600; font-size: 15px; }
.nav nav a:hover { color: var(--brand); text-decoration: none; }
.badge {
  font-family: var(--sans);
  background: var(--brand-tint); color: var(--brand);
  border: 1px solid #c3d6e5; border-radius: 999px;
  padding: 3px 14px; font-size: 13px; font-weight: 700;
}

/* ---------- hero (brand gradient band) ---------- */
.hero {
  background: var(--gradient);
  text-align: center;
  padding: 88px 24px 130px;
  color: #fff;
}
.eyebrow {
  display: inline-block; margin-bottom: 20px;
  font-family: var(--sans);
  color: #fff; background: rgba(255, 255, 255, .14);
  border: 1.5px solid rgba(255, 255, 255, .75);
  border-radius: 999px; padding: 5px 18px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.1; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: #fff;
  max-width: 780px; margin: 0 auto;
}
.tagline {
  font-size: 20px; color: #f2fbff;
  max-width: 640px; margin: 20px auto 0;
}
.tagline em { font-style: italic; }
.sub { color: rgba(255, 255, 255, .85); margin-top: 12px; font-size: 15.5px; }

/* ---------- product card (overlaps the gradient) ---------- */
.product { padding: 0 24px 56px; margin-top: -72px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
}
.card.center { text-align: center; }
label {
  display: block; font-family: var(--sans); font-size: 13.5px; font-weight: 700;
  color: var(--ink); margin: 18px 0 6px; letter-spacing: .2px;
}
label:first-child { margin-top: 0; }
input, textarea, select {
  width: 100%; background: #f7fcfe; color: var(--ink);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; font: 15px/1.6 var(--sans);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus {
  outline: none; border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(27, 90, 139, .2);
  background: #fff;
}
::placeholder { color: #93a8b3; }

.btn {
  display: inline-block; margin-top: 20px; cursor: pointer;
  font-family: var(--serif);
  background: var(--card); color: var(--brand);
  border: 2px solid var(--brand); border-radius: 999px;
  padding: 10px 26px; font-size: 16px; font-weight: 600;
  transition: background .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--brand-tint); text-decoration: none; }
.btn.primary {
  background: var(--gradient); border: none; color: #fff;
  width: 100%; padding: 15px 26px; font-size: 17.5px;
  box-shadow: 0 6px 18px rgba(11, 42, 71, .35);
}
.btn.primary:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .55; cursor: wait; }

.status { margin-top: 16px; font-size: 14.5px; color: var(--muted); }
.status.err { color: var(--err); font-weight: 600; }
.status.ok { color: var(--ok); font-weight: 600; }

.result {
  margin-top: 20px; padding: 26px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 15.5px;
}

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 20px 24px 56px; }
.step {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 22px;
  text-align: center;
}
.step span {
  display: inline-flex; width: 38px; height: 38px;
  align-items: center; justify-content: center;
  font-family: var(--sans);
  background: var(--gradient); color: #fff;
  border-radius: 50%; font-weight: 800; font-size: 16px;
}
.step h3 { margin: 14px 0 6px; font-size: 19px; font-weight: 700; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- pricing ---------- */
.pricing { text-align: center; padding: 24px 24px 56px; }
.pricing h2 { font-size: 32px; font-weight: 700; }
.pricing .sub { color: var(--muted); }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.pack {
  position: relative;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 32px 20px 28px;
}
.pack.featured { border: 2px solid var(--brand-mid); }
.pack.featured::before {
  content: "Most popular";
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  font-family: var(--sans);
  background: var(--gradient); color: #fff;
  border-radius: 999px; padding: 2px 16px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .4px; white-space: nowrap;
}
.pack h3 { font-size: 16px; color: var(--muted); font-weight: 600; }
.pack .price { font-family: var(--sans); font-size: 40px; font-weight: 800; letter-spacing: -1px; margin: 12px 0 2px; }
.pack .per { color: var(--muted); font-size: 13px; }
.pack .btn { padding: 8px 30px; }

/* ---------- faq ---------- */
.faq { padding: 24px 24px 72px; }
.faq h2 { text-align: center; font-size: 32px; font-weight: 700; margin-bottom: 26px; }
details {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 22px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
summary { cursor: pointer; font-family: var(--sans); font-weight: 700; font-size: 16px; }
summary::marker { color: var(--brand-mid); }
details p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 34px 0; color: var(--muted); font-size: 14px; text-align: center;
  background: var(--card);
  font-family: var(--sans);
}

@media (max-width: 680px) {
  .hero { padding: 56px 20px 110px; }
  .steps, .packs { grid-template-columns: 1fr; }
  .card { padding: 24px 18px; }
  
}

/* ---------- print the result ---------- */
@media print {
  body * { visibility: hidden; }
  #result, #result * { visibility: visible; }
  #result { position: absolute; left: 0; top: 0; width: 100%; border: none; box-shadow: none; background: #fff; color: #000; }
}

/* ---------- typography: no widows ---------- */
h1, h2, h3, h4, summary { text-wrap: balance; }
p, li, .tagline, .sub { text-wrap: pretty; }

/* ================= 99 Worlds layer ================= */

.center { text-align: center; }

/* today's world feature */
.world-feature { text-align: left; }
.chip {
  display: inline-block; font-family: var(--sans); font-weight: 700;
  font-size: 12.5px; letter-spacing: 1.5px; color: var(--brand-mid);
  border: 1.5px solid var(--brand-mid); border-radius: 999px;
  padding: 4px 14px; margin-bottom: 16px;
}
.feature-name { font-size: 34px; font-weight: 800; margin: 18px 0 2px; }
.feature-epithet {
  font-style: italic; color: var(--muted); font-size: 18px; margin-bottom: 12px;
}
.world-feature .btn { margin-top: 18px; display: inline-block; }

/* atlas grid */
.atlas { padding: 8px 24px 56px; }
.atlas h2 { text-align: center; font-size: 32px; font-weight: 700; }
.atlas .sub { color: var(--muted); margin-top: 6px; }
.atlas-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px; margin-top: 28px;
}
.wcard {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; color: var(--ink); display: block;
  transition: transform .15s ease;
}
.wcard:hover { text-decoration: none; transform: translateY(-3px); }
.wcard img, .wcard-art { width: 100%; height: 140px; object-fit: cover; display: block; }
.wcard.next .wcard-art {
  background: repeating-linear-gradient(121deg, var(--brand-tint),
    var(--brand-tint) 12px, #dfe9f1 12px, #dfe9f1 24px);
}
.wcard-body { padding: 14px 18px 18px; }
.wcard-n {
  font-family: var(--sans); font-weight: 700; font-size: 12px;
  letter-spacing: 1.5px; color: var(--brand-mid);
}
.wcard h3 { font-size: 19px; margin: 4px 0 4px; }
.wcard p { color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* dossier */
.forge-sub { color: var(--muted); font-size: 15.5px; margin: 8px 0 10px; }
.dossier { font-size: 16.5px; }
.dhero {
  width: 100%; border-radius: 12px; display: block; margin: 6px 0 16px;
  box-shadow: var(--shadow);
}
.dpremise { font-size: 19px; font-style: italic; color: var(--ink); margin: 6px 0 14px; }
.palette { display: flex; gap: 8px; margin: 6px 0 10px; }
.swatch {
  width: 34px; height: 34px; border-radius: 8px; display: inline-block;
  border: 1px solid rgba(11, 42, 71, .15);
}
.dsec { margin-top: 26px; }
.dsec h3 {
  font-size: 15px; font-weight: 800; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--brand-mid);
  border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 12px;
}
.dsec p { margin: 8px 0; }
.dsec ul { margin: 8px 0 0 20px; }
.dsec li { margin: 6px 0; }
.dlabel {
  font-family: var(--sans); font-weight: 700; font-size: 13px;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
  margin-top: 12px;
}
.dprices { width: 100%; border-collapse: collapse; margin-top: 10px; }
.dprices td { border-top: 1px solid var(--border); padding: 8px 10px 8px 0; font-size: 15px; }
.dprices td:nth-child(2) { font-family: var(--sans); font-weight: 700; white-space: nowrap; }
.dprices td:last-child { color: var(--muted); }

/* world page hero */
.world-hero h1 { text-transform: none; }
.dossier-card { padding-top: 26px; }

@media (max-width: 640px) {
  .atlas-grid { grid-template-columns: 1fr 1fr; }
  .wcard img, .wcard-art { height: 100px; }
  .feature-name { font-size: 27px; }
}

/* ---------- saga depth ---------- */
.timeline { margin-top: 4px; }
.tl-era {
  font-family: var(--sans); font-weight: 800; font-size: 13px;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--brand);
  margin: 18px 0 6px;
}
.tl-row {
  display: grid; grid-template-columns: 74px 1fr; gap: 12px;
  padding: 7px 0; border-left: 2px solid var(--brand-tint); padding-left: 12px;
}
.tl-year { font-family: var(--sans); font-weight: 700; color: var(--brand-mid); }
.tl-body p { margin: 0; }
.tl-consequence { color: var(--muted); font-size: 14.5px; font-style: italic; }

.houses { display: grid; gap: 14px; margin-top: 6px; }
.house, .castcard {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; background: #fbfcfe;
}
.house-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.house-head h4 { font-size: 18px; }
.house-kind {
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
}
.swatch.small { width: 16px; height: 16px; border-radius: 4px; }
.house-motto { font-style: italic; color: var(--brand-deep); margin: 6px 0 8px; }
.house p, .castcard p { margin: 6px 0; font-size: 15px; }

.castcard { margin-top: 12px; }
.castcard h4 { font-size: 17px; }
.cast-age { color: var(--muted); font-weight: 400; font-size: 14px; }
.cast-station {
  font-family: var(--sans); font-weight: 600; color: var(--brand-mid);
  font-size: 13.5px; margin-top: 2px;
}

.whisper { color: #7a5a13; font-style: italic; }
.whisper::before { content: "⚿ "; font-style: normal; }

.prophecy {
  border-left: 3px solid var(--brand-mid); margin: 12px 0; padding: 8px 16px;
  background: var(--brand-tint); border-radius: 0 10px 10px 0;
  font-style: italic; font-size: 17px;
}
.prophecy footer {
  font-style: normal; font-family: var(--sans); font-size: 13px;
  color: var(--muted); margin-top: 6px;
}
.prophecy p { font-style: normal; font-size: 15px; margin-top: 8px; }

@media (max-width: 640px) {
  .tl-row { grid-template-columns: 56px 1fr; }
}

.toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px;
}
.toc a {
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  color: var(--brand-mid); background: var(--brand-tint);
  border-radius: 999px; padding: 4px 12px;
}
.toc a:hover { text-decoration: none; filter: brightness(.96); }

/* ---------- the musical ---------- */
.act { margin-top: 12px; }
.act-songs { margin-top: 8px; }
.song-chip {
  display: inline-block; font-family: var(--sans); font-size: 13px;
  font-weight: 600; color: var(--brand-deep); background: var(--brand-tint);
  border-radius: 999px; padding: 3px 12px; margin: 2px 4px 2px 0;
}
.prophecy.libretto { white-space: pre-wrap; }

/* ---------- bilingual ---------- */
.lang-toggle {
  border: 1.5px solid var(--border); border-radius: 999px;
  padding: 2px 12px; font-size: 13px; font-family: var(--sans);
  font-weight: 700; color: var(--muted);
}
.lang-toggle:hover { color: var(--brand); border-color: var(--brand-mid); text-decoration: none; }

/* CJK typography: the Source faces carry no Chinese glyphs, so name real
   fallbacks rather than letting each OS pick its own worst one. */
html[lang^="zh"] body {
  font-family: "Source Serif 4", "Songti SC", "Noto Serif SC", "Source Han Serif SC",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
  line-height: 1.85;
}
html[lang^="zh"] h1, html[lang^="zh"] h2, html[lang^="zh"] h3,
html[lang^="zh"] h4, html[lang^="zh"] summary, html[lang^="zh"] .logo,
html[lang^="zh"] .btn, html[lang^="zh"] .eyebrow, html[lang^="zh"] .chip,
html[lang^="zh"] .wcard-n, html[lang^="zh"] .toc a {
  font-family: "Source Sans 3", "PingFang SC", "Hiragino Sans GB",
               "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
html[lang^="zh"] h1 { letter-spacing: .06em; }
html[lang^="zh"] .eyebrow, html[lang^="zh"] .chip { letter-spacing: .12em; }
html[lang^="zh"] .dsec h3 { letter-spacing: .16em; }
/* Chinese has no spaces, so balance/pretty wrapping does nothing useful;
   line-breaking rules matter instead. */
html[lang^="zh"] p, html[lang^="zh"] li { line-break: strict; overflow-wrap: anywhere; }

/* ---------- ad slots ---------- */
/* Empty until AdSense is configured — collapsed rather than a reserved hole,
   so an unapproved/blocked site shows no gap. */
.ad-slot { margin: 0 auto 34px; }
.ad-slot:empty { display: none; }
.ad-slot .ad-label {
  display: block; font-family: var(--sans); font-size: 11px;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted);
  opacity: .7; margin-bottom: 6px; text-align: center;
}
.ad-slot ins { min-height: 90px; }

/* ---------- character portraits ---------- */
.castcard.has-portrait {
  display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: start;
}
.castcard.has-portrait > h4,
.castcard.has-portrait > p { grid-column: 2; }
.cast-portrait {
  grid-row: 1 / span 99; grid-column: 1; width: 132px; aspect-ratio: 1;
  object-fit: cover; border-radius: 10px; box-shadow: var(--shadow);
}
@media (max-width: 560px) {
  .castcard.has-portrait { grid-template-columns: 84px 1fr; gap: 12px; }
  .cast-portrait { width: 84px; }
}

/* ================= per-world brand: 紅陽 Red Sun (theme-hongyang) =================
   World 001 alone departs from the fleet's navy system, to match the author's
   own xianxia painting: cinnabar and gold on paper, ruled borders, lotus gold. */
.theme-hongyang {
  --brand: #8f2c23;
  --brand-mid: #b23a2f;
  --brand-deep: #5d1a15;
  --brand-tint: #f6ece2;
  --bg: #f4efe6;              /* warm paper, not cold blue-grey */
  --ink: #241d1b;
  --muted: #6b5a52;
  --border: #e0d2c0;
  --gold: #c9a227;
  --shadow: 0 2px 6px rgba(60, 30, 20, .08), 0 10px 30px rgba(60, 30, 20, .14);
}
.theme-hongyang .world-hero {
  min-height: 62vh; display: flex; flex-direction: column;
  justify-content: flex-end; padding-bottom: 54px;
}
.theme-hongyang .world-hero h1 {
  font-family: var(--serif); font-weight: 600; letter-spacing: .1em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .5);
}
.theme-hongyang .world-hero .eyebrow {
  border-color: var(--gold); color: #f7e6bd;
}
/* a thin gold rule under the hero, echoing the ruled panel borders */
.theme-hongyang .world-hero::after {
  content: ""; display: block; height: 2px; margin: 26px auto -54px;
  width: min(560px, 74%);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.theme-hongyang .dossier-card {
  border-top: 3px solid var(--gold);
  background:
    radial-gradient(120% 60% at 50% 0, rgba(201, 162, 39, .07), transparent 70%),
    var(--card);
}
.theme-hongyang .dsec h3 { color: var(--brand); border-bottom-color: var(--gold); }
.theme-hongyang .toc a { background: var(--brand-tint); color: var(--brand); }
.theme-hongyang .prophecy {
  background: linear-gradient(90deg, rgba(201, 162, 39, .10), transparent);
  border-left-color: var(--gold);
}
.theme-hongyang .whisper { color: #8a6a12; }
.theme-hongyang .castcard, .theme-hongyang .house {
  background: #fbf7f0; border-color: var(--border);
}
/* portraits are cut from the painting's ruled panels — frame them to match */
.theme-hongyang .cast-portrait {
  border: 1px solid var(--gold); border-radius: 4px;
  box-shadow: 0 1px 3px rgba(60, 30, 20, .18);
}
.art-credit {
  font-family: var(--sans); font-size: 12.5px; letter-spacing: .06em;
  color: var(--muted); text-align: right; margin: -6px 0 18px;
}

/* painted plates inside the cast section (themed worlds) */
.cast-plate {
  display: block; width: 100%; height: auto; border-radius: 6px;
  margin: 4px 0 22px; box-shadow: var(--shadow);
}
.theme-hongyang .cast-plate { border: 1px solid var(--gold); }
.cast-plate.sheet { margin: 26px 0 4px; }
/* the supplied portraits are tall scroll panels, not squares */
.theme-hongyang .castcard.has-portrait { grid-template-columns: 124px 1fr; }
.theme-hongyang .cast-portrait {
  width: 124px; aspect-ratio: 3 / 5; object-fit: cover; object-position: center 14%;
}
@media (max-width: 560px) {
  .theme-hongyang .castcard.has-portrait { grid-template-columns: 88px 1fr; }
  .theme-hongyang .cast-portrait { width: 88px; }
}

/* illustrated places (worlds that ship location artwork) */
.place { margin: 0 0 26px; }
.place img {
  display: block; width: 100%; height: auto; border-radius: 6px;
  box-shadow: var(--shadow);
}
.place figcaption {
  margin-top: 10px; font-size: 15.5px; color: var(--ink);
}
.theme-hongyang .place img { border: 1px solid var(--gold); }

/* illustrated peoples — portrait plates sit beside their text */
.people {
  margin: 0 0 26px; display: grid; grid-template-columns: 260px 1fr;
  gap: 20px; align-items: start;
}
.people img {
  display: block; width: 100%; height: auto; border-radius: 6px;
  box-shadow: var(--shadow);
}
.people figcaption { font-size: 15.5px; }
.theme-hongyang .people img { border: 1px solid var(--gold); }
@media (max-width: 620px) {
  .people { grid-template-columns: 1fr; gap: 12px; }
}

/* house banners — hung beside the house's entry */
.house.has-banner {
  display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start;
}
.house.has-banner > .house-head,
.house.has-banner > p { grid-column: 2; }
.house-banner {
  grid-row: 1 / span 99; grid-column: 1;
  width: 200px; height: auto; border-radius: 6px; box-shadow: var(--shadow);
}
.theme-hongyang .house-banner { border: 1px solid var(--gold); }
@media (max-width: 620px) {
  .house.has-banner { grid-template-columns: 1fr; }
  .house.has-banner > .house-head, .house.has-banner > p { grid-column: 1; }
  .house-banner { grid-row: auto; width: 100%; max-width: 260px; }
}

/* ==================================================================
   LANDING PAGE — scoped to body.home so world pages keep their own
   system (and world 001 keeps theme-hongyang). Editorial/gallery look:
   warm paper, serif display, black pill buttons, image-led cards.
   ================================================================== */
body.home {
  --lp-bg: #f4f3f0;
  --lp-card: #ffffff;
  --lp-ink: #16171a;
  --lp-muted: #6d6b66;
  --lp-line: #e3e1dc;
  --lp-dark: #17181b;
  background: var(--lp-bg);
  color: var(--lp-ink);
}
body.home .wrap { max-width: 1080px; }

/* ---- nav ---- */
.lp-nav { padding: 26px 0 6px; background: transparent; border: 0; }
.lp-nav .wrap { display: flex; justify-content: space-between; align-items: center; }
.lp-nav .logo {
  font-family: var(--serif); font-weight: 600; font-size: 23px;
  letter-spacing: -.2px; color: var(--lp-ink);
}
.lp-nav .logo em { font-style: normal; color: var(--lp-ink); }
.lp-nav nav { display: flex; gap: 30px; align-items: center; }
.lp-nav nav a {
  font-family: var(--sans); font-size: 14.5px; font-weight: 500;
  color: var(--lp-muted);
}
.lp-nav nav a:hover { color: var(--lp-ink); text-decoration: none; }
body.home .lang-toggle { border: 0; padding: 0; color: var(--lp-muted); }

/* ---- shared bits ---- */
.lp-label {
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: 1.9px; text-transform: uppercase; color: var(--lp-muted);
  margin-bottom: 18px;
}
.lp-eyebrow {
  font-family: var(--sans); font-size: 11.5px; font-weight: 700;
  letter-spacing: 1.9px; text-transform: uppercase; color: var(--lp-muted);
  display: block; margin-bottom: 20px;
}
.lp-lead { color: var(--lp-muted); font-size: 17px; line-height: 1.62; margin-bottom: 12px; }
.btn-dark {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--lp-dark); color: #fff; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  padding: 13px 26px; border-radius: 999px; margin-top: 14px;
}
.btn-dark:hover { background: #000; text-decoration: none; color: #fff; }
.btn-dark.wide { width: 100%; justify-content: center; margin-top: 18px; }
.lp-section { padding: 52px 24px 0; }
.lp-section > h2 { font-family: var(--serif); font-weight: 600; }

/* ---- hero ---- */
.lp-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  align-items: center; padding: 54px 24px 8px;
}
.lp-hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: 62px;
  line-height: 1.06; letter-spacing: -1.4px; margin-bottom: 22px;
  text-transform: none; color: var(--lp-ink);
}
.lp-hero-art { position: relative; }
.lp-hero-art img {
  /* No forced ratio and no object-fit: the hero artwork is shown whole.
     Cropping it would cut panels off the author's painting. */
  width: 100%; height: auto; display: block; border-radius: 14px;
}
.lp-hero-badge {
  position: absolute; right: 14px; bottom: -14px; color: var(--lp-ink);
  background: var(--lp-card); border-radius: 12px; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-size: 14px; line-height: 1.35;
  box-shadow: 0 8px 26px rgba(20, 18, 16, .12);
}
.lp-hero-badge:hover { text-decoration: none; box-shadow: 0 10px 30px rgba(20,18,16,.18); }
.lp-hero-badge strong { font-weight: 600; }
.lp-hero-badge em {
  font-style: normal; font-family: var(--sans); font-size: 12px;
  color: var(--lp-muted);
}
/* the brand mark is the same object on every page */
body:not(.home) .nav .logo {
  font-family: var(--serif); font-weight: 600; font-size: 21px;
}
body:not(.home) .nav .logo em { font-style: normal; color: var(--brand-mid); }
.lp-compass {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  border: 1px solid var(--lp-line); position: relative;
}
.lp-compass::before {
  content: ""; position: absolute; inset: 8px;
  background: conic-gradient(from 45deg, var(--lp-ink) 0 2%, transparent 2% 23%,
    var(--lp-ink) 23% 27%, transparent 27% 48%, var(--lp-ink) 48% 52%,
    transparent 52% 73%, var(--lp-ink) 73% 77%, transparent 77%);
  border-radius: 50%;
}

/* ---- featured world ---- */
.lp-feature {
  display: grid; grid-template-columns: 46% 1fr; gap: 0; align-items: center;
  background: var(--lp-card); border: 1px solid var(--lp-line);
  border-radius: 14px; overflow: hidden;
}
.lp-feature .feat-art { display: block; background: var(--lp-line); }
/* Show the painting whole here too — the featured card is the second place
   a reader meets the artwork, and cropping it there undoes the hero fix. */
.lp-feature .feat-art img { width: 100%; height: auto; display: block; }
.lp-feature .feat-art .feat-fallback {
  width: 100%; height: 100%; min-height: 260px; display: block;
}
.lp-feature .feat-body { padding: 34px 36px; }
.lp-feature .feat-name {
  font-family: var(--serif); font-weight: 600; font-size: 30px;
  letter-spacing: -.4px; margin-bottom: 12px;
}
.lp-feature .feat-epithet { color: var(--lp-muted); font-size: 16.5px; margin-bottom: 12px; }
.lp-feature .feat-premise { color: var(--lp-muted); font-size: 16px; line-height: 1.6; }
.lp-feature .feat-link {
  display: inline-block; margin-top: 20px; font-family: var(--sans);
  font-weight: 600; font-size: 15px; color: var(--lp-ink);
}
.lp-feature .status { padding: 34px 36px; grid-column: 1 / -1; }

/* ---- atlas controls ---- */
.lp-section-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px; flex-wrap: wrap; margin-bottom: 22px;
}
.lp-section-head .lp-label { margin: 0; }
.lp-controls { display: flex; gap: 12px; align-items: center; }
.lp-search {
  display: flex; align-items: center; gap: 9px; background: var(--lp-card);
  border: 1px solid var(--lp-line); border-radius: 9px; padding: 0 14px;
}
.lp-search-icon {
  width: 13px; height: 13px; border: 1.6px solid var(--lp-muted);
  border-radius: 50%; position: relative; flex: 0 0 13px;
}
.lp-search-icon::after {
  content: ""; position: absolute; right: -5px; bottom: -4px; width: 6px;
  height: 1.6px; background: var(--lp-muted); transform: rotate(45deg);
}
.lp-search input {
  border: 0; background: transparent; padding: 11px 0; margin: 0;
  font-size: 14.5px; font-family: var(--sans); width: 210px;
}
.lp-search input:focus { outline: none; box-shadow: none; }
#atlasSort {
  border: 1px solid var(--lp-line); background: var(--lp-card);
  border-radius: 9px; padding: 11px 14px; margin: 0; font-size: 14.5px;
  font-family: var(--sans); color: var(--lp-ink);
}
.lp-empty { color: var(--lp-muted); padding: 18px 0; }

/* ---- atlas grid: image-led cards with the title over the art ---- */
body.home .atlas-grid {
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 18px;
  margin-top: 0;
}
body.home .wcard {
  position: relative; aspect-ratio: 4 / 3; border-radius: 12px;
  overflow: hidden; box-shadow: none; border: 1px solid var(--lp-line);
  background: var(--lp-line);
}
body.home .wcard:hover { transform: translateY(-2px); }
body.home .wcard img, body.home .wcard .wcard-art {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
body.home .wcard-body {
  position: absolute; inset: auto 0 0 0; padding: 16px 18px; z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(12, 11, 10, .82));
}
body.home .wcard-n { color: rgba(255, 255, 255, .72); font-size: 11px; }
body.home .wcard h3 {
  color: #fff; font-family: var(--serif); font-weight: 600; font-size: 18px;
  margin: 3px 0 2px;
}
body.home .wcard p {
  color: rgba(255, 255, 255, .78); font-size: 13px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
body.home .wcard.next {
  background: var(--lp-card); display: flex; align-items: center;
  justify-content: center; text-align: center;
}
body.home .wcard.next .wcard-art { display: none; }
body.home .wcard.next .wcard-body {
  position: static; background: none; padding: 22px;
}
body.home .wcard.next h3 { color: var(--lp-ink); font-size: 17px; }
body.home .wcard.next p { color: var(--lp-muted); }
body.home .wcard.next .wcard-n { color: var(--lp-muted); }

/* ---- forge panel ---- */
.lp-panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px;
  background: var(--lp-card); border: 1px solid var(--lp-line);
  border-radius: 14px; padding: 38px 40px;
}
.lp-panel h2 {
  font-family: var(--serif); font-weight: 600; font-size: 30px;
  letter-spacing: -.4px; margin-bottom: 14px;
}
body.home .lp-panel label {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  color: var(--lp-muted); margin-top: 14px;
}
body.home .lp-panel input, body.home .lp-panel textarea {
  border: 1px solid var(--lp-line); border-radius: 9px; background: #fbfaf8;
}

/* ---- the rule ---- */
.lp-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.lp-rules h3 {
  font-family: var(--serif); font-weight: 600; font-size: 21px; margin-bottom: 8px;
}
.lp-rules p { color: var(--lp-muted); font-size: 15.5px; line-height: 1.6; }

/* ---- subscribe ---- */
.lp-subscribe {
  display: grid; grid-template-columns: 1fr; gap: 30px;
  background: var(--lp-card); border: 1px solid var(--lp-line);
  border-radius: 14px; padding: 34px 36px; align-items: center;
}
.lp-subform { display: flex; gap: 10px; margin-top: 16px; }
.lp-subform input {
  flex: 1; border: 1px solid var(--lp-line); border-radius: 9px;
  padding: 12px 14px; margin: 0; font-size: 15px; background: #fbfaf8;
}
.lp-subform .btn-dark { margin-top: 0; border-radius: 9px; }
.lp-subnote { margin-top: 10px; font-size: 14px; color: var(--lp-muted); }


/* ---- faq + footer ---- */
body.home .faq { padding-bottom: 20px; }
body.home .faq h2 { display: none; }
body.home details {
  background: var(--lp-card); border: 1px solid var(--lp-line);
  border-radius: 10px; margin-bottom: 10px;
}
.lp-footer {
  margin-top: 64px; padding: 30px 0 46px; border-top: 1px solid var(--lp-line);
  background: transparent;
  text-align: left;          /* the base footer centres; everything else here
                                sits on the same left edge, so match it */
}
.lp-footer .logo {
  font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--lp-ink);
}
.lp-footer .logo em { font-style: normal; }
.lp-footer p { color: var(--lp-muted); font-size: 13.5px; margin-top: 8px; }

@media (max-width: 860px) {
  .lp-hero, .lp-feature, .lp-panel, .lp-subscribe, .lp-rules {
    grid-template-columns: 1fr;
  }
  .lp-hero { gap: 34px; padding-top: 30px; }
  .lp-hero h1 { font-size: 44px; }
  .lp-feature .feat-body, .lp-panel, .lp-subscribe { padding: 26px 22px; }
  .lp-hero-badge { right: 10px; bottom: -12px; }
  .lp-controls { width: 100%; }
  .lp-search { flex: 1; }
  .lp-search input { width: 100%; }
  .lp-subart { display: none; }
}

/* ---- questions: open two-column editorial Q&A, not an accordion ---- */
.lp-qa {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px;
}
.lp-qa .qa { padding-top: 20px; border-top: 1px solid var(--lp-line); }
.lp-qa .qa h3 {
  font-family: var(--serif); font-weight: 600; font-size: 20px;
  letter-spacing: -.2px; margin-bottom: 9px; color: var(--lp-ink);
}
.lp-qa .qa p { color: var(--lp-muted); font-size: 15.5px; line-height: 1.68; }
@media (max-width: 860px) {
  .lp-qa { grid-template-columns: 1fr; gap: 22px; }
}
