/* V2.8.7 · PnL Monster visual system, aligned with the public sales page. */
:root {
  color-scheme: dark;
  font-family: "DM Sans", Avenir, "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --green: #72edc4;
  --red: #ff7f91;
  --amber: #ffd184;
  --muted: #a8beb8;
  --line: rgba(164, 220, 203, .15);
  --panel: rgba(10, 34, 34, .78);
  --glass: linear-gradient(145deg, rgba(26, 62, 57, .68), rgba(8, 28, 29, .88));
  --glass-shadow: 0 18px 48px rgba(0, 8, 8, .3), inset 0 1px 0 rgba(226, 255, 245, .08);
  background: #071b1b;
  color: #eaf6f1;
}

html { background: #071b1b; }
body {
  background:
    radial-gradient(ellipse at 8% -4%, rgba(41, 111, 92, .34), transparent 42%),
    radial-gradient(ellipse at 96% 18%, rgba(34, 86, 74, .21), transparent 42%),
    radial-gradient(ellipse at 56% 100%, rgba(25, 76, 64, .16), transparent 46%),
    #071b1b;
  color: #eaf6f1;
  font-family: inherit;
}

body .app { color: #eaf6f1; }
.app > header {
  background: linear-gradient(115deg, rgba(32, 73, 65, .62), rgba(9, 34, 34, .82));
  border-color: rgba(182, 235, 215, .17);
  box-shadow: 0 18px 44px rgba(0, 9, 8, .24), inset 0 1px 0 rgba(239, 255, 248, .09);
}
.logo {
  color: #a1ffdf;
  border-color: rgba(108, 242, 194, .55);
  background: linear-gradient(145deg, rgba(102, 242, 194, .17), rgba(101, 189, 157, .08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 4px 18px rgba(56, 226, 170, .1);
}
.brand-engine {
  margin-left: 9px;
  color: #9bb5ae;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
  white-space: nowrap;
}
.tag, .new-pill {
  color: #a5ffdf;
  background: rgba(87, 221, 173, .1);
  border-color: rgba(108, 242, 194, .2);
}
header nav {
  background: rgba(3, 20, 20, .26);
  border-color: rgba(192, 237, 219, .07);
}
header nav a { color: #b8ccc5; }
header nav a:hover { color: #f1fff9; background: rgba(227, 255, 243, .08); }
header nav a[aria-current=page] {
  color: #dcfff1;
  background: linear-gradient(145deg, rgba(137, 244, 205, .17), rgba(137, 205, 177, .08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 2px 9px rgba(0, 8, 8, .18);
}
a { color: #91ebca; }

.card, .card-lite, dialog {
  background: var(--glass);
  border-color: var(--line);
  box-shadow: var(--glass-shadow);
}
.controls.card-lite, .workspace-tools {
  background: linear-gradient(115deg, rgba(30, 67, 59, .48), rgba(9, 31, 32, .72));
  border-color: rgba(174, 231, 211, .13);
}
input, select, textarea {
  color: #edf8f3;
  border-color: rgba(178, 225, 208, .2);
  background: linear-gradient(180deg, rgba(5, 24, 25, .78), rgba(10, 35, 34, .66));
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .17);
}
select option { background: #102c29; color: #edf8f3; }
input::placeholder, textarea::placeholder { color: #96b0a8; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(114, 237, 196, .62);
  box-shadow: 0 0 0 3px rgba(114, 237, 196, .12);
}
button:not(.secondary):not(.chart-actions button):not(.workspace-tools button):not(.billing-text-button) {
  background: linear-gradient(135deg, #9af8d6, #5ed9b1);
  color: #07372c;
  border: 1px solid rgba(199, 255, 231, .62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.56), 0 7px 20px rgba(27, 193, 139, .13);
}
button:hover:not(:disabled) { filter: brightness(1.04); }
button.secondary, .secondary, .chart-actions button, .workspace-tools button {
  color: #dcebe5;
  border-color: rgba(183, 225, 209, .17);
  background: linear-gradient(145deg, rgba(223, 255, 243, .075), rgba(164, 220, 197, .035));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}
button.secondary:hover:not(:disabled), .chart-actions button:hover:not(:disabled), .workspace-tools button:hover:not(:disabled) {
  background: rgba(173, 238, 209, .1);
}
:focus-visible { outline-color: #9bffdc; }
input[type=checkbox] { accent-color: #72edc4; }
.local-status {
  color: #b2c9c1;
  border-color: rgba(175, 231, 211, .1);
  background: rgba(7, 29, 29, .55);
}
#billingUsage { margin-bottom: 12px; }
.analysis-usage-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, .7fr) minmax(0, 2fr);
  align-items: center;
  gap: 18px 26px;
  margin: 0 0 14px;
  padding: 18px 20px;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 0 0, rgba(112, 237, 196, .11), transparent 42%),
    linear-gradient(115deg, rgba(23, 65, 57, .76), rgba(8, 31, 32, .86));
  border-color: rgba(123, 232, 192, .2);
}
.analysis-usage-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #a1ffdc, rgba(78, 210, 165, .18));
}
.usage-card-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.usage-card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  height: 40px;
  border: 1px solid rgba(132, 244, 201, .27);
  border-radius: 13px;
  color: #a2ffdc;
  font-size: 20px;
  background: linear-gradient(145deg, rgba(117, 238, 192, .18), rgba(103, 191, 155, .06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 20px rgba(32, 204, 145, .07);
}
.usage-heading-copy { min-width: 0; }
.usage-eyebrow { display: block; color: #91cbb5; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.usage-heading-copy h2 { margin: 4px 0 0; color: #eefaf4; font-size: 17px; letter-spacing: -.02em; }
.usage-plan-pill {
  justify-self: start;
  margin: 10px 0 0 52px;
  padding: 6px 10px;
  border: 1px solid rgba(133, 235, 195, .17);
  border-radius: 999px;
  color: #a8d9c5;
  background: rgba(7, 31, 29, .36);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}
.usage-card-heading { align-self: stretch; flex-wrap: wrap; align-content: center; }
.usage-card-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.usage-metric {
  min-width: 0;
  padding: 12px 15px 11px;
  border: 1px solid rgba(176, 231, 207, .12);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(222, 255, 239, .055), rgba(4, 25, 25, .28));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  transition: border-color .22s ease, transform .22s ease, background-color .22s ease;
}
.usage-metric:hover { transform: translateY(-1px); border-color: rgba(138, 237, 197, .23); }
.usage-metric-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #aac6ba; font-size: 10px; font-weight: 750; letter-spacing: .045em; }
.usage-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #77edc3; box-shadow: 0 0 12px rgba(119, 237, 195, .54); }
.usage-asset-label { max-width: 48%; overflow: hidden; color: #92cbb5; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.usage-metric-value { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.usage-metric-value strong { color: #f0fbf6; font-size: clamp(24px, 2.5vw, 31px); font-weight: 750; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.usage-metric-value span { color: #a8c2b8; font-size: 11px; }
.usage-metric-detail { min-height: 14px; margin: 4px 0 0; color: #8da99e; font-size: 9px; line-height: 1.45; }
.timeframe-meter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.timeframe-meter span { height: 4px; border-radius: 8px; background: rgba(206, 244, 225, .11); transition: background-color .25s ease, box-shadow .25s ease; }
.timeframe-meter span.active { background: linear-gradient(90deg, #62d8ac, #a0f7d5); box-shadow: 0 0 8px rgba(87, 221, 173, .23); }
.usage-explainer {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(154, 224, 195, .11);
  border-radius: 12px;
  background: rgba(4, 26, 25, .27);
}
.usage-info-icon { display: grid; place-items: center; flex: 0 0 17px; height: 17px; border: 1px solid rgba(127, 232, 187, .32); border-radius: 50%; color: #a0f4d1; font-size: 10px; font-weight: 800; }
.usage-explainer p { margin: 0; color: #a9c0b6; font-size: 10px; line-height: 1.55; }
.analysis-usage-card.usage-loading .usage-live-dot { animation: usage-pulse 1.5s ease-in-out infinite; }
@keyframes usage-pulse { 50% { opacity: .35; box-shadow: 0 0 3px rgba(119, 237, 195, .18); } }
@media (prefers-reduced-motion: reduce) {
  .usage-metric, .timeframe-meter span { transition: none; }
  .analysis-usage-card.usage-loading .usage-live-dot { animation: none; }
}
.workspace-tools { background: linear-gradient(110deg, rgba(100, 225, 177, .07), rgba(160, 220, 194, .035)); }
.hero .scorewrap > div, .mtf-item, .explain-item {
  border-color: rgba(174, 228, 208, .1);
  background: linear-gradient(145deg, rgba(214, 255, 236, .045), rgba(4, 25, 25, .34));
}
.score-explain-row details { background: rgba(180, 241, 214, .035); border-color: rgba(178, 229, 209, .13); }
.score-explain-row summary { color: #c0d5cd; }
.decision {
  background: linear-gradient(140deg, rgba(44, 91, 77, .5), rgba(10, 37, 35, .86));
  border-color: rgba(157, 230, 199, .19);
}
.decision:has(#bias.status-blocked) {
  background: linear-gradient(140deg, rgba(92, 43, 53, .58), rgba(18, 35, 34, .9));
  border-color: rgba(255, 127, 145, .35);
}
.decision:has(#bias.status-pass) {
  background: linear-gradient(140deg, rgba(32, 94, 72, .62), rgba(10, 39, 34, .9));
  border-color: rgba(114, 237, 196, .38);
}
.decision:has(#bias.status-unknown) {
  background: linear-gradient(140deg, rgba(93, 75, 40, .52), rgba(26, 41, 35, .9));
  border-color: rgba(255, 209, 132, .33);
}
.decision #bias.status-blocked, .status-blocked, .bear { color: #ff8a9b !important; }
.decision #bias.status-pass, .status-pass, .bull { color: #78f0c4 !important; }
.decision #bias.status-unknown, .status-unknown, .neutral { color: #ffd58a !important; }
.decision-check { border-color: rgba(176, 227, 207, .13); }
.decision-check small, .decision-copy, .execution-reason { color: #c0d2cb; }
.check-tooltip { background: #12302c; border-color: rgba(168, 237, 208, .42); }
.entry-zone { background: rgba(92, 225, 177, .07); border-color: rgba(108, 231, 183, .2); }
.plan div, .scenario-panel, .scenario-panel .scenario {
  background: linear-gradient(145deg, rgba(201, 246, 221, .055), rgba(5, 25, 25, .54));
  border-color: rgba(175, 227, 206, .13);
}
.scenario-panel .scenario.long { background: linear-gradient(145deg, rgba(79, 221, 169, .1), rgba(5, 28, 26, .78)); }
.scenario-panel .scenario.short { background: linear-gradient(145deg, rgba(255, 104, 128, .09), rgba(20, 27, 28, .78)); }
.scenario-launch {
  border-color: rgba(161, 233, 205, .22);
  background: linear-gradient(125deg, rgba(108, 229, 183, .12), rgba(49, 117, 94, .09) 58%, rgba(158, 212, 176, .05));
}
.scenario-launch:hover:not(:disabled) { border-color: rgba(137, 246, 202, .5); }
.scenario-launch strong { color: #e8fff5; }
.chart-actions button, .chart-toolbar a { border-color: rgba(172, 226, 207, .16); }
#chartShell:fullscreen, #chartShell.expanded {
  background: radial-gradient(ellipse at 14% 0, rgba(37, 104, 84, .6), transparent 52%), #071b1b;
}
.vela-chart-host {
  background: #0a2020;
  border-color: rgba(157, 221, 195, .16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 14px 34px rgba(0, 10, 8, .23);
}
.chart-tooltip, .limit-fields { background: rgba(13, 42, 39, .97); border-color: rgba(171, 229, 206, .28); }
.table-wrap { border-color: rgba(172, 226, 207, .14); background: rgba(6, 28, 28, .36); }
thead th, th { color: #aac2b9; background: rgba(8, 34, 32, .9); }
td { color: #e0eee8; border-color: rgba(172, 226, 207, .09); }
tbody tr:hover { background: rgba(171, 238, 207, .055); }
fieldset { border-color: rgba(174, 228, 208, .18); background: rgba(5, 26, 26, .3); }
.mtf-item small, .muted, .subline, .mini-label, .note, .technical-line, .metric span { color: #a7bdb6; }
.bar { background: rgba(218, 255, 239, .08); }
.fill { background: linear-gradient(90deg, #559d83, #87edc5); }
.pill { border-color: rgba(176, 226, 205, .19); background: rgba(160, 226, 190, .05); }
.status { border-color: rgba(141, 239, 199, .18); background: rgba(77, 209, 157, .09); }
.status.warning, .status.caution { background: rgba(255, 209, 132, .09); border-color: rgba(255, 209, 132, .18); }
.status.danger { background: rgba(255, 127, 145, .09); border-color: rgba(255, 127, 145, .2); }
.live-price-panel { border-color: rgba(119, 237, 194, .23); background: linear-gradient(135deg, rgba(77, 209, 157, .09), rgba(177, 235, 211, .045)); }
.live-price-panel.status-blocked { border-color: rgba(255, 127, 145, .3); background: linear-gradient(135deg, rgba(255, 112, 139, .1), rgba(79, 123, 101, .04)); }

.live-thesis-banner {
  display: grid;
  gap: 6px;
  margin: 10px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 191, 91, .38);
  border-left: 4px solid #ffc45e;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(255, 191, 91, .16), rgba(52, 198, 151, .09));
  color: #d8e8df;
  line-height: 1.45;
}
.live-thesis-banner[hidden] { display: none; }
.live-thesis-banner strong { color: #82f0c8; font-size: 13px; letter-spacing: .035em; }
.live-thesis-banner span { color: #c0d3cd; font-size: 11px; }
.live-thesis-banner + .check-strip { margin-top: 4px; }
.scenario-disclosure { border-color: rgba(255, 209, 132, .17); background: rgba(255, 209, 132, .055); }
.execution-card { background: linear-gradient(145deg, rgba(31, 78, 70, .52), rgba(10, 36, 35, .86)); }
.dashboard .preview-banner { background: rgba(255, 209, 132, .055); border-color: rgba(255, 209, 132, .25); }
.dashboard .plans article { background: linear-gradient(145deg, rgba(36, 79, 66, .45), rgba(8, 31, 31, .62)); border-color: rgba(172, 226, 207, .16); }
.dashboard dialog { background: linear-gradient(145deg, #143b34, #092725); color: #eaf6f1; border-color: rgba(172, 226, 207, .25); }
.primary-link { background: linear-gradient(120deg, #9af8d6, #5ed9b1); color: #07372c; }
.paper-notice { border-left-color: var(--amber); }
footer { color: #8da9a0; }

@supports not (backdrop-filter: blur(1px)) {
  .card, .card-lite, dialog, .app > header { background: #102d2b; }
}
@media (prefers-reduced-transparency: reduce) {
  .card, .card-lite, dialog, .app > header, .workspace-tools { backdrop-filter: none; -webkit-backdrop-filter: none; background: #102d2b; }
}
@media (max-width: 600px) {
  .brand-engine { display: none; }
  .analysis-usage-card { grid-template-columns: 1fr; gap: 12px; padding: 15px; }
  .usage-card-heading { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; }
  .usage-plan-pill { grid-column: 2 / -1; margin: -7px 0 0; justify-self: start; }
  .usage-card-content { grid-template-columns: 1fr 1fr; gap: 8px; }
  .usage-metric { padding: 11px; }
  .usage-metric-label { align-items: flex-start; font-size: 9px; }
  .usage-metric-value strong { font-size: 25px; }
  .usage-metric-value span { font-size: 10px; }
  .usage-explainer p { font-size: 10px; }
}
