:root {
  --color-midnight: #1b4965;
  --color-sky: #5fa8d3;
  --color-sand: #f3e9dc;
  --color-alert: #e63946;
  --color-carbon: #222222;
  --color-ice: #e8f3fb;

  /* Semantic color tokens */
  --color-text-primary: var(--color-carbon);
  --color-text-inverse: #fdfdfd;
  --color-bg-primary: var(--color-sand);
  --color-bg-elevated: #ffffff;
  --color-link: var(--color-midnight);
  --color-link-hover: #0f2d42;
  --color-border: rgba(27, 73, 101, 0.15);
  --color-focus: var(--color-alert);

  /* Spacing system */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.563rem;
  --text-3xl: 1.953rem;
  --text-4xl: 2.441rem;
  --text-5xl: 3.052rem;

  --leading-tight: 1.25;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-carbon);
  background: var(--color-sand);
  line-height: 1.6;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Focus Indicators - Accessibility */
*:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

input[type="range"]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
}

.button:focus-visible {
  outline: 3px solid var(--color-sand);
  outline-offset: 3px;
}

a {
  color: var(--color-midnight);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-link-hover);
}

a:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Internal Contextual Links */
.internal-link {
  font-weight: 600;
  color: var(--color-sky);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.internal-link:hover {
  color: var(--color-midnight);
  text-decoration-color: var(--color-midnight);
}

.internal-link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

img {
  max-width: 100%;
  display: block;
}

/* Screen Reader Only - Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  display: grid;
  gap: 3rem;
  padding: 5rem clamp(1.5rem, 5vw, 6rem);
  background: linear-gradient(130deg, rgba(27, 73, 101, 0.95) 0%, rgba(90, 168, 211, 0.75) 48%, rgba(230, 57, 70, 0.9) 100%);
  color: #fdfdfd;
  align-items: center;
}

.hero__content {
  max-width: 640px;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: rgba(243, 233, 220, 0.2);
  border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.3rem);
  margin: 1rem 0;
  line-height: 1.15;
  font-family: 'Space Grotesk', sans-serif;
}

.hero__tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  color: rgba(253, 253, 253, 0.92);
}

.hero__lead {
  font-size: 1.05rem;
  max-width: 60ch;
  color: rgba(253, 253, 253, 0.8);
}

.hero__micro {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.4rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  color: rgba(243, 233, 220, 0.9);
}

.hero__micro li::before {
  content: '•';
  margin-right: 0.6rem;
  color: var(--color-alert);
}

.hero__actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  background: var(--color-sky);
  color: var(--color-carbon);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: none;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-1px);
  background: var(--color-alert);
  color: #fff;
  box-shadow: 0 10px 25px rgba(27, 73, 101, 0.35);
}

.button--ghost {
  background: rgba(243, 233, 220, 0.1);
  border: 1px solid rgba(243, 233, 220, 0.6);
  color: #fdfdfd;
}

.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__logo {
  max-width: clamp(180px, 28vw, 280px);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.25));
}

/* Sticky Navigation - Wayfinding */
.sticky-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(27, 73, 101, 0.15);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  border-bottom: 1px solid var(--color-border);
}

.sticky-nav.visible {
  transform: translateY(0);
}

.sticky-nav__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem clamp(1.5rem, 5vw, 6rem);
  gap: 1rem;
}

.sticky-nav__brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--color-midnight);
  text-decoration: none;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sticky-nav__links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-nav__links::-webkit-scrollbar {
  display: none;
}

.sticky-nav__toggle {
  display: none;
  width: 42px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(27, 73, 101, 0.2);
  background: rgba(27, 73, 101, 0.05);
  color: var(--color-midnight);
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.sticky-nav__toggle:focus-visible {
  outline: 2px solid var(--color-sky);
  outline-offset: 3px;
}

.sticky-nav__toggle-bar {
  width: 18px;
  height: 2px;
  background: var(--color-midnight);
  display: block;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sticky-nav.open .sticky-nav__toggle-bar:nth-of-type(1) {
  transform: translateY(6px) rotate(45deg);
}

.sticky-nav.open .sticky-nav__toggle-bar:nth-of-type(2) {
  transform: translateY(-6px) rotate(-45deg);
}

.sticky-nav.open .sticky-nav__toggle-bar:nth-of-type(3) {
  opacity: 0;
}

.sticky-nav__link {
  flex-shrink: 0;
}

.sticky-nav__link a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: transparent;
  color: var(--color-midnight);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sticky-nav__link a:hover,
.sticky-nav__link a.active {
  background: var(--color-midnight);
  color: white;
}

/* Table of Contents - SEO & Wayfinding */
.toc {
  background: linear-gradient(135deg, rgba(27, 73, 101, 0.04) 0%, rgba(232, 243, 251, 0.5) 100%);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 60px;
  z-index: 998;
  backdrop-filter: blur(8px);
}

.toc__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem clamp(1.5rem, 5vw, 6rem);
}

.toc__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem 0;
  font-family: 'Space Grotesk', sans-serif;
}

