/* Editorial extension: existing CMSPro palette and typography, no new dependencies. */
.editorial-shell { padding-top:26px; }
.editorial-skip-link { position:fixed; z-index:30; top:-100%; left:16px; padding:14px 20px; border-radius:7px; background:var(--accent); color:var(--accent-ink); font-weight:650; }
.editorial-skip-link:focus { top:16px; }
.editorial-shell#main-content { scroll-margin-top:160px; outline:none; }
.editorial-shell :is(h1,h2,h3,p,a) { overflow-wrap:anywhere; }
.editorial-shell :is(a,summary):focus-visible { outline:2px solid var(--accent); outline-offset:4px; border-radius:3px; }
.editorial-shell .breadcrumbs { flex-wrap:wrap; row-gap:8px; }
.editorial-intro { display:flex; justify-content:space-between; align-items:end; gap:32px; padding:32px 0 42px; border-bottom:1px solid var(--line); margin-bottom:28px; }
.editorial-intro > div { min-width:0; max-width:760px; }
.editorial-kicker { margin:0 0 16px; font-size:12px; letter-spacing:.08em; color:var(--accent); font-weight:650; }
.editorial-intro h1 { margin:0 0 18px; font-size:clamp(30px,3.8vw,50px); line-height:1.35; letter-spacing:-.05em; font-weight:780; }
.editorial-intro p:last-child { margin:0; color:var(--text-muted); font-size:14px; line-height:1.9; }
.editorial-outline-link { display:inline-flex; align-items:center; justify-content:center; gap:20px; min-height:44px; flex-shrink:0; padding:10px 16px; border:1px solid var(--line); border-radius:7px; font-size:13px; white-space:nowrap; }
.editorial-outline-link:hover { color:var(--accent); border-color:var(--accent); }
.editorial-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; margin-bottom:26px; }
.editorial-filters { display:flex; gap:8px; overflow-x:auto; max-width:100%; padding:3px; scrollbar-width:thin; }
.editorial-filters a { display:inline-flex; align-items:center; flex-shrink:0; min-height:44px; padding:10px 18px; border-radius:6px; color:var(--text-muted); font-size:13px; white-space:nowrap; }
.editorial-filters a:hover { color:var(--text); background:var(--surface-soft); }
.editorial-filters a[aria-current] { color:var(--accent-ink); background:var(--accent); font-weight:650; }
.editorial-total { font-size:12px; color:var(--text-muted); }
.reading-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.reading-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:10px; background:var(--surface); transition:border-color .18s; }
.reading-card:hover { border-color:color-mix(in srgb,var(--accent) 55%,var(--line)); }
.reading-card-link { display:flex; flex-direction:column; height:100%; }
.reading-card-cover { display:block; aspect-ratio:16/9; overflow:hidden; background:var(--surface-soft); }
.reading-card-cover img { display:block; width:100%; height:100%; object-fit:cover; }
.reading-card-copy { display:flex; flex:1; flex-direction:column; align-items:start; min-width:0; padding:26px; }
/* Compact editorial rows keep image-free articles as intentional text cards. */
.editorial-index-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.editorial-index-grid .reading-card-link { flex-direction:row-reverse; min-height:280px; }
.editorial-index-grid .reading-card-cover { position:relative; flex:0 0 36%; aspect-ratio:auto; }
.editorial-index-grid .reading-card-cover img { position:absolute; inset:0; }
.editorial-index-grid .reading-card-copy { padding:30px; }
.editorial-index-grid .reading-card:not(.has-cover) { background:color-mix(in srgb,var(--surface-soft) 32%,var(--surface)); }
.editorial-index-grid .reading-card h2 { font-size:22px; line-height:1.6; }
.editorial-label { display:inline-block; font-size:11px; font-weight:650; color:var(--accent); letter-spacing:.05em; }
.reading-card h2 { display:-webkit-box; margin:15px 0 12px; overflow:hidden; font-size:21px; line-height:1.65; letter-spacing:-.025em; -webkit-line-clamp:3; -webkit-box-orient:vertical; }
.reading-card p { display:-webkit-box; margin:0 0 30px; color:var(--text-muted); font-size:13px; line-height:1.9; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.editorial-meta { display:flex; align-items:center; flex-wrap:wrap; gap:10px 18px; color:var(--text-muted); font-size:11px; line-height:1.7; }
.reading-card .editorial-meta { width:100%; justify-content:space-between; margin-top:auto; }
.reading-arrow { color:var(--accent); }
.editorial-section { margin-top:64px; scroll-margin-top:160px; }
.editorial-section-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:24px; }
.editorial-section-heading h2 { margin:0; font-size:25px; letter-spacing:-.035em; line-height:1.5; }
.editorial-section-heading .editorial-kicker { margin-bottom:8px; }
.editorial-empty { padding:68px 28px; border:1px solid var(--line); border-radius:10px; background:var(--surface); text-align:center; }
.editorial-empty h2 { margin:18px 0 12px; font-size:25px; line-height:1.6; }
.editorial-empty p { color:var(--text-muted); font-size:14px; line-height:1.9; }
.editorial-empty .editorial-outline-link { margin-top:16px; }
.editorial-topic-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.editorial-topic-card { display:flex; flex-direction:column; overflow:hidden; min-width:0; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.editorial-topic-card:hover { border-color:var(--accent); }
.editorial-topic-card > img { display:block; width:100%; aspect-ratio:2.2/1; height:auto; object-fit:cover; }
.editorial-topic-card.has-cover:only-child { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.editorial-topic-card.has-cover:only-child > img { aspect-ratio:16/9; height:100%; max-height:360px; }
.editorial-topic-card.has-cover:only-child .editorial-topic-copy { justify-content:center; padding:40px; }
.editorial-topic-card.has-cover:only-child .editorial-meta { margin-top:16px; }
.editorial-topic-copy { display:flex; flex:1; flex-direction:column; align-items:start; padding:30px; border-left:3px solid color-mix(in srgb,var(--accent) 55%,transparent); }
.editorial-topic-copy h2 { font-size:26px; margin:16px 0 12px; line-height:1.5; letter-spacing:-.035em; }
.editorial-topic-copy p { margin:0 0 30px; font-size:14px; color:var(--text-muted); line-height:1.9; }
.editorial-topic-copy .editorial-meta { margin-top:auto; justify-content:space-between; width:100%; }
.editorial-reading-layout { display:grid; grid-template-columns:minmax(0,760px) minmax(220px,260px); align-items:start; justify-content:center; gap:64px; padding-top:32px; }
.editorial-article { min-width:0; }
.editorial-article-header h1 { margin:20px 0 20px; font-size:clamp(28px,3.2vw,42px); line-height:1.5; font-weight:760; letter-spacing:-.04em; }
.editorial-subtitle { color:var(--text-muted); font-size:18px; line-height:1.8; }
.editorial-deck { margin:30px 0 32px; padding:18px 0 18px 22px; border-left:3px solid var(--accent); font-size:16px; line-height:2; color:var(--text-muted); }
.editorial-article-cover { display:block; width:100%; height:auto; max-height:520px; object-fit:cover; border-radius:8px; margin:32px 0; }
.editorial-reading-aside { position:sticky; top:156px; max-height:calc(100dvh - 180px); overflow-y:auto; scrollbar-width:thin; min-width:0; border-left:1px solid var(--line); padding:8px 8px 0 28px; }
.editorial-toc { display:grid; gap:4px; }
.editorial-toc a { display:block; min-height:44px; padding:10px 0; font-size:13px; line-height:1.7; color:var(--text-muted); }
.editorial-toc a:hover { color:var(--accent); }
.editorial-toc .is-subheading { padding-left:14px; font-size:12px; }
.editorial-aside-section { margin-top:32px; }
.editorial-aside-section h2 { margin:0 0 16px; font-size:14px; }
.editorial-aside-link { display:flex; justify-content:space-between; gap:18px; padding:13px 0; border-bottom:1px solid var(--line); font-size:13px; line-height:1.7; }
.editorial-aside-link span { flex-shrink:0; color:var(--accent); }
.editorial-aside-link:hover { color:var(--accent); }
.editorial-mobile-toc { display:none; border:1px solid var(--line); border-radius:8px; padding:12px 20px; margin:24px 0; background:var(--surface); }
.editorial-mobile-toc summary { cursor:pointer; font-size:14px; font-weight:650; min-height:44px; align-content:center; }
.editorial-mobile-toc summary > span { color:var(--text-muted); font-size:11px; font-weight:400; margin-left:14px; }
.editorial-mobile-toc[open] summary { margin-bottom:16px; }
.editorial-prose { font-size:16px; line-height:2.05; overflow-wrap:anywhere; color:var(--text); }
.editorial-prose :is(h2,h3,h4) { scroll-margin-top:170px; line-height:1.6; letter-spacing:-.025em; }
.editorial-prose h2 { margin:44px 0 20px; font-size:26px; }
.editorial-prose h3 { margin:32px 0 16px; font-size:21px; }
.editorial-prose p { margin:0 0 22px; }
.editorial-prose :is(ul,ol) { padding-left:1.7em; margin:20px 0; }
.editorial-prose li { padding-left:5px; margin:7px 0; }
.editorial-prose a { color:var(--accent); text-decoration:underline; text-underline-offset:4px; }
.editorial-prose blockquote { margin:28px 0; padding:20px 24px; border-left:3px solid var(--accent); background:var(--surface-soft); color:var(--text-muted); }
.editorial-prose blockquote p:last-child { margin-bottom:0; }
.editorial-prose img { display:block; max-width:100%; height:auto; border-radius:6px; margin:24px auto; }
.editorial-prose figure { margin:28px 0; }
.editorial-prose figcaption { text-align:center; font-size:12px; color:var(--text-muted); }
.editorial-prose :is(pre,table) { display:block; max-width:100%; overflow-x:auto; padding:16px; background:var(--surface-soft); border:1px solid var(--line); border-radius:6px; }
.editorial-prose th,.editorial-prose td { padding:10px 16px; border-bottom:1px solid var(--line); font-size:14px; min-width:100px; }
.editorial-prose hr { margin:36px 0; border:0; border-top:1px solid var(--line); }
.editorial-article-footer { border-top:1px solid var(--line); margin-top:44px; padding-top:24px; }
.editorial-article-footer p { color:var(--text-muted); font-size:12px; }
.editorial-topic-hero { display:flex; align-items:center; gap:48px; padding:32px 0 40px; border-bottom:1px solid var(--line); }
.editorial-topic-hero > div { flex:1; min-width:0; }
.editorial-topic-hero h1 { margin:0 0 20px; font-size:clamp(30px,4vw,48px); line-height:1.4; letter-spacing:-.04em; }
.editorial-topic-hero > div > p:not(.editorial-kicker) { color:var(--text-muted); line-height:1.9; }
.editorial-topic-hero > img { width:42%; aspect-ratio:16/10; height:auto; object-fit:cover; border-radius:10px; }
.editorial-topic-anchors { display:flex; gap:12px; flex-wrap:wrap; margin-top:24px; }
.editorial-topic-prose { max-width:850px; margin-top:40px; }
@media (max-width:1100px) { .reading-grid { gap:18px; } .reading-card-copy { padding:22px; } .editorial-index-grid .reading-card-copy { padding:24px; } .editorial-reading-layout { gap:32px; grid-template-columns:minmax(0,1fr) 220px; } }
@media (max-width:1024px) {
    .editorial-reading-layout { grid-template-columns:minmax(0,760px); padding-top:16px; }
    .editorial-reading-aside { position:static; max-height:none; overflow:visible; border-left:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
    .editorial-desktop-toc { display:none; }
    .editorial-mobile-toc { display:block; }
    .editorial-reading-aside:empty { display:none; }
    .editorial-aside-section { margin-top:0; margin-bottom:0; }
}
@media (min-width:561px) and (max-width:960px) {
    .editorial-index-grid { grid-template-columns:minmax(0,1fr); }
    .editorial-index-grid .reading-card-link { min-height:230px; }
    .editorial-index-grid .reading-card-cover { flex-basis:32%; }
}
@media (max-width:820px) {
    .editorial-intro { align-items:start; flex-direction:column; padding-top:20px; gap:24px; }
    .reading-grid:not(.editorial-index-grid) { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .editorial-topic-hero { gap:28px; }
    .editorial-topic-copy { padding:24px; }
    .editorial-topic-card.has-cover:only-child .editorial-topic-copy { padding:26px; }
}
@media (max-width:560px) {
    .editorial-shell { width:calc(100% - 32px); padding-top:20px; padding-bottom:64px; }
    .editorial-intro h1 { font-size:30px; }
    .editorial-intro p:last-child { font-size:13px; }
    .editorial-toolbar { margin-bottom:20px; }
    .editorial-total { font-size:11px; }
    .editorial-filters { width:100%; }
    .editorial-filters a { padding-inline:14px; }
    .reading-grid,.reading-grid:not(.editorial-index-grid),.editorial-topic-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
    .editorial-index-grid .reading-card-link { flex-direction:column; min-height:0; }
    .editorial-index-grid .reading-card-cover { flex-basis:auto; aspect-ratio:16/9; }
    .editorial-index-grid .reading-card h2 { font-size:20px; }
    .reading-card-copy,.editorial-index-grid .reading-card-copy { padding:24px; }
    .editorial-reading-aside { grid-template-columns:minmax(0,1fr); }
    .editorial-topic-card.has-cover:only-child { display:flex; }
    .editorial-topic-card.has-cover:only-child > img { height:auto; max-height:none; }
    .editorial-topic-card.has-cover:only-child .editorial-topic-copy { padding:24px; }
    .reading-card h2 { font-size:20px; margin-top:13px; }
    .reading-card p { margin-bottom:24px; }
    .editorial-section { margin-top:44px; }
    .editorial-section-heading h2 { font-size:22px; }
    .editorial-article-header h1 { font-size:28px; }
    .editorial-deck { font-size:14px; padding-left:16px; }
    .editorial-prose { font-size:15px; line-height:2; }
    .editorial-prose h2 { font-size:23px; }
    .editorial-prose h3 { font-size:19px; }
    .editorial-empty { padding:44px 22px; }
    .editorial-empty h2 { font-size:22px; }
    .editorial-topic-hero { flex-direction:column; align-items:stretch; padding-top:20px; }
    .editorial-topic-hero > img { width:100%; aspect-ratio:16/9; }
    .editorial-topic-copy h2 { font-size:24px; }
}
/* Override the shared theme's !important transition-duration floor for these cards. */
@media (prefers-reduced-motion:reduce) { .reading-card { transition:none !important; } }
