/* Editorial sections shared styles
   Wave 3B: self-selection scatter, UK module, hidden gems panel.
   Uses tokens from tokens.css; do not redefine variables here. */

.section--editorial {
  background: transparent;
  padding-top: clamp(56px, 10vh, 120px);
  padding-bottom: clamp(56px, 10vh, 120px);
}

.section--editorial .ed-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3.0rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--brand-navy);
  margin: 12px 0 16px;
  max-width: 22ch;
}

.section--editorial .ed-lead {
  font-family: var(--font-body);
  font-size: clamp(1.0rem, 1.4vw, 1.15rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 64ch;
  margin-bottom: 28px;
}

.section--editorial .ed-lead strong {
  color: var(--scale-5);
  font-weight: 600;
}

.section--editorial .ed-footnote {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 14px;
  max-width: 64ch;
}

.section--editorial .ed-chart-wrap {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
}

.section--editorial .ed-chart {
  width: 100%;
  height: clamp(360px, 50vh, 560px);
  display: block;
  overflow: visible;
}

@media (max-width: 720px) {
  .section--editorial .ed-chart-wrap { padding: 16px 10px; }
  .self-selection-chart .label { font-size: 10px; }
}

/* Self-selection chart */
.self-selection-chart .axis-baseline {
  stroke: rgba(15, 27, 51, 0.06);
  stroke-width: 1;
}
.self-selection-chart .axis-tick {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  fill: var(--muted);
  letter-spacing: 0.02em;
}
.self-selection-chart .axis-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  fill: var(--ink-soft);
}
.self-selection-chart .dot {
  fill: var(--scale-3);
  opacity: 0.5;
  transition: opacity var(--dur-fast);
}
.self-selection-chart .dot.is-highlight {
  fill: var(--brand-sky);
  opacity: 1;
}
.self-selection-chart .dot.is-highlight.is-loud {
  fill: var(--scale-5);
}
.self-selection-chart .regression {
  stroke: var(--ink-soft);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  opacity: 0.4;
  fill: none;
}
.self-selection-chart .leader {
  stroke: var(--ink);
  stroke-width: 1;
  opacity: 0.5;
}
.self-selection-chart .label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  fill: var(--ink);
  paint-order: stroke fill;
  stroke: var(--paper-2);
  stroke-width: 4;
  stroke-linejoin: round;
  pointer-events: none;
}
.self-selection-chart .annotation {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  fill: var(--ink-soft);
}

/* UK module */
.uk-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: stretch;
  max-width: 980px;
}
.uk-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.uk-card--win { border-color: rgba(46, 123, 232, 0.40); }
.uk-card--loss { border-color: rgba(176, 67, 42, 0.40); }
.uk-rank {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 3.4rem;
  line-height: 1;
  margin: 0;
}
.uk-card--win .uk-rank { color: var(--brand-navy); }
.uk-card--loss .uk-rank { color: var(--scale-5); }
.uk-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--ink);
  margin: 0;
}
.uk-country {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 8px;
}
.uk-stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.uk-stats li {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.uk-stats .metric-label {
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.uk-stats .metric-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.uk-cta {
  color: var(--brand-sky);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: auto;
  padding-top: 14px;
}
.uk-cta:hover { text-decoration: underline; }
.uk-vs {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 0 8px;
}
.uk-vs-line {
  width: 1px;
  height: 40%;
  background: var(--line-strong);
}
.uk-vs-pill {
  background: var(--ink);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.uk-vs-train {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

@media (max-width: 720px) {
  .uk-grid { grid-template-columns: 1fr; }
  .uk-vs { padding: 6px 0; }
  .uk-vs-line { width: 40%; height: 1px; }
  .uk-vs-train { writing-mode: horizontal-tb; transform: none; }
}

/* Hidden gems */
.gems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  max-width: 1100px;
}
.gem-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gem-rank {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--brand-navy);
  line-height: 1;
  margin: 0;
}
.gem-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0;
}
.gem-country {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 6px;
}
.gem-score {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  margin: 4px 0 0;
}
.gem-score .gem-score-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-navy);
}
.gem-ig {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}
.gem-blurb {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  margin: 8px 0;
  line-height: 1.5;
}
.gem-cta {
  color: var(--brand-sky);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: auto;
  padding-top: 14px;
}
.gem-cta:hover { text-decoration: underline; }

/* Compare pills: stack city + country with a tight caption.
   Defined here (not in compare.css) because this stylesheet loads later
   and we need to override the simple .compare-pill rule without touching it. */
.compare-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 22px;
  line-height: 1.15;
}
.compare-pill .city-line {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.compare-pill .city {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.compare-pill .country {
  font-family: var(--font-body);
  font-size: 0.74rem;
  opacity: 0.85;
  font-weight: 500;
  letter-spacing: 0.01em;
}
