/* Someday Tax Calculator (UK) — modern coral / mint (not Lifestyle Creep teal-navy) */

.stax-app,
.stax-app * {
  box-sizing: border-box;
}

.stax-loading,
.stax-fatal,
.stax-err {
  margin: 12px 0;
  font-weight: 650;
  color: #5b6472;
}
.stax-err,
.stax-fatal {
  color: #e11d48;
  font-weight: 700;
}

#stax-root.stax-app,
.stax-root.stax-app {
  --stax-ink: #0b1220;
  --stax-muted: #4b5563;
  --stax-line: #e6eaf0;
  --stax-soft: #f5f7fb;
  --stax-coral: #ff4d3d;
  --stax-coral-deep: #e23a2b;
  --stax-mint: #12b886;
  --stax-mint-deep: #0ca678;
  --stax-sky: #3b82f6;
  --stax-text: 1.05rem;
  --stax-text-sm: 0.95rem;
  --stax-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(--stax-ink);
  font-size: var(--stax-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.stax-shell {
  max-width: 100%;
  width: 100%;
  margin: 0 auto 28px;
  padding: 22px 20px 28px;
  border: 1px solid var(--stax-line);
  border-radius: 28px;
  background:
    radial-gradient(1200px 420px at 10% -10%, rgba(255, 77, 61, 0.12), transparent 55%),
    radial-gradient(900px 380px at 95% 0%, rgba(18, 184, 134, 0.12), transparent 50%),
    #fff;
  box-shadow: 0 20px 50px rgba(11, 18, 32, 0.08);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.stax-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;
}
.stax-head::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 61, 0.35), transparent 68%);
  pointer-events: none;
}
.stax-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fda4a0;
  position: relative;
  z-index: 1;
}
.stax-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;
}
.stax-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;
}
.stax-lead + .stax-lead {
  margin-top: 12px;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.78);
}

.stax-premise {
  margin: 0;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff5f3 0%, #f3fffb 100%);
  border: 1px solid #ffd5cf;
}
.stax-premise__eyebrow {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stax-coral-deep);
}
.stax-premise__body {
  margin: 0;
  max-width: none;
  width: 100%;
  font-size: 1.04rem;
  line-height: 1.6;
  font-weight: 600;
  color: #1f2937;
}

.stax-how,
.stax-method {
  border: 1px solid var(--stax-line);
  border-radius: 22px;
  padding: 22px 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.04);
}
.stax-method {
  padding: 0;
  overflow: hidden;
}
.stax-method__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 16px 18px;
  user-select: none;
}
.stax-method__summary::-webkit-details-marker {
  display: none;
}
.stax-method__summary-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stax-coral-deep);
  width: 100%;
}
.stax-method__summary-title {
  font-size: 1.2rem;
  font-weight: 850;
  color: var(--stax-ink);
  letter-spacing: -0.02em;
}
.stax-method__summary-hint {
  margin-left: auto;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--stax-muted);
}
.stax-method:not([open]) .stax-method__summary-hint::before {
  content: "Show ";
}
.stax-method[open] .stax-method__summary-hint {
  color: var(--stax-coral-deep);
}
.stax-method[open] .stax-method__summary-hint::before {
  content: "Hide ";
}
.stax-method__body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--stax-line);
}
.stax-method__body .stax-section-help {
  margin-top: 14px;
}
.stax-how .stax-section-title {
  margin-bottom: 14px;
}
.stax-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%;
}
.stax-how__steps strong {
  color: var(--stax-ink);
  font-weight: 800;
}
.stax-method__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .stax-method__grid {
    grid-template-columns: 1fr;
  }
}
.stax-method__card {
  padding: 14px 14px 16px;
  border-radius: 16px;
  background: var(--stax-soft);
  border: 1px solid #eef1f6;
}
.stax-method__h {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--stax-ink);
  letter-spacing: -0.02em;
}
.stax-method__p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #374151;
  font-weight: 550;
}

