/* Marketing (V1.24; V1.25: the page organized as the website, the slide layouts, the image library, the editor;
   Apps\Marketing). The slides are 16:9 and white in both themes (the gold band of Toupin Technologies); Present shows one over
   the whole screen, Print one per page without the bars. */

/* ----- The page: the sections and groups of the website, the cards ----- */
.mk-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.mk-jump a { padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); color: var(--text); text-decoration: none; font-size: 0.86rem; }
.mk-jump a:hover { border-color: var(--accent); }
.mk-section { margin-top: 26px; scroll-margin-top: 70px; }
.mk-section-head { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.mk-section-number { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--accent); min-width: 2.2ch; }
.mk-section-name { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.mk-section-title { margin: 2px 0 4px; font-size: 1.35rem; }
.mk-section-lead { margin: 0; color: var(--muted); max-width: 70ch; }
.mk-group { margin-top: 16px; }
.mk-group-name { margin: 0; font-size: 1.02rem; }
.mk-group-lead { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }
.mk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 10px; }
.mk-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); text-decoration: none; overflow: hidden; }
.mk-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); border-color: var(--accent); }
.mk-card-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; background: #f2efe6; border-bottom: 1px solid var(--rule); }
.mk-card-cover-plain { background: linear-gradient(135deg, #f4f1e8 0%, #e9e2cc 100%); border-bottom: 4px solid #c9a227; aspect-ratio: auto; height: 10px; }
.mk-card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.mk-card-title { font-weight: 800; font-size: 1.02rem; }
.mk-card-summary { color: var(--muted); font-size: 0.88rem; }
.mk-card-hidden { opacity: 0.6; border-style: dashed; }
.mk-cards-one { grid-template-columns: minmax(0, 300px); margin-bottom: 14px; }
.mk-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--chip-text); font-size: 0.75rem; font-weight: 700; }
.mk-badge-warn { background: var(--note-soft); color: var(--gold-text); }
.mk-file-btn { position: relative; overflow: hidden; cursor: pointer; }
.mk-file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mk-import-result { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.mk-problems { margin: 4px 0; padding-left: 1.2em; font-size: 0.86rem; color: var(--warn); }
.mk-problems-panel { margin-top: 8px; padding: 10px 14px; border-color: var(--warn); }

/* ----- The language switch, the toolbar ----- */
.mk-lang { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.mk-lang button { border: 0; background: none; padding: 3px 12px; font: inherit; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.mk-lang button.on { background: var(--accent-soft); color: var(--text); font-weight: 700; }
.mk-notes-switch { display: inline-flex; align-items: center; gap: 4px; font-size: 0.86rem; }
.mk-toolbar { flex-wrap: wrap; row-gap: 6px; }
.mk-version-note { margin-top: 8px; padding: 8px 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--note-soft); }
.mk-history { margin-top: 10px; }
.mk-history-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.mk-history-table th, .mk-history-table td { padding: 5px 8px; text-align: left; border-bottom: 1px solid var(--rule); }

/* ----- A slide ----- */
.mk-slides { display: flex; flex-direction: column; gap: 18px; align-items: center; margin-top: 10px; }
.mk-slide { position: relative; width: 100%; max-width: 960px; aspect-ratio: 16 / 9; padding: 34px 44px 46px; background: #fff; color: #1f2328; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); overflow: hidden; display: flex; flex-direction: column; container-type: inline-size; }
.mk-slide-band { position: absolute; top: 0; left: 0; right: 0; height: 8px; background: #c9a227; }
.mk-slide-title { margin: 6px 0 14px; font-size: calc(var(--mk-fit, 1) * clamp(0.45rem, 3.1cqw, 2.9rem)); line-height: 1.2; color: #1f2328; }
.mk-points { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 0.7em; font-size: calc(var(--mk-fit, 1) * clamp(0.45rem, 1.9cqw, 1.9rem)); line-height: 1.35; }
.mk-points li::marker { color: #b08d1e; }
.mk-note { margin: 12px 0 0; padding: 0.6em 0.9em; border-radius: 8px; background: #fbf6e3; font-size: calc(var(--mk-fit, 1) * clamp(0.45rem, 1.35cqw, 1.2rem)); color: #4a4a4a; }
.mk-slide-foot { position: absolute; left: 44px; right: 44px; bottom: 14px; display: flex; justify-content: space-between; gap: 12px; font-size: calc(var(--mk-fit, 1) * clamp(0.45rem, 1.2cqw, 1.1rem)); color: #7a7a7a; }

/* Cover: the deck's name, a big title, the promise; an image on the right */
.mk-cover { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.05fr 1fr; gap: 4%; align-items: center; }
.mk-cover-plain { grid-template-columns: 1fr; }
.mk-cover-text { display: flex; flex-direction: column; gap: 0.6em; }
.mk-eyebrow { font-size: calc(var(--mk-fit, 1) * clamp(0.45rem, 1.4cqw, 1.3rem)); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8d7f56; }
.mk-cover-title { margin: 0; font-size: calc(var(--mk-fit, 1) * clamp(0.45rem, 4.4cqw, 4rem)); line-height: 1.1; color: #1f2328; }
.mk-cover-line { margin: 0; font-size: calc(var(--mk-fit, 1) * clamp(0.45rem, 2cqw, 1.9rem)); line-height: 1.35; color: #3d4148; }
.mk-cover-image { height: 100%; min-height: 0; display: flex; align-items: center; }
.mk-cover-image img { width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14); }

/* Image and diagram: the points beside the figure */
.mk-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr); gap: 4%; align-items: center; }
.mk-split-diagram { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.6fr); }
.mk-split-full { grid-template-columns: minmax(0, 1fr); }
.mk-split .mk-points { font-size: calc(var(--mk-fit, 1) * clamp(0.45rem, 1.7cqw, 1.7rem)); }
.mk-figure { margin: 0; height: 100%; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.mk-figure img { display: block; width: 100%; min-height: 0; max-height: calc(100% - 1.6em); object-fit: contain; object-position: center; border: 1px solid #e3e0d6; border-radius: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); background: #fff; }
.mk-figure figcaption { font-size: calc(var(--mk-fit, 1) * clamp(0.45rem, 1.15cqw, 1.05rem)); color: #6b6b6b; text-align: center; }
.mk-diagram { height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; }
.mk-diagram svg { width: 100%; height: 100%; max-width: 100% !important; max-height: 100%; }
/* A wide diagram (oneStop.mermaid marks it): the points in a row above, the diagram over the slide's width */
.mk-split-diagram:has(.mk-diagram[data-wide]) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: stretch; gap: 3%; }
.mk-split-diagram:has(.mk-diagram[data-wide]) .mk-points { flex-direction: row; flex-wrap: wrap; gap: 0.4em 2.2em; }
.mk-split-diagram:has(.mk-diagram[data-wide]) .mk-points li { flex: 1 1 28%; }
.mk-diagram-error { margin-top: 6px; padding: 6px 10px; border-radius: 6px; background: #fae6e6; color: #8f1f1f; font-size: 0.8rem; white-space: pre-wrap; }

/* ----- Present: one slide over the whole screen ----- */
.mk-present { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: #1d1f22; outline: none; }
.mk-slide-big { max-width: min(96vw, calc((100vh - 70px) * 16 / 9)); padding: 4.2% 5.5% 5.5%; border: 0; border-radius: 0; }
.mk-slide-big .mk-slide-foot { left: 5.5%; right: 5.5%; bottom: 2.4%; }
.mk-present-bar { display: flex; align-items: center; gap: 10px; color: #e6e6e6; }

/* ----- The image library ----- */
.mk-search { max-width: 220px; }
.mk-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.mk-library-item { margin: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); overflow: hidden; }
.mk-library-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #fff; border-bottom: 1px solid var(--rule); }
.mk-library-item figcaption { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; font-size: 0.85rem; }
.mk-uploader { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 10px 0; }
.mk-inline { min-width: 160px; }
.mk-inline-error { padding: 4px 8px; }

/* ----- The editor: the slides, the form, the preview ----- */
.mk-comment { min-width: 220px; max-width: 320px; }
.mk-editor { display: grid; grid-template-columns: 230px minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 12px; align-items: start; }
.mk-editor-slides { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); max-height: calc(100vh - 90px); overflow: auto; }
.mk-editor-slides ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mk-editor-slides li { border-radius: 8px; }
.mk-editor-slides li.on { background: var(--accent-soft); }
.mk-editor-deck, .mk-editor-slide { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 0.86rem; text-align: left; cursor: pointer; }
.mk-editor-deck.on { background: var(--accent-soft); font-weight: 700; }
.mk-editor-slide:hover, .mk-editor-deck:hover { background: var(--btn-hover); }
.mk-editor-num { min-width: 1.6em; font-weight: 800; color: var(--accent); }
.mk-editor-kind { font-size: 0.72rem; color: var(--muted); min-width: 4.5em; }
.mk-editor-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-editor-tools { display: flex; gap: 4px; padding: 0 8px 6px; }
.mk-editor-tools .btn { padding: 2px 6px; }
.mk-editor-add { display: flex; gap: 6px; margin-top: 6px; }
.mk-editor-add select { flex: 1; min-width: 0; }
.mk-editor-form .panel { margin: 0; }
.mk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 8px; }
.mk-two .pdm-field { min-width: 0; }
.mk-two textarea { resize: vertical; }
.mk-code { font-family: ui-monospace, Consolas, monospace; font-size: 0.82rem; }
.mk-warn { margin: 4px 0 0; color: var(--warn); font-size: 0.85rem; }
.mk-picker { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 10px; }
.mk-picker-thumb { height: 64px; max-width: 140px; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.mk-picker .mk-uploader { margin: 0; }
.mk-editor-preview { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 6px; }
.mk-slide-small { max-width: none; padding: 4% 4.5% 5.5%; box-shadow: none; }
.mk-slide-small .mk-slide-foot { left: 4.5%; right: 4.5%; bottom: 2.4%; }

/* ----- The one-pager (V1.46, MarketingOnePagerPage): its letter pages one under the other, as wide as the screen allows (816 px:
   the design's size), a tap opens one large; Print: the large images, one letter sheet each without margins ----- */
.op-page { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.op-page .hint { margin: 0; }
.op-files { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; font-size: 0.88rem; color: var(--muted); }
.op-files a { display: inline-flex; align-items: center; gap: 4px; color: var(--text); }
.op-pages { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 4px; }
.op-sheet { margin: 0; width: 100%; max-width: 816px; display: flex; flex-direction: column; gap: 6px; }
.op-sheet a { display: block; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fbf8f3; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); cursor: zoom-in; }
.op-sheet a:hover { border-color: var(--accent); }
.op-sheet img { display: block; width: 100%; height: auto; }
.op-sheet figcaption { display: flex; justify-content: space-between; gap: 10px; font-size: 0.85rem; color: var(--muted); }
.op-print { display: none; }
@page onepager { size: 8.5in 11in; margin: 0; }

@media (max-width: 1250px) {
  .mk-editor { grid-template-columns: 210px minmax(0, 1fr); }
  .mk-editor-preview { grid-column: 1 / -1; position: static; }
}
@media (max-width: 760px) {
  .mk-editor { grid-template-columns: 1fr; }
  .mk-editor-slides { position: static; max-height: none; }
  .mk-two { grid-template-columns: 1fr; }
  .mk-slide { aspect-ratio: auto; min-height: 56vw; padding: 24px 18px 40px; }
  .mk-cover, .mk-split { grid-template-columns: 1fr; }
  .mk-slide-foot { left: 18px; right: 18px; font-size: 0.72rem; }
  .mk-slide-title { font-size: 1.3rem; }
  .mk-cover-title { font-size: 1.6rem; }
  .mk-points, .mk-split .mk-points, .mk-cover-line { font-size: 1rem; }
  .mk-eyebrow, .mk-figure figcaption, .mk-note { font-size: 0.8rem; }
}
@media print {
  .topbar, .appbar, .toolbar, .mk-summary, .crumbs, .mk-history, .mk-version-note { display: none !important; }
  .mk-slides { gap: 0; }
  .mk-slide { max-width: none; box-shadow: none; border: 0; border-radius: 0; page-break-after: always; break-after: page; }
  /* The one-pager: only its large images, each a letter sheet (the named page onepager: no margins; elsewhere, inside them) */
  /* Nothing before them either (the bars, MudBlazor's empty providers): a box before them would start a sheet of its own */
  html:has(.op-print), body:has(.op-print) { display: block; height: auto; background: #ffffff; }
  body:has(.op-print) > :not(.content), body:has(.op-print) .content > :not(:has(.op-print)), .op-page > :not(.op-print) { display: none !important; }
  body:has(.op-print) .content, body:has(.op-print) .op-page { display: block; overflow: visible; padding: 0; }
  .op-print { display: block; page: onepager; }
  .op-print img { display: block; width: 8.5in; height: 11in; max-width: 100%; max-height: 100vh; margin: 0 auto; object-fit: contain; break-after: page; page-break-after: always; break-inside: avoid; }
  .op-print img:last-child { break-after: auto; page-break-after: auto; }
}
