/* Points Maxing — brand styling (light lavender / purple / orange, Poppins) */
:root {
  /* Surfaces */
  --bg: #F3EDFA;
  --bg-2: #ECE3F8;
  --surface: #FFFFFF;
  --surface-2: #FAF7FE;
  --surface-3: #F4EEFC;

  /* Ink */
  --ink: #16101F;
  --ink-dim: #5A5268;
  --ink-mute: #938BA6;

  /* Brand */
  --purple: #6A21D9;
  --purple-deep: #561AB0;
  --purple-soft: #8C4DEE;
  --purple-tint: #EFE6FC;
  --orange: #F6913D;
  --orange-deep: #E0762A;
  --orange-tint: #FDEBD9;
  --green: #1FA877;
  --green-tint: #DCF3EA;
  --amber: #E8A317;
  --rose: #E5476F;

  /* Lines */
  --line: rgba(22,16,31,0.10);
  --line-strong: rgba(22,16,31,0.18);

  /* Dark panel (timeline) */
  --indigo: #281552;
  --indigo-2: #34206A;
  --indigo-line: rgba(255,255,255,0.12);
  --cream: #F6F1FF;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --font-display: 'Poppins', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --shadow-card: 0 14px 34px -20px rgba(60,28,120,0.40);
  --shadow-soft: 0 6px 18px -12px rgba(60,28,120,0.35);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 50% at 85% -5%, rgba(106,33,217,0.10), transparent 60%),
    radial-gradient(ellipse 50% 40% at 5% 5%, rgba(246,145,61,0.08), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
input, select { outline: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); line-height: 0.98; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }

a { color: var(--purple); text-decoration: none; }

/* ─── Layout ───────────────────────────────────────────────── */
.app { max-width: 1000px; margin: 0 auto; padding: 26px 24px 80px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 36px;
}

/* Logo — Point Maxing brand mark (image) */
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; cursor: pointer; }
.logo img { height: 58px; width: auto; display: block; }
.logo small { display: none; }

/* ─── Progress bar ────────────────────────────────────────── */
.progress {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 8px 8px 8px 8px;
  box-shadow: var(--shadow-soft);
}
.progress-track {
  flex: 1; height: 6px;
  background: var(--bg-2);
  border-radius: 999px; overflow: hidden;
  margin-right: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--purple-soft));
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(.2,.8,.2,1);
}
.progress-steps {
  display: flex; gap: 6px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.progress-steps .step {
  padding: 7px 15px; border-radius: 999px;
  background: transparent; color: var(--ink-mute);
  white-space: nowrap;
}
.progress-steps .step.active { background: var(--purple); color: #fff; }
.progress-steps .step.done { color: var(--purple); }

/* ─── Step transitions ────────────────────────────────────── */
.step-pane { animation: fadeUp 0.5s cubic-bezier(.2,.8,.2,1); position: relative; opacity: 1; }
@keyframes fadeUp {
  from { transform: translateY(14px); }
  to { transform: translateY(0); }
}

.step-header { margin-bottom: 38px; }
.step-eyebrow {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--purple); font-weight: 700; margin-bottom: 16px;
  display: inline-block;
}
/* Orange highlight box — the "Maximise" device */
.step-header h1 .accent {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  padding: 0.02em 0.32em 0.1em;
  border-radius: 16px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  line-height: 1.05;
}
.step-header p.lede {
  color: var(--ink-dim); font-size: 1.1rem; max-width: 60ch;
  margin: 20px 0 0; font-weight: 400;
}
.step-header p.lede strong { color: var(--ink); font-weight: 700; }

/* ─── Form fields ─────────────────────────────────────────── */
.field { margin-bottom: 26px; }
.field-label {
  display: block; font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; color: var(--ink);
}
.field-help { color: var(--ink-mute); font-size: 0.92rem; margin-bottom: 14px; }

.input, .select {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 15px 18px;
  font-size: 1rem; font-weight: 500; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px var(--purple-tint);
}
.input::placeholder { color: var(--ink-mute); font-weight: 400; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'><path fill='none' stroke='%2316101F' stroke-width='2' d='M1 1l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px;
}

.input-prefix { position: relative; }
.input-prefix .prefix {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--ink-mute); font-weight: 600; pointer-events: none; z-index: 2;
}
.input-prefix .input { padding-left: 34px; }