.stax-results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stax-panel {
  border: 1px solid var(--stax-line);
  border-radius: 22px;
  padding: 22px 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.04);
}
.stax-panel--list {
  background: linear-gradient(180deg, #fffaf9 0%, #fff 40%);
}
.stax-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.stax-section-help {
  margin: 10px 0 18px;
  max-width: none;
  width: 100%;
  font-size: 1rem;
  color: var(--stax-muted);
  line-height: 1.6;
  font-weight: 550;
}
.stax-section-help--tight {
  margin-bottom: 12px;
}
.stax-section-badge {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ffe8e5;
  color: var(--stax-coral-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stax-section-title {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 2.5vw, 1.6rem);
  font-weight: 900;
  color: var(--stax-ink);
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.stax-section-badge + .stax-section-title {
  margin-top: 0;
}
.stax-section-title + .stax-section-help,
.stax-panel__head + .stax-section-help {
  margin-top: 10px;
}

.stax-catalogue-wrap {
  margin: 0 0 24px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff5f3 0%, #f7fffc 100%);
  border: 1px solid #ffd5cf;
}
.stax-catalogue__heading,
.stax-list__heading {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 850;
  color: var(--stax-ink);
  letter-spacing: -0.02em;
}
.stax-catalogue__lead {
  margin: 0 0 14px;
  max-width: none;
  width: 100%;
  font-size: 0.95rem;
  color: var(--stax-muted);
  line-height: 1.5;
  font-weight: 550;
}
.stax-catalogue {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 900px) {
  .stax-catalogue {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .stax-catalogue {
    grid-template-columns: 1fr;
  }
}
.stax-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;
}
.stax-catalogue__item:hover:not(:disabled) {
  border-color: #ff8b80;
  box-shadow: 0 8px 20px rgba(255, 77, 61, 0.12);
  transform: translateY(-1px);
}
.stax-catalogue__item:focus-visible {
  outline: 2px solid rgba(255, 77, 61, 0.5);
  outline-offset: 2px;
}
.stax-catalogue__item:disabled {
  cursor: default;
  opacity: 0.72;
}
.stax-catalogue__item.is-added {
  background: #f3fffb;
  border-color: #9ee0c8;
}
.stax-catalogue__emoji {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
  margin-bottom: 4px;
}
.stax-catalogue__name {
  font-size: 1rem;
  font-weight: 850;
  color: var(--stax-ink);
  letter-spacing: -0.02em;
}
.stax-catalogue__blurb {
  font-size: 0.88rem;
  line-height: 1.4;
  color: #4b5563;
  font-weight: 500;
  flex: 1;
}
.stax-catalogue__meta {
  margin-top: 4px;
  font-size: 0.84rem;
  font-weight: 750;
  color: #0f766e;
}
.stax-catalogue__cta {
  margin-top: 6px;
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ffe8e5;
  color: var(--stax-coral-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stax-catalogue__item.is-added .stax-catalogue__cta {
  background: #d1fae5;
  color: #047857;
}
.stax-list-count {
  margin: 12px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #6b7280;
}
.stax-list__heading {
  margin-top: 4px;
}

.stax-globals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 800px) {
  .stax-globals {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .stax-globals {
    grid-template-columns: 1fr;
  }
}

.stax-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  background: var(--stax-soft);
  border: 1px solid transparent;
}
.stax-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1f2937;
}
.stax-hint {
  margin: 0;
  font-size: 0.86rem;
  color: #4b5563;
  line-height: 1.4;
  font-weight: 500;
}
.stax-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(--stax-ink);
  font-family: inherit;
}
.stax-input:focus {
  outline: 2px solid rgba(255, 77, 61, 0.45);
  outline-offset: 1px;
  border-color: #ff8b80;
}

.stax-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stax-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);
}
.stax-exp__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 12px;
}
.stax-exp__emoji {
  flex: 0 0 auto;
  font-size: 1.35rem;
  line-height: 1;
}
.stax-exp__index {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ff6b5c 0%, var(--stax-coral) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.stax-exp__label {
  flex: 1 1 140px;
  min-width: 0;
  border: 1px solid #eef1f6;
  background: var(--stax-soft);
  font-weight: 800;
  font-size: 1.02rem;
  padding: 8px 12px;
  border-radius: 12px;
  min-height: 44px;
  font-family: inherit;
}
.stax-exp__label:focus {
  outline: 2px solid rgba(255, 77, 61, 0.4);
  border-color: #ff8b80;
  background: #fff;
}
.stax-exp__remove {
  border: none;
  background: #fff1f0;
  color: var(--stax-coral-deep);
  font-weight: 750;
  cursor: pointer;
  font-size: 0.82rem;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: inherit;
}
.stax-exp__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .stax-exp__grid {
    grid-template-columns: 1fr;
  }
}

