/* Care Home Self-Fund Runway Calculator (UK): navy / teal / slate suite */

.csfr-app,
.csfr-app * {
  box-sizing: border-box;
}

.csfr-loading,
.csfr-fatal,
.csfr-err {
  margin: 12px 0;
  font-weight: 650;
  color: #5b6472;
}
.csfr-err,
.csfr-fatal {
  color: #e11d48;
  font-weight: 700;
}

#csfr-root.csfr-app,
.csfr-root.csfr-app {
  --csfr-ink: #083141;
  --csfr-muted: #475569;
  --csfr-line: #e2e8f0;
  --csfr-soft: #f4f7f8;
  --csfr-coral: #0f766e;
  --csfr-coral-deep: #0b5f58;
  --csfr-mint: #0f766e;
  --csfr-mint-deep: #0b5f58;
  --csfr-sky: #155e75;
  --csfr-text: 1.05rem;
  --csfr-text-sm: 0.95rem;
  --csfr-text-xs: 0.88rem;
  width: 100%;
  max-width: 1100px;
  margin: 24px auto 0;
  padding: 0 12px 8px;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--csfr-ink);
  font-size: var(--csfr-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.csfr-shell {
  max-width: 100%;
  width: 100%;
  margin: 0 auto 28px;
  padding: 22px 20px 28px;
  border: 1px solid var(--csfr-line);
  border-radius: 28px;
  background:
    radial-gradient(1200px 420px at 10% -10%, rgba(15, 118, 110, 0.1), transparent 55%),
    radial-gradient(900px 380px at 95% 0%, rgba(8, 49, 65, 0.08), transparent 50%),
    #fff;
  box-shadow: 0 12px 32px rgba(8, 49, 65, 0.08);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.csfr-head {
  border: none;
  border-radius: 22px;
  padding: 26px 24px 24px;
  background: linear-gradient(145deg, #0b1220 0%, #152038 55%, #12352f 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.csfr-head::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.35), transparent 68%);
  pointer-events: none;
}
.csfr-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #99f6e4;
  position: relative;
  z-index: 1;
}
.csfr-title {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.035em;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}
.csfr-lead {
  margin: 0;
  max-width: none;
  width: 100%;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 550;
  font-size: 1.08rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}
.csfr-lead + .csfr-lead {
  margin-top: 12px;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.78);
}

.csfr-premise {
  margin: 0;
  padding: 18px 20px;
  border-radius: 18px;
  background: #f4f7f8;
  border: 1px solid var(--csfr-line);
}
.csfr-premise__eyebrow {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--csfr-coral-deep);
}
.csfr-premise__body {
  margin: 0;
  max-width: none;
  width: 100%;
  font-size: 1.04rem;
  line-height: 1.6;
  font-weight: 600;
  color: #1f2937;
}

.csfr-how,
.csfr-method {
  border: 1px solid var(--csfr-line);
  border-radius: 22px;
  padding: 22px 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.04);
}
.csfr-method {
  padding: 0;
  overflow: hidden;
}
.csfr-method__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 16px 18px;
  user-select: none;
}
.csfr-method__summary::-webkit-details-marker {
  display: none;
}
.csfr-method__summary-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--csfr-coral-deep);
  width: 100%;
}
.csfr-method__summary-title {
  font-size: 1.2rem;
  font-weight: 850;
  color: var(--csfr-ink);
  letter-spacing: -0.02em;
}
.csfr-method__summary-hint {
  margin-left: auto;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--csfr-muted);
}
.csfr-method:not([open]) .csfr-method__summary-hint::before {
  content: "Show ";
}
.csfr-method[open] .csfr-method__summary-hint {
  color: var(--csfr-coral-deep);
}
.csfr-method[open] .csfr-method__summary-hint::before {
  content: "Hide ";
}
.csfr-method__body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--csfr-line);
}
.csfr-method__body .csfr-section-help {
  margin-top: 14px;
}
.csfr-how .csfr-section-title {
  margin-bottom: 14px;
}
.csfr-how__steps {
  margin: 0;
  padding: 0 0 0 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #374151;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 550;
  max-width: none;
  width: 100%;
}
.csfr-how__steps strong {
  color: var(--csfr-ink);
  font-weight: 800;
}
.csfr-method__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .csfr-method__grid {
    grid-template-columns: 1fr;
  }
}
.csfr-method__card {
  padding: 14px 14px 16px;
  border-radius: 16px;
  background: var(--csfr-soft);
  border: 1px solid #eef1f6;
}
.csfr-method__h {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--csfr-ink);
  letter-spacing: -0.02em;
}
.csfr-method__p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #374151;
  font-weight: 550;
}

