:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f0f5ff;
  --surface-green: #eefaf4;
  --text: #10213d;
  --muted: #5e6c83;
  --subtle: #8490a3;
  --border: #dce3ee;
  --border-strong: #c9d4e4;
  --primary: #0f5bd7;
  --primary-dark: #0a43a2;
  --primary-soft: #e9f1ff;
  --green: #138a54;
  --green-dark: #0e673e;
  --green-soft: #e7f7ef;
  --orange: #c25e12;
  --orange-soft: #fff3e8;
  --red: #b42318;
  --red-soft: #fff0ef;
  --shadow-sm: 0 1px 2px rgba(16, 33, 61, 0.05), 0 8px 24px rgba(16, 33, 61, 0.06);
  --shadow-lg: 0 16px 50px rgba(16, 33, 61, 0.1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --content: 1440px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--primary);
}

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

svg {
  display: block;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--primary-dark);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(220, 227, 238, 0.85);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner,
.content-width {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
}

.brand-mark svg {
  width: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.main-nav a {
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 650;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--text);
}

.github-button,
.primary-button,
.secondary-button,
.text-button {
  border: 0;
  cursor: pointer;
}

.github-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(16, 33, 61, 0.04);
}

.github-button:hover {
  color: var(--text);
  border-color: #aebbd0;
  background: #f9fbff;
}

.github-button svg {
  width: 19px;
  fill: currentColor;
}

.hero {
  padding: 52px 0 46px;
  background:
    radial-gradient(circle at 12% 8%, rgba(15, 91, 215, 0.1), transparent 25%),
    radial-gradient(circle at 92% 18%, rgba(19, 138, 84, 0.08), transparent 24%),
    linear-gradient(180deg, #fff 0%, #f8faff 100%);
}

.hero-grid {
  width: min(calc(100% - 40px), 1540px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(430px, 1.05fr) minmax(420px, 1.2fr);
  gap: 18px;
  align-items: start;
}

.hero-copy {
  padding: 26px 18px 20px 2px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(2.55rem, 4.5vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 630px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.3vw, 1.2rem);
  line-height: 1.65;
}

.benefit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 26px 0 0;
}

.benefit-list span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.benefit-list svg {
  width: 17px;
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.hero-note {
  margin-top: 28px;
  padding: 18px;
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  background: rgba(233, 241, 255, 0.78);
}

.hero-note strong {
  display: block;
  margin-bottom: 5px;
}

.hero-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
}

.calculator-card,
.results-card {
  border: 1px solid rgba(210, 220, 234, 0.95);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.calculator-card {
  padding: 24px;
}

.results-card {
  padding: 24px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 20px;
}

.section-heading h2,
.section-heading h3,
.chart-heading h3 {
  margin: 0;
  letter-spacing: -0.035em;
}

.section-heading h2 {
  font-size: clamp(1.65rem, 2.5vw, 2.5rem);
  line-height: 1.12;
}

.section-heading.compact h2 {
  font-size: 1.25rem;
}

.section-heading > div > p:last-child,
.chart-heading p {
  margin: 7px 0 0;
  color: var(--muted);
}

.text-button {
  padding: 8px;
  color: var(--primary);
  background: transparent;
  font-weight: 750;
}

.text-button:hover {
  color: var(--primary-dark);
}

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

.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
}

.field > span:first-child {
  min-height: 1.35em;
}

.field em {
  color: var(--subtle);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 600;
}

.input-shell {
  min-height: 45px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input-shell:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 91, 215, 0.13);
}

.field.has-error .input-shell {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.09);
}

.input-shell input,
.input-shell select {
  min-width: 0;
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-weight: 700;
}

.select-shell {
  position: relative;
}

.select-shell::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  top: 8px;
  color: var(--muted);
  pointer-events: none;
}

.input-shell select {
  appearance: none;
  padding-right: 34px;
}

.prefix,
.suffix {
  flex: none;
  color: var(--muted);
  font-weight: 750;
}

.prefix {
  padding-left: 12px;
}

.suffix {
  padding-right: 12px;
  font-size: 0.82rem;
}

.field small {
  min-height: 1.25em;
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
}

.field .field-error {
  min-height: 0;
  color: var(--red);
  font-weight: 650;
}

.error-summary {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #f1b7b2;
  border-radius: 10px;
  color: #7a1c14;
  background: var(--red-soft);
  font-size: 0.86rem;
  font-weight: 650;
}

