.dev-page {
  --dev-border: rgba(255, 255, 255, 0.13);
  --dev-border-strong: rgba(255, 255, 255, 0.24);
  --dev-panel: #000000;
  --dev-panel-soft: #050505;
  --dev-muted: #a5a5aa;
  --dev-faint: #74757a;
  --dev-good: #77d68b;
  --dev-bad: #ff7676;
  --dev-warn: #e1c16e;
  --dev-grid-line: rgba(255, 255, 255, 0.055);
}

.dev-topbar-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--btn-ghost-border);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.dev-auth {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--dev-muted);
  font-size: 12px;
}

.auth-trigger {
  display: inline-flex;
  min-width: 168px;
  min-height: 38px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border: 1px solid var(--btn-ghost-border);
  border-radius: 999px;
  background: #000000;
  color: var(--text);
  cursor: pointer;
  gap: 1px;
  padding: 0 14px;
  text-align: left;
}

.auth-trigger:hover,
.auth-trigger:focus-visible,
.auth-trigger[aria-expanded="true"] {
  border-color: var(--dev-border-strong);
  outline: none;
}

.auth-trigger:focus-visible {
  box-shadow: 0 0 0 1px var(--focus-ring);
}

.auth-trigger.is-warning {
  border-color: rgba(225, 193, 110, 0.36);
}

