@font-face { font-family: 'Chakra Petch'; src: url(/fonts/ChakraPetch-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Chakra Petch'; src: url(/fonts/ChakraPetch-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Chakra Petch'; src: url(/fonts/ChakraPetch-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Manrope; src: url(/fonts/Manrope_400Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url(/fonts/Manrope_600SemiBold.ttf) format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: Manrope; src: url(/fonts/Manrope_700Bold.ttf) format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: Manrope; src: url(/fonts/Manrope_800ExtraBold.ttf) format('truetype'); font-weight: 800; font-display: swap; }

/*
 * Real players next door: Port Calder at night. Public pages put class="night" on <body>. The admin page doesn't:
 * it keeps ink on paper, so the plain rules here stay light and the night theme sits under .night.
 */
:root {
  /* Light, for the admin page. */
  --ink: #2A1E3F;
  --muted: #5B4A6E;
  --plum: #6A35C0;
  --paper: #FFF4EA;
  --line: rgba(42, 30, 63, 0.14);
  --ember: #FF3D6E;
  /* The night city. */
  --night: #140F2E;
  --panel: #1C1540;
  --panel-2: #241B4F;
  --rim: rgba(255, 244, 234, 0.12);
  --cyan: #3DE0FF;
  --red: #FF3D6E;
  --red-text: #FF7A98;
  --gold: #FFC857;
  --violet: #8B5CF6;
  --cream: #FFF4EA;
  --lav: #D9CDEE;
  --dim: #B3A6CF;
  --head: 'Chakra Petch', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, 'Liberation Mono', monospace;
  --radius: 20px;
}

* { box-sizing: border-box; }
/* A class that sets display must not show what the hidden attribute hides. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-wrap: break-word;
}
body.night { background: var(--night); color: var(--lav); }

img { max-width: 100%; height: auto; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px;
}
.skip:focus { top: 12px; }
.night .skip, .night .skip:hover { background: var(--cyan); color: var(--night); }

:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; }
.night :focus-visible { outline-color: var(--cyan); }

h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.12; }
.night h1, .night h2, .night h3 { color: var(--cream); }
h1 { font-size: clamp(34px, 6vw, 54px); margin: 0 0 16px; }
h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 14px; }
h3 { font-size: 20px; margin: 28px 0 8px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
article h2 { margin-top: 44px; }
article h2:first-of-type { margin-top: 28px; }

p, li, dd { font-size: 17px; line-height: 1.65; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }
.lede { font-size: 19px; line-height: 1.55; font-weight: 600; }
.night .lede { color: var(--cream); }
.muted { color: var(--muted); }
.night .muted { color: var(--dim); }
.small { font-size: 15px; }
.eyebrow {
  margin: 0 0 12px; font-family: var(--head); font-weight: 600; font-size: 14px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--plum);
}
.night .eyebrow { color: var(--cyan); }
.night .eyebrow.threat { color: var(--red-text); }

a { color: var(--plum); font-weight: 600; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.night a { color: var(--cyan); }
.night a:hover { color: var(--cream); }

code, .mono { font-family: var(--mono); font-size: 0.92em; }
:not(pre) > code { background: rgba(106, 53, 192, 0.1); padding: 1px 6px; border-radius: 6px; }
.night :not(pre) > code { background: rgba(255, 244, 234, 0.08); color: var(--cream); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 12px 22px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--ink); color: var(--paper); font: 700 16px/1.2 Manrope, system-ui, sans-serif; text-decoration: none;
}
.button:hover { background: var(--plum); color: #FFFFFF; }
.button:disabled { opacity: 0.6; cursor: progress; }
.night .button { background: var(--cyan); color: var(--night); }
.night .button:hover { background: var(--cream); color: var(--night); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }

/* The two stores: Apple's own badge, and a plain button for Google Play (no official Play badge in the repo). */
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 26px; }
.night .store { display: inline-flex; align-items: center; justify-content: center; height: 52px; border-radius: 10px; text-decoration: none; }
.store img { display: block; height: 52px; width: auto; }
.night .store.play {
  padding: 0 20px; box-shadow: inset 0 0 0 2px var(--cyan); color: var(--cream); font-weight: 700; font-size: 16px;
}
.night .store.play:hover { background: rgba(61, 224, 255, 0.12); color: var(--cream); }

/* Header: the same on every page. */
.site-header { position: relative; z-index: 2; background: var(--night); border-bottom: 1px solid var(--rim); }
.bar { max-width: 1240px; margin: 0 auto; padding: 14px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.site-header .brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; color: var(--cream); text-decoration: none; }
.brand img { display: block; width: 34px; height: 34px; border-radius: 9px; }
.brand span { font-family: var(--head); font-weight: 700; font-size: 19px; letter-spacing: 0.16em; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav li { margin: 0; }
.site-header .nav a {
  display: block; padding: 9px 12px; border-radius: 10px; color: var(--cream); text-decoration: none; font-weight: 600; font-size: 15px;
}
.site-header .nav a:hover { background: rgba(255, 244, 234, 0.08); }
.site-header .nav a[aria-current='page'] { background: rgba(61, 224, 255, 0.14); color: var(--cyan); }
.site-header .get {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 10px;
  background: var(--cyan); color: var(--night); font-weight: 700; font-size: 15px; text-decoration: none;
}
.site-header .get:hover { background: var(--cream); color: var(--night); }
@media (max-width: 720px) {
  /* On a phone the links get their own row under the name and the button. */
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .site-header .nav a { padding: 8px 6px; }
}
@media (max-width: 370px) { .site-header .nav a { font-size: 14px; padding: 8px 3px; } }

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px 16px 40px; }
main.narrow { max-width: 800px; padding: 40px 20px 64px; }
main.home { max-width: none; padding: 0; }

.card { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; }
.card + .card, .stack > * + * { margin-top: 20px; }
.night .card { background: var(--panel); border-color: var(--rim); }

/* Front page: the hero, over the town in the game */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-bg {
  position: absolute; inset: -60px; z-index: -2;
  background: url(/shots/hero-night.webp) center / cover; filter: blur(30px) saturate(1.2); opacity: 0.6;
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 78% 30%, rgba(61, 224, 255, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(20, 15, 46, 0.35) 0%, rgba(20, 15, 46, 0.7) 60%, var(--night) 100%);
}
.hero-in {
  max-width: 1240px; margin: 0 auto; padding: 40px 20px 64px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center;
}
.hero-card {
  padding: 32px 28px 34px; border-radius: 18px; background: var(--night); border: 1px solid var(--rim);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.hero h1 { font-size: clamp(40px, 5.6vw, 70px); line-height: 1; margin-bottom: 20px; }
.hero .lede { color: var(--lav); font-size: 18px; margin: 0; }
.hero .small { margin: 18px 0 0; color: var(--dim); }
/* On a phone the town comes first, so the first screen isn't all text. */
.window { margin: 0; order: -1; }
/* Any capture fits: it is cropped to the same band, so a new hero-night.webp needs no markup change. */
.window img {
  display: block; width: 100%; aspect-ratio: 27 / 14; object-fit: cover; border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(61, 224, 255, 0.4), 0 30px 70px rgba(0, 0, 0, 0.55);
}
.town { margin: 28px 0 0; }
.town img { display: block; width: 100%; border-radius: 16px; box-shadow: 0 0 0 1px var(--rim), 0 24px 54px rgba(0, 0, 0, 0.5); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.legend li { margin: 0; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px 6px 11px;
  border: 1px solid rgba(255, 244, 234, 0.28); border-radius: 10px; background: rgba(20, 15, 46, 0.9);
  color: var(--cream); font-weight: 700; font-size: 14px; line-height: 1.3;
}
.tag::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.3); }
.tag.rival::before { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 61, 110, 0.3); }
.tag.you::before { background: var(--gold); box-shadow: 0 0 0 4px rgba(255, 200, 87, 0.3); }
.tag.traced::before { background: var(--cyan); box-shadow: 0 0 0 4px rgba(61, 224, 255, 0.3); }
.tag .who { font-weight: 600; color: var(--dim); }
@media (min-width: 980px) {
  .hero-in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding: 72px 32px 100px; }
  .window { order: 0; }
  .hero-card { padding: 38px 36px 40px; }
}

