/* ── Self-hosted fonts (no render-blocking cross-origin Google Fonts request) ── */
@font-face {
  font-family: "Poppins";
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  /* Open Sans latin ships as a single variable file; one face covers 400–700. */
  font-family: "Open Sans";
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/opensans.woff2") format("woff2");
}

/* ── Hark — faithful to the Claude Design "Capture Screen" handoff ─────────────
   Tokens taken verbatim from the .dc.html / handoff README. */
:root {
  --paper: #fbf7f2;        /* screen background */
  --backdrop: #e9e6df;     /* outside the phone column */
  --surface: #ffffff;
  --ink: #1f2a26;          /* headings / primary text */
  --ink-2: #27302b;        /* card labels */
  --muted: #8b938c;        /* subtitle / muted */
  --muted-2: #9aa29b;      /* inactive nav */
  --green: #104744;        /* brand: wordmark, active nav, buttons */
  --green-icon: #18514a;   /* icon strokes */
  --green-line: #5f9e86;   /* sage accent */
  --chip: #e3eae2;         /* icon-chip background */
  --border: #ece9e2;       /* card borders */
  --border-2: #e7e4d9;     /* nav top border */
  --danger: #c2483f;
  --ok: #2f8f6b;
  --radius: 18px;
  /* Motion easings (impeccable: natural deceleration, no bounce/elastic). */
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --font: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-brand: "Poppins", var(--font);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--backdrop);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-size: 14px; }

/* ── Phone column ─────────────────────────────────────────────────────────── */
#app {
  position: relative;
  width: 100%;
  max-width: 393px;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  overflow: hidden;
}

/* ── Header (logo + wordmark) ─────────────────────────────────────────────── */
.topbar {
  flex: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: calc(22px + var(--safe-top)) 24px 4px;
}
.brand { display: flex; align-items: center; gap: 18px; }
.topbar .mark { height: 43px; width: auto; display: block; }
.wordmark {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 29px;
  letter-spacing: 0.18em;
  color: var(--green);
  line-height: 1;
}
/* ── Waveform-H mark ──────────────────────────────────────────────────────── */
/* The bars "listen": always on the login screen, and while recording in the
   topbar (capture.js toggles .listening on #brand-mark). */
.hark-mark .wave-bar { transform-origin: center 60px; }
.hark-mark.listening .wave-bar { animation: hark-listen 1.05s var(--ease-out-quart) infinite; }
.hark-mark.listening .wave-bar:nth-child(2) { animation-delay: 0.14s; }
.hark-mark.listening .wave-bar:nth-child(3) { animation-delay: 0.28s; }
.hark-mark.listening .wave-bar:nth-child(4) { animation-delay: 0.42s; }
.hark-mark.listening .wave-bar:nth-child(5) { animation-delay: 0.56s; }
@keyframes hark-listen {
  0%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(1.45); }
  70% { transform: scaleY(0.72); }
}
@media (prefers-reduced-motion: reduce) {
  .hark-mark.listening .wave-bar { animation: none; }
}

.notice-region {
  flex: none;
  min-height: 52px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  padding: 6px 24px 2px;
}
.capture-notice-region {
  min-height: 0;
  margin-top: 12px;
  padding: 0;
}
.badge { /* calm, actionable status; additional notices flow right, then wrap */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  background: var(--chip);
  color: var(--green);
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}

/* ── Main scroll area ─────────────────────────────────────────────────────── */
/* No scrollbar — the faint .scroll-hint chevrons signal overflow instead. */
#view { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 24px 28px; scrollbar-width: none; }
#view::-webkit-scrollbar { display: none; }
/* Recall pins its Search/Chat toggle as a footer; #recall-body scrolls instead. */
#view.view-lock { overflow: hidden; padding-bottom: 0; }

/* ── Bottom nav ───────────────────────────────────────────────────────────── */
.tabbar {
  flex: none;
  display: flex;
  border-top: 1px solid var(--border-2);
  background: var(--paper);
  padding: 10px 8px calc(10px + var(--safe-bottom));
}
.tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted-2);
}
.tab svg { width: 24px; height: 24px; display: block; }
.tab.active { color: var(--green); font-weight: 600; }