.form-actions {
  margin-top: 22px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  font-weight: 800;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.primary-button {
  width: 100%;
  min-height: 49px;
  padding: 0 18px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 9px 22px rgba(15, 91, 215, 0.23);
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.primary-button svg,
.secondary-button svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.form-actions p {
  margin: 9px 0 0;
  color: var(--subtle);
  font-size: 0.75rem;
  text-align: center;
}

.status-pill {
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.75rem;
  font-weight: 800;
}

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

.result-tile {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.result-tile > div:nth-child(2) {
  min-width: 0;
}

.result-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
}

.result-growth .result-icon,
.result-fi .result-icon {
  color: var(--green);
  background: var(--green-soft);
}

.result-icon svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.result-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-tile strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 4px;
  font-size: clamp(1.65rem, 2.5vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.result-growth strong,
.result-fi strong {
  color: var(--green-dark);
}

.result-tile > div > span {
  display: block;
  min-height: 2.6em;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.result-tile dl {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.result-tile dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
}

.result-tile dt {
  color: var(--subtle);
}

.result-tile dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.interpretation {
  margin-top: 14px;
  padding: 13px 15px;
  border-left: 4px solid var(--orange);
  border-radius: 0 10px 10px 0;
  color: #6e3a0e;
  background: var(--orange-soft);
  font-size: 0.82rem;
}

.interpretation strong {
  color: #512905;
}

.preview-chart-card {
  margin-top: 14px;
  padding: 16px 14px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.chart-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.chart-heading h3 {
  font-size: 1rem;
}

.chart-heading p,
.chart-heading a {
  font-size: 0.78rem;
}

.chart-heading a {
  flex: none;
  font-weight: 750;
  text-decoration: none;
}

.chart-container {
  min-height: 320px;
  overflow: hidden;
}

.chart-preview {
  min-height: 230px;
}

.line-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid line {
  stroke: #e3e9f2;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-axis-label,
.chart-legend-label {
  fill: #6d798c;
  font-family: var(--font);
  font-size: 11px;
}

.chart-series {
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chart-series.series-green,
.chart-point.series-green {
  stroke: var(--green);
}

.chart-series.series-orange,
.chart-point.series-orange {
  stroke: var(--orange);
}

.chart-series.series-slate,
.chart-point.series-slate {
  stroke: #6e7690;
}

.chart-series.series-dashed {
  stroke-dasharray: 7 6;
}

.chart-point {
  fill: #fff;
  stroke: var(--primary);
  stroke-width: 2;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.line-chart:hover .chart-point,
.chart-point:focus {
  opacity: 1;
}

.chart-marker line {
  stroke: var(--green);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

.chart-marker text {
  fill: var(--green-dark);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 800;
}

.chart-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.secondary-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: #fff;
  font-size: 0.82rem;
}

.secondary-button:hover {
  border-color: #a8b6ca;
  background: #f8fbff;
  transform: translateY(-1px);
}

.action-message {
  min-height: 1.35em;
  margin: 8px 0 0;
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 700;
}

.trust-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.trust-grid article {
  display: flex;
  gap: 14px;
  padding: 26px 30px;
  background: #fff;
}

.mini-icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
}

.mini-icon svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.trust-grid h2 {
  margin: 0;
  font-size: 0.95rem;
}

.trust-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.page-section {
  padding: 78px 0;
}

.section-muted {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #f1f5fa;
}

.table-card,
.chart-card,
.prose-card,
.assumption-card,
.sources-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.table-card {
  overflow: hidden;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: #526078;
  background: #f6f8fb;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  font-size: 0.88rem;
}

tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

tbody tr:hover td {
  background: var(--primary-soft);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.scenario-name {
  color: var(--text);
  font-weight: 800;
}

.scenario-base {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.chart-card {
  padding: 24px;
}

.chart-card .chart-heading h3 {
  font-size: 1.13rem;
}

.projection-heading {
  align-items: center;
}

.projection-scroll {
  max-height: 690px;
  overflow: auto;
}

.projection-scroll tbody tr.is-hidden {
  display: none;
}

.prose-layout {
  max-width: 1220px;
}

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

.prose-card,
.assumption-card,
.sources-card {
  padding: 24px;
}

.prose-card h3,
.assumption-card h3,
.sources-card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.prose-card p,
.assumption-card li,
.sources-card p,
.sources-card li {
  color: var(--muted);
}

.prose-card code {
  display: block;
  margin-top: 16px;
  padding: 12px 14px;
  overflow-wrap: anywhere;
  border-radius: 9px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.warning-card {
  border-color: #efd0b3;
  background: #fffaf5;
}

.assumption-card {
  margin-top: 18px;
}

.assumption-card ul,
.sources-card ul {
  margin: 0;
  padding-left: 22px;
}

.assumption-card li + li,
.sources-card li + li {
  margin-top: 8px;
}

.narrow-content {
  max-width: 980px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 33, 61, 0.03);
}

.faq-list summary {
  position: relative;
  padding: 18px 50px 18px 20px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-weight: 800;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 14px;
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 500;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
}

.sources-card {
  margin-top: 24px;
}

.sources-card a {
  font-weight: 650;
}

.site-footer {
  display: grid;
  min-height: 110px;
  place-items: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: #fff;
  font-size: 0.84rem;
}

.site-footer p {
  margin: 0;
}

.noscript-message {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 10px;
  color: #fff;
  background: var(--red);
  box-shadow: var(--shadow-lg);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
.chart-point:focus-visible {
  outline: 3px solid rgba(15, 91, 215, 0.3);
  outline-offset: 3px;
}

@media (max-width: 1320px) {
  .hero-grid {
    grid-template-columns: minmax(250px, 0.68fr) minmax(410px, 1fr) minmax(390px, 1.05fr);
  }

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

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

  .result-tile {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 12px;
  }

  .result-icon {
    grid-row: span 2;
    margin: 0;
  }

  .result-tile dl {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .main-nav {
    display: none;
  }

  .hero-grid {
    width: min(calc(100% - 36px), 980px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .hero-copy {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 10px 36px;
    align-items: end;
    padding: 12px 0 18px;
  }

  .hero-copy .eyebrow,
  .hero-copy h1,
  .hero-copy .hero-summary {
    grid-column: 1;
  }

  .benefit-list,
  .hero-note {
    grid-column: 2;
  }

  .benefit-list {
    align-self: end;
    margin-top: 0;
  }

  .hero-note {
    margin-top: 10px;
  }

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

@media (max-width: 760px) {
  html {
    scroll-padding-top: 72px;
  }

  .header-inner,
  .content-width {
    width: min(calc(100% - 28px), var(--content));
  }

  .header-inner {
    min-height: 64px;
    gap: 12px;
  }

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

  .brand > span:last-child {
    display: none;
  }

  .github-button {
    margin-left: auto;
  }

  .hero {
    padding: 34px 0 30px;
  }

  .hero-grid {
    width: min(calc(100% - 24px), 680px);
    grid-template-columns: 1fr;
  }

  .hero-copy {
    grid-column: auto;
    display: block;
    padding: 4px 4px 16px;
  }

  .hero-copy h1 {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .benefit-list {
    margin-top: 22px;
  }

  .hero-note {
    margin-top: 22px;
  }

  .calculator-card,
  .results-card {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .input-grid,
  .prose-grid {
    grid-template-columns: 1fr;
  }

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

  .result-tile strong {
    font-size: 2rem;
  }

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

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .trust-grid article {
    padding: 22px 16px;
  }

  .page-section {
    padding: 58px 0;
  }

  .section-heading,
  .projection-heading {
    display: block;
  }

  .section-heading .secondary-button,
  .projection-heading .secondary-button {
    margin-top: 18px;
  }

  .chart-card {
    padding: 18px 10px;
  }

  .chart-heading {
    padding: 0 8px;
  }

  .chart-container {
    min-height: 260px;
    overflow-x: auto;
  }

  .line-chart {
    min-width: 620px;
  }

  .chart-preview .line-chart {
    min-width: 520px;
  }

  th,
  td {
    padding: 13px 14px;
  }
}

@media (max-width: 420px) {
  .github-button span {
    display: none;
  }

  .github-button {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .section-heading.compact {
    align-items: flex-start;
  }

  .calculator-card .section-heading.compact {
    display: flex;
  }

  .benefit-list span {
    font-size: 0.77rem;
  }
}

@media print {
  .site-header,
  .form-actions,
  .result-actions,
  .trust-strip,
  .secondary-button,
  .site-footer,
  .sources-card {
    display: none !important;
  }

  body,
  .hero,
  .section-muted {
    background: #fff !important;
  }

  .hero-grid {
    display: block;
    width: 100%;
  }

  .hero-copy,
  .calculator-card,
  .results-card,
  .chart-card,
  .table-card,
  .prose-card,
  .assumption-card {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* Keep wide charts and tables contained inside responsive grid items. */
.calculator-card,
.results-card,
.chart-grid,
.chart-card,
.preview-chart-card,
.table-card,
.table-scroll,
.chart-container {
  min-width: 0;
  max-width: 100%;
}

.milestone-row td {
  color: var(--text);
  background: var(--green-soft) !important;
  font-weight: 750;
}

.result-tile.is-not-reached strong {
  color: var(--orange);
  font-size: 1.45rem;
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .calculator-card,
  .results-card,
  .chart-card {
    width: 100%;
  }

  .chart-container {
    width: 100%;
  }
}
