:root {
  color-scheme: dark;
  --bg: #11140f;
  --panel: #191d16;
  --panel-2: #eef1df;
  --text: #f4f0e8;
  --muted: #b7b8aa;
  --ink: #11140f;
  --line: #3a4032;
  --accent: #d7ff5f;
  --accent-2: #ff6b35;
  --shadow: 0 24px 80px rgb(0 0 0 / 26%);
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: "Avenir Next", "Trebuchet MS", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f0e8;
  --panel: #fffdf4;
  --panel-2: #141810;
  --text: #11140f;
  --muted: #5f6659;
  --ink: #f4f0e8;
  --line: #d2d2bf;
  --accent: #556b00;
  --accent-2: #c74818;
  --shadow: 0 24px 80px rgb(42 42 24 / 12%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 96px;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgb(215 255 95 / 10%), transparent 26rem),
    repeating-linear-gradient(90deg, rgb(255 255 255 / 3%) 0 1px, transparent 1px 88px),
    var(--bg);
  font-family: var(--font-body);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.24em;
}

a,
button,
select {
  cursor: pointer;
}

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

button,
input,
select,
textarea {
  border-radius: 0;
  font: inherit;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: max-content;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.brand-text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.main-nav {
  display: flex;
  gap: 0.2rem;
  max-width: 58vw;
  overflow-x: auto;
  scrollbar-width: thin;
}

.main-nav a {
  flex: 0 0 auto;
  padding: 0.72rem 0.9rem;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  border-color: var(--line);
  color: var(--text);
  background: rgb(255 255 255 / 6%);
}

.language-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.language-select,
.theme-toggle {
  height: 42px;
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.language-select {
  padding: 0 0.5rem;
}

.theme-toggle {
  display: grid;
  width: 42px;
  place-items: center;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.site-main {
  padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 4vw, 3rem);
}

.hero,
.article-hero {
  display: grid;
  gap: 1rem;
  min-height: 54vh;
  align-content: center;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

h1 {
  max-width: 15ch;
  font-size: clamp(4rem, 13vw, 11rem);
}

h2 {
  font-size: clamp(2.4rem, 6vw, 5.6rem);
}

p {
  margin: 0;
}

.hero-answer {
  max-width: 860px;
  color: var(--text);
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  line-height: 1.28;
}

.search-box {
  display: grid;
  gap: 0.55rem;
  max-width: 760px;
  margin-top: 1.5rem;
}

.search-box label {
  color: var(--muted);
  font-weight: 700;
}

.search-row {
  display: flex;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 1rem;
  color: var(--text);
  background: transparent;
}

.search-row button,
.contact-form button {
  border: 0;
  padding: 1rem 1.35rem;
  color: #11140f;
  background: var(--accent);
  font-weight: 900;
}

.metric-strip,
.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2rem;
  border: 1px solid var(--line);
  background: var(--line);
}

.metric-strip div,
.insight-grid div {
  min-height: 128px;
  padding: 1.2rem;
  background: var(--panel);
}

.metric-strip strong,
.insight-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1;
}

.metric-strip span,
.insight-grid span {
  color: var(--muted);
  font-weight: 700;
}

.section-grid,
.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.feature-card,
.content-block,
.data-panel,
.contact-form {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.feature-card,
.content-block {
  display: grid;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.feature-card.inverted {
  color: var(--ink);
  background: var(--panel-2);
}

.text-link {
  width: fit-content;
  color: var(--accent);
  font-weight: 900;
}

.data-panel {
  margin-top: 2rem;
  overflow: hidden;
}

.section-heading {
  display: grid;
  gap: 0.75rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}

.section-heading p:not(.eyebrow),
.feature-card p,
.content-block p,
.site-footer p {
  max-width: 72ch;
  color: var(--muted);
}

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

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

th,
td {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody th {
  font-weight: 900;
}

tr.is-focus th,
tr.is-focus td {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}

.article-page {
  display: grid;
  gap: 2rem;
}

.article-page.narrow {
  max-width: 940px;
}

.insight-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
}

.insight-grid strong {
  margin-top: 0.7rem;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.contact-form {
  display: grid;
  gap: 0.7rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.contact-form label {
  font-weight: 900;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid var(--line);
  padding: 0.9rem;
  color: var(--text);
  background: transparent;
}

.contact-form button {
  width: fit-content;
  margin-top: 0.6rem;
}

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
  }

  .main-nav {
    max-width: none;
    flex: 1 1 auto;
  }

  .metric-strip,
  .insight-grid,
  .section-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 10ch;
    font-size: clamp(3.4rem, 18vw, 6rem);
  }

  .search-row {
    flex-direction: column;
  }

  .search-row button {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}
