/* Steerly — shared design system (Cleanroom × Operator × Terminal)
   Source of truth for tokens and primitives across the marketing landing
   and the workbench (workbench migration is the follow-up). */

:root {
  --bg: #0b0c0e;
  --panel: #14161a;
  --raised: #1c1f25;
  --hairline: rgba(255, 255, 255, 0.07);
  --hairline-strong: rgba(255, 255, 255, 0.12);
  --text: #e8eaed;
  --dim: #8a8f98;
  --dimmer: #5c616b;
  --accent: oklch(0.78 0.13 245);
  --accent-soft: oklch(0.78 0.13 245 / 0.14);
  --allow: oklch(0.74 0.14 150);
  --allow-soft: oklch(0.74 0.14 150 / 0.16);
  --ask: oklch(0.8 0.13 78);
  --ask-soft: oklch(0.8 0.13 78 / 0.16);
  --deny: oklch(0.68 0.19 25);
  --deny-soft: oklch(0.68 0.19 25 / 0.18);
  --critical: oklch(0.62 0.22 12);
  --radius: 8px;
  --radius-sm: 5px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --serif: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --row-h: 36px;
}

[data-theme="light"] {
  --bg: #fafaf8;
  --panel: #ffffff;
  --raised: #f4f4f1;
  --hairline: rgba(0, 0, 0, 0.08);
  --hairline-strong: rgba(0, 0, 0, 0.14);
  --text: #0b0c0e;
  --dim: #6b7280;
  --dimmer: #9ca3af;
  --accent: oklch(0.55 0.16 245);
  --accent-soft: oklch(0.55 0.16 245 / 0.1);
  --allow: oklch(0.52 0.16 150);
  --allow-soft: oklch(0.52 0.16 150 / 0.1);
  --ask: oklch(0.62 0.16 70);
  --ask-soft: oklch(0.62 0.16 70 / 0.12);
  --deny: oklch(0.55 0.22 25);
  --deny-soft: oklch(0.55 0.22 25 / 0.1);
  --critical: oklch(0.5 0.24 18);
}

[data-density="compact"] {
  --row-h: 30px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}

/* ===== Logo ===== */
.ag-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  /* Steerly wordmark = Space Grotesk 600 / -0.02em (the canonical brand font,
     per the lockup spec). Only the text inherits it; the SVG mark is unaffected. */
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 14px;
}
.ag-logo svg {
  display: block;
}
.ag-logo .ag-mark {
  width: 18px;
  height: 18px;
}
.ag-logo--lg {
  font-size: 18px;
  gap: 10px;
}
.ag-logo--lg .ag-mark {
  width: 22px;
  height: 22px;
}

/* ===== Buttons ===== */
.btn {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.btn:hover {
  background: var(--raised);
}
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0c0e;
}
.btn--primary:hover {
  filter: brightness(1.08);
  background: var(--accent);
}
.btn--ghost {
  border-color: transparent;
  color: var(--dim);
}
.btn--ghost:hover {
  color: var(--text);
  background: var(--raised);
}
.btn--sm {
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
}
.btn--icon {
  width: 32px;
  padding: 0;
  justify-content: center;
}
.btn--danger {
  color: var(--deny);
  border-color: color-mix(in oklch, var(--deny) 50%, transparent);
}
.btn--danger:hover {
  background: var(--deny-soft);
}

/* ===== Pills ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--raised);
  color: var(--dim);
  border: 1px solid var(--hairline);
}
.pill--allow {
  color: var(--allow);
  background: var(--allow-soft);
  border-color: color-mix(in oklch, var(--allow) 30%, transparent);
}
.pill--ask {
  color: var(--ask);
  background: var(--ask-soft);
  border-color: color-mix(in oklch, var(--ask) 30%, transparent);
}
.pill--deny {
  color: var(--deny);
  background: var(--deny-soft);
  border-color: color-mix(in oklch, var(--deny) 35%, transparent);
}
.pill--accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in oklch, var(--accent) 30%, transparent);
}
.pill--critical {
  color: #fff;
  background: var(--critical);
  border-color: var(--critical);
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* ===== Severity bars ===== */
.sev-bar {
  width: 3px;
  border-radius: 2px;
  align-self: stretch;
  flex: none;
}
.sev-bar--low {
  background: var(--allow);
}
.sev-bar--medium {
  background: var(--ask);
}
.sev-bar--high {
  background: var(--deny);
}
.sev-bar--critical {
  background: var(--critical);
}

/* ===== Cards / panels ===== */
.panel {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
}
.panel__title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.panel__body {
  padding: 14px;
}

/* ===== Mono / utility text ===== */
.mono {
  font-family: var(--mono);
}
.dim {
  color: var(--dim);
}
.dimmer {
  color: var(--dimmer);
}
.tabular {
  font-variant-numeric: tabular-nums;
}

.kbd {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--hairline-strong);
  background: var(--raised);
  color: var(--dim);
  line-height: 1.4;
}

/* ===== Scrollbars ===== */
.scroll {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline-strong) transparent;
}
.scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.scroll::-webkit-scrollbar-thumb {
  background: var(--hairline-strong);
  border-radius: 4px;
}
.scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* ===== Severity score gauge ===== */
.gauge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--mono);
}
.gauge__bar {
  width: 4px;
  height: 14px;
  border-radius: 1px;
  background: var(--hairline);
}
.gauge__bar.on--low {
  background: var(--allow);
}
.gauge__bar.on--med {
  background: var(--ask);
}
.gauge__bar.on--high {
  background: var(--deny);
}
.gauge__bar.on--crit {
  background: var(--critical);
}

/* ===== Table ===== */
.tbl {
  width: 100%;
  border-collapse: collapse;
}
.tbl th,
.tbl td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
  vertical-align: middle;
}
.tbl th {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  background: transparent;
  border-bottom: 1px solid var(--hairline-strong);
}
.tbl tbody tr:hover {
  background: var(--raised);
  cursor: pointer;
}
.tbl tbody tr.is-active {
  background: var(--accent-soft);
}

/* utility */
.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.spacer {
  flex: 1;
}
.hairline {
  border-top: 1px solid var(--hairline);
}
.vhairline {
  border-left: 1px solid var(--hairline);
  align-self: stretch;
}

/* selection */
::selection {
  background: var(--accent-soft);
  color: var(--text);
}
