:root {
  color-scheme: light;
  --page: oklch(.976 .004 285);
  --surface: oklch(1 0 0);
  --ink: oklch(.224 .028 286);
  --subtle: oklch(.45 .027 284);
  --line: oklch(.91 .009 285);
  --quiet: oklch(.956 .01 286);
  --accent: oklch(.474 .147 291);
  --accent-hover: oklch(.42 .148 291);
  --accent-soft: oklch(.946 .035 294);
  --danger: oklch(.453 .157 25);
  --danger-soft: oklch(.954 .018 28);
  --completed: oklch(.415 .085 165);
  --completed-soft: oklch(.94 .034 163);
  --radius: .72rem;
  --gutter: clamp(1rem, 5vw, 2.5rem);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; color: var(--ink); background: var(--page); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .63; }
a { color: inherit; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.14; letter-spacing: -.035em; text-wrap: balance; }
h1 { font-size: 2.45rem; font-weight: 720; }
h2 { font-size: 1.4rem; }
svg { width: 1.18rem; height: 1.18rem; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; fill: none; flex: 0 0 auto; }
.icons { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 79rem; margin-inline: auto; min-height: 4.25rem; padding-inline: var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.brand { display: inline-flex; gap: .67rem; align-items: center; font-weight: 750; text-decoration: none; letter-spacing: -.025em; }
.brand-product { font-weight: 520; color: var(--subtle); margin-left: .14rem; }
.account-tools { position: relative; display: flex; align-items: center; gap: .6rem; }
.account-panel { inset: 3.9rem max(var(--gutter), calc((100vw - 76rem) / 2)) auto auto; margin: 0; min-width: 12rem; border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius); padding: .5rem; box-shadow: 0 3px 8px oklch(.25 .03 285 / .08); }
.account-panel strong { display: block; padding: .4rem .65rem; }
.quiet-button, .icon-button { padding: .5rem; border: 0; background: transparent; border-radius: .55rem; }
.quiet-button { display: flex; width: 100%; gap: .6rem; align-items: center; text-align: left; }
.icon-button { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; }
.quiet-button:hover, .icon-button:hover { background: var(--quiet); }
.avatar { width: 2rem; height: 2rem; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 0; border-radius: 50%; font-size: .79rem; font-weight: 750; flex: 0 0 auto; }
.account-avatar { width: 2.45rem; height: 2.45rem; }
.alt-avatar { background: var(--quiet); color: var(--subtle); }
.notification-button { position: relative; }
#unread { min-width: 1.05rem; height: 1.05rem; line-height: 1.05rem; padding: 0 .16rem; position: absolute; top: .05rem; right: 0; background: var(--accent); color: white; border-radius: 20px; font-size: .68rem; }
.workspace { width: min(57rem, 100%); margin-inline: auto; padding: 3.1rem var(--gutter) 11rem; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2.1rem; }
.today { display: block; color: var(--subtle); margin-bottom: .42rem; font-size: .91rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; min-height: 2.65rem; padding: .48rem .85rem; border: 1px solid transparent; border-radius: .55rem; font-weight: 650; font-size: .91rem; }
.primary { color: white; background: var(--accent); }
.primary:hover, .send-button:hover { background: var(--accent-hover); }
.secondary { background: var(--surface); border-color: var(--line); }
.secondary:hover { background: var(--quiet); }
.view-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .76rem; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: .25rem; }
.filters button { background: transparent; border: 1px solid transparent; border-radius: .55rem; padding: .43rem .68rem; font-size: .88rem; font-weight: 620; color: var(--subtle); min-height: 2.35rem; }
.filters button:hover { background: var(--quiet); }
.filters button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.open-count { color: var(--subtle); font-size: .87rem; }
.task-list { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: clip; }
.list-header, .task-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(7.5rem, .41fr) minmax(6.7rem, .34fr) 6.1rem 1rem; gap: .8rem; align-items: center; padding-inline: 1rem; }
.list-header { background: var(--quiet); min-height: 2.45rem; font-size: .83rem; font-weight: 650; color: var(--subtle); }
.task-row { width: 100%; text-align: left; background: var(--surface); border: 0; border-top: 1px solid var(--line); min-height: 3.85rem; padding-block: .6rem; font-size: .88rem; }
.task-row:hover { background: var(--page); }
.task-row:focus-visible { outline-offset: -3px; }
.task-name { display: flex; flex-direction: column; min-width: 0; gap: .12rem; }
.task-name strong { font-size: .96rem; font-weight: 650; overflow-wrap: anywhere; }
.task-name small { color: var(--subtle); font-size: .78rem; }
.person, .due { display: flex; gap: .45rem; align-items: center; min-width: 0; }
.person > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.due { color: var(--subtle); white-space: nowrap; }
.due.overdue { color: var(--danger); font-weight: 650; }
.due svg { width: .87rem; height: .87rem; }
.status { justify-self: start; padding: .21rem .52rem; border-radius: .38rem; background: var(--quiet); color: var(--subtle); font-size: .77rem; font-weight: 660; white-space: nowrap; }
.status.doing { color: var(--accent); background: var(--accent-soft); }
.status.done { color: var(--completed); background: var(--completed-soft); }
.task-row > svg { width: .9rem; color: var(--subtle); }
.empty { display: flex; align-items: flex-start; gap: .9rem; padding: 2rem 1.3rem; }
.empty-icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; color: var(--accent); background: var(--accent-soft); border-radius: .58rem; flex: 0 0 auto; }
.empty p, .boot-state { color: var(--subtle); font-size: .91rem; }
.empty strong { display: block; margin-bottom: .12rem; }
.assistant-dock { position: fixed; z-index: 1; bottom: 0; left: 50%; transform: translateX(-50%); width: min(57rem, 100%); padding: .65rem var(--gutter) max(.75rem, env(safe-area-inset-bottom)); background: var(--page); }
.assistant-response, .command-form { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); box-shadow: 0 3px 8px oklch(.25 .03 285 / .07); }
.assistant-response { max-height: 43dvh; overflow-y: auto; padding: .85rem 1rem; margin-bottom: .55rem; }
.assistant-heading { display: flex; justify-content: space-between; align-items: center; }
.assistant-heading button { margin: -.25rem -.25rem -.25rem 0; }
#assistant-message { color: var(--subtle); margin: .25rem 0 .45rem; overflow-wrap: anywhere; white-space: pre-line; }
.preview-line { padding: .55rem 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; overflow-wrap: anywhere; }
.preview-line small { color: var(--subtle); font-size: .85rem; }
.command-form { display: flex; gap: .45rem; align-items: center; padding: .4rem; }
.command-form input { width: 100%; min-width: 0; border: 0; padding: .53rem .6rem; background: transparent; border-radius: .4rem; }
.send-button { color: white; background: var(--accent); flex: 0 0 auto; }
.voice-button { background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.voice-button[aria-pressed="true"] { background: var(--accent); color: white; }
.dock-caption { display: flex; justify-content: space-between; align-items: center; gap: .45rem; min-height: 1.75rem; padding-top: .22rem; color: var(--subtle); font-size: .78rem; }
.text-button { color: var(--accent); background: transparent; border: 0; text-decoration: underline; padding: 0; text-align: start; }
.boot-state { padding: 3rem var(--gutter); width: min(57rem, 100%); margin: 0 auto; }
.auth { width: min(28rem, calc(100% - var(--gutter) * 2)); margin: min(12vh, 7rem) auto 3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2.25rem); }
.auth h1 { margin-bottom: 1.35rem; font-size: 1.95rem; }
.auth form, .dialog-body { display: grid; gap: .95rem; }
.auth .button { margin-top: .2rem; }
label { display: grid; gap: .27rem; font-weight: 620; font-size: .9rem; }
input, select, textarea { color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--subtle); opacity: 1; }
label input, label textarea, select { width: 100%; min-width: 0; padding: .48rem .58rem; min-height: 2.65rem; border: 1px solid oklch(.82 .014 285); border-radius: .48rem; background: var(--surface); }
textarea { resize: vertical; }
dialog { padding: 0; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); width: min(34rem, calc(100% - 1.4rem)); max-height: 90dvh; }
dialog::backdrop { background: oklch(.23 .026 286 / .44); }
.dialog-body { padding: 1.15rem; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; font-size: .9rem; font-weight: 620; margin-bottom: .35rem; }
.watchers { display: flex; flex-wrap: wrap; gap: .85rem; }
.watchers label { display: flex; align-items: center; font-weight: 500; gap: .35rem; }
.watchers input { width: 1.1rem; min-height: auto; accent-color: var(--accent); }
.action-row { display: flex; justify-content: flex-end; gap: .45rem; flex-wrap: wrap; }
.dialog-body ul { margin-block: .5rem 0; padding-left: 1.1rem; }
.dialog-body li { color: var(--subtle); padding-bottom: .2rem; font-size: .86rem; overflow-wrap: anywhere; }
.error { color: var(--danger); background: var(--danger-soft); padding: .5rem .65rem; border-radius: .45rem; overflow-wrap: anywhere; }
.message-item { border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; width: 100%; padding: .52rem .45rem; display: flex; flex-direction: column; gap: .15rem; }
.message-item:hover { background: var(--page); }
.message-item[data-unread="true"] { color: var(--accent); font-weight: 650; }
.message-item small { color: var(--subtle); font-weight: 450; }
.toast { z-index: 2; position: fixed; bottom: 6rem; left: 50%; translate: -50%; width: max-content; max-width: calc(100% - 2rem); background: var(--ink); color: white; padding: .5rem .8rem; border-radius: .55rem; font-size: .9rem; }
@media (max-width: 620px) {
  .topbar-inner { min-height: 3.65rem; }
  .workspace { padding-top: 1.7rem; }
  .page-heading { margin-bottom: 1.35rem; }
  h1 { font-size: 1.95rem; }
  .today { font-size: .83rem; }
  .view-bar { gap: .35rem; }
  .filters button { padding-inline: .5rem; }
  .list-header { display: none; }
  .task-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: .35rem .7rem; padding: .68rem .8rem; }
  .task-row:first-child { border-top: 0; }
  .task-name { grid-column: 1 / 3; }
  .task-row .person { grid-row: 2; grid-column: 1; }
  .task-row .due { grid-row: 2; grid-column: 2; }
  .task-row .status { grid-row: 2; grid-column: 3; justify-self: end; }
  .task-row > svg { grid-row: 1; grid-column: 3; justify-self: end; }
  .task-row .avatar { display: none; }
  .dock-caption { font-size: .74rem; }
}
@media (max-width: 355px) {
  .new-task { padding-inline: .47rem; }
  .new-task span { max-width: 4rem; text-align: start; white-space: normal; line-height: 1.17; }
  .task-row { gap: .35rem .36rem; font-size: .79rem; }
}
