@import url('/fonts.css');

:root {
  color-scheme: dark;
  --bg: #141a22;
  --sidebar: #10161d;
  --surface: #1a222d;
  --surface-raised: #202a36;
  --accent: #28dbb0;
  --accent-soft: #28dbb012;
  --text: #edf3f7;
  --muted: #a0aebb;
  --subtle: #8393a4;
  --border: #303c49;
  --border-soft: #ffffff0c;
  --warning: #f1c77b;
  --error: #ff9a9a;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --body-font: 'Manrope', 'Segoe UI', sans-serif;
  --display-font: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-family: var(--body-font);
  font-size: 14px;
  font-synthesis: none;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: #28dbb01c; touch-action: manipulation; }
button { cursor: pointer; }
button, a { transition: background-color .18s, border-color .18s, color .18s; }
button:disabled { opacity: .55; cursor: wait; }
[hidden] { display: none !important; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
.icon { display: inline-block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 30; background: var(--accent); color: var(--bg); padding: 12px 20px; border-radius: var(--radius-sm); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
h1, h2, h3 { font-family: var(--display-font); text-wrap: balance; }
p { text-wrap: pretty; }
.app { display: grid; grid-template-columns: 248px minmax(0,1fr); height: 100dvh; overflow: hidden; }
.sidebar { min-height: 0; display: flex; flex-direction: column; background: var(--sidebar); padding: 32px 20px 20px; border-right: 1px solid var(--border-soft); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding-left: 8px; }
.brand-mark { width: 44px; height: 44px; flex-shrink: 0; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.brand-name { font-family: var(--display-font); font-size: 30px; font-weight: 600; letter-spacing: -1.5px; line-height: 1; }
.brand-name > span { display: block; font: 9px var(--body-font); letter-spacing: 1.8px; color: var(--muted); margin-top: 8px; }
.sidebar-section { margin-top: 44px; }
.sidebar-label { margin: 0 12px 16px; font-size: 9px; font-weight: 600; letter-spacing: 1.6px; color: var(--subtle); }
nav { display: grid; gap: 8px; }
.nav-button { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 16px; border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: var(--radius-sm); text-align: left; text-decoration: none; font-size: 13px; }
.nav-button:hover { background: #ffffff04; color: var(--text); }
.nav-button.active { background: var(--accent-soft); border-color: #28dbb01f; color: var(--accent); }
.nav-label { flex: 1; }
.nav-indicator { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 5px; background: #ffffff08; color: var(--muted); font-size: 10px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.sidebar-bottom { margin-top: auto; padding-top: 32px; }
.workspace-card { border: 1px solid #28dbb021; border-radius: var(--radius); padding: 20px; background: linear-gradient(145deg,#28dbb00a,transparent 70%); }
.workspace-card > .icon { color: var(--accent); width: 24px; height: 24px; margin-bottom: 16px; }
.workspace-card strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.6; }
.workspace-card p { font-size: 11px; line-height: 1.8; color: var(--muted); margin: 12px 0 16px; }
.workspace-card button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; width: 100%; background: none; border: 0; color: var(--accent); padding: 0; text-align: left; font-size: 11px; }
.workspace-card button .icon { width: 16px; height: 16px; }
.profile { display: flex; align-items: center; gap: 12px; margin-top: 24px; border-top: 1px solid var(--border-soft); padding-top: 20px; }
.avatar { width: 36px; height: 36px; border: 1px solid #28dbb02e; border-radius: 10px; color: var(--accent); background: #28dbb00a; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.profile strong { display: block; font-size: 11px; font-weight: 600; }
.profile span { display: block; color: var(--subtle); font-size: 10px; margin-top: 4px; }
.profile .icon-button { margin-left: auto; }
.icon-button { border: 0; background: transparent; color: var(--muted); width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.icon-button:hover { background: var(--surface-raised); color: var(--text); }
main { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 18%,#28dbb006,transparent 55%),var(--bg); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; flex-shrink: 0; padding: 0 40px; border-bottom: 1px solid var(--border-soft); }
.breadcrumbs { display: flex; align-items: center; gap: 16px; font-size: 12px; }
.breadcrumb { color: var(--subtle); }
.divider { color: var(--border); }
.topbar strong { font-weight: 500; }
.header-right { display: flex; align-items: center; gap: 24px; }
.privacy-label { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--subtle); }
.privacy-label .icon { width: 14px; height: 14px; }
.top-status { display: flex; align-items: center; gap: 8px; border: 1px solid #28dbb026; border-radius: 24px; background: #28dbb008; padding: 8px 12px; font-size: 10px; font-weight: 500; color: var(--accent); white-space: nowrap; }
.top-status[data-ready="false"] { color: var(--muted); border-color: var(--border); background: var(--surface); }
.dot { width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.chat-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 24px max(28px,calc((100% - 832px)/2)); scroll-behavior: smooth; scrollbar-gutter: stable; }
.welcome { max-width: 832px; margin: clamp(8px,4vh,48px) auto 16px; text-align: center; }
.welcome-orbit { display: block; width: 100px; height: 100px; margin: 0 auto 20px; }
.eyebrow { font-size: 9px; font-weight: 650; letter-spacing: 1.8px; color: var(--accent); line-height: 1.6; }
.welcome h2 { font-size: clamp(38px,4.5vw,56px); line-height: 1.1; letter-spacing: -2px; font-weight: 600; margin: 20px 0 20px; }
.welcome h2 > span { color: var(--accent); }
.welcome-sub { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 0; }
.suggestions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 32px; text-align: left; }
.suggestions button { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: #1a222d80; color: var(--text); text-align: left; }
.suggestions button:hover { background: var(--surface); border-color: #28dbb060; }
.suggestion-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; color: var(--accent); }
.suggestion-top .suggestion-arrow { color: var(--subtle); width: 16px; height: 16px; }
.suggestions strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.6; }
.suggestions small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; line-height: 1.7; }
.composer-area { flex-shrink: 0; padding: 16px max(28px,calc((100% - 832px)/2)) 20px; }
.quick-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.quick-actions button { display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 10px; border: 1px solid var(--border); background: transparent; border-radius: var(--radius-sm); font-size: 10px; color: var(--muted); }
.quick-actions button .icon { width: 14px; height: 14px; }
.quick-actions button:hover { color: var(--accent); border-color: #28dbb04d; }
.quick-actions > span { margin-left: auto; font-size: 10px; color: var(--subtle); }
.composer { background: var(--surface); border: 1px solid #3b4a59; border-radius: 16px; padding: 16px 20px 12px; box-shadow: 0 8px 32px #00000012; transition: border-color .18s; }
.composer:focus-within { border-color: #28dbb080; }
.composer textarea { resize: none; border: 0; width: 100%; background: transparent; color: var(--text); min-height: 48px; max-height: 160px; font-size: 14px; padding: 4px 0; line-height: 1.7; }
.composer textarea:focus-visible { outline-offset: 6px; border-radius: 2px; }
.composer textarea::placeholder { color: var(--subtle); opacity: 1; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.composer-provider { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--muted); }
.composer-provider .icon { width: 14px; height: 14px; color: var(--accent); }
.send { position: relative; display: grid; place-items: center; background: var(--accent); color: var(--bg); border: 0; border-radius: 10px; width: 40px; height: 40px; }
.send:hover { background: #5de7c5; }
.send[aria-busy="true"] .icon { visibility: hidden; }
.send[aria-busy="true"]::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid #141a2233; border-top-color: var(--bg); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.composer-note { display: flex; justify-content: space-between; gap: 8px; margin: 12px 0 0; font-size: 9px; line-height: 1.8; color: var(--subtle); }
.composer-note > span { white-space: nowrap; }
kbd { font: inherit; color: var(--muted); }
.note-separator { margin: 0 8px; color: var(--border); }
.message { display: flex; gap: 16px; margin: 16px 0 32px; content-visibility: auto; contain-intrinsic-size: auto 140px; }
.message-avatar { width: 36px; height: 36px; flex-shrink: 0; border: 1px solid #28dbb02e; border-radius: 10px; color: var(--accent); background: var(--accent-soft); display: grid; place-items: center; }
.message-avatar .icon { width: 18px; height: 18px; }
.message .bubble { min-width: 0; }
.message.user { justify-content: flex-end; }
.message.user .bubble { max-width: 85%; padding: 16px 20px; border: 1px solid #28dbb028; background: #28dbb00d; border-radius: 16px 16px 4px 16px; }
.message.assistant .bubble { flex: 1; padding-top: 4px; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.9; }
.message-meta { font-size: 10px; color: var(--subtle); margin-top: 12px; }
.message-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.message-actions .text-button { border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; background: transparent; font-size: 10px; min-height: 28px; }
.message-actions .text-button:hover { color: var(--accent); border-color: #28dbb04d; }
.sources { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.sources details { font-size: 11px; border: 1px solid #28dbb026; color: var(--accent); border-radius: var(--radius-sm); padding: 8px 12px; max-width: 100%; background: #28dbb005; }
.sources summary { cursor: pointer; }
.sources p { max-width: 560px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; color: var(--muted); }
.content-view { flex: 1; min-height: 0; overflow-y: auto; padding: 48px 40px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 auto 36px; max-width: 1100px; }
.section-heading h1 { font-size: 36px; font-weight: 600; letter-spacing: -1.2px; margin: 16px 0 12px; }
.heading-dot { color: var(--accent); }
.section-heading p:not(.eyebrow) { font-size: 12px; color: var(--muted); line-height: 1.8; margin-bottom: 0; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: var(--radius-sm); padding: 12px 20px; font-size: 12px; font-weight: 650; }
.primary { background: var(--accent); border: 1px solid transparent; color: var(--bg); }
.primary:hover { background: #5de7c5; }
.primary .icon { width: 16px; height: 16px; }
.secondary { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.secondary:hover { background: var(--surface-raised); color: var(--text); }
.card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; max-width: 1100px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--border); padding: 24px; border-radius: var(--radius); overflow-wrap: anywhere; min-width: 0; content-visibility: auto; contain-intrinsic-size: auto 200px; }
.card-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.connection-icon { display: grid; place-items: center; width: 40px; height: 40px; background: var(--accent-soft); color: var(--accent); border: 1px solid #28dbb01f; border-radius: 10px; flex-shrink: 0; }
.card h2 { font-size: 15px; font-weight: 500; letter-spacing: -.3px; margin: 0; }
.card p { color: var(--muted); font-size: 12px; line-height: 1.9; white-space: pre-wrap; }
.card .memory-content { color: var(--text); margin-top: 0; font-size: 13px; }
.card-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 24px; font-size: 10px; color: var(--subtle); }
.card-footer .pill { margin-left: auto; }
.pill { display: inline-block; padding: 6px 10px; border: 1px solid #28dbb023; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 10px; line-height: 1.3; }
.pill.warn { background: #f1c77b0b; border-color: #f1c77b26; color: var(--warning); }
.text-button { border: 0; background: transparent; color: var(--muted); font-size: 11px; padding: 8px; border-radius: 6px; }
.text-button:hover { color: var(--accent); background: #28dbb008; }
.empty { grid-column: 1/-1; display: flex; flex-direction: column; align-items: center; padding: 64px 24px; border: 1px dashed var(--border); background: #1a222d40; border-radius: var(--radius); color: var(--muted); font-size: 13px; line-height: 1.9; text-align: center; }
.empty > .icon { width: 32px; height: 32px; color: var(--accent); margin-bottom: 20px; }
.empty strong { display: block; color: var(--text); font-family: var(--display-font); font-size: 20px; font-weight: 500; margin-bottom: 8px; }
.empty p { margin: 0; max-width: 400px; }
.task-list { display: grid; gap: 16px; max-width: 1100px; margin: 0 auto; }
.task-card { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 24px; content-visibility: auto; contain-intrinsic-size: auto 180px; }
.task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.task-card h2 { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.6; min-width: 0; overflow-wrap: anywhere; }
.task-top .pill { flex-shrink: 0; }
.task-card p, .task-card pre { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; line-height: 1.9; }
.task-card details { margin-top: 16px; color: var(--accent); font-size: 12px; }
.task-card summary { cursor: pointer; }
.task-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.task-actions .primary, .task-actions .secondary { min-height: 36px; padding: 8px 12px; font-size: 11px; }
.info-box { display: flex; gap: 16px; margin: 24px auto 0; max-width: 1100px; padding: 24px; border: 1px solid #28dbb025; background: #28dbb005; border-radius: var(--radius); font-size: 12px; line-height: 1.8; color: var(--muted); }
.info-box > .icon { color: var(--accent); }
.info-box strong { color: var(--text); font-weight: 500; }
.info-box p { margin: 8px 0 0; }
.notice { margin: 12px 28px 0; padding: 12px 16px; border: 1px solid #f1c77b30; border-radius: var(--radius-sm); background: #f1c77b08; color: var(--warning); font-size: 12px; line-height: 1.8; flex-shrink: 0; }
dialog { color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; width: min(520px,calc(100% - 32px)); background: var(--surface); box-shadow: 0 24px 80px #0008; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
dialog::backdrop { background: #080e16b3; backdrop-filter: blur(4px); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; }
dialog h2 { font-size: 28px; font-weight: 500; letter-spacing: -1px; margin: 20px 0 24px; }
label { display: block; font-size: 12px; color: var(--muted); margin: 16px 0; }
label textarea, label input, label select { display: block; width: 100%; border: 1px solid #405062; border-radius: var(--radius-sm); background: var(--bg); color: var(--text); padding: 12px; margin-top: 8px; line-height: 1.7; }
label textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--subtle); opacity: 1; }
.form-hint { color: var(--muted); font-size: 11px; line-height: 1.9; }
.form-error { color: var(--error); font-size: 12px; line-height: 1.8; }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
#editor-submit { width: 100%; margin-top: 12px; }
#confirm-details { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--body-font); font-size: 13px; line-height: 1.9; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); padding: 16px; }
.login-screen { min-height: 100dvh; height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; overflow-y: auto; background: var(--bg); }
.login-intro { display: flex; flex-direction: column; justify-content: center; padding: 64px clamp(32px,7vw,112px); border-right: 1px solid var(--border-soft); background: radial-gradient(ellipse at 50% 35%,#28dbb00b,transparent 65%),var(--sidebar); position: relative; }
.login-wordmark { position: absolute; top: 40px; left: clamp(32px,7vw,112px); font-family: var(--display-font); font-size: 18px; font-weight: 600; letter-spacing: -1px; }
.login-wordmark > span:first-child { color: var(--accent); }
.wordmark-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-left: 8px; }
.login-orbit { width: 156px; height: 156px; margin: 0 0 32px -24px; }
.login-orbit img { width: 100%; height: 100%; }
.login-intro h2 { margin: 16px 0 24px; font-size: clamp(32px,4vw,54px); letter-spacing: -2px; line-height: 1.2; font-weight: 500; }
.login-intro h2 > span { color: var(--accent); }
.login-description { color: var(--muted); font-size: 14px; line-height: 1.9; }
.login-signature { position: absolute; bottom: 40px; left: clamp(32px,7vw,112px); font-family: var(--display-font); font-size: 12px; letter-spacing: 2px; }
.login-signature span { font-family: var(--body-font); font-size: 9px; color: var(--subtle); margin-left: 16px; letter-spacing: 1.3px; }
.login-card { width: min(384px,calc(100% - 64px)); margin: auto; padding: 40px 0; }
.login-card > .brand-mark { margin-bottom: 32px; width: 48px; height: 48px; }
.login-card h1 { font-family: var(--display-font); font-size: 36px; font-weight: 500; line-height: 1.2; letter-spacing: -1.4px; margin: 16px 0; }
.login-subtitle { color: var(--muted); font-size: 12px; line-height: 1.8; margin-bottom: 32px; }
.login-card label { font-size: 11px; margin-bottom: 8px; }
.password-field { display: flex; align-items: center; gap: 12px; border: 1px solid #405062; border-radius: var(--radius-sm); padding: 0 16px; background: var(--surface); }
.password-field:focus-within { border-color: var(--accent); }
.password-field > .icon { color: var(--subtle); width: 16px; height: 16px; }
.password-field input { background: transparent; border: 0; color: var(--text); padding: 16px 0; width: 100%; min-width: 0; font-size: 13px; }
.login-submit { display: flex; justify-content: space-between; width: 100%; margin-top: 20px; }
.login-footnote { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--subtle); font-size: 10px; margin-top: 24px; }
.login-footnote > .icon { width: 14px; height: 14px; }
#login-error:empty, #editor-error:empty { display: none; }
@media (max-height: 760px) and (min-width: 701px) {
  .workspace-card { display: none; }
  .welcome { margin-top: 0; }
  .welcome-orbit { width: 72px; height: 72px; margin-bottom: 12px; }
  .welcome h2 { font-size: 44px; margin: 12px 0; }
  .welcome-sub { font-size: 12px; }
  .suggestions { margin-top: 24px; }
  .suggestions button { padding: 16px; }
  .suggestion-top { margin-bottom: 16px; }
}
@media (max-width: 1100px) {
  .app { grid-template-columns: 216px minmax(0,1fr); }
  .sidebar { padding-left: 16px; padding-right: 16px; }
  .topbar { padding: 0 28px; }
  .privacy-label { display: none; }
  .content-view { padding: 36px 28px; }
  .card-grid { grid-template-columns: 1fr; }
  .suggestions button { padding: 16px; }
  .suggestions small { font-size: 9px; }
  .quick-actions > span { display: none; }
  .composer-note { justify-content: center; }
  .composer-note > span { display: none; }
}
@media (max-width: 700px) {
  .app { display: block; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .sidebar { position: fixed; z-index: 10; bottom: 0; left: 0; right: 0; height: calc(68px + env(safe-area-inset-bottom)); padding: 4px max(8px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px,env(safe-area-inset-left)); border-top: 1px solid var(--border); border-right: 0; background: #10161df5; backdrop-filter: blur(12px); }
  .brand, .sidebar-label, .sidebar-bottom { display: none; }
  .sidebar-section { margin: 0; }
  nav { display: flex; gap: 4px; }
  .nav-button { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 8px 4px; min-height: 60px; font-size: 9px; border: 0; border-radius: var(--radius-sm); }
  .nav-label { flex: 0; }
  .nav-icon { width: 20px; height: 20px; }
  .nav-indicator, .nav-button .count { display: none; }
  main { height: 100%; }
  .topbar { padding: env(safe-area-inset-top) 20px 0; height: calc(60px + env(safe-area-inset-top)); }
  .breadcrumbs { font-size: 13px; }
  .breadcrumb, .divider { display: none; }
  .top-status { font-size: 9px; padding: 6px 10px; max-width: 180px; overflow: hidden; }
  .messages { padding: 16px 20px; scrollbar-gutter: auto; }
  .welcome { margin: 0 auto 12px; }
  .welcome-orbit { width: 72px; height: 72px; margin-bottom: 12px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.3px; }
  .welcome h2 { font-size: 40px; letter-spacing: -1.5px; margin: 16px 0; }
  .welcome-sub { font-size: 11px; }
  .welcome-sub br { display: none; }
  .suggestions { grid-template-columns: 1fr; gap: 8px; margin-top: 24px; }
  .suggestions button { display: grid; grid-template-columns: 24px minmax(0,1fr); column-gap: 12px; padding: 12px 16px; }
  .suggestion-top { grid-row: 1/3; margin: 0; align-self: center; }
  .suggestion-arrow { display: none; }
  .suggestions strong { font-size: 11px; }
  .suggestions small { font-size: 10px; margin-top: 2px; }
  .composer-area { padding: 12px 16px; }
  .quick-actions { margin-bottom: 8px; }
  .quick-actions button { min-height: 36px; padding: 8px 12px; }
  .composer { padding: 12px 16px; border-radius: var(--radius); }
  .composer textarea { font-size: 16px; min-height: 44px; }
  .composer-footer { margin-top: 4px; }
  .send { width: 40px; height: 40px; }
  .composer-note { font-size: 8px; margin-top: 8px; }
  .message { gap: 12px; }
  .message-text { font-size: 13px; }
  .message-avatar { width: 28px; height: 28px; border-radius: var(--radius-sm); }
  .message.user .bubble { max-width: 92%; padding: 12px 16px; }
  .message-actions .text-button { min-height: 36px; }
  .content-view { padding: 28px 20px; }
  .section-heading { display: block; margin-bottom: 24px; }
  .section-heading h1 { font-size: 32px; }
  .section-heading > .primary { margin-top: 20px; }
  .card { padding: 20px; }
  .card-header { gap: 12px; }
  .task-card { padding: 20px; }
  .task-top { flex-direction: column; gap: 12px; }
  .task-top .pill { align-self: flex-start; }
  .task-actions .primary, .task-actions .secondary { min-height: 40px; }
  .notice { margin: 8px 16px 0; padding: 8px 12px; font-size: 10px; }
  .info-box { padding: 20px; gap: 12px; }
  dialog { padding: 24px; }
  dialog h2 { font-size: 26px; }
  label input, label select, label textarea { font-size: 16px; }
  .dialog-buttons { flex-wrap: wrap; gap: 8px; }
  .dialog-buttons > button { flex: 1; }
  .login-screen { display: flex; flex-direction: column; justify-content: center; }
  .login-intro { display: none; }
  .login-card { width: min(384px,calc(100% - 48px)); padding: 32px 0; }
  .login-card h1 { font-size: 34px; }
  .password-field input { font-size: 16px; }
}
@media (max-width: 360px) {
  .topbar { padding-left: 16px; padding-right: 16px; }
  .messages { padding-left: 16px; padding-right: 16px; }
  .welcome h2 { font-size: 36px; }
  .content-view { padding-left: 16px; padding-right: 16px; }
}
@media (pointer: fine) { html { overscroll-behavior: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
.mobile-logout { display: none; }
@media (max-width: 700px) { .mobile-logout { display: inline-flex; } .header-right { gap: 8px; } }
.messages:focus-visible, .content-view:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.mobile-brand { display: none; }
@media (max-width: 700px) { .mobile-brand { display: block; } .breadcrumbs { gap: 8px; } }
