:root {
  --tool-ink: #18263a;
  --tool-muted: #5e7087;
  --tool-line: rgba(24, 38, 58, 0.12);
  --tool-line-strong: rgba(24, 38, 58, 0.22);
  --tool-surface: rgba(255, 255, 255, 0.94);
  --tool-surface-soft: rgba(255, 255, 255, 0.84);
  --tool-brand: #0f6abf;
  --tool-brand-2: #13a39a;
  --tool-brand-deep: #0b345f;
  --tool-accent: #f08a38;
  --tool-shadow: 0 24px 54px rgba(16, 33, 58, 0.08);
  --tool-radius: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--tool-ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(19, 163, 154, 0.14), transparent 32%),
    radial-gradient(circle at 100% 8%, rgba(15, 106, 191, 0.14), transparent 34%),
    linear-gradient(180deg, #eef5ff 0%, #f7f9fc 45%, #f9f7f1 100%);
}

.tool-shell,
.tool-shell input,
.tool-shell select,
.tool-shell button,
.tool-shell table,
.tool-shell summary {
  font: inherit;
}

.tool-shell {
  width: min(1100px, calc(100vw - 24px));
  margin: 12px auto 36px;
  color: var(--tool-ink);
}

.tool-shell a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
}

.hero {
  margin-top: 12px;
  padding: 20px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--tool-brand-deep), var(--tool-brand) 56%, var(--tool-brand-2));
  box-shadow: var(--tool-shadow);
}

.hero > [data-simplekit-header] {
  margin-bottom: 18px;
}

.hero-grid,
.hero-copy,
.hero-aside,
.hero-mini-grid,
.page-flow,
.feature-grid,
.panel-stack,
.form-sections,
.field-grid,
.toggle-stack,
.primary-grid,
.secondary-grid,
.insight-grid,
.info-grid,
.related-grid,
.faq-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.eyebrow,
.section-kicker,
.step-kicker,
.mini-kicker,
.trust-label {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.mini-kicker {
  opacity: 0.88;
}

.section-kicker,
.step-kicker,
.trust-label {
  color: var(--tool-brand);
}

.hero h1,
.panel h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Baskerville", "Georgia", serif;
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 1.02;
}

.hero-subtitle,
.hero-proof,
.section-copy,
.muted,
.small-copy,
.section-summary,
.result-explain,
.info-card p,
.feature-grid p,
.related-card p,
.faq-item p,
.result-card p,
.insight-card p,
.card-header p,
.chart-head p,
.mini-stat span {
  margin: 0;
}

.hero-subtitle {
  font-size: 1.08rem;
  font-weight: 700;
  max-width: 58ch;
}

.hero-proof,
.section-copy,
.info-card p,
.feature-grid p,
.related-card p,
.faq-item p,
.result-card p,
.insight-card p,
.card-header p,
.chart-head p {
  line-height: 1.6;
}

.hero-actions,
.hero-trust-row,
.toolbar-actions,
.section-nav,
.mode-bar,
.chart-tabs,
.share-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-trust-row span,
.hero-mini-grid div,
.hero-insight {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(7px);
}

.hero-trust-row span,
.hero-mini-grid div {
  padding: 10px 12px;
  font-size: 0.9rem;
}

.hero-insight {
  padding: 18px;
}

.hero-insight strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(1.7rem, 5vw, 2.7rem);
  line-height: 1.05;
}

.mini-summary-label {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
}

.section-nav {
  position: sticky;
  top: 10px;
  z-index: 20;
  padding: 10px 12px;
  border: 1px solid var(--tool-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

.section-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--tool-muted);
}

.section-nav a:hover {
  background: rgba(15, 106, 191, 0.08);
  color: var(--tool-ink);
}

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

