/* MBOKA_F51_PREMIUM_THEME_R1 — additive visual layer; no finance logic */
:root {
  --mp51-page: #f3f5f1;
  --mp51-surface: #fff;
  --mp51-soft: #f5f8f5;
  --mp51-line: #e0e9e2;
  --mp51-ink: #182b21;
  --mp51-muted: #677b6f;
  --mp51-accent: #106b4b;
  --mp51-tint: #e8f3ed;
  --mp51-focus: #106b4b;
  --mp51-shadow: 0 6px 22px rgba(24,43,33,.045);
}
html[data-mp-theme="dark"] {
  color-scheme: dark;
  --mp51-page: #0e1714;
  --mp51-surface: #17231e;
  --mp51-soft: #1e3027;
  --mp51-line: #33463a;
  --mp51-ink: #f1f7f2;
  --mp51-muted: #b5c7ba;
  --mp51-accent: #72dda2;
  --mp51-tint: #224632;
  --mp51-focus: #a2f6c4;
  --mp51-shadow: 0 8px 24px rgba(0,0,0,.14);
}
/* Shared restrained editorial style. */
body { font-feature-settings:"cv11" 1; font-synthesis:none; }
.topbar h1,.page-intro h2,.market-intro h2,.section-title-row h2,.section-head h2 {
  letter-spacing:-.035em; font-weight:800; line-height:1.16;
}
.balance-value,.projection-value,.stat-grid strong,.mp-f3-horizon strong {font-variant-numeric:tabular-nums;letter-spacing:-.03em}
.panel,.mini-card,.product-card,.mp-r4-detail {box-shadow:var(--mp51-shadow)}
button { -webkit-tap-highlight-color:transparent; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:2px solid var(--mp51-focus);outline-offset:3px;
}
.top-actions {display:flex;align-items:center;gap:8px;}
.mp-f51-theme-switch {
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  min-width:46px;min-height:44px;padding:9px 12px;
  border:1px solid var(--mp51-line);border-radius:13px;
  background:var(--mp51-surface);color:var(--mp51-ink);
  cursor:pointer;font:inherit;font-weight:760;font-size:12px;
  box-shadow:var(--mp51-shadow);transition:transform .18s ease,background-color .2s ease,border-color .2s ease;
}
.mp-f51-theme-switch svg {display:block;flex:none;width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.mp-f51-theme-switch .mp-f51-theme-label {white-space:nowrap}
@media(hover:hover) and (prefers-reduced-motion:no-preference) {
  .mp-f51-theme-switch:hover, .primary-btn:hover,.secondary-btn:hover {transform:translateY(-2px)}
  .panel,.mini-card,.mp-f2-row,.mp-profile-row,.mp-r4-detail,.mp-f2b-row,.mp-f3-goal,.product-card {transition:box-shadow .22s ease,border-color .22s ease,transform .22s ease}
  .panel:hover,.mini-card:hover,.mp-r4-detail:hover {box-shadow:0 10px 29px rgba(16,42,29,.09)}
  html[data-mp-theme="dark"] .panel:hover,html[data-mp-theme="dark"] .mp-r4-detail:hover {box-shadow:0 13px 32px rgba(0,0,0,.23)}
}
@media(max-width:780px) {
 .topbar {gap:8px}.topbar>div:first-child{min-width:0}
 .top-actions {flex-shrink:0}
 .mp-f51-theme-switch{width:44px;height:44px;padding:0;border-radius:12px}
 .mp-f51-theme-label{display:none}
}
/* Dark surfaces: all current native V1 modules, plus F3, R4, F4.5 */
html[data-mp-theme="dark"] body{background:var(--mp51-page);color:var(--mp51-ink)}
html[data-mp-theme="dark"] .sidebar,
html[data-mp-theme="dark"] .panel,
html[data-mp-theme="dark"] .mini-card,
html[data-mp-theme="dark"] .stat-grid article,
html[data-mp-theme="dark"] .product-card,
html[data-mp-theme="dark"] .modal,
html[data-mp-theme="dark"] .mp-f2-dialog,
html[data-mp-theme="dark"] .mp-f2b-row,
html[data-mp-theme="dark"] .mp-profile-row,
html[data-mp-theme="dark"] .mp-r4-detail,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-goal,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-horizon,
html[data-mp-theme="dark"] .mp-f2-row,
html[data-mp-theme="dark"] .mp-f2b-empty {
 background:var(--mp51-surface);color:var(--mp51-ink);
 border-color:var(--mp51-line);
}
html[data-mp-theme="dark"] .mp-r4-account {background:var(--mp51-surface)}
html[data-mp-theme="dark"] .side-card,
html[data-mp-theme="dark"] .mp-r4-email-lock,
html[data-mp-theme="dark"] .coach-tip,
html[data-mp-theme="dark"] .smart-note,
html[data-mp-theme="dark"] .skill-list>div,
html[data-mp-theme="dark"] .milestone-list div,
html[data-mp-theme="dark"] .mp-v1-trajectory-notice,
html[data-mp-theme="dark"] .mp-f51-theme-switch,
html[data-mp-theme="dark"] .mp-f2b-total,
html[data-mp-theme="dark"] .mp-f2b-empty {
 background:var(--mp51-soft);color:var(--mp51-ink);border-color:var(--mp51-line);
}
html[data-mp-theme="dark"] .balance-card{background:#12412e;color:#fff}
html[data-mp-theme="dark"] .balance-card .balance-meta div{background:rgba(255,255,255,.08)}
html[data-mp-theme="dark"] .balance-card .smart-note{background:#213f31;color:#f1f7f2}
html[data-mp-theme="dark"] .balance-card .smart-note span{color:#c4dfcc}
html[data-mp-theme="dark"] .topbar h1,
html[data-mp-theme="dark"] .page-intro h2,
html[data-mp-theme="dark"] .section-head h2,
html[data-mp-theme="dark"] .section-title-row h2,
html[data-mp-theme="dark"] .market-intro h2,
html[data-mp-theme="dark"] .mp-profile-panel h3,
html[data-mp-theme="dark"] .mp-r4-detail strong,
html[data-mp-theme="dark"] .mp-f2-modalhead h2,
html[data-mp-theme="dark"] #view-trajectory .mp-f45-heading h3,
html[data-mp-theme="dark"] .mp-profile-account strong {
 color:var(--mp51-ink);
}
html[data-mp-theme="dark"] .eyebrow,
html[data-mp-theme="dark"] .card-label,
html[data-mp-theme="dark"] .brand-sub,
html[data-mp-theme="dark"] .profile-plan,
html[data-mp-theme="dark"] .muted,
html[data-mp-theme="dark"] .muted-copy,
html[data-mp-theme="dark"] .page-intro p,
html[data-mp-theme="dark"] .market-intro p,
html[data-mp-theme="dark"] .mp-profile-help,
html[data-mp-theme="dark"] .mp-profile-row small,
html[data-mp-theme="dark"] .mp-r4-detail span,
html[data-mp-theme="dark"] .mp-r4-email-lock span,
html[data-mp-theme="dark"] .mp-r4-email-lock small,
html[data-mp-theme="dark"] .mp-f2-explainer,
html[data-mp-theme="dark"] .mp-f2-rowinfo small,
html[data-mp-theme="dark"] .mp-f2b-info small,
html[data-mp-theme="dark"] .mp-f2b-disclaimer,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-muted,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-horizon span,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-goal-head small,
html[data-mp-theme="dark"] #view-trajectory .mp-f45-hint,
html[data-mp-theme="dark"] #view-trajectory .mp-f45-heading p,
html[data-mp-theme="dark"] .product-body p,
html[data-mp-theme="dark"] .source-row,
html[data-mp-theme="dark"] .price-row span {
 color:var(--mp51-muted);
}
html[data-mp-theme="dark"] .nav-item{color:var(--mp51-muted)}
html[data-mp-theme="dark"] .nav-item:hover,
html[data-mp-theme="dark"] .nav-item.active {background:var(--mp51-tint);color:var(--mp51-accent)}
html[data-mp-theme="dark"] .primary-btn {background:#167f52;color:#fff}
html[data-mp-theme="dark"] .secondary-btn,
html[data-mp-theme="dark"] .soft-select,
html[data-mp-theme="dark"] .search-box,
html[data-mp-theme="dark"] .market-chips button,
html[data-mp-theme="dark"] .mp-f2-tabs button,
html[data-mp-theme="dark"] .mp-f2b-tabs button,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-horizon,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-currencies,
html[data-mp-theme="dark"] .segmented,
html[data-mp-theme="dark"] .horizon-tabs,
html[data-mp-theme="dark"] #view-home .mp-f1-modebar{
 background:var(--mp51-soft);border-color:var(--mp51-line);color:var(--mp51-ink);
}
html[data-mp-theme="dark"] .market-chips button.active,
html[data-mp-theme="dark"] .mp-f2-tabs button.active,
html[data-mp-theme="dark"] .mp-f2b-tabs button.active,
html[data-mp-theme="dark"] .segmented button.active,
html[data-mp-theme="dark"] .horizon-tabs button.active,
html[data-mp-theme="dark"] #view-home .mp-f1-mode.active,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-currencies button.active,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-horizon.active {
 background:var(--mp51-tint);border-color:var(--mp51-accent);color:var(--mp51-accent);
}
html[data-mp-theme="dark"] .market-chips button:not(.active),
html[data-mp-theme="dark"] .segmented button:not(.active),
html[data-mp-theme="dark"] .horizon-tabs button:not(.active),
html[data-mp-theme="dark"] #view-home .mp-f1-mode:not(.active),
html[data-mp-theme="dark"] #view-trajectory .mp-f3-currencies button:not(.active) {color:var(--mp51-muted)}
html[data-mp-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-mp-theme="dark"] select,
html[data-mp-theme="dark"] textarea,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-fields input,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-fields select,
html[data-mp-theme="dark"] #view-trajectory .mp-f45-fields input,
html[data-mp-theme="dark"] #view-trajectory .mp-f45-fields select,
html[data-mp-theme="dark"] .mp-profile-fields input:not([type="checkbox"]),
html[data-mp-theme="dark"] .mp-profile-fields select,
html[data-mp-theme="dark"] .mp-f23-panel input:not([type="checkbox"]),
html[data-mp-theme="dark"] .mp-f23-panel select,
html[data-mp-theme="dark"] .mp-f2-dialog input:not([type="checkbox"]),
html[data-mp-theme="dark"] .mp-f2-dialog select {
 background:#101e19;color:var(--mp51-ink);border-color:var(--mp51-line);
}
html[data-mp-theme="dark"] input::placeholder,
html[data-mp-theme="dark"] textarea::placeholder {color:#9cb5a4;opacity:1}
html[data-mp-theme="dark"] .mp-profile-fields label,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-fields label,
html[data-mp-theme="dark"] #view-trajectory .mp-f45-fields label,
html[data-mp-theme="dark"] #view-trajectory .mp-f45-confirm,
html[data-mp-theme="dark"] .mp-f23-panel label,
html[data-mp-theme="dark"] .mp-f2-dialog form>label {color:var(--mp51-muted)}
html[data-mp-theme="dark"] .mp-profile-money,
html[data-mp-theme="dark"] .mp-f2-amount,
html[data-mp-theme="dark"] .projection-value,
html[data-mp-theme="dark"] .autonomy,
html[data-mp-theme="dark"] .mp-f2b-positive {color:var(--mp51-accent)}
html[data-mp-theme="dark"] .mp-f2b-negative {color:#ffad8c}
html[data-mp-theme="dark"] .timeline-item:before,
html[data-mp-theme="dark"] .metric-row,
html[data-mp-theme="dark"] .mp-profile-panel form,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-wallet,
html[data-mp-theme="dark"] #view-trajectory .mp-f45,
html[data-mp-theme="dark"] .mp-profile-row{border-color:var(--mp51-line)}
html[data-mp-theme="dark"] .bar,
html[data-mp-theme="dark"] .progress-track,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-track {background:var(--mp51-line)}
html[data-mp-theme="dark"] .mobile-nav {background:rgba(23,35,30,.96);border-color:var(--mp51-line)}
html[data-mp-theme="dark"] .mobile-nav button{color:var(--mp51-muted)}
html[data-mp-theme="dark"] .mobile-nav button.active{background:var(--mp51-tint);color:var(--mp51-accent)}
html[data-mp-theme="dark"] .modal-head button,
html[data-mp-theme="dark"] .action-choice-grid button,
html[data-mp-theme="dark"] .skill-list button,
html[data-mp-theme="dark"] .skill-list b {background:var(--mp51-soft);color:var(--mp51-ink);border-color:var(--mp51-line)}
html[data-mp-theme="dark"] .mp-f2-warning,
html[data-mp-theme="dark"] #view-trajectory .mp-f45-pending {background:#3a2e1e;color:#ffdfa9}
html[data-mp-theme="dark"] .mp-profile-status,
html[data-mp-theme="dark"] #view-trajectory .mp-f3-status,
html[data-mp-theme="dark"] #view-trajectory .mp-f45-status {background:#204431;color:#bff2d0}
html[data-mp-theme="dark"] .mp-profile-status[data-type="error"],
html[data-mp-theme="dark"] #view-trajectory .mp-f3-status[data-error="true"],
html[data-mp-theme="dark"] #view-trajectory .mp-f45-status[data-error="true"]{background:#462722;color:#ffc5b6}
html[data-mp-theme="dark"] #flowChart line,
html[data-mp-theme="dark"] #projectionChart line {stroke:#34483d}
html[data-mp-theme="dark"] #flowChart text,
html[data-mp-theme="dark"] #projectionChart text,
html[data-mp-theme="dark"] #donutChart text {fill:#dbe9df}
html[data-mp-theme="dark"] #donutChart circle[fill="#fff"]{fill:var(--mp51-surface)}
@media(prefers-reduced-motion:reduce){
  html,body{scroll-behavior:auto!important}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