/* ── Controls ─────────────────────────────────────────────────────────────── */
button { font-family: var(--font); cursor: pointer; }
.btn, .send-btn {
  width: 100%;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  transition: filter .15s ease, transform .14s var(--ease-out-quint);
}
.btn:active, .send-btn:active { transform: scale(0.96); filter: brightness(1.06); }
.btn:disabled, .send-btn:disabled { opacity: .6; }
input, textarea {
  font-family: var(--font);
  font-size: 17px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  width: 100%;
}
input:focus, textarea:focus { outline: none; border-color: var(--green); }
textarea { resize: vertical; }
a { color: var(--green); }

/* ── Login ────────────────────────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; display: grid; place-items: center; background: var(--paper); z-index: 50; padding: 28px; }
.card {
  width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.card .logo { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 4px; }
.card .logo .mark { height: 52px; }
.card .logo .wordmark { font-size: 32px; }
.tagline { color: var(--muted); font-size: 15px; margin-bottom: 6px; line-height: 1.4; }

/* ── Capture (the main screen — pixel-faithful idle state) ────────────────── */
/* Keep the quiet 52px notice slot that used to sit beneath the header. Notices
   now belong below the capture actions, but the opening composition stays put. */
.capture-head { margin-top: 64px; text-align: center; }
.capture-head h1 { font-weight: 500; font-size: 27px; line-height: 1.18; letter-spacing: -0.003em; color: var(--ink); }
.action-list { margin-top: 30px; display: flex; flex-direction: column; gap: 8px; }
.action-row {
  display: flex; align-items: center; gap: 32px; width: 100%; text-align: left;
  background: transparent; border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 15px 18px; cursor: pointer; font-family: var(--font);
  transition: background .15s ease, transform .14s var(--ease-out-quint);
}
.action-row:active { background: rgba(31,42,38,0.06); transform: scale(0.965); }
.action-row .grow { flex: 1 1 auto; min-width: 0; font-size: 18px; font-weight: 500; color: var(--ink-2); }
.chip {
  flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--chip);
  display: flex; align-items: center; justify-content: center;
}
.chip svg { width: 24px; height: 24px; stroke: var(--green-icon); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* recording + recorded states (same visual language) */
.action-row.recording { border-color: var(--green); }
.chip.pulse { animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(16,71,68,.30); } 50% { box-shadow: 0 0 0 9px rgba(16,71,68,0); } }
.chip.live { background: var(--green); }
.chip.live svg { stroke: #fff; }
.eq { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 3px; height: 30px; overflow: hidden; }
.eq-bar { width: 3px; height: 3px; background: var(--green); border-radius: 2px; }
.rec-time { flex: none; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; font-weight: 600; min-width: 38px; text-align: right; }
.rec-stop { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--danger); border: none; display: grid; place-items: center; }
.rec-stop svg { width: 15px; height: 15px; fill: #fff; }
.action-row.recorded .grow { color: var(--ink-2); }
.rec-clear { flex: none; display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1.5px solid var(--border); border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--green); }
.rec-clear svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.attach-pill { display: flex; align-items: center; gap: 10px; background: transparent; border: 1.5px solid var(--border); border-radius: 999px; padding: 10px 14px; font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.attach-pill .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-pill button { background: none; border: none; color: var(--muted); width: 22px; height: 22px; display: grid; place-items: center; }
.attach-pill button svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.composer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.composer-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }

/* Full-screen compose sheet, anchored at the TOP and sized to the visible area
   (--vvh = window.visualViewport.height, set in capture.js). A bottom keyboard can
   never cover a top-anchored field, so this needs no keyboard-height math. It's a
   sibling of #app layered above, so the capture/recall/today shell is untouched. */