.panel,
.calculator-card,
.result-hero,
.result-card,
.insight-card,
.details-panel,
.chart-card,
.info-card,
.related-card,
.faq-item,
.feature-grid article {
  border: 1px solid var(--tool-line);
  border-radius: var(--tool-radius);
  background: var(--tool-surface);
  box-shadow: 0 10px 30px rgba(16, 33, 58, 0.04);
}

.panel {
  padding: 20px;
}

.section-header,
.card-header {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.mobile-card-toggle {
  display: none;
}

.section-copy,
.card-header p,
.section-summary,
.result-card p,
.insight-card p,
.result-explain,
.results-status p,
.results-status li {
  max-width: 72ch;
}

.section-summary {
  margin: 0 0 4px;
  color: var(--tool-muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.inline-help {
  margin: 2px 0 0;
}

.inline-help summary {
  cursor: pointer;
  color: var(--tool-brand);
  font-size: 0.9rem;
  font-weight: 700;
}

.inline-help p {
  margin: 8px 0 0;
  color: var(--tool-muted);
  line-height: 1.55;
}

.section-copy-emphasis {
  padding: 14px 16px;
  border: 1px solid var(--tool-line);
  border-radius: 16px;
  background: rgba(15, 106, 191, 0.04);
}

.feature-grid article,
.info-card,
.related-card,
.result-card,
.insight-card,
.chart-card {
  padding: 18px;
}

.info-card,
.related-card,
.faq-item {
  box-shadow: 0 8px 22px rgba(16, 33, 58, 0.03);
}

.panel .feature-grid article,
.panel .info-card,
.panel .related-card,
.panel .faq-item {
  border-color: rgba(24, 38, 58, 0.1);
}

.feature-grid strong,
.info-card h3,
.related-card strong,
.result-card strong,
.card-header h3,
.chart-head h3,
.insight-card h3 {
  display: block;
  margin: 0 0 8px;
}

.subgroup-head {
  display: grid;
  gap: 4px;
  margin: 2px 0 10px;
}

.subgroup-head h4 {
  margin: 0;
  font-size: 0.98rem;
}

.subgroup-head p {
  margin: 0;
  color: var(--tool-muted);
  line-height: 1.5;
}

.advanced-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--tool-line-strong);
}

.mode-bar {
  margin: 16px 0;
}

.mode-btn,
.preset-btn,
.chart-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--tool-line);
  border-radius: 999px;
  background: #fff;
  color: var(--tool-ink);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.mode-btn:hover,
.preset-btn:hover,
.chart-tab:hover {
  transform: translateY(-1px);
  border-color: var(--tool-line-strong);
}

.mode-btn.is-active,
.chart-tab.is-active,
.preset-btn.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--tool-brand), var(--tool-brand-2));
}

.preset-btn-secondary {
  background: #fff;
}

.calculator-card {
  padding: 18px;
  background: var(--tool-surface-soft);
}

.form-toolbar,
.toolbar-copy {
  display: grid;
  gap: 10px;
}

.form-sections {
  margin-top: 18px;
}

.input-card {
  padding: 18px;
  border: 1px solid var(--tool-line);
  border-radius: 18px;
  background: #fff;
}

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

.form-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.form-field > span {
  font-weight: 700;
}

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

.field-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 106, 191, 0.08);
  color: var(--tool-brand-deep);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.form-field small,
.toggle-field small,
.muted {
  color: var(--tool-muted);
}

.input-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--tool-line);
  border-radius: 14px;
  background: #fff;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  padding: 12px 8px;
  border: 0;
  background: transparent;
  color: var(--tool-ink);
}

.input-prefix,
.input-suffix {
  padding: 0 12px;
  color: var(--tool-muted);
  font-weight: 700;
}

.form-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--tool-line);
  border-radius: 14px;
  color: var(--tool-ink);
  background: #fff;
}

.toggle-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--tool-line);
  background: linear-gradient(180deg, rgba(15, 106, 191, 0.04), rgba(255, 255, 255, 0.92));
}

