:root {
  color-scheme: light;
  --ink: #202528;
  --muted: #626d73;
  --line: #d9e1e3;
  --panel: #ffffff;
  --paper: #f6f7f4;
  --teal: #0d8b84;
  --teal-dark: #07645f;
  --coral: #d85d4a;
  --amber: #d99a1d;
  --green: #4f8f45;
  --slate: #556472;
  --shadow: 0 18px 48px rgba(32, 37, 40, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration-color: rgba(13, 139, 132, 0.45);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal-dark);
}

button,
input {
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.78rem 0.85rem;
  color: var(--ink);
  background: #fff;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(216, 93, 74, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(-160%);
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  z-index: 20;
}

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

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 247, 244, 0.94);
  border-bottom: 1px solid rgba(217, 225, 227, 0.88);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(32, 37, 40, 0.16);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 3px;
  padding: 6px;
  box-shadow: 0 6px 16px rgba(32, 37, 40, 0.08);
}

.brand-mark span {
  display: block;
  border-radius: 3px 3px 2px 2px;
}

.brand-mark span:nth-child(1) {
  height: 42%;
  background: var(--coral);
}

.brand-mark span:nth-child(2) {
  height: 72%;
  background: var(--teal);
}

.brand-mark span:nth-child(3) {
  height: 55%;
  background: var(--amber);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-links a {
  text-decoration: none;
  padding: 0.58rem 0.72rem;
  border-radius: 6px;
  font-size: 0.94rem;
  color: #344045;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: #fff;
  color: var(--teal-dark);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0.65rem;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
}

.hero,
.section,
.tool-layout,
.article-page,
.site-footer {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: 1.2rem;
  padding-right: 1.2rem;
}

.hero {
  min-height: calc(100vh - 70px);
  padding-top: 4.4rem;
  padding-bottom: 4rem;
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(340px, 0.7fr);
  align-items: center;
  gap: 3rem;
}

.hero-tool {
  min-height: min(760px, calc(100vh - 70px));
}

.hero-copy {
  max-width: 680px;
}

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

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

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 64ch;
  color: #465258;
  font-size: clamp(1.04rem, 1.7vw, 1.22rem);
}

.muted,
.small {
  color: var(--muted);
}

.small {
  font-size: 0.94rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 800;
  white-space: normal;
}

.button.primary {
  background: var(--ink);
  color: #fff;
}

.button.primary:hover {
  color: #fff;
  background: #111517;
}

.button.secondary {
  background: #fff;
  border-color: var(--line);
}

.shell-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-calc {
  padding: 1.15rem;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-heading h2 {
  font-size: 1.3rem;
}

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

.calc-grid.compact {
  gap: 0.75rem;
}

label span {
  display: block;
  margin-bottom: 0.32rem;
  color: #3c474c;
  font-size: 0.88rem;
  font-weight: 750;
}

.result-strip {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.result-strip div,
.results div {
  background: #f7f9f8;
  border: 1px solid #e4ebed;
  border-radius: 6px;
  padding: 0.85rem;
}

.result-strip span,
.results span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.result-strip strong,
.results strong {
  display: block;
  margin-top: 0.22rem;
  font-size: 1.35rem;
  line-height: 1.1;
}

.mini-bars {
  height: 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f2f5f2;
  border-radius: 6px;
}

.mini-bars span {
  display: block;
  height: var(--bar);
  border-radius: 5px 5px 3px 3px;
}

.mini-bars span:nth-child(1) {
  background: var(--teal);
}

.mini-bars span:nth-child(2) {
  background: var(--amber);
}

.mini-bars span:nth-child(3) {
  background: var(--coral);
}

.section {
  padding-top: 4.2rem;
  padding-bottom: 4.2rem;
}

.band {
  max-width: none;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-left: max(1.2rem, calc((100vw - 1160px) / 2 + 1.2rem));
  padding-right: max(1.2rem, calc((100vw - 1160px) / 2 + 1.2rem));
}

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

.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
}

.tool-card {
  min-height: 240px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfb;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tool-card a {
  margin-top: auto;
  font-weight: 800;
}

.tool-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: #fff;
  font-weight: 900;
}

.accent-teal {
  background: var(--teal);
}

.accent-coral {
  background: var(--coral);
}

.accent-amber {
  background: var(--amber);
}

.accent-green {
  background: var(--green);
}

.accent-slate {
  background: var(--slate);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: 2.2rem;
  align-items: start;
}

.plain-copy p {
  margin-top: 0;
  color: #465258;
  font-size: 1.04rem;
}

.disclosure-note {
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--amber);
  background: #fff;
}

.tool-page {
  min-height: 72vh;
}

.tool-layout {
  padding-top: 4rem;
  padding-bottom: 4rem;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(420px, 1fr);
  gap: 2rem;
  align-items: start;
}

.tool-intro {
  position: sticky;
  top: 92px;
}

.tool-intro h1 {
  font-size: clamp(2.1rem, 5vw, 4.5rem);
}

.calculator-panel {
  padding: 1.1rem;
}

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

.results .primary-result {
  background: #172124;
  color: #fff;
  border-color: #172124;
}

.results .primary-result span {
  color: rgba(255, 255, 255, 0.74);
}

.score-list {
  display: grid;
  gap: 0.6rem;
}

.score-list label {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}

.score-list input {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
  margin-top: 0.08rem;
}

.score-list span {
  margin: 0;
  font-weight: 650;
}

.score-result {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.score-ring {
  --score: 0%;
  width: 108px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--score), #e6ecee 0);
  display: grid;
  place-items: center;
}

.score-ring span {
  width: 76px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 900;
}

.article-page {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.article {
  max-width: 760px;
}

.article h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.article h2 {
  margin-top: 2rem;
  font-size: 1.55rem;
}

.article p {
  color: #465258;
  font-size: 1.05rem;
}

code {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.08rem 0.28rem;
}

.site-footer {
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  color: #465258;
}

.site-footer p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

@media (max-width: 980px) {
  .hero,
  .tool-layout,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3.2rem;
  }

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

  .tool-intro {
    position: static;
  }
}

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

  .nav-links {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.35rem);
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.45rem;
    box-shadow: 0 14px 34px rgba(32, 37, 40, 0.12);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.85rem;
  }

  .hero {
    min-height: auto;
    padding-top: 2.4rem;
    padding-bottom: 3rem;
  }

  .calc-grid,
  .results,
  .result-strip,
  .score-result {
    grid-template-columns: 1fr;
  }

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

  .tool-card {
    min-height: 0;
  }

  .site-footer {
    flex-direction: column;
  }
}