.csfr-results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.csfr-panel {
  border: 1px solid var(--csfr-line);
  border-radius: 22px;
  padding: 22px 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.04);
  min-width: 0;
  overflow-x: hidden;
}
.csfr-panel--list {
  background: linear-gradient(180deg, #fffaf9 0%, #fff 40%);
}
.csfr-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.csfr-section-help {
  margin: 10px 0 18px;
  max-width: none;
  width: 100%;
  font-size: 1rem;
  color: var(--csfr-muted);
  line-height: 1.6;
  font-weight: 550;
}
.csfr-section-help--tight {
  margin-bottom: 12px;
}
.csfr-section-badge {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0b5f58;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.csfr-section-title {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 2.5vw, 1.6rem);
  font-weight: 900;
  color: var(--csfr-ink);
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.csfr-section-badge + .csfr-section-title {
  margin-top: 0;
}
.csfr-section-title + .csfr-section-help,
.csfr-panel__head + .csfr-section-help {
  margin-top: 10px;
}

.csfr-catalogue-wrap {
  margin: 0 0 24px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff5f3 0%, #f7fffc 100%);
  border: 1px solid #ffd5cf;
}
.csfr-catalogue__heading,
.csfr-list__heading {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 850;
  color: var(--csfr-ink);
  letter-spacing: -0.02em;
}
.csfr-catalogue__lead {
  margin: 0 0 14px;
  max-width: none;
  width: 100%;
  font-size: 0.95rem;
  color: var(--csfr-muted);
  line-height: 1.5;
  font-weight: 550;
}
.csfr-catalogue {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 900px) {
  .csfr-catalogue {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .csfr-catalogue {
    grid-template-columns: 1fr;
  }
}
.csfr-catalogue__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 12px 12px 14px;
  border-radius: 14px;
  border: 1px solid #ffd5cf;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  min-height: 112px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.csfr-catalogue__item:hover:not(:disabled) {
  border-color: #ff8b80;
  box-shadow: 0 8px 20px rgba(255, 77, 61, 0.12);
  transform: translateY(-1px);
}
.csfr-catalogue__item:focus-visible {
  outline: 2px solid rgba(255, 77, 61, 0.5);
  outline-offset: 2px;
}
.csfr-catalogue__item:disabled {
  cursor: default;
  opacity: 0.72;
}
.csfr-catalogue__item.is-added {
  background: #f3fffb;
  border-color: #9ee0c8;
}
.csfr-catalogue__emoji {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
  margin-bottom: 4px;
}
.csfr-catalogue__name {
  font-size: 1rem;
  font-weight: 850;
  color: var(--csfr-ink);
  letter-spacing: -0.02em;
}
.csfr-catalogue__blurb {
  font-size: 0.88rem;
  line-height: 1.4;
  color: #4b5563;
  font-weight: 500;
  flex: 1;
}
.csfr-catalogue__meta {
  margin-top: 4px;
  font-size: 0.84rem;
  font-weight: 750;
  color: #0f766e;
}
.csfr-catalogue__cta {
  margin-top: 6px;
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ffe8e5;
  color: var(--csfr-coral-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.csfr-catalogue__item.is-added .csfr-catalogue__cta {
  background: #d1fae5;
  color: #047857;
}
.csfr-list-count {
  margin: 12px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #6b7280;
}
.csfr-list__heading {
  margin-top: 4px;
}

.csfr-globals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 800px) {
  .csfr-globals {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .csfr-globals {
    grid-template-columns: 1fr;
  }
}

.csfr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  background: var(--csfr-soft);
  border: 1px solid transparent;
  min-width: 0;
}
.csfr-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1f2937;
  overflow-wrap: break-word;
}
.csfr-hint {
  margin: 0;
  font-size: 0.86rem;
  color: #4b5563;
  line-height: 1.4;
  font-weight: 500;
}
.csfr-input {
  width: 100%;
  border: 1px solid #d7dde8;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 1rem;
  font-weight: 650;
  min-height: 44px;
  background: #fff;
  color: var(--csfr-ink);
  font-family: inherit;
}
.csfr-input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.45);
  outline-offset: 1px;
  border-color: #0f766e;
}