.toggle-field input {
  inline-size: 18px;
  block-size: 18px;
  margin-top: 3px;
}

.toggle-field strong {
  display: block;
  margin-bottom: 4px;
}

.result-hero {
  padding: 20px;
  background: linear-gradient(135deg, rgba(15, 106, 191, 0.07), rgba(19, 163, 154, 0.08), rgba(255, 255, 255, 0.96));
}

.result-hero-main,
.result-hero-side {
  display: grid;
  gap: 10px;
}

.result-action {
  color: var(--tool-muted);
  font-weight: 600;
}

.close-call-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(240, 138, 56, 0.28);
  border-radius: 14px;
  background: rgba(240, 138, 56, 0.08);
  color: var(--tool-accent);
  font-weight: 700;
}

.results-panel.is-close-call .result-hero {
  border-color: rgba(240, 138, 56, 0.28);
  box-shadow: 0 14px 34px rgba(240, 138, 56, 0.1);
}

.result-explain {
  margin: 0;
  color: var(--tool-muted);
  line-height: 1.6;
}

.flip-factor-note {
  margin: 0;
  color: var(--tool-brand-deep);
  font-weight: 700;
}

.result-next-link {
  margin: 0;
  color: var(--tool-muted);
}

.result-next-link a {
  color: var(--tool-brand-deep);
  font-weight: 700;
}

.result-hero h3 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  line-height: 1.06;
}

.mini-stat {
  padding: 14px 16px;
  border: 1px solid var(--tool-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.mini-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 1.2rem;
}

.mini-stat-accent {
  border-color: rgba(240, 138, 56, 0.28);
  background: rgba(240, 138, 56, 0.08);
}

.primary-grid,
.secondary-grid,
.insight-grid,
.info-grid,
.related-grid {
  margin-top: 16px;
}

.result-card strong {
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  line-height: 1.14;
}

.result-card-primary {
  border-color: rgba(15, 106, 191, 0.18);
  background: linear-gradient(180deg, rgba(15, 106, 191, 0.06), rgba(255, 255, 255, 0.98));
}

.insight-card {
  background: linear-gradient(180deg, rgba(19, 163, 154, 0.05), rgba(255, 255, 255, 0.98));
}

.insight-card h3 {
  font-size: 1rem;
}

.next-step-callout {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(15, 106, 191, 0.14);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(15, 106, 191, 0.06), rgba(19, 163, 154, 0.07), rgba(255, 255, 255, 0.98));
}

.next-step-callout h3 {
  margin: 6px 0 8px;
}

.flip-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.explain-strip {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(15, 106, 191, 0.14);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 106, 191, 0.05), rgba(255, 255, 255, 0.96));
}

.explain-strip h3 {
  margin: 6px 0 8px;
}

.explain-strip p {
  margin: 0;
  color: var(--tool-muted);
  line-height: 1.6;
}

.details-panel {
  margin-top: 16px;
  overflow: hidden;
}

.details-panel summary {
  padding: 16px 18px;
  font-weight: 700;
  cursor: pointer;
}

.details-panel[open] summary {
  border-bottom: 1px solid var(--tool-line);
}

.results-status {
  padding: 18px;
  background: linear-gradient(135deg, rgba(15, 106, 191, 0.05), rgba(19, 163, 154, 0.06));
}

.status-list,
.assumptions-list {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

.chart-card {
  margin-top: 16px;
}

.chart-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--tool-muted);
  font-size: 0.94rem;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-legend-item i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.chart {
  margin-top: 16px;
}

.chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-insight {
  margin: 14px 0 0;
  color: var(--tool-muted);
}

.chart-reading-note {
  margin: 10px 0 0;
  color: var(--tool-muted);
  font-size: 0.92rem;
}

.chart-axis,
.chart-grid-line {
  stroke: rgba(24, 38, 58, 0.12);
  stroke-width: 1;
}

.chart-axis-label,
.chart-end-label {
  font-size: 12px;
  fill: var(--tool-muted);
}