.auth-trigger-label {
  max-width: 190px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-trigger-status {
  max-width: 190px;
  overflow: hidden;
  color: var(--dev-muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 70;
  width: min(330px, calc(100vw - 32px));
  border: 1px solid var(--dev-border-strong);
  border-radius: 8px;
  background: #000000;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.62);
  padding: 14px;
}

.auth-panel-header {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--dev-border);
}

.auth-panel-kicker {
  color: var(--dev-muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.auth-panel-header strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.auth-panel-copy {
  margin: 12px 0;
  color: var(--dev-muted);
  font-size: 13px;
  line-height: 1.35;
}

.auth-panel-error {
  margin: 10px 0;
  color: var(--dev-warn);
  font-size: 12px;
  line-height: 1.35;
}

.auth-provider-list {
  display: grid;
  gap: 8px;
}

.auth-provider-button {
  min-height: 38px;
  border: 1px solid var(--dev-border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: #050505;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 0 12px;
}

.auth-provider-button.is-google {
  background: #000000;
  color: var(--text);
}

.auth-provider-button:hover,
.auth-provider-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.auth-provider-button:focus-visible {
  box-shadow: 0 0 0 1px var(--focus-ring);
}

.auth-user {
  max-width: min(220px, 24vw);
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-sync-status {
  max-width: 160px;
  overflow: hidden;
  color: var(--dev-muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-sync-warning {
  color: var(--dev-warn);
}

.auth-button {
  min-height: 28px;
  border: 1px solid var(--btn-ghost-border);
  border-radius: 999px;
  background: #000000;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0 10px;
}

.auth-panel-secondary {
  width: 100%;
  min-height: 34px;
  border-radius: 8px;
  margin-top: 8px;
}

.auth-account-card {
  display: grid;
  gap: 3px;
  border: 1px solid var(--dev-border);
  border-radius: 8px;
  padding: 10px;
}

.auth-button:hover,
.auth-button:focus-visible {
  border-color: var(--dev-border-strong);
  outline: none;
}

.auth-button:focus-visible {
  box-shadow: 0 0 0 1px var(--focus-ring);
}

.dev-workspace {
  min-width: 0;
  min-height: 100vh;
  background: #000000;
}

.nav-open .nav {
  isolation: isolate;
  background: #000000;
  box-shadow: 22px 0 42px rgba(0, 0, 0, 0.62);
  z-index: 45;
}

.nav-open .nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #000000;
  z-index: -1;
}

.nav-open .nav-header,
.nav-open .nav-links,
.nav-open .nav-group,
.nav-open .nav-group-links {
  background: #000000;
}

.nav-open .nav-scrim {
  z-index: 40;
}

.dev-content {
  width: 100%;
  max-width: 1480px;
  margin: 0;
  padding: 14px 16px 52px;
}

@media (min-width: 980px) {
  .dev-page {
    grid-template-columns: var(--nav-width) minmax(0, 1fr);
  }

  .nav-collapsed .dev-page {
    grid-template-columns: var(--nav-collapsed) minmax(0, 1fr);
  }

  .nav-configuring.nav-config-origin-collapsed .dev-page {
    grid-template-columns: var(--nav-collapsed) minmax(0, 1fr);
  }

  .nav-configuring.nav-config-origin-expanded .dev-page {
    grid-template-columns: var(--nav-width) minmax(0, 1fr);
  }

  .nav-configuring .nav {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(390px, calc(100vw - 18px));
    height: 100vh;
    transform: translateX(0);
    background: #000000;
    box-shadow: 22px 0 42px rgba(0, 0, 0, 0.62);
    z-index: 45;
  }

  .nav-configuring .dev-workspace {
    grid-column: 2;
  }

  .nav-configuring .nav-scrim {
    display: block;
    background: rgba(0, 0, 0, 0.28);
    opacity: 1;
    pointer-events: auto;
    z-index: 40;
  }

  .dev-workspace {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100vh;
  }

  .dev-appbar {
    position: sticky;
    top: 0;
    z-index: 15;
    min-height: 60px;
    padding: 10px 28px;
  }

  .dev-content {
    max-width: none;
    padding: 16px 28px 52px;
  }
}

.nav-configuring .nav {
  background: #000000;
  z-index: 45;
}

.nav-configuring .nav-links,
.nav-configuring .nav-settings {
  background: #000000;
}

.nav-configuring .nav-scrim {
  display: block;
  background: rgba(0, 0, 0, 0.28);
  opacity: 1;
  pointer-events: auto;
  z-index: 40;
}

.dev-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--dev-border);
  background: #000000;
}

@media (max-width: 760px) {
  .dev-appbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .dev-auth {
    width: 100%;
    justify-content: flex-start;
  }

  .auth-panel {
    right: auto;
    left: 0;
  }
}

.dev-appbar h1 {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.05;
  letter-spacing: 0;
}

.dev-kicker {
  margin: 0 0 5px;
  color: var(--dev-muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
}

.tile-chrome-actions,
.manifest-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.compact-field {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--dev-muted);
  font-size: 12px;
  font-weight: 600;
}

.compact-field select,
.compact-field input {
  min-height: 32px;
  border: 1px solid var(--input-border);
  border-radius: 7px;
  background: #000000;
  color: var(--text);
  outline: none;
}

.compact-field select {
  max-width: min(360px, 42vw);
  padding: 0 28px 0 10px;
}

.compact-field select:hover,
.compact-field input:hover,
.compact-field select:focus,
.compact-field input:focus {
  border-color: var(--dev-border-strong);
}

.dev-button {
  min-height: 32px;
  border: 1px solid var(--btn-ghost-border);
  border-radius: 7px;
  padding: 0 11px;
  background: #000000;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

.dev-button:hover,
.dev-button:focus-visible {
  border-color: var(--hover-border);
}

.primary-dev {
  background: #f5f5f5;
  border-color: #f5f5f5;
  color: #050505;
}

.dashboard-stage {
  margin-top: 0;
}

.dashboard-stage-head {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}

.dashboard-stage h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.surface-region {
  min-width: 0;
  border: 1px solid var(--dev-border);
  border-radius: 10px;
  background: #000000;
  overflow: hidden;
}

.surface-grid {
  position: relative;
  min-height: 680px;
  background-image:
    linear-gradient(to right, var(--dev-grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--dev-grid-line) 1px, transparent 1px);
  background-size: var(--grid-cell-width, 24px) var(--grid-row-pitch, 12px), 100% var(--grid-row-pitch, 12px);
}

.surface-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.tile-host {
  --visual-bg: #000000;
  --visual-panel: #000000;
  --visual-border: var(--dev-border);
  --visual-border-strong: var(--dev-border-strong);
  --visual-row-border: rgba(255, 255, 255, 0.08);
  --visual-row-hover: rgba(255, 255, 255, 0.11);
  --visual-row-hover-overlay: rgba(255, 255, 255, 0.075);
  --visual-muted: var(--dev-muted);
  --visual-faint: var(--dev-faint);
  --visual-text: var(--text);
  --visual-good: var(--dev-good);
  --visual-bad: var(--dev-bad);
  --visual-warn: var(--dev-warn);
  position: absolute;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border: 1px solid var(--visual-border-strong);
  border-radius: 8px;
  background: var(--visual-bg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.tile-host.has-open-menu {
  z-index: 90 !important;
  overflow: visible;
}

.tile-host.is-dragging,
.tile-host.is-resizing,
.tile-host:hover {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
}

.tile-host.is-dragging,
.tile-host.is-resizing {
  z-index: 80;
}

.tile-header {
  position: relative;
  z-index: 32;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--visual-border);
  touch-action: none;
}

.tile-header.tile-move-handle {
  cursor: grab;
}

.tile-host.is-dragging .tile-header.tile-move-handle {
  cursor: grabbing;
}

.tile-title-block {
  flex: 1 1 auto;
  min-width: 180px;
}

.tile-title-block h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.15;
}

.tile-title-block p {
  margin: 3px 0 0;
  color: var(--dev-muted);
  font-size: 11px;
  line-height: 1.25;
}

.tile-chrome-actions {
  position: relative;
  flex: 0 0 auto;
  z-index: 35;
}

.tile-menu-button {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0;
  font-weight: 500;
  line-height: 1;
  padding: 0;
}

.tile-menu-button:hover,
.tile-menu-button:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.tile-menu-button:focus-visible {
  box-shadow: 0 0 0 1px var(--focus-ring);
}

.tile-menu-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.tile-menu-dots span {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.tile-resize-zone {
  position: absolute;
  z-index: 33;
  background: transparent;
  touch-action: none;
}

.tile-resize-n {
  top: 0;
  right: 18px;
  left: 18px;
  height: 12px;
  cursor: ns-resize;
}

.tile-resize-e {
  top: 18px;
  right: 0;
  bottom: 18px;
  width: 12px;
  cursor: ew-resize;
}

.tile-resize-s {
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 14px;
  cursor: ns-resize;
}

.tile-resize-w {
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 12px;
  cursor: ew-resize;
}

.tile-resize-ne,
.tile-resize-se,
.tile-resize-sw,
.tile-resize-nw {
  width: 26px;
  height: 26px;
}

.tile-resize-ne {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}

.tile-resize-se {
  right: 0;
  bottom: 0;
  cursor: nwse-resize;
}

.tile-resize-sw {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}

.tile-resize-nw {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}

.tile-body {
  display: block;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.attribution-tile {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
}

.portfolio-tile {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.portfolio-toolbar {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--visual-row-border);
  background: #000000;
  padding: 5px 9px;
}

.portfolio-notional {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--visual-muted);
  font-size: 11px;
  font-weight: 600;
}

.portfolio-notional input {
  width: 118px;
  min-height: 24px;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  background: #000000;
  color: var(--visual-text);
  font: inherit;
  padding: 0 8px;
  text-align: right;
}

.portfolio-notional input:focus-visible,
.grid-cell-input:focus-visible {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 1px var(--focus-ring);
  outline: none;
}

.portfolio-status {
  min-width: 0;
  overflow: hidden;
  color: var(--visual-faint);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.positive {
  color: var(--visual-good);
}

.negative {
  color: var(--visual-bad);
}

.data-table-wrap {
  min-height: 0;
  overflow: auto;
}

.data-state-note {
  border-bottom: 1px solid var(--visual-row-border);
  padding: 9px 12px;
  color: var(--visual-muted);
  font-size: 13px;
  font-weight: 600;
}

.data-state-note.is-error {
  color: var(--visual-bad);
}

.grid-group-bar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--visual-row-border);
  background: #000000;
  padding: 4px 8px;
}

.grid-group-bar.is-drag-over {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--visual-border-strong);
}

.grid-group-label {
  color: var(--visual-faint);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.grid-group-chips {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 5px;
}

.grid-group-chip {
  display: inline-flex;
  max-width: 160px;
  min-height: 21px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--visual-border);
  border-radius: 999px;
  color: var(--visual-text);
  cursor: grab;
  font-size: 11px;
  line-height: 1;
  padding: 0 6px 0 8px;
}

.grid-group-chip:focus-visible {
  outline: 1px solid var(--focus-ring);
  outline-offset: 2px;
}

.grid-group-chip button {
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--visual-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.grid-group-chip button:hover,
.grid-group-chip button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--visual-text);
  outline: none;
}

.grid-group-menu {
  position: relative;
  flex: 0 0 auto;
}

.grid-group-add {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--visual-border);
  border-radius: 6px;
  background: #000000;
  color: var(--visual-text);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0;
}

.grid-group-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 22;
  display: none;
  min-width: 150px;
  border: 1px solid var(--visual-border-strong);
  border-radius: 8px;
  background: #000000;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.58);
  padding: 5px;
}

.grid-group-menu:hover .grid-group-options,
.grid-group-menu:focus-within .grid-group-options {
  display: grid;
}

.grid-group-options button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--visual-text);
  cursor: pointer;
  padding: 0 8px;
  text-align: left;
}