.csfr-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.csfr-exp {
  border: 1px solid #ffd5cf;
  border-radius: 18px;
  padding: 14px 14px 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(255, 77, 61, 0.06);
}
.csfr-exp__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 12px;
}
.csfr-exp__emoji {
  flex: 0 0 auto;
  font-size: 1.35rem;
  line-height: 1;
}
.csfr-exp__index {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ff6b5c 0%, var(--csfr-coral) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.csfr-exp__label {
  flex: 1 1 140px;
  min-width: 0;
  border: 1px solid #eef1f6;
  background: var(--csfr-soft);
  font-weight: 800;
  font-size: 1.02rem;
  padding: 8px 12px;
  border-radius: 12px;
  min-height: 44px;
  font-family: inherit;
}
.csfr-exp__label:focus {
  outline: 2px solid rgba(255, 77, 61, 0.4);
  border-color: #ff8b80;
  background: #fff;
}
.csfr-exp__remove {
  border: none;
  background: #fff1f0;
  color: var(--csfr-coral-deep);
  font-weight: 750;
  cursor: pointer;
  font-size: 0.82rem;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: inherit;
}
.csfr-exp__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .csfr-exp__grid {
    grid-template-columns: 1fr;
  }
}

.csfr-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  min-height: 44px;
  font-family: inherit;
}
.csfr-btn--primary {
  background: linear-gradient(180deg, #ff6b5c 0%, var(--csfr-coral) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 77, 61, 0.28);
}
.csfr-btn--primary:hover {
  filter: brightness(1.04);
}
.csfr-btn--ghost {
  background: #fff;
  color: var(--csfr-coral-deep);
  border: 1px solid #ffd5cf;
  box-shadow: none;
}
.csfr-btn--ghost:hover {
  background: #fff5f3;
}

/* Grade hero */
.csfr-celebration {
  border-radius: 24px;
  border: none;
  overflow: hidden;
  color: #fff;
}
.csfr-celebration--anchored {
  background: linear-gradient(135deg, #063b32 0%, #0ca678 50%, #12b886 100%);
}
.csfr-celebration--soft {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 55%, #3b82f6 100%);
}
.csfr-celebration--habit {
  background: linear-gradient(135deg, #7a1f18 0%, #e23a2b 45%, #ff6b5c 100%);
}
.csfr-celebration--closing {
  background: linear-gradient(135deg, #4c0519 0%, #be123c 50%, #fb7185 100%);
}
.csfr-celebration__inner {
  display: grid;
  grid-template-columns: minmax(170px, 240px) 1fr;
  gap: 18px;
  padding: 22px 20px;
  align-items: center;
}
@media (max-width: 700px) {
  .csfr-celebration__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
.csfr-celebration__gifCell {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.csfr-celebration__gif {
  width: 100%;
  height: 158px;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}
.csfr-celebration__emoji {
  position: absolute;
  font-size: 2.3rem;
  z-index: 0;
  opacity: 0.9;
}
.csfr-celebration__badge {
  margin: 0 0 8px;
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.csfr-celebration__label {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.95rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.csfr-celebration__tone {
  margin: 0 0 18px;
  font-size: 1.05rem;
  opacity: 0.94;
  font-weight: 550;
  line-height: 1.55;
  max-width: none;
  width: 100%;
}

.csfr-score {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}
.csfr-score__block {
  padding: 12px 16px 14px;
  min-width: 150px;
}
.csfr-score__label {
  margin: 0 0 2px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
}
.csfr-score__num {
  margin: 0 0 8px;
  font-size: 2.55rem;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
}
.csfr-score__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  margin-bottom: 6px;
}
.csfr-score__bar-fill {
  display: block;
  height: 100%;
  width: calc(var(--csfr-fulfil, 50) * 1%);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
}
.csfr-score__cap {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  opacity: 0.9;
  line-height: 1.35;
}
.csfr-score__tax {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 18px;
  min-width: 7rem;
  background: rgba(0, 0, 0, 0.18);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.csfr-score__tax-lab {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
}
.csfr-score__tax-num {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1;
}
.csfr-score__tax-unit {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0.9;
}
@media (max-width: 700px) {
  .csfr-score {
    margin-left: auto;
    margin-right: auto;
  }
}

.csfr-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #d9e2e8;
  background: #f4f7f8;
}
@media (max-width: 560px) {
  .csfr-kpis {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
    gap: 10px;
  }
}
.csfr-kpi {
  border-radius: 14px;
  border: 1px solid #d9e2e8;
  border-left: 4px solid #0f766e;
  background: #fff;
  padding: 16px 14px 16px;
  box-shadow: none;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.csfr-kpi--lead {
  border-left-color: #083141;
}
.csfr-kpi--secondary .csfr-kpi__label {
  color: #475569;
}
.csfr-kpi--secondary .csfr-kpi__value {
  color: #083141;
}
.csfr-kpi--tax,
.csfr-kpi--miss,
.csfr-kpi--money,
.csfr-kpi--invest {
  border-color: #d9e2e8;
  background: #fff;
}
.csfr-kpi--tax .csfr-kpi__value,
.csfr-kpi--miss .csfr-kpi__value,
.csfr-kpi--money .csfr-kpi__value,
.csfr-kpi--invest .csfr-kpi__value {
  color: var(--csfr-ink);
}
.csfr-kpi__label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f5c63;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.csfr-kpi__value {
  margin: 0 0 6px;
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.65rem);
  font-weight: 950;
  letter-spacing: -0.03em;
  color: var(--csfr-ink);
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: break-word;
}
.csfr-kpi__hint {
  margin: 0;
  font-size: 0.86rem;
  color: #4b5563;
  line-height: 1.45;
  font-weight: 550;
  overflow-wrap: break-word;
}

.csfr-timing-panel {
  border: 1px solid var(--csfr-line);
  border-radius: 22px;
  padding: 22px 20px;
  background: linear-gradient(180deg, #fffaf9 0%, #fff 40%);
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.04);
}
.csfr-timing-panel__example {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff5f3;
  border: 1px solid #ffd5cf;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 650;
  color: #1f2937;
}
.csfr-timing-panel__sub {
  margin: 18px 0 10px;
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--csfr-ink);
  letter-spacing: -0.02em;
}
.csfr-age-guide {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 4px;
}
@media (max-width: 900px) {
  .csfr-age-guide {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .csfr-age-guide {
    grid-template-columns: 1fr;
  }
}
.csfr-age-guide__card {
  padding: 12px 12px 14px;
  border-radius: 14px;
  border: 1px solid #eef1f6;
  background: #fff;
}
.csfr-age-guide__ages {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--csfr-coral-deep);
}
.csfr-age-guide__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 850;
  color: var(--csfr-ink);
  letter-spacing: -0.02em;
}
.csfr-age-guide__fit {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #4b5563;
  font-weight: 550;
}
.csfr-timing-panel__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.csfr-timing {
  border-radius: 16px;
  padding: 14px 14px 15px;
  border: 1px solid #eef1f6;
  background: #fff;
}
.csfr-timing--sooner {
  border-color: #ffc7c1;
  background: linear-gradient(180deg, #fff5f3 0%, #fff 75%);
}
.csfr-timing--mid {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 75%);
}
.csfr-timing--flexible {
  border-color: #99e9c8;
  background: linear-gradient(180deg, #e6fcf5 0%, #fff 75%);
}
.csfr-timing__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.csfr-timing__name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 850;
  color: var(--csfr-ink);
  letter-spacing: -0.02em;
}
.csfr-timing__tag {
  display: inline-flex;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #ffe8e5;
  color: var(--csfr-coral-deep);
}
.csfr-timing--mid .csfr-timing__tag {
  background: #dbeafe;
  color: #1d4ed8;
}
.csfr-timing--flexible .csfr-timing__tag {
  background: #d1fae5;
  color: #047857;
}
.csfr-timing__ages {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #4b5563;
}
.csfr-timing__line {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #1f2937;
  font-weight: 550;
}

.csfr-compare,
.csfr-toll,
.csfr-insights {
  border: 1px solid var(--csfr-line);
  border-radius: 22px;
  padding: 20px 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.04);
}
.csfr-compare {
  background: linear-gradient(180deg, #f3fffb 0%, #fff 35%);
}
.csfr-toll {
  background: linear-gradient(180deg, #fff5f3 0%, #fff 35%);
}
.csfr-insights {
  background: linear-gradient(180deg, #f5f7fb 0%, #fff 40%);
}

.csfr-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 800px) {
  .csfr-paths {
    grid-template-columns: 1fr;
  }
}
.csfr-path {
  border-radius: 18px;
  padding: 16px 14px;
  border: 1px solid var(--csfr-line);
  background: #fff;
}
.csfr-path--soon {
  border-color: #99e9c8;
  background: linear-gradient(165deg, #e6fcf5 0%, #fff 70%);
}
.csfr-path--wait {
  border-color: #ffc7c1;
  background: linear-gradient(165deg, #fff5f3 0%, #fff 70%);
}
.csfr-path--work {
  border-color: #bfdbfe;
  background: linear-gradient(165deg, #eff6ff 0%, #fff 70%);
}
.csfr-path__kicker {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--csfr-muted);
}
.csfr-path--soon .csfr-path__kicker {
  color: var(--csfr-mint-deep);
}
.csfr-path--wait .csfr-path__kicker {
  color: var(--csfr-coral-deep);
}
.csfr-path--work .csfr-path__kicker {
  color: #1d4ed8;
}
.csfr-path__stop {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 650;
  color: #374151;
}
.csfr-path__metric {
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.csfr-path__metric span {
  font-size: 1.85rem;
  font-weight: 950;
  letter-spacing: -0.04em;
  color: var(--csfr-ink);
}
.csfr-path--soon .csfr-path__metric span {
  color: var(--csfr-mint-deep);
}
.csfr-path--wait .csfr-path__metric span {
  color: var(--csfr-coral-deep);
}
.csfr-path__metric small {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--csfr-muted);
}
.csfr-path__meta,
.csfr-path__extra,
.csfr-path__blurb {
  margin: 0 0 6px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #374151;
  font-weight: 550;
}
.csfr-path__extra {
  font-weight: 750;
  color: #1d4ed8;
}
.csfr-path__blurb {
  margin-bottom: 0;
  color: #6b7280;
}

.csfr-toll__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 700px) {
  .csfr-toll__grid {
    grid-template-columns: 1fr;
  }
}
.csfr-toll-card {
  border-radius: 18px;
  padding: 16px 14px;
  border: 1px solid #ffc7c1;
  background: #fff;
}
.csfr-toll-card__kicker {
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--csfr-coral-deep);
}
.csfr-toll-card__value {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 950;
  letter-spacing: -0.03em;
  color: var(--csfr-ink);
}
.csfr-toll-card__hint,
.csfr-toll-card__cost,
.csfr-toll-card__fund {
  margin: 0 0 4px;
  font-size: 0.84rem;
  color: var(--csfr-muted);
  font-weight: 550;
  line-height: 1.4;
}
.csfr-toll-card__fund {
  margin-bottom: 0;
  font-weight: 750;
  color: var(--csfr-mint-deep);
}

.csfr-insights__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.csfr-insights__list li {
  margin: 0;
  padding: 14px 16px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.5;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--csfr-line);
  box-shadow: 0 4px 14px rgba(11, 18, 32, 0.04);
}

/* Timeline */
.csfr-timeline {
  border: 1px solid #dbe4ff;
  border-radius: 22px;
  padding: 18px 16px;
  background: linear-gradient(180deg, #f5f8ff 0%, #fff 45%);
}
.csfr-timeline__badge {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.csfr-timeline__title {
  margin: 0 0 4px;
  font-size: clamp(1.15rem, 1rem + 0.55vw, 1.35rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--csfr-ink);
}
.csfr-timeline__lead {
  margin: 0 0 14px;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--csfr-muted);
}
.csfr-timeline__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.csfr-timeline__leg {
  font-size: 0.74rem;
  font-weight: 750;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--csfr-line);
  background: #fff;
}
.csfr-timeline__leg--ideal {
  color: #6b7280;
}
.csfr-timeline__leg--soon {
  border-color: #99e9c8;
  color: var(--csfr-mint-deep);
  background: #e6fcf5;
}
.csfr-timeline__leg--wait {
  border-color: #ffc7c1;
  color: var(--csfr-coral-deep);
  background: #fff5f3;
}
.csfr-timeline-row {
  margin-bottom: 16px;
}
.csfr-timeline-row__label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.csfr-timeline-row__label span {
  color: var(--csfr-muted);
  font-weight: 600;
}
.csfr-timeline-track {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: #e8edf5;
  overflow: hidden;
}
.csfr-timeline-track__active {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(59, 130, 246, 0.18);
  border-right: 2px solid #3b82f6;
}
.csfr-timeline-mark {
  position: absolute;
  top: 1px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  z-index: 1;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(11, 18, 32, 0.2);
}
.csfr-timeline-mark--ideal {
  background: #9ca3af;
  width: 10px;
  height: 10px;
  top: 3px;
  margin-left: -5px;
}
.csfr-timeline-mark--soon {
  background: var(--csfr-mint);
}
.csfr-timeline-mark--wait {
  background: var(--csfr-coral);
}
.csfr-timeline-row__ages {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #6b7280;
}
.csfr-timeline__axis {
  margin: 8px 0 0;
  font-size: 0.74rem;
  font-weight: 750;
  color: #3b82f6;
}

.csfr-disclaimer {
  margin: 0;
  padding: 14px 16px;
  font-size: 0.84rem;
  color: var(--csfr-muted);
  line-height: 1.45;
  font-weight: 500;
  background: var(--csfr-soft);
  border-radius: 16px;
}

/* Export */
.csfr-app .csfr-export {
  margin-top: 4px;
  padding: 0;
  border-radius: 24px;
  border: none;
  background: linear-gradient(135deg, #0b1220 0%, #1a2744 55%, #12352f 100%) !important;
  box-shadow: 0 18px 40px rgba(11, 18, 32, 0.22);
  overflow: hidden;
  color: #fff !important;
}
.csfr-export-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 22px 20px;
  align-items: center;
}
@media (max-width: 820px) {
  .csfr-export-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}
.csfr-export-badge {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ff6b5c, var(--csfr-coral));
  color: #fff;
  font-weight: 950;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.06em;
}
.csfr-export-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 950;
  color: #fff;
  letter-spacing: -0.02em;
}
.csfr-export-lead {
  margin: 0 0 10px;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.8);
}
.csfr-export-includes {
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 550;
  font-size: 0.9rem;
}
.csfr-export-hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}
.csfr-app button.csfr-export-btn {
  min-height: 54px;
  padding: 14px 22px !important;
  font-weight: 950 !important;
  font-size: 1rem !important;
  font-family: inherit;
  background: linear-gradient(180deg, #ff6b5c 0%, var(--csfr-coral) 100%) !important;
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 24px rgba(255, 77, 61, 0.4) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  cursor: pointer;
}
.csfr-app button.csfr-export-btn:hover,
.csfr-app button.csfr-export-btn:focus {
  filter: brightness(1.05);
}

/* Modal: suite pattern (dark header + cyan footer). Appended to document.body. */
.csfr-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.75) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
  overflow-y: auto;
}
.csfr-modal-overlay .csfr-modal {
  width: 100%;
  max-width: 560px;
  max-height: min(92vh, calc(100dvh - 32px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #ffffff !important;
  color: #0f172a !important;
  border: 3px solid #083141;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.35);
  box-sizing: border-box;
}
.csfr-modal-overlay .csfr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 22px;
  background: linear-gradient(135deg, #083141 0%, #0a4a5f 100%) !important;
  color: #ffffff !important;
}
.csfr-modal-overlay .csfr-modal-header-text {
  flex: 1;
  min-width: 0;
}
.csfr-modal-overlay .csfr-modal-header h3 {
  margin: 0;
  font-size: clamp(1.22rem, 4.2vw, 1.55rem);
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.csfr-modal-overlay .csfr-modal-header-sub {
  margin: 10px 0 0;
  font-size: 0.875rem;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.9) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.9) !important;
  line-height: 1.45;
}
.csfr-modal-overlay button.csfr-modal-close {
  flex-shrink: 0;
  border: none !important;
  background: rgba(255, 255, 255, 0.22) !important;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.csfr-modal-overlay .csfr-modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: #ffffff !important;
  color: #0f172a !important;
}
.csfr-modal-overlay .csfr-modal-lead {
  margin: 0 0 16px;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  font-weight: 650;
  color: #1e293b !important;
  line-height: 1.55;
}
.csfr-modal-overlay .csfr-modal-label {
  display: block;
  margin: 12px 0 7px;
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a !important;
}
.csfr-modal-overlay .csfr-modal-input {
  width: 100%;
  padding: 12px;
  margin: 0;
  border: 2px solid rgba(8, 49, 65, 0.28) !important;
  border-radius: 12px;
  box-sizing: border-box;
  font-size: max(16px, 1rem);
  background: #ffffff !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}
.csfr-modal-overlay .csfr-modal-error {
  margin: 12px 0 0;
  color: #b91c1c !important;
  font-size: 0.92rem;
  font-weight: 700;
  min-height: 1.2em;
}
.csfr-modal-overlay .csfr-modal-privacy {
  margin: 14px 0 0;
  font-size: 0.82rem;
  font-weight: 550;
  color: #64748b !important;
  line-height: 1.45;
}
.csfr-modal-overlay .csfr-modal-success {
  margin: 0;
  padding: 8px 0;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.5;
  color: #059669 !important;
}
.csfr-modal-overlay .csfr-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  padding: 18px 22px;
  border-top: 2px solid rgba(21, 94, 117, 0.22);
  background: #ecfeff !important;
}
.csfr-modal-overlay button.csfr-modal-submit {
  flex: 1 1 auto;
  min-width: min(100%, 240px);
  min-height: 54px;
  padding: 14px 20px !important;
  font-weight: 950 !important;
  font-size: 1rem !important;
  font-family: inherit;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(180deg, #0e7490 0%, #155e75 55%, #164e63 100%) !important;
  border: 2px solid #0c4a5f !important;
  border-radius: 14px !important;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(21, 94, 117, 0.28);
}
.csfr-modal-overlay button.csfr-modal-submit:hover,
.csfr-modal-overlay button.csfr-modal-submit:focus {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(180deg, #14b8a6 0%, #0e7490 55%, #155e75 100%) !important;
}
.csfr-modal-overlay button.csfr-modal-secondary {
  padding: 14px 18px !important;
  font-weight: 850 !important;
  font-size: 1rem !important;
  font-family: inherit;
  background: #ffffff !important;
  border: 2px solid rgba(8, 49, 65, 0.28) !important;
  border-radius: 14px !important;
  cursor: pointer;
  color: #083141 !important;
  -webkit-text-fill-color: #083141 !important;
  min-height: 54px;
}
@media (max-width: 520px) {
  .csfr-modal-overlay {
    align-items: flex-start;
    padding-top: max(12px, env(safe-area-inset-top));
  }
  .csfr-modal-overlay .csfr-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
}


/* === CSFR extras: nation pills, switches, chart, year table === */
.csfr-nation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.csfr-nation__btn {
  appearance: none;
  border: 1.5px solid var(--csfr-line);
  background: #fff;
  color: var(--csfr-ink);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.csfr-nation__btn:hover {
  border-color: #0f766e;
}
.csfr-nation__btn[aria-pressed="true"] {
  background: var(--csfr-ink);
  border-color: var(--csfr-ink);
  color: #fff;
  box-shadow: 0 8px 20px rgba(11, 18, 32, 0.18);
}
.csfr-switch-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 0;
}
.csfr-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 999px;
  border: none;
  background: #cbd5e1;
  cursor: pointer;
  padding: 0;
  transition: background .18s;
}
.csfr-switch[aria-checked="true"] {
  background: var(--csfr-mint);
}
.csfr-switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(11,18,32,.2);
  transition: left .18s;
}
.csfr-switch[aria-checked="true"] .csfr-switch__knob {
  left: 23px;
}
.csfr-switch-copy {
  flex: 1;
  min-width: 0;
}
.csfr-switch-copy strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--csfr-ink);
  margin: 0 0 4px;
}
.csfr-switch-copy span {
  display: block;
  font-size: 0.88rem;
  color: var(--csfr-muted);
  line-height: 1.45;
  font-weight: 550;
}
.csfr-note {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #9a3412;
  font-weight: 600;
}
.csfr-note--mint {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}
.csfr-hero-runway {
  margin: 0;
  border-radius: 16px;
  padding: 26px 22px 24px;
  border: 1px solid #d9e2e8;
  border-left: 4px solid #0f766e;
  background: #e7f3f4;
  box-shadow: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.csfr-hero-runway--warn {
  text-align: left;
  align-items: flex-start;
  border-left-color: #083141;
  background: #f4f7f8;
}
.csfr-hero-runway--warn .csfr-hero-runway__sub {
  margin-left: 0;
  margin-right: 0;
  max-width: 62ch;
}
.csfr-hero-runway__kicker {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f5c63;
}
.csfr-hero-runway__value {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.7rem);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: var(--csfr-ink);
  max-width: 100%;
  overflow-wrap: break-word;
}
.csfr-hero-runway__sub {
  margin: 0 auto;
  max-width: 52ch;
  width: 100%;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #4b5563;
  font-weight: 550;
}
.csfr-bars {
  display: flex;
  align-items: stretch;
  gap: 6px;
  min-height: 160px;
  padding: 14px 10px 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--csfr-line);
}
.csfr-bar-slab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.csfr-bar-track {
  flex: 1;
  width: 100%;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 8px;
  padding: 6px 2px;
  background: linear-gradient(180deg, #f5f7fb 0%, #eef1f6 100%);
}
.csfr-bar {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  min-height: 6px;
  background: linear-gradient(180deg, #14b8a6 0%, #0f766e 55%, #083141 100%);
  box-shadow: none;
}
.csfr-bar--below-upper {
  background: linear-gradient(180deg, #5eead4 0%, #0f766e 100%);
}
.csfr-bar--below-lower {
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
}
.csfr-bar-year {
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
  line-height: 1.2;
  text-align: center;
}
.csfr-year-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid var(--csfr-line);
}
.csfr-year-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.csfr-year-table th,
.csfr-year-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eef1f6;
}
.csfr-year-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  background: #f8fafc;
  font-weight: 800;
}
.csfr-year-table td {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
}
.csfr-year-table tr:last-child td { border-bottom: none; }
.csfr-year-table tr.is-upper td { background: #f0fdfa; }
.csfr-year-table tr.is-lower td { background: #f1f5f9; }
.csfr-input--money { font-variant-numeric: tabular-nums; }
.csfr-globals--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 700px) {
  .csfr-globals--2 { grid-template-columns: 1fr; }
}
.csfr-threshold-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}
.csfr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--csfr-line);
  font-size: 0.82rem;
  font-weight: 750;
  color: #374151;
}
.csfr-chip strong { color: var(--csfr-ink); font-weight: 900; }


