:root {
  --ink: #14121a;
  --ink-muted: #4a4458;
  --ink-soft: #6b6574;
  --surface: #fffcf7;
  --surface-subtle: #f4f0ea;
  --line: #d4cdc2;
  --brand: #1e3a5f;
  --brand-soft: #e8eef5;
  --accent: #c45c3e;
}

html {
  scroll-behavior: smooth;
}
section[id] {
  scroll-margin-top: 5.25rem;
}

.font-display {
  font-family: "Sora", "Plus Jakarta Sans", "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.font-serif {
  font-family: "Literata", Georgia, serif;
}

/* —— Editorial home (unconventional layout) —— */
.home-uncon {
  --tw-prose-body: var(--ink-muted);
}

.site-header--editorial {
  background: rgba(244, 240, 234, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(20, 18, 26, 0.08);
}

.nav-pill {
  flex-shrink: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 9999px;
  color: var(--ink-muted);
  border: 1px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.nav-pill:hover {
  color: var(--ink);
  background: rgba(255, 252, 247, 0.9);
  border-color: rgba(20, 18, 26, 0.12);
}
.nav-pill.active {
  color: var(--surface);
  background: var(--ink);
  border-color: var(--ink);
  font-weight: 600;
}

.btn-pill-official {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--surface);
  background: var(--brand);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-pill-official:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}
.btn-pill-official:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
}

.hero-editorial {
  background-color: var(--surface-subtle);
  background-image: linear-gradient(165deg, rgba(196, 92, 62, 0.06) 0%, transparent 42%), linear-gradient(135deg, rgba(30, 58, 95, 0.04) 0%, transparent 50%);
}

.hero-noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.hero-image-frame {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 8px 8px 0 rgba(20, 18, 26, 0.12);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.hero-image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 247, 0.15);
}

.trust-banner--editorial {
  border-left: 4px solid var(--accent);
  padding: 1rem 1rem 1rem 1.25rem;
  background: linear-gradient(90deg, rgba(196, 92, 62, 0.08), transparent);
}