.grid-group-options button:hover,
.grid-group-options button:focus-visible,
.grid-group-options button.is-active {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.data-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.data-table th,
.data-table td {
  height: var(--visual-row-height, 30px);
  border-bottom: 1px solid var(--visual-row-border);
  padding: 0 9px;
  text-align: right;
  white-space: nowrap;
}

.data-table th {
  position: sticky;
  top: 30px;
  z-index: 2;
  height: auto;
  min-height: 38px;
  background: var(--visual-panel);
  color: var(--visual-muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.05;
  padding: 5px 9px 3px;
  text-transform: uppercase;
  user-select: none;
  vertical-align: top;
  overflow: visible;
  white-space: normal;
}

.data-table th[data-sort-column-key] {
  cursor: pointer;
}

.data-table th.is-group-source {
  cursor: grab;
}

.data-table th.is-group-source:active,
.data-table th.is-dragging-group-source {
  cursor: grabbing;
}

.data-table th:focus-visible {
  outline: 1px solid var(--focus-ring);
  outline-offset: -2px;
}

.data-table .grid-edge-gutter-cell {
  width: 12px;
  padding: 0 !important;
  pointer-events: none;
}

.data-table th.has-open-filter {
  z-index: 10;
}

.data-table th:hover,
.data-table th:focus-within {
  z-index: 11;
}

.data-table [data-align="left"] {
  text-align: left;
}

.data-table [data-align="right"] {
  padding-left: 4px;
  padding-right: 7px;
}

.data-table td.grid-edit-cell {
  padding: 0;
}

.grid-cell-input {
  display: block;
  width: 100%;
  height: var(--visual-row-height, 30px);
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0 7px;
  text-align: inherit;
}

.grid-cell-input::placeholder {
  color: var(--visual-faint);
}

.grid-cell-input:hover {
  background: rgba(255, 255, 255, 0.035);
}

.grid-cell-input.is-invalid {
  background: rgba(255, 111, 111, 0.11);
  color: var(--visual-bad);
}

.data-table td.is-invalid-cell {
  box-shadow: inset 2px 0 0 var(--visual-bad);
}

.portfolio-invalid-ticker {
  color: var(--visual-bad);
}

.data-table tbody tr {
  cursor: pointer;
}

.data-table tbody tr:hover,
.data-table tbody tr.is-selected {
  background: var(--visual-row-hover);
}

.data-table tbody tr:hover td,
.data-table tbody tr.is-selected td {
  box-shadow: inset 0 0 0 9999px var(--visual-row-hover-overlay);
}

.grid-header-cell {
  position: relative;
  display: flex;
  min-height: 34px;
  align-items: center;
  padding-right: 20px;
}

.grid-header-sort {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--visual-muted);
  line-height: 1.1;
  overflow: visible;
  overflow-wrap: normal;
  text-overflow: clip;
  white-space: normal;
  word-break: normal;
}

.grid-sort-marker {
  margin-left: 4px;
  color: var(--visual-text);
}

.grid-column-menu {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 14;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.12s ease;
}

.data-table th:hover .grid-column-menu,
.data-table th:focus-within .grid-column-menu,
.data-table th.has-open-filter .grid-column-menu {
  opacity: 1;
  pointer-events: auto;
}

.grid-column-menu-button {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.82);
  color: var(--visual-muted);
  cursor: pointer;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  line-height: 1;
  padding: 0;
}