/* === v1.0.2: phase badge, weekly breakdown, toggles stack, assumptions === */

.csfr-hero-runway__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin: 0 0 6px;
}
.csfr-hero-runway__top .csfr-hero-runway__kicker {
  margin: 0;
}

.csfr-phase {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}
.csfr-phase--self {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0b5f58;
}
.csfr-phase--tariff {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}
.csfr-phase--income {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}
.csfr-phase--warn {
  background: #f1f5f9;
  border-color: #083141;
  color: #083141;
}

.csfr-weekly {
  margin: 0;
}
.csfr-weekly__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.csfr-weekly__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
@media (max-width: 520px) {
  .csfr-weekly__grid { grid-template-columns: minmax(0, 1fr); }
}
.csfr-weekly__cell {
  border: 1px solid #d9e2e8;
  border-radius: 12px;
  padding: 12px 12px 14px;
  background: #f4f7f8;
  min-width: 0;
}
.csfr-weekly__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
  margin: 0 0 6px;
}
.csfr-weekly__value {
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--csfr-ink);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.csfr-panel--weekly {
  background:
    radial-gradient(800px 220px at 100% 0%, rgba(18,184,134,0.08), transparent 55%),
    #fff;
}

.csfr-subtitle {
  margin: 18px 0 10px;
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--csfr-ink);
}
.csfr-toggles-wrap .csfr-subtitle:first-child,
.csfr-care-rates .csfr-subtitle:first-child {
  margin-top: 18px;
}

