/*
  Design Studio workflow — layout/component CSS only, per STYLE_GUIDE.md's own
  rule that new tokens live in design-system.css and new sections get their own
  layout stylesheet. Nothing in this file defines a new color/spacing/radius
  token — it only arranges and animates the existing ones.
*/

/* ============ 1. Three-region shell ============
   .wd already exists (app.css) as a flex row. It now has four children:
   .wd-side (rail, fixed width, doubles as site-list / step-nav)
   .wd-content (center pane, flex:1, the current phase's artifact)
   .wd-splitter (drag handle)
   .wd-main (chat rail, width driven by --wd-chat-rail-width)
   app.css's old `.wd-main { flex: 1; }` is overridden here since the content
   pane is now the one that grows. */
:root {
  --wd-chat-rail-width: 420px;
  --wd-chat-rail-min: 320px;
  --wd-chat-rail-max: 55vw;
}

/* Default: chat rail fills whatever's left (matches today's behavior when no
   design-studio flow is active). JS adds `wd--split` to #wdShell (the .wd
   element) exactly when the content pane should show — driving layout off an
   explicit class, not off guessing another element's inline style. */
.wd-main { flex: 1 1 auto; width: auto; max-width: none; }
.wd.wd--split .wd-main {
  flex: 0 0 auto;
  width: var(--wd-chat-rail-width);
  min-width: var(--wd-chat-rail-min);
  max-width: var(--wd-chat-rail-max);
}

.wd-content {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  background: var(--bg);
  border-right: 1px solid var(--border);
  position: relative;
}
.wd-content .wd-phasebar {
  border-bottom: none;
  padding: var(--space-5);
  max-width: 920px;
  margin: 0 auto;
}
.wd-content .wd-phasebar__preview { margin-bottom: var(--space-4); }
.wd-content .wd-phasebar__preview iframe { height: min(70vh, 720px); }
.wd-content .wd-phasebar__textpreview { max-height: none; }

/* ============ 2. Splitter ============ */
.wd-splitter {
  flex: 0 0 auto;
  width: 9px;
  margin: 0 -4px;
  position: relative;
  cursor: col-resize;
  z-index: 5;
  background: transparent;
}
.wd-splitter::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 4px;
  width: 1px;
  background: var(--border);
  transition: background var(--duration-fast) var(--ease-out-soft),
              box-shadow var(--duration-fast) var(--ease-out-soft);
}
.wd-splitter:hover::after,
.wd-splitter.is-dragging::after {
  background: var(--accent);
  box-shadow: var(--glow-blue);
}
.wd-splitter:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
body.wd-resizing-cols { cursor: col-resize !important; user-select: none !important; }
body.wd-resizing-cols .wd-content iframe { pointer-events: none; }

/* ============ 3. Vertical step-navigator (replaces the old horizontal pills) ============ */
.wd-stepnav {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: var(--space-3);
  overflow-y: auto;
}
.wd-stepnav__back {
  align-self: flex-start;
  background: none; border: none; color: var(--text-faint);
  font-size: var(--text-xs); font-weight: 600; cursor: pointer;
  padding: var(--space-2); margin-bottom: var(--space-2);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) var(--ease-out-soft);
}
.wd-stepnav__back:hover { color: var(--text); background: var(--surface-hover); }

.wd-stepnav__list { display: flex; flex-direction: column; }

.wd-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity var(--duration-base) var(--ease-out-soft),
              background var(--duration-base) var(--ease-out-soft),
              box-shadow var(--duration-base) var(--ease-out-soft);
}
.wd-step:not(:last-child) { margin-bottom: 2px; }

/* connector line between steps */
.wd-step__rail { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.wd-step__dot {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.68rem; font-weight: 700;
  border: 1.5px solid var(--border-strong);
  color: var(--text-faint);
  background: var(--bg);
  transition: transform var(--duration-slow) var(--ease-out-expo),
              background var(--duration-base) var(--ease-out-soft),
              border-color var(--duration-base) var(--ease-out-soft),
              color var(--duration-base) var(--ease-out-soft);
}
.wd-step__line {
  width: 2px; flex: 1; min-height: 14px;
  background: var(--border);
  transition: background var(--duration-slow) var(--ease-out-soft);
}
.wd-step:last-child .wd-step__line { display: none; }
.wd-step__body { flex: 1; min-width: 0; padding-top: 2px; }
.wd-step__label { font-weight: 600; font-size: 0.82rem; color: var(--text-muted); }
.wd-step__ticker {
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-faint);
  margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wd-step__histbtn {
  background: none; border: none; cursor: pointer; font-size: 0.68rem;
  opacity: 0.5; padding: 2px 4px; flex-shrink: 0;
}
.wd-step__histbtn:hover { opacity: 1; }

/* pending: receded, no chrome */
.wd-step.pending { opacity: 0.55; }
.wd-step.pending:hover { opacity: 0.75; }
.wd-step.pending.wd-step--shake { animation: wd-step-refuse 0.32s var(--ease-out-soft); }
@keyframes wd-step-refuse {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* active: lifted */
.wd-step.active {
  opacity: 1;
  background: var(--accent-soft);
  box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--accent);
  padding-left: calc(var(--space-2) - 3px);
}
.wd-step.active .wd-step__dot {
  border-color: var(--accent); color: var(--accent); background: var(--accent-soft);
  animation: ds-pulse 2s infinite;
}
.wd-step.active .wd-step__label { color: var(--text); }

/* done: settled, flat, checkmarked */
.wd-step.done { opacity: 1; }
.wd-step.done .wd-step__dot { border-color: var(--success); color: var(--success); background: var(--success-soft); }
.wd-step.done .wd-step__label { color: var(--text-muted); }
.wd-step.done .wd-step__line { background: var(--success); }
.wd-step.done:hover { background: var(--surface-hover); }

/* error: interrupts */
.wd-step.error {
  opacity: 1;
  border-left: 3px solid var(--danger);
  padding-left: calc(var(--space-2) - 3px);
  background: var(--danger-soft);
}
.wd-step.error .wd-step__dot { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.wd-step.error .wd-step__label { color: var(--text); }
.wd-step__errline { font-size: 0.7rem; color: var(--danger); margin-top: 3px; }

/* the "unwrap" — a step's dot morphing active -> done, played once by JS
   toggling this class right after the checkmark state is applied */
.wd-step__dot.wd-dot-land { animation: wd-dot-land var(--duration-slow) var(--ease-out-expo); }
@keyframes wd-dot-land {
  0% { transform: scale(0.8); }
  55% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.wd-step__line.wd-line-draw {
  background: linear-gradient(var(--success), var(--success)) left / 0% 100% no-repeat, var(--border);
  animation: wd-line-draw var(--duration-reveal) var(--ease-out-soft) forwards;
}
@keyframes wd-line-draw { to { background-size: 100% 100%; } }

/* phase 10 (edit / steady-state): a distinct footer entry, not a 10th step */
.wd-stepnav__live {
  margin-top: var(--space-3); padding: var(--space-3) var(--space-2);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--space-2);
  font-size: 0.8rem; font-weight: 600; color: var(--success);
  cursor: pointer; border-radius: var(--radius-sm);
}
.wd-stepnav__live:hover { background: var(--surface-hover); }

/* ============ 4. Workspace group (promoted tools-menu) ============ */
.wd-stepnav__workspace {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
.wd-stepnav__wslabel {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-faint); padding: 0 var(--space-2) var(--space-2);
}
.wd-stepnav__wsitem {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--text-muted);
  font-size: 0.78rem; padding: 7px var(--space-2);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out-soft), color var(--duration-fast) var(--ease-out-soft);
}
.wd-stepnav__wsitem:hover { background: var(--surface-hover); color: var(--text); }
.wd-stepnav__wsitem.active { background: var(--accent-soft); color: var(--accent-hover); }

