:root {
  color-scheme: dark;
  --bg: #0c131b;
  --panel: #121d28;
  --panel2: #172431;
  --line: #263541;
  --muted: #9babba;
  --text: #edf2f6;
  --accent: #74dfb4;
  --amber: #edc47b;
  --red: #ff9c9c;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  outline-offset: 5px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sidebar {
  position: fixed;
  width: 224px;
  height: 100vh;
  padding: 32px 20px;
  background: #101923;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  font-size: 17px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #0a3027;
  width: 35px;
  height: 35px;
  border-radius: 9px;
  font-size: 24px;
}
.brand-sub {
  display: block;
  font-size: 7px;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin-top: 1px;
}
.workspace-label,
.tiny-label,
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 650;
  color: var(--muted);
}
.workspace-label {
  margin: 49px 12px 15px;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.sidebar nav a {
  padding: 12px;
  border-radius: 7px;
  color: #b6c2cd;
}
.sidebar nav a span {
  margin-right: 12px;
  font-size: 19px;
}
.sidebar nav .nav-active {
  background: #22352f;
  color: var(--accent);
}
.side-bottom {
  margin-top: auto;
  display: grid;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}
.side-note {
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.side-note strong {
  display: block;
  margin: 12px 0;
  color: var(--text);
  font-size: 12px;
}
.side-note p {
  font-size: 11px;
  line-height: 1.8;
  margin: 0;
}
.shell {
  margin-left: 224px;
}
.topbar {
  height: 73px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 36px;
  font-size: 12px;
  background: #101923;
}
.crumb {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
}
.slash {
  margin: 0 16px;
  color: #576674;
}
.top-right {
  display: flex;
  gap: 24px;
  align-items: center;
  color: var(--muted);
}
.pill,
.chip {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 9px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.pill {
  color: var(--accent);
  border-color: #35534b;
}
.chip {
  color: var(--muted);
}
main {
  padding: 35px 36px 20px;
  max-width: 1650px;
  margin: auto;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  color: var(--accent);
  font-size: 9px;
  margin-bottom: 8px;
}
h1 {
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -1.3px;
  font-weight: 550;
  line-height: 1.2;
  margin: 0 0 12px;
}
p {
  color: var(--muted);
  margin: 0;
}
.intro p {
  font-size: 13px;
}
.button {
  border-radius: 6px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
.primary {
  background: var(--accent);
  color: #103329;
  border-color: var(--accent);
}
.primary:hover {
  background: #a0edcd;
}
.secondary {
  background: transparent;
  color: var(--text);
}
.secondary:hover {
  background: var(--panel2);
}
.notice {
  border: 1px solid var(--line);
  border-left: 3px solid #658278;
  background: #131e28;
  border-radius: 5px;
  padding: 12px 15px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}
.notice.demo {
  border-color: #826c41;
  color: var(--amber);
  background: #282419;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.market-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px;
}
.market-switch button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 4px;
}
.market-switch .selected {
  background: #2b3b49;
  color: var(--text);
}
input {
  background: #0f1922;
  border: 1px solid #344451;
  color: var(--text);
  border-radius: 5px;
  padding: 10px;
  max-width: 100%;
  min-width: 0;
}
.ticker-label input {
  width: 130px;
  font-weight: 650;
  text-transform: uppercase;
}
.auto-label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
.auto-label input {
  accent-color: var(--accent);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  margin-bottom: 24px;
}
.metric {
  padding: 20px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.metric:last-child {
  border: 0;
}
.metric > span {
  font-size: 9px;
  letter-spacing: 1.3px;
  color: var(--muted);
}
.metric strong {
  display: block;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin: 8px 0;
  line-height: 1.3;
}
.metric small {
  font-size: 10px;
  color: var(--muted);
}
.main-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 24px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  min-width: 0;
}
.panel-head {
  padding: 21px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.15px;
}
.panel-sub {
  font-size: 11px;
  margin-top: 6px;
}
.subtle {
  color: var(--muted);
  font-weight: 400;
}
.watch-panel .panel-head {
  display: block;
}
.watch-panel .tiny-label {
  font-size: 8px;
  display: block;
  margin-top: 8px;
}
.watch-item {
  display: flex;
  width: 100%;
  background: transparent;
  border: 0;
  border-top: 1px solid #23313d;
  padding: 15px 21px;
  color: var(--text);
  text-align: left;
  justify-content: space-between;
  align-items: center;
}
.watch-item.active {
  background: #1c2c35;
  box-shadow: inset 3px 0 var(--accent);
}
.watch-item strong {
  font-size: 13px;
}
.watch-item small {
  font-size: 10px;
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.watch-item > span:last-child {
  color: var(--muted);
  font-size: 11px;
}
.watch-foot {
  font-size: 10px;
  color: var(--muted);
  padding: 15px 21px;
}
.guard-note {
  display: flex;
  gap: 12px;
  padding: 18px 21px;
  border-top: 1px solid var(--line);
}
.guard-note > span {
  color: var(--accent);
  font-size: 24px;
}
.guard-note strong {
  font-size: 11px;
  font-weight: 600;
}
.guard-note p {
  font-size: 10px;
  margin-top: 5px;
}
.chart-panel {
  display: flex;
  flex-direction: column;
}
.chart-empty {
  min-height: 285px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 58px,
    #1b2935 59px,
    transparent 60px
  );
  margin: 0 22px;
  text-align: center;
}
.chart-empty strong {
  font-weight: 500;
  font-size: 15px;
}
.chart-empty p {
  font-size: 11px;
  margin-top: 8px;
}
.empty-icon {
  color: #648679;
  font-size: 54px;
  line-height: 1.4;
}
.chart-data {
  margin: 0 18px;
  flex: 1;
  min-height: 280px;
}
.chart-data svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
}
.chart-legend {
  padding: 17px 22px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  gap: 14px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 5px;
}
.agent-panel {
  margin-bottom: 24px;
}
.agents {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 22px 22px;
}
.empty-state {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 12px;
  padding: 20px;
  border: 1px dashed #3b4a57;
  border-radius: 6px;
}
.agent {
  padding: 16px;
  background: #101923;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.agent-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.agent h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 0;
}
.badge {
  font-size: 8px;
  letter-spacing: 1px;
  border-radius: 3px;
  padding: 3px 5px;
  background: #263640;
  color: var(--muted);
}
.pass {
  color: var(--accent);
}
.blocked,
.watch {
  color: var(--amber);
}
.agent p {
  font-size: 11px;
  line-height: 1.7;
}
.decision-note {
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  padding: 16px 22px;
  background: #14212b;
}
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 24px;
}
.risk-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  padding: 0 22px;
}
.risk-form label {
  font-size: 11px;
  color: var(--muted);
}
.risk-form input {
  display: block;
  width: 100%;
  margin-top: 7px;
}
.risk-form button {
  grid-column: 1/-1;
}
.help {
  font-size: 10px;
  line-height: 1.7;
  margin: 12px 22px 17px;
}
.risk-result {
  padding: 16px;
  margin: 0 22px 15px;
  background: #0f1922;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
}
.risk-levels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.risk-levels span {
  font-size: 9px;
  display: block;
}
.risk-levels strong {
  display: block;
  color: var(--text);
  margin-top: 4px;
  font-size: 14px;
}
.wide {
  width: calc(100% - 44px);
  margin: 0 22px;
}
.trust-list {
  padding: 0 22px 22px;
  display: grid;
  gap: 25px;
}
.trust-list > div {
  display: flex;
  gap: 13px;
}
.trust-icon {
  background: #233c33;
  color: var(--accent);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
}
.trust-icon.amber {
  background: #393227;
  color: var(--amber);
}
.trust-list strong {
  font-size: 12px;
  font-weight: 600;
}
.trust-list p {
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.7;
}
.journal-summary {
  display: flex;
  gap: 25px;
  padding: 0 22px 18px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.journal-summary strong {
  color: var(--text);
  margin-left: 6px;
  font-weight: 500;
}
.journal-auto {
  margin: 0 22px;
}
.journal-wrap {
  overflow: auto;
  padding: 0 22px 22px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 500;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 14px 10px;
  border-bottom: 1px solid #21303c;
}
td button {
  font-size: 10px;
  padding: 5px 8px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 9px;
  padding: 28px 0 6px;
}
footer strong {
  letter-spacing: 1px;
  font-weight: 500;
}
footer a {
  text-decoration: underline;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip {
  position: absolute;
  left: 20px;
  top: -100px;
  background: var(--accent);
  padding: 10px;
  z-index: 10;
  color: #10291f;
}
.skip:focus {
  top: 10px;
}
@media (min-width: 1550px) {
  main {
    padding: 44px;
  }
  .main-grid {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 185px;
    padding: 25px 14px;
  }
  .shell {
    margin-left: 185px;
  }
  main {
    padding: 25px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .main-grid {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .metric {
    padding: 15px;
  }
  .metric strong {
    font-size: 19px;
  }
  .top-right .pill {
    display: none;
  }
  .agents {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 850px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 16px;
  }
  .sidebar nav {
    display: flex;
    gap: 5px;
    margin-top: 15px;
    overflow: auto;
  }
  .sidebar nav a {
    padding: 8px;
    font-size: 11px;
    white-space: nowrap;
  }
  .sidebar nav a span {
    font-size: 13px;
    margin-right: 5px;
  }
  .workspace-label,
  .side-bottom {
    display: none;
  }
  .shell {
    margin: 0;
  }
  .topbar {
    height: 50px;
    padding: 0 20px;
  }
  .top-right {
    font-size: 10px;
  }
  .main-grid {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  .intro {
    align-items: flex-start;
  }
  .intro .button {
    padding: 9px;
    font-size: 10px;
  }
  footer {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  main {
    padding: 24px 16px;
  }
  .intro {
    display: block;
  }
  .intro .button {
    margin-top: 16px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .main-grid {
    grid-template-columns: 1fr;
  }
  .watch-panel .panel-head {
    display: flex;
  }
  .watch-foot,
  .guard-note {
    display: none;
  }
  .watch-item {
    padding: 11px 20px;
  }
  .agents {
    grid-template-columns: 1fr;
  }
  .auto-label {
    margin-left: 0;
  }
  .journal-auto {
    margin-left: 22px;
  }
  .chart-empty {
    min-height: 250px;
  }
  .panel-head {
    padding: 18px;
  }
  .panel-sub {
    max-width: 280px;
  }
  .chart-legend {
    flex-wrap: wrap;
  }
  .toolbar .ticker-label {
    flex: 1;
  }
  .ticker-label input {
    width: 100%;
  }
  .market-switch {
    width: 100%;
  }
  .market-switch button {
    flex: 1;
  }
  .topbar .crumb,
  .topbar .slash {
    display: none;
  }
  .journal-panel .panel-head {
    align-items: flex-start;
  }
  .risk-levels strong {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.notification-controls { display:flex; flex-wrap:wrap; gap:10px; padding: 0 24px 12px; }
#alert-inbox {padding: 12px 24px 24px;}

.readiness-strip {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:12px;overflow:hidden;margin:20px 0;}
.readiness-strip>div {background:var(--panel);padding:18px 22px;display:grid;gap:5px;}
.readiness-strip strong {font-size:16px;letter-spacing:-.3px;}
.readiness-strip small {color:var(--muted);}
.workflow-strip {display:flex;flex-wrap:wrap;gap:12px 28px;margin:24px 0;color:var(--muted);font-size:11px;letter-spacing:.8px;}
@media(max-width:700px){.readiness-strip{grid-template-columns:1fr}.readiness-strip>div{padding:13px 18px}.workflow-strip{gap:8px 18px}}

.options-body { padding: 0 24px 24px; }
.options-body h3 { color: #74dfb4; font-size: 1.3rem; }
.options-body p { line-height: 1.6; }