#compose-overlay {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 393px;
  height: var(--vvh, 100dvh);
  background: var(--paper);
  z-index: 70;
  display: flex;
  flex-direction: column;
  padding: calc(16px + var(--safe-top)) 24px 16px;
  overscroll-behavior: contain;
}
#compose-overlay.hidden { display: none !important; }
.compose-sheet { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#compose-overlay .composer-head { margin-bottom: 10px; }
#overlay-text { flex: 1 1 auto; min-height: 0; resize: none; margin-bottom: 14px; }
#overlay-send { flex: none; margin-top: 0; }
#compose-overlay:not(.hidden) .compose-sheet { animation: hark-rise .26s cubic-bezier(.22,.61,.36,1) backwards; }
.send-btn { margin-top: 16px; }

/* Image source sheet — a bottom action sheet over the phone column. It picks the
   SOURCE only (camera vs. library); the chosen file still lands in #image-slot. */
#image-source { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
#image-source.hidden { display: none !important; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(31,42,38,0.32); }
.source-sheet {
  position: relative; width: 100%; max-width: 393px;
  background: var(--paper); border-radius: 22px 22px 0 0;
  padding: 18px 24px calc(18px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 8px;
}
.source-sheet .composer-label { margin-bottom: 4px; }
.sheet-cancel {
  margin-top: 6px; width: 100%; background: transparent;
  border: 1.5px solid var(--border); border-radius: 999px; padding: 13px;
  font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--ink-2); cursor: pointer;
  transition: background .15s ease, transform .14s var(--ease-out-quint);
}
.sheet-cancel:active { transform: scale(.97); background: rgba(31,42,38,0.06); }
#image-source:not(.hidden) .sheet-scrim { animation: hark-fade-in .2s ease; }
#image-source:not(.hidden) .source-sheet { animation: hark-sheet-up .28s var(--ease-out-quint) backwards; }
@keyframes hark-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
/* The two file inputs: rendered (so WebKit will open the picker for a programmatic
   .click()) but invisible and untouchable. Not display:none, not visibility:hidden. */
.file-input-hidden {
  position: fixed; bottom: 0; left: 0; width: 1px; height: 1px;
  opacity: 0; pointer-events: none; border: 0; padding: 0; margin: 0; overflow: hidden;
}

/* ── Shared content (Recall / Today / clarify) — same language ────────────── */
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin: 24px 2px 10px; font-weight: 700; }
.note-card { background: transparent; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; }
.note-card h3 { font-size: 16px; font-weight: 600; color: var(--ink); }
.note-card .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.note-card .snippet { color: var(--muted); margin-top: 6px; font-size: 14px; line-height: 1.5; }
.row { display: flex; align-items: center; gap: 12px; }
.row .grow { flex: 1; min-width: 0; }
/* Due/project chips live under the title so long titles never get crushed into
   a sliver; when a checkbox leads the row, indent the chips to the title text. */
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.row:has(.check) + .meta-row { padding-left: 40px; }
.pill { flex: none; font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 600; background: var(--chip); color: var(--green); text-transform: capitalize; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.check { flex: none; width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--border); background: transparent; display: grid; place-items: center; }
.check.done { background: var(--ok); border-color: var(--ok); }
.check.done::after { content: "✓"; color: #fff; font-size: 15px; }
.capture-actions { display: flex; gap: 10px; margin-top: 12px; }
.capture-actions button { flex: 1; }
/* Hold the button's height while its label is swapped for a spinner. */
.capture-actions button.is-busy { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; }
.secondary { background: transparent; color: var(--green); border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; font-weight: 600; }

/* Recall */
/* The root fills the (locked) scroll area; the toggle is a fixed footer close to
   the bottom nav, and #recall-body scrolls on its own so content stops just
   above the toggle instead of sliding beneath it. */
.recall-root { display: flex; flex-direction: column; height: 100%; }
.tabs-dock { flex: none; padding: 10px 0 12px; }
.tabs-mini { display: flex; gap: 6px; background: var(--chip); padding: 4px; border-radius: 14px; }
/* Breathing room between the HARK wordmark and the first control on the page. */
#recall-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-top: 28px; padding-bottom: 16px; }
#recall-body::-webkit-scrollbar { display: none; }
.tabs-mini button { flex: 1; background: transparent; color: var(--muted); border: none; border-radius: 11px; padding: 9px; font-weight: 600; }
.tabs-mini button.active { background: var(--paper); color: var(--green); }
.searchbar { display: flex; gap: 8px; }
.search-field { position: relative; flex: 1; display: flex; }
.search-field input { flex: 1; padding-right: 42px; }
.q-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: none; border-radius: 999px; color: var(--muted); padding: 0; }
.q-clear:active { background: var(--chip); }
.q-clear svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.searchbar button#q-btn { flex: none; min-width: 88px; background: var(--green); color: #fff; border: none; border-radius: 14px; padding: 0 18px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; transition: filter .15s ease, transform .14s var(--ease-out-quint); }
.searchbar button#q-btn:active { transform: scale(0.96); filter: brightness(1.06); }
.searchbar button#q-btn:disabled { opacity: 1; }
.spinner.spinner-light { border-color: rgba(255,255,255,.45); border-top-color: #fff; }
.results-head { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); font-weight: 700; margin: 18px 2px 10px; }
.chat { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
/* No history yet: drop the message list's reserved space entirely. */
.chat:empty { margin-top: 0; }
.chat:empty + .chat-input { margin-top: 0; }
.bubble { padding: 11px 14px; border-radius: 16px; max-width: 88%; white-space: pre-wrap; line-height: 1.45; font-size: 15px; }
.bubble.user { background: var(--green); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.bubble.asst { background: var(--surface); border: 1.5px solid var(--border); align-self: flex-start; border-bottom-left-radius: 6px; }
.chat-input { display: flex; gap: 8px; margin-top: 12px; }
.chat-input input { flex: 1; }
.chat-input button { flex: none; background: var(--green); color: #fff; border: none; border-radius: 14px; padding: 0 18px; font-weight: 600; }
/* One control row under the composer: the save-notes gate (switch leads its
   label, checkbox-style) on the left, Clear aligned under Send on the right. */
.chat-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.chat-clear { background: transparent; border: 1.5px solid var(--border); color: var(--muted); padding: 6px 12px; font-size: 13px; border-radius: 10px; font-weight: 600; }
.chat-clear.armed { color: var(--danger); border-color: var(--danger); }
/* Gates the chat agent's save_note tool. The real checkbox stays in the DOM
   (keyboard + a11y); .switch is its painted stand-in. */
.switch-row {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer;
}
.switch-input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; pointer-events: none; }
.switch {
  flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--chip);
  border: 1.5px solid var(--border); position: relative;
  transition: background .18s ease, border-color .18s ease;
}
.switch::after {
  content: ""; position: absolute; top: 50%; left: 2px; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%; background: var(--paper);
  box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .18s var(--ease-out-quint);
}
.switch-input:checked + .switch { background: var(--green); border-color: var(--green); }
.switch-input:checked + .switch::after { transform: translateY(-50%) translateX(18px); }
.switch-row:has(.switch-input:checked) { color: var(--ink); }
.switch-input:focus-visible + .switch { outline: 2px solid var(--green); outline-offset: 2px; }

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-bottom)); transform: translateX(-50%); background: var(--green); color: #fff; padding: 11px 18px; border-radius: 999px; z-index: 60; font-weight: 600; font-size: 14px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(16,71,68,.2); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; color: var(--muted); padding: 40px 0; }

