.sa {
  --sa-top: 73px;
  --sa-bg: #ffffff;
  --sa-ground: #eef0f3;
  --sa-line: #e5e7eb;
  --sa-soft-ink: #374151;
  background: var(--sa-bg);
  color: var(--ink);
  font-family: var(--sans);
}

.sa-hero {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 112px) var(--gutter) clamp(24px, 4vw, 40px);
  text-align: center;
}

.sa-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.6rem, 7.2vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}

.sa-lead {
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
  line-height: 1.6;
  color: var(--sa-soft-ink);
  max-width: 680px;
  margin: 0 auto 18px;
}

.sa-byline {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}

.sa-byline a,
.sa-article a {
  color: var(--coral-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sa-scrolly {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 0 40px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sa-stage {
  position: sticky;
  top: var(--sa-top);
  height: calc(100vh - var(--sa-top));
  height: calc(100svh - var(--sa-top));
  min-height: 420px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--sa-ground);
}

.sa-canvas,
.sa-map-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.sa-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 48px;
}

.sa-fallback svg {
  max-width: 100%;
  max-height: 100%;
}

.sa-hud {
  position: absolute;
  top: 24px;
  left: 24px;
  max-width: min(420px, calc(100% - 48px));
  pointer-events: none;
}

.sa-hud p {
  margin: 0;
}

.sa-hud-city {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sa-soft-ink);
}

.sa-hud-num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 8px !important;
}

.sa-hud-unit {
  font-family: var(--sans);
  font-size: 0.32em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--sa-soft-ink);
}

.sa-hud-sub {
  font-size: 0.98rem;
  color: var(--sa-soft-ink);
}

.sa-hud-compare {
  margin-top: 10px !important;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.sa-hud-lost {
  margin-top: 4px !important;
  font-size: 0.88rem;
  color: var(--sa-soft-ink);
}

.sa-hud {
  transition: opacity 0.8s ease;
}

.sa-stage.is-intro .sa-hud,
.sa-stage.is-intro .sa-legend {
  opacity: 0;
}

.sa-legend {
  transition: opacity 0.8s ease;
}

.sa-hud-gone {
  margin-top: 10px !important;
  font-size: 0.9rem;
  color: var(--coral-text);
  font-weight: 600;
  min-height: 1.4em;
}

.sa-legend {
  position: absolute;
  left: 24px;
  bottom: 18px;
  margin: 0;
  font-size: 0.82rem;
  color: var(--sa-soft-ink);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.sa-legend-line {
  width: 28px;
  border-top: 2px dashed var(--coral-text);
}

.sa-steps {
  position: relative;
  z-index: 2;
  padding: 18vh 0 10vh;
}

.sa-step {
  min-height: 92vh;
  display: flex;
  align-items: center;
}

.sa-step:last-child {
  min-height: 100vh;
}

.sa-card {
  background: var(--white);
  border: 1px solid var(--sa-line);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.05);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}

.sa-step.is-active .sa-card {
  transform: none;
  box-shadow: 0 22px 56px rgba(17, 24, 39, 0.12);
}

.sa-card p {
  margin: 0;
  color: var(--sa-soft-ink);
  line-height: 1.65;
}

.sa-step-title {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 0 0 12px;
}

.sa-card-explore .sa-step-title {
  margin-bottom: 20px;
}

.sa-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.sa-field label,
.sa-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0;
}

.sa-field output {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--coral-text);
  font-variant-numeric: tabular-nums;
}

.sa-select,
.sa-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: var(--white);
  font: inherit;
  color: var(--ink);
}

.sa-select:focus-visible,
.sa-input:focus-visible,
.sa-range:focus-visible,
.sa-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.sa-range {
  width: 100%;
  accent-color: var(--coral-text);
  min-height: 32px;
}

.sa-explore-note {
  font-size: 0.88rem !important;
  margin-bottom: 18px !important;
}

.sa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sa-btn:hover {
  background: var(--ink);
  color: var(--white);
}

.sa-btn-primary {
  background: var(--ink);
  color: var(--white);
}

.sa-btn-primary:hover {
  background: var(--coral-dark);
  border-color: var(--coral-dark);
}

.sa-status {
  min-height: 1.4em;
  margin-top: 12px !important;
  font-size: 0.9rem;
}

.sa-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter) 0;
}

.sa-section-head {
  max-width: 720px;
  margin-bottom: 32px;
}

