/* Vice City at night. One committed dark look: violet night sky, a striped sunset sun in the
   hero, hot pink / sunset orange / cyan neon. Poster capitals for headings, a script wordmark.
   Layout: full-width sunset bands for the hero and page titles, content in one centered column;
   chapters as five big numbered tiles, tips as cards in a two-column grid. */
:root {
  --bg: #0E0720;
  --bg-2: #160B30;
  --surface: #1C1040;
  --surface-2: #27175A;
  --line: #3D2A78;
  --ink: #FFF6EC;
  --ink-2: #D5C9EE;
  --ink-3: #A193C8;
  --pink: #FF3F9E;
  --orange: #FF8A3C;
  --yellow: #FFD166;
  --cyan: #3DE4E4;
  --ok: #55E6A5;
  --warn: #FFC857;
  --bad: #FF7A8C;
  --sunset: linear-gradient(180deg, #FFD166 0%, #FF8A3C 38%, #FF3F9E 78%, #B13CFF 100%);
  --sunset-x: linear-gradient(90deg, #FFD166, #FF8A3C 35%, #FF3F9E 75%, #B13CFF);

  --font-display: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  --font-script: "Yellowtail", "Brush Script MT", cursive;
  --font-body: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  --step-3: clamp(2.2rem, 1.5rem + 3vw, 3.5rem);
  --step-4: clamp(3rem, 1.4rem + 8vw, 6.75rem);
  --radius: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bg);
}

h1, h2, h3, p, ul, ol { margin: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; line-height: 1.02; letter-spacing: 0.01em; text-wrap: balance; }
h3 { font-family: var(--font-body); font-weight: 700; line-height: 1.2; text-wrap: balance; }
[hidden] { display: none !important; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--yellow); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  max-width: 1100px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 2px 28px; flex-wrap: wrap; padding-block: 8px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-script);
  font-size: 1.9rem;
  line-height: 1.2;
  color: var(--pink);
  text-decoration: none;
  text-shadow: 0 0 18px color-mix(in srgb, var(--pink) 65%, transparent);
  padding-right: 6px;
}
.brand:hover { color: var(--pink); }
.brand-mark, .sun {
  border-radius: 50%;
  background: var(--sunset);
  -webkit-mask: linear-gradient(#000 0 52%, transparent 52%), repeating-linear-gradient(180deg, #000 0 9%, transparent 9% 15%);
  mask: linear-gradient(#000 0 52%, transparent 52%), repeating-linear-gradient(180deg, #000 0 9%, transparent 9% 15%);
}
.brand-mark { width: 26px; height: 26px; flex: none; }

.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; margin-inline: -8px; }
.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--bg); background: var(--yellow); }

/* ---------- Bands: hero and page titles span the full width ---------- */

.page { padding-block: 0 72px; }

.hero, .page-head { position: relative; isolation: isolate; }
.hero::before, .page-head::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0 auto 0 50%;
  width: 100vw;
  translate: -50% 0;
  background:
    radial-gradient(ellipse 70% 90% at 78% 110%, rgba(255, 63, 158, 0.38), transparent 70%),
    linear-gradient(180deg, #2B1160 0%, #1B0B3F 55%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.hero { clip-path: inset(0 -100vmax); display: grid; gap: 20px; padding-block: clamp(40px, 7vw, 88px) clamp(36px, 5vw, 64px); }
.hero h1 {
  font-size: var(--step-4);
  line-height: 0.95;
  max-width: 9ch;
  background: var(--sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 28px rgba(255, 63, 158, 0.35));
}
.hero .lede, .hero .search-form, .hero .live-results { max-width: 600px; }

/* The striped setting sun. */
.sun {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  width: min(40vw, 440px);
  aspect-ratio: 1;
  translate: 0 30%;
  opacity: 0.95;
  filter: drop-shadow(0 0 60px rgba(255, 138, 60, 0.5));
}

.lede { color: var(--ink-2); font-size: var(--step-1); line-height: 1.4; max-width: 60ch; }

.page-head { display: grid; gap: 12px; padding-block: clamp(28px, 5vw, 56px) clamp(24px, 4vw, 40px); margin-bottom: 32px; }
.page-head h1 { font-size: var(--step-3); max-width: 22ch; }
.kicker { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--yellow); }
.kicker a { color: inherit; }
.byline { color: var(--ink-3); font-size: var(--step--1); margin: -12px 0 24px; }

.section { margin-top: 64px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 22px; }
.section-head h2 { font-size: var(--step-2); }
.section-head h2::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--sunset-x); }
.section-head p { color: var(--ink-2); max-width: 54ch; }

/* ---------- Search ---------- */

.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; }