/* Faint chevrons standing in for the hidden scrollbar: visible only while more
   content lies above/below the active scroll area. Positioned by scrollhint.js. */
.scroll-hint { position: fixed; z-index: 20; pointer-events: none; color: var(--muted); opacity: 0; transition: opacity .25s ease; }
.scroll-hint.on { opacity: .55; }
.scroll-hint svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* ── Motion ───────────────────────────────────────────────────────────────────
   Tasteful and restrained: short durations, transform/opacity only (GPU-friendly),
   and entirely disabled under prefers-reduced-motion (block at the very end).
   Entrance animations re-run on every render because each view replaces its
   innerHTML with fresh nodes. fill-mode `backwards` shows the start frame during
   any stagger delay but does NOT pin the end frame, so :active presses still work. */
@keyframes hark-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hark-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes hark-toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* View + sub-view entrances (chrome fades; only leaves translate, so nothing compounds) */
#app:not(.hidden) { animation: hark-fade-in .3s ease; }
/* Chrome fade for top-level view content. Exclude the loading placeholder (or the
   spinner->content swap double-fades) and .note-card (so cards rise+stagger via the
   rule below, even when they're a direct view child as in Clarify / the note reader). */
#view > *:not(.is-loading):not(.note-card) { animation: hark-fade-in .26s ease backwards; }
#recall-body > *:not(.note-card) { animation: hark-fade-in .22s ease backwards; }
.overlay:not(.hidden) .card { animation: hark-rise .3s ease backwards; }