/* Front page: sections */
.section { padding: 80px 20px; border-top: 1px solid var(--rim); }
.wrap { max-width: 1160px; margin: 0 auto; }
.title { font-size: clamp(32px, 5vw, 54px); line-height: 1.02; margin: 0 0 18px; max-width: 18ch; }
.intro { max-width: 660px; font-size: 18px; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; margin-top: 56px; }
.feature h3 { font-size: clamp(22px, 2.6vw, 28px); margin: 0 0 12px; }
.feature p { max-width: 520px; }
.step { margin: 0 0 10px; font-family: var(--head); font-weight: 700; font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); }
.quote { margin: 18px 0 0; padding: 16px 18px; border: 1px solid rgba(61, 224, 255, 0.28); background: rgba(61, 224, 255, 0.06); border-radius: 12px; color: var(--cream); font-weight: 600; }
.shot { margin: 0; justify-self: center; width: min(100%, 420px); }
.shot.wide { width: min(100%, 520px); }
.shot img { display: block; width: 100%; border-radius: 18px; box-shadow: 0 0 0 1px var(--rim), 0 24px 54px rgba(0, 0, 0, 0.5); }
.shot figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--dim); }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
  .feature.flip > :first-child { order: 2; }
}

/* Multiplayer: the moves on a neighbour */
.moves { list-style: none; padding: 0; margin: 44px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.moves > li { margin: 0; padding: 22px 22px 24px; border-radius: 16px; background: var(--panel); border: 1px solid var(--rim); }
.moves h3 { margin: 0 0 8px; font-size: 22px; }
.moves p { margin: 0; font-size: 16px; }
.moves .threat { grid-column: 1 / -1; border-color: rgba(255, 61, 110, 0.55); background: linear-gradient(90deg, rgba(255, 61, 110, 0.14), var(--panel) 75%); }
.moves .threat h3 { color: var(--red-text); }
@media (min-width: 760px) {
  .moves .threat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; align-items: center; }
  .moves .threat h3 { margin: 0; font-size: 26px; }
}
.rule { margin: 22px 0 0; color: var(--dim); font-size: 15px; }

