:root {
  color-scheme: light;
  --bg: #f6f7f5;
  --panel: #fff;
  --panel2: #f1f4f1;
  --line: #e3e8e2;
  --text: #243b32;
  --muted: #64756a;
  --accent: #237962;
  --accent2: #216b58;
  --ok: #237962;
  --warn: #895e12;
  --bad: #bc4e49;
  --r: 14px;
  --sidebar-width: 264px;
  --shadow: 0 2px 4px #253e3003, 0 5px 18px #253e3003;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; display: flex; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #5ca88d; outline-offset: 4px; }
button { transition: background .18s, border-color .18s, box-shadow .18s, transform .18s; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; display: inline-block; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 20; background: var(--accent); color: #fff; border-radius: 8px; padding: 10px 18px; }
.skip-link:focus { top: 12px; }
#sidebar { width: var(--sidebar-width); flex: none; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; padding: 32px 20px 20px; background: #fcfdfb; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; margin-bottom: 42px; text-decoration: none; font-size: 22px; font-weight: 700; letter-spacing: -.7px; line-height: 1.3; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 44px; border-radius: 13px; color: #fff; background: var(--accent); box-shadow: 0 4px 10px #23796218; }
.brand-mark .icon { width: 25px; height: 25px; stroke-width: 1.45; }
.brand small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: .2px; margin-top: 4px; }
.nav-label { font-size: 12px; font-weight: 650; letter-spacing: 1.4px; color: #68776b; padding-left: 14px; margin-bottom: 12px; }
nav { display: flex; flex-direction: column; gap: 7px; margin-bottom: 32px; }
nav button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; border: 1px solid transparent; background: transparent; text-align: left; color: #66766d; font-size: 13px; font-weight: 500; }
nav button .icon { width: 18px; height: 18px; }
nav button:hover { background: var(--panel2); color: var(--accent); }
nav button.active { color: var(--accent); background: #e9f2ec; border-color: #e0ece4; font-weight: 650; }
.nav-indicator { display: none; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.active .nav-indicator { display: block; }
.panel { padding: 18px 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 5px; }
.panel h3 { margin: 0; font-size: 14px; font-weight: 650; }
.panel-heading > .icon { color: #8e9b92; width: 15px; height: 15px; }
.mini-label { color: #5b7061; background: #f1f5ef; border-radius: 4px; padding: 2px 5px; font-size: 9px; font-weight: 650; letter-spacing: .7px; }
.hint { color: var(--muted); font-size: 12px; margin: 5px 0 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; }
.stat b { display: block; font-size: 21px; font-weight: 600; letter-spacing: -.6px; line-height: 1.4; overflow-wrap: anywhere; }
.stat span { font-size: 12px; color: var(--muted); }
.audio-stat { display: flex; align-items: center; gap: 6px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.audio-stat .icon { width: 12px; height: 12px; }
.audio-stat b { color: var(--text); font-size: 12px; font-weight: 600; margin-left: auto; text-align: right; }
.conversation-count { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.conversation-count b { color: var(--text); font-weight: 600; }
.meter { height: 5px; background: #edf1ec; border-radius: 9px; overflow: hidden; margin-top: 10px; }
.meter div { height: 100%; width: 0; background: var(--ok); border-radius: inherit; transition: width .4s, background .4s; }
.token-label { font-size: 11px; margin: 8px 0 0; }
.sidebar-footer { display: flex; gap: 9px; align-items: center; margin-top: auto; padding: 28px 4px 2px; }
.privacy-icon { width: 30px; height: 32px; display: grid; place-items: center; background: #edf3ec; color: #6b876f; border-radius: 8px; }
.privacy-icon .icon { width: 16px; height: 16px; }
.sidebar-footer b { display: block; font-size: 12px; font-weight: 600; }
.sidebar-footer div > span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.workspace-bar { min-height: 73px; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fcfdfb; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 13px; }
.breadcrumb b { color: #4d6356; font-weight: 500; }
.breadcrumb-divider { color: #607060; }
.local-pill { display: inline-flex; align-items: center; gap: 7px; background: #f0f5ee; color: #526d53; border: 1px solid #e3ebdf; border-radius: 6px; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.local-pill > span { width: 5px; height: 5px; border-radius: 50%; background: #6e985f; }
main { width: 100%; max-width: 1440px; padding: 36px 40px 38px; margin: 0 auto; flex: 1; min-width: 0; }
main:focus { outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.eyebrow { color: #5b6f60; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 1.8px; margin: 0 0 7px; }
h1 { font-size: clamp(26px, 2.5vw, 34px); line-height: 1.25; font-weight: 600; letter-spacing: -1.15px; margin: 0; }
.sub { font-size: 14px; color: var(--muted); margin: 8px 0 0; max-width: 620px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 8px; padding: 10px 17px; font-size: 14px; font-weight: 550; box-shadow: 0 2px 3px #183c2310; white-space: nowrap; }
.btn .icon { width: 16px; height: 16px; }
.btn:hover:not(:disabled) { background: #19634f; border-color: #19634f; box-shadow: 0 3px 9px #23796220; transform: translateY(-1px); }
.btn:disabled { opacity: .45; box-shadow: none; }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--text); box-shadow: none; }
.btn.ghost:hover { background: #edf3ed; border-color: #c4d7c9; }
.welcome-banner { display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; gap: 25px; padding: 24px 28px; margin-bottom: 24px; background: #edf2e9; border: 1px solid #e0e7db; border-radius: var(--r); }
.welcome-copy { position: relative; z-index: 1; }
.welcome-kicker { display: flex; gap: 7px; align-items: center; color: #586f4c; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.welcome-kicker .icon { width: 14px; height: 14px; }
.welcome-banner h2 { font-size: 21px; font-weight: 500; letter-spacing: -.6px; margin: 7px 0; }
.welcome-banner p { margin: 0; color: #5d7155; font-size: 13px; }
.text-btn { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 600; margin-top: 14px; }
.text-btn .icon { width: 14px; height: 14px; transition: transform .2s; }
.text-btn:hover .icon { transform: translateX(3px); }
.memory-art { width: 225px; height: 126px; flex: none; color: #6a8a61; }
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.card { border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 15px; }
.card-top .icon { width: 17px; height: 17px; color: #6c8973; }
.card-label { color: #5f7162; font-size: 12px; }
.card > b { display: block; font-size: clamp(21px, 2vw, 28px); font-weight: 600; letter-spacing: -.8px; line-height: 1.25; overflow-wrap: anywhere; }
.card > small { display: block; font-size: 11px; margin-top: 7px; color: #5c7055; }
.card.featured { background: #edf3ec; border-color: #dbe6d9; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px 0 13px; }
h2 { font-size: 14px; font-weight: 600; margin: 0; letter-spacing: -.2px; }
.section-heading h2 { display: flex; align-items: center; gap: 8px; }
.section-note { color: var(--muted); font-size: 12px; }
.count { background: #e9ede7; border: 1px solid #e1e6de; padding: 0 6px; color: #5e7055; border-radius: 5px; font-size: 11px; line-height: 18px; font-weight: 500; }
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.models { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.model-card { display: flex; gap: 11px; padding: 16px 14px; align-items: flex-start; min-width: 0; }
.model-icon { display: grid; place-items: center; background: #f1f4ef; border: 1px solid #e7ece4; border-radius: 8px; width: 33px; height: 33px; color: #6e8569; flex: none; }
.model-icon .icon { width: 17px; height: 17px; }
.model-copy { flex: 1; min-width: 0; }
.model-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.model-value { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.model-card small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; overflow-wrap: anywhere; }
.status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.status-dot.off { background: var(--bad); }
code { background: #f2f4ef; padding: 2px 5px; border-radius: 4px; font-size: 12px; color: #5a6c54; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.recording-actions { position: sticky; right: 0; background: var(--panel); }
.recording-delete { padding: 6px 9px; font-size: 11px; }
.section-heading .text-btn { margin-top: 0; white-space: nowrap; text-decoration: none; }
.recordings-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; }
.recording-search { flex: 1 1 230px; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.recording-search .icon { width: 17px; height: 17px; }
.recording-search input { min-width: 0; width: 100%; background: transparent; color: var(--text); border: 0; outline: none; font-size: 13px; }
.recording-search input::placeholder { color: var(--muted); }
.recording-search:focus-within { outline: 3px solid #5ca88d; outline-offset: 2px; }
.recordings-count { color: var(--muted); font-size: 12px; margin: 18px 0 12px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 14px 17px; border-bottom: 1px solid #eef0eb; font-size: 12px; white-space: nowrap; }
th { padding-top: 12px; padding-bottom: 12px; background: #fafbf8; font-size: 11px; color: #65765e; font-weight: 500; }
td { color: #5f7258; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfdf9; }
.file-cell { display: flex; align-items: center; gap: 10px; color: #40553f; font-weight: 500; }
.file-cell > span:last-child { white-space: normal; overflow-wrap: anywhere; min-width: 110px; max-width: 260px; }
.file-icon { display: grid; place-items: center; width: 29px; height: 32px; border-radius: 6px; color: #7b9272; background: #f0f4eb; flex: none; }
.file-icon .icon { width: 15px; height: 15px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 5px; font-size: 11px; font-weight: 500; text-transform: capitalize; background: #f1f3ed; color: #73816b; }
.badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.badge.done { background: #eef5e9; color: #4f7039; }
.badge.failed { background: #faeeec; color: var(--bad); }
.badge.processing { background: #fbf4e4; color: var(--warn); }
.memory-list { padding: 0 22px; }
.mem { display: flex; align-items: flex-start; gap: 13px; padding: 18px 0; border-bottom: 1px solid #edf0e9; }
.mem:last-child { border-bottom: 0; }
.memory-marker { width: 28px; height: 28px; display: grid; place-items: center; background: #f2f5ef; border: 1px solid #e9eee3; color: #8b9b7e; border-radius: 8px; flex: none; margin-top: 2px; }
.memory-marker .icon { width: 14px; height: 14px; }
.memory-body { min-width: 0; flex: 1; }
.memory-body p { font-size: 13px; line-height: 1.7; margin: 5px 0 4px; color: #52634c; overflow-wrap: anywhere; }
.mem small { display: block; color: #607253; font-size: 11px; overflow-wrap: anywhere; }
.tag { display: inline-block; border: 1px solid #e2e9db; border-radius: 4px; padding: 1px 6px; color: #5c714f; background: #f6f8f1; font-size: 10px; text-transform: uppercase; letter-spacing: .4px; }
.tag + .tag { margin-left: 5px; }
.empty { text-align: center; color: var(--muted); padding: 34px 20px; }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: #f0f4ec; color: #8ca07e; margin: 0 auto 12px; }
.empty-icon .icon { width: 22px; height: 22px; }
.empty b { display: block; color: #53654a; font-weight: 550; font-size: 13px; }
.empty p { font-size: 13px; margin: 5px 0 0; }
.empty .text-btn { margin-top: 12px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 70px 20px; color: var(--muted); font-size: 14px; }
.loading::before { content: ""; width: 15px; height: 15px; border: 2px solid #dde8de; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 18px 40px; border-top: 1px solid var(--line); font-size: 11px; color: #5b6e53; }
.workspace-footer > span:last-child { display: flex; align-items: center; gap: 5px; }
.workspace-footer .icon { width: 12px; height: 12px; }
.footer-dot { padding: 0 6px; }
/* Audio upload */
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.upload-panel { padding: 24px; }
.upload-panel h2 { margin-bottom: 4px; }
.upload-intro { font-size: 13px; color: var(--muted); margin: 0 0 22px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 260px; border: 1.5px dashed #c6d5c4; border-radius: 11px; padding: 30px 20px; text-align: center; background: #fafcf7; transition: .2s; cursor: pointer; }
.drop.over, .drop:hover, .drop:focus-within { border-color: var(--accent); background: #f0f6ee; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { display: grid; place-items: center; width: 56px; height: 56px; background: #ecf3e8; border: 1px solid #e0e9da; color: #789365; border-radius: 16px; margin-bottom: 12px; }
.upload-icon .icon { width: 27px; height: 27px; }
.drop b { font-size: 13px; font-weight: 550; overflow-wrap: anywhere; max-width: 100%; }
.drop p { margin: 2px 0; color: #637650; font-size: 12px; }
.browse-label { margin-top: 10px; padding: 6px 13px; border-radius: 6px; border: 1px solid #d9e4d2; background: #fff; color: var(--accent); font-size: 12px; font-weight: 550; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.upload-actions { justify-content: space-between; gap: 20px; }
.field-label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #5f7351; }
input[type=date], select, textarea { background: #fff; color: var(--text); border: 1px solid #dce4d8; border-radius: 7px; padding: 9px 12px; font: inherit; font-size: 14px; }
input[type=date] { min-height: 39px; font-size: 13px; }
.upload-actions > .btn { align-self: flex-end; }
.upload-privacy { display: flex; align-items: center; justify-content: center; gap: 6px; color: #5d7052; font-size: 12px; margin: 18px 0 0; }
.upload-privacy .icon { width: 13px; height: 13px; }
.how-it-works { padding: 23px; }
.how-it-works h2 { font-size: 13px; }
.steps { list-style: none; margin: 24px 0 0; padding: 0; }
.steps li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 23px; }
.steps li:last-child { margin-bottom: 0; }
.step-num { display: grid; place-items: center; width: 25px; height: 25px; flex: none; border: 1px solid #dce5d5; background: #f4f7ef; border-radius: 50%; color: #5a7048; font-size: 12px; }
.steps b { font-size: 13px; font-weight: 550; display: block; }
.steps p { margin: 4px 0 0; font-size: 12px; color: #5d7250; line-height: 1.8; }
.progress { height: 6px; background: var(--panel2); border-radius: 99px; overflow: hidden; margin: 20px 0 6px; }
.progress div { height: 100%; background: var(--accent); width: 0; transition: width .6s; }
.alert { padding: 13px 16px; border-radius: 8px; margin-top: 15px; font-size: 14px; overflow-wrap: anywhere; }
.alert.ok { color: #356848; background: #edf5e9; border: 1px solid #d4e5ca; }
.alert.warn { color: #896c28; background: #fcf7e8; border: 1px solid #f0e3bc; }
.alert.err { color: #a24d45; background: #fcf0ed; border: 1px solid #f1d9d2; }
#status .row { font-size: 13px; color: var(--muted); }
#status .box > b { font-size: 14px; overflow-wrap: anywhere; }
#status .box > p { font-size: 14px; }
details { margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 12px 16px; }
summary { cursor: pointer; font-weight: 500; font-size: 14px; }
.transcript { white-space: pre-wrap; max-height: 300px; overflow: auto; margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.transcript-panel { padding: 0; overflow: hidden; }
.transcript-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; list-style: none; }
.transcript-panel summary::-webkit-details-marker { display: none; }
.transcript-panel summary > span { display: flex; align-items: center; gap: 9px; }
.transcript-panel summary .icon { width: 17px; height: 17px; color: var(--accent); }
.transcript-panel summary::after { content: ""; width: 7px; height: 7px; margin-right: 3px; flex: none; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform .18s; }
.transcript-panel summary:hover { background: #f7f9f4; }
.transcript-panel summary:focus-visible { outline-offset: -4px; border-radius: 9px; }
.transcript-panel[open] summary { border-bottom: 1px solid var(--line); }
.transcript-panel[open] summary::after { transform: rotate(225deg); }
.transcript-panel .transcript { margin: 0; padding: 16px 18px; overflow-wrap: anywhere; scrollbar-gutter: stable; overscroll-behavior: contain; }
.transcript-panel .transcript:focus-visible { outline-offset: -4px; }
/* Conversations */
.chat-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 24px; }
.chat-top > .icon { margin: 0 5px; color: #8a9b7f; width: 18px; height: 18px; }
.chat-top select { flex: 1 1 180px; min-width: 0; border-color: transparent; background: #f7f9f4; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.ghost.danger { color: #a3463f; border-color: #ebd5cf; }
.btn.ghost.danger:hover:not(:disabled) { color: #8d3932; background: #fcf0ed; border-color: #d9aba2; }
.confirm-dialog { width: min(440px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 80px #16332930; }
.confirm-dialog::backdrop { background: #18372c65; backdrop-filter: blur(4px); }
.confirm-dialog[open] { animation: dialog-enter .18s ease-out; }
.dialog-content { position: relative; padding: 28px 28px 24px; }
.dialog-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 20px; border: 1px solid #efd9d3; border-radius: 13px; color: #a3463f; background: #fcf0ed; }
.dialog-icon .icon { width: 22px; height: 22px; }
.dialog-close { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 7px; }
.dialog-close:hover { color: var(--text); background: var(--panel2); }
.dialog-close .icon { width: 18px; height: 18px; }
.confirm-dialog h2 { font-size: 22px; font-weight: 600; letter-spacing: -.6px; line-height: 1.3; margin: 0 0 10px; }
#delete-chat-description, #delete-recording-description { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.dialog-conversation { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-top: 20px; background: #f7f9f4; border: 1px solid var(--line); border-radius: 8px; }
.dialog-conversation .icon { width: 17px; height: 17px; color: #6e8569; }
.dialog-conversation span { min-width: 0; max-height: 95px; overflow-y: auto; overflow-wrap: anywhere; color: #52654c; font-size: 12px; line-height: 1.7; }
.dialog-note { display: flex; align-items: flex-start; gap: 7px; margin: 14px 0 0; color: var(--accent); font-size: 11px; line-height: 1.7; }
.dialog-note .icon { width: 14px; height: 14px; margin-top: 2px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 18px 28px; border-top: 1px solid var(--line); background: #fafbf8; }
.btn.delete-confirm { color: #fff; background: #a3463f; border-color: #a3463f; }
.btn.delete-confirm:hover:not(:disabled) { background: #8d3932; border-color: #8d3932; box-shadow: 0 3px 9px #a3463f20; }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.chip:disabled { opacity: .5; cursor: not-allowed; }
.prompt-heading { font-size: 12px; color: #617450; margin: 0 0 10px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 25px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e1e7db; color: #66775b; border-radius: 7px; padding: 8px 11px; font-size: 12px; text-align: left; }
.chip .icon { width: 12px; height: 12px; color: #92a183; }
.chip:hover { border-color: #a9c29d; background: #f1f6ec; }
#view[data-view=chat] { padding-bottom: 145px; }
#messages { display: flex; flex-direction: column; gap: 20px; }
#messages > .empty { padding: 48px 20px; }
#messages .empty-icon { width: 57px; height: 57px; border-radius: 18px; background: #eaf0e2; margin-bottom: 18px; }
#messages .empty-icon .icon { width: 29px; height: 29px; }
#messages .empty b { font-size: 20px; font-weight: 500; letter-spacing: -.5px; }
#messages .empty p { font-size: 13px; max-width: 310px; margin: 9px auto; }
.msg { max-width: 86%; padding: 18px 20px; border-radius: 13px; font-size: 13px; line-height: 1.85; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 3px; box-shadow: var(--shadow); }
.msg p { margin: 0 0 9px; }
.msg p:last-child { margin: 0; }
.msg ul { margin: 6px 0 10px; padding-left: 20px; }
.cite { color: var(--accent2); font-weight: 650; }
.sources { margin-top: 14px; font-size: 13px; }
.sources details { margin: 0; padding: 8px 11px; background: #f7f9f3; }
.sources summary { color: var(--accent); font-size: 12px; }
.src { padding: 10px 0; border-top: 1px solid var(--line); }
.src:first-of-type { margin-top: 10px; }
.src q { display: block; color: var(--muted); font-style: italic; margin-top: 4px; }
.thinking { color: var(--muted); }
.thinking::after { content: ""; animation: dots 1.2s infinite; }
@keyframes dots { 0% { content: "."; } 33% { content: ".."; } 66% { content: "..."; } }
.composer { position: fixed; bottom: 0; left: var(--sidebar-width); right: 0; padding: 24px 40px 18px; z-index: 4; background: linear-gradient(transparent, var(--bg) 28%); }
.composer-inner { max-width: 1360px; margin: 0 auto; }
.composer form { display: flex; align-items: flex-end; gap: 10px; background: #fff; padding: 10px; border: 1px solid #d7e2ce; border-radius: 12px; box-shadow: 0 3px 20px #364b1c08; }
.composer textarea { flex: 1; min-width: 0; resize: vertical; height: 42px; min-height: 42px; max-height: 150px; border: 0; padding: 11px 10px; background: transparent; font-size: 14px; }
.composer textarea::placeholder { color: #78876b; }
.composer textarea:focus { outline: none; }
.composer form:focus-within { border-color: #74a163; box-shadow: 0 0 0 3px #74a16312; }
.composer .btn { min-height: 42px; }
.composer-hint { font-size: 11px; color: #5d7150; text-align: center; margin: 8px 0 0; }
#toast { position: fixed; bottom: 24px; right: 24px; max-width: min(420px, calc(100vw - 32px)); background: #fff; color: var(--bad); border: 1px solid #ebd5cf; border-left: 3px solid var(--bad); box-shadow: 0 8px 35px #2d351b15; border-radius: 9px; padding: 14px 18px; z-index: 10; font-size: 14px; overflow-wrap: anywhere; }
@media (min-width: 1700px) { main { padding-top: 45px; } .welcome-banner { padding: 29px 32px; } }
@media (max-width: 1250px) {
  :root { --sidebar-width: 238px; }
  #sidebar { padding-right: 15px; padding-left: 15px; }
  main { padding: 30px 28px; }
  .workspace-bar, .workspace-footer { padding-right: 28px; padding-left: 28px; }
  .composer { padding-right: 28px; padding-left: 28px; }
  .cards { gap: 10px; }
  .card { padding: 15px 12px; }
  .card-top { gap: 3px; }
  .card-label { font-size: 11px; }
  .models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; }
  .upload-panel { padding: 20px; }
}
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card > b { font-size: 26px; }
  .card-top { margin-bottom: 10px; }
  .feed-layout { grid-template-columns: 1fr; }
  .steps { display: flex; gap: 20px; margin-top: 18px; }
  .steps li { flex: 1; margin: 0; }
  .memory-art { width: 150px; }
  .welcome-banner { padding: 22px; }
  .welcome-banner h2 { font-size: 19px; }
  .page-heading { align-items: flex-start; }
  .page-heading > .btn { margin-top: 16px; }
  .workspace-footer > span:last-child { display: none; }
}
@media (max-width: 760px) {
  body { flex-direction: column; }
  #sidebar { position: static; width: 100%; height: auto; padding: 19px 20px 0; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .brand { padding: 0; margin-bottom: 20px; grid-column: 1 / -1; font-size: 20px; }
  .brand-mark { width: 37px; height: 39px; border-radius: 11px; }
  .brand small { font-size: 12px; }
  .nav-label { display: none; }
  nav { grid-column: 1 / -1; flex-direction: row; gap: 6px; margin-bottom: 18px; }
  nav button { flex: 1; justify-content: center; gap: 7px; padding: 11px 7px; font-size: 13px; }
  nav button .icon { width: 15px; height: 15px; }
  .nav-indicator { display: none !important; }
  .panel { padding: 13px; margin-bottom: 17px; }
  .panel h3 { font-size: 12px; }
  .panel .hint { font-size: 10px; }
  .panel .token-label { font-size: 9px; }
  .panel .mini-label { display: none; }
  .panel .stat span { font-size: 10px; }
  .panel .stat b { font-size: 19px; }
  .brain-status .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .brain-status { grid-column: 1; }
  .brain-status .hint { margin-bottom: 10px; }
  .audio-stat { margin-top: 10px; padding-top: 9px; flex-wrap: wrap; font-size: 10px; }
  .audio-stat b { font-size: 11px; }
  .audio-stat b { margin-left: 3px; }
  .chat-memory { grid-column: 2; }
  .chat-memory .hint { margin-bottom: 9px; }
  .chat-memory .meter { margin-top: 7px; }
  .chat-memory .token-label { margin-bottom: 0; }
  .sidebar-footer { display: none; }
  .workspace-bar { min-height: 56px; padding: 0 22px; }
  main { padding: 26px 22px; }
  .page-heading { margin-bottom: 22px; gap: 12px; }
  h1 { font-size: 28px; }
  .sub { font-size: 13px; }
  .page-heading > .btn { padding: 9px 12px; font-size: 12px; }
  .welcome-banner { padding: 22px; }
  .memory-art { width: 120px; height: 110px; }
  .workspace-footer { padding: 17px 22px; }
  .composer { left: 0; padding: 20px 22px 12px; }
  .msg { max-width: 93%; }
}
@media (max-width: 460px) {
  #sidebar { padding-right: 16px; padding-left: 16px; }
  nav { gap: 3px; }
  nav button { font-size: 11px; padding: 10px 4px; gap: 5px; }
  main { padding: 24px 16px; }
  .workspace-bar { padding: 0 16px; }
  .local-pill { font-size: 11px; padding: 4px 7px; }
  .breadcrumb { font-size: 12px; gap: 8px; }
  .page-heading { flex-wrap: wrap; }
  .page-heading > .btn { margin: 0; }
  .welcome-banner { padding: 20px; }
  .memory-art { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card:last-child { grid-column: 1 / -1; }
  .card { padding: 17px; }
  .card > b { font-size: 25px; }
  .card-label { font-size: 12px; }
  .models { grid-template-columns: 1fr; }
  .model-card { padding: 14px 16px; }
  .section-heading { margin-top: 25px; }
  .section-note { font-size: 11px; }
  .memory-list { padding: 0 15px; }
  .steps { flex-direction: column; gap: 19px; }
  .drop { min-height: 240px; }
  .upload-panel { padding: 17px; }
  .upload-actions { align-items: stretch; flex-direction: column; gap: 16px; }
  .upload-actions > .btn { align-self: stretch; }
  .chat-top { padding: 11px; gap: 7px; }
  .chat-top > .icon { display: none; }
  .chat-top .btn { padding: 9px; font-size: 12px; }
  .chat-top select { flex-basis: 100%; font-size: 12px; padding-right: 3px; }
  .chat-actions { width: 100%; justify-content: flex-end; }
  .dialog-content { padding: 24px 20px 20px; }
  .dialog-actions { padding: 16px 20px; }
  .dialog-actions .btn { flex: 1; }
  .composer { padding-right: 12px; padding-left: 12px; }
  .composer textarea { font-size: 13px; padding-left: 6px; }
  .composer .btn { padding: 9px 12px; }
  .composer-hint { font-size: 10px; }
  .msg { padding: 14px; font-size: 14px; }
  #messages .empty b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Sign in */
body.login-page { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 32px 24px; min-height: 100dvh; background: radial-gradient(ellipse at 0% 0%, #e1eadf, transparent 50%), #f3f5f1; }
.login-shell { padding: 0; margin: 0; flex: none; width: 100%; max-width: 1060px; display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden; border: 1px solid #dce3da; border-radius: 24px; background: var(--panel); box-shadow: 0 24px 80px #243b3210; }
.login-story { position: relative; overflow: hidden; padding: 40px 44px 28px; color: #f6f8ed; background: radial-gradient(ellipse at 80% 90%, #315c49, transparent 60%), #193e32; }
.login-brand { font-size: 28px; font-weight: 700; letter-spacing: -1px; line-height: 1.2; }
.login-brand span { display: block; margin-top: 7px; font-size: 10px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: #b7cbbb; }
.login-story-copy { margin-top: 65px; position: relative; z-index: 1; }
.login-kicker { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: #c0d1be; }
.login-story h2 { margin: 20px 0; color: #f6f8ed; font-size: clamp(32px, 3.3vw, 46px); line-height: 1.14; letter-spacing: -1.7px; font-weight: 500; }
.login-story h2 em { color: #c9dca5; font-family: Georgia, serif; font-weight: 400; }
.login-story-copy > p:last-child { max-width: 300px; color: #bed0c3; line-height: 1.8; font-size: 13px; }
.login-network { display: block; width: 100%; height: 170px; margin-top: 8px; overflow: visible; }
.login-network ellipse, .login-network path { stroke: #c9dca5; stroke-opacity: .2; stroke-width: 1; }
.login-network circle { fill: #c9dca5; }
.login-network .network-halo { fill: #c9dca5; fill-opacity: .08; stroke: #c9dca5; stroke-opacity: .3; }
.login-story-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid #ffffff20; color: #b7cbbb; font-size: 10px; letter-spacing: .8px; }
.login-card { min-width: 0; align-self: center; padding: 56px 48px; }
.login-card .eyebrow { font-size: 10px; letter-spacing: 1.5px; }
.login-card h1 { margin: 12px 0; font-size: 34px; letter-spacing: -1.2px; }
.login-card .sub { margin: 0 0 32px; font-size: 13px; line-height: 1.8; }
.login-card label { display: block; margin: 20px 0 8px; font-size: 12px; font-weight: 600; }
.login-card input { width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid #dce3da; border-radius: 9px; background: #fafbf9; color: var(--text); font-size: 16px; }
.login-card input::placeholder { color: #88948b; font-size: 13px; }
.password-field { display: flex; border: 1px solid #dce3da; border-radius: 9px; background: #fafbf9; }
.password-field input { border: 0; background: transparent; }
.password-field button { border: 0; background: transparent; color: var(--accent); padding: 0 14px; font-size: 12px; font-weight: 600; }
.login-card #sign-in { width: 100%; justify-content: center; margin-top: 28px; min-height: 48px; border-radius: 9px; }
.login-card #login-error { margin: 16px 0 0; }
.login-footer { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 30px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.login-footer svg { width: 15px; height: 15px; flex: none; }
.login-site-footer { display: flex; justify-content: space-between; gap: 12px; width: 100%; max-width: 1060px; padding: 22px 4px 0; font-size: 11px; color: var(--muted); }
@media(max-width: 760px) {
  body.login-page { padding: 20px 16px; }
  .login-shell { max-width: 480px; grid-template-columns: 1fr; border-radius: 20px; }
  .login-story { padding: 26px 28px; }
  .login-brand { font-size: 25px; }
  .login-story-copy { margin-top: 26px; }
  .login-kicker, .login-network, .login-story-footer, .login-story-copy > p:last-child { display: none; }
  .login-story h2 { margin: 0; font-size: 30px; letter-spacing: -1px; }
  .login-story h2 br { display: none; }
  .login-story h2 em { display: block; margin-top: 3px; }
  .login-card { padding: 32px 28px; }
  .login-card h1 { font-size: 29px; }
  .login-site-footer { max-width: 480px; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
}
@media(max-width: 360px) {
  .login-story, .login-card { padding-left: 22px; padding-right: 22px; }
  .login-story h2 { font-size: 26px; }
  .login-footer { font-size: 9px; }
}