.csfr-toggles {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.csfr-toggles .csfr-switch-row {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--csfr-line);
  background: #fff;
  margin: 0;
}
.csfr-toggles .csfr-switch-row.is-disabled {
  opacity: 0.55;
  background: #f8fafc;
}
.csfr-switch[disabled],
.csfr-switch[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.7;
}

.csfr-care-rates {
  margin-top: 4px;
}

.csfr-assumptions {
  margin-top: 18px;
  padding: 16px 16px 8px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 60%);
}
.csfr-assumptions__list {
  margin: 0 0 14px;
  padding: 0 0 0 1.15rem;
  color: #374151;
  font-size: 0.92rem;
  line-height: 1.5;
  font-weight: 550;
}
.csfr-assumptions__list li {
  margin: 0 0 8px;
}
.csfr-assumptions__list--muted {
  color: #64748b;
}

.csfr-chip--mint {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}

.csfr-nation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

@media (max-width: 560px) {
  .csfr-shell {
    padding: 16px 12px 22px;
    border-radius: 22px;
  }
  .csfr-head {
    padding: 20px 16px 18px;
    border-radius: 18px;
  }
  .csfr-hero-runway {
    padding: 18px 14px 20px;
  }
  .csfr-hero-runway__value {
    font-size: clamp(1.7rem, 1.2rem + 3.2vw, 2.4rem);
  }
  .csfr-kpi__value {
    font-size: clamp(1.25rem, 1.05rem + 1.2vw, 1.6rem);
  }
  .csfr-switch-row {
    gap: 10px;
  }
  .csfr-bars {
    gap: 4px;
    padding: 10px 6px 8px;
    overflow-x: auto;
  }
}