/* Radio cards */
.radio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.radio-card {
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 20px 18px; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left;
}
.radio-card:hover { border-color: var(--purple-soft); box-shadow: var(--shadow-soft); }
.radio-card.selected {
  border-color: var(--purple);
  background: var(--purple-tint);
  box-shadow: 0 0 0 1px var(--purple) inset;
}
.radio-card .rc-title { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--ink); padding-right: 28px; }
.radio-card .rc-sub { color: var(--ink-mute); font-size: 0.88rem; }
.radio-card .rc-check {
  position: absolute; top: 16px; right: 16px; width: 22px; height: 22px;
  border-radius: 50%; border: 2px solid var(--line-strong); background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.radio-card.selected .rc-check { background: var(--purple); border-color: var(--purple); }
.radio-card.selected .rc-check::after {
  content: ''; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px,-1px);
}

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  transition: transform 0.1s ease, background 0.15s, box-shadow 0.15s, color 0.15s;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 10px 24px -10px rgba(106,33,217,0.6); }
.btn-primary:hover { background: var(--purple-deep); }
.btn-primary:disabled { background: var(--bg-2); color: var(--ink-mute); cursor: not-allowed; box-shadow: none; }

.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--purple); color: var(--purple); }

.btn-soft { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); box-shadow: var(--shadow-soft); }
.btn-soft:hover { border-color: var(--purple-soft); }

.btn-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 38px; }

/* ─── Step 2: history list ────────────────────────────────── */
.history-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.history-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 20px; display: grid; grid-template-columns: 36px 1fr auto; gap: 16px;
  align-items: center; animation: fadeUp 0.3s; box-shadow: var(--shadow-soft);
}
.history-item .swatch { width: 36px; height: 36px; border-radius: 10px; }
.history-item .hi-card { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.history-item .hi-meta { color: var(--ink-mute); font-size: 0.86rem; margin-top: 2px; }
.history-item .hi-remove {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-3); color: var(--ink-dim); font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s; line-height: 1;
}
.history-item .hi-remove:hover { background: var(--rose); color: #fff; }

.history-empty {
  background: var(--surface-2); border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
  padding: 30px; text-align: center; color: var(--ink-dim); margin-bottom: 18px;
}

.add-card-btn {
  width: 100%; background: var(--surface-2);
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
  padding: 20px; color: var(--purple); font-family: var(--font-display);
  font-weight: 700; font-size: 1rem; transition: all 0.15s;
}
.add-card-btn:hover { border-color: var(--purple); background: var(--purple-tint); }

/* Card picker */
.card-picker {
  background: var(--surface); border: 1.5px solid var(--purple); border-radius: var(--r-md);
  padding: 22px; box-shadow: var(--shadow-card); animation: fadeUp 0.25s;
}
.card-picker .picker-title { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; margin-bottom: 16px; color: var(--ink); }
.status-toggle { display: flex; background: var(--surface-3); border-radius: 999px; padding: 4px; gap: 4px; }
.status-toggle button {
  flex: 1; padding: 10px 16px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; color: var(--ink-dim); transition: all 0.15s;
}
.status-toggle button.active { background: var(--purple); color: #fff; }
.picker-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ─── Step 3: headline stats ──────────────────────────────── */
.headline-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 34px; }
@media (max-width: 720px) { .headline-stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow-soft); }
.stat .stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-mute); font-weight: 600; margin-bottom: 10px; }
.stat .stat-value { font-family: var(--font-display); font-weight: 800; font-size: 1.85rem; letter-spacing: -0.03em; color: var(--ink); }
.stat .stat-suffix { font-size: 0.85rem; color: var(--ink-mute); margin-left: 3px; font-weight: 600; }
.stat.accent { background: var(--orange-tint); border-color: transparent; }
.stat.accent .stat-value { color: var(--orange-deep); }
.stat.mint { background: var(--green-tint); border-color: transparent; }
.stat.mint .stat-value { color: var(--green); }

