:root {
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --logo-cyan: #26c5ff;
  --logo-blue: #4f8dff;
  --logo-violet: #7567ff;
  --bg: #f3f5f1;
  --bg-grid: rgba(24, 31, 29, 0.055);
  --panel: #fbfcf8;
  --panel-soft: rgba(251, 252, 248, 0.96);
  --ink: #111413;
  --muted: #606a66;
  --line: #d8ded7;
  --line-strong: #b9c3bc;
  --field: #ffffff;
  --bar: rgba(243, 245, 241, 0.94);
  --table-head: color-mix(in srgb, var(--logo-blue) 10%, var(--panel));
  --table-row: rgba(251, 252, 248, 0.92);
  --table-hover: color-mix(in srgb, var(--logo-cyan) 8%, var(--panel));
  --solid: #111413;
  --solid-text: #f8faf7;
  --green: var(--blue);
  --green-soft: var(--blue-soft);
  --gold: #815a12;
  --gold-soft: #f6eddb;
  --teal: var(--blue);
  --blue: #315b88;
  --blue-soft: #e5ecf4;
  --coral: #9f4636;
  --coral-soft: #f4e4df;
  --red: #8f342f;
  --shadow: 0 20px 60px rgba(17, 20, 19, 0.08);
  --card-shadow: none;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #02060f;
  --bg-grid: rgba(38, 197, 255, 0.075);
  --panel: #07111e;
  --panel-soft: rgba(8, 16, 29, 0.96);
  --ink: #f7fbff;
  --muted: #a7b1c8;
  --line: #182941;
  --line-strong: #2c4666;
  --field: #040b15;
  --bar: rgba(3, 7, 15, 0.94);
  --table-head: #0d1a2b;
  --table-row: rgba(7, 17, 30, 0.94);
  --table-hover: #0d2136;
  --solid: #f7fbff;
  --solid-text: #02060f;
  --green: #35c8ff;
  --green-soft: rgba(53, 200, 255, 0.14);
  --gold: #f0c46c;
  --gold-soft: rgba(240, 196, 108, 0.14);
  --teal: #47d5ff;
  --blue: #8b82ff;
  --blue-soft: rgba(139, 130, 255, 0.16);
  --coral: #ff9a86;
  --coral-soft: rgba(255, 154, 134, 0.15);
  --red: #ff9d9d;
  --shadow: 0 24px 76px rgba(0, 0, 0, 0.38);
  --card-shadow: none;
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 136px;
}

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

body {
  background:
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--green) 10%, transparent), transparent 340px),
    linear-gradient(135deg, color-mix(in srgb, var(--blue) 8%, transparent), transparent 560px),
    var(--bg);
  background-size: 56px 56px, auto, auto, auto;
  font-family: var(--font-body);
}

input,
select,
button,
textarea {
  font-family: inherit;
}

select,
select option {
  background: var(--field);
  color: var(--ink);
}

.topbar {
  gap: 18px;
  grid-template-columns: minmax(210px, 1fr) auto;
  padding: 12px clamp(18px, 4vw, 52px);
  z-index: 20;
}

.brand {
  gap: 10px;
  max-width: 100%;
}

.brand-copy {
  display: none;
}

.brand-logo {
  background: #02060f;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 6px;
  display: block;
  flex: 0 0 auto;
  height: auto;
  object-fit: contain;
  overflow: hidden;
  width: auto;
}

.brand-logo-desktop {
  width: min(390px, 42vw);
}

.brand-logo-mobile {
  display: none;
}

.language-control {
  min-width: 172px;
}

.language-control select {
  min-height: 40px;
  min-width: 172px;
  padding: 8px 34px 8px 12px;
}

.nav,
.section-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: end;
}

.seo-language {
  display: none;
}

.nav a,
.section-menu a {
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 8px;
  text-decoration: none;
}

.nav a:hover,
.section-menu a:hover {
  border-color: var(--green);
  color: var(--ink);
}

.section-menu {
  align-items: center;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  justify-content: center;
  left: 0;
  min-height: 52px;
  padding: 8px clamp(14px, 4vw, 52px);
  position: sticky;
  top: 69px;
  z-index: 15;
}

.section-menu a {
  border: 1px solid transparent;
  border-radius: 6px;
  line-height: 1;
  white-space: nowrap;
}

