:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #162033;
  --muted: #6b7280;
  --line: #e8edf5;
  --brand: #0f6abf;
  --brand-2: #0ea5a8;
  --accent: #ff8c42;
  --shadow: 0 18px 40px rgba(16, 33, 58, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body {
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(14, 165, 168, 0.15), transparent 40%),
    radial-gradient(circle at 100% 10%, rgba(15, 106, 191, 0.14), transparent 42%),
    linear-gradient(180deg, #eef4ff 0%, #f7fbff 35%, #f7f7fb 100%);
}

button,
input,
select,
textarea,
summary {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, 94vw);
  margin: 18px auto 80px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  background: linear-gradient(135deg, #0a3565, var(--brand) 55%, var(--brand-2));
  color: #fff;
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.hero-copy {
  display: grid;
  gap: 8px;
  align-content: start;
  max-width: 760px;
}

.hero h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Baskerville", "Georgia", serif;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.04;
}

.hero-subtitle {
  margin: 0;
  font-weight: 700;
  max-width: 46ch;
  line-height: 1.2;
}

.hero-benefits {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 6px;
  align-items: start;
}

.hero-benefits span {
  font-size: 0.76rem;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-trust-inline {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.92;
  max-width: 60ch;
  line-height: 1.35;
}

.source-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.source-link-light {
  color: #fff;
  opacity: 0.95;
}

.source-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 13px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(15, 106, 191, 0.22);
}

.btn-secondary,
.btn-secondary-panel {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.text-link-btn {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 800;
  padding: 0;
  cursor: pointer;
}

.page-flow {
  margin-top: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 30px rgba(16, 33, 58, 0.04);
  padding: 14px;
}

.panel + .panel {
  margin-top: 10px;
}

.panel-header {
  margin-bottom: 10px;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.14rem;
}

.panel-header p {
  margin: 3px 0 0;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.35;
}

.quick-start-shell {
  display: grid;
  gap: 10px;
  max-width: 600px;
}

.calculator-form {
  display: grid;
  gap: 12px;
}

.calculator-orientation {
  display: grid;
  gap: 3px;
}

.calculator-orientation strong {
  font-size: 0.9rem;
}

.calculator-emphasis {
  margin: -2px 0 0;
  font-size: 0.84rem;
  line-height: 1.35;
}

.comparison-strip,
.strategy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.comparison-pill,
.strategy-chip,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 800;
}

.comparison-pill,
.pill {
  border: 1px solid #e6edf7;
  background: #f4f7fb;
  color: #46556b;
}

.comparison-pill.active {
  background: rgba(15, 106, 191, 0.1);
  border-color: rgba(15, 106, 191, 0.18);
  color: #0a4f8c;
}

.pill-accent {
  color: #8c4700;
  background: #fff2e6;
  border-color: #ffd7b0;
}

.strategy-chip {
  border: 1px solid rgba(15, 106, 191, 0.12);
  background: rgba(15, 106, 191, 0.06);
  color: #0a4f8c;
}

.quick-start-note {
  margin: -2px 0 0;
  color: #425166;
  font-size: 0.8rem;
  line-height: 1.35;
}

.validation-note {
  margin: -2px 0 0;
  min-height: 1.2em;
}

.form-field {
  display: grid;
  gap: 5px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #324255;
}

.field-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.form-field input {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  min-height: 46px;
}

.form-field small,
.advanced-copy {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}

.form-field input:focus,
.btn:focus,
summary:focus,
.text-link-btn:focus {
  outline: 3px solid rgba(15, 106, 191, 0.18);
  outline-offset: 2px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.example-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.advanced-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  padding: 10px;
}

.advanced-card summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.advanced-card summary::-webkit-details-marker {
  display: none;
}

.advanced-card summary::after {
  content: "+";
  float: right;
  color: var(--brand);
}

.advanced-card[open] summary::after {
  content: "−";
}

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

.subsection {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.subsection h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
}

.fast-answer-card {
  background: linear-gradient(180deg, #fff, #f7fbff);
  display: grid;
  gap: 10px;
}

.fast-answer-card h3 {
  font-family: "Iowan Old Style", "Baskerville", "Georgia", serif;
  font-size: 1.42rem;
  line-height: 1.08;
  margin: 0;
  max-width: 28ch;
}

.lead-copy,
.support-inline-copy,
.break-even-copy {
  margin: 0;
}

.answer-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-copy {
  font-size: 0.95rem;
  color: #24364d;
  line-height: 1.4;
}

.answer-why {
  margin: -2px 0 0;
  font-size: 0.84rem;
  line-height: 1.4;
}

.break-even-spotlight {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(15, 106, 191, 0.14);
  border-radius: 12px;
  background: rgba(15, 106, 191, 0.05);
}

.break-even-label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.break-even-value {
  display: block;
  font-family: "Iowan Old Style", "Baskerville", "Georgia", serif;
  font-size: 1.72rem;
  line-height: 1;
  margin-top: 4px;
}

.support-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.support-inline-row {
  justify-content: space-between;
  padding: 10px 0 0;
  margin-top: 10px;
  border-top: 1px solid rgba(15, 106, 191, 0.08);
}

.support-inline-title {
  display: block;
  margin-bottom: 2px;
}

.support-inline-copy {
  font-size: 0.84rem;
  color: #8c4700;
  line-height: 1.35;
  max-width: 48ch;
}

.support-inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #f3c89d;
  background: linear-gradient(180deg, #fff8f2, #fff);
  color: #6f4514;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.comparison-section {
  margin-top: 10px;
}

.results-more {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  padding: 10px 12px;
}

.results-more summary,
.panel-summary {
  cursor: pointer;
  list-style: none;
}

.results-more summary::-webkit-details-marker,
.panel-summary::-webkit-details-marker {
  display: none;
}

.results-more summary {
  font-weight: 800;
  color: #0a4f8c;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 8px;
}

.section-head h3,
.section-head p {
  margin: 0;
}

.section-head p {
  text-align: right;
}

.comparison-grid,
.decision-summary-grid,
.insight-grid,
.break-even-grid,
.scenario-grid,
.tool-grid,
.content-grid-two {
  display: grid;
  gap: 8px;
}

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

.decision-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.break-even-grid,
.scenario-grid,
.tool-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-grid-two {
  grid-template-columns: 1fr 1fr;
}

.learn-details {
  padding: 0;
  overflow: hidden;
}

.panel-summary {
  display: block;
  padding: 14px;
}

.panel-summary h2,
.panel-summary p {
  margin: 0;
}

.panel-summary p {
  margin-top: 4px;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.35;
}

.learn-stack {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.result-card,
.summary-card,
.insight-card,
.break-even-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.summary-card {
  background: linear-gradient(180deg, #fff, #fbfdff);
  min-height: 88px;
}

.summary-card span,
.summary-card strong {
  display: block;
}

.summary-card span {
  color: var(--muted);
  font-size: 0.76rem;
}

.summary-card strong {
  margin-top: 3px;
  font-size: 0.95rem;
  line-height: 1.25;
}

.result-card.is-recommended {
  border-color: rgba(15, 106, 191, 0.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(14, 165, 168, 0.08), transparent 34%),
    linear-gradient(180deg, #f8fcff, #ffffff);
  box-shadow: 0 12px 28px rgba(15, 106, 191, 0.08);
}

.result-card-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.result-card h4,
.insight-card h4,
.break-even-card h4,
.tool-card h3 {
  margin: 0;
}

.scenario-label {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 2px;
}

.pill-recommended {
  background: rgba(15, 106, 191, 0.12);
  border-color: rgba(15, 106, 191, 0.2);
  color: #0a4f8c;
}

.scenario-monthly {
  margin: 10px 0 6px;
  font-family: "Iowan Old Style", "Baskerville", "Georgia", serif;
  font-size: 1.52rem;
  line-height: 1.04;
}

.scenario-monthly span {
  font-size: 0.78rem;
  color: var(--muted);
}

.metric-stack {
  display: grid;
  gap: 6px;
}

.metric-stack-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.84rem;
}

.metric-stack-row span:last-child {
  text-align: right;
  font-weight: 700;
}

.scenario-take {
  margin-top: 8px;
  color: #425166;
  font-size: 0.8rem;
}

.scenario-fit {
  margin: 6px 0 0;
  line-height: 1.35;
}

.chart-card {
  overflow: hidden;
}

.chart-helper-copy {
  margin: 0 0 8px;
  line-height: 1.35;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.chart-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.chart-svg {
  width: 100%;
  min-width: 760px;
  height: auto;
  display: block;
}

.chart-axis,
.chart-gridline,
.chart-break-line {
  stroke: #d9e4f3;
  stroke-width: 1;
}

.chart-gridline {
  stroke-dasharray: 4 4;
}

.chart-break-line {
  stroke: rgba(255, 140, 66, 0.9);
  stroke-dasharray: 6 5;
}

.chart-label,
.chart-break-label {
  fill: #58667a;
  font-size: 12px;
}

.chart-break-label {
  fill: #8c4700;
  font-weight: 700;
}

.chart-line {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #334155;
}

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

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

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

.faq-item p {
  margin: 8px 0 0;
  color: #334155;
  line-height: 1.45;
}

.scenario-grid .subsection,
.tool-card,
.support-card {
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.tool-card {
  display: grid;
  gap: 8px;
}

.support-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 140, 66, 0.1), transparent 35%),
    linear-gradient(180deg, #fff, #fbfdff);
}

.support-card h3,
.support-card p {
  margin: 0;
}

.app-footer {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.footer-branding {
  display: grid;
  gap: 2px;
}

.footer-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-actions a {
  color: #0a4f8c;
  text-decoration: none;
  font-weight: 700;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: rgba(22, 32, 51, 0.95);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.85rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  z-index: 1200;
}

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

.small-copy {
  font-size: 0.8rem;
}

.no-print {
  display: initial;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  .content-grid-two {
    grid-template-columns: 1fr;
  }

  .break-even-grid,
  .scenario-grid,
  .tool-grid {
    grid-template-columns: 1fr 1fr;
  }

}

@media (max-width: 900px) {
  .comparison-grid,
  .decision-summary-grid,
  .insight-grid,
  .advanced-grid {
    grid-template-columns: 1fr 1fr;
  }

  .support-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100%, 96vw);
    margin-top: 12px;
    margin-bottom: 88px;
  }

  .hero {
    padding: 16px;
    border-radius: 16px;
  }

  .hero h1 {
    font-size: clamp(1.72rem, 9vw, 2.2rem);
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .hero-benefits {
    grid-template-columns: 1fr;
  }

  .comparison-grid,
  .decision-summary-grid,
  .insight-grid,
  .break-even-grid,
  .scenario-grid,
  .tool-grid,
  .advanced-grid,
  .content-grid-two {
    grid-template-columns: 1fr;
  }

  .section-head,
  .app-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head p {
    text-align: left;
  }

  .hero-benefits span,
  .strategy-chip {
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .form-actions,
  .support-inline,
  .example-row {
    width: 100%;
  }

  .field-actions {
    gap: 6px;
  }

  .calculator-emphasis {
    font-size: 0.8rem;
  }

  .support-inline-row > div {
    width: 100%;
  }

  .support-inline-link {
    width: 100%;
  }

  .scenario-monthly {
    font-size: 1.55rem;
  }

  .fast-answer-card h3 {
    max-width: 100%;
  }
}

@media print {
  .no-print,
  .app-footer {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .page-shell {
    width: 100%;
    margin: 0;
  }

  .panel,
  .hero {
    box-shadow: none;
  }
}
