/* xpost base: reset + design tokens + minimal chrome base. */
/* CONTRACT: all other css files MUST use these tokens. */

:root {
  /* editor chrome palette (dark, one accent) */
  --bg: #0a0a0b;
  --surface: #131316;
  --surface-2: #1c1c21;
  --border: #2a2a31;
  --border-strong: #3a3a44;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #4d9bf7;
  --accent-hover: #6aabf9;
  --accent-soft: rgba(77, 155, 247, 0.12);
  --danger: #f87171;

  /* radii (one system) */
  --r-card: 12px;
  --r-input: 8px;
  --r-pill: 9999px;

  /* spacing scale */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* fonts (system stack; X falls back to system fonts anyway) */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* shadows (tinted, never pure black drop) */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.35);
  --ring: 0 0 0 3px var(--accent-soft);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-input); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