.grid-column-menu-button:hover,
.grid-column-menu-button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--visual-text);
  outline: none;
}

.grid-column-menu-popover {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 24;
  display: none;
  min-width: 132px;
  border: 1px solid var(--visual-border-strong);
  border-radius: 8px;
  background: #000000;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.58);
  padding: 5px;
}

.grid-column-menu-start .grid-column-menu-popover {
  right: auto;
  left: 0;
}

.grid-column-menu:hover .grid-column-menu-popover,
.grid-column-menu:focus-within .grid-column-menu-popover {
  display: grid;
}

.grid-column-menu-popover button {
  min-height: 27px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--visual-text);
  cursor: pointer;
  font: inherit;
  padding: 0 8px;
  text-align: left;
  text-transform: none;
}

.grid-column-menu-popover button:hover,
.grid-column-menu-popover button:focus-visible,
.grid-column-menu-popover button.is-active {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.grid-filter-popover {
  position: absolute;
  top: calc(100% + 4px);
  right: 4px;
  z-index: 8;
  display: grid;
  gap: 5px;
  width: 240px;
  max-width: min(240px, calc(100vw - 30px));
  border: 1px solid var(--visual-border-strong);
  border-radius: 8px;
  padding: 6px;
  background: #000000;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.58);
}

.grid-filter-popover-start {
  right: auto;
  left: 4px;
}

.grid-filter-popover input {
  min-width: 0;
  min-height: 28px;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  background: #000000;
  color: var(--text);
  padding: 0 8px;
  outline: none;
}

.grid-filter-popover button {
  min-height: 28px;
  border: 1px solid var(--btn-ghost-border);
  border-radius: 6px;
  background: #000000;
  color: var(--text);
  cursor: pointer;
  padding: 0 8px;
}

.grid-filter-select-all,
.grid-filter-values label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--visual-text);
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.2;
}

