/* seo: Lost Chapters static site (tools/build-site.mjs). One file, no web fonts, no JS needed. Game palette (css/style.css). */
:root {
  --bg: #0b0716; --bg2: #150c2a; --bg3: #1d1238; --ink: #f3ecff; --muted: #b9addb; --gold: #f2c14e; --gold2: #ffd978;
  --crystal: #a86bff; --line: rgba(190, 160, 255, .22); --panel: rgba(29, 18, 56, .72); --c: var(--gold);
  --title: "Cinzel", "Old Standard TT", Georgia, "Times New Roman", serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg) radial-gradient(1200px 600px at 70% -10%, #2a1650 0%, transparent 60%) no-repeat; color: var(--ink);
  font: 400 17px/1.65 var(--ui); min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; height: auto; }
a { color: var(--gold2); text-underline-offset: 2px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #241400; padding: 8px 14px; border-radius: 8px; z-index: 10; font-weight: 700; }
.skip:focus { left: 8px; }
h1, h2, h3 { font-family: var(--title); line-height: 1.2; letter-spacing: .01em; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.6vw, 2.9rem); margin: .2em 0 .45em; color: var(--gold2); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); margin: 1.8em 0 .5em; color: var(--ink); }
h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; color: var(--gold2); }
p, ul, ol { margin: 0 0 1em; }
li { margin: .25em 0; }
code { font: 600 .92em/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; background: rgba(255,255,255,.07); padding: .1em .35em; border-radius: 5px; word-break: break-all; }
blockquote { margin: 1em 0; padding: .4em 1em; border-left: 4px solid var(--crystal); background: var(--panel); border-radius: 0 10px 10px 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* layout */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
main { flex: 1; padding: 8px 0 48px; }

/* header */
.top { border-bottom: 1px solid var(--line); background: rgba(11, 7, 22, .85); }
.top .wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.2rem/1 var(--title); color: var(--gold); text-decoration: none; letter-spacing: .04em; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0; padding: 0; list-style: none; flex: 1; }
.nav a { display: inline-block; padding: 8px 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: 8px; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: rgba(255,255,255,.06); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 12px; font: 800 1rem/1.1 var(--ui);
  text-decoration: none; background: linear-gradient(180deg, #ffd978, #e8a92e); color: #241400; border: 1px solid #ffe7a3; box-shadow: 0 6px 18px rgba(242, 193, 78, .25); }
.btn:hover { color: #241400; filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.big { min-height: 54px; padding: 14px 30px; font-size: 1.15rem; border-radius: 14px; }
.top nav { flex: 1; min-width: 0; }
@media (max-width: 720px) {
  .top nav { order: 3; flex-basis: 100%; }
  .top .btn { margin-left: auto; min-height: 40px; padding: 8px 16px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 12px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 8px 9px; }
}

/* breadcrumbs */
.crumbs { font-size: .9rem; color: var(--muted); margin: 14px 0 4px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "\203A"; margin: 0 6px 0 2px; color: var(--line); }
.crumbs a { color: var(--muted); }

/* hero (home) */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: center; padding: 26px 0 8px; }
.hero .lead { font-size: 1.12rem; color: #e6dcff; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0 10px; }
.hero .note { color: var(--muted); font-size: .92rem; }
.hero .fan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero .fan img { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero .fan { order: 2; } }
.banner { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin: 22px 0; padding: 16px 20px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(168,107,255,.18), rgba(242,193,78,.12)); border: 1px solid var(--line); }
.banner b { font-family: var(--title); color: var(--gold2); font-size: 1.15rem; }

/* tiles and grids */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 12px 0 8px; padding: 0; list-style: none; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid li { margin: 0; }
.tile { display: flex; flex-direction: column; height: 100%; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 12px;
  overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .12s ease, border-color .12s ease; }
.tile:hover { transform: translateY(-2px); border-color: var(--c); color: #fff; }
.tile img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--bg3); }
.tile.portrait img { aspect-ratio: 560 / 832; }
.tile .t { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.tile b { font-size: .95rem; line-height: 1.3; }
.tile span { font-size: .8rem; color: var(--muted); }
.tile p { font-size: .9rem; color: var(--muted); margin: 4px 0 0; }
.cards-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cards-h a { font-size: .95rem; }

/* card and leader pages */
.cardhero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; margin-top: 8px; }
@media (max-width: 820px) { .cardhero { grid-template-columns: 1fr; } .cardhero .portrait-fig { order: 2; text-align: center; } .cardhero .portrait-fig img { max-width: 240px; } }
.cardhero figure { margin: 0; }
.cardhero figure img { border-radius: 14px; border: 2px solid var(--c); box-shadow: 0 14px 40px rgba(0,0,0,.5); width: 100%; }
.cardhero figcaption { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.portrait-fig img { max-width: 380px; }
/* cards: written character pages show the Full Art big, first on phones */
.cardhero.written .big-art { text-align: center; }
.cardhero.written .big-art img { max-width: 460px; }
@media (max-width: 820px) { .cardhero.written .big-art { order: 0; } .cardhero.written .big-art img { max-width: 340px; } }
.box.faq h3 { font-size: 1.02rem; margin: 1em 0 .3em; }
.rulesbox { background: linear-gradient(180deg, rgba(40, 26, 74, .9), rgba(22, 13, 42, .92)); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 14px; padding: 18px 20px; }
.rulesbox h1 { margin-top: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 14px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
.rules { background: rgba(243, 230, 200, .08); border: 1px solid rgba(243, 230, 200, .18); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; }
.rules p { margin: 0 0 .4em; } .rules p:last-child { margin: 0; }
.flavor { font-style: italic; color: #d8cdea; margin: 0; }
.pip { display: inline-block; width: .8em; height: .8em; border-radius: 50%; background: var(--c); margin-right: .35em; vertical-align: -.05em; box-shadow: 0 0 0 2px rgba(0,0,0,.3); }
.label { display: inline-block; font: 800 .72rem/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; margin-bottom: 8px; }
.label.real { background: #1f5d3a; color: #d7ffe6; }
.label.lore { background: #4b2a7a; color: #ecdcff; }
.label.soon { background: #6b4a06; color: #fff1c9; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 18px 0; }
.box.history { border-left: 4px solid #3cc460; }
.box.lore { border-left: 4px solid var(--crystal); }
.box h2 { margin-top: .2em; }
.sources { font-size: .92rem; }
.sources li { overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: .9rem; }
.deckcode { display: block; padding: 10px 12px; background: rgba(255,255,255,.06); border: 1px dashed var(--line); border-radius: 10px; font-size: .9rem; user-select: all; }
.tablewrap { overflow-x: auto; margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--gold2); font-weight: 700; }
.kw dt { font: 700 1.05rem/1.3 var(--title); color: var(--gold2); margin-top: 1.1em; }
.kw dd { margin: .2em 0 0; }
.kw dd .meta { display: block; margin-top: 4px; }
.cta-box { text-align: center; margin: 34px 0 10px; padding: 24px 16px; border-radius: 16px; background: linear-gradient(180deg, rgba(168,107,255,.16), rgba(242,193,78,.08)); border: 1px solid var(--line); }
.cta-box p { color: var(--muted); }
.post-hero { margin: 8px 0 18px; }
.post-hero img { border-radius: 14px; width: 100%; border: 1px solid var(--line); }
.postlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.postlist li { margin: 0; }
.postlist a.tile { flex-direction: row; border-top-width: 1px; border-left: 3px solid var(--c); }
.postlist a.tile img { width: 180px; aspect-ratio: 16 / 9; flex: none; }
@media (max-width: 600px) { .postlist a.tile { flex-direction: column; } .postlist a.tile img { width: 100%; } }
article .prose img { border-radius: 12px; }
.answer { font-size: 1.08rem; padding: 14px 18px; background: var(--panel); border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; }

/* footer */
.foot { border-top: 1px solid var(--line); background: #08050f; color: var(--muted); font-size: .92rem; padding: 30px 0 40px; }
.foot .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px 26px; }
.foot h2 { font: 700 .95rem/1.2 var(--ui); color: var(--ink); margin: 0 0 8px; letter-spacing: .02em; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 4px 0; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }
.foot .facts-line { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }
