:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --surface-3: #eef2f5;
  --border: #e3e7eb;
  --border-strong: #cfd6dc;
  --text: #17212b;
  --text-2: #34424e;
  --muted: #65717d;
  --faint: #8a959f;
  --accent: #0d7d6b;
  --accent-strong: #0a5f52;
  --accent-soft: #e6f4f0;
  --accent-border: #bfe2d8;
  --info: #2563eb;
  --info-soft: #e8f0fe;
  --warn: #b45309;
  --warn-soft: #fdf0dc;
  --danger: #b42318;
  --danger-soft: #fcebea;
  --ok: #157f3d;
  --ok-soft: #e6f4ec;
  --shadow-sm: 0 1px 2px rgba(16, 24, 32, 0.05);
  --shadow-md: 0 8px 28px rgba(16, 24, 32, 0.14);
  --radius: 8px;
  --radius-sm: 6px;
  --sidebar-w: 252px;
  --topbar-h: 58px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: linear-gradient(135deg, #0d7d6b, #12a386);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand-text strong {
  font-size: 14px;
  letter-spacing: 0;
}

.brand-text span {
  color: var(--muted);
  font-size: 11px;
}

.global-search {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 12px 10px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.global-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 125, 107, 0.12);
}

.global-search .gsi {
  margin-left: 9px;
  color: var(--faint);
}

.global-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0 8px;
  outline: 0;
  font-size: 13px;
}

.global-search kbd {
  margin-right: 8px;
  padding: 1px 5px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--faint);
  font-size: 10px;
  font-family: inherit;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 12px;
}

.nav-group {
  margin-top: 12px;
}

.nav-label {
  padding: 4px 8px 5px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  text-align: left;
  font-size: 13px;
}

.nav-item:hover {
  background: var(--surface-3);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}

.nav-item .gsi {
  color: var(--muted);
}

.nav-item.active .gsi {
  color: var(--accent);
}

.nav-count {
  margin-left: auto;
  color: var(--faint);
  font-size: 11px;
}

.nav-item.active .nav-count {
  color: var(--accent);
}

.sidebar-foot {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scope-chip {
  padding: 5px 9px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

/* Main area */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}

.crumb #crumbSection {
  color: var(--faint);
}

.crumb #crumbTitle {
  color: var(--text);
  font-weight: 600;
}

.crumb-sep {
  color: var(--border-strong);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.last-updated {
  margin-right: 4px;
  color: var(--faint);
  font-size: 12px;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  flex: 0 0 auto;
}

.connection-pill.online {
  color: var(--ok);
  border-color: var(--ok);
  background: var(--ok-soft);
}

.connection-pill.online .connection-dot {
  background: var(--ok);
}

.connection-pill.local {
  color: var(--warn);
  border-color: var(--warn);
  background: var(--warn-soft);
}

.connection-pill.local .connection-dot {
  background: var(--warn);
}

.connection-pill.loading {
  color: var(--info);
  border-color: var(--info);
  background: var(--info-soft);
}

.connection-pill.loading .connection-dot {
  background: var(--info);
}

.content {
  flex: 1;
  overflow: auto;
  padding: 20px;
  scroll-behavior: smooth;
}

.content:focus {
  outline: none;
}

/* Buttons */
.primary,
.ghost,
.subtle,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.primary:hover {
  background: var(--accent-strong);
}

.ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-2);
}

.ghost:hover {
  background: var(--surface-3);
}

.subtle {
  background: transparent;
  color: var(--muted);
}

.subtle:hover {
  background: var(--surface-3);
  color: var(--text);
}

.danger-btn {
  background: var(--surface);
  border-color: #f0c4c1;
  color: var(--danger);
}

.danger-btn:hover {
  background: var(--danger-soft);
}

.small {
  height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

.full {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
}

.icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}

.icon-btn.small {
  width: 26px;
  height: 26px;
}

.menu-toggle {
  display: none;
}

/* Generic icons */
.gsi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.gsi svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Page scaffolding */
.page {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.page-head h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.page-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 720px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 10px;
}

.section-title h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.section-title .hint {
  color: var(--faint);
  font-size: 12px;
}

.section {
  padding-top: 4px;
}

/* KPI tiles */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.kpi {
  padding: 14px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.kpi-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}

.kpi-value {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
}

.kpi-foot {
  margin-top: 3px;
  color: var(--faint);
  font-size: 11px;
}

/* Framed tool containers */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.panel-head h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.panel-body {
  padding: 14px;
}

.panel-body.flush {
  padding: 0;
}

/* Toolbar / filters */
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar .spacer {
  flex: 1;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  min-width: 220px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 125, 107, 0.12);
}

