:root {
  color-scheme: dark;
  --fd-bg: #0b1220;
  --fd-header: #080e19;
  --fd-surface: #111c2e;
  --fd-surface-2: #18263a;
  --fd-input: #0f172a;
  --fd-border: #334155;
  --fd-border-soft: #22334b;
  --fd-primary: #34d399;
  --fd-primary-strong: #10b981;
  --fd-secondary: #22d3ee;
  --fd-text: #f8fafc;
  --fd-body: #cbd5e1;
  --fd-muted: #94a3b8;
  --fd-warning: #fbbf24;
  --fd-danger: #fb7185;
  --fd-radius: 14px;
  --fd-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

html {
  background: var(--fd-bg);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 460px at 84% 2%, rgba(34, 211, 238, 0.055), transparent 66%),
    radial-gradient(760px 420px at 12% 18%, rgba(52, 211, 153, 0.045), transparent 68%),
    var(--fd-bg) !important;
  color: var(--fd-body);
}

::selection {
  background: rgba(52, 211, 153, 0.28);
  color: var(--fd-text);
}

a,
button,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(34, 211, 238, 0.55);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  border-radius: 0.55rem;
  background: var(--fd-primary);
  color: #052e2b;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.fd-shell {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.fd-site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(51, 65, 85, 0.68);
  background: rgba(8, 14, 25, 0.9);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.fd-header-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.fd-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  color: var(--fd-text);
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.fd-brand-mark {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 0.34rem 0.34rem 0.7rem 0.34rem;
  background: linear-gradient(145deg, var(--fd-primary), var(--fd-secondary));
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.08), 0 0 22px rgba(52, 211, 153, 0.18);
  transform: rotate(-8deg);
}

.fd-brand-accent {
  color: var(--fd-primary);
}

.fd-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.fd-nav a,
.fd-nav button {
  padding: 0.6rem 0.72rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--fd-muted);
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.fd-nav a:hover,
.fd-nav button:hover,
.fd-nav a[aria-current="page"] {
  background: rgba(52, 211, 153, 0.08);
  color: var(--fd-primary);
}

.fd-nav .fd-nav-cta {
  margin-left: 0.25rem;
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
}

.fd-menu-button {
  display: none;
  width: 2.55rem;
  height: 2.55rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--fd-border-soft);
  border-radius: 0.65rem;
  background: var(--fd-surface);
  color: var(--fd-text);
  font-size: 1.15rem;
}

body > header:not(.fd-site-header),
body > nav:not(.fd-site-header) {
  background: var(--fd-header) !important;
}

.glow::before {
  background:
    radial-gradient(62% 72% at 80% 38%, rgba(34, 211, 238, 0.085), transparent 72%),
    radial-gradient(58% 68% at 25% -8%, rgba(52, 211, 153, 0.11), transparent 72%) !important;
}

.fd-visual-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  background: linear-gradient(180deg, rgba(17, 28, 46, 0.26), rgba(11, 18, 32, 0.18));
}

.fd-visual-hero > div {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fd-visual-hero > div > :not(.fd-hero-art) {
  position: relative;
  z-index: 2;
}

.fd-visual-hero h1,
.fd-visual-hero > div > p:not(:first-of-type) {
  max-width: 55% !important;
}

.fd-hero-art {
  position: absolute;
  z-index: 1;
  top: 1.1rem;
  right: 0;
  bottom: 1.1rem;
  width: 46%;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.58);
  border-radius: 1.1rem;
  background: var(--fd-surface);
  box-shadow: var(--fd-shadow);
  pointer-events: none;
}

.fd-hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 18, 32, 0.82), transparent 28%);
}

.fd-hero-art img,
.fd-inline-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

.fd-inline-art {
  position: relative;
  aspect-ratio: 16 / 5;
  margin: 1.2rem 0 2rem;
  overflow: hidden;
  border: 1px solid var(--fd-border-soft);
  border-radius: 1rem;
  background: var(--fd-surface);
  box-shadow: var(--fd-shadow);
}

