:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-card: rgba(255, 255, 255, 0.96);
  --surface-interactive: rgba(248, 250, 252, 0.98);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --text-muted: #5b6780;
  --text-soft: #243047;
  --accent: #2563eb;
  --accent-strong: #0f172a;
  --accent-fog: rgba(37, 99, 235, 0.08);
  --accent-strong-fog: rgba(15, 23, 42, 0.06);
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.05);
  --shadow-soft: 0 10px 22px rgba(15, 23, 42, 0.06);
  --focus-ring-inner: rgba(255, 255, 255, 0.92);
  --focus-ring: rgba(37, 99, 235, 0.28);
  --button-bg: linear-gradient(180deg, #ffffff, #f8fafc);
  --button-bg-hover: linear-gradient(180deg, #ffffff, #eef4ff);
  --logo-surface: linear-gradient(180deg, #ffffff, #f8fafc);
  --chart-grid: rgba(148, 163, 184, 0.18);
  --chart-axis: rgba(71, 85, 105, 0.88);
  --chart-line-start: rgba(15, 23, 42, 0.96);
  --chart-line-mid: rgba(37, 99, 235, 0.92);
  --chart-line-end: rgba(96, 165, 250, 0.78);
  --chart-area-start: rgba(37, 99, 235, 0.18);
  --chart-area-mid: rgba(96, 165, 250, 0.12);
  --chart-area-end: rgba(96, 165, 250, 0);
  --chart-track: rgba(148, 163, 184, 0.14);
  --chart-shadow: rgba(37, 99, 235, 0.08);
  --chart-point-fill: #ffffff;
  --chart-point-ring: rgba(37, 99, 235, 0.22);
  --chart-hover-line: rgba(71, 85, 105, 0.18);
  --chart-hover-point: rgba(15, 23, 42, 0.92);
  --tooltip-bg: rgba(15, 23, 42, 0.96);
  --tooltip-border: rgba(15, 23, 42, 0.08);
  --tooltip-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  --tooltip-text: #f8fafc;
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --page-width: 1180px;
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 24%),
    repeating-linear-gradient(
      180deg,
      rgba(148, 163, 184, 0.06) 0,
      rgba(148, 163, 184, 0.06) 1px,
      transparent 1px,
      transparent 9px
    );
  opacity: 0.68;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.12), transparent 28%),
    radial-gradient(circle at 16% 14%, rgba(255, 255, 255, 0.96), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(191, 219, 254, 0.38), transparent 20%),
    linear-gradient(180deg, #f9fbfd 0%, #f4f7fb 42%, #eef2f7 100%);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: top 180ms var(--ease-premium);
}

.skip-link:focus {
  top: 16px;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--page-width));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero {
  padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 8vw, 104px);
}

.hero-inner {
  display: grid;
  gap: 18px;
  justify-items: center;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 999px;
  background: rgba(240, 253, 244, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 6px 16px rgba(22, 163, 74, 0.08);
  color: #15803d;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
  animation: availability-dot-blink 1.4s ease-in-out infinite;
}

@keyframes availability-dot-blink {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
  }

  50% {
    opacity: 0.35;
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.04);
  }
}

.domain-title,
.section-title,
.stat-value,
.insight-value {
  margin: 0;
  font-family: inherit;
}

.domain-title {
  max-width: 100%;
  font-size: clamp(3.8rem, 8vw, 5.9rem);
  line-height: 1.02;
  letter-spacing: -0.065em;
  font-weight: 800;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  color: var(--text);
}

.domain-title span {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent) 82%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  max-width: 36ch;
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 0.7vw + 0.92rem, 1.26rem);
  line-height: 1.68;
}

