/* ============ shared primitives ============ */
.ava { --c: var(--cobalt); width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; flex: none; }
.ava.sm { width: 22px; height: 22px; font-size: 10px; }
.ava.xs { width: 18px; height: 18px; font-size: 9px; }
.stack { display: inline-flex; } .stack .ava { box-shadow: 0 0 0 2px #fff; } .stack .ava + .ava { margin-left: -6px; }

.ib { width: 32px; height: 32px; border-radius: var(--r-item); display: inline-grid; place-items: center; color: var(--g600); transition: background .15s, color .15s; flex: none; }
.ib svg { width: 18px; height: 18px; }
.ib:hover { background: var(--g100); color: var(--ink); }
.ib.xs { width: 24px; height: 24px; border-radius: 6px; } .ib.xs svg { width: 14px; height: 14px; }
.ib.danger:hover { background: var(--danger-tint); color: var(--danger); }

.btn { height: 36px; border-radius: var(--r-btn); padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn svg { width: 16px; height: 16px; }
.btn.has-icon { padding-left: 11px; }
.btn.dark { background: var(--ink); color: #fff; } .btn.dark:hover { background: #22232A; }
.btn.line { border: 1px solid var(--g200); color: var(--g700); font-weight: 500; background: #fff; } .btn.line:hover { background: var(--g50); border-color: var(--g300); }
.btn.ghost { color: var(--g600); font-weight: 500; } .btn.ghost:hover { background: var(--g100); color: var(--ink); }
.btn.danger { background: var(--danger); color: #fff; } .btn.danger:hover { background: #A51D31; }
.btn.sm { height: 30px; font-size: 12.5px; padding: 0 10px; border-radius: 7px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.label { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--g500); }
.pill { height: 24px; border-radius: 6px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; background: var(--g100); color: var(--g700); }
.pill.cob { background: var(--cobalt-tint); color: var(--cobalt-text); }
.pill.warn { background: var(--danger-tint); color: var(--danger); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { height: 22px; border-radius: 5px; padding: 0 7px; font-size: 12px; border: 1px solid var(--g200); color: var(--g700); display: inline-flex; align-items: center; gap: 4px; background: #fff; }
.tag button { color: var(--g400); display: grid; place-items: center; width: 14px; height: 14px; border-radius: 3px; } .tag button:hover { color: var(--ink); background: var(--g100); }
.tag button svg { width: 10px; height: 10px; stroke-width: 2; }
.kbd { font: 500 11px var(--mono); color: var(--g500); border: 1px solid var(--g200); border-radius: 5px; padding: 1px 5px; }

.glyph { width: 18px; height: 18px; display: grid; place-items: center; flex: none; }
.glyph i { width: 9px; height: 9px; border-radius: 2.5px; background: var(--g300); transform: skewY(-18deg); }
.glyph.shared i { background: transparent; box-shadow: inset 0 0 0 1.6px var(--g400); }
.cdot { width: 7px; height: 7px; border-radius: 2px; transform: skewY(-18deg); background: var(--g300); flex: none; display: inline-block; }
.cdot.shared { background: transparent; box-shadow: inset 0 0 0 1.4px var(--g400); }
.cdot.none { background: transparent; box-shadow: inset 0 0 0 1.4px var(--g200); }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--g200); border-top-color: var(--cobalt); animation: rc-spin .8s linear infinite; }

/* form controls */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--g600); }
.input, .textarea, .select { width: 100%; height: 38px; border: 1px solid var(--g200); border-radius: var(--r-btn); padding: 0 12px; background: #fff; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 88px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--g300); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(37, 99, 255, .14); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(194, 37, 59, .1); }
.err { font-size: 12.5px; color: var(--danger); min-height: 0; }
.err:empty { display: none; }
.hint { font-size: 12px; color: var(--g500); line-height: 1.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.seg { display: inline-flex; background: var(--g100); border-radius: var(--r-item); padding: 2px; }
.seg button { height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12.5px; color: var(--g500); font-weight: 500; }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(11, 11, 15, .08); }
.seg.lg button { height: 32px; padding: 0 14px; font-size: 13px; }

.chk { display: flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; min-height: 32px; }
.chk input { width: 16px; height: 16px; accent-color: var(--ink); }

/* ============ sidebar ============ */
.brand { display: flex; align-items: center; gap: 9px; padding: 2px 4px 0 6px; height: 36px; flex: none; }
.brand img { width: 26px; height: 26px; }
.wordmark { font-size: 13px; font-weight: 700; letter-spacing: .2em; flex: 1; white-space: nowrap; }
.primary { margin-top: 22px; display: flex; flex-direction: column; gap: 1px; flex: none; }
.nav, .coll { border-radius: var(--r-item); display: flex; align-items: center; gap: 11px; padding: 0 10px; color: var(--g700); position: relative; transition: background .15s; width: 100%; text-align: left; white-space: nowrap; }
.nav { height: 36px; font-size: 14px; font-weight: 500; }
.nav svg { width: 18px; height: 18px; color: var(--g500); }
.nav .count, .coll .n { margin-left: auto; font-size: 12px; color: var(--g400); font-weight: 500; }
.nav .count.alert { color: var(--danger); }
.nav:hover, .coll:hover { background: var(--g100); }
.nav[aria-current="page"], .coll[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--g150), 0 1px 2px rgba(11, 11, 15, .04); }
.nav[aria-current="page"] svg { color: var(--cobalt); }
.group { margin-top: 26px; }
.ghead { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 0 10px; height: 24px; }
.ghead h2 { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--g500); }
.ghead .ib { opacity: .55; transition: opacity .15s; }
.group:hover .ghead .ib, .ghead .ib:focus-visible { opacity: 1; }
.glist { margin-top: 4px; display: flex; flex-direction: column; gap: 1px; }
.coll { height: 34px; font-size: 13.5px; }
.coll > span.nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.coll[aria-current="page"] { font-weight: 500; }
.coll[aria-current="page"] .glyph i { background: var(--cobalt); }
.coll[aria-current="page"] .glyph.shared i { background: var(--violet); box-shadow: none; }
.coll .stack .ava { box-shadow: 0 0 0 1.5px var(--g50); }
.gempty { font-size: 12.5px; color: var(--g400); padding: 6px 10px; line-height: 1.5; }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; display: flex; flex-direction: column; gap: 2px; flex: none; }
.foot-item { height: 34px; display: flex; align-items: center; gap: 11px; padding: 0 10px; border-radius: var(--r-item); font-size: 13.5px; color: var(--g600); width: 100%; text-align: left; }
.foot-item svg { width: 18px; height: 18px; color: var(--g500); } .foot-item:hover { background: var(--g100); }
.foot-item .warn { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.me b { display: block; font-size: 13px; font-weight: 600; } .me small { font-size: 11.5px; color: var(--g500); }

/* collapsed sidebar (desktop) */
.side-collapsed .side { padding-left: 10px; padding-right: 10px; }
.side-collapsed .wordmark, .side-collapsed .nav > span, .side-collapsed .coll > span:not(.glyph), .side-collapsed .ghead h2,
.side-collapsed .me > div, .side-collapsed .foot-item > span, .side-collapsed .gempty, .side-collapsed .ghead .ib { display: none; }
.side-collapsed .brand { flex-direction: column; height: auto; gap: 10px; padding: 0; }
.side-collapsed .nav, .side-collapsed .coll, .side-collapsed .foot-item { justify-content: center; padding: 0; }
.side-collapsed .ghead { height: 1px; background: var(--line); margin: 0 8px; padding: 0; }
.side-collapsed .me { justify-content: center; padding: 6px 0; }

/* ============ page header ============ */
.top { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.top .titles { flex: 1; min-width: 240px; }
.eyebrow { font-size: 13px; color: var(--g500); font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eyebrow .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--g300); }
.eyebrow .over { color: var(--danger); }
h1.h1 { font-size: 44px; line-height: 1.05; font-weight: 650; letter-spacing: -.035em; margin-top: 8px; overflow-wrap: anywhere; }
.top .actions { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; flex-wrap: wrap; }
.search-btn { height: 36px; width: 220px; border: 1px solid var(--g200); border-radius: var(--r-btn); display: flex; align-items: center; gap: 8px; padding: 0 10px 0 11px; color: var(--g500); font-size: 13.5px; background: #fff; transition: border-color .15s; }
.search-btn:hover { border-color: var(--g300); }
.search-btn svg { width: 16px; height: 16px; } .search-btn .kbd { margin-left: auto; }
.desc-line { margin-top: 14px; font-size: 14.5px; line-height: 1.6; color: var(--g600); max-width: 640px; white-space: pre-line; }

.collab { margin-top: 18px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--g500); flex-wrap: wrap; }
.collab .sep { width: 1px; height: 16px; background: var(--g200); }
.local-note { display: inline-flex; align-items: center; gap: 6px; }
.local-note svg { width: 14px; height: 14px; }

/* priorities strip */
.focus { margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.focus .f { padding: 14px 18px 2px 0; display: flex; gap: 12px; align-items: flex-start; text-align: left; min-width: 0; border-radius: 0; }
.focus .f + .f { padding-left: 18px; border-left: 1px solid var(--line); }
.focus .idx { font: 500 12px var(--mono); color: var(--g400); padding-top: 2px; }
.focus .ft { font-size: 14.5px; font-weight: 550; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.focus .fm { font-size: 12.5px; color: var(--g500); margin-top: 3px; }
.focus .f:hover .ft { color: var(--cobalt); }
.focus .f.empty { color: var(--g400); font-size: 13.5px; padding-top: 16px; }

/* ============ Collection Progress (signature) ============ */
/* Today: compact horizontal panel (~104px). */
.prog { margin-top: 28px; width: min(100%, 520px); border-radius: 14px; background: var(--fold); color: #fff; padding: 18px 22px 20px;
  box-shadow: 0 10px 24px -18px rgba(68, 72, 240, .7); }
.prog-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.prog-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.prog-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.prog-name { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 4px; }
.prog-name:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .5); }
.prog-kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.prog-sub { font-size: 13px; color: rgba(255, 255, 255, .85); font-variant-numeric: tabular-nums; }
.prog-pct { font-size: 28px; line-height: 1; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; flex: none; }
.prog-pct small { font-size: 16px; font-weight: 500; margin-left: 1px; opacity: .85; }
.prog-pct.none { font-size: 20px; opacity: .7; }
.prog-gauge { margin-top: 14px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .26); overflow: hidden; }
.prog-gauge > i { display: block; height: 100%; border-radius: 999px; background: #fff; transition: width .4s var(--ease); }
.prog-switch { position: relative; width: 24px; height: 24px; border-radius: 6px; display: inline-grid; place-items: center; color: rgba(255, 255, 255, .8); flex: none; transition: background .15s; }
.prog-switch svg { width: 14px; height: 14px; }
.prog-switch:hover, .prog-switch:focus-within { background: rgba(255, 255, 255, .16); color: #fff; }
.prog-switch select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.prog-switch:focus-within { box-shadow: 0 0 0 2px #fff; }
.prog-switch select option { color: var(--ink); }
.prog-link { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .5); font-size: inherit; }
.prog-btn { height: 30px; border-radius: 8px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: #fff; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24); flex: none; }
.prog-btn:hover { background: rgba(255, 255, 255, .24); }
.prog-btn svg { width: 14px; height: 14px; }
.prog.is-empty .prog-row { align-items: center; }
.prog :focus-visible { box-shadow: 0 0 0 2px #fff; }

/* Collection pages: inline metadata meter. */
.cmeta { margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--g500); line-height: 18px; }
.cmeta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--g300); }
.meter { display: inline-flex; align-items: center; gap: 8px; }
.meter-track { width: 68px; height: 4px; border-radius: 999px; background: var(--g150); overflow: hidden; flex: none; }
.meter-track > i { display: block; height: 100%; border-radius: 999px; background: var(--fold); background-size: 68px 100%; transition: width .4s var(--ease); }
.meter-pct { font-size: 12.5px; font-weight: 600; color: var(--g700); font-variant-numeric: tabular-nums; }
.meter.is-empty .meter-pct { font-weight: 500; color: var(--g500); }

/* ============ sections + task rows ============ */
.sec { margin-top: 38px; }
.sechead { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sechead h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.sechead .n { font-size: 13px; color: var(--g500); }
.sechead .tools { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sechead .select { height: 30px; font-size: 12.5px; width: auto; padding-left: 10px; border-radius: 7px; }

.tasklist { position: relative; }
.todo { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto 32px; align-items: center; gap: 14px; min-height: 54px; padding: 6px 6px 6px 10px; border-bottom: 1px solid var(--line); position: relative; cursor: pointer; transition: background .12s; }
.todo:hover { background: var(--g50); }
.todo:focus-within { background: var(--g50); }
.todo.sel { background: linear-gradient(90deg, var(--cobalt-tint), rgba(243, 238, 254, .6)); }
.todo.sel::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: linear-gradient(var(--cobalt), var(--violet)); }
.todo .open-btn { text-align: left; min-width: 0; display: block; width: 100%; border-radius: 4px; }
.todo .open-btn::after { content: ""; position: absolute; inset: 0; } /* full-row hit area */
.check { width: 20px; height: 20px; border-radius: var(--r-check); box-shadow: inset 0 0 0 1.6px var(--g300); display: grid; place-items: center; transition: background .15s, box-shadow .15s; color: #fff; position: relative; z-index: 1; }
.check svg { width: 13px; height: 13px; stroke-width: 2.4; opacity: 0; }
.check:hover { box-shadow: inset 0 0 0 1.6px var(--cobalt); }
.check[aria-checked="true"] { background: var(--ink); box-shadow: none; }
.check[aria-checked="true"] svg { opacity: 1; }
.todo .t { font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.todo.done .t { color: var(--g400); text-decoration: line-through; text-decoration-color: var(--g300); }
.todo .sub { font-size: 12.5px; color: var(--g500); margin-top: 2px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.todo .sub .sep { color: var(--g300); }
.todo .sub .over { color: var(--danger); }
.todo .meta { display: flex; align-items: center; gap: 16px; }
.todo .time { font: 500 12.5px var(--mono); color: var(--g500); display: flex; align-items: center; gap: 6px; min-width: 64px; justify-content: flex-end; white-space: nowrap; }
.todo .time.soon { color: var(--cobalt); }
.todo .time.over { color: var(--danger); }
.todo .time svg { width: 13px; height: 13px; }
.todo .who { display: flex; align-items: center; }
.todo .more { position: relative; z-index: 1; opacity: 0; transition: opacity .12s; }
.todo:hover .more, .todo.sel .more, .todo .more:focus-visible, .todo .more[aria-expanded="true"] { opacity: 1; }
.prio { display: inline-flex; gap: 2px; width: 22px; justify-content: center; align-items: flex-end; height: 14px; flex: none; }
.prio i { width: 3px; border-radius: 1px; background: var(--g200); }
.prio i:nth-child(1) { height: 6px; } .prio i:nth-child(2) { height: 10px; } .prio i:nth-child(3) { height: 14px; }
.prio.p1 i:nth-child(-n+1), .prio.p2 i:nth-child(-n+2) { background: var(--g600); }
.prio.p3 i { background: var(--ink); }

.addrow { margin-top: 8px; border: 1px solid var(--g200); border-radius: 8px; background: var(--g50); cursor: text; display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 10px; color: var(--g500); font-size: 14px; border-bottom: 1px solid var(--g200); }
.addrow svg { width: 18px; height: 18px; flex: none; }
.addrow input { flex: 1; border: 0; height: 44px; background: transparent; font-size: 14px; color: var(--ink); }
.addrow input::placeholder { color: var(--g500); }
.addrow:hover { border-color: var(--g300); }
.addrow:focus-within { border-color: var(--cobalt); color: var(--cobalt); box-shadow: 0 0 0 2px rgba(37,99,255,.1); background: #fff; }
.addrow .hint { white-space: nowrap; }

.empty { padding: 36px 8px; text-align: center; color: var(--g500); font-size: 14px; line-height: 1.6; }
.empty b { display: block; color: var(--ink); font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.empty .btns { margin-top: 14px; display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.cont { display: grid; grid-template-columns: repeat(3, 1fr); }
.ci { min-height: 78px; align-items: center; padding: 14px 16px 14px 0; display: flex; gap: 12px; text-align: left; min-width: 0; }
.ci + .ci { padding-left: 16px; border-left: 1px solid var(--line); }
.ci .ico { width: 32px; height: 32px; border-radius: 8px; background: var(--g100); display: grid; place-items: center; color: var(--g600); flex: none; }
.ci .ico svg { width: 16px; height: 16px; }
.ci b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci span { font-size: 12px; color: var(--g500); }
.ci > div { min-width: 0; }
.ci:hover b { color: var(--cobalt); }

/* ============ welcome (empty workspace) ============ */
.welcome { margin-top: 32px; border: 1px solid var(--line); border-radius: var(--r-panel); padding: 28px 30px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.welcome h2 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.welcome p { margin-top: 6px; color: var(--g600); line-height: 1.6; font-size: 14px; max-width: 460px; }
.welcome .btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ banner ============ */
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.45; margin-bottom: 20px; }
.banner svg { width: 16px; height: 16px; flex: none; }
.banner.info { background: var(--g50); border: 1px solid var(--line); color: var(--g600); }
.banner.warn { background: var(--danger-tint); color: var(--danger); }
.banner .btn { margin-left: auto; }

/* ============ calendar ============ */
.cal-wrap { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; flex: 1; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.cal .wd { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--g500); padding: 10px 8px 8px; }
.cal .day { min-height: 92px; border-top: 1px solid var(--line); padding: 8px; text-align: left; display: flex; flex-direction: column; gap: 4px; position: relative; transition: background .12s; min-width: 0; }
.cal .day + .day { border-left: 1px solid var(--line); }
.cal .day:nth-child(7n + 8) { border-left: 0; }
.cal .day:hover { background: var(--g50); }
.cal .day .dn { font-size: 13px; font-weight: 500; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; font-variant-numeric: tabular-nums; }
.cal .day.out .dn { color: var(--g300); }
.cal .day.today .dn { background: var(--ink); color: #fff; }
.cal .day[aria-selected="true"] { background: linear-gradient(160deg, var(--cobalt-tint), rgba(243, 238, 254, .7)); }
.cal .day[aria-selected="true"]::before { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1.5px var(--cobalt); pointer-events: none; }
.cal .chip { font-size: 11.5px; line-height: 1.3; padding: 2px 6px; border-radius: 4px; background: var(--g100); color: var(--g700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.cal .chip.done { color: var(--g400); text-decoration: line-through; }
.cal .chip.p3 { background: var(--ink); color: #fff; }
.cal .chip.over { background: var(--danger-tint); color: var(--danger); }
.cal .more-n { font-size: 11px; color: var(--g500); padding-left: 6px; }
.agenda h3 { font-size: 15px; font-weight: 600; }
.agenda .sub { font-size: 12.5px; color: var(--g500); margin-top: 2px; }
.agenda .tasklist { margin-top: 12px; border-top: 1px solid var(--line); }
.agenda .todo { grid-template-columns: 22px minmax(0, 1fr) auto; }
.agenda .todo .meta .prio, .agenda .todo .more { display: none; }

/* ============ inbox ============ */
.link-form { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.link-form .field { gap: 4px; }
.linklist { margin-top: 8px; }
.lrow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 6px 14px 4px; border-bottom: 1px solid var(--line); }
.lrow .ico { width: 36px; height: 36px; border-radius: 9px; background: var(--g100); display: grid; place-items: center; color: var(--g600); font-weight: 600; font-size: 13px; }
.lrow .lt { font-size: 14.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.lrow .lu { font-size: 12.5px; color: var(--g500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.lrow .ln { font-size: 13px; color: var(--g600); margin-top: 6px; line-height: 1.5; white-space: pre-line; }
.lrow .assoc { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lrow .acts { display: flex; gap: 2px; align-items: center; }
.lrow a.lt:hover { color: var(--cobalt); }

/* ============ search results ============ */
.results { max-height: 420px; overflow-y: auto; margin: 4px -8px 0; padding: 0 8px; }
.results h3 { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--g500); margin: 14px 0 4px; }
.res { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; text-align: left; font-size: 14px; }
.res:hover, .res[aria-selected="true"] { background: var(--g100); }
.res .rs { margin-left: auto; font-size: 12px; color: var(--g500); white-space: nowrap; }
.res .rt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.res .rt.done { color: var(--g400); text-decoration: line-through; }
.res mark { background: var(--cobalt-tint); color: var(--cobalt-text); border-radius: 2px; }
.res svg { width: 16px; height: 16px; color: var(--g500); }

/* ============ context panel ============ */
.ctx-top { height: 60px; display: flex; align-items: center; gap: 4px; padding: 0 14px 0 22px; border-bottom: 1px solid var(--line); flex: none; }
.ctx-top .crumb { font-size: 12.5px; color: var(--g500); display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ctx-top .crumb button:hover { color: var(--ink); text-decoration: underline; }
.ctx-top .cdot { width: 8px; height: 8px; background: var(--cobalt); box-shadow: none; }
.ctx-top .cdot.shared { background: var(--violet); }
.ctx-top .cdot.none { background: var(--g300); }
.ctx-body { flex: 1; overflow-y: auto; padding: 22px 24px 24px; scrollbar-width: thin; }
.ctx .ttl { font-size: 21px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin-top: 12px; width: 100%; border: 0; resize: none; background: transparent; padding: 2px 4px; margin-left: -4px; border-radius: 6px; overflow: hidden; display: block; }
.ctx .ttl:hover { background: var(--g50); }
.ctx .ttl:focus { background: var(--g50); box-shadow: 0 0 0 1px var(--g200); }
.ctx .dsc { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--g600); width: 100%; border: 0; resize: none; background: transparent; padding: 4px; margin-left: -4px; border-radius: 6px; min-height: 52px; display: block; }
.ctx .dsc::placeholder { color: var(--g400); }
.ctx .dsc:hover { background: var(--g50); }
.ctx .dsc:focus { background: var(--g50); box-shadow: 0 0 0 1px var(--g200); }
.ctx .status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctx .status .btn { margin-left: auto; }
.props { margin-top: 18px; border-top: 1px solid var(--line); }
.prop { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); font-size: 13.5px; gap: 6px; }
.prop > label, .prop > span.k { color: var(--g500); display: flex; align-items: center; gap: 8px; }
.prop > label svg, .prop > span.k svg { width: 15px; height: 15px; color: var(--g400); }
.prop .v { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; padding: 6px 0; }
.prop .bare { border: 0; background: transparent; height: 32px; padding: 0 6px; margin-left: -6px; border-radius: 6px; font-size: 13.5px; color: var(--ink); min-width: 0; max-width: 100%; }
.prop .bare:hover { background: var(--g50); }
.prop .bare:focus { background: var(--g50); box-shadow: 0 0 0 1px var(--g200); }
.prop select.bare { appearance: none; cursor: pointer; padding-right: 6px; }


.tag-input { border: 0; height: 26px; font-size: 13px; min-width: 80px; flex: 1; background: transparent; padding: 0 4px; border-radius: 5px; }
.tag-input:focus { background: var(--g50); }
.ctx .block { margin-top: 22px; }
.ctx .block > .label { margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.ctx .block > .label .ib { margin: -6px -6px -6px 0; }
.sublist .s { display: flex; align-items: center; gap: 10px; min-height: 34px; font-size: 13.5px; color: var(--g700); }
.sublist .s .check { width: 16px; height: 16px; border-radius: 5px; }
.sublist .s .check svg { width: 10px; height: 10px; }
.sublist .s.done span.st { color: var(--g400); text-decoration: line-through; text-decoration-color: var(--g300); }
.sublist .s span.st { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sublist .s .ib { opacity: 0; } .sublist .s:hover .ib, .sublist .s .ib:focus-visible { opacity: 1; }
.sublist .add { display: flex; align-items: center; gap: 10px; color: var(--g500); }
.sublist .add svg { width: 16px; height: 16px; }
.sublist .add input { border: 0; height: 34px; flex: 1; background: transparent; font-size: 13.5px; }
.link { display: flex; align-items: center; gap: 11px; padding: 9px 6px 9px 10px; border-radius: 9px; border: 1px solid var(--line); margin-bottom: 6px; transition: border-color .15s; }
.link:hover { border-color: var(--g300); }
.link .ico { width: 28px; height: 28px; border-radius: 7px; background: var(--g100); display: grid; place-items: center; color: var(--g600); flex: none; font-size: 12px; font-weight: 600; }
.link a { min-width: 0; flex: 1; }
.link b { display: block; font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link span { font-size: 11.5px; color: var(--g500); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link a:hover b { color: var(--cobalt); }
.ctx .meta-foot { margin-top: 26px; font-size: 12px; color: var(--g400); line-height: 1.7; }
.ctx-foot { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; gap: 8px; flex: none; }
.ctx-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--g500); font-size: 13.5px; line-height: 1.6; padding: 24px; }
.saved-ind { font-size: 11.5px; color: var(--g400); margin-right: 4px; transition: opacity .3s; }

/* ============ dialogs, menus, toasts ============ */
dialog.dlg { border: 0; padding: 0; border-radius: 16px; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); margin: auto; color: var(--ink); box-shadow: 0 0 0 1px rgba(11, 11, 15, .06), 0 40px 80px -24px rgba(11, 11, 15, .35); }
dialog.dlg::backdrop { background: rgba(11, 11, 15, .32); }
dialog.dlg[open] { animation: rc-fade .18s var(--ease); }
dialog.dlg.sm { width: min(420px, calc(100vw - 32px)); }
dialog.dlg.search { width: min(620px, calc(100vw - 32px)); margin-top: 12vh; }
.dlg form, .dlg .dlg-inner { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.dlg h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.dlg .lead { font-size: 14px; color: var(--g600); line-height: 1.6; margin-top: -8px; }
.dlg .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.dlg .foot .left { margin-right: auto; }
.dlg .search-field { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 4px 4px 14px; }
.dlg .search-field svg { width: 18px; height: 18px; color: var(--g500); }
.dlg .search-field input { border: 0; flex: 1; font-size: 16px; height: 32px; background: transparent; }
.dlg .settings-sec { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.dlg .settings-sec h3 { font-size: 13.5px; font-weight: 600; }
.dlg .settings-sec p { font-size: 13px; color: var(--g600); line-height: 1.55; }
.dlg .settings-sec .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kind-pick label { border: 1px solid var(--g200); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; transition: border-color .15s, background .15s; }
.kind-pick label:has(input:checked) { border-color: var(--ink); background: var(--g50); }
.kind-pick input { margin-top: 3px; accent-color: var(--ink); }
.kind-pick b { display: block; font-size: 13.5px; font-weight: 600; }
.kind-pick small { font-size: 12px; color: var(--g500); line-height: 1.45; display: block; margin-top: 2px; }

.menu { position: fixed; z-index: 60; min-width: 200px; background: #fff; border-radius: 10px; padding: 5px; box-shadow: 0 0 0 1px rgba(11, 11, 15, .07), 0 16px 36px -12px rgba(11, 11, 15, .28); animation: rc-fade .12s var(--ease); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: 6px; font-size: 13.5px; text-align: left; color: var(--g700); }
.menu button svg { width: 16px; height: 16px; color: var(--g500); }
.menu button:hover, .menu button:focus-visible { background: var(--g100); box-shadow: none; color: var(--ink); }
.menu button.danger { color: var(--danger); } .menu button.danger svg { color: var(--danger); }
.menu button.danger:hover { background: var(--danger-tint); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu .mlabel { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--g400); padding: 8px 10px 4px; }
.menu .menu-scroll { max-height: 240px; overflow-y: auto; }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 10px 10px 16px; font-size: 13.5px; display: flex; align-items: center; gap: 12px; box-shadow: 0 16px 32px -12px rgba(11, 11, 15, .5); animation: rc-fade .18s var(--ease); max-width: min(560px, calc(100vw - 32px)); }
.toast.error { background: var(--danger); }
.toast button { color: #fff; font-weight: 600; font-size: 13px; padding: 4px 10px; border-radius: 6px; background: rgba(255, 255, 255, .14); }
.toast button:hover { background: rgba(255, 255, 255, .24); }
.toast .x { background: none; padding: 4px; opacity: .7; } .toast .x svg { width: 14px; height: 14px; }

.boot { position: fixed; inset: 0; display: grid; place-items: center; background: #fff; z-index: 90; }
.boot .in { display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--g500); font-size: 13.5px; text-align: center; max-width: 420px; padding: 24px; line-height: 1.6; }
.boot img { width: 40px; height: 40px; }
.boot .err-title { color: var(--ink); font-weight: 600; font-size: 16px; }

/* ============ responsive tweaks ============ */
@media (max-width: 1279px) {
  .cal-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  h1.h1 { font-size: 34px; }
  .focus, .cont { grid-template-columns: 1fr; }
  .focus .f + .f, .ci + .ci { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .focus .f { padding-bottom: 12px; }
  .prog { width: 100%; }
  .todo .meta .time { min-width: 0; }
  .search-btn { width: auto; } .search-btn .kbd { display: none; }
  .welcome { grid-template-columns: 1fr; }
  .cal .day { min-height: 64px; padding: 4px; } .cal .chip { display: none; }
  .cal .day .dots { display: flex; gap: 3px; }
  .link-form { grid-template-columns: 1fr; }
  .row3 { grid-template-columns: 1fr 1fr; }
}
.cal .day .dots { display: none; }
.cal .day .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--cobalt); }
/* Light mode refinements; compact collection progress stays unchanged. */
.quick-add { width: 36px; height: 36px; border: 1px solid var(--g200); background: #fff; position: relative; }
.quick-add:hover { border-color: var(--g300); background: var(--g50); }
.quick-add::after { content: attr(data-tooltip); position: absolute; top: calc(100% + 7px); right: 0; z-index: 10; background: var(--ink); color: #fff; padding: 5px 8px; border-radius: 5px; white-space: nowrap; font-size: 12px; opacity: 0; pointer-events: none; }
.quick-add:hover::after, .quick-add:focus-visible::after { opacity: 1; }
.coll .n { font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; }
.ci:hover, .ci:focus-visible { background: var(--g50); }
.side .ghead .ib { opacity: 0; }
.side .foot-item { opacity: .65; }
.side:hover .ghead .ib, .side:focus-within .ghead .ib, .group:focus-within .ghead .ib { opacity: 1; }
.side:hover .foot-item, .side:focus-within .foot-item { opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .side .ghead .ib, .side .foot-item { opacity: 1; }
  .side .ghead .ib { width: 32px; height: 32px; }
  .quick-add { width: 44px; height: 44px; }
}
.tag-picker { position: relative; flex: 1; min-width: 100px; }
.tag-picker .tag-input { width: 100%; }
.tag-options { position: absolute; top: calc(100% + 4px); left: 0; width: max-content; min-width: 100%; max-width: 240px; max-height: 210px; overflow-y: auto; z-index: 15; background: #fff; border: 1px solid var(--g200); border-radius: 7px; padding: 4px; }
.tag-options [role="option"] { display: block; width: 100%; text-align: left; padding: 8px 10px; font-size: 13px; border-radius: 4px; overflow-wrap: anywhere; }
.tag-options [aria-selected="true"], .tag-options [role="option"]:hover { background: var(--cobalt-tint); color: var(--cobalt-text); }
.tag-options .hint { display: block; padding: 6px; }

/* Global actions belong to the sidebar in every workspace view. */
.sidebar-actions { display: flex; align-items: center; gap: 7px; margin: 18px 0 0; flex: none; }
.sidebar-actions .search-btn { width: auto; min-width: 0; flex: 1; background: var(--white); }
.sidebar-actions .quick-add { flex: none; }
.sidebar-actions + .side-scroll .primary { margin-top: 16px; }
.side-collapsed .sidebar-actions { flex-direction: column; }
.side-collapsed .sidebar-actions .search-btn { width: 36px; height: 36px; flex: none; padding: 0; justify-content: center; }
.side-collapsed .sidebar-actions .search-btn span { display: none; }
.side .sidebar-actions :focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }

/* One Settings workspace, with a persistent draft across categories. */
dialog.dlg.settings-workspace { width: min(980px, calc(100vw - 40px)); height: min(740px, calc(100dvh - 48px)); max-height: calc(100dvh - 48px); overflow: hidden; }
.dlg form.settings-form { padding: 0; gap: 0; height: 100%; min-height: 0; }
.settings-heading { display: flex; align-items: flex-start; justify-content: space-between; padding: 26px 28px 22px; border-bottom: 1px solid var(--line); flex: none; }
.settings-heading .label { margin-bottom: 6px; font-size: 10px; letter-spacing: .12em; }
.settings-heading h2 { font-size: 26px; font-weight: 650; letter-spacing: -.025em; }
.settings-heading p:last-child { font-size: 13px; color: var(--g500); margin-top: 5px; }
.settings-body { display: grid; grid-template-columns: 208px minmax(0, 1fr); flex: 1; min-height: 0; }
.settings-nav { padding: 18px 12px; border-right: 1px solid var(--line); background: var(--g50); display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.settings-nav button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 12px; border-radius: 7px; font-size: 13px; line-height: 1.35; color: var(--g600); }
.settings-nav svg { width: 17px; height: 17px; }
.settings-nav button:hover { color: var(--ink); background: var(--g100); }
.settings-nav button[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--g200); font-weight: 600; }
.settings-nav button[aria-current="page"] svg { color: var(--cobalt); }
.settings-content { padding: 28px 32px 36px; overflow-y: auto; min-width: 0; min-height: 0; scrollbar-width: thin; }
.settings-panel h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 24px; }
.setting-section { padding: 23px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.setting-section:first-of-type { padding-top: 0; border-top: 0; }
.setting-section:last-child { padding-bottom: 0; }
.setting-section h4 { font-size: 14px; font-weight: 600; }
.setting-section p { font-size: 13px; color: var(--g600); line-height: 1.65; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 3px 0; min-width: 0; }
.setting-row > span:first-child { flex: 1; min-width: 0; }
.setting-row b { display: block; font-size: 13px; font-weight: 500; line-height: 1.5; }
.setting-row small { display: block; font-size: 12px; line-height: 1.6; color: var(--g500); margin-top: 3px; }
.setting-row .input, .setting-row .select { width: 210px; max-width: 48%; flex: none; font-size: 13px; }
.setting-value { max-width: 48%; font-size: 12px; color: var(--g600); text-align: right; overflow-wrap: anywhere; }
.check-row input { width: 18px; height: 18px; accent-color: var(--cobalt); flex: none; }
.settings-workspace :is(input, select, button):focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.setting-note { border-left: 2px solid var(--g200); padding-left: 13px; }
.setting-note b { font-size: 12.5px; font-weight: 550; }
.setting-note p { margin-top: 4px; }
.settings-preview { font-variant-numeric: tabular-nums; }
.settings-collections li { display: flex; gap: 12px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 13px; }
.settings-collections li > span { min-width: 0; overflow-wrap: anywhere; }
.settings-workspace .btns { display: flex; flex-wrap: wrap; gap: 8px; }
.import-button { cursor: pointer; position: relative; }
.import-button:focus-within { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.settings-danger { color: var(--danger) !important; }
.settings-footer { padding: 16px 28px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex: none; background: #fff; }
.settings-footer > div:first-child { min-width: 0; }
.settings-footer > .btns { flex: none; }
.settings-leave { margin-top: 10px; font-size: 12px; line-height: 1.6; }
.settings-leave p { margin-bottom: 8px; }
.settings-form > .discard { margin: 12px 20px 0; flex: none; flex-wrap: wrap; }
.shortcut-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.5; }
.shortcut-list dt { color: var(--g600); }
.shortcut-list dd { text-align: right; color: var(--g700); }
.settings-identity { display: flex; gap: 12px; align-items: center; }
.settings-identity b { font-size: 13px; letter-spacing: .12em; }
.settings-identity p { font-size: 12px; margin-top: 3px; }
@media (hover: none), (pointer: coarse) {
  .sidebar-actions .search-btn, .sidebar-actions .quick-add { min-height: 44px; }
  .side-collapsed .sidebar-actions .search-btn { width: 44px; }
}
@media (max-width: 680px) {
  dialog.dlg.settings-workspace { width: calc(100vw - 20px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  .settings-heading { padding: 18px 20px; }
  .settings-heading h2 { font-size: 23px; }
  .settings-body { display: flex; flex-direction: column; }
  .settings-nav { flex: none; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .settings-nav button { flex: none; white-space: nowrap; padding: 9px 10px; }
  .settings-nav svg { display: none; }
  .settings-content { flex: 1; padding: 22px 20px; }
  .setting-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .setting-row .input, .setting-row .select { width: 100%; max-width: 100%; }
  .setting-value { max-width: 100%; text-align: left; }
  .setting-row.check-row { flex-direction: row; align-items: center; }
  .settings-footer { padding: 12px 20px; flex-wrap: wrap; gap: 12px; }
  .settings-footer > .btns { margin-left: auto; }
}

/* Schedule readouts use application formatting; native pickers keep local values. */
.schedule-editor { width: 100%; min-width: 0; }
.schedule-editor summary { display: flex; align-items: center; gap: 8px; min-height: 32px; border-radius: 6px; padding: 5px 4px; cursor: pointer; list-style: none; }
.schedule-editor summary::-webkit-details-marker { display: none; }
.schedule-editor summary:hover { background: var(--g50); }
.schedule-editor summary:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 1px; }
.schedule-editor summary > span { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; font-variant-numeric: tabular-nums; }
.schedule-editor summary svg { width: 13px; height: 13px; color: var(--g400); flex: none; }
.schedule-editor .schedule-input { padding: 6px 0 8px; }
.schedule-input .input { display: block; width: 100%; min-width: 0; max-width: 100%; padding: 0 6px; font-size: 13px; }
.schedule-input .hint { margin-top: 6px; font-size: 11px; }
.due-time-value { font-variant-numeric: tabular-nums; }
@media (max-width: 500px) {
  .schedule-prop { grid-template-columns: minmax(0, 1fr); padding: 8px 0; gap: 0; }
  .schedule-prop .v { padding: 2px 0 0; }
  .dlg .task-schedule { grid-template-columns: minmax(0, 1fr); }
}

/* Inline local search. Its anchored surface never shifts sidebar navigation. */
.sidebar-search { flex: 1; min-width: 0; }
.sidebar-actions { position: relative; }
.inline-search-field { display: flex; align-items: center; gap: 7px; height: 36px; border: 1px solid var(--g200); border-radius: 8px; background: #fff; padding: 0 9px; color: var(--g500); }
.inline-search-field svg { width: 15px; height: 15px; }
.inline-search-field input { min-width: 0; width: 100%; height: 32px; font-size: 13px; border: 0; background: transparent; }
.inline-search-field:focus-within { border-color: var(--cobalt); outline: 2px solid var(--cobalt-tint); }
.inline-search-field input::-webkit-search-cancel-button { cursor: pointer; }
.collapsed-search { display: none; }
.side-collapsed .sidebar-search { flex: none; }
.side-collapsed .inline-search-field { display: none; }
.side-collapsed .collapsed-search { display: grid; width: 36px; height: 36px; border: 1px solid var(--g200); background: #fff; }
.sidebar-search-panel { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); max-height: min(480px,calc(100dvh - 180px)); overflow-y: auto; border: 1px solid var(--g200); border-radius: 9px; background: #fff; padding: 5px; box-shadow: 0 7px 18px -12px rgba(11,11,15,.3); }
.sidebar-search-panel .res { display: block; padding: 8px; width: 100%; border-radius: 5px; text-align: left; }
.sidebar-search-panel .res b { display: block; font-size: 12.5px; line-height: 1.4; font-weight: 550; overflow-wrap: anywhere; }
.sidebar-search-panel .res small { display: block; font-size: 11px; line-height: 1.45; color: var(--g500); margin-top: 3px; overflow-wrap: anywhere; }
.sidebar-search-panel .res[aria-selected="true"], .sidebar-search-panel .res:hover { background: var(--cobalt-tint); }
.search-group { padding: 8px 8px 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--g500); }
.search-note { padding: 10px 8px; font-size: 12px; line-height: 1.5; color: var(--g500); }
.lrow.search-target { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.me { min-height: 42px; }
@media (hover: none), (pointer: coarse) { .inline-search-field { min-height: 44px; } .side-collapsed .collapsed-search { width: 44px; height: 44px; } }

.tag-selector { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; width: 100%; }
.tag-selector [data-tag-chips] { display: contents; }
.tag-selector .tag-picker { flex: 1; min-width: 90px; }
.tag-selector > .err { flex-basis: 100%; font-size: 12px; }
.dlg .tag-selector { border: 1px solid var(--g200); border-radius: 8px; padding: 7px 9px; min-height: 40px; }
.dlg .tag-selector:focus-within { border-color: var(--cobalt); }
.dlg .tag-input { min-height: 28px; }

/* Local identity is inspectable with pointer, keyboard or tap. */
.collection-row { display: flex; align-items: center; min-width: 0; }
.collection-row .coll { flex: 1; min-width: 0; }
.identity-group { display: inline-flex; align-items: center; flex: none; gap: 0; }
.collection-row .identity-group { padding-right: 2px; }
.identity-avatar { display: inline-grid; place-items: center; width: 26px; min-width: 26px; height: 28px; border-radius: 6px; position: relative; z-index: 2; vertical-align: middle; }
.identity-avatar:hover, .identity-avatar:focus-visible { background: var(--g100); }
.identity-overflow { min-width: 26px; height: 28px; font-size: 10px; color: var(--g600); border-radius: 5px; }
.side-collapsed .collection-row .identity-group { display: none; }
.identity-tooltip { position: fixed; z-index: 200; max-width: min(260px,calc(100vw - 16px)); padding: 7px 9px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; pointer-events: none; }
.prio { position: relative; z-index: 2; cursor: help; }
.prio:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
.share-people { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; }
.share-people li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.share-people b { display: block; font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.share-people small { display: block; font-size: 11.5px; color: var(--g500); margin-top: 3px; }
.share-people .identity-avatar { width: 36px; height: 36px; }

/* A bounded month summary leaves full detail in the selected-day agenda. */
.inner.wide:has(.cal-wrap) { max-width: 1200px; }
.cal-wrap { grid-template-columns: minmax(0,1fr) 280px; gap: 24px; }
.cal .day { height: 126px; min-height: 126px; gap: 3px; overflow: hidden; }
.cal .chip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow-wrap: anywhere; line-height: 14px; min-height: 14px; max-height: 28px; width: 100%; padding: 0 4px; flex: none; }
.cal .chip.p3 { background: var(--g100); color: var(--ink); border-left: 2px solid var(--ink); }
.cal .day.today .dn { background: transparent; color: var(--cobalt-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.cal .day[aria-selected="true"] { background: var(--cobalt-tint); }
.cal .day[aria-selected="true"]::before { content: none; }
.cal .day:focus-visible { outline: 2px solid var(--cobalt); outline-offset: -2px; box-shadow: none; }
.cal .day.out .chip { opacity: .6; }
.cal .more-n { line-height: 14px; flex: none; }
.app:not(.no-ctx) .cal-wrap { grid-template-columns: minmax(0,1fr); }
@media (max-width: 1279px) { .cal-wrap { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 600px) {
  .cal .day { height: 76px; min-height: 76px; padding: 4px; }
  .cal .chip { display: none; }
  .cal .day .dots { display: flex; }
}

.collection-row:has(.identity-group) { flex-wrap: wrap; }
.collection-row:has(.identity-group) .coll { flex-basis: 100%; }
.collection-row > .identity-group { margin-left: 35px; margin-top: -3px; margin-bottom: 3px; }
.agenda .todo { grid-template-columns: 22px minmax(0,1fr) auto; }
.agenda .todo .t { white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.agenda .todo .meta { grid-column: 2 / -1; justify-self: start; gap: 12px; }
.agenda .todo .meta .time:empty { display: none; }
.agenda .todo .meta .prio { display: inline-flex; }
.dlg .tag-options { width: 100%; min-width: 0; max-width: 100%; }
.tag-selector .tag { max-width: 100%; height: auto; min-height: 22px; overflow-wrap: anywhere; }

/* In a dialog, suggestions stay in flow so they never cover Save or Cancel. */
.dlg .tag-selector { align-items: flex-start; }
.dlg .tag-options { position: static; display: block; margin-top: 6px; max-height: 168px; }

.side .sidebar-actions .inline-search-field input:focus-visible { outline: none; box-shadow: none; }

/* Phase 1: derived collection identity and collapsed-only navigation. */
.collection-identity { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 6px; background: var(--g100); color: var(--g600); font-size: 10.5px; line-height: 1; font-weight: 600; letter-spacing: -.02em; }
.coll[aria-current="page"] .collection-identity, .collections-panel [aria-current="page"] .collection-identity { background: var(--cobalt-tint); color: var(--cobalt-text); }
.collapsed-collections { display: none; }
.side-collapsed .expanded-collections { display: none; }
.side-collapsed .collapsed-collections { display: block; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.collections-trigger { height: 40px; }
.collections-trigger[data-active="true"] { background: var(--g100); color: var(--cobalt-text); }
.collections-trigger[aria-expanded="true"] { background: var(--cobalt-tint); color: var(--cobalt-text); }
.collections-trigger:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.collections-panel { position: fixed; z-index: 45; width: 304px; max-width: calc(100vw - 16px); max-height: min(520px,calc(100dvh - 16px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--g200); border-radius: 10px; box-shadow: 0 8px 24px -16px rgba(11,11,15,.28); padding: 6px; }
.collections-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 6px 8px 10px; flex: none; }
.collections-panel h2 { font-size: 14px; font-weight: 600; }
.collections-panel-list { overflow-y: auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; }
.collections-panel section { margin: 0 0 9px; }
.collections-panel h3 { color: var(--g500); text-transform: uppercase; font-size: 10.5px; letter-spacing: .06em; font-weight: 600; padding: 8px 10px 5px; }
.collections-panel li a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 7px 10px; border-radius: 6px; font-size: 13px; color: var(--g700); }
.collections-panel .collection-name { min-width: 0; flex: 1; overflow-wrap: anywhere; line-height: 1.45; }
.collections-panel .collection-count { flex: none; font-size: 11px; color: var(--g500); font-variant-numeric: tabular-nums; }
.collections-panel a:hover { background: var(--g50); }
.collections-panel a[aria-current="page"] { background: var(--cobalt-tint); color: var(--ink); }
.collections-panel :is(a,button):focus-visible { outline: 2px solid var(--cobalt); outline-offset: -2px; box-shadow: none; }
.collections-panel .hint { margin: 4px 10px 10px; }
@media (pointer: coarse) { .collections-trigger { min-height: 44px; } .collections-panel li a { min-height: 44px; } }

/* Phase 2: a nonmodal introduction; month/agenda styling stays unchanged. */
.calendar-intro { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 24px; margin-top: 24px; padding: 0 0 22px; border-bottom: 1px solid var(--line); }
.calendar-intro h2 { font-size: 17px; line-height: 1.4; font-weight: 600; margin-bottom: 7px; }
.calendar-intro p { font-size: 13px; line-height: 1.55; color: var(--g600); }
.calendar-intro .calendar-intro-detail { margin-top: 5px; font-size: 12px; color: var(--g600); }
.calendar-intro .calendar-intro-external { margin-top: 12px; font-size: 12px; }
.calendar-intro-external b { display: block; font-weight: 550; color: var(--g700); }
.calendar-intro-external span { display: block; margin-top: 2px; }
.calendar-intro-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.calendar-intro-actions .btn:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
@media (max-width: 1100px) { .calendar-intro { grid-template-columns: minmax(0,1fr); gap: 14px; } .calendar-intro-actions { flex-direction: row; flex-wrap: wrap; } }
@media (max-width: 560px) { .calendar-intro { margin-top: 20px; padding-bottom: 18px; } .calendar-intro-actions { gap: 4px 8px; } .calendar-intro-actions .btn { min-height: 40px; height: auto; white-space: normal; padding-top: 8px; padding-bottom: 8px; text-align: center; } }

/* Phase 3: explicit step edits and local-date selection, no progress restyling. */
.sublist .s { min-height:44px; gap:6px; }
.sublist .s .check { flex:none; position:relative; margin:12px; }
.sublist .s .check::before { content:""; position:absolute; inset:-12px; }
.sublist .s .ib { opacity:1; min-width:40px; min-height:40px; }
.step-edit-entry { flex:none; min-height:40px; }
.step-editor { flex:1; min-width:0; padding:8px 0; }
.step-editor .input { width:100%; min-width:0; }
.step-edit-actions { display:flex; gap:4px; margin-top:6px; flex-wrap:wrap; }
.step-edit-actions .btn { min-height:40px; }
.step-editor .hint, .step-editor .err { display:block; margin-top:6px; line-height:1.5; overflow-wrap:anywhere; }
.schedule-prop:has(#date-editor[open]) { grid-template-columns:minmax(0,1fr); padding:8px 0; }
.due-picker { width:100%; min-width:0; padding:8px 0; }
.picker-nav { display:flex; align-items:center; justify-content:space-between; gap:4px; margin-bottom:6px; }
.picker-nav strong { font-size:13px; text-align:center; }
.picker-nav .btn { min-width:40px; min-height:40px; font-size:20px; }
.picker-grid [role=row] { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.picker-grid [role=columnheader] { text-align:center; font-size:11px; color:var(--g600); padding:6px 0; }
.picker-day { width:100%; min-width:0; min-height:40px; border:0; background:transparent; border-radius:6px; font-size:12px; }
.picker-day:hover { background:var(--g100); }
.picker-day.outside { color:var(--g500); }
.picker-day[aria-current=date] { text-decoration:underline; text-underline-offset:4px; }
.picker-day.selected { background:var(--ink); color:white; }
.picker-date-label { display:block; font-size:12px; margin:10px 0 4px; color:var(--g600); }
.due-picker .input { width:100%; min-width:0; }
.due-picker .hint { margin-top:6px; line-height:1.5; }
.picker-actions { display:flex; gap:2px; flex-wrap:wrap; margin-top:8px; }
.picker-actions .btn { min-height:40px; padding-inline:9px; }

/* Phase 4: compact editorial support, following existing Settings surfaces. */
.community-support .support-discord { display:inline-flex; align-items:center; gap:8px; min-height:44px; margin:12px 0 8px; white-space:normal; }
.support-guidance { margin:18px 0 14px; }
.support-guidance > div + div { margin-top:12px; }
.support-guidance dt { font-size:13px; font-weight:600; color:var(--ink); }
.support-guidance dd { margin:3px 0 0; font-size:13px; line-height:1.65; color:var(--g600); }
.community-support .support-privacy { font-size:12px; line-height:1.6; color:var(--g600); }
.support-template-actions { margin-top:12px; }
.support-template-actions .btn { min-height:44px; white-space:normal; }
.community-support [data-copy-status]:empty { display:none; }
.community-support [data-copy-status] { margin-top:8px; overflow-wrap:anywhere; }
.support-template { margin-top:12px; }
.support-template summary { cursor:pointer; font-size:13px; color:var(--g600); min-height:40px; display:list-item; padding:10px 0; }
.support-template textarea { width:100%; min-width:0; max-width:100%; margin-top:6px; padding:10px; border:1px solid var(--line); border-radius:6px; background:var(--g50); font-size:12px; line-height:1.65; resize:vertical; }
.settings-panel .support-unavailable { color:var(--g600); margin-top:12px; }

/* Phase 5-A: explicit local recognition, matching the existing draft form. */
.task-recognition { border-left:2px solid var(--line); padding:0 0 0 12px; margin:0 0 18px; min-width:0; }
.task-recognition .hint { margin:4px 0; }
.recognition-preview { font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.recognition-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.recognition-actions .btn, .task-recognition > .btn { min-height:44px; white-space:normal; }

/* Local account pilot uses existing Settings typography and controls. */
.account-content { min-width:0; }
.account-content p { overflow-wrap:anywhere; }
.account-content .btn { margin:8px 8px 0 0; min-height:44px; white-space:normal; }

.account-identity { width:100%; border:0; background:transparent; text-align:left; font:inherit; min-height:44px; }
.account-identity:hover { background:var(--g100); border-radius:6px; }
.account-identity > div { min-width:0; }
.account-identity b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-avatar { width:28px; height:28px; position:relative; display:inline-flex; flex:none; align-items:center; justify-content:center; }
.account-avatar .ava { width:28px; height:28px; }
.account-avatar img { position:absolute; inset:0; width:28px; height:28px; border-radius:50%; object-fit:cover; }
.account-panel-photo { display:block; border-radius:50%; object-fit:cover; margin-bottom:8px; }

/* Phase 5-B: identical text metrics keep the native caret and inert token mirror aligned. */
.recognition-editor { position:relative; display:block; width:100%; min-width:0; }
.recognition-editor .recognition-input, .recognition-mirror {
  box-sizing:border-box; width:100%; padding:12px; border:1px solid transparent;
  font:inherit; font-size:14px; line-height:1.8; letter-spacing:normal;
  white-space:pre-wrap; overflow-wrap:anywhere; word-break:normal; tab-size:8;
}
.recognition-editor .recognition-input { display:block; position:relative; resize:none; margin:0; min-height:102px; }
.recognition-mirror { position:absolute; inset:0; overflow:hidden; pointer-events:none; color:var(--ink); }
.recognition-editor.has-recognition .recognition-input { background:transparent; color:transparent; caret-color:var(--ink); }
.recognition-token { color:#2455a0; background:rgba(45,104,212,.10); border-radius:3px; box-shadow:0 0 0 1px rgba(45,104,212,.22); padding:0; }
.recognition-token.token-time { color:#85500b; background:rgba(185,120,20,.12); box-shadow:0 0 0 1px rgba(185,120,20,.24); }
.recognition-token.token-priority { color:#713a93; background:rgba(130,65,165,.10); box-shadow:0 0 0 1px rgba(130,65,165,.22); }
.task-recognition { border:0; padding:0; margin-bottom:12px; }
.task-recognition .recognition-preview { margin:4px 0; }
.recognition-actions { margin-top:4px; }
@media (forced-colors: active) {
  .recognition-mirror { display:none; }
  .recognition-editor.has-recognition .recognition-input { color:CanvasText; caret-color:CanvasText; }
}

.recognition-editor .recognition-input, .recognition-mirror { overflow-y:auto; scrollbar-gutter:stable; }

.recognition-token[data-priority="3"] { color:#98374a; background:rgba(177,53,80,.10); box-shadow:0 0 0 1px rgba(177,53,80,.22); }
.recognition-token[data-priority="1"] { color:#466278; background:rgba(76,106,130,.10); box-shadow:0 0 0 1px rgba(76,106,130,.22); }
.recognition-token[data-priority="0"] { color:#515561; background:rgba(100,105,118,.10); box-shadow:0 0 0 1px rgba(100,105,118,.22); }

/* Phase 5-B: work metrics and native-feeling inline controls. */
.work-summary { display:flex; flex-wrap:wrap; gap:6px 16px; margin:24px 0 0; font-size:12px; color:var(--g600); }
.work-summary > span:first-child {color:var(--ink)}
.work-track { flex-basis:100%; height:3px; background:var(--g100); overflow:hidden; border-radius:2px; }
.work-track i {display:block;height:100%;background:var(--cobalt)}
.prog-sub {display:block;line-height:1.5}
.step-edit-entry.st {flex:1;text-align:left;min-height:44px;padding:8px 4px;font:inherit;color:inherit;background:none;border:0;white-space:normal;overflow-wrap:anywhere}
.step-edit-entry.st:hover {background:var(--g50);text-decoration:underline;text-decoration-color:var(--g300)}
.collection-picker {width:100%;min-width:0;font-size:13px}
.collection-picker summary {display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;min-height:40px;padding:6px 10px;border:1px solid var(--g200);border-radius:6px}
.collection-picker summary::-webkit-details-marker {display:none}
.collection-picker summary>span:nth-last-child(2) {flex:1;min-width:0;overflow-wrap:anywhere}
.collection-options {border:1px solid var(--g200);border-radius:6px;margin-top:4px;padding:4px;background:var(--white)}
.collection-options [role=listbox] {max-height:240px;overflow-y:auto}
.collection-options [role=option] {display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:8px;text-align:left;border:0;border-radius:4px;background:none;font:inherit;overflow-wrap:anywhere}
.collection-options [role=option]>span:nth-child(2) {flex:1;min-width:0}
.collection-options [role=option] small {display:block;font-size:10px;color:var(--g600)}
.collection-options [role=option]:hover, .collection-options [role=option][aria-selected=true] {background:var(--g50)}
.collection-clear {margin-top:4px;border-top:1px solid var(--g150);width:100%;min-height:44px}
.emoji-options {display:flex;gap:6px;flex-wrap:wrap}
.emoji-options .btn {min-width:44px;min-height:44px}
.memo-list {list-style:none;padding:0;margin:0}
.memo-list li {display:flex;gap:12px;padding:20px 0;border-bottom:1px solid var(--g150)}
.memo-list li>div {flex:1;min-width:0}
.memo-title {text-align:left;font:inherit;font-weight:600;border:0;background:none;padding:4px 0;min-height:36px;overflow-wrap:anywhere}
.memo-body {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;font-size:14px;margin:8px 0}
.memo-draft {min-height:180px}

.draft-date-trigger {justify-content:flex-start;text-align:left;min-height:40px}
.draft-date-field .due-picker {position:static;width:100%;max-width:100%;min-width:0;padding:8px}
.draft-date-field .picker-day {min-width:0;padding:0}
.draft-date-field .picker-actions {flex-wrap:wrap;gap:4px}
.draft-date-field .picker-actions .btn {min-height:44px}
.draft-date-field .picker-nav .btn {min-width:32px;padding:4px}
@media(max-width:560px) {.row2.task-schedule {grid-template-columns:1fr}}

.shortcuts-page article {max-width:760px;font-size:14px;line-height:1.8;color:var(--g700);overflow-wrap:anywhere}
.shortcuts-page h2 {font-size:22px;margin:40px 0 12px;color:var(--ink)}
.shortcuts-page h3 {font-size:16px;margin:26px 0 10px;color:var(--ink)}
.shortcuts-page p {margin:10px 0}
.shortcuts-page li {margin:6px 0}
.shortcuts-page code,.shortcuts-page kbd {font-size:12px;background:var(--g50);border:1px solid var(--g150);border-radius:4px;padding:2px 4px;white-space:normal;overflow-wrap:anywhere}
.help-table table {border-collapse:collapse;width:100%;font-size:12px;text-align:left}
.help-table th,.help-table td {border-bottom:1px solid var(--g150);padding:12px 8px;vertical-align:top;overflow-wrap:anywhere}
.help-table th {font-weight:600;color:var(--ink)}
@media(max-width:560px){.help-table table {table-layout:fixed}.help-table th,.help-table td {padding:10px 4px}.shortcuts-page .top {flex-wrap:wrap;gap:12px}}

.task-schedule:has([data-draft-date-panel]:not([hidden])) .draft-date-field {grid-column:1 / -1}