.section-menu a:hover {
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 40%, transparent);
}

.icon-button,
.secondary-button {
  border-radius: 6px;
}

.intro-panel,
.calculator-panel,
.comparison-strip,
.domain-section,
.data-section,
.source-section,
.news-section,
.insight-section,
.faq-section {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-panel {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--logo-cyan) 9%, transparent), transparent 62%),
    var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

.intro-panel .lede,
.intro-panel small {
  color: var(--muted);
}

.intro-panel::after {
  border-color: var(--line);
}

html[data-theme="dark"] .intro-panel {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--logo-cyan) 11%, transparent), transparent 62%),
    #02060f;
  border-color: color-mix(in srgb, var(--logo-blue) 32%, #182941);
  color: #f7fbff;
}

html[data-theme="dark"] .intro-panel::after {
  border-color: rgba(247, 251, 255, 0.13);
}

html[data-theme="dark"] .intro-panel .lede,
html[data-theme="dark"] .intro-panel small {
  color: #a7b1c8;
}

.eyebrow,
.section-heading p,
.insight-grid span,
.news-meta,
.source-card small,
.rank-card small,
.domain-card small {
  letter-spacing: 0;
}

.result-band,
.rank-card,
.domain-card,
.news-card,
.source-card,
.insight-grid article,
.faq-grid article,
.table-wrap {
  border-color: var(--line);
}

.result-band strong,
.rank-card strong,
td:nth-child(3),
td:nth-child(4),
td:nth-child(5),
.domain-price-row b,
.metrics span {
  font-family: var(--font-mono);
}

a[href*="porkbun.com" i],
.domain-title-link,
.domain-buy-link {
  border-radius: 4px;
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

a[href*="porkbun.com" i]:hover,
.domain-title-link:hover,
.domain-buy-link:hover {
  background: var(--green-soft);
  color: var(--ink);
  text-decoration: none;
}

a[href*="porkbun.com" i]:focus-visible,
.domain-title-link:focus-visible,
.domain-buy-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(160px, 1fr) auto;
  }

  .section-menu {
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 184px;
    overflow-x: hidden;
  }

  body {
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
  }

  .topbar {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(104px, 0.36fr) minmax(0, 1fr);
    max-width: 100%;
    overflow: hidden;
    padding: 10px 12px;
    width: 100%;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo-desktop {
    display: block;
    width: min(112px, 32vw);
  }

  .brand-logo-mobile {
    display: none;
  }

  .site-controls {
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 38px;
    justify-content: stretch;
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .mode-button,
  #refreshButton {
    min-width: 38px;
    width: 38px;
  }

  .language-control {
    min-width: 0;
    width: 100%;
  }

  .language-control select {
    min-width: 0;
    width: 100%;
  }

  .section-menu {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-start;
    max-width: 100%;
    min-height: 48px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 12px;
    scrollbar-width: none;
    top: 61px;
    width: 100%;
  }

  .section-menu::-webkit-scrollbar {
    display: none;
  }

  .section-menu a {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 8px 4px;
    text-align: center;
  }

  main {
    max-width: 100%;
    overflow: hidden;
    padding: 18px 16px 0;
    width: 100%;
  }

  .workspace,
  .calculator-grid,
  .result-band,
  .rank-list,
  .domain-grid,
  .domain-categories,
  .news-grid,
  .source-grid,
  .insight-grid,
  .faq-grid,
  .filters {
    grid-template-columns: 1fr;
  }

  .workspace {
    min-height: 0;
  }

  .intro-panel,
  .calculator-panel,
  .comparison-strip,
  .domain-section,
  .data-section,
  .source-section,
  .news-section,
  .insight-section,
  .faq-section {
    min-width: 0;
    width: 100%;
  }

  .intro-panel h1 {
    font-size: clamp(31px, 8.2vw, 35px);
    line-height: 1.08;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .intro-panel h1 span {
    display: inline;
  }

  .intro-panel h1 span::after {
    content: " ";
  }

  .intro-panel h1 span:last-child::after {
    content: "";
  }

  .section-heading,
  .section-heading.compact {
    grid-template-columns: 1fr;
  }

  .section-heading h2 {
    text-align: left;
  }

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

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