/* ============================================================
   Uvlis Design — Style guide page
   Self-contained: mirrors the real tokens from styles.css so the
   page renders standalone, and re-tints under [data-theme="light"].
   Apple-glass direction: violet + cyan over a dark cinematic canvas.
   ============================================================ */

:root {
  /* Brand — electric violet */
  --primary-300: #a78bfa;
  --primary-400: #8b5cf6;
  --primary-500: #7c3aed;
  --primary-600: #6d28d9;
  --primary-700: #5b21b6;

  /* Accent — electric cyan */
  --accent-400: #22d3ee;
  --accent-500: #06b6d4;
  --accent-600: #0891b2;

  --success-400: #4ade80;
  --success-500: #22c55e;
  --danger-400: #f87171;
  --danger-500: #ef4444;
  --warning-400: #fbbf24;
  --warning-500: #f59e0b;
  --golden: #fbbf24;

  /* Backgrounds (dark-first) */
  --bg-base: #0a0a0f;
  --bg-surface: #12121a;
  --bg-elevated: #1a1a2e;
  --bg-overlay: #22223a;
  --bg-hover: #2a2a42;

  --text-primary: #f0f0f5;
  --text-secondary: #9ca3b0;
  --text-muted: #5a5f72;
  --text-faint: #45485a;
  --text-inverse: #0a0a0f;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Glass — the Uvlis signature */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-hi: rgba(255, 255, 255, 0.09);
  --glass-line: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(28px) saturate(170%);

  --gradient-primary: linear-gradient(135deg, #7c3aed, #06b6d4);
  --gradient-warm: linear-gradient(135deg, #e84393, #fd79a8);

  --shadow-glass: 0 20px 46px -22px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 8px 30px rgba(124, 58, 237, 0.32);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', sans-serif;
  --mono: 'SF Mono', ui-monospace, 'JetBrains Mono', 'Menlo', monospace;
  --max: 1440px;
  --nav-h: 64px;

  /* Panel-local neutrals (re-pointed in light theme) */
  --panel-bg: rgba(255, 255, 255, 0.02);
  --panel-line: rgba(255, 255, 255, 0.08);
  --label-ink: rgba(255, 255, 255, 0.42);
  --label-line: rgba(255, 255, 255, 0.1);
}

/* ── Light theme re-tint ── */
:root[data-theme="light"] {
  --bg-base: #e9e7e1;
  --bg-surface: #f4f2ec;
  --bg-elevated: #fbfaf6;
  --bg-overlay: #ffffff;
  --bg-hover: #e3e1d9;

  --text-primary: #1d1d1f;
  --text-secondary: #565660;
  --text-muted: #86868b;
  --text-faint: #a8a8ae;

  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-default: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.16);

  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-hi: rgba(255, 255, 255, 0.9);
  --glass-line: rgba(0, 0, 0, 0.08);

  --shadow-glass: 0 10px 34px rgba(17, 12, 46, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);

  --panel-bg: rgba(255, 255, 255, 0.5);
  --panel-line: rgba(0, 0, 0, 0.08);
  --label-ink: rgba(0, 0, 0, 0.4);
  --label-line: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Fixed ambient brand backdrop (matches landing / home) */
.dg-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% -12%, rgba(124, 58, 237, 0.22), transparent 62%),
    radial-gradient(1000px 600px at 6% 2%, rgba(6, 182, 212, 0.14), transparent 55%),
    linear-gradient(180deg, #06060a 0%, #08080d 45%, #050507 100%);
}
:root[data-theme="light"] .dg-bg {
  background:
    radial-gradient(1200px 700px at 78% -12%, rgba(124, 58, 237, 0.1), transparent 62%),
    radial-gradient(1000px 600px at 6% 2%, rgba(6, 182, 212, 0.08), transparent 55%),
    linear-gradient(180deg, #f4f2ec 0%, #e9e7e1 60%, #efedE7 100%);
}

/* ============================================================
   Navbar
   ============================================================ */
.dg-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-default);
}
.dg-nav-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.dg-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.dg-logo {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dg-divider {
  width: 1px;
  height: 24px;
  background: var(--border-strong);
}
.dg-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--text-muted);
}
.dg-nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dg-nav-links a {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.dg-nav-links a:hover,
.dg-nav-links a.active {
  color: var(--primary-400);
  background: rgba(124, 58, 237, 0.1);
}
.dg-theme-btn {
  margin-left: 8px;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-default);
  background: var(--glass-bg);
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.dg-theme-btn:hover { transform: scale(1.08); border-color: var(--primary-400); }

/* ============================================================
   Hero
   ============================================================ */
.dg-hero {
  padding: calc(var(--nav-h) + 72px) 40px 56px;
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.dg-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-400);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--glass-bg);
  margin-bottom: 22px;
}
.dg-hero h1 {
  font-size: 60px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #a78bfa 0%, #7c3aed 40%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dg-hero p {
  max-width: 560px;
  margin: 20px auto 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.dg-hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 12px 40px rgba(124, 58, 237, 0.5); transform: translateY(-1px); }
