/* Shared extension for the public site and customer pages. Loaded after the
   original page styles and dashboard palette. No visibility/state overrides. */
html[data-dashboard-theme="light"] .site-theme {
  --bg-card:#fffdf8;--text-light:var(--text-primary);
  --site-surface:linear-gradient(155deg,#fffefa 0%,#f8f5ef 52%,#f1eee6 100%);
  --site-blue-surface:linear-gradient(145deg,#f5f9fc,#e5edf4);
}
html[data-dashboard-theme="light"] .site-theme :is(.card-dark,.wp-card,.account-overview) {
  background:var(--site-surface);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 3px 14px rgba(74,61,37,.045);
}
html[data-dashboard-theme="light"] .site-theme .card-brushed {
  background:radial-gradient(ellipse at 20% 10%,#fffdf7 0%,#f5f1e7 55%,#e9e5da 100%);
}
html[data-dashboard-theme="light"] .site-theme :is(.theme-inset,.flow-step,.status-panel,.wp-stat-card,.summary-card,.price-breakdown) {
  background:var(--ea-card-background) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75),0 2px 6px rgba(74,61,37,.05);
}
html[data-dashboard-theme="light"] .site-theme :is(.card-value,.plan-price,.billing-countdown strong,.checkout-summary strong,.theme-number) {
  font-family:'Roboto Mono',monospace !important;font-variant-numeric:tabular-nums;
}
html[data-dashboard-theme="light"] .performance-page :is([id^="met"],#simScaleLevel,#simScaleLot,#simScaleRisk,#simScaleReturn,#simFinalBal,#simTotalReturn,#simTotalWd,#simAvgUsed,#combStats),
html[data-dashboard-theme="light"] .referral-page .referral-price-grid .card > div:last-child {
  font-family:'Roboto Mono',monospace !important;font-variant-numeric:tabular-nums;
}
html[data-dashboard-theme="light"] .site-theme :is(.btn-primary,.btn-outline,.btn-nav,.export-btn,.account-mini-btn,.trial-start-btn,.wp-ceiling-btn,.year-tab,.broker-tab) {
  --gold:var(--action-blue);--gold-dark:var(--action-blue-dark);--gold-40:rgba(36,76,115,.4);
}
html[data-dashboard-theme="light"] .site-theme :is(.btn-outline,.btn-nav,.export-btn,.account-mini-btn,.wp-ceiling-btn,.year-tab,.broker-tab) {
  background:var(--site-blue-surface);color:var(--action-blue);
}
html[data-dashboard-theme="light"] .site-theme :is(.btn-primary,.trial-start-btn,.wp-ceiling-btn.selected,.year-tab.active,.broker-tab.active) {
  background:linear-gradient(135deg,var(--action-blue),var(--action-blue-dark));color:#fff;
}
/* Simulator controls set their selected state inline. Retain it and use local
   blue tokens rather than changing click handlers or selected-state classes. */
html[data-dashboard-theme="light"] .site-theme .btn[style*="background:linear-gradient"] {
  --gold:var(--action-blue);--gold-dark:var(--action-blue-dark);color:#fff !important;
}
html[data-dashboard-theme="light"] .site-theme :is(button,a,input,select,textarea,[role="switch"]):focus-visible {
  outline:2px solid var(--accent-blue);outline-offset:3px;
}
html[data-dashboard-theme="light"] .site-theme :is(button,input,select):disabled { opacity:.55;cursor:not-allowed; }
html[data-dashboard-theme="light"] .site-theme :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) {
  background:#fffdf8 !important;color:var(--text-primary) !important;border-color:rgba(36,76,115,.3) !important;
}
html[data-dashboard-theme="light"] .site-theme :is(input[type=checkbox],input[type=radio],input[type=range]) { accent-color:var(--action-blue) !important; }
html[data-dashboard-theme="light"] .site-theme :is(.positive,.billing-state-pill.ready) { color:var(--dash-positive); }
html[data-dashboard-theme="light"] .site-theme :is(.negative,.error-msg,.checkout-error) { color:var(--accent-red); }
html[data-dashboard-theme="light"] .site-theme .k4-warning { color:var(--dash-warning);background:#f8efdc; }
html[data-dashboard-theme="light"] .site-theme :is(.monthly-table,.data-table) { background:#fffdf8; }
html[data-dashboard-theme="light"] .site-theme :is(.monthly-table,.data-table) th { background:#ece9df; }
html[data-dashboard-theme="light"] .site-theme .monthly-table tr:hover { background:#f1eee6; }
html[data-dashboard-theme="light"] .site-theme .wp-switch { background:#c4ced5;border-color:#718496; }
html[data-dashboard-theme="light"] .site-theme .wp-switch.on { background:var(--action-blue);border-color:var(--action-blue); }
html[data-dashboard-theme="light"] .site-theme .wp-switch .knob { background:#fff; }

/* Our checkout shell only; Stripe's secure iframe and payment lifecycle are untouched. */
html[data-dashboard-theme="light"] .site-theme .checkout-overlay { background:rgba(37,47,42,.35); }
html[data-dashboard-theme="light"] .site-theme .checkout-shell { background:#fffdf8;box-shadow:0 24px 80px rgba(33,49,43,.2); }
html[data-dashboard-theme="light"] .site-theme .checkout-summary { background:var(--site-blue-surface); }
html[data-dashboard-theme="light"] .site-theme .checkout-close { background:#fff;color:var(--text-primary); }
html[data-dashboard-theme="light"] .site-theme :is(.discount-cap-note,.price-row-label small,.discount-entry p,.plan-note,.discount-message:not(.success):not(.error)) { color:var(--text-muted); }
html[data-dashboard-theme="light"] .site-theme #simModal > div { background:var(--site-surface) !important; }

/* Legacy/dynamic inline text colors need stronger contrast on light surfaces. */
html[data-dashboard-theme="light"] .site-theme :is([style*="color:#ddd" i],[style*="color: #ddd" i],[style*="color:#bbb" i],[style*="color: #bbb" i]) { color:var(--text-primary) !important; }
html[data-dashboard-theme="light"] .site-theme :is([style*="color:#F87171" i],[style*="color: #F87171" i],[style*="color:rgba(255,120,120" i],[style*="color: rgba(255,120,120" i]) { color:var(--accent-red) !important; }
html[data-dashboard-theme="light"] .site-theme :is([style*="color:#608FEE" i],[style*="color: #608FEE" i],[style*="color:rgba(77,163,255" i],[style*="color: rgba(77,163,255" i]) { color:var(--accent-blue) !important; }
html[data-dashboard-theme="light"] .site-theme :is([style*="color:rgba(255,160,50" i],[style*="color: rgba(255,160,50" i]) { color:var(--dash-warning) !important; }
html[data-dashboard-theme="light"] .site-theme :is([style*="color:rgba(201,164,108" i],[style*="color: rgba(201,164,108" i]) { color:var(--gold-light) !important; }

/* Landing page: a light hero, tinted trial card, and an always-reachable toggle. */
html[data-dashboard-theme="light"] .index-page .top-nav { background:rgba(250,249,245,.95);box-shadow:0 2px 12px rgba(33,49,43,.06); }
html[data-dashboard-theme="light"] .index-page .hero-bg {
  background:radial-gradient(ellipse at 20% 40%,#fffdf7 0%,transparent 65%),radial-gradient(ellipse at 85% 30%,#e1e9ef 0%,transparent 55%),var(--bg-primary);
}
html[data-dashboard-theme="light"] .index-page .trial-card-compact {
  background:radial-gradient(ellipse at 25% 18%,#fffdf7,#f5f1e7 50%,#eae6dc);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 10px 35px rgba(61,49,30,.12);
}
html[data-dashboard-theme="light"] .index-page .trial-after { color:var(--text-muted); }
html[data-dashboard-theme="light"] .index-page .site-footer { background:#eae8e0; }
html[data-dashboard-theme="light"] .index-page .bar-shaft.positive { background:linear-gradient(180deg,#315f89,#142f4d); }
html[data-dashboard-theme="light"] .index-page .bar-shaft.negative { background:linear-gradient(180deg,#ba3039,#d99599); }
.site-theme .page-header { gap:16px; }
.site-theme .page-header > div { min-width:0; }
.site-theme.public-info .page-header { flex-wrap:wrap; }
@media (max-width:768px) {
  .site-theme .card { padding:20px !important; }
  .site-theme .referral-price-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .site-theme :is(#refLink,#loyalFriendCode) { min-width:0 !important;width:100%; }
  .site-theme .btn { white-space:normal;max-width:100%; }
  .site-theme .price-row,.site-theme .status-row { gap:12px;flex-wrap:wrap; }
  .site-theme .account-overview-head { flex-wrap:wrap; }
  .index-page { --header-height:112px; }
  .index-page .top-nav { flex-wrap:wrap;justify-content:center;gap:8px;padding:10px 16px;height:var(--header-height); }
  .index-page .top-nav .logo { flex-basis:100%;text-align:center; }
  .index-page .top-nav .nav-links { gap:10px;justify-content:center; }
  .index-page .dashboard-theme-toggle { font-size:.65rem;padding:7px 10px; }
}
