.content-editor-demo {
  --ced-paper: var(--paper, #090f1b);
  --ced-surface: var(--surface, #131e31);
  --ced-ink: var(--ink, #f0eee7);
  --ced-muted: var(--muted, #a9b1c0);
  --ced-line: var(--line, #6f7d92);
  --ced-focus: var(--focus, #bacbe6);
  --ced-highlight: var(--highlight, #b9a5ff);
  display: grid;
  grid-template-columns: minmax(230px, .8fr) minmax(0, 1.4fr);
  align-items: start;
  gap: clamp(28px, 5vw, 80px);
  color: var(--ced-ink);
  font: 400 17px/1.6 Manrope, Arial, sans-serif;
  padding-block: clamp(40px, 6vw, 88px);
  container-type: inline-size;
}
.content-editor-demo[data-theme=light] {
  --ced-paper: var(--paper, #f4f3ee);
  --ced-surface: var(--surface, #e9edf0);
  --ced-ink: var(--ink, #202836);
  --ced-muted: var(--muted, #526173);
  --ced-line: var(--line, #74808d);
  --ced-focus: var(--focus, #284873);
}
.content-editor-demo, .content-editor-demo * { box-sizing: border-box; }
.content-editor-demo [hidden] { display: none !important; }
.content-editor-demo :is(h2,h3,p) { margin: 0; color: inherit; }
.content-editor-demo h2 { font-size: clamp(30px, 3.5vw, 48px); font-weight: 500; line-height: 1.12; letter-spacing: -.045em; }
.content-editor-demo .ced-intro > p { margin-top: 22px; color: var(--ced-muted); }
.content-editor-demo .ced-intro > .ced-requirements { margin-top: 12px; }
.content-editor-demo .ced-reload { display: block; margin-top: 12px; color: var(--ced-muted); font-size: 12px; }
.content-editor-demo button {
  appearance: none; border: 1px solid var(--ced-line); border-radius: var(--control-radius, 999px);
  background: var(--ced-paper); color: var(--ced-ink); font: 500 14px/1.4 Manrope, Arial, sans-serif;
  padding: 11px var(--control-inset, 16px); min-height: 44px; cursor: pointer; touch-action: manipulation;
  transition: background 180ms ease-out, color 180ms ease-out;
}
.content-editor-demo button:hover:not(:disabled) { background: var(--ced-surface); }
.content-editor-demo :is(button,input,textarea):focus-visible { outline: 3px solid var(--ced-focus); outline-offset: 4px; }
.content-editor-demo button:disabled { cursor: default; opacity: .5; }
/* Reset: the site outline pill, shown only after a change (user decision 16.11.2026). */
.content-editor-demo .ced-reset { margin-top: 24px; padding: 8px 18px; border: 1.5px solid var(--ced-ink); background: transparent; font-size: 13px; font-weight: 600; transition: color 180ms ease-out, border-color 180ms ease-out, background 180ms ease-out; animation: ced-reset-in 220ms ease-out both; }
.content-editor-demo .ced-reset:hover:not(:disabled), .content-editor-demo .ced-reset:focus-visible { border-color: var(--ced-accent); color: var(--ced-accent); background: var(--ced-button); }
.content-editor-demo .ced-reload[hidden] { display: none; }
@keyframes ced-reset-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .content-editor-demo .ced-reset { animation: none; } }
.content-editor-demo .ced-example { min-width: 0; }
.content-editor-demo .ced-card { border: 1px solid var(--ced-line); border-radius: var(--card-radius, 16px); background: var(--ced-card, var(--ced-surface)); overflow: hidden; }
.content-editor-demo:not([data-theme=light]) { --ced-card: var(--control-surface, #101b2d); }
.content-editor-demo .ced-badge { position: absolute; top: 14px; left: 14px; padding: 6px 14px; border-radius: var(--control-radius, 999px); background: var(--ced-highlight); color: var(--highlight-ink, #1b1534); font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: .02em; pointer-events: none; }
.content-editor-demo .ced-image { position: relative; aspect-ratio: 1.8; background: var(--ced-paper); }
.content-editor-demo .ced-image > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.content-editor-demo .ced-content { position: relative; padding: 26px clamp(20px, 3vw, 32px) 30px; }
.content-editor-demo h3 { font-size: 26px; font-weight: 500; line-height: 1.25; letter-spacing: -.035em; }
.content-editor-demo .ced-content h3 { overflow-wrap: anywhere; }
.content-editor-demo .ced-body { margin-top: 12px; color: var(--ced-muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.content-editor-demo { --ced-button: var(--control-surface, #101b2d); --ced-accent: var(--selection-line, var(--ced-highlight)); --ced-active: var(--selected, #2b2548); }
.content-editor-demo[data-theme=light] { --ced-button: var(--ced-paper); }
.content-editor-demo .ced-pencil { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--ced-ink); background: var(--ced-button); color: var(--ced-ink); white-space: nowrap; transition: color 180ms ease-out, border-color 180ms ease-out, background 180ms ease-out; }
.content-editor-demo .ced-content .ced-pencil { position: static; display: flex; width: fit-content; margin: 0 0 16px auto; }
.content-editor-demo .ced-pencil svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.content-editor-demo .ced-pencil:hover:not(:disabled), .content-editor-demo .ced-pencil:focus-visible { border-color: var(--ced-accent); color: var(--ced-accent); background: var(--ced-button); }
.content-editor-demo .ced-pencil[aria-expanded=true] { border-color: var(--ced-accent); color: var(--ced-accent); background: var(--ced-active); }
.content-editor-demo .ced-editor { padding: 24px 0 0; margin: 0; }
.content-editor-demo .ced-editor h3 { font-size: 19px; margin-bottom: 18px; letter-spacing: -.02em; }
.content-editor-demo :is(.ced-text-fields,.ced-photo-fields) { display: grid; gap: 8px; }
.content-editor-demo .ced-editor label { font-size: 14px; font-weight: 600; }
.content-editor-demo :is(input[type=text],textarea) {
  width: 100%; min-width: 0; border: 1px solid var(--ced-line);
  padding: 10px 12px; background: var(--ced-paper); color: var(--ced-ink); font: inherit; font-size: 16px;
}
.content-editor-demo input[type=text] { border-radius: var(--control-radius, 999px); }
.content-editor-demo textarea { resize: vertical; min-height: 120px; border-radius: var(--panel-radius, 24px); }
.content-editor-demo .ced-editor small { color: var(--ced-muted); font-size: 12px; }
.content-editor-demo .ced-photo-fields > button { justify-self: start; }
.content-editor-demo .ced-pending-image { width: 160px; height: 100px; object-fit: cover; margin-top: 6px; }
.content-editor-demo .ced-file-name { font-size: 12px; overflow-wrap: anywhere; }
.content-editor-demo .ced-error { margin-top: 12px; color: var(--ced-ink); font-size: 14px; border-inline-start: 3px solid #ef9c64; padding-inline-start: 10px; }
.content-editor-demo .ced-error:empty { display: none; }
.content-editor-demo .ced-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.content-editor-demo .ced-primary { background: var(--ced-highlight); color: var(--highlight-ink, #1b1534); border-color: var(--ced-highlight); }
.content-editor-demo .ced-primary:hover:not(:disabled) { background: #cdbfff; }
.content-editor-demo .ced-status { margin-top: 12px; font-size: 13px; color: var(--ced-muted); }
.content-editor-demo:lang(zh-Hans) :is(h2,h3), .content-editor-demo:lang(ja) :is(h2,h3) { letter-spacing: 0; line-height: 1.45; }
@media (max-width: 850px) { .content-editor-demo { grid-template-columns: 1fr; gap: 28px; } .content-editor-demo .ced-intro { max-width: 600px; } }
@media (prefers-reduced-motion: reduce) { .content-editor-demo button { transition: none; } }