input[type="search"], select {
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--ink);
}
input[type="search"]::placeholder { color: var(--ink-3); }
input[type="search"]:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 30%, transparent); }
.hero input[type="search"] { padding-block: 16px; font-size: 1.1rem; background: color-mix(in srgb, var(--bg) 80%, transparent); border-color: var(--pink); }

.button, .search-form button {
  display: inline-block;
  padding: 13px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--pink);
  color: #1A0312;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 24px color-mix(in srgb, var(--pink) 45%, transparent);
}
.button:hover, .search-form button:hover { background: var(--yellow); color: #1A0312; }
.more { margin-top: 24px; }

.live-results, .guide-hits {
  display: grid;
  background: var(--bg-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.guide-hits { margin-bottom: 16px; }
.guide-hits-label { padding: 10px 16px 0; font-size: var(--step--1); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--yellow); }
.hit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 12px;
  align-items: baseline;
  padding: 12px 16px;
  color: var(--ink);
  text-decoration: none;
  border-top: 1px solid var(--line);
}
.hit:first-child, .guide-hits-label + .hit { border-top: 0; }
.hit:hover, .hit:focus-visible { background: var(--surface); color: var(--ink); }
.hit strong { font-weight: 600; }
.hit-kind { grid-row: span 2; align-self: start; margin-top: 2px; min-width: 62px; text-align: center; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.hit-tip { background: color-mix(in srgb, var(--cyan) 18%, transparent); color: var(--cyan); }
.hit-guide { background: color-mix(in srgb, var(--pink) 20%, transparent); color: var(--pink); }
.hit-chapter { background: color-mix(in srgb, var(--yellow) 18%, transparent); color: var(--yellow); }
.hit-text { grid-column: 2; color: var(--ink-3); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit-more { padding: 12px 16px; border-top: 1px solid var(--line); font-weight: 700; text-decoration: none; }
.hit-none { padding: 14px 16px; color: var(--ink-2); }

/* ---------- Chapter tiles ---------- */

.route { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.route li { min-width: 0; display: grid; }

.stop {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 28px;
  min-height: 210px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%);
  border: 1.5px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: translate 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.stop-num {
  font-family: var(--font-display);
  font-size: 5.5rem;
  line-height: 0.8;
  background: var(--sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stop-body { display: grid; gap: 3px; }
.stop-body strong { font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.stop-body span { color: var(--ink-2); font-size: 0.9rem; }
.stop-body em { color: var(--ink-3); font-size: var(--step--1); font-style: normal; margin-top: 8px; }
.stop:hover, .stop.is-current { color: var(--ink); border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink), 0 10px 40px -10px color-mix(in srgb, var(--pink) 60%, transparent); }
.stop:hover { translate: 0 -4px; }
.stop.is-current::after {
  content: "You were here";
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--pink);
  color: #1A0312;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ---------- Guide cards and topics ---------- */

.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.guide-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 22px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, translate 0.15s ease;
}
.guide-card strong { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.08; text-transform: uppercase; letter-spacing: 0.01em; }
.guide-card span { color: var(--ink-2); font-size: 0.98rem; }
.guide-card em { color: var(--ink-3); font-size: var(--step--1); font-style: normal; }
.guide-card::after { content: "Read guide →"; color: var(--cyan); font-weight: 700; font-size: 0.9rem; margin-top: 4px; }
.guide-card:hover { color: var(--ink); border-color: var(--cyan); translate: 0 -3px; }
.guide-card:hover strong { color: var(--yellow); }

.topic-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.topic-list a {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 10px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.topic-list a:hover { border-color: var(--pink); color: var(--pink); }
.topic-list span { color: var(--yellow); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Tips ---------- */

.tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.tip {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 20px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  scroll-margin-top: 84px;
}
.tip:target { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink), 0 0 40px -8px color-mix(in srgb, var(--pink) 60%, transparent); }
.tip-title { font-size: 1.25rem; }
.tip p { color: var(--ink-2); }
.tip-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tip .tip-foot { color: var(--ink-3); font-size: var(--step--1); }
.tip-foot a { color: inherit; }
.tip-foot a:hover { color: var(--cyan); }

.tag, .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.tag { background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); }
.status { font-weight: 700; border: 1px solid currentColor; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status-confirmed { color: var(--ok); }
.status-reported { color: var(--warn); }
.status-disputed { color: var(--bad); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.filters input[type="search"] { flex: 1 1 260px; min-width: 0; }
.filters select { min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.chip {
  padding: 7px 15px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover { border-color: var(--pink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: #1A0312; }
.result-count { color: var(--ink-3); font-size: 0.9rem; margin-bottom: 14px; }
.empty { color: var(--ink-2); padding: 24px 0; }

/* ---------- Prose (guides, chapters) ---------- */

.prose { display: grid; gap: 16px; max-width: 74ch; }
.prose h2 { font-size: var(--step-2); margin-top: 24px; }
.prose h3 { font-size: var(--step-1); margin-top: 8px; }
.prose > p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: 8px; }
.prose ol li::marker { color: var(--pink); font-weight: 700; }

.checklist, .label-list { list-style: none; padding: 0 !important; gap: 0 !important; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.checklist li + li, .label-list li + li { border-top: 1px solid var(--line); }
.checklist label { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; cursor: pointer; }
.checklist label:hover { background: var(--surface-2); }
.checklist input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--pink); }
.checklist span { color: var(--ink); }
.checklist input:checked + span { color: var(--ink-3); text-decoration: line-through; }
.label-list li { padding: 14px 18px; }
.label-list .status { margin-right: 10px; }

.callout {
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--orange);
  background: color-mix(in srgb, var(--orange) 12%, var(--bg));
  max-width: 74ch;
}
.callout p { color: var(--ink); }
.page > div > .callout, .page > .callout { margin-bottom: 24px; }

.table-scroll { overflow-x: auto; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; font-variant-numeric: tabular-nums; }
th, td { padding: 13px 16px; text-align: left; vertical-align: top; }
th { background: var(--surface-2); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--yellow); white-space: nowrap; }
td { border-top: 1px solid var(--line); color: var(--ink-2); }
td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }

.sources { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); }
.sources h2 { font-family: var(--font-body); font-weight: 700; font-size: var(--step--1); letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: 10px; }
.sources ul { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 0.95rem; }
.sources a { color: var(--ink-2); }

.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-weight: 700; }
.pager a { text-decoration: none; }

/* ---------- What's new ---------- */

.log-day { margin-top: 28px; }
.log-day h2 { font-size: var(--step-2); display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; padding-bottom: 10px; border-bottom: 2px solid var(--pink); }
.log-day h2 span { font-family: var(--font-body); font-size: var(--step--1); font-weight: 500; color: var(--ink-3); letter-spacing: 0; text-transform: none; }
.log-day ul { list-style: none; padding: 0; }
.log-day li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.log-day li a { color: var(--ink); font-weight: 600; margin-right: auto; text-decoration: none; }
.log-day li a:hover { color: var(--cyan); }

/* ---------- Feedback ---------- */

.report-btn, .link-btn {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: var(--step--1);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.report-btn:hover, .link-btn:hover { color: var(--pink); }

.report-form, .feedback-form { display: grid; gap: 12px; }
.report-form { padding-top: 12px; border-top: 1px dashed var(--line); }
.report-title { font-weight: 700; }
.feedback-form { max-width: 640px; }
.feedback-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
.feedback-form legend { font-weight: 700; margin-bottom: 10px; padding: 0; }

.reason-row { display: flex; flex-wrap: wrap; gap: 8px; }
.reason { position: relative; }
.reason input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.reason span {
  display: inline-block;
  padding: 7px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 600;
}
.reason input:checked + span { background: var(--pink); border-color: var(--pink); color: #1A0312; }
.reason input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; }
.field em { font-style: normal; font-weight: 400; color: var(--ink-3); }
.feedback-form input[type="text"], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}
.feedback-form input[type="text"]:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 30%, transparent); }
::placeholder { color: var(--ink-3); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.form-status { color: var(--ink-2); font-size: 0.92rem; }
.button-small { padding: 9px 16px; }
.button:disabled { opacity: 0.6; cursor: wait; }
.report-done { color: var(--ok); font-weight: 600; }
.fine-print { margin-top: 20px; color: var(--ink-3); font-size: var(--step--1); }
.page-feedback { margin-top: 32px; color: var(--ink-2); }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); background: var(--bg-2); color: var(--ink-3); font-size: var(--step--1); }
.footer-inner { display: grid; gap: 4px; padding-block: 22px 30px; }
.footer-feedback { color: var(--ink-2); font-size: 0.95rem; margin-bottom: 6px; }
.footer a { color: var(--ink-2); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .route { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .stop { min-height: 180px; }
}

@media (max-width: 680px) {
  .tips { grid-template-columns: minmax(0, 1fr); }
  .section { margin-top: 44px; }
  .sun { width: 62vw; opacity: 0.5; }
  .stop.is-current::after { top: auto; bottom: 14px; }
  .route { grid-template-columns: minmax(0, 1fr); }
  .stop { min-height: 0; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 14px; }
  .stop-num { font-size: 4rem; text-align: center; }
  .brand { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .stop, .guide-card { transition: none; }
  .stop:hover, .guide-card:hover { translate: none; }
}
