/* ============================================================================
   AI MODE (chat.theme.php)
   Loaded after app.css. Reuses its tokens (--font-sans, --radius*, --shadow-*,
   --accent, --ease) and the AI overview's blue-violet-teal identity so the
   chat reads as the same product as the overview box on the results pages.
   Every rule is scoped under .aic-* so nothing here leaks into other pages.
   ========================================================================== */

:root{
  --aic-grad: linear-gradient(120deg,#4c8dfb,#845ef7 55%,#1abc9c);
  --aic-grad-soft: linear-gradient(135deg, rgba(76,141,251,.14), rgba(132,94,247,.14));
  --aic-ink:#0e1116;
  --aic-text:#1f2937;
  --aic-muted:#5b6472;
  --aic-faint:#8b93a1;
  --aic-line:#e7eaf0;
  --aic-card:#ffffff;
  --aic-violet:#845ef7;
  --aic-violet-ink:#4c3fb3;
  --aic-blue:#0b5ed7;
  --aic-bg:#f7f9fc;
  --aic-header-h:84px;
}

/* --- Page frame ------------------------------------------------------------ */
body.aic-page{
  background-image:
    radial-gradient(900px 420px at 50% -140px, rgba(132,94,247,.11), transparent 70%),
    radial-gradient(700px 360px at 85% 12%, rgba(26,188,156,.07), transparent 70%);
  background-repeat:no-repeat;
}
.aic-content{ display:flex; flex-direction:column; min-height:100%; }
.aic-main{
  flex:1 1 auto;
  display:flex; flex-direction:column;
  padding:0 0 0;
}
.aic-wrap{
  width:100%; max-width:880px;
  margin:0 auto; padding:0 18px;
}
.aic-main > .aic-wrap{ flex:1 1 auto; }

/* --- Hero (empty state) ------------------------------------------------------ */
.aic-hero{ text-align:center; padding:54px 0 26px; }
.aic-hero.is-hidden{ display:none; }
.aic-orb{
  width:66px; height:66px; border-radius:50%;
  background:var(--aic-grad); color:#fff;
  display:grid; place-items:center; margin:0 auto 16px;
  box-shadow:0 14px 34px -10px rgba(132,94,247,.6), 0 0 0 8px rgba(132,94,247,.08);
  animation:aic-float 5.5s ease-in-out infinite;
}
.aic-orb svg{ width:32px; height:32px; }
.aic-kicker{
  font-size:11.5px; font-weight:700; letter-spacing:.16em; text-transform:uppercase;
  color:var(--aic-violet); margin-bottom:6px;
}
.aic-hero-title{
  font-size:clamp(26px, 3.6vw, 38px); font-weight:700; letter-spacing:-.022em;
  line-height:1.15; color:var(--aic-ink); margin:0 0 12px;
}
.aic-hero-intro{
  color:var(--aic-muted); font-size:15.5px; line-height:1.62;
  max-width:62ch; margin:0 auto 28px;
}
.aic-topic-hero{
  display:flex; flex-direction:column; align-items:center; gap:4px;
  margin:-10px 0 24px;
}
.aic-topic-label{
  display:inline-flex; align-items:center; gap:6px;
  font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--aic-faint);
}
.aic-topic-label .ico{ width:13px; height:13px; }
.aic-topic-name{ font-weight:650; font-size:15.5px; color:var(--aic-violet-ink); text-decoration:none; }
.aic-topic-name:hover{ text-decoration:underline; }
.aic-topic-desc{ color:var(--aic-muted); font-size:13.5px; max-width:64ch; line-height:1.5; }

