/* projectopia.world — the City Update page.
   Glossy glass panels floating over the city (live 3D, or still pictures of it).
   Titles: Shrikhand, as on the game's share pages. Body: Science Gothic. */

:root {
  --ink: #0a2540;
  --ink-soft: #2c4a68;
  --blue: #1466d8;
  --blue-deep: #0b3d8c;
  --aqua: #19c8f5;
  --lime: #7be04f;
  --lime-deep: #1c8f34;
  --pink: #ff5fae;
  --sun: #ffd23f;
  --danger: #b3172b;
  --ok: #116b2b;
  --edge: rgba(255, 255, 255, 0.9);
  --radius: 28px;
  --display: 'Shrikhand', 'Cooper Black', 'Georgia', serif;
  --body: 'Science Gothic', 'Avenir Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --nav-height: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font: 400 1.03rem/1.55 var(--body);
  color: var(--ink);
  /* The sky, for the moment before any picture has arrived. */
  background: linear-gradient(#2f93ff 0%, #6fbcff 45%, #c8ebff 100%) fixed;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); }
p { margin: 0 0 0.9em; }
h1, h2, h3 { margin: 0 0 0.45em; line-height: 1.08; }

h2 {
  font: 400 clamp(1.75rem, 1.1rem + 2.3vw, 2.55rem)/1.06 var(--display);
  color: var(--blue-deep);
  letter-spacing: 0.005em;
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid #0b57d0;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.9);
  border-radius: 10px;
}

.skip {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 100;
  padding: 0.6em 1em;
  background: #fff;
  border-radius: 12px;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ───────────────────────────── the city behind the page ── */

.backdrop, #city-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;   /* does not jump when a phone's address bar slides away */
  z-index: 0;
}
.backdrop { overflow: hidden; transition: opacity 1.4s ease; }
.backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.backdrop img.on { opacity: 1; }
/* The pictures are framed for a wide screen, with the city to one side of the
   panel; a tall screen crops towards that side. */
@media (max-aspect-ratio: 1/1) {
  .backdrop img[data-side="right"] { object-position: 72% 50%; }
  .backdrop img[data-side="left"] { object-position: 28% 50%; }
}

#city-canvas {
  display: block;
  opacity: 0;
  transition: opacity 1.4s ease;
  touch-action: pan-y;
}
body.city-ready #city-canvas { opacity: 1; }
body.city-ready .backdrop { opacity: 0; }
body.tier-static #city-canvas { display: none; }
body.tier-static [data-needs="3d"] { display: none; }

/* ─────────────────────────────────────────────── glass ── */

.panel, .nav, .popover, .dialog, .tower-label, .loading, .scroll-cue {
  background:
    linear-gradient(168deg, rgba(255, 255, 255, 0.93) 0%, rgba(241, 250, 255, 0.85) 42%, rgba(222, 244, 255, 0.82) 100%);
  border: 1.5px solid var(--edge);
  box-shadow:
    0 22px 56px rgba(6, 46, 104, 0.34),
    inset 0 1.5px 0 #fff,
    inset 0 -18px 34px rgba(120, 205, 255, 0.24);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
}

.panel {
  position: relative;
  width: min(100%, 520px);
  padding: clamp(22px, 2.2vw + 12px, 38px);
  border-radius: var(--radius);
  pointer-events: auto;
  isolation: isolate;
}
.panel.wide { width: min(100%, 640px); }
/* The shine across the top of every panel. */
.panel::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 5px 5px auto 5px;
  height: min(42%, 190px);
  border-radius: calc(var(--radius) - 6px) calc(var(--radius) - 6px) 50% 50% / calc(var(--radius) - 6px) calc(var(--radius) - 6px) 26px 26px;
  background: linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.panel > :last-child { margin-bottom: 0; }

/* ─────────────────────────────────────────────── stops ── */

main {
  position: relative;
  z-index: 1;
  pointer-events: none;   /* the gaps between panels let clicks through to the city */
}

.stop {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: calc(var(--nav-height) + 40px) clamp(16px, 5.5vw, 84px) 56px;
}
/* The stretch of open sky between two stops is where the camera flies. */
.stop + .stop { margin-top: 42vh; }
.stop-left { justify-items: start; }
.stop-right { justify-items: end; }
.stop-center { justify-items: center; text-align: center; }
/* The last stop keeps its panel low, so the lit skyline shows above it. */
#end { align-content: end; }

.eyebrow {
  display: inline-block;
  margin-bottom: 0.9em;
  padding: 0.28em 0.85em;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(#e63f8f, #b5146a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 3px 8px rgba(190, 20, 110, 0.3);
  text-shadow: 0 1px 1px rgba(120, 0, 60, 0.5);
}

.lead { font-size: 1.16rem; line-height: 1.45; color: var(--ink); }
.fine { font-size: 0.86rem; color: var(--ink-soft); }
.note { margin: 0.35em 0 0; font-size: 0.84rem; color: var(--ink-soft); }
.optional { font-weight: 400; font-size: 0.84em; color: var(--ink-soft); }

.hint {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 1.1em;
  padding: 0.6em 0.9em;
  border-radius: 16px;
  font-size: 0.92rem;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.66);
  border: 1px dashed rgba(20, 102, 216, 0.45);
}
.hint::before {
  content: '';
  flex: none;
  width: 1.05em; height: 1.05em;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff 0 18%, #9be7ff 38%, #2aa8ff 100%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1.1em 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 0.38em 0.95em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #fff;
  box-shadow: inset 0 -6px 10px rgba(120, 205, 255, 0.24);
}

/* ─────────────────────────────────────────────── hero ── */

.hero h1 { margin: -6px 0 0.5em -6px; }
.hero h1 img {
  display: block;
  width: min(100%, 400px);
  filter: drop-shadow(0 6px 10px rgba(8, 50, 120, 0.28));
}

.countdown {
  margin: 0.4em 0 1.1em;
  padding: 0.85em 1em;
  border-radius: 20px;
  background: linear-gradient(rgba(255, 255, 255, 0.82), rgba(214, 240, 255, 0.72));
  border: 1px solid #fff;
  box-shadow: inset 0 -10px 18px rgba(120, 205, 255, 0.24);
}
.countdown-title { margin: 0 0 0.55em; font-weight: 700; }
.badge {
  display: inline-block;
  margin-right: 0.3em;
  padding: 0.15em 0.7em;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(#2687ee, #0f55c0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 1px rgba(0, 40, 110, 0.5);
}
.countdown-clock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0;
  font-size: 0.8rem;
  text-align: center;
  color: var(--ink-soft);
}
.countdown-clock b {
  display: block;
  font: 400 clamp(1.55rem, 1.1rem + 1.6vw, 2.15rem)/1.1 var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--blue-deep);
}
.countdown.out .countdown-clock { display: none; }
.countdown.out .countdown-title { margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.1em 0 0.8em; }
.stop-center .actions { justify-content: center; }

