:root {
  color-scheme: light;
  --ink: #101817;
  --muted: #53615d;
  --line: #d7dfdc;
  --panel: #ffffff;
  --soft: #f4f8f5;
  --blue: #dcecff;
  --mint: #def6ea;
  --amber: #fff0c9;
  --coral: #ffe2da;
  --dark: #14201d;
  --accent: #246b58;
  --accent-2: #1769aa;
  --shadow: 0 18px 50px rgba(24, 35, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f7fbff 0%, #f4f8f5 42%, #ffffff 100%);
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--dark);
  font-size: 0.82rem;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-weight: 700;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(46px, 8vw, 90px) clamp(18px, 5vw, 72px) 36px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  font-size: clamp(2.35rem, 5vw, 5rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

h3 {
  font-size: 1.1rem;
}

.lead {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.22rem);
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.note {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.calculator-panel,
.result-panel,
.info-panel,
.tool-card,
.legal-page {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.calculator-panel {
  padding: clamp(18px, 3vw, 28px);
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
}

button {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--dark);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

button:hover {
  background: #22332e;
}

.result-panel {
  margin-top: 16px;
  padding: 18px;
  background: #fbfffd;
}

.result-kicker {
  color: var(--muted);
  font-weight: 900;
}

.result-main {
  margin-top: 4px;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1;
}

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

.stat {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.stat strong {
  display: block;
  font-size: 1.1rem;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.content-band {
  padding: 44px clamp(18px, 5vw, 72px);
}

.content-band.alt {
  background: #eef7f2;
}

.content-band.blue {
  background: #eef6ff;
}

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

.section-head p {
  color: var(--muted);
}

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

.tool-card {
  min-height: 176px;
  padding: 20px;
  text-decoration: none;
  box-shadow: none;
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.tool-card p {
  color: var(--muted);
}

.mini-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 24px;
  align-items: start;
}

.info-panel {
  padding: 22px;
  box-shadow: none;
}

.ladder-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ladder-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.warning {
  margin-top: 14px;
  border-left: 4px solid #b85f31;
  padding: 12px 14px;
  background: var(--coral);
  color: #573021;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.legal-page {
  max-width: 920px;
  margin: 42px auto;
  padding: clamp(22px, 4vw, 42px);
  box-shadow: none;
}

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

@media (max-width: 880px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .split {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.95rem;
  }

  .hero {
    padding-top: 34px;
  }

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

  h1 {
    font-size: clamp(2.15rem, 12vw, 3.45rem);
  }

  .result-main {
    font-size: clamp(2rem, 13vw, 3rem);
  }
}
