:root {
  --ink: #12201f;
  --muted: #5e6d6a;
  --line: #d9e2df;
  --paper: #fbfbf7;
  --soft: #eef4f1;
  --deep: #0f2f2e;
  --teal: #196c68;
  --gold: #c18b36;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(15, 47, 46, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

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

.skip-link:focus {
  width: auto;
  height: auto;
  clip: auto;
  margin: 12px;
  padding: 10px 14px;
  background: var(--white);
  z-index: 10;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 251, 247, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(217, 226, 223, 0.86);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--deep);
  font-size: 0.95rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover,
.footer-grid a:hover {
  color: var(--teal);
}

.header-cta,
.tool-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--deep);
  font-weight: 700;
  cursor: pointer;
}

.header-cta {
  padding: 0 18px;
}

.hero {
  padding: 58px 0 46px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 54px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 690px;
  font-size: clamp(3rem, 6vw, 5.95rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 640px;
  margin: 24px 0 0;
  color: #43524f;
  font-size: 1.14rem;
}

.tool-search {
  width: min(640px, 100%);
  margin: 32px 0 0;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(18, 32, 31, 0.08);
}

.tool-search input {
  min-width: 0;
  border: 0;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-actions a {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  padding: 9px 13px;
  border-radius: 999px;
  color: #34413f;
  font-size: 0.92rem;
}

.hero-media {
  margin: 0;
  position: relative;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 18px -14px -18px 28px;
  background: #dfeae5;
  border-radius: 12px;
  transform: rotate(-2deg);
}

.hero-media img {
  position: relative;
  width: 100%;
  aspect-ratio: 1.23 / 1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.quick-strip {
  border-block: 1px solid var(--line);
  background: var(--white);
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.strip-grid div {
  min-height: 96px;
  padding: 22px 26px;
  border-right: 1px solid var(--line);
}

.strip-grid div:first-child {
  border-left: 1px solid var(--line);
}

.strip-grid strong,
.strip-grid span {
  display: block;
}

.strip-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.section {
  padding: 86px 0;
}

.section-muted {
  background: var(--soft);
  border-block: 1px solid var(--line);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading.left {
  margin-bottom: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 3.8vw, 3.55rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.compact-grid > p,
.ai-grid > div > p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

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

.tool-card {
  min-height: 254px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(25, 108, 104, 0.42);
  box-shadow: 0 18px 42px rgba(18, 32, 31, 0.1);
}

.tool-card.featured {
  background: var(--deep);
  color: var(--white);
  border-color: var(--deep);
}

.card-kicker {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.tool-card h3 {
  margin: 20px 0 0;
  font-size: 1.42rem;
  line-height: 1.16;
}

.tool-card p {
  margin: 13px 0 22px;
  color: var(--muted);
}

.tool-card.featured p {
  color: rgba(255, 255, 255, 0.78);
}

.card-link {
  margin-top: auto;
  font-weight: 800;
  color: var(--teal);
}

.tool-card.featured .card-link {
  color: var(--white);
}

.editorial-grid,
.ai-grid,
.compact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

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

.article-list a {
  display: grid;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.article-list span {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 760;
}

.article-list strong {
  font-size: 1.08rem;
}

.ai-section {
  background: var(--deep);
  color: var(--white);
}

.ai-section .eyebrow {
  color: #9ed7d0;
}

.ai-grid > div > p {
  color: rgba(255, 255, 255, 0.76);
}

.ai-panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.ai-panel span {
  color: #9ed7d0;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.ai-panel strong {
  display: block;
  margin-top: 16px;
  font-size: 1.9rem;
  line-height: 1.12;
}

.ai-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.compact-section {
  padding: 66px 0;
}

.site-footer {
  padding: 40px 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.76);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  color: var(--white);
}

.footer-grid p {
  margin: 12px 0 0;
}

.footer-grid nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.page-hero {
  padding: 62px 0 44px;
  background: linear-gradient(180deg, #fbfbf7 0%, #eef4f1 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero .section-heading {
  margin-bottom: 0;
}

.breadcrumbs {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--teal);
  font-weight: 700;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.calculator-panel,
.result-panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.calculator-panel,
.result-panel {
  padding: 24px;
}

.content-panel {
  padding: 28px;
  margin-top: 22px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #2f3c39;
  font-weight: 760;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
}

.result-panel {
  position: sticky;
  top: 92px;
  background: var(--deep);
  color: var(--white);
  box-shadow: var(--shadow);
}

.result-panel h2 {
  font-size: 1.15rem;
}

.metric {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.metric span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 1.65rem;
  line-height: 1.1;
}

.result-note {
  color: rgba(255, 255, 255, 0.78);
}

.prose {
  max-width: 760px;
}

.prose h2 {
  margin-top: 0;
  font-size: 1.8rem;
}

.prose h3 {
  margin: 26px 0 8px;
  font-size: 1.2rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

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

.plain-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

@media (max-width: 960px) {
  .header-inner {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .header-cta {
    display: none;
  }

  .hero-grid,
  .editorial-grid,
  .ai-grid,
  .compact-grid,
  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .result-panel {
    position: static;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-grid {
    gap: 34px;
  }

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

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

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

  .strip-grid div,
  .strip-grid div:first-child {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(1180px, calc(100% - 28px));
  }

  h1 {
    font-size: 2.05rem;
    line-height: 1.08;
    max-width: 330px;
  }

  .hero-lede {
    font-size: 1.03rem;
    max-width: 330px;
  }

  .tool-search {
    max-width: 340px;
  }

  .hero-media::before {
    inset: 12px -8px -12px 18px;
  }

  .tool-search {
    grid-template-columns: 1fr;
  }

  .tool-search input {
    min-height: 44px;
  }

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

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

  .tool-card {
    min-height: 220px;
  }

  .section {
    padding: 64px 0;
  }

  .footer-grid,
  .footer-grid nav {
    flex-direction: column;
    align-items: flex-start;
  }
}
