/* Capture (voice → tasks and notes) and Ask Nexus. */

.capture-page { max-width: 1040px; display: flex; flex-direction: column; gap: 18px; padding-top: 14px; }
.recorder { padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 14px; border-radius: var(--r-xl); transition: box-shadow .2s, border-color .2s; }
.recorder.is-recording { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.rec-stage { display: flex; align-items: center; gap: 22px; }
.mic-btn {
  width: 84px; height: 84px; border-radius: 50%; padding: 0; border: 0; flex: none; position: relative;
  background: var(--accent); color: var(--accent-fg); box-shadow: none; transition: background .2s, transform .15s;
}
.mic-btn:hover { background: var(--accent-hover); }
.mic-btn.recording { background: var(--bad); color: #fff; box-shadow: none; }
.mic-btn.recording::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--bad); animation: ripple 1.6s var(--ease) infinite; }
.mic-btn.busy { background: var(--surface-3); color: var(--text-2); box-shadow: none; }
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(1.45); opacity: 0; } }
.rec-side { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wave { display: flex; align-items: center; gap: 3px; height: 40px; flex: 1; }
.wave i { width: 4px; height: 4px; border-radius: 3px; background: var(--border-strong); transition: height .08s linear; }
.recorder.is-recording .wave i { background: var(--bad); }
.rec-timer { font-size: 22px; font-weight: 600; min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.live-transcript { min-height: 24px; font-size: 15px; line-height: 1.6; color: var(--text); }
.live-transcript:empty { display: none; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); vertical-align: -3px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.rec-options { gap: 8px; }
.rec-options .btn-group button { height: 26px; font-size: 12.5px; }
.type-row { display: flex; gap: 10px; align-items: flex-end; border-top: 1px solid var(--border); padding-top: 14px; }
.capture-text { resize: vertical; min-height: 60px; }
.processing-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; color: var(--accent-text); }
.transcript-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.capture-summary { margin: -4px 0 0 24px; }
.transcript { font-size: 15px; line-height: 1.65; white-space: pre-wrap; color: var(--text); border-left: 3px solid var(--accent); padding-left: 12px; }
.capture-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.capture-cols .section-title { margin-top: 4px; }
.capture-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-1); transition: opacity .15s; }
.capture-item.type-task { border-left: 3px solid var(--accent); }
.capture-item.type-note { border-left: 3px solid var(--c-amber); }
.capture-item.excluded { opacity: .5; }
.item-title { font-weight: 500; height: 28px; }
.item-body { font-size: 13.5px; resize: vertical; }
.item-checklist { list-style: none; margin: 0 0 0 30px; padding: 0; font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; }
.item-checklist li { display: flex; align-items: center; gap: 6px; }
.item-chips { gap: 6px; padding-left: 28px; }
.type-pill { height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; gap: 4px; border: 0; flex: none; }
.type-pill.task { background: var(--accent-soft); color: var(--accent-text); }
.type-pill.note { background: color-mix(in srgb, var(--c-amber) 18%, transparent); color: var(--warn); }
.capture-actions { display: flex; align-items: center; gap: 10px; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 35%); }
.saved-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.ok-badge { width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; }
@media (max-width: 800px) { .capture-cols { grid-template-columns: 1fr; } .rec-stage { flex-direction: column; align-items: stretch; } .mic-btn { align-self: center; } .type-row { flex-direction: column; align-items: stretch; } }

/* Ask Nexus */
.ask-page { max-width: 760px; display: flex; flex-direction: column; min-height: calc(100vh - 72px); padding-bottom: 20px; }
.ask-thread { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 12px 0 20px; }
.ask-intro { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 10px; }
.ask-intro .art { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: color-mix(in srgb, var(--c-violet) 15%, transparent); color: var(--c-violet); }
.ask-intro .banner { border-radius: var(--r); }
.ask-q { align-self: flex-end; max-width: 80%; background: var(--accent); color: var(--accent-fg); padding: 10px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; }
.ask-a { align-self: flex-start; max-width: 92%; background: var(--surface); border: 1px solid var(--border); padding: 12px 16px; border-radius: 16px 16px 16px 4px; box-shadow: var(--shadow-1); }
.ask-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.ask-sources .chip-btn { max-width: 260px; }
.ask-form { position: sticky; bottom: 12px; display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 16px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 22px; box-shadow: var(--shadow-2); }
.ask-form textarea { border: 0; resize: none; padding: 7px 0; background: transparent; min-height: 36px; }
.ask-form textarea:focus { box-shadow: none; }
.ask-form button { border-radius: 50%; }

