/* editor-content.css (P5-2) — the ONE place where editor content gets site spacing/typography.
   Applied to `.ck-content` both inside the admin editor and on public pages that render editor HTML,
   so the editor looks like the site. Only spacing, line-height and heading scale live here; authored
   fonts/sizes/colours inside `.ck-content` are allowed (DESIGN.md "Editor content"). */
.ck-content {
  font-family: var(--font-sans);
  font-size: var(--step-body);
  line-height: 2;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  text-align: start;
}
.ck-content > * + * { margin-block-start: 0.875rem; }
.ck-content h2, .ck-content h3, .ck-content h4 { color: var(--ink); line-height: var(--leading-head); font-weight: 700; }
.ck-content h2 { font-size: var(--step-h3); margin-block-start: 2.75rem; }
.ck-content h3 { font-size: var(--step-lead); margin-block-start: 1.5rem; }
.ck-content h4 { font-size: var(--step-body); margin-block-start: 1.25rem; }
.ck-content h2:first-child, .ck-content h3:first-child, .ck-content h4:first-child { margin-block-start: 0; }
.ck-content ul, .ck-content ol { padding-inline-start: 1.25rem; }
.ck-content li + li { margin-block-start: 0.375rem; }
.ck-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.25em; }
.ck-content img { max-width: 100%; height: auto; }
.ck-content pre { white-space: pre-wrap; direction: ltr; text-align: left; }
.ck-content table { border-collapse: collapse; }
.ck-content table td, .ck-content table th { border: 1px solid var(--border-dark); padding: 0.5rem 0.75rem; text-align: start; vertical-align: top; }
.ck-content table th { background: var(--surface); color: var(--ink); font-weight: 700; }
/* ckeditor5-content.css makes figure.table `display: table`, which ignores overflow: a wide (pasted) table then
   stretched the whole page on phones. As a block it scrolls inside its own box; pasted fixed widths cannot exceed it. */
.ck-content figure.table, .ck-content figure.table:not(.layout-table) { display: block; overflow-x: auto; max-width: 100%; margin-inline: 0; }
.ck-content figure.table > table, .ck-content figure.table:not(.layout-table) > table { width: 100%; }
/* Tables pasted from other sites carry fixed pixel widths (style="width:1400px" on figure/table/col). Those are
   ignored so the table always fits its column and cells wrap; percentage widths set in the editor stay. */
.ck-content figure.table[style*="px"], .ck-content table[style*="px"] { width: 100% !important; }
.ck-content table col[style*="px"] { width: auto !important; }
.ck-content table { max-width: 100%; }
.ck-content table td, .ck-content table th, .ck-content .table td, .ck-content .table th { overflow-wrap: anywhere; word-break: normal; min-width: 0; }
.ck-content figure.image, .ck-content figure.image img, .ck-content picture img { max-width: 100%; height: auto; }
.ck-content blockquote { color: var(--ink-soft); }
.ck-content .media-frame { position: relative; aspect-ratio: 16 / 9; max-width: 100%; }
.ck-content .media-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ck-content .todo-list { list-style: none; padding-inline-start: 0; }
/* Product notes (description, terms, FAQ answers) use the smaller note scale on the storefront; the editor mirrors it. */
.ck-content.ck-content-note, .product-note .ck-content { font-size: var(--step-small); line-height: 1.9; }
