/* ============================================================
   UI illustration workshop — page chrome ONLY (like design-system.css
   / hero-form-states.css). The illustrations themselves are inline
   SVGs built from the `.uikit` token classes in styles.css, so nothing
   here styles a primitive — only the topbar, grid, stages and labels
   that frame them on this page.
   ============================================================ */

/* ---------- Topbar ---------- */
.il-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.il-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  transition: color .2s var(--ease-out);
}
.il-back:hover { color: var(--text); }
.il-back svg { width: 14px; height: 14px; }
.il-top-sep { width: 1px; height: 18px; background: var(--border); }
.il-top-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }

.il-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-left: auto; }
.il-tool { display: inline-flex; align-items: center; gap: 8px; }
.il-tool-label {
  font-family: var(--font-mono); font-weight: 500; font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted-2);
}
.il-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }
.il-seg button {
  padding: 5px 11px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font-family: var(--font-mono); font-weight: 500; font-size: 10.5px;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted);
  transition: background .2s var(--ease-out), color .2s var(--ease-out);
}
.il-seg button:hover { color: var(--text); }
.il-seg button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

/* Illustration-background pickers (wash A/B + glow). Unlike the preview-only
   theme/accent segments, these PERSIST to the theme's token store. */
.il-pickers { display: inline-flex; gap: 10px; }
/* Swatch + its own revert control, so one colour can go back to the CSS
   default without disturbing the other two. */
.il-pick-group { display: inline-flex; align-items: center; gap: 2px; }
.il-pick-reset {
  border: 0; background: none; padding: 0; cursor: pointer;
  width: 14px; height: 14px; line-height: 1;
  font-size: 12px; color: var(--text-muted-2);
  transition: color .2s var(--ease-out), transform .2s var(--ease-out);
}
.il-pick-reset:hover { color: var(--text); transform: rotate(-45deg); }
/* Dimmed while the colour is untouched — nothing to revert to. */
.il-pick-reset[disabled] { opacity: .3; cursor: default; pointer-events: none; }
.il-pick input {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; padding: 0;
  border: 2px solid var(--surface); border-radius: 999px;
  box-shadow: 0 0 0 1px var(--border);
  background: none; cursor: pointer;
}
.il-pick input::-webkit-color-swatch-wrapper { padding: 0; }
.il-pick input::-webkit-color-swatch { border: none; border-radius: 999px; }
.il-reset {
  border: 0; background: none; padding: 4px 6px; cursor: pointer;
  font-family: var(--font-mono); font-weight: 500; font-size: 10.5px;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted-2);
  transition: color .2s var(--ease-out);
}
.il-reset:hover { color: var(--text); }
.il-bake {
  border: 1px solid var(--border); background: var(--surface-2);
  padding: 4px 9px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-mono); font-weight: 500; font-size: 10.5px;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--text);
  transition: background .2s var(--ease-out), border-color .2s var(--ease-out);
}
.il-bake:hover { background: var(--primary-soft); border-color: var(--primary-2); }
.il-bake[disabled] { opacity: .5; cursor: default; }

/* Accent swatches — recolour proof: each sets --primary/--secondary live */
.il-swatches { display: inline-flex; gap: 6px; }
.il-swatch {
  width: 22px; height: 22px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border);
  padding: 0; background: var(--sw, #ccc);
  transition: transform .15s var(--ease-out);
}
.il-swatch:hover { transform: scale(1.12); }
.il-swatch.is-active { box-shadow: 0 0 0 2px var(--text); }

/* ---------- Shell ---------- */
.il-wrap { max-width: 1180px; margin: 0 auto; padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 40px) 120px; }
.il-intro { max-width: 780px; display: flex; flex-direction: column; gap: 14px; }
.il-h1 { font-size: clamp(28px, 5vw, 42px); letter-spacing: -0.03em; line-height: 1.05; }
.il-lead { color: var(--text-muted); font-size: 16px; line-height: 1.55; }
.il-lead code, .il-cell-where code {
  font-family: var(--font-mono); font-size: 12.5px;
  background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px;
}

.il-section { margin-top: clamp(44px, 6vw, 80px); }
.il-section-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 28px;
}
.il-section-title { font-size: 21px; letter-spacing: -0.02em; }
.il-section-note { font-size: 13.5px; color: var(--text-muted); margin: 0 0 0 auto; max-width: 52ch; }

/* ---------- Primitive legend ---------- */
.il-prims { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.il-prim { display: flex; flex-direction: column; gap: 10px; }
.il-prim-stage {
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); padding: 14px;
}
.il-prim-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.il-prim-token { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted-2); }

/* ---------- Composition grid ---------- */
.il-solo { max-width: 620px; }
/* Wider container for the bigger landscape illustrations (showcase-row slides) */
.il-solo-wide { max-width: 860px; margin-bottom: 40px; }
.il-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.il-cell { display: flex; flex-direction: column; gap: 12px; }
.il-stage {
  border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface);
}
/* Backdrop toggle (topbar) — how the illustration sits behind on the page */
.il-wrap.bg-wash .il-stage { background: linear-gradient(160deg, var(--surface-2), var(--surface-3)); }
.il-wrap.bg-checker .il-stage {
  background-color: var(--surface-2);
  background-image:
    linear-gradient(45deg, var(--border) 25%, transparent 25%),
    linear-gradient(-45deg, var(--border) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--border) 75%),
    linear-gradient(-45deg, transparent 75%, var(--border) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.il-stage.is-empty {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  border-style: dashed;
  font-family: var(--font-mono); font-size: var(--fs-11); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted-2); text-align: center; padding: 20px;
}
.il-cell-label { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.il-cell-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.il-cell-tag {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-muted-2); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 8px;
}
.il-cell-where { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* Sub-heading naming a group of destination slots */
.il-group-label { font-size: 13.5px; color: var(--text-muted); margin: 34px 0 22px; }
.il-section-head + .il-group-label { margin-top: 0; }

@media (max-width: 720px) {
  .il-tools { width: 100%; margin-left: 0; }
  .il-section-note { margin-left: 0; }
}