.toc__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-midnight);
}

.toc__icon {
  font-size: 0.85rem;
  color: var(--color-sky);
  transition: transform 0.3s ease;
}

.toc__toggle[aria-expanded="false"] .toc__icon {
  transform: rotate(-90deg);
}

.toc__list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.5rem 1rem;
  max-height: 400px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 1;
}

.toc__toggle[aria-expanded="false"] + .toc__list {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.toc__item {
  position: relative;
  padding-left: 1.5rem;
}

.toc__item::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-sky);
  font-weight: 600;
}

.toc__link {
  color: var(--color-carbon);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.6;
  display: block;
  transition: all 0.2s ease;
  padding: 0.25rem 0;
}

.toc__link:hover,
.toc__link:focus {
  color: var(--color-midnight);
  font-weight: 600;
  transform: translateX(4px);
}

.toc__link.active {
  color: var(--color-midnight);
  font-weight: 600;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-midnight);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(27, 73, 101, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: all 0.3s ease;
  font-size: 1.5rem;
  line-height: 1;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.back-to-top:hover {
  background: var(--color-alert);
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(230, 57, 70, 0.4);
}

.section {
  padding: clamp(4rem, 7vw, 6rem) clamp(1.5rem, 5vw, 6rem);
  background: var(--color-sand);
}

.section--light {
  background: #ffffff;
}

.section__heading {
  max-width: 720px;
  margin-bottom: 3rem;
}

.section__heading h2 {
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  margin-bottom: 0.4rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-midnight);
}

/* Definition Boxes - Featured Snippet Optimization */
.definition-box {
  background: linear-gradient(135deg, rgba(95, 168, 211, 0.08) 0%, rgba(232, 243, 251, 0.6) 100%);
  border-left: 4px solid var(--color-sky);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(27, 73, 101, 0.08);
}

.definition-box strong {
  color: var(--color-midnight);
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.5rem;
}

.definition-box p {
  margin: 0;
  line-height: 1.7;
  color: var(--color-carbon);
}

.definition-box--small {
  padding: 1rem;
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
}

.grid {
  display: grid;
  gap: 1.8rem;
}

.grid--cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid--columns {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card,
.focus,
.resource,
.data-table {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.8rem;
  box-shadow: 0 18px 35px rgba(27, 73, 101, 0.08);
  border: 1px solid rgba(27, 73, 101, 0.12);
}

.card h3,
.focus h3,
.resource h3 {
  margin-top: 0;
  font-size: 1.25rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-midnight);
}

.focus h4 {
  margin: 0.75rem 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-sky);
  font-family: 'Space Grotesk', sans-serif;
}

.focus__note {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(27, 73, 101, 0.8);
}

.card__figure {
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 1rem 0 0.5rem;
  font-family: 'Roboto Mono', monospace;
  color: var(--color-alert);
}

.card__detail,
.card__equivalent,
.card__source {
  font-size: 0.95rem;
  margin: 0.3rem 0;
}

.card__source {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(34, 34, 34, 0.65);
}

.interactive {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.interactive__item {
  background: linear-gradient(160deg, rgba(95, 168, 211, 0.2), rgba(27, 73, 101, 0.08));
  border-radius: 1.2rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.interactive__item--wide {
  grid-column: 1 / -1;
}

.interactive__label {
  font-weight: 600;
}

.interactive input[type="range"],
.interactive select {
  width: 100%;
}

/* Custom Slider Styling - Mobile-First Touch Optimization */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--color-sky) 0%, var(--color-sky) 50%, var(--color-ice) 50%, var(--color-ice) 100%);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-midnight);
  cursor: grab;
  box-shadow: 0 2px 8px rgba(27, 73, 101, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(27, 73, 101, 0.5);
}

input[type="range"]::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-midnight);
  cursor: grab;
  border: none;
  box-shadow: 0 2px 8px rgba(27, 73, 101, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(27, 73, 101, 0.5);
}

