/* City Scan Pro — On Running club. Paper, ink, one coral flag. */

:root {
  --paper: #ffffff;
  --ink: #000000;
  --stage: #f5f5f5;
  --hair: #d4d4d4;
  --mute: #525252;
  --stone: #a3a3a3;
  --flag: #e63312;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
html, body { min-height: 100%; }
body.pro {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  background: var(--paper);
}
::selection { background: var(--ink); color: var(--paper); }
.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* —— utility strip —— */
.utility {
  margin: 0;
  padding: 8px 20px;
  background: var(--ink);
  color: #e5e5e5;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
}

.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* —— nav —— */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 22px 0 18px;
  background: var(--paper);
}
.mark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.mark-scope { display: none; }
.mark-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  font-style: normal;
}
.mark-name em {
  font-style: normal;
  font-weight: 700;
}
.tab {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.tab:hover { border-bottom-color: var(--hair); }
.tab.is-on,
.nav .tab[aria-current="page"] {
  border-bottom-color: var(--ink);
}
.mark[aria-current="page"] { cursor: default; }

/* —— stage —— */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 12px 0 32px;
}
.clubline {
  margin: 8px 0 36px;
  font-size: 16px;
  font-weight: 400;
  color: var(--mute);
  text-align: center;
  letter-spacing: -0.01em;
}

/* —— club desk —— */
.bar {
  position: relative;
  width: min(880px, 100%);
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 16px;
  padding: 0 0 20px;
  overflow: hidden;
}
.bar-bezel,
.corner { display: none; }

.transport {
  position: relative;
  padding: 22px 28px 0;
}
.ruler {
  position: relative;
  height: 1px;
  background: var(--hair);
  overflow: visible;
  margin-bottom: 14px;
}
.ruler-fill {
  height: 100%;
  width: 20%;
  background: var(--ink);
  transition: width 0.35s ease;
}
.playhead {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  margin-left: -3px;
  background: var(--ink);
  border-radius: 50%;
  left: 20%;
  transition: left 0.35s ease;
}
.ticks {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--stone);
}
.ticks li { flex: 1; min-width: 0; }
.ticks button {
  appearance: none;
  background: none;
  border: 0;
  padding: 2px 0;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: default;
  white-space: nowrap;
}
.ticks .is-done button,
.ticks .is-on button { cursor: pointer; }
.ticks .is-done { color: var(--mute); }
.ticks .is-on { color: var(--ink); font-weight: 600; }
.readout {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--mute);
  text-align: right;
}

/* frames */
#scanform { position: relative; }
.viewport { overflow: hidden; min-height: 220px; }
.reel { position: relative; width: 100%; }
.frame {
  width: 100%;
  padding: 22px 28px 8px;
  display: none;
}
.frame.is-active {
  display: block;
  animation: framein 0.28s ease;
}
@keyframes framein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.step[hidden], .actions[hidden], .err[hidden],
.picked[hidden], .soon-note[hidden], .lock[hidden],
.back[hidden], .mail[hidden], #phonewrap[hidden] { display: none; }

h2 {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.hint {
  margin: 0 0 20px;
  color: var(--mute);
  font-size: 16px;
  font-weight: 400;
}

/* inputs */
.picker { position: relative; }
.picker input[type=search],
.mail input[type=email],
.mail input[type=tel],
.search input {
  width: 100%;
  height: 48px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 40px;
  padding: 0 20px;
  outline: none;
}
.picker input[type=search] { border-radius: 12px; }
.mail input[type=email],
.mail input[type=tel] { border-radius: 12px; }
.picker input::placeholder,
.mail input::placeholder,
.search input::placeholder {
  color: var(--stone);
  font-weight: 400;
}
.picker input:focus,
.mail input:focus,
.search input:focus {
  border-color: var(--ink);
}
.mail input[readonly] {
  color: var(--mute);
  padding-right: 78px;
}

.drop {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  z-index: 20;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 12px;
  max-height: 36vh;
  overflow: auto;
  display: none;
}
.drop.open { display: block; }
.drop button {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--stage);
  padding: 12px 16px;
  color: var(--ink);
  font-family: var(--sans);
  cursor: pointer;
}
.drop button:last-child { border-bottom: 0; }
.drop button:hover,
.drop button[aria-selected="true"] { background: var(--stage); }
.drop .rank {
  font-size: 12px;
  font-weight: 500;
  color: var(--stone);
}
.drop .name { display: block; font-weight: 600; font-size: 16px; letter-spacing: -0.02em; }
.drop .st { display: block; font-size: 13px; color: var(--mute); }
.drop .tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--stone);
  white-space: nowrap;
}
.drop .tag.daily {
  color: var(--flag);
}

.picked { margin: 14px 0 0; font-size: 16px; }
.picked b { font-weight: 600; }
.picked .st-inline { color: var(--mute); font-size: 14px; margin-left: 4px; }
.picked .pill {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--hair);
  padding: 2px 8px;
  border-radius: 99px;
  color: var(--mute);
  vertical-align: 2px;
}
.picked .pill.live {
  color: #fff;
  background: var(--flag);
  border-color: var(--flag);
}
.soon-note {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--mute);
}

