:root {
  --bg: #f4f5ef;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --line: #dbe2d6;
  --ink: #1a241b;
  --muted: #5e6d63;
  --brand: #2f5f72;
  --brand-2: #c76b53;
  --green: #3a7557;
  --gold: #b78d4c;
  --shadow: 0 12px 28px rgba(24, 38, 31, 0.08);
  --radius: 18px;
  --card-radius: 12px;
  --lock: #c4a15a;
}
body.dark {
  --bg: #0b1110;
  --paper: #121a18;
  --panel: #17211e;
  --line: #2a3b35;
  --ink: #eef6f1;
  --muted: #9aada4;
  --brand: #7ec8d6;
  --brand-2: #f2a07e;
  --green: #8cd2a5;
  --gold: #efc578;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
  --lock: #efc578;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: var(--paper);
  overflow: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 700;
}
.brand em { color: var(--brand-2); font-style: normal; }
.kicker {
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin: 8px 0 14px;
}
.nav { display: grid; gap: 6px; }
.nav a, .nav-group > a {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.nav a:hover, .nav-group > a:hover { background: rgba(47, 95, 114, 0.06); }
.nav a.active {
  background: var(--panel);
  border-left: 3px solid var(--brand-2);
  box-shadow: inset 0 0 0 1px rgba(47, 95, 114, 0.12);
}
.nav a.active span, .nav a span { color: var(--brand-2); font-size: .72rem; font-weight: 700; grid-row: 1 / span 2; align-self: center; }
.nav a.active b { color: var(--brand); }
.nav b { font-size: .85rem; font-weight: 700; }
.nav small { color: var(--muted); font-size: .7rem; }
.nav-group {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  background: rgba(47, 95, 114, 0.03);
}
.nav-group + .nav-group { margin-top: 8px; }
.nav-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}
.nav-label b { font-size: .72rem; letter-spacing: .08em; }
.nav a { touch-action: manipulation; }
.nav-affiliate { margin-top: 10px; }
.side-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.side-note.is-pro { color: var(--gold); }
.sandbox-banner {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px dashed var(--gold);
  border-radius: 12px;
  background: rgba(183, 141, 76, 0.12);
  color: var(--ink);
  font-size: .85rem;
}
.sister-promo {
  display: block;
  margin: 16px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: inherit;
}
.sister-promo small {
  display: block;
  color: var(--gold);
  font-size: .64rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}
.sister-promo b {
  display: block;
  margin: 4px 0 6px;
  font-size: .82rem;
}
.sister-promo span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.35;
}
.sister-promo:hover { border-color: var(--brand); }
.sister-card { margin-top: 16px; }
.sister-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}
.auth-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.auth-slot .account-email {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: .72rem;
}
.auth-slot .account-actions { display: flex; flex-wrap: nowrap; gap: 6px; }
.account-box {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  display: grid;
  gap: 8px;
}
.account-email { color: var(--muted); word-break: break-all; }
.account-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.plan-badge.is-free { background: rgba(47, 95, 114, 0.12); color: var(--brand); }
.plan-badge.is-pro { background: rgba(183, 141, 76, 0.18); color: var(--gold); }
.pro-active {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  border: 1px solid rgba(183, 141, 76, 0.45);
  background: rgba(183, 141, 76, 0.16);
  color: var(--gold);
  cursor: pointer;
}
.pro-notice {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 40;
  max-width: min(520px, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(10, 18, 14, 0.16);
  font-size: .85rem;
}
.pro-notice[hidden] { display: none !important; }
.pro-notice[data-kind="warn"] {
  border-color: rgba(183, 141, 76, 0.45);
}
dialog:not([open]) { display: none !important; }
.auth-modal {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: 20px;
}
.perk-title {
  margin: 14px 0 8px;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
}
.pro-checklist {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.pro-checklist li {
  position: relative;
  padding: 0 0 0 22px;
  color: var(--ink);
  font-size: .88rem;
  line-height: 1.35;
}
.pro-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-weight: 700;
}
.auth-modal h3,
.auth-modal .lede,
.auth-modal label {
  letter-spacing: normal;
  word-spacing: normal;
}
.auth-modal::backdrop { background: rgba(10, 18, 14, 0.55); }
.auth-modal .linkish {
  border: 0;
  background: none;
  color: var(--brand);
  padding: 0;
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}
.auth-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.auth-tabs button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
}
.auth-tabs button.active { background: var(--brand); color: #fff; border-color: transparent; }
.auth-form, .auth-form label { display: grid; gap: 8px; }
.auth-actions { display: flex; gap: 8px; margin-top: 10px; }
.main { padding: 0 32px 48px; background: var(--bg); }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 8px;
}
.topbar small { color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-size: .68rem; }
.back-home {
  color: var(--brand);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.back-home:hover { text-decoration: underline; }
.age-field { max-width: 200px; margin-top: 14px; }
.actions { display: flex; align-items: center; gap: 8px; }
.lang-dropdown { position: relative; }
.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 10px;
  padding: 6px 10px;
  min-height: 36px;
}
.lang-current svg, .flag-chip svg { width: 22px; height: 14px; display: block; border-radius: 2px; }
.lang-current span { font-size: .72rem; font-weight: 700; letter-spacing: .06em; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: none;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.lang-dropdown.open .lang-menu { display: grid; gap: 4px; }
.flag-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 8px;
  text-align: left;
}
.flag-chip:hover, .flag-chip.active { background: rgba(47, 95, 114, 0.08); }
.flag-chip small { color: var(--muted); font-size: .72rem; }
.chip {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 9px;
  padding: 7px 10px;
  min-width: 40px;
}
.section { padding-top: 12px; }
.eyebrow {
  color: var(--brand-2);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .68rem;
  font-weight: 700;
}
h1 {
  margin: 12px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: .98;
  letter-spacing: -0.06em;
  font-weight: 500;
}
h1 span { color: var(--brand-2); }
h2 {
  margin: 8px 0 8px;
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  line-height: 1.1;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.04em;
  font-weight: 500;
}
h3 { margin: 0 0 14px; font-size: 1.2rem; }
.lede { color: var(--muted); max-width: 62ch; }
.primary, .secondary, .small {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  transition: transform .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.primary { background: var(--brand); color: white; }
.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.small { padding: 8px 12px; font-size: .82rem; }
.primary:hover, .secondary:hover, .small:hover { transform: translateY(-1px); }
.notice {
  background: rgba(47, 95, 114, 0.06);
  border-left: 4px solid var(--brand);
  padding: 12px 14px;
  color: var(--muted);
  border-radius: 0 12px 12px 0;
  margin: 20px 0;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 400;
  line-height: 1.35;
}
.withdraw-explain { margin-top: 10px; max-width: 72ch; }
label { display: grid; gap: 6px; color: var(--muted); font-size: .82rem; }
input[type="number"], input[type="text"], input[type="month"], input[type="date"], textarea, select {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
}
input.num[readonly] {
  background: rgba(47, 95, 114, 0.06);
  cursor: default;
}
.footer {
  padding: 20px 0 40px;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  letter-spacing: .04em;
  text-transform: none;
  font-size: .78rem;
}
.footer-legal a { color: var(--muted); border-bottom: 1px solid transparent; }
.footer-youtube svg { vertical-align: -2px; }
.footer-legal a:hover, .footer-legal a:focus-visible { color: var(--brand); border-bottom-color: currentColor; }
.footer-contact { text-transform: none; letter-spacing: 0; }
.side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.side-top .brand { margin-bottom: 0; }
.menu-toggle { display: none; }

.compound-lab {
  margin: 8px 0 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(183, 141, 76, 0.14), transparent 34%),
    var(--panel);
  box-shadow: var(--shadow);
}
.compound-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.compound-head h2 { margin-top: 4px; }
.compound-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 22px;
  align-items: start;
}
.compound-controls { display: grid; gap: 12px; }
.compound-total {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.4;
}
.ci-num {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 10px;
}
.compound-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.compound-kpis div {
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.compound-kpis div:first-child {
  border-color: rgba(183, 141, 76, 0.45);
  background: linear-gradient(180deg, rgba(183, 141, 76, 0.12), var(--paper));
}
.compound-kpis small { display: block; color: var(--muted); font-size: .68rem; margin-bottom: 4px; }
.compound-kpis strong { font-size: 1.05rem; letter-spacing: -0.03em; }
.compound-kpis div:first-child strong { font-size: 1.28rem; color: var(--gold); }
.compound-chart { height: 260px; margin-top: 0; }
.compound-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(183, 141, 76, 0.4);
  background: rgba(183, 141, 76, 0.1);
}
.compound-cta p { margin: 6px 0 0; max-width: 62ch; }
.compound-disclaimer {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}
.health-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  padding: 22px 24px;
  margin: 8px 0 16px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 10%, rgba(232, 194, 122, 0.16), transparent 28%),
    linear-gradient(135deg, var(--panel), var(--paper));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.score-ring { position: relative; width: 132px; height: 132px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 10; }
