:root {
  --bg: #0b1016;
  --surface: #121b24;
  --surface-2: #17222d;
  --surface-3: #1c2a36;
  --border: #263543;
  --text: #eaf0f5;
  --muted: #9baab8;
  --muted-2: #6e8191;
  --teal: #4cc7b8;
  --blue: #7b9cff;
  --amber: #f2b84b;
  --red: #e46a72;
  --violet: #b989ff;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { min-height: 100vh; padding: 24px 14px 16px; background: #0d141b; border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 4px 10px 28px; }
.brand-mark { width: 30px; height: 30px; display: flex; align-items: end; gap: 3px; border: 1px solid var(--teal); border-radius: 6px; padding: 6px; }
.brand-mark span { width: 4px; display: block; background: var(--teal); }
.brand-mark span:nth-child(1) { height: 8px; }
.brand-mark span:nth-child(2) { height: 14px; background: var(--blue); }
.brand-mark span:nth-child(3) { height: 19px; }
.brand-name { font-weight: 720; font-size: 15px; line-height: 1.1; }
.brand-subtitle, .panel-kicker, .eyebrow { color: var(--muted-2); font-size: 10px; font-weight: 750; letter-spacing: .11em; line-height: 1.3; }
.brand-subtitle { margin-top: 4px; font-size: 8px; }
.main-nav { display: grid; gap: 4px; }
.nav-item { color: var(--muted); height: 40px; display: flex; align-items: center; gap: 11px; border: 1px solid transparent; background: transparent; padding: 0 11px; border-radius: 5px; text-align: left; font-size: 13px; }
.nav-item svg { width: 17px; height: 17px; stroke-width: 1.8; }
.nav-item:hover { color: var(--text); background: rgba(76,199,184,.06); }
.nav-item.active { color: var(--text); border-color: #28454a; background: #14252a; }
.nav-item.active svg { color: var(--teal); }
.nav-divider { height: 1px; margin: 12px 10px; background: var(--border); }
.sidebar-foot { margin-top: auto; }
.account-stub { border-top: 1px solid var(--border); padding: 16px 6px 3px; display: grid; grid-template-columns: 31px 1fr 24px; align-items: center; gap: 8px; }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: #284553; color: #b9f2eb; font-family: "IBM Plex Mono", Consolas, monospace; font-size: 10px; font-weight: 700; }
.account-stub strong, .account-stub span { display: block; font-size: 11px; }
.account-stub span { color: var(--muted-2); margin-top: 3px; }
.main-content { min-width: 0; }
.topbar { height: 64px; padding: 0 32px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 8; background: rgba(11,16,22,.96); }
.crumb { font-size: 13px; color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.icon-button { border: 0; background: transparent; color: var(--muted); height: 32px; width: 32px; display: inline-grid; place-items: center; border-radius: 5px; }
.icon-button:hover { color: var(--text); background: var(--surface-2); }
.icon-button svg { width: 17px; height: 17px; }
.mobile-menu { display: none; }
.status-button { height: 30px; border: 1px solid var(--border); color: var(--muted); background: transparent; border-radius: 5px; padding: 0 10px; font-size: 11px; display: flex; align-items: center; gap: 7px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.primary-button, .secondary-button { min-height: 38px; border-radius: 5px; padding: 0 13px; display: inline-flex; gap: 8px; align-items: center; justify-content: center; font-size: 12px; font-weight: 680; text-decoration: none; }
.primary-button { background: var(--teal); border: 1px solid var(--teal); color: #061112; }
.primary-button:hover { background: #64ddce; }
.secondary-button { color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.secondary-button:hover { border-color: #47717a; background: #1a2a34; }
.primary-button svg, .secondary-button svg { width: 16px; height: 16px; }
.compact { min-height: 32px; font-size: 11px; }
.header-auth { display: inline-flex; align-items: center; gap: 12px; }
.header-signin { color: #c5d3dd; font-weight: 650; text-decoration: none; }
.session-email { color: var(--muted); font-size: 11px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page { display: none; max-width: 1520px; padding: 34px 32px 42px; margin: 0 auto; }
.page.active { display: block; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.eyebrow { margin: 0 0 7px; color: var(--teal); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 28px; line-height: 1.16; font-weight: 680; }
h2 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 680; }
.page-lead { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.notice-bar { min-height: 40px; display: flex; gap: 9px; align-items: center; padding: 8px 12px; color: #b7c9d4; border: 1px solid #2d4050; background: #101c25; font-size: 11px; }
.notice-bar > svg { width: 16px; color: var(--amber); flex: 0 0 auto; }
.text-button { color: var(--teal); border: 0; background: transparent; padding: 4px 0; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.text-button svg { width: 14px; height: 14px; }
.notice-bar .text-button { margin-left: auto; }
.overview-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin-top: 16px; }
.market-panel, .status-panel, .instrument-card, .layers-panel, .process-panel, .connection-side, .plan-panel, .feature-table, .settings-panel, .help-card, .disclaimer, .device-empty { border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.market-panel { min-width: 0; overflow: hidden; }
.panel-header { min-height: 73px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.panel-header h2 { margin-top: 4px; }
.compact-heading { min-height: 67px; }
.instrument-switcher, .segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.instrument-button, .segmented button { min-width: 43px; height: 29px; border: 0; background: transparent; color: var(--muted); font-family: "IBM Plex Mono", Consolas, monospace; font-size: 11px; }
.instrument-button + .instrument-button, .segmented button + button { border-left: 1px solid var(--border); }
.instrument-button.active, .segmented button.active { color: var(--text); background: #243745; }
.chart-wrap { height: 355px; position: relative; background: #0c131a; }
.chart-wrap.large { height: 510px; }
canvas { width: 100%; height: 100%; display: block; }
.chart-badges { position: absolute; top: 13px; left: 13px; display: flex; gap: 7px; }
.data-badge { color: var(--muted); background: rgba(12,19,26,.86); border: 1px solid #2e4050; padding: 5px 7px; border-radius: 4px; font: 10px "IBM Plex Mono", Consolas, monospace; display: inline-flex; align-items: center; gap: 5px; }
.data-badge svg { width: 12px; height: 12px; color: var(--teal); }
.data-badge.sample svg { color: var(--amber); }
.chart-axis-note { position: absolute; bottom: 12px; left: 13px; color: var(--muted-2); font-size: 9px; max-width: 290px; line-height: 1.4; }
.layer-legend { min-height: 50px; padding: 0 18px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
.legend-swatch { display: inline-block; width: 14px; height: 2px; margin: 0 6px 3px 0; vertical-align: middle; }
.teal { background: var(--teal); } .blue { background: var(--blue); } .amber { background: var(--amber); } .violet { background: var(--violet); }
.status-panel { min-height: 100%; display: flex; flex-direction: column; }
.readiness-list { padding: 5px 18px; }
.readiness-row { padding: 14px 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(38,53,67,.85); color: var(--muted); font-size: 12px; }
.state { border-radius: 99px; padding: 4px 7px; font: 9px "IBM Plex Mono", Consolas, monospace; white-space: nowrap; }
.state.neutral { color: #b8c5cd; background: #25313a; }
.state.caution { color: #f7d07f; background: #3b3120; }
.state.connected { color: #a4ebe1; background: #183a39; }
.state.partial { color: #c5d1ff; background: #29365c; }
.next-action { padding: 18px; margin-top: auto; background: #101a22; }
.next-action strong { display: block; margin: 8px 0 14px; color: #dbe8ed; font-size: 12px; line-height: 1.45; font-weight: 590; }
.next-action .secondary-button { width: 100%; }
.instrument-section { margin-top: 25px; }
.section-header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 11px; }
.instrument-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.instrument-card { padding: 16px; }
.instrument-card.active-card { border-color: #386e69; background: #132129; }
.instrument-card-top { display: flex; justify-content: space-between; align-items: center; }
.instrument-card strong { font: 680 17px "IBM Plex Mono", Consolas, monospace; }
.instrument-card p { margin: 12px 0 15px; color: var(--muted); font-size: 11px; }
dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
dl div:last-child { grid-column: span 2; }
dt { color: var(--muted-2); font-size: 9px; } dd { margin: 3px 0 0; color: #d7e2e8; font: 10px "IBM Plex Mono", Consolas, monospace; }
.context-toolbar { min-height: 54px; padding: 11px 14px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--border); background: var(--surface); }
.toolbar-meta { display: flex; gap: 7px; flex-wrap: wrap; }
.context-layout { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 16px; }
.layers-panel { overflow: hidden; }
.layer-control { min-height: 76px; padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.layer-control strong, .layer-control span { display: block; }
.layer-control strong { font-size: 12px; }.layer-control span { color: var(--muted); margin-top: 4px; font-size: 10px; }
.toggle { position: relative; flex: 0 0 auto; width: 37px; height: 21px; }.toggle input { position: absolute; opacity: 0; }.toggle span { position: absolute; inset: 0; border-radius: 99px; background: #35424d; margin: 0; }.toggle span::after { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; border-radius: 50%; background: #d9e3e8; transition: transform .18s ease; }.toggle input:checked + span { background: #2f8078; }.toggle input:checked + span::after { transform: translateX(16px); background: var(--teal); }
.definition-box { margin: 16px; padding: 14px; display: flex; align-items: flex-start; gap: 9px; color: var(--muted); background: #111d26; border: 1px solid #294252; border-radius: 5px; font-size: 11px; line-height: 1.55; }.definition-box svg { width: 16px; height: 16px; color: var(--blue); flex: 0 0 auto; }.definition-box p { margin: 0; }
.connection-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; }.process-panel { overflow: hidden; }.process-step { min-height: 110px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 15px; padding: 22px; align-items: center; border-bottom: 1px solid var(--border); }.process-step:last-child { border: 0; }.process-step > span { color: var(--muted-2); font: 11px "IBM Plex Mono", Consolas, monospace; }.process-step strong { display: block; font-size: 13px; }.process-step p { color: var(--muted); font-size: 11px; margin: 6px 0 0; }.process-step > svg { color: var(--muted-2); width: 18px; }.process-step.complete > span, .process-step.complete > svg { color: var(--teal); }.process-step.active { background: #132129; }.connection-side { padding: 18px; }.code-panel { padding: 18px; border: 1px dashed #3c666b; background: #0e1921; }.code-panel strong { display: block; margin: 12px 0 5px; color: #b8fbf2; font: 20px "IBM Plex Mono", Consolas, monospace; letter-spacing: .1em; }.code-panel span { color: var(--muted); font-size: 10px; }.connection-side .definition-box { margin: 16px 0 0; }
.subscription-layout { display: grid; gap: 16px; }.plan-panel { padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }.plan-panel h2 { margin: 5px 0 6px; font-size: 19px; }.plan-panel p { margin: 0; color: var(--muted); font-size: 12px; }.feature-table { overflow: hidden; }.feature-row { min-height: 52px; display: grid; grid-template-columns: 1.3fr .55fr 1.4fr; align-items: center; padding: 0 17px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }.feature-row:first-child { border-top: 0; }.feature-row span:first-child { color: var(--text); }.feature-row svg { width: 15px; color: var(--teal); }.feature-head { color: var(--muted-2); font-size: 9px; font-weight: 750; letter-spacing: .08em; }.feature-head span:first-child { color: var(--muted-2); }
.device-empty { min-height: 320px; display: grid; align-content: center; justify-items: start; padding: 36px; }.device-empty > svg { width: 30px; height: 30px; color: var(--blue); margin-bottom: 18px; }.device-empty h2 { font-size: 18px; }.device-empty p { max-width: 520px; color: var(--muted); line-height: 1.6; font-size: 12px; margin: 10px 0 18px; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; }.settings-panel { overflow: hidden; }.settings-row { min-height: 86px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--border); }.settings-row:first-child { border-top: 0; }.settings-row strong, .settings-row span { display: block; }.settings-row strong { font-size: 12px; }.settings-row span { color: var(--muted); font-size: 10px; margin-top: 5px; }.settings-row > span { margin: 0; }.definition-box.tall { margin: 0; min-height: 100%; }
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }.help-card { padding: 20px; }.help-card svg { width: 22px; height: 22px; color: var(--teal); margin-bottom: 19px; }.help-card h2 { font-size: 15px; }.help-card p { color: var(--muted); line-height: 1.65; margin: 9px 0 0; font-size: 11px; }.disclaimer { display: flex; gap: 12px; margin-top: 17px; padding: 18px; background: #231d18; border-color: #5a482e; }.disclaimer svg { width: 19px; color: var(--amber); flex: 0 0 auto; }.disclaimer strong { font-size: 12px; }.disclaimer p { color: #d6c5a7; font-size: 11px; line-height: 1.55; margin: 6px 0 0; }
dialog { width: min(450px, calc(100vw - 32px)); border: 1px solid #36515e; border-radius: 7px; padding: 0; background: #111b24; color: var(--text); box-shadow: var(--shadow); }.dialog-close { position: absolute; right: 12px; top: 12px; z-index: 2; }dialog::backdrop { background: rgba(0,0,0,.7); }.auth-step { display: none; padding: 32px; }.auth-step.active { display: block; }.auth-step h2 { font-size: 24px; margin-bottom: 8px; }.auth-step > p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.55; margin-bottom: 22px; }.auth-step form { display: grid; gap: 14px; }.auth-step label:not(.checkbox-label) { color: #c7d5dd; display: grid; gap: 7px; font-size: 11px; }.auth-step input[type="email"], .auth-step input[type="password"] { height: 40px; border: 1px solid var(--border); border-radius: 5px; color: var(--text); background: #0b1218; padding: 0 11px; }.checkbox-label { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }.checkbox-label input { margin: 0; accent-color: var(--teal); }.full { width: 100%; }.auth-switch { margin-top: 17px; }.verify-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #466788; border-radius: 50%; color: var(--blue); background: #17283a; margin-bottom: 19px; }.verify-icon.success { color: var(--teal); border-color: #356d67; background: #14302f; }.verify-icon svg { width: 22px; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 340px; transform: translateY(14px); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; border: 1px solid #3e7770; background: #15302e; color: #c3f7f1; border-radius: 5px; padding: 11px 13px; box-shadow: var(--shadow); font-size: 11px; z-index: 20; }.toast.visible { transform: translateY(0); opacity: 1; }
@media (max-width: 1120px) { .overview-layout, .context-layout { grid-template-columns: 1fr; }.status-panel { min-height: 0; }.connection-layout, .account-grid { grid-template-columns: 1fr; }.connection-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.connection-side .definition-box { margin: 0; }.page { padding: 27px 24px; } }
@media (max-width: 850px) { .app-shell { grid-template-columns: 64px minmax(0,1fr); }.sidebar { padding: 18px 8px; }.brand-lockup { justify-content: center; padding: 3px 0 25px; }.brand-lockup > div:last-child, .nav-item span, .account-stub > div:nth-child(2), .account-stub .icon-button { display: none; }.main-nav { justify-items: center; }.nav-item { width: 40px; padding: 0; justify-content: center; }.sidebar-foot { display: none; }.topbar { padding: 0 22px; }.instrument-grid, .help-grid { grid-template-columns: 1fr; }.chart-wrap.large { height: 400px; } }
@media (max-width: 620px) { .app-shell { display: block; }.sidebar { transform: translateX(-100%); position: fixed; width: 235px; z-index: 20; transition: transform .2s ease; }.sidebar.open { transform: translateX(0); }.brand-lockup { justify-content: flex-start; padding: 5px 8px 25px; }.brand-lockup > div:last-child, .nav-item span, .account-stub > div:nth-child(2), .account-stub .icon-button { display: block; }.nav-item { width: 100%; padding: 0 11px; justify-content: flex-start; }.sidebar-foot { display: block; }.mobile-menu { display: inline-grid; }.topbar { height: 58px; padding: 0 14px; }.topbar .status-button, .topbar-actions > .icon-button { display: none; }.topbar-actions { gap: 0; }.topbar-actions .primary-button span { display: none; }.topbar-actions .primary-button { width: 34px; padding: 0; }.page { padding: 23px 14px 34px; }.page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 19px; gap: 14px; }h1 { font-size: 24px; }.notice-bar { align-items: flex-start; flex-wrap: wrap; }.notice-bar .text-button { margin-left: 25px; }.panel-header { padding: 14px; }.instrument-switcher { align-self: stretch; }.instrument-button { flex: 1; }.chart-wrap { height: 280px; }.chart-wrap.large { height: 310px; }.layer-legend { padding: 10px 14px; gap: 10px 16px; }.context-toolbar { align-items: flex-start; flex-direction: column; }.toolbar-meta { width: 100%; }.toolbar-meta .data-badge { font-size: 9px; }.connection-side { grid-template-columns: 1fr; }.process-step { grid-template-columns: 29px minmax(0,1fr); padding: 17px; }.process-step > .secondary-button, .process-step > svg { grid-column: 2; justify-self: start; }.plan-panel { align-items: flex-start; flex-direction: column; }.feature-row { grid-template-columns: 1.05fr .38fr 1fr; padding: 0 12px; font-size: 9px; }.account-grid { gap: 12px; }.settings-row { align-items: flex-start; flex-direction: column; gap: 10px; }.definition-box.tall { min-height: auto; }.device-empty { padding: 26px; }.chart-badges { flex-wrap: wrap; max-width: 220px; }.chart-axis-note { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