/* Lists rise in with a gentle stagger */
.note-card,
.action-list > * { animation: hark-rise .3s cubic-bezier(.22,.61,.36,1) backwards; }
.note-card:nth-child(2),  .action-list > *:nth-child(2) { animation-delay: .03s; }
.note-card:nth-child(3),  .action-list > *:nth-child(3) { animation-delay: .06s; }
.note-card:nth-child(4),  .action-list > *:nth-child(4) { animation-delay: .09s; }
.note-card:nth-child(5),  .action-list > *:nth-child(5) { animation-delay: .12s; }
.note-card:nth-child(6) { animation-delay: .15s; }
.note-card:nth-child(n+7) { animation-delay: .18s; }

/* Toast reveal. (The capture-screen send button fades in via the #view chrome rule
   above when its .hidden class is removed — the display flip restarts the animation.) */
.toast:not(.hidden) { animation: hark-toast-in .26s cubic-bezier(.22,.61,.36,1); }

/* Press feedback — a slight give on tap, consistent across controls */
.secondary, .tabs-mini button, .chat-input button, .chat-clear,
.badge, .check, .rec-clear, .rec-stop, .attach-pill button {
  transition: transform .14s var(--ease-out-quint), filter .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.secondary:active, .chat-input button:active, .chat-clear:active, .rec-clear:active { transform: scale(.95); }
.tabs-mini button:active { transform: scale(.96); }
.badge:active { transform: scale(.93); }
.check:active, .rec-stop:active, .attach-pill button:active { transform: scale(.86); }

/* Bottom nav: press the icon + label together so the tap reads clearly. */
.tab { transition: color .18s ease, transform .14s var(--ease-out-quint); }
.tab svg { transition: transform .14s var(--ease-out-quint); }
.tab:active { transform: scale(.94); }
.tab:active svg { transform: scale(.85); }

/* Clickable result cards: press + a hover cue on pointer devices */
.note-card[data-id] { cursor: pointer; transition: transform .14s var(--ease-out-quint), border-color .15s ease, background .15s ease; }
.note-card[data-id]:active { transform: scale(.975); background: rgba(31,42,38,0.03); }
@media (hover: hover) {
  .note-card[data-id]:hover { border-color: var(--green-line); }
  .action-row:hover { background: rgba(31,42,38,0.02); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important; /* else staggered items stay at the opacity:0 start frame */
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  /* Keep the functional status indicators spinning/pulsing — they're feedback, not decoration. */
  .spinner { animation-duration: .8s !important; animation-iteration-count: infinite !important; }
  .chip.pulse { animation-duration: 1.3s !important; animation-iteration-count: infinite !important; }
}

/* Browse tab */
.browse-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px 0 16px; }
.chip-btn {
  border: 1.5px solid var(--border); background: transparent; color: var(--ink-2);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600;
}
.chip-btn.active { background: var(--chip); color: var(--green); border-color: transparent; }
.due-chip { flex: none; font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 600; background: var(--chip); color: var(--ink-2); }
.due-chip.overdue { background: #f6dcd7; color: #b3402a; }
.row-actions { display: flex; gap: 6px; }
.pin-btn { background: none; border: none; color: var(--muted); font-size: 15px; padding: 4px 6px; }
.pin-btn.pinned { color: var(--green); }