.scroll-cue {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 18px;
  padding: 0.5em 1em 0.5em 1.15em;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--blue-deep);
  text-decoration: none;
  pointer-events: auto;
}
.scroll-cue svg { width: 1.2em; height: 1.2em; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

/* ───────────────────────────────────────────── buttons ── */

svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.78em 1.45em;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  font: 700 1rem/1.2 var(--body);
  color: #fff;
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 36, 110, 0.6);
  background: linear-gradient(#3b9cf8 0%, #1262d2 50%, #0b4db4 100%);
  box-shadow:
    0 8px 20px rgba(14, 84, 200, 0.42),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.85),
    inset 0 -9px 14px rgba(0, 30, 130, 0.3);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
/* The gel highlight. */
.button::before {
  content: '';
  position: absolute;
  inset: 2px 8px auto 8px;
  height: 46%;
  border-radius: 999px;
  background: linear-gradient(rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.06));
  pointer-events: none;
}
.button:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.07); }
.button:active { transform: translateY(1px); filter: brightness(0.96); }
.button svg { width: 1.2em; height: 1.2em; flex: none; }
.button.go {
  color: #05300f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  background: linear-gradient(#b9f58a 0%, #6edc48 50%, #3fbb37 100%);
  box-shadow:
    0 8px 20px rgba(30, 150, 50, 0.42),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.9),
    inset 0 -9px 14px rgba(10, 110, 30, 0.3);
}
.button.go:hover { color: #05300f; }
/* The App Store: glossy black, the way Apple's own badge is. */
.button.store {
  background: linear-gradient(#4a5160 0%, #1d212b 50%, #0b0d12 100%);
  box-shadow:
    0 8px 20px rgba(10, 20, 40, 0.38),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
    inset 0 -9px 14px rgba(0, 0, 0, 0.35);
}
.button.store:hover { color: #fff; }
.button.store.go { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6); }
/* The platforms' own logos are solid shapes, not outlines. */
.button svg.logo { fill: currentColor; stroke: none; }
/* Android: the same glossy black, with the robot in Android green. */
.button.android svg { color: #3ddc84; }
/* Linux: Tux in his yellow. */
.button.linux svg { color: #fcc624; }
.button[hidden] { display: none; }
.button.quiet {
  color: var(--blue-deep);
  text-shadow: none;
  background: linear-gradient(#fff, #dff2ff);
  box-shadow: 0 6px 16px rgba(14, 84, 200, 0.2), inset 0 -8px 12px rgba(120, 205, 255, 0.3);
}
.button.quiet:hover { color: var(--blue-deep); }
.button.small { padding: 0.55em 1.05em; font-size: 0.92rem; }
.touch-only { display: none; }
@media (pointer: coarse) {
  .mouse-only { display: none; }
  .touch-only { display: inline; }
}
.button[disabled] { opacity: 0.65; cursor: progress; transform: none; }

.chip {
  padding: 0.4em 0.9em;
  border: 1.5px solid rgba(20, 102, 216, 0.4);
  border-radius: 999px;
  font: 700 0.86rem/1.2 var(--body);
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}
.chip[aria-pressed="true"] { color: #fff; background: var(--blue); border-color: var(--blue); }

/* ───────────────────────────────────────────────── nav ── */

.nav {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  z-index: 20;
  width: min(100% - 20px, 1080px);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 16px;
  border-radius: 999px;
  transform: translateX(-50%);
}
.nav-logo { display: flex; align-items: center; flex: none; border-radius: 12px; }
.nav-logo img { display: block; width: auto; height: 42px; }
.nav-links { display: flex; gap: 2px; margin: 0 auto; }
.nav-links a {
  padding: 0.5em 0.85em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.8); color: var(--blue-deep); }
.nav-links a[aria-current] {
  color: #fff;
  background: linear-gradient(#2687ee, #0f55c0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 1px rgba(0, 36, 110, 0.5);
}
.nav-tools { display: flex; align-items: center; gap: 6px; flex: none; }

.tool {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-width: 42px;
  height: 42px;
  padding: 0 0.7em;
  border: 1.5px solid #fff;
  border-radius: 999px;
  font: 700 0.84rem/1 var(--body);
  color: var(--blue-deep);
  background: linear-gradient(#fff, #dff2ff);
  box-shadow: inset 0 -6px 10px rgba(120, 205, 255, 0.3);
  cursor: pointer;
}
.tool svg { width: 20px; height: 20px; flex: none; }
.tool:hover { filter: brightness(1.04); }
.tool[aria-pressed="false"] { color: var(--ink-soft); background: rgba(255, 255, 255, 0.55); }
.tool.menu { display: none; }

.popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 8px;
  width: min(300px, calc(100vw - 24px));
  padding: 16px 18px;
  border-radius: 22px;
}
.popover label { display: block; margin-bottom: 0.5em; font-weight: 700; }
.popover input[type="range"] { width: 100%; accent-color: var(--blue); }
.popover-ends { display: flex; justify-content: space-between; margin: 0.2em 0 0.9em; font-size: 0.8rem; color: var(--ink-soft); }

/* ─────────────────────────────────────────────── forms ── */

form { margin-top: 1.1em; }
.field { margin: 0 0 1em; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 16px; align-items: start; }
label, legend { display: block; margin-bottom: 0.38em; padding: 0; font-weight: 700; }

input[type="text"], input[type="password"], input[type="url"], input[type="date"], textarea, select {
  display: block;
  width: 100%;
  padding: 0.68em 0.9em;
  border: 1.5px solid rgba(20, 102, 216, 0.38);
  border-radius: 14px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 2px 5px rgba(10, 60, 130, 0.1);
}
textarea { resize: vertical; min-height: 3.2em; }
::placeholder { color: #5b7189; opacity: 1; }
/* A helper line between a question and its box. */
label + .note { margin: -0.15em 0 0.5em; }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #0b57d0;
  outline-offset: 1px;
  box-shadow: none;
  border-color: transparent;
}
[aria-invalid="true"] { border-color: var(--danger) !important; background: #fff5f6; }

.check { display: flex; align-items: center; gap: 0.5em; align-self: end; margin-bottom: 1.5em; font-weight: 700; }
.check input { width: 1.2em; height: 1.2em; accent-color: var(--blue); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check, .face { position: relative; margin: 0; cursor: pointer; }
.chip-check input, .face input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip-check span, .face span {
  display: block;
  padding: 0.5em 1em;
  border: 1.5px solid rgba(20, 102, 216, 0.38);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.86);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.chip-check:hover span, .face:hover span { transform: translateY(-1px); background: #fff; }
.chip-check input:checked + span, .face input:checked + span {
  color: #fff;
  border-color: var(--blue);
  background: linear-gradient(#2687ee, #0f55c0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 10px rgba(14, 84, 200, 0.32);
  text-shadow: 0 1px 1px rgba(0, 36, 110, 0.5);
}
.chip-check input:focus-visible + span, .face input:focus-visible + span { outline: 3px solid #0b57d0; outline-offset: 2px; }

.faces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.face span {
  height: 100%;
  padding: 0.6em 0.3em;
  border-radius: 18px;
  font-size: 0.8rem;
  line-height: 1.25;
  text-align: center;
}
.face i { display: block; margin-bottom: 0.15em; font-size: 1.7rem; font-style: normal; line-height: 1.1; }

.message {
  margin: 0 0 1em;
  padding: 0.65em 0.95em;
  border-radius: 14px;
  font-weight: 700;
  border: 1.5px solid;
}
.message[data-kind="error"] { color: var(--danger); background: #fff0f2; border-color: #f3b3bc; }
.message[data-kind="success"] { color: var(--ok); background: #eaffef; border-color: #a5e2b5; }

/* ──────────────────────────────────────────────── news ── */

.news-list { display: grid; gap: 12px; margin-top: 0.6em; }
.news-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px 14px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #fff;
  box-shadow: inset 0 -10px 16px rgba(120, 205, 255, 0.18);
}
.news-item.has-picture { grid-template-columns: 1fr 112px; }
.news-item img { grid-row: 1 / span 3; grid-column: 2; width: 112px; height: 84px; object-fit: cover; border-radius: 14px; align-self: center; }
.news-meta { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--ink-soft); }
.news-tag {
  padding: 0.15em 0.7em;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  background: var(--tag, #1e7a38);
}
.news-item h3 { margin: 0.15em 0; font: 700 1.08rem/1.25 var(--body); color: var(--ink); }
.news-item p { margin: 0; font-size: 0.95rem; }
.news-empty { margin: 0; padding: 1.2em; border-radius: 18px; text-align: center; background: rgba(255, 255, 255, 0.7); }
.skeleton {
  height: 92px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.55) 30%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0.55) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }

/* ─────────────────────────────────────── admin-only parts ── */

.admin {
  margin-top: 1.3em;
  padding: 0.2em 1em;
  border-radius: 18px;
  background: rgba(255, 247, 214, 0.85);
  border: 1.5px dashed #c79a00;
}
.admin summary { padding: 0.7em 0; font-weight: 700; cursor: pointer; }
.admin[open] { padding-bottom: 1em; }
.count { font-weight: 400; color: var(--ink-soft); }
.admin-list { display: grid; gap: 10px; max-height: 420px; overflow: auto; }
.admin-item { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.9); font-size: 0.93rem; }
.admin-item header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 0.4em; font-weight: 700; }
.admin-item header span { font-weight: 400; color: var(--ink-soft); }
.admin-item dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0; }
.admin-item dt { font-weight: 700; color: var(--ink-soft); }
.admin-item dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ────────────────────────────────────────────── footer ── */

.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 1.3em 0 1.1em; padding: 0; list-style: none; }
.socials a {
  display: block;
  padding: 0.45em 1em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--blue-deep);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.86);
  border: 1.5px solid #fff;
  box-shadow: inset 0 -6px 10px rgba(120, 205, 255, 0.28);
}
.socials a:hover { background: #fff; transform: translateY(-1px); }

/* ───────────────────────────── floating bits and dialogs ── */

.tower-label {
  position: fixed;
  z-index: 15;
  left: 0; top: 0;
  padding: 0.4em 0.9em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--blue-deep);
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 16px));
}
.tower-label small { font-weight: 400; color: var(--ink-soft); }

.loading {
  position: fixed;
  z-index: 15;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  transform: translateX(-50%);
}
.loading[hidden], .tower-label[hidden], .popover[hidden] { display: none; }
.spinner {
  width: 1.05em; height: 1.05em;
  border-radius: 50%;
  border: 3px solid rgba(20, 102, 216, 0.25);
  border-top-color: var(--blue);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

.dialog {
  width: min(100% - 24px, 460px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: clamp(22px, 4vw, 34px);
  border-radius: var(--radius);
  color: var(--ink);
  overflow: auto;
}
.dialog::backdrop { background: rgba(4, 22, 60, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog h2 { padding-right: 44px; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem); }
.dialog-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  color: var(--blue-deep);
  background: linear-gradient(#fff, #dff2ff);
  cursor: pointer;
}
.dialog-close svg { width: 18px; height: 18px; }
.dialog.video { width: min(100% - 24px, 980px); padding: 10px; background: #061a3a; border-color: rgba(255, 255, 255, 0.5); }
.dialog.video video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; background: #000; }
.dialog.video .dialog-close { top: 18px; right: 18px; }

.noscript { position: relative; z-index: 2; margin: 0; padding: 1em; text-align: center; background: #fff; }

/* ───────────────────────── support, privacy and terms pages ── */
/* Plain pages of text: the same glass panel over one still picture of the city. */

.doc-page main { pointer-events: auto; }
.doc-page .backdrop { opacity: 1; }
.doc {
  display: grid;
  justify-items: center;
  padding: calc(var(--nav-height) + 44px) clamp(14px, 4vw, 48px) 64px;
}
.doc .panel { width: min(100%, 760px); }
.doc h1 {
  font: 400 clamp(2rem, 1.3rem + 2.8vw, 2.9rem)/1.06 var(--display);
  color: var(--blue-deep);
}
.doc h2 { margin-top: 1.5em; font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.6rem); }
.doc ul { margin: 0 0 1em; padding-left: 1.3em; }
.doc li { margin-bottom: 0.45em; }
.updated { font-size: 0.9rem; font-weight: 700; color: var(--ink-soft); }
.help { display: grid; gap: 12px; margin: 1.2em 0; }
.help section {
  padding: 14px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #fff;
  box-shadow: inset 0 -10px 16px rgba(120, 205, 255, 0.18);
}
.help h2 { margin: 0 0 0.3em; font: 700 1.1rem/1.25 var(--body); color: var(--ink); }
.help p { margin: 0; }

/* ─────────────────────────────────────── smaller screens ── */

@media (max-width: 900px) {
  .nav-links a { padding: 0.5em 0.6em; font-size: 0.9rem; }
  #view-label { display: none; }
}

@media (max-width: 760px) {
  :root { --nav-height: 56px; --radius: 24px; }
  .nav { padding: 0 8px 0 12px; }
  .nav-logo img { height: 34px; }
  .nav-tools { margin-left: auto; }
  .tool.menu { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 10px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1.5px solid #fff;
    box-shadow: 0 22px 56px rgba(6, 46, 104, 0.34);
  }
  .nav-links.open { display: flex; }
  .doc-page .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 0;
    margin: 0 0 0 auto;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .doc-page .nav-links a { padding: 0.5em 0.6em; font-size: 0.9rem; }
  .doc-page .nav-tools { display: none; }
  .nav-links a { padding: 0.8em 1em; font-size: 1rem; }
  .stop { padding: calc(var(--nav-height) + 30px) 14px 40px; justify-items: stretch; }
  /* On a phone the panel sits low, so the city shows above it. */
  .stop:not(#join, #survey, #news) { align-content: end; }
  .stop + .stop { margin-top: 55vh; }
  .panel, .panel.wide { width: 100%; }
  .scroll-cue { justify-self: center; }
  .faces { grid-template-columns: repeat(3, 1fr); }
  .news-item.has-picture { grid-template-columns: 1fr 84px; }
  .news-item img { width: 84px; height: 66px; }
  .tower-label { transform: translate(-50%, calc(-100% - 28px)); }
  /* Panels stay short on a phone, so the city shows above and below them. */
  .panel { padding: 20px 18px; }
  .hero h1 { margin: 0 0 0.45em; }
  .hero h1 img { width: min(70%, 250px); margin: 0 auto; }
  .lead { font-size: 1rem; }
  .countdown { margin: 0.8em 0; padding: 0.65em 0.8em; }
  .countdown-clock b { font-size: 1.5rem; }
  .actions { gap: 8px; margin: 0.9em 0 0.6em; }
  /* Two a row: with the App Store as well, three in one row overflowed. */
  .actions .button { flex: 1 1 40%; padding: 0.78em 0.5em; font-size: 0.93rem; white-space: nowrap; }
  .wide-only { display: none; }
  .hint { margin-top: 0.8em; font-size: 0.88rem; }
  .eyebrow { margin-bottom: 0.7em; font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Windows high-contrast and similar: let the system draw plain boxes. */
@media (forced-colors: active) {
  .panel, .nav, .dialog, .popover { background: Canvas; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .panel::before, .button::before { display: none; }
}
