/* base.css — reset + global type + scroll + helpers */
* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg-base);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px; line-height: 1.6; letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 600px at 20% -10%, oklch(0.78 0.12 75 / 0.04), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, oklch(0.74 0.06 225 / 0.035), transparent 60%);
}

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 2px solid var(--bg-base); }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

/* ----- Type utilities ----- */
.mono { font-family: var(--font-mono); font-feature-settings: "ss01"; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-dim); font-weight: 500;
}
.section-title { font-size: 14.5px; font-weight: 600; letter-spacing: 0.02em; margin: 0; }
.dim    { color: var(--fg-dim); }
.muted  { color: var(--fg-muted); }

/* ----- Layout helpers ----- */
.row { display: flex; align-items: center; gap: var(--s-3); }
.col-stack { display: flex; flex-direction: column; gap: var(--s-3); }
.spacer { flex: 1; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line-soft); margin: var(--s-3) 0; }

/* ----- App shell skeleton ----- */
#app {
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  height: 100vh;
  overflow: hidden;
}
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 0;
}
.shell.collapsed { grid-template-columns: var(--rail-w) 1fr; }

/* ----- Card primitive ----- */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-3);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, oklch(0.21 0.006 240), transparent);
}
.card-head .lhs { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.card-head h3 {
  margin: 0; font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  font-family: var(--font-mono);
}
.card-head .num {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px;
  background: var(--bg-deep);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  color: var(--fg-dim);
}
.card-body { padding: var(--s-4); }
.card-body.dense { padding: var(--s-3) var(--s-4); }

/* shared keyframes */
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.55; } }
@keyframes spin  { to { transform: rotate(360deg); } }