input[type="range"]::-moz-range-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
}

input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
}

input[type="range"]::-moz-range-track {
  background: var(--color-ice);
  border-radius: 4px;
  height: 8px;
  border: none;
}

.interactive__summary {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.interactive__number {
  display: inline-flex;
  padding: 0.4rem 0.9rem;
  background: #0b1e2d;
  color: #f9fbff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: 'Roboto Mono', monospace;
}

.interactive__equivalent,
.interactive__hint {
  font-size: 0.9rem;
  color: rgba(34, 34, 34, 0.7);
}

.comparison {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.comparison__row {
  display: grid;
  grid-template-columns: minmax(0, 260px) 1fr auto;
  gap: 1rem;
  align-items: center;
}

.comparison__label {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.comparison__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #0b1e2d;
  color: #f9fbff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.comparison__hint {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #48637d;
}

.comparison__bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(27, 73, 101, 0.16);
  overflow: hidden;
}

.comparison__fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--color-midnight) 0%, var(--color-sky) 100%);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.comparison__value {
  font-weight: 600;
  color: var(--color-midnight);
  font-size: 0.95rem;
  font-family: 'Roboto Mono', monospace;
}

.chart {
  background: linear-gradient(160deg, rgba(95, 168, 211, 0.28), rgba(27, 73, 101, 0.1));
  border-radius: 1.2rem;
  padding: 2.4rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 18px 40px rgba(27, 73, 101, 0.12);
  border: 1px solid rgba(27, 73, 101, 0.16);
}

.chart__header h3 {
  margin: 0;
  font-size: 1.35rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-midnight);
}

.chart__header p {
  margin: 0.5rem 0 2rem;
  color: rgba(34, 34, 34, 0.75);
  font-size: 0.95rem;
}

.chart--vertical .chart__columns {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(0.5rem, 1.2vw, 0.8rem);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  scrollbar-width: thin;
}

.chart__column {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex: 1 1 0;
  min-width: clamp(90px, 10vw, 120px);
  max-width: clamp(110px, 11vw, 140px);
  min-height: clamp(300px, 34vw, 380px);
}

.chart__icon {
  align-self: center;
  margin-bottom: 0.6rem;
}

.chart__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 10px 18px rgba(11, 30, 45, 0.18);
}

.chart__icon--ghost {
  opacity: 0;
  box-shadow: none;
}

/* Loading States - Performance & Feedback */
.chart__icon--loading {
  background: linear-gradient(90deg, var(--color-ice) 0%, var(--color-sand) 50%, var(--color-ice) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.chart__icon--error {
  background: var(--color-alert);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
}

.chart__bar-wrapper {
  position: relative;
  width: 100%;
  flex: 0 0 clamp(160px, 22vw, 220px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chart__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.chart__bar {
  position: relative;
  z-index: 1;
  width: 65%;
  max-width: 75px;
  min-width: 50px;
  border-radius: 18px 18px 6px 6px;
  background: linear-gradient(180deg, rgba(75, 193, 244, 0.92) 0%, #195b92 100%);
  box-shadow: inset 0 -10px 20px rgba(9, 30, 45, 0.2);
  transition: height 0.5s ease;
}

.chart__bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 65%);
}

.chart__value {
  font-weight: 600;
  color: var(--color-midnight);
  font-size: 0.95rem;
  font-family: 'Roboto Mono', monospace;
  text-align: center;
}

.chart__label {
  text-align: center;
  font-weight: 600;
  color: var(--color-carbon);
  font-family: 'Space Grotesk', sans-serif;
}

.chart__hint {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(34, 34, 34, 0.65);
  max-width: 160px;
}

.chart__note {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(34, 34, 34, 0.7);
}

.chart__control {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.chart__control-label {
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-carbon);
}

.chart__control-input {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.chart__control-input input[type='range'] {
  flex: 1;
  accent-color: var(--color-midnight);
}

.chart__control-value {
  font-family: 'Roboto Mono', monospace;
  font-weight: 600;
  background: rgba(27, 73, 101, 0.1);
  color: var(--color-midnight);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  min-width: 3rem;
  text-align: center;
}

.chart__control-hint {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(34, 34, 34, 0.6);
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid rgba(27, 73, 101, 0.1);
  text-align: left;
}

.data-table th {
  color: var(--color-midnight);
  font-weight: 600;
  background: rgba(95, 168, 211, 0.18);
}

.data-table h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-midnight);
}

.data-table h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-sky);
}

