/* Editorial article layout. Text roles, colors and public shell use marketing.css. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--mkt-bg); }
:where(.editorial-main) :where(h1, h2, p, figure) { margin: 0; }
.editorial-main { max-width: 900px; padding-top: 32px; padding-bottom: 64px; }
.editorial-heading { margin-bottom: 40px; }
.editorial-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.editorial-breadcrumb a { color: inherit; text-decoration: none; }
.editorial-breadcrumb a:hover { color: var(--mkt-accent); }
.editorial-heading h1 { text-wrap: balance; }
.editorial-deck { margin-top: 18px; }
.editorial-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.editorial-body { overflow-wrap: break-word; }
.editorial-body p + p { margin-top: 18px; }
.editorial-toc { margin: 28px 0 40px; padding: 24px 28px; background: var(--mkt-neutral); border: 1px solid var(--mkt-line); border-radius: 6px; }
.editorial-toc ol { margin: 14px 0 0; padding-left: 24px; }
.editorial-toc li + li { margin-top: 8px; }
.editorial-toc li::marker { color: var(--mkt-accent); }
.editorial-toc a { color: inherit; text-decoration: none; text-underline-offset: 4px; }
.editorial-toc a:hover { color: var(--mkt-accent); text-decoration: underline; }
.editorial-main a:focus-visible { outline: 2px solid var(--mkt-accent-hover); outline-offset: 4px; }
.editorial-body section { margin-top: 48px; }
.editorial-body h2 { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; scroll-margin-top: var(--mkt-anchor-offset); }
.editorial-body h3 { margin: 28px 0 12px; }
.editorial-list { margin: 22px 0; padding-left: 24px; }
.editorial-list li + li { margin-top: 14px; }
.editorial-list li::marker { color: var(--mkt-accent); }
.editorial-section-number { flex: 0 0 auto; color: var(--mkt-accent); }
.editorial-body strong { color: var(--mkt-ink); }
.editorial-example { margin: 24px 0; }
.editorial-example table { width: 100%; border-collapse: collapse; text-align: left; }
.editorial-example caption { caption-side: bottom; padding-top: 10px; text-align: left; }
.editorial-example thead { background: var(--mkt-neutral); }
.editorial-example th, .editorial-example td { padding: 14px 20px; border-bottom: 1px solid var(--mkt-line); vertical-align: top; }
.editorial-example tbody th { width: 22%; white-space: nowrap; }
.editorial-note { margin: 26px 0; padding: 24px 28px; border: 1px solid var(--mkt-line); border-radius: 6px; background: var(--mkt-soft); }
.editorial-note p + p { margin-top: 10px; }
.editorial-figure { margin: 32px 0; }
.editorial-image-link { display: block; width: 100%; max-width: 320px; margin: 0 auto; border: 1px solid var(--mkt-line); border-radius: 6px; overflow: hidden; }
.editorial-figure--wide .editorial-image-link { max-width: 562px; }
.editorial-figure img { display: block; width: 100%; height: auto; }
.editorial-figure figcaption { margin-top: 12px; text-align: center; }
.editorial-related { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--mkt-line); }
.editorial-related > p { margin-bottom: 18px; }
.editorial-related-link { display: grid; grid-template-columns: 160px minmax(0, 1fr) 20px; align-items: center; gap: 20px; color: var(--mkt-ink); text-decoration: none; }
.editorial-related-link img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border: 1px solid var(--mkt-line); border-radius: 6px; background: var(--mkt-neutral); }
.editorial-related-link svg { width: 20px; height: 20px; color: var(--mkt-accent); }
.editorial-related-link:is(:hover, :focus-visible) .mkt-subtitle { color: var(--mkt-accent); text-decoration: underline; text-underline-offset: 4px; }
.editorial-image-link { cursor: zoom-in; }
.editorial-gallery { --mkt-copy: #f8fafc; --mkt-sub: #e4e4e7; box-sizing: border-box; position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); border: 0; background: rgb(15 23 42 / 96%); color: #fff; overflow: hidden; }
.editorial-gallery::backdrop { background: rgb(15 23 42 / 75%); }
.editorial-gallery[open] { display: flex; flex-direction: column; gap: 12px; }
.editorial-gallery [hidden] { display: none !important; }
.editorial-gallery-toolbar { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.editorial-gallery-counter { margin-right: auto; }
.editorial-gallery-toolbar [data-action="zoom"] { margin-left: auto; }
.editorial-gallery-control { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; flex: 0 0 auto; border: 1px solid rgb(255 255 255 / 25%); border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.editorial-gallery-control:hover { background: rgb(255 255 255 / 12%); }
.editorial-gallery-control:disabled { opacity: .4; cursor: default; }
.editorial-gallery :focus-visible { outline: 2px solid var(--mkt-brand); outline-offset: 2px; }
.editorial-gallery-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; border-radius: 6px; }
.editorial-gallery-canvas { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.editorial-gallery-canvas img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.editorial-gallery.is-zoomed .editorial-gallery-canvas { width: max-content; min-width: 100%; height: max-content; min-height: 100%; align-items: flex-start; }
.editorial-gallery.is-zoomed .editorial-gallery-canvas img { width: var(--gallery-zoom-width); max-width: none; max-height: none; }
.editorial-gallery-loading, .editorial-gallery-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.editorial-gallery-error { inset: 16px; margin: auto; height: fit-content; max-width: 420px; padding: 24px; text-align: center; border: 1px solid var(--mkt-line); border-radius: 8px; background: var(--mkt-neutral); }
.editorial-gallery-error p { margin: 0; color: var(--mkt-ink); }
.editorial-gallery-bottom { display: flex; align-items: center; justify-content: center; gap: 16px; flex: 0 0 auto; }
.editorial-gallery-caption { margin: 0; max-width: 680px; max-height: 20vh; overflow: auto; text-align: center; }
.blog-list { list-style: none; margin: 0; padding: 0; }
.blog-list > li + li { border-top: 1px solid var(--mkt-line); margin-top: 32px; padding-top: 32px; }
.blog-post-link { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 28px; color: inherit; text-decoration: none; }
.blog-post-link img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border: 1px solid var(--mkt-line); border-radius: 6px; background: var(--mkt-neutral); }
.blog-post-link .editorial-meta { margin-bottom: 12px; }
.blog-post-link h2 { margin: 0 0 14px; }
.blog-post-more { display: inline-block; margin-top: 18px; }
.blog-post-link:is(:hover, :focus-visible) h2 { color: var(--mkt-brand-hover); }
@media (max-width: 767px) {
  .editorial-main { padding-top: 24px; padding-bottom: 40px; }
  .editorial-breadcrumb { margin-bottom: 22px; }
  .editorial-body section { margin-top: 36px; }
  .editorial-body h2 { gap: 10px; margin-bottom: 20px; }
  .editorial-toc, .editorial-note { padding: 20px; }
  .editorial-toc li + li { margin-top: 10px; }
  .editorial-example th, .editorial-example td { padding: 12px; }
  .blog-post-link { grid-template-columns: 1fr; gap: 22px; }
  .editorial-related-link { grid-template-columns: 104px minmax(0, 1fr) 20px; gap: 14px; }
}
