/* designs.css — the /designs gallery + detail, /designer and /themes pages.
   Written against the house tokens only (semantic vars + pop palette), so the
   pages stay coherent when SITE_DESIGN / ?design= re-skins the public shell.
   Owned by the designs revamp slice. */

.dg-page {
  --dg-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding-top: 34px;
  padding-bottom: 72px;
}

/* ------------------------------------------------------------- hero ---- */
.dg-hero { max-width: 760px; margin: 0 auto 30px; text-align: center; }
.dg-hero--left { margin-left: 0; text-align: left; }
.dg-hero h1 {
  margin: 16px 0 14px;
  font: 800 clamp(2.1rem, 5.6vw, 3.4rem)/1.04 var(--font-display);
  letter-spacing: -0.015em;
  color: var(--text);
}
.dg-hero h1 em {
  font-style: normal;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 10px;
  padding: 0 0.18em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.dg-hero-sub { margin: 0 auto; max-width: 640px; font-size: 1.02rem; line-height: 1.65; color: var(--text-soft); }
.dg-hero--left .dg-hero-sub { margin-left: 0; }
.dg-hero-sub code, .dg-page code {
  font: 500 0.86em var(--dg-mono);
  background: var(--paper-sunk);
  border-radius: 6px;
  padding: 1px 6px;
}
.dg-hero-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px;
  margin-top: 20px; font-size: 0.92rem; color: var(--text-soft);
}
.dg-hero-stats strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--text); margin-right: 4px; }

/* -------------------------------------------------------- toolbar ---- */
.dg-toolbar { display: grid; gap: 14px; margin: 26px 0 8px; }
.dg-search { max-width: 460px; margin-inline: auto; width: 100%; }
.dg-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dg-chip-n {
  font-style: normal; font-family: var(--dg-mono); font-size: 0.72em;
  opacity: 0.75; margin-left: 2px;
}
.dg-count { margin: 4px 0 18px; text-align: center; font: 500 0.82rem var(--dg-mono); color: var(--text-faint); }