.grid-filter-select-all {
  border-bottom: 1px solid var(--visual-row-border);
  padding: 3px 0 6px;
}

.grid-filter-select-all input,
.grid-filter-values input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  accent-color: #f5f5f5;
}

.grid-filter-values {
  display: grid;
  gap: 5px;
  max-height: 210px;
  overflow: auto;
  padding-right: 2px;
}

.grid-filter-values span {
  min-width: 0;
  overflow: hidden;
  color: var(--visual-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-resize-grip {
  position: absolute;
  top: 0;
  right: -8px;
  bottom: 0;
  z-index: 5;
  width: 11px;
  cursor: col-resize;
  opacity: 0;
}

.column-resize-grip::after {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  border-left: 1px solid var(--visual-border-strong);
}

.data-table th:hover .column-resize-grip,
.data-table th:focus-within .column-resize-grip,
.data-table.is-resizing-column .column-resize-grip {
  opacity: 1;
}

.ticker-cell {
  color: var(--visual-text);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
}

.name-cell {
  max-width: 320px;
  overflow: hidden;
  color: var(--visual-muted);
  text-overflow: ellipsis;
}

.contribution-cell {
  background: rgba(255, 255, 255, 0.035);
}

.grid-group-row td {
  height: 28px;
  border-bottom: 1px solid var(--visual-row-border);
  background: #050505;
  color: var(--visual-muted);
  font-size: 11px;
}

.grid-group-label-cell {
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-group-row button {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--visual-text);
  cursor: pointer;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-right: 5px;
  padding: 0;
}

.grid-group-row span {
  color: var(--visual-text);
  font-weight: 600;
}

.grid-group-row em {
  margin-left: 7px;
  color: var(--visual-faint);
  font-style: normal;
}

.grid-group-aggregate {
  color: var(--visual-text);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
}

.data-table tfoot,
.data-table .grid-pinned-top-rows,
.data-table .grid-footer-row {
  background: #000000;
}

.data-table .grid-footer-row td {
  position: sticky;
  height: 43px;
  border-top: 1px solid var(--visual-border-strong);
  border-right: 1px solid var(--visual-border);
  background: #000000;
  background-clip: padding-box;
  color: var(--visual-muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
}

.data-table .grid-footer-row-bottom td {
  bottom: 0;
  z-index: 24;
  box-shadow: 0 -1px 0 var(--visual-border-strong), 0 1px 0 #000000;
}

.data-table .grid-footer-row-top td {
  top: 68px;
  z-index: 4;
  border-top-color: var(--visual-row-border);
  border-bottom: 1px solid var(--visual-border-strong);
  box-shadow: 0 1px 0 #000000;
}

.data-table .grid-footer-row strong {
  color: var(--visual-text);
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
}

.data-table .grid-footer-row td:last-child {
  border-right: 0;
}

.nav-settings {
  display: grid;
  min-width: 0;
}

.nav-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--dev-border);
}

.nav-settings-head > div,
.nav-settings-head h2 {
  min-width: 0;
}

.nav-settings-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.nav-settings-close {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.nav-settings-close:hover,
.nav-settings-close:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.nav-settings-close:focus-visible {
  box-shadow: 0 0 0 1px var(--focus-ring);
}

.settings-list {
  display: grid;
}

.nav-settings-list {
  margin: 0;
}

.setting-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--dev-border);
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-row strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.setting-label-line {
  position: relative;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 6px;
}

.setting-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  outline: none;
}