.stax-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  min-height: 44px;
  font-family: inherit;
}
.stax-btn--primary {
  background: linear-gradient(180deg, #ff6b5c 0%, var(--stax-coral) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 77, 61, 0.28);
}
.stax-btn--primary:hover {
  filter: brightness(1.04);
}
.stax-btn--ghost {
  background: #fff;
  color: var(--stax-coral-deep);
  border: 1px solid #ffd5cf;
  box-shadow: none;
}
.stax-btn--ghost:hover {
  background: #fff5f3;
}

/* Grade hero */
.stax-celebration {
  border-radius: 24px;
  border: none;
  overflow: hidden;
  color: #fff;
}
.stax-celebration--anchored {
  background: linear-gradient(135deg, #063b32 0%, #0ca678 50%, #12b886 100%);
}
.stax-celebration--soft {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 55%, #3b82f6 100%);
}
.stax-celebration--habit {
  background: linear-gradient(135deg, #7a1f18 0%, #e23a2b 45%, #ff6b5c 100%);
}
.stax-celebration--closing {
  background: linear-gradient(135deg, #4c0519 0%, #be123c 50%, #fb7185 100%);
}
.stax-celebration__inner {
  display: grid;
  grid-template-columns: minmax(170px, 240px) 1fr;
  gap: 18px;
  padding: 22px 20px;
  align-items: center;
}
@media (max-width: 700px) {
  .stax-celebration__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
.stax-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;
}
.stax-celebration__gif {
  width: 100%;
  height: 158px;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}
.stax-celebration__emoji {
  position: absolute;
  font-size: 2.3rem;
  z-index: 0;
  opacity: 0.9;
}
.stax-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;
}
.stax-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;
}
.stax-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%;
}

.stax-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);
}
.stax-score__block {
  padding: 12px 16px 14px;
  min-width: 150px;
}
.stax-score__label {
  margin: 0 0 2px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
}
.stax-score__num {
  margin: 0 0 8px;
  font-size: 2.55rem;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
}
.stax-score__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  margin-bottom: 6px;
}
.stax-score__bar-fill {
  display: block;
  height: 100%;
  width: calc(var(--stax-fulfil, 50) * 1%);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
}
.stax-score__cap {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  opacity: 0.9;
  line-height: 1.35;
}
.stax-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);
}
.stax-score__tax-lab {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
}
.stax-score__tax-num {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stax-score__tax-unit {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0.9;
}
@media (max-width: 700px) {
  .stax-score {
    margin-left: auto;
    margin-right: auto;
  }
}

.stax-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .stax-kpis {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .stax-kpis {
    grid-template-columns: 1fr;
  }
}
.stax-kpi {
  border-radius: 18px;
  border: 1px solid var(--stax-line);
  background: #fff;
  padding: 16px 14px;
  box-shadow: 0 6px 18px rgba(11, 18, 32, 0.04);
}
.stax-kpi--tax {
  border-color: #ffc7c1;
  background: linear-gradient(180deg, #fff5f3 0%, #fff 70%);
}
.stax-kpi--tax .stax-kpi__value {
  color: var(--stax-coral-deep);
}
.stax-kpi--miss {
  border-color: #fecdd3;
  background: linear-gradient(180deg, #fff1f2 0%, #fff 70%);
}
.stax-kpi--miss .stax-kpi__value {
  color: #e11d48;
}
.stax-kpi--money {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 70%);
}
.stax-kpi--money .stax-kpi__value {
  color: #1d4ed8;
}
.stax-kpi--invest {
  border-color: #99e9c8;
  background: linear-gradient(180deg, #e6fcf5 0%, #fff 70%);
}
.stax-kpi--invest .stax-kpi__value {
  color: var(--stax-mint-deep);
}
.stax-kpi__label {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
}
.stax-kpi__value {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 1.1rem + 0.85vw, 1.85rem);
  font-weight: 950;
  letter-spacing: -0.03em;
  color: var(--stax-ink);
  line-height: 1.1;
}
.stax-kpi__hint {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.45;
  font-weight: 550;
}

.stax-timing-panel {
  border: 1px solid var(--stax-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);
}
.stax-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;
}
.stax-timing-panel__sub {
  margin: 18px 0 10px;
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--stax-ink);
  letter-spacing: -0.02em;
}
.stax-age-guide {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 4px;
}
@media (max-width: 900px) {
  .stax-age-guide {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .stax-age-guide {
    grid-template-columns: 1fr;
  }
}
.stax-age-guide__card {
  padding: 12px 12px 14px;
  border-radius: 14px;
  border: 1px solid #eef1f6;
  background: #fff;
}
.stax-age-guide__ages {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stax-coral-deep);
}
.stax-age-guide__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 850;
  color: var(--stax-ink);
  letter-spacing: -0.02em;
}
.stax-age-guide__fit {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #4b5563;
  font-weight: 550;
}
.stax-timing-panel__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stax-timing {
  border-radius: 16px;
  padding: 14px 14px 15px;
  border: 1px solid #eef1f6;
  background: #fff;
}
.stax-timing--sooner {
  border-color: #ffc7c1;
  background: linear-gradient(180deg, #fff5f3 0%, #fff 75%);
}
.stax-timing--mid {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 75%);
}
.stax-timing--flexible {
  border-color: #99e9c8;
  background: linear-gradient(180deg, #e6fcf5 0%, #fff 75%);
}
.stax-timing__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.stax-timing__name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 850;
  color: var(--stax-ink);
  letter-spacing: -0.02em;
}
.stax-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(--stax-coral-deep);
}
.stax-timing--mid .stax-timing__tag {
  background: #dbeafe;
  color: #1d4ed8;
}
.stax-timing--flexible .stax-timing__tag {
  background: #d1fae5;
  color: #047857;
}
.stax-timing__ages {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #4b5563;
}
.stax-timing__line {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #1f2937;
  font-weight: 550;
}