.chart-axis-left {
  text-anchor: end;
}

.chart-axis-bottom {
  text-anchor: middle;
}

.chart-end-label {
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.chart-break-even-line {
  stroke: rgba(240, 138, 56, 0.9);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}



.table-wrap {
  overflow-x: auto;
  background: #fff;
}

.comparison-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--tool-line);
  white-space: nowrap;
}

.comparison-table thead th {
  background: #f8fbff;
  position: sticky;
  top: 0;
}

.comparison-table tbody tr:nth-child(even) {
  background: rgba(15, 106, 191, 0.03);
}

#learn .info-card,
[aria-labelledby="methodHeading"] .feature-grid article,
[aria-labelledby="flipHeading"] .feature-grid article,
.faq-item,
.related-card {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px rgba(16, 33, 58, 0.025);
}

.positive {
  color: #166534;
  font-weight: 700;
}

.negative {
  color: #9f1239;
  font-weight: 700;
}

.share-row {
  align-items: center;
  margin-top: 16px;
}

.faq-item {
  padding: 0 18px;
}

.faq-item summary {
  padding: 18px 0;
  font-weight: 700;
  cursor: pointer;
}

.faq-item p {
  padding: 0 0 18px;
}

.related-card {
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.info-card a,
.related-card a,
.section-copy a {
  color: var(--tool-brand-deep);
}

.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--tool-line-strong);
}

.tool-shell .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

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

.tool-shell .btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--tool-brand), var(--tool-brand-2));
  box-shadow: 0 14px 28px rgba(11, 52, 95, 0.22);
}

.tool-shell .btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

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

.tool-shell .btn:focus-visible,
.tool-shell input:focus-visible,
.tool-shell select:focus-visible,
.tool-shell summary:focus-visible,
.tool-shell button:focus-visible,
.section-nav a:focus-visible {
  outline: 3px solid rgba(240, 138, 56, 0.32);
  outline-offset: 2px;
}

.no-print {
  print-color-adjust: exact;
}

@media (min-width: 720px) {
  .tool-shell {
    width: min(1160px, calc(100vw - 40px));
    margin: 20px auto 44px;
  }

  .hero {
    padding: 28px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    align-items: start;
  }

  .result-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    gap: 18px;
    align-items: start;
  }

  .next-step-callout {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .field-grid,
  .primary-grid,
  .secondary-grid,
  .insight-grid,
  .flip-grid,
  .info-grid,
  .related-grid,
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .primary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .secondary-grid,
  .insight-grid,
  .flip-grid,
  .feature-grid,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 719px) {
  .section-nav {
    position: static;
    overflow-x: auto;
    white-space: nowrap;
  }

  .panel {
    padding: 18px;
  }

  .hero,
  .calculator-card,
  .result-hero,
  .result-card,
  .insight-card,
  .chart-card,
  .info-card,
  .related-card,
  .feature-grid article {
    border-radius: 18px;
  }

  .card-header {
    gap: 10px;
  }

  .mobile-card-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--tool-line);
    border-radius: 999px;
    background: #fff;
    color: var(--tool-ink);
  }

  .mobile-card-toggle strong {
    color: var(--tool-brand);
  }

  .mobile-card-content {
    display: grid;
    gap: 14px;
  }

  .form-field small {
    line-height: 1.45;
  }

  .section-summary {
    font-size: 0.92rem;
  }

  .mode-btn,
  .preset-btn,
  .chart-tab,
  .tool-shell .btn {
    min-height: 46px;
  }

  .field-label {
    gap: 6px;
  }

  .field-pill {
    font-size: 0.68rem;
  }

  .chart-reading-note,
  .chart-annotation-label,
  .chart-axis-label,
  .chart-end-label,
  .chart-break-even-label {
    font-size: 10px;
  }

  .share-row {
    align-items: flex-start;
  }
}