.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover { border-color: var(--primary-400); background: var(--glass-hi); transform: translateY(-1px); }
.btn-danger {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #fff;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--primary-400);
  border: none;
}
.btn-ghost:hover { background: rgba(124, 58, 237, 0.1); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; border-radius: 10px; }
.btn-disabled { opacity: 0.4; pointer-events: none; }
.btn:active { transform: translateY(1px); }

/* ============================================================
   Panel grid
   ============================================================ */
.dg-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--panel-line);
}
.dg-panel {
  padding: 40px;
  border-bottom: 1px solid var(--panel-line);
  border-right: 1px solid var(--panel-line);
}
.dg-panel:nth-child(even) { border-right: none; }
.dg-panel-dark {
  background: rgba(10, 10, 16, 0.55);
}
:root[data-theme="light"] .dg-panel-dark {
  background: #12121a;
  --text-primary: #f0f0f5;
  --text-secondary: #9ca3b0;
  --text-muted: #6f6f7a;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-hi: rgba(255, 255, 255, 0.1);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --panel-line: rgba(255, 255, 255, 0.1);
  --label-ink: rgba(255, 255, 255, 0.42);
  --label-line: rgba(255, 255, 255, 0.1);
}

.dg-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--label-ink);
  margin-bottom: 26px;
}
.dg-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--label-line);
}

/* ── Color swatches ── */
.dg-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 14px;
}
.dg-swatch .chip {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dg-swatch:hover .chip {
  transform: scale(1.05);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.dg-swatch .name { margin-top: 9px; font-size: 12px; font-weight: 700; color: var(--text-primary); }
.dg-swatch .hex { font-size: 10px; font-weight: 600; color: var(--text-muted); font-family: var(--mono); }

/* ── Typography ── */
.dg-type { display: flex; flex-direction: column; gap: 22px; }
.dg-type-row { display: flex; align-items: baseline; gap: 20px; }
.dg-type-meta { width: 84px; flex-shrink: 0; text-align: right; }
.dg-type-meta .size { font-size: 11px; font-weight: 700; color: var(--accent-400); font-family: var(--mono); }
.dg-type-meta .weight { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.dg-type-sample { min-width: 0; }
.t-display {
  font-size: 46px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.t-h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); }
.t-h2 { font-size: 26px; font-weight: 700; color: var(--accent-400); letter-spacing: -0.01em; }
.t-body { font-size: 17px; font-weight: 400; color: var(--text-secondary); line-height: 1.6; }
.t-caption { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.t-mono { font-size: 13px; font-family: var(--mono); color: var(--text-secondary); }

/* ── Button rows ── */
.dg-btn-rows { display: flex; flex-direction: column; gap: 18px; }
.dg-btn-row { display: flex; align-items: center; gap: 16px; }
.dg-btn-row .rl {
  width: 80px; flex-shrink: 0;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted);
}
.dg-btn-row .rb { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ── Surfaces / glass demo ── */
.dg-surfaces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dg-surf {
  padding: 20px 16px;
  border-radius: var(--radius-lg);
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--glass-line);
}
.dg-surf .st { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.dg-surf .sd { font-size: 11px; color: var(--text-muted); font-family: var(--mono); margin-top: 2px; }
.surf-base { background: var(--bg-base); }
.surf-surface { background: var(--bg-surface); }
.surf-elevated { background: var(--bg-elevated); }
.surf-overlay { background: var(--bg-overlay); }
.surf-glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glass);
}
.surf-glow {
  background: var(--gradient-primary);
  box-shadow: var(--shadow-glow);
}
.surf-glow .st, .surf-glow .sd, .surf-glass .st { color: #fff; }
.surf-glow .sd { color: rgba(255,255,255,0.75); }

/* ── Cards ── */
.dg-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dg-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dg-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glass); border-color: var(--primary-400); }
.dg-card .cimg { height: 118px; background-size: cover; background-position: center; }
.dg-card .cbody { padding: 16px; }
.dg-card .ctitle { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 10px 0 6px; }
.dg-card .cdesc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.dg-card .cfoot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-subtle);
}
.dg-card .cfoot .l { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; }
.dg-card .cfoot .r { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--accent-400); letter-spacing: 0.5px; cursor: pointer; }
.dg-card .cfoot .r:hover { opacity: 0.7; }