/* Free and member */
.plans { display: grid; gap: 16px; margin-top: 36px; }
.plan { padding: 28px 26px; border-radius: 18px; background: var(--panel); border: 1px solid var(--rim); }
.plan.member { border-color: rgba(61, 224, 255, 0.45); }
.plan h3 { margin: 0 0 4px; }
.price { margin: 0 0 14px; font-family: var(--head); font-weight: 700; font-size: 30px; color: var(--cream); }
.price span { font-family: Manrope, system-ui, sans-serif; font-size: 16px; font-weight: 600; color: var(--dim); }
.plan ul { margin: 0; padding-left: 20px; }
.plan li { font-size: 16px; }
.fine { max-width: 760px; margin: 22px 0 0; font-size: 15px; color: var(--dim); }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }

/* The last band: get the game */
.cta { text-align: center; background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(61, 224, 255, 0.14), transparent 70%); }
.cta .title { margin-left: auto; margin-right: auto; }
.cta .intro { margin: 0 auto; }
.cta .stores { justify-content: center; }

/* The AI's own screens: monospace on night */
.terminal {
  margin: 14px 0 0; padding: 18px; border-radius: 16px; background: #0E0A22; color: var(--paper);
  border: 1px solid var(--rim); font: 14px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
.terminal .you { color: var(--cyan); }
.terminal .c { color: var(--dim); }
.terminal .k { color: #FF8FB0; }
.terminal .s { color: #FFD9B8; }

/* Forms */
.field { margin: 0 0 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.night label { color: var(--cream); }
input[type='email'], input[type='text'], textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px;
  border: 2px solid rgba(42, 30, 63, 0.35); background: #FFFFFF; color: var(--ink);
  font: 400 17px/1.4 Manrope, system-ui, sans-serif;
}
textarea { min-height: 160px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--plum); outline: none; box-shadow: 0 0 0 3px rgba(106, 53, 192, 0.25); }
.night input:focus, .night textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(61, 224, 255, 0.35); }
.hint { font-size: 15px; color: var(--muted); margin: 6px 0 0; }
.night .hint { color: var(--dim); }
.turnstile { min-height: 65px; margin: 4px 0 16px; }
.status { margin: 14px 0 0; font-weight: 600; }
.status:empty { display: none; }
.status.error { color: #A3123F; background: #FFE3EA; padding: 12px 14px; border-radius: 12px; }
.status.ok { color: #1D6B50; background: #E0F5EC; padding: 12px 14px; border-radius: 12px; }

/* Long reads: guides, terms, privacy, FAQ */
.toc { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.toc li { margin: 0; }
.toc a { display: inline-block; padding: 8px 14px; border-radius: 10px; background: rgba(255, 244, 234, 0.07); border: 1px solid var(--rim); text-decoration: none; }
.toc a:hover { background: rgba(61, 224, 255, 0.14); }
.note { padding: 14px 16px; border-radius: 14px; background: rgba(61, 224, 255, 0.07); border: 1px solid rgba(61, 224, 255, 0.25); }
table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 16px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.night th, .night td { border-bottom-color: var(--rim); }
th { font-weight: 600; }
.night th { color: var(--cream); }
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
.table-wrap table { margin: 0; min-width: 480px; }
.night strong { color: var(--cream); }

/* What's new */
.log h2 { margin-top: 0; }
.log ul { margin-bottom: 0; }

footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
  padding: 28px max(20px, calc((100% - 1200px) / 2)) 40px; border-top: 1px solid var(--rim);
}
.night footer a { color: var(--lav); font-size: 15px; text-decoration: none; }
.night footer a:hover { color: var(--cream); text-decoration: underline; }
/* The company's trading particulars (Companies Act): a line of their own under the links. */
footer .legal { flex-basis: 100%; margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--dim); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
