/* V2 editorial layout for country-resources.html. Loaded after nuclear-common_v2.css;
   the shared resource panel keeps country-energy-resources.css and is only re-framed. */
body.resource-page.nuclear-v2 {
  min-height: 100vh;
  overflow-x: clip;
  background: var(--v2-paper);
  color: var(--v2-ink);
  line-height: 1.45;
}

.resource-page.nuclear-v2 main { display: block; margin: 0; }
.resource-page.nuclear-v2 [id] { scroll-margin-top: 124px; }

.resource-page .resource-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--v2-paper) 88%, transparent);
  border-bottom-color: color-mix(in srgb, var(--v2-line) 72%, transparent);
  backdrop-filter: blur(18px);
}

.resource-page .resource-site-header .site-brand { margin-right: auto; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.resource-v2-hero {
  position: relative;
  isolation: isolate;
  border-bottom: 1px solid var(--v2-line);
}

.resource-v2-hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(18px, 3vh, 32px);
  padding-block: clamp(28px, 5vh, 64px) clamp(28px, 4vh, 54px);
}

.resource-v2-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.resource-v2-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--v2-muted); font-weight: 800; }
.resource-v2-hero-flag { display: inline-flex; flex: 0 0 36px; width: 36px; height: 24px; overflow: hidden; border: 1px solid var(--v2-line); border-radius: 4px; }
.resource-v2-hero-flag[hidden] { display: none; }
.resource-v2-hero-flag .common-country-flag { display: block; width: 100%; height: 100%; }

.resource-v2-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.resource-v2-switch { display: inline-flex; align-items: center; gap: 12px; }
.resource-v2-switch .v2-eyebrow { color: var(--v2-muted); }