/* Timeline — deep indigo panel */
.timeline {
  background: var(--indigo); color: var(--cream);
  border-radius: var(--r-lg); padding: 28px 26px 22px; margin-bottom: 40px;
  overflow-x: auto; box-shadow: var(--shadow-card);
}
.timeline-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 24px; }
.timeline-title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: #fff; }
.timeline-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: rgba(246,241,255,0.78); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.timeline-grid { position: relative; min-width: 600px; }
.tl-months { display: grid; grid-template-columns: 92px 1fr; margin-bottom: 8px; font-size: 0.7rem; color: rgba(246,241,255,0.6); font-weight: 500; }
.tl-months .tl-month-row { display: grid; grid-template-columns: repeat(var(--months), 1fr); }
.tl-months .tl-month-row span { padding: 4px 0; text-align: center; border-left: 1px solid var(--indigo-line); }
.tl-months .tl-month-row span:first-child { border-left: 0; }

.tl-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; margin-bottom: 10px; gap: 12px; min-height: 32px; }
.tl-row .tl-label { font-family: var(--font-display); font-weight: 600; font-size: 0.84rem; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track {
  position: relative; height: 34px; background: var(--indigo-2); border-radius: 8px;
  display: grid; grid-template-columns: repeat(var(--months), 1fr); border: 1px solid var(--indigo-line);
}
.tl-track > .tick { border-left: 1px solid var(--indigo-line); height: 100%; }
.tl-track > .tick:first-child { border-left: 0; }

.tl-bar {
  position: absolute; top: 4px; bottom: 4px; border-radius: 5px;
  display: flex; align-items: center; padding: 0 8px;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap; overflow: hidden;
}
.tl-bar.apply { background: var(--purple-soft); color: #fff; }
.tl-bar.spend { background: var(--orange); color: #fff; }
.tl-bar.bonus { background: var(--green); color: #fff; }
.tl-bar.cancel { background: rgba(255,255,255,0.10); color: var(--cream); border: 1px dashed rgba(255,255,255,0.32); }

/* Section title */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 38px 0 20px; gap: 16px; }
.section-title h2 { font-size: 1.55rem; }
.section-title .pill {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--purple);
  background: var(--purple-tint); border-radius: 999px; padding: 6px 14px; font-weight: 600; white-space: nowrap;
}

/* Result card */
.result-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow-soft);
  transition: box-shadow 0.15s, transform 0.12s;
}
.result-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }

.rc-header { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.rc-issuer {
  width: 58px; height: 58px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em;
  position: relative; overflow: hidden;
}
.rc-issuer::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.16), transparent 55%); }
.rc-name { font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; letter-spacing: -0.02em; color: var(--ink); }
.rc-sub { color: var(--ink-mute); font-size: 0.86rem; margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; font-weight: 500; }
.rc-sub .dot::before { content: '·'; margin-right: 14px; color: var(--ink-mute); }

.rc-rank { font-size: 0.7rem; text-transform: uppercase; color: var(--ink-mute); text-align: right; font-weight: 600; }
.rc-rank .rank-num { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; color: var(--purple); letter-spacing: -0.03em; line-height: 1; }

.rc-body { padding: 22px 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 720px) { .rc-body { grid-template-columns: repeat(2, 1fr); } }
.rc-stat { display: flex; flex-direction: column; }
.rc-stat-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-mute); margin-bottom: 6px; font-weight: 600; }
.rc-stat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; color: var(--ink); }
.rc-stat-value.coral { color: var(--orange-deep); }
.rc-stat-value.mint { color: var(--green); }
.rc-stat-value.amber { color: var(--amber); }