/* ============ 5. Content-pane reveal (the cross-fade when a phase advances) ============ */
.wd-content__inner { animation: wd-content-in var(--duration-slow) var(--ease-out-expo); }
@keyframes wd-content-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.wd-content__wash {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 0%, var(--success-soft), transparent 70%);
  opacity: 0; animation: wd-wash var(--duration-reveal) var(--ease-out-soft) forwards;
}
@keyframes wd-wash {
  0% { opacity: 0; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}

/* ============ 6. Skeleton / loading (never a bare spinner) ============ */
.wd-skeleton-card {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-4); margin-bottom: var(--space-3);
  overflow: hidden;
}
.wd-skeleton-line {
  height: 12px; border-radius: var(--radius-sm); margin-bottom: 8px;
  background: linear-gradient(100deg, var(--surface) 40%, var(--surface-hover) 50%, var(--surface) 60%);
  background-size: 200% 100%;
  animation: wd-shimmer 1.4s ease-in-out infinite;
}
.wd-skeleton-line--w60 { width: 60%; }
.wd-skeleton-line--w80 { width: 80%; }
.wd-skeleton-line--w40 { width: 40%; }
@keyframes wd-shimmer { to { background-position: -200% 0; } }

.wd-progress-ticker {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted);
  padding: var(--space-2) 0;
}
.wd-progress-ticker .con-cursor { margin-left: 4px; }

/* ============ 7. Empty / error states ============ */
.wd-empty-card {
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-5); text-align: center;
  color: var(--text-faint);
}
.wd-empty-card__icon { font-size: 1.6rem; margin-bottom: var(--space-2); }
.wd-empty-card__text { font-size: 0.85rem; margin-bottom: var(--space-3); }

.wd-error-card {
  border: 1px solid rgba(248,81,73,0.35); border-radius: var(--radius-lg);
  background: var(--danger-soft); padding: var(--space-4);
}
.wd-error-card__msg { font-size: 0.85rem; color: var(--text); margin-bottom: var(--space-2); }
.wd-error-card details { font-size: 0.72rem; color: var(--text-faint); font-family: var(--font-mono); }

/* ============ 8. Quieter card title (vs. the loud .ds-h1/.ds-h2 gradient) ============ */
.ds-card__title { font-weight: 700; font-size: var(--text-lg); color: var(--text); margin: 0 0 var(--space-2); }

/* ============ 8b. Sitemap editable list (fase 2) ============ */
.wd-sitemap__card {
  padding: var(--space-3); margin-bottom: var(--space-3);
  transition: box-shadow var(--duration-fast) var(--ease-out-soft);
}
.wd-sitemap__card:hover { box-shadow: var(--shadow-sm); }
.wd-sitemap__row { display: flex; align-items: center; gap: var(--space-2); margin-bottom: 6px; }
.wd-sitemap__order { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.wd-sitemap__order button {
  width: 22px; height: 18px; padding: 0; font-size: 10px; line-height: 1;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  border-radius: 4px; cursor: pointer;
}
.wd-sitemap__order button:disabled { opacity: 0.25; cursor: default; }
.wd-sitemap__order button:not(:disabled):hover { border-color: var(--accent); color: var(--accent); }
.wd-sitemap__fields { flex: 1; display: flex; gap: 8px; min-width: 0; }
.wd-sitemap__name, .wd-sitemap__slug, .wd-sitemap__h1 {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 6px 8px; font-size: 0.82rem;
  transition: border-color var(--duration-fast) var(--ease-out-soft);
}
.wd-sitemap__name:focus, .wd-sitemap__slug:focus, .wd-sitemap__h1:focus { outline: none; border-color: var(--accent); }
.wd-sitemap__name { flex: 2; font-weight: 600; }
.wd-sitemap__slug { flex: 1; font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); }
.wd-sitemap__h1 { width: 100%; margin-top: 6px; }
.wd-sitemap__job {
  width: 100%; resize: vertical; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-muted); padding: 6px 8px;
  font-size: 0.78rem; font-family: var(--font); margin-top: 2px;
}
.wd-sitemap__job:focus { outline: none; border-color: var(--accent); }
.wd-sitemap__del {
  flex-shrink: 0; background: none; border: none; color: var(--text-faint);
  cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 4px;
}
.wd-sitemap__del:hover { color: var(--danger); background: var(--danger-soft); }

