:root {
  color-scheme: light;
  --ink: #12212b;
  --muted: #5d6b74;
  --line: #dbe1e5;
  --paper: #f5f7f8;
  --white: #ffffff;
  --accent: #f05a24;
  --accent-dark: #c53f0f;
  --navy: #0f2737;
  --success: #16784a;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(13, 37, 51, 0.11);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; }

button,
input { font: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--navy);
  color: white;
  border-radius: 8px;
}

.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219, 225, 229, .85);
  background: rgba(245, 247, 248, .92);
  backdrop-filter: blur(14px);
}

.header-inner,
.page-shell,
.site-footer-inner {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: .92rem;
}

.nav { display: flex; align-items: center; gap: 1rem; }
.nav a { color: var(--muted); text-decoration: none; font-size: .94rem; font-weight: 650; }
.nav a:hover, .nav a:focus-visible { color: var(--ink); }

.disclosure {
  padding: .55rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
}

.page-shell { padding: 3rem 0 5rem; }

.hero-grid {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--accent-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -.045em;
}

h1 { margin-top: 1rem; font-size: clamp(2.5rem, 5.7vw, 5rem); max-width: 15ch; }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); }
h3 { font-size: 1.15rem; letter-spacing: -.025em; }

.lede {
  max-width: 56ch;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.28rem);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.5rem;
}

.trust-row span {
  padding: .48rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.action-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .7rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
}
.button-primary { background: var(--accent); color: white; }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { border-color: var(--line); background: var(--white); }
.button-secondary:hover { border-color: #aeb9bf; }
.microcopy { max-width: 57ch; margin: 1rem 0 0; color: var(--muted); font-size: .8rem; }
.tool-label,
.card-kicker {
  display: block;
  margin-bottom: .55rem;
  color: var(--accent-dark);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.calculator {
  position: relative;
  overflow: hidden;
  border: 1px solid #cfdae0;
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.calculator::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--accent) 0 58%, var(--navy) 58% 100%);
}

.calculator-head { padding: 1.6rem 1.6rem .9rem; }
.calculator-head p { margin: .45rem 0 0; color: var(--muted); font-size: .9rem; }
.calculator-head h2 { font-size: clamp(1.45rem, 2.3vw, 2.15rem); }

.calc-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  padding: .75rem 1.6rem 1.4rem;
}

.field { display: grid; gap: .35rem; }
.field label { color: var(--muted); font-size: .8rem; font-weight: 750; }
.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .72rem .8rem;
  color: var(--ink);
  background: #fbfcfc;
}
.field input:focus { outline: 3px solid rgba(240, 90, 36, .18); border-color: var(--accent); }

.calc-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #29404e;
  color: white;
}

