/* ──────────────────────────────────────────────────────────
   Semi Wiki — shared tokens & base styles
   Dark-only, monospace-leaning technical documentation aesthetic
   ────────────────────────────────────────────────────────── */

:root {
  --bg-0: #08090b;
  --bg-1: #0e0f12;
  --bg-2: #15171c;
  --bg-3: #1c1f25;
  --bg-4: #252932;

  --bd:   #232830;
  --bd-2: #2e343d;
  --bd-3: #3a414d;

  --fg-0: #e8eaed;
  --fg-1: #a0a4ad;
  --fg-2: #6b7079;
  --fg-3: #4a4e57;

  --accent:        oklch(0.78 0.14 165);
  --accent-soft:   oklch(0.78 0.14 165 / 0.14);
  --accent-strong: oklch(0.88 0.16 165);

  --mark-bg: oklch(0.78 0.14 70 / 0.30);
  --mark-fg: oklch(0.92 0.10 70);

  --r-tag:  3px;
  --r-card: 6px;
  --r-pane: 8px;

  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --duration: 140ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* artboards reset their own typography so canvas chrome stays clean */
.sw {
  font-family: var(--font-sans);
  color: var(--fg-0);
  background: var(--bg-0);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02", "cv11";
}
.sw *,
.sw *::before,
.sw *::after { box-sizing: border-box; }

.sw button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sw input,
.sw textarea { font: inherit; color: inherit; background: transparent; border: 0; outline: 0; }
.sw a { color: inherit; text-decoration: none; }
.sw ::selection { background: var(--accent-soft); color: var(--accent-strong); }

.sw .mono { font-family: var(--font-mono); font-feature-settings: "ss01", "ss02", "zero", "calt"; }

/* shared search highlight */
.sw .sw-mark {
  background: var(--mark-bg);
  color: var(--mark-fg);
  padding: 0 2px;
  border-radius: 2px;
}

/* scrollbar polish */
.sw ::-webkit-scrollbar { width: 10px; height: 10px; }
.sw ::-webkit-scrollbar-track { background: transparent; }
.sw ::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
.sw ::-webkit-scrollbar-thumb:hover { background: var(--bg-4); background-clip: padding-box; border: 2px solid transparent; }

/* generic chip used in all variations */
.sw .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--r-tag);
  border: 1px solid var(--bd-2);
  background: var(--bg-2);
  color: var(--fg-1);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
  white-space: nowrap;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.sw .chip:hover { background: var(--bg-3); color: var(--fg-0); border-color: var(--bd-3); }
.sw .chip.is-active { background: var(--accent-soft); color: var(--accent-strong); border-color: oklch(0.78 0.14 165 / 0.45); }
.sw .chip.is-draggable { cursor: grab; }
.sw .chip.is-draggable:active { cursor: grabbing; }

.sw .chip-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: currentColor; opacity: 0.85;
}

/* keyboard-style kbd */
.sw .kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 3px;
  background: var(--bg-3);
  border: 1px solid var(--bd-2);
  border-bottom-width: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-1);
}