/* ----------------------------------------------------------- grid ---- */
.dg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}
.dg-card {
  display: flex; flex-direction: column;
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  background: var(--paper);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-decoration: none;
  content-visibility: auto;
  contain-intrinsic-size: auto 340px;
  transition: transform var(--dur-snap) var(--ease-snap);
}
.dg-card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lift); }
.dg-card:active { transform: translate(1px, 1px); box-shadow: var(--shadow-press); }
.dg-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.dg-cover {
  display: block; aspect-ratio: 16 / 9; background: var(--paper-sunk);
  border-bottom: 3px solid var(--ink); overflow: hidden;
}
.dg-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dg-card-body { display: grid; gap: 7px; align-content: start; padding: 16px 18px 18px; flex: 1; }
.dg-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dg-card-top strong { font: 700 1.12rem var(--font-display); letter-spacing: -0.01em; }
.dg-card-pitch {
  font-size: 0.86rem; line-height: 1.5; color: var(--text-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dg-card-meta { font: 500 0.72rem/1.5 var(--dg-mono); color: var(--text-faint); }
#dg-none { max-width: 520px; margin: 30px auto; }

/* ---------------------------------------------------- how it works ---- */
.dg-how { margin-top: 60px; }
.dg-how h2, .dg-shots h2, .dg-related h2 {
  margin: 0 0 18px; text-align: center;
  font: 800 clamp(1.4rem, 3vw, 1.9rem)/1.15 var(--font-display); letter-spacing: -0.01em;
}
.dg-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.dg-steps li { display: grid; gap: 6px; align-content: start; }
.dg-step-n {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 3px solid var(--ink); border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font: 800 1rem var(--font-display);
  margin-bottom: 4px;
}
.dg-steps strong { font: 700 1.05rem var(--font-display); }
.dg-steps p { margin: 0; font-size: 0.88rem; line-height: 1.55; color: var(--text-soft); }
.dg-how-foot { margin: 26px 0 0; text-align: center; font-size: 0.95rem; color: var(--text-soft); }
.dg-how-foot a, .dg-preview-note a, .dg-use-points a {
  color: var(--text); font-weight: 700;
  text-decoration: underline; text-decoration-thickness: 2px;
  text-decoration-color: var(--accent); text-underline-offset: 3px;
}

/* --------------------------------------------------------- detail ---- */
.dg-crumb { margin-bottom: 22px; }
.dg-detail-head {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 28px; align-items: start; margin-bottom: 26px;
}
.dg-detail-head h1 {
  margin: 14px 0 10px;
  font: 800 clamp(2rem, 5vw, 3rem)/1.05 var(--font-display); letter-spacing: -0.015em;
}
.dg-detail-pitch { margin: 0 0 16px; max-width: 56ch; font-size: 1.02rem; line-height: 1.6; color: var(--text-soft); }
.dg-font-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dg-font-note { font: 500 0.75rem var(--dg-mono); color: var(--text-faint); }
.dg-detail-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0;
}
.dg-detail-stats > div {
  display: grid; gap: 2px; padding: 14px 16px;
  border: 3px solid var(--ink); border-radius: 18px;
  background: var(--paper); box-shadow: var(--shadow-xs);
}
.dg-detail-stats dt { font: 700 0.68rem var(--font-body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.dg-detail-stats dd { margin: 0; font: 800 1.6rem/1.1 var(--font-display); color: var(--text); }

/* ----------------------------------------------------- live preview ---- */
.dg-preview { margin-bottom: 26px; }
.dg-preview-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.dg-preview-bar h2, .dg-use h2 { margin: 0; font: 800 1.35rem/1.2 var(--font-display); letter-spacing: -0.01em; }
.dg-preview-switches { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.dg-switch { display: flex; flex-wrap: wrap; gap: 6px; }
.dg-frame {
  border: 3px solid var(--ink); border-radius: var(--radius-sm);
  background: var(--paper-sunk); box-shadow: var(--shadow-md); overflow: hidden;
}
.dg-frame iframe { display: block; width: 100%; height: min(72vh, 640px); border: 0; background: var(--paper); }
.dg-preview-note { margin: 12px 0 0; font-size: 0.84rem; color: var(--text-faint); }

/* -------------------------------------------------- use this design ---- */
.dg-use {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr);
  gap: 26px; align-items: start;
  border: 3px solid var(--ink); border-radius: var(--radius-card);
  background: var(--paper); box-shadow: var(--shadow-md);
  padding: 26px 28px; margin-bottom: 40px;
}
.dg-use-copy p { margin: 10px 0 12px; font-size: 0.94rem; line-height: 1.6; color: var(--text-soft); }
.dg-use-points { margin: 0; padding: 0 0 0 18px; display: grid; gap: 8px; font-size: 0.88rem; line-height: 1.55; color: var(--text-soft); }
.dg-use-code { display: grid; gap: 10px; }
.dg-use-code-label { font: 600 0.72rem var(--dg-mono); color: var(--text-faint); }
.dg-env {
  margin: 0; padding: 16px 18px;
  border: 3px solid var(--ink); border-radius: 14px;
  background: var(--side); color: var(--side-text, var(--yellow));
  font: 500 0.85rem/1.7 var(--dg-mono);
  white-space: pre-wrap; overflow-wrap: anywhere;
  box-shadow: var(--shadow-xs);
}
.dg-use-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dg-use-hint { margin: 0; font-size: 0.8rem; line-height: 1.55; color: var(--text-faint); }

/* ---------------------------------------------------- screenshots ---- */
.dg-shots { margin-bottom: 44px; }
.dg-shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.dg-shot {
  margin: 0; border: 3px solid var(--ink); border-radius: var(--radius-sm);
  background: var(--paper); box-shadow: var(--shadow-xs); overflow: hidden;
}
.dg-shot img { display: block; width: 100%; height: auto; border-bottom: 3px solid var(--ink); }
.dg-shot figcaption { padding: 10px 14px; font: 600 0.8rem var(--font-body); color: var(--text-soft); }
.dg-related { margin-bottom: 10px; }
.dg-grid--related { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ============================================================ /themes ---- */
.th-designs-link {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin: 0 0 34px; padding: 20px 24px;
  border: 3px solid var(--ink); border-radius: var(--radius-card);
  background: var(--accent); color: var(--accent-ink);
  text-decoration: none; box-shadow: var(--shadow-md);
  transition: transform var(--dur-snap) var(--ease-snap);
}
.th-designs-link:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lift); }
.th-designs-link:active { transform: translate(2px, 2px); box-shadow: var(--shadow-press); }
.th-designs-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.th-designs-copy { display: grid; gap: 4px; }
.th-designs-copy strong { font: 800 1.2rem var(--font-display); letter-spacing: -0.01em; }
.th-designs-copy span { font-size: 0.9rem; line-height: 1.55; opacity: 0.92; }
.th-designs-link .pop-btn { flex: none; }

.th-page .th-section { margin-bottom: 40px; }
.th-section h2 { margin: 0 0 8px; font: 800 clamp(1.35rem, 3vw, 1.8rem)/1.15 var(--font-display); letter-spacing: -0.01em; }
.th-section-sub { margin: 0 0 18px; max-width: 70ch; font-size: 0.94rem; line-height: 1.6; color: var(--text-soft); }

/* theme cards */
.th-theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 16px; }
.th-theme-card {
  display: flex; gap: 16px; align-items: flex-start;
  text-decoration: none; color: var(--text);
  transition: transform var(--dur-snap) var(--ease-snap);
}
.th-theme-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-md); }
.th-theme-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.th-theme-card.is-active { box-shadow: var(--shadow-focus); }
.th-theme-chip {
  flex: none; position: relative; width: 84px; height: 72px;
  border: 2.5px solid var(--ink); border-radius: 12px;
  background: var(--th-surface); overflow: hidden;
}
.th-theme-chip i { position: absolute; left: 10px; height: 5px; border-radius: 3px; background: var(--th-ink); opacity: 0.5; }
.th-theme-chip i:nth-child(1) { top: 12px; width: 40px; }
.th-theme-chip i:nth-child(2) { top: 23px; width: 28px; opacity: 0.3; }
.th-theme-chip b { position: absolute; right: 8px; bottom: 6px; font: 800 1.15rem var(--font-display); color: var(--th-ink); }
.th-theme-copy { display: grid; gap: 3px; }
.th-theme-mode { font: 700 0.66rem var(--font-body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.th-theme-copy strong { font: 700 1.1rem var(--font-display); }
.th-theme-desc { font-size: 0.83rem; line-height: 1.5; color: var(--text-soft); }
.th-theme-copy em { margin-top: 5px; font: 500 0.72rem var(--dg-mono); font-style: normal; color: var(--text-faint); }

/* accent swatches (ui.js binds [data-accent-set]) */
.th-accent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.th-swatch {
  display: grid; gap: 3px; justify-items: center; text-align: center;
  padding: 14px 10px 12px; cursor: pointer;
  border: 3px solid var(--ink); border-radius: 18px;
  background: var(--paper); color: var(--text); box-shadow: var(--shadow-xs);
  font-family: var(--font-body);
  transition: transform var(--dur-snap) var(--ease-snap);
}
.th-swatch:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-sm); }
.th-swatch:active { transform: translate(1px, 1px); box-shadow: var(--shadow-press); }
.th-swatch:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.th-swatch.is-active { box-shadow: var(--shadow-focus); }
.th-swatch-dot {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: linear-gradient(135deg, var(--sw) 50%, var(--sw2) 50%); /* hard two-tone split, not a blend */
  margin-bottom: 5px;
}
.th-swatch strong { font-size: 0.88rem; }
.th-swatch em { font: 500 0.68rem var(--dg-mono); font-style: normal; color: var(--text-faint); }

