:root {
  --local-navy: #151b2d;
  --local-purple: #7059c8;
  --local-ink: #252a3c;
  --local-muted: #777c8c;
  --local-border: #e8e8ee;
  --accent: #7059c8;
  --accent-strong: #5944a6;
  --ink: #252a3c;
  --ink-soft: #6d7282;
  --line: #e8e8ee;
  --card: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body.linda-local { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
body.linda-local { background: #fafaf9; color: var(--local-ink); font-family: Aptos, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif; font-size: 15px; -webkit-font-smoothing: antialiased; }
button, textarea, input, select { font-family: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid #a693eb; outline-offset: 3px; }
svg.local-icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; flex-shrink: 0; }
[data-local-icon] { display: inline-flex; align-items: center; justify-content: center; }
.local-shell { display: flex; height: 100vh; height: 100dvh; width: 100%; }
.local-sidebar { width: 256px; min-width: 256px; background: var(--local-navy); padding: 29px 18px 16px; display: flex; flex-direction: column; color: #e7e9f4; border-right: 1px solid #232b42; z-index: 40; }
.local-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-size: 25px; font-weight: 750; letter-spacing: -.8px; padding: 0 5px; }
.local-brand-mark { display: grid; place-content: center; position: relative; background: #aa98ed; color: #1c2032; height: 37px; width: 37px; border-radius: 12px; font-size: 25px; font-weight: 800; }
.local-brand-mark > span { position: absolute; top: 3px; right: 5px; font-size: 13px; color: #fff; }
.local-brand-number { color: #b8a8f1; }
.local-brand small { display: block; font-size: 8px; letter-spacing: 1.5px; font-weight: 600; color: #969bb2; margin-top: 2px; }
.local-edition { margin-left: auto; font-size: 8px; letter-spacing: 1px; color: #b9aedb; background: #2b2d46; padding: 5px 6px; border: 1px solid #45415d; border-radius: 5px; }
.local-new-chat { margin: 34px 0 27px; width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid #7767b7; background: #7560bd; color: white; border-radius: 10px; padding: 12px; font-size: 14px; font-weight: 650; transition: background .15s; }
.local-new-chat:hover { background: #856cce; }
.local-shortcut { margin-left: auto; padding: 3px 5px; border-radius: 4px; background: #ffffff18; font-size: 10px; font-weight: 400; }
.local-nav-label { display: flex; align-items: center; justify-content: space-between; font-size: 10px; letter-spacing: 1.35px; color: #8b91aa; font-weight: 650; margin: 0 12px 12px; }
.local-nav-label button { background: transparent; border: 0; color: #bfc2d2; font-size: 22px; height: 20px; line-height: 10px; }
.local-learning-nav > button, .local-sidebar-bottom > button { width: 100%; border: none; border-radius: 8px; padding: 11px 12px; display: flex; align-items: center; gap: 11px; color: #c9cddd; background: transparent; text-align: left; font-size: 13px; }
.local-learning-nav > button:hover, .local-sidebar-bottom > button:hover { color: #fff; background: #ffffff0a; }
.local-learning-nav svg { color: #989db7; width: 18px; height: 18px; }
.local-nav-arrow { margin-left: auto; color: #646d8e; font-size: 15px; }
.local-history { margin-top: 32px; flex: 1; min-height: 90px; display: flex; flex-direction: column; }
.local-history-search { display: flex; align-items: center; gap: 7px; color: #737b97; border-bottom: 1px solid #ffffff0b; padding: 0 9px 11px; margin-bottom: 10px; }
.local-history-search svg { width: 16px; }
.local-history-search #local-search { appearance: none; background: transparent; border: none; border-radius: 0; box-shadow: none; outline: none; color: #e1e4f0; width: 100%; min-width: 0; padding: 2px; font-size: 12px; }
.local-history-search input::placeholder { color: #7e86a2; }
#local-recent-list { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3a4058 transparent; }
.local-history-item { border: 0; background: transparent; color: #9fa6bf; display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 8px; margin-bottom: 3px; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.local-history-item:hover { background: #ffffff08; color: #fff; }
.local-history-item[aria-current="true"] { color: #e4ddfa; background: #2a2a45; box-shadow: inset 2px 0 #ac95eb; }
.local-history-empty { color: #7f88a5; font-size: 12px; line-height: 1.6; padding: 8px 12px; }
.local-sidebar-bottom { border-top: 1px solid #ffffff0c; margin-top: 16px; padding-top: 10px; }
.local-sidebar-bottom > button { font-size: 12px; padding: 9px 12px; }
.local-sidebar-bottom svg { width: 17px; height: 17px; }
.local-device { display: flex; align-items: center; gap: 9px; margin: 14px 8px 0; padding-top: 12px; color: #c6ccdc; font-size: 11px; }
.local-device small { display: block; color: #818ba6; font-size: 9px; margin-top: 3px; }
.local-device > [data-local-icon] { margin-left: auto; color: #828ba4; }
.local-device-dot { width: 6px; height: 6px; border-radius: 50%; background: #89c7b3; flex-shrink: 0; }
#app { position: relative; inset: auto; display: flex; flex-direction: column; height: 100%; min-height: 0; flex: 1; min-width: 0; width: auto; max-width: none; padding: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: #fafaf9; overflow: hidden; }
#app > header { position: relative; top: auto; display: flex; justify-content: space-between; flex-shrink: 0; gap: 12px; min-height: 86px; height: auto; padding: 20px 36px 17px; background: #fafaf9; border-bottom: 0; box-shadow: none; z-index: 10; }
.local-topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.local-topbar-title > div { min-width: 0; }
.local-eyebrow { color: #8c8d9d; font-size: 9px; font-weight: 650; letter-spacing: 1.55px; }
#local-chat-title { font-size: 18px; font-weight: 650; letter-spacing: -.4px; line-height: 1.3; margin: 6px 0 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: min(580px, 43vw); }
.local-topbar-actions { display: flex; align-items: center; gap: 16px; }
.local-version-switch { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 8px; border: 1px solid #e1dced; border-radius: 999px; background: #fff; color: #7d718e; box-shadow: 0 3px 12px #39225408; font-size: 10px; white-space: nowrap; }
.local-version-caption { color: #a093ac; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.local-version-number { color: #9c91a8; font-size: 10px; font-weight: 700; }
.local-version-switch input[type="range"] { appearance: none; width: 46px; height: 18px; margin: 0; background: transparent; cursor: pointer; accent-color: var(--local-purple); }
.local-version-switch input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, #b9a9e8 0 50%, #6b70e8 50% 100%); }
.local-version-switch input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, #b9a9e8 0 50%, #6b70e8 50% 100%); }
.local-version-switch input[type="range"]::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; margin-top: -5px; border: 2px solid #fff; border-radius: 50%; background: #7059c8; box-shadow: 0 1px 5px #2f205444; }
.local-version-switch input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; background: #7059c8; box-shadow: 0 1px 5px #2f205444; }
.local-version-switch strong { min-width: 24px; color: #57458c; font-size: 10px; }
.local-icon-button { background: transparent; border: 1px solid transparent; color: #707688; border-radius: 8px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; }
.local-icon-button:hover { background: #eeedf3; }
#local-menu { display: none; }
.local-mobile-new-chat { display: none; color: var(--local-purple); border-color: #e5def5; background: #f8f5ff; }
.local-mobile-new-chat:hover { background: #eee8ff; color: var(--accent-strong); }
.local-connection { display: flex; align-items: center; gap: 7px; background: transparent; border: none; color: #7c8191; font-size: 11px; padding: 5px 0; }
.local-connection > span:first-child { width: 6px; height: 6px; background: #b5b4bf; border-radius: 50%; }
.local-connection[data-state="online"] > span:first-child { background: #5caa87; box-shadow: 0 0 0 3px #5caa8713; }
.local-connection[data-state="offline"] > span:first-child { background: #cc9161; }
.local-workspace-toolbar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 36px 14px; border-bottom: 1px solid #ebebef; z-index: 9; flex-shrink: 0; }
.local-workspace-toolbar > a { color: #9697a4; text-decoration: none; font-size: 11px; }
.local-workspace-toolbar > a:hover { color: var(--local-purple); }
#local-source-options > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; color: #686b7b; }
summary::-webkit-details-marker { display: none; }
#local-source-options svg { width: 15px; height: 15px; }
#local-source-count { color: #8f899f; background: #efedf4; font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 500; }
.local-chevron { color: #a09aa9; margin-left: 2px; }
.local-source-popover { position: absolute; left: 36px; top: 28px; width: min(360px, calc(100vw - 45px)); padding: 20px; background: white; border: 1px solid var(--local-border); border-radius: 14px; box-shadow: 0 14px 40px #26203916; font-size: 13px; }
.local-source-popover > p { color: var(--local-muted); line-height: 1.5; font-size: 12px; margin: 7px 0 14px; }
#source-toolbar { display: flex; flex-direction: column; gap: 8px; height: auto; min-height: 0; padding: 0; background: transparent; border: 0; overflow: visible; }
#source-toolbar label, #source-toolbar .source-pill { display: flex; align-items: center; padding: 9px 12px; min-height: 36px; font-size: 11px; border-radius: 7px; background: #f6f5f9; border-color: #e8e4f1; color: #665b80; }
.local-conversation { position: relative; flex: 1; min-height: 0; overflow: hidden; }
#chat-log { height: 100%; min-height: 0; max-height: none; padding: 32px max(34px, calc((100% - 840px) / 2)); overflow-y: auto; overflow-x: hidden; background: transparent; scrollbar-width: thin; scrollbar-color: #d8d6e0 transparent; scroll-padding-bottom: 20px; }
.local-welcome { position: absolute; inset: 0; overflow-y: auto; padding: clamp(28px, 6vh, 75px) 30px 28px; text-align: center; background: radial-gradient(ellipse at 50% 18%, #eeebf780, transparent 55%), #fafaf9; z-index: 1; }
.local-welcome-symbol { color: #7f66bc; width: 59px; height: 59px; display: grid; place-items: center; border-radius: 20px; margin: 0 auto 25px; font-size: 35px; background: linear-gradient(145deg, #f3effc, #e8e1f7); border: 1px solid #ded5ef; box-shadow: 0 5px 15px #7a5aad09; }
.local-welcome > .local-eyebrow { margin: 0 0 16px; color: #8b7d9d; font-size: 10px; letter-spacing: 1.9px; }
.local-welcome h2 { font-family: "Aptos Display", Aptos, "Segoe UI", sans-serif; color: #272a3a; font-size: clamp(33px, 3.8vw, 51px); font-weight: 600; line-height: 1.12; letter-spacing: -1.8px; margin: 0 0 19px; }
.local-welcome h2 span { color: #8d7eae; }
.local-welcome-copy { font-size: 14px; line-height: 1.8; color: #756d80; margin: 0; }
.local-prompt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 700px; margin: 34px auto 23px; text-align: left; }
.local-prompt-grid button { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; border: 1px solid #e5e1ed; border-radius: 12px; background: #ffffffb8; box-shadow: 0 3px 4px #39225402; padding: 19px 16px 18px; color: #756c8d; text-align: left; transition: transform .16s, border-color .16s, box-shadow .16s; }
.local-prompt-grid button:hover { border-color: #b7a7d7; transform: translateY(-3px); box-shadow: 0 8px 24px #38225b0a; }
.local-prompt-grid button strong { font-size: 12px; color: #514563; font-weight: 650; }
.local-prompt-grid button > span:not([data-local-icon]) { font-size: 11px; line-height: 1.6; color: #7b7188; padding-right: 10px; }
.local-prompt-grid button b { position: absolute; right: 14px; top: 18px; font-size: 15px; font-weight: 400; color: #b3a8c3; }
.local-welcome-tip { display: flex; align-items: center; justify-content: center; gap: 7px; color: #7f748b; font-size: 10px; line-height: 1.5; }
.local-welcome-tip svg { width: 12px; height: 12px; }
.msg-row { width: 100%; max-width: 100%; padding: 0; margin: 0 0 26px; gap: 0; }
.msg-row .msg-wrap { max-width: 100%; width: 100%; gap: 0; }
.msg-row.user { justify-content: flex-end; padding-left: 48px; }
.msg-row.user .msg-wrap { width: auto; max-width: 90%; }
.bubble.user { min-width: 0; background: #eeeaf6; border: 1px solid #e4ddef; color: #56486d; border-radius: 15px 15px 4px 15px; box-shadow: none; padding: 14px 18px; font-size: 14px; }
.bubble.assistant { width: 100%; background: white; border: 1px solid #e8e5ee; border-radius: 14px; padding: 24px; box-shadow: 0 3px 9px #36244504; color: var(--local-ink); }
.local-answer-label { display: flex; align-items: center; gap: 7px; color: #87739f; font-size: 9px; letter-spacing: 1.6px; font-weight: 750; margin-bottom: 16px; }
.local-answer-label::before { content: '✦'; font-size: 16px; }
.md { color: #3a3e4e; font-size: 14px; line-height: 1.8; }
.md p { margin: 0 0 13px; }
.md p:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3 { color: #353449; letter-spacing: -.3px; }
.md a { color: #725cad; }
.md pre { overflow-x: auto; white-space: pre; background: #f4f2f7; border-radius: 8px; padding: 14px; }
.sozialrecht-topline { display: none; }
.sozialrecht-stack { gap: 14px; }
.sozialrecht-section { border: 0; background: transparent; padding: 0; border-radius: 0; }
.sozialrecht-section-head { color: #9381a8; font-size: 9px; letter-spacing: 1px; margin-bottom: 9px; }
.local-answer-details { border-top: 1px solid #eeeaf3; margin-top: 14px; padding-top: 11px; }
.local-answer-details > summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 650; color: #8a789f; display: flex; justify-content: space-between; }
.local-answer-details > summary::after { content: '+'; font-size: 16px; font-weight: 400; }
.local-answer-details[open] > summary::after { content: '−'; }
.local-answer-details > .sozialrecht-section { margin-top: 12px; }
.local-answer-details > .sozialrecht-section > .sozialrecht-section-head { display: none; }
.source-panel { margin: 20px 0 0; border: 1px solid #ebe7f1; border-radius: 9px; background: #faf9fc; box-shadow: none; }
.source-head { padding: 11px 13px; color: #82718f; background: transparent; font-size: 11px; }
.source-card-list { padding: 10px; gap: 10px; }
.source-card { border: 1px solid #e9e3f0; box-shadow: none; padding: 14px; background: white; border-radius: 8px; }
.source-card-head a, .source-card-title, .source-card-meta { color: #6d5d83; font-size: 11px; }
.source-card-snippet { color: #6e7181; font-size: 12px; background: #f7f6fa; border-color: #d4c9e2; }
.source-card-type { background: #f2edf8; color: #8d77a2; border: none; font-size: 9px; }
.source-card-note, .source-card-context { font-size: 11px; }
.evidence-panel, .evidence-row, .learning-panel { box-shadow: none; border-color: #e8e2ee; }
.msg-actions.compact { gap: 5px; padding-top: 8px; margin: 0 0 0 7px; }
.msg-actions.compact .action-btn { border: 0; box-shadow: none; color: #a298af; background: transparent; width: 29px; height: 28px; min-width: 29px; padding: 5px; border-radius: 6px; }
.msg-actions.compact .action-btn:hover { background: #eee9f5; color: #715590; }
.msg-actions svg { width: 15px; height: 15px; }
.feature-showcase, .mode-cards, .linda4-banner-row { display: none !important; }
.local-loading .bubble { border: none; background: transparent; padding: 10px 0; }
.local-loading-copy { display: flex; gap: 10px; align-items: center; color: #9585a8; font-size: 12px; }
.local-spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid #dfd6ee; border-top-color: #8a71b9; border-radius: 50%; animation: local-spin 1s linear infinite; flex-shrink: 0; }
@keyframes local-spin { to { transform: rotate(360deg); } }
#local-work-status { display: flex; align-items: center; gap: 9px; margin: 0 34px 6px; padding: 10px 15px; background: #f0ebf7; border: 1px solid #e6dff1; border-radius: 9px; color: #837197; font-size: 11px; flex-shrink: 0; }
#local-work-time { margin-left: auto; white-space: nowrap; color: #9989aa; font-variant-numeric: tabular-nums; }
#local-cancel { border: none; border-left: 1px solid #d8cce6; padding: 0 0 0 10px; color: #72548c; background: none; font-size: 11px; }
.local-composer { padding: 0 max(34px, calc((100% - 840px) / 2)) 12px; background: #fafaf9; flex-shrink: 0; z-index: 8; }
.local-options { position: relative; margin: 3px 0 10px; font-size: 11px; color: #8d8499; }
.local-options > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; padding: 5px 1px; }
.local-options > summary svg { width: 14px; height: 14px; }
#local-mode-summary { color: #a59cab; margin-left: 4px; font-size: 10px; }
.local-options-content { position: absolute; bottom: 35px; left: 0; width: min(480px, calc(100vw - 45px)); border: 1px solid #e4ddeb; background: #fff; padding: 18px; border-radius: 13px; box-shadow: 0 -10px 40px #281c3d12; z-index: 30; }
.smart-controls-bar { display: flex; flex-direction: column; align-items: stretch; min-height: 0; gap: 7px; padding: 0; margin: 0; border: none; background: transparent; box-shadow: none; }
.smart-control { display: flex; align-items: center; border: 0; border-radius: 7px; background: #f8f6fa; gap: 12px; padding: 11px 12px; font-size: 11px; min-height: 0; }
.smart-control:last-child { display: none; }
.smart-control > .label { color: #6f617e; width: 108px; flex-shrink: 0; font-size: 11px; }
.smart-control label { color: #8d8298; font-size: 11px; }
input[type=radio], input[type=checkbox] { accent-color: var(--local-purple); }
.local-timeline-label { display: flex; flex-wrap: wrap; gap: 10px; color: #796a86; font-size: 11px; margin-top: 15px; align-items: center; }
.local-timeline-label select { flex: 1; border: 1px solid #e1dbe9; border-radius: 6px; background: #faf9fc; font-size: 11px; padding: 8px; color: #756181; }
.local-timeline-label small { width: 100%; color: #a094a8; line-height: 1.5; }
.input-area { position: relative; display: flex; align-items: flex-end; gap: 9px; padding: 11px 12px 11px 18px; border: 1px solid #ded9e9; border-radius: 15px; background: white; box-shadow: 0 4px 16px #4c346008; margin: 0; min-height: 69px; }
.input-area:focus-within { outline: none; border-color: #ae98cf; box-shadow: 0 0 0 3px #a38abe0c; }
.input-wrap { min-width: 0; flex: 1; }
#chat-input { background: transparent; color: #444151; border: 0; border-radius: 0; padding: 12px 0; margin: 0; font-size: 14px; line-height: 1.5; min-height: 44px; height: 44px; max-height: 165px; width: 100%; resize: none; box-shadow: none; outline: none; }
#chat-input:focus { border: 0; box-shadow: none; outline: none; }
body.linda-local .local-composer #chat-input { min-height: 44px; max-height: 165px; padding: 11px 0; border: 0; border-radius: 0; line-height: 1.5; transform: none; background: transparent; box-shadow: none; }
#chat-input::placeholder { color: #aca4b5; }
#send-btn, #mic-btn { flex-shrink: 0; border: 0; border-radius: 10px; min-width: 39px; width: 39px; height: 39px; min-height: 39px; margin-bottom: 2px; padding: 9px; display: inline-flex; align-items: center; justify-content: center; box-shadow: none; }
#send-btn { background: #7860b1; color: #fff; }
#send-btn:hover { background: #644a9a; }
#send-btn.stop { background: #9b7994; }
#mic-btn { background: transparent; color: #a198ad; }
#mic-btn.recording { color: #b85465; background: #fff0f2; }
.local-composer-meta { display: flex; justify-content: space-between; gap: 10px; margin: 9px 4px 0; font-size: 9px; color: #83748f; }
.local-legal-note { margin: 10px 0 0; text-align: center; color: #8a7b95; font-size: 9px; line-height: 1.4; }
#local-notice { padding: 11px 20px; margin: 0 34px 8px; border: 1px solid #eadfc9; background: #fffbf3; color: #9b7e50; border-radius: 8px; font-size: 12px; line-height: 1.6; flex-shrink: 0; }
#local-notice button { border: 0; color: inherit; text-decoration: underline; background: transparent; font: inherit; padding: 0 4px; }
.clarify-dock { margin: 8px 34px; border: 1px solid #dfd7ed; background: #f7f3fb; color: #6d5d83; border-radius: 12px; box-shadow: none; max-height: 32vh; overflow-y: auto; }
.modal-overlay { background: #151b2d70; backdrop-filter: blur(7px); z-index: 100; padding: 25px; }
.modal-overlay.open { display: flex; }
.modal { background: white; border: 1px solid #ede8f2; border-radius: 20px; padding: 30px; box-shadow: 0 28px 100px #10092025; max-height: 88dvh; color: var(--local-ink); }
.modal h3 { color: #493b5d; font-size: 22px; letter-spacing: -.5px; margin-top: 0; }
.modal p, .modal label, .modal li { line-height: 1.7; }
.modal p { font-size: 13px; color: #8b8094; }
.modal .mini { font-size: 11px; color: #9b8da4; }
.modal .btn { border-radius: 8px; border-color: #e7deee; box-shadow: none; font-weight: 600; color: #887196; background: #f7f3fa; }
.modal .btn.save { background: #7b60ad; color: white; border-color: #7b60ad; }
.modal.consent { max-width: 540px; }
.local-dialog-eyebrow { display: block; font-size: 9px; letter-spacing: 1.7px; color: #9f89b7; margin-bottom: 15px; font-weight: 700; }
.modal.consent h3 { font-size: 26px; }
.check-row { padding: 10px 0; gap: 10px; }
.check-row label { font-size: 12px; color: #8c7c99; }
.check-row input { width: 16px; height: 16px; flex-shrink: 0; }
.modal input:not([type=checkbox]):not([type=radio]), .modal textarea, .modal select { border-color: #e4dcea; border-radius: 7px; background: #fdfbfe; }
.learning-workspace-overlay { position: fixed; inset: 0; padding: 0; background: #151b2d88; backdrop-filter: blur(8px); z-index: 120; display: flex; align-items: stretch; }
.learning-workspace-panel { width: 100%; max-width: 100%; min-width: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #dfd4ea; border-radius: 0; box-shadow: 0 30px 100px #1c0e3925; background: #fff; }
.learning-workspace-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 25px; background: var(--local-navy); color: white; }
.learning-workspace-header h2 { margin: 5px 0 0; font-size: 19px; color: #fff; }
.learning-workspace-eyebrow { font-size: 9px; letter-spacing: 1.5px; color: #ada0ce; }
.learning-workspace-close { color: #e2d6f5; background: #ffffff10; border: 1px solid #ffffff28; border-radius: 8px; padding: 9px 14px; font-size: 12px; }
.learning-workspace-frame { flex: 1 1 auto; border: 0; width: 100%; max-width: 100%; min-width: 0; min-height: 0; background: #fafaf9; }
.cards-layout, .practice-layout { width: 100%; height: 100dvh; max-height: none; background: #fafaf9; padding: 24px; overflow: auto; }
.cards-top, .practice-top { background: #292338; border-radius: 13px; box-shadow: none; padding: 22px; }
.cards-title, .practice-title { color: white; font-size: 23px; }
.state-msg { padding: 28px; color: #8b7c99; text-align: center; font-size: 14px; }
.local-dialog { border: 1px solid #e7deef; border-radius: 18px; padding: 28px; width: min(570px, calc(100vw - 32px)); color: #54445f; background: #fff; box-shadow: 0 30px 100px #170f2c35; max-height: 90dvh; overflow-y: auto; }
.local-dialog::backdrop { background: #151b2d70; backdrop-filter: blur(6px); }
.local-dialog h2 { margin: 0 0 10px; font-size: 24px; letter-spacing: -.7px; }
.local-dialog p { font-size: 12px; color: #9a8ba4; line-height: 1.7; }
.local-dialog label { display: block; font-size: 11px; margin: 18px 0 8px; color: #897494; }
.local-dialog textarea { width: 100%; min-height: 160px; border: 1px solid #e4dbea; border-radius: 9px; padding: 13px; font-size: 13px; line-height: 1.7; resize: vertical; color: #675673; background: #fdfbfe; }
.local-dialog select { border: 1px solid #e4dbea; border-radius: 6px; color: #796086; padding: 7px; background: #fff; }
.local-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 23px; flex-wrap: wrap; }
.local-dialog-actions button { border: 1px solid #e3d9ec; border-radius: 8px; padding: 10px 15px; color: #866899; background: #f8f4fb; font-size: 12px; }
.local-dialog-actions button.local-primary { background: #7b60ad; border-color: #7b60ad; color: #fff; }
.local-dialog .local-form-error { color: #b36c7a; background: #fff5f7; padding: 11px; border-radius: 8px; }
.local-source-warning-note { margin-top: 16px; padding: 12px 14px; border: 1px solid #eadfc9; border-radius: 10px; background: #fffbf3; color: #856f50; font-size: 12px; line-height: 1.55; }
.privacy-warning, .local-report-privacy { border: 1px solid #eadfc9; border-radius: 10px; padding: 11px 13px; background: #fffbf3; color: #765f42 !important; }
.local-report-dialog { max-width: 610px; }
.local-report-dialog select { width: 100%; min-height: 42px; padding: 9px 11px; }
.local-report-dialog .local-dialog-actions { justify-content: flex-end; }
.local-print-report { display: none; }
body.printing-report > *:not(#local-print-report) { display: none !important; }
body.printing-report #local-print-report { display: block !important; }
body.printing-report { overflow: visible !important; background: #fff !important; }
@media print {
  body.printing-report #local-print-report { display: block !important; }
  body.printing-report #local-print-report .linda-report { max-width: none; padding: 0; }
}
.local-learn-progress { display: flex; gap: 10px; align-items: center; padding: 14px; border-radius: 8px; background: #f4eff9; color: #927ba3; font-size: 12px; margin-top: 16px; }
#local-toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 200; background: #30283f; color: #f1e9fa; padding: 12px 20px; border-radius: 10px; box-shadow: 0 5px 20px #160e2c20; font-size: 12px; max-width: calc(100vw - 30px); }
.local-fatal { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; padding: 30px; background: #faf8fd; color: #584568; z-index: 250; }
.local-fatal h1 { font-size: 26px; }
.local-fatal p { line-height: 1.8; max-width: 520px; }
.local-fatal button { border: 0; background: #7b60ad; color: white; padding: 12px 18px; border-radius: 9px; font-size: 14px; }
@media (max-height: 780px) and (min-width: 901px) {
  .local-welcome { padding-top: 21px; padding-bottom: 14px; }
  .local-welcome-symbol { width: 34px; height: 34px; font-size: 24px; border-radius: 11px; margin-bottom: 13px; }
  .local-welcome > .local-eyebrow { margin-bottom: 12px; font-size: 9px; }
  .local-welcome h2 { font-size: 34px; margin-bottom: 12px; }
  .local-welcome-copy { font-size: 12px; line-height: 1.6; }
  .local-prompt-grid { margin-top: 20px; margin-bottom: 15px; }
  .local-prompt-grid button { padding: 12px 14px; gap: 7px; }
  .local-prompt-grid button strong { font-size: 11px; }
  .local-prompt-grid button > span:not([data-local-icon]) { font-size: 10px; }
  .local-prompt-grid button svg { width: 17px; height: 17px; }
}
@media (max-width: 1100px) {
  .local-sidebar { width: 225px; min-width: 225px; padding-left: 12px; padding-right: 12px; }
  #app > header { padding-left: 25px; padding-right: 25px; }
  .local-workspace-toolbar { padding-left: 25px; padding-right: 25px; }
  #chat-log { padding: 26px; }
  .local-composer { padding-left: 25px; padding-right: 25px; }
}
@media (max-width: 900px) {
  .local-sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 260px; min-width: 260px; transform: translateX(-100%); transition: transform .2s; }
  body.local-nav-open .local-sidebar { transform: translateX(0); }
  #local-sidebar-scrim:not([hidden]) { display: block; position: fixed; inset: 0; border: none; background: #151b2d65; z-index: 35; backdrop-filter: blur(2px); }
  #local-menu { display: inline-flex; }
  #local-chat-title { max-width: 47vw; }
  .local-prompt-grid { max-width: 650px; }
}
@media (max-width: 600px) {
  #app > header { min-height: 75px; padding: 14px 14px 12px 8px; }
  .local-topbar-title { gap: 4px; }
  .local-topbar-title .local-eyebrow { font-size: 8px; letter-spacing: 1px; }
  #local-chat-title { font-size: 16px; margin-top: 4px; max-width: 49vw; }
  .local-topbar-actions { gap: 5px; }
  .local-version-switch { gap: 3px; padding: 3px 5px; min-height: 32px; }
  .local-version-caption { display: none; }
  .local-version-switch input[type="range"] { width: 34px; }
  .local-version-switch strong { display: none; }
  .local-mobile-new-chat { display: inline-flex; }
  #local-connection-label { display: none; }
  .local-connection { padding: 10px; }
  .local-workspace-toolbar { padding: 0 17px 13px; }
  .local-workspace-toolbar > a { font-size: 9px; }
  .local-source-popover { left: 15px; }
  .local-welcome { padding: 32px 20px 20px; }
  .local-welcome h2 { font-size: 37px; }
  .local-welcome-copy { font-size: 12px; }
  .local-welcome > .local-eyebrow { font-size: 8px; }
  .local-prompt-grid { grid-template-columns: 1fr; margin: 23px auto 18px; gap: 8px; max-width: 360px; }
  .local-prompt-grid button { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; row-gap: 3px; padding: 13px 14px; }
  .local-prompt-grid button > [data-local-icon] { grid-row: span 2; }
  .local-prompt-grid button > strong { font-size: 11px; }
  .local-prompt-grid button > span:not([data-local-icon]) { font-size: 10px; }
  .local-welcome-tip { font-size: 9px; }
  #chat-log { padding: 21px 14px; }
  .bubble.assistant { padding: 18px; }
  .bubble.user { font-size: 13px; }
  .md { font-size: 13px; }
  .msg-row.user { padding-left: 15px; }
  .local-composer { padding: 0 14px max(10px, env(safe-area-inset-bottom)); }
  .local-composer-meta { font-size: 8px; }
  .local-legal-note { font-size: 8px; margin-top: 8px; }
  .input-area { min-height: 60px; padding: 8px 9px 8px 13px; }
  #chat-input { font-size: 16px; padding: 10px 0; }
  #local-work-status { margin: 0 14px 6px; font-size: 10px; }
  #local-notice { margin: 0 14px 8px; padding: 10px; font-size: 11px; }
  .modal { padding: 23px; }
  .modal.consent h3 { font-size: 23px; }
  .modal-overlay { padding: 14px; }
  .learning-workspace-overlay { padding: 0; }
  .learning-workspace-header { padding: 17px; }
  .learning-workspace-header h2 { font-size: 16px; }
  #local-export-chat { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .local-spinner { animation-duration: 2.5s; }
}

/* LINDA 5.0: calmer, guided entry view inspired by modern AI assistants. */
body.linda5-mode { background: #eef0ff; }
body.linda5-mode .local-sidebar { background: linear-gradient(180deg, #e7eaff 0%, #f0edff 100%); color: #354064; border-right-color: #dce1fb; }
body.linda5-mode .local-brand { color: #28355c; }
body.linda5-mode .local-brand-number { color: #5c67d9; }
body.linda5-mode .local-brand small, body.linda5-mode .local-nav-label { color: #7c85a6; }
body.linda5-mode .local-new-chat { background: #5261e9; border-color: #5261e9; box-shadow: 0 8px 18px #5261e930; }
body.linda5-mode .local-new-chat:hover { background: #4452d2; }
body.linda5-mode .local-learning-nav > button, body.linda5-mode .local-sidebar-bottom > button { color: #4d587b; }
body.linda5-mode .local-learning-nav > button:hover, body.linda5-mode .local-sidebar-bottom > button:hover { color: #28355c; background: #ffffff90; }
body.linda5-mode .local-history-item { color: #687394; }
body.linda5-mode .local-history-item:hover, body.linda5-mode .local-history-item[aria-current="true"] { color: #28355c; background: #ffffffa8; }
body.linda5-mode .local-device { color: #526082; }
body.linda5-mode .local-device small { color: #7d87a5; }
body.linda5-mode #app { background: #f7f8ff; }
body.linda5-mode #app > header { background: #ffffffc9; border-bottom: 1px solid #e3e7fb; }
body.linda5-mode .local-eyebrow { color: #7883a6; }
body.linda5-mode #local-chat-title { color: #28355c; }
body.linda5-mode .local-version-switch { border-color: #d8def8; background: #fff; }
body.linda5-mode .local-version-switch strong { color: #5261d4; }
body.linda5-mode .local-workspace-toolbar { border-bottom-color: #e3e7fb; }
body.linda5-mode .local-workspace-toolbar > a, body.linda5-mode #local-source-options > summary { color: #657295; }
body.linda5-mode .local-conversation { background: radial-gradient(circle at 50% 5%, #e6eaff 0, transparent 44%); }
body.linda5-mode .local-welcome { inset: 28px clamp(18px, 8vw, 120px); padding: clamp(34px, 7vh, 76px) 30px 34px; border: 1px solid #e0e5fb; border-radius: 30px; background: #ffffffee; box-shadow: 0 24px 70px #5863b51a; }
body.linda5-mode .local-welcome-symbol { color: #5261e9; background: linear-gradient(145deg, #eef0ff, #e9e5ff); border-color: #dbe1ff; box-shadow: 0 8px 24px #5261e920; }
body.linda5-mode .local-welcome > .local-eyebrow { color: #6874c3; }
body.linda5-mode .local-welcome h2 { color: #243154; font-size: clamp(34px, 4.1vw, 56px); }
body.linda5-mode .local-welcome h2 span { color: #5261d4; }
body.linda5-mode .local-welcome-copy { color: #677291; }
body.linda5-mode .local-prompt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; gap: 13px; margin-top: 30px; }
body.linda5-mode .local-prompt-grid button { min-height: 86px; padding: 18px; border-color: #e0e5f8; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px #5964b50b; }
body.linda5-mode .local-prompt-grid button:hover { border-color: #aab5f3; box-shadow: 0 12px 28px #5964b51c; }
body.linda5-mode .local-prompt-grid button strong { color: #354064; }
body.linda5-mode .local-prompt-grid button > span:not([data-local-icon]) { color: #77829f; }
body.linda5-mode .local-prompt-grid button > [data-local-icon] { color: #5261e9; }
body.linda5-mode .local-welcome-tip { color: #7783a0; }
body.linda5-mode .bubble.user { background: #e7eaff; border-color: #d9def9; color: #46527a; }
body.linda5-mode .bubble.assistant { border-color: #dfe4f7; border-radius: 20px; box-shadow: 0 12px 30px #5863b512; }
body.linda5-mode .local-answer-label { color: #6674c7; }
body.linda5-mode .local-composer { background: transparent; }
body.linda5-mode .input-area { border-color: #cfd7fb; border-radius: 22px; box-shadow: 0 12px 30px #5863b51a; }
body.linda5-mode #send-btn { background: #5261e9; border-radius: 50%; }
body.linda5-mode #send-btn:hover { background: #4452d2; }
body.linda5-mode #local-work-status { background: #eef0ff; border-color: #dce2ff; color: #6674c7; }
body.linda5-mode .local-legal-note { color: #7d87a5; }

@media (max-width: 600px) {
  body.linda5-mode .local-welcome { inset: 10px 8px; padding: 30px 16px 24px; border-radius: 22px; }
  body.linda5-mode .local-prompt-grid { grid-template-columns: 1fr; gap: 9px; margin-top: 22px; }
  body.linda5-mode .local-prompt-grid button { min-height: 70px; padding: 14px; }
  body.linda5-mode .local-welcome h2 { font-size: 34px; }
}

/* 2026-10-29: response hierarchy, darker navigation and mobile-first polish. */
.local-sidebar {
  background: linear-gradient(180deg, #2f4c78 0%, #365b8d 52%, #29466f 100%);
  border-right-color: #adc4e3;
  box-shadow: 12px 0 34px rgba(35, 63, 103, 0.18);
}
.local-brand-mark {
  background: linear-gradient(145deg, #bba8ff, #7864d0);
  color: #141a2e;
  box-shadow: 0 8px 20px rgba(132, 105, 220, 0.25);
}
.local-new-chat {
  border-color: #8d7be0;
  background: linear-gradient(135deg, #7661c4, #56429c);
  box-shadow: 0 10px 24px rgba(71, 51, 148, 0.3);
}
.local-new-chat:hover { background: linear-gradient(135deg, #8a73df, #6650b1); }
.local-learning-nav > button:hover,
.local-sidebar-bottom > button:hover { background: rgba(219, 235, 255, 0.16); }
.local-history-item[aria-current="true"] {
  background: linear-gradient(90deg, rgba(191, 219, 255, 0.3), rgba(191, 219, 255, 0.1));
  box-shadow: inset 3px 0 #d7eaff;
}
.bubble.assistant {
  padding: 22px 24px 18px;
  border-color: #e4dfec;
  box-shadow: 0 12px 30px rgba(44, 31, 75, 0.07);
}
.bubble.assistant .md {
  max-width: 880px;
  color: #343647;
  font-size: 15px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}
.sozialrecht-stack > .sozialrecht-section:first-child {
  position: relative;
  padding: 17px 19px;
  border: 1px solid #eee8f5;
  border-left-color: #eee8f5;
  border-radius: 13px;
  background: linear-gradient(135deg, #fcfbff 0%, #f8f6fc 100%);
}
.sozialrecht-stack > .sozialrecht-section:first-child::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 18px;
  bottom: 18px;
  width: 4px;
  height: auto;
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8b72d2 0%, #9dc9ee 100%);
  box-shadow: 0 5px 14px rgba(128, 102, 199, 0.24);
}
.sozialrecht-stack > .sozialrecht-section:first-child .sozialrecht-section-head {
  margin-bottom: 11px;
  color: #7157a5;
  font-size: 10px;
  letter-spacing: 1.15px;
}
.bubble.assistant .md p { margin-bottom: 12px; }
.bubble.assistant .md p:last-child { margin-bottom: 0; }
.bubble.assistant .md strong { color: #26283a; font-weight: 750; }
.bubble.assistant .source-panel { margin-top: 18px; }

@media (max-width: 900px) {
  .local-shell { min-width: 0; }
  .local-sidebar { box-shadow: 18px 0 48px rgba(6, 13, 31, 0.35); }
  #chat-log { scroll-padding-top: 14px; }
}

@media (max-width: 600px) {
  .local-sidebar { width: min(310px, 88vw); min-width: min(310px, 88vw); padding: 22px 14px 14px; }
  .local-brand { font-size: 22px; }
  .local-new-chat { margin: 25px 0 21px; min-height: 46px; }
  .local-history { margin-top: 22px; }
  #chat-log { padding: 18px 12px 28px; }
  .msg-row { margin-bottom: 18px; }
  .msg-row.user { padding-left: 10px; }
  .msg-row.user .msg-wrap { max-width: 94%; }
  .bubble.user { padding: 11px 13px; border-radius: 14px 14px 4px 14px; font-size: 14px; }
  .bubble.assistant { padding: 16px 13px 14px; border-radius: 13px; }
  .bubble.assistant .md { font-size: 15px; line-height: 1.65; }
  .sozialrecht-stack { gap: 10px; }
  .sozialrecht-stack > .sozialrecht-section:first-child { padding: 14px 13px; border-radius: 11px; }
  .local-answer-label { margin-bottom: 12px; font-size: 8px; letter-spacing: 1.35px; }
  .local-answer-details { margin-top: 11px; padding-top: 10px; }
  .msg-actions.compact { margin-left: 0; padding-top: 6px; overflow-x: auto; scrollbar-width: none; }
  .msg-actions.compact::-webkit-scrollbar { display: none; }
  .msg-actions.compact .action-btn { flex: 0 0 31px; }
  .local-workspace-toolbar { gap: 7px; }
  .local-source-popover { max-width: calc(100vw - 30px); }
  .local-options-content { width: min(400px, calc(100vw - 28px)); left: 0; padding: 14px; }
  #local-work-status { margin-inline: 12px; padding: 9px 11px; }
  #local-work-label { min-width: 0; line-height: 1.35; }
  .local-composer { padding-inline: 12px; }
  .local-composer-meta { margin-inline: 2px; }
  .input-area { gap: 6px; border-radius: 13px; }
  #mic-btn, #send-btn { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
  .local-dialog { width: min(570px, calc(100vw - 24px)); padding: 21px 17px; }
}

#clarify-dock {
  position: relative !important;
  inset: auto !important;
  display: block;
  width: auto;
  max-width: none;
  margin: 8px 34px 10px;
  padding: 0;
  flex: 0 1 auto;
  max-height: min(42dvh, 440px);
  overflow-y: auto;
  overflow-x: hidden;
  pointer-events: auto;
  z-index: 7;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

#clarify-dock .clarify-card {
  position: relative !important;
  inset: auto !important;
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  box-sizing: border-box;
}

#clarify-dock .clarify-body {
  min-height: 0;
}

@media (max-width: 1100px) {
  #clarify-dock { margin-inline: 25px; }
}

@media (max-width: 600px) {
  #clarify-dock {
    width: auto;
    margin: 7px 12px 9px;
    max-height: min(48dvh, 430px);
    border-radius: 14px;
  }

  #clarify-dock .clarify-card { border-radius: 14px; }
}