/* scan types */
.scans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.scan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  background: var(--stage);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 16px 14px 14px;
  color: var(--ink);
  font-family: var(--sans);
  cursor: pointer;
  min-height: 118px;
}
.scan:hover { border-color: var(--hair); }
.scan[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.scan-k {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stone);
}
.scan[aria-pressed="true"] .scan-k { color: #a3a3a3; }
.scan strong {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.scan span.line {
  color: var(--mute);
  font-size: 13px;
  line-height: 1.35;
}
.scan[aria-pressed="true"] span.line { color: #d4d4d4; }

/* specifics chips */
.spec-groups { display: flex; flex-direction: column; gap: 18px; }
.spec-g h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--mute);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none;
  border: 1px solid var(--hair);
  background: var(--paper);
  color: var(--mute);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 40px;
  cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.chip.is-off {
  color: var(--stone);
}

/* cadence */
.cadence {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--stage);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 16px 14px;
  color: var(--ink);
  font-family: var(--sans);
  cursor: pointer;
}
.opt:hover { border-color: var(--hair); }
.opt[aria-checked="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.opt-key {
  flex: 0 0 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 50%;
}
.opt[aria-checked="true"] .opt-key {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.opt-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.opt-copy strong { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.opt-copy span { color: var(--mute); font-size: 13px; line-height: 1.35; }
.opt[aria-checked="true"] .opt-copy span { color: #d4d4d4; }

/* how */
.channels { display: flex; gap: 8px; margin-bottom: 14px; }
.ch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 40px;
  padding: 0 20px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.ch:hover { border-color: var(--ink); }
.ch[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.ch[disabled],
.ch.is-locked {
  opacity: 0.55;
  cursor: default;
}
.ch-key {
  font-size: 14px;
  font-weight: 600;
  color: var(--mute);
}
.ch[aria-pressed="true"] .ch-key { color: #d4d4d4; }
.fields { display: flex; flex-direction: column; gap: 10px; }
.mail { position: relative; }
.lock {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--stone);
  border: 1px solid var(--hair);
  padding: 2px 8px;
  border-radius: 99px;
}
.recap {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--mute);
}

/* success */
.success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 220px;
}
.success h2 { font-size: 2rem; }
.pulse {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 0 0 16px;
  background: var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.pulse .ring { display: none; }
.pulse .check {
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--paper);
  line-height: 1;
}
.thanks-body {
  margin: 6px 0 0;
  color: var(--mute);
  font-size: 16px;
  max-width: 40ch;
}

.err {
  margin: 8px 28px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 28px 4px;
}
.back, .go, .ghost {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  height: 48px;
  padding: 0 32px;
  border-radius: 40px;
  cursor: pointer;
}
.back, .ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.back:hover, .ghost:hover { background: var(--stage); }
.back:active, .go:active, .ghost:active { transform: scale(0.98); }
.go {
  flex: 1;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}
.go:hover { background: #1a1a1a; }

/* —— footer —— */
.foot {
  width: 100%;
  margin: 0;
  padding: 20px 24px;
  background: var(--ink);
}
.foot p {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #a3a3a3;
  text-align: center;
}

/* —— cities page —— */
body.cities-page .stage {
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  padding-top: 12px;
}
.cities-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 28px;
  flex-wrap: wrap;
}
.cities-head h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.cities-head .count {
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
}
.live-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 28px;
}
.live-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 12px;
  padding: 20px 22px;
}
.live-card:hover { background: #1a1a1a; }
.live-card strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.live-card .meta { font-size: 13px; color: #a3a3a3; }
.live-card .go-live {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--flag);
  padding: 4px 9px;
  border-radius: 99px;
}
.search { max-width: 420px; margin: 0 0 18px; }
.search input {
  height: 48px;
  border-radius: 40px;
}
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin: 0 0 36px;
  padding: 0;
  list-style: none;
}
.city-grid li { margin: 0; }
.city-cell {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 14px 16px;
  background: var(--stage);
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  min-height: 56px;
}
a.city-cell:hover { border-color: var(--ink); }
.city-cell .rk {
  font-size: 12px;
  font-weight: 500;
  color: var(--stone);
}
.city-cell .nm { font-weight: 600; letter-spacing: -0.02em; }
.city-cell .st { display: block; font-size: 13px; color: var(--mute); }
.city-cell .stat {
  font-size: 11px;
  font-weight: 600;
  color: var(--stone);
  white-space: nowrap;
}
.city-cell .stat.daily {
  color: #fff;
  background: var(--flag);
  padding: 2px 8px;
  border-radius: 99px;
}
.empty-filter {
  grid-column: 1 / -1;
  color: var(--mute);
  font-size: 16px;
  padding: 12px 4px;
}

@media (min-width: 760px) {
  .app { padding: 0 32px 56px; }
  h2 { font-size: 2.25rem; }
}

@media (max-width: 759px) {
  .scans { grid-template-columns: 1fr 1fr; }
  .cadence { grid-template-columns: 1fr; }
  .live-row { grid-template-columns: 1fr; }
  .frame { padding: 18px 20px 6px; }
  .transport { padding: 18px 20px 0; }
  .actions { margin-left: 20px; margin-right: 20px; }
  .err { margin-left: 20px; margin-right: 20px; }
  .ticks { font-size: 12px; gap: 4px; }
}

@media (max-width: 419px) {
  .app { padding: 0 16px 36px; }
  .frame { padding: 16px 16px 4px; }
  .transport { padding: 16px 16px 0; }
  .actions, .err { margin-left: 16px; margin-right: 16px; }
  .ticks button { font-size: 11px; }
  h2 { font-size: 1.7rem; }
  .back, .go, .ghost { padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .ruler-fill, .playhead { transition: none; }
  .frame.is-active { animation: none; }
  .back:active, .go:active, .ghost:active { transform: none; }
}
