:root {
  --ink: #17221d;
  --muted: #6d7771;
  --faint: #99a19c;
  --line: #e5e8e5;
  --paper: #f7f8f6;
  --card: #fff;
  --side: #10231b;
  --side2: #1a3428;
  --green: #167752;
  --green2: #dff3e9;
  --lime: #b9eb89;
  --amber: #bb6b16;
  --amber-bg: #fff0d8;
  --red: #c2493c;
  --red-bg: #fee9e6;
  --indigo: #5366d9;
  --indigo-bg: #eaedff;
  --shadow: 0 8px 28px rgba(23, 34, 29, 0.08);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 1060px;
  background: var(--paper);
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
.hidden {
  display: none !important;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}
.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--side);
  color: #dce6e0;
  padding: 25px 16px 18px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 25px;
  font-weight: 750;
  font-size: 19px;
  color: #fff;
  letter-spacing: -0.4px;
}
.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 7px);
  gap: 3px;
  transform: rotate(45deg);
}
.brand-mark i {
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--lime);
  border-radius: 2px;
}
.brand-mark i:nth-child(2),
.brand-mark i:nth-child(3) {
  background: var(--lime);
}
.workspace-switcher {
  padding-bottom: 18px;
  position: relative;
}
.workspace-switcher > label {
  display: block;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #769185;
  margin: 0 10px 7px;
}
.project-switch {
  width: 100%;
  border: 1px solid #294538;
  background: #1a3127;
  color: #fff;
  border-radius: 9px;
  padding: 10px 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  cursor: pointer;
}
.project-switch span:first-child {
  min-width: 0;
}
.project-switch b,
.project-switch small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-switch b {
  font-size: 13px;
}
.project-switch small {
  color: #88a498;
  font-size: 11px;
  margin-top: 2px;
}
.project-menu {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 10;
  background: #fff;
  color: var(--ink);
  padding: 6px;
  border-radius: 9px;
  box-shadow: var(--shadow);
}
.project-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  padding: 9px;
  border-radius: 6px;
  cursor: pointer;
}
.project-menu button:hover {
  background: var(--paper);
}
nav {
  overflow: auto;
}
nav .nav-label {
  font-size: 9px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: #587468;
  padding: 17px 11px 7px;
}
nav a {
  color: #9fb1a9;
  text-decoration: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8.5px 10px;
  margin: 2px 0;
  border-radius: 7px;
  transition: 0.15s;
}
nav a:hover {
  background: #193026;
  color: #fff;
}
nav a.active {
  background: #244436;
  color: #fff;
}
nav a em {
  margin-left: auto;
  background: var(--lime);
  color: #193026;
  font-style: normal;
  font-weight: 750;
  border-radius: 20px;
  font-size: 10px;
  min-width: 18px;
  text-align: center;
  padding: 2px 5px;
}
.nav-icon {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: #789588;
}
.active .nav-icon {
  color: var(--lime);
}
.live-dot:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5be09d;
  box-shadow: 0 0 0 4px rgba(91, 224, 157, 0.12);
}
.sidebar-foot {
  border-top: 1px solid #294238;
  margin-top: auto;
  padding: 17px 5px 0;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 9px;
  align-items: center;
}
.sidebar-foot b,
.sidebar-foot small {
  display: block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-foot b {
  font-size: 11px;
}
.sidebar-foot small {
  font-size: 10px;
  color: #779185;
  margin-top: 2px;
}
.sidebar-foot button {
  border: 0;
  background: transparent;
  color: #789286;
  cursor: pointer;
  font-size: 17px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #d7ebdf;
  color: #1b4232;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}
main {
  min-width: 0;
}
.topbar {
  height: 67px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}
#breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--faint);
}
#breadcrumb strong {
  color: var(--ink);
  font-weight: 650;
}
#breadcrumb b {
  font-weight: 400;
}
.top-actions {
  display: flex;
  gap: 7px;
}
.select-control {
  height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  display: flex;
  align-items: center;
  padding-left: 9px;
  font-size: 11px;
  color: var(--faint);
}
.select-control select {
  border: 0;
  background: transparent;
  font-weight: 600;
  color: var(--ink);
  outline: 0;
  padding: 0 25px 0 5px;
}
.content {
  padding: 29px 31px 60px;
  max-width: 1500px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.page-head h1 {
  font-size: 26px;
  line-height: 1;
  margin: 0 0 9px;
  letter-spacing: -0.7px;
}
.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 9px 13px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.button:hover {
  border-color: #bdc5c0;
}
.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.button.danger {
  color: var(--red);
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 14px;
}
.metric {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 17px 18px;
  min-height: 118px;
}
.metric-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.metric-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--green2);
  color: var(--green);
  display: grid;
  place-items: center;
}
.metric strong {
  display: block;
  font-size: 27px;
  letter-spacing: -1px;
  margin-top: 13px;
}
.metric small {
  display: block;
  color: var(--faint);
  font-size: 10px;
  margin-top: 4px;
}
.metric small.up {
  color: var(--green);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 14px;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.panel-head {
  padding: 16px 18px 13px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 13px;
  margin: 0;
}
.panel-head p {
  font-size: 10px;
  color: var(--faint);
  margin: 4px 0 0;
}
.panel-head a {
  font-size: 11px;
  color: var(--green);
  text-decoration: none;
  font-weight: 650;
}
.chart {
  height: 218px;
  padding: 20px 18px 9px;
}
.chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart .grid {
  stroke: #eef0ee;
  stroke-width: 1;
}
.chart .area {
  fill: rgba(22, 119, 82, 0.08);
}
.chart .line {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
}
.chart .dot {
  fill: #fff;
  stroke: var(--green);
  stroke-width: 2;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 18px 15px;
  color: var(--faint);
  font-size: 9px;
}
.signal-list {
  padding: 3px 18px;
}
.signal {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f0;
}
.signal:last-child {
  border: 0;
}
.signal-icon {
  width: 29px;
  height: 29px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 12px;
  background: var(--amber-bg);
  color: var(--amber);
}
.signal-icon.good {
  background: var(--green2);
  color: var(--green);
}
.signal b,
.signal small {
  display: block;
}
.signal b {
  font-size: 11px;
}
.signal small {
  font-size: 9.5px;
  color: var(--faint);
  margin-top: 3px;
}
.signal strong {
  font-size: 11px;
}
.event-breakdown {
  padding: 6px 18px 13px;
}
.breakdown-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 3fr 45px;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  font-size: 10px;
}
.bar-track {
  height: 5px;
  border-radius: 5px;
  background: #edf0ed;
  overflow: hidden;
}
.bar {
  height: 100%;
  background: var(--green);
  border-radius: 5px;
}
.type-pill,
.status-pill {
  font-size: 9px;
  padding: 3px 7px;
  border-radius: 20px;
  background: #edf5f0;
  color: var(--green);
  text-transform: capitalize;
}
.status-pill.error {
  background: var(--red-bg);
  color: var(--red);
}
.status-pill.warn {
  background: var(--amber-bg);
  color: var(--amber);
}
.data-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.toolbar {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.search {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  width: 240px;
  font-size: 11px;
  outline: 0;
}
.search:focus {
  border-color: #8db7a4;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  padding: 10px 14px;
  background: #fafbfa;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.65px;
  color: var(--faint);
  font-weight: 650;
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef0ee;
  font-size: 11px;
}
.table tr:last-child td {
  border: 0;
}
.table tbody tr.clickable {
  cursor: pointer;
}
.table tbody tr.clickable:hover {
  background: #fbfcfb;
}
.table .primary-cell {
  font-weight: 650;
  color: var(--ink);
}
.table .sub-cell {
  display: block;
  color: var(--faint);
  font-size: 9px;
  margin-top: 3px;
}
.rate {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rate .bar-track {
  width: 75px;
}
.empty {
  padding: 65px 20px;
  text-align: center;
  color: var(--muted);
}
.empty .empty-icon {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: var(--green2);
  color: var(--green);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  font-size: 18px;
}
.empty h3 {
  font-size: 13px;
  color: var(--ink);
  margin: 0 0 6px;
}
.empty p {
  font-size: 11px;
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
}
.analysis-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 17px;
}
.analysis-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.analysis-card h3 {
  font-size: 13px;
  margin: 0;
}
.analysis-card .big-rate {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.8px;
}
.analysis-card .meta {
  font-size: 10px;
  color: var(--faint);
}
.reason-list {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.reason-row {
  display: grid;
  grid-template-columns: 1fr 90px 34px;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  font-size: 10px;
}
.reason-row .bar {
  background: var(--amber);
}
.insight-hero {
  background: var(--side);
  color: #fff;
  border-radius: 12px;
  padding: 23px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.insight-hero h2 {
  font-size: 16px;
  margin: 0 0 7px;
}
.insight-hero p {
  color: #a4b9af;
  font-size: 11px;
  margin: 0;
  max-width: 610px;
}
.method-badge {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--lime);
  border: 1px solid #3b5a4c;
  border-radius: 20px;
  padding: 6px 9px;
}
.insight-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 9px;
  padding: 18px 19px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 13px;
}
.insight-card.opportunity {
  border-left-color: var(--green);
}
.insight-card.critical {
  border-left-color: var(--red);
}
.insight-card h3 {
  font-size: 13px;
  margin: 0 0 6px;
}
.insight-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.insight-card .evidence {
  font-size: 10px;
  color: var(--faint);
  margin-top: 9px;
}
.insight-card .signal-icon {
  width: 34px;
  height: 34px;
}
.link-button {
  border: 0;
  background: none;
  color: var(--green);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.choice-group {
  margin-bottom: 14px;
}
.choice-group h2 {
  font-size: 13px;
  margin: 0 0 9px;
}
.choice-row {
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: 1fr 110px 110px 2fr;
  align-items: center;
  gap: 15px;
  font-size: 11px;
}
.choice-row:first-of-type {
  border-radius: 9px 9px 0 0;
}
.choice-row:last-child {
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 9px 9px;
}
.choice-rate {
  font-size: 16px;
  font-weight: 750;
}
.funnel-builder {
  padding: 17px;
}
.funnel-steps {
  display: flex;
  align-items: center;
  gap: 7px;
}
.funnel-steps input {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  width: 175px;
  font-size: 11px;
}
.funnel-arrow {
  color: var(--faint);
}
.funnel-results {
  display: flex;
  align-items: stretch;
  padding: 22px 18px 26px;
}
.funnel-stage {
  flex: 1;
  min-width: 0;
  position: relative;
}
.funnel-shape {
  background: var(--green2);
  border: 1px solid #c5e8d6;
  padding: 17px 12px;
  text-align: center;
  margin-right: 4px;
}
.funnel-stage:nth-child(2) .funnel-shape {
  background: #e8f4e8;
}
.funnel-stage:nth-child(3) .funnel-shape {
  background: #f2f1df;
}
.funnel-stage:nth-child(4) .funnel-shape {
  background: #f7eadc;
}
.funnel-shape b {
  display: block;
  font-size: 20px;
}
.funnel-shape small {
  font-size: 9px;
  color: var(--muted);
}
.funnel-name {
  text-align: center;
  font-size: 10px;
  font-weight: 650;
  margin-top: 9px;
}
.dropoff {
  text-align: center;
  color: var(--red);
  font-size: 9px;
  margin-top: 4px;
}
.live-banner {
  background: #effaf4;
  border: 1px solid #caebda;
  border-radius: 9px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
  font-size: 11px;
  color: #35624e;
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25ad73;
  box-shadow: 0 0 0 0 rgba(37, 173, 115, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(37, 173, 115, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 173, 115, 0);
  }
}
.event-stream {
  background: #101b16;
  color: #d9e4de;
  border-radius: 10px;
  overflow: hidden;
}
.event-stream-head {
  padding: 12px 16px;
  border-bottom: 1px solid #26362f;
  font-size: 10px;
  color: #748b80;
}
.stream-row {
  display: grid;
  grid-template-columns: 78px 100px 180px 1fr;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid #213129;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  align-items: center;
}
.stream-row:last-child {
  border: 0;
}
.stream-time {
  color: #6f877b;
}
.stream-type {
  color: var(--lime);
}
.stream-name {
  color: #fff;
  font-weight: 700;
}
.stream-details {
  color: #8ea097;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 13px;
  overflow: hidden;
}
.code-card-head {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
}
.code-card-head h2 {
  font-size: 13px;
  margin: 0;
}
.code {
  background: #13221b;
  color: #dce9e2;
  padding: 17px;
  overflow: auto;
  font:
    11px/1.7 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  white-space: pre;
}
.code .key {
  color: var(--lime);
}
.copy {
  border: 1px solid #385247;
  background: #20372d;
  color: #c9dbd2;
  border-radius: 5px;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 9px;
}
.privacy-note {
  background: var(--amber-bg);
  border: 1px solid #f2d9af;
  border-radius: 9px;
  padding: 13px 15px;
  color: #7a572d;
  font-size: 11px;
  line-height: 1.5;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 28, 22, 0.25);
  z-index: 20;
}
.drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 520px;
  background: #fff;
  z-index: 21;
  box-shadow: -15px 0 50px rgba(16, 35, 27, 0.14);
  overflow: auto;
}
.drawer-head {
  padding: 21px 22px 17px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  display: flex;
  justify-content: space-between;
}
.drawer-head h2 {
  font-size: 15px;
  margin: 0;
}
.drawer-head p {
  font-size: 10px;
  color: var(--faint);
  margin: 5px 0 0;
  font-family: ui-monospace, monospace;
}
.close {
  border: 0;
  background: #f1f3f1;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
}
.session-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 15px 22px;
}
.mini-stat {
  background: var(--paper);
  border-radius: 7px;
  padding: 10px;
}
.mini-stat small,
.mini-stat b {
  display: block;
}
.mini-stat small {
  font-size: 9px;
  color: var(--faint);
  margin-bottom: 5px;
}
.mini-stat b {
  font-size: 11px;
}
.timeline {
  padding: 12px 23px 30px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 44px 17px 1fr;
  gap: 9px;
  min-height: 58px;
}
.timeline-time {
  font-size: 9px;
  color: var(--faint);
  padding-top: 2px;
}
.timeline-marker {
  position: relative;
}
.timeline-marker:before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  top: 3px;
  left: 4px;
  z-index: 1;
}
.timeline-marker:after {
  content: "";
  position: absolute;
  width: 1px;
  background: #dce4df;
  left: 7px;
  top: 10px;
  bottom: -3px;
}
.timeline-row:last-child .timeline-marker:after {
  display: none;
}
.timeline-content b {
  font-size: 11px;
  display: block;
}
.timeline-content small {
  font-size: 9px;
  color: var(--faint);
  display: block;
  margin-top: 3px;
}
.timeline-content pre {
  font:
    9px/1.5 ui-monospace,
    monospace;
  color: #65736c;
  background: var(--paper);
  padding: 6px 8px;
  border-radius: 5px;
  white-space: pre-wrap;
}
.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  background: var(--side);
  color: #fff;
  border-radius: 8px;
  padding: 11px 15px;
  box-shadow: var(--shadow);
  z-index: 30;
  font-size: 11px;
}
.loading-state {
  display: grid;
  place-items: center;
  height: 60vh;
  color: var(--faint);
  font-size: 11px;
}
.loading-state span {
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading-state p {
  margin-top: -180px;
}
.auth-view {
  min-height: 100vh;
  background: var(--side);
  display: grid;
  place-items: center;
}
.auth-card {
  width: 390px;
  background: #fff;
  border-radius: 13px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-size: 22px;
  margin: 20px 0 7px;
}
.auth-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 20px;
}
.auth-card label {
  display: block;
  font-size: 10px;
  font-weight: 650;
  margin: 12px 0 5px;
}
.auth-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}
.auth-card .button {
  width: 100%;
  margin-top: 17px;
}
.error-message {
  color: var(--red);
  font-size: 10px;
  margin-top: 8px;
}
.auth-switch {
  width: 100%;
  border: 0;
  background: none;
  color: var(--green);
  font-size: 10px;
  font-weight: 650;
  margin-top: 14px;
  cursor: pointer;
}
@media (max-width: 1150px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .top-actions .select-control span {
    display: none;
  }
  .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .app-shell {
    grid-template-columns: 220px;
  }
}
/* Shared form feedback and keyboard access. */
body {
  min-width: 320px;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #69ad8b;
  outline-offset: 3px;
}
.auth-view {
  padding: 24px 16px;
}
.auth-card {
  width: min(100%, 420px);
}
.auth-brand {
  color: var(--ink);
  padding: 0;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 64px;
}
.password-toggle {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  border: 0;
  background: var(--paper);
  border-radius: 5px;
  padding: 0 9px;
  font-size: 12px;
  cursor: pointer;
}
.auth-card .field-feedback {
  min-height: 17px;
  margin: 7px 0 0;
  font-size: 12px;
}
.field-feedback.success {
  color: var(--green);
}
.auth-card .error-message,
.error-message {
  font-size: 12px;
}
.auth-card label {
  font-size: 12px;
}
.auth-switch {
  font-size: 12px;
}
.auth-card input[aria-invalid="true"] {
  border-color: var(--red);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.project-form {
  padding: 24px;
}
.project-form label {
  display: block;
  margin-bottom: 8px;
}
.project-form input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.project-form .button {
  margin-top: 16px;
}
.project-menu .sub-cell {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
#new-project {
  border-top: 1px solid var(--line);
  color: var(--green);
}
.drawer-actions {
  display: flex;
  gap: 10px;
  padding: 16px 22px;
}
.dialog-open {
  overflow: hidden;
}
.drawer {
  width: min(520px, 100%);
}
.drawer-head p,
.timeline-content,
.signal > div,
.insight-card > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.timeline-content pre {
  overflow-wrap: anywhere;
}
.toolbar {
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar .meta {
  margin-left: auto;
}
.data-panel {
  overflow-x: auto;
}
.table {
  min-width: 620px;
}
.table td {
  overflow-wrap: anywhere;
  max-width: 300px;
}
.stream-row {
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 0;
  border-bottom: 1px solid #213129;
  cursor: pointer;
}
.stream-row:hover {
  background: #1b3025;
}
.event-stream {
  overflow-x: auto;
}
.stream-row {
  min-width: 650px;
}
.stream-name {
  overflow-wrap: anywhere;
}
.pulse.paused {
  animation: none;
  background: var(--muted);
}
.setup-next {
  padding: 20px;
  margin-bottom: 14px;
}
.setup-next h2 {
  font-size: 15px;
}
.setup-next p {
  font-size: 13px;
  color: var(--muted);
}
a.button {
  display: inline-block;
  text-decoration: none;
}
.funnel-steps {
  flex-wrap: wrap;
}
.funnel-results {
  overflow-x: auto;
}
.funnel-stage {
  min-width: 120px;
}
.topbar {
  gap: 12px;
  height: auto;
  min-height: 67px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.top-actions {
  flex-wrap: wrap;
}
#breadcrumb {
  min-width: 0;
}
#breadcrumb > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 230px;
}
.page-head {
  gap: 14px;
}
.page-head h1 {
  line-height: 1.2;
}
.page-head p {
  line-height: 1.6;
}
.loading-state {
  height: 240px;
  align-content: center;
  gap: 14px;
}
.loading-state p {
  margin: 0;
}
.code-card-head {
  gap: 12px;
}
.code-card-head .meta {
  line-height: 1.6;
  font-size: 12px;
}
.toast {
  max-width: calc(100vw - 32px);
  font-size: 13px;
}
.insight-hero {
  gap: 20px;
}
.meta {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    padding: 16px;
  }
  .sidebar .brand {
    padding: 0 0 16px;
  }
  .workspace-switcher {
    padding-bottom: 10px;
  }
  .workspace-switcher > label {
    display: none;
  }
  .sidebar-foot {
    margin-top: 10px;
    padding-top: 10px;
  }
  nav {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 6px 0;
    white-space: nowrap;
  }
  nav .nav-label {
    display: none;
  }
  nav a {
    flex-shrink: 0;
    padding: 10px;
  }
  nav a .nav-icon {
    display: none;
  }
  .project-menu {
    top: 48px;
  }
  .topbar {
    position: relative;
    padding: 14px 16px;
  }
  .top-actions {
    width: 100%;
    gap: 8px;
  }
  .select-control {
    height: 38px;
    flex: 1;
  }
  .select-control select {
    width: 100%;
    min-width: 0;
    padding-right: 5px;
    font-size: 12px;
  }
  .content {
    padding: 23px 16px 40px;
  }
  .metric {
    padding: 14px;
    min-width: 0;
  }
  .metric strong {
    font-size: 24px;
  }
  .dashboard-grid,
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-head h1 {
    font-size: 24px;
  }
  .page-head {
    flex-wrap: wrap;
  }
  .choice-row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .insight-hero {
    display: block;
  }
  .method-badge {
    display: inline-block;
    margin-top: 15px;
  }
  .insight-card {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 15px;
    gap: 10px;
  }
  .insight-card .link-button {
    grid-column: 2;
    justify-self: start;
    padding: 8px 0;
  }
  .insight-card .signal-icon {
    width: 28px;
    height: 28px;
  }
  .code-card-head {
    align-items: center;
    flex-wrap: wrap;
  }
  .live-banner {
    flex-wrap: wrap;
  }
  .panel-head {
    gap: 12px;
  }
  .panel-head a {
    flex-shrink: 0;
  }
  .funnel-steps input {
    width: 100%;
  }
  .funnel-arrow {
    display: none;
  }
  .toolbar .search {
    width: 100%;
    flex: 1;
    min-width: 150px;
  }
  .breakdown-row {
    grid-template-columns: minmax(90px, 1fr) 1fr 35px;
  }
  .auth-card {
    padding: 24px;
  }
  .toast {
    right: 16px;
    bottom: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.funnel-step-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 140px;
}
.funnel-step-input label {
  font-size: 12px;
  font-weight: 600;
}
.funnel-step-input input {
  width: 100%;
}
.funnel-step-input .link-button {
  align-self: flex-start;
  padding: 6px 0;
}
.funnel-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

#insight-count:empty {
  display: none;
}
@media (max-width: 760px) {
  .top-actions .select-control {
    flex: 1 1 calc(50% - 8px);
    min-width: 140px;
  }
}