.score-ring .track { stroke: var(--line); }
.score-ring .bar { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.score-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.score-value strong { font-size: 2rem; letter-spacing: -0.04em; line-height: 1; }
.score-value span { color: var(--muted); font-size: .72rem; }
.health-copy h1 { margin-top: 6px; font-size: clamp(2rem, 3.4vw, 3.1rem); }
.health-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.next-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.next-step span { color: var(--muted); max-width: 42ch; }
.invest-cta { margin-top: 14px; }
.invest-cta span { max-width: 54ch; }
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .72rem;
  color: var(--muted);
  background: var(--paper);
}

.focus-stage, .goal-tracker, .quick-scenario, .dash-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.focus-stage {
  padding: 18px 18px 8px;
  margin-bottom: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.focus-stage h2 { margin: 4px 0 8px; font-size: 1.35rem; }
.goal-tracker { padding: 16px 18px 18px; margin-bottom: 16px; }
.goal-tracker.nested {
  display: block;
  margin: 8px -6px 0;
  padding: 14px 12px 12px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: inherit;
}
.goal-tracker.nested:hover .goal-name, .goal-tracker.nested:hover #goalName { color: var(--brand); }
.goal-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.goal-top strong { font-size: 1.15rem; }
.goal-track {
  margin-top: 12px;
  height: 10px;
  border-radius: 999px;
  background: rgba(47, 95, 114, 0.1);
  overflow: hidden;
}
.goal-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transition: width .55s cubic-bezier(.2, .8, .2, 1);
}
.goal-note { margin: 10px 0 0; color: var(--muted); font-size: .82rem; }

.quick-scenario { padding: 16px 18px 18px; margin-bottom: 18px; }
.quick-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: center; }
.slider-row { margin: 12px 0; }
.slider-row label { display: flex; justify-content: space-between; margin-bottom: 6px; }
.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}
.freedom-live {
  padding: 16px;
  border-radius: 12px;
  background: rgba(47, 95, 114, 0.06);
  text-align: center;
}
.freedom-live small { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; }
.freedom-live strong {
  display: block;
  margin: 6px 0 4px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
  transition: transform .25s ease, color .25s ease;
}
.freedom-live.pulse strong { transform: scale(1.04); color: var(--green); }
.freedom-live .secondary { margin-top: 10px; }

.module-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 8px 0 12px; }
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.module-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.module-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact-kpi { font-size: 1.35rem; margin: 6px 0; }
.pro-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.map-grid { align-items: stretch; }
.map-card {
  display: flex;
  flex-direction: column;
  min-height: 228px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.map-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -36px;
  bottom: -48px;
  border-radius: 50%;
  opacity: .22;
  pointer-events: none;
}
.map-plan::after { background: var(--brand); }
.map-withdraw::after { background: var(--gold); }
.map-history::after { background: var(--green); }
.map-card { transition: transform .2s ease, box-shadow .2s ease; }
.map-card:hover { transform: translateY(-2px); }
.map-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  z-index: 1;
}
.map-plan .map-icon { background: rgba(47, 95, 114, 0.12); color: var(--brand); }
.map-withdraw .map-icon { background: rgba(183, 141, 76, 0.16); color: var(--gold); }
.map-history .map-icon { background: rgba(58, 117, 87, 0.14); color: var(--green); }
.map-kpi {
  margin: 8px 0 6px;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  z-index: 1;
}
.map-kpi.is-up { color: var(--green); }
.map-kpi.is-down { color: #c45b4a; }
.map-chip {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: rgba(47, 95, 114, 0.1);
  color: var(--brand);
  z-index: 1;
}
.map-withdraw .map-chip { background: rgba(183, 141, 76, 0.16); color: var(--gold); }
.map-history .map-chip { background: rgba(58, 117, 87, 0.14); color: var(--green); }
.map-track {
  margin-top: auto;
  height: 8px;
  border-radius: 999px;
  background: rgba(47, 95, 114, 0.12);
  overflow: hidden;
  z-index: 1;
}
.map-track span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  border-radius: inherit;
  transition: width .45s ease;
}
.example-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px dashed var(--gold);
  border-radius: 12px;
  background: rgba(183, 141, 76, 0.08);
}
.example-banner[hidden] { display: none; }
.example-banner p { margin: 0; color: var(--muted); font-size: .88rem; }
.hist-last {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 700;
}
.hist-next {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(61, 122, 74, 0.35);
  background: rgba(61, 122, 74, 0.1);
}
.hist-next b { display: block; margin-bottom: 4px; }
.hist-next p { margin: 0; color: var(--muted); font-size: .88rem; }
.hist-money-panel {
  position: relative;
  margin-top: 16px;
}
.hist-money-panel[hidden] { display: none !important; }
.hist-money-panel .lede { margin: 0 0 14px; }
.hist-money-bars { display: grid; gap: 14px; }
.hist-money-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.hist-money-summary::-webkit-details-marker,
.hist-money-summary::marker { display: none; }
.hist-money-summary h3 { margin: 0; }
.hist-money-peek { color: var(--muted); font-size: .82rem; }
.hist-money-peek[hidden] { display: none; }
.hist-fold {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--paper);
}
.hist-money-body { margin-top: 12px; }
.hist-money-panel:not([open]) .hist-money-body { display: none; }
.hist-bar-top .life-del { margin-left: 2px; }
.hist-bar-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: .82rem;
  margin-bottom: 6px;
}
.hist-bar-top span { color: var(--muted); }
.hist-bar-top b { margin-left: auto; font-size: 1.02rem; }
.hist-bar-top em {
  font-style: normal;
  font-weight: 700;
  font-size: .82rem;
}
.hist-bar-top em.is-up { color: var(--green); }
.hist-bar-top em.is-down { color: #c45b4a; }
.hist-bar-top em.is-start { color: var(--muted); font-weight: 600; }
.hist-bar-track {
  height: 12px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.hist-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4e8a68, var(--green));
}
.example-pill {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--gold);
  color: #12211a;
}
.returns-example-wrap { position: relative; }
.example-mark {
  position: absolute;
  inset: 42% auto auto 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  pointer-events: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(183, 141, 76, 0.18);
  z-index: 1;
}
.orchestra-panel { margin-top: 16px; }
.life-orchestra { margin-top: 18px; }
.orchestra-panel .example-banner { margin-top: 16px; }
.orchestra-rail {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 8px;
}
.orch-line {
  width: 36px;
  min-width: 28px;
  align-self: center;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}