/* ============ 8c. Brief step-form (fase 1) ============ */
.wd-briefform { max-width: 520px; margin: var(--space-6) auto; text-align: center; }
.wd-briefform__dots { display: flex; justify-content: center; gap: 6px; margin-bottom: var(--space-4); }
.wd-briefform__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong);
  transition: background var(--duration-base) var(--ease-out-soft), transform var(--duration-base) var(--ease-out-soft);
}
.wd-briefform__dot.active { background: var(--accent); transform: scale(1.3); }
.wd-briefform__dot.done { background: var(--success); }
.wd-briefform__count { font-size: 0.7rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: var(--space-3); }
.wd-briefform__question { font-size: var(--text-lg); font-weight: 700; color: var(--text); margin-bottom: var(--space-4); line-height: 1.35; }
.wd-briefform__input input,
.wd-briefform__input textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); color: var(--text); padding: var(--space-3);
  font-size: 0.95rem; font-family: var(--font); text-align: left;
  transition: border-color var(--duration-fast) var(--ease-out-soft), box-shadow var(--duration-fast) var(--ease-out-soft);
}
.wd-briefform__input input:focus, .wd-briefform__input textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.wd-briefform__input #wdBriefChoiceRow { justify-content: center; }
.wd-briefform__nav { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-5); }
.wd-briefform__nav .wd-btn--primary { flex: 1; }

/* ============ 8c-2. Fase 8 (cms) provisioning-samenvatting ============ */
.wd-phase8-summary { max-width: 480px; margin: var(--space-6) auto; }
.wd-phase8-summary__features { list-style: none; padding: 0; margin: var(--space-3) 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--text-sm); }
.wd-phase8-summary a { color: var(--accent); }

/* ============ 8c-3. Fase 9 (launch) audit-interview ============ */
.wd-launch__start { max-width: 480px; margin: var(--space-6) auto; text-align: center; }
.wd-launch__hint { font-size: 0.78rem; color: var(--text-faint); margin: -8px 0 var(--space-3); }
.wd-launch__item { max-width: 560px; }
.wd-launch__evidence {
  font-size: 0.85rem; color: var(--text-faint); text-align: left;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-3); margin-bottom: var(--space-3);
}
.wd-launch__recommendation {
  font-size: 0.85rem; color: var(--text); text-align: left; font-weight: 600;
  margin-bottom: var(--space-4);
}
.wd-launch__actions { display: flex; flex-direction: column; gap: 8px; }
.wd-launch__actions .wd-btn { width: 100%; }
.wd-launch__itemmsg { font-size: 0.78rem; color: var(--text-faint); min-height: 1.2em; margin-top: var(--space-2); }
.wd-launch__summary {
  max-width: 560px; margin: var(--space-5) auto 0; text-align: left; font-size: 0.82rem;
  color: var(--text-faint); border-top: 1px solid var(--border); padding-top: var(--space-3);
}
.wd-launch__summary summary { cursor: pointer; color: var(--text); font-weight: 600; }
.wd-launch__summary ul { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: flex; flex-direction: column; gap: 4px; }
.wd-launch__complete { max-width: 560px; margin: var(--space-6) auto; text-align: center; }

.wd-launch__seocard {
  max-width: 560px; margin: 0 auto var(--space-5); padding: var(--space-4);
  border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
  background: var(--bg-elevated); text-align: center;
}
.wd-launch__seocard-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); }
.wd-launch__seocard-score { font-size: 1.8rem; font-weight: 800; margin: 4px 0; }
.wd-launch__seocard-note { font-size: 0.78rem; color: var(--text-faint); }
.wd-launch__seocard--good .wd-launch__seocard-score { color: var(--success); }
.wd-launch__seocard--mid .wd-launch__seocard-score { color: var(--warning); }
.wd-launch__seocard--low .wd-launch__seocard-score { color: var(--danger); }
.wd-launch__seocard--good { border-color: var(--success); }
.wd-launch__seocard--mid { border-color: var(--warning); }
.wd-launch__seocard--low { border-color: var(--danger); }

