@font-face { font-family: Manrope; src: url('/fonts/manrope.ttf') format('truetype'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url('/fonts/bricolage.ttf') format('truetype'); font-weight: 400 800; font-display: swap; }
:root {
  --paper: #f2f6f5;
  --white: #fff;
  --secondary: #e8efed;
  --ink: #15302a;
  --muted: #58706a;
  --line: #d4e0dc;
  --accent: #117566;
  --accent-text: #fff;
  --pale: #d3ede7;
  --danger: #c23a3a;
  --danger-bg: #f8e0e0;
  --orange: #a24819;
  --shadow: 0 3px 14px #19373109;
  --idea-paper: #f8eecb;
  --idea-ink: #755604;
  --chart-blue: #3a60d6;
  --chart-purple: #9349c2;
  --chart-green: #2b935a;
  --chart-orange: #d8702e;
  color-scheme: light dark;
  font: 15px/1.5 Manrope, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1917; --white: #15231f; --secondary: #1e3029; --ink: #e3eeea;
    --muted: #a5bcb3; --line: #30473e; --accent: #3ec2ac; --accent-text: #0d2922; --pale: #213d35;
    --danger: #ff8989; --danger-bg: #48272a; --orange: #ffb183; --shadow: 0 3px 14px #0003;
    --idea-paper: #3c3420; --idea-ink: #ffe18b;
    --chart-blue: #a3b7ff; --chart-purple: #d9a2f1; --chart-green: #87d9a0; --chart-orange: #ffa477;
  }
}
body { min-width: 280px; }
.top { max-width: 920px; margin: 0 auto; background: var(--paper); padding: 20px; border: 0; }
.identity { align-items: center; min-width: 0; }
.identity strong { display: block; font: 700 clamp(1.15rem,3vw,1.55rem)/1.05 "Bricolage Grotesque", Manrope, sans-serif; letter-spacing: -.025em; }
.identity small { display: block; margin-top: 4px; font-size: .8rem; }
.brand-mark { display: grid; color: var(--accent-text); background: var(--accent); width: 40px; height: 40px; border-radius: 12px; flex: none; place-items: center; }
.brand-mark svg { width: 26px; }
.session-tools, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.status-pill, .chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; font-weight: 750; padding: 4px 9px; font-size: .77rem; white-space: nowrap; }
.status-pill { background: var(--secondary); color: var(--ink); border: 1px solid var(--line); }
.status-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--chart-orange); }
.status-pill[data-state="connected"]::before { background: var(--chart-green); }
.status-pill[data-state="error"]::before { background: var(--danger); }
main { max-width: 920px; padding: 0 20px 60px; }
h1, h2, h3 { font-family: "Bricolage Grotesque", Manrope, system-ui, sans-serif; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.85rem); font-weight: 700; }
h2 { font-weight: 700; font-size: 1.42rem; }
h3 { font-size: 1.1rem; }
.panel, .metric, .result, .access { border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.panel { margin-bottom: 20px; }
button { border-radius: 12px; color: var(--accent-text); }
button.quiet { color: var(--ink); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
input, select, textarea, fieldset { background: var(--white); color: var(--ink); border-color: var(--line); border-radius: 10px; }
input, textarea { accent-color: var(--accent); }
nav { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; position: sticky; top: 8px; z-index: 5; background: var(--white); padding: 7px; border: 1px solid var(--line); border-radius: 16px; margin: 0 0 20px; box-shadow: var(--shadow); }
nav button { display: grid; gap: 3px; justify-items: center; align-content: center; min-height: 58px; background: transparent; border: 0; font-size: .84rem; padding: 3px; font-weight: 700; }
nav button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
nav [aria-current] { background: var(--pale); color: var(--accent); }
.notice.error { color: var(--danger); background: var(--danger-bg); }
#message { position: fixed; z-index: 8; bottom: 18px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); box-shadow: 0 5px 24px #182d282b; }
.disconnected nav { opacity: .55; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 12px 18px; align-items: start; }
.hero textarea, .hero .examples, .hero .actions, .hero .proposal-list, .hero .privacy-line, .hero #speech-partial { grid-column: 1 / -1; }
.hero h2 { font-size: clamp(1.5rem,4vw,2.3rem); }
.microphone { display: inline-grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; box-shadow: 0 0 0 7px var(--pale); font-size: 0; }
.microphone svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.microphone[aria-pressed="true"] { background: var(--danger); color: #fff; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px var(--danger-bg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.examples, .filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chips button, .examples button { border: 1px solid var(--line); border-radius: 999px; background: var(--secondary); color: var(--ink); min-height: 38px; padding: 5px 11px; font-size: .8rem; }
.filter-chips [aria-pressed="true"] { border-color: var(--accent); background: var(--pale); color: var(--accent); }
.quiet.text-button { border-color: transparent; background: transparent; color: var(--accent); padding-inline: 4px; }
.chip[data-kind="tarea"] { color: #2c4cac; background: #e0e7fb; }
.chip[data-kind="salud"] { color: #20663e; background: #dbf1e3; }
.chip[data-kind="comida"] { color: #a24819; background: #fbe6d6; }
.chip[data-kind="idea"] { color: #775705; background: #f8eecb; }
.chip[data-kind="dato"] { color: #545a72; background: #e6e7ee; }
.chip[data-kind="recordatorio"] { color: #7835a1; background: #efe2f7; }
.chip[data-kind="cita"] { color: #08657e; background: #d6eef5; }
.chip[data-kind="documento"] { color: #785023; background: #f3e6d8; }
@media (prefers-color-scheme: dark) {
  .chip[data-kind="tarea"] { color: #b6c6ff; background: #2a3865; }
  .chip[data-kind="salud"] { color: #a4e5b6; background: #264837; }
  .chip[data-kind="comida"] { color: #ffc39a; background: #4b342a; }
  .chip[data-kind="idea"] { color: #ffe18b; background: #493b20; }
  .chip[data-kind="dato"] { color: #cbd1e4; background: #373d4c; }
  .chip[data-kind="recordatorio"] { color: #e2b8fa; background: #492f54; }
  .chip[data-kind="cita"] { color: #a5e5f3; background: #274a52; }
  .chip[data-kind="documento"] { color: #ecc298; background: #493728; }
}
.board-grid, .notes-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%,240px),1fr)); }
.board-grid > .panel { margin-bottom: 0; }
.board-grid { margin-bottom: 20px; }
.proposal-list { display: grid; gap: 10px; }
.proposal { border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: var(--secondary); }
.proposal .fields, .fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,155px),1fr)); gap: 10px; align-items: end; }
.proposal .question { color: var(--ink); background: var(--secondary); border-left: 3px solid var(--chart-purple); padding: 6px 9px; margin: 8px 0; }
.calendar-shell { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; margin: 10px 0; }
.calendar-shell > small { text-align: center; }
.calendar-shell button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 46px; min-width: 0; padding: 2px; }
.calendar-shell [aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.calendar-shell [aria-current="date"] { border: 2px solid var(--accent); }
.calendar-shell .other-month { opacity: .57; }
.dates-dots { display: flex; gap: 2px; min-height: 6px; }
.dates-dots i { height: 6px; width: 6px; border-radius: 50%; background: var(--chart-blue); }
.dates-dots .personal { background: var(--chart-orange); }
.dates-dots .trabajo { background: #1195b6; }
.dates-dots .recordatorio { background: var(--chart-purple); }
.task-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; }
.task-row button.check-task { width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: 50%; border: 2px solid var(--chart-blue); background: transparent; color: var(--chart-blue); }
.task-row [aria-pressed="true"].check-task { background: var(--chart-blue); color: var(--white); }
.done { text-decoration: line-through; }
.overdue { color: var(--danger); }
.empty-board { border: 1px dashed var(--line); padding: 15px; border-radius: 12px; }
.notes-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr)); }
.sticky-note { color: var(--idea-ink); background: var(--idea-paper); padding: 15px; border-radius: 13px; font-weight: 650; overflow-wrap: anywhere; }
.sticky-note .chip { margin: 5px 3px 0 0; background: var(--white); color: var(--ink); }
.media-choices input { max-width: 100%; }
.media-choices label { border: 1px dashed var(--chart-orange); border-radius: 12px; padding: 10px; color: var(--orange); }
.health-tiles { margin-bottom: 13px; }
.health-tiles strong { font-size: 1.55rem; }
.panel progress { width: 100%; accent-color: var(--chart-orange); }
.panel progress.over { accent-color: var(--danger); }
.macro-bars { display: grid; gap: 5px; }
.macro-bars label:nth-child(1) progress { accent-color: var(--chart-blue); }
.macro-bars label:nth-child(2) progress { accent-color: var(--chart-orange); }
.macro-bars label:nth-child(3) progress { accent-color: var(--chart-purple); }
.chart { border: 1px solid var(--line); padding: 11px; border-radius: 13px; }
.chart svg { display: block; width: 100%; height: 120px; }
.timeline-row { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 12px; }
.task-group { font-variant: small-caps; letter-spacing: .07em; padding-top: 12px; }
.log-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pending-label { color: var(--orange); background: var(--secondary); }
.saved-label { color: var(--accent); background: var(--pale); }
.mail-counters { display: grid; grid-template-columns: repeat(auto-fit,minmax(90px,1fr)); gap: 8px; margin-top: 13px; }
.mail-counters button { border: 1px solid var(--line); background: var(--secondary); color: var(--ink); display: flex; flex-direction: column; font-size: .8rem; text-align: left; }
.mail-counters button strong { font-size: 1.25rem; }
.mail-counters [aria-pressed="true"] { border-color: var(--accent); background: var(--pale); }
.mail-thread summary .heading { display: inline-flex; width: calc(100% - 1.4em); }
.mail-thread summary > span:last-child { display: block; }
.mail-unread { color: var(--chart-blue); }
.secondary-card, .trend-result:not(:empty) { background: var(--secondary); border-radius: 12px; padding: 10px; }
.outlook-link { color: var(--accent); font-weight: 700; text-underline-offset: 3px; }
@media (max-width: 759px) {
  .top { padding: 15px 10px; }
  main { padding: 0 10px calc(100px + env(safe-area-inset-bottom,0px)); }
  nav { position: fixed; top: unset; bottom: 0; left: 0; right: 0; margin: 0; border-radius: 16px 16px 0 0; padding: 5px 6px calc(5px + env(safe-area-inset-bottom,0px)); gap: 2px; }
  nav button { font-size: .7rem; min-height: 49px; }
  #message { bottom: calc(67px + env(safe-area-inset-bottom,0px)); }
  .session-tools .ghost { min-height: 35px; padding: 4px 8px; font-size: .75rem; }
  .hero { grid-template-columns: 82px minmax(0,1fr); gap: 10px; }
  .microphone { width: 69px; height: 69px; }
}