.rc-active-note {
  padding: 12px 24px; border-top: 1px solid var(--line);
  font-size: 0.84rem; color: var(--ink-dim); display: flex; align-items: center; flex-wrap: wrap;
  background: var(--surface-2); font-weight: 500;
}

.rc-breakdown {
  padding: 18px 24px; background: var(--surface-3); border-top: 1px solid var(--line);
  font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; font-weight: 500;
}
.rc-breakdown strong { color: var(--purple); font-weight: 700; }
.rc-breakdown .net { color: var(--green); font-weight: 700; }
.rc-breakdown .net.negative { color: var(--rose); }

.rc-tranches { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; background: var(--surface-2); }
.tranche { background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; font-size: 0.82rem; color: var(--ink-dim); font-weight: 500; }
.tranche strong { color: var(--orange-deep); font-weight: 700; }
.tranche.conditional { border-style: dashed; opacity: 0.7; }

.warning {
  margin: 0 24px 16px; padding: 14px 16px;
  background: var(--orange-tint); border: 1px solid rgba(224,118,42,0.3);
  border-radius: 12px; color: var(--orange-deep); font-size: 0.9rem; font-weight: 500;
  display: flex; gap: 10px; align-items: flex-start;
}

/* Ineligible */
.ineligible-section { margin-top: 36px; }
.ineligible-card {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 20px; display: flex; align-items: center; gap: 16px; opacity: 0.85; margin-bottom: 10px;
}
.ineligible-card .ic-name { font-family: var(--font-display); font-weight: 600; flex: 1; color: var(--ink); }
.ineligible-card .ic-reason { font-size: 0.84rem; color: var(--ink-mute); font-weight: 500; }
.ineligible-card .ic-swatch { width: 30px; height: 30px; border-radius: 8px; filter: grayscale(0.4); }

.collapse-toggle {
  width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 22px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-display); font-weight: 700; color: var(--ink); box-shadow: var(--shadow-soft);
}
.collapse-toggle .chev { color: var(--ink-mute); transition: transform 0.2s; }
.collapse-toggle.open .chev { transform: rotate(180deg); }

.held-card {
  background: var(--green-tint); border: 1px solid rgba(31,168,119,0.25); border-radius: var(--r-md);
  padding: 18px 22px; display: grid; grid-template-columns: 36px 1fr auto; gap: 16px; align-items: center; margin-bottom: 10px;
}

.disclaimer { margin-top: 60px; padding: 24px; text-align: center; color: var(--ink-mute); font-size: 0.84rem; line-height: 1.6; border-top: 1px solid var(--line); }