.setting-help-icon {
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--dev-border-strong);
  border-radius: 999px;
  color: var(--dev-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1;
}

.setting-help-popover {
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 8px);
  left: 50%;
  display: none;
  width: min(220px, calc(100vw - 56px));
  transform: translateX(-50%);
  border: 1px solid var(--dev-border-strong);
  border-radius: 7px;
  background: #050505;
  color: var(--muted);
  padding: 8px 9px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-transform: none;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.setting-help:hover .setting-help-popover,
.setting-help:focus-visible .setting-help-popover {
  display: block;
}

.setting-help:hover .setting-help-icon,
.setting-help:focus-visible .setting-help-icon {
  color: var(--text);
  border-color: var(--text);
}

.setting-row select,
.setting-row input[type="text"],
.setting-row input[type="date"] {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--input-border);
  border-radius: 7px;
  background: #000000;
  color: var(--text);
  padding: 0 28px 0 10px;
  outline: none;
}

.setting-row select:focus,
.setting-row select:hover,
.setting-row input[type="text"]:focus,
.setting-row input[type="text"]:hover,
.setting-row input[type="date"]:focus,
.setting-row input[type="date"]:hover {
  border-color: var(--dev-border-strong);
}

.setting-row input[type="text"],
.setting-row input[type="date"] {
  padding-right: 10px;
}

.setting-row-toggle {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.setting-row-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #f5f5f5;
}

.developer-details {
  margin-top: 18px;
  border-top: 1px solid var(--dev-border);
}

.developer-details > summary {
  width: fit-content;
  padding: 14px 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.developer-details > summary:hover,
.developer-details > summary:focus-visible {
  color: var(--text);
}

.developer-details-body {
  display: grid;
  gap: 14px;
  padding-bottom: 10px;
}

.dev-architecture {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.dev-architecture span {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--dev-border);
  border-radius: 8px;
  padding: 8px;
  background: #000000;
  color: var(--text);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.dev-architecture span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -8px;
  width: 8px;
  border-top: 1px solid var(--dev-border-strong);
}

.developer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.dev-panel {
  min-width: 0;
  border: 1px solid var(--dev-border);
  border-radius: 10px;
  background: #000000;
  overflow: hidden;
}

.manifest-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-bottom: 1px solid var(--dev-border);
}

.manifest-editor-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.manifest-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.manifest-steps li {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--dev-border);
}

.manifest-steps strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.manifest-steps span,
.event-tape p:last-child {
  margin: 0;
  color: var(--dev-muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.35;
}

.event-tape {
  padding: 12px;
}

.manifest-json {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 0;
  border-bottom: 1px solid var(--dev-border);
  background: #000000;
  color: #eeeeee;
  padding: 14px;
  resize: vertical;
  outline: none;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.manifest-json:focus {
  box-shadow: inset 0 0 0 1px var(--focus-ring);
}

.manifest-status {
  margin: 0;
  padding: 10px 14px;
  color: var(--dev-muted);
  font-size: 13px;
}

.manifest-status.is-error {
  color: var(--dev-bad);
}

@media (max-width: 1120px) {
  .dev-appbar,
  .dashboard-stage-head,
  .developer-grid {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .dev-appbar,
  .dashboard-stage-head {
    flex-direction: column;
    justify-content: flex-start;
  }

  .manifest-actions {
    justify-content: flex-start;
  }

  .dev-architecture {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dev-content {
    padding-inline: 12px;
  }

  .dev-appbar {
    min-height: 0;
  }

  .dev-architecture,
  .manifest-steps {
    grid-template-columns: 1fr;
  }

  .dev-architecture span:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -8px;
    width: 0;
    height: 8px;
    border-top: 0;
    border-left: 1px solid var(--dev-border-strong);
  }

  .tile-header,
  .manifest-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .surface-region {
    border-radius: 8px;
  }

  .surface-grid {
    background-size: 100% 64px;
  }

  .compact-field,
  .compact-field select,
  .dev-button {
    width: 100%;
  }

  .data-table .grid-footer-row td {
    min-width: 96px;
  }
}
