@charset "UTF-8";

:root {
  --bg: #0d100f;
  --surface: #141816;
  --surface-raised: #1a1f1c;
  --line: #2b322e;
  --line-soft: rgba(183, 198, 188, .12);
  --text: #edf0e8;
  --muted: #919b93;
  --faint: #5e6961;
  --acid: #d9f99d;
  --acid-strong: #c6f36b;
  --up: #ff756d;
  --down: #58c69b;
  --amber: #f4bd67;
  --danger: #ff857c;
  --mono: "DIN Alternate", "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --body: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Bodoni 72", "Noto Serif SC", "Songti SC", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button, a, input, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible, label:focus-within { outline: 2px solid var(--acid-strong); outline-offset: 3px; }
[hidden] { display: none !important; }

.terminal-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(190, 209, 194, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 209, 194, .025) 1px, transparent 1px),
    radial-gradient(circle at 82% 4%, rgba(158, 191, 110, .08), transparent 26%);
  background-size: 48px 48px, 48px 48px, auto;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}

.topbar {
  width: min(1440px, calc(100% - 80px));
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--acid-strong);
  color: var(--acid-strong);
  font-family: var(--display);
  font-size: 23px;
  line-height: 1;
  transform: rotate(-3deg);
}
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-size: 18px; letter-spacing: .18em; }
.brand small { margin-top: 6px; color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .18em; }
.session-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .05em; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acid-strong); box-shadow: 0 0 12px rgba(198, 243, 107, .6); }
.meta-divider { width: 1px; height: 12px; background: var(--line); }

