:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #657084;
  --primary: #1463ff;
  --primary-dark: #0b45b8;
  --line: #dfe5ef;
  --good: #0f8a52;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.hero {
  padding: 24px clamp(18px, 5vw, 72px) 64px;
  background: radial-gradient(circle at top right, #d8e6ff, transparent 38%), linear-gradient(135deg, #081932, #113b7a);
  color: white;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 64px;
}

.nav a {
  color: white;
  text-decoration: none;
  opacity: 0.86;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: end;
  max-width: 1120px;
  margin: 0 auto;
}

.eyebrow {
  color: #9bc0ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

h1 {
  max-width: 760px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.98;
  margin: 0 0 20px;
}

.hero p {
  max-width: 640px;
  color: #dbe7ff;
  font-size: 18px;
}

.button {
  display: inline-flex;
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: 999px;
  background: white;
  color: #103a75;
  text-decoration: none;
  font-weight: 800;
}

.summary-card {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.summary-card strong {
  display: block;
  font-size: 72px;
  line-height: 1;
}

.container {
  max-width: 1120px;
  margin: -34px auto 0;
  padding: 0 18px 48px;
}

.tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 16px 44px rgba(18, 37, 72, 0.14);
}

.tab {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: #eef3fb;
  color: var(--text);
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.tab.active {
  background: var(--primary);
  color: white;
}

.tool {
  display: none;
  margin-top: 20px;
}

.tool.active {
  display: block;
}

.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 18px 50px rgba(18, 37, 72, 0.1);
}

h2 {
  margin: 0 0 8px;
  font-size: 32px;
}

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

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

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

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  color: var(--text);
  font: inherit;
  font-weight: 750;
}

.money-input {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  overflow: hidden;
}

.money-input span {
  display: grid;
  min-height: 50px;
  place-items: center;
  background: #eef3fb;
  color: var(--primary-dark);
  font-weight: 900;
}

.money-input input {
  border: 0;
  border-radius: 0;
}

input:focus {
  outline: 3px solid rgba(20, 99, 255, 0.18);
  border-color: var(--primary);
}

.money-input:focus-within {
  outline: 3px solid rgba(20, 99, 255, 0.18);
  border-color: var(--primary);
}

.result {
  align-self: stretch;
  padding: 24px;
  border-radius: 24px;
  background: #f7faff;
  border: 1px solid var(--line);
}

.metric {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.metric:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 6px;
  color: var(--primary-dark);
  font-size: 26px;
}

.metric.good strong {
  color: var(--good);
}

.content-card {
  margin-top: 20px;
  padding: 28px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 14px 42px rgba(18, 37, 72, 0.08);
}

.content-card h3,
.content-card h2,
.content-card h4 {
  margin-top: 0;
}

.content-card p {
  color: var(--muted);
  line-height: 1.75;
}

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

.info-grid > div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fbfdff;
}

.always-visible {
  display: block;
  margin-top: 28px;
}

.faq details {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 850;
}

.footer {
  margin-top: 32px;
  padding: 42px clamp(18px, 5vw, 72px) 28px;
  background: #081932;
  color: #dbe7ff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  max-width: 1120px;
  margin: 0 auto;
}

.footer strong {
  display: block;
  margin-bottom: 10px;
  color: white;
  font-size: 22px;
}

.footer h3 {
  margin: 0 0 10px;
  color: white;
  font-size: 16px;
}

.footer p {
  margin: 0;
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #9bc0ff;
}

@media (max-width: 860px) {
  .hero-grid,
  .panel {
    grid-template-columns: 1fr;
  }

  .summary-card {
    display: none;
  }

  .calculator,
  .info-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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