.tag {
  display: inline-block;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px;
  padding: 3px 9px; border-radius: 7px;
}
.tag-violet { color: var(--primary-300); background: rgba(124, 58, 237, 0.16); }
.tag-cyan { color: var(--accent-400); background: rgba(6, 182, 212, 0.15); }
.tag-gold { color: var(--golden); background: rgba(251, 191, 36, 0.16); }
.tag-orange { color: var(--warning-400); background: rgba(245, 158, 11, 0.16); }
.tag-green { color: var(--success-400); background: rgba(34, 197, 94, 0.16); }

/* ── Gradients & shadows ── */
.dg-swatches.wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.dg-grad {
  height: 84px; border-radius: var(--radius-lg); border: 1px solid var(--glass-line);
}
.g-primary { background: var(--gradient-primary); }
.g-warm { background: var(--gradient-warm); }
.g-glow { background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.6) 0%, #12121a 70%); }
.g-hero { background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #12121a 100%); }
.dg-shadow-demo { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.dg-shadow-demo > div {
  width: 84px; height: 84px; border-radius: var(--radius-lg);
  background: var(--bg-elevated); display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: var(--text-muted);
}
.sh-glow { box-shadow: var(--shadow-glow); }
.sh-glass { box-shadow: var(--shadow-glass); }
.sh-soft { box-shadow: 0 8px 30px rgba(0,0,0,0.5); }

/* ── Components ── */
.dg-comp { display: flex; flex-direction: column; gap: 22px; }
.dg-comp-group .gl {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); margin-bottom: 10px;
}
.dg-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  padding: 4px 12px; border-radius: 999px;
}
.b-green { color: var(--success-400); background: rgba(34, 197, 94, 0.14); }
.b-cyan { color: var(--accent-400); background: rgba(6, 182, 212, 0.14); }
.b-red { color: var(--danger-400); background: rgba(239, 68, 68, 0.14); }
.b-orange { color: var(--warning-400); background: rgba(245, 158, 11, 0.14); }
.b-violet { color: var(--primary-300); background: rgba(124, 58, 237, 0.16); }

.dg-input-row { display: flex; gap: 12px; }
.dg-input {
  flex: 1; height: 48px; padding: 0 16px;
  border: 1px solid var(--border-default); border-radius: 12px;
  background: var(--glass-bg); color: var(--text-primary);
  font-size: 15px; font-weight: 500; font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dg-input::placeholder { color: var(--text-muted); }
.dg-input:focus { outline: none; border-color: var(--primary-400); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18); }

.dg-toggles { display: flex; gap: 26px; flex-wrap: wrap; }
.dg-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.dg-toggle input { display: none; }
.dg-toggle .track {
  width: 48px; height: 28px; border-radius: 999px;
  background: var(--border-strong); position: relative;
  transition: background 0.2s ease;
}
.dg-toggle .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}
.dg-toggle input:checked + .track { background: var(--gradient-primary); }
.dg-toggle input:checked + .track::after { transform: translateX(20px); }
.dg-toggle .tl { font-size: 14px; font-weight: 600; color: var(--text-secondary); }

