/* ============================================================
   Surgr Design System — Preview Shell
   Shared layout for design system cards. Every preview card
   uses this so the design system tab feels like one product,
   not a folder of orphans.
   ============================================================ */

@import url('colors_and_type.css');
@import url('motion.css');

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--surgr-bg);
  color: var(--surgr-text);
  font-family: var(--surgr-font-body);
  font-weight: var(--surgr-fw-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.preview-deep { background: var(--surgr-bg-deep); }

/* ─── The card frame ───────────────────────────────────────── */
.dp-frame {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}

/* Header row: kicker + title + meta */
.dp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.dp-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--surgr-accent);
  margin: 0 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dp-kicker::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--surgr-accent);
  box-shadow: 0 0 8px var(--surgr-accent);
}
.dp-title {
  font-family: var(--surgr-font-heading);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--surgr-text-strong);
  margin: 0;
}
.dp-meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--surgr-text-dim);
  text-align: right;
  white-space: nowrap;
}

/* Content area */
.dp-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Footnote — the "why" beneath a sample */
.dp-foot {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  font-size: 10.5px;
  color: var(--surgr-text-muted);
  line-height: 1.5;
}
.dp-foot strong {
  color: var(--surgr-text);
  font-weight: 700;
}
.dp-foot code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: var(--surgr-accent);
  background: rgba(200,255,0,0.06);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ─── Reusable sub-pieces ──────────────────────────────────── */

/* Token chip — small inline tag like 'xl · 24px' */
.dp-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: var(--surgr-text-muted);
  letter-spacing: 0;
  text-transform: none;
}

/* Section label inside a card */
.dp-sub {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--surgr-text-dim);
  margin: 6px 0 2px;
}

/* Grid helpers */
.dp-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dp-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* Swatch tile — used by color cards */
.dp-swatch {
  aspect-ratio: 1;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,0.04);
  position: relative;
  overflow: hidden;
}
.dp-swatch .name {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.85;
}
.dp-swatch .hex {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.95;
}

/* Used inside swatch when a separate "use" line is needed */
.dp-swatch .use {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.6;
}