.fd-inline-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 18, 32, 0.86), rgba(11, 18, 32, 0.06) 55%);
}

.rounded-2xl,
.rounded-xl,
.card {
  border-color: var(--fd-border-soft) !important;
}

.card,
[class*="bg-slate-800\/60"],
[class*="bg-slate-800\/70"] {
  background-color: rgba(17, 28, 46, 0.9) !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.16);
}

input[type="number"],
input[type="text"],
input[type="email"],
select {
  background-color: var(--fd-input) !important;
  border-color: var(--fd-border) !important;
  color: var(--fd-text) !important;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--fd-primary) !important;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15) !important;
}

input[type="range"] {
  background: linear-gradient(90deg, #2a3d55, #334155) !important;
}

button[class*="bg-emerald"],
a[class*="bg-emerald"] {
  background: linear-gradient(135deg, var(--fd-primary), #2ac7a4) !important;
  box-shadow: 0 10px 28px rgba(52, 211, 153, 0.16);
}

.fd-reviewed {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: center;
  margin-top: 1.35rem;
  color: var(--fd-muted);
  font-size: 0.76rem;
}

.fd-reviewed span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.fd-reviewed span::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--fd-primary);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.08);
}

.fd-guide,
.fd-hub-guide {
  margin-top: 3.5rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--fd-border-soft);
}