.stax-compare,
.stax-toll,
.stax-insights {
  border: 1px solid var(--stax-line);
  border-radius: 22px;
  padding: 20px 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.04);
}
.stax-compare {
  background: linear-gradient(180deg, #f3fffb 0%, #fff 35%);
}
.stax-toll {
  background: linear-gradient(180deg, #fff5f3 0%, #fff 35%);
}
.stax-insights {
  background: linear-gradient(180deg, #f5f7fb 0%, #fff 40%);
}

.stax-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 800px) {
  .stax-paths {
    grid-template-columns: 1fr;
  }
}
.stax-path {
  border-radius: 18px;
  padding: 16px 14px;
  border: 1px solid var(--stax-line);
  background: #fff;
}
.stax-path--soon {
  border-color: #99e9c8;
  background: linear-gradient(165deg, #e6fcf5 0%, #fff 70%);
}
.stax-path--wait {
  border-color: #ffc7c1;
  background: linear-gradient(165deg, #fff5f3 0%, #fff 70%);
}
.stax-path--work {
  border-color: #bfdbfe;
  background: linear-gradient(165deg, #eff6ff 0%, #fff 70%);
}
.stax-path__kicker {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stax-muted);
}
.stax-path--soon .stax-path__kicker {
  color: var(--stax-mint-deep);
}
.stax-path--wait .stax-path__kicker {
  color: var(--stax-coral-deep);
}
.stax-path--work .stax-path__kicker {
  color: #1d4ed8;
}
.stax-path__stop {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 650;
  color: #374151;
}
.stax-path__metric {
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.stax-path__metric span {
  font-size: 1.85rem;
  font-weight: 950;
  letter-spacing: -0.04em;
  color: var(--stax-ink);
}
.stax-path--soon .stax-path__metric span {
  color: var(--stax-mint-deep);
}
.stax-path--wait .stax-path__metric span {
  color: var(--stax-coral-deep);
}
.stax-path__metric small {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--stax-muted);
}
.stax-path__meta,
.stax-path__extra,
.stax-path__blurb {
  margin: 0 0 6px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #374151;
  font-weight: 550;
}
.stax-path__extra {
  font-weight: 750;
  color: #1d4ed8;
}
.stax-path__blurb {
  margin-bottom: 0;
  color: #6b7280;
}

.stax-toll__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 700px) {
  .stax-toll__grid {
    grid-template-columns: 1fr;
  }
}
.stax-toll-card {
  border-radius: 18px;
  padding: 16px 14px;
  border: 1px solid #ffc7c1;
  background: #fff;
}
.stax-toll-card__kicker {
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stax-coral-deep);
}
.stax-toll-card__value {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 950;
  letter-spacing: -0.03em;
  color: var(--stax-ink);
}
.stax-toll-card__hint,
.stax-toll-card__cost,
.stax-toll-card__fund {
  margin: 0 0 4px;
  font-size: 0.84rem;
  color: var(--stax-muted);
  font-weight: 550;
  line-height: 1.4;
}
.stax-toll-card__fund {
  margin-bottom: 0;
  font-weight: 750;
  color: var(--stax-mint-deep);
}

.stax-insights__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stax-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(--stax-line);
  box-shadow: 0 4px 14px rgba(11, 18, 32, 0.04);
}

/* Timeline */
.stax-timeline {
  border: 1px solid #dbe4ff;
  border-radius: 22px;
  padding: 18px 16px;
  background: linear-gradient(180deg, #f5f8ff 0%, #fff 45%);
}
.stax-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;
}
.stax-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(--stax-ink);
}
.stax-timeline__lead {
  margin: 0 0 14px;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--stax-muted);
}
.stax-timeline__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.stax-timeline__leg {
  font-size: 0.74rem;
  font-weight: 750;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--stax-line);
  background: #fff;
}
.stax-timeline__leg--ideal {
  color: #6b7280;
}
.stax-timeline__leg--soon {
  border-color: #99e9c8;
  color: var(--stax-mint-deep);
  background: #e6fcf5;
}
.stax-timeline__leg--wait {
  border-color: #ffc7c1;
  color: var(--stax-coral-deep);
  background: #fff5f3;
}
.stax-timeline-row {
  margin-bottom: 16px;
}
.stax-timeline-row__label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.stax-timeline-row__label span {
  color: var(--stax-muted);
  font-weight: 600;
}
.stax-timeline-track {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: #e8edf5;
  overflow: hidden;
}
.stax-timeline-track__active {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(59, 130, 246, 0.18);
  border-right: 2px solid #3b82f6;
}
.stax-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);
}
.stax-timeline-mark--ideal {
  background: #9ca3af;
  width: 10px;
  height: 10px;
  top: 3px;
  margin-left: -5px;
}
.stax-timeline-mark--soon {
  background: var(--stax-mint);
}
.stax-timeline-mark--wait {
  background: var(--stax-coral);
}
.stax-timeline-row__ages {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #6b7280;
}
.stax-timeline__axis {
  margin: 8px 0 0;
  font-size: 0.74rem;
  font-weight: 750;
  color: #3b82f6;
}

