/* Reading aids on articles. Colours and type follow style.css; #767676 is the theme label grey that passes AA on white. */
.article-next{margin-top:48px;padding-top:24px;border-top:1px solid var(--line)}
.article-next .label{display:block;margin-bottom:8px}
.article .article-next a{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 24px;align-items:end;padding:16px 0;border-bottom:1px solid var(--ink);color:var(--ink);text-decoration:none}
.article-next strong{font-size:24px;font-weight:450;line-height:1.25;letter-spacing:-.5px}
.article-next span{font-size:14px;color:#6b6b6b}
.article-next i{grid-row:1/3;grid-column:2;font-style:normal;font-size:24px;line-height:1}
.article .article-next a:hover strong{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.article-next+.article-end{margin-top:32px}
.article-also{margin:40px 0;padding:24px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.article-also .label{display:block;margin-bottom:8px}
.article-also a{font-size:20px;line-height:1.4;color:var(--ink)}
@media(max-width:700px){.article-next strong{font-size:20px}.article-also a{font-size:18px}}
/* «Сохранить» repeats .article-like from style.css so the two read as one pair. */
.article-save{display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:0 16px 0 14px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#202020;font-size:15px;line-height:1;cursor:pointer}
.article-save svg{width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.article-save[aria-pressed="true"]{background:#181818;border-color:#181818;color:#fff}
.article-save[aria-pressed="true"] svg{fill:#ffdc21;stroke:#ffdc21}
.article-save:hover{box-shadow:inset 0 -3px 0 #ffdc21}
.article-save:focus-visible{outline:2px solid #181818;outline-offset:2px}
.article-save-hint{flex-basis:100%;margin:0;font-size:13px;line-height:1.5;color:#6b6b6b}
.article-save-hint a{color:#202020;text-decoration:underline;text-underline-offset:3px}
.article-note{flex-basis:100%;margin-top:8px}
.article-note label{display:block;margin-bottom:8px;font-size:15px}
.article-note textarea{display:block;width:100%;min-height:96px;padding:15px;border:1px solid #ccc;border-radius:6px;background:#fff;font-size:17px;line-height:1.5;resize:vertical}
.article-note>div{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:8px}
.article-note-save{min-height:36px;padding:0;border:0;border-bottom:1px solid #ccc;background:none;color:#202020;font-size:15px;cursor:pointer}
.article-note-save:hover{border-color:#ffdc21;box-shadow:inset 0 -2px 0 #ffdc21}
.article-note-status{font-size:13px;color:#6b6b6b}
.cabinet-saved h3 a{color:inherit}
.cabinet-saved form+form{margin-top:8px}
.cabinet-saved-label{display:block;margin-bottom:8px;font-size:15px;color:#555}
.cabinet-saved-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:8px}
.cabinet-saved-status{font-size:13px;color:#6b6b6b}
.cabinet-saved textarea{display:block;width:100%;min-height:96px;padding:14px 15px;border:1px solid #aaa;border-radius:7px;background:#fff;color:#222;font-size:17px;line-height:1.5;resize:vertical;box-sizing:border-box}
.cabinet-saved textarea:focus{outline:2px solid #555;outline-offset:2px}
.reading-progress{position:fixed;top:0;left:0;right:0;z-index:40;height:4px;pointer-events:none}
.reading-progress i{display:block;height:100%;background:var(--accent);transform:scaleX(0);transform-origin:0 50%}
.reading-resume{margin:16px 0 0;font-size:15px;line-height:1.5;color:#555}
.reading-resume button{min-height:36px;padding:0;border:0;border-bottom:1px solid #ccc;background:none;color:#202020;font-size:15px;text-align:left;cursor:pointer}
.reading-resume button:hover{border-color:#ffdc21;box-shadow:inset 0 -2px 0 #ffdc21}
.journal-read{color:#6b6b6b}
.article-toc summary{display:block;list-style:none;cursor:default}
.article-toc summary::-webkit-details-marker{display:none}
.to-top{position:fixed;right:max(16px,var(--space));bottom:16px;z-index:40;width:48px;height:48px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#202020;font-size:20px;line-height:1;cursor:pointer}
.to-top:hover,.article-lightbox-close:hover{box-shadow:inset 0 -3px 0 #ffdc21}
.to-top:focus-visible,.article-zoom:focus-visible,.article-lightbox-close:focus-visible{outline:2px solid #181818;outline-offset:2px}
.article-zoom{display:block;width:100%;padding:0;border:0;background:none;cursor:zoom-in}
.article-zoom img{display:block;max-width:100%;height:auto}
.article-lightbox{max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);padding:16px;border:0;background:#fff;color:#202020}
.article-lightbox::backdrop{background:rgba(24,24,24,.85)}
.article-lightbox figure{margin:0}
.article-lightbox img{display:block;max-width:100%;max-height:calc(100vh - 160px);height:auto;margin:0 auto}
.article-lightbox figcaption{margin-top:8px;font-size:14px;line-height:1.5;color:#555}
.article-lightbox-close{display:block;min-height:44px;margin:0 0 8px auto;padding:0 16px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#202020;font-size:15px;cursor:pointer}
@media(max-width:700px){
 .article-toc summary{display:flex;align-items:center;justify-content:space-between;min-height:44px;font-size:15px;color:#202020;cursor:pointer}
 .article-toc summary::after{content:"+";font-size:20px;line-height:1}
 .article-toc[open] summary::after{content:"−"}
 .article-toc:not([open])~.underlink{display:none}
 .to-top{right:8px;width:44px;height:44px}
}
@media print{
 .skip,.header,.breadcrumbs,.menu-dialog,.cookie-bar,.article-share,.article-cover,.article-sidebar,.article-extra,.article-end,.article-next,.article-also,.article-followup,.article-discussion,.related-reading,.closing,.footer,.reading-progress,.reading-resume,.to-top,.article-lightbox{display:none}
 body{background:#fff;color:#000}
 .article-layout{display:block}
 .article{max-width:none;font-size:12pt;line-height:1.5}
 .article a[href^="http"]::after{content:" (" attr(href) ")";font-size:10pt;color:#444;word-break:break-all}
 .article h2,.article h3{break-after:avoid}
 /* site.js reveals article h2 on scroll with inline opacity:0; only !important beats an inline style, and paper never scrolls. */
 .article h2{opacity:1!important;transform:none!important}
 .article-table{overflow:visible}
 .article img,.article figure,.article table{break-inside:avoid}
}

/* Theme switch: the same pill as Like and Save. */
.theme-toggle{display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:0 16px 0 14px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#202020;font-size:15px;line-height:1;cursor:pointer}
.theme-toggle svg{width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .tt-sun,[data-theme=dark] .theme-toggle .tt-moon{display:none}
[data-theme=dark] .theme-toggle .tt-sun{display:block}
.theme-toggle:hover{box-shadow:inset 0 -3px 0 #ffdc21}
.theme-toggle:focus-visible{outline:2px solid currentColor;outline-offset:2px}

/* Reading dock: like, save, share, comments and theme stay in reach between the top and bottom action rows. */
.article-share.article-dock{position:fixed;left:50%;bottom:24px;z-index:850;display:block;margin:0;transform:translate(-50%,18px);opacity:0;visibility:hidden;transition:opacity .25s,transform .25s,visibility 0s .25s}
.article-dock.is-shown{transform:translate(-50%,0);opacity:1;visibility:visible;transition:opacity .25s,transform .25s}
.dock-bar{display:flex;align-items:center;gap:2px;padding:5px;border:1px solid var(--line);border-radius:999px;background:#fff;box-shadow:0 12px 32px rgba(24,24,24,.12)}
.dock-bar>button,.dock-bar>a{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin:0;padding:0 14px;border:0;border-radius:999px;background:transparent;color:#202020;font-size:14px;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:none}
.dock-bar svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.dock-bar b{font-weight:400;font-variant-numeric:tabular-nums;color:#6b6b6b}
.dock-bar>button:hover,.dock-bar>a:hover,.dock-share[aria-expanded=true]{background:#f3f3f1;box-shadow:none}
.dock-bar>button:focus-visible,.dock-bar>a:focus-visible,.dock-share-menu>*:focus-visible{outline:2px solid currentColor;outline-offset:-2px}
.dock-bar .article-like[aria-pressed=true],.dock-bar .article-save[aria-pressed=true]{background:#181818;color:#fff}
.dock-bar .article-like[aria-pressed=true] b{color:#fff}
.dock-left{padding:0 14px 0 12px;margin-left:4px;border-left:1px solid var(--line);font-size:13px;line-height:30px;color:#6b6b6b;white-space:nowrap;font-variant-numeric:tabular-nums}
.dock-left:empty{display:none}
.dock-share-menu{position:absolute;left:50%;bottom:calc(100% + 8px);display:flex;flex-direction:column;min-width:220px;padding:6px;transform:translateX(-50%);border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 14px 40px rgba(24,24,24,.14)}
.dock-share-menu[hidden]{display:none}
.dock-share-menu>a,.dock-share-menu>button{display:flex;align-items:center;justify-content:space-between;min-height:44px;margin:0;padding:0 12px;border:0;border-radius:8px;background:transparent;color:#202020;font-size:15px;text-align:left;cursor:pointer}
.dock-share-menu>a span{color:#8c8c8c}
.dock-share-menu>a:hover,.dock-share-menu>button:hover{background:#f3f3f1}
.article-dock .copy-status{position:absolute;left:50%;bottom:calc(100% + 8px);margin:0;padding:8px 14px;transform:translateX(-50%);border-radius:999px;background:#181818;color:#fff;font-size:13px;white-space:nowrap;pointer-events:none}
.article-dock .copy-status:empty{display:none}
@media(max-width:700px){
 .article-share.article-dock{left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));transform:translateY(18px)}
 .article-dock.is-shown{transform:none}
 .dock-bar{justify-content:space-between;gap:0;padding:4px}
 .dock-bar>button,.dock-bar>a{flex:1;min-height:52px;padding:0 6px;gap:6px;justify-content:center;font-size:15px}
 .dock-bar svg{width:23px;height:23px}
 .dock-bar b{font-size:15px}
 .dock-bar .dock-label,.dock-bar .article-save span,.dock-bar .theme-toggle span,.dock-left{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
 .dock-share-menu{left:0;transform:none}
 .article-dock .copy-status{left:0;transform:none}
 .article-header .theme-toggle span{display:none}
 .article-header .theme-toggle{padding:0 14px}
}
@media(prefers-reduced-motion:reduce){.article-share.article-dock,.article-dock.is-shown{transition:none}}
@media print{.article-dock,.theme-toggle{display:none}}

/* Dark theme for articles. The site palette has no tokens for every colour, so the article page is remapped here. */
html[data-theme=dark]:has(body.single-post){background:#141414;color-scheme:dark}
html[data-theme=dark] body.single-post{--ink:#ecece7;--muted:#9b9b95;--line:#2e2e2e;--paper:#141414;background:#141414;color:#ecece7}
html[data-theme=dark] body.single-post :is(.header,.shell,main){background-color:transparent}
html[data-theme=dark] body.single-post :is(h1,h2,h3,h4,h5,strong,b,.logo,.quick-nav a,.cabinet-link,.header-phone,.menu-toggle,.underlink,.article-toc a,.article a,.article-share-links a,.article-share-links button,.article-like,.article-save,.theme-toggle,.dock-share,.dock-comments,.journal-item h2 a,.comment-reply-title,.article-followup a){color:#ecece7}
html[data-theme=dark] body.single-post :is(.article,.article-also,.article-next,.article-end,.article-discussion,.comments-wrap,.related-reading) :is(p,li,td,ol,ul,table,blockquote,dd,dt,label){color:#cfcfc9}
html[data-theme=dark] body.single-post :is(.label,.muted,.breadcrumbs,.breadcrumbs a,.breadcrumbs span,.article-header>div>p,.header-note,.hc-messengers,.article-like-count,.copy-status,.article-save-hint,.journal-card-meta,.journal-item p,figcaption,th,.article-share-links .label,.comment-notes,.dock-bar b,.dock-left,.dock-share-menu>a span){color:#9b9b95}
html[data-theme=dark] body.single-post :is(.header,.article-header,table,th,td,.article-also,.article-next,.article-end,.journal-grid,.journal-item,.article-discussion,.article-toc,.article-toc a,hr,.article-share-links a,.article-share-links button,.underlink,.comment-respond,.comments-wrap,.related-reading,.dock-bar,.dock-share-menu,.dock-left){border-color:#2e2e2e}
html[data-theme=dark] body.single-post :is(.article-like,.article-save,.theme-toggle,.to-top,.cookie-bar,.dock-bar,.dock-share-menu,.article-toc,.journal-cover,.menu-icon,input:not([type=checkbox]):not([type=radio]),textarea,select,.article-note,.reading-resume){background-color:#1e1e1e;border-color:#333;color:#ecece7}
html[data-theme=dark] body.single-post :is(.article-like,.article-save,.dock-bar .article-like,.dock-bar .article-save)[aria-pressed=true]{background:#ecece7;border-color:#ecece7;color:#141414}
html[data-theme=dark] body.single-post :is(.article-like,.dock-bar .article-like)[aria-pressed=true] b{color:#141414}
html[data-theme=dark] body.single-post :is(.article-like,.article-save)[aria-pressed=true] svg{stroke:#141414}
html[data-theme=dark] body.single-post :is(.dock-bar>button:hover,.dock-bar>a:hover,.dock-share[aria-expanded=true],.dock-share-menu>a:hover,.dock-share-menu>button:hover){background:#2a2a2a}
html[data-theme=dark] body.single-post .dock-share-menu>:is(a,button){color:#ecece7}
html[data-theme=dark] body.single-post .article-dock .copy-status{background:#ecece7;color:#141414}
html[data-theme=dark] body.single-post .button{background:#ecece7;color:#141414}
html[data-theme=dark] body.single-post .article-followup{background:#1e1e1e;border:1px solid #2e2e2e}
html[data-theme=dark] body.single-post .article img:not(.journal-cover img){filter:brightness(.9)}
html[data-theme=dark] body.single-post .pk-chat-btn{box-shadow:0 0 0 1px #3a3a3a}
html[data-theme=dark] body.single-post ::selection{background:#ffdc21;color:#141414}
html[data-theme=dark] body.single-post .header::before{background:#141414;border-color:#2e2e2e}
@media(max-width:700px){html[data-theme=dark] body.single-post .article-sidebar{background-color:#1e1e1e}html[data-theme=dark] body.single-post .article-sidebar .article-toc{background-color:transparent}}
html[data-theme=dark] body.single-post :is(.article-next,.article-also) span:not(.journal-cover span){color:#9b9b95}

/* On phones the chat button and the reading dock share the bottom edge: the chat shows at the top of the article and steps aside while the dock is up. */
@media(max-width:700px){body.single-post .pk-chat-btn{transition:opacity .25s,visibility 0s}body.single-post.dock-on .pk-chat-btn{opacity:0;visibility:hidden;transition:opacity .25s,visibility 0s .25s}body.single-post .to-top{bottom:calc(max(12px,env(safe-area-inset-bottom)) + 72px)}}

/* "Do it for me" block after the article text: the facts AI answers quote when they name the studio. */
.article-turnkey{margin:44px 0 8px;padding:26px 28px;border-radius:16px;background:#f3f3f1}
.article-turnkey .label{display:block;margin-bottom:10px;color:#6b6b6b}
.article-turnkey p{margin:0 0 12px;font-size:17px;line-height:1.6;color:#202020}
.article-turnkey strong{font-weight:500}
.article-turnkey .turnkey-contacts{font-size:15px;color:#4e4e4e}
.article-turnkey .turnkey-contacts a{color:#202020;text-decoration:underline;text-decoration-color:#b5b5b0;text-underline-offset:3px}
.article-turnkey .turnkey-contacts a:hover{text-decoration-color:#ffdc21}
.article-turnkey .underlink{display:inline-block;margin-top:4px}
@media(max-width:700px){.article-turnkey{padding:22px 20px}.article-turnkey p{font-size:16px}}
html[data-theme=dark] body.single-post .article-turnkey{background:#1e1e1e}
html[data-theme=dark] body.single-post .article-turnkey :is(p,.turnkey-contacts){color:#cfcfc9}
html[data-theme=dark] body.single-post .article-turnkey :is(strong,a){color:#ecece7}
