/*
 * Preview chrome. Warm neutral grays rather than true black — the widget under
 * test should be the darkest thing on screen, not the page around it.
 */
:root {
  color-scheme: dark;

  --bg: #1f1e1d;
  --surface: #262524;
  --surface-hover: #2e2d2b;
  --border: #3a3836;
  --text: #f0eee9;
  --text-muted: #a8a29a;
  --text-faint: #78716a;
  --accent: #c96442;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- top bar ---- */

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.site .brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

header.site .dot {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.8125rem;
  color: #fff;
}

header.site nav {
  display: flex;
  gap: 0.25rem;
}

header.site nav a {
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  transition:
    background 0.15s,
    color 0.15s;
}

header.site nav a:hover {
  background: var(--surface-hover);
  color: var(--text);
}

header.site nav a[aria-current] {
  background: var(--surface);
  color: var(--text);
}

/* ---- content ---- */

.content {
  max-width: 46rem;
  padding: 2.5rem 1.5rem 4rem;
}

.content.wide {
  max-width: none;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 0 0 0.5rem;
}

h1 {
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.625rem;
}

.content p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

code {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.125rem 0.375rem;
  border-radius: 5px;
  font-size: 0.8125em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text);
}

/* ---- cards ---- */

.grid {
  display: grid;
  gap: 0.875rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 2rem;
}

.card {
  display: block;
  padding: 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}

.card:hover {
  background: var(--surface-hover);
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  transform: translateY(-1px);
}

.card h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ---- misc ---- */

.note {
  background: color-mix(in oklab, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--border));
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 1.5rem 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

button.demo {
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.4375rem 0.875rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}

button.demo:hover {
  background: var(--surface-hover);
  border-color: var(--text-faint);
}

.back {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
  text-decoration: none;
}

.back:hover {
  color: var(--text);
}
