/* Atlas Talent — design tokens */
:root {
  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Neutrals — warm-cool blend */
  --bg: #FAFAF9;
  --bg-2: #F4F4F2;
  --bg-3: #EDEDEA;
  --surface: #FFFFFF;
  --surface-tint: #FBFBF9;
  --line: #E6E5E1;
  --line-2: #D9D8D3;
  --line-strong: #BDBCB6;

  /* Text */
  --ink: #0E0E0F;
  --ink-2: #2A2B27;
  --ink-3: #5C5D58;
  --ink-4: #7F7F7A;
  --ink-5: #A3A39E;

  /* Accent — forest */
  --accent: #2F5D43;
  --accent-2: #244C36;
  --accent-tint: #E8EFEA;
  --accent-tint-2: #F1F5F2;

  /* Semantic */
  --risk: #9B4221;
  --risk-tint: #F5E7E0;
  --warn: #A6791E;
  --warn-tint: #F5EFDF;
  --ok: #2F5D43;
  --ok-tint: #E8EFEA;
  --info: #2D4F73;
  --info-tint: #E5ECF2;

  /* AI cue */
  --ai: #2F5D43;
  --ai-tint: #EEF3EF;

  /* Heatmap scale */
  --heat-1: #DAE5DD;
  --heat-2: #B6CDBF;
  --heat-3: #84B095;
  --heat-4: #4F8A6A;
  --heat-warn: #E8C879;

  /* Density (default = comfortable) */
  --d-row: 44px;
  --d-row-tight: 36px;
  --d-cell-y: 12px;
  --d-cell-x: 14px;
  --fs-base: 13.5px;
  --fs-sm: 12px;
  --fs-xs: 11px;
  --fs-lg: 15px;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 10px;
}

[data-density="compact"] {
  --d-row: 36px;
  --d-row-tight: 30px;
  --d-cell-y: 8px;
  --d-cell-x: 10px;
  --fs-base: 12.5px;
  --fs-sm: 11.5px;
  --fs-xs: 10.5px;
  --fs-lg: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}

button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.mono { font-family: var(--font-mono); font-feature-settings: "ss01"; letter-spacing: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.num { font-variant-numeric: tabular-nums; }

/* Scrollbars (subtle) */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid transparent; background-clip: padding-box; border-radius: 10px; }
*::-webkit-scrollbar-track { background: transparent; }

/* Selection */
::selection { background: var(--accent-tint); color: var(--ink); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Reusable */
.hr { height: 1px; background: var(--line); border: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: var(--fs-sm); font-weight: 500;
  white-space: nowrap;
  transition: background 80ms ease, border-color 80ms ease, transform 60ms ease;
  cursor: pointer;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:hover { background: var(--bg-2); border-color: var(--line-strong); }
.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-3); }
.btn-ghost:hover { background: var(--bg-2); color: var(--ink); }
.btn-sm { height: 26px; padding: 0 8px; font-size: var(--fs-xs); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  background: var(--bg-2); color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.chip-ok { background: var(--ok-tint); border-color: transparent; color: var(--ok); }
.chip-warn { background: var(--warn-tint); border-color: transparent; color: var(--warn); }
.chip-risk { background: var(--risk-tint); border-color: transparent; color: var(--risk); }
.chip-info { background: var(--info-tint); border-color: transparent; color: var(--info); }
.chip-ai { background: var(--ai-tint); border-color: transparent; color: var(--ai); }
.chip-ai::before { content: "◇"; font-size: 9px; }

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

.tag {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 6px;
  font-family: var(--font-mono); font-size: 10.5px;
  background: var(--bg-2); color: var(--ink-3);
  border-radius: 3px;
}

/* AI assistive treatment — subtle left rail and ◇ glyph */
.ai-block {
  position: relative;
  padding-left: 12px;
}
.ai-block::before {
  content: "";
  position: absolute; left: 0; top: 2px; bottom: 2px;
  width: 2px; background: var(--ai); opacity: 0.6;
}
.ai-glyph::before { content: "◇ "; color: var(--ai); }

/* Hide AI layer */
[data-ai="off"] .ai-only { display: none !important; }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-pad { padding: 18px 20px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.card-title { font-size: var(--fs-base); font-weight: 600; letter-spacing: -0.01em; }

/* Table */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tbl th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-4);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px var(--d-cell-x);
  border-bottom: 1px solid var(--line);
  background: var(--surface-tint);
  position: sticky; top: 0; z-index: 1;
}
.tbl td {
  padding: var(--d-cell-y) var(--d-cell-x);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tbl tbody tr:hover { background: var(--bg-2); cursor: pointer; }

/* Avatar */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-3); color: var(--ink-2);
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.avatar-sm { width: 22px; height: 22px; font-size: 9.5px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }

/* Sparkline / bar */
.bar-track { background: var(--bg-3); border-radius: 999px; height: 4px; overflow: hidden; }
.bar-fill { background: var(--accent); height: 100%; border-radius: 999px; }
