:root {
  --bg: #070a0f;
  --surface: #111820;
  --surface-2: #161f2a;
  --text: #eef3f9;
  --muted: #8fa3b8;
  --accent: #4d9fff;
  --accent-soft: rgba(77, 159, 255, 0.14);
  --ok: #3ecf8e;
  --warn: #f5b942;
  --danger: #f07178;
  --radius: 14px;
  --font: "Pretendard", "Segoe UI", system-ui, sans-serif;
  --border: #1e2a38;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --text: #0f172a;
  --muted: #5b6b7c;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --border: #dde4ee;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

.layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 240px 1fr;
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 88vw);
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    border-bottom: none;
    box-shadow: var(--shadow);
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 35;
  }
  .sidebar-backdrop.is-visible {
    display: block;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .topbar {
    gap: 0.5rem;
  }
  .breadcrumb {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-item {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

.side-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
}
.side-links a {
  color: var(--muted);
  text-decoration: none;
}
.side-links a:hover {
  color: var(--accent);
}

.side-hint {
  margin: auto 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.result-chart-wrap {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.result-chart-wrap canvas {
  max-height: 220px;
}

.main-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.breadcrumb {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.view {
  padding: 1.5rem;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
}

.hero-input h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.hero-input .lead {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.idea-box {
  width: 100%;
  min-height: 140px;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  resize: vertical;
  box-shadow: var(--shadow);
}

.idea-box:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rank-neg {
  color: #f87171;
}

.portfolio-kpi-bar {
  margin: 0 0 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  font-size: 0.88rem;
  color: var(--muted);
}

.devboard-block {
  margin-bottom: 1.25rem;
}

.devboard-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.devboard-lead {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.devboard-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.devboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.devboard-table th,
.devboard-table td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.devboard-row {
  cursor: pointer;
}

.devboard-row:hover {
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
}

.devboard-hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.rank-tier {
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  margin-left: 0.25rem;
  background: rgba(255, 255, 255, 0.06);
}

.rank-tier-promotable {
  color: #86efac;
}

.rank-tier-revise {
  color: #fcd34d;
}

.rank-tier-exploration {
  color: var(--muted);
}

.ranking-block {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

.ranking-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: var(--muted);
}

.ranking-lead {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.ranking-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.ranking-table th,
.ranking-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.ranking-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
}

.ranking-row[data-idea-id] {
  cursor: pointer;
}

.ranking-row[data-idea-id]:hover,
.ranking-row[data-idea-id]:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.rank-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--surface-2);
  color: var(--muted);
}

.rank-universal {
  color: var(--accent);
}

.rank-coinsonar {
  color: var(--ok);
}

.rank-pos {
  color: var(--ok);
}

.rank-neg {
  color: var(--danger);
}

.recent-block {
  margin-top: 2.5rem;
}

.recent-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--muted);
}

.seed-block {
  margin-top: 1.25rem;
}

.seed-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.chip-seed {
  border-style: dashed;
}

.chip-seed-dup {
  opacity: 0.72;
  border-style: dotted;
}

.pipeline-block {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.fleet-health {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.fleet-health--underperforming,
.fleet-health--negative,
.fleet-health--degraded {
  color: var(--warn, #c9a227);
}

.fleet-health--ok {
  color: var(--ok, #3d9a6e);
}

.idea-summary-line {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.95rem;
  color: var(--accent, #7dd3fc);
}

.ai-reinforce-hints {
  margin: 0.5rem 0;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: rgba(201, 162, 39, 0.1);
  border-left: 3px solid var(--warn, #c9a227);
}

.ai-reinforce-line {
  margin: 0;
  font-size: 0.82rem;
  color: var(--warn, #c9a227);
}

.ai-reinforce-line + .ai-reinforce-line {
  margin-top: 0.35rem;
}

.strategy-spec-edit {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.strategy-spec-edit-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.strategy-spec-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
}

.strategy-spec-field textarea,
.strategy-spec-field select {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.78rem;
}

.strategy-spec-exec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.strategy-spec-exec-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
}

.reinforce-plan-list {
  margin: 0.45rem 0 0.35rem;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.reinforce-plan-item code {
  font-size: 0.78rem;
}

.fleet-health-inline.fleet-health--underperforming,
.fleet-health-inline.fleet-health--negative,
.fleet-health-inline.fleet-health--degraded {
  color: var(--warn, #c9a227);
}

.fleet-demote-hint {
  color: var(--danger, #c44);
  font-size: 0.78rem;
}

.maturity-grid {
  margin: 0.65rem 0 0.5rem;
  font-size: 0.82rem;
}

.maturity-overall {
  margin: 0 0 0.35rem;
  color: var(--muted);
}

.maturity-layers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.maturity-layer {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.maturity-score {
  font-weight: 600;
  color: var(--accent);
}

.strategy-spec-block {
  margin-top: 0.5rem;
  font-size: 0.82rem;
}

.strategy-spec-dl {
  margin: 0.35rem 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.65rem;
}

.strategy-spec-dl dt {
  color: var(--muted);
  font-weight: 500;
}

.pipeline-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.pipeline-meta {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.pipeline-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pipeline-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px dashed var(--border);
}

.pipeline-step.is-done {
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.45);
  border-style: solid;
}

.pipeline-step.is-current {
  color: var(--text);
  border-color: var(--accent);
  border-style: solid;
}

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

.pipeline-hints {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.pipeline-promo-ok {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--ok);
}

.pipeline-promo-block {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: #f0a070;
}

.pipeline-promo-warn {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: #e8c060;
}

.pipeline-runners {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.badge-source {
  background: rgba(77, 159, 255, 0.15);
  color: #7eb8ff;
}

.badge-runner {
  font-size: 0.72rem;
  margin-left: 0.25rem;
}

.source-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0.75rem;
}

.source-filter {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
}

.source-filter.is-active,
.source-filter:hover {
  border-color: var(--accent);
  color: var(--text);
}

.preset-hint-line {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.preset-recommended {
  box-shadow: 0 0 0 1px var(--accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.chip {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #fff;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.idea-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .idea-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .idea-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .view {
    max-width: 1100px;
  }
}

.idea-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  cursor: pointer;
  transition: border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.idea-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.idea-card-actions .btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

.search-bar {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  margin-bottom: 0.85rem;
}

.search-bar:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tag-filter {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
}

.tag-filter.is-active {
  background: var(--accent-soft);
  color: var(--text);
  border-color: transparent;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--border));
}

.btn-danger:hover {
  background: rgba(240, 113, 120, 0.12);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.chat-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.advanced-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.advanced-panel summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.related-block {
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.related-title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.related-link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.related-link:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.related-sim {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 0.35rem;
}

.related-deployed {
  color: var(--ok);
  margin-left: 0.25rem;
}

.suggest-banner {
  margin: 0.75rem 0;
  padding: 0.75rem 0.9rem;
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 0.9rem;
}

.custom-check-form {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.custom-check-form h4 {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.custom-check-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.custom-check-row label {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.idea-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.idea-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.detail-header {
  margin-bottom: 1.25rem;
}

.detail-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.status-label {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.edit-field {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.status-select {
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tab {
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tab.is-active {
  background: var(--accent-soft);
  color: var(--text);
  border-color: transparent;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.chat-actions {
  margin-bottom: 0.75rem;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.bubble {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  max-width: 92%;
  font-size: 0.95rem;
}

.bubble.user {
  align-self: flex-end;
  background: var(--accent-soft);
}

.bubble.assistant {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--muted);
  white-space: pre-wrap;
}

.ai-hint {
  font-size: 0.85rem;
  color: var(--warn);
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(245, 185, 66, 0.12);
  border-radius: 8px;
}

.check-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.view.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
}

.chat-input-row input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.result-card {
  margin-top: 0.75rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.result-card .verdict {
  color: var(--ok);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.empty {
  color: var(--muted);
  padding: 2rem 0;
  text-align: center;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.filter-btn {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
}

.filter-btn.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 50;
  max-width: 90vw;
}

.toast.error {
  border-color: var(--danger);
}

.exp-timeline {
  margin-bottom: 1.25rem;
}

.exp-timeline-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.35rem;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding: 0 0 1rem 1.25rem;
}

.timeline-dot {
  position: absolute;
  left: -0.45rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-item[data-status="failed"] .timeline-dot {
  background: var(--danger);
}

.timeline-item[data-status="running"] .timeline-dot {
  background: var(--warn);
}

.timeline-body time {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.timeline-body strong {
  display: block;
  font-size: 0.95rem;
}

.timeline-preset {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 0.35rem;
}

.timeline-verdict {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--ok);
  font-weight: 600;
}

.timeline-metrics {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.result-card-latest {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.result-card-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.check-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.compare-table-wrap {
  margin: 1rem 0;
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compare-table th,
.compare-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.compare-table tr.compare-best td {
  background: rgba(62, 207, 142, 0.08);
}

.portfolio-queue-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 0.75rem;
}

.portfolio-check {
  width: 2.25rem;
  text-align: center;
}

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

.portfolio-table-wrap {
  margin: 0 0 1.25rem;
  overflow-x: auto;
}

.portfolio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.portfolio-table th,
.portfolio-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.portfolio-row {
  cursor: pointer;
}

.portfolio-row:hover td {
  background: var(--accent-soft);
}

.deployment-panel {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.deployment-panel.is-ready {
  border-style: solid;
  border-color: rgba(62, 207, 142, 0.35);
}

.deployment-title {
  margin: 0;
  font-size: 0.95rem;
}

.deploy-badge {
  margin-left: 0.25rem;
  background: rgba(62, 207, 142, 0.18);
  color: var(--ok);
}

.fleet-panel {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.fleet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.fleet-badge-running {
  background: rgba(77, 159, 255, 0.18);
  color: var(--accent);
}

.fleet-badge-paused {
  background: rgba(245, 185, 66, 0.18);
  color: var(--warn);
}

.fleet-badge-stopped {
  background: var(--surface);
  color: var(--muted);
}

.check-hint,
.live-hint {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.live-hint {
  padding: 0.5rem 0.75rem;
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px dashed var(--border);
}

.auth-panel {
  margin-top: 1.25rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.auth-label {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-email {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  word-break: break-all;
}

.auth-email-input {
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}

.auth-muted {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.auth-banner {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 0.9rem;
}
