/* Mucurabwenge interface. Tokens match tailwind.config.js. */
:root {
  --muc-terracotta: #B0613E;
  --muc-terracotta-deep: #8C4A32;
  --muc-cream: #FBF7F2;
  --muc-charcoal: #24211F;
  --muc-sand: #EAD9CB;
  --ink: var(--muc-charcoal);
  --muted: #5c564f;
  --primary: var(--muc-terracotta-deep);
  --primary-dark: #6e3a26;
  --cream: var(--muc-cream);
  --line: #e4d8cc;
  --surface: #fff;
  --sidebar: #f6efe8;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(36, 33, 31, .06);
  --focus: 2px solid var(--muc-terracotta-deep);
}
.generation-state{margin:8px 0 0;color:#a66b4c;font-size:11px;font-weight:700}
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
:focus-visible { outline: var(--focus); outline-offset: 2px; }
.skip-link { position: absolute; left: 12px; top: -40px; background: var(--ink); color: white; padding: 8px 12px; z-index: 20; }
.skip-link:focus { top: 12px; }
.site-header { height: auto; min-height: 64px; position: sticky; top: 0; background: color-mix(in srgb, var(--cream) 92%, white); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); z-index: 30; }
.site-nav { min-height: 64px; gap: 16px; min-width: 0; }
.site-nav .brand { min-width: 0; }
.desktop-nav { gap: 18px; }
.nav-dropdown { position: relative; }
.nav-dropdown summary { display: inline-flex; align-items: center; gap: 5px; list-style: none; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary svg { width: 14px; height: 14px; }
.nav-dropdown-menu { position: absolute; top: calc(100% + 12px); left: -12px; min-width: 210px; padding: 8px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.nav-dropdown-menu a, .nav-dropdown-disabled { display: block; padding: 9px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.nav-dropdown-menu a:hover { background: var(--warm); }
.nav-dropdown-disabled { color: var(--muted); opacity: .65; cursor: default; }
.desktop-nav a[aria-current="page"] { color: var(--primary); }
.nav-actions { gap: 10px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang-switch button { border: 0; background: transparent; min-width: 40px; min-height: 36px; padding: 0 8px; color: var(--muted); font-weight: 700; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: white; }
.mobile-nav { border-top: 1px solid var(--line); background: var(--cream); }
.mobile-nav nav { display: grid; padding: 8px 18px 16px; }
.mobile-nav a { padding: 12px 4px; font-weight: 700; border-bottom: 1px solid var(--line); }
.mobile-nav-dropdown { padding: 0 4px; }
.mobile-nav-dropdown summary { padding: 12px 0; font-weight: 700; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.mobile-nav-dropdown .nav-dropdown-menu { position: static; min-width: 0; padding: 4px 0 4px 12px; border: 0; box-shadow: none; background: transparent; }
.mobile-nav-dropdown .nav-dropdown-menu a, .mobile-nav-dropdown .nav-dropdown-disabled { border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 4px; }
.btn { border-radius: 10px; min-height: 44px; transform: none; }
.btn:hover { transform: none; }
.btn-primary { background: var(--primary); box-shadow: none; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: var(--surface); }
.btn-secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 28px; align-items: end; padding: 28px 0 8px; }
.home-copy h1 { font-size: clamp(34px, 4vw, 52px); letter-spacing: -.04em; max-width: 16ch; }
.lede { margin-top: 12px; color: var(--muted); max-width: 46ch; }
.lede-quiet { margin-top: 6px; }
.ask-card, .prose-card, .action-card, .dash-card, .person-card, .service-card, .book-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ask-card { padding: 16px; }
.ask-card h2 { font-size: 20px; }
.ask-card textarea, .form-fields input, .form-fields select, .form-fields textarea, .history-search, #historySearch, .searchbar input, .searchbar select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; min-height: 44px; padding: 10px 12px; background: var(--surface); color: var(--ink);
}
.ask-card textarea { margin-top: 8px; resize: vertical; background: #f7f1eb; }
.ask-card textarea:disabled { opacity: 1; color: var(--muted); }
.ask-note, .callout { margin: 10px 0; padding: 10px 12px; background: #f6ebe4; border-radius: 10px; color: var(--ink); font-size: 14px; }
.task-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding-bottom: 18px; }
.task-chip, .task-pills a { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-height: 44px; }
.task-chip small, .meta-line, .quiet-count { display: block; color: var(--muted); font-size: 13px; font-weight: 500; }
.task-chip strong { display: block; }
.task-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.task-pills a { align-items: center; font-weight: 700; font-size: 14px; }
.task-pills a[aria-current="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.band, .split { padding: 28px 0; }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 16px; }
.section-head h2, .split h2, .page-hero h1, .detail-hero h1 { font-size: clamp(28px, 3vw, 40px); }
.section-head p, .page-hero p, .split p { color: var(--muted); max-width: 62ch; }
.tabs { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.tablist { display: grid; align-content: start; gap: 6px; }
.tablist button { text-align: left; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 10px 12px; min-height: 44px; font-weight: 700; }
.tablist button[aria-selected="true"] { background: var(--surface); border-color: var(--line); }
.tabpanel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.tabpanel p { margin-bottom: 14px; }
.service-grid, .book-grid, .people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.service-card, .book-card, .person-card { padding: 16px; min-height: 180px; }
.service-card h2, .book-card h2, .person-card h2 { font-size: 20px; margin: 8px 0; }
.service-card p, .book-body p { color: var(--muted); font-size: 14px; }
.service-icon, .avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #f3e4da; color: var(--primary); }
.service-kicker, .eyebrow { color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; padding: 0; list-style: none; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 700; background: var(--sand); color: var(--ink); }
.badge-ok { background: #e5f0e6; color: #1f5134; }
.badge-warn { background: #f8e7c8; color: #6a4b12; }
.badge-muted { background: #f1ece7; color: #5c564f; }
.pattern-panel { min-height: 180px; border-radius: var(--radius); background: var(--muc-sand) url("../Mucurabwenge_Brand_Kit/patterns/weave-light.0bda9dfaad94.svg") center/180px repeat; }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: center; }
.philosophy { grid-template-columns: 1fr 1fr; align-items: start; }
.page-hero { margin-bottom: 18px; }
.page-hero.compact h1, .detail-hero h1 { font-size: clamp(32px, 4vw, 48px); }
.searchbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.searchbar input { flex: 1 1 220px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, .7fr); gap: 16px; margin: 16px 0 28px; }
.prose-card, .action-card { padding: 18px; }
.prose-card h2, .action-card h2 { font-size: 20px; margin: 16px 0 8px; }
.prose-card ol, .chapter-list { margin: 0; padding-left: 18px; }
.chapter-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.meta-grid, .meta-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.meta-list { grid-template-columns: 1fr; }
.meta-grid div, .meta-list div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.meta-grid dt, .meta-list dt { color: var(--muted); font-size: 12px; }
.book-card { display: grid; grid-template-columns: 74px 1fr; overflow: hidden; padding: 0; }
.book-spine { display: flex; align-items: flex-end; padding: 12px; color: white; background: var(--primary) url("../Mucurabwenge_Brand_Kit/patterns/weave-dark.7c90db671dbb.svg") center/80px repeat; }
.book-body { padding: 14px; display: grid; align-content: start; gap: 4px; }
.empty-state { grid-column: 1 / -1; padding: 28px 18px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface) url("../Mucurabwenge_Brand_Kit/patterns/diamond-grid.347ed06b97df.svg") right top/160px no-repeat; }
.empty-state h2, .empty-state h3 { font-size: 24px; }
.person-card .role-line { color: var(--primary); font-weight: 700; }
.toast-stack { position: fixed; top: 16px; right: 16px; z-index: 80; display: grid; gap: 8px; width: min(360px, calc(100% - 24px)); }
.toast { position: relative; padding: 12px 36px 12px 12px; border-radius: 10px; background: #e7f3e8; color: #1d4d32; border: 1px solid #b7d8bc; }
.toast.error { background: #fdecea; color: #7a2e24; border-color: #f0c2bc; }
.toast button { position: absolute; right: 6px; top: 4px; border: 0; background: transparent; font-size: 20px; color: inherit; }
.auth-content { min-height: 100vh; }
.choice-set { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; margin: 0; }
.choice-set legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 8px; }
.choice span { min-width: 0; }
.choice strong, .choice small { display: block; }
.choice small { color: var(--muted); font-weight: 500; }
.form-fields .choice input[type="radio"],
.form-fields input[type="radio"],
.form-fields input[type="checkbox"] {
  width: 1.125rem; height: 1.125rem; min-height: 1.125rem; max-width: 1.125rem;
  padding: 0; margin: 0.2rem 0 0; flex: 0 0 auto; accent-color: var(--muc-terracotta-deep);
  box-shadow: none; border-radius: 50%;
}
.field-error, .form-alert { color: #7a2e24; font-weight: 650; }
.form-alert { background: #fdecea; border: 1px solid #f0c2bc; border-radius: 10px; padding: 10px 12px; }
.progress { margin-top: 8px; border-radius: 10px; background: var(--sand); color: var(--ink); padding: 10px 12px; font-size: 14px; font-weight: 650; }
.table-overflow { overflow-x: auto; }
.org-shell, .dashboard-shell { background: #f7f4f0; }
.org-shell { display: flex; min-height: 100vh; }
.org-sidebar .brand-lockup-light, .dashboard-page .dashboard-sidebar .brand-lockup-light { display: none; }
.org-sidebar .brand-lockup-dark, .dashboard-page .dashboard-sidebar .brand-lockup-dark { display: block; }
.org-sidebar { width: 230px; flex: none; background: var(--ink); color: #f6efe8; padding: 18px 12px; }
.org-sidebar a { color: #f6efe8; }
.org-sidebar .admin-links { display: grid; gap: 2px; }
.org-sidebar .admin-links a { padding: 8px 10px; border-radius: 8px; font-size: 14px; font-weight: 650; }
.org-sidebar .admin-links a:hover, .dashboard-sidebar .admin-links a.current { background: rgba(255,255,255,.08); }
.org-main { flex: 1; min-width: 0; }
.dashboard-page .dashboard-sidebar { background: var(--ink); color: #f6efe8; }
.dashboard-page .dashboard-sidebar a, .dashboard-page .admin-label, .dashboard-page .dashboard-side-footer, .dashboard-page .dashboard-side-footer small { color: #f3e7df; }
.dashboard-page .dashboard-content { padding: 20px; }
.dashboard-page .dash-welcome h1, .dashboard-page .page-top-row h1 { font-size: 28px; }
.dashboard-page .stat-card { min-height: 0; padding: 14px; }
.dashboard-page .stats-grid { margin: 12px 0; }
.plain-list { padding-left: 18px; }
.citation-panel { position: fixed; inset: 0; background: rgba(36, 33, 31, .35); display: grid; justify-content: end; z-index: 40; }
.citation-panel[hidden] { display: none; }
.citation-card { width: min(380px, 100%); background: var(--surface); padding: 18px; overflow: auto; }
dialog { border: 0; border-radius: 14px; padding: 18px; width: min(420px, calc(100% - 24px)); }
dialog::backdrop { background: rgba(36, 33, 31, .35); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.workspace-shell { background: var(--cream); }
.workspace-sidebar { background: #f3ebe3; }
.history-search, #historySearch { margin: 0 8px 10px; width: calc(100% - 16px); }
label.history-search { width: auto; min-height: 0; margin: 4px 12px 6px; padding: 0; border: 0; background: transparent; border-radius: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.chat-header { background: var(--cream); }
.chat-title { font-size: 16px; }
.welcome-screen { text-align: left; margin: 24px auto; }
.welcome-mark { width: 48px; height: 48px; }
.welcome-screen h2 { font-size: clamp(28px, 4vw, 40px); }
.suggestions { grid-template-columns: 1fr 1fr; }
.suggestions button { min-height: 72px; flex-direction: row; align-items: center; gap: 10px; text-align: left; }
.message-block { max-width: 760px; }
.learning-note { margin: 0 0 8px; padding: 8px 10px; background: #f6ebe4; border-radius: 10px; font-size: 13px; }
.learning-controls, .message-followups { margin-top: 14px; padding-top: 10px; border-top: 1px solid color-mix(in srgb,var(--line) 65%,transparent); }
.learning-controls { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.learning-controls.inactive { opacity:.55; }
.learning-controls p, .message-followups p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.learning-controls p { flex-basis: 100%; }
.message-followup-list { display: flex; flex-wrap: wrap; gap: 8px; }
.message-followup-list button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 12px; text-align: left; }
.message-followup-list button:hover { border-color: var(--primary); color: var(--primary); }
.learning-controls.dismissed { display: none; }
.reader-dialog { width: min(900px, calc(100% - 28px)); max-width: 900px; padding: 0; border: 0; border-radius: 18px; overflow: hidden; }
.reader-shell { display: flex; flex-direction: column; max-height: min(88vh, 900px); }
.reader-header { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.reader-header h2 { font-size: clamp(20px, 3vw, 30px); }
.reader-header p { margin: 0; }
.reader-status { padding: 8px 24px 0; color: var(--muted); font-size: 13px; }
.reader-content { overflow: auto; padding: 18px 24px; background: var(--cream); min-height: 260px; }
.reader-passage { max-width: 720px; margin: 0 auto 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.reader-passage-meta { color: var(--primary); font-size: 12px; font-weight: 750; }
.reader-passage p:last-child { white-space: pre-wrap; line-height: 1.8; }
.reader-controls { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 24px 20px; border-top: 1px solid var(--line); }
.reader-controls button:disabled { opacity: .45; }
.gov-card, .referral-card { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffdfb; }
.gov-card h3, .referral-card h2 { font-size: 16px; margin: 4px 0; }
.followups { width: min(760px, 100%); margin: 0 auto 12px; }
.followups p span, .composer-disclaimer { color: var(--muted); }
#followupList { display: flex; flex-wrap: wrap; gap: 8px; }
#followupList button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 12px; text-align: left; }
.composer-toolbar { gap: 8px; }
.composer-actions { display: flex; gap: 8px; align-items: center; }
.feedback-row { display: flex; gap: 4px; margin-top: 8px; }
.response-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:12px; padding-top:10px; border-top:1px solid color-mix(in srgb,var(--line) 65%,transparent); }
.response-actions .icon-button { position:relative; width:auto; min-width:32px; height:32px; min-height:30px; padding:6px 9px; gap:6px; color:var(--muted); font-size:11px; }
.response-actions .icon-button svg { width:14px; height:14px; }
.response-actions .icon-button:hover, .response-actions .icon-button.is-copied { color:var(--primary); background:color-mix(in srgb,var(--primary) 10%,transparent); }
.response-actions .feedback-button { width:auto; padding:6px 9px; }
.response-actions .action-label { display:inline; white-space:nowrap; }
.response-actions .icon-button[data-tooltip]::after { content:attr(data-tooltip); position:absolute; left:50%; bottom:calc(100% + 7px); z-index:5; padding:5px 7px; border-radius:6px; background:var(--ink); color:var(--cream); font-size:10px; line-height:1; white-space:nowrap; opacity:0; pointer-events:none; transform:translate(-50%,3px); transition:opacity .15s,transform .15s; }
.response-actions .icon-button[data-tooltip]:hover::after, .response-actions .icon-button[data-tooltip]:focus-visible::after { opacity:1; transform:translate(-50%,0); }
.thinking-content { display:flex; align-items:center; gap:8px; min-height:26px; }
.thinking-content::after { content:'•••'; letter-spacing:3px; color:var(--primary); animation:thinkingDots 1.2s infinite ease-in-out; }
@keyframes thinkingDots { 0%,100% { opacity:.3; transform:translateY(0); } 50% { opacity:1; transform:translateY(-2px); } }
.message-body { white-space:normal; overflow-wrap:anywhere; line-height:1.8; }
.message-body > :first-child { margin-top:0; }
.message-body > :last-child { margin-bottom:0; }
.message-body h1, .message-body h2, .message-body h3, .message-body h4 { color:var(--ink); line-height:1.25; margin:1.25em 0 .55em; }
.message-body h1 { font-size:1.55em; }
.message-body h2 { font-size:1.35em; }
.message-body h3 { font-size:1.16em; }
.message-body h4 { font-size:1em; }
.message-body p, .message-body ul, .message-body ol, .message-body blockquote, .message-body table { margin:.75em 0; }
.message-body ul, .message-body ol { padding-left:1.45em; }
.message-body li { padding-left:.2em; margin:.25em 0; }
.message-body li input[type="checkbox"] { accent-color:var(--primary); margin-right:.45em; }
.message-body blockquote { border-left:3px solid var(--primary); padding:.2em 1em; color:var(--muted); background:color-mix(in srgb,var(--primary) 6%,transparent); border-radius:0 8px 8px 0; }
.message-body hr { border:0; border-top:1px solid var(--line); margin:1.4em 0; }
.message-body a { color:var(--primary); text-decoration:underline; text-underline-offset:2px; }
.message-body :not(pre) > code { padding:.15em .4em; border-radius:5px; color:var(--primary-dark); background:color-mix(in srgb,var(--primary) 10%,var(--surface)); font-size:.9em; }
.message-body .response-code-block { position:relative; overflow:auto; margin:1em 0; padding:0; border:1px solid var(--line); border-radius:10px; background:#f6f3ef; }
.message-body .response-code-block code { display:block; min-width:max-content; padding:38px 15px 15px; font:13px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace; color:#302923; }
.message-body .code-toolbar { position:absolute; inset:0 0 auto; z-index:1; display:flex; justify-content:space-between; align-items:center; height:32px; padding:0 9px; background:color-mix(in srgb,var(--primary) 8%,#f6f3ef); border-bottom:1px solid var(--line); }
.message-body .code-language { color:var(--muted); font:700 10px/1 system-ui,sans-serif; letter-spacing:.08em; text-transform:uppercase; }
.message-body .code-copy-button { border:1px solid var(--line); border-radius:5px; padding:4px 7px; color:var(--muted); background:var(--surface); font-size:10px; cursor:pointer; }
.message-body .code-copy-button:hover { color:var(--primary); border-color:var(--primary); }
.message-body .math-inline { display:inline-block; padding:0 .12em; }
.message-body .math-block { display:block; overflow:auto; margin:1em 0; padding:.5em; text-align:center; }
.is-regenerating .message-body { opacity:.55; }
[data-theme="dark"] .message-body .response-code-block { background:#211d1b; }
[data-theme="dark"] .message-body .response-code-block code { color:#f6efe8; }
[data-theme="dark"] .message-body .code-toolbar { background:#2b2522; }
[data-theme="dark"] .hljs { background:transparent; color:#f6efe8; }
@media (max-width:560px) { .response-actions { margin-top:9px; padding-top:6px; } .response-actions .icon-button { width:32px; padding:5px; } .response-actions .icon-button[data-tooltip]::after { display:none; } .message-body { line-height:1.72; } .message-body h1 { font-size:1.35em; } .message-body h2 { font-size:1.22em; } }
.icon-button[aria-pressed="true"] { color: var(--primary); }
.advanced-metadata { grid-column: 1/-1; border-top: 1px solid var(--line); padding-top: 15px; margin-top: 2px; }
.advanced-metadata summary { cursor: pointer; color: var(--primary); font-size: 12px; font-weight: 800; list-style: none; }
.advanced-metadata summary::-webkit-details-marker { display: none; }
.advanced-metadata summary::after { content: '+'; float: right; font-size: 18px; font-weight: 400; line-height: 12px; }
.advanced-metadata[open] summary::after { content: '−'; }
.advanced-metadata summary span { margin-left: 7px; color: var(--muted); font-size: 10px; font-weight: 500; }
.advanced-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-top: 16px; }
@media (max-width: 560px) { .advanced-fields { grid-template-columns: 1fr; } }
[data-theme="dark"] {
  --ink: #f6efe8; --muted: #d9cdc3; --cream: #241f1c; --surface: #312b27; --line: #4d4038; --sidebar: #2a2421;
}
[data-theme="dark"] .ask-card textarea, [data-theme="dark"] .service-card, [data-theme="dark"] .book-card, [data-theme="dark"] .tabpanel { background: var(--surface); color: var(--ink); }
@media (max-width: 1030px) {
  .home-hero, .tabs, .split, .philosophy, .detail-layout, .service-grid, .book-grid { grid-template-columns: 1fr 1fr; }
  .tabs { grid-template-columns: 1fr; }
  .task-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .home-hero, .service-grid, .book-grid, .people-grid, .split, .philosophy, .detail-layout, .meta-grid, .task-row { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .home-hero { padding-top: 12px; }
  .home-copy h1 { font-size: clamp(30px, 8vw, 42px); }
  .ask-card textarea { min-height: 72px; }
  .suggestions { grid-template-columns: 1fr; }
  .org-sidebar, .dashboard-sidebar { position: fixed; z-index: 60; }
  .chat-header { height: auto; min-height: 64px; flex-wrap: wrap; padding: 8px 12px; }
  .composer-container { width: calc(100% - 16px); }
  .public-page .nav-actions .btn-sm,
  .public-page .nav-actions .nav-text { display: none; }
  .public-page .brand-lockup { width: 128px; max-height: 34px; }
  .public-page .nav-actions { gap: 6px; }
  .public-page .lang-switch button { min-width: 36px; padding: 0 6px; }
  .public-page .site-header { height: auto; }
  .public-page .theme-toggle, .public-page .nav-toggle { width: 44px; height: 44px; }
  .auth-illustration { display: flex; min-height: 0; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; }
  .auth-quote { display: none; }
  .auth-content { min-height: 0; padding: 28px 18px 40px; }
  .auth-card h1 { font-size: 34px; }
}
@media (max-width: 420px) {
  .container-xl { width: calc(100% - 24px); }
  .nav-actions .btn-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.workspace-sidebar { min-height:0; padding:16px 10px 10px; gap:0; }
.workspace-sidebar .side-brand { display:flex; align-items:center; justify-content:space-between; padding:0 7px 14px; flex:none; }
.side-brand-actions { display:flex; align-items:center; gap:2px; }
.workspace-sidebar .sidebar-collapse { display:grid; }
.side-primary { padding:0 5px 10px; flex:none; }
.new-chat-button { min-height:40px; padding:9px 11px; }
.side-search { flex:none; padding:0 5px 12px; }
.history-search { display:block; position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.history-search-wrap { position:relative; }
.history-search-wrap > svg { position:absolute; left:10px; top:50%; width:15px; height:15px; color:var(--muted); transform:translateY(-50%); pointer-events:none; }
.history-search-wrap #historySearch { min-height:38px; padding:8px 10px 8px 32px; font-size:12px; }
.conversation-section { min-height:0; flex:1 1 auto; overflow-y:auto; overflow-x:hidden; margin:0; padding:2px 5px 8px; scrollbar-width:thin; }
.conversation-section #conversationList { min-height:0; }
.side-caption { display:flex; align-items:center; justify-content:space-between; margin:0 8px 8px; padding-top:2px; }
.conversation-count { min-width:20px; padding:2px 6px; border-radius:999px; background:var(--sand); color:var(--muted); text-align:center; font-size:10px; letter-spacing:0; }
.conversation-group { margin:0 0 13px; }
.conversation-group h2 { margin:0 9px 4px; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.history-row { min-width:0; padding:8px 9px; gap:9px; font-size:12px; }
.history-row span { min-width:0; display:block; }
.side-empty { padding:12px 9px; }
.explore-section { flex:none; margin:5px 5px 7px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.explore-section summary { display:flex; align-items:center; gap:9px; min-height:38px; padding:5px 7px; color:var(--muted); cursor:pointer; list-style:none; font-size:12px; font-weight:750; }
.explore-section summary::-webkit-details-marker { display:none; }
.explore-section summary > svg:first-child { width:15px; height:15px; }
.explore-chevron { width:14px; height:14px; margin-left:auto; transition:transform .15s; }
.explore-section[open] .explore-chevron { transform:rotate(180deg); }
.explore-section .side-menu { padding:0 0 5px; gap:1px; }
.explore-section .side-link, .account-menu .side-link { min-height:34px; padding:7px 9px; gap:9px; font-size:11px; }
.explore-section .side-link svg, .account-menu .side-link svg { width:15px; height:15px; }
.side-bottom { flex:none; padding:0 5px; }
.account-menu { position:relative; }
.account-menu > summary { list-style:none; cursor:pointer; }
.account-menu > summary::-webkit-details-marker { display:none; }
.account-panel { min-width:0; padding:8px 5px 3px; border-top:0; }
.account-summary { min-width:0; flex:1; }
.account-summary strong, .account-summary small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-summary small { display:block; color:var(--muted); font-size:10px; }
.account-chevron { width:14px; height:14px; color:var(--muted); transition:transform .15s; }
.account-menu[open] .account-chevron { transform:rotate(180deg); }
.account-menu-items { margin:2px 0 5px; padding:4px; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:var(--shadow); }
.account-menu-items form { margin:0; }
.account-menu-items .side-link { width:100%; border:0; background:transparent; color:var(--muted); text-align:left; }
.account-menu-items .side-link:hover { background:var(--cream); color:var(--primary); }
.workspace-shell.sidebar-collapsed .workspace-sidebar { width:72px; min-width:72px; padding-left:8px; padding-right:8px; }
.workspace-shell.sidebar-collapsed .workspace-sidebar .brand-lockup,
.workspace-shell.sidebar-collapsed .new-chat-button span,
.workspace-shell.sidebar-collapsed .history-search-wrap input,
.workspace-shell.sidebar-collapsed .side-caption span:first-child,
.workspace-shell.sidebar-collapsed .conversation-group,
.workspace-shell.sidebar-collapsed .explore-section span,
.workspace-shell.sidebar-collapsed .account-summary,
.workspace-shell.sidebar-collapsed .account-chevron { display:none; }
.workspace-shell.sidebar-collapsed .workspace-sidebar .side-brand .brand { display:block; width:30px; height:30px; background:url("../Mucurabwenge_Brand_Kit/logo/emblem-terracotta.996db3e53366.svg") center/contain no-repeat; }
.workspace-shell.sidebar-collapsed .side-brand { justify-content:center; }
.workspace-shell.sidebar-collapsed .new-chat-button { justify-content:center; }
.workspace-shell.sidebar-collapsed .history-search-wrap > svg { left:50%; transform:translate(-50%,-50%); }
.workspace-shell.sidebar-collapsed .side-caption { justify-content:center; }
.workspace-shell.sidebar-collapsed .explore-section summary { justify-content:center; }
.workspace-shell.sidebar-collapsed .account-panel { justify-content:center; }
.workspace-shell.sidebar-collapsed .account-panel .account-chevron { display:none; }
@media (max-width:780px) {
  .workspace-sidebar { width:280px; min-width:280px; padding:16px 10px 10px; }
  .workspace-sidebar .sidebar-collapse { display:none; }
  .workspace-shell.sidebar-collapsed .workspace-sidebar { width:280px; min-width:280px; }
  .workspace-shell.sidebar-collapsed .workspace-sidebar .brand-lockup,
  .workspace-shell.sidebar-collapsed .new-chat-button span,
  .workspace-shell.sidebar-collapsed .history-search-wrap input,
  .workspace-shell.sidebar-collapsed .side-caption span:first-child,
  .workspace-shell.sidebar-collapsed .conversation-group,
  .workspace-shell.sidebar-collapsed .explore-section span,
  .workspace-shell.sidebar-collapsed .account-summary { display:block; }
}

/* Focused new-chat entry state: compact prompts keep the composer close to
   the welcome message without turning the empty state into a card wall. */
.welcome-screen { margin-top:12px; margin-bottom:8px; }
.welcome-screen h2 { margin-bottom:8px; }
.welcome-screen > p { max-width:560px; }
.suggestions { grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin-top:24px; }
.suggestions button, .suggestions .suggestion-card { min-height:104px; padding:12px; border-radius:11px; }
.suggestions button > span:nth-child(2), .suggestions .suggestion-card > span { margin:8px 0 3px; font-size:11px; }
.suggestions button small, .suggestions .suggestion-card small { display:block; color:var(--muted); font-size:10px; line-height:1.4; }
.suggestions button:focus-visible, .suggestions .suggestion-card:focus-visible { outline:3px solid color-mix(in srgb,var(--primary) 32%,transparent); outline-offset:2px; }
.suggestions .suggestion-card { position:relative; display:flex; flex-direction:column; align-items:flex-start; color:inherit; text-decoration:none; background:var(--surface); border:1px solid var(--line); transition:border-color .2s,transform .2s; }
.suggestions .suggestion-card:hover { border-color:#d6b39d; transform:translateY(-2px); }
.suggestion-arrow { position:absolute; right:11px; bottom:11px; width:14px; height:14px; color:var(--primary); }
.composer-container { margin-top:0; }
.cardership-coming-soon { padding-top:clamp(55px,10vh,110px); padding-bottom:clamp(70px,12vh,140px); }
.cardership-coming-soon > img { margin-bottom:18px; }
.cardership-coming-soon .lead { max-width:620px; font-size:18px; line-height:1.7; }
.cardership-library { padding-top:clamp(45px,8vh,90px); padding-bottom:90px; }
.course-library-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:34px; }
.course-card { padding:22px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.course-card-top { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.course-card h2 { margin:12px 0 8px; font-size:22px; }
.course-card h2 a:hover { color:var(--primary); }
.course-card > p { color:var(--muted); line-height:1.7; }
.course-status { color:var(--primary); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.course-material-note { margin-top:18px; padding:12px 14px; border-radius:10px; background:#f6ebe4; color:var(--ink); font-size:13px; }
.cardership-course-page { padding-top:clamp(45px,8vh,90px); padding-bottom:90px; }
.cardership-course-page > .lead { max-width:720px; font-size:18px; line-height:1.75; }
.course-section { margin-top:32px; }
.course-section h2 { margin-bottom:14px; }
.course-lesson-list, .course-material-list { padding-left:22px; }
.course-lesson-list li, .course-material-list li { margin-bottom:14px; }
.course-lesson-list a { font-weight:750; color:var(--primary); }
.course-lesson-list p, .course-material-list p { color:var(--muted); margin:4px 0 8px; }
.course-material-list .btn { margin-left:10px; }
.course-lesson-body { line-height:1.85; }
@media (max-width:700px) { .course-library-grid { grid-template-columns:1fr; } .course-material-list .btn { display:block; width:max-content; margin:8px 0 0; } }
@media (max-width:1050px) {
  .suggestions { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:780px) {
  .suggestions { grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:20px; }
  .suggestions button, .suggestions .suggestion-card { min-height:94px; }
}
@media (max-width:510px) {
  .welcome-screen { margin-top:14px; }
  .suggestions { grid-template-columns:1fr; gap:7px; }
  .suggestions button, .suggestions .suggestion-card { min-height:64px; flex-direction:row; align-items:center; gap:10px; }
  .suggestions button > span:nth-child(2), .suggestions .suggestion-card > span { margin:0; flex:0 0 auto; }
  .suggestions button small, .suggestions .suggestion-card small { flex:1; }
  .suggestion-arrow { position:static; }
}

/* New-chat hierarchy: history is the featured entry point, while the rest
   of the platform stays compact and evenly aligned below it. */
.history-feature { margin-top:16px; padding:16px; border:1px solid color-mix(in srgb,var(--primary) 24%,var(--line)); border-radius:16px; background:linear-gradient(135deg,#fffaf6,var(--surface)); }
.history-feature-heading { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; }
.history-feature-heading h3 { margin:4px 0 5px; font-size:20px; color:var(--ink); }
.history-feature-heading p { margin:0; color:var(--muted); font-size:12px; line-height:1.55; }
.history-feature-heading > svg { flex:none; width:24px; height:24px; color:var(--primary); }
.history-prompt-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:15px; }
.history-prompt-grid button, .history-more-list button { border:1px solid #eadbd0; background:rgba(255,255,255,.72); color:var(--ink); border-radius:10px; padding:11px; text-align:left; font-size:11px; line-height:1.45; min-height:58px; cursor:pointer; }
.history-prompt-grid button { display:flex; align-items:flex-start; gap:8px; }
.history-prompt-grid button svg { width:15px; height:15px; flex:none; color:var(--primary); margin-top:1px; }
.history-prompt-grid button:hover, .history-prompt-grid button:focus-visible, .history-more-list button:hover, .history-more-list button:focus-visible { border-color:var(--primary); outline:none; }
.history-more { margin-top:10px; }
.history-more summary { display:inline-flex; align-items:center; gap:6px; color:var(--primary); cursor:pointer; font-size:11px; font-weight:750; list-style:none; }
.history-more summary::-webkit-details-marker { display:none; }
.history-more summary svg { width:13px; height:13px; }
.history-more-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:9px; }
.secondary-suggestions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin-top:14px; }
.secondary-suggestions button { min-width:0; min-height:88px; padding:12px; border:1px solid var(--line); border-radius:11px; background:var(--surface); text-align:left; cursor:pointer; }
.secondary-suggestions button > svg { width:16px; height:16px; color:var(--primary); }
.secondary-suggestions button span { display:block; margin:8px 0 3px; color:var(--ink); font-size:11px; font-weight:800; }
.secondary-suggestions button small { display:block; color:var(--muted); font-size:10px; line-height:1.4; }
.secondary-suggestions button:hover, .secondary-suggestions button:focus-visible { border-color:#d6b39d; outline:3px solid color-mix(in srgb,var(--primary) 20%,transparent); outline-offset:1px; }
.history-feature button, .secondary-suggestions button { transition:border-color .2s, background .2s, transform .2s; }
.history-feature button:hover, .secondary-suggestions button:hover { background:#fffaf6; transform:translateY(-1px); }
@media (max-width:780px) {
  .history-prompt-grid, .history-more-list, .secondary-suggestions { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:510px) {
  .history-feature { padding:14px; margin-top:18px; }
  .history-prompt-grid, .history-more-list, .secondary-suggestions { grid-template-columns:1fr; }
  .history-prompt-grid button { min-height:48px; }
  .secondary-suggestions button { min-height:68px; display:grid; grid-template-columns:18px 1fr; column-gap:8px; align-items:start; }
  .secondary-suggestions button span, .secondary-suggestions button small { grid-column:2; }
  .secondary-suggestions button span { margin:0 0 2px; }
  .secondary-suggestions button small { grid-row:2; }
}

/* Product surface. The workspace and public catalogs share the terracotta
   system used on the homepage, instead of the earlier sage palette. */
.app-page { background: var(--cream); color: var(--ink); }
.workspace-shell { background: var(--cream); }
.workspace-sidebar {
  background: #f3ebe3;
  border-right: 1px solid #e4d5c8;
}
.workspace-sidebar .new-chat-button {
  justify-content: flex-start;
  background: var(--muc-terracotta-deep);
  color: #fff;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  font-weight: 700;
}
.workspace-sidebar .new-chat-button > span { margin-left: 0; }
.workspace-sidebar .new-chat-button svg { color: #fff; }
.workspace-sidebar .new-chat-button:hover { background: #6e3a26; }
.history-search-wrap #historySearch,
.workspace-sidebar #historySearch {
  background: #fff;
  border: 1px solid #e4d5c8;
  border-radius: 11px;
  color: var(--ink);
}
.conversation-count { background: #ead9cb; color: #6e3a26; }
.conversation-group h2 { color: #8a7568; }
.history-row { color: #5c534c; border-radius: 10px; }
.history-row:hover { background: #efe2d6; color: var(--ink); }
.history-row.active {
  background: #f0e0d5;
  color: var(--muc-terracotta-deep);
}
.side-link { color: #5c534c; }
.side-link.selected,
.side-link:hover,
.explore-section .side-link:hover,
.account-menu-items .side-link:hover { background: #efe2d6; color: var(--muc-terracotta-deep); }
.explore-section { border-color: #e4d5c8; }
.account-avatar { background: #e7cbb8; color: #6e3a26; }
.account-menu-items { background: #fffdfb; }
.chat-header {
  height: 64px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  border-bottom: 1px solid transparent;
}
.chat-title {
  font-family: Outfit, "DM Sans", sans-serif;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.03em;
  color: var(--ink);
}
.chat-header-right { gap: 8px; }
.connected-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f3ea;
  color: #24643f;
  font-size: 11px;
  font-weight: 750;
}
.connected-indicator > .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f8a52;
}
.connected-indicator.disconnected { background: #f6ebe4; color: #8c4a32; }
.connected-indicator.disconnected > .status-dot { background: #b0613e; }
.chat-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.chat-tools form { display: flex; margin: 0; }
.chat-tools .icon-button { width: 34px; height: 34px; }
.chat-scroll { padding: 28px 22px 8px; }
.chat-messages, .welcome-screen, .followups { width: min(760px, 100%); }
.welcome-mark {
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: 14px;
  background: #f0e0d5;
  object-fit: contain;
}
.welcome-screen h2 {
  font-size: clamp(32px, 3vw, 40px);
  letter-spacing: -.055em;
  line-height: 1.05;
  margin-bottom: 4px;
}
.welcome-screen > p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.history-feature {
  border: 0;
  margin-top: 12px;
  padding: 14px 16px;
  background: #292522;
  color: #fbf7f2;
}
.history-feature .section-kicker { color: #e0ab87; }
.history-feature-heading h3 { color: #fbf7f2; font-size: 22px; }
.history-feature-heading p { color: #c8beb4; font-size: 13px; }
.history-feature-heading > svg { color: #e0ab87; }
.history-prompt-grid button,
.history-more-list button {
  background: #3a332f;
  border-color: #51463f;
  color: #fbf7f2;
  font-size: 13px;
  line-height: 1.35;
  min-height: 0;
  padding: 10px;
}
.history-prompt-grid { margin-top: 12px; }
.history-prompt-grid button svg { color: #e0ab87; }
.history-more summary { color: #e0ab87; }
.history-feature button:hover,
.history-feature button:focus-visible {
  background: #4a403a;
  border-color: #e7c3ae;
  color: #fff;
  transform: translateY(-1px);
}
.secondary-suggestions { margin-top: 10px; }
.secondary-suggestions button {
  background: #fff;
  border-color: #e4d5c8;
  border-radius: 14px;
  min-height: 0;
  padding: 10px 12px;
}
.secondary-suggestions button span { font-size: 13px; }
.secondary-suggestions button small { font-size: 12px; line-height: 1.45; }
.secondary-suggestions button:hover { background: #fffaf6; border-color: #d6b39d; }
.message-block { position: relative; max-width: none; margin: 0 0 28px; }
.message-block.user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
  padding-left: 0;
  width: min(100%, 560px);
}
.message-block.user .message-identity {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.message-block.user .message-body {
  width: fit-content;
  max-width: 100%;
  background: #8c4a32;
  color: #fbf7f2;
  border-radius: 18px 18px 6px 18px;
  padding: 12px 16px;
  line-height: 1.55;
  font-size: 15px;
}
.message-identity { margin-bottom: 8px; }
.message-identity strong { letter-spacing: -.02em; }
.assistant-avatar { background: #f0e0d5; }
.message-body { color: var(--ink); font-size: 15.5px; line-height: 1.7; }
.message-block.assistant .message-body { max-width: 68ch; }
.message-block.pending-message .message-body { color: #a56b4c; }
.composer-container { width: min(760px, calc(100% - 36px)); margin-bottom: 10px; }
.composer {
  background: #fff;
  border: 1px solid #d9c7ba;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(105, 68, 44, .1);
  padding: 8px 12px 8px;
}
.composer:focus-within { border-color: #b0613e; box-shadow: 0 18px 50px rgba(105, 68, 44, .14); }
.composer textarea { min-height: 44px; padding: 6px; color: var(--ink); font-size: 16px; }
.composer textarea::placeholder { color: #9a9188; }
.composer-left {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.composer-left select { color: var(--ink); font-weight: 700; }
.composer-send {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--muc-terracotta-deep);
}
.composer-send:hover { background: #6e3a26; }
#stopButton { border-radius: 999px; background: #fff; }
.composer-disclaimer { color: #9a9188; font-size: 11px; }
.followups p span, #followupList button {
  border-color: #e4d5c8;
}
#followupList button:hover { border-color: var(--primary); color: var(--primary); }
.citation-card {
  background: var(--cream);
  box-shadow: -16px 0 40px rgba(36, 33, 31, .12);
}
dialog {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(36, 33, 31, .18);
}
dialog h2 { margin-bottom: 8px; }
dialog label { display: block; margin: 12px 0 6px; font-size: 13px; font-weight: 750; }
dialog input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--cream);
  color: var(--ink);
}
.desktop-nav a { position: relative; color: var(--muted); }
.desktop-nav a[aria-current="page"] { color: var(--muc-terracotta-deep); }
.desktop-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 2px;
  background: var(--muc-terracotta);
}
.mobile-nav a[aria-current="page"] { color: var(--muc-terracotta-deep); }
.auth-illustration { background: #24211f; }
.auth-content, .auth-layout { background: var(--cream); }
.auth-card h1 { letter-spacing: -.05em; }
.standard-main { padding-top: 28px; padding-bottom: 80px; }
.standard-main .page-hero {
  background: none;
  padding-right: 0;
  max-width: 740px;
}
.page-hero h1, .detail-hero h1 { letter-spacing: -.05em; }
.searchbar {
  align-items: center;
  max-width: none;
  padding: 8px;
  border: 1px solid #e4d5c8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(36, 33, 31, .04);
}
.searchbar input,
.searchbar select {
  width: auto;
  flex: 1 1 160px;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
}
.searchbar input:focus,
.searchbar select:focus { background: var(--cream); outline: none; }
.searchbar .btn { flex: 0 0 auto; }
a.service-card,
a.book-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 220px;
  padding: 20px;
  border-radius: 18px;
  background: #fff;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
a.book-card { display: grid; grid-template-columns: 74px 1fr; padding: 0; gap: 0; overflow: hidden; }
a.service-card:hover,
a.book-card:hover {
  transform: translateY(-3px);
  border-color: #d6b39d;
  box-shadow: 0 16px 36px rgba(105, 68, 44, .08);
}
a.service-card p { color: var(--muted); font-size: 14px; line-height: 1.6; }
a.service-card .text-link { margin-top: auto; }
.task-pills a[aria-current="true"] {
  background: var(--muc-terracotta-deep);
  border-color: var(--muc-terracotta-deep);
  color: #fff;
}
[data-theme="dark"] .app-page,
[data-theme="dark"] .workspace-shell,
[data-theme="dark"] .auth-content { background: #241f1c; }
[data-theme="dark"] .workspace-sidebar { background: #1e1a18; border-right-color: #3a312c; }
[data-theme="dark"] .workspace-sidebar .new-chat-button { background: #b0613e; }
[data-theme="dark"] .workspace-sidebar .new-chat-button:hover { background: #8c4a32; }
[data-theme="dark"] .history-search-wrap #historySearch,
[data-theme="dark"] .workspace-sidebar #historySearch,
[data-theme="dark"] .composer,
[data-theme="dark"] .chat-tools,
[data-theme="dark"] .secondary-suggestions button,
[data-theme="dark"] .searchbar,
[data-theme="dark"] a.service-card,
[data-theme="dark"] dialog { background: #312b27; border-color: #4d4038; color: var(--ink); }
[data-theme="dark"] .history-row,
[data-theme="dark"] .side-link { color: #d9cdc3; }
[data-theme="dark"] .history-row:hover,
[data-theme="dark"] .side-link:hover,
[data-theme="dark"] .history-row.active { background: #3a2c26; color: #f0d2c4; }
[data-theme="dark"] .account-avatar { background: #4a342c; color: #f0d2c4; }
[data-theme="dark"] .history-feature { background: #171514; border: 1px solid #3a312c; }
[data-theme="dark"] .history-prompt-grid button,
[data-theme="dark"] .history-more-list button { background: #2c2623; }
[data-theme="dark"] .message-block.user .message-body { background: #a86b4e; color: #fffaf6; }
[data-theme="dark"] .composer textarea,
[data-theme="dark"] .composer-left select,
[data-theme="dark"] .searchbar input,
[data-theme="dark"] .searchbar select,
[data-theme="dark"] dialog input { color: var(--ink); background: transparent; }
[data-theme="dark"] dialog input { background: #241f1c; }
[data-theme="dark"] .composer-left { background: #241f1c; }
[data-theme="dark"] .connected-indicator { background: #1e3328; color: #b7e0c6; }
[data-theme="dark"] .connected-indicator.disconnected { background: #3a2c26; color: #f0d2c4; }
[data-theme="dark"] .assistant-avatar,
[data-theme="dark"] .welcome-mark { background: #3a2c26; }
@media (max-width: 780px) {
  .public-page .nav-actions .btn-sm { display: inline-flex; }
  .connected-indicator { display: inline-flex; width: 28px; height: 28px; padding: 0; justify-content: center; font-size: 0; }
  .chat-header { height: auto; padding: 8px 12px; }
  .chat-tools { padding: 2px; }
  .composer-container { width: calc(100% - 20px); }
  .message-block.user { width: min(100%, 100%); margin-left: 12%; }
}
@media (min-width: 1100px) {
  .secondary-suggestions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
[hidden] { display: none !important; }
.chat-tools:not(:has(> :not([hidden]))) { display: none; }
.composer-left { white-space: nowrap; }
.chat-scroll { padding-bottom: 28px; }
[data-theme="dark"] .lang-switch { background: #312b27; border-color: #4d4038; }
[data-theme="dark"] .lang-switch button { color: #d9cdc3; }
[data-theme="dark"] .lang-switch button[aria-pressed="true"] { background: #fbf7f2; color: #24211f; }
@media (max-width: 780px) {
  .chat-header { flex-wrap: nowrap; align-items: center; }
  .chat-title { max-width: 42vw; }
}
@media (max-width: 560px) {
  .public-page .nav-actions .btn-sm { display: none; }
  .welcome-screen h2 { font-size: 32px; }
  .history-prompt-grid button,
  .history-more-list button { font-size: 14px; }
  .mode-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .composer-left { position: relative; }
}
