/* Shared light design tokens for the canonical workspace. */
body.light-preview {
  color-scheme: light;
  --bg: #f6f8fc;
  --panel: #fff;
  --panel2: #f1f5fb;
  --line: #e2e8f0;
  --text: #182235;
  --muted: #576579;
  --teal: #245bff; /* Legacy accent alias, never the positive P&L color here. */
  --teal2: #1746cd;
  --blue: #245bff;
  --gold: #a66c09;
  --red: #c92d40;
  --positive: #14804a;
  --negative: #c92d40;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.light-preview a { color: var(--blue); text-underline-offset: 3px; }
.light-preview .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.light-preview .preview-bar { display: flex; justify-content: center; gap: 22px; padding: 8px 20px; background: #eaf0ff; color: #385075; font-size: 11px; }
.light-preview .preview-bar a { white-space: nowrap; font-weight: 700; }
.light-preview .topbar { height: auto; min-height: 85px; gap: 22px; padding: 17px max(24px,calc((100vw - 1440px)/2)); background: #fff; border-bottom: 1px solid var(--line); backdrop-filter: none; }
.light-preview .brand { text-decoration: none; color: var(--text); flex-shrink: 0; gap: 10px; font-size: 19px; }
.light-preview .brand small { display: block; font-size: 10px; letter-spacing: .025em; margin-top: -3px; }
.light-preview .brand-mark { background: linear-gradient(140deg,#4d80ff,#245bff 70%); color: #fff; box-shadow: none; }
.light-preview .brand-mark.small { width: 37px; height: 37px; border-radius: 11px; }
.light-preview .main-nav { display: flex; flex-wrap: wrap; min-width: 0; align-items: center; gap: 6px; }
.light-preview .nav-item { font-size: 13px; white-space: nowrap; color: #536175; padding: 9px 11px; border-radius: 7px; font-weight: 650; line-height: 1.5; }
.light-preview .nav-item:hover { color: var(--blue); background: #f1f5ff; }
.light-preview .nav-item.active { color: #1f51df; border-color: #dce6ff; background: #edf3ff; }
.light-preview .tools-menu { position: relative; font-size: 13px; color: #536175; }
.light-preview .tools-menu > summary { cursor: pointer; padding: 9px 11px; list-style: none; border-radius: 7px; font-weight: 650; }
.light-preview .tools-menu > summary::-webkit-details-marker { display: none; }
.light-preview .tools-menu > summary span { margin-left: 5px; }
.light-preview .tools-menu[open] > summary, .light-preview .tools-menu:has(.active) > summary { color: var(--blue); background: #edf3ff; }
.light-preview .tools-popover { position: absolute; z-index: 30; top: calc(100% + 10px); right: 0; width: min(220px, calc(100vw - 28px)); box-sizing: border-box; display: grid; padding: 7px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 12px 35px #18223514; }
.light-preview .tools-popover .nav-item { text-align: left; }
.light-preview .top-actions { gap: 12px; min-width: 0; }
.light-preview #global-search-form { display: flex; align-items: center; gap: 7px; padding: 0 9px; background: #f5f7fb; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.light-preview #global-search-form input { background: none; border: 0; border-radius: 0; box-shadow: none; width: 150px; min-height: 36px; padding: 7px 0; font-size: 12px; }
.light-preview #global-search-form:focus-within { border-color: var(--blue); outline: 2px solid #245bff15; }
.light-preview #global-search-form button { border: 0; background: none; color: var(--muted); padding: 3px; }
.light-preview .header-currency { font-size: 11px; font-weight: 750; }
.light-preview .icon-button:hover, .light-preview .text-button:hover { color: var(--blue); }
.light-preview .layout { display: block; min-height: calc(100vh - 120px); }
.light-preview .content { max-width: 1440px; padding: 32px 30px 20px; }
.light-preview h1 { font-size: clamp(25px,2.5vw,34px); line-height: 1.2; letter-spacing: -.035em; }
.light-preview h2 { font-size: 21px; letter-spacing: -.025em; }
.light-preview .eyebrow { color: var(--blue); letter-spacing: .13em; }
.light-preview .source-badge, .light-preview .private-pill { color: #4c6084; background: #f4f7fc; border-color: #dce4f0; font-size: 10px; letter-spacing: .035em; }
.light-preview .summary-card { border-radius: 12px; box-shadow: none; }
.light-preview .summary-card strong.teal, .light-preview .up { color: var(--positive); }
.light-preview .summary-card strong.gold, .light-preview .down { color: var(--negative); }
.light-preview .strategy-intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 24px 0; }
.light-preview .strategy-intro p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.light-preview .strategy-intro .eyebrow { margin-bottom: 8px; }
.light-preview .panel { border-radius: 13px; }
.light-preview .panel-head { padding: 20px 22px; }
.light-preview th, .light-preview td { border-bottom-color: var(--line); }
.light-preview th { color: #637187; background: #f8fafc; font-size: 10px; }
.light-preview td, .light-preview td:first-child { color: var(--text); }
.light-preview tbody tr:hover { background: #f6f9ff; }
.light-preview .token-icon { background: #eaf0ff; color: var(--blue); }
.light-preview .pill.good { background: #e9f7ee; color: #197246; }
.light-preview .pill.warn { background: #fff5e5; color: #8a590d; }
.light-preview .pill.neutral { background: #eaf0ff; color: #2554bd; }
.light-preview .info-strip { background: #eff5ff; border-color: #d6e3fa; color: #4b607b; }
.light-preview .info-strip > span { border-color: #95afdb; color: #45699e; }
.light-preview input, .light-preview select { background: #fff; color: var(--text); border-color: #cdd8e6; }
.light-preview input::placeholder { color: #7b889c; }
.light-preview input:focus, .light-preview select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #245bff12; }
.light-preview .form-row label, .light-preview .field-caption, .light-preview .feed-filters label, .light-preview .feed-picker label, .light-preview .parameter-field { color: #526177; }
.light-preview .button { background: #fff; border-color: #cdd8e6; color: #34445e; }
.light-preview .button.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.light-preview .button.primary:hover:not(:disabled), .light-preview .portfolio-app .button.primary:hover:not(:disabled) { background: #1746cd; }
.light-preview .button.subtle:hover { background: #edf3ff; border-color: #9fbaff; color: #214cc8; }
.light-preview button:focus-visible, .light-preview a:focus-visible, .light-preview summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.light-preview .catalog-summary, .light-preview .feed-description, .light-preview .feed-required, .light-preview .feed-browser legend, .light-preview .feed-selection legend, .light-preview .feed-execution legend { color: #33445d; }
.light-preview .catalog-tier-note, .light-preview .pf-notice { color: #795725; background: #fff9ec; border-color: #eedcb8; }
.light-preview .feed-detail, .light-preview .selected-feed { background: #f8faff; border-color: #d9e3f1; }
.light-preview .feed-route, .light-preview .selected-feed-copy code, .light-preview .feed-parameter-list dd { color: #566981; }
.light-preview .selected-feed-copy strong { color: var(--text); }
.light-preview .selected-feed-copy small { color: var(--muted); }
.light-preview .selected-feed-blocked { background: #fff9ee; border-color: #eedcb8; }
.light-preview .selected-feed-blocked small, .light-preview .feed-execution-policy { color: #825c1c; }
.light-preview .feed-parameters summary { color: #3c5b87; }
.light-preview .feed-schema, .light-preview .result-card pre { background: #eef2f8; color: #405771; }
.light-preview .feed-remove { border-color: #ced9e7; color: #526177; background: #fff; }
.light-preview #feed-run:disabled { background: #e6ebf3; color: #67758a; border-color: #d9e1ed; }
.light-preview .key-level { border-bottom-color: var(--line); color: var(--muted); }
.light-preview .key-level strong, .light-preview .cycle-meta strong { color: var(--text); }
.light-preview .chart text { fill: #64748b; }
.light-preview .pf-positive { color: var(--positive) !important; }
.light-preview .pf-negative { color: var(--negative) !important; }
.light-preview .pf-period { background: #fff; }
.light-preview .pf-period > span { color: #53657e; }
.light-preview .pf-custom { border-color: #d9e3f1; background: #f8faff; }
.light-preview .pf-custom p { color: #53657e; }
.light-preview .login-shell { background: var(--bg); }
.light-preview .login-card { background: #fff; border-color: var(--line); box-shadow: 0 20px 80px #18223512; }
.light-preview .login-card > p:not(.eyebrow):not(.form-error) { color: var(--muted); }
.light-preview footer { color: #6b7b90; border-top: 1px solid var(--line); margin-top: 35px; padding: 20px 0; font-size: 9px; }
@media (max-width: 1200px) {
  .light-preview .topbar { flex-wrap: wrap; gap: 13px 22px; padding: 16px 24px; }
  .light-preview .main-nav { order: 3; width: 100%; justify-content: center; border-top: 1px solid var(--line); padding-top: 12px; }
  .light-preview .top-actions { margin-left: auto; }
}
@media (max-width: 670px) {
  .light-preview .preview-bar { justify-content: space-between; gap: 10px; padding: 7px 14px; font-size: 9px; }
  .light-preview .preview-bar strong { display: block; }
  .light-preview .preview-bar a { align-self: center; }
  .light-preview .topbar { padding: 16px 14px 10px; gap: 14px 8px; }
  .light-preview .brand { font-size: 17px; }
  .light-preview .brand small { font-size: 9px; }
  .light-preview .brand-mark.small { width: 34px; height: 34px; }
  .light-preview .header-currency { font-size: 10px; }
  .light-preview .top-actions { gap: 8px; }
  .light-preview #global-search-form { display: none; }
  .light-preview .main-nav { justify-content: space-between; gap: 1px; padding-top: 10px; }
  .light-preview .nav-item { display: block; flex: none; font-size: 11px; padding: 8px 9px; }
  .light-preview .tools-menu { font-size: 11px; }
  .light-preview .tools-menu > summary { padding: 8px 7px; }
  .light-preview .content { padding: 24px 14px 16px; }
  .light-preview .strategy-intro { align-items: start; flex-direction: column; gap: 12px; }
  .light-preview .watch-panel { margin: 0; border-radius: 12px; }
  .light-preview .table-wrap { scrollbar-color: #b5c5dd transparent; }
  .light-preview .summary-card small { display: block; font-size: 9px; }
  .light-preview .section-title { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body.light-preview) { scroll-behavior: auto; }
}
