/* Weekly — Linear-inspired: dim chrome around a raised content panel, neutral greys, one indigo
   accent used sparingly, dense rows, hierarchy from contrast and elevation. Only transform/opacity animate. */
:root {
  color-scheme: light dark;
  --chrome: light-dark(#f3f3f5, #0e0e10);
  --panel: light-dark(#fdfdfd, #161619);
  --raised: light-dark(#ffffff, #1e1e22);
  --band: light-dark(#f6f6f8, #1b1b1f);
  --text: light-dark(#1c1d21, #e7e7ea);
  --text-2: light-dark(#5e6068, #9c9da6);
  --text-3: light-dark(#8b8d96, #6e7079);
  --line: light-dark(#e6e6e9, #26262b);
  --line-soft: light-dark(#efeff1, #1f1f23);
  --hover: light-dark(rgb(0 0 0 / .035), rgb(255 255 255 / .04));
  --active: light-dark(rgb(0 0 0 / .065), rgb(255 255 255 / .075));
  --accent: light-dark(#5e6ad2, #8a93ec);
  --accent-fill: #5e6ad2;
  --accent-soft: light-dark(rgb(94 106 210 / .1), rgb(130 140 235 / .16));
  --on-accent: #ffffff;
  --amber: light-dark(#c58a00, #f0c044);
  --danger: light-dark(#c9302c, #f2726c);
  --focus: color-mix(in srgb, var(--accent-fill) 55%, transparent);
  --shadow: 0 0 0 1px var(--line), 0 1px 2px light-dark(rgb(0 0 0 / .04), rgb(0 0 0 / .3));
  --shadow-pop: 0 0 0 1px light-dark(rgb(0 0 0 / .08), rgb(255 255 255 / .07)), 0 16px 48px light-dark(rgb(0 0 0 / .14), rgb(0 0 0 / .6)), 0 3px 10px light-dark(rgb(0 0 0 / .05), rgb(0 0 0 / .3));
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--chrome); color: var(--text); overflow: hidden;
  font: 13px/1.45 "Inter", "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "cv01", "ss03"; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-size: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: 5px; }
kbd { font: 500 10.5px/1 inherit; font-family: inherit; padding: 2px 4px; min-width: 16px; text-align: center; border-radius: 4px; color: var(--text-2); background: var(--active); display: inline-block; }
code { font: 11.5px ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; color: var(--text-2); background: var(--active); padding: 1px 5px; border-radius: 4px; }
mark { background: var(--accent-soft); color: inherit; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.muted { color: var(--text-2); font-weight: 400; }
.spacer { flex: 1; }

.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 14px; height: 14px; }
.st, .pr { width: 14px; height: 14px; flex: none; }
.st-todo { color: var(--text-3); }
.st-doing { color: var(--amber); }
.st-done { color: var(--accent-fill); }
.pr { color: var(--text-2); }
.pr-none { color: var(--text-3); }
.pr-high { color: var(--text); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }

/* Hover feedback: a pseudo-element's opacity, never a paint property. */
:is(.task, .side-list a, .icon-btn, .result, .group-toggle, .pill, .menu-item, .btn)::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--hover); opacity: 0; transition: opacity .12s ease-out; pointer-events: none;
}
:is(.task, .side-list a, .icon-btn, .result, .group-toggle, .pill, .btn):hover::before, .menu-item.active::before, .result[aria-selected="true"]::before { opacity: 1; }
.task, .side-list a, .icon-btn, .result, .group-toggle, .pill, .menu-item, .btn { position: relative; isolation: isolate; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  height: 28px; padding: 0 10px; border-radius: 6px; border: 0; background: var(--raised); box-shadow: var(--shadow);
  font-weight: 500; cursor: default; transition: transform .1s ease-out;
}
.btn.sm { height: 26px; padding: 0 9px; font-size: 12.5px; }
.btn:active, .icon-btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 0 0 1px rgb(0 0 0 / .08), 0 1px 2px rgb(0 0 0 / .12); }
.btn.primary::before { background: rgb(255 255 255 / .1); }
.btn.primary kbd { color: inherit; background: rgb(255 255 255 / .2); }
.btn.danger { color: var(--danger); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: 6px; padding: 5px; color: var(--text-2); cursor: default; transition: transform .1s ease-out; }
.icon-btn.sm { padding: 3px; }
.icon-btn:hover { color: var(--text); }

.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 7px; background: var(--active); }
.seg a { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.seg a[aria-current] { background: var(--raised); color: var(--text); box-shadow: var(--shadow); }

/* ---- shell: dim chrome (sidebar) + raised content panel — the "inverted L" */
#app { display: grid; grid-template-columns: 228px minmax(0, 1fr); height: 100dvh; }
#sidebar { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; overflow-y: auto; }
.ws { display: flex; align-items: center; gap: 8px; padding: 2px 2px 10px 6px; }
.ws-name { flex: 1; font-weight: 600; font-size: 13px; }
.logo { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(145deg, #7b84e6, #5e6ad2); }
.compose-btn { background: var(--raised); box-shadow: var(--shadow); color: var(--text); }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list a { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border-radius: 6px; color: var(--text-2); font-weight: 500; }
.side-list a > .icon { width: 15px; height: 15px; }
.side-list a:hover, .side-list a[aria-current] { color: var(--text); }
.side-list a[aria-current] { background: var(--active); }
.side-list .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-list .n { color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.side-list .dot { margin: 0 3px; }
.side-proj { display: flex; align-items: center; }
.side-proj > a { flex: 1; min-width: 0; }
.side-chev { margin-left: 2px; }
.side-chev .chev, .group-toggle .chev { transition: transform .15s var(--ease); }
[aria-expanded="true"] > .chev { transform: rotate(90deg); }
.side-sub { margin: 1px 0 4px 15px; padding-left: 8px; border-left: 1px solid var(--line); }
.side-sub a { height: 26px; font-size: 12.5px; }
.side-sub .dot { width: 7px; height: 7px; }
.side-title { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px 3px 8px; }
.side-title h2, #archived summary { font-size: 11.5px; font-weight: 500; color: var(--text-3); }
#archived summary { cursor: default; padding: 12px 8px 4px; }
.side-foot { margin-top: auto; display: flex; gap: 2px; padding-top: 10px; }
.scrim { display: none; }

main {
  margin: 8px 8px 8px 0; min-width: 0; overflow: auto; outline: none; position: relative;
  background: var(--panel); border-radius: 10px; box-shadow: var(--shadow);
}
.pad { padding: 12px 20px 0; }

/* Header: compact breadcrumb + view controls, sticky inside the panel */
.view-head {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 20px;
  background: color-mix(in srgb, var(--panel) 88%, transparent); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.view-head .nav-btn { display: none; margin-left: -8px; }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; overflow: hidden; }
.crumb { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb.strong { color: var(--text); font-weight: 500; }
a.crumb:hover { text-decoration: underline; text-underline-offset: 3px; }
.sep { color: var(--text-3); }
.tools { display: flex; align-items: center; gap: 6px; }
.badge { font-size: 11px; font-weight: 500; padding: 1px 6px; border-radius: 4px; background: var(--active); color: var(--text-2); }
.progress { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; margin-right: 6px; }
.bar { display: inline-block; width: 64px; height: 4px; border-radius: 4px; background: var(--active); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent-fill); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .3s var(--ease); }
.empty { color: var(--text-2); padding: 40px 20px; text-align: center; }

.add-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 0 10px; border-radius: 7px; color: var(--text-3); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 8px; }
.add-row:focus-within { box-shadow: inset 0 0 0 1px var(--accent-fill), 0 0 0 3px var(--accent-soft); }
.add-input { flex: 1; min-width: 12ch; border: 0; background: none; padding: 7px 0; outline: none; }
.add-input::placeholder { color: var(--text-3); }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 1px 8px; height: 22px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line); color: var(--text); animation: in .15s ease-out; }
.chip.warn { color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); border: 0; font-style: italic; }

/* ---- groups + rows */
.group-head {
  position: sticky; top: 44px; z-index: 2; display: flex; align-items: center; height: 36px; padding: 0 12px 0 14px;
  background: var(--band); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.groups.single .group-head { display: none; }
.group-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 3px 6px; border-radius: 6px; font-weight: 500; cursor: default; }
.group-toggle .n { color: var(--text-3); font-weight: 400; margin-left: 2px; }
.group-toggle .overdue { color: var(--danger); }
.g-add { margin-left: auto; opacity: 0; transition: opacity .12s ease-out; }
.group-head:hover .g-add, .col-head:hover .g-add, .day-head:hover .g-add, .g-add:focus-visible { opacity: 1; }
.tasks { list-style: none; margin: 0; padding: 0; min-height: 6px; }
.group { margin: 0; }

.task {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 20px;
  border-bottom: 1px solid var(--line-soft); cursor: default; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.task:focus-visible { outline: none; }
.task:focus-visible::before { opacity: 1; background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent-fill); }
.prio { display: inline-grid; place-items: center; width: 16px; }
.check { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; background: none; border-radius: 50%; cursor: default; transition: transform .15s ease-out; }
.check:hover { transform: scale(1.15); }
.check .st { width: 15px; height: 15px; }
.ttitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.done .ttitle { color: var(--text-3); }
.completing .check { animation: pop .3s var(--ease); }
@keyframes pop { 50% { transform: scale(1.3); } }
.meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); flex: none; }
.meta > span { display: inline-flex; align-items: center; gap: 4px; }
.muted-ico { color: var(--text-3); }
.label { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line); font-size: 11.5px; color: var(--text-2); max-width: 140px; }
.label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.label .dot { width: 7px; height: 7px; }
.view-project .proj { display: none !important; }
.due.overdue { color: var(--danger); }
.due .icon { color: var(--text-3); }
.due.overdue .icon { color: inherit; }
.ring { width: 12px; height: 12px; border-radius: 50%; background: conic-gradient(var(--accent-fill) calc(var(--p) * 360deg), var(--active) 0); }
.placeholder { opacity: .35; }
.ghost { position: fixed; z-index: 1000; margin: 0; pointer-events: none; background: var(--raised); border-radius: 8px; box-shadow: var(--shadow-pop); will-change: transform; border: 0; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
[data-drop] > .task { cursor: grab; }

/* ---- board */
.board { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 10px; padding: 12px 16px 24px; align-items: start; }
.col { border-radius: 8px; background: var(--band); padding: 4px 6px 6px; }
.col-head { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px; font-weight: 500; }
.col-head .n { color: var(--text-3); font-weight: 400; }
.col .tasks { display: flex; flex-direction: column; gap: 6px; min-height: 48px; }
.col .task, .day .task { flex-wrap: wrap; height: auto; min-height: 38px; padding: 9px 10px; gap: 6px 8px; border: 0; border-radius: 7px; background: var(--raised); box-shadow: var(--shadow); }
.col .ttitle { white-space: normal; flex-basis: calc(100% - 52px); }
.col .meta { flex-basis: 100%; flex-wrap: wrap; padding-left: 50px; }
.col .meta:empty { display: none; }

/* ---- calendar */
.week, .month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; margin-bottom: 20px; }
.week .day { display: flex; flex-direction: column; min-height: calc(100dvh - 120px); border-left: 1px solid var(--line); }
.week .day:first-child { border-left: 0; }
.day-head { display: flex; align-items: center; gap: 6px; height: 34px; font-size: 12px; font-weight: 500; color: var(--text-2); padding: 0 6px 0 10px; border-bottom: 1px solid var(--line-soft); }
.num { font-variant-numeric: tabular-nums; color: var(--text); }
.is-today .num { color: var(--on-accent); background: var(--accent-fill); border-radius: 5px; padding: 0 5px; }
.day .tasks { flex: 1; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.day .task { min-height: 0; padding: 6px 7px; gap: 6px; flex-wrap: nowrap; font-size: 12px; }
.day .prio, .day .meta > :not(.due), .day .due :is(.icon, .dl) { display: none; }
.day .ttitle { white-space: normal; }
.month .dow { font-size: 11.5px; color: var(--text-3); padding: 7px 10px; border-bottom: 1px solid var(--line); }
.month .day { display: flex; flex-direction: column; min-height: 112px; border-left: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.month .day:nth-child(7n + 8) { border-left: 0; }
.month .day-head { border: 0; height: 28px; }
.month .outside .num { color: var(--text-3); }
.month .day .tasks { padding: 2px 4px 4px; }
.month .day .meta { display: none; }

/* ---- dialogs & menus */
dialog {
  position: fixed; inset: 0; margin: auto; border: 0; padding: 0; color: var(--text);
  border-radius: 12px; background: var(--raised); box-shadow: var(--shadow-pop);
  width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto;
}
dialog::backdrop { background: light-dark(rgb(20 20 30 / .18), rgb(0 0 0 / .5)); }
dialog[open] { animation: zoom .16s var(--ease); }
dialog[open]::backdrop { animation: fade .16s ease-out; }
@keyframes zoom { from { opacity: 0; transform: scale(.97) translateY(4px); } }
#create, #search { margin: 12vh auto auto; }
#create { width: min(680px, calc(100vw - 32px)); overflow: visible; }

.menu {
  position: fixed; z-index: 3000; min-width: 210px; max-width: 300px; padding: 4px; border-radius: 9px;
  background: var(--raised); box-shadow: var(--shadow-pop); animation: zoom .12s var(--ease);
}
.menu-filter { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 7px 8px 9px; margin-bottom: 4px; outline: none; }
.menu-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.menu-item { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px; border-radius: 6px; cursor: default; }
.menu-item::before { background: var(--active); }
.menu-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-ico { width: 14px; }
.menu-check { color: var(--text-2); }
.menu-empty { padding: 8px; color: var(--text-3); }
.menu-extra { border-top: 1px solid var(--line); margin-top: 4px; padding: 6px 4px 2px; }
.menu-extra input { width: 100%; border: 0; border-radius: 6px; padding: 5px 8px; background: var(--band); box-shadow: inset 0 0 0 1px var(--line); }

/* Property buttons ("pills") */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: none; box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; font-weight: 500; cursor: default; white-space: nowrap; max-width: 220px; }
.pill > span { overflow: hidden; text-overflow: ellipsis; }
.pill.empty { color: var(--text-2); }
.pill.empty .icon { color: var(--text-3); }
.pill.overdue { color: var(--danger); }
.pill.from-text { box-shadow: inset 0 0 0 1px var(--accent-fill); background: var(--accent-soft); }
.pill[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--accent-fill); color: var(--accent); }
.pill:disabled { opacity: .5; }

/* Create modal (Linear "New issue") */
.compose { display: flex; flex-direction: column; }
.c-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 0 16px; }
.c-head .pill { box-shadow: none; background: var(--active); }
.c-crumb { color: var(--text-2); }
.c-title { border: 0; background: none; outline: none; font-size: 17px; font-weight: 600; padding: 14px 18px 4px; }
.c-title::placeholder, .c-notes::placeholder, .dm-notes::placeholder, .dm-title::placeholder { color: var(--text-3); }
.c-notes { border: 0; background: none; outline: none; resize: none; padding: 2px 18px 8px; min-height: 52px; field-sizing: content; max-height: 40vh; color: var(--text); font-size: 13.5px; }
.c-props { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 16px 12px; }
.compose > .chips { padding: 0 16px 10px; }
.compose > .chips:empty { display: none; }
.c-foot { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-top: 1px solid var(--line); }
.hint { color: var(--text-3); font-size: 11.5px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.switch-label { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 12.5px; }
.switch { position: relative; display: inline-flex; }
.switch input { appearance: none; -webkit-appearance: none; margin: 0; width: 26px; height: 16px; border-radius: 8px; background: var(--active); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.switch input:checked { background: var(--accent-fill); box-shadow: none; }
.switch span { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .18s var(--ease); pointer-events: none; }
.switch input:checked + span { transform: translateX(10px); }

/* Detail modal: content left, properties panel right */
.task-modal { width: min(820px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 48px)); }
.dm { display: flex; flex-direction: column; height: 100%; }
.dm-head { display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.dm-crumbs { flex: 0 1 auto; }
.dm-body { display: grid; grid-template-columns: minmax(0, 1fr) 240px; flex: 1; min-height: 0; }
.dm-main { padding: 18px 22px; overflow-y: auto; }
.dm-title-row { display: flex; align-items: flex-start; gap: 10px; }
.dm-title-row .check { margin-top: 5px; }
.dm-title { flex: 1; border: 0; background: none; outline: none; resize: none; field-sizing: content; font-size: 19px; font-weight: 600; line-height: 1.35; padding: 0; min-height: 1.4em; }
.dm.done .dm-title { color: var(--text-2); }
.dm-notes { display: block; width: 100%; border: 0; background: none; outline: none; resize: none; field-sizing: content; min-height: 60px; padding: 10px 0 0 28px; font-size: 13.5px; line-height: 1.55; }
.dm-subs { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.dm-sub-head { display: flex; gap: 8px; font-weight: 500; margin-bottom: 4px; }
.sub-count { color: var(--text-3); font-weight: 400; }
.sub-list { list-style: none; margin: 0; padding: 0; }
.sub-item { display: flex; align-items: center; gap: 8px; height: 34px; border-bottom: 1px solid var(--line-soft); }
.sub-item .icon-btn { opacity: .0; transition: opacity .12s ease-out; }
.sub-item:hover .icon-btn, .sub-item .icon-btn:focus-visible { opacity: 1; }
.sub-title { flex: 1; border: 0; background: none; outline: none; padding: 4px 0; }
.sub-item.done .sub-title { color: var(--text-3); text-decoration: line-through; }
.sub-add { display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.dm-side { border-left: 1px solid var(--line); background: var(--band); padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; border-bottom-right-radius: 12px; }
.dm-prop { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; min-height: 32px; }
.dm-label { color: var(--text-2); font-size: 12px; }
.dm-side .pill { box-shadow: none; justify-self: start; max-width: 100%; }
.dm-meta { margin: auto 0 0; padding-top: 12px; color: var(--text-3); font-size: 11.5px; }

/* Command palette */
.spot { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.spot input { flex: 1; border: 0; background: none; font-size: 15px; padding: 14px 0; outline: none; min-width: 0; color: var(--text); }
#search-results { list-style: none; margin: 0; padding: 6px; max-height: 56vh; overflow-y: auto; }
#search-results:empty { display: none; }
.result-head { padding: 8px 10px 4px; font-size: 11.5px; color: var(--text-3); }
.result { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 6px; cursor: default; }
.result::before { background: var(--active); }
.result .ttitle { font-weight: 400; }
.result .meta { font-size: 11.5px; color: var(--text-3); }
.result.done .ttitle { color: var(--text-3); }
.result .icon, .result .dot { color: var(--text-2); }

/* Project modal */
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 4px 18px; }
.sheet-head h2 { font-size: 14px; font-weight: 600; }
.sheet-body { padding: 8px 18px 4px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; color: var(--text-2); font-size: 12px; font-weight: 500; }
.field > legend { padding: 0; margin-bottom: 6px; }
.text-input { border: 0; border-radius: 6px; padding: 7px 9px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: 13px; outline: none; }
.text-input:focus { box-shadow: inset 0 0 0 1px var(--accent-fill), 0 0 0 3px var(--accent-soft); }
.opts { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { position: relative; width: 20px; height: 20px; border-radius: 50%; background: var(--c); transition: transform .12s ease-out; }
.swatch:hover { transform: scale(1.12); }
.swatch input { appearance: none; -webkit-appearance: none; position: absolute; inset: -3px; margin: 0; border-radius: 50%; cursor: default; }
.swatch input:checked { box-shadow: 0 0 0 2px var(--raised), 0 0 0 3.5px var(--c); }
.swatch input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.cat-list { list-style: none; margin: 0; padding: 0; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--line); }
.cat-list:empty { display: none; }
.cat-item { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line-soft); }
.cat-item:last-child { border-bottom: 0; }
.cat-name { flex: 1; border: 0; background: none; outline: none; color: var(--text); font-size: 13px; font-weight: 400; }
.cat-add-row { display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--line); color: var(--text-3); font-weight: 400; }
.sheet-foot { display: flex; align-items: center; gap: 8px; padding: 14px 18px 16px; }
.p-danger { display: flex; gap: 6px; }

.keys dl { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; padding: 8px 18px 18px; margin: 0; }
.keys dt { white-space: nowrap; color: var(--text-2); }
.keys dd { margin: 0; }

/* ---- toasts */
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 2000; }
.toast { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 9px; font-size: 12.5px; background: var(--raised); color: var(--text); box-shadow: var(--shadow-pop); animation: in .18s var(--ease); max-width: min(420px, calc(100vw - 32px)); }
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast.error { box-shadow: inset 3px 0 0 var(--danger), var(--shadow-pop); }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .18s ease-out, transform .18s ease-out; }
.link { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: default; padding: 0; }

@keyframes in { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade { from { opacity: 0; } }

/* ---- narrow screens */
@media (max-width: 760px) {
  #app { display: block; }
  #sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 50; background: var(--chrome); transform: translateX(-100%); transition: transform .2s var(--ease); }
  .nav-open #sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / .3); opacity: 0; pointer-events: none; transition: opacity .2s ease-out; }
  .nav-open .scrim { opacity: 1; pointer-events: auto; }
  main { margin: 0; height: 100dvh; border-radius: 0; }
  .view-head { padding-left: 12px; }
  .view-head .nav-btn { display: inline-flex; margin-left: 0; }
  .crumbs { min-width: 80px; }
  .tools .btn span, .seg a span, .progress .bar { display: none; }
  .pad { padding: 10px 12px 0; }
  .task { padding: 0 12px; }
  .meta .label, .meta .sub, .muted-ico { display: none; }
  .board { grid-template-columns: repeat(3, 82vw); overflow-x: auto; scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .week { grid-template-columns: 1fr; }
  .week .day { min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
  .week .day .tasks { min-height: 36px; }
  .month .day { min-height: 64px; }
  .month .day .check { display: none; }
  .dm-body { grid-template-columns: 1fr; overflow-y: auto; }
  .dm-side { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
  .task-modal { height: auto; }
  .hint { display: none; }
  #create, #search { margin-top: 6vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
