:root {
  --bg: #05080d;
  --bg-2: #0a1018;
  --panel: rgba(12, 20, 30, 0.72);
  --panel-solid: #0c141e;
  --line: rgba(56, 225, 255, 0.16);
  --line-strong: rgba(56, 225, 255, 0.42);
  --text: #dbe7f0;
  --muted: #7d93a6;
  --dim: #4d6273;
  --accent: #38e1ff;
  --accent-soft: rgba(56, 225, 255, 0.12);
  --warn: #ffb84d;
  --danger: #ff6b6b;
  --ok: #4ade80;
  --radius: 10px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 50% 38%, rgba(56, 225, 255, 0.08), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--bg);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 85%);
}

/* Top bar */
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5, 8, 13, 0.9), rgba(5, 8, 13, 0.6));
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 14px rgba(56, 225, 255, 0.45), inset 0 0 8px rgba(56, 225, 255, 0.4);
  position: relative;
}
.brand-mark::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.brand-name { font: 600 16px/1 var(--mono); letter-spacing: 0.42em; color: #f2fbff; }
.brand-sub { font: 11px/1.4 var(--mono); color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 4px; }
.chips { display: flex; gap: 8px; flex: 1; min-width: 0; overflow: hidden; }
.chips .chip { flex: none; white-space: nowrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(10, 16, 24, 0.6);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.chip.online .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.chip.online { color: var(--text); }
.chip.warn .dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.chip.warn { color: var(--warn); }
.clock { text-align: right; }
.clock-time { font: 500 20px/1 var(--mono); color: #f2fbff; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.clock-date { font: 11px/1.6 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.icon-button {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
}
.icon-button:hover, .icon-button[aria-expanded="true"] { color: var(--accent); border-color: var(--line-strong); }
.settings {
  position: absolute; right: 24px; top: calc(100% + 8px); z-index: 10; width: 300px;
  display: grid; gap: 12px; padding: 16px; border-radius: var(--radius);
  background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.settings label { display: grid; gap: 6px; font: 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.settings input, .settings select {
  font: 14px var(--sans); color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 10px; min-width: 0;
}
.settings input:focus, .settings select:focus { outline: none; border-color: var(--accent); }
.settings-hint { margin: 0; font-size: 12px; color: var(--dim); }
.settings { max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain; }
.settings-group { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.settings-group-body { display: grid; gap: 10px; }
.settings-group h3 { margin: 0; font: 600 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.settings-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.settings-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--mono); }
.settings label .settings-row { text-transform: none; letter-spacing: normal; }
.pair-code {
  justify-self: start; padding: 8px 14px; border-radius: 8px; border: 1px dashed var(--line-strong);
  font: 600 22px/1 var(--mono); letter-spacing: 0.18em; color: var(--accent); user-select: all;
}
.mic-test:disabled { opacity: 0.5; cursor: progress; }
.mic-gate { display: grid; gap: 6px; }
.mic-gate label { display: block; }
.mic-meter { position: relative; height: 8px; border-radius: 4px; background: rgba(56, 225, 255, 0.1); overflow: hidden; }
#mic-meter-fill { position: absolute; inset: 0; background: var(--ok); transform: scaleX(0); transform-origin: left; }
#mic-meter-fill.closed { background: var(--dim); }
#mic-meter-mark { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--warn); }
.settings input[type="range"] { width: 100%; padding: 0; border: 0; background: transparent; accent-color: var(--accent); }
.mic-test {
  justify-self: start; cursor: pointer; font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 12px;
}
.mic-test[aria-pressed="true"] { color: var(--bg); background: var(--accent); }

/* Layout */
.layout {
  display: flex;
  justify-content: center;
  padding: 16px 24px 24px;
  height: calc(100vh - 71px);
  min-height: 560px;
}
.layout > * { min-width: 0; }
.core { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-rows: minmax(0, 1fr); gap: 28px; width: 100%; max-width: 1280px; min-height: 0; }
.stage { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }

/* Tabs with a single panel; the page scrolls, not the panel */
.page-view { max-width: 1240px; margin: 0 auto; padding: 20px 24px 40px; }
.page-narrow { max-width: 760px; }

/* Panels */
.panel {
  position: relative;
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none;
  border-color: var(--accent); border-style: solid; opacity: 0.7;
}
.panel::before { top: -1px; left: -1px; border-width: 1.5px 0 0 1.5px; border-top-left-radius: var(--radius); }
.panel::after { bottom: -1px; right: -1px; border-width: 0 1.5px 1.5px 0; border-bottom-right-radius: var(--radius); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0; font: 600 12px/1 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.count { font: 500 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.panel-body { flex: 1; min-height: 0; padding: 10px 16px 14px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.empty { color: var(--dim); font-size: 13px; padding: 6px 0; }

/* Rows */
.row { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px dashed rgba(56, 225, 255, 0.07); }
.row:last-child { border-bottom: 0; }
.row .text { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* Lists */
.list-block + .list-block { margin-top: 10px; }
.list-block summary {
  display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none;
  padding: 6px 0; font: 600 13px var(--sans);
}
.list-block summary::-webkit-details-marker { display: none; }
.list-block summary::before { content: "▸"; color: var(--accent); margin-right: 8px; font-size: 11px; transition: transform 0.15s; }
.list-block[open] summary::before { transform: rotate(90deg); }
.list-name { flex: 1; }
.badge { font: 500 11px var(--mono); color: var(--bg); background: var(--accent); border-radius: 999px; padding: 2px 8px; }
.item .qty { flex: none; font: 12px var(--mono); color: var(--muted); }

/* Cards (notes, memory) */
.card { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(5, 8, 13, 0.35); }
.card + .card { margin-top: 8px; }
.card-text { margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font: 11px var(--mono); color: var(--muted); }
.memory-card .card-meta { margin: 0 0 4px; color: var(--accent); }
.tag { color: var(--accent); }

.fresh { animation: fresh 3.2s ease-out; }
@keyframes fresh {
  0% { background: rgba(56, 225, 255, 0.22); box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(56, 225, 255, 0.35); }
  100% { background: transparent; box-shadow: none; }
}

/* Core */
.orb-wrap { position: relative; width: 100%; max-width: min(440px, 48vh); aspect-ratio: 1; flex: none; }
#face { width: 100%; height: 100%; display: block; }
.orb-label {
  margin-top: 2px; text-align: center;
  font: 500 11px var(--mono); letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted);
}
.controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: 10px; }
.wake-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 600 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 12px 16px;
}
.wake-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.wake-toggle:hover { color: var(--text); }
.wake-toggle.on { color: var(--ok); border-color: rgba(74, 222, 128, 0.5); }
.wake-toggle.on .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 2s ease-in-out infinite; }
.talk {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 14px var(--mono); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bg); background: var(--accent); border: 0; border-radius: 999px; padding: 14px 26px; cursor: pointer;
  box-shadow: 0 0 24px rgba(56, 225, 255, 0.35);
  transition: transform 0.1s, box-shadow 0.2s, background 0.2s;
}
.talk:hover { box-shadow: 0 0 34px rgba(56, 225, 255, 0.55); }
.talk:active { transform: scale(0.98); }
.talk:disabled { opacity: 0.6; cursor: wait; }
.talk.active { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.talk kbd { font: 500 10px var(--mono); letter-spacing: 0.1em; padding: 3px 6px; border-radius: 4px; background: rgba(5, 8, 13, 0.25); }
.talk.active kbd { background: rgba(255, 107, 107, 0.12); }

.window { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 420px; margin-top: 14px; }
.window-bar { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.window-bar span { display: block; height: 100%; background: var(--accent); transform-origin: left; transition: transform 0.25s linear; }
.window-text { font: 11px var(--mono); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.chat { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(5, 8, 13, 0.55); }
.console {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto;
  padding: 14px; font-size: 14px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.line { display: grid; grid-template-columns: 74px 1fr; gap: 10px; }
.line .tag { font: 600 10.5px/1.9 var(--mono); letter-spacing: 0.12em; color: var(--muted); }
.line.user, .line.assistant { display: block; max-width: 85%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; white-space: pre-wrap; }
.line.user .tag, .line.assistant .tag { display: none; }
.line.user { align-self: flex-end; background: var(--accent-soft); border-color: var(--line-strong); border-bottom-right-radius: 4px; }
.line.assistant { align-self: flex-start; background: var(--panel-solid); border-bottom-left-radius: 4px; }
.line.typing { display: flex; gap: 4px; padding: 12px; }
.line.typing .tag { display: none; }
.line.typing > span:last-child, .line.typing::before, .line.typing::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: typing 1.1s ease-in-out infinite;
}
.line.typing > span:last-child { order: 1; animation-delay: 0.15s; }
.line.typing::after { order: 2; animation-delay: 0.3s; }
@keyframes typing { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.line.tool { font: 11.5px var(--mono); color: var(--dim); }
.line.tool .tag { color: var(--dim); }
.line.meta { font: 11px var(--mono); color: var(--dim); }
.line.error, .line.error .tag { color: var(--danger); }
.line > span:last-child { overflow-wrap: anywhere; }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form textarea {
  flex: 1; min-width: 0; resize: none; scrollbar-width: thin; font: 14px/1.4 var(--sans); color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color-scheme: dark;
}
.chat-form textarea::placeholder { color: var(--dim); }
.chat-form textarea:focus { outline: none; border-color: var(--accent); }
.chat-form button { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; cursor: pointer; color: var(--bg); background: var(--accent); border: 0; border-radius: 10px; }
.chat-form button:hover { box-shadow: 0 0 14px rgba(56, 225, 255, 0.45); }

.data-status { position: fixed; left: 24px; bottom: 12px; margin: 0; font: 11px var(--mono); color: var(--warn); }

/* Responsive */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .chips { order: 3; flex-basis: 100%; }
  .clock { margin-left: auto; }
  .layout { padding: 14px 16px 28px; }
  .page-view { padding: 14px 16px 28px; }
  .brand-sub { display: none; }
  .clock-time { font-size: 16px; }
  .clock-date { font-size: 10px; letter-spacing: 0.06em; }
  .orb-wrap { max-width: 300px; }
  .panel-body { overflow-y: visible; }
  .settings { left: 16px; right: 16px; width: auto; }
  .line { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fresh { animation: none; }
  .window-bar span { transition: none; }
}

/* Tabs */
.tabs { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(10, 16, 24, 0.6); }
.tab {
  font: 600 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--bg); background: var(--accent); box-shadow: 0 0 14px rgba(56, 225, 255, 0.35); }

/* Category colors (shared by filters and timeline) */
.cat-tasks, .cat-lists { --cat: #38e1ff; }
.cat-reminders { --cat: #a78bfa; }
.cat-notes { --cat: #4ade80; }
.cat-memory { --cat: #f472b6; }
.cat-undo { --cat: #ffb84d; }
.cat-other { --cat: #7d93a6; }

/* History view */
.history { max-width: 1240px; margin: 0 auto; padding: 22px 24px 48px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 2fr); gap: 14px; }
.kpi {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.6;
}
.kpi-label { font: 500 10.5px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font: 600 30px/1 var(--mono); color: #f2fbff; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(56, 225, 255, 0.25); }
.kpi-value small { font-size: 12px; color: var(--muted); margin-left: 4px; text-shadow: none; }
.kpi-sub { font: 11px var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); align-items: end; gap: 3px; height: 46px; }
.hours .bar { height: var(--h); background: linear-gradient(180deg, var(--accent), rgba(56, 225, 255, 0.25)); border-radius: 2px 2px 0 0; min-height: 2px; }
.hours .bar.zero { background: var(--line); }
.hours .bar.now { box-shadow: 0 0 10px var(--accent); outline: 1px solid rgba(56, 225, 255, 0.6); outline-offset: 1px; }
.hours-axis { display: flex; justify-content: space-between; font: 9.5px var(--mono); color: var(--dim); }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 14px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg {
  font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 0; padding: 8px 12px; cursor: pointer;
}
.seg + .seg { border-left: 1px solid var(--line); }
.seg.active { color: var(--bg); background: var(--accent); }
.cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cat {
  font: 500 11px var(--mono); letter-spacing: 0.06em; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px 6px 22px; cursor: pointer; position: relative;
}
.cat::before { content: ""; position: absolute; left: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--cat); }
.cat.active { color: var(--text); border-color: var(--cat); box-shadow: 0 0 12px color-mix(in srgb, var(--cat) 35%, transparent); }
.search {
  flex: 1; min-width: 160px; font: 13px var(--mono); color: var(--text);
  background: rgba(5, 8, 13, 0.6); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
.search:focus { outline: none; border-color: var(--accent); }
.live { display: inline-flex; align-items: center; gap: 6px; font: 500 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.live.on { color: var(--ok); }
.live.on .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* Timeline */
.timeline { display: grid; gap: 16px; }
.tl-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.tl-head { padding: 12px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(56, 225, 255, 0.07), transparent 60%); }
.tl-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 500 11px var(--mono); letter-spacing: 0.1em; color: var(--muted); }
.tl-id { color: var(--accent); font-weight: 600; letter-spacing: 0.18em; }
.tl-chan { padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--text); }
.tl-open { color: var(--ok); }
.tl-summary { margin: 6px 0 0; color: var(--text); font-size: 13.5px; opacity: 0.85; }
.tl-items { position: relative; padding: 6px 0; }
.tl-items::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(16px + 76px + 12px + 8.5px); width: 1px; background: linear-gradient(var(--line-strong), var(--line)); }

.tl-entry { position: relative; padding: 0 16px; cursor: pointer; outline: none; }
.tl-entry:hover, .tl-entry:focus-visible { background: rgba(56, 225, 255, 0.04); }
.tl-entry:focus-visible { box-shadow: inset 2px 0 0 var(--accent); }
.tl-line { display: grid; grid-template-columns: 76px 18px minmax(0, 1fr) auto; align-items: center; gap: 0 12px; padding: 10px 0; }
.tl-time { font: 500 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-node { position: relative; z-index: 1; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cat); box-shadow: 0 0 10px color-mix(in srgb, var(--cat) 60%, transparent); justify-self: center; }
.tl-label { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tl-tool { font: 600 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--cat); white-space: nowrap; }
.tl-raw { font: 11px var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-desc { margin-top: 2px; overflow-wrap: anywhere; }
.tl-metrics { display: flex; align-items: center; gap: 12px; }
.tl-meter { width: 70px; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.tl-meter span { display: block; height: 100%; background: var(--cat); }
.tl-ms { min-width: 58px; text-align: right; font: 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-badges { display: flex; gap: 6px; min-width: 66px; justify-content: flex-end; }
.tl-badge { font: 600 10px/1 var(--mono); letter-spacing: 0.1em; padding: 4px 6px; border-radius: 4px; border: 1px solid currentColor; }
.tl-badge.ok { color: var(--ok); }
.tl-badge.warn { color: var(--warn); }
.tl-badge.bad { color: var(--danger); }
.tl-badge.run { color: var(--accent); }
.tl-badge.undo { color: var(--warn); background: rgba(255, 184, 77, 0.1); }
.tl-entry.undone .tl-desc { text-decoration: line-through; text-decoration-color: rgba(255, 184, 77, 0.7); color: var(--muted); }
.tl-entry.undone .tl-node { border-style: dashed; }

.tl-entry.incoming { animation: incoming 2.6s ease-out; }
.tl-entry.incoming::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(56, 225, 255, 0.25), transparent);
  animation: scan 1s ease-out;
}
@keyframes incoming { from { background: rgba(56, 225, 255, 0.16); } to { background: transparent; } }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.tl-details { margin: 0 0 12px calc(76px + 18px + 24px); padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(5, 8, 13, 0.6); cursor: default; }
.tl-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 12px; font: 11.5px var(--mono); }
.tl-meta dt { color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.tl-meta dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.tl-json { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tl-json-title { font: 600 10px var(--mono); letter-spacing: 0.18em; color: var(--accent); margin-bottom: 6px; }
.json { margin: 0; padding: 10px; max-height: 280px; overflow: auto; font: 12px/1.5 var(--mono); color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.j-key { color: var(--accent); }
.j-str { color: #e6edf3; }
.j-num { color: var(--warn); }
.j-lit { color: #f472b6; }

.more {
  display: block; margin: 18px auto 0; font: 600 11px var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 18px; cursor: pointer;
}
.more:hover { box-shadow: 0 0 14px rgba(56, 225, 255, 0.3); }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-wide { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .tabs { order: 2; }
  .history { padding: 14px 16px 32px; }
  .tl-items::before { left: calc(16px + 5px); }
  .tl-line { grid-template-columns: 12px minmax(0, 1fr); grid-template-areas: "node time" "node main" "node metrics"; gap: 2px 10px; }
  .tl-time { grid-area: time; }
  .tl-node { grid-area: node; align-self: start; margin-top: 3px; }
  .tl-main { grid-area: main; }
  .tl-metrics { grid-area: metrics; justify-content: flex-start; margin-top: 4px; }
  .tl-details { margin-left: 22px; }
  .tl-json { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .tl-entry.incoming, .tl-entry.incoming::after, .live.on .dot { animation: none; }
}

/* Reminders with details, notes with title */
.card-title { margin: 0 0 4px; font: 600 14px var(--sans); color: #f2fbff; }
.card.open .card-text { -webkit-line-clamp: unset; display: block; white-space: pre-wrap; }
.card-toggle {
  margin-top: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}

/* Checkboxes (complete / reopen from the panel) */
.check {
  flex: none; position: relative; width: 16px; height: 16px; padding: 0; cursor: pointer;
  border: 1.5px solid var(--accent); border-radius: 4px; background: transparent;
  transform: translateY(2px); transition: background 0.15s, box-shadow 0.15s;
}
.check:hover { box-shadow: 0 0 10px rgba(56, 225, 255, 0.45); background: var(--accent-soft); }
.check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check.checked { background: var(--accent); }
.check.checked::after {
  content: ""; position: absolute; left: 4px; top: 0px; width: 4px; height: 8px;
  border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.row.acting .text { text-decoration: line-through; opacity: 0.45; transition: opacity 0.2s; }
.row.acting .check { background: var(--accent); }


/* Manual add / remove */
.head-right { display: inline-flex; align-items: center; gap: 10px; }
.add-btn {
  display: grid; place-items: center; width: 24px; height: 24px; padding: 0; cursor: pointer;
  font: 600 14px/1 var(--mono); color: var(--accent); background: transparent;
  border: 1px solid var(--line-strong); border-radius: 6px; transition: transform 0.15s, background 0.15s;
}
.add-btn:hover { background: var(--accent-soft); box-shadow: 0 0 10px rgba(56, 225, 255, 0.35); }
.add-btn.open { transform: rotate(45deg); background: var(--accent-soft); }
.quick-add { display: grid; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(56, 225, 255, 0.04); }
.quick-add input {
  width: 100%; min-width: 0; font: 14px var(--sans); color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color-scheme: dark;
}
.quick-add input:focus { outline: none; border-color: var(--accent); }
.quick-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.quick-row label { display: grid; gap: 4px; font: 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.quick-actions { display: flex; align-items: center; gap: 8px; }
.quick-hint { flex: 1; font: 10.5px var(--mono); color: var(--dim); }
.quick-actions button {
  font: 600 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
  border-radius: 999px; padding: 8px 14px; border: 1px solid var(--line-strong);
}
.quick-actions .primary { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.quick-actions .primary:disabled { opacity: 0.6; cursor: wait; }
.quick-actions .ghost { color: var(--muted); background: transparent; }

.row-remove {
  flex: none; width: 22px; height: 22px; padding: 0; margin-left: 4px; cursor: pointer;
  font: 16px/1 var(--sans); color: var(--dim); background: transparent; border: 0; border-radius: 6px;
  opacity: 0; transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.row:hover .row-remove, .row-remove:focus-visible { opacity: 1; }
.row-remove:hover { color: var(--danger); background: rgba(255, 107, 107, 0.1); }
@media (hover: none) { .row-remove { opacity: 0.6; } }

.inline-add { margin: 6px 0 4px; }
.inline-add input {
  width: 100%; font: 13px var(--sans); color: var(--text); background: transparent;
  border: 0; border-bottom: 1px dashed var(--line-strong); padding: 6px 2px;
}
.inline-add input::placeholder { color: var(--dim); }
.inline-add input:focus { outline: none; border-bottom-color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 16px; border-radius: 10px; font-size: 14px;
  background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.18s ease-out;
}
.toast.error { border-color: rgba(255, 107, 107, 0.6); color: var(--danger); }
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast button {
  flex: none; font: 600 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
  color: var(--accent); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

.list-block summary .row-remove { opacity: 0.7; }

/* Conversation memory, now in the history view */
.panel-memory { margin: 18px 0 4px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 10px; align-items: start; }
.card-grid .card + .card { margin-top: 0; }
.memory-grid { max-height: 280px; }

/* Tarefas: board with one lane per moment */
.board-view { display: flex; flex-direction: column; gap: 12px; height: calc(100vh - 71px); min-height: 520px; padding: 16px 24px 20px; }
.board-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.board-filter {
  font: 600 11px var(--mono); letter-spacing: 0.08em; color: var(--muted); cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
}
.board-filter:hover { color: var(--text); }
.board-filter.active { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.board { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(235px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.lane {
  --lane: var(--accent);
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--lane); border-radius: var(--radius);
  transition: border-color 0.12s, background 0.12s;
}
.lane-past { --lane: var(--warn); }
.lane-next { --lane: #96aaff; }
.lane-undated { --lane: var(--muted); }
.lane-done { --lane: var(--ok); }
.lane.drop-target { border-color: var(--lane); background: var(--accent-soft); }
.lane-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; }
.lane-title { flex: 1; margin: 0; font: 600 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--lane); }
.lane-count { font: 12px var(--mono); color: var(--muted); }
.lane-add {
  width: 26px; height: 26px; cursor: pointer; font: 600 16px/1 var(--mono); color: var(--lane);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 6px;
}
.lane-add:hover, .lane-add.open { background: var(--accent-soft); }
.lane-form { display: grid; gap: 6px; padding: 0 12px 10px; }
.lane-form input { width: 100%; min-width: 0; padding: 8px 10px; color: var(--text); font: 14px var(--sans); background: rgba(5, 10, 16, 0.6); border: 1px solid var(--line); border-radius: 6px; }
.lane-form input:focus { outline: none; border-color: var(--lane); }
.lane-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lane-form-row input:only-child { grid-column: 1 / -1; }
.lane-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lane-form-hint { font: 10.5px var(--mono); color: var(--dim); }
.lane-form-actions button { cursor: pointer; font: 600 11px var(--mono); color: var(--bg); background: var(--lane); border: 0; border-radius: 6px; padding: 7px 12px; }
.lane-cards { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 12px 12px; }
.task-card { flex: none; padding: 10px 10px 8px; background: rgba(5, 10, 16, 0.55); border: 1px solid var(--line); border-radius: 8px; cursor: grab; }
.task-card:hover { border-color: var(--line-strong); }
.task-card.dragging { opacity: 0.4; }
.task-card.acting { opacity: 0.5; }
.task-top { display: flex; align-items: flex-start; gap: 8px; }
.task-title { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.task-card .check { flex: none; margin-top: 1px; }
.task-card .row-remove { flex: none; margin: -2px -2px 0 0; }
.task-card:hover .row-remove { opacity: 1; }
.task-done .task-title { color: var(--muted); text-decoration: line-through; }
.task-details { margin: 6px 0 0 26px; font-size: 12.5px; color: var(--muted); }
.task-details summary { cursor: pointer; font: 11px var(--mono); color: var(--accent); }
.task-details p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0 26px; font: 11px var(--mono); color: var(--muted); }
.task-time { color: var(--text); }
.task-card.late .task-time { color: var(--warn); }
.task-tag { padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 10.5px; line-height: 1.6; color: var(--dim); }
.card-date { padding: 1px 3px; color: var(--muted); font: 11px var(--mono); background: transparent; border: 1px solid transparent; border-radius: 4px; cursor: pointer; }
.card-date:hover, .card-date:focus { border-color: var(--line-strong); outline: none; }
.lane-empty { padding: 4px 2px; font-size: 13px; color: var(--dim); }
@media (hover: none) { .task-card .row-remove { opacity: 0.6; } }
@media (max-width: 720px) {
  .board-view { height: auto; min-height: 0; padding: 12px 16px 20px; }
  .board { grid-auto-columns: 86%; scroll-snap-type: x proximity; }
  .lane { scroll-snap-align: start; max-height: 72vh; }
}

/* Five tabs don't fit beside the rest of the top bar: they get their own row. */
@media (max-width: 1180px) {
  .topbar { flex-wrap: wrap; gap: 12px 20px; }
  .tabs { order: 2; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .tab { flex: 1 0 auto; }
  .layout { height: auto; min-height: 0; }
  .core { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; max-width: 760px; gap: 16px; }
  .chat { height: 52vh; min-height: 320px; }
  .board-view { height: calc(100vh - 120px); }
}
@media (max-width: 720px) {
  .tabs { gap: 2px; }
  .tab { padding: 8px; font-size: 10px; letter-spacing: 0.04em; }
  .board-view { height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .line.typing > span:last-child, .line.typing::before, .line.typing::after { animation: none; opacity: 0.6; }
}
/* The top bar stays one line during a conversation. */
@media (min-width: 1181px) and (max-width: 1400px) {
  #chip-voice { display: none; }
}

/* Badges: chips on task cards, the picker, the filter and the manager (tags.js) */
.badge-cyan { --badge: #38e1ff; }
.badge-violet { --badge: #a78bfa; }
.badge-green { --badge: #4ade80; }
.badge-pink { --badge: #f472b6; }
.badge-amber { --badge: #ffb84d; }
.badge-red { --badge: #ff6b6b; }
.badge-blue { --badge: #96aaff; }
.badge-gray { --badge: #9aa9b6; }
.badge {
  display: inline-block; max-width: 100%; padding: 1px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 10.5px/1.55 var(--mono); letter-spacing: 0.02em; color: var(--badge, var(--muted));
  background: color-mix(in srgb, var(--badge, var(--muted)) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--badge, var(--muted)) 40%, transparent); border-radius: 999px;
}
.task-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0 26px; cursor: pointer; }
.tag-edit {
  flex: none; width: 22px; height: 22px; padding: 0; margin: -2px 0 0; cursor: pointer;
  font: 600 12px/1 var(--mono); color: var(--dim); background: transparent; border: 0; border-radius: 6px;
  opacity: 0; transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.task-card:hover .tag-edit, .tag-edit:focus-visible, .tag-edit.open { opacity: 1; }
.tag-edit:hover, .tag-edit.open { color: var(--accent); background: var(--accent-soft); }
@media (hover: none) { .task-card .tag-edit { opacity: 0.6; } }
.tag-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 8px 0 2px 26px; padding: 8px; cursor: default; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 8px; }
.tag-picker-list { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-picker-empty { font: 11px var(--mono); color: var(--dim); }
.tag-option { max-width: 100%; padding: 0; cursor: pointer; background: none; border: 0; border-radius: 999px; opacity: 0.45; transition: opacity 0.12s; }
.tag-option:hover { opacity: 0.8; }
.tag-option.on { opacity: 1; }
.tag-option.on .badge::before { content: "✓ "; }
.tag-option:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.tag-picker-new, .tag-new { display: flex; gap: 6px; }
.tag-picker-new input, .tag-new input, .tag-name {
  flex: 1; min-width: 0; padding: 6px 8px; color: var(--text); font: 13px var(--sans);
  background: rgba(5, 10, 16, 0.6); border: 1px solid var(--line); border-radius: 6px;
}
.tag-picker-new input:focus, .tag-new input:focus, .tag-name:focus { outline: none; border-color: var(--line-strong); }
.tag-picker-done, .tag-new button {
  flex: none; cursor: pointer; font: 600 11px var(--mono); color: var(--bg); background: var(--accent); border: 0; border-radius: 6px; padding: 6px 12px;
}
.board-filter.tag-filter { color: var(--badge); border-color: color-mix(in srgb, var(--badge) 40%, transparent); }
.board-filter.tag-filter.active { color: var(--bg); background: var(--badge); border-color: var(--badge); }
.board-manage { margin-left: auto; border-style: dashed; }
.tag-manager-slot { max-width: 560px; }
.tag-manager { display: grid; gap: 6px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tag-manager-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 2px; }
.tag-manager-title { margin: 0; font: 600 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.tag-manager-hint { font: 10.5px var(--mono); color: var(--dim); }
.tag-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.tag-row .tag-name { color: var(--badge); font-weight: 600; }
.tag-swatch { width: 18px; height: 18px; padding: 0; cursor: pointer; background: var(--badge); border: 2px solid color-mix(in srgb, var(--badge) 45%, var(--bg)); border-radius: 50%; }
.tag-swatch:focus-visible { outline: 1px solid var(--text); outline-offset: 2px; }
.tag-count { font: 11px var(--mono); color: var(--muted); white-space: nowrap; }
.tag-manager .tag-remove { opacity: 0.7; }
.tag-new { margin-top: 4px; }

/* Items and details typed when adding a task. */
.lane-form textarea {
  width: 100%; min-width: 0; resize: vertical; min-height: 64px; padding: 8px 10px; color: var(--text);
  font: 13px/1.45 var(--sans); background: rgba(5, 10, 16, 0.6); border: 1px solid var(--line); border-radius: 6px;
}
.lane-form textarea:focus { outline: none; border-color: var(--lane); }
.lane-form-hint { flex: 1; }
.lane-form-actions .lane-form-more {
  color: var(--muted); background: transparent; border: 1px dashed var(--line-strong); font-weight: 500;
}
.lane-form-actions .lane-form-more:hover { color: var(--text); border-color: var(--lane); }
.task-items { margin: 4px 0 0; padding-left: 16px; color: var(--text); font-size: 13px; line-height: 1.45; }
.task-items li { overflow-wrap: anywhere; }
.task-items li::marker { color: var(--accent); }
.task-details.has-items summary { color: var(--muted); }

/* Heads-up banner: a timed task starts soon. Hangs under the top bar, on every tab. */
.heads-up {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  display: grid; gap: 6px; width: min(640px, calc(100% - 32px)); z-index: 30;
}
.heads-up[hidden] { display: none; }
.heads-up-row {
  display: flex; align-items: stretch; background: var(--panel-solid); border: 1px solid var(--warn);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 0 3px rgba(255, 184, 77, 0.08);
  animation: heads-up-in 0.25s ease-out;
}
.heads-up-row.now { border-color: var(--danger); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 0 3px rgba(255, 107, 107, 0.12); }
.heads-up-open {
  flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; padding: 10px 14px;
  color: var(--text); background: transparent; border: 0; cursor: pointer; text-align: left; font: 14px var(--sans);
}
.heads-up-when { flex: none; font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--warn); }
.heads-up-row.now .heads-up-when { color: var(--danger); }
.heads-up-time { flex: none; font: 12px var(--mono); color: var(--muted); }
.heads-up-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heads-up-list { flex: none; font: 10.5px var(--mono); color: var(--dim); }
.heads-up-close {
  flex: none; width: 40px; color: var(--muted); background: transparent; border: 0; border-left: 1px solid var(--line);
  font: 18px/1 var(--sans); cursor: pointer;
}
.heads-up-close:hover { color: var(--text); }
.heads-up-more { justify-self: center; font: 11px var(--mono); color: var(--muted); }
@keyframes heads-up-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .heads-up-row { animation: none; } }
@media (max-width: 720px) {
  .heads-up-open { flex-wrap: wrap; row-gap: 2px; }
  .heads-up-text { flex-basis: 100%; white-space: normal; }
  .heads-up-list { display: none; }
}

/* Editing a card's items in place (✎). */
.task-edit {
  flex: none; width: 22px; height: 22px; padding: 0; margin: -2px 0 0; cursor: pointer;
  font: 13px/1 var(--sans); color: var(--dim); background: transparent; border: 0; border-radius: 6px;
  opacity: 0; transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.task-card:hover .task-edit, .task-edit:focus-visible, .task-edit.open { opacity: 1; }
.task-edit:hover, .task-edit.open { color: var(--accent); background: var(--accent-soft); }
@media (hover: none) { .task-card .task-edit { opacity: 0.6; } }
.task-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 8px 0 2px 26px; cursor: default; }
.task-editor-text {
  width: 100%; min-width: 0; resize: vertical; padding: 8px 10px; color: var(--text); font: 13px/1.45 var(--sans);
  background: rgba(5, 10, 16, 0.8); border: 1px solid var(--line-strong); border-radius: 6px;
}
.task-editor-text:focus { outline: none; border-color: var(--accent); }
.task-editor-bar { display: flex; align-items: center; gap: 6px; }
.task-editor-hint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 10px var(--mono); color: var(--dim); }
.task-editor-bar button { flex: none; cursor: pointer; font: 600 11px var(--mono); border-radius: 6px; padding: 6px 10px; }
.task-editor-cancel { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.task-editor-save { color: var(--bg); background: var(--accent); border: 1px solid var(--accent); }
@media (hover: none) { .task-editor-hint { display: none; } }

/* What conversations cost at OpenAI (estimate). */
.kpi-money small { margin: 0 4px 0 0; }
.tl-cost { margin-left: auto; padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--warn); font-variant-numeric: tabular-nums; }
