:root {
  --ink: #172d33;
  --muted: #718185;
  --line: #e2e8e5;
  --bg: #f5f7f4;
  --green: #216854;
  --mint: #e7f1eb;
  --red: #ad3b3b;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
button:disabled,
select:disabled {
  cursor: default;
  opacity: 0.55;
}
:focus-visible {
  outline: 3px solid #65ad95;
  outline-offset: 4px;
}
.skip-link {
  position: fixed;
  top: -70px;
  left: 20px;
  background: white;
  padding: 12px;
  z-index: 10;
}
.skip-link:focus {
  top: 10px;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 232px;
  background: #172f33;
  color: #dbe7e3;
  padding: 36px 24px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: #fff;
}
.brand-mark {
  background: #d8eee0;
  color: #1d5242;
  display: grid;
  place-items: center;
  width: 41px;
  height: 42px;
  border-radius: 13px;
  font-size: 27px;
  font-weight: 400;
}
.brand-second {
  display: block;
  font-weight: 400;
  color: #b1cbc0;
}
.workspace-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  margin: 58px 0 17px;
  color: #91aaa6;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  margin-bottom: 6px;
  padding: 14px;
  border-radius: 8px;
  font-size: 13px;
  color: white;
}
.nav-item.active {
  background: #2a4748;
}
.nav-item span {
  font-size: 20px;
  color: #b7d5c6;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 12px;
  padding-top: 40px;
  color: #c1d8ca;
}
.sidebar-bottom p {
  font-size: 11px;
  line-height: 1.8;
  color: #8fa9a2;
  margin-top: 13px;
}
.environment-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #99d5b8;
  border-radius: 100%;
  margin-right: 7px;
}
.workspace {
  margin-left: 232px;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.topbar {
  min-height: 78px;
  padding: 20px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fafcf9;
  gap: 18px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  padding: 0 12px;
  color: #a2b1ab;
}
.topbar-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}
.demo-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  color: var(--green);
  background: var(--mint);
  padding: 8px 10px;
  border-radius: 5px;
  white-space: nowrap;
}
main {
  padding: 38px 42px 45px;
  width: 100%;
  max-width: 1580px;
  margin: 0 auto;
  flex: 1;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 31px;
  font-weight: 600;
  letter-spacing: -1.1px;
  margin-bottom: 9px;
  line-height: 1.2;
}
h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.25px;
  margin: 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.65px;
  color: var(--green);
  font-weight: 650;
  margin-bottom: 13px;
}
.subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
}
.button {
  border: 1px solid transparent;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 17px;
  font-size: 13px;
  font-weight: 600;
  min-height: 42px;
  transition: background 0.15s;
}
.primary {
  background: var(--green);
  color: white;
}
.primary:hover:not(:disabled) {
  background: #174e3e;
}
.quiet {
  background: transparent;
  color: var(--muted);
  padding: 8px 0;
  font-size: 12px;
}
.quiet:hover {
  color: var(--ink);
}
.login-view {
  max-width: 650px;
  margin: 40px auto 25px;
  text-align: center;
}
.login-view h1 {
  font-size: 38px;
  line-height: 1.22;
  letter-spacing: -1.5px;
}
.intro {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin: 22px 0 28px;
}
.login-card {
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 30px;
  max-width: 410px;
  margin: 0 auto;
  box-shadow: 0 8px 30px #24432b04;
}
.login-card h2 {
  margin-bottom: 25px;
  font-size: 18px;
}
.login-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 9px;
}
.login-card input {
  border: 1px solid #ccd8d0;
  padding: 13px 14px;
  border-radius: 6px;
  width: 100%;
  min-height: 46px;
  color: var(--ink);
  background: #fcfdfa;
}
.login-card input::placeholder {
  color: #9aa7a0;
  font-size: 13px;
}
.field-help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 10px 0 22px;
}
.login-card .primary {
  width: 100%;
  justify-content: space-between;
}
.privacy-note {
  margin: 22px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.error-text {
  color: var(--red);
  font-size: 12px;
  line-height: 1.7;
  margin: 16px 0 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 29px;
}
.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.account-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.account-picker label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.account-picker select {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  padding: 10px 34px 10px 12px;
  font-size: 13px;
  max-width: 310px;
  min-width: 180px;
  width: 100%;
}
.update-status {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}
.status-dot {
  background: #a6b3ac;
  width: 6px;
  height: 6px;
  border-radius: 100%;
  flex-shrink: 0;
}
.status-dot.success {
  background: #549779;
}
.status-dot.error {
  background: var(--red);
}
.status-dot.loading {
  background: #b59253;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  padding: 22px 20px;
  border-radius: 9px;
  min-height: 143px;
  min-width: 0;
  container-type: inline-size;
}
.metric:first-child {
  border-color: #c8ddd0;
  background: #fafffa;
}
.metric-label {
  display: block;
  font-size: 12px;
  color: #687e75;
  margin-bottom: 18px;
}
.metric-value {
  font-size: 29px;
  font-size: clamp(18px, 14cqi, 29px);
  line-height: 1.25;
  letter-spacing: -1px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow-x: auto;
}
.metric-value.compact {
  font-size: 23px;
  font-size: clamp(14px, 11cqi, 23px);
}
.metric-value.long {
  font-size: 18px;
  font-size: clamp(12px, 6cqi, 18px);
}
.metric-unit {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 9px;
  letter-spacing: 0.1px;
}
.mode-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 27px;
  padding: 17px 2px 25px;
  font-size: 11px;
  color: var(--muted);
}
.mode-bar strong {
  font-weight: 500;
  color: #3b554c;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 22px;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 23px 20px;
  gap: 12px;
}
.panel-tag {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 10px;
  letter-spacing: 0.2px;
  font-weight: 500;
  color: #7f8d86;
  background: #f9fbf8;
  white-space: nowrap;
  padding: 13px 20px;
  border-top: 1px solid #eff2ed;
  border-bottom: 1px solid #eff2ed;
}
td {
  padding: 18px 20px;
  border-bottom: 1px solid #eff2ed;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
tbody tr:last-child td {
  border-bottom: none;
}
.numeric {
  text-align: right;
}
.symbol {
  font-weight: 650;
}
.market {
  font-size: 10px;
  color: var(--muted);
}
.side-tag {
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 4px;
  background: #eaf3ed;
  color: #2b7151;
}
.side-tag.sell {
  background: #f8ece9;
  color: #a35a4d;
}
.table-empty {
  padding: 35px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  border-top: 1px solid #eff2ed;
}
.panel-footnote {
  padding: 15px 22px;
  margin: 0;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  border-top: 1px solid #eff2ed;
}
.data-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  max-width: 850px;
  margin-top: 24px;
}
.error-banner {
  border: 1px solid #ecd1cc;
  background: #fff5f2;
  color: #93473e;
  padding: 15px 18px;
  margin: 0 0 22px;
  font-size: 12px;
  line-height: 1.7;
  border-radius: 7px;
}
.empty-panel {
  background: white;
  border: 1px solid var(--line);
  padding: 55px 20px;
  border-radius: 10px;
  text-align: center;
}
.empty-panel h2 {
  margin: 15px 0;
}
.empty-panel p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 0;
}
.empty-icon {
  color: #80a391;
  font-size: 28px;
}
footer {
  border-top: 1px solid var(--line);
  margin: 0 42px;
  padding: 20px 0;
  font-size: 10px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
@media (min-width: 1650px) {
  main {
    padding-top: 48px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 200px;
    padding: 28px 20px;
  }
  .workspace {
    margin-left: 200px;
  }
  .topbar {
    padding: 18px 27px;
  }
  main {
    padding: 30px 27px;
  }
  .metric {
    padding: 20px 15px;
  }
  .metric-label {
    font-size: 11px;
  }
  .account-bar {
    align-items: flex-start;
  }
  .update-status {
    max-width: 220px;
  }
  .metrics {
    gap: 10px;
  }
  footer {
    margin: 0 27px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .workspace {
    margin-left: 0;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .account-bar {
    flex-wrap: wrap;
  }
  .update-status {
    max-width: none;
    text-align: left;
  }
  .login-view {
    margin-top: 30px;
  }
  .breadcrumb {
    font-size: 11px;
  }
}
@media (max-width: 520px) {
  .topbar {
    padding: 15px 18px;
    min-height: 65px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .breadcrumb span {
    padding: 0 5px;
  }
  .topbar-actions {
    gap: 12px;
  }
  .demo-badge {
    font-size: 8px;
    padding: 7px;
    letter-spacing: 0.6px;
  }
  main {
    padding: 26px 18px;
  }
  h1 {
    font-size: 27px;
  }
  .page-heading {
    gap: 12px;
    align-items: flex-start;
  }
  .page-heading .primary {
    font-size: 12px;
    padding: 10px 12px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .subtitle {
    font-size: 11px;
  }
  .account-picker {
    width: 100%;
    gap: 10px;
  }
  .account-picker select {
    min-width: 0;
    max-width: none;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    min-height: 132px;
    padding: 17px 13px;
  }
  .metric-label {
    font-size: 10px;
  }
  .metric-unit {
    font-size: 9px;
  }
  .mode-bar {
    font-size: 10px;
    padding-bottom: 20px;
  }
  .panel-heading {
    padding: 18px;
  }
  .panel-heading h2 {
    font-size: 14px;
  }
  .panel-tag {
    font-size: 9px;
  }
  .login-view h1 {
    font-size: 29px;
    letter-spacing: -1px;
  }
  .login-card {
    padding: 23px;
  }
  .intro {
    font-size: 13px;
  }
  .desktop-break {
    display: none;
  }
  .privacy-note {
    font-size: 10px;
  }
  footer {
    margin: 0 18px;
    flex-wrap: wrap;
    line-height: 1.6;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
.scroll-hint {
  display: none;
}
.view-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--line);
}
.view-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
}
.view-tab.active {
  border-bottom-color: var(--green);
  color: var(--green);
  font-weight: 600;
}
.journal-notice {
  background: var(--mint);
  color: var(--green);
  border: 1px solid #c8ddd0;
  padding: 15px 18px;
  font-size: 12px;
  line-height: 1.7;
  border-radius: 7px;
  margin-bottom: 22px;
}
.journal-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 20px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.event-id {
  max-width: 190px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.signal-scope {
  white-space: normal;
  min-width: 150px;
  line-height: 1.7;
}
@media (max-width: 900px) {
  .scroll-hint {
    display: block;
    margin: 0;
    padding: 0 18px 14px;
    font-size: 10px;
    color: var(--muted);
    line-height: 1.6;
  }
}
