:root {
  color-scheme: light;
  --font-body: "SF Pro Text", "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --font-display: "SF Pro Display", "PingFang SC", "Noto Sans SC", sans-serif;
  --bg: #f5f5f7;
  --bg-soft: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0066cc;
  --line: rgba(29, 29, 31, 0.1);
  --line-strong: rgba(0, 102, 204, 0.35);
  --card: rgba(255, 255, 255, 0.84);
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  --radius: 20px;
  --space-l: clamp(1.3rem, 2.2vw, 2.25rem);
  --space-m: clamp(0.88rem, 1.5vw, 1.18rem);
  font-family: var(--font-body);
  line-height: 1.58;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 6%, rgba(0, 102, 204, 0.08), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, #fbfbfd 48%, var(--bg) 100%);
  color: var(--text);
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0.8rem;
  padding: 0.44rem 0.84rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  z-index: 20;
}

.skip:focus {
  left: 0.8rem;
}

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

.site-header,
.site-main,
.site-footer,
.wrap--chart {
  width: min(76rem, calc(100% - 2.25rem));
  margin: 0 auto;
}

.home-page .site-header {
  padding: clamp(3rem, 8vw, 7rem) 0 clamp(2rem, 5vw, 4rem);
  text-align: center;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand {
  margin: 0.75rem auto 0;
  max-width: 15ch;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 7.2vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
}

.hero-tagline {
  margin: 1.1rem auto 0;
  max-width: 44rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.15rem);
}

.site-main {
  padding-bottom: clamp(2.4rem, 6vw, 5.2rem);
}

.panel + .panel {
  margin-top: 1.35rem;
}

.panel-title {
  margin: 0 0 0.88rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid--recommend {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entry-card {
  position: relative;
  display: grid;
  gap: 0.35rem;
  padding: var(--space-l);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(168deg, var(--card), rgba(255, 255, 255, 0.74));
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
  opacity: 0;
  transform: translateY(12px);
  animation: riseIn 420ms ease forwards;
}

.entry-card:nth-child(2) {
  animation-delay: 80ms;
}

.card-grid--minor .entry-card:nth-child(1) {
  animation-delay: 140ms;
}

.card-grid--minor .entry-card:nth-child(2) {
  animation-delay: 200ms;
}

.card-grid--recommend .entry-card:nth-child(1) {
  animation-delay: 260ms;
}

.card-grid--recommend .entry-card:nth-child(2) {
  animation-delay: 300ms;
}

.card-grid--recommend .entry-card:nth-child(3) {
  animation-delay: 340ms;
}

.entry-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.entry-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.entry-title {
  font-size: clamp(1.1rem, 2.1vw, 1.36rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.entry-sub,
.entry-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.entry-meta {
  margin-top: 0.26rem;
}

.entry-card--minor {
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.9), rgba(249, 249, 252, 0.78));
}

.site-footer {
  padding-bottom: 2rem;
}

.footer-line {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.footer-updated {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.viz-page .wrap--chart {
  padding: 1.2rem 0 1.7rem;
}

.viz-top {
  margin-bottom: 0.95rem;
}

.viz-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.98rem;
  text-decoration: none;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease;
}

.viz-back:hover {
  border-color: var(--line-strong);
}

.viz-title {
  margin: 0.6rem 0 0.2rem;
  font-size: 1.5rem;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  font-weight: 600;
}

.viz-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.viz-ref {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.viz-ref a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 102, 204, 0.28);
  transition: border-color 180ms ease;
}

.viz-ref a:hover,
.viz-ref a:focus-visible {
  border-bottom-color: var(--line-strong);
}

.viz-ref-text {
  color: var(--muted);
}

.viz-frame {
  width: 100%;
  min-height: 90vh;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.cities-page .wrap--chart {
  padding: 1.2rem 0 2.1rem;
}

.cities-toolbar {
  position: sticky;
  top: 0.7rem;
  z-index: 5;
  margin: 0.95rem 0 1.05rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 6px);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(248, 249, 251, 0.88));
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.city-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.96rem;
  padding: 0.7rem 0.86rem;
  color: var(--text);
  background: #fff;
}

.city-search::placeholder {
  color: var(--muted);
}

.city-search:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.alpha-nav {
  margin-top: 0.78rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.44rem;
}

.alpha-link {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.alpha-link span {
  font-size: 0.68rem;
  color: var(--accent);
}

.alpha-link:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  color: var(--text);
}

.cities-empty {
  margin: 1.2rem 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.city-groups {
  display: grid;
  gap: 0.92rem;
}

.city-group {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  padding: 0.95rem;
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.92), rgba(251, 251, 253, 0.8));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.city-group[hidden] {
  display: none;
}

.city-group-title {
  margin: 0 0 0.66rem;
  font-size: 0.84rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.city-grid {
  display: grid;
  gap: 0.52rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.city-card {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.55rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--text);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.city-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

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

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 50rem) {
  .home-page .site-header {
    padding-top: clamp(2.3rem, 8vw, 3rem);
    padding-bottom: 1.6rem;
  }

  .hero-tagline {
    max-width: 30rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .city-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .entry-card {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .skip,
  .site-footer {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .site-header,
  .site-main,
  .wrap--chart {
    width: 100%;
  }

  .entry-card,
  .viz-frame {
    box-shadow: none;
    background: #fff;
    border-color: #000;
    color: #000;
  }
}