.sa-h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 14px;
}

.sa-section-lead {
  margin: 0;
  color: var(--sa-soft-ink);
  font-size: 1.08rem;
  line-height: 1.6;
}

.sa-map {
  position: relative;
  height: clamp(420px, 62vw, 680px);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--sa-ground);
}

.sa-map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 20px;
}

.sa-map-budget {
  flex: 1 1 320px;
  max-width: 480px;
  margin-bottom: 0;
}

.sa-map {
  transition: background-color 1.2s ease;
}

.sa-map.is-night {
  background: #0f172a;
}

.sa-map.is-night .sa-map-hint {
  color: #cbd5e1;
}

.sa-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

.sa-tip {
  position: absolute;
  z-index: 3;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.9rem;
  line-height: 1.4;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 14px));
}

.sa-map-hint {
  position: absolute;
  left: 20px;
  bottom: 16px;
  margin: 0;
  font-size: 0.85rem;
  color: var(--sa-soft-ink);
}

.sa-filter {
  max-width: 420px;
}

.sa-rank {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--sa-line);
}

.sa-rank-row {
  display: grid;
  grid-template-columns: 40px minmax(140px, 220px) minmax(0, 1fr) 110px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--sa-line);
  font-variant-numeric: tabular-nums;
}

.sa-rank-row[hidden] {
  display: none;
}

.sa-rank-pos {
  color: var(--muted);
  font-size: 0.9rem;
}

.sa-rank-name {
  font-weight: 600;
}

.sa-rank-bar {
  height: 10px;
  border-radius: var(--radius-pill);
  background: #f3f4f6;
  overflow: hidden;
}

.sa-rank-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
}

.sa-rank-row.is-low .sa-rank-bar span {
  background: var(--coral);
}

.sa-rank-val {
  text-align: right;
  font-weight: 600;
}

.sa-empty {
  color: var(--muted);
}

.sa-cmp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.sa-plan {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-card);
  background: var(--sa-ground);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 24px;
}

.sa-plan svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sa-plan-cap {
  margin: 12px 0 0;
  font-weight: 600;
}

.sa-cmp-sum {
  margin: 28px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  line-height: 1.3;
  max-width: 820px;
}

.sa-use {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}

.sa-use-col {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.sa-use-col p {
  margin: 0;
}


.sa-small {
  font-size: 0.9rem;
  color: var(--muted);
}

.sa-article {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter) clamp(64px, 9vw, 120px);
  line-height: 1.75;
  color: var(--sa-soft-ink);
}

.sa-article h2 {
  font-family: var(--serif);
  color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
  margin: 48px 0 14px;
}

.sa-article h2:first-child {
  margin-top: 0;
}

.sa-article h3 {
  color: var(--ink);
  font-size: 1.12rem;
  margin: 28px 0 8px;
}

.sa-article p {
  margin: 0 0 16px;
}

.sa-sources {
  padding-left: 20px;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.sa-sources li {
  margin-bottom: 10px;
}

@media (max-width: 960px) {
  .sa {
    --sa-top: 65px;
  }

  .sa-scrolly {
    display: block;
    padding: 0;
  }

  .sa-stage {
    height: 62vh;
    height: 62svh;
    min-height: 360px;
    border-radius: 0;
  }

  .sa-hud {
    top: 16px;
    left: 16px;
  }

  .sa-hud-gone,
  .sa-hud-lost {
    display: none;
  }

  .sa-hud-compare {
    font-size: 0.85rem;
    margin-top: 6px !important;
  }

  .sa-legend {
    left: 16px;
    bottom: 12px;
    font-size: 0.76rem;
  }

  .sa-steps {
    padding: 0 16px 8vh;
    margin-top: -14vh;
  }

  .sa-step {
    min-height: 78vh;
    align-items: flex-end;
  }

  .sa-step:last-child {
    min-height: 90vh;
  }

  .sa-card {
    padding: 22px;
  }

  .sa-step-title {
    font-size: 1.3rem;
  }

  .sa-cmp,
  .sa-use {
    grid-template-columns: 1fr;
  }

  .sa-rank-row {
    grid-template-columns: 28px minmax(0, 1fr) 92px;
    gap: 10px;
  }

  .sa-rank-bar {
    grid-column: 2 / 4;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sa-card,
  .sa-btn {
    transition: none;
  }

  .sa-card {
    transform: none;
  }
}
