:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fa;
  color: #16202a;
  --surface: #ffffff;
  --surface-muted: #eef3f7;
  --line: #d9e2ea;
  --line-strong: #b8c6d3;
  --text-muted: #536475;
  --text-soft: #6c7b88;
  --accent: #0f6f8c;
  --accent-strong: #0d3f52;
  --danger: #9f2f2f;
  --radius: 8px;
  --shadow: 0 12px 40px rgba(22, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: #16202a;
  font-weight: 800;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

nav a {
  color: #263746;
  font-size: 14px;
  font-weight: 650;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 32px 24px;
}

.narrow {
  max-width: 820px;
}

.hero-band {
  background: linear-gradient(180deg, #ffffff 0%, #edf4f7 100%);
  border-bottom: 1px solid var(--line);
}

.hero-layout,
.content-grid,
.page-grid,
.report-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.hero-copy,
.hero-panel,
.section,
.report-main,
.side-column,
.facts-grid article,
.result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-copy {
  padding: 32px;
}

.hero-panel,
.section,
.report-main,
.side-column {
  padding: 24px;
}

.hero-panel {
  box-shadow: var(--shadow);
}

.main-column,
.side-column {
  display: grid;
  gap: 20px;
  align-content: start;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  font-size: 42px;
  line-height: 1.07;
  margin: 0 0 18px;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 12px;
}

h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

.lead,
.summary {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 22px;
}

.muted {
  color: var(--text-soft);
  line-height: 1.55;
}

.search {
  display: flex;
  gap: 8px;
  max-width: 680px;
}

input,
button {
  border-radius: 6px;
  font: inherit;
  min-height: 44px;
}

input {
  border: 1px solid var(--line-strong);
  flex: 1;
  min-width: 0;
  padding: 0 12px;
}

button {
  background: #16202a;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  font-weight: 750;
  padding: 0 18px;
}

.form-error {
  color: var(--danger);
  font-weight: 650;
  margin: 12px 0 0;
}

.letter-grid,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.letter-grid a,
.pill-list a,
.pagination a,
.pagination span,
.tool-links a {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #20313f;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  min-height: 36px;
  padding: 0 12px;
}

.compact {
  margin: 18px 0 8px;
}

.section-head {
  margin-bottom: 16px;
}

.domain-list,
.domain-table,
.tool-links {
  display: grid;
  gap: 8px;
}

.domain-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #16202a;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 12px;
}

.domain-row span {
  color: var(--text-soft);
  font-size: 13px;
  text-align: right;
}

.facts-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin: 18px 0 24px;
}

.facts-grid article {
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 14px;
}

.facts-grid span,
.data-table span {
  color: var(--text-muted);
}

.data-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table div {
  display: grid;
  gap: 12px;
  grid-template-columns: 180px minmax(0, 1fr);
  padding: 12px 14px;
}

.data-table div + div {
  border-top: 1px solid var(--line);
}

.related-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ad-slot {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #adc0cf;
  border-radius: var(--radius);
  color: var(--text-soft);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  min-height: 120px;
  padding: 16px;
  place-items: center;
  text-align: center;
}

.top-ad {
  margin: 18px 0;
}

.pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.prose {
  line-height: 1.65;
}

.prose p {
  color: var(--text-muted);
}

.result {
  overflow-x: auto;
  padding: 16px;
  white-space: pre-wrap;
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 32px;
}

.footer-grid {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.footer p {
  margin: 0;
  max-width: 680px;
}

@media (max-width: 900px) {
  .hero-layout,
  .content-grid,
  .page-grid,
  .report-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar,
  .search,
  .footer-grid {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    padding: 16px;
  }

  .shell {
    padding: 24px 16px;
  }

  .hero-copy,
  .hero-panel,
  .section,
  .report-main,
  .side-column {
    padding: 18px;
  }

  h1 {
    font-size: 32px;
  }

  .data-table div,
  .domain-row {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .domain-row {
    display: grid;
  }

  .domain-row span {
    text-align: left;
  }
}
