:root {
  --blue: #2563eb;
  --navy: #0f172a;
  --teal: #14b8a6;
  --bg: #ffffff;
  --soft: #f8fafc;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --surface: #ffffff;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --heading: Poppins, Inter, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  margin: 0;
}

body.is-dark {
  --bg: #08111f;
  --soft: #0f1b2d;
  --ink: #e5edf7;
  --muted: #a7b4c7;
  --line: #23324a;
  --surface: #101c2f;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
}

a {
  color: inherit;
}

img {
  height: auto;
  max-width: 100%;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--heading);
  line-height: 1.12;
}

.wrap {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 22px;
  width: 100%;
}

.skip-link {
  background: var(--blue);
  color: #fff;
  left: 12px;
  padding: 10px 14px;
  position: absolute;
  top: -60px;
  z-index: 100;
}

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

.site-header {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrap {
  align-items: center;
  display: flex;
  gap: 18px;
  min-height: 76px;
}

.brand img {
  display: block;
  width: 224px;
}

.primary-nav {
  margin-left: auto;
}

.primary-nav ul,
.primary-nav .menu {
  align-items: center;
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  border-radius: 8px;
  color: var(--muted);
  display: block;
  font-size: 0.94rem;
  font-weight: 800;
  padding: 10px 12px;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a:focus {
  background: var(--soft);
  color: var(--ink);
}

.nav-toggle,
.mode-toggle {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
}

.nav-toggle span {
  background: var(--ink);
  display: block;
  height: 2px;
  width: 18px;
}

.hero {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08)),
    var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 64px 0 24px;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 0.98fr) minmax(320px, 1.02fr);
}

.eyebrow {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6.9rem);
  letter-spacing: 0;
  margin: 0 0 18px;
}

.hero-sub {
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.38rem);
  margin: 0;
  max-width: 680px;
}

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

.btn {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 900;
  min-height: 50px;
  padding: 0 18px;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.hero-art {
  align-self: stretch;
  min-height: 350px;
}

.hero-art img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.ach-ad {
  background: var(--soft);
  border: 1px dashed var(--line);
  border-radius: 8px;
  margin: 28px 0;
  min-height: 90px;
  padding: 14px;
}

.ach-smartlink {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  display: inline-flex;
  font-weight: 900;
  min-height: 44px;
  padding: 0 14px;
  text-decoration: none;
}

.content-band,
.blog-band {
  background: var(--soft);
  border-top: 1px solid var(--line);
  padding: 68px 0;
}

.blog-band {
  background: var(--bg);
}

.prose-grid,
.article-layout {
  align-items: start;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 46px);
}

.prose h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  margin: 34px 0 12px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  color: var(--muted);
  margin: 0 0 18px;
}

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

.faq-list details {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}

.faq-list summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.tool-index {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  padding: 22px;
  position: sticky;
  top: 96px;
}

.tool-index h2 {
  font-size: 1.25rem;
  margin: 0 0 8px;
}

.tool-index a {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  padding: 14px;
  text-decoration: none;
}

.tool-index a span {
  color: var(--muted);
  font-size: 0.84rem;
}

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

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0;
}

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

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.post-card h2,
.post-card h3 {
  font-size: 1.18rem;
  margin: 0 0 10px;
}

.post-card a {
  text-decoration: none;
}

.post-card p {
  color: var(--muted);
  margin: 0;
}

.page-hero {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  padding: 54px 0;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  margin: 0;
}

.page-layout,
.archive-grid,
.article-layout {
  padding-bottom: 68px;
  padding-top: 42px;
}

.page-content {
  width: 100%;
}

.site-footer {
  background: var(--navy);
  color: #cbd5e1;
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  gap: 34px;
  grid-template-columns: 1.25fr 1fr 1fr;
}

.footer-logo {
  margin-bottom: 14px;
  width: 220px;
}

.site-footer h2 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 12px;
}

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

.site-footer a {
  color: #cbd5e1;
  display: block;
  margin: 0 0 8px;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 20px;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: none;
    left: 22px;
    margin-left: 0;
    padding: 10px;
    position: absolute;
    right: 22px;
    top: 76px;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul,
  .primary-nav .menu {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-grid,
  .prose-grid,
  .article-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .tool-index {
    position: static;
  }

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

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .brand img {
    width: 188px;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    display: grid;
    gap: 8px;
  }
}
