/* 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;
  --bg: #0d1420;
  --panel: #141d2b;
  --sunk: #101826;
  --line: rgba(255, 255, 255, 0.09);
  --text: #e6edf7;
  --body: #cfd9e8;
  --dim: #9fb0c8;
  --accent: #ffd76a;
  --blue: #4da6ff;
  --warm: #e6903f;
  --elixir: #b07dff;
  --hp: #ff8a8a;
  --dmg: #ffb36a;
}

* { 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; }
h2 { margin: 34px 0 8px; font-size: 19px; color: var(--accent); }
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); }

/* ---- 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; }

/* ---- 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; }
}