/* the combination panel */
.th-combo { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.th-combo-copy h2 { margin: 12px 0 8px; font: 800 1.6rem/1.15 var(--font-display); letter-spacing: -0.01em; }
.th-combo-copy p { margin: 0 0 16px; font-size: 0.94rem; line-height: 1.6; color: var(--text-soft); }
.th-combo-config { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.th-page > .dg-how-foot { margin-top: 30px; }

/* =========================================================== /designer ---- */
/* The mock (.dz-mock) is a self-contained mini design system driven by CSS
   vars set from JS: --dza/--dza2/--dzink (accent triplet) and --dzd/--dzb
   (display/body stacks), plus data-mode + data-hero. Its fixed colours are
   DATA — they preview the generated site, not this page's skin. */
.designer-grid {
  display: grid; grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 22px; align-items: start; margin-top: 8px;
}
.dz-right { display: grid; gap: 22px; min-width: 0; }
.dz-panel {
  border: 3px solid var(--ink); border-radius: var(--radius-card);
  background: var(--paper); color: var(--text); box-shadow: var(--shadow-md);
  padding: 22px 22px;
}
.dz-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 6px 0; }

/* Accordion sections: one open at a time; collapsed headers still show the
   current choice, so the whole config reads without scrolling. */
.dz-acc { border-bottom: 2px dashed var(--paper-sunk); }
.dz-acc:last-child { border-bottom: 0; }
.dz-acc-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 15px 20px; border: 0; background: transparent; color: inherit;
  cursor: pointer; text-align: left; border-radius: 12px;
}
.dz-acc-head:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.dz-acc-label {
  flex: none; font: 700 0.76rem var(--font-body);
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-faint);
  transition: none;
}
.dz-acc.is-open .dz-acc-label, .dz-acc-head:hover .dz-acc-label { color: var(--text); }
.dz-acc-val {
  flex: 1; min-width: 0; text-align: right;
  font: 700 0.88rem var(--font-body); color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dz-acc-val .dz-dot {
  display: inline-block; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--ink); margin-right: 6px; vertical-align: -2px;
}
.dz-acc-chev { flex: none; width: 16px; height: 16px; color: var(--text-faint); transition: transform var(--dur-lift) var(--ease-pop); }
.dz-acc.is-open .dz-acc-chev { transform: rotate(180deg); }
.dz-acc-body { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 0fr; transition: none; }
.dz-acc.is-open .dz-acc-body { grid-template-rows: 1fr; }
.dz-acc-inner { overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 0 20px; }
.dz-acc.is-open .dz-acc-inner { padding-bottom: 18px; }
.dz-field { display: grid; gap: 8px; }
.dz-field > label { font: 700 0.76rem var(--font-body); letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-faint); }
.dz-opt { text-transform: none; letter-spacing: 0; font-weight: 500; }
.dz-hint { margin: 2px 0 0; font-size: 0.8rem; color: var(--text-faint); line-height: 1.55; }
.dz-hint a { color: var(--text); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* picker cards */
.dz-card {
  display: grid; gap: 3px; text-align: left; padding: 12px 14px;
  border: 2.5px solid var(--paper-sunk); border-radius: 14px;
  background: var(--paper); color: var(--text); cursor: pointer;
  font-family: var(--font-body);
  transition: transform var(--dur-snap) var(--ease-snap);
}
.dz-card:hover { border-color: var(--ink); transform: translate(-1px, -1px); }
.dz-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.dz-card.is-active { border-color: var(--ink); background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-xs); }
.dz-card strong { font: 700 0.9rem var(--font-display); color: inherit; }
.dz-card > span:last-child { font-size: 0.78rem; color: var(--text-soft); line-height: 1.45; }
.dz-card.is-active > span:last-child { color: inherit; opacity: 0.85; }
.dz-profiles, .dz-heroes { display: grid; gap: 8px; }