.aic-starters{
  display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px;
  text-align:left; margin:0 auto; max-width:760px;
}
.aic-starter{
  display:flex; align-items:center; gap:12px;
  background:var(--aic-card); border:1px solid var(--aic-line); border-radius:14px;
  padding:12px 12px 12px 12px; font:inherit; font-size:14px; line-height:1.4; color:var(--aic-ink);
  text-align:left; cursor:pointer; box-shadow:var(--shadow-1,0 1px 2px rgba(16,24,40,.05));
  transition:box-shadow .18s var(--ease,ease), border-color .18s ease, transform .12s ease;
  animation:aic-rise .5s var(--ease,ease) both;
  animation-delay:calc(var(--i, 0) * 55ms + 80ms);
}
.aic-starter:hover{ border-color:#c9d3e6; box-shadow:var(--shadow-2,0 6px 20px rgba(16,24,40,.09)); transform:translateY(-1px); }
.aic-starter:active{ transform:translateY(0); }
.aic-starter:focus-visible{ outline:3px solid rgba(132,94,247,.35); outline-offset:2px; }
.aic-starter-ico{
  width:34px; height:34px; border-radius:10px; flex:0 0 auto;
  background:var(--aic-grad-soft); color:#5b6cf5;
  display:grid; place-items:center;
}
.aic-starter-ico .ico{ width:17px; height:17px; }
.aic-starter-text{ flex:1 1 auto; min-width:0; }
.aic-starter-go{ color:#a3adba; flex:0 0 auto; }
.aic-starter-go .ico{ width:14px; height:14px; }
.aic-starter:hover .aic-starter-go{ color:var(--aic-violet); }

.aic-unavailable{ text-align:center; padding:64px 0 32px; color:var(--aic-muted); }
.aic-unavailable .aic-hero-title{ font-size:24px; margin-top:14px; }
.aic-unavailable p{ max-width:60ch; margin:0 auto; }
.aic-unavailable code{ background:rgba(16,24,40,.06); padding:.05em .4em; border-radius:5px; }

/* --- Thread ----------------------------------------------------------------- */
.aic-thread{ display:flex; flex-direction:column; gap:24px; padding:22px 0 10px; }
.aic-thread:empty{ padding:0; }
.aic-thread-end{ height:1px; }
.aic-turn{ animation:aic-rise .38s var(--ease,ease) both; scroll-margin-top:calc(var(--aic-header-h) + 10px); }

.aic-turn-user{ display:flex; justify-content:flex-end; }
.aic-user-bubble{
  max-width:82%;
  background:linear-gradient(135deg,#e9eefc,#eef2ff);
  color:var(--aic-text); border:1px solid #dfe6fb;
  border-radius:20px 20px 6px 20px; padding:11px 16px;
  font-size:15.5px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere;
  box-shadow:0 1px 2px rgba(16,24,40,.04);
}

.aic-turn-ai{
  position:relative;
  background:var(--aic-card); border:1px solid var(--aic-line); border-radius:18px;
  padding:16px 20px 14px; box-shadow:var(--shadow-1,0 1px 2px rgba(16,24,40,.05));
}
.aic-turn-ai::before{
  content:""; position:absolute; top:-1px; left:22px; right:22px; height:2px;
  background:var(--aic-grad); border-radius:0 0 3px 3px; opacity:.85;
}
.aic-ai-head{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.aic-badge{
  display:inline-flex; align-items:center; gap:6px;
  background:var(--aic-grad); color:#fff;
  font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  padding:4px 10px; border-radius:999px; white-space:nowrap;
}
.aic-badge .ico{ width:12px; height:12px; }
.aic-badge-lg{ font-size:12.5px; padding:6px 14px; }
.aic-badge-lg .ico{ width:15px; height:15px; }
.aic-turn-ai.is-pending .aic-badge{ animation:aic-pulse 1.6s ease-in-out infinite; }
.aic-ai-meta{ margin-left:auto; font-size:12px; color:var(--aic-faint); white-space:nowrap; }

/* answer typography */
.aic-ai-body{ font-size:15.5px; line-height:1.68; color:var(--aic-text); overflow-wrap:break-word; }
.aic-ai-body > :first-child{ margin-top:0; }
.aic-ai-body > :last-child{ margin-bottom:0; }
.aic-ai-body p{ margin:0 0 .75rem; }
.aic-ai-body h3.aic-h{ font-size:17px; font-weight:650; letter-spacing:-.01em; margin:1.05rem 0 .4rem; color:var(--aic-ink); }
.aic-ai-body h4.aic-h{ font-size:15.5px; font-weight:650; margin:.9rem 0 .3rem; color:var(--aic-ink); }
.aic-ai-body ul, .aic-ai-body ol{ margin:.15rem 0 .8rem 1.3rem; padding:0; }
.aic-ai-body li{ margin:.22rem 0; }
.aic-ai-body li > ul, .aic-ai-body li > ol{ margin:.2rem 0 .25rem 1.1rem; }
.aic-ai-body ul{ list-style:disc; }
.aic-ai-body ul ul{ list-style:circle; }
.aic-ai-body strong{ font-weight:650; color:var(--aic-ink); }
.aic-ai-body em{ font-style:italic; }
.aic-ai-body del{ color:var(--aic-faint); }
.aic-ai-body code{
  background:rgba(16,24,40,.06); padding:.08em .4em; border-radius:5px; font-size:.9em;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
.aic-ai-body pre.aic-code{
  background:#0f172a; color:#e2e8f0; padding:12px 14px; border-radius:12px;
  overflow:auto; font-size:13px; line-height:1.55; margin:.4rem 0 .9rem;
}
.aic-ai-body pre.aic-code code{ background:transparent; padding:0; color:inherit; font-size:inherit; }
.aic-ai-body blockquote.aic-quote{
  border-left:3px solid var(--aic-violet); margin:.4rem 0 .9rem; padding:2px 0 2px 14px; color:#4b5563;
}
.aic-ai-body blockquote.aic-quote p:last-child{ margin-bottom:0; }
.aic-ai-body .aic-table-wrap{
  overflow-x:auto; margin:.4rem 0 .95rem;
  border:1px solid var(--aic-line); border-radius:12px; background:#fff;
}
.aic-ai-body table.aic-table{ width:100%; border-collapse:collapse; font-size:14px; margin:0; }
.aic-ai-body .aic-table th{
  background:#f5f7fb; text-align:left; font-weight:650; padding:9px 12px;
  border-bottom:1px solid var(--aic-line); white-space:nowrap; color:var(--aic-ink);
}
.aic-ai-body .aic-table td{ padding:8px 12px; border-bottom:1px solid #eef1f5; vertical-align:top; }
.aic-ai-body .aic-table tr:last-child td{ border-bottom:0; }
.aic-ai-body .aic-table tbody tr:nth-child(even) td{ background:#fbfcfe; }
.aic-ai-body hr.aic-hr{ border:0; border-top:1px solid var(--aic-line); margin:.9rem 0; }
.aic-ai-body a.aic-link{
  color:var(--aic-blue); text-decoration:underline;
  text-decoration-color:rgba(11,94,215,.35); text-underline-offset:2px;
  transition:text-decoration-color .15s ease;
}
.aic-ai-body a.aic-link:hover{ text-decoration-color:currentColor; }

/* streaming + thinking */
.aic-stream{ white-space:pre-wrap; }
.aic-stream-md > :last-child{ display:inline; }
.aic-stream-md .aic-stream-row{ font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:13px; color:var(--aic-muted); white-space:pre-wrap; }
.aic-stream-md a.aic-link{ color:var(--aic-blue); text-decoration:underline; text-decoration-color:rgba(11,94,215,.35); }
.aic-cursor{
  display:inline-block; width:8px; height:1.05em; margin-left:2px; vertical-align:-2px;
  background:var(--aic-grad); border-radius:2px; animation:aic-blink 1s steps(2) infinite;
}
.aic-thinking{ display:flex; flex-direction:column; gap:11px; padding:2px 0 4px; }
.aic-thinking-label{
  display:inline-flex; align-items:center; gap:8px;
  font-size:13px; font-weight:600; color:var(--aic-violet);
}
.aic-dots{ display:inline-flex; gap:3px; }
.aic-dots i{
  width:5px; height:5px; border-radius:50%; background:var(--aic-violet); opacity:.35;
  animation:aic-dot 1.2s ease-in-out infinite;
}
.aic-dots i:nth-child(2){ animation-delay:.15s; }
.aic-dots i:nth-child(3){ animation-delay:.3s; }
.aic-shimmer{
  height:12px; border-radius:6px;
  background:linear-gradient(90deg,#eef1f6 25%,#e3e9f1 45%,#eef1f6 65%);
  background-size:200% 100%; animation:aic-shimmer 1.2s linear infinite;
}

/* chips under an answer */
.aic-links, .aic-suggest{ display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.aic-chips-label{
  width:100%; font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
  color:var(--aic-faint); margin-bottom:-2px;
}
.aic-chip{
  display:inline-flex; align-items:center; gap:7px;
  padding:6px 12px 6px 10px; border-radius:999px;
  background:#eef3f9; border:1px solid #dde6f0; color:var(--aic-blue);
  font:inherit; font-size:13px; line-height:1.3; text-decoration:none !important; cursor:pointer;
  max-width:100%; transition:background .15s ease, border-color .15s ease, transform .08s ease;
}
.aic-chip .ico{ width:14px; height:14px; flex:0 0 auto; }
.aic-chip span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aic-chip:hover{ background:#e2ebf5; }
.aic-chip:active{ transform:translateY(1px); }
.aic-chip-news{ background:#fff5e8; border-color:#fbe1bd; color:#b45309; }
.aic-chip-news:hover{ background:#ffedd5; }
.aic-chip-shopping{ background:#ecfdf5; border-color:#c7f0dd; color:#047857; }
.aic-chip-shopping:hover{ background:#d9f7ea; }
.aic-chip-topic{ background:#f3f0ff; border-color:#ddd5fb; color:var(--aic-violet-ink); }
.aic-chip-topic:hover{ background:#ebe5ff; }
.aic-suggest .aic-chip{ background:#fff; border-color:#d9d2fb; color:var(--aic-violet-ink); }
.aic-suggest .aic-chip:hover{ background:#f6f3ff; border-color:#c4b8f7; }

/* actions row */
.aic-actions{
  display:flex; flex-wrap:wrap; gap:2px; margin-top:12px; padding-top:9px;
  border-top:1px dashed #e5e9f0;
}
.aic-action{
  display:inline-flex; align-items:center; gap:6px;
  background:transparent; border:0; border-radius:8px;
  color:#6b7280; font:inherit; font-size:12.5px; padding:5px 9px; cursor:pointer;
  text-decoration:none !important; transition:background .15s ease, color .15s ease;
}
.aic-action .ico{ width:14px; height:14px; }
.aic-action:hover{ background:#f3f4f6; color:var(--aic-ink); }
.aic-action.is-done{ color:#047857; }

/* error + stopped states */
.aic-turn-ai.is-error{ border-color:#f3c7c7; background:#fff8f8; }
.aic-turn-ai.is-error::before{ background:#dc3545; }
.aic-error-text{ color:#9f1239; font-size:14.5px; margin:0 0 4px; }
.aic-stopped{ font-size:12.5px; color:var(--aic-faint); margin-top:8px; font-style:italic; }

/* --- Composer dock ------------------------------------------------------------ */
.aic-dock{
  position:sticky; bottom:0; z-index:20;
  padding:14px 0 12px; margin-top:auto;
  background:linear-gradient(180deg, rgba(247,249,252,0) 0%, rgba(247,249,252,.94) 26%, var(--aic-bg) 60%);
}
.aic-composer{
  background:var(--aic-card); border:1px solid #dfe5ec; border-radius:24px;
  box-shadow:0 8px 26px -10px rgba(9,14,22,.28), 0 1px 2px rgba(16,24,40,.06);
  padding:10px 12px 8px 16px;
  transition:border-color .2s ease, box-shadow .25s var(--ease,ease), transform .25s var(--ease,ease);
}
.aic-composer:focus-within{
  border-color:var(--aic-violet);
  box-shadow:0 0 0 4px rgba(132,94,247,.16), 0 12px 32px -10px rgba(9,14,22,.32);
  transform:translateY(-1px);
}
.aic-composer.is-disabled{ opacity:.7; }
.aic-input{
  display:block; width:100%; border:0; outline:0; resize:none; background:transparent;
  font:inherit; font-size:16px; line-height:1.5; color:var(--aic-ink);
  padding:6px 4px 4px; min-height:32px; max-height:220px; overflow-y:auto;
}
.aic-input::placeholder{ color:#93a0af; }
.aic-input:disabled{ color:#93a0af; }
.aic-composer-bar{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:2px; }
.aic-composer-left, .aic-composer-right{ display:flex; align-items:center; gap:6px; min-width:0; }
.aic-ghost{
  display:inline-flex; align-items:center; gap:6px;
  border:0; background:transparent; border-radius:999px;
  color:var(--aic-muted); font:inherit; font-size:13px; font-weight:500; padding:6px 10px; cursor:pointer;
  transition:background .15s ease, color .15s ease;
}
.aic-ghost .ico{ width:15px; height:15px; }
.aic-ghost:hover{ background:#f3f4f6; color:var(--aic-ink); }
.aic-meter{ display:inline-flex; align-items:center; gap:8px; font-size:12px; color:var(--aic-faint); margin-right:6px; }
.aic-meter-track{ width:58px; height:5px; border-radius:3px; background:#e9edf3; overflow:hidden; }
.aic-meter-fill{ display:block; height:100%; width:0; background:var(--aic-grad); transition:width .35s var(--ease,ease); }
.aic-meter.is-warn .aic-meter-fill{ background:#f59e0b; }
.aic-meter.is-full .aic-meter-fill{ background:#dc3545; }
.aic-meter.is-full .aic-meter-text{ color:#dc3545; font-weight:600; }
.aic-send, .aic-stop{
  width:40px; height:40px; border-radius:50%; border:0; flex:0 0 auto;
  display:grid; place-items:center; cursor:pointer;
  transition:transform .15s var(--ease,ease), box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.aic-send{ background:var(--aic-grad); color:#fff; box-shadow:0 4px 12px rgba(132,94,247,.38); }
.aic-send svg{ width:20px; height:20px; }
.aic-send:hover:not(:disabled){ transform:scale(1.07); box-shadow:0 6px 16px rgba(132,94,247,.5); }
.aic-send:active:not(:disabled){ transform:scale(.94); }
.aic-send:disabled{ background:#e3e7ee; color:#a3adba; box-shadow:none; cursor:default; }
.aic-stop{ background:#0f172a; color:#fff; }
.aic-stop:hover{ transform:scale(1.07); }
.aic-stop-square{ width:12px; height:12px; border-radius:2px; background:#fff; }
.aic-topic-row{ margin:0 0 6px; }
.aic-topic-chip{
  display:inline-flex; align-items:center; gap:6px; max-width:100%;
  background:var(--aic-grad-soft); color:var(--aic-violet-ink);
  border-radius:999px; padding:4px 6px 4px 10px; font-size:12.5px; font-weight:600;
}
.aic-topic-chip .ico{ width:13px; height:13px; flex:0 0 auto; }
.aic-topic-chip-text{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aic-topic-clear{
  width:18px; height:18px; border:0; border-radius:50%; flex:0 0 auto;
  background:rgba(0,0,0,.07); color:inherit; font-size:15px; line-height:1; padding:0; cursor:pointer;
}
.aic-topic-clear:hover{ background:rgba(0,0,0,.14); }
.aic-disclaimer{ font-size:11.5px; color:var(--aic-faint); text-align:center; margin:9px 0 0; line-height:1.45; }
.aic-disclaimer a{ color:inherit; text-decoration:underline; }

/* notices (consent gate, message limit) */
.aic-notice{
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 16px;
  background:linear-gradient(#fff,#fff) padding-box, var(--aic-grad) border-box;
  border:1px solid transparent; border-radius:16px; padding:13px 16px; margin:0 0 10px;
  box-shadow:var(--shadow-1,0 1px 2px rgba(16,24,40,.05));
  animation:aic-rise .3s var(--ease,ease) both;
}
.aic-notice-body{ display:grid; gap:2px; font-size:13.5px; color:#374151; line-height:1.45; flex:1 1 320px; min-width:0; }
.aic-notice-body strong{ color:var(--aic-ink); font-weight:650; }
.aic-notice-body a{ color:var(--aic-blue); }
.aic-notice-actions{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.aic-notice .btn-primary{ border-radius:999px; }
.aic-notice .btn-sm{ border-radius:999px; }

/* --- Responsive ------------------------------------------------------------- */
@media (max-width:767.98px){
  :root{ --aic-header-h:74px; }
  .aic-wrap{ padding:0 12px; }
  .aic-hero{ padding:34px 0 18px; }
  .aic-hero-intro{ font-size:14.5px; margin-bottom:22px; }
  .aic-starters{ grid-template-columns:1fr; gap:8px; }
  .aic-starter{ padding:11px 12px; font-size:13.5px; }
  .aic-user-bubble{ max-width:92%; font-size:15px; }
  .aic-turn-ai{ padding:14px 14px 12px; border-radius:16px; }
  .aic-ai-body{ font-size:15px; }
  .aic-thread{ gap:18px; padding-top:16px; }
  .aic-dock{ padding:10px 0 8px; }
  .aic-composer{ padding:8px 8px 6px 12px; border-radius:22px; }
  .aic-input{ font-size:16px; }
  .aic-ghost span{ display:none; }
  .aic-ghost{ padding:8px; }
  .aic-meter-track{ width:44px; }
  .aic-disclaimer{ font-size:11px; }
  .aic-ai-meta{ display:none; }
}

/* --- Motion ------------------------------------------------------------------ */
@keyframes aic-rise{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
@keyframes aic-float{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-4px); } }
@keyframes aic-blink{ to{ opacity:0; } }
@keyframes aic-pulse{ 0%,100%{ opacity:1; } 50%{ opacity:.55; } }
@keyframes aic-dot{ 0%,80%,100%{ opacity:.35; transform:translateY(0); } 40%{ opacity:1; transform:translateY(-3px); } }
@keyframes aic-shimmer{ to{ background-position:-200% 0; } }
@media (prefers-reduced-motion: reduce){
  .aic-orb, .aic-starter, .aic-turn, .aic-notice, .aic-cursor, .aic-dots i, .aic-shimmer, .aic-turn-ai.is-pending .aic-badge{ animation:none !important; }
  .aic-composer:focus-within{ transform:none; }
}
@media print{
  .aic-dock, .aic-actions, .aic-suggest, #search-header, .fs-footer{ display:none !important; }
  .aic-turn-ai{ box-shadow:none; }
}

/* ============================================================================
   THEME MODES — AI Mode in dark
   ============================================================================
   The three colour modes are described in section 14 of app.css. Light and
   hybrid both want this page exactly as it is above (the chat surface has
   always been light on both), so only dark has anything to say here.

   Nearly all of it is a token swap: the palette at the top of this file is
   already the single source of these colours, so re-declaring it under
   html[data-fs-theme="dark"] repaints the hero, the turns, the chips and the
   composer at once. The handful of rules below it are the places that took a
   literal instead of a token.
   ============================================================================ */

html[data-fs-theme="dark"]{
  --aic-grad-soft: linear-gradient(135deg, rgba(76,141,251,.22), rgba(132,94,247,.22));
  --aic-ink:#dde5ef;
  --aic-text:#c6d0dc;
  --aic-muted:#9aa7b6;
  --aic-faint:#7c8b9d;
  --aic-line:#232e3b;
  --aic-card:#161d26;
  --aic-violet:#a98bff;
  --aic-violet-ink:#cbbcff;
  --aic-blue:#79b8ff;
  --aic-bg:#10151c;
}

/* The page's own wash: the violet/teal glows need to read on ink, not paper. */
html[data-fs-theme="dark"] body.aic-page{
  background-image:
    radial-gradient(900px 420px at 50% -140px, rgba(132,94,247,.16), transparent 70%),
    radial-gradient(700px 360px at 85% 12%, rgba(26,188,156,.09), transparent 70%);
}

/* Turns */
html[data-fs-theme="dark"] .aic-user-bubble{
  background:linear-gradient(135deg,#1d2440,#232a4b);
  border-color:#2e3560;
}
html[data-fs-theme="dark"] .aic-ai-body blockquote{ color:var(--aic-muted); }
html[data-fs-theme="dark"] .aic-ai-body table{ background:var(--aic-card); }
html[data-fs-theme="dark"] .aic-turn-ai.is-error{ border-color:#5a2b2b; background:#241a1c; }
html[data-fs-theme="dark"] .aic-error-text{ color:#ff9db1; }
html[data-fs-theme="dark"] .aic-starter-go{ color:#a3b4ff; }

/* Chips */
html[data-fs-theme="dark"] .aic-chip{
  background:var(--aic-card); border-color:var(--aic-line); color:var(--aic-blue);
}
html[data-fs-theme="dark"] .aic-chip-news{ background:#2a2213; border-color:#4a3a1c; color:#e0a75b; }
html[data-fs-theme="dark"] .aic-chip-topic,
html[data-fs-theme="dark"] .aic-suggest .aic-chip{
  background:#211c3a; border-color:#362d5e; color:var(--aic-violet-ink);
}

/* Actions */
html[data-fs-theme="dark"] .aic-action:hover,
html[data-fs-theme="dark"] .aic-ghost:hover{ background:#1e2733; color:var(--aic-ink); }

/* Composer dock: the fade has to end in the page colour, or it paints a pale
   band across the bottom of a dark page. */
html[data-fs-theme="dark"] .aic-dock{
  background:linear-gradient(180deg, rgba(16,21,28,0) 0%, rgba(16,21,28,.94) 26%, var(--aic-bg) 60%);
}
html[data-fs-theme="dark"] .aic-composer{
  border-color:#283242;
  box-shadow:0 8px 26px -10px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.35);
}
html[data-fs-theme="dark"] .aic-stop{ background:#e2e8f0; color:#0f172a; }
html[data-fs-theme="dark"] .aic-stop-square{ background:#0f172a; }

/* Notices keep their gradient border; only the panel behind it changes. */
html[data-fs-theme="dark"] .aic-notice{
  background:linear-gradient(var(--aic-card),var(--aic-card)) padding-box, var(--aic-grad) border-box;
}
html[data-fs-theme="dark"] .aic-notice-body{ color:var(--aic-text); }