.stax-disclaimer {
  margin: 0;
  padding: 14px 16px;
  font-size: 0.84rem;
  color: var(--stax-muted);
  line-height: 1.45;
  font-weight: 500;
  background: var(--stax-soft);
  border-radius: 16px;
}

/* Export */
.stax-app .stax-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;
}
.stax-export-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  padding: 22px 20px;
  align-items: center;
}
@media (max-width: 720px) {
  .stax-export-inner {
    grid-template-columns: 1fr;
  }
}
.stax-export-badge {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ff6b5c, var(--stax-coral));
  color: #fff;
  font-weight: 950;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.06em;
}
.stax-export-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 950;
  color: #fff;
  letter-spacing: -0.02em;
}
.stax-export-lead {
  margin: 0 0 10px;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.8);
}
.stax-export-includes {
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 550;
  font-size: 0.9rem;
}
.stax-export-hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}
.stax-app button.stax-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(--stax-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;
}
.stax-app button.stax-export-btn:hover,
.stax-app button.stax-export-btn:focus {
  filter: brightness(1.05);
}

/* Modal — suite pattern (dark header + cyan footer). Appended to document.body. */
.stax-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;
}
.stax-modal-overlay .stax-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;
}
.stax-modal-overlay .stax-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;
}
.stax-modal-overlay .stax-modal-header-text {
  flex: 1;
  min-width: 0;
}
.stax-modal-overlay .stax-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;
}
.stax-modal-overlay .stax-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;
}
.stax-modal-overlay button.stax-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;
}
.stax-modal-overlay .stax-modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: #ffffff !important;
  color: #0f172a !important;
}
.stax-modal-overlay .stax-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;
}
.stax-modal-overlay .stax-modal-label {
  display: block;
  margin: 12px 0 7px;
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a !important;
}
.stax-modal-overlay .stax-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;
}
.stax-modal-overlay .stax-modal-error {
  margin: 12px 0 0;
  color: #b91c1c !important;
  font-size: 0.92rem;
  font-weight: 700;
  min-height: 1.2em;
}
.stax-modal-overlay .stax-modal-privacy {
  margin: 14px 0 0;
  font-size: 0.82rem;
  font-weight: 550;
  color: #64748b !important;
  line-height: 1.45;
}
.stax-modal-overlay .stax-modal-success {
  margin: 0;
  padding: 8px 0;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.5;
  color: #059669 !important;
}
.stax-modal-overlay .stax-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;
}
.stax-modal-overlay button.stax-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);
}
.stax-modal-overlay button.stax-modal-submit:hover,
.stax-modal-overlay button.stax-modal-submit:focus {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(180deg, #14b8a6 0%, #0e7490 55%, #155e75 100%) !important;
}
.stax-modal-overlay button.stax-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) {
  .stax-modal-overlay {
    align-items: flex-start;
    padding-top: max(12px, env(safe-area-inset-top));
  }
  .stax-modal-overlay .stax-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
}