.orch-node {
  min-width: 148px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  display: grid;
  gap: 4px;
  position: relative;
}
.orch-node.is-now {
  border-color: var(--brand);
  background: rgba(47, 95, 114, 0.08);
}
.orch-node small { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .64rem; }
.orch-node strong { font-size: .95rem; }
.orch-node b {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 1.15rem;
}
.orch-node b span { font-size: .7rem; font-family: inherit; color: var(--muted); font-weight: 400; }
.orch-shock { color: #c45b4a; font-size: .78rem; }
.orch-node.has-shock .orch-shock {
  font-size: .95rem;
  font-weight: 700;
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
}
.orch-node.has-pace b { color: var(--gold); }
.orch-node .life-del { position: absolute; top: 6px; right: 6px; }
.plan-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.plan-compare article {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.plan-compare .is-live {
  border-color: var(--gold);
  background: rgba(183, 141, 76, 0.1);
}
.plan-compare small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; }
.plan-compare em { display: block; margin-top: 6px; font-style: normal; color: var(--muted); font-size: .78rem; }
.plan-compare b {
  display: block;
  margin: 6px 0 2px;
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 1.35rem;
}
.dash-card {
  display: flex;
  flex-direction: column;
  min-height: 232px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.dash-card .card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-kicker { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.card-kpi { margin: 10px 0 4px; font-size: 1.7rem; letter-spacing: -0.04em; line-height: 1.1; }
.card-sub { color: var(--muted); font-size: .8rem; min-height: 2.4em; }
.spark { width: 100%; height: 42px; margin: 10px 0 14px; }
.spark path { fill: none; stroke: var(--brand); stroke-width: 2; }
.spark .area { fill: rgba(47, 95, 114, 0.12); stroke: none; }
body.dark .spark .area { fill: rgba(126, 200, 214, 0.12); }
.bar-mini { height: 8px; border-radius: 999px; background: rgba(47, 95, 114, 0.12); overflow: hidden; margin: 12px 0 16px; }
.bar-mini span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badge {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-basic { background: rgba(47, 95, 114, 0.1); color: var(--brand); }
.badge-pro { background: rgba(183, 141, 76, 0.16); color: var(--gold); }
.dash-card.compact { min-height: 0; }
.dash-card.compact .card-sub { min-height: 0; margin-bottom: 12px; }
.link-card { color: inherit; }
.link-card strong { display: block; margin: 8px 0 6px; font-size: 1.05rem; }
.dash-card.locked { opacity: .92; }
.dash-card.locked .card-kpi, .dash-card.locked .spark, .dash-card.locked .bar-mini { filter: blur(3px); }
.lock-badge {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--lock);
  padding: 2px;
}
.lock-badge svg { display: block; }
.lock-tip {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 5;
  width: max-content;
  max-width: 200px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: .72rem;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
}
.lock-badge:hover .lock-tip, .lock-badge:focus-visible .lock-tip, .lock-badge.open .lock-tip {
  opacity: 1;
  transform: none;
}

.legal-modal, .pro-modal {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pro-modal { width: min(420px, calc(100vw - 32px)); padding: 22px; text-align: center; }
.legal-modal[open], .pro-modal[open] { display: flex; flex-direction: column; }
.legal-modal::backdrop, .pro-modal::backdrop { background: rgba(10, 18, 14, 0.55); }
.legal-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.legal-modal-head h2 { margin: 0; }
.legal-close {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 9px;
  width: 36px;
  height: 36px;
  font-size: 1.3rem;
  line-height: 1;
}
.legal-modal-body { padding: 8px 24px 24px; overflow-y: auto; font-size: .92rem; }
.legal-modal-body h3 { margin: 22px 0 8px; font-size: 1rem; }
.legal-modal-body p, .legal-modal-body li { color: var(--muted); }
.legal-modal-body strong { color: var(--ink); }
.legal-modal-body a { color: var(--brand); text-decoration: underline; }
.legal-modal-body ul { padding-left: 20px; }
.legal-modal-body code { font-size: .85em; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.legal-updated { font-size: .78rem; margin-bottom: 0; }
.legal-owner { list-style: none; padding-left: 0 !important; }
.legal-disclaimer {
  padding: 4px 14px;
  border-left: 4px solid var(--brand-2);
  background: rgba(199, 107, 83, 0.08);
  border-radius: 0 12px 12px 0;
}
.disclaimer-box {
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 4px solid var(--brand-2);
  background: rgba(199, 107, 83, 0.06);
  color: var(--muted);
  border-radius: 0 12px 12px 0;
}
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.metric small { color: var(--muted); }
.metric b { display: block; font-size: 1.3rem; }
.asset-row, .ath-row { display: grid; grid-template-columns: 16px 1fr 1fr 110px 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.mix-cols {
  display: grid;
  grid-template-columns: 16px 1fr 1fr 110px 40px;
  gap: 8px;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pct-wrap {
  position: relative;
  display: block;
}
.pct-wrap input {
  width: 100%;
  padding-right: 28px;
}
.pct-wrap .pct-suffix {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-weight: 700;
}
.mix-total {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: .82rem;
}
.mix-total.is-off { color: #c76b53; }
.mix-total.is-ok { color: var(--green); }
.swatch { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.mix-visual { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; margin: 12px 0 18px; }
.pie { width: 180px; height: 180px; }
.mix-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mix-legend li { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; font-size: .82rem; }
.mix-legend small { color: var(--muted); }
.returns-table th, .returns-table td { text-align: right; white-space: nowrap; }
.returns-table th:first-child, .returns-table td:first-child, .returns-table .asset-name { text-align: left; }
.returns-table .is-up { color: var(--green); font-weight: 700; background: rgba(58, 117, 87, 0.1); }
.returns-table .is-down { color: #c45b4a; font-weight: 700; background: rgba(196, 91, 74, 0.1); }
.returns-table .ret-empty { color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; font-size: .82rem; }
th { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; }
.life-line {
  display: grid;
  gap: 0;
  margin: 18px 0 8px;
  position: relative;
}
.life-progress { margin-bottom: 18px; }
.life-progress-top { display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: 8px; }
.life-del {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  align-self: start;
}
.life-node {
  display: grid;
  grid-template-columns: 40px 1fr 24px;
  gap: 14px;
  padding-bottom: 22px;
  position: relative;
}
.life-node::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.life-node:last-child::before { display: none; }
.life-dot {
  min-width: 36px;
  height: 28px;
  padding: 0 5px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--panel);
  display: grid;
  place-items: center;
  font-size: .58rem;
  font-weight: 700;
  z-index: 1;
}
.life-node.is-done .life-dot { background: var(--green); border-color: var(--green); color: #12211a; }
.life-node.is-current .life-dot { background: var(--gold); border-color: var(--gold); color: #12211a; }
.life-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.life-meta small { color: var(--muted); }
.chart-box { width: 100%; height: 280px; margin-top: 16px; color: var(--muted); }
.chart-box svg { width: 100%; height: 100%; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: .78rem; color: var(--muted); }
.chart-legend .leg::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
  background: var(--brand);
}
.chart-legend .leg.gold::before { background: var(--gold); }
.chart-legend .leg.goal::before { background: #3d7a4a; }
.chart-legend .leg.down::before { background: #c76b53; }
.mc-table-wrap { margin-top: 22px; }
.mc-table-wrap .lede { margin: 0 0 12px; }
.mc-table-scroll { overflow: auto; }
.mc-year-table th, .mc-year-table td { white-space: nowrap; }
.mc-year-note { white-space: normal; min-width: 220px; color: var(--muted); font-weight: 500; }
.mc-year-foot th, .mc-year-foot td { border-top: 1px solid var(--line); font-weight: 700; }
.lab-lock {
  position: relative;
  overflow: hidden;
}
.lab-lock.is-locked .lab-controls { filter: grayscale(.2); pointer-events: none; user-select: none; }
.lab-watermark {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  pointer-events: none;
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(239, 197, 120, 0.22);
  transform: rotate(-12deg);
}
.lab-lock.is-locked .lab-watermark { display: grid; }
.lab-lock.is-locked { cursor: pointer; }
.crisis-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}
.crisis-picks button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: .82rem;
}
.crisis-picks button.is-on {
  border-color: var(--brand);
  background: rgba(47, 95, 114, 0.1);
  font-weight: 700;
}
.crisis-picks button { transition: background .2s, border-color .2s, transform .2s; }
.crisis-picks button b { font-weight: 800; }
.crisis-picks button.is-on { transform: translateY(-1px); }
.crisis-src { margin: -6px 0 12px; font-size: .74rem; color: var(--muted); }
.crisis-custom { grid-template-columns: repeat(3, minmax(0, 1fr)); opacity: .6; transition: opacity .2s; }
.crisis-custom.is-on { opacity: 1; }
#mSale b { color: #2f8f46; }
#mLost b { color: #c0392b; }

@media (max-width: 1100px) {
  .module-grid, .module-grid-3, .module-grid-2, .pro-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .mix-visual { grid-template-columns: 1fr; justify-items: center; }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
  }
  .side .kicker,
  .side .nav,
  .side .side-note,
  .side .sister-promo { display: none; }
  .side.is-open .kicker,
  .side.is-open .side-note,
  .side.is-open .sister-promo { display: block; }
  .side.is-open .nav { display: grid; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 72px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    color: var(--ink);
    font-weight: 700;
  }
  .nav a, .nav-group > a { min-height: 44px; align-items: center; }
  .nav.nav-grouped, .nav { grid-template-columns: 1fr; }
  .main { padding: 0 16px 36px; }
  .topbar { padding-top: 12px; gap: 10px; }
  .actions { flex-wrap: wrap; justify-content: flex-end; }
  .health-hero, .quick-grid, .grid2, .formgrid, .metrics, .compound-grid, .compound-kpis, .compound-cta { grid-template-columns: 1fr; }
  .compound-cta { flex-direction: column; align-items: flex-start; }
  .module-grid, .module-grid-3, .module-grid-2, .pro-strip, .plan-compare { grid-template-columns: 1fr; }
  .next-step { flex-direction: column; align-items: flex-start; }
  .auth-slot { border-left: 0; padding-left: 0; margin-left: 0; flex-wrap: wrap; }
  .chart-box { height: 220px; }
  input, select, textarea { font-size: 16px; }
}
@media (max-width: 560px) {
  .topbar { align-items: flex-start; }
  .topbar small { display: none; }
  .lang-current { min-height: 44px; }
  #themeToggle { min-height: 44px; min-width: 44px; }
  .auth-slot .primary,
  .auth-slot .pro-active { min-height: 44px; }
  .mix-cols { display: none; }
  .asset-row, .ath-row { grid-template-columns: 16px 1fr 72px 36px; }
  .asset-row input[data-field="1"] { grid-column: 2 / -2; }
}

.info-i {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  vertical-align: 2px;
  cursor: default;
  user-select: none;
}
.info-i .info-bubble {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 8;
  width: min(240px, 70vw);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.4;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.info-i:hover .info-bubble,
.info-i:focus .info-bubble,
.info-i:focus-within .info-bubble {
  display: block;
}

/* Hide Netlify "Powered by" / "Desarrollado por" badge and injected widgets */
iframe[src*="netlify"],
iframe[src*="app.netlify.com"],
iframe[title*="Netlify" i],
iframe[title*="netlify"],
#netlify-identity-widget,
#netlify-identity-widget-container,
[class*="netlify-badge"],
[id*="netlify-badge"],
[class*="nf-badge"],
a[href="https://www.netlify.com"],
a[href="https://www.netlify.com/"],
a[href="https://netlify.com"],
a[href="https://netlify.com/"],
a[href^="https://www.netlify.com"][target],
img[alt*="Netlify" i],
img[alt*="Desarrollado por Netlify" i],
img[alt*="Powered by Netlify" i],
img[alt*="Deploys by Netlify" i],
img[src*="netlify.com/img/global/badges"],
img[src*="netlify.com/v3/img/"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* ---- Layout hardening (mobile overflow, focus, motion) ---- */
.shell, .main, .section, .panel, .formgrid > *, .grid2 > *, .compound-grid > *, .module-grid > * { min-width: 0; }
input, select, textarea { max-width: 100%; min-width: 0; }
.panel table, .table-wrap { max-width: 100%; }
.panel:has(table) { overflow-x: auto; }
@media (max-width: 980px) {
  .formgrid, .grid2, .metrics, .compound-grid, .compound-kpis { grid-template-columns: minmax(0, 1fr); }
  .main { overflow-x: clip; }
  button, .chip, .primary.small, .secondary.small { min-height: 44px; }
}
:focus-visible { outline: 3px solid var(--gold, #d2a032); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---- Home lab: examples, split bar, guide bubble, levers, welcome strip ---- */
.scenario-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin: 0 0 16px; }
.scenario-label { align-self: center; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.scenario-chip {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left;
  padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  transition: transform .15s ease, border-color .15s ease, background .15s ease; min-height: 44px;
}
.scenario-chip > span { grid-row: 1 / 3; font-size: 1.5rem; line-height: 1; }
.scenario-chip b { font-size: .86rem; }
.scenario-chip small { color: var(--muted); font-size: .68rem; max-width: 17ch; line-height: 1.25; }
.scenario-chip:hover { transform: translateY(-2px); border-color: var(--gold); }
.scenario-chip.is-active { border-color: var(--gold); background: rgba(183, 141, 76, .16); box-shadow: 0 0 0 2px rgba(183, 141, 76, .25); }
.mode-switch { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: .82rem; color: var(--muted); cursor: pointer; min-height: 44px; }
.mode-switch input { width: 18px; height: 18px; accent-color: var(--gold); }

.split-bar { margin: 0 0 12px; }
.split-track { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line); }
.split-you { background: var(--brand); transition: width .4s ease; }
.split-growth { background: var(--gold); transition: width .4s ease; }
.split-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.split-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.split-legend .you i { background: var(--brand); }
.split-legend .growth i { background: var(--gold); }

.guide { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); }
.guide img { flex: 0 0 44px; width: 44px; height: auto; }
.guide p { margin: 0; font-size: .88rem; line-height: 1.5; }

.lever-panel { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.lever-panel h3 { margin: 0 0 4px; }
.lever-panel .lede { margin: 0 0 12px; }
.lever-rows { display: grid; gap: 10px; }
.lever-row { display: grid; grid-template-columns: minmax(150px, 220px) 1fr auto; gap: 12px; align-items: center; }
.lever-name { font-size: .86rem; font-weight: 700; display: grid; gap: 2px; }
.lever-name small { font-weight: 600; font-size: .66rem; letter-spacing: .04em; text-transform: uppercase; color: var(--green); }
.lever-name small.market { color: var(--brand-2); }
.lever-track { height: 14px; background: var(--line); border-radius: 999px; overflow: hidden; }
.lever-track span { display: block; height: 100%; border-radius: 999px; background: #8a97a8; transition: width .4s ease; }
.lever-row.is-best .lever-track span { background: var(--gold); }
.lever-val { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 6.5ch; text-align: right; }
.lever-best { margin: 12px 0 0; font-size: .86rem; color: var(--muted); }
@media (max-width: 720px) {
  .lever-row { grid-template-columns: 1fr auto; }
  .lever-track { grid-column: 1 / -1; order: 3; }
  .scenario-chip small { display: none; }
  .scenario-chip { grid-template-rows: auto; }
  .scenario-chip > span { grid-row: auto; }
}

.welcome-strip { display: flex; gap: 14px; align-items: center; margin: 4px 0 16px; padding: 12px 16px; border-radius: 18px; border: 1px solid rgba(183, 141, 76, .4); background: rgba(183, 141, 76, .1); }
.welcome-strip[hidden] { display: none; }
.welcome-strip img { flex: 0 0 52px; width: 52px; height: auto; }
.welcome-copy { flex: 1; min-width: 0; }
.welcome-copy ol { margin: 6px 0 0; padding-left: 20px; font-size: .86rem; color: var(--muted); display: grid; gap: 2px; }
@media (max-width: 560px) { .welcome-strip { flex-wrap: wrap; } .welcome-strip img { display: none; } }

.share-btn { margin-left: auto; border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 14px; font-size: .8rem; min-height: 44px; }
.share-btn:hover { border-color: var(--gold); color: var(--ink); }
.share-btn + .mode-switch { margin-left: 8px; }
#ciChart { touch-action: pan-y; }

/* ---- Compound switch + toolbar ---- */
.scenario-row { align-items: center; }
.toolbar-spacer { flex: 1; }
.scenario-row .share-btn, .scenario-row .share-btn + .mode-switch { margin-left: 0; }
.mode-switch { margin-left: 0; color: var(--ink); font-weight: 600; gap: 10px; }
.mode-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { position: relative; flex: 0 0 42px; width: 42px; height: 24px; border-radius: 999px; background: var(--line); transition: background .2s ease; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s ease; }
.mode-switch input:checked + .switch-ui { background: var(--gold); }
.mode-switch input:checked + .switch-ui::after { transform: translateX(18px); }
.mode-switch input:focus-visible + .switch-ui { outline: 3px solid var(--gold); outline-offset: 2px; }
details.lever-panel > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
details.lever-panel > summary::-webkit-details-marker { display: none; }
details.lever-panel > summary::before { content: "▸"; color: var(--gold); transition: transform .2s ease; }
details.lever-panel[open] > summary::before { transform: rotate(90deg); }
details.lever-panel > summary h3 { margin: 0; }
details.lever-panel[open] > summary { margin-bottom: 8px; }

/* ---- Portfolio: monthly plan by piece ---- */
.plan-split { margin: 6px 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.plan-split h4 { margin: 0 0 2px; }
.plan-split .lede { margin: 0 0 10px; }
.plan-row { display: grid; grid-template-columns: 16px minmax(90px, 1.2fr) 2fr auto auto; gap: 12px; align-items: center; padding: 6px 0; }
.plan-name { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.plan-bar i { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.plan-amt { display: grid; text-align: right; font-variant-numeric: tabular-nums; min-width: 7ch; }
.plan-amt strong { font-size: .92rem; }
.plan-amt small { color: var(--muted); font-size: .66rem; }
@media (max-width: 720px) { .plan-row { grid-template-columns: 16px 1fr auto auto; } .plan-bar { grid-column: 2 / -1; grid-row: 2; } }

/* ---- Currency selector ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ccy-box { display: inline-flex; align-items: center; }
.ccy-select { min-height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); padding: 6px 10px; font-weight: 700; font-size: .82rem; cursor: pointer; }

/* ---- Portfolio positions ---- */
.data-notice { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; padding: 10px 14px; border: 1px solid rgba(199, 107, 83, .4); background: rgba(199, 107, 83, .08); border-radius: 14px; font-size: .84rem; }
.data-notice p { margin: 0; flex: 1 1 280px; color: var(--ink); }
.pending-box { margin: 0 0 14px; padding: 12px 14px; border: 1px solid rgba(183, 141, 76, .5); background: rgba(183, 141, 76, .12); border-radius: 14px; display: grid; gap: 8px; }
.pending-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.pending-q { color: var(--muted); font-size: .84rem; }
.pos-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 10px; }
.alloc-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line); margin-bottom: 10px; }
.alloc-bar span { display: block; height: 100%; }
.pos-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 8px; }
.pos-asof, .pos-note, .pos-warn { color: var(--muted); font-size: .8rem; }
.pos-list { display: grid; gap: 12px; margin: 10px 0 14px; }
.pos-card { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: var(--paper); }
.pos-card > header { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; }
.pos-title { display: grid; min-width: 0; }
.pos-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-title small, .pos-stats small, .pos-value small { color: var(--muted); font-size: .72rem; }
.pos-value { text-align: right; display: grid; }
.pos-value b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.is-up { color: var(--green); }
.is-down { color: var(--brand-2); }
.pos-price { margin: 8px 0; font-size: .86rem; color: var(--muted); }
.pos-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.pos-stats span { display: grid; }
.pos-stats b { font-variant-numeric: tabular-nums; font-size: .92rem; }
.pos-lots, .pos-more { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.pos-lots > summary, .pos-more > summary { cursor: pointer; font-weight: 700; font-size: .84rem; }
.lot-form, .plan-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin-top: 10px; }
.lot-form label, .plan-form label, .pos-manual { display: grid; gap: 4px; font-size: .74rem; color: var(--muted); }
.lot-form input, .plan-form input, .pos-manual input { max-width: 160px; }
.pos-more .linkish { margin: 10px 14px 0 0; }
.linkish.danger { color: var(--brand-2); }
.pos-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.pos-add-field { flex: 1 1 280px; display: grid; gap: 4px; font-size: .8rem; color: var(--muted); }
.pos-add-ccy { display: grid; gap: 4px; font-size: .8rem; color: var(--muted); }
.dd-bar { display: block; width: 90px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dd-bar i { display: block; height: 100%; background: var(--brand-2); }
@media (max-width: 720px) { .pos-summary { grid-template-columns: 1fr; } .pos-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.linkish { background: none; border: 0; padding: 4px 0; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; }

/* ---- Life plan: chart, summary, impacts, templates ---- */
.life-chart-box { margin-bottom: 16px; }
.how-strip { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; margin-bottom: 14px; border-radius: 14px; background: rgba(183, 141, 76, .1); border: 1px solid rgba(183, 141, 76, .35); }
.how-strip img { flex: 0 0 44px; width: 44px; height: auto; }
.how-strip ol { margin: 4px 0 0; padding-left: 20px; font-size: .84rem; color: var(--muted); display: grid; gap: 2px; }
.life-chart-box h3 { margin: 0 0 10px; }
.life-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.sum-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); display: grid; gap: 2px; }
.sum-card small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.sum-card b { font-size: 1.1rem; }
.sum-card.is-plan { border-color: rgba(183, 141, 76, .55); background: linear-gradient(180deg, rgba(183, 141, 76, .12), var(--paper)); }
.sum-diff { font-size: .8rem; color: var(--brand-2); font-weight: 700; }
.sum-biggest { grid-column: 1 / -1; margin: 0; font-size: .84rem; color: var(--muted); }
.life-chart { height: 340px; margin-top: 0; }
.leg.steady::before { background: #8a97a8; }
.life-whatif { margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 14px; }
.life-whatif label { display: grid; gap: 8px; font-weight: 700; font-size: .88rem; }
.life-whatif input[type=range] { width: 100%; }
.life-whatif p { margin: 6px 0 0; }
.life-chip, .orch-impact { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.life-chip.ok, .orch-impact.ok { background: rgba(58, 117, 87, .15); color: var(--green); }
.life-chip.late, .orch-impact.late { background: rgba(199, 107, 83, .15); color: var(--brand-2); }
.orch-impact.none { background: var(--line); color: var(--muted); }
.tpl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.tpl-label { color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tpl-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: .84rem; min-height: 36px; }
.tpl-chip:hover { border-color: var(--gold); }
@media (max-width: 720px) { .life-summary { grid-template-columns: 1fr; } .life-chart { height: 260px; } }
.leg.whatif::before { background: var(--brand); }
.life-whatif input[type=range] { accent-color: var(--gold); }

/* ---- History visual layer ---- */
.hv-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hv-head h3 { margin: 0; }
.seg { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.seg-label { font-size: .72rem; color: var(--muted); padding: 0 8px 0 10px; }
.seg button { border: 0; background: transparent; color: var(--ink); border-radius: 999px; padding: 6px 14px; min-height: 32px; font-weight: 700; }
.seg button.on { background: var(--gold); color: #1a241b; }
.hv-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.hv-kpi { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.hv-kpi small { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }
.hv-kpi b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.hv-kpi span { color: var(--muted); font-size: .76rem; }
.hv-kpi.up b { color: var(--green); }
.hv-kpi.down b { color: var(--brand-2); }
.hist-viz h4 { margin: 14px 0 4px; font-size: .88rem; }
.hist-viz h4 small { color: var(--muted); font-weight: 400; }
.hv-chart svg, .hv-bars svg { width: 100%; height: auto; color: var(--muted); display: block; }
.hv-note { margin: 6px 0 0; font-size: .78rem; }
@media (max-width: 900px) { .hv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- ATH zones ---- */
.dd-meter { display: block; width: 86px; height: 6px; margin-top: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dd-meter i { display: block; height: 100%; border-radius: 999px; }
.zone-chip { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: .66rem; font-weight: 700; }
.z-ok { background: rgba(58, 117, 87, .18); color: var(--green); }
.z-dip { background: rgba(183, 141, 76, .22); color: #8a6a2c; }
.z-bear { background: rgba(199, 107, 83, .2); color: var(--brand-2); }
i.z-ok { background: var(--green); }
i.z-dip { background: var(--gold); }
i.z-bear { background: var(--brand-2); }

/* ---- Withdrawal meter, crisis comparison, lab odds ---- */
.inline-range { width: 100%; margin: 6px 0 0; accent-color: var(--gold); }
.freedom-meter { margin: 16px 0 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.freedom-meter h4 { margin: 0 0 10px; }
.fm-bar { position: relative; height: 22px; border-radius: 999px; background: var(--line); overflow: hidden; }
.fm-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--gold)); transition: width .4s ease; min-width: 4px; }
.fm-bar b { position: absolute; inset: 0; display: grid; place-items: center; font-size: .78rem; color: var(--ink); mix-blend-mode: normal; }
.fm-line { margin: 8px 0 12px; font-size: .88rem; color: var(--muted); }
.fm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fm-cards article { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); display: grid; gap: 2px; }
.fm-cards small { color: var(--muted); font-size: .7rem; }
.fm-cards b { font-size: 1.15rem; }
.fm-cards b em { font-style: normal; font-weight: 400; font-size: .8rem; color: var(--muted); }
.fm-cards span { font-size: .76rem; color: var(--muted); }
.fm-cards .good { border-color: rgba(58, 117, 87, .5); }
.fm-cards .bad { border-color: rgba(199, 107, 83, .5); }
.fm-cards .bad b { color: var(--brand-2); }
.fm-cards .good b { color: var(--green); }
.fm-mini { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 6px; }
.fm-mini i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.crisis-compare h3 { margin: 0 0 4px; }
.cc-rows { display: grid; gap: 8px; margin-top: 10px; }
.cc-row { display: grid; grid-template-columns: 56px 110px 130px 1fr 150px; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; }
.cc-row.on { border-color: var(--gold); background: rgba(183, 141, 76, .1); }
.cc-row:hover { border-color: var(--gold); }
.cc-year { font-size: 1.05rem; }
.cc-drop { font-weight: 800; color: var(--brand-2); }
.cc-drop small, .cc-trough small, .cc-rec small { display: block; color: var(--muted); font-weight: 400; font-size: .66rem; }
.cc-bar { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.cc-bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand-2); }
.cc-rec { text-align: right; font-weight: 700; }
@media (max-width: 860px) { .cc-row { grid-template-columns: 50px 1fr 1fr; } .cc-bar { grid-column: 1 / -1; } .cc-rec { text-align: left; } .fm-cards { grid-template-columns: 1fr; } }
.mc-odds { margin: 14px 0 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.mc-odds[hidden] { display: none; }
.mc-odds h4 { margin: 0 0 6px; }
.odds-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.odds-big { font-size: 2.4rem; letter-spacing: -.03em; }
.odds-big.good { color: var(--green); }
.odds-big.bad { color: var(--brand-2); }
.odds-sub { margin: 8px 0 4px; font-size: .78rem; }
.odds-hist { position: relative; padding-top: 20px; }
.odds-hist svg { width: 100%; height: 90px; display: block; }
.odds-hist span { position: absolute; top: 0; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.oh-goal { color: #c0392b; }
.oh-mid { color: var(--brand); top: 12px !important; }
.odds-axis { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); }
/* Range inputs used by the new tools: slim track, round gold thumb */
.inline-range, .life-whatif input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: var(--line); outline-offset: 6px; cursor: pointer; }
.inline-range::-webkit-slider-thumb, .life-whatif input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); border: 3px solid var(--panel); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.inline-range::-moz-range-thumb, .life-whatif input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--gold); border: 3px solid var(--panel); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }

/* ---- Home: today card ---- */
.today-card { margin: 4px 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.today-card[hidden] { display: none; }
.today-card header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.today-card header span { color: var(--muted); font-size: .8rem; }
.td-items { display: flex; flex-wrap: wrap; gap: 10px; }
.td-item { flex: 1 1 200px; display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); align-content: start; }
.td-item small { color: var(--muted); font-size: .8rem; }
.td-item b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.td-item span { font-size: .8rem; font-weight: 700; }
.td-item.warn { border-color: rgba(183, 141, 76, .55); background: rgba(183, 141, 76, .1); }
.td-item .primary { justify-self: start; }

/* ---- CSV import dialog ---- */
.csv-modal { width: min(760px, 94vw); max-height: 90vh; overflow: auto; }
.csv-maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 10px 0; }
.csv-map { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); }
.csv-map select { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); padding: 6px 8px; }
.csv-preview { overflow: auto; max-height: 240px; margin-bottom: 8px; }

/* ---- Touch targets (mobile) and currency toast ---- */
@media (max-width: 980px) {
  input:not([type=range]):not([type=checkbox]):not([type=file]):not([type=hidden]), select { min-height: 44px; }
  .life-del, .tpl-chip, .lock-badge { min-width: 44px; min-height: 44px; }
  .back-home, .footer-contact, .footer-legal a, .linkish { display: inline-block; padding: 12px 8px; }
  .inline-range, .life-whatif input[type=range] { height: 30px; padding: 12px 0; background-clip: content-box; }
  .hist-money-summary { min-height: 44px; }
}
.ccy-toast { position: fixed; right: 16px; bottom: 16px; max-width: min(420px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 14px; background: #1a241b; color: #f4f5ef; font-size: .86rem; box-shadow: 0 12px 28px rgba(0, 0, 0, .3); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 50; }
.ccy-toast.show { opacity: 1; transform: none; }

/* ---- Portfolio mix: donut, rows, sliders ---- */
.pie { width: 190px; height: 190px; color: var(--ink); }
.mix-visual { grid-template-columns: 200px 1fr; }
.mix-legend li { padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.mix-legend li b { font-weight: 700; }
.mix-legend small { font-weight: 800; color: var(--ink); }
.mix-cols { grid-template-columns: 18px minmax(0, 1.2fr) minmax(0, 1.5fr) 104px 36px; padding: 0 12px; }
#assetList .asset-row { grid-template-columns: 18px minmax(0, 1.2fr) minmax(0, 1.5fr) 104px 36px; gap: 6px 10px; padding: 10px 12px 8px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); transition: border-color .15s ease; }
#assetList .asset-row:focus-within { border-color: var(--gold); }
#assetList .asset-row input:not([type=range]) { border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 8px 10px; min-height: 40px; color: var(--ink); transition: background .15s ease, border-color .15s ease; }
#assetList .asset-row input:not([type=range]):hover { background: rgba(120, 130, 125, .09); }
#assetList .asset-row input:not([type=range]):focus { background: var(--panel); border-color: var(--gold); outline: none; }
#assetList .asset-row input[data-field="0"] { font-weight: 700; }
#assetList .asset-row input[data-field="1"] { color: var(--muted); }
#assetList .pct-wrap input { text-align: right; font-weight: 800; padding-right: 26px; background: var(--panel); border-color: var(--line); }
#assetList .asset-row [data-del] { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); line-height: 1; }
#assetList .asset-row [data-del]:hover { color: var(--brand-2); border-color: var(--brand-2); }
.weight-range { grid-column: 2 / 5; -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px; background: var(--line); cursor: pointer; margin: 2px 0 4px; }
.weight-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--c, var(--gold)); border: 3px solid var(--panel); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.weight-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--c, var(--gold)); border: 3px solid var(--panel); }
#addAsset { border-style: dashed; }
@media (max-width: 720px) {
  #assetList .asset-row { grid-template-columns: 18px minmax(0, 1fr) 96px 34px; }
  #assetList .asset-row input[data-field="1"] { grid-column: 2 / 4; }
  .weight-range { grid-column: 2 / 4; }
  .mix-visual { grid-template-columns: 1fr; }
}

/* ---- Modern form fields everywhere (also the typeless inputs that used to show the browser default) ---- */
input:not([type]), input[type="number"], input[type="text"], input[type="email"], input[type="month"], input[type="date"], textarea, select {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  min-height: 44px;
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:not([type]):hover, input[type="number"]:hover, input[type="text"]:hover, input[type="email"]:hover, input[type="month"]:hover, input[type="date"]:hover, textarea:hover, select:hover { border-color: rgba(183, 141, 76, .55); }
input:not([type]):focus, input[type="number"]:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="month"]:focus, input[type="date"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(183, 141, 76, .22);
  background: var(--panel);
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
#assetList .asset-row .pct-wrap input:not([type=range]) { text-align: right; font-weight: 800; padding-right: 28px; background: var(--panel); border-color: var(--line); }
#assetList .asset-row .pct-wrap input:not([type=range]):focus { border-color: var(--gold); }

/* ---- Journey ("Tu ruta") ---- */
.journey-card { margin: 4px 0 16px; padding: 16px 18px; border: 1px solid rgba(183, 141, 76, .45); border-radius: 20px; background: linear-gradient(180deg, rgba(183, 141, 76, .12), var(--panel)); box-shadow: var(--shadow); }
.journey-card.is-min { padding: 6px 12px; background: transparent; border-style: dashed; box-shadow: none; }
.journey-card[hidden] { display: none; }
.journey-card header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.journey-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.jc-count { margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: var(--gold); color: #1a241b; font-size: .78rem; font-weight: 800; }
.jc-links { display: flex; gap: 12px; }
.jc-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 10px 0 12px; }
.jc-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--gold)); transition: width .4s ease; }
.jc-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.jc-steps li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; color: var(--muted); }
.jc-steps li.next { background: var(--panel); border: 1px solid var(--gold); color: var(--ink); }
.jc-steps li.done b { text-decoration: line-through; text-decoration-color: rgba(94, 109, 99, .5); }
.jc-steps li p { margin: 2px 0 0; font-size: .84rem; color: var(--muted); }
.jc-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: #fff; }
.jc-steps li.done .jc-dot { background: var(--green); border-color: var(--green); }
.jc-steps li.next .jc-dot { border-color: var(--gold); }
.jc-ask { display: flex; gap: 14px; align-items: flex-start; }
.jc-ask img { flex: 0 0 46px; width: 46px; height: auto; }
.jc-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 8px; }
.jc-choice { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); min-height: 64px; }
.jc-choice span { grid-row: 1 / 3; font-size: 1.8rem; }
.jc-choice small { color: var(--muted); font-size: .78rem; }
.jc-choice:hover { border-color: var(--gold); transform: translateY(-2px); }
.jc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.journey-pill { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; margin: 10px 0; padding: 8px 12px; border-radius: 14px; border: 1px solid rgba(183, 141, 76, .5); background: rgba(183, 141, 76, .12); color: var(--ink); }
.journey-pill span { grid-row: 1 / 3; align-self: center; }
.journey-pill small { color: var(--muted); font-size: .7rem; line-height: 1.25; }
.nav a.nav-next { position: relative; }
.nav a.nav-next::after { content: ""; position: absolute; top: 10px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(183, 141, 76, .6); animation: navpulse 1.8s ease-out infinite; }
@keyframes navpulse { 70% { box-shadow: 0 0 0 9px rgba(183, 141, 76, 0); } 100% { box-shadow: 0 0 0 0 rgba(183, 141, 76, 0); } }
@media (max-width: 720px) { .jc-choices { grid-template-columns: 1fr; } .jc-steps li { grid-template-columns: 26px 1fr; } .jc-steps li .primary { grid-column: 2; justify-self: start; } .jc-ask img { display: none; } }

/* ---- Video card ---- */
.video-card { display: flex; gap: 14px; align-items: center; margin: 12px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.video-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.vc-play { flex: 0 0 52px; height: 52px; border-radius: 14px; background: #24363f; display: grid; place-items: center; }
.vc-play i { width: 0; height: 0; border-left: 16px solid var(--gold); border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.vc-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.vc-text small { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.vc-text em { font-style: normal; color: var(--muted); font-size: .84rem; }
.vc-cta { color: var(--brand); font-weight: 700; font-size: .84rem; white-space: nowrap; }
@media (max-width: 720px) { .vc-cta { display: none; } }

/* ---- Cloud sync ---- */
.sync-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; }
.sync-btn b { font-size: .8rem; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.sync-btn[data-state=ok] .sync-dot { background: var(--green); }
.sync-btn[data-state=pending] .sync-dot, .sync-btn[data-state=syncing] .sync-dot { background: var(--gold); }
.sync-btn[data-state=conflict] .sync-dot, .sync-btn[data-state=error] .sync-dot { background: var(--brand-2); }
.sync-modal { width: min(460px, 94vw); }
.sync-modal .sync-private { font-size: .78rem; margin-top: 12px; }
@media (max-width: 560px) { .sync-btn b { display: none; } }

/* ---- Bigger Home chart, goal hint, flash ---- */
.compound-visual .compound-chart { height: 360px; }
@media (max-width: 720px) { .compound-visual .compound-chart { height: 250px; } }
.goal-link { display: inline-block; margin-top: 6px; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.flash-field { animation: flashfield 1s ease 2; }
@keyframes flashfield { 0%, 100% { box-shadow: 0 0 0 0 rgba(183, 141, 76, 0); } 50% { box-shadow: 0 0 0 6px rgba(183, 141, 76, .45); } }
.life-goalnote { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: rgba(47, 143, 70, .1); border: 1px solid rgba(47, 143, 70, .3); font-size: .86rem; }
.life-goalnote a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.life-chip.home { background: rgba(47, 143, 70, .15); color: #1f7a37; text-decoration: none; margin-left: 6px; }

.life-basis { display: inline-block; margin-top: 4px; color: var(--muted); font-size: .82rem; }
.plan-line { margin: 2px 0 8px; font-weight: 700; font-size: .9rem; }
.plan-line.is-pro { color: #1f7a37; }
.plan-line { margin: 2px 0 8px; font-weight: 700; font-size: .9rem; }
.plan-line.is-pro { color: #1f7a37; }

.metric-src { display: block; margin-top: 4px; font-size: .74rem; color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

/* Optional newsletter box (Home lab); hidden unless WA_AUTH_CONFIG.newsletter is true */
.news-btn { margin-left: 8px; }
.news-box { margin: 8px 0 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); display: grid; gap: 8px; }
.news-box[hidden] { display: none; }
.news-title { font-size: .95rem; }
.news-row { display: flex; gap: 8px; flex-wrap: wrap; }
.news-email { flex: 1 1 220px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--ink); font: inherit; }
.news-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.news-send { min-height: 44px; padding: 8px 18px; border: 0; border-radius: 12px; background: var(--gold); color: #1b1b1b; font: inherit; font-weight: 600; cursor: pointer; }
.news-send:disabled { opacity: .6; cursor: wait; }
.news-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--muted); line-height: 1.35; }
.news-consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.news-msg { margin: 0; font-size: .85rem; min-height: 1.2em; }
.news-msg.is-ok { color: var(--green, #2f7d4f); }
.news-msg.is-bad { color: #b4472f; }

/* Life plan (plan-vital.html): 4 steps, one list of plans by age */
.lp-panel { margin-bottom: 16px; }
.lp-step { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin: 4px 0 12px; }
.lp-step > span:first-child { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .9rem; }
.lp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.lp-grid label, .lp-goal, .lp-form label { display: grid; gap: 6px; font-size: .86rem; font-weight: 700; }
.lp-goal { max-width: 520px; }
.lp-hint { margin: 6px 0 0; font-size: .82rem; color: var(--muted); max-width: 640px; }
.lp-hint a { color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.lp-form { display: grid; grid-template-columns: 2fr 1fr 1.4fr 1fr auto; gap: 10px; align-items: end; margin: 12px 0; }
.lp-list { display: grid; gap: 8px; margin-top: 12px; }
.lp-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto 36px; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.lp-item.is-expense { border-left: 5px solid #c76b53; }
.lp-item.is-pace { border-left: 5px solid #2f5f72; }
.lp-age { font-weight: 800; color: var(--muted); font-size: .9rem; }
.lp-main { display: grid; gap: 2px; }
.lp-main small { color: var(--muted); }
.lp-short { color: #b5533b !important; font-weight: 700; }
.lp-amt { font-size: 1.15rem; color: #b5533b; white-space: nowrap; }
.lp-amt.pace { color: var(--brand); }
.lp-amt span { font-size: .8rem; font-weight: 600; }
.lp-item .life-chip { margin-top: 0; }
.life-chip.none { background: rgba(120, 120, 120, .12); color: var(--muted); }
.lp-result { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-bottom: 10px; }
.lp-free small { display: block; color: var(--muted); font-weight: 700; }
.lp-free b { font-size: 1.9rem; line-height: 1.15; }
.lp-side { display: grid; gap: 4px; }
.lp-side span { color: var(--muted); font-weight: 700; }
.lp-side em { font-style: normal; font-weight: 800; }
.lp-side em.late { color: #b5533b; }
.lp-side em.ok { color: var(--green); }
@media (max-width: 860px) {
  .lp-grid { grid-template-columns: 1fr 1fr; }
  .lp-form { grid-template-columns: 1fr 1fr; }
  .lp-item { grid-template-columns: 70px minmax(0, 1fr) 36px; }
  .lp-item .lp-amt, .lp-item .life-chip { grid-column: 2 / 3; }
}

/* v2: compact grouped menu without numbers */
.nav-grouped .nav-group a { padding: 8px 12px; }
.nav-grouped .nav-group a b { font-size: .9rem; font-weight: 650; line-height: 1.25; }
.nav-grouped .nav-label b { text-transform: none; letter-spacing: 0; font-size: .78rem; }
.nav-affiliate b { font-size: .9rem; }

/* v2: one control per value (label + editable number on one line, slider underneath) */
.compound-controls .slider-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px; align-items: center; gap: 6px 10px; margin-bottom: 14px; }
.compound-controls .slider-row > label { grid-column: 1; grid-row: 1; margin: 0; }
.compound-controls .slider-row > label > b { display: none; }
.compound-controls .slider-row .ci-num { grid-column: 2; grid-row: 1; height: 38px; text-align: right; font-weight: 700; margin: 0; }
.compound-controls .slider-row input[type=range] { grid-column: 1 / -1; grid-row: 2; margin: 0; }
.compound-controls .slider-row .goal-link { grid-column: 1 / -1; }
.compound-controls .slider-row:has(#ciReserves), #ciTotal { display: none; }
.health-hero[hidden] { display: none !important; }
.nav-grouped .nav-group a, .nav-grouped a.nav-affiliate { display: block !important; }
.map-chip { white-space: nowrap; }
.metric-input { width: 100%; font-size: 1.3rem; font-weight: 800; padding: 4px 8px; margin-top: 4px; }
.thesis-qs label { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 700; }
.thesis-qs textarea { width: 100%; font: inherit; font-weight: 400; }
.data-notice.is-compact { background: transparent; border-style: dashed; padding: 4px 10px; justify-content: flex-end; }
.data-notice.is-compact .small { font-size: .74rem; padding: 4px 10px; }

/* v2: on phones, the result stays visible at the bottom while you edit the numbers */
.v2-sticky { display: none; }
@media (max-width: 720px) {
  .v2-sticky { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 50;
    padding: 10px 16px; border-radius: 14px; background: var(--ink, #1a2024); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
  .v2-sticky small { font-size: .8rem; opacity: .85; }
  .v2-sticky b { font-size: 1.25rem; color: #f0c56e; }
  body { padding-bottom: 70px; }
  .compound-chart { height: 300px !important; }
}
.metric b[hidden] { display: none !important; }

/* v2 portfolio mix: animated donut + interactive cards */
.mix-visual { grid-template-columns: 240px 1fr !important; gap: 28px !important; }
#mixPie { width: 240px; height: 240px; filter: drop-shadow(0 6px 14px rgba(20, 40, 50, .12)); }
.pie-seg { transition: stroke-dasharray .9s cubic-bezier(.25,.8,.25,1), stroke-width .2s, opacity .2s; cursor: pointer; }
.pie-seg:hover { stroke-width: 32; }
.pie-seg.is-dim { opacity: .3; }
.mix-legend { gap: 10px !important; }
.mix-legend li { grid-template-columns: 14px minmax(0, 1fr) auto auto !important; grid-template-rows: auto auto; padding: 10px 14px !important; border-radius: 14px !important; border-left: 5px solid var(--c) !important; transition: transform .15s, box-shadow .15s; cursor: default; }
.mix-legend li .swatch { display: none; }
.mix-legend li b { grid-column: 1 / 3; font-size: .95rem; }
.mix-legend li small { grid-column: 3; font-size: 1.05rem !important; }
.mix-legend li em { grid-column: 4; font-style: normal; color: var(--muted); font-weight: 700; font-size: .85rem; min-width: 90px; text-align: right; }
.mix-legend li .mix-share { grid-column: 1 / -1; display: block; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 4px; }
.mix-legend li .mix-share span { display: block; height: 100%; border-radius: 99px; }
.mix-legend li.is-on { transform: translateX(4px); box-shadow: 0 4px 14px rgba(20, 40, 50, .12); }
@media (max-width: 720px) { .mix-visual { grid-template-columns: 1fr !important; justify-items: center; } .mix-legend { width: 100%; } }

/* v2 portfolio: pieces with "have" and "target", progress bar with target mark */
.v2-piece { display: grid !important; grid-template-columns: 14px minmax(0, 1fr) 150px 110px 34px !important; gap: 6px 12px !important; align-items: end !important; padding: 12px 14px !important; border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 14px; margin-bottom: 10px; background: var(--panel); }
.v2-piece .swatch { display: none; }
.v2-piece .piece-names { grid-column: 1 / 3; display: grid; gap: 4px; }
.v2-piece .piece-names input { font-weight: 700; border: 0; background: transparent; padding: 2px 0; font-size: 1rem; }
.v2-piece .piece-names .piece-why { font-weight: 400; color: var(--muted); font-size: .85rem; }
.v2-piece .piece-field { display: grid; gap: 3px; font-size: .74rem; color: var(--muted); }
.v2-piece .piece-field input { height: 36px; text-align: right; font-weight: 700; width: 100%; }
.v2-piece .pct-wrap { display: flex; align-items: center; gap: 4px; }
.v2-piece button[data-del] { align-self: center; }
.piece-track { grid-column: 1 / -1; position: relative; height: 10px; border-radius: 99px; background: var(--line); margin-top: 4px; }
.piece-now { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--c); transition: width .5s ease; }
.piece-goal { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); transition: left .5s ease; }
.piece-status { grid-column: 1 / -1; font-size: .78rem; font-weight: 700; }
.piece-status.lo { color: #b5533b; }
.piece-status.hi { color: #9a6f2c; }
.piece-status.ok { color: var(--green); }
.pie-wrap { display: grid; justify-items: center; gap: 4px; }
.pie-title { font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; }
.v2-next { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: rgba(183, 141, 76, .06); }
.v2-next h4 { margin: 0 0 4px; font-size: 1.05rem; }
.v2-lots summary { cursor: pointer; display: grid; gap: 4px; }
.v2-lots summary small { color: var(--muted); font-weight: 400; }
.metric-note { display: block; margin-top: 4px; color: var(--muted); font-size: .74rem; }
@media (max-width: 720px) {
  .v2-piece { grid-template-columns: 1fr 1fr 34px !important; }
  .v2-piece .piece-names { grid-column: 1 / -1; }
}

.v2-top { grid-template-columns: 240px minmax(0, 1fr) !important; align-items: start !important; }
.v2-top .v2-next { margin-top: 0; }
.v2-piece { grid-template-columns: minmax(0, 1fr) 150px 110px 34px !important; align-items: center !important; }
.v2-piece .piece-names { grid-column: 1 !important; }
.v2-piece .piece-field input { border: 1px solid var(--line) !important; border-radius: 10px; background: var(--paper); padding: 4px 10px; }
.v2-piece .pct-wrap input { width: 100%; }
@media (max-width: 720px) {
  .v2-top { grid-template-columns: 1fr !important; }
  .v2-piece { grid-template-columns: 1fr 1fr 34px !important; }
}
#mixLegend[hidden] { display: none !important; }

/* v2 returns table (Performance page) */
.v2-ret-wrap { overflow-x: auto; }
.v2-ret { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: .9rem; }
.v2-ret th { text-align: right; font-size: .74rem; color: var(--muted); font-weight: 700; padding: 4px 8px; white-space: nowrap; }
.v2-ret tbody th { text-align: left; color: var(--ink); font-size: .9rem; }
.v2-ret td { text-align: right; padding: 4px 6px; }
.v2-ret tr.is-total th { font-weight: 800; }
.ret-pill { display: inline-block; min-width: 72px; padding: 6px 10px; border-radius: 10px; font-weight: 800; text-align: center; }
.ret-pill.is-up { background: rgba(58, 117, 87, var(--s)); color: #1f5a3b; }
.ret-pill.is-down { background: rgba(199, 107, 83, var(--s)); color: #8c3a24; }
body.dark .ret-pill.is-up { color: #bfe3cd; }
body.dark .ret-pill.is-down { color: #f2c4b6; }
.returns-example-wrap > summary { cursor: pointer; }
.metric-note[hidden] { display: none !important; }

/* v2 exposure: where your money really is */
.v2-piece .piece-type { justify-self: start; margin-top: 2px; font-size: .78rem; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); }
.v2-expo { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.v2-expo h4 { margin: 0 0 4px; font-size: 1.05rem; }
.expo-insight { margin: 0 0 12px; font-weight: 700; color: var(--brand); }
.expo-block { margin-bottom: 12px; }
.expo-block > small { display: block; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; margin-bottom: 6px; }
.expo-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; }
.expo-bar span { display: block; height: 100%; }
.expo-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 8px 0 0; font-size: .82rem; }
.expo-legend li { display: flex; align-items: center; gap: 6px; }
.expo-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.expo-note { margin: 4px 0 0; font-size: .75rem; color: var(--muted); }
.v2-piece .piece-type { height: 30px; }

/* v2: "more options" (fees, today's money) folded under the lab inputs */
.v2-more { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
.v2-more summary { cursor: pointer; font-weight: 700; color: var(--brand); font-size: .9rem; }
.v2-more-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px; align-items: center; gap: 10px; margin-top: 10px; font-size: .9rem; }
.v2-more-row .ci-num { height: 38px; text-align: right; font-weight: 700; }
.v2-more .field-hint { display: block; margin: 4px 0 10px; }
.v2-more-switch { margin-top: 6px; }
.v2-fee-note { display: grid; gap: 4px; margin: 4px 0 8px; font-size: .86rem; font-weight: 700; }
.v2-fee-note span:first-child { color: #b5533b; }
.v2-fee-note[hidden] { display: none; }
.lp-real { margin: 0 0 14px; font-size: .88rem; }

/* Anything with the hidden attribute stays hidden, whatever display rule it has. */
[hidden] { display: none !important; }
#partnerList { margin-top: 16px; }
/* v2 pieces on phones: name, note and type on top; "you have" and "target" side by side below. */
@media (max-width: 720px) {
  #assetList .v2-piece { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px !important; }
  #assetList .v2-piece .piece-names { grid-column: 1 / -1 !important; grid-template-columns: minmax(0, 1fr) !important; }
  #assetList .v2-piece .piece-names input, #assetList .v2-piece .piece-names select { grid-column: 1 !important; width: 100%; }
  #assetList .v2-piece .piece-names select { justify-self: stretch; }
  #assetList .v2-piece button[data-del] { align-self: end; }
}
/* v2: "Invested today" comes from the pieces in Mi cartera: shown read-only, with a link there. */
input.is-locked { background: transparent !important; border-style: dashed !important; cursor: default; color: var(--ink); }
.v2-lock-note { display: block; grid-column: 1 / -1; margin-top: 4px; font-size: .78rem; color: var(--muted); }
a.v2-lock-note { color: var(--brand); text-decoration: underline; }
.lp-grid { align-items: start; }
.lp-grid label { align-content: start; grid-template-rows: auto auto; }
.lp-grid .v2-lock-note { font-weight: 400; }
/* v2 donut with volume: slices are groups (shaded ring + label) that slide out on hover */
#mixPie { filter: drop-shadow(0 10px 18px rgba(20, 40, 50, .18)) drop-shadow(0 2px 3px rgba(20, 40, 50, .12)); overflow: visible; }
.pie-seg { transition: transform .22s ease, opacity .2s; cursor: pointer; stroke-width: 0; }
.pie-seg:hover { stroke-width: 0; }
.pie-seg.is-dim { opacity: .35; }
body.dark #mixPie { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); }
.v2-returns { position: relative; overflow: hidden; }
.v2-goal-link { display: block; margin-top: 8px; padding: 0; border: 0; background: none; color: var(--brand); font-size: .8rem; font-weight: 700; text-decoration: underline; cursor: pointer; text-align: left; }
.v2-goal-link:disabled { color: #3a7557; text-decoration: none; cursor: default; }
/* v2: "update the total and spread it in proportion" in Mi cartera */
.v2-rescale-open { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--brand); font-size: .8rem; font-weight: 700; text-decoration: underline; cursor: pointer; text-align: left; }
.v2-rescale-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.v2-rescale-form input { width: 130px; height: 36px; text-align: right; font-weight: 700; }
.v2-rescale-form .primary { padding: 8px 14px; }
.v2-rescale-cancel { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .82rem; }
.v2-rescale-preview { flex-basis: 100%; color: var(--muted); font-size: .76rem; }
#returnsForm label { align-content: start; align-self: start; }
#returnsForm .metric-note { font-weight: 400; }

/* SEO guide under each tool: "How it works / example / FAQ" */
.guide-section { margin-top: 18px; }
.guide { max-width: 860px; line-height: 1.6; }
.guide h2 { font-size: 1.25rem; margin: 6px 0 10px; }
.guide h3 { font-size: 1.05rem; margin: 18px 0 6px; }
.guide p { color: var(--ink); margin: 0 0 10px; }
.faq-item { border-top: 1px solid var(--line); padding: 10px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; }
.faq-item p { margin: 8px 0 0; color: var(--muted); }
.guide-section { display: block !important; }
.panel.guide { display: block !important; }
.guide h2, .guide h3 { font-family: inherit; }
.guide-related { margin: 4px 0 0; padding-left: 18px; }
.guide-related li { margin: 4px 0; }
.guide-related a { color: var(--brand); font-weight: 700; }

/* Guides (articles generated by seo/build_site.py) */
.footer-guides { margin-top: 8px; text-transform: none; letter-spacing: .04em; font-size: .78rem; }
.footer-guides a { color: var(--muted); border-bottom: 1px solid transparent; }
.footer-guides a:hover, .footer-guides a:focus-visible { color: var(--brand); border-bottom-color: currentColor; }
.article-page .eyebrow a { color: inherit; }
.article-page .guide h2 { margin-top: 22px; }
.article-page .guide h2:first-child { margin-top: 6px; }
.article-cta { margin: 22px 0 8px; flex-wrap: wrap; }
.guide-cards { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 12px; max-width: 860px; }
.guide-cards a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); }
.guide-cards a:hover, .guide-cards a:focus-visible { border-color: var(--brand); }
.guide-cards b { display: block; color: var(--brand); margin-bottom: 4px; }
.guide-cards span { color: var(--muted); font-size: .92rem; line-height: 1.5; }
