:root {
  color-scheme: dark;
  --ink: #141a19;
  --panel: #1d2522;
  --parchment: #f1e6cc;
  --muted: #b5b7a9;
  --gold: #e2c783;
  --gold-light: #f7e2ae;
  --red: #9d4940;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ink);
  color: var(--parchment);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(22px, 5vw, 88px); border-bottom: 1px solid #5a624f;
  background: #151a19; gap: 20px;
}
.wordmark { text-decoration: none; letter-spacing: .16em; font: 600 .96rem Georgia, serif; white-space: nowrap; }
.wordmark span:last-child { color: var(--gold); }
.mark { display: inline-grid; place-items: center; margin-right: 13px; width: 36px; height: 36px; border: 1px solid var(--gold); border-radius: 50%; font-size: 1.3rem; color: var(--gold); }
.site-header nav { display: flex; gap: clamp(18px, 3vw, 44px); }
.site-header nav a { text-decoration: none; color: var(--muted); font-size: .9rem; }
.site-header nav a:hover { color: var(--gold-light); }
.hero {
  display: grid; grid-template-columns: minmax(360px, 1fr) minmax(360px, .95fr);
  min-height: 650px; max-width: 1600px; margin: auto;
  background: radial-gradient(ellipse at 65% 40%, #344037 0%, var(--ink) 65%);
}
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(38px, 6vw, 100px); z-index: 1; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .22em; font-size: .7rem; font-weight: 700; line-height: 1.5; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { font-size: clamp(4.5rem, 9vw, 9.8rem); letter-spacing: -.065em; line-height: .81; margin: 24px 0 40px; text-transform: uppercase; }
h1 em { color: var(--gold); font-style: normal; }
h2 { font-size: clamp(2.4rem, 4vw, 4.5rem); line-height: 1.08; margin: 12px 0 22px; }
h3 { font-size: 1.8rem; margin: 22px 0; }
.hero-description { max-width: 570px; font-size: 1.15rem; line-height: 1.7; color: #dbdfd0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 25px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 52px; padding: 12px 23px; text-decoration: none; border: 1px solid transparent; border-radius: 3px; font-size: .87rem; font-weight: 700; letter-spacing: .04em; text-align: center; }
.button-primary { background: var(--gold); color: #1c1d18; }
.button-primary:hover:not(:disabled) { background: var(--gold-light); }
.button-outline { background: transparent; border-color: #a5946c; color: var(--parchment); }
.button-outline:hover:not(:disabled) { border-color: var(--gold-light); color: var(--gold-light); }
.button:disabled, .button[aria-disabled="true"] { opacity: .48; cursor: not-allowed; }
.prototype-note { margin-top: 36px; max-width: 470px; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.hero-art { min-width: 0; align-self: center; padding: 38px clamp(24px, 4vw, 70px) 38px 0; }
.hero-art img { display: block; width: 100%; height: auto; max-height: 670px; object-fit: contain; filter: drop-shadow(0 20px 40px #060908); }
.about { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 50px; padding: 80px clamp(22px, 6vw, 100px); background: #202b27; border-block: 1px solid #465046; }
.about > p { color: #d6d9ca; line-height: 1.85; max-width: 670px; }
.account-section { display: grid; grid-template-columns: 1fr minmax(320px, 440px); align-items: center; gap: clamp(40px, 8vw, 160px); padding: 90px clamp(22px, 8vw, 150px); max-width: 1500px; margin: auto; }
.account-intro > p:not(.eyebrow) { max-width: 470px; color: var(--muted); line-height: 1.75; }
.account-caveat { border-left: 2px solid var(--gold); padding-left: 15px; }
.account-card { background: var(--panel); border: 1px solid #535e52; padding: 28px; box-shadow: 0 20px 45px #080c0a55; }
.tabs { display: flex; gap: 25px; border-bottom: 1px solid #505a4e; }
.tabs button { border: 0; border-bottom: 2px solid transparent; padding: 0 0 14px; background: none; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--gold); border-color: var(--gold); }
form { display: flex; flex-direction: column; }
label { margin: 11px 0 8px; font-size: .84rem; }
input { width: 100%; min-height: 47px; background: #101714; border: 1px solid #5b6a5a; border-radius: 3px; color: var(--parchment); padding: 10px 13px; }
input:focus { border-color: var(--gold); }
.form-submit { width: 100%; margin-top: 24px; }
.divider { display: flex; align-items: center; gap: 15px; margin: 24px 0; color: var(--muted); font-size: .75rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #505a4e; }
.button-google { width: 100%; border-color: #6c776a; background: #28332d; }
.button-google:hover:not([aria-disabled="true"]) { border-color: var(--gold); }
#account-methods { color: var(--muted); line-height: 1.6; }
#google-link { color: var(--gold-light); }
.account-message { min-height: 1.4em; margin: 18px 0 0; color: var(--gold-light); font-size: .85rem; line-height: 1.5; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 30px clamp(22px, 5vw, 88px); background: #101614; border-top: 1px solid #424b41; color: var(--muted); font-size: .75rem; }
footer span:first-child { color: var(--gold); font-family: Georgia, serif; letter-spacing: .16em; }
.commanderie { max-width: 1350px; margin: 0 auto 100px; padding: 42px clamp(22px, 5vw, 70px); border: 1px solid #535e52; background: #1d2522; }
.commanderie > p:not(.eyebrow) { max-width: 850px; color: var(--muted); line-height: 1.6; }
.commanderie select { display: block; max-width: 430px; width: 100%; padding: 12px; background: #101714; color: var(--parchment); border: 1px solid #5b6a5a; }
.research-tree { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 30px 0; }
.research-branch { grid-column: 1 / -1; margin: 22px 0 0; color: var(--gold); }
.research-node { display: grid; gap: 6px; min-height: 115px; padding: 14px; text-align: left; background: #253129; color: var(--parchment); border: 1px solid #56624f; border-radius: 3px; }
.research-node.selected { border-color: var(--gold); background: #3c412e; }
.research-node:disabled { cursor: not-allowed; opacity: .55; }
.research-node small { color: var(--muted); line-height: 1.4; }
.battle-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
#queue-panel { padding: 20px 0; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-art { max-width: 620px; justify-self: center; padding: 0 25px 45px; }
  .about, .account-section { grid-template-columns: 1fr; }
  .account-section { gap: 22px; }
}
@media (max-width: 520px) {
  .site-header { flex-wrap: wrap; gap: 16px; }
  .site-header nav { width: 100%; }
  h1 { font-size: clamp(3.8rem, 18vw, 5.8rem); }
  .hero-copy { padding: 45px 25px 0; }
  .hero-actions .button { width: 100%; }
  .about { padding-block: 55px; gap: 8px; }
  .account-section { padding-block: 55px; }
  .account-card { padding: 22px; }
  .commanderie { margin-inline: 15px; padding: 24px 18px; }
  .battle-actions .button { width: 100%; }
  footer { flex-direction: column; }
}
