/* Requested October 8 layout, on the existing service screen. */
.app-layout{max-width:1920px;--history-width:calc(210px + 1cm)}
.app-layout[data-context="documents"]{grid-template-columns:minmax(460px,1.1fr) minmax(350px,.9fr);min-width:810px}
.app-layout.history-open[data-context="documents"]{grid-template-columns:var(--history-width) minmax(460px,1.1fr) minmax(350px,.9fr);min-width:calc(1020px + 1cm)}
.app-layout.history-open[data-context="hidden"]{grid-template-columns:var(--history-width) minmax(460px,1fr);min-width:calc(670px + 1cm)}
.app-layout .context{padding:24px;background:#f8fafd}
.brand small{font-size:.84rem;color:#c4cede}
.topbar .demo-label{color:#bad2d0;white-space:nowrap}
.tour-on .topbar button:disabled{opacity:1}
.history-rail .rail-bottom small{font-size:.66rem;line-height:1.7;display:block}
.history-item{display:flex;align-items:center;min-width:0}
.history-rail nav .history-resume{flex:1;min-width:0}
.history-rail nav .history-delete{flex:0 0 auto;padding:7px 5px;font-size:.68rem;color:#8190a5}
.history-rail nav .history-delete:hover{color:#b04444;background:#fff2f2}
.conversation{padding:30px 36px}
.welcome{margin:0 auto;width:min(100%,920px);padding:20px 0 36px}
.welcome.first-visit{max-width:720px;min-height:85%;display:flex;flex-direction:column;justify-content:center}
.welcome.first-visit>h1{text-align:center;margin:8px 0 12px}
.welcome.first-visit>.eyebrow,.welcome.first-visit>p{text-align:center}
.welcome h1{font-size:1.85rem}
.welcome .session-resumes{display:grid;gap:12px;margin:24px 0 18px}
.welcome.returning>[data-action="new"]{display:block;width:fit-content;margin-left:auto}
.resume-card{margin:0;padding:20px 22px;border-color:#dfe7f6}
.resume-card h2{font-size:1rem;line-height:1.6}
.resume-card p{font-size:.86rem;line-height:1.85;color:#67778f;margin:8px 0 13px;max-width:none}
.resume-card button{font-size:.79rem}
#homeComposer{margin:22px 0 20px}
#homeComposer #composer{border:0;padding:0;width:100%}
#homeComposer .input-row{padding:16px;box-shadow:0 4px 20px #233c5d06}
#homeComposer textarea{min-height:52px}
.welcome-examples button{display:block;width:100%;font-weight:500;padding:15px 18px}
.welcome-examples button:after{content:'↗';float:right;color:var(--teal)}
.welcome-examples button{overflow-wrap:anywhere;line-height:1.7}
.example-controls{display:flex;justify-content:flex-end;margin-top:12px}
.updated-profile{margin-top:24px;padding:20px;background:var(--mint);border-radius:12px}
.updated-profile h2{font-size:.93rem}.updated-profile p{font-size:.85rem;line-height:1.9}
.journey{display:block;padding:16px 24px;background:#fafcff;max-height:160px;overflow:auto;flex-shrink:0}
.process-flow{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0;padding:0;list-style:none}
.process-flow li{display:flex;align-items:center;gap:7px;max-width:280px;font-size:.75rem;color:#6f8199}
.process-flow li+li:before{content:'→';color:#a3b2c6;margin-right:5px}
.process-flow li>span{flex:0 0 24px;display:grid;place-items:center;height:24px;border-radius:50%;background:#e8eef7;color:#526d96}
.process-flow li>strong{font-weight:500;overflow-wrap:anywhere;line-height:1.6}
.process-flow li[aria-current]>span{background:#4467da;color:white}
.process-flow li[aria-current]>strong{color:#2f4d81;font-weight:600}
.journey span+span:before{content:none}
.topic-cards{grid-template-columns:1fr;gap:13px}
.topic-cards .choice{display:grid;grid-template-columns:24px minmax(0,1fr);width:100%;padding:18px 20px;gap:13px}
.topic-cards .choice>div{min-width:0}
.topic-cards .choice strong{font-size:1rem;line-height:1.6}
.topic-cards .choice p{font-size:.87rem;line-height:1.95;margin:10px 0 13px;color:#697b93}
.topic-cards .stats{padding-top:5px;font-size:.77rem}
.topic-cards .tag{font-size:.71rem;line-height:1.7;overflow-wrap:anywhere}
.context-title{position:sticky;top:-24px;padding:4px 0 12px;background:#f8fafd;z-index:1}
.context-title h2{font-size:1rem}
.context-title small{display:block;margin-top:6px}
.context .preview-result{padding:17px;margin:0 0 13px}
.result a{color:#2c4668;text-decoration:none}
.result h3 a:hover{text-decoration:underline;color:#3059ca}
.result h3{overflow-wrap:anywhere;line-height:1.7}
.result .abstract-excerpt,.context .abstract-excerpt{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;font-size:.85rem;color:#5e7087;line-height:1.8;margin:11px 0 5px}
#main[data-stage="results"] .result .abstract-excerpt{max-width:none}
.result .excerpt-credit{font-size:.65rem;color:#929eb0}
.result .source-link{font-size:.77rem;color:#3268a3;font-weight:500}
.result .source-link:hover{text-decoration:underline}
.result .metadata-empty{font-size:.8rem;color:#8491a2}
.context .result h3{font-size:.92rem}
.context .result .actions{margin-top:12px}
.context .context-preview + .actions button{width:100%}
.result-filters button[aria-pressed="true"]{background:var(--soft);border-color:#aabce9;color:#3356b0}
.profile-note{font-size:.82rem;line-height:1.9;color:#76859b;margin-top:25px}
.summary-keywords{margin-top:24px}.summary-keywords h3{margin-bottom:10px}
.summary-keywords .tag{font-size:.79rem;padding:5px 9px}
.keyword-state{padding:16px 18px;border:1px solid var(--line);border-radius:10px;background:#f8fafd}
.keyword-state h3{font-size:.9rem;color:#526d96}
.keyword-state .tags{gap:8px}
.keyword-state .tag{font-size:.87rem;padding:7px 11px;line-height:1.6}
.keyword-state.current{background:#edf2ff;border-color:#c9d5f0}
.keyword-state.current h3{color:#2f4d81}
.keyword-state.current .tag{background:white;color:#2f4d81;font-weight:600}
.keyword-state.current .added-keyword{border:1px solid #4467da}
.keyword-arrow{display:flex;justify-content:center;margin:10px 0;color:#4467da}
.keyword-arrow svg{width:26px;height:36px;fill:none;stroke:currentColor;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}
.results-pagination{display:flex;justify-content:center;align-items:center;gap:16px;flex-wrap:wrap;margin:22px 0}
.results-pagination span{font-size:.83rem;color:#526d96}
/* Keep operator controls available before recording; omit them from the video. */
.recording .demo-label,.recording #tourLaunch,.recording .rail-bottom,.recording #tourBar,.recording #countdown{display:none!important}
.tour-on.recording .app-layout{height:calc(100dvh - 64px)}
.tour-on.recording:has(dialog[open])::after{inset:64px 0 0}
.query-card .facet-purpose{display:block;font-size:.76rem;color:#76859b;line-height:1.7}
.query-card .facet-status{font-size:.8rem;color:#76859b;line-height:1.7}
.session-summary p{font-size:.95rem;line-height:2}
.kg-description p{white-space:pre-wrap;overflow-wrap:anywhere}
.kg-description+.kg-description{margin-top:16px}
.description-label,.description-source{font-size:.7rem;color:#6b7e91}
.description-source{display:block;font-weight:600;margin:8px 0 4px}
@media(min-width:1600px){.conversation{padding:36px 48px}.context .result .abstract-excerpt{font-size:.88rem}}
@media(max-width:1100px){.conversation{padding:25px}.brand small{font-size:.75rem}.topbar{gap:12px;padding:0 18px}}
@media(max-width:700px){.app-layout{--history-width:calc(165px + 1cm)}.brand small{display:none}.app-layout.history-open[data-context="hidden"]{grid-template-columns:var(--history-width) minmax(430px,1fr);min-width:calc(595px + 1cm)}.app-layout.history-open[data-context="documents"]{grid-template-columns:var(--history-width) minmax(430px,1fr) 350px;min-width:calc(945px + 1cm)}.welcome h1{font-size:1.55rem}}

/* Conversation memory, explicit concept route, and per-condition rollback. */
.mode-switch{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mode-switch .mode{font-size:.7rem;padding:5px 9px;background:transparent;border-color:transparent;color:#8190a6}
.mode-switch .mode[aria-pressed="true"]{background:#edf2ff;color:#4167d8}
.condition-remove{padding:0;width:20px;height:20px;border:0;border-radius:50%;background:#e7edf8;color:#5f7394;line-height:1;font-size:15px}
.condition-remove:hover{background:#fce8e8;color:#ad4242}
.dialogue-log{display:grid;gap:10px;margin-bottom:20px}
.user-utterance{justify-self:end;max-width:85%;padding:12px 18px;border-radius:12px;background:#eff3fb}
.user-utterance small{font-size:.65rem;color:#7a8da7}
.user-utterance p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.84rem;line-height:1.8;margin:4px 0 0}
.concept-answer{font-size:.95rem;line-height:2;margin:20px 0 25px;max-width:76ch}
.results-search{margin:20px 0}.summary-table{margin-top:24px}.summary-keywords{margin-bottom:24px}
.search-alternative{border:1px solid #e1e8f2;padding:18px;border-radius:10px;margin-bottom:20px}
