@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@600;700&display=swap");

:root {
  --ink: #18211f;
  --muted: #5d6c68;
  --line: #d8e1de;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --leaf: #2f735d;
  --mint: #d7f0e6;
  --sky: #eaf4ff;
  --gold: #fff6df;
  --rose: #fff2ed;
  --shadow: 0 18px 60px rgba(25, 41, 36, 0.12);
  --font-body: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  line-height: 1.5;
}
a { color: inherit; }
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.75rem 1rem;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(251, 252, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.nav {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand,
.nav-links,
.hero-actions,
.footer-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.brand,
.nav-links a,
.button,
.linked-step,
.article-sidebar a {
  text-decoration: none;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 0.78rem;
  letter-spacing: 0;
}
.nav-links a {
  color: var(--muted);
  font-weight: 750;
  font-size: 0.95rem;
}
.hero,
.article-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 3rem;
  background: linear-gradient(180deg, var(--sky), var(--paper));
  box-shadow: 0 0 0 100vmax var(--sky);
  clip-path: inset(0 -100vmax);
}
.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: 2rem;
  align-items: start;
}
.hero-copy h1,
.article-hero h1,
.section-heading h2,
.service-cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.98;
  margin: 0.3rem 0 1rem;
}
.hero-copy p,
.article-hero p,
.section-heading p,
.service-cta-section p,
.article-body p {
  color: var(--muted);
  max-width: 720px;
}
.eyebrow {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0;
}
.calculator-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 1.1rem;
}
label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-weight: 750;
  font-size: 0.9rem;
}
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 0.72rem 0.8rem;
  color: var(--ink);
  background: white;
  font: inherit;
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--ink);
  padding: 0.72rem 1rem;
  font-weight: 850;
  cursor: pointer;
}
.button.primary { background: var(--ink); color: white; }
.button.secondary { background: white; color: var(--ink); }
.calculator-panel .button,
.output {
  grid-column: 1 / -1;
}
.output {
  min-height: 200px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f7faf8;
  padding: 1rem;
}
.output h2 { margin: 0 0 0.5rem; }
.result-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1;
  margin: 0.35rem 0 0.9rem;
}
.ticker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.ticker div {
  padding: 1.15rem;
  text-align: center;
  border-right: 1px solid var(--line);
}
.ticker div:last-child { border-right: 0; }
.ticker strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
}
.ticker span,
.mini-card span,
.content-card span {
  color: var(--muted);
}
.section,
.article-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
}
.compact-section {
  background: var(--gold);
  box-shadow: 0 0 0 100vmax var(--gold);
  clip-path: inset(0 -100vmax);
}
.guide-grid,
.mini-grid,
.example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.guide-grid { grid-template-columns: repeat(5, 1fr); }
.content-card,
.mini-card,
.article-sidebar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1rem;
}
.content-card strong,
.content-card span,
.mini-card strong,
.mini-card span {
  display: block;
}
.content-card span,
.mini-card span { margin-top: 0.35rem; }
.linked-step {
  transition: border-color 160ms ease, transform 160ms ease;
}
.linked-step:hover {
  border-color: var(--leaf);
  transform: translateY(-2px);
}
.formula-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mint);
  padding: 1rem;
  font-weight: 850;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}
.article-body {
  display: grid;
  gap: 1rem;
}
.article-body h2,
.article-sidebar h2 {
  font-family: var(--font-display);
  margin: 1rem 0 0;
}
.article-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 0.65rem;
}
.article-sidebar a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  font-weight: 800;
}
.result-table {
  width: 100%;
  border-collapse: collapse;
}
.result-table th,
.result-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0;
  text-align: left;
}
.service-cta-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem max(1.25rem, calc((100vw - 1180px) / 2 + 1.25rem));
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: white;
}
.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.76);
}
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

@media (max-width: 920px) {
  .hero,
  .article-layout {
    grid-template-columns: 1fr;
  }
  .guide-grid,
  .mini-grid,
  .example-grid,
  .ticker {
    grid-template-columns: repeat(2, 1fr);
  }
  .article-sidebar {
    position: static;
  }
}

@media (max-width: 680px) {
  .nav,
  .nav-links,
  .hero-actions,
  .service-cta-section,
  .footer {
    flex-direction: column;
    align-items: stretch;
  }
  .nav {
    min-height: auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .nav-links {
    display: flex;
    gap: 0.45rem;
  }
  .calculator-panel,
  .guide-grid,
  .mini-grid,
  .example-grid,
  .ticker {
    grid-template-columns: 1fr;
  }
  .button {
    width: 100%;
  }
  .ticker div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .ticker div:last-child {
    border-bottom: 0;
  }
}
