/* Shared skeleton for every design: reset, layout primitives, behaviour states.
   Colours, fonts and the look of each component come from the design's own
   tokens.css and theme.css, which must define the tokens used here. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.band { padding-block: clamp(56px, 8vw, 104px); }
.sec-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; max-width: 64ch; }
.sec-head:last-child { margin-bottom: 0; }
.lede { color: var(--muted); font-size: 1.06rem; max-width: 60ch; }
.kicker { font-size: .85rem; font-weight: 700; color: var(--accent-text); }

.grid { display: grid; gap: 20px; }
.g1 { grid-template-columns: 1fr; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.split > * { min-width: 0; }

/* header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--header-bg); }
.header-in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; direction: ltr; flex: none; }
.brand img { width: 40px; height: 40px; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { text-decoration: none; white-space: nowrap; }
.header-tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.menu-btn { display: none; }
.theme-switch { display: inline-flex; }
.theme-switch button { display: grid; place-items: center; width: 34px; height: 32px; border: 0; background: transparent; cursor: pointer; }
.theme-switch svg { width: 17px; height: 17px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; text-decoration: none; font-weight: 700; cursor: pointer; white-space: nowrap; border: var(--border) solid transparent; }
.btn-sm { padding: 7px 14px; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* lists and blocks */
.modes { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mode { display: flex; flex-direction: column; gap: 8px; align-items: start; }
.mode p { color: var(--muted); }
.difficulty { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.levels { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.levels li { display: flex; flex-direction: column; }
.levels span { font-size: .85rem; color: var(--muted); }
.loot { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.loot-item { display: flex; flex-direction: column; gap: 2px; }
.loot-item span { color: var(--muted); }
.maps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.map { margin: 0; position: relative; overflow: hidden; }
.map img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.map figcaption { position: absolute; inset: auto 0 0; padding: 48px 16px 14px; display: flex; flex-direction: column; color: var(--on-image); background: linear-gradient(transparent, var(--scrim)); }
.map figcaption span { font-size: .85rem; opacity: .85; }
.map-lg img { aspect-ratio: 16 / 9; }
.more { margin-top: 20px; }
.veteran-teaser { display: flex; align-items: end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.veteran-teaser > div { display: flex; flex-direction: column; gap: 12px; max-width: 62ch; }

.page-head { padding-block: clamp(48px, 7vw, 88px) 8px; }
.page-head .wrap { display: flex; flex-direction: column; gap: 14px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }

.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { counter-increment: step; display: flex; flex-direction: column; gap: 8px; }
.step::before { content: counter(step); }
.step p { color: var(--muted); }

.turn { display: flex; flex-direction: column; gap: 22px; }
.ap-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.ap-bar span { height: 16px; }
.keys { margin: 0; display: flex; flex-direction: column; }
.keys div { display: grid; grid-template-columns: 9em 1fr; gap: 14px; padding: 11px 0; }
.keys dt { font-weight: 700; }
.keys dd { margin: 0; color: var(--muted); }
kbd { font-family: var(--font-num); font-size: .85em; padding: 1px 7px; }

.faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 18px; list-style-position: inside; }
.faq details p { padding: 0 18px 18px; color: var(--muted); }

.slots { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.slot { display: flex; flex-direction: column; gap: 4px; padding: 16px; min-height: 104px; }
.slot span { font-family: var(--font-num); font-size: .85rem; color: var(--muted); direction: ltr; text-align: right; }
.note { margin-top: 20px; color: var(--muted); font-size: .92rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 4px 12px; font-size: .9rem; }
.table-wrap { overflow-x: auto; margin-bottom: 24px; }
.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th, .table td { text-align: start; padding: 13px 14px; vertical-align: top; }
.table td:nth-child(2) { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.card { padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card p { color: var(--muted); }

.map-tabs .tablist { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; }
.map-tabs [role=tab] { flex: none; cursor: pointer; padding: 10px 16px; border: var(--border) solid var(--line); background: transparent; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compare-col { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 18px; }
.checklist { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.checklist li { position: relative; padding-inline-start: 26px; }
.checklist li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: 12px; height: 12px; background: var(--accent); }

.cta-band { padding-block: clamp(56px, 8vw, 96px); }
.cta-band .wrap { display: flex; flex-direction: column; gap: 16px; align-items: start; }

/* login */
.auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: calc(100vh - 68px); }
.auth-art { position: relative; overflow: hidden; min-height: 260px; }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-art-cap { position: absolute; top: 22px; inset-inline-start: 22px; padding: 6px 14px; color: var(--on-image); background: var(--scrim); }
.auth-main { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 48px max(24px, 5vw); }
.auth-main h1 { font-size: 2.2rem; }
.form { display: flex; flex-direction: column; gap: 14px; max-width: 420px; margin-top: 12px; }
.form h2 { font-size: 1.6rem; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: .92rem; }
.field input { width: 100%; padding: 12px 14px; background: var(--surface); border: var(--border) solid var(--line); }
.form-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .92rem; }
.check { display: inline-flex; align-items: center; gap: 8px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.hint { font-size: .85rem; color: var(--muted); }
.flow { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); max-width: 420px; font-size: .92rem; color: var(--muted); }
.flow h2 { font-size: 1.05rem; color: var(--ink); margin-bottom: 6px; }
.flow ol { padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; }

/* footer */
.site-footer { padding-block: 36px; font-size: .92rem; }
.footer-in { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.footer-in nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-in a { text-decoration: none; }
.footer-in a:hover { text-decoration: underline; }
.footer-copy { margin-inline-start: auto; color: var(--muted); }

@media (max-width: 1080px) {
  .site-nav { gap: 14px; font-size: .92rem; }
}
@media (max-width: 960px) {
  .menu-btn { display: grid; place-items: center; width: 40px; height: 40px; border: var(--border) solid var(--line); background: transparent; cursor: pointer; }
  .menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
  .menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; inset-inline-start: 0; }
  .menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
  .site-nav { display: none; position: absolute; inset: 100% 0 auto; flex-direction: column; gap: 0; padding: 8px max(20px, env(safe-area-inset-right, 0px)) 16px max(20px, env(safe-area-inset-left, 0px)); background: var(--header-bg); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .header-in { position: relative; gap: 12px; }
  .header-tools { order: 3; }
  .menu-btn { order: 4; }
  .g3, .modes, .steps { grid-template-columns: 1fr 1fr; }
  .maps { grid-template-columns: 1fr 1fr; }
  .split, .compare, .auth { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .header-tools .btn-ghost { display: none; }
  .brand span { display: none; }
  .g3, .modes, .steps { grid-template-columns: 1fr; }
  .keys div { grid-template-columns: 1fr; gap: 2px; }
  .footer-copy { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
[dir="ltr"] .slot span { text-align: left; }
