.aitc-cwpf {
  --aitc-cwpf-accent: #990000;
  --aitc-cwpf-accent-dark: #700000;
  --aitc-cwpf-ink: #1c2430;
  --aitc-cwpf-muted: #667085;
  --aitc-cwpf-line: #d8dee8;
  --aitc-cwpf-soft: #f5f7fa;
  --aitc-cwpf-white: #ffffff;
  --aitc-cwpf-success: #176b3a;
  --aitc-cwpf-warning: #9a5b00;
  --aitc-cwpf-danger: #a11d2f;
  color: var(--aitc-cwpf-ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 28px auto;
  max-width: 1480px;
}

.aitc-cwpf *,
.aitc-cwpf *::before,
.aitc-cwpf *::after { box-sizing: border-box; }

.aitc-cwpf button,
.aitc-cwpf input,
.aitc-cwpf select,
.aitc-cwpf textarea { font: inherit; }

.aitc-cwpf__hero {
  align-items: center;
  background: linear-gradient(135deg, #fff 0%, #fff7f7 100%);
  border: 1px solid #efd8d8;
  border-radius: 20px;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 26px;
}

.aitc-cwpf__hero h2 {
  color: var(--aitc-cwpf-ink);
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 6px 0 10px;
}

.aitc-cwpf__hero p { color: #465267; margin: 0; max-width: 850px; }
.aitc-cwpf__eyebrow { color: var(--aitc-cwpf-accent); font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.aitc-cwpf__privacy {
  background: #fff;
  border: 1px solid #d5e8dc;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(28, 36, 48, .06);
  flex: 0 0 230px;
  padding: 14px 16px;
}
.aitc-cwpf__privacy strong { color: var(--aitc-cwpf-success); display: block; }
.aitc-cwpf__privacy span { color: var(--aitc-cwpf-muted); display: block; font-size: 13px; margin-top: 2px; }

.aitc-cwpf__quickbar,
.aitc-cwpf__controls,
.aitc-cwpf__copybar,
.aitc-cwpf__button-row,
.aitc-cwpf__inline-options {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.aitc-cwpf__quickbar {
  background: #fff;
  border: 1px solid var(--aitc-cwpf-line);
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(28, 36, 48, .05);
  margin-bottom: 14px;
  padding: 12px;
  position: sticky;
  top: 12px;
  z-index: 20;
}

.aitc-cwpf__button {
  appearance: none;
  background: #fff;
  border: 1px solid #bfc8d6;
  border-radius: 9px;
  color: #243047;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  min-height: 42px;
  padding: 10px 15px;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.aitc-cwpf__button:hover { border-color: #7d899b; box-shadow: 0 3px 10px rgba(28,36,48,.08); transform: translateY(-1px); }
.aitc-cwpf__button:focus-visible,
.aitc-cwpf input:focus-visible,
.aitc-cwpf textarea:focus-visible,
.aitc-cwpf select:focus-visible { outline: 3px solid rgba(153,0,0,.22); outline-offset: 2px; }
.aitc-cwpf__button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.aitc-cwpf__button--primary { background: var(--aitc-cwpf-accent); border-color: var(--aitc-cwpf-accent); color: #fff; }
.aitc-cwpf__button--primary:hover { background: var(--aitc-cwpf-accent-dark); border-color: var(--aitc-cwpf-accent-dark); }
.aitc-cwpf__button--quiet { margin-left: auto; }
.aitc-cwpf__button--small { min-height: 36px; padding: 8px 12px; }

.aitc-cwpf__status { color: var(--aitc-cwpf-muted); font-size: 13px; font-weight: 700; margin-left: 4px; }
.aitc-cwpf__status[data-type="success"] { color: var(--aitc-cwpf-success); }
.aitc-cwpf__status[data-type="error"] { color: var(--aitc-cwpf-danger); }

.aitc-cwpf__controls {
  background: var(--aitc-cwpf-soft);
  border: 1px solid var(--aitc-cwpf-line);
  border-radius: 14px;
  margin-bottom: 14px;
  padding: 13px;
}
.aitc-cwpf__controls label { color: #3b475b; display: grid; font-size: 12px; font-weight: 800; gap: 4px; min-width: 180px; text-transform: uppercase; }
.aitc-cwpf select,
.aitc-cwpf input[type="text"],
.aitc-cwpf input[type="url"],
.aitc-cwpf input[type="number"] {
  background: #fff;
  border: 1px solid #bfc8d6;
  border-radius: 8px;
  color: var(--aitc-cwpf-ink);
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

.aitc-cwpf__workspace { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.aitc-cwpf__pane {
  background: #fff;
  border: 1px solid var(--aitc-cwpf-line);
  border-radius: 16px;
  box-shadow: 0 7px 24px rgba(28, 36, 48, .05);
  min-width: 0;
  overflow: hidden;
}
.aitc-cwpf__pane-head,
.aitc-cwpf__section-head {
  align-items: center;
  border-bottom: 1px solid var(--aitc-cwpf-line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 13px 16px;
}
.aitc-cwpf__pane-head h3,
.aitc-cwpf__section-head h3 { font-size: 16px; margin: 0; }
.aitc-cwpf__pane-head span,
.aitc-cwpf__section-head span { color: var(--aitc-cwpf-muted); font-size: 12px; font-weight: 700; }
.aitc-cwpf__source,
.aitc-cwpf__code-output {
  background: #fff;
  border: 0;
  color: #202a3b;
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.6;
  min-height: 600px;
  padding: 18px;
  resize: vertical;
  width: 100%;
}
.aitc-cwpf__source:focus,
.aitc-cwpf__code-output:focus { outline: 0; box-shadow: inset 0 0 0 3px rgba(153,0,0,.12); }

.aitc-cwpf__tabs { background: #f8fafc; border-bottom: 1px solid var(--aitc-cwpf-line); display: flex; gap: 2px; overflow-x: auto; padding: 8px 8px 0; }
.aitc-cwpf__tabs button,
.aitc-cwpf__preview-tools button {
  appearance: none;
  background: transparent;
  border: 0;
  color: #59667a;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 11px;
  white-space: nowrap;
}
.aitc-cwpf__tabs button[aria-selected="true"] { background: #fff; border: 1px solid var(--aitc-cwpf-line); border-bottom-color: #fff; border-radius: 8px 8px 0 0; color: var(--aitc-cwpf-accent); margin-bottom: -1px; }
.aitc-cwpf__preview-tools { align-items: center; background: #fff; border-bottom: 1px solid var(--aitc-cwpf-line); display: flex; gap: 4px; justify-content: flex-end; padding: 6px 10px; }
.aitc-cwpf__preview-tools span { color: var(--aitc-cwpf-muted); font-size: 12px; font-weight: 700; }
.aitc-cwpf__preview-tools button { border-radius: 7px; padding: 5px 8px; }
.aitc-cwpf__preview-tools button[aria-pressed="true"] { background: #edf1f6; color: var(--aitc-cwpf-ink); }
.aitc-cwpf__output-wrap { background: #eef1f5; min-height: 600px; overflow: auto; padding: 16px; }
.aitc-cwpf__output-wrap[data-preview-size="tablet"] .aitc-cwpf__preview { max-width: 760px; }
.aitc-cwpf__output-wrap[data-preview-size="mobile"] .aitc-cwpf__preview { max-width: 390px; }
.aitc-cwpf__preview {
  background: #fff;
  box-shadow: 0 4px 18px rgba(28,36,48,.08);
  margin: 0 auto;
  min-height: 560px;
  padding: clamp(24px, 5vw, 54px);
  transition: max-width .2s ease;
  width: 100%;
}
.aitc-cwpf__preview > :first-child { margin-top: 0; }
.aitc-cwpf__preview > :last-child { margin-bottom: 0; }
.aitc-cwpf__preview h1,
.aitc-cwpf__preview h2,
.aitc-cwpf__preview h3,
.aitc-cwpf__preview h4 { color: #172033; line-height: 1.2; margin: 1.4em 0 .55em; }
.aitc-cwpf__preview h2 { border-bottom: 1px solid #e6eaf0; font-size: 1.65em; padding-bottom: .28em; }
.aitc-cwpf__preview h3 { font-size: 1.3em; }
.aitc-cwpf__preview p { margin: 0 0 1.05em; }
.aitc-cwpf__preview a { color: #8d0000; text-decoration: underline; text-underline-offset: 2px; }
.aitc-cwpf__preview blockquote { border-left: 4px solid #aab4c3; color: #4b576a; margin: 1.2em 0; padding: 4px 0 4px 18px; }
.aitc-cwpf__preview pre { background: #111827; border-radius: 9px; color: #f8fafc; overflow: auto; padding: 16px; }
.aitc-cwpf__preview code { background: #f1f3f6; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: .12em .3em; }
.aitc-cwpf__preview pre code { background: none; padding: 0; }
.aitc-cwpf__copybar { border-top: 1px solid var(--aitc-cwpf-line); padding: 12px; }

.aitc-cwpf__options { background: #fff; border: 1px solid var(--aitc-cwpf-line); border-radius: 14px; margin-top: 14px; }
.aitc-cwpf__options summary { cursor: pointer; font-weight: 800; padding: 14px 16px; }
.aitc-cwpf__option-grid { border-top: 1px solid var(--aitc-cwpf-line); display: grid; gap: 9px 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 16px; }
.aitc-cwpf__option-grid label,
.aitc-cwpf__inline-options label { align-items: flex-start; color: #3f4b5f; display: flex; font-size: 13px; gap: 8px; }
.aitc-cwpf input[type="checkbox"] { accent-color: var(--aitc-cwpf-accent); height: 17px; margin-top: 2px; width: 17px; }

.aitc-cwpf__studio { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; }
.aitc-cwpf__card,
.aitc-cwpf__audit,
.aitc-cwpf__faq-output {
  background: #fff;
  border: 1px solid var(--aitc-cwpf-line);
  border-radius: 14px;
  min-width: 0;
  padding: 16px;
}
.aitc-cwpf__card h3 { font-size: 16px; margin: 0 0 6px; }
.aitc-cwpf__card p { color: var(--aitc-cwpf-muted); font-size: 12px; margin: 0 0 13px; }
.aitc-cwpf__card > label { color: #4d596c; display: grid; font-size: 12px; font-weight: 700; gap: 4px; margin-bottom: 10px; }
.aitc-cwpf__inline-options { margin: 6px 0 12px; }
.aitc-cwpf__results-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); margin-top: 14px; }
.aitc-cwpf__audit,
.aitc-cwpf__faq-output { padding: 0; overflow: hidden; }
.aitc-cwpf__audit [data-audit] { display: grid; gap: 8px; max-height: 520px; overflow: auto; padding: 14px; }
.aitc-cwpf__warning { border: 1px solid #ead8b7; border-left: 4px solid #b66e00; border-radius: 9px; padding: 11px 12px; }
.aitc-cwpf__warning strong { display: block; font-size: 14px; }
.aitc-cwpf__warning p { color: #4e5969; font-size: 13px; margin: 3px 0 5px; }
.aitc-cwpf__warning small { color: #657085; display: block; }
.aitc-cwpf__warning--heading { border-left-color: #8b3bb2; }
.aitc-cwpf__warning--link,
.aitc-cwpf__warning--affiliate { border-left-color: #176b8f; }
.aitc-cwpf__warning--voice { border-left-color: #8b5d15; }
.aitc-cwpf__warning--faq { border-left-color: #a11d2f; }
.aitc-cwpf__audit-good { align-items: center; background: #f1fbf5; border: 1px solid #cce8d7; border-radius: 9px; display: flex; gap: 10px; padding: 12px; }
.aitc-cwpf__audit-good strong { color: var(--aitc-cwpf-success); }
.aitc-cwpf__audit-good span { color: #4e6759; font-size: 13px; }
.aitc-cwpf__faq-output textarea { border: 0; display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 300px; padding: 14px; resize: vertical; width: 100%; }
.aitc-cwpf__empty { color: var(--aitc-cwpf-muted); font-size: 13px; margin: 0; }
.aitc-cwpf__footnote { color: var(--aitc-cwpf-muted); font-size: 12px; margin: 14px 2px 0; text-align: center; }

/* Formatted article components */
.aitc-cwpf__preview .aitc-cwpf-affiliate-disclosure { background: #f7f7f8; border-left: 4px solid #8d95a3; color: #4e5765; font-size: .88em; padding: 10px 12px; }
.aitc-cwpf__preview .aitc-cwpf-toc { background: #f7f9fc; border: 1px solid #dce3ed; border-radius: 10px; margin: 1.25em 0; padding: 16px; }
.aitc-cwpf__preview .aitc-cwpf-toc__title { display: block; margin-bottom: 8px; }
.aitc-cwpf__preview .aitc-cwpf-toc ul { margin: 0; padding-left: 20px; }
.aitc-cwpf__preview .aitc-cwpf-toc__subitem { margin-left: 16px; }
.aitc-cwpf__preview .aitc-cwpf-callout { background: #f6f8fb; border: 1px solid #d8dee8; border-left: 6px solid #5e6f87; border-radius: 10px; margin: 1.3em 0; padding: 15px 17px; }
.aitc-cwpf__preview .aitc-cwpf-callout__title { font-size: .82em; font-weight: 900; letter-spacing: .055em; margin: 0 0 6px; text-transform: uppercase; }
.aitc-cwpf__preview .aitc-cwpf-callout--quick-win { background: #f1faf5; border-left-color: #268152; }
.aitc-cwpf__preview .aitc-cwpf-callout--level-up { background: #f2f6ff; border-left-color: #345aa8; }
.aitc-cwpf__preview .aitc-cwpf-callout--reality-check { background: #fff8ed; border-left-color: #b56a00; }
.aitc-cwpf__preview .aitc-cwpf-callout--mistake-fix,
.aitc-cwpf__preview .aitc-cwpf-callout--warning { background: #fff3f4; border-left-color: #a11d2f; }
.aitc-cwpf__preview .aitc-cwpf-callout--garbage-rescue { background: #f8f3ff; border-left-color: #7c3aaa; }
.aitc-cwpf__preview .aitc-cwpf-image-placeholder { align-items: center; background: repeating-linear-gradient(45deg,#f8fafc,#f8fafc 10px,#eef2f7 10px,#eef2f7 20px); border: 2px dashed #aeb8c7; border-radius: 10px; color: #4a5669; display: flex; flex-direction: column; gap: 4px; justify-content: center; margin: 1.3em 0; min-height: 160px; padding: 18px; text-align: center; }
.aitc-cwpf__preview .wp-block-table,
.aitc-cwpf__preview .aitc-cwpf-table-scroll { margin: 1.25em 0; overflow-x: auto; }
.aitc-cwpf__preview table { border-collapse: collapse; min-width: 100%; width: 100%; }
.aitc-cwpf__preview th,
.aitc-cwpf__preview td { border: 1px solid #d8dee8; padding: 10px 12px; text-align: left; vertical-align: top; }
.aitc-cwpf__preview th { background: #f2f5f8; }
.aitc-cwpf__preview .aitc-cwpf-stacked-table { display: grid; gap: 12px; margin: 1.25em 0; }
.aitc-cwpf__preview .aitc-cwpf-stacked-table__row { border: 1px solid #d8dee8; border-radius: 10px; overflow: hidden; }
.aitc-cwpf__preview .aitc-cwpf-stacked-table__row > div { display: grid; gap: 12px; grid-template-columns: minmax(110px,.35fr) minmax(0,1fr); padding: 9px 12px; }
.aitc-cwpf__preview .aitc-cwpf-stacked-table__row > div:nth-child(odd) { background: #f7f9fb; }
.aitc-cwpf__preview details { border: 1px solid #d8dee8; border-radius: 9px; margin: 10px 0; padding: 12px 14px; }
.aitc-cwpf__preview summary { cursor: pointer; font-weight: 800; }

.aitc-cwpf__changes { background: #fff; min-height: 560px; overflow: auto; padding: 12px; }
.aitc-cwpf-diff { border: 1px solid #d8dee8; border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; overflow: hidden; }
.aitc-cwpf-diff > div { display: grid; grid-template-columns: 30px minmax(0,1fr); }
.aitc-cwpf-diff span { color: #6a7586; padding: 3px 7px; text-align: center; user-select: none; }
.aitc-cwpf-diff code { overflow-wrap: anywhere; padding: 3px 8px; white-space: pre-wrap; }
.aitc-cwpf-diff__add { background: #ecf9f1; }
.aitc-cwpf-diff__remove { background: #fff0f1; }
.aitc-cwpf-diff__same { color: #7c8796; }
.aitc-cwpf-diff-summary { background: #f7f9fc; border: 1px solid #d8dee8; border-radius: 9px; padding: 14px; }

@media (max-width: 1180px) {
  .aitc-cwpf__studio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aitc-cwpf__option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .aitc-cwpf__hero { align-items: flex-start; flex-direction: column; }
  .aitc-cwpf__privacy { flex-basis: auto; width: 100%; }
  .aitc-cwpf__workspace,
  .aitc-cwpf__results-grid { grid-template-columns: 1fr; }
  .aitc-cwpf__source,
  .aitc-cwpf__code-output,
  .aitc-cwpf__output-wrap { min-height: 470px; }
  .aitc-cwpf__preview { min-height: 430px; }
}

@media (max-width: 640px) {
  .aitc-cwpf { margin: 16px auto; }
  .aitc-cwpf__hero { border-radius: 14px; padding: 18px; }
  .aitc-cwpf__quickbar { position: static; }
  .aitc-cwpf__button--quiet { margin-left: 0; }
  .aitc-cwpf__controls label { min-width: 100%; }
  .aitc-cwpf__option-grid,
  .aitc-cwpf__studio { grid-template-columns: 1fr; }
  .aitc-cwpf__results-grid { display: block; }
  .aitc-cwpf__faq-output { margin-top: 14px; }
  .aitc-cwpf__preview-tools { justify-content: flex-start; overflow-x: auto; }
  .aitc-cwpf__output-wrap { padding: 8px; }
  .aitc-cwpf__preview { padding: 22px 18px; }
  .aitc-cwpf__copybar .aitc-cwpf__button { flex: 1 1 100%; }
}

.aitc-cwpf__split-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.aitc-cwpf__split-fields > label {
  color: #4d596c;
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
  margin-bottom: 10px;
}
.aitc-cwpf__mini-textarea {
  border: 1px solid #bfc8d6;
  border-radius: 8px;
  min-height: 104px;
  padding: 9px 10px;
  resize: vertical;
  width: 100%;
}
.aitc-cwpf__option-grid .aitc-cwpf__option-select {
  align-items: stretch;
  display: grid;
  gap: 5px;
}
.aitc-cwpf__option-select select { min-height: 36px; }
.aitc-cwpf-code-preview { margin: 1.25em 0; position: relative; }
.aitc-cwpf-code-preview pre { margin: 0; padding-top: 46px; }
.aitc-cwpf-code-preview__copy {
  appearance: none;
  background: #fff;
  border: 1px solid #cbd3df;
  border-radius: 7px;
  color: #263246;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
  position: absolute;
  right: 9px;
  top: 9px;
  z-index: 2;
}
