/* One stationary device and one visible product screen at a time. */
:root{--demo-stage-height:512px;--demo-phone-width:264px;--demo-gap:16px;--demo-control-size:44px;--demo-control-space:56px;--demo-post-dwell:6500ms;--demo-dialogue-dwell:8000ms;--demo-border:rgba(255,255,255,.14);--demo-ui-time:160ms;--demo-screen-time:350ms;--demo-screen-out:120ms;--demo-device-out:210ms;--demo-device-in:320ms;--demo-fade-time:150ms;--demo-dwell:4500ms;--demo-question-delay:100ms;--demo-answer-delay:1500ms;--demo-typing-time:1200ms;--demo-typing-delay:300ms;--demo-ease:cubic-bezier(.16,1,.3,1)}
.desktop-layout .device-demo-showcase{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start;width:100%;height:auto;min-height:0}
.desktop-layout .device-demo-showcase>[data-part="Контент"]{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);align-items:center;gap:24px;padding:32px;width:100%;height:auto;min-height:624px;overflow:visible}
.desktop-layout .device-demo-showcase>[data-part="Контент"]>[data-part="Текст"]{width:auto;min-width:0;max-width:none;padding:0;overflow:visible;gap:20px}
.desktop-layout .device-demo-showcase>[data-part="Разделы"]{width:100%;overflow:visible}
.device-demo-showcase>[data-part="Разделы"]>[data-action="smartphone"]{display:grid;grid-template-columns:20px minmax(0,1fr) 20px;align-items:center;gap:12px;width:100%;height:auto;min-height:104px;padding:20px 24px;overflow:visible}
.device-demo-showcase>[data-part="Разделы"]>[data-action="smartphone"]>[data-part="Текст"]{display:flex;flex-direction:column;flex:1 1 0;min-width:0;width:100%;max-width:100%;overflow:visible;gap:4px}
.device-demo-showcase>[data-part="Разделы"] [data-part="Заголовок"]{width:100%;min-width:0;max-width:100%;overflow:visible}
.device-demo-showcase>[data-part="Разделы"] p{width:auto;min-width:0;max-width:100%;white-space:normal;word-break:normal;overflow-wrap:break-word;text-wrap:pretty}
.device-demo-showcase>[data-part="Разделы"] [data-part="Заголовок"]>p{font-size:16px;line-height:1.35}
.device-demo-showcase>[data-part="Разделы"]>[data-action="smartphone"]>[data-part="Текст"]>p{font-size:13px;line-height:1.45}
.device-demo-showcase>[data-part="Разделы"]>[data-part="Подсказка"]{width:100%;min-width:0;overflow:visible}
.device-demo-showcase>[data-part="Разделы"]>[data-part="Подсказка"]>p{font-size:12px;line-height:1.45}
.device-demo-showcase>[data-part="Контент"]>[data-part="Текст"] p{white-space:normal;max-width:100%}
.device-demo-showcase .device-demo{min-width:0}
.mobile-layout .device-demo-showcase{height:auto;min-height:0}
.mobile-layout .device-demo-showcase>[data-part="Карточка раздела"]{height:auto;min-height:0;overflow:visible}
.device-demo{width:100%;min-width:0;align-self:center}
.device-demo-fallback{width:min(100%,var(--demo-phone-width));max-height:var(--demo-stage-height);object-fit:contain;margin-inline:auto}
.device-demo-stage{box-sizing:border-box;height:calc(var(--demo-stage-height) + var(--demo-control-space));padding-bottom:var(--demo-control-space);width:100%;display:grid;place-items:center;position:relative;isolation:isolate}
.device-demo-device{min-width:0;max-width:100%;color:#172235;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;line-height:1.4}
.device-demo-phone{width:var(--demo-phone-width);padding:7px;background:#11161b;border:1px solid #8b8f91;border-radius:36px;box-shadow:0 16px 40px rgba(0,0,0,.15)}
.device-demo-glass{overflow:hidden;border-radius:29px;background:#f7f9fc}
.device-demo-status{height:28px;display:flex;align-items:center;justify-content:space-between;padding-inline:15px;position:relative;font-size:9px;font-weight:600;line-height:1}
.device-demo-status>svg{width:37px;height:13px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5}
.device-demo-island{position:absolute;inset-inline-start:50%;top:5px;transform:translateX(-50%);width:64px;height:17px;border-radius:16px;background:#0a1016}
.device-demo-header{min-height:42px;display:grid;grid-template-columns:30px minmax(0,1fr) 30px;align-items:center;gap:4px;padding:4px 8px 8px;border-bottom:1px solid rgba(20,38,56,.08)}
.device-demo-back{color:#1684ee;display:grid;place-items:center}
.device-demo-back svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.device-demo-app-heading{display:flex;flex-direction:column;align-items:center;gap:1px;min-width:0;text-align:center;font-size:11px;line-height:1.2}
.device-demo-app-heading b{font-weight:600;white-space:nowrap}
.device-demo-app-heading small{color:#7b8491;font-size:9px}
.device-demo-more{font-size:12px;color:#1684ee;text-align:center}
.device-demo-avatar{width:28px;height:28px;border-radius:50%;object-fit:cover}
.device-demo-mobile-browser-bar{height:42px;padding:4px 10px 8px;border-bottom:1px solid rgba(20,38,56,.08);background:#f7f9fc}
.device-demo-mobile-address{height:30px;display:flex;align-items:center;justify-content:center;gap:8px;padding-inline:8px;border-radius:9px;background:#e9edf2;color:#4d5868;font-size:9px;line-height:1}
.device-demo-mobile-address>span{flex:1;text-align:center;white-space:nowrap}
.device-demo-mobile-address>svg{width:12px;height:12px;flex:none;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.device-demo-phone .device-demo-screen-viewport{position:relative;aspect-ratio:802/1290;background:#fff;overflow:hidden}
.device-demo-image{display:block;width:100%;height:auto;max-width:none;object-fit:fill}
.device-demo-phone .device-demo-image{position:absolute;inset:0 auto auto 0}
.device-demo-home{height:15px;position:relative;background:inherit}
.device-demo-home::after{content:"";position:absolute;bottom:4px;left:50%;transform:translateX(-50%);width:84px;height:3px;border-radius:4px;background:currentColor;opacity:.7}
/* Fit the complete browser frame inside the stationary artwork area. */
.device-demo-browser{--demo-browser-aspect:1.6;--demo-browser-bar-height:34px;--demo-browser-hint-height:0px;--demo-browser-border-width:1px;width:100%;max-width:min(100%,calc((var(--demo-stage-height) - var(--demo-browser-bar-height) - var(--demo-browser-hint-height) - 2 * var(--demo-browser-border-width)) * var(--demo-browser-aspect) + 2 * var(--demo-browser-border-width)));position:relative;overflow:hidden;border-radius:14px;border:var(--demo-browser-border-width) solid #ffffff30;background:#fff;box-shadow:0 16px 40px rgba(0,0,0,.14)}
.device-demo-browser-bar{height:var(--demo-browser-bar-height);display:flex;align-items:center;justify-content:center;gap:16px;padding:8px 12px;background:#ececed;color:#5b6068;font-size:10px;line-height:1}
.device-demo-browser-bar>span:first-child{display:flex;gap:5px;position:absolute;left:12px}
.device-demo-browser-bar i{display:block;width:6px;height:6px;background:#b6b8bc;border-radius:50%}
.device-demo-browser .device-demo-screen-viewport{width:100%;aspect-ratio:var(--demo-browser-aspect);overflow:hidden}
.device-demo-browser .device-demo-image{width:100%;height:100%;object-fit:contain}
.device-demo-browser-hint{display:none}
.device-demo-browser .device-demo-screen-viewport:focus-visible{outline:2px solid var(--accent-lime,#d4ff46);outline-offset:-3px}
/* Playback stays in the same scene; it is not a second navigation row. */
.device-demo-pause{position:absolute;z-index:2;inset-inline-end:0;inset-block-end:0;display:grid;place-items:center;width:var(--demo-control-size);height:var(--demo-control-size);min-height:var(--demo-control-size);padding:0;border:1px solid transparent;border-radius:50%;background:rgba(48,48,48,.86);color:var(--text-secondary,#d0d0d0);transition:opacity var(--demo-ui-time) var(--demo-ease),transform var(--demo-ui-time) var(--demo-ease);touch-action:manipulation}
.device-demo-pause svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.device-demo-pause:focus-visible{outline:2px solid var(--accent-lime,#d4ff46);outline-offset:3px}
.device-demo-pause:active{transform:scale(.97)}
@media(hover:hover){.device-demo-pause:hover{color:#fff;background:rgba(72,72,72,.94)}}
.device-demo-announcement{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.device-demo-device[data-theme=telegram]{color:#eff6fb}
.device-demo-device[data-theme=telegram] .device-demo-glass,.device-demo-device[data-theme=telegram] .device-demo-header{background:#192938}
.device-demo-device[data-theme=telegram] .device-demo-app-heading small{color:#a5b6c6}
.device-demo-device[data-theme=telegram] .device-demo-back{color:#6ab3e9}
.device-demo-telegram{--tg-bg:#0e1621;--tg-surface:#182533;--tg-bubble:#1d2c3b;--tg-blue:#6ab3e9;--tg-muted:#a5b6c6;--tg-white:#f5f5f5;--tg-outgoing:#2b5278;height:100%;background:var(--tg-bg);display:flex;flex-direction:column;justify-content:flex-end;color:var(--tg-white);font-size:11px;line-height:1.45}
.device-demo-date{display:table;margin:0 auto 12px;font-size:9px;padding:3px 8px}
.device-demo-channel-post{margin:0;background:var(--tg-bubble);border-radius:12px 12px 12px 3px;padding:12px;display:flex;flex-direction:column;gap:8px}
.device-demo-channel-name,.device-demo-hashtag{color:#6ab3e9;font-size:10px}
.device-demo-channel-post>b{font-size:12px;line-height:1.35;font-weight:600}
.device-demo-channel-post p{font-size:11px;line-height:1.45;margin:0}
.device-demo-feed-window{position:relative;flex:1;min-height:0;overflow:hidden}
.device-demo-feed{position:relative;padding:12px 10px}
.device-demo-feed-entry{position:relative;margin-bottom:16px}
.device-demo-dialogue{display:flex;flex-direction:column;gap:12px}
.device-demo-excerpt{color:var(--tg-muted);font-size:8px;line-height:1.3}
.device-demo-bubble{margin:0;padding:10px 11px;border-radius:12px;font-size:11px;line-height:1.45;max-width:94%;position:relative}
.device-demo-question{background:#2b5278;align-self:flex-end;border-bottom-right-radius:3px}
.device-demo-answer{background:#1d2c3b;align-self:flex-start;border-bottom-left-radius:3px}
.device-demo-answer-wrap{max-width:94%;position:relative}
.device-demo-answer-wrap .device-demo-answer{max-width:100%}
.device-demo-telegram .tg-message-meta{font-size:8px;color:var(--tg-muted);line-height:1.2;margin-top:4px}
.device-demo-telegram .tg-message-meta svg{width:14px;height:9px}
.device-demo-typing{position:absolute;top:0;left:0;display:flex;gap:3px;padding:12px;background:var(--tg-bubble);border-radius:12px;opacity:0}
.device-demo-typing i{width:4px;height:4px;border-radius:50%;background:#8faac0}
.device-demo-telegram .device-demo-tg-footer{padding:8px 6px;display:flex;align-items:center;justify-content:space-between;gap:5px;background:var(--tg-surface);color:var(--tg-muted);font-size:9px;line-height:1.3;min-height:36px;flex:none}
.device-demo-telegram .tg-app{font-size:8px;padding:6px;border-radius:14px;gap:3px}
.device-demo-telegram .tg-app svg{width:10px;height:10px}
.device-demo-telegram .tg-input{font-size:9px;padding:7px 6px;gap:4px}
.device-demo-telegram .tg-emoji{font-size:13px}
.device-demo-telegram .tg-composer .tg-attach,.device-demo-telegram .tg-composer .tg-mic{width:12px;height:18px}
@media(min-width:768px) and (max-width:1100px){
 .desktop-layout .device-demo-showcase{grid-template-columns:minmax(0,1fr);gap:24px}
 .desktop-layout .device-demo-showcase>[data-part="Разделы"]{order:-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
 .desktop-layout .device-demo-showcase>[data-part="Разделы"]>button{grid-template-columns:16px minmax(0,1fr) 16px;width:100%;min-width:0;padding:16px;gap:8px;height:100%}
 .desktop-layout .device-demo-showcase>[data-part="Разделы"]>button>[data-part="Стрелка"]{width:16px;height:16px}
 .desktop-layout .device-demo-showcase>[data-part="Разделы"]>button>p{font-size:12px}
 .desktop-layout .device-demo-showcase>[data-part="Разделы"]>[data-part="Подсказка"]{grid-column:1/-1}
 .desktop-layout .device-demo-showcase>[data-part="Контент"]{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);padding:24px;gap:24px;min-height:0}
}
@media(max-width:767px){
 :root{--demo-stage-height:496px;--demo-phone-width:252px;--demo-gap:12px}
 .device-demo-showcase--inline{gap:12px}
 .device-demo-showcase--inline>[data-action=smartphone]{
  width:100%;min-height:48px;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 16px;border-radius:12px;text-align:left
 }
 .device-demo-showcase--inline>[data-action=smartphone]>p{flex-shrink:1;white-space:normal}
 .device-demo-showcase--inline>[data-action=smartphone]::after{
  content:"";width:8px;height:8px;flex:none;margin-inline-end:4px;
  border-inline-end:2px solid currentColor;border-block-end:2px solid currentColor;
  transform:rotate(45deg);color:var(--text-secondary)
 }
 .device-demo-showcase--inline>[data-action=smartphone][aria-pressed=true]{
  background:var(--bg-surface);box-shadow:inset 0 0 0 1px var(--accent-lime)
 }
 .device-demo-showcase--inline>[data-action=smartphone][aria-pressed=true]>p{color:var(--text-primary)}
 .device-demo-showcase--inline>[data-action=smartphone][aria-pressed=true]::after{content:none}
 .device-demo-showcase--inline>[data-action=smartphone]:focus-visible{
  outline:2px solid var(--text-primary);outline-offset:3px
 }
 .device-demo-showcase--inline>[data-part="Карточка раздела"]{padding:16px}
 .device-demo-browser{--demo-browser-aspect:.8;--demo-browser-bar-height:28px;--demo-browser-hint-height:28px}
 .device-demo-browser-bar{font-size:8px}
 .device-demo-browser-bar>span:first-child{left:8px;gap:3px}
 .device-demo-browser-bar i{width:4px;height:4px}
 .device-demo-browser .device-demo-screen-viewport{overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x pan-y;scrollbar-width:thin;scrollbar-color:#abb3be #eef1f5}
 .device-demo-browser .device-demo-image{width:auto;height:100%;min-width:100%;max-width:none;object-fit:fill}
 .device-demo-browser-hint{min-height:var(--demo-browser-hint-height);display:flex;align-items:center;justify-content:center;padding:6px 8px;background:#ececed;color:#5b6068;font-size:10px;line-height:1.3}
}
@media(prefers-reduced-motion:reduce){.device-demo-pause{transition:opacity var(--demo-fade-time) linear}.device-demo-pause:active{transform:none}}