.empty-results { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 44px 28px; text-align: center; box-shadow: var(--shadow-soft); }
.empty-results h3 { margin-bottom: 10px; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.empty-results p { color: var(--ink-dim); margin: 0; }

/* Hero decoration */
.hero-decor {
  position: absolute; top: -40px; right: -30px; width: 200px; height: 200px;
  background: radial-gradient(circle, var(--purple) 0%, transparent 65%);
  opacity: 0.12; filter: blur(50px); pointer-events: none; border-radius: 50%;
}

/* Tags */
.tag {
  display: inline-block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 7px; background: var(--surface-3); color: var(--ink-dim); font-weight: 600;
}
.tag.mint { background: var(--green-tint); color: var(--green); }
.tag.coral { background: var(--orange-tint); color: var(--orange-deep); }
.tag.yellow { background: #FBEFD0; color: var(--amber); }

/* Method note */
.method-note {
  background: var(--indigo); color: var(--cream); border-radius: var(--r-md);
  padding: 20px 24px; margin-bottom: 28px; font-size: 0.95rem; line-height: 1.55; box-shadow: var(--shadow-card);
}
.method-note summary {
  cursor: pointer; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.method-note summary::-webkit-details-marker { display: none; }
.method-note summary::after { content: '+'; color: var(--orange); font-size: 1.4rem; font-weight: 600; }
.method-note[open] summary::after { content: '−'; }
.method-note .method-body { padding-top: 14px; color: rgba(246,241,255,0.85); }
.method-note ul { margin: 8px 0 0; padding-left: 18px; }
.method-note li { margin-bottom: 6px; }
.method-note code { font-family: var(--font-mono); background: rgba(255,255,255,0.10); padding: 2px 7px; border-radius: 5px; font-size: 0.85em; color: var(--orange); }
.method-note strong { color: #fff; }
.method-note em { color: var(--orange); font-style: normal; font-weight: 600; }

/* ─── Info tooltip ───────────────────────────────────────── */
.stat-label { position: relative; }
.infotip { position: relative; display: inline-flex; vertical-align: middle; margin-left: 6px; cursor: help; }
.infotip-icon {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--ink-mute); color: #fff;
  font-size: 0.62rem; font-weight: 700; font-style: italic;
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; transition: background 0.15s;
}
.infotip:hover .infotip-icon, .infotip:focus .infotip-icon { background: var(--purple); }
.infotip-bubble {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(4px);
  width: 268px; max-width: 78vw;
  background: var(--indigo); color: var(--cream);
  font-size: 0.78rem; line-height: 1.5; font-weight: 400;
  text-transform: none; letter-spacing: 0;
  padding: 12px 14px; border-radius: 12px;
  box-shadow: 0 18px 40px -16px rgba(40,21,82,0.7);
  opacity: 0; pointer-events: none; transition: opacity 0.16s, transform 0.16s; z-index: 50;
}
.infotip-bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: var(--indigo);
}
.infotip:hover .infotip-bubble, .infotip:focus .infotip-bubble {
  opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto;
}
@media (max-width: 560px) {
  .infotip-bubble { left: auto; right: -8px; transform: translateY(4px); }
  .infotip-bubble::after { left: auto; right: 14px; transform: none; }
  .infotip:hover .infotip-bubble, .infotip:focus .infotip-bubble { transform: translateY(0); }
}

/* ─── Tabbed method/values panel ─────────────────────────── */
.method-note.panel { padding: 0; overflow: hidden; }
.panel-summary {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; background: none; color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; text-align: left;
}
.panel-chev { color: var(--orange); font-size: 1.4rem; font-weight: 600; line-height: 1; }
.panel-body { padding: 0 24px 22px; }
.panel-tabs { display: flex; gap: 6px; margin-bottom: 16px; background: rgba(255,255,255,0.07); padding: 5px; border-radius: 12px; }
.panel-tab {
  flex: 1; padding: 9px 14px; border-radius: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.86rem;
  color: rgba(246,241,255,0.7); transition: all 0.15s;
}
.panel-tab.active { background: var(--orange); color: #fff; }
.panel-tab:not(.active):hover { color: #fff; }

/* ─── Point-value editor ─────────────────────────────────── */
.cpp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 4px; }
@media (max-width: 560px) { .cpp-grid { grid-template-columns: 1fr; } }
.cpp-field { display: flex; flex-direction: column; gap: 7px; }
.cpp-field label {
  font-family: var(--font-display); font-weight: 600; font-size: 0.88rem; color: #fff;
  display: flex; flex-direction: column; gap: 1px;
}
.cpp-field .cpp-hint { font-family: var(--font-body); font-weight: 400; font-size: 0.74rem; color: rgba(246,241,255,0.55); }
.cpp-input {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08); border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 11px; padding: 4px 12px 4px 4px; transition: border-color 0.15s;
}
.cpp-input:focus-within { border-color: var(--orange); }
.cpp-input input {
  flex: 1; min-width: 0; background: #fff; color: var(--ink);
  border: none; border-radius: 8px; padding: 10px 12px;
  font-family: var(--font-mono); font-size: 0.95rem; font-weight: 500;
}
.cpp-input .cpp-unit { color: rgba(246,241,255,0.7); font-size: 0.82rem; font-family: var(--font-mono); white-space: nowrap; }
.cpp-actions { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.cpp-actions .link-btn { color: var(--orange); }

/* ─── Persistent "not financial advice" bar ───────────────── */
.disclaimer-bar {
  margin-top: 44px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ink-dim);
  text-align: center;
}
.disclaimer-bar strong { color: var(--ink); font-weight: 700; }
.modal-disclaimer { margin: 14px 0 0; text-align: center; font-size: 0.74rem; color: var(--ink-mute); }

/* ─── Logo button (dashboard back-to-calc) ───────────────── */
.logo-btn { background: none; border: none; padding: 0; cursor: pointer; }

/* ─── Save-to-account CTA ────────────────────────────────── */
.save-cta {
  margin-top: 22px;
  background: linear-gradient(120deg, var(--purple) 0%, var(--purple-soft) 100%);
  color: #fff; border-radius: var(--r-lg);
  padding: 26px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  box-shadow: var(--shadow-card); flex-wrap: wrap;
}
.save-cta .save-cta-text h3 { color: #fff; font-size: 1.25rem; margin-bottom: 4px; }
.save-cta .save-cta-text p { margin: 0; color: rgba(255,255,255,0.85); font-size: 0.95rem; max-width: 48ch; }
.save-cta .btn-primary { background: #fff; color: var(--purple); box-shadow: none; }
.save-cta .btn-primary:hover { background: var(--orange); color: #fff; }
.save-cta.saved { background: var(--green-tint); color: var(--ink); box-shadow: var(--shadow-soft); }
.save-cta.saved .save-cta-text h3 { color: var(--green); }
.save-cta.saved .save-cta-text p { color: var(--ink-dim); }

/* ─── Auth modal ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(22,16,31,0.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeUp 0.2s ease;
}
.modal {
  position: relative; width: 100%; max-width: 440px;
  background: var(--surface); border-radius: var(--r-lg);
  padding: 34px 32px 28px; box-shadow: 0 30px 70px -20px rgba(40,21,82,0.6);
}
.modal-close {
  position: absolute; top: 16px; right: 18px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-3); color: var(--ink-dim);
  font-size: 1.4rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--rose); color: #fff; }
.modal-head { margin-bottom: 22px; }
.modal-head h2 { font-size: 1.6rem; }
.modal-head p { margin: 8px 0 0; color: var(--ink-dim); font-size: 0.95rem; }
.modal-note {
  background: var(--orange-tint); color: var(--orange-deep);
  border-radius: 12px; padding: 12px 14px; font-size: 0.85rem; margin-bottom: 18px;
}
.modal-note code { font-family: var(--font-mono); font-size: 0.82em; }
.modal-error {
  background: rgba(229,71,111,0.10); color: var(--rose);
  border-radius: 10px; padding: 11px 14px; font-size: 0.88rem; margin: 4px 0 12px; font-weight: 500;
}
.modal-info {
  background: var(--green-tint); color: var(--green);
  border-radius: 10px; padding: 11px 14px; font-size: 0.88rem; margin: 4px 0 12px; font-weight: 500;
}
.modal-foot {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 0.9rem; color: var(--ink-dim);
}
.link-btn { color: var(--purple); font-weight: 600; font-family: var(--font-body); font-size: 0.9rem; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* ─── Dashboard table ────────────────────────────────────── */
.dash-table {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--shadow-soft);
}
.dash-row {
  display: grid; grid-template-columns: 1.1fr 1.6fr 0.9fr 0.9fr 1.1fr;
  gap: 12px; padding: 14px 20px; align-items: center; font-size: 0.92rem;
  border-top: 1px solid var(--line);
}
.dash-row:first-child { border-top: none; }
.dash-row.dash-head {
  background: var(--surface-3); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-mute); font-weight: 700;
}
.dash-row span:nth-child(2) { font-weight: 600; color: var(--ink); }
@media (max-width: 640px) {
  .dash-row { grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .dash-row.dash-head { display: none; }
  .dash-row span:nth-child(2) { grid-column: 1 / -1; }
}