.search-box .gsi {
  color: var(--faint);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.select {
  height: 34px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  outline: none;
}

.select:focus {
  border-color: var(--accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.chip.on {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.chip button {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  display: inline-flex;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge.lifecycle-production,
.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.lifecycle-sampling,
.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.lifecycle-preview,
.badge.info {
  background: var(--info-soft);
  color: var(--info);
}

.badge.lifecycle-eol,
.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.neutral {
  background: var(--surface-3);
  color: var(--muted);
}

.badge.high {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.mid {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.low {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Tables */
.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 9px 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  background: var(--surface);
}

tbody tr:hover {
  background: var(--surface-2);
}

tbody tr.selectable {
  cursor: pointer;
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cell-main {
  display: flex;
  flex-direction: column;
  min-width: 160px;
}

.cell-main strong {
  color: var(--text);
  font-weight: 600;
}

.cell-main span {
  color: var(--faint);
  font-size: 11px;
}

.mono {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas,
    monospace;
  font-size: 12px;
}

.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--faint);
}

.empty .gsi {
  margin-bottom: 8px;
  opacity: 0.6;
}

.empty p {
  margin: 0;
}

/* List cards for companies / tech / apps */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card {
  position: relative;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.card.selectable {
  cursor: pointer;
}

.card.selectable:hover {
  border-color: var(--accent-border);
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.card-head .gsi {
  color: var(--accent);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.card-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.card-body {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 12.5px;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* Spec grid */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.spec {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.spec-label {
  color: var(--faint);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.spec-value {
  margin-top: 3px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.spec-value small {
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
}

/* Drawer */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 24, 32, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(560px, 92vw);
  height: 100vh;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.drawer-head h2 {
  margin: 3px 0 0;
  font-size: 18px;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 16px 18px 24px;
}

.drawer-section {
  margin-bottom: 20px;
}

.drawer-section h3 {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.kv-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.kv {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.kv:last-child {
  border-bottom: 0;
}

.kv dt {
  color: var(--muted);
  white-space: nowrap;
}

.kv dd {
  margin: 0;
  text-align: right;
  color: var(--text);
}

.prose {
  color: var(--text-2);
  line-height: 1.65;
}

.prose p {
  margin: 0 0 8px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11px;
}

.pill.accent {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.link {
  color: var(--info);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.note {
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  color: var(--text-2);
  font-size: 12px;
}

.compare-bar {
  position: sticky;
  bottom: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 12px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.compare-bar .count {
  font-weight: 600;
}

.compare-bar .spacer {
  flex: 1;
}

.compare-bar button {
  background: #fff;
  color: var(--text);
  border: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.pagination .gsi {
  width: 14px;
  height: 14px;
}

.page-indicator {
  color: var(--text-2);
  font-size: 12px;
}

.json-preview {
  margin: 0;
  padding: 12px;
  overflow: auto;
  max-height: 360px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.subtle.danger {
  color: var(--danger);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translate(-50%, 20px);
  padding: 9px 14px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 96px 14px 1fr;
  gap: 10px;
}

.timeline-date {
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.timeline-dot {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 15px;
}

.timeline-dot::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--border-strong);
}

.timeline-dot span {
  position: relative;
  width: 9px;
  height: 9px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.timeline-card {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.timeline-card h3 {
  margin: 0;
  font-size: 13px;
}

.timeline-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.compare-table th:first-child,
.compare-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface-2);
}

.compare-table td:first-child {
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
}

/* Column menu */
.col-menu-wrap {
  position: relative;
}

.col-menu {
  display: none;
  position: absolute;
  top: 32px;
  right: 0;
  z-index: 30;
  min-width: 150px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.col-menu-wrap.open .col-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.col-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}

.col-check input {
  accent-color: var(--accent);
}

/* Compare checkbox & favorite */
.cmp-box {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
}

.cmp-box:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cmp-box.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.fav {
  color: var(--faint);
}

.fav:hover {
  color: var(--warn);
}

.fav.active {
  color: var(--warn);
}

.fav.active .gsi svg {
  fill: currentColor;
}

.fav-mark {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
  color: var(--warn);
  font-size: 11px;
}

.fav-mark .gsi svg {
  fill: currentColor;
}

.fav-change td:first-child {
  box-shadow: inset 2px 0 0 var(--warn);
}

.gsi svg.filled {
  fill: currentColor;
}

.badge.accent {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

button.pill {
  border: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
  padding: 3px 8px;
}

.link-subtle {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: var(--info);
  cursor: pointer;
}

.link-subtle:hover {
  text-decoration: underline;
}

/* Hidden helpers */
.hidden {
  display: none !important;
}

.text-muted {
  color: var(--muted);
}

.text-faint {
  color: var(--faint);
}

/* Responsive */
@media (max-width: 960px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w);
    z-index: 45;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-md);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-grid;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .spec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .content {
    padding: 14px;
  }

  .topbar {
    padding: 0 12px;
  }

  .last-updated {
    display: none;
  }

  .topbar-actions .ghost .btn-label,
  .topbar-actions .primary .btn-label {
    display: none;
  }

  .topbar-actions .ghost,
  .topbar-actions .primary {
    width: 34px;
    padding: 0;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .kpi-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .spec-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-box {
    min-width: 100%;
  }

  .toolbar .spacer {
    display: none;
  }
}