.data-table caption {
  font-weight: 600;
  margin-bottom: 0.6rem;
  text-align: left;
  color: var(--color-midnight);
}

.data-table small {
  color: rgba(34, 34, 34, 0.65);
  font-size: 0.82rem;
}

.resource a {
  margin-top: 1rem;
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-midnight);
}

.resource a::after {
  content: "→";
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.resource a:hover::after {
  transform: translateX(3px);
}

.regulation-list {
  display: grid;
  gap: 1.6rem;
}

.regulation {
  padding: 1.6rem;
  border-radius: 1rem;
  background: rgba(27, 73, 101, 0.08);
  border: 1px solid rgba(27, 73, 101, 0.12);
}

.regulation h3 {
  margin-top: 0;
  font-size: 1.2rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-midnight);
}

.regulation__sources {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: rgba(27, 73, 101, 0.75);
}

.regulation__sources a {
  color: var(--color-midnight);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.regulation__sources a:hover {
  color: var(--color-alert);
}

.footer {
  background: var(--color-carbon);
  color: rgba(249, 251, 255, 0.8);
  padding: 3rem clamp(1.5rem, 5vw, 6rem);
}

.footer__title {
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.footer__sources {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer__note {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: rgba(249, 251, 255, 0.6);
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  /* Sticky nav adjustments */
  .sticky-nav__brand {
    font-size: 0.85rem;
  }

  .sticky-nav__link a {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  /* Chart responsiveness */
  .chart {
    padding: 1.5rem;
  }

  .chart__label {
    font-size: 0.8rem;
    max-width: 12ch;
    text-align: center;
  }

  .chart__hint {
    font-size: 0.7rem;
  }

  .chart__columns {
    gap: 0.8rem;
  }

  /* Data tables scroll hint */
  .data-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-inline: calc(var(--space-lg) * -1);
    padding-inline: var(--space-lg);
  }

  .data-table table {
    min-width: 500px;
  }

  .data-table::after {
    content: '→ Faites défiler pour voir plus';
    display: block;
    text-align: center;
    font-size: var(--text-xs);
    color: var(--color-sky);
    margin-top: var(--space-sm);
  }
}

@media (max-width: 720px) {
  .comparison__row {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .comparison__bar {
    height: 12px;
  }

  .chart--vertical .chart__columns {
    gap: clamp(0.4rem, 1vw, 0.6rem);
  }

  .chart__column {
    min-width: clamp(75px, 8vw, 100px);
    max-width: clamp(95px, 9vw, 115px);
  }

  .chart__bar-wrapper {
    height: 180px;
  }

  .chart__bar {
    min-width: 45px;
    max-width: 65px;
  }

  .sticky-nav__toggle {
    display: flex;
  }

  .sticky-nav__links {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: clamp(1.5rem, 6vw, 4rem);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 14px;
    border: 1px solid rgba(27, 73, 101, 0.12);
    box-shadow: 0 18px 40px rgba(27, 73, 101, 0.25);
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.2s ease;
  }

  .sticky-nav.open .sticky-nav__links {
    max-height: 300px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* Back to top button mobile position */
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
  }

  /* TOC mobile */
  .toc {
    position: static;
  }

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

  .toc__toggle[aria-expanded="true"] + .toc__list {
    max-height: 600px;
  }
}

@media (max-width: 480px) {
  /* Hero optimization for small screens */
  .hero {
    padding-block: var(--space-2xl);
  }

  .hero h1 {
    font-size: var(--text-3xl);
    margin-block: var(--space-sm);
  }

  /* Interactive controls */
  .chart__control-label {
    font-size: var(--text-sm);
    line-height: var(--leading-tight);
  }

  .interactive__label {
    font-size: var(--text-sm);
  }

  /* Very small screens - horizontal bars */
  .chart__column {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    min-height: auto;
  }

  .chart__bar-wrapper {
    flex-grow: 1;
    height: 40px;
  }

  .chart__bar {
    width: 100% !important;
    height: 100% !important;
    border-radius: 6px 18px 18px 6px;
  }
}

@media (max-height: 700px) {
  /* Optimize hero for short viewports (landscape mobile) */
  .hero {
    padding-block: var(--space-2xl);
  }

  .hero h1 {
    font-size: var(--text-3xl);
    margin-block: var(--space-sm);
  }

  .hero__micro {
    margin-top: var(--space-md);
  }
}

@media (min-width: 769px) {
  .data-table::after {
    display: none;
  }
}

.bubble-layout {
  display: flex;
  gap: clamp(1.8rem, 4vw, 3rem);
  align-items: stretch;
}

.bubble-controls {
  flex: 0 0 clamp(260px, 28vw, 340px);
  background: rgba(95, 168, 211, 0.12);
  border: 1px solid rgba(27, 73, 101, 0.12);
  border-radius: 1.2rem;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.bubble-controls__label {
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-midnight);
}

#bubbleView {
  appearance: none;
  width: 100%;
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(27, 73, 101, 0.25);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  color: var(--color-midnight);
  transition: border 0.2s ease;
}

#bubbleView:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-color: var(--color-midnight);
}

.bubble-summary {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.bubble-summary > summary {
  cursor: pointer;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-midnight);
  list-style: none;
}

.bubble-summary[open] > summary::after {
  content: '▲';
  float: right;
  font-size: 0.75rem;
  color: rgba(27, 73, 101, 0.6);
}

.bubble-summary > summary::after {
  content: '▼';
  float: right;
  font-size: 0.75rem;
  color: rgba(27, 73, 101, 0.6);
}

.bubble-summary[open] .bubble-summary__row {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bubble-summary h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-midnight);
}

.bubble-summary dl {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.bubble-summary__row {
  display: grid;
  gap: 0.2rem;
}

.bubble-summary__row dt {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(27, 73, 101, 0.7);
}

.bubble-summary__row dd {
  margin: 0;
  font-weight: 600;
  color: var(--color-carbon);
}

.bubble-note {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(27, 73, 101, 0.7);
}

.bubble-chart {
  position: relative;
  flex: 1;
  min-height: clamp(360px, 55vw, 540px);
  border-radius: 1.4rem;
  border: 1px solid rgba(27, 73, 101, 0.16);
  background: linear-gradient(160deg, rgba(95, 168, 211, 0.18), rgba(27, 73, 101, 0.07));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

#bubbleChart {
  width: 100%;
  height: 100%;
  display: block;
}

.bubble-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: rgba(27, 73, 101, 0.65);
}

.bubble-empty[hidden],
.bubble-empty.is-hidden {
  display: none;
}

.bubble-legend {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.bubble-legend__title {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-midnight);
}

.bubble-legend__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: rgba(27, 73, 101, 0.85);
}

