/* CampaignPlan Experience — full-screen product workspace, not a step wizard. */

body.cpw-open { overflow: hidden; }

.cpw-root {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  overflow-y: auto;
  background: #f5f4f1;
  color: var(--fg, #25282d);
}
.cpw-root.open { display: block; }
.cpw-root.saving::after {
  content: "Wijziging opslaan…";
  position: fixed;
  top: 78px;
  right: 24px;
  z-index: 2;
  padding: 8px 13px;
  border-radius: 999px;
  background: #25282d;
  color: #fff;
  font-size: 12px;
}

.cpw-header {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 68px;
  display: grid;
  grid-template-columns: 140px 1fr 180px;
  align-items: center;
  gap: 16px;
  padding: 10px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(37, 40, 45, .1);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}
.cpw-header h1 { margin: 1px 0 0; font-size: 20px; }
.cpw-header__titles { text-align: center; }
.cpw-back { border: 0; background: transparent; text-align: left; cursor: pointer; color: inherit; }
.cpw-header__action { justify-self: end; font-size: 12px; }
.cpw-eyebrow { color: #9a5d32; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.cpw-muted { color: var(--fg-tertiary, #73777f); font-size: 13px; line-height: 1.5; }

.cpw-picker,
.cpw-analysis {
  width: min(760px, calc(100% - 36px));
  min-height: calc(100vh - 70px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
  text-align: center;
}
.cpw-picker h2,
.cpw-analysis h2 { margin: 0; font-size: clamp(26px, 4vw, 40px); }
.cpw-kicker { margin: 0; color: #9a5d32; font-weight: 700; }
.cpw-picker > .cpw-input { margin: 18px auto 4px; width: min(560px, 100%); }
.cpw-vacancy-list { display: grid; gap: 9px; max-height: 45vh; overflow-y: auto; padding: 3px; text-align: left; }
.cpw-vacancy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(37, 40, 45, .1);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  cursor: pointer;
}
.cpw-vacancy:hover { border-color: #bd7a4b; transform: translateY(-1px); }
.cpw-vacancy__copy { display: grid; gap: 4px; }
.cpw-vacancy__copy small { color: #73777f; }
.cpw-vacancy__arrow { color: #9a5d32; font-weight: 650; white-space: nowrap; }

.cpw-analysis { align-items: center; }
.cpw-analysis__orb,
.cpw-error-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #25282d;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 18px 46px rgba(37, 40, 45, .2);
}
.cpw-analysis__orb { animation: cpwPulse 1.8s ease-in-out infinite; }
@keyframes cpwPulse { 50% { transform: scale(1.05); box-shadow: 0 22px 55px rgba(154, 93, 50, .28); } }
.cpw-analysis__steps { width: min(600px, 100%); display: grid; gap: 8px; margin: 20px 0; padding: 0; list-style: none; text-align: left; }
.cpw-analysis__steps li { padding: 13px 16px 13px 44px; border: 1px solid rgba(37, 40, 45, .08); border-radius: 12px; background: rgba(255,255,255,.7); color: #73777f; position: relative; }
.cpw-analysis__steps li::before { content: ""; position: absolute; left: 17px; top: 17px; width: 10px; height: 10px; border: 2px solid #b5b8bd; border-radius: 50%; }
.cpw-analysis__steps li.active { color: #25282d; border-color: rgba(154, 93, 50, .35); }
.cpw-analysis__steps li.active::before { border-color: #bd7a4b; background: #bd7a4b; }
.cpw-analysis__steps li.done::before { content: "✓"; width: auto; height: auto; border: 0; color: #2d7a55; font-weight: 800; top: 12px; }

.cpw-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 22px auto 56px;
}
.cpw-main { min-width: 0; }
.cpw-card,
.cpw-panel,
.cpw-composer,
.cpw-overview {
  border: 1px solid rgba(37, 40, 45, .1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(37, 40, 45, .035);
}
.cpw-focus {
  border: 1px solid rgba(37, 40, 45, .1);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 42px rgba(37, 40, 45, .06);
  overflow: hidden;
  min-height: calc(100vh - 146px);
}
.cpw-card { padding: 22px; }
.cpw-card__head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 16px; }
.cpw-card h2,
.cpw-composer h2 { margin: 0; font-size: 18px; }
.cpw-card h3 { margin: 8px 0 5px; font-size: 16px; }
.cpw-card p { margin: 4px 0; }

.cpw-focus__steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0 clamp(20px, 5vw, 58px);
  border-bottom: 1px solid #ebe9e6;
  background: #faf9f7;
  list-style: none;
}
.cpw-focus__steps li {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 15px 12px;
  color: #73777f;
  font-size: 12px;
}
.cpw-focus__steps li + li::before {
  content: "";
  position: absolute;
  left: 0;
  width: 1px;
  height: 20px;
  background: #dedcd8;
}
.cpw-focus__steps li span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #d8d9dc;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}
.cpw-focus__steps li.done { color: #246947; }
.cpw-focus__steps li.done span { border-color: #b7dfca; background: #e5f4ec; }
.cpw-focus__steps li.current { color: #25282d; }
.cpw-focus__steps li.current span { border-color: #bd7a4b; background: #bd7a4b; color: #fff; }
.cpw-focus__concepts {
  display: flex;
  gap: 22px;
  padding: 0 clamp(20px, 5vw, 58px);
  overflow-x: auto;
  border-bottom: 1px solid #ebe9e6;
  background: #fff;
}
.cpw-focus__concept {
  flex: 0 0 auto;
  padding: 15px 0 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #73777f;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.cpw-focus__concept.active { border-bottom-color: #bd7a4b; color: #25282d; font-weight: 750; }
.cpw-focus__concept:focus-visible { outline: 2px solid rgba(189, 122, 75, .3); outline-offset: 3px; }
.cpw-focus__task { padding: clamp(34px, 6vw, 70px) clamp(20px, 7vw, 78px); }
.cpw-focus__intro { max-width: 660px; margin: 0 auto 34px; text-align: center; }
.cpw-focus__intro h2 { margin: 7px 0 9px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.025em; }
.cpw-focus__intro > p { max-width: 580px; margin: 0 auto; font-size: 14px; }
.cpw-focus__headline { margin-top: 17px !important; color: #25282d; font-weight: 700; }
.cpw-focus__body { max-width: 820px; margin: 0 auto; display: grid; gap: 20px; justify-items: stretch; }
.cpw-focus__body > .btn-primary { justify-self: center; min-width: 190px; }
.cpw-focus__actions { display: flex; justify-content: center; align-items: center; gap: 10px; }
.cpw-focus__notice { max-width: 660px; width: 100%; box-sizing: border-box; margin: 0 auto; padding: 15px 18px; border-left: 3px solid #bd7a4b; background: #faf6f2; }
.cpw-focus__notice p { margin: 5px 0 0; }
.cpw-control { max-width: 760px; }
.cpw-control__concept { display: grid; gap: 12px; }
.cpw-control__concept h3 { margin: 0; font-size: 15px; }
.cpw-control__plan {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 18px;
  border: 1px solid #dedde0;
  border-radius: 13px;
  background: #faf9f7;
}
.cpw-control__plan p { margin: 0; }
.cpw-control__plan .btn { margin-top: 5px; }
.cpw-brand-kit__summary,
.cpw-brand-kit__form {
  width: min(660px, 100%);
  box-sizing: border-box;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid #dedde0;
  border-radius: 14px;
  background: #fbfaf8;
}
.cpw-brand-kit__summary { display: grid; gap: 14px; }
.cpw-brand-kit__summary--pending { border-color: #dfbd8b; background: #fff9ee; }
.cpw-brand-kit__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cpw-brand-kit__summary p { margin: 0; }
.cpw-brand-kit__decision { width: min(660px, 100%); box-sizing: border-box; display: grid; gap: 12px; margin: 0 auto; padding: 16px 18px; border: 1px solid #dfbd8b; border-radius: 12px; background: #fff9ee; }
.cpw-brand-kit__decision > p { margin: 0; }
.cpw-brand-kit__swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cpw-brand-kit__swatch { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; font-weight: 650; }
.cpw-brand-kit__swatch i { width: 30px; height: 30px; flex: 0 0 auto; border: 1px solid rgba(37, 40, 45, .18); border-radius: 9px; box-shadow: inset 0 0 0 2px #fff; }
.cpw-brand-kit__form { display: grid; gap: 16px; }
.cpw-brand-kit__colors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; border: 0; }
.cpw-brand-kit__colors legend { grid-column: 1 / -1; margin-bottom: 2px; padding: 0; color: #25282d; font-size: 14px; font-weight: 750; }
.cpw-brand-kit__color-field { display: grid; gap: 7px; color: #5e6269; font-size: 11px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; cursor: pointer; }
.cpw-brand-kit__contrast { display: grid; gap: 8px; padding: 12px; border: 1px solid #dedfe1; border-radius: 11px; background: #fff; }
.cpw-brand-kit__contrast > p { margin: 0; }
.cpw-brand-kit__contrast.loading { background: #f7f7f8; }
.cpw-brand-kit__contrast.error { border-color: #e3b9b9; background: #fff1f1; color: #8b3333; }
.cpw-brand-kit__palette { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cpw-brand-kit__contrast-pair { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 9px; border: 1px solid #d8ddd9; border-radius: 9px; background: #f7fbf8; }
.cpw-brand-kit__contrast-pair.invalid { border-color: #e4c38f; background: #fff8eb; }
.cpw-brand-kit__pair-sample { width: 42px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(37, 40, 45, .18); border-radius: 7px; font-size: 17px; font-weight: 800; }
.cpw-brand-kit__pair-copy { min-width: 0; display: grid; gap: 2px; color: #5e6269; font-size: 11px; line-height: 1.3; }
.cpw-brand-kit__pair-copy strong { overflow: hidden; color: #25282d; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.cpw-brand-kit__assets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 14px; border: 1px solid #e1e1e3; border-radius: 11px; background: #fff; }
.cpw-brand-kit__assets legend { padding: 0 5px; color: #25282d; font-size: 13px; font-weight: 750; }
.cpw-brand-kit__asset-field { min-width: 0; display: grid; align-content: start; gap: 6px; padding: 11px; border: 1px solid #e1e1e3; border-radius: 9px; color: #5e6269; font-size: 11px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.cpw-brand-kit__asset-field strong { overflow: hidden; color: #25282d; font-size: 12px; letter-spacing: 0; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.cpw-brand-kit__asset-field input[type="file"] { width: 100%; color: #25282d; font: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; }
.cpw-brand-kit__asset-replacements { padding: 0 12px 12px; border: 1px solid #e1e1e3; border-radius: 11px; background: #f7f7f8; }
.cpw-brand-kit__asset-replacements > summary { padding: 12px 0 0; color: #5e6269; font-size: 12px; font-weight: 700; cursor: pointer; }
.cpw-brand-kit__asset-replacements[open] > summary { margin-bottom: 12px; }
.cpw-brand-kit__asset-replacements .cpw-brand-kit__assets { background: #fff; }
.cpw-brand-kit__attestation { grid-column: 1 / -1; display: flex; gap: 9px; align-items: start; padding: 11px; border-radius: 9px; background: #faf6f2; color: #4f5359; font-size: 12px; line-height: 1.45; cursor: pointer; }
.cpw-brand-kit__attestation input { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; accent-color: #9a5d32; }
.cpw-brand-kit__attestation input:focus-visible { outline: 3px solid rgba(189, 122, 75, .3); outline-offset: 2px; }
.cpw-color-input {
  width: 100%;
  min-height: 56px;
  padding: 5px;
  border-radius: 10px;
  cursor: pointer;
}
.cpw-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.cpw-color-input::-webkit-color-swatch { border: 0; border-radius: 6px; }
.cpw-color-input::-moz-color-swatch { border: 0; border-radius: 6px; }
.cpw-color-input:focus-visible { outline: 3px solid rgba(189, 122, 75, .3); outline-offset: 2px; }
.cpw-brand-kit__feedback { width: min(660px, 100%); box-sizing: border-box; margin: 0 auto; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.cpw-brand-kit__feedback.error { border: 1px solid #e3b9b9; background: #fff1f1; color: #8b3333; }
.cpw-brand-kit__feedback.success { border: 1px solid #b7dfca; background: #eaf6ef; color: #246947; }
.cpw-brand-kit__feedback:focus { outline: 3px solid rgba(189, 122, 75, .3); outline-offset: 2px; }
.cpw-focus__asset {
  width: min(680px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid #ebe9e6;
  border-bottom: 1px solid #ebe9e6;
}
.cpw-focus__asset img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: #ececee; }
.cpw-focus__asset > div { display: grid; gap: 4px; min-width: 0; }
.cpw-focus__asset strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpw-text-action { border: 0; background: transparent; color: #8b522c; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.cpw-text-action:hover { text-decoration: underline; }
.cpw-text-action:focus-visible { outline: 2px solid rgba(189, 122, 75, .3); outline-offset: 3px; }

.cpw-source-choices { display: flex; gap: 12px; padding: 3px 3px 11px; overflow-x: auto; scroll-snap-type: x proximity; }
.cpw-source-choice {
  flex: 0 0 154px;
  scroll-snap-align: start;
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dedde0;
  border-radius: 12px;
  background: #fff;
  color: #25282d;
  text-align: left;
  cursor: pointer;
}
.cpw-source-choice:hover { border-color: #bd7a4b; }
.cpw-source-choice.selected { border-color: #9a5d32; box-shadow: 0 0 0 2px rgba(154, 93, 50, .15); }
.cpw-source-choice:focus-visible { outline: 2px solid rgba(189, 122, 75, .35); outline-offset: 2px; }
.cpw-source-choice img { width: 100%; height: 112px; display: block; object-fit: cover; background: #ececee; }
.cpw-source-choice__copy { display: grid; gap: 3px; padding: 9px 10px; }
.cpw-source-choice__copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.cpw-source-choice__copy small { color: #73777f; font-size: 10px; }

.cpw-overview { overflow: hidden; }
.cpw-overview > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
}
.cpw-overview__summary { display: grid; gap: 4px; }
.cpw-overview__summary small { color: #73777f; font-size: 12px; }
.cpw-overview__content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 0 16px 16px; border-top: 1px solid #ececee; background: #faf9f7; }
.cpw-overview__content > .cpw-card { margin-top: 14px; box-shadow: none; }
.cpw-overview__content > .cpw-card + .cpw-card { margin-top: 0; }
.cpw-strategy { padding: 18px; border-radius: 13px; background: linear-gradient(135deg, #f5eee8, #fbfaf8); }
.cpw-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.cpw-summary { display: grid; gap: 4px; padding: 12px; border: 1px solid rgba(37, 40, 45, .08); border-radius: 11px; }
.cpw-summary small { color: #73777f; }
.cpw-summary strong { font-size: 13px; overflow-wrap: anywhere; }

.cpw-badge { display: inline-flex; align-items: center; width: max-content; padding: 3px 8px; border-radius: 999px; background: #eeeef0; color: #62666d; font-size: 10px; font-weight: 750; letter-spacing: .02em; text-transform: uppercase; }
.cpw-badge.success { background: #e5f4ec; color: #246947; }
.cpw-badge.warning { background: #fff1d8; color: #835513; }
.cpw-badge.copper { background: #f5e8df; color: #8b522c; }
.cpw-badge.neutral { background: #f0f0f2; color: #62666d; }

.cpw-inline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; }
.cpw-field { display: grid; gap: 5px; color: #5e6269; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.cpw-input,
.cpw-composer__input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 11px;
  border: 1px solid #d9dadd;
  border-radius: 9px;
  background: #fff;
  color: #25282d;
  font: inherit;
  font-size: 13px;
}
.cpw-input:focus,
.cpw-composer__input:focus { outline: 2px solid rgba(189, 122, 75, .22); border-color: #bd7a4b; }
.cpw-field__hint { color: #73777f; font-weight: 500; letter-spacing: 0; text-transform: none; }
.cpw-claim-select { min-height: 62px; font-size: 11px; text-transform: none; }
.cpw-textarea { min-height: 96px; resize: vertical; }
.cpw-forecast { display: grid; gap: 8px; margin-top: 16px; }
.cpw-forecast__row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 14px; align-items: center; padding: 12px; border-radius: 11px; background: #f7f7f6; }
.cpw-forecast__row p { grid-column: 1 / -1; }

.cpw-campaign { padding: 16px 0 2px; border-top: 1px solid #ececee; }
.cpw-campaign:first-of-type { border-top: 0; }
.cpw-campaign__title { display: flex; align-items: center; gap: 9px; }
.cpw-budget-edit { display: flex; align-items: center; gap: 8px; width: max-content; margin: 8px 0; color: #73777f; font-size: 12px; }
.cpw-budget-edit .cpw-input { width: 90px; }
.cpw-small-btn { padding: 8px 10px; font-size: 11px; }
.cpw-adset { margin: 14px 0 0 18px; padding: 15px; border-left: 3px solid #d5b39b; border-radius: 0 12px 12px 0; background: #faf9f7; }
.cpw-adset__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 750; }
.cpw-ad { border-top: 1px solid #e4e3e1; padding: 10px 0; }
.cpw-ad summary,
.cpw-panel > summary,
.cpw-source > summary { cursor: pointer; display: flex; gap: 10px; justify-content: space-between; align-items: center; list-style: none; }
.cpw-panel > summary::after,
.cpw-overview > summary::after,
.cpw-subdetails > summary::after { content: "⌄"; flex: 0 0 auto; color: #73777f; font-size: 14px; transition: transform .15s ease; }
.cpw-panel[open] > summary::after,
.cpw-overview[open] > summary::after,
.cpw-subdetails[open] > summary::after { transform: rotate(180deg); }
.cpw-ad summary span { color: #73777f; font-size: 12px; }
.cpw-ad__fields { display: grid; gap: 10px; margin: 12px 0; }

.cpw-upload { display: flex; gap: 10px; align-items: center; justify-content: center; padding-top: 3px; }
.cpw-creative-editor { grid-column: 1 / -1; padding: 12px; border: 1px solid #e1e1e3; border-radius: 11px; background: #fbfaf8; }
.cpw-creative-editor > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; list-style: none; }
.cpw-creative-editor__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.cpw-creative-editor__fields .cpw-field:last-child { grid-column: 1 / -1; }
.cpw-template-editor { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e1e1e3; }
.cpw-template-editor h4 { margin: 0; font-size: 14px; }
.cpw-template-editor__slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cpw-focal-editor { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e1e1e3; }
.cpw-focal-editor h4 { margin: 0; font-size: 14px; }
.cpw-focal-editor__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cpw-focal-editor__ratio { min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 10px; border: 1px solid #dedde0; border-radius: 10px; }
.cpw-focal-editor__ratio legend { padding: 0 5px; font-size: 12px; font-weight: 750; }
.cpw-creative-editor__actions { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; }
.cpw-source-match { grid-column: 1 / -1; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid #e1e1e3; border-radius: 10px; background: #f7f5f2; }
.cpw-source-match__image { width: 76px; height: 76px; border-radius: 8px; object-fit: cover; background: #e8e8ea; }
.cpw-source-match__copy { display: grid; gap: 5px; min-width: 0; }
.cpw-source-match__copy p { margin: 0; color: #5f636a; font-size: 12px; line-height: 1.45; }
.cpw-source-match__copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpw-rights { grid-column: 1 / -1; padding: 11px 12px; border: 1px solid #e1e1e3; border-radius: 10px; background: #fafafa; }
.cpw-rights__head, .cpw-rights-actions { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cpw-rights p { margin: 7px 0 0; }
.cpw-rights-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e1e1e3; }
.cpw-rights-form .cpw-rights-actions { grid-column: 1 / -1; justify-content: flex-end; }
.cpw-preview-grid { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cpw-render-job { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 9px 11px; border: 1px solid #e1e1e3; border-radius: 10px; background: #fafafa; font-size: 12px; }
.cpw-render-job .cpw-preview-reason { min-height: 0; margin-left: auto; padding: 0; }
.cpw-preview { margin: 0; border: 1px solid #e1e1e3; border-radius: 11px; overflow: hidden; background: #f0f0f2; }
.cpw-preview img { width: 100%; height: 260px; display: block; object-fit: contain; background: #e8e8ea; }
.cpw-preview figcaption { display: flex; justify-content: space-between; gap: 6px; align-items: center; padding: 8px; font-size: 11px; }
.cpw-preview-empty { grid-column: 1 / -1; padding: 30px; border: 1px dashed #d6d6d9; border-radius: 11px; text-align: center; color: #73777f; font-size: 12px; }
.cpw-preview > .cpw-preview-empty { min-height: 260px; display: grid; place-items: center; border: 0; border-radius: 0; }
.cpw-preview-reason { min-height: 34px; margin: 0; padding: 0 8px 9px; color: #835513; font-size: 11px; }
.cpw-blockers { grid-column: 1 / -1; margin: 0; padding: 10px 12px 10px 28px; border-radius: 10px; background: #fff8eb; color: #704a16; font-size: 12px; }
.cpw-render-warnings { grid-column: 1 / -1; }
.cpw-subdetails { grid-column: 1 / -1; border: 1px solid #e1e1e3; border-radius: 11px; background: #fff; }
.cpw-subdetails > summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 11px 12px; cursor: pointer; list-style: none; }
.cpw-technical-details > summary { min-height: 44px; box-sizing: border-box; }
.cpw-subdetails > .cpw-source-match { border: 0; border-top: 1px solid #e1e1e3; border-radius: 0 0 10px 10px; }
.cpw-subdetails > .cpw-blockers { border-radius: 0 0 10px 10px; }

/* Route-stappen wrappen (2 naast elkaar, 1 per rij onder ~310 px) i.p.v. één
   niet-wrappende rij die de kaart tot min-content oprekte; de volgorde zit in
   het stapnummer, niet meer in losse pijl-spans die niet mee konden wrappen. */
.cpw-journey { display: flex; flex-wrap: wrap; gap: 8px; counter-reset: cpw-journey-step; }
.cpw-journey__step { flex: 1 1 calc(50% - 4px); min-width: min(100%, 150px); display: grid; gap: 4px; align-content: start; padding: 11px 12px; border: 1px solid #e1e1e3; border-radius: 11px; background: #fff; counter-increment: cpw-journey-step; }
.cpw-journey__step small { color: #73777f; font-size: 12px; }
.cpw-journey__step small::before { content: counter(cpw-journey-step) ". "; color: #9a5d32; font-weight: 750; }
.cpw-journey__step strong { font-size: 14px; overflow-wrap: anywhere; }
.cpw-warning { display: flex; gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid #eeeeef; font-size: 13px; }

.cpw-composer { padding: 18px; display: grid; gap: 11px; border-color: rgba(154, 93, 50, .25); }
.cpw-composer-panel > .cpw-composer { margin-top: 12px; padding: 14px 0 0; border: 0; border-top: 1px solid #eeeeef; border-radius: 0; box-shadow: none; }
.cpw-examples { display: flex; flex-wrap: wrap; gap: 6px; }
.cpw-example { border: 1px solid #dedde0; border-radius: 999px; background: #fafafa; padding: 6px 9px; color: #5d6168; font-size: 10px; cursor: pointer; }
.cpw-conversation { display: grid; gap: 7px; max-height: 220px; overflow-y: auto; }
.cpw-message { max-width: 90%; padding: 9px 11px; border-radius: 10px; font-size: 12px; line-height: 1.45; }
.cpw-message.user { justify-self: end; background: #25282d; color: #fff; }
.cpw-message.assistant { justify-self: start; background: #f1ece8; }
.cpw-composer__input { min-height: 86px; resize: vertical; }

.cpw-panel { padding: 14px 16px; }
.cpw-panel > summary { padding: 2px 0; }
.cpw-restore { width: 100%; margin-top: 12px; font-size: 11px; }
.cpw-source { padding: 9px 0; border-top: 1px solid #eeeeef; font-size: 12px; }
.cpw-source > summary { justify-content: flex-start; }
.cpw-source__origin { display: grid; gap: 3px; margin: 8px 0 0 28px; padding: 7px 9px; border-left: 2px solid #d5b39b; color: #60646b; }
.cpw-revision { padding: 10px 0; border-top: 1px solid #eeeeef; }
.cpw-revision__top { display: flex; justify-content: space-between; align-items: center; }
.cpw-diff { display: grid; grid-template-columns: 1fr auto auto; gap: 7px; margin-top: 6px; font-size: 10px; }
.cpw-diff del { color: #a14848; background: #fbe8e8; padding: 3px 5px; text-decoration: none; border-radius: 4px; }
.cpw-diff ins { color: #246947; background: #e5f4ec; padding: 3px 5px; text-decoration: none; border-radius: 4px; }
.cpw-empty,
.cpw-error { padding: 20px; border-radius: 12px; background: #fff; color: #73777f; }
.cpw-error { color: #9a3d3d; }

.cpw-drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 560px);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
.cpw-drawer-backdrop { grid-column: 1; border: 0; background: rgba(31, 33, 37, .34); cursor: default; }
.cpw-drawer {
  grid-column: 2;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #f5f4f1;
  box-shadow: -18px 0 48px rgba(31, 33, 37, .18);
}
.cpw-drawer__head { display: flex; justify-content: space-between; align-items: start; gap: 18px; padding: 24px 26px 18px; border-bottom: 1px solid #dedcd8; background: #fff; }
.cpw-drawer__head h2 { margin: 0; font-size: 22px; }
.cpw-drawer__head p { margin: 5px 0 0; }
/* grid-auto-rows: max-content — een auto-rij neemt voor een scroll-container
   (.cpw-overview heeft overflow: hidden) base-size 0 en het grid verdeelde de
   bodyhoogte dan gelijk over de open secties, die hun inhoud wegknipten
   (gemeten 23-08: 273 px per sectie, 1048 px onbereikbaar). */
.cpw-drawer__body { min-height: 0; display: grid; grid-auto-rows: max-content; align-content: start; gap: 12px; overflow-y: auto; padding: 18px; }
.cpw-drawer__body > * { min-width: 0; }
.cpw-drawer__body .cpw-overview__content { gap: 10px; padding: 0 10px 10px; }
.cpw-drawer__body .cpw-overview__content > .cpw-card { margin-top: 10px; }
.cpw-drawer__body .cpw-overview__content > .cpw-card + .cpw-card { margin-top: 0; }
/* Drawer-schaal: sectietitel (15) > kaarttitel (14) > broodtekst (13); de
   kaarten zijn sub-niveaus van de sectie, geen tweede kop naast de sectiekop. */
.cpw-drawer__body .cpw-card { min-width: 0; padding: 14px 16px; }
.cpw-drawer__body .cpw-card h2 { font-size: 14px; }
.cpw-drawer__body .cpw-card h3 { font-size: 14px; }
.cpw-drawer__body .cpw-card p { font-size: 13px; }
.cpw-drawer__body .cpw-card__head { margin-bottom: 12px; }
.cpw-drawer__body .cpw-strategy { padding: 14px; }
.cpw-drawer__body .cpw-strategy h3 { margin-top: 10px; font-size: 15px; line-height: 1.4; }
.cpw-drawer__body .cpw-adset { margin-left: 8px; padding: 13px 14px; }
.cpw-drawer__body .cpw-adset__head { font-size: 13px; }
.cpw-drawer__body .cpw-forecast__row strong { font-size: 13px; }
/* Het label in een aandachtspunt breekt niet zelf af; de tekst ernaast wrapt. */
.cpw-drawer__body .cpw-warning > .cpw-badge { flex: 0 0 auto; }

@media (max-width: 900px) {
  .cpw-preview img,
  .cpw-preview > .cpw-preview-empty { height: 210px; min-height: 210px; }
}

@media (max-width: 480px) {
  /* Sectiekop in de drawer: badge onder de titel, chevron rechts gecentreerd;
     naast elkaar drukt een lang label de titel plat of breekt het label af. */
  .cpw-overview > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
  .cpw-overview > summary > .cpw-badge { grid-column: 1; }
  .cpw-overview > summary::after { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 720px) {
  .cpw-root { top: 52px; }
  .cpw-header { grid-template-columns: auto 1fr; padding: 9px 14px; }
  .cpw-header__titles { text-align: left; }
  .cpw-header__action { font-size: 0; padding: 8px; }
  .cpw-header__action::after { content: "Info"; font-size: 12px; }
  .cpw-shell { width: calc(100% - 22px); margin-top: 12px; }
  .cpw-focus { min-height: calc(100vh - 90px); border-radius: 15px; }
  .cpw-card { padding: 16px; }
  .cpw-focus__steps { padding: 0 6px; }
  .cpw-focus__steps li { padding: 12px 5px; font-size: 10px; }
  .cpw-focus__steps li span { display: none; }
  .cpw-focus__concepts { padding: 0 16px; }
  .cpw-focus__task { padding: 30px 16px 42px; }
  .cpw-focus__intro { margin-bottom: 26px; }
  .cpw-focus__actions { align-items: stretch; flex-direction: column; }
  .cpw-focus__actions .btn { width: 100%; }
  .cpw-focus__asset { grid-template-columns: 58px minmax(0, 1fr); }
  .cpw-focus__asset img { width: 58px; height: 58px; }
  .cpw-focus__asset > .cpw-text-action { grid-column: 1 / -1; justify-self: start; }
  .cpw-brand-kit__swatches,
  .cpw-brand-kit__colors,
  .cpw-brand-kit__palette,
  .cpw-brand-kit__assets { grid-template-columns: 1fr; }
  .cpw-brand-kit__attestation { grid-column: 1; }
  .cpw-creative-editor__fields,
  .cpw-template-editor__slots,
  .cpw-focal-editor__grid { grid-template-columns: 1fr; }
  .cpw-creative-editor__fields .cpw-field:last-child { grid-column: auto; }
  .cpw-creative-editor__actions { align-items: stretch; flex-direction: column; }
  .cpw-preview-grid { grid-template-columns: 1fr; }
  .cpw-preview img { height: 300px; }
  .cpw-source-match { grid-template-columns: 64px minmax(0, 1fr); }
  .cpw-source-match__image { width: 64px; height: 64px; }
  .cpw-source-match .btn { grid-column: 1 / -1; }
  .cpw-rights-form { grid-template-columns: 1fr; }
  .cpw-drawer-layer { grid-template-columns: 1fr; }
  .cpw-drawer-backdrop { display: none; }
  .cpw-drawer { grid-column: 1; width: 100%; }
}