/* the design-pack picker */
.dz-designs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  /* max-content rows: inside this capped scroll box, auto rows collapsed to
     44px below ~700px wide and the cards overlapped. */
  grid-auto-rows: max-content;
  max-height: 420px; overflow-y: auto; padding: 2px;
}
.dz-design-card { align-content: start; padding: 10px 12px 11px; }
.dz-design-card:first-child { grid-column: 1 / -1; }
.dz-design-thumb {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 2px solid var(--ink); border-radius: 8px; margin-bottom: 6px;
  background: var(--paper-sunk);
}

/* accent swatches */
.dz-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.dz-swatch {
  position: relative; width: 34px; height: 34px; border-radius: 50%;
  border: 2.5px solid var(--paper-sunk); cursor: pointer; padding: 0;
  transition: transform var(--dur-snap) var(--ease-pop);
}
.dz-swatch:hover { transform: scale(1.12); }
.dz-swatch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.dz-swatch.is-active { border-color: var(--ink); box-shadow: var(--shadow-xs); }
.dz-swatch i { position: absolute; inset: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; font-style: normal; }


/* hero architecture thumbnails */
.dz-hero-card { grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.dz-hero-card .dz-thumb {
  grid-row: 1 / 3; position: relative; width: 64px; height: 44px;
  border-radius: 6px; border: 2px solid var(--ink);
  background: var(--paper-sunk); overflow: hidden;
}
.dz-hero-card .dz-thumb i { position: absolute; background: var(--text-faint); opacity: 0.7; border-radius: 2px; }
.dz-thumb-split i:nth-child(1) { left: 7px; top: 12px; width: 22px; height: 4px; }
.dz-thumb-split i:nth-child(2) { left: 7px; top: 20px; width: 16px; height: 3px; }
.dz-thumb-split i:nth-child(3) { right: 6px; top: 9px; width: 20px; height: 26px; border-radius: 3px; background: var(--accent); opacity: 0.9; }
.dz-thumb-terminal i:nth-child(1) { left: 7px; top: 8px; width: 14px; height: 3px; background: var(--accent); }
.dz-thumb-terminal i:nth-child(2) { left: 7px; top: 15px; width: 30px; height: 5px; }
.dz-thumb-terminal i:nth-child(3) { left: 7px; top: 26px; width: 50px; height: 11px; border: 1px solid var(--text-faint); background: transparent; border-radius: 3px; }
.dz-thumb-minimal i:nth-child(1) { left: 7px; right: 7px; top: 10px; height: 2px; }
.dz-thumb-minimal i:nth-child(2) { left: 7px; top: 16px; width: 40px; height: 6px; }
.dz-thumb-minimal i:nth-child(3) { left: 7px; right: 7px; top: 30px; height: 2px; }
.dz-thumb-centered i:nth-child(1) { left: 50%; top: 7px; width: 26px; height: 4px; transform: translateX(-50%); }
.dz-thumb-centered i:nth-child(2) { left: 50%; top: 14px; width: 18px; height: 3px; transform: translateX(-50%); }
.dz-thumb-centered i:nth-child(3) { left: 50%; top: 22px; width: 44px; height: 18px; transform: translateX(-50%) perspective(60px) rotateX(14deg); transform-origin: 50% 0; border-radius: 3px; background: var(--accent); opacity: 0.9; }
.dz-thumb-stacked { background: var(--accent); }
.dz-thumb-stacked i { background: rgba(0, 0, 0, 0.55); }
.dz-thumb-stacked i:nth-child(1) { left: 7px; top: 10px; width: 34px; height: 6px; }
.dz-thumb-stacked i:nth-child(2) { left: 7px; top: 21px; width: 24px; height: 5px; }
.dz-thumb-stacked i:nth-child(3) { left: 7px; top: 32px; width: 44px; height: 3px; opacity: 0.5; }

/* segmented choices (theme setup) */
.dz-seg {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  border: 2.5px solid var(--ink); border-radius: var(--radius-pill);
  background: var(--paper-sunk);
}
.dz-seg button {
  padding: 7px 14px; border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--text-soft);
  font: 700 0.82rem var(--font-body); cursor: pointer;
  transition: none;
}
.dz-seg button:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.dz-seg button.is-active { background: var(--side); color: var(--yellow); }

