@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

:root {
  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --primary: #1e40af;
  --primary-deep: #1e3a8a;
  --primary-ink: #1e1b4b;
  --danger: #b91c1c;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.96);
  border-bottom: 1px solid var(--line);
}

.topbar,
.container,
.footer-inner {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
}

.brand-text strong {
  display: block;
  font-size: 1rem;
}

.brand-text span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font: inherit;
}

.site-nav ul,
.footer-links,
.mini-links,
.tool-list,
.breadcrumbs {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav ul {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text);
}

.hero {
  padding: 80px 0 64px;
  background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 50%, #1E1B4B 100%);
  color: #fff;
}

.hero-grid,
.content-grid,
.footer-grid,
.tool-grid,
.stats-grid,
.card-grid,
.faq-grid,
.form-grid,
.results-grid {
  display: grid;
  gap: 1.5rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: start;
}

.eyebrow {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 16px;
}

h1,
h2,
h3 {
  font-family: inherit;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.5rem, 4vw, 4rem);
}

h2 {
  font-size: clamp(1.75rem, 2.2vw, 2.25rem);
}

h3 {
  font-size: 1.125rem;
}

p,
li {
  color: var(--text);
  font-size: 1rem;
}

.hero-copy p {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.84);
  max-width: 62ch;
}

.hero-copy li {
  color: rgba(255, 255, 255, 0.84);
}

.hero-card,
.hero-card h2,
.hero-card h3,
.hero-card p,
.hero-card label,
.hero-card strong,
.hero-card .helper-text,
.hero-card .fine-print,
.hero-card .muted,
.hero-card .result-summary,
.hero-card .result-summary span,
.hero-card .result-tile span,
.hero-card .result-tile strong {
  color: var(--text);
}

.hero-card a:not(.button) {
  color: var(--primary);
}

.hero-points,
.check-list,
.content-list {
  padding-left: 1.1rem;
}

.cta-row,
.button-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 24px;
}

.button,
button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button:hover,
button:hover,
.button-link:hover {
  text-decoration: none;
}

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

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

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

.card,
.calculator-panel,
.result-panel,
.info-panel,
.faq-item,
.tool-card,
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.hero-card {
  padding: 24px;
}

.hero-card .stat-card {
  height: 100%;
}

.stat-card {
  padding: 24px;
}

.hero .stat-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px;
}

.stat-card strong {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 8px;
  color: var(--text);
}

.hero .stat-card strong {
  color: #ffffff;
}

.hero .stat-card span {
  color: rgba(255, 255, 255, 0.8);
}

.section {
  padding: 72px 0;
}

.section-tight {
  padding-top: 24px;
}

.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.content-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: start;
}

.card-grid,
.tool-grid,
.faq-grid,
.results-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-card,
.faq-item,
.card,
.info-panel {
  padding: 24px;
}

.tool-card h3,
.faq-item h3 {
  margin-bottom: 0.65rem;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.mini-links a {
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.95rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs li::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--line);
}

.breadcrumbs li:last-child::after {
  display: none;
}

.calculator-shell {
  display: grid;
  gap: 1.25rem;
}

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

.calculator-panel h2,
.result-panel h2 {
  margin-bottom: 8px;
}

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

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

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

label {
  font-weight: 600;
  font-size: 0.95rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(30, 64, 175, 0.12);
  border-color: var(--primary);
}

.helper-text,
.fine-print,
.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.error-message {
  display: none;
  margin-top: 0.35rem;
  color: var(--danger);
  font-size: 0.88rem;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--danger);
  background: #fff;
}

.field.invalid .error-message {
  display: block;
}

.results-grid {
  margin-top: 16px;
}

.result-tile {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.result-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}

.result-tile strong {
  display: block;
  font-size: clamp(1.35rem, 2vw, 2rem);
  color: var(--text);
}

.result-summary {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: var(--radius-md);
}

.callout {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 72px;
  background: var(--surface);
}

.footer-inner {
  padding: 40px 0;
}

.footer-grid {
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}

.footer-links li + li {
  margin-top: 0.55rem;
}

.footer-note {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.page-hero {
  padding: 40px 0 24px;
}

.page-hero p {
  max-width: 72ch;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
}

th,
td {
  padding: 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: var(--surface-strong);
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .hero-grid,
  .content-grid,
  .footer-grid,
  .card-grid,
  .tool-grid,
  .faq-grid,
  .results-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

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

  .site-nav {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.6rem);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    display: none;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .hero,
  .section {
    padding: 48px 0;
  }

  .hero-grid,
  .content-grid,
  .footer-grid,
  .card-grid,
  .tool-grid,
  .faq-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.3rem;
  }
}
