/* Territory static site. No external fonts, scripts or images: auth links land here
   with tokens in the URL, so nothing on this page may talk to a third party. */

:root {
  --bg: #0a0d12;
  --surface: #12161d;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f6fa;
  --text-secondary: #9aa3b2;
  --accent: #c5f82a;
  --on-accent: #0a0d12;
  --accent-text: #c5f82a;
  --danger: #ff7a6b;
  --rival: #262c37;
  --rival-line: #6b7383;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --border: rgba(10, 13, 18, 0.08);
    --text: #0a0d12;
    --text-secondary: #4a5363;
    --accent-text: #5e9e00;
    --danger: #c0392b;
    --rival: #e8eaee;
    --rival-line: #7a8394;
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.wrap {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 16px;
}

header {
  padding-top: max(20px, env(safe-area-inset-top));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand svg {
  width: 28px;
  height: 28px;
}

main {
  flex: 1;
  padding: 40px 0 32px;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h2 {
  margin: 36px 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

p,
li {
  color: var(--text-secondary);
}

p {
  margin: 0 0 14px;
}

strong {
  color: var(--text);
  font-weight: 600;
}

a {
  color: var(--accent-text);
}

ul {
  margin: 0 0 14px;
  padding-left: 1.2em;
}

li {
  margin-bottom: 6px;
}

.hero-art {
  width: 108px;
  height: 102px;
  margin-bottom: 24px;
}

.hex {
  fill: var(--rival);
  stroke: var(--rival-line);
  stroke-width: 1.5;
}

.hex.mine {
  fill: var(--accent);
  stroke: var(--accent);
}

.lede {
  font-size: 1.125rem;
}

.button {
  display: inline-block;
  margin: 8px 0 14px;
  padding: 14px 24px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}

.button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
}

.note {
  font-size: 0.9rem;
}

.error-title {
  color: var(--danger);
}

/* Landing states: index.html shows exactly one. Without JavaScript the home state stays. */
main[data-state='home'] [data-show]:not([data-show='home']),
main[data-state='confirmed'] [data-show]:not([data-show='confirmed']),
main[data-state='error'] [data-show]:not([data-show='error']) {
  display: none;
}

/* The deep link only makes sense on a phone. */
.touch-only {
  display: none;
}

@media (pointer: coarse) {
  .touch-only {
    display: inline-block;
  }
  .desktop-only {
    display: none;
  }
}

footer {
  padding: 20px 0 max(24px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

footer span {
  color: var(--text-secondary);
}

.updated {
  font-size: 0.9rem;
}