/* ------ preview panel ------ */
.dz-preview-panel { min-width: 0; }
.dz-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dz-preview-note { font: 500 0.76rem var(--dg-mono); color: var(--text-faint); text-align: right; }

/* browser chrome shared by the mock and the packshot */
.dz-chrome {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  background: var(--paper-sunk); border-bottom: 2.5px solid var(--ink);
}
.dz-chrome span { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); }
.dz-chrome i {
  flex: 1; text-align: center; font: 500 0.72rem var(--dg-mono); font-style: normal;
  color: var(--text-faint); background: var(--paper); border: 1.5px solid var(--ink);
  border-radius: 999px; padding: 3px 10px; margin-left: -33px;
}
.dz-mock, .dz-packshot {
  border: 3px solid var(--ink); border-radius: var(--radius-sm);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.dz-mock[hidden], .dz-packshot[hidden] { display: none; }

/* the selected pack's real cover */
.dz-packshot { background: var(--paper); }
.dz-packshot img { display: block; width: 100%; height: auto; }
.dz-pack-note {
  margin: 0; padding: 12px 16px; border-top: 2.5px solid var(--ink);
  font-size: 0.82rem; line-height: 1.55; color: var(--text-soft);
}
.dz-pack-note strong { color: var(--text); }
.dz-pack-note a { color: var(--text); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent); text-underline-offset: 3px; white-space: nowrap; }

