/* Tasky — clean, white, one-hand friendly.
   Theme tokens (--brand, --on-brand, --brand-ink, --brand-line, --brand-soft) are
   injected per user by base.html from app/themes.py; defaults below = "Azzurro". */
:root {
  --brand: #02abfe;
  --on-brand: #111827;
  --brand-ink: #017db9;
  --brand-line: #badcec;
  --brand-soft: #f0f7fb;

  --tk-text: #111827;
  --tk-muted: #6b7280;
  --tk-line: var(--brand-line);
  --tk-soft: var(--brand-soft);
  --tk-accent: var(--brand);
  --tk-danger: #dc2626;
  --tk-warn: #ea580c;
  --tk-soon: #ca8a04;
  --tk-ok: #16a34a;
  --tk-tabbar-h: 60px;
  --tk-chips-h: 0px;
  --tk-safe-b: env(safe-area-inset-bottom, 0px);
}
body.has-chips { --tk-chips-h: 56px; }

html, body { background: #fff; color: var(--tk-text); }
a { color: var(--brand-ink); }
a:hover { color: var(--brand-ink); filter: brightness(.85); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body.has-dock { padding-bottom: calc(var(--tk-tabbar-h) + var(--tk-chips-h) + var(--tk-safe-b) + 88px); }

.tk-container { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.tk-header { padding: 10px 0 8px; }
.tk-header h1 { font-size: 1.5rem; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.tk-header .tk-sub { color: var(--tk-muted); font-size: .9rem; }

/* ---------- Task list ---------- */
.task-list { list-style: none; margin: 0; padding: 0; }
.task-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--tk-line);
  transition: opacity .25s ease, transform .25s ease;
}
.task-row.urg-overdue { box-shadow: inset 4px 0 0 var(--tk-danger); padding-left: 12px; margin-left: -12px; }
.task-row.is-leaving { opacity: 0; transform: translateX(24px); }

.dot {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  background: var(--c, #475569);
}
.dot-sm { width: 12px; height: 12px; display: inline-block; vertical-align: middle; }

.task-main { flex: 1 1 auto; min-width: 0; color: inherit; text-decoration: none; padding: 4px 0; }
.task-title { display: block; font-size: 1.05rem; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; font-size: .85rem; color: var(--tk-muted); }

.task-meta .bi { color: var(--brand-ink); }
.task-meta .urg .bi, .task-meta .text-danger { color: inherit; }
.task-meta .bi.text-danger { color: var(--tk-danger) !important; }

.is-done .task-title { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--tk-muted); }
.is-done .dot { opacity: .45; }

/* Due-date urgency badges */
.urg { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-weight: 600; font-size: .78rem; line-height: 1.4; }
.urg-badge-overdue { background: var(--tk-danger); color: #fff; }
.urg-badge-today, .urg-badge-tomorrow { background: #ffedd5; color: #9a3412; }
.urg-badge-soon { background: #fef9c3; color: #854d0e; }
.urg-badge-overdue .bi { animation: tk-pulse 1.6s ease-in-out infinite; }
@keyframes tk-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .urg-badge-overdue .bi { animation: none; } }

/* Complete button: right side, where the thumb is */
.check {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--brand-line); background: #fff; color: var(--brand-ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.check:hover, .check:focus-visible { border-color: var(--brand-ink); background: var(--brand-soft); }
.is-done .check { border-color: transparent; background: var(--brand-soft); color: var(--brand-ink); font-size: 1.2rem; }
.check .bi-arrow-counterclockwise { display: none; }
.is-done .check .bi-check-lg { display: none; }
.is-done .check .bi-arrow-counterclockwise { display: inline; }

.tk-empty { text-align: center; color: var(--tk-muted); padding: 48px 16px; }
.tk-empty .bi { font-size: 2.5rem; display: block; margin-bottom: 8px; color: var(--brand-ink); }

/* ---------- Bottom dock: chips + tab bar ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--tk-line);
  padding-bottom: var(--tk-safe-b);
}
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; height: var(--tk-chips-h);
  scrollbar-width: none; max-width: 720px; margin: 0 auto;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--tk-line); background: #fff; color: var(--tk-text);
  font-size: .9rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.chip.active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip .count { font-size: .75rem; opacity: .7; }
.chip-sep { flex: 0 0 1px; background: var(--tk-line); margin: 4px 2px; }

.tabbar { display: flex; height: var(--tk-tabbar-h); max-width: 720px; margin: 0 auto; border-top: 1px solid var(--tk-line); }
.tabbar a {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--tk-muted); text-decoration: none; font-size: .72rem; font-weight: 500;
  position: relative;
}
.tabbar a:hover { filter: none; color: var(--tk-text); }
.tabbar a .bi { font-size: 1.35rem; line-height: 1; color: var(--brand-ink); }
.tabbar a.active { color: var(--brand-ink); font-weight: 700; }
.tabbar a.active::before {
  content: ""; position: absolute; top: -1px; left: 30%; right: 30%; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--brand);
}

.fab {
  position: fixed; z-index: 1031; right: max(16px, calc((100vw - 720px) / 2 + 16px));
  bottom: calc(var(--tk-tabbar-h) + var(--tk-chips-h) + var(--tk-safe-b) + 16px);
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand); font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(17,24,39,.25); text-decoration: none;
}
.fab:hover { color: var(--on-brand); background: var(--brand); filter: brightness(.93); }

/* Post-completion "how long did it take?" sheet */
.sheet {
  position: fixed; z-index: 1032; left: 8px; right: 8px; max-width: 704px; margin: 0 auto;
  bottom: calc(var(--tk-tabbar-h) + var(--tk-chips-h) + var(--tk-safe-b) + 8px);
  background: var(--tk-text); color: #fff; border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.sheet[hidden] { display: none; }
/* Bootstrap display utilities (d-flex...) must not beat the hidden attribute */
[hidden] { display: none !important; }
.sheet .sheet-title { font-size: .9rem; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.sheet .sheet-close { background: none; border: 0; color: #fff; font-size: 1.4rem; line-height: 1; width: 40px; height: 40px; margin: -8px -8px -8px 0; }
.sheet .chips { padding: 0; height: auto; }
.sheet .chip { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }

/* ---------- Forms ---------- */
.tk-form .form-label { font-weight: 600; font-size: .9rem; }
.tk-form .form-control, .tk-form .form-select { min-height: 48px; font-size: 1rem; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--tk-line); border-radius: 999px; cursor: pointer; font-weight: 500; background: #fff;
}
.pick input:checked + label { border-color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand-ink); background: var(--brand-soft); }
.pick input:focus-visible + label { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
.tk-form .form-control, .tk-form .form-select { border-color: var(--brand-line); }
.form-control:focus, .form-select:focus { border-color: var(--brand-ink); box-shadow: 0 0 0 .2rem var(--brand-line); }

.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 280px; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches label {
  aspect-ratio: 1; border-radius: 50%; background: var(--c); cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.3rem;
}
.swatches label .bi { visibility: hidden; }
.swatches input:checked + label { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c); }
.swatches input:checked + label .bi { visibility: visible; }
.swatches input:focus-visible + label { outline: 2px solid var(--brand-ink); outline-offset: 4px; }

/* Sticky action bar for forms and detail (thumb zone) */
.action-bar {
  position: sticky; bottom: calc(var(--tk-tabbar-h) + var(--tk-safe-b)); z-index: 5;
  background: #fff; padding: 12px 0; border-top: 1px solid var(--tk-line);
  display: flex; gap: 10px;
}
.action-bar .btn { min-height: 52px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
/* Primary buttons wear the brand; outline buttons the ink */
.btn-dark {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: var(--on-brand);
  --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-hover-color: var(--on-brand);
  --bs-btn-active-bg: var(--brand); --bs-btn-active-border-color: var(--brand); --bs-btn-active-color: var(--on-brand);
}
.btn-dark:hover, .btn-dark:active { filter: brightness(.93); }
.btn-outline-dark {
  --bs-btn-color: var(--brand-ink); --bs-btn-border-color: var(--brand-ink);
  --bs-btn-hover-bg: var(--brand-soft); --bs-btn-hover-color: var(--brand-ink); --bs-btn-hover-border-color: var(--brand-ink);
  --bs-btn-active-bg: var(--brand-soft); --bs-btn-active-color: var(--brand-ink); --bs-btn-active-border-color: var(--brand-ink);
}

/* Detail */
.detail-title { font-size: 1.6rem; font-weight: 700; overflow-wrap: anywhere; }
.is-done .detail-title { text-decoration: line-through; color: var(--tk-muted); }
.kv { display: grid; grid-template-columns: 9rem 1fr; gap: 10px 12px; margin: 0; }
.kv dt { color: var(--tk-muted); font-weight: 500; }
.kv dd { margin: 0; }
.notes { white-space: pre-wrap; background: var(--tk-soft); border-radius: 12px; padding: 14px; }

/* Stats */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { border: 1px solid var(--tk-line); border-radius: 14px; padding: 12px; }
.kpi .kpi-v { font-size: 1.8rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .kpi-l { color: var(--tk-muted); font-size: .8rem; }
.chart-box { position: relative; height: 200px; }
.cat-stat { border-bottom: 1px solid var(--tk-line); padding: 14px 0; }
.cat-stat .grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; font-size: .9rem; margin-top: 8px; }
.cat-stat .grid span { color: var(--tk-muted); }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }

.alert { border-radius: 12px; }

/* ---------- Top bar: logo, calendar card, weather, counters ---------- */
.topbar { padding: 12px 0 12px; border-bottom: 1px solid var(--brand-line); margin-bottom: 6px; }
.topbar-row { display: flex; align-items: center; gap: 10px; }
.topbar-logo { flex: 0 0 auto; }
.topbar-logo img { display: block; width: 64px; height: 64px; }
.topbar-logo:hover { filter: none; }

/* Day strip: scrolls endlessly; a wave lifts the days near the centre (--w = 1 at the centre,
   0 at the edges, set by tasky.js); the chosen day stays up; today wears the brand colour */
.day-strip {
  position: relative; display: flex; align-items: flex-start; gap: 6px; flex: 1 1 0; min-width: 0;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 16px 10px 6px; margin: -16px 0 -6px; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
}
.day-strip::-webkit-scrollbar { display: none; }
/* The strip takes the free space; logo, weather and inbox keep their size */
.topbar-row > .weather, .topbar-row > .inbox-btn { flex: 0 0 auto; }
.cal-card {
  position: relative; flex: 0 0 auto; width: 44px; display: flex; flex-direction: column; text-align: center;
  border: 1px solid var(--brand-line); border-radius: 10px; background: #fff;
  color: var(--tk-text); text-decoration: none; scroll-snap-align: center;
  transform: translateY(calc((1 - var(--w, 1)) * 9px)) scale(calc(.84 + var(--w, 1) * .16));
  transform-origin: 50% 100%; will-change: transform;
}
.cal-card:hover { filter: none; color: var(--tk-text); background: var(--brand-soft); }
.cal-month {
  background: var(--brand-soft); color: var(--brand-ink); border-radius: 9px 9px 0 0;
  font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; line-height: 1.6;
}
.cal-day { font-size: 1.15rem; font-weight: 700; line-height: 1.1; padding-top: 2px; font-variant-numeric: tabular-nums; }
.cal-weekday { font-size: .58rem; color: var(--tk-muted); padding-bottom: 3px; }
.cal-card.is-today { border-color: var(--brand); }
.cal-card.is-today .cal-month { background: var(--brand); color: var(--on-brand); }
/* The chosen day stays higher than the wave */
.cal-card.active {
  border-color: var(--brand-ink); box-shadow: 0 6px 14px rgba(17,24,39,.18), 0 0 0 2px var(--brand-ink);
  background: var(--brand-soft); transform: translateY(-6px) scale(1.06); z-index: 1; opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .cal-card { transform: none; }
  .cal-card.active { transform: translateY(-4px); }
}
.cal-badge {
  position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: var(--brand-ink); color: #fff; font-size: .66rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff;
}

@media (min-width: 600px) {
  .topbar-logo img { width: 76px; height: 76px; }
  .day-strip { gap: 8px; }
  .cal-card { width: 50px; }
}
/* Narrow phones: weather keeps icon and temperature only */
@media (max-width: 400px) {
  .weather-place { display: none; }
  .weather-icon { font-size: 1.6rem; }
}

.day-filter {
  display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; padding: 6px 6px 6px 12px;
  border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; font-size: .9rem;
}
.day-filter-x {
  margin-left: auto; width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: var(--brand-ink);
}
.day-filter-x:hover { background: #fff; filter: none; }

.weather { margin-left: auto; display: flex; align-items: center; gap: 8px; min-height: 48px; }
.weather-icon { font-size: 2rem; line-height: 1; color: var(--brand-ink); }
.weather-text { display: flex; flex-direction: column; line-height: 1.15; }
.weather-temp { font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.weather-place { font-size: .75rem; color: var(--tk-muted); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weather-loading { font-size: 2rem; color: var(--brand-line); }
.weather-ask {
  height: 40px; padding: 0 14px; border-radius: 999px; font-weight: 500; white-space: nowrap;
  border: 1px solid var(--brand-line); background: #fff; color: var(--brand-ink);
}

.counters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.counter {
  display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px;
  border: 1px solid var(--brand-line); border-radius: 14px; background: #fff;
  color: inherit; text-decoration: none;
}
.counter:hover { filter: none; color: inherit; background: var(--brand-soft); }
.counter-n { font-size: 1.9rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.counter-l { font-size: .8rem; color: var(--tk-muted); line-height: 1.25; }
.counter-warn { color: var(--tk-danger); font-weight: 600; }
.counter.active { border-color: var(--brand-ink); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-ink); }

/* ---------- Theme picker (profile) ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.theme-grid form { margin: 0; }
.theme-opt {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 4px; border: 1px solid var(--brand-line); border-radius: 14px; background: #fff;
  font-size: .78rem; color: var(--tk-text);
}
.theme-opt img { width: 48px; height: 48px; }
.theme-opt[aria-pressed="true"] { border-color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand-ink); background: var(--brand-soft); font-weight: 700; }

/* ---------- Proposals ---------- */
.paste-box summary { font-weight: 600; color: var(--brand-ink); cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.prop-card { border: 1px solid var(--brand-line); border-radius: 16px; padding: 14px; margin-bottom: 16px; }
.prop-source { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--tk-muted); }
.prop-source .bi { color: var(--brand-ink); font-size: 1.1rem; }
.prop-kind { margin-left: auto; background: var(--brand-soft); color: var(--brand-ink); border-radius: 999px; padding: 2px 10px; font-weight: 600; font-size: .75rem; }
.prop-subject { font-weight: 600; margin-top: 6px; }
.prop-excerpt {
  margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--brand-line); color: var(--tk-muted); font-size: .9rem;
  white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.prop-reason { font-size: .85rem; background: var(--brand-soft); border-radius: 10px; padding: 8px 10px; margin: 8px 0 14px; }
.prop-reason .bi { color: var(--brand-ink); }
.prop-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.prop-actions .btn { min-height: 52px; font-weight: 600; }

/* Inbox shortcut in the top bar */
.inbox-btn {
  position: relative; width: 44px; height: 44px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--brand-line); border-radius: 12px; color: var(--brand-ink); font-size: 1.3rem;
}
.inbox-btn:hover { filter: none; background: var(--brand-soft); }
.inbox-badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--tk-danger); color: #fff; font-size: .72rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff;
}

/* ---------- Integrations ---------- */
.integ-card { border: 1px solid var(--brand-line); border-radius: 16px; padding: 14px; margin-bottom: 14px; }
.integ-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.integ-actions form { margin: 0; }
.integ-actions .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.integ-add { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; }
.form-check-input:checked { background-color: var(--brand-ink); border-color: var(--brand-ink); }
.inbound-address {
  padding: 12px; border-radius: 12px; background: var(--brand-soft); border: 1px solid var(--brand-line);
  font-size: .95rem; overflow-wrap: anywhere; user-select: all;
}
.prop-focus { border-color: var(--brand-ink); box-shadow: 0 0 0 2px var(--brand-line); }

/* ---------- Condividi con Tasky ---------- */
.share-files { display: flex; flex-wrap: wrap; gap: 10px; }
.share-thumb { height: 140px; max-width: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--tk-line); }
.share-doc {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; max-width: 100%;
  border: 1px solid var(--tk-line); border-radius: 10px; font-size: .9rem; word-break: break-all;
}
.share-doc .bi { font-size: 1.4rem; color: #c0392b; }

/* Voice notes */
/* Left of the + button, on the same line: stacked above it, it covered the check buttons */
.fab-mic {
  position: fixed; z-index: 1031; right: max(92px, calc((100vw - 720px) / 2 + 92px));
  bottom: calc(var(--tk-tabbar-h) + var(--tk-chips-h) + var(--tk-safe-b) + 24px);
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bs-body-bg, #fff); color: var(--brand-ink); border: 2px solid var(--brand); font-size: 1.35rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(17,24,39,.18); text-decoration: none;
}
.fab-mic:hover { color: var(--brand-ink); filter: brightness(.97); }
.voice-rec { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2rem 0 1rem; }
.voice-btn {
  width: 120px; height: 120px; border-radius: 50%; border: 0;
  background: var(--brand); color: var(--on-brand); font-size: 3rem;
  box-shadow: 0 8px 24px rgba(17,24,39,.22); transition: transform .15s;
}
.voice-btn:active { transform: scale(.96); }
.voice-rec.is-recording .voice-btn { background: #dc3545; color: #fff; animation: voice-pulse 1.4s ease-in-out infinite; }
.voice-rec.is-busy .voice-btn { opacity: .6; }
@keyframes voice-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220,53,69,.45); } 50% { box-shadow: 0 0 0 18px rgba(220,53,69,0); } }
@media (prefers-reduced-motion: reduce) { .voice-rec.is-recording .voice-btn { animation: none; } }
.voice-time { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 1rem; }
.voice-hint { color: var(--bs-secondary-color); max-width: 22rem; }
.voice-step { display: flex; align-items: center; gap: .6rem; font-weight: 600; padding: 1rem 0; }

/* Optional time next to the due date */
.time-field { width: 7.5rem; flex: 0 0 auto; }

/* Checklist inside a task (e.g. a shopping list) */
.checklist { list-style: none; margin: 0 0 .75rem; padding: 0; }
.checklist li { display: flex; align-items: center; border-bottom: 1px solid var(--tk-line, #e5e7eb); }
.checklist li > form:first-child { flex: 1; }
.check-item {
  width: 100%; display: flex; align-items: center; gap: .6rem; padding: .55rem 0;
  background: none; border: 0; text-align: left; color: inherit; font-size: 1rem;
}
.check-item .bi { font-size: 1.25rem; color: var(--brand-ink); }
.checklist li.is-done .check-item span { text-decoration: line-through; color: var(--bs-secondary-color); }

/* ---------- Public pages (home, privacy, terms) ---------- */
body.lp { background: #fff; color: var(--tk-text); }
.lp-nav, .lp main, .lp-footer { max-width: 1040px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.lp-nav { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--tk-text); text-decoration: none; }
.lp-hero { display: grid; gap: 28px; align-items: center; padding: 28px 0 40px; }
.lp-kicker { display: inline-block; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: .8rem;
             padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.lp-hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
.lp-hero h1 span { color: var(--brand-ink); }
.lp-lead { font-size: 1.15rem; color: var(--tk-muted); max-width: 34rem; margin: 18px 0 24px; }
.lp-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.lp-btn { background: var(--brand); color: var(--on-brand); border-radius: 999px; padding: 12px 32px; font-weight: 700; }
.lp-btn:hover { background: var(--brand); color: var(--on-brand); filter: brightness(.95); }
.lp-phone, .lp-shots img { margin: 0; justify-self: center; }
.lp-phone img, .lp-shots img { max-width: 100%; height: auto; border-radius: 28px; border: 8px solid #111827;
                               box-shadow: 0 24px 48px rgba(17,24,39,.18); }
.lp-phone img { width: 300px; }
.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 16px 0 48px; }
.lp-card { border: 1px solid var(--brand-line); border-radius: 18px; padding: 20px; background: #fff; }
.lp-card .bi { font-size: 1.6rem; color: var(--brand-ink); }
.lp-card h3 { font-size: 1.1rem; font-weight: 700; margin: 10px 0 6px; }
.lp-card p { color: var(--tk-muted); margin: 0; }
.lp-steps { padding: 8px 0 48px; }
.lp-steps h2, .lp-faq h2 { font-weight: 800; font-size: 1.7rem; margin-bottom: 16px; }
.lp-steps ol { font-size: 1.08rem; padding-left: 1.2rem; display: grid; gap: 8px; margin-bottom: 28px; }
.lp-shots { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.lp-shots img { width: 260px; }
.lp-faq { padding: 0 0 48px; max-width: 760px; }
.lp-faq details { border-bottom: 1px solid var(--tk-line); padding: 14px 0; }
.lp-faq summary { font-weight: 700; cursor: pointer; }
.lp-faq p { color: var(--tk-muted); margin: 10px 0 0; }
.lp-footer { border-top: 1px solid var(--tk-line); padding-top: 22px; padding-bottom: 40px; display: grid; gap: 10px; color: var(--tk-muted); }
.lp-footer nav { display: flex; gap: 18px; }
.lp-legal { max-width: 760px; padding: 16px 0 48px; }
.lp-legal h1 { font-weight: 800; }
.lp-legal h2 { font-size: 1.2rem; font-weight: 700; margin-top: 28px; }
@media (min-width: 860px) {
  .lp-hero { grid-template-columns: 1.2fr .8fr; padding: 56px 0 64px; }
}