.stat-bento .stat-cell {
  border: 2px solid var(--ink);
  background: var(--surface);
  padding: 1rem 1.1rem;
  box-shadow: 4px 4px 0 rgba(20, 18, 26, 0.07);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-bento .stat-cell:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(20, 18, 26, 0.1);
}
.stat-label {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.stat-value {
  margin-top: 0.35rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.topic-mosaic {
  list-style: none;
  padding: 0;
  margin: 0;
}

.topic-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.5rem;
  padding: 1.25rem 1.35rem;
  border: 2px solid var(--ink);
  background: var(--surface-subtle);
  color: var(--ink) !important;
  text-decoration: none !important;
  box-shadow: 4px 4px 0 rgba(20, 18, 26, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.topic-tile:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 rgba(20, 18, 26, 0.12);
  background: var(--surface);
}
.topic-tile:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
.topic-tile--wide {
  min-height: 6rem;
}
.topic-tile--accent {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.08), rgba(196, 92, 62, 0.06));
  border-color: var(--brand);
}
.topic-num {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  opacity: 0.9;
}
.topic-title {
  flex: 1;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.topic-arrow {
  font-size: 0.85rem;
  color: var(--ink-soft);
  transition: transform 0.2s ease, color 0.2s ease;
}
.topic-tile:hover .topic-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.btn-offset {
  border-width: 2px;
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn-offset:hover {
  box-shadow: 6px 6px 0 var(--ink);
}
.btn-offset:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* Legacy mesh (subpages) */
.mesh-bg {
  background-color: #f8fafc;
  background-image: radial-gradient(ellipse 100% 80% at 50% -40%, rgba(37, 99, 235, 0.06), transparent 55%);
}

.grid-faint {
  background-size: 24px 24px;
  background-image: linear-gradient(to right, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
}

.site-header {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.nav-link {
  position: relative;
  color: #475569;
  transition: color 0.15s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.25rem;
  height: 2px;
  background: #2563eb;
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.nav-link:hover {
  color: #0f172a;
}
.nav-link.active {
  color: #0f172a !important;
  font-weight: 600;
}
.nav-primary-grid .nav-link,
.nav-primary-grid .nav-link.active {
  font-weight: 500;
}
.nav-primary-grid .nav-link.active {
  color: #1e3a5f !important;
}
.nav-link.active::after {
  transform: scaleX(1);
}

.back-to-top {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 60;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #52525b;
  border: 1px solid #e4e4e7;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, visibility 0.25s, transform 0.25s ease, border-color 0.15s ease, color 0.15s ease;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  border-color: #1e3a5f;
  color: #1e3a5f;
}
.back-to-top:focus-visible {
  outline: 2px solid #1e3a5f;
  outline-offset: 2px;
}

.fixed-download-btn {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem 0.75rem 0.65rem;
  background: #ffffff;
  color: #334155;
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 10px 0 0 10px;
  border: 1px solid #e2e8f0;
  border-right: none;
  box-shadow: -2px 0 12px rgba(15, 23, 42, 0.06);
  transition: padding 0.2s ease, border-color 0.15s ease;
}
.fixed-download-btn:hover {
  padding-right: 0.7rem;
  border-color: #cbd5e1;
}
.fixed-download-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.fixed-download-btn i {
  font-size: 1.1rem;
  color: #2563eb;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  background: var(--ink);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  outline: 2px solid #1e3a5f;
  outline-offset: 2px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 0.35rem;
  background: var(--brand);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 2px solid var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover {
  background: #152d4d;
}
.btn-primary:active {
  transform: scale(0.99);
}

/* Download page — hero card & CTA */
.download-hero {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%);
}
.btn-primary.download-hero__btn {
  border-radius: 9999px;
  padding: 0.875rem 2rem;
  border-width: 0;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.22);
  transition:
    background 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}
.btn-primary.download-hero__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}
.btn-primary.download-hero__btn:active {
  transform: translateY(0) scale(0.99);
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary.download-hero__btn {
    transition: background 0.2s ease;
  }
  .btn-primary.download-hero__btn:hover,
  .btn-primary.download-hero__btn:active {
    transform: none;
  }
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 0.35rem;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink) !important;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-secondary:hover {
  background: var(--surface-subtle);
}

.card {
  border-radius: 0.35rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

details.faq-item {
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  overflow: hidden;
}
details.faq-item[open] {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
details.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
details.faq-item summary::-webkit-details-marker {
  display: none;
}
details.faq-item summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.65rem;
  color: #64748b;
  transition: transform 0.2s ease;
}
details.faq-item[open] summary::after {
  transform: rotate(180deg);
}
details.faq-item .faq-body {
  padding: 0 1.25rem 1rem;
  color: #475569;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.nav-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Primary nav: equal columns so labels stay aligned */
.nav-primary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 640px) {
  .nav-primary-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.nav-link-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Primary nav labels only (no Home/About/… icons) */
.site-header .nav-primary-grid .nav-icon {
  display: none !important;
}
.nav-scroll::-webkit-scrollbar {
  display: none;
}

.trust-banner {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
}

/* Language switcher (filled by js/site.js) */
.lang-switcher {
  position: relative;
  z-index: 60;
}
.lang-switcher__details {
  position: relative;
}
.lang-switcher__summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  border: 1px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  user-select: none;
}
.lang-switcher__summary::-webkit-details-marker {
  display: none;
}
.lang-switcher__summary:hover {
  color: #0f172a;
  background: rgba(241, 245, 249, 0.9);
  border-color: #e2e8f0;
}
.lang-switcher__globe {
  font-size: 0.85rem;
  opacity: 0.85;
}
.lang-switcher__chev {
  font-size: 0.55rem;
  opacity: 0.7;
}
.lang-switcher__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 11rem;
  padding: 0.35rem 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}
.lang-switcher__panel--footer {
  top: auto;
  bottom: calc(100% + 4px);
}
.lang-switcher__link {
  display: block;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.lang-switcher__link:hover {
  background: #f8fafc;
  color: #0f172a;
}
.lang-switcher__link.is-active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}
.lang-switcher__summary--footer {
  font-size: 0.7rem;
  padding: 0.15rem 0.35rem;
  font-weight: 500;
}
.landing-page .lang-switcher__summary {
  color: #71717a;
  font-size: 0.8125rem;
}
.landing-page .lang-switcher__summary:hover {
  color: #18181b;
  background: rgba(244, 244, 245, 0.95);
  border-color: #e4e4e7;
}
.landing-page .lang-switcher__panel {
  border-color: #e4e4e7;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.landing-page .lang-switcher__link {
  color: #52525b;
}
.landing-page .lang-switcher__link:hover {
  background: #fafafa;
  color: #18181b;
}
.landing-page .lang-switcher__link.is-active {
  background: #e8eef5;
  color: #1e3a5f;
}