/* ------ the mock's own mini design system (fixed palette = DATA) ------ */
.dz-mock { --dzbg: #100e0c; --dzsurface: #1b1815; --dztext: #f5efe9; --dzmuted: #a99f95; --dzline: rgba(255, 255, 255, 0.12); }
.dz-mock[data-mode="light"] { --dzbg: #fdf9f5; --dzsurface: #ffffff; --dztext: #23180f; --dzmuted: #70665d; --dzline: rgba(0, 0, 0, 0.1); }
.dz-site { background: var(--dzbg); color: var(--dztext); }
.dz-nav { display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-bottom: 1px solid var(--dzline); }
.dz-logo { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--dza); color: var(--dzink); font: 800 0.62rem var(--dzd); }
.dz-brand { font: 700 0.92rem var(--dzd); }
.dz-links { display: flex; gap: 8px; margin-left: auto; }
.dz-links i { width: 26px; height: 5px; border-radius: 3px; background: var(--dzmuted); opacity: 0.55; }
.dz-navcta { font: 600 0.72rem var(--dzb); color: var(--dzink); background: var(--dza); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.dz-hero { min-height: 300px; padding: 26px 24px 30px; }
.dz-hero .dz-eyebrow { display: inline-block; font: 600 0.68rem var(--dzb); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dztext); }
.dz-hero h3 { margin: 10px 0 8px; font: 700 clamp(1.3rem, 3.2vw, 1.9rem)/1.18 var(--dzd); color: var(--dztext); letter-spacing: -0.015em; }
.dz-hero p { margin: 0 0 14px; font: 400 0.85rem/1.6 var(--dzb); color: var(--dzmuted); max-width: 46ch; }
.dz-grad { font-style: normal; background: var(--dza); color: var(--dzink); padding: 0 0.12em; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.dz-btns { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.dz-btns b { font: 600 0.76rem var(--dzb); border-radius: 9px; padding: 8px 14px; white-space: nowrap; }
.dz-btn-p { background: var(--dza); color: var(--dzink); }
.dz-btn-g { border: 1px solid var(--dzline); color: var(--dztext); }
.dz-btn-d { border: 1px dashed var(--dzmuted); color: var(--dzmuted); font-family: var(--dg-mono) !important; }
.dz-link { color: var(--dztext); text-decoration: underline; text-decoration-color: var(--dza); text-underline-offset: 4px; }
.dz-btn-ink { background: rgba(0, 0, 0, 0.78); color: #fff; }

.dz-h-split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; align-items: center; }
.dz-h-window { position: relative; height: 150px; border-radius: 10px; border: 1px solid var(--dzline); background: var(--dzsurface); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25); }
.dz-win-dots { position: absolute; top: 9px; left: 10px; display: flex; gap: 4px; }
.dz-win-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--dzmuted); opacity: 0.5; }
.dz-win-side { position: absolute; top: 26px; bottom: 10px; left: 10px; width: 34px; border-radius: 6px; background: var(--dzbg); }
.dz-win-bars { position: absolute; top: 30px; left: 54px; right: 12px; display: grid; gap: 8px; }
.dz-win-bars i { height: 16px; border-radius: 5px; background: var(--dzbg); }
.dz-win-bars i:first-child { background: var(--dza); }