/* ============ 8d. Moodboard infinite canvas (fase 4) ============ */
.wd-canvas__toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: var(--space-3); margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
.wd-canvas__urlinput {
  flex: 1; min-width: 200px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); padding: 6px 10px; font-size: 0.8rem;
}
.wd-canvas__urlinput:focus { outline: none; border-color: var(--accent); }
.wd-canvas__urlinput:disabled { opacity: 0.5; }
.wd-canvas__spacer { flex: 1; }
.wd-canvas__zoomlabel { font-size: 0.72rem; color: var(--text-faint); font-family: var(--font-mono); min-width: 38px; text-align: center; }

.wd-canvas__viewport {
  position: relative; height: min(65vh, 640px);
  border: 1px dashed var(--border); border-radius: var(--radius-lg);
  overflow: hidden; cursor: grab;
  /* Zelfde stippenveld als de dashboard-achtergrond (dot-field.js, PITCH 40px) —
     hier statisch via CSS i.p.v. een eigen canvas/mouse-glow, want dit is een
     begrensd, pan/zoombaar widget, geen full-viewport achtergrond. Maakt van
     het canvas een prikbord i.p.v. ruitjespapier. */
  background-image: radial-gradient(circle, var(--dot-color) 1.4px, transparent 1.4px);
  background-size: 40px 40px;
  background-color: var(--bg);
}
.wd-canvas__viewport.is-panning { cursor: grabbing; }
.wd-canvas__viewport--drop { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent-soft); }
.wd-canvas__surface {
  position: absolute; top: 0; left: 0; width: 0; height: 0;
  transform-origin: 0 0;
}
.wd-canvas__item {
  position: absolute; background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  overflow: hidden; cursor: grab; user-select: none;
  transition: box-shadow var(--duration-fast) var(--ease-out-soft);
}
.wd-canvas__item::before {
  /* prikbord-speldje — puur decoratief (aria-hidden via de lege inhoud, geen
     interactief element), verkoopt de "pin board"-metafoor op elk item */
  content: ""; position: absolute; top: -6px; left: 50%; translate: -50% 0;
  width: 12px; height: 12px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle at 35% 30%, #ff8a6b, var(--accent) 65%);
  box-shadow: 0 2px 4px rgba(0,0,0,.35);
}
.wd-canvas__item:hover { box-shadow: var(--shadow-lg); }
.wd-canvas__item.is-dragging { cursor: grabbing; box-shadow: var(--shadow-lg); z-index: 10; }
.wd-canvas__item img { width: 100%; display: block; pointer-events: none; }
.wd-canvas__item-link {
  display: block; padding: 6px 8px; font-size: 0.68rem; color: var(--text-faint);
  font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wd-canvas__item-note {
  padding: var(--space-3); min-height: 80px; font-size: 0.82rem; color: var(--text);
  background: var(--accent-2-soft);
}
.wd-canvas__item-del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  background: rgba(0,0,0,0.6); color: #fff; border: 0; border-radius: 50%;
  font-size: 11px; cursor: pointer; opacity: 0; transition: opacity var(--duration-fast) var(--ease-out-soft);
}
.wd-canvas__item:hover .wd-canvas__item-del { opacity: 1; }
.wd-canvas__item-noteadd {
  position: absolute; top: 4px; left: 4px; height: 20px; padding: 0 6px;
  background: rgba(0,0,0,0.6); color: #fff; border: 0; border-radius: 10px;
  font-size: 11px; cursor: pointer; opacity: 0; transition: opacity var(--duration-fast) var(--ease-out-soft);
}
.wd-canvas__item:hover .wd-canvas__item-noteadd { opacity: 1; }
/* een geprikte notitie oogt als een echt geel memoblaadje, niet als een kaart */
.wd-canvas__item--note { background: transparent; border: none; box-shadow: none; }
.wd-canvas__item--note::before { background: radial-gradient(circle at 35% 30%, #fff2a8, #d8b23a 70%); }
.wd-canvas__item--note .wd-canvas__item-note {
  background: #fbe98a; color: #3a3320; min-height: 90px; border-radius: 3px;
  box-shadow: var(--shadow-md); transform: rotate(-1.2deg);
  font-family: var(--font); line-height: 1.4;
}
/* touwtje tussen een notitie en het item waar 'm bij hoort */
.wd-canvas__strings { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.wd-canvas__string { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: 0.55; }

/* ============ 8e. Design-fase template-galerij (fase 5 mode-select) ============ */
.wd-dirgallery__econ { display: flex; align-items: center; gap: 6px; margin: 8px 0; font-size: 0.78rem; color: var(--text-muted); }
.wd-dirgallery__notes {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: var(--space-2) var(--space-3); font-size: 0.85rem; font-family: var(--font);
  resize: vertical; margin-bottom: var(--space-3);
}
.wd-dirgallery__notes:focus { outline: none; border-color: var(--accent); }
.wd-dirgallery__filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-4); }
.wd-dirfilter {
  font-size: 0.68rem; padding: 3px 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); color: var(--text-faint); cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-soft);
}
.wd-dirfilter:hover { border-color: var(--border-strong); color: var(--text-muted); }
.wd-dirfilter.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }

.wd-dirgallery__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3);
}
.wd-dircard {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; cursor: pointer; background: var(--bg-elevated);
  transition: border-color var(--duration-fast) var(--ease-out-soft), box-shadow var(--duration-fast) var(--ease-out-soft);
}
.wd-dircard:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.wd-dircard.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-md); }
.wd-dircard__badge {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  font-size: 0.6rem; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-pill);
  background: var(--accent-2-soft); color: var(--accent-2); border: 1px solid color-mix(in srgb, var(--accent-2) 40%, transparent);
}
.wd-dircard__thumb { width: 100%; aspect-ratio: 4/3; background: var(--surface); overflow: hidden; }
.wd-dircard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-dircard__name { font-weight: 700; font-size: 0.78rem; padding: 8px 8px 2px; color: var(--text); }
.wd-dircard__vocab { font-size: 0.66rem; color: var(--text-faint); padding: 0 8px 8px; line-height: 1.4; }
.wd-dircard--moodboard { border-style: dashed; border-color: var(--accent); background: var(--accent-soft); }
.wd-dircard--moodboard .wd-dircard__thumb {
  display: flex; align-items: center; justify-content: center; font-size: 2rem; background: transparent;
}
.wd-dircard.disabled { cursor: not-allowed; opacity: 0.5; }
.wd-dircard.disabled:hover { border-color: var(--border); box-shadow: none; }
.wd-dircard--moodboard.disabled { border-color: var(--border); background: var(--bg-elevated); }

/* ============ 8f. Copywriting before/after (fase 6, de flagship-weergave) ============ */
.wd-copydiff__tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-4); }
.wd-copydiff__header { margin-bottom: var(--space-4); }
.wd-copydiff__goal { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.wd-copydiff__meta { font-size: 0.72rem; color: var(--text-faint); margin-top: 6px; }
.wd-copydiff__meta b { color: var(--text-muted); font-weight: 600; }

.wd-copydiff__section { margin-bottom: var(--space-3); }
.wd-copydiff__sectitle {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: var(--space-2);
}
.wd-copydiff__field { padding: 7px 0; border-top: 1px solid var(--border); }
.wd-copydiff__field:first-of-type { border-top: none; }
.wd-copydiff__fieldpath { font-size: 0.66rem; font-family: var(--font-mono); color: var(--text-faint); margin-bottom: 3px; }
.wd-copydiff__plain { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.wd-copydiff__before {
  font-size: 0.82rem; color: var(--text-faint); text-decoration: line-through;
  opacity: 0.7; line-height: 1.5; margin-bottom: 2px;
}
.wd-copydiff__after {
  font-size: 0.88rem; color: var(--text); font-weight: 500; line-height: 1.5;
  animation: wd-content-in var(--duration-base) var(--ease-out-expo);
}
.wd-copydiff__field--changed { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 8px; margin: 4px 0; border-top: none; }
.wd-copydiff__field--needsinput { border-left: 2px solid var(--warning); padding-left: 8px; }

/* ============ 9. Narrow viewport ============ */
@media (max-width: 840px) {
  .wd-content { display: none !important; } /* content pane is a desktop-first "big window"; below 840px, chat takes over full width */
  .wd-splitter { display: none !important; }
  .wd-main { width: auto !important; max-width: none !important; flex: 1 1 auto !important; }
}