.fd-section-kicker {
  margin-bottom: 0.7rem;
  color: var(--fd-primary);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fd-guide h2,
.fd-hub-guide h2 {
  max-width: 44rem;
  margin-bottom: 0.9rem;
  color: var(--fd-text);
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.fd-guide > p,
.fd-hub-guide > p {
  max-width: 48rem;
  color: var(--fd-body);
  line-height: 1.75;
}

.fd-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.fd-guide-card {
  padding: 1.05rem;
  border: 1px solid var(--fd-border-soft);
  border-radius: var(--fd-radius);
  background: linear-gradient(145deg, rgba(24, 38, 58, 0.94), rgba(17, 28, 46, 0.92));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.fd-guide-card b {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--fd-text);
  font-size: 0.94rem;
}

.fd-guide-card p {
  color: var(--fd-muted);
  font-size: 0.82rem;
  line-height: 1.62;
}

.fd-step {
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 0.55rem;
  background: rgba(52, 211, 153, 0.08);
  color: var(--fd-primary);
  font-size: 0.7rem;
  font-weight: 800;
}

.fd-assumptions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.fd-assumptions > div {
  padding: 1.15rem;
  border: 1px solid var(--fd-border-soft);
  border-radius: var(--fd-radius);
  background: rgba(17, 28, 46, 0.78);
}

.fd-assumptions h3 {
  margin-bottom: 0.65rem;
  color: var(--fd-text);
  font-size: 0.95rem;
  font-weight: 700;
}

.fd-assumptions ul {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.05rem;
  color: var(--fd-muted);
  font-size: 0.82rem;
  line-height: 1.52;
  list-style: disc;
}

.fd-note {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-left: 3px solid var(--fd-warning);
  border-radius: 0.65rem;
  background: rgba(251, 191, 36, 0.055);
  color: #fde68a;
  font-size: 0.82rem;
  line-height: 1.62;
}

.fd-next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.fd-next-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.56rem 0.72rem;
  border: 1px solid var(--fd-border-soft);
  border-radius: 999px;
  background: rgba(24, 38, 58, 0.65);
  color: #a7f3d0;
  font-size: 0.78rem;
  transition: border-color 160ms ease, transform 160ms ease;
}

.fd-next-links a:hover {
  border-color: rgba(52, 211, 153, 0.55);
  transform: translateY(-1px);
}

.fd-tool-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.fd-tool-map a {
  min-height: 118px;
  padding: 1rem;
  border: 1px solid var(--fd-border-soft);
  border-radius: var(--fd-radius);
  background: rgba(17, 28, 46, 0.85);
  color: var(--fd-text);
}

.fd-tool-map a:hover {
  border-color: rgba(52, 211, 153, 0.48);
  background: rgba(24, 38, 58, 0.95);
}

.fd-tool-map strong {
  display: block;
  margin-bottom: 0.42rem;
  font-size: 0.9rem;
}

.fd-tool-map span {
  display: block;
  color: var(--fd-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.fd-source-panel {
  margin-top: 1.25rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: var(--fd-radius);
  background: rgba(34, 211, 238, 0.04);
  color: var(--fd-muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.fd-source-panel strong {
  color: #a5f3fc;
}

.fd-source-panel a {
  color: var(--fd-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fd-site-footer {
  margin-top: 5rem;
  border-top: 1px solid rgba(51, 65, 85, 0.65);
  background: rgba(8, 14, 25, 0.72);
}

.fd-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
  padding-block: 2.7rem 2rem;
}

.fd-footer-intro p {
  max-width: 19rem;
  margin-top: 0.75rem;
  color: var(--fd-muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.fd-footer-col strong {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--fd-text);
  font-size: 0.8rem;
}

.fd-footer-col a {
  display: block;
  width: fit-content;
  margin-top: 0.46rem;
  color: var(--fd-muted);
  font-size: 0.78rem;
}

.fd-footer-col a:hover {
  color: var(--fd-primary);
}

.fd-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem 1.4rem;
  border-top: 1px solid rgba(51, 65, 85, 0.45);
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.5;
}

.fd-prose {
  max-width: 48rem;
  margin-inline: auto;
}

.fd-prose h1,
.fd-prose h2,
.fd-prose h3 {
  color: var(--fd-text);
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  letter-spacing: -0.025em;
}

.fd-prose h1 { font-size: clamp(2rem, 6vw, 3.3rem); line-height: 1.05; }
.fd-prose h2 { margin-top: 2.6rem; font-size: 1.45rem; }
.fd-prose h3 { margin-top: 1.65rem; font-size: 1.05rem; }
.fd-prose p, .fd-prose li { color: var(--fd-body); line-height: 1.78; }
.fd-prose p { margin-top: 0.85rem; }
.fd-prose ul, .fd-prose ol { margin-top: 0.8rem; padding-left: 1.2rem; }
.fd-prose li + li { margin-top: 0.42rem; }

@media (max-width: 900px) {
  .fd-menu-button { display: inline-flex; }

  .fd-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.75rem 1rem 1rem;
    border-bottom: 1px solid var(--fd-border-soft);
    background: rgba(8, 14, 25, 0.98);
  }

  .fd-nav[data-open="true"] { display: flex; }
  .fd-nav a, .fd-nav button { padding: 0.82rem; text-align: left; }
  .fd-nav .fd-nav-cta { margin-left: 0; }

  .fd-visual-hero {
    min-height: auto;
  }

  .fd-visual-hero > div {
    min-height: auto;
    padding-top: 2.8rem !important;
    padding-bottom: 2.8rem !important;
  }

  .fd-visual-hero h1,
  .fd-visual-hero > div > p:not(:first-of-type) {
    max-width: 100% !important;
  }

  .fd-hero-art {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    order: 5;
    width: 100%;
    height: 215px;
    margin-top: 1.8rem;
  }

  .fd-hero-art::after {
    background: linear-gradient(180deg, rgba(11, 18, 32, 0.12), rgba(11, 18, 32, 0.36));
  }

  .fd-guide-grid,
  .fd-tool-map {
    grid-template-columns: 1fr 1fr;
  }

  .fd-footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .fd-footer-intro {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .fd-shell { width: min(100% - 1.25rem, 1120px); }
  .fd-brand { font-size: 0.98rem; }
  .fd-inline-art { aspect-ratio: 16 / 8; }
  .fd-guide-grid,
  .fd-tool-map,
  .fd-assumptions,
  .fd-footer-grid {
    grid-template-columns: 1fr;
  }

  .fd-footer-intro { grid-column: auto; }
  .fd-footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .fd-site-header,
  .fd-site-footer,
  .fd-hero-art,
  .fd-inline-art,
  .fd-guide,
  .fd-hub-guide,
  .skip-link {
    display: none !important;
  }
}