.bubble-legend__swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(27, 73, 101, 0.25);
  flex-shrink: 0;
}

.bubble-legend__value {
  margin-left: auto;
  font-family: 'Roboto Mono', monospace;
  color: var(--color-midnight);
}

.bubble-node text {
  text-anchor: middle;
  pointer-events: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.bubble-node circle {
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 2px;
}

@media (max-width: 1024px) {
  .bubble-layout {
    flex-direction: column;
  }

  .bubble-controls {
    width: 100%;
  }

  .bubble-chart {
    min-height: clamp(340px, 60vw, 520px);
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    order: -1;
  }

  .section__heading {
    text-align: center;
    align-items: center;
  }

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

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

  .bubble-layout {
    flex-direction: column;
  }

  .bubble-controls {
    width: 100%;
  }

  .bubble-chart {
    min-height: clamp(320px, 70vw, 480px);
  }

  .bubble-legend {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .data-table {
    overflow-x: auto;
  }

  .data-table table {
    font-size: 0.9rem;
  }

  .sticky-nav__links {
    right: clamp(1rem, 4vw, 2.5rem);
    left: clamp(1rem, 4vw, 2.5rem);
  }
}

@media (max-width: 600px) {
  .section {
    padding: clamp(3rem, 9vw, 4rem) clamp(1rem, 4vw, 1.3rem);
  }

  .definition-box {
    padding: clamp(0.9rem, 3vw, 1.1rem);
  }

  .interactive__item {
    padding: clamp(1.1rem, 4vw, 1.4rem);
  }

  .interactive__number {
    font-size: 1rem;
  }

  .bubble-controls {
    padding: clamp(1rem, 3vw, 1.3rem);
  }

  .bubble-chart {
    min-height: clamp(280px, 80vw, 420px);
  }

  .bubble-legend__item {
    gap: 0.4rem;
    font-size: 0.78rem;
  }

  .bubble-legend__value {
    font-size: 0.75rem;
  }

  .sticky-nav__links {
    padding: 1rem;
    gap: 0.6rem;
  }

  .sticky-nav__link a {
    padding: 0.55rem 0.8rem;
    font-size: 0.8rem;
  }
}