.dg-progress { display: flex; flex-direction: column; gap: 10px; }
.dg-prog-row { display: flex; align-items: center; gap: 12px; }
.dg-prog-row .bar { flex: 1; height: 12px; border-radius: 6px; background: var(--border-default); overflow: hidden; }
.dg-prog-row .fill { height: 100%; border-radius: 6px; transition: width 0.6s ease; }
.f-violet { background: var(--gradient-primary); }
.f-cyan { background: var(--accent-500); }
.f-gold { background: var(--warning-500); }
.dg-prog-row .val { width: 34px; text-align: right; font-size: 12px; font-weight: 700; color: var(--text-secondary); }

.dg-misc-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.dg-tooltip { position: relative; }
.dg-tooltip .trg {
  font-size: 13px; font-weight: 700; color: var(--primary-400);
  background: rgba(124, 58, 237, 0.1); padding: 8px 16px; border-radius: 8px; cursor: default;
}
.dg-tooltip .bubble {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: var(--bg-overlay); color: #fff; font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 8px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4); border: 1px solid var(--border-default);
}
.dg-tooltip .bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--bg-overlay);
}
.dg-tooltip:hover .bubble { opacity: 1; }

.dg-fichas {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; background: rgba(251, 191, 36, 0.12);
}
.dg-fichas .coin { font-size: 16px; }
.dg-fichas .amt { font-size: 15px; font-weight: 800; color: var(--golden); }

.dg-streak {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; background: rgba(245, 158, 11, 0.12);
}
.dg-streak .fire { font-size: 18px; }
.dg-streak .n { font-size: 16px; font-weight: 800; color: var(--warning-400); }

.dg-avatars { display: flex; align-items: center; }
.dg-avatars .av, .dg-avatars .more {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--bg-base);
  margin-left: -8px; background-size: cover; background-position: center;
}
.dg-avatars .av:first-child { margin-left: 0; }
.dg-avatars .more {
  display: grid; place-items: center; background: var(--bg-hover);
  font-size: 11px; font-weight: 800; color: var(--text-secondary);
}
.dg-avatars .lbl { margin-left: 12px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }

/* ── Chips / language pills (dark demo) ── */
.dg-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.dg-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border-default); background: var(--glass-bg);
  font-size: 13px; font-weight: 700; color: var(--text-secondary);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.dg-pill:hover { border-color: var(--primary-400); color: var(--text-primary); }
.dg-pill.active { border-color: var(--primary-400); background: rgba(124, 58, 237, 0.14); color: var(--text-primary); }
.dg-pill .dot { width: 8px; height: 8px; border-radius: 50%; }

/* Footer */
.dg-footer {
  max-width: var(--max); margin: 0 auto;
  padding: 40px; text-align: center;
  font-size: 13px; color: var(--text-muted);
  border-top: 1px solid var(--panel-line);
}
.dg-footer strong { color: var(--primary-400); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .dg-grid { grid-template-columns: 1fr; }
  .dg-panel { border-right: none !important; }
  .dg-nav-links { display: none; }
  .dg-hero h1 { font-size: 40px; }
  .dg-cards { grid-template-columns: 1fr; }
  .dg-hero-actions .btn { width: 100%; max-width: 300px; }
}
@media (max-width: 600px) {
  .dg-nav-inner, .dg-hero, .dg-footer { padding-left: 20px; padding-right: 20px; }
  .dg-panel { padding: 28px 20px; }
  .dg-hero { padding-top: calc(var(--nav-h) + 48px); }
  .dg-hero h1 { font-size: 30px; }
  .dg-swatches { grid-template-columns: repeat(3, 1fr); }
  .dg-surfaces { grid-template-columns: repeat(2, 1fr); }
  .t-display { font-size: 32px; }
  .dg-type-meta { display: none; }
  .dg-input-row { flex-direction: column; }
}

/* Cross-document view transitions — match the rest of the site
   so navigating to/from the design system page is smooth too. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.32s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  animation-fill-mode: both;
}
@keyframes uvlis-vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes uvlis-vt-in { from { opacity: 0; transform: translateY(8px); } }
::view-transition-old(root) { animation-name: uvlis-vt-out; }
::view-transition-new(root) { animation-name: uvlis-vt-in; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}