.csfr-year-table td:last-child {
  font-size: 0.82rem;
  font-weight: 750;
  color: #4b5563;
}

.csfr-kpi__value {
  min-width: 0;
  overflow-wrap: break-word;
}
.csfr-kpi__value--money,
.csfr-kpi__money {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.csfr-kpi__value--wrap {
  white-space: normal;
}
.csfr-kpi__value--stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  white-space: normal;
  font-size: clamp(1.1rem, 0.95rem + 0.55vw, 1.45rem);
}
.csfr-kpi__pair {
  font-size: 0.85em;
  font-weight: 800;
  color: var(--csfr-muted);
}
.csfr-kpi__stack-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.csfr-weekly__value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.csfr-hero-runway--warn .csfr-hero-runway__top {
  justify-content: flex-start;
}
.csfr-section-help--story {
  font-size: 1.05rem;
  color: #1f2937;
  font-weight: 600;
}
.csfr-panel--story {
  border-left: 4px solid #0f766e;
  background: #f4f7f8;
}
.csfr-note[hidden] {
  display: none;
}
.csfr-method__summary-kicker {
  color: #0b5f58;
}
.csfr-export-badge {
  background: linear-gradient(180deg, #14b8a6, #0f766e);
}
.csfr-app button.csfr-export-btn {
  background: linear-gradient(180deg, #0e7490 0%, #155e75 55%, #164e63 100%) !important;
  box-shadow: 0 10px 24px rgba(21, 94, 117, 0.28) !important;
}

