/* KI Editorial UX 1.6.0. Scoped to single-post presentation. */
.ki-editorial{--ki-article-max:1120px;--ki-reading:760px;--ki-story-gap:32px}
.ki-editorial .ki-article-head{max-width:var(--ki-article-max);margin:0 auto 24px}
.ki-editorial .ki-article-head .ki-kicker{color:var(--ki-berry-dark);font-size:12px;letter-spacing:.12em;margin:0 0 9px}
.ki-editorial .ki-article-head h1{max-width:980px;font-size:clamp(32px,4.1vw,54px);line-height:1.1;letter-spacing:-.035em;margin:0 0 20px;text-wrap:pretty}
.ki-editorial .ki-byline{gap:7px 14px;font-size:13px;padding-bottom:14px;border-bottom:1px solid var(--ki-border)}
.ki-editorial .ki-author{font-weight:750;color:var(--ki-ink)}
.ki-editorial .ki-byline-date time{color:var(--ki-ink);font-weight:600}
.ki-editorial .ki-reading-time{color:var(--ki-teal);font-weight:700;background:var(--ki-mint);padding:3px 10px;border-radius:20px}
.ki-editorial .ki-article-hero{max-width:var(--ki-article-max);margin:0 auto 30px;border-radius:16px}
.ki-editorial .ki-article-hero img{display:block;width:100%;height:auto;aspect-ratio:12/5;object-fit:cover}
.ki-editorial .ki-reading-grid{max-width:var(--ki-article-max);grid-template-columns:minmax(0,var(--ki-reading));gap:var(--ki-story-gap);justify-content:center;align-items:start}
.ki-editorial .ki-reading-column{min-width:0;width:100%;max-width:var(--ki-reading);margin-inline:auto}
.ki-editorial .ki-content{font-size:18px;line-height:1.78;overflow-wrap:anywhere;min-width:0}
.ki-editorial .ki-content>p:first-child{font-size:clamp(18px,1.7vw,21px);line-height:1.65;color:var(--ki-ink);margin-bottom:22px}
.ki-editorial .ki-content>p:first-child strong{font-weight:760}
.ki-editorial .ki-content h2{font-size:clamp(25px,2.8vw,33px);letter-spacing:-.025em;margin:2em 0 .55em;line-height:1.2}
.ki-editorial .ki-content h3{font-size:clamp(20px,2vw,23px);line-height:1.3;margin:1.55em 0 .45em}
.ki-editorial .ki-content :is(h2,h3,h4)[id]{scroll-margin-top:28px}
.ki-editorial .ki-content :is(h2,h3,h4):target{color:var(--ki-teal)}
.ki-editorial .ki-content p{margin-bottom:1.1em}
.ki-editorial .ki-content a{color:var(--ki-teal);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.ki-editorial .ki-content a:hover{color:var(--ki-berry-dark)}
.ki-editorial .ki-content ul:not(.ki-toc ul),.ki-editorial .ki-content ol:not(.ki-toc ol){padding-inline-start:1.65em}
.ki-editorial .ki-content li::marker{color:var(--ki-teal);font-weight:700}
.ki-editorial .ki-content .ki-callout,.ki-editorial .ki-content blockquote{padding:21px 24px;border:1px solid #c5e2d8;border-left:4px solid var(--ki-teal);background:#edf7f3;border-radius:12px;margin:25px 0;font-size:17px;line-height:1.65}
.ki-editorial .ki-content .ki-callout> :last-child,.ki-editorial .ki-content blockquote> :last-child{margin-bottom:0}
.ki-editorial .ki-toc{border:1px solid var(--ki-border);border-radius:14px;background:var(--ki-paper);padding:20px 22px;margin:24px 0;min-width:0;color:var(--ki-ink);font-size:15px;line-height:1.45}
.ki-editorial .ki-toc>strong{display:block;margin-bottom:11px;font-size:17px;color:var(--ki-ink)}
.ki-editorial .ki-toc ol,.ki-editorial .ki-toc ul{margin:0;padding-inline-start:1.5em}
.ki-editorial .ki-toc li{padding:0;margin:0 0 1px}
.ki-editorial .ki-toc li::marker{color:var(--ki-teal);font-size:.88em;font-weight:700}
.ki-editorial .ki-toc a{display:inline-block;font-weight:600;color:var(--ki-teal);text-decoration:none;padding:6px 0;overflow-wrap:anywhere}
.ki-editorial .ki-toc a:hover{text-decoration:underline;color:var(--ki-berry-dark)}
.ki-editorial .ki-toc a[aria-current="location"]{color:var(--ki-berry-dark);text-decoration:underline;text-underline-offset:3px}
.ki-editorial .ki-content .wp-block-table,.ki-editorial .ki-content .ki-table-scroll{display:block;max-width:100%;overflow-x:auto;border:1px solid var(--ki-border);border-radius:10px;margin:24px 0;background:white}
.ki-editorial .ki-content table:not([class]){font-size:15px;line-height:1.5;max-width:none;width:100%;border:0;margin:0}
.ki-editorial .ki-content :is(.wp-block-table,.ki-table-scroll)>table:not([class]){min-width:520px}
.ki-editorial .ki-content table:not([class]) :is(th,td){padding:12px 13px;vertical-align:top;border:0;border-bottom:1px solid var(--ki-border);border-right:1px solid var(--ki-border)}
.ki-editorial .ki-content table:not([class]) th{background:#ddf0e9;color:#234640;font-weight:750}
.ki-editorial .ki-content table:not([class]) tr:nth-child(even) td{background:#f7faf9}
.ki-editorial .ki-content table:not([class]) tr:last-child td{border-bottom:0}
.ki-editorial .ki-content table:not([class]) :is(th,td):last-child{border-right:0}
.ki-editorial .ki-content :is(h2,h3)#faq{border-top:1px solid var(--ki-border);padding-top:24px}
.ki-editorial .ki-content .ki-sources{border-top:1px solid var(--ki-border);padding-top:15px;font-size:15px}
.ki-editorial .ki-rail.ki-editorial-rail{display:flex;flex-direction:column;gap:18px;padding:0;border:0;background:transparent;border-radius:0;min-width:0;width:100%;max-width:var(--ki-reading);margin-inline:auto}
.ki-editorial [hidden]{display:none!important}
.ki-editorial .ki-editorial-panel{min-width:0;background:white;border:1px solid var(--ki-border);border-radius:14px;padding:17px;display:grid;gap:11px}
.ki-editorial .ki-editorial-panel .ki-kicker{font-size:10px;color:var(--ki-teal);margin:0}
.ki-editorial .ki-editorial-panel h2{font-size:20px;line-height:1.2;margin:0 0 3px}
.ki-editorial .ki-editorial-route{display:grid;grid-template-columns:36px 1fr auto;gap:10px;align-items:center;color:var(--ki-ink);text-decoration:none;padding:9px;border:1px solid var(--ki-border);border-radius:10px;min-height:52px;overflow-wrap:anywhere}
.ki-editorial .ki-editorial-route:hover{border-color:var(--ki-berry);color:var(--ki-berry-dark)}
.ki-editorial .ki-editorial-route small{display:block;font-size:12px;color:var(--ki-muted)}
.ki-editorial .ki-editorial-route strong{display:block;font-size:14px;line-height:1.3}
.ki-editorial .ki-route-icon{display:grid;place-items:center;height:36px;background:var(--ki-mint);color:var(--ki-teal);border-radius:9px}
.ki-editorial .ki-route-icon svg{width:20px;height:20px}
.ki-editorial .ki-rail-card{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;min-height:68px}
.ki-editorial .ki-rail-card:not(:has(img)){grid-template-columns:1fr}
.ki-editorial .ki-rail-card img{aspect-ratio:4/3;width:100%;height:auto;object-fit:cover}
.ki-editorial .ki-rail-card strong{padding:10px;font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.ki-editorial :is(a, [tabindex]):focus-visible{outline:3px solid var(--ki-teal);outline-offset:3px}
@media(min-width:1200px){
 .ki-editorial .ki-reading-grid.ki-has-rail{grid-template-columns:minmax(0,var(--ki-reading)) minmax(280px,320px);justify-content:center}
 .ki-editorial .ki-reading-column{grid-column:1;grid-row:1}
 .ki-editorial .ki-editorial-rail{grid-column:2;grid-row:1}
 .ki-editorial .ki-editorial-sticky .ki-toc{margin:0;padding:19px}
 .ki-editorial .ki-editorial-rail.ki-toc-only{position:sticky;top:20px;max-height:calc(100vh - 40px);overflow:auto;scrollbar-width:thin}
}
@media(max-width:767px){
 .ki-editorial{--ki-story-gap:25px}
 .ki-editorial .ki-article-head{margin-bottom:17px}
 .ki-editorial .ki-article-head h1{font-size:clamp(29px,7.6vw,40px);margin-bottom:12px}
 .ki-editorial .ki-byline{font-size:12px;gap:6px 10px}
 .ki-editorial .ki-article-hero{margin-bottom:22px;border-radius:12px}
 .ki-editorial .ki-content{font-size:17px;line-height:1.75}
 .ki-editorial .ki-content>p:first-child{font-size:18px}
 .ki-editorial .ki-content .ki-callout,.ki-editorial .ki-content blockquote{font-size:16px;padding:15px 17px}
 .ki-editorial .ki-toc{padding:16px}
 .ki-editorial .ki-content table:not([class]) :is(th,td){padding:10px}
}
@media print{
 .ki-editorial .ki-article-head,.ki-editorial .ki-reading-grid,.ki-editorial .ki-reading-column{display:block;max-width:none}
 .ki-editorial .ki-content{font-size:11pt;line-height:1.5}
 .ki-editorial .ki-article-hero{max-width:650px}
 .ki-editorial .ki-content :is(.wp-block-table,.ki-table-scroll){overflow:visible}
 .ki-editorial .ki-content :is(.wp-block-table,.ki-table-scroll)>table:not([class]){min-width:0}
 .ki-editorial .ki-content h2,.ki-editorial .ki-content h3{break-after:avoid}
 .ki-editorial .ki-content .ki-callout{break-inside:avoid}
}
@supports selector(:has(*)){
 .ki-editorial .ki-content table:not([class]):not(.wp-block-table table):not(.ki-table-scroll table){display:block;overflow-x:auto;max-width:100%}
}
/* Content plugin retains its existing related shortcode and eligible links. */
.ki-editorial .ki-content .ki-content-related{background:var(--ki-paper);border:1px solid var(--ki-border);border-radius:14px;padding:22px;margin:32px 0}
.ki-editorial .ki-content .ki-content-related h2{margin:0 0 13px;font-size:23px}
.ki-editorial .ki-content .ki-content-related ul{display:grid;gap:9px;list-style:none;padding:0;margin:0}
.ki-editorial .ki-content .ki-content-related li{margin:0}
.ki-editorial .ki-content .ki-content-related a{display:block;border:1px solid var(--ki-border);border-radius:9px;padding:10px 13px;text-decoration:none;font-weight:650}
.ki-editorial .ki-content .ki-content-related a:hover{border-color:var(--ki-teal);text-decoration:underline}
/* Compact wide banner keeps the practical answer nearer the first screen. */
@media(min-width:1200px){
 .ki-editorial .ki-article-head h1{font-size:clamp(32px,3.8vw,50px)}
 .ki-editorial .ki-article-hero img{max-height:370px}
}
.ki-editorial .ki-content h2#faq ~ h3{padding-left:13px;border-left:3px solid #c5e2d8}
.ki-editorial .ki-content .ki-editorial-sources-heading{border-top:1px solid var(--ki-border);padding-top:23px;font-size:25px}
.ki-editorial .ki-content .ki-editorial-sources-heading+ul{font-size:15px;line-height:1.65;padding:17px 19px 17px 34px;background:#f0f3f2;border-radius:12px}

/* KI 2.0.1 — the rail occupies only its own height, never the entire story.
   Block-level reading flow avoids partly obscured callouts and allows each
   subsequent paragraph/section to reclaim the full editorial width. */
@media screen and (min-width:1200px){
 .ki-editorial .ki-reading-grid.ki-flow-rail{display:flow-root;max-width:var(--ki-article-max)}
 .ki-editorial .ki-flow-rail .ki-reading-column{width:auto;max-width:none;margin:0}
 .ki-editorial .ki-flow-rail .ki-editorial-rail{
   float:right;width:320px;max-width:30%;margin:0 0 20px var(--ki-story-gap);
   position:static;max-height:none;overflow:visible
 }
 .ki-editorial .ki-flow-rail .ki-content > :is(p,h2,h3,h4,ul,ol,blockquote,.ki-callout,.ki-content-related,.ki-sources){
   display:flow-root
 }
 .ki-editorial .ki-flow-rail .ki-content > :is(table,.wp-block-table,.ki-table-scroll,figure,.wp-block-image,.ki-pagination),
 .ki-editorial .ki-flow-rail .ki-comments{clear:both}
}

/* KI 5.0.0: readable lines below the rail, wide tables and printable material galleries. */
@media screen and (min-width:1200px){
 .ki-editorial .ki-flow-rail .ki-content > :is(p,h2,h3,h4,ul,ol,blockquote,.ki-callout,.ki-sources){max-width:92ch}
 /* Scroll wrappers already create a block formatting context and can safely fit beside a rail.
    Do not make a short table jump far below a long contents panel. */
 .ki-editorial .ki-flow-rail .ki-content > :is(.wp-block-table,.ki-table-scroll){clear:none}
 .ki-editorial .ki-flow-rail .ki-content > .ki-material-gallery{clear:both}
}