.resource-page.nuclear-v2 .resource-v2-switch select {
  min-width: 220px;
  max-width: min(340px, 70vw);
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--v2-line);
  border-radius: 999px;
  background-color: var(--surf);
  color: var(--v2-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.resource-page.nuclear-v2 .resource-v2-switch select:hover { border-color: var(--v2-ink); }

.resource-v2-compare-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid var(--story-lime);
  border-radius: 999px;
  background: var(--story-lime);
  color: var(--story-stripe-text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.resource-v2-compare-open:hover,
.resource-v2-compare-open.is-active { background: transparent; color: var(--story-lime); }
.resource-v2-compare-open.is-active:hover { background: var(--story-lime); color: var(--story-stripe-text); }

/* --title-chars (set by country-energy-resources.js) keeps long names on the line. */
.resource-v2-hero h1 {
  margin: 0;
  color: var(--v2-ink);
  font-family: var(--v2-display);
  font-size: min(clamp(44px, 9vw, 142px), calc((min(100vw, 1600px) - 2 * var(--v2-gutter)) / (var(--title-chars, 8) * .72)));
  line-height: .86;
  letter-spacing: -.075em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.resource-v2-hero h1 span { display: block; margin-top: .14em; color: var(--story-lime); font-size: .42em; line-height: .95; letter-spacing: -.05em; }

.resource-v2-lede { max-width: 920px; margin: 0; font-size: clamp(17px, 1.5vw, 23px); line-height: 1.4; }
.resource-v2-lede strong { color: var(--story-lime); font-weight: 800; }

.resource-v2-facts { display: grid; gap: 12px; }
.resource-v2-facts[hidden] { display: none; }
.resource-v2-facts > h2 { margin: 0; color: var(--v2-muted); }

.resource-v2-facts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius);
  background: var(--v2-line);
}

.resource-v2-fact {
  position: relative;
  flex: 1 1 230px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 132px;
  padding: 18px 20px 18px 23px;
  background: var(--surf);
  color: var(--v2-ink);
  text-decoration: none;
  transition: background .2s;
}

.resource-v2-fact::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--cer-accent, var(--v2-accent)); }
.resource-v2-fact:is(:hover, :focus-visible) { background: var(--surf2); }
.resource-v2-fact-label { display: flex; align-items: center; gap: 8px; color: var(--v2-muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.resource-v2-fact-icon { display: inline-flex; flex: 0 0 18px; width: 18px; height: 18px; color: var(--cer-accent, var(--v2-accent)); }
.resource-v2-fact-icon svg { width: 100%; height: 100%; }

.resource-v2-fact strong {
  font-family: var(--v2-display);
  font-size: clamp(30px, 3vw, 48px);
  line-height: .95;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}

.resource-v2-fact strong span { font-size: .5em; letter-spacing: -.02em; white-space: nowrap; }

.resource-v2-fact small { color: var(--v2-muted); font-size: 12px; }

.resource-v2-hero-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.resource-v2-motion-toggle {
  border: 1px solid var(--v2-line);
  border-radius: 999px;
  padding: 9px 14px;
  background: transparent;
  color: var(--v2-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.resource-v2-motion-toggle:hover { border-color: var(--v2-ink); color: var(--v2-ink); }

/* ── Chapters (.v2-chapter and .v2-section-heading: nuclear-common_v2.css) ── */
.resource-v2-chapter--compare { background: radial-gradient(circle at 85% 6%, color-mix(in srgb, var(--story-lilac) 12%, transparent), transparent 42%); }
.resource-v2-chapter--technologies { background: radial-gradient(circle at 12% 4%, color-mix(in srgb, var(--story-peach) 9%, transparent), transparent 40%); }
.v2-section-heading .resource-v2-title-row { display: flex; align-items: flex-start; gap: 16px; margin-top: 9px; }
.v2-section-heading .resource-v2-title-row h2 { margin-top: 0; }
.v2-section-heading .resource-country-flag { flex: 0 0 42px; width: 42px; height: 28px; margin-top: .45em; border-color: var(--v2-line); border-radius: 4px; box-shadow: none; }
.resource-page.nuclear-v2 .v2-section-aside .resource-clean-firm { margin: 0; }
.resource-page.nuclear-v2 .resource-v2-chapter-eyebrow { display: block; margin-bottom: 18px; color: var(--v2-muted); }

/* The shared panel inside the chapters: same components, v2 frame. */
.resource-page.nuclear-v2 :is(.cer-kpi, .cer-share-panel, .cer-co2-box, .cer-card, .resource-group-members, .cer-empty) { border-radius: 18px; }
.resource-page.nuclear-v2 .cer-kpi strong { font-family: var(--v2-display); letter-spacing: -.03em; }
.resource-page.nuclear-v2 .cer-card h3 { font-family: var(--v2-display); letter-spacing: -.02em; }
.resource-page.nuclear-v2 .cer-comparison-tab { border-radius: 999px; }
.resource-page.nuclear-v2 .cer-comparison-tab.is-active { border-color: var(--story-lime); background: color-mix(in srgb, var(--story-lime) 16%, transparent); color: var(--v2-ink); }

.resource-page.nuclear-v2 #resourceNuclearCo2Mount .nca-panel { border-radius: var(--v2-radius); }
.resource-page.nuclear-v2 #resourceNuclearCo2Mount .nca-eyebrow { display: none; }

.resource-page.nuclear-v2 #resourceNuclearCo2Mount .nca-head h2 {
  font-family: var(--v2-display);
  font-size: clamp(26px, 3vw, 46px);
  line-height: 1;
  letter-spacing: -.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

/* ── Compare dialog ───────────────────────────────────────────────────── */
.resource-page.nuclear-v2 .resource-compare-dialog {
  width: min(720px, calc(100% - 24px));
  overflow: hidden;
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius);
  background: var(--surf);
  color: var(--v2-ink);
  box-shadow: var(--shadow-panel);
}

.resource-page.nuclear-v2 .resource-compare-dialog::backdrop { background: color-mix(in srgb, var(--v2-paper) 72%, transparent); backdrop-filter: blur(6px); }
.resource-page.nuclear-v2 :is(.resource-dialog-head, .resource-dialog-footer) { border-color: var(--v2-line); background: transparent; }
.resource-page.nuclear-v2 .resource-dialog-head { padding: 22px 24px 16px; }
.resource-page.nuclear-v2 .resource-dialog-head .resource-eyebrow { color: var(--story-lilac); font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.resource-page.nuclear-v2 .resource-dialog-head h2 { font-family: var(--v2-display); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.05; letter-spacing: -.03em; }
.resource-page.nuclear-v2 :is(.resource-dialog-head p, .resource-dialog-search span, .resource-compare-option small, .resource-dialog-footer > span) { color: var(--v2-muted); }
.resource-page.nuclear-v2 .resource-dialog-close { border-color: var(--v2-line); background: transparent; color: var(--v2-ink); }
.resource-page.nuclear-v2 .resource-dialog-search input { border: 1px solid var(--v2-line); border-radius: 999px; padding: 11px 16px; background: var(--v2-paper); color: var(--v2-ink); }
.resource-page.nuclear-v2 .resource-compare-option { border-color: var(--v2-line); border-radius: 14px; background: transparent; color: var(--v2-ink); }
.resource-page.nuclear-v2 .resource-compare-option.is-selected { border-color: var(--story-lime); background: color-mix(in srgb, var(--story-lime) 12%, transparent); box-shadow: none; }
.resource-page.nuclear-v2 .resource-compare-option input { accent-color: var(--story-lime); }
.resource-page.nuclear-v2 :is(.resource-dialog-primary, .resource-dialog-secondary) { border-radius: 999px; padding: 10px 18px; }
.resource-page.nuclear-v2 .resource-dialog-primary { border-color: var(--story-lime); background: var(--story-lime); color: var(--story-stripe-text); }
.resource-page.nuclear-v2 .resource-dialog-secondary { border-color: var(--v2-line); background: transparent; color: var(--v2-ink); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.resource-page.nuclear-v2 .resource-v2-source { margin: 0; padding-block: 28px 0; color: var(--v2-muted); font-size: 12px; }

.resource-page.nuclear-v2 .page-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  padding-block: 32px;
  color: var(--v2-muted);
  font-size: 12px;
}

.resource-page.nuclear-v2 .page-footer a { color: var(--v2-muted); text-decoration: none; }
.resource-page.nuclear-v2 .page-footer a:hover { color: var(--v2-ink); }

@media (max-width: 700px) {
  .resource-page .resource-site-header { gap: 8px; overflow-x: auto; }
  .resource-page .resource-actions { flex-wrap: nowrap; }
  .resource-page .resource-actions :is(a, button) { white-space: nowrap; }
  .resource-v2-hero-top,
  .resource-v2-controls { display: grid; grid-template-columns: minmax(0, 1fr); }
  .resource-v2-switch { width: 100%; min-width: 0; }
  .resource-page.nuclear-v2 .resource-v2-switch select { flex: 1; width: 100%; min-width: 0; max-width: none; }
  .resource-v2-compare-open { justify-content: center; }
  .resource-v2-hero-bottom .v2-button { width: 100%; }
  .resource-v2-fact { flex-basis: 100%; min-height: 0; }
  .resource-v2-fact strong { font-size: clamp(26px, 8vw, 34px); }
}
