:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --text: #111827;
  --muted: #657084;
  --line: rgba(17, 24, 39, 0.1);
  --blue: #0a84ff;
  --blue-dark: #0066cc;
  --green: #1f8f5f;
  --amber: #b7791f;
  --red: #c2413a;
  --shadow: 0 22px 70px rgba(29, 43, 68, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(10, 132, 255, 0.14), transparent 32rem),
    linear-gradient(135deg, #f7fbff 0%, var(--bg) 48%, #eef3f8 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

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

.intro {
  max-width: 760px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 12px;
  font-size: clamp(2.35rem, 6vw, 4.65rem);
  line-height: 1;
  letter-spacing: 0;
}

.lede {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.18rem;
}

.calculator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.84fr);
  gap: 18px;
  align-items: stretch;
}

.panel,
.card,
.assumptions,
.disclaimer {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel {
  border-radius: var(--radius);
  padding: 24px;
}

.inputs {
  display: grid;
  gap: 20px;
}

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

label {
  font-size: 1rem;
  font-weight: 700;
}

.field p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

input {
  width: 100%;
  min-height: 66px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 1.65rem;
  font-weight: 700;
  outline: none;
  padding: 14px 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.16);
}

.input-suffix {
  position: relative;
}

.input-suffix input {
  padding-right: 68px;
}

.input-suffix span {
  position: absolute;
  right: 18px;
  top: 50%;
  color: var(--muted);
  font-weight: 700;
  transform: translateY(-50%);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
  padding: 0 22px;
}

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

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

.secondary {
  background: rgba(17, 24, 39, 0.07);
  color: var(--text);
}

.secondary:hover {
  background: rgba(17, 24, 39, 0.11);
}

.summary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 330px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(238, 247, 255, 0.88));
}

.summary h2 {
  margin-bottom: 4px;
  font-size: clamp(2.5rem, 7vw, 4.45rem);
  line-height: 1;
  letter-spacing: 0;
}

#summary-line {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.meter {
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.09);
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 180ms ease, background 180ms ease;
}

.message {
  margin: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  font-size: 1rem;
  padding: 14px 16px;
}

.plan-context {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.card {
  min-height: 128px;
  border-radius: 20px;
  padding: 18px;
}

.card span {
  display: block;
  min-height: 2.7em;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.card strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.05;
}

.assumptions,
.disclaimer {
  border-radius: 20px;
  margin-top: 18px;
  padding: 22px;
}

.assumptions h2,
.disclaimer h2 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.assumptions ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.disclaimer p {
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 24px, 680px);
    padding: 28px 0;
  }

  .calculator,
  .results,
  .assumptions ul {
    grid-template-columns: 1fr;
  }

  .summary {
    min-height: 280px;
  }

  .card {
    min-height: 112px;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 20px, 680px);
  }

  .panel,
  .assumptions,
  .disclaimer {
    padding: 18px;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  input {
    min-height: 62px;
    font-size: 1.45rem;
  }
}