.dz-h-terminal .dz-term-path { margin: 0 0 6px; font: 500 0.72rem var(--dg-mono); color: var(--dzmuted); }
.dz-h-terminal .dz-term-path b { color: var(--dza); }
.dz-h-terminal h3 { font-family: var(--dg-mono); letter-spacing: -0.02em; }
.dz-caret { display: inline-block; width: 0.5em; height: 0.95em; margin-left: 4px; background: var(--dza); vertical-align: -0.12em; }
@media (prefers-reduced-motion: no-preference) {
  .dz-caret { animation: dzBlink 1.1s steps(1) infinite; }
  @keyframes dzBlink { 50% { opacity: 0; } }
}
.dz-term-box { display: grid; gap: 4px; margin: 10px 0 14px; padding: 12px 14px; border-radius: 9px; border: 1px solid var(--dzline); background: rgba(0, 0, 0, 0.35); }
.dz-mock[data-mode="light"] .dz-term-box { background: #17130f; }
.dz-term-box i { font: 400 0.68rem/1.5 var(--dg-mono); font-style: normal; color: #b8afa6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-term-box i b { color: var(--dza); }
.dz-term-ok { color: #4ade80 !important; }

.dz-h-minimal hr { border: 0; border-top: 1px solid var(--dzline); margin: 12px 0; }
.dz-mfst-folio { display: flex; gap: 14px; align-items: baseline; margin: 0; font: 500 0.7rem var(--dg-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dzmuted); }
.dz-mfst-folio b { color: var(--dza); }
.dz-h-minimal h3 { max-width: 22ch; }

.dz-h-centered { text-align: center; display: grid; justify-items: center; }
.dz-h-centered .dz-pill { border: 1px solid var(--dzline); border-radius: 999px; padding: 4px 12px; }
.dz-h-centered h3 { max-width: 24ch; }
.dz-keypanel { display: grid; width: min(360px, 100%); margin-top: 16px; border: 1px solid var(--dzline); border-radius: 10px; background: var(--dzsurface); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25); transform: perspective(700px) rotateX(9deg); transform-origin: 50% 0; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.dz-key-bar { display: flex; align-items: center; gap: 4px; padding: 7px 10px; border-bottom: 1px solid var(--dzline); }
.dz-key-bar i { width: 6px; height: 6px; border-radius: 50%; background: var(--dzmuted); opacity: 0.5; }
.dz-key-bar em { flex: 1; text-align: center; font: 500 0.56rem var(--dg-mono); font-style: normal; color: var(--dzmuted); }
.dz-key-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 10px 10px 0; }
.dz-key-kpis u { display: grid; gap: 1px; text-decoration: none; border: 1px solid var(--dzline); border-radius: 7px; padding: 6px 8px; text-align: left; }
.dz-key-kpis i { font: 600 0.5rem var(--dzb); font-style: normal; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dzmuted); }
.dz-key-kpis b { font: 700 0.78rem var(--dzd); color: var(--dztext); }
.dz-key-bars { display: flex; align-items: flex-end; gap: 5px; height: 44px; padding: 8px 10px 12px; }
.dz-key-bars i { flex: 1; height: var(--h, 40%); border-radius: 3px 3px 1px 1px; background: var(--dza); }

.dz-mock[data-hero="stacked"] .dz-hero { padding: 0; }
.dz-h-stacked { position: relative; min-height: 300px; box-sizing: border-box; padding: 30px 24px 34px; background: var(--dza); overflow: hidden; display: grid; align-content: center; justify-items: start; }
.dz-h-stacked .dz-eyebrow, .dz-h-stacked h3 { color: var(--dzink); position: relative; }
.dz-h-stacked .dz-eyebrow { opacity: 0.75; }
.dz-bill-mark { position: absolute; right: -12px; bottom: -22px; font: 800 4.6rem var(--dzd); letter-spacing: -0.04em; color: var(--dzink); opacity: 0.12; white-space: nowrap; pointer-events: none; }
.dz-bill-stats { display: flex; gap: 16px; margin-top: 14px; position: relative; }
.dz-bill-stats i { font: 500 0.7rem var(--dzb); font-style: normal; color: var(--dzink); opacity: 0.85; }
.dz-bill-stats b { font: 800 0.95rem var(--dzd); margin-right: 4px; }

/* ------ output panel ------ */
.dz-output { min-width: 0; }
.dz-output-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dz-output-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dz-out {
  display: none; max-height: 380px; overflow: auto; margin: 0 0 10px;
  padding: 16px 18px; border: 2.5px solid var(--ink); border-radius: 14px;
  background: var(--paper-sunk); color: var(--text-soft);
  font: 400 0.76rem/1.65 var(--dg-mono);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.dz-out.is-active { display: block; }
.dz-out:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ------------------------------------------------------ reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .dz-acc-body, .dz-acc-chev, .dg-card, .th-designs-link, .th-theme-card,
  .th-swatch, .dz-card, .dz-swatch, .dz-seg button { transition: none; }
  .dg-card:hover, .th-designs-link:hover, .th-theme-card:hover,
  .th-swatch:hover, .dz-card:hover, .dz-swatch:hover { transform: none; }
}

/* --------------------------------------------------------- responsive ---- */
@media (max-width: 1000px) {
  /* minmax(0, 1fr), not 1fr: a bare 1fr track floors at its content's
     min-content width, which pushed the panels ~5px past a 390px screen. */
  .designer-grid { grid-template-columns: minmax(0, 1fr); }
  .dz-controls { min-width: 0; }
  .dg-detail-head { grid-template-columns: 1fr; }
  .dg-detail-stats { max-width: 520px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dg-use { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dg-steps { grid-template-columns: 1fr; }
  .th-combo { grid-template-columns: 1fr; }
  .th-designs-link { flex-direction: column; align-items: flex-start; }
  .dg-detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dg-frame iframe { height: min(70vh, 520px); }
}
@media (max-width: 480px) {
  .dg-page { padding-top: 24px; }
  .dg-grid, .dg-shot-grid { grid-template-columns: 1fr; }
  .dg-hero-stats { gap: 8px 18px; }
  .dz-designs { grid-template-columns: 1fr; }
  .dz-panel { padding: 16px 14px; }
  .dz-acc-head { padding: 14px 12px; }
  .dz-acc-inner { padding: 0 12px; }
  .dg-use { padding: 18px 16px; }
  .dz-h-split { grid-template-columns: 1fr; }
  .dz-h-window { height: 110px; }
  .dz-bill-mark { font-size: 3.2rem; }
  .dz-links { display: none; }
  .dz-nav { gap: 8px; padding: 10px 14px; }
  .dz-navcta { margin-left: auto; }
  .dz-brand { font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dz-hero { padding: 20px 16px 24px; min-height: 260px; }
  .dz-h-stacked { min-height: 260px; padding: 24px 16px 28px; }
  .dz-bill-stats { flex-wrap: wrap; gap: 10px 14px; }
  .dz-preview-head { flex-wrap: wrap; }
  .dz-preview-note { text-align: left; }
}

/* The card layout must not override the search/filter hidden state. */
.dg-card[hidden], .dg-grid[hidden] { display:none; }