.result-item { padding: 1.25rem 1.6rem; background: var(--navy); }
.result-label { display: block; color: #adc0ca; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.result-value { display: block; margin-top: .15rem; font-size: 1.65rem; font-weight: 850; letter-spacing: -.04em; }
.calculator-note { margin: 0; padding: .8rem 1.6rem 1.25rem; color: var(--muted); font-size: .78rem; }

.section { padding-top: 5rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.8rem; }
.section-head p { max-width: 52ch; margin: 0; color: var(--muted); }

.steps,
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.steps-five { grid-template-columns: repeat(5, 1fr); }
.quick-answer {
  display: grid;
  grid-template-columns: .65fr 1.35fr;
  gap: 2rem;
  align-items: center;
  margin-top: 5rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--navy);
  color: white;
}
.quick-answer .eyebrow { color: #ffc4ad; }
.quick-answer p { margin: 0; color: #cfdae0; font-size: 1.02rem; }
.split-section { display: grid; grid-template-columns: 1.25fr .75fr; gap: 3rem; align-items: center; }
.split-section p { max-width: 66ch; color: var(--muted); }
.safety-card { padding: 1.5rem; border: 1px solid #f1c9b9; border-radius: var(--radius); background: #fff7f3; }
.check-list { display: grid; gap: .7rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 1.65rem; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 900; }
.text-link { display: inline-block; margin-top: 1.35rem; color: var(--accent-dark); font-weight: 800; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.step,
.guide-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 1.4rem;
}

.step-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 1.4rem;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: .8rem;
  font-weight: 850;
}

.step p,
.guide-card p { margin: .7rem 0 0; color: var(--muted); font-size: .92rem; }

.guide-card { display: flex; flex-direction: column; min-height: 220px; }
.guide-card a { margin-top: auto; padding-top: 1.3rem; color: var(--accent-dark); font-weight: 800; text-decoration: none; }
.guide-card a:hover { text-decoration: underline; }

.notice {
  margin-top: 4rem;
  padding: 1.2rem 1.35rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: #fff2eb;
  color: #63301d;
}

.faq-preview { max-width: 900px; }
details { border-top: 1px solid var(--line); background: var(--white); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { padding: 1.1rem .2rem; cursor: pointer; font-weight: 800; }
details p { margin: -.25rem 0 0; padding: 0 .2rem 1.2rem; color: var(--muted); }

/* Article pages */
.article-shell { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; padding: 2rem 0 5rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 2rem; color: var(--muted); font-size: .8rem; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); }
.article-hero { max-width: 900px; padding: 2rem 0 2.5rem; }
.article-hero h1 { max-width: 17ch; font-size: clamp(2.5rem, 6vw, 4.9rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: 1.3rem; color: var(--muted); font-size: .82rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(220px, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.article-body { min-width: 0; }
.article-body > *:first-child { margin-top: 0; }
.article-body h2 { margin: 3rem 0 1rem; font-size: clamp(1.65rem, 3vw, 2.35rem); scroll-margin-top: 90px; }
.article-body h3 { margin: 2rem 0 .7rem; }
.article-body p { margin: .9rem 0; }
.article-body ul,
.article-body ol { padding-left: 1.3rem; }
.article-body li { margin: .45rem 0; }
.article-body a { color: var(--accent-dark); }
.toc { position: sticky; top: 92px; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.toc strong { display: block; margin-bottom: .7rem; }
.toc a { display: block; padding: .3rem 0; color: var(--muted); font-size: .84rem; text-decoration: none; }
.toc a:hover { color: var(--ink); }
.answer-box,
.warning-box,
.formula-box { margin: 1.5rem 0; padding: 1.25rem; border-radius: 14px; }
.answer-box { border-left: 4px solid var(--success); background: #eef8f3; }
.warning-box { border-left: 4px solid var(--accent); background: #fff2eb; }
.formula-box { border: 1px solid #c8d9e3; background: #edf4f7; font-weight: 750; }
.answer-box p:last-child,
.warning-box p:last-child { margin-bottom: 0; }
.data-table { width: 100%; max-width: 100%; margin: 1.25rem 0; table-layout: fixed; border-collapse: collapse; background: var(--white); font-size: .91rem; }
.data-table th,
.data-table td { padding: .85rem; overflow-wrap: anywhere; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { background: #edf1f3; }
.numbered-list { counter-reset: item; display: grid; gap: 1rem; padding: 0 !important; list-style: none; }
.numbered-list > li { position: relative; padding: 1rem 1rem 1rem 3.5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.numbered-list > li::before { counter-increment: item; content: counter(item); position: absolute; left: 1rem; top: 1rem; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--navy); color: white; font-size: .75rem; font-weight: 850; }
.article-cta { margin-top: 3rem; padding: 1.5rem; border-radius: var(--radius); background: var(--navy); color: white; }
.article-cta p { color: #cfdae0; }
.article-cta .text-link { color: #ff9c77; }
.source-note { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.related-link { display: block; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-weight: 800; text-decoration: none; }
.related-link:hover { border-color: var(--accent); }

.site-footer { border-top: 1px solid var(--line); background: var(--white); }
.site-footer-inner { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem 0; color: var(--muted); font-size: .84rem; }
.site-footer p { margin: 0; max-width: 70ch; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; }
.footer-brand { margin-bottom: .8rem; color: var(--ink); }
.footer-grid nav { display: grid; align-content: start; gap: .45rem; }
.footer-grid nav strong { color: var(--ink); margin-bottom: .25rem; }
.footer-grid nav a { text-decoration: none; }
.footer-grid nav a:hover { color: var(--ink); }
.copyright { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; padding: 1rem 0 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }

@media (max-width: 820px) {
  .nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  h1 { max-width: 10ch; }
  .steps, .guide-grid { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; gap: .8rem; }
  .quick-answer, .split-section, .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}

@media (max-width: 520px) {
  .header-inner { min-height: 60px; }
  .disclosure { display: none; }
  .page-shell { padding-top: 2rem; }
  .calc-form { grid-template-columns: 1fr; padding-inline: 1.15rem; }
  .calculator-head, .result-item { padding-inline: 1.15rem; }
  .calc-result { grid-template-columns: 1fr; }
  .site-footer-inner { flex-direction: column; }
  .footer-grid, .related-grid { grid-template-columns: 1fr; }
  .quick-answer { padding: 1.3rem; }
  .article-shell { padding-top: 1rem; }
}

@media (min-width: 821px) and (max-width: 1100px) {
  .steps-five { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