/* Brainstorm */
.bs-page { display: flex; flex-direction: column; gap: 12px; }
.bs-start { padding: 18px; display: flex; flex-direction: column; gap: 14px; max-width: 920px; }
.bs-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.bs-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; height: auto; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); white-space: normal; }
.bs-mode[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.bs-mode-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c-amber) 18%, transparent); color: var(--c-amber); flex: none; }
.bs-mode-icon.sm { width: 26px; height: 26px; border-radius: 8px; }
.bs-start-form { display: grid; grid-template-columns: minmax(0, 1fr) 200px auto; gap: 8px; }
.bs-starters { gap: 6px; }
.bs-recent { max-width: 920px; }
.bs-recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bs-recent-list li { display: flex; align-items: center; gap: 4px; }
.bs-recent-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: auto; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); text-align: left; }
.chip.live { background: color-mix(in srgb, var(--c-red) 14%, transparent); color: var(--c-red); }
.chip.live .icon { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.bs-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bs-title { display: flex; align-items: center; gap: 6px; height: auto; padding: 2px 6px; background: none; border: 0; min-width: 0; }
.bs-title h2 { font-size: 18px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-title .icon { opacity: .4; }
.bs-wrapped { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--accent-text); }
.bs-wrapped.ok { background: color-mix(in srgb, var(--c-green) 14%, transparent); color: var(--text); }
.bs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.bs-chat { display: flex; flex-direction: column; min-height: calc(100vh - 170px); min-width: 0; }
.bs-thread { flex: 1; }
.bs-intro .art { background: color-mix(in srgb, var(--c-amber) 16%, transparent); color: var(--c-amber); }
.bs-via { display: inline-flex; vertical-align: -2px; margin-right: 6px; opacity: .75; }
.bs-form .icon-btn.recording { background: var(--c-red); color: #fff; border-color: transparent; }
.bs-board { position: sticky; top: 8px; max-height: calc(100vh - 90px); overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
/* The hint sits on its own line under the title, so neither is squeezed or cut in a narrow column. */
.bs-board-head { display: flex; flex-direction: column; gap: 2px; }
.bs-board-head > .row { gap: 8px; }
.bs-board-hint { margin: 0; padding-left: 24px; }
.bs-list-head { gap: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.bs-list ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bs-item { display: flex; align-items: flex-start; gap: 2px; padding: 5px 4px 5px 8px; border-radius: var(--r); background: var(--surface-2, var(--bg)); font-size: 13px; line-height: 1.4; }
.bs-item > .grow { padding-top: 3px; overflow-wrap: anywhere; }
.bs-item .icon-btn { opacity: 0; transition: opacity .12s; }
.bs-item:hover .icon-btn, .bs-item:focus-within .icon-btn, .bs-item.pinned .icon-btn:first-of-type { opacity: 1; }
.bs-item.pinned { box-shadow: inset 3px 0 0 var(--c-amber); }
.bs-item.new { animation: bs-new 1.6s var(--ease); }
@keyframes bs-new { from { background: color-mix(in srgb, var(--c-amber) 30%, transparent); } }
.bs-empty { margin: 4px 0 0 2px; }
.bs-review-dialog { width: min(760px, calc(100vw - 24px)); }
.bs-review { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); }
.bs-review .dialog-body { overflow: auto; min-height: 0; }
.bs-review-note { border: 1px solid var(--border); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.bs-review-md { max-height: 320px; overflow: auto; }
.bs-review-note textarea { font-family: var(--mono, monospace); font-size: 13px; }
.bs-review-tasks { margin-top: 8px; }
@media (max-width: 900px) {
  .bs-layout { grid-template-columns: 1fr; }
  .bs-board { position: static; max-height: none; }
  .bs-chat { min-height: 0; }
  .bs-start-form { grid-template-columns: 1fr; }
  .bs-item .icon-btn { opacity: 1; }
}
/* Ask by voice */
.ask-form .ask-mic { --lvl: 0; position: relative; flex: none; }
.ask-form .ask-mic.recording { background: var(--bad); color: #fff; border-color: transparent; outline: 2px solid color-mix(in srgb, var(--bad) 55%, transparent); outline-offset: calc(2px + var(--lvl) * 8px); transition: outline-offset .08s linear; }
.ask-q .bs-via { display: inline-flex; vertical-align: -2px; margin-right: 6px; opacity: .7; }
