:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5a6472;
  --soft: #f5f7fa;
  --line: #dbe1e8;
  --panel: #ffffff;
  --brand: #2457d6;
  --brand-dark: #153b9c;
  --mint: #1f9d7a;
  --amber: #c77a14;
  --rose: #b43f5d;
  --shadow: 0 18px 45px rgba(29, 43, 69, 0.1);
  --radius: 14px;
  --max: 1180px;
  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: #fbfcfe;
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(36, 87, 214, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(31, 157, 122, 0.08), transparent 35%);
  z-index: -1;
}

a {
  color: var(--brand);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 252, 254, 0.94);
  border-bottom: 1px solid rgba(219, 225, 232, 0.86);
  backdrop-filter: blur(14px);
}

.header-inner,
.footer-inner,
.section,
.hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  width: 190px;
  height: auto;
}

.brand-mark {
  width: 44px;
  height: 44px;
}

.brand-name {
  display: grid;
  line-height: 1.05;
}

.brand-name span:first-child {
  font-size: 1.1rem;
}

.brand-name span:last-child {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: #263241;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 12px;
  border-radius: 10px;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, 0.97fr);
  gap: 36px;
  align-items: start;
  padding: 56px 0 34px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--brand-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
}

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

h1 {
  font-size: clamp(2.45rem, 6vw, 5.2rem);
  max-width: 760px;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

h3 {
  font-size: 1.18rem;
}

p {
  margin: 0;
}

h1,
h2,
h3,
p,
li,
.button {
  overflow-wrap: break-word;
}

.lead {
  margin-top: 20px;
  color: #3d4754;
  font-size: clamp(1.04rem, 1.8vw, 1.26rem);
  max-width: 700px;
}

.hero-actions,
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 16px;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.button:hover,
button:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(36, 87, 214, 0.22);
}

.button.secondary,
button.secondary {
  color: var(--brand-dark);
  background: #fff;
  border-color: #c8d5ec;
}

.button.secondary:hover,
button.secondary:hover {
  color: var(--brand-dark);
  background: #edf3ff;
  box-shadow: none;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
  max-width: 620px;
}

.proof-item {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.proof-item strong {
  display: block;
  font-size: 1.18rem;
}

.proof-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.calculator-shell {
  padding: 22px;
}

.hero-copy,
.calculator-shell,
.tool-panel,
.content-panel {
  min-width: 0;
}

.mini-report {
  background: #101827;
  color: #eff5ff;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 16px;
}

.mini-report h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.mini-report p {
  color: #cbd7e6;
}

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

.metric {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.metric span {
  display: block;
  color: #aebed1;
  font-size: 0.8rem;
}

.metric strong {
  display: block;
  font-size: 1.4rem;
  margin-top: 2px;
}

.metric.good strong {
  color: #7be3bd;
}

.metric.warn strong {
  color: #ffd37b;
}

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

label {
  display: grid;
  gap: 7px;
  color: #2e3948;
  font-weight: 800;
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd8e5;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(36, 87, 214, 0.18);
  border-color: var(--brand);
}

.field-help {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
}

.section {
  padding: 42px 0;
}

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

.section-heading p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.03rem;
}

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

.tool-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.tool-card:hover {
  color: var(--ink);
  border-color: #abc0e7;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tool-card p {
  color: var(--muted);
  margin-top: 8px;
}

.tool-card span {
  color: var(--brand-dark);
  font-weight: 800;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.content-panel,
.tool-panel {
  padding: 26px;
}

.content-flow {
  display: grid;
  gap: 18px;
}

.content-flow h2 {
  margin-top: 16px;
}

.content-flow h2:first-child {
  margin-top: 0;
}

.content-flow p,
.content-flow li {
  color: #364252;
}

.content-flow ul,
.content-flow ol {
  margin: 0;
  padding-left: 22px;
}

.content-flow li + li {
  margin-top: 8px;
}

.formula {
  border-left: 4px solid var(--mint);
  background: #f0fbf7;
  padding: 16px;
  border-radius: 0 10px 10px 0;
  font-weight: 800;
  color: #12352b;
}

.note-box {
  border: 1px solid #f0d4a4;
  background: #fff8ed;
  border-radius: 12px;
  padding: 16px;
  color: #52350c;
}

.result-box {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f6;
}

.result-row span {
  color: var(--muted);
  font-weight: 700;
}

.result-row strong {
  font-size: 1.22rem;
}

.result-row.large strong {
  font-size: 1.55rem;
  color: var(--brand-dark);
}

.page-hero {
  width: min(940px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 28px;
}

.page-hero .lead {
  max-width: 780px;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  background: #fff;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid #edf1f6;
  vertical-align: top;
}

th {
  background: #f4f7fb;
  color: #283445;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: #111827;
  color: #d8e0eb;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  padding: 34px 0;
}

.footer-inner a {
  color: #d8e8ff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

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

.full {
  grid-column: 1 / -1;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
}

.skip-link:focus {
  top: 16px;
}

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

  .nav {
    justify-content: flex-start;
  }

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

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

@media (max-width: 640px) {
  .header-inner,
  .footer-inner,
  .section,
  .hero,
  .page-hero {
    width: calc(100vw - 22px);
    max-width: calc(100vw - 22px);
  }

  .hero {
    padding-top: 34px;
  }

  .brand-logo {
    width: 174px;
  }

  h1 {
    font-size: clamp(2.25rem, 10vw, 3.1rem);
  }

  .hero-copy,
  .lead,
  .hero-actions,
  .hero-proof,
  .calculator-shell,
  .tool-panel,
  .content-panel {
    width: min(100%, 360px);
    max-width: 360px;
  }

  .hero-proof,
  .form-grid,
  .report-grid,
  .tool-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .calculator-shell,
  .content-panel,
  .tool-panel {
    padding: 18px;
  }

  .nav a {
    padding: 8px 10px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .button-row {
    display: none;
  }

  body {
    background: #fff;
  }

  .calculator-shell,
  .tool-panel,
  .content-panel,
  .tool-card {
    box-shadow: none;
  }
}
