:root {
  --navy: #132238;
  --charcoal: #202833;
  --green: #18a957;
  --green-dark: #0f7f3f;
  --orange: #f28c28;
  --blue: #2f80ed;
  --bg: #f4f7f8;
  --surface: #ffffff;
  --line: #d8e0e4;
  --text: #17212c;
  --muted: #5d6b78;
  --danger: #b42318;
  --success: #117a3b;
  --shadow: 0 18px 44px rgba(19, 34, 56, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a:hover {
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 20;
  background: var(--surface);
  color: var(--navy);
  padding: 10px 14px;
}

.skip-link:focus {
  left: 12px;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  width: min(820px, calc(100% - 32px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(1180px, calc(100% - 24px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  color: var(--navy);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--charcoal);
  font-weight: 700;
}

.nav-links .nav-cta {
  color: #ffffff;
  background: var(--green);
  padding: 9px 12px;
  border-radius: var(--radius);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--navy);
  border-radius: var(--radius);
  min-height: 42px;
  padding: 0 14px;
  font-weight: 800;
}

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1d314e 58%, #0f5132 100%);
  color: #ffffff;
  padding: 78px 0 64px;
}

.hero-grid,
.split,
.cta-grid,
.calculator-layout,
.footer-grid {
  display: grid;
  gap: 28px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  align-items: center;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p,
.page-hero p {
  max-width: 760px;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  color: rgba(255, 255, 255, 0.86);
}

.page-hero {
  background: var(--navy);
  color: #ffffff;
  padding: 58px 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 0.98rem;
  text-align: center;
  cursor: pointer;
}

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

.button-primary {
  background: var(--green);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--green-dark);
}

.button-secondary {
  background: #ffffff;
  color: var(--navy);
  border-color: #ffffff;
}

.button-outline {
  background: transparent;
  color: var(--green-dark);
  border-color: var(--green);
}

.hero-panel,
.calculator-card,
.results-panel,
.card,
details,
.legal-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  color: var(--text);
  padding: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.panel-header span,
.result-grid span,
.result-row span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.panel-header strong {
  font-size: 2.2rem;
  color: var(--green-dark);
}

.section {
  padding: 66px 0;
  background: var(--surface);
}

.section-alt {
  background: var(--bg);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: clamp(1.72rem, 3vw, 2.5rem);
  line-height: 1.15;
}

h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1.16rem;
  line-height: 1.25;
}

p {
  margin: 0 0 16px;
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 18px;
}

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

.card {
  display: block;
  padding: 22px;
  color: var(--text);
  box-shadow: none;
}

.card:hover {
  border-color: rgba(24, 169, 87, 0.55);
  text-decoration: none;
  transform: translateY(-2px);
}

.featured-card {
  border-top: 4px solid var(--green);
}

.muted-card {
  background: #f8fafb;
}

.badge {
  display: inline-block;
  margin-bottom: 14px;
  color: #7c4304;
  background: #fff2df;
  border: 1px solid #ffd7a7;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.check-list {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
}

.warning-list li::before {
  background: var(--orange);
}

.cta-band {
  background: var(--charcoal);
  color: #ffffff;
  padding: 42px 0;
}

.cta-band h2 {
  color: #ffffff;
}

.cta-grid {
  grid-template-columns: 1fr auto;
  align-items: center;
}

details {
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: none;
}

summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 800;
}

details p {
  margin-top: 12px;
}

.calculator-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  align-items: start;
}

.calculator-card,
.results-panel,
.legal-block {
  padding: 22px;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

label {
  color: var(--navy);
  font-weight: 800;
  font-size: 0.92rem;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #bbc7cf;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
}

input:focus,
select:focus,
button:focus,
a:focus {
  outline: 3px solid rgba(47, 128, 237, 0.32);
  outline-offset: 2px;
}

.calculator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.results-panel {
  position: sticky;
  top: 92px;
}

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

.result-grid.compact {
  margin-bottom: 16px;
}

.result-grid div,
.result-row {
  background: #f4f8f6;
  border: 1px solid #d7eadf;
  border-radius: var(--radius);
  padding: 14px;
}

.result-grid strong,
.result-row strong {
  display: block;
  color: var(--navy);
  font-size: 1.28rem;
  line-height: 1.25;
}

.highlight-result {
  grid-column: 1 / -1;
  background: #e9f8ef !important;
  border-color: #a9ddbf !important;
}

.highlight-result strong {
  color: var(--green-dark);
  font-size: 2rem;
}

.result-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #f8fafb;
}

.message.warning {
  border-color: #ffc7bd;
  background: #fff1ef;
  color: var(--danger);
}

.message.success {
  border-color: #b9e4c8;
  background: #eef9f2;
  color: var(--success);
}

.notice {
  border: 1px solid #b9e4c8;
  background: #eef9f2;
  color: var(--navy);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-weight: 700;
}

.script-box {
  margin-top: 16px;
  padding: 16px;
  border-left: 5px solid var(--green);
  background: #f7fbf8;
  border-radius: var(--radius);
}

.content-section {
  padding: 46px 0;
  background: var(--surface);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: #ffffff;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.text-link-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: #ffffff;
  color: var(--navy);
  font-weight: 800;
}

.text-link-card:hover {
  border-color: var(--green);
  text-decoration: none;
}

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

.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  color: var(--navy);
  background: #eef4f2;
  font-size: 0.95rem;
}

.comparison-table tr:last-child td {
  border-bottom: 0;
}

.route-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.route-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: #ffffff;
  color: var(--navy);
  font-weight: 800;
}

.route-list a:hover {
  border-color: var(--green);
  text-decoration: none;
}

.site-footer {
  background: #111b2a;
  color: rgba(255, 255, 255, 0.82);
  padding: 40px 0;
}

.footer-grid {
  grid-template-columns: minmax(220px, 0.8fr) 1.2fr;
}

.site-footer a {
  color: #ffffff;
  display: inline-block;
  margin: 0 14px 10px 0;
  font-weight: 700;
}

@media (max-width: 930px) {
  .nav {
    align-items: flex-start;
    padding: 13px 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 64px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }

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

  .hero-grid,
  .split,
  .calculator-layout,
  .cta-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card-grid.three {
    grid-template-columns: 1fr;
  }

  .results-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .hero {
    padding: 52px 0 42px;
  }

  .section,
  .content-section {
    padding: 42px 0;
  }

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

  .button,
  .button-row,
  .calculator-actions {
    width: 100%;
  }

  .button {
    min-height: 50px;
  }
}
