/* Shared Scope layout: retain typography, colors and existing Remix icons. */
[data-header-layout-preview] .navbar {min-height:var(--layout--navbar--height)}
[data-header-layout-preview] .navbar-right > [data-ghost-search] {display:none}
[data-header-layout-preview][data-layout-surface=home] .navbar-right > .navbar-socials-wrapper,
[data-header-layout-preview][data-layout-surface=home] .preview-contact-action,
[data-header-layout-preview][data-layout-surface=home] .navbar-right > .button-member {display:none}
[data-header-layout-preview] .home-navigation {
 position:fixed;
 top:var(--preview-nav-top);
 left:var(--preview-nav-left);
 width:var(--preview-nav-width);
 z-index:14;
 margin:0;
 max-height:calc(100dvh - var(--preview-nav-top) - 16px);
 overflow-y:auto;
 overscroll-behavior:contain;
}
[data-header-layout-preview] .preview-identity {
 display:flex;
 align-items:center;
 flex-wrap:wrap;
 gap:16px 40px;
 margin-bottom:0;
}
[data-header-layout-preview] .preview-identity h1 {margin:0;font-size:clamp(32px,25.8929px + 1.6071vw,50px);font-weight:700;letter-spacing:0}
[data-header-layout-preview] .preview-identity .navbar-socials-wrapper {display:flex;max-width:100%}
[data-header-layout-preview] .preview-identity .navbar-socials {flex-wrap:wrap;gap:12px}
[data-header-layout-preview] .preview-identity .navbar-social-link {width:32px;height:40px;opacity:1}
[data-header-layout-preview] :is(.preview-identity .navbar-social-link,.preview-sidebar-search) > svg {width:32px;height:32px;flex:none}
[data-header-layout-preview] .preview-sidebar-search {flex:none;width:40px;height:40px;padding:4px;color:var(--color-mute)}
[data-header-layout-preview] .scope-utilities :is(.scope-theme-toggle > span,.scope-language-icon,.preview-sidebar-search > svg) {width:24px;height:24px}
/* Shared tab hero: first-tab spacing and the existing article reading measure. */
[data-header-layout-preview] .preview-hero {
 --preview-title-meta-gap:16px;
 --preview-meta-description-gap:12px;
}
[data-header-layout-preview] :is(.interface #home-panel,#ask-workspace) > .preview-hero {
 padding-inline:var(--section--hero--padding-h);
}
[data-header-layout-preview] .preview-hero > .home-location-meta {margin:var(--preview-title-meta-gap) 0 0}
[data-header-layout-preview] .preview-hero > .preview-hero-description {
 margin:var(--preview-meta-description-gap) 0 0;
 max-width:var(--container-small--width);
 font-family:var(--font-family-mono);
}
[data-header-layout-preview] .preview-chat-meta {display:flex;flex-wrap:wrap;gap:6px 16px}
[data-header-layout-preview] .preview-chat-meta > .home-location-meta-item {display:inline-flex;align-items:center;gap:6px}
[data-header-layout-preview] .preview-meta-icon {display:inline-flex;align-items:center}
[data-header-layout-preview] .preview-meta-icon svg {width:12px;height:12px;fill:currentColor}
[data-header-layout-preview] .preview-chat-open {display:inline-flex;align-items:center;gap:8px;min-height:40px;font-size:13px;text-decoration:none}
[data-header-layout-preview] .preview-open-icon,[data-header-layout-preview] .preview-open-icon svg {display:block;width:20px;height:20px;fill:currentColor;flex:none}
[data-header-layout-preview] .preview-conversation {width:100%;max-width:var(--container-small--width);margin:0 auto 40px}
[data-header-layout-preview] .preview-conversation > div > #workspace-conversation > .ask {
 padding:0;
 min-height:0;
 justify-content:flex-start;
}
[data-header-layout-preview] .preview-conversation :is(.ask-heading,.conversation-intro) {display:none}
[data-header-layout-preview] .preview-conversation .ask-suggestions {gap:8px;margin:0;grid-template-columns:repeat(3,minmax(0,1fr))}
[data-header-layout-preview] .preview-conversation .ask-suggestions button {align-items:center;gap:10px;min-height:56px;padding:8px 12px}
[data-header-layout-preview] .preview-conversation .ask-suggestions strong {font:500 13px/20px var(--font-family-body)}
[data-header-layout-preview] .preview-conversation .ask-suggestions button>.ask-topic-icon {width:28px;height:28px;flex-basis:28px}
[data-header-layout-preview] .preview-conversation .ask-compose-wrap {margin-top:16px}
[data-header-layout-preview] .preview-conversation [data-ask][data-has-messages] {min-height:0;justify-content:flex-start}
[data-header-layout-preview][data-layout-surface=ask] .preview-chat-open {visibility:hidden;pointer-events:none}
@media(max-width:850px){
 [data-header-layout-preview][data-layout-surface=home] :is(main.container,div.container[data-scope-layout]) > .content {padding-top:80px!important}
 [data-header-layout-preview] .home-navigation {border-radius:0 0 12px 12px}
 [data-header-layout-preview] .preview-identity {gap:16px}
 [data-header-layout-preview] .preview-identity .navbar-socials {gap:4px}
 [data-header-layout-preview] .preview-identity .navbar-social-link {width:40px;height:44px}
 [data-header-layout-preview] .preview-chat-hero .preview-identity {flex-wrap:nowrap}
 [data-header-layout-preview] .preview-chat-hero h1 {flex:1;min-width:0}
 [data-header-layout-preview] .preview-chat-open {width:40px;min-width:40px;flex:none;padding:10px;gap:0}
 [data-header-layout-preview] .preview-chat-open .preview-open-label {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
@media(max-width:600px){
 [data-header-layout-preview] .preview-conversation .ask-suggestions {grid-template-columns:1fr}
 [data-header-layout-preview] .preview-conversation .ask-suggestions button {min-height:48px}
}

/* Internal routes keep the same shell; only the homepage uses category tabs. */
[data-header-layout-preview][data-layout-surface=ask] :is(main.container,div.container[data-scope-layout]) > .content {padding-top:0!important}
[data-header-layout-preview][data-layout-surface=ask] .preview-chat-hero {margin-top:40px;margin-bottom:40px;padding-inline:var(--section--hero--padding-h)}
[data-header-layout-preview] .workspace-toolbar {display:none}
[data-header-layout-preview] .preview-conversation .workspace-panes {height:auto!important;min-height:0}
[data-header-layout-preview] .preview-conversation .workspace-conversation {display:contents}
[data-header-layout-preview] .preview-conversation [data-ask]:not([data-has-messages]) .ask-compose-wrap {margin-top:16px;position:static;padding:0;background:transparent}
[data-header-layout-preview] .preview-conversation [data-ask]:not([data-has-messages]) .ask-suggestions {margin-bottom:0}
[data-header-layout-preview] .preview-conversation .ask--full {display:flex;flex-direction:column;min-height:0;justify-content:flex-start;margin-top:0}
[data-header-layout-preview] .preview-conversation .ask--full[data-has-messages] {min-height:0;justify-content:flex-start}
[data-header-layout-preview] .preview-conversation .ask-thread {max-height:none;overflow:visible;flex:none;padding:4px 0;margin:0 0 18px;gap:28px;scrollbar-gutter:auto}
[data-header-layout-preview] .preview-contact-action {position:relative;display:inline-flex;align-items:center;gap:0;flex:none}
[data-header-layout-preview] .preview-contact-action > .button-tg {display:inline-flex!important;border-radius:0;border-start-start-radius:999px;border-end-start-radius:999px;min-height:36px;height:36px;width:auto;padding:.375rem .75rem;min-width:0;margin:0}
[data-header-layout-preview] .preview-contact-menu {position:static;color:var(--color-foreground)}
[data-header-layout-preview] .preview-contact-menu > summary {display:flex;align-items:center;justify-content:center;list-style:none;cursor:pointer;width:36px;height:36px;border:1px solid var(--color-border);border-inline-start:0;border-radius:0;border-start-end-radius:999px;border-end-end-radius:999px;background:var(--color-background-300);color:var(--color-contrast)}
[data-header-layout-preview] .preview-contact-menu > summary::-webkit-details-marker {display:none}
[data-header-layout-preview] .preview-contact-menu > summary svg {display:block;width:16px;height:16px;fill:currentColor}
[data-header-layout-preview] .preview-contact-options {position:absolute;inset-block-start:calc(100% + 8px);inset-inline-end:0;z-index:30;display:flex;flex-direction:column;min-width:240px;max-width:calc(100vw - 32px);padding:6px;background:var(--color-background-200);border:1px solid var(--color-border);border-radius:10px}
[data-header-layout-preview] .preview-contact-options a {display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 12px;border-radius:6px;white-space:nowrap;color:var(--color-foreground);text-decoration:none;font:13px/1.5 var(--font-family-body)}
[data-header-layout-preview] .preview-contact-options a:hover {background:var(--color-background-300);color:var(--color-contrast)}
[data-header-layout-preview] .preview-contact-icon {display:block;width:20px;height:20px;flex:none;background:currentColor;mask:var(--contact-icon) center/contain no-repeat;-webkit-mask:var(--contact-icon) center/contain no-repeat}
[data-header-layout-preview] .preview-contact-action :is(a,summary):focus-visible {outline:2px solid var(--color-contrast);outline-offset:3px}
@media(max-width:600px){[data-header-layout-preview] .preview-contact-menu > summary{height:40px;width:40px}[data-header-layout-preview] .preview-contact-action > .button-tg{height:40px;min-height:40px}}

@media(max-width:850px){[data-header-layout-preview][data-layout-surface=ask] :is(main.container,div.container[data-scope-layout]) > .content {padding-top:80px!important}}

[data-header-layout-preview] .preview-conversation .ask-message--assistant {max-width:100%}
[data-header-layout-preview] .preview-conversation .ask-compose-wrap {position:static;flex:none;margin-top:16px;padding:0;background:transparent}
[data-header-layout-preview] .preview-conversation .ask-jump {position:fixed;inset:auto 24px 24px auto;transform:none;z-index:15}

/* Empty suggestions have no inherited section divider. */
[data-header-layout-preview] .preview-conversation .ask-suggestions{border:0;box-shadow:none}
[data-header-layout-preview] .preview-conversation .ask[data-has-answer]{padding-bottom:0}
[data-header-layout-preview] .preview-conversation .ask[data-has-answer] .ask-compose-wrap{
 position:sticky;bottom:12px;z-index:16;
 margin:0;padding:0;background:transparent;
}
[data-header-layout-preview] .preview-conversation .ask[data-has-answer] .ask-jump{position:absolute;inset:auto 0 100% auto;margin-bottom:8px}

/* A streaming answer must not resize the sticky navigation column. */
@media(min-width:768px){
 [data-header-layout-preview] .sidebar{height:calc(100dvh - var(--layout--navbar--height));align-self:start}
}

/* Published results use homepage card widths, outside the narrower answer column. */
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards .section-list{gap:24px;grid-template-columns:repeat(3,minmax(0,1fr))}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards--wide{width:var(--ask-results-width,100%);margin-inline:calc((100% - var(--ask-results-width,100%))/2)}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards[data-card-count="1"]{width:min(100%,var(--ask-card-width,100%))}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards[data-card-count="1"] .section-list{grid-template-columns:1fr}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards[data-card-count="2"]{width:min(100%,calc(var(--ask-card-width,50%) * 2 + 24px))}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards[data-card-count="2"] .section-list{grid-template-columns:repeat(2,minmax(0,1fr))}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards .post-card{display:block;padding:0;margin:0;width:100%;min-width:0}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards .post-card-content{padding:0}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards .post-card h3{font-size:var(--font-large);line-height:1.3;letter-spacing:-.025em;margin:0 0 12px}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards .post-card p{display:block;font-size:15px;line-height:1.5;margin:0 0 14px}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards .post-card-meta{font-size:12px;gap:6px 10px}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards .post-card-media{margin:0 0 16px}
@media(min-width:1800px){[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards--wide .section-list{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1100px){[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards--wide .section-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 [data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards .section-list,
 [data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-cards[data-card-count="2"] .section-list{grid-template-columns:1fr}
}

/* Conversation actions belong beside the title; only the input floats below. */
[data-header-layout-preview][data-layout-surface=ask] .preview-chat-open{display:none}
[data-header-layout-preview] .preview-chat-reset{display:inline-flex;align-items:center;justify-content:center;min-height:40px;font-family:var(--font-family-button);font-size:13px;font-weight:var(--button--font-weight);line-height:var(--button--line-height);white-space:nowrap}
[data-header-layout-preview] .preview-chat-reset[hidden]{display:none}
[data-header-layout-preview] .preview-conversation .ask--full[data-has-answer] .ask-bottom{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%)}
@media(max-width:600px){[data-header-layout-preview][data-layout-surface=ask] .preview-chat-hero .preview-identity{flex-wrap:wrap}}

/* Border-free Ask actions; all decorative glyphs use the existing accent. */
.preview-reset-icon{display:inline-block;width:20px;height:20px;flex:none;background:currentColor;mask:var(--ri-chat-ai-fill) center/contain no-repeat;-webkit-mask:var(--ri-chat-ai-fill) center/contain no-repeat}
[data-header-layout-preview] .preview-chat-reset{gap:8px;border:0;box-shadow:none}
[data-header-layout-preview] .preview-conversation .ask-topic-icon,
[data-header-layout-preview] .preview-conversation .ask-suggestions button>.ask-icon,
[data-header-layout-preview] .preview-conversation [data-ask] button.ask-send{color:var(--color-accent);opacity:1}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-composer:focus-within{box-shadow:0 5px 22px -3px color-mix(in srgb,var(--color-accent) 32%,transparent);border:0}
[data-header-layout-preview] .preview-contact-action :is(.button-member,summary){border:0;box-shadow:none}
[data-header-layout-preview] .preview-conversation [data-ask] .ask-topic-icon .ask-icon,
[data-header-layout-preview] .preview-conversation [data-ask] .ask-send .ask-icon{color:var(--color-accent)}

/* A published article retains its full page presentation inside the conversation. */
[data-header-layout-preview] .preview-conversation [data-ask] .ask-rich-article{width:var(--ask-results-width,100%);margin-inline:calc((100% - var(--ask-results-width,100%))/2);overflow-wrap:normal;font-size:1rem;line-height:1.5}

/* Keep the reset glyph available with the immutable shell icon stylesheet. */
.preview-reset-icon{--ri-chat-ai-fill:url("data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22currentColor%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M20.7134%208.12811L20.4668%208.69379C20.2864%209.10792%2019.7136%209.10792%2019.5331%208.69379L19.2866%208.12811C18.8471%207.11947%2018.0555%206.31641%2017.0677%205.87708L16.308%205.53922C15.8973%205.35653%2015.8973%204.75881%2016.308%204.57612L17.0252%204.25714C18.0384%203.80651%2018.8442%202.97373%2019.2761%201.93083L19.5293%201.31953C19.7058%200.893489%2020.2942%200.893489%2020.4706%201.31953L20.7238%201.93083C21.1558%202.97373%2021.9616%203.80651%2022.9748%204.25714L23.6919%204.57612C24.1027%204.75881%2024.1027%205.35653%2023.6919%205.53922L22.9323%205.87708C21.9445%206.31641%2021.1529%207.11947%2020.7134%208.12811ZM20%2011C20.6986%2011%2021.3694%2010.8806%2021.9929%2010.6611C21.9976%2010.7735%2022%2010.8865%2022%2011C22%2015.4183%2018.4183%2019%2014%2019V22.5C9%2020.5%202%2017.5%202%2011C2%206.58172%205.58172%203%2010%203H14C14.1135%203%2014.2265%203.00237%2014.3389%203.00705C14.1194%203.63061%2014%204.30136%2014%205C14%208.31371%2016.6863%2011%2020%2011Z%22%2F%3E%3C%2Fsvg%3E")}

/* Ask centers its content; sidebar visibility belongs to the native toggle state. */
[data-header-layout-preview][data-layout-surface=ask] .preview-chat-hero{text-align:center}
[data-header-layout-preview][data-layout-surface=ask] .preview-chat-hero :is(.preview-identity,.home-location-meta){justify-content:center}
[data-header-layout-preview][data-layout-surface=ask] .preview-chat-hero>.preview-hero-description{margin-inline:auto}
@media(prefers-reduced-motion:reduce){
 [data-header-layout-preview] .container,[data-header-layout-preview] .sidebar{transition:none!important}
}