.hero-cta {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  margin-top: 8px;
  padding: 16px 36px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: linear-gradient(110deg, #2563eb, #7c3aed, #0891b2, #2563eb);
  background-size: 260% 100%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 10px 24px rgba(76, 81, 214, 0.28),
    0 2px 6px rgba(15, 23, 42, 0.12);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
  animation: hero-cta-gradient 9s ease-in-out infinite;
  transition:
    transform 220ms var(--ease-premium),
    box-shadow 220ms var(--ease-premium),
    filter 220ms var(--ease-premium);
}

.hero-cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -9px;
  border-radius: inherit;
  background: linear-gradient(110deg, #60a5fa, #a78bfa, #22d3ee, #60a5fa);
  background-size: 260% 100%;
  filter: blur(17px);
  opacity: 0.3;
  animation:
    hero-cta-gradient 9s ease-in-out infinite,
    hero-cta-halo 4.8s ease-in-out infinite;
}

.hero-cta:hover {
  transform: translateY(-1px) scale(1.012);
  filter: saturate(1.06) brightness(1.025);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 16px 32px rgba(76, 81, 214, 0.36),
    0 3px 8px rgba(15, 23, 42, 0.14);
}

.hero-cta:hover::before {
  opacity: 0.42;
}

.hero-cta:active {
  transform: translateY(0) scale(0.985);
}

@keyframes hero-cta-gradient {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes hero-cta-halo {
  0%,
  100% {
    opacity: 0.24;
    transform: scale(0.985);
  }

  50% {
    opacity: 0.36;
    transform: scale(1.015);
  }
}

.hero-cta[hidden] {
  display: none;
}

main {
  display: grid;
  gap: 28px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: var(--shadow);
}

.stats-section {
  padding: 6px 0 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.stat-card,
.insight-card,
.registrar-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(15, 23, 42, 0.03);
}

.stat-card {
  display: grid;
  align-content: start;
  padding: 20px 22px 18px;
  background: #ffffff;
  transition:
    transform 220ms var(--ease-premium),
    border-color 220ms var(--ease-premium),
    background 220ms var(--ease-premium);
}

.stat-content {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 100%;
}

.registrar-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(244, 248, 255, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    var(--shadow-soft);
}

.stat-value {
  font-size: clamp(2rem, 1.65vw + 1.2rem, 2.9rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.stat-label {
  margin: 0;
  color: var(--text-soft);
  max-width: 11ch;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

.stat-note,
.chart-summary,
.insight-label {
  color: var(--text-muted);
}

.stat-note {
  margin: 24px 0 0;
  line-height: 1.55;
}

.analytics-section,
.registrars-section {
  padding: 30px;
}

.data-error {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 30px;
  text-align: center;
}

.data-error[hidden] {
  display: none;
}

.data-error-title,
.data-error-copy {
  margin: 0;
}

.data-error-title {
  color: var(--text);
  font-size: clamp(1.35rem, 1vw + 1rem, 1.8rem);
  line-height: 1.12;
  font-weight: 800;
}

.data-error-copy {
  max-width: 48ch;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.58;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-title {
  font-size: clamp(1.9rem, 1vw + 1.45rem, 2.2rem);
  letter-spacing: -0.04em;
  line-height: 1;
  font-weight: 800;
  word-spacing: 0.06em;
}

.range-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 5px 14px rgba(15, 23, 42, 0.04);
}

.range-button,
.registrar-link {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.range-button {
  min-width: 68px;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  letter-spacing: 0.06em;
  transition:
    background 180ms var(--ease-premium),
    color 180ms var(--ease-premium),
    box-shadow 180ms var(--ease-premium),
    transform 180ms var(--ease-premium);
}

.range-button:hover,
.range-button:focus-visible {
  color: var(--text);
}

.range-button:hover:not(.is-active),
.range-button:focus-visible:not(.is-active) {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.range-button.is-active {
  background: linear-gradient(180deg, #172033, #0f172a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 7px 16px rgba(15, 23, 42, 0.14);
  color: #f8fafc;
}

.chart-surface {
  position: relative;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96);
  overflow: hidden;
}

.traffic-chart {
  display: block;
  width: 100%;
  height: 360px;
}

.chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 24px;
  margin: 12px 4px 0;
}

.chart-update-note,
.chart-attribution {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
}

.chart-update-note {
  margin: 0;
}

.chart-attribution {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex: 0 0 auto;
  padding: 3px 5px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 180ms var(--ease-premium);
}

.chart-attribution:hover {
  opacity: 0.72;
}

.eurometrics-logo {
  display: block;
  width: 98px;
  height: auto;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 108px;
  padding: 10px 12px;
  border: 1px solid var(--tooltip-border);
  border-radius: 14px;
  background: var(--tooltip-bg);
  box-shadow: var(--tooltip-shadow);
  color: var(--tooltip-text);
  font-size: 0.9rem;
  pointer-events: none;
  white-space: nowrap;
}

.chart-tooltip strong {
  display: block;
  margin-top: 4px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
}

.chart-summary {
  line-height: 1.62;
}

.registrar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 40px;
}

.registrar-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  min-height: 172px;
  padding: 24px 22px;
  text-align: center;
  background: #ffffff;
  box-shadow: none;
  transition:
    border-color 220ms var(--ease-premium),
    background 220ms var(--ease-premium);
}

.registrar-card[hidden] {
  display: none;
}

.registrar-logo {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: 100%;
}

.logo-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 88px;
  padding: 16px 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
  overflow: hidden;
}

.registrar-logo-image {
  display: block;
  max-width: min(100%, 168px);
  max-height: 52px;
  width: 100%;
  height: 52px;
  object-fit: contain;
  object-position: center;
  filter: none;
}

.logo-fallback {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.registrar-name {
  margin: 0;
  min-height: 2.6em;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
  display: grid;
  place-items: center;
}

.registrar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 132px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 180ms var(--ease-premium),
    border-color 180ms var(--ease-premium),
    background 180ms var(--ease-premium),
    box-shadow 180ms var(--ease-premium),
    color 180ms var(--ease-premium);
}

.registrar-link:hover {
  border-color: #0f172a;
  background: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  color: #ffffff;
}

.registrars-section .section-row {
  justify-content: center;
}

.registrar-show-all {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: min(100%, 400px);
  margin: 18px auto 0;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 180ms var(--ease-premium),
    border-color 180ms var(--ease-premium),
    background 180ms var(--ease-premium);
}

.registrar-show-all:disabled {
  cursor: wait;
  opacity: 0.72;
}

.registrar-show-all[hidden] {
  display: none;
}

.registrar-show-all:hover {
  border-color: var(--border-strong);
  background: rgba(248, 250, 252, 0.92);
  color: var(--text);
}

.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;
}

a,
button {
  outline: none;
}

a:focus-visible,
button:focus-visible {
  box-shadow:
    0 0 0 1px var(--focus-ring-inner),
    0 0 0 4px var(--focus-ring);
}

@media (max-width: 1120px) {
  .stats-grid,
  .registrar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(calc(100% - 24px), var(--page-width));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .registrar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
  }

  .registrar-card {
    min-height: 156px;
    padding: 18px 14px;
    gap: 14px;
  }

  .registrar-logo {
    gap: 12px;
  }

  .logo-frame {
    min-height: 72px;
    padding: 12px;
  }

  .registrar-logo-image {
    max-width: min(100%, 132px);
    max-height: 40px;
    height: 40px;
  }

  .registrar-name {
    min-height: 2.4em;
    font-size: 0.9rem;
  }

  .registrar-link {
    min-height: 40px;
    min-width: 0;
    width: 100%;
    padding: 10px 12px;
    font-size: 0.84rem;
  }

  .section-row {
    flex-direction: column;
    align-items: stretch;
  }

  .range-switch {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 18px), var(--page-width));
  }

  .hero {
    padding-top: 40px;
  }

  .domain-title {
    max-width: 8ch;
    font-size: clamp(3.4rem, 16vw, 5.2rem);
    white-space: normal;
  }

  .analytics-section,
  .registrars-section {
    padding: 18px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .stat-card,
  .insight-card,
  .registrar-card {
    border-radius: 18px;
  }

  .stat-card {
    padding: 16px 16px 14px;
  }

  .stat-content {
    gap: 6px;
  }

  .stat-value {
    font-size: clamp(1.85rem, 7vw, 2.35rem);
    line-height: 0.9;
  }

  .stat-label {
    max-width: none;
    font-size: 0.88rem;
    line-height: 1.18;
  }

  .traffic-chart {
    height: 300px;
  }

  .chart-footer {
    align-items: center;
    gap: 12px;
    min-height: 36px;
    margin-right: 0;
    margin-left: 0;
  }

  .chart-update-note {
    flex: 1 1 auto;
    max-width: 18ch;
    text-wrap: balance;
  }

  .chart-attribution {
    gap: 6px;
    padding: 0;
    white-space: nowrap;
  }

  .eurometrics-logo {
    width: 82px;
  }

  .registrar-grid {
    gap: 12px;
    margin-top: 24px;
  }

  .registrar-card {
    min-height: 144px;
    padding: 14px 12px;
    gap: 12px;
  }

  .logo-frame {
    min-height: 64px;
    padding: 10px;
    border-radius: 12px;
  }

  .registrar-logo-image {
    max-width: min(100%, 116px);
    max-height: 36px;
    height: 36px;
  }

  .registrar-name {
    min-height: 2.3em;
    font-size: 0.84rem;
    line-height: 1.25;
  }

  .registrar-link {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 0.78rem;
    line-height: 1.2;
  }

  .registrar-show-all {
    margin-top: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
