/* aptrouter a8 design system — base dark tokens + shared components */

/* ── Dark-mode root tokens (theme.css overrides some in light mode) ── */
:root {
  --bg: #08090a;
  --fg: #edeef0;
  --muted: #9ba1a6;
  --amber: #ffb020;
  --amber-wash: rgba(255, 176, 32, 0.12);
  --green: #3fb950;
  --neg: #cf4842;
  --surface: #101113;
  --surface-2: #181a1d;
  --border: #242729;
  --faint: #6b7177;
  color-scheme: dark;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 500;
  font-size: 14px;
  font-family: var(--font-sans);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--amber);
  color: #1a1407;
}
.btn-primary:hover { transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--faint); }

/* ── Inline link style ── */
.link {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--amber) 55%, transparent);
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  padding: 0;
}

/* ── Mono utility ── */
.mono { font-family: var(--font-mono); }

/* ── Keybox (environment variable / key display) ── */
.keybox {
  font-family: var(--font-mono);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--fg);
  overflow-x: auto;
  max-width: 760px;
  margin: 14px 0;
}

/* ── Code window (terminal-style block) ── */
.code-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  max-width: 760px;
  margin: 16px 0;
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.code-window-dots {
  display: flex;
  gap: 6px;
}

.code-window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.code-window-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.code-window-label {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  text-transform: lowercase;
}

.code-window-body {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg);
  padding: 16px 18px;
  overflow-x: auto;
  white-space: pre;
}

/* Copy button inside code-window bar */
.code-window-copy {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: color .12s, border-color .12s;
}
.code-window-copy:hover { color: var(--fg); border-color: var(--faint); }

/* ── Warm syntax tokens (no purple/cyan) ── */
.tok-key   { color: #ffb020; }  /* amber — header names, keywords */
.tok-str   { color: #d3b486; }  /* warm tan — strings */
.tok-amber { color: #ffd89a; }  /* bright amber — values of note */
.tok-dim   { color: #6b7177; }  /* dim — nulls, comments */
.tok-num   { color: #e0bd7a; }  /* gold — numbers */

/* ── Icon button utility ── */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