main { width: min(1440px, calc(100% - 80px)); margin: 0 auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(390px, .75fr); gap: clamp(50px, 8vw, 130px); padding: 76px 0 68px; align-items: center; }
.eyebrow { margin: 0 0 18px; color: var(--acid-strong); font-family: var(--mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; }
.hero h1 { margin: 0; font-family: var(--display); font-size: clamp(44px, 5.1vw, 74px); font-weight: 500; line-height: 1.17; letter-spacing: -.055em; }
.hero h1 span { color: var(--acid); font-style: italic; white-space: nowrap; }
.hero-description { margin: 26px 0 0; max-width: 650px; color: var(--muted); font-size: 14px; line-height: 1.95; }
.principles { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 30px; }
.principles span { position: relative; padding-left: 15px; color: #bbc3bc; font-size: 12px; }
.principles span::before { content: ""; position: absolute; left: 0; top: .75em; width: 5px; height: 1px; background: var(--acid-strong); }

.query-console { position: relative; padding: 28px; background: rgba(23, 28, 25, .94); border: 1px solid #343d37; box-shadow: 16px 16px 0 rgba(255, 255, 255, .015); }
.query-console::before { content: ""; position: absolute; top: -1px; left: 28px; width: 56px; height: 2px; background: var(--acid-strong); }
.console-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.console-heading > div { display: flex; align-items: center; gap: 12px; }
.console-index, .section-title > span { color: var(--faint); font-family: var(--mono); font-size: 11px; }
.console-heading h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .04em; }
.console-status { color: var(--acid-strong); font-family: var(--mono); font-size: 9px; letter-spacing: .16em; }
.source-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.source-tab { position: relative; padding: 10px; border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 12px; }
.source-tab::after { content: ""; position: absolute; bottom: -1px; left: 50%; right: 50%; height: 2px; background: var(--acid-strong); transition: left .2s, right .2s; }
.source-tab.active { color: var(--text); }
.source-tab.active::after { left: 0; right: 0; }
.field-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.code-field { display: flex; align-items: center; height: 54px; border: 1px solid #3b453e; background: #0e1210; transition: border-color .2s; }
.code-field:focus-within { border-color: var(--acid-strong); }
.code-field > span { padding: 0 15px; color: var(--faint); font-family: var(--mono); font-size: 11px; border-right: 1px solid var(--line); }
.code-field input { width: 100%; min-width: 0; height: 100%; padding: 0 14px; color: var(--text); background: none; border: 0; outline: 0; font-family: var(--mono); font-size: 16px; letter-spacing: .04em; }
.code-field input::placeholder { color: #556058; font-size: 13px; }
.code-field button { width: 42px; border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 20px; }
.field-hint { margin: 9px 0 20px; color: var(--faint); font-size: 10px; line-height: 1.5; }
.evaluate-button { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; height: 52px; padding: 0 18px; border: 1px solid var(--acid-strong); background: var(--acid-strong); color: #17200e; cursor: pointer; font-weight: 700; transition: background .2s, transform .2s; }
.evaluate-button:hover { background: #dcfa91; transform: translateY(-1px); }
.evaluate-button:disabled { cursor: wait; opacity: .7; transform: none; }
.button-arrow { font-size: 20px; font-weight: 400; }
.button-loader { display: none; width: 17px; height: 17px; border: 2px solid rgba(23, 32, 14, .25); border-top-color: #17200e; border-radius: 50%; animation: spin .7s linear infinite; }
.evaluate-button.loading .button-arrow { display: none; }
.evaluate-button.loading .button-loader { display: block; }
.form-error { margin: 12px 0 0; padding: 10px 12px; color: #ffaba4; background: rgba(255, 117, 109, .07); border-left: 2px solid var(--danger); font-size: 11px; }
.console-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; color: var(--faint); font-size: 9px; }
.upload-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 112px; padding: 16px; border: 1px dashed #435047; background: #101411; cursor: pointer; text-align: center; transition: border-color .2s, background .2s; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--acid-strong); background: rgba(198, 243, 107, .035); }
.upload-symbol { color: var(--acid-strong); font-family: var(--mono); font-size: 21px; line-height: 1; }
.upload-zone strong { margin: 5px 0 3px; font-size: 12px; font-weight: 500; }
.upload-zone small { max-width: 100%; color: var(--faint); font-size: 9px; overflow-wrap: anywhere; }
.confirmation-check { display: flex; align-items: center; gap: 7px; margin: 10px 0 17px; color: var(--muted); font-size: 10px; cursor: pointer; }
.confirmation-check input { accent-color: var(--acid-strong); }

.empty-state { padding: 0 0 82px; animation: reveal .6s both; }
.empty-rule { width: 100%; height: 1px; margin-bottom: 36px; background: linear-gradient(90deg, var(--acid-strong) 0 42px, var(--line-soft) 42px); }
.question-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line-soft); }
.question-grid article { position: relative; padding: 28px 34px 0 0; }
.question-grid article + article { padding-left: 34px; border-left: 1px solid var(--line-soft); }
.question-grid article > span { color: var(--faint); font-family: var(--mono); font-size: 11px; }
.question-grid h3 { margin: 9px 0 8px; font-family: var(--display); font-size: 23px; font-weight: 500; }
.question-grid p { margin: 0; max-width: 310px; color: var(--muted); font-size: 12px; }

.results { padding-bottom: 80px; animation: reveal .55s both; }
.result-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.result-heading .eyebrow { margin-bottom: 8px; }
.result-heading h2 { margin: 0; font-family: var(--display); font-size: 36px; font-weight: 500; line-height: 1.2; }
.result-heading h2 small { margin-left: 14px; color: var(--muted); font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: .08em; }
.result-heading p:last-child { margin: 7px 0 0; color: var(--faint); font-size: 10px; }
.confirmation-badge { padding: 5px 10px; border: 1px solid rgba(198, 243, 107, .35); color: var(--acid); font-size: 10px; }
.confirmation-badge.provisional { border-color: rgba(244, 189, 103, .45); color: var(--amber); animation: pulse 2s infinite; }
.decision-layout { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr); border: 1px solid var(--line); background: var(--surface); }
.verdict-panel { display: grid; grid-template-columns: 170px 1fr; grid-template-rows: auto 1fr auto; column-gap: 25px; padding: 28px; border-right: 1px solid var(--line); }
.panel-kicker { grid-column: 1 / -1; margin: 0 0 16px; color: var(--faint); font-family: var(--mono); font-size: 9px; letter-spacing: .18em; }
.score-wrap { position: relative; width: 160px; height: 160px; }
.score-ring { width: 160px; height: 160px; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 4; }
.ring-track { stroke: #29302c; }
.ring-value { stroke: var(--acid-strong); stroke-linecap: butt; stroke-dasharray: 414.69; stroke-dashoffset: 414.69; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1), stroke .3s; }
.score-number { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-number strong { font-family: var(--mono); font-size: 48px; font-weight: 400; line-height: 1; letter-spacing: -.06em; }
.score-number span { margin-top: 8px; color: var(--faint); font-family: var(--mono); font-size: 10px; }
.verdict-copy { align-self: center; }
.decision-light { display: block; width: 28px; height: 3px; margin-bottom: 15px; background: var(--acid-strong); box-shadow: 0 0 15px rgba(198, 243, 107, .25); }
.verdict-copy h3 { margin: 0 0 9px; font-size: 27px; font-weight: 500; letter-spacing: .03em; }
.verdict-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.thresholds { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line-soft); color: var(--faint); font-family: var(--mono); font-size: 9px; }
.verdict-panel.watch .ring-value, .verdict-panel.watch .decision-light { stroke: var(--amber); background: var(--amber); }
.verdict-panel.wait .ring-value { stroke: var(--danger); }
.verdict-panel.wait .decision-light { background: var(--danger); }
.trade-plan { padding: 28px 32px; }
.section-title { display: flex; align-items: center; gap: 12px; }
.section-title h3 { margin: 0; font-size: 15px; font-weight: 500; }
.section-title small { margin-left: auto; color: var(--faint); font-size: 10px; }
.price-levels { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; }
.price-levels > div { padding: 0 20px; border-left: 1px solid var(--line-soft); }
.price-levels > div:first-child { padding-left: 0; border-left: 0; }
.price-levels span { display: block; color: var(--muted); font-size: 10px; }
.price-levels strong { display: block; margin: 5px 0 4px; font-family: var(--mono); font-size: clamp(24px, 2.4vw, 34px); font-weight: 400; letter-spacing: -.05em; }
.price-levels small { color: var(--faint); font-size: 9px; }
.price-levels .stop-level strong { color: var(--danger); }
.price-levels .target-level strong { color: var(--acid); }
.rr-row { display: flex; align-items: baseline; gap: 16px; margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.rr-row span { color: var(--muted); font-size: 11px; }
.rr-row strong { color: var(--acid); font-family: var(--mono); font-size: 25px; font-weight: 400; }
.rr-row small { margin-left: auto; color: var(--faint); font-size: 9px; }
.plan-note { margin: 16px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.alerts { display: grid; gap: 8px; margin-top: 12px; }
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-left: 2px solid var(--danger); background: rgba(255, 133, 124, .055); color: #eeb3ae; font-size: 11px; }
.alert::before { content: "VETO"; flex: 0 0 auto; color: var(--danger); font-family: var(--mono); font-size: 8px; letter-spacing: .12em; line-height: 2.2; }
.alert.penalty { border-color: var(--amber); background: rgba(244, 189, 103, .05); color: #d8c29f; }
.alert.penalty::before { content: "RISK"; color: var(--amber); }
.evidence-section, .chart-section { margin-top: 46px; }
.modules { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.module { min-width: 0; padding: 22px 20px; }
.module + .module { border-left: 1px solid var(--line); }
.module-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.module-head h4 { margin: 0; font-size: 12px; font-weight: 500; }
.module-head strong { font-family: var(--mono); font-size: 19px; font-weight: 400; }
.module-head strong small { color: var(--faint); font-size: 9px; }
.score-track { height: 2px; margin: 14px 0 16px; background: var(--line); }
.score-track span { display: block; height: 100%; background: var(--acid-strong); transform-origin: left; animation: grow .8s both; }
.module ul { margin: 0; padding: 0; list-style: none; }
.module li { position: relative; padding-left: 10px; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; }
.module li::before { content: ""; position: absolute; top: .75em; left: 0; width: 3px; height: 3px; background: var(--faint); }
.module-empty { color: var(--faint); font-size: 10px; }
.chart-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 15px; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.chart-legend span::before { content: ""; display: inline-block; width: 10px; height: 2px; margin-right: 5px; vertical-align: middle; background: currentColor; }
.legend-ma { color: #a69b8b !important; }
.legend-swl { color: #ef827a !important; }
.legend-sws { color: #65c9c2 !important; }
.legend-signal { color: var(--acid) !important; }
.chart-readout { min-height: 34px; margin-top: 14px; padding: 8px 12px; background: var(--surface); color: var(--muted); font-family: var(--mono); font-size: 10px; border: 1px solid var(--line-soft); }
.chart-wrap { height: 390px; border: 1px solid var(--line); border-top: 0; background: #101411; }
#kline-chart { display: block; width: 100%; height: 100%; cursor: crosshair; }

footer { display: flex; justify-content: space-between; gap: 30px; width: min(1440px, calc(100% - 80px)); margin: 0 auto; padding: 24px 0 32px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 9px; }
footer p { margin: 0; max-width: 760px; }
footer span { flex: 0 0 auto; font-family: var(--mono); letter-spacing: .08em; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pulse { 50% { opacity: .55; } }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr 390px; gap: 45px; }
  .decision-layout { grid-template-columns: 1fr; }
  .verdict-panel { grid-template-columns: 170px 1fr; border-right: 0; border-bottom: 1px solid var(--line); }
  .modules { grid-template-columns: repeat(3, 1fr); }
  .module:nth-child(4) { border-left: 0; }
  .module:nth-child(n+4) { border-top: 1px solid var(--line); }
  .module:nth-child(4) { grid-column: span 1; }
}

@media (max-width: 800px) {
  .topbar, main, footer { width: min(100% - 36px, 680px); }
  .topbar { height: 74px; }
  .session-meta span:not(.live-dot):not(:last-child) { display: none; }
  .meta-divider { display: none; }
  .hero { grid-template-columns: 1fr; padding: 48px 0; gap: 40px; }
  .hero h1 { font-size: clamp(40px, 10vw, 58px); }
  .query-console { max-width: 520px; }
  .question-grid { grid-template-columns: 1fr; }
  .question-grid article, .question-grid article + article { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--line-soft); }
  .question-grid p { max-width: none; }
  .modules { grid-template-columns: 1fr 1fr; }
  .module:nth-child(3), .module:nth-child(5) { border-left: 0; }
  .module:nth-child(n+3) { border-top: 1px solid var(--line); }
  .module:nth-child(4) { border-left: 1px solid var(--line); }
  .chart-header { align-items: flex-start; flex-direction: column; }
  footer { flex-direction: column; gap: 10px; }
}

@media (max-width: 520px) {
  .topbar, main, footer { width: calc(100% - 28px); }
  .session-meta { font-size: 9px; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 39px; }
  .hero-description { font-size: 12px; }
  .desktop-only { display: none; }
  .principles { gap: 12px; }
  .query-console { padding: 22px 18px; }
  .console-foot { font-size: 8px; }
  .result-heading { align-items: flex-start; }
  .result-heading h2 { font-size: 29px; }
  .result-heading h2 small { display: block; margin: 7px 0 0; }
  .verdict-panel { grid-template-columns: 125px 1fr; column-gap: 16px; padding: 22px 16px; }
  .score-wrap, .score-ring { width: 125px; height: 125px; }
  .score-number strong { font-size: 40px; }
  .verdict-copy h3 { font-size: 22px; }
  .trade-plan { padding: 24px 16px; }
  .price-levels > div { padding: 0 10px; }
  .price-levels strong { font-size: 24px; }
  .price-levels small { display: none; }
  .section-title small { display: none; }
  .modules { grid-template-columns: 1fr; }
  .module + .module, .module:nth-child(4) { border-left: 0; }
  .module:nth-child(n+2) { border-top: 1px solid var(--line); }
  .chart-wrap { height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.backtest-section { margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--line); }
.backtest-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.backtest-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.backtest-controls label { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 9px; }
.backtest-controls select, .backtest-controls input { height: 30px; padding: 0 8px; background: #0e1210; border: 1px solid #3b453e; color: var(--text); font-family: var(--mono); font-size: 10px; }
.backtest-controls select:focus, .backtest-controls input:focus { border-color: var(--acid-strong); outline: 0; }
.backtest-controls input { width: 104px; }
.run-backtest { height: 30px; padding: 0 15px; border: 1px solid var(--acid-strong); background: transparent; color: var(--acid); cursor: pointer; font-size: 10px; transition: background .2s, color .2s; }
.run-backtest:hover { background: var(--acid-strong); color: #17200e; }
.run-backtest:disabled { cursor: wait; opacity: .55; }
.backtest-note { margin: 14px 0 0; color: var(--faint); font-size: 10px; line-height: 1.7; }
.backtest-status { margin-top: 10px; padding: 9px 12px; border: 1px solid var(--line-soft); background: var(--surface); color: var(--muted); font-family: var(--mono); font-size: 10px; }
.backtest-status.muted { color: var(--faint); }
.bt-stats { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bt-stat { min-width: 0; padding: 15px 14px; }
.bt-stat + .bt-stat { border-left: 1px solid var(--line); }
.bt-stat span { display: block; color: var(--muted); font-size: 9px; }
.bt-stat strong { display: block; margin-top: 4px; font-family: var(--mono); font-size: clamp(15px, 1.5vw, 21px); font-weight: 400; letter-spacing: -.03em; }
.bt-stat.up strong { color: var(--up); }
.bt-stat.down strong { color: var(--down); }
.equity-wrap { height: 280px; }
.trade-table-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--line); }
.trade-table { width: 100%; min-width: 660px; border-collapse: collapse; font-family: var(--mono); font-size: 10px; }
.trade-table caption { padding: 10px 12px; color: var(--faint); font-size: 9px; letter-spacing: .1em; text-align: left; }
.trade-table th { padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--faint); font-weight: 400; text-align: right; }
.trade-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); color: var(--muted); text-align: right; white-space: nowrap; }
.trade-table th:first-child, .trade-table td:first-child { text-align: left; }
.trade-table tr:last-child td { border-bottom: 0; }
.trade-table td.profit { color: var(--up); }
.trade-table td.loss { color: var(--down); }
.trade-table td.trade-empty { padding: 22px !important; color: var(--faint); text-align: center; }
@media (max-width: 1100px) {
  .bt-stats { grid-template-columns: repeat(4, 1fr); }
  .bt-stat:nth-child(5) { border-left: 0; }
  .bt-stat:nth-child(n+5) { border-top: 1px solid var(--line); }
}
@media (max-width: 800px) {
  .bt-stats { grid-template-columns: repeat(2, 1fr); }
  .bt-stat:nth-child(odd) { border-left: 0; }
  .bt-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .backtest-controls { width: 100%; }
}
@media (max-width: 520px) {
  .backtest-controls label { flex: 1 1 46%; justify-content: space-between; }
  .backtest-controls select, .backtest-controls input { flex: 1; width: auto; }
  .run-backtest { flex: 1 1 100%; }
  .equity-wrap { height: 240px; }
}

.environment-card { margin-top: 12px; padding: 16px 20px; border: 1px solid var(--line); background: var(--surface); border-left: 2px solid var(--amber); }
.environment-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.environment-head > span { color: var(--faint); font-family: var(--mono); font-size: 9px; letter-spacing: .14em; }
.environment-head strong { color: var(--amber); font-size: 14px; font-weight: 500; }
.environment-head b { margin-left: auto; color: var(--amber); font-family: var(--mono); font-size: 24px; font-weight: 400; line-height: 1; }
.environment-card.positive { border-left-color: var(--acid-strong); }
.environment-card.positive .environment-head strong, .environment-card.positive .environment-head b { color: var(--acid); }
.environment-card.negative { border-left-color: var(--danger); }
.environment-card.negative .environment-head strong, .environment-card.negative .environment-head b { color: var(--danger); }
.environment-card.warm { border-left-color: var(--acid); }
.environment-card.warm .environment-head strong, .environment-card.warm .environment-head b { color: var(--acid); }
.environment-card.cold { border-left-color: var(--amber); }
.environment-summary { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.environment-reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 24px; margin: 10px 0 0; padding: 0; list-style: none; }
.environment-reasons li { position: relative; padding-left: 10px; color: var(--muted); font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; }
.environment-reasons li::before { content: ""; position: absolute; top: .75em; left: 0; width: 3px; height: 3px; background: var(--faint); }

.monitor-section { margin: 0 0 72px; padding-top: 26px; border-top: 1px solid var(--line); }
.monitor-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.monitor-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.monitor-controls label { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 9px; }
.monitor-controls select { height: 30px; padding: 0 8px; border: 1px solid #3b453e; background: #0e1210; color: var(--text); font-family: var(--mono); font-size: 10px; }
.monitor-controls select:focus { border-color: var(--acid-strong); outline: 0; }
.monitor-toggle { height: 30px; padding: 0 16px; border: 1px solid var(--acid-strong); background: transparent; color: var(--acid); cursor: pointer; font-size: 10px; transition: background .2s, color .2s; }
.monitor-toggle:hover, .monitor-toggle.running { background: var(--acid-strong); color: #17200e; }
.monitor-ghost { height: 30px; padding: 0 14px; border: 1px solid #3b453e; background: none; color: var(--muted); cursor: pointer; font-size: 10px; }
.monitor-ghost:hover { border-color: var(--acid-strong); color: var(--acid); }
.monitor-ghost.enabled { border-color: rgba(198, 243, 107, .4); color: var(--acid); }
.monitor-ghost:disabled { cursor: not-allowed; opacity: .55; }
.monitor-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.watch-form { display: flex; height: 32px; }
.watch-form input { width: 220px; padding: 0 10px; border: 1px solid #3b453e; border-right: 0; background: #0e1210; color: var(--text); font-family: var(--mono); font-size: 11px; }
.watch-form input::placeholder { color: #556058; }
.watch-form input:focus { border-color: var(--acid-strong); outline: 0; }
.watch-form button { padding: 0 13px; border: 1px solid #3b453e; background: #1a1f1c; color: var(--muted); cursor: pointer; font-size: 10px; }
.watch-form button:hover { color: var(--acid); border-color: var(--acid-strong); }
.watch-list { display: flex; flex-wrap: wrap; gap: 6px; }
.watch-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 5px 3px 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-family: var(--mono); font-size: 10px; }
.watch-chip button { padding: 0 2px; border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 13px; line-height: 1; }
.watch-chip button:hover { color: var(--danger); }
.monitor-status { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: 9px; }
.monitor-note { margin: 12px 0 0; color: var(--faint); font-size: 10px; line-height: 1.7; }
.monitor-table-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--line); }
.monitor-table { width: 100%; min-width: 760px; border-collapse: collapse; font-family: var(--mono); font-size: 10px; }
.monitor-table caption { padding: 10px 12px; color: var(--faint); font-size: 9px; letter-spacing: .1em; text-align: left; }
.monitor-table th { padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--faint); font-weight: 400; text-align: right; }
.monitor-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); color: var(--muted); text-align: right; white-space: nowrap; }
.monitor-table th:first-child, .monitor-table td:first-child { text-align: left; }
.monitor-table tr:last-child td { border-bottom: 0; }
.monitor-name strong { display: block; color: var(--text); font-family: var(--body); font-size: 12px; font-weight: 500; }
.monitor-name small { color: var(--faint); font-size: 9px; letter-spacing: .04em; }
.monitor-score strong { color: var(--text); font-size: 15px; font-weight: 400; }
.monitor-score small { margin-left: 5px; color: var(--faint); font-size: 9px; }
.monitor-table td.up { color: var(--up); }
.monitor-table td.down { color: var(--down); }
.monitor-table td.provisional { color: var(--amber); }
.monitor-table td.monitor-error { color: var(--danger); text-align: left; white-space: normal; }
.monitor-table td.monitor-empty { padding: 22px !important; color: var(--faint); text-align: center; }
.alert-center { margin-top: 18px; border: 1px solid var(--line); background: rgba(20, 24, 22, .6); }
.alert-center-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.alert-center-head h4 { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .04em; }
.alert-center-head button { padding: 0; border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 9px; }
.alert-center-head button:hover { color: var(--danger); }
#alert-list { max-height: 240px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.center-alert { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); border-left: 2px solid var(--amber); }
.center-alert.candidate { border-left-color: var(--acid-strong); }
.center-alert.veto { border-left-color: var(--danger); }
.center-alert-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.center-alert-head strong { color: var(--text); font-size: 11px; font-weight: 500; }
.center-alert-head span { color: var(--faint); font-family: var(--mono); font-size: 9px; }
.center-alert p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.alert-empty { padding: 16px; color: var(--faint); font-size: 10px; text-align: center; list-style: none; }

@media (max-width: 800px) {
  .environment-reasons { grid-template-columns: 1fr 1fr; }
  .monitor-status { width: 100%; margin-left: 0; }
}
@media (max-width: 520px) {
  .environment-reasons { grid-template-columns: 1fr; }
  .monitor-controls, .watch-form { width: 100%; }
  .watch-form input { flex: 1; width: auto; min-width: 0; }
  .monitor-toggle, .monitor-ghost { flex: 1; }
}
