/* Styling for the static pages — the guide, the mini and hero pages, privacy
   and terms. They load without the app bundle and must render on their own,
   so nothing here depends on the game's CSS; the colours are the game's. */
:root {
  color-scheme: dark;
  /* the game's own palette (src/style.css): quarry-dark ground, brass hairlines, vellum ink */
  --bg: #0f0c12;
  --panel: #1c1721;
  --sunk: #120e16;
  --line: rgba(233, 200, 140, 0.12);
  --text: #efe6d6;
  --body: #d6cab8;
  --dim: #a99c89;
  --accent: #f0c96a;
  --blue: #4da6ff;
  --warm: #e6903f;
  --elixir: #b07dff;
  --hp: #ff8a8a;
  --dmg: #ffb36a;
}

@font-face { font-family: 'Cinzel'; src: url('/fonts/cinzel.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'IM Fell English'; src: url('/fonts/fell-italic.woff2') format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 16px 72px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

a { color: var(--accent); }
h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.2; font-family: 'Cinzel', 'Palatino Linotype', Palatino, Georgia, serif; font-weight: 700; letter-spacing: 0.02em; }
h2 { margin: 34px 0 8px; font-size: 19px; color: var(--accent); font-family: 'Cinzel', 'Palatino Linotype', Palatino, Georgia, serif; font-weight: 700; letter-spacing: 0.03em; }
h3 { margin: 22px 0 6px; font-size: 16px; }
p, li { color: var(--body); }
ul, ol { padding-left: 22px; }
li { margin: 5px 0; }
code { font-size: 0.92em; }

.updated, .lede-meta { margin: 0 0 22px; color: var(--dim); font-size: 13px; }
.lede { font-size: 17px; color: var(--text); }
/* a line of lore: told, not named — the old italic the game uses */
.lore { font-family: 'IM Fell English', 'Iowan Old Style', Palatino, Georgia, serif; font-style: italic; font-size: 17px; color: var(--dim); }
.lore b { font-weight: 400; color: var(--accent); }

/* ---- chrome ---- */
.site-head {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
  color: var(--text);
}
.brand .mark { width: 30px; height: 30px; }
.brand b { color: var(--accent); font-weight: 800; }
.site-head nav { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 14px; }
.site-head nav a { color: var(--dim); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--text); }

main {
  max-width: 760px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px;
}

.crumbs { margin: 0 0 14px; font-size: 13px; color: var(--dim); }
.crumbs a { color: var(--dim); }
.crumbs span { margin: 0 6px; opacity: 0.6; }

.site-foot {
  max-width: 760px;
  margin: 22px auto 0;
  font-size: 13px;
  color: var(--dim);
  display: flex;
  gap: 6px 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.site-foot a { color: var(--dim); }

.back, .cta {
  display: inline-block;
  margin-top: 30px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 215, 106, 0.12);
  border: 1px solid rgba(255, 215, 106, 0.4);
  text-decoration: none;
  font-weight: 700;
}
.cta { background: var(--accent); color: #1a1408; border-color: transparent; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cta-row .back, .cta-row .cta { margin-top: 18px; }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-weight: 600; }
td b { color: var(--text); }
.num td, .num th { text-align: right; }
.num td:first-child, .num th:first-child { text-align: left; }
.wide { overflow-x: auto; }
.wide table { min-width: 560px; }
.facts th { width: 32%; }

/* ---- prose lists (the about and genre pages) ---- */
.points { padding-left: 20px; }
.points li + li { margin-top: 8px; }
.small { margin-top: 28px; font-size: 13px; color: var(--dim); }

/* ---- icons (the house set, inlined by the generator) ---- */
svg.ic { width: 1em; height: 1em; vertical-align: -0.15em; }
.ic-gold { color: var(--accent); }
.ic-elixir { color: var(--elixir); }
.ic-hp { color: var(--hp); }
.ic-dmg { color: var(--dmg); }
h2 svg.ic, h3 svg.ic { margin-right: 6px; color: var(--warm); }

/* ---- guide sections ---- */
.section { padding: 14px 0; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: none; }
.section h2 { margin: 0 0 6px; font-size: 16px; color: var(--text); display: flex; align-items: center; }
.section p { margin: 0; font-size: 15px; }

/* ---- unit cards ---- */
.unit { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.unit h2 { margin-top: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(77, 166, 255, 0.14);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.tag.locked { background: rgba(255, 215, 106, 0.12); color: var(--accent); }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}
.stats div {
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
}
.stats dt { font-size: 12px; color: var(--dim); }
.stats dd { margin: 0; font-weight: 700; }
.ability {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(176, 125, 255, 0.08);
  border: 1px solid rgba(176, 125, 255, 0.25);
}
.ability b { color: var(--elixir); }
.ability p { margin: 4px 0 0; font-size: 15px; }
.unit-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.unit-list li { margin: 0; }
.unit-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--sunk);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
}
.unit-list a:hover { border-color: rgba(255, 215, 106, 0.4); }
.unit-list small { display: block; color: var(--dim); font-size: 12.5px; }

.faq h3 { margin-top: 20px; }
.faq p { margin: 0; }

@media (max-width: 520px) {
  main { padding: 24px 18px; }
  h1 { font-size: 24px; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal th { padding-bottom: 0; }
  .legal td { padding-top: 2px; border-bottom: none; }
  .legal tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
}

/* ---- the share card that opens a unit page, and the trailer poster on About ---- */
.card, .trailer { margin: 18px 0 0; }
.card img, .trailer img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.trailer > a { position: relative; display: block; text-decoration: none; }
.trailer .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  border-radius: 999px; background: rgba(15, 12, 18, 0.82); border: 1px solid rgba(255, 215, 106, 0.5);
  color: var(--text); font-weight: 700; font-size: 15px; white-space: nowrap;
}
.trailer .play svg.ic { color: var(--accent); }
.trailer > a:hover .play { background: var(--accent); color: #1a1408; }
.trailer > a:hover .play svg.ic { color: #1a1408; }
.trailer figcaption { margin-top: 8px; font-size: 13px; color: var(--dim); }
