@import url('tokens.css');

/* ── Reset ──────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: 'DM Sans', sans-serif; cursor: pointer; }
input, textarea { font-family: 'DM Sans', sans-serif; }

/* ── Typography ─────────────────────────────────────────────────────────── */
.archiv  { font-family: 'Archivo Black', sans-serif; letter-spacing: -2px; line-height: 0.9; text-transform: uppercase; }
.serif   { font-family: 'Instrument Serif', serif; font-style: italic; letter-spacing: -0.5px; }
.mono    { font-family: 'Space Mono', monospace; }
.label   { font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }
.dim     { color: var(--ink-mute); }

/* ── Layout helpers ─────────────────────────────────────────────────────── */
.row   { display: flex; }
.col   { display: flex; flex-direction: column; }
.aic   { align-items: center; }
.between { justify-content: space-between; }
.end   { justify-content: flex-end; }
.center  { justify-content: center; }
.flex1 { flex: 1; }

.gap-4  { gap: 4px; }  .gap-6  { gap: 6px; }  .gap-8  { gap: 8px; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

.mt-4  { margin-top: 4px; }  .mt-6  { margin-top: 6px; }  .mt-8  { margin-top: 8px; }
.mt-10 { margin-top: 10px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }

.hr { height: 1px; background: var(--rule); margin: 24px 0; }

/* ── Feedback states ────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--rule);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 0;
  color: var(--ink-mute);
}

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-mute);
  font-size: 14px;
}

/* ── Toast ──────────────────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 2000;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
#toast.on   { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.warn { background: var(--accent); color: var(--ink); }
#toast.err  { background: #d14a3a; border-color: #d14a3a; }
