:root {
  --bg: #eef4ff;
  --surface: #fbfdff;
  --surface-alt: #dfeafe;
  --ink: #10203a;
  --muted: #5b6d89;
  --line: #c7d7f1;
  --line-strong: #9ab4da;
  --accent: #3b82f6;
  --accent-strong: #1d4ed8;
  --accent-soft: #dbeafe;
  --signal: #60a5fa;
  --signal-soft: #e0f2fe;
  --success: #2563eb;
  --danger: #b91c1c;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: none;
  --container: 1080px;
  --font-heading: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
  --ease: 180ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(29, 78, 216, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.045) 1px, transparent 1px);
  background-size: 26px 26px;
  line-height: 1.58;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

button {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--surface);
  transition: top var(--ease);
}

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

.site-shell {
  width: min(100% - 28px, var(--container));
  margin: 0 auto;
}

.page-shell {
  padding-bottom: 64px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: 16px;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(154, 180, 218, 0.55);
  border-radius: 22px;
  background: rgba(251, 253, 255, 0.96);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--accent);
  color: var(--surface);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.brand-tagline {
  color: var(--muted);
  font-size: 0.78rem;
}

.mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
}

.mobile-toggle-line {
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.mobile-toggle-line::before,
.mobile-toggle-line::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.mobile-toggle-line::before {
  top: -6px;
}

.mobile-toggle-line::after {
  top: 6px;
}

.site-nav {
  position: fixed;
  inset: 88px 16px auto 16px;
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transform: translateY(-16px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--ease),
    transform var(--ease),
    visibility var(--ease);
}

.site-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.nav-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition:
    background-color var(--ease),
    color var(--ease);
}

.nav-link:hover,
.nav-link.is-current {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.header-actions {
  display: grid;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color var(--ease),
    border-color var(--ease),
    color var(--ease);
}

.button:hover,
.button:active {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.button.secondary:hover,
.button.secondary:active {
  background: var(--surface-alt);
  border-color: var(--ink);
}

.button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding-inline: 0;
}

.button.ghost:hover,
.button.ghost:active {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(251, 253, 255, 0.9);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
}

.hero {
  padding: 34px 0 24px;
}

.hero-grid {
  display: grid;
  gap: 20px;
}

.hero-copy,
.hero-aside,
.hero-media,
.panel,
.note-card,
.feature-card,
.case-card,
.compare-wrap,
.article-card,
.contact-card,
.legal-card,
.source-card,
.insight-card,
.highlight-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.hero-copy,
.hero-aside,
.hero-media {
  padding: 20px;
}

.hero-title {
  margin: 14px 0 16px;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-text,
.section-intro,
.card-text,
.lead,
.legal-copy,
.meta-list,
.article-body p,
.article-list li,
.faq-text,
.contact-copy p,
.source-copy {
  color: var(--muted);
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-proof {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.hero-proof-row {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.hero-proof-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.value {
  font-size: 1rem;
  font-weight: 600;
}

.hero-media {
  overflow: hidden;
  position: relative;
  min-height: 320px;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: auto 20px 20px auto;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: var(--signal);
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: 18px;
}

.hero-summary-grid,
.stats-grid,
.card-grid,
.insights-grid,
.footer-grid,
.contact-grid,
.page-grid,
.source-grid {
  display: grid;
  gap: 18px;
}

.summary-pill {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-alt);
}

.section {
  padding: 18px 0;
}

.section-spacious {
  padding-top: 40px;
}

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.section-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-subtitle {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.panel,
.note-card,
.feature-card,
.case-card,
.article-card,
.contact-card,
.legal-card,
.source-card,
.insight-card,
.highlight-card,
.compare-wrap {
  padding: 18px;
}

.feature-card,
.case-card,
.article-card,
.insight-card,
.highlight-card {
  position: relative;
}

.feature-card::before,
.case-card::before,
.article-card::before,
.highlight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.case-card[data-tone="warm"]::before,
.highlight-card[data-tone="warm"]::before {
  background: var(--signal);
}

.card-title,
.article-card h3,
.contact-card h3,
.legal-card h2,
.source-card h3,
.insight-card h3,
.highlight-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: 1.28rem;
  line-height: 1.14;
}

.badge-row,
.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 0.84rem;
  color: var(--muted);
}

.badge.positive {
  background: var(--accent-soft);
  border-color: rgba(59, 130, 246, 0.25);
  color: var(--accent-strong);
}

.badge.caution {
  background: var(--signal-soft);
  border-color: rgba(96, 165, 250, 0.28);
  color: #1e40af;
}

.split-panel {
  display: grid;
  gap: 18px;
}

.media-frame {
  overflow: hidden;
  border-radius: 16px;
  min-height: 220px;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.metric-list,
.plain-list,
.article-list,
.meta-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding-left: 18px;
}

.metric-list {
  padding-left: 0;
  list-style: none;
}

.metric-item {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.metric-item:first-child {
  padding-top: 0;
  border-top: 0;
}

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

.metric-value {
  font-weight: 600;
}

.compare-wrap {
  overflow: hidden;
}

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

.compare-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.compare-table td:first-child,
.compare-table th:first-child {
  width: 180px;
}

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  padding: 16px 18px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-answer {
  padding: 0 18px 16px;
}

.insight-card time,
.article-card time,
.source-card time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.contact-grid {
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.field-group {
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 0.88rem;
  font-weight: 600;
}

.field-input,
.field-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  transition:
    border-color var(--ease),
    background-color var(--ease);
}

.field-input:hover,
.field-textarea:hover {
  border-color: var(--ink);
}

.field-input:focus,
.field-textarea:focus {
  border-color: var(--accent);
}

.field-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note,
.small-note {
  color: var(--muted);
  font-size: 0.86rem;
}

.status-box {
  min-height: 24px;
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 500;
}

.status-box.is-error {
  color: var(--danger);
}

.source-grid a,
.plain-link {
  color: var(--accent-strong);
}

.article-hero,
.page-hero {
  padding: 36px 0 18px;
}

.page-lede {
  width: min(100%, 680px);
}

.article-body {
  display: grid;
  gap: 12px;
}

.article-body h2 {
  margin: 20px 0 4px;
  font-family: var(--font-heading);
  font-size: 1.55rem;
  line-height: 1.1;
}

.article-body h3 {
  margin: 18px 0 4px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.pull-quote {
  padding: 16px 18px;
  border-left: 4px solid var(--signal);
  background: var(--surface-alt);
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  line-height: 1.35;
}

.footer-wrap {
  padding: 32px 0 48px;
}

.site-footer {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  padding: 20px;
}

.footer-grid {
  align-items: start;
}

.footer-title {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.footer-links a,
.footer-links button {
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--ink);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(251, 253, 255, 0.98);
  backdrop-filter: blur(14px);
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.utility-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.accent-text {
  color: var(--accent-strong);
}

.signal-text {
  color: #1e40af;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 760px) {
  .hero-summary-grid,
  .stats-grid,
  .card-grid,
  .insights-grid,
  .footer-grid,
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid,
  .split-panel {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }

  .page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .mobile-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    inset: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .header-actions {
    display: flex;
    align-items: center;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    align-items: stretch;
  }

  .hero-copy {
    padding: 28px;
  }

  .hero-aside {
    display: grid;
    gap: 18px;
    padding: 24px;
  }

  .hero-media {
    min-height: 380px;
  }

  .hero-summary-grid,
  .card-grid,
  .insights-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .footer-grid {
    grid-template-columns: 1.15fr 0.9fr 0.95fr;
  }
}

@media (min-width: 1220px) {
  .hero-grid.home-layout {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  }

  .hero-side-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}
