@font-face {
  font-family: Inter; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  color-scheme: dark;
  --background: #0b0c0e; --surface: #17191b; --surface-raised: #1e2123;
  --ink: #f3f1ec; --gold: #d5b16a; --muted: #949494; --line: #303235;
  --red: #f2a298; --green: #9bd4b6; --blue: #9ab9e5;
  --radius: 10px; --sidebar: 15rem;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); font: 1rem/1.55 Inter, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.65rem, 3vw, 2.15rem); line-height: 1.14; letter-spacing: -.04em; font-weight: 650; }
h2 { font-size: 1.12rem; line-height: 1.25; letter-spacing: -.02em; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p, small, .muted { color: var(--muted); }
small, .subtitle, .task-meta, .field-help, .day-date { font-size: .875rem; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 2; top: .5rem; left: .5rem; padding: .55rem; background: var(--surface); }
.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 1.4rem;
  padding: 1.1rem .9rem; background: #111315; border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); font-size: .9rem; letter-spacing: .105em; font-weight: 700; }
.brand-icon, .project-icon {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; flex: none;
  border: 1px solid #525050; border-radius: 8px; background: #272725; color: var(--gold); letter-spacing: 0;
}
.main-nav, .sidebar-projects { display: grid; gap: .2rem; }
.main-nav a, .sidebar-projects a {
  display: flex; align-items: center; gap: .65rem; min-height: 2.4rem; padding: .45rem .55rem;
  border: 1px solid transparent; border-radius: 8px; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere;
}
.main-nav a:hover, .sidebar-projects a:hover { background: var(--surface-raised); color: var(--ink); }
.main-nav [aria-current] { color: var(--gold); background: #23211c; border-color: #3c3528; }
.sidebar-projects .selected-project { color: var(--ink); background: var(--surface-raised); }
.sidebar-projects .nav-label { color: var(--muted); font-size: .875rem; font-weight: 650; }
.sidebar-footer { margin-top: auto; }
.nav-icon { width: .94rem; height: .94rem; flex: none; border: 1.5px solid currentColor; border-radius: 3px; }
.icon-work { box-shadow: inset 0 -.25rem #252524; }
.icon-project { transform: rotate(45deg) scale(.76); }
.icon-history { border-radius: 50%; }
.workspace { width: 100%; max-width: 83rem; min-width: 0; margin-inline: auto; padding: clamp(1rem, 3.4vw, 3rem); }
.page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .85rem; margin-bottom: 1.35rem; }
.page-header:not(:first-child) { margin-top: 1.15rem; }
.eyebrow { color: var(--muted); font-size: .875rem; font-weight: 600; margin-bottom: .28rem; }
.subtitle { margin-top: .4rem; }
.panel, .day-bar, .metric, .project-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.panel { padding: clamp(.85rem, 2vw, 1.35rem); margin: 1rem 0; min-width: 0; }
.panel > :where(h2, h3, p, dl) + :where(h2, h3, p, dl) { margin-top: .6rem; }
.panel > h2 + :where(a, p, form) { margin-top: .75rem; }
.day-bar { padding: .75rem 1rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem; }
.day-date { margin-top: .25rem; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .65rem; margin: 1rem 0; }
.project-metrics { grid-template-columns: repeat(2,minmax(0, 1fr)); max-width: 32rem; }
.metric { min-width: 0; padding: .75rem .9rem; }
.metric dt { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.metric dd { margin: .15rem 0 0; font-size: 1.5rem; line-height: 1.25; font-weight: 650; font-variant-numeric: tabular-nums; }
.section-heading, .controls { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.section-heading { justify-content: space-between; margin-bottom: .75rem; }
.controls { margin-block: .65rem; }
.controls form, .reorder { display: flex; flex-wrap: wrap; gap: .3rem; }
.focus-card { border-color: #4b4233; }
.focus-card h3 { font-size: 1.28rem; margin-top: .2rem; }
.focus-project { font-weight: 650; color: var(--ink); }
.focus-card > p, .focus-card > h3 { margin-bottom: .35rem; }
.focus-card > form, .focus-card > .primary { margin-top: .65rem; }
.button, .primary, .outlined, .ghost, .destructive {
  display: inline-flex; align-items: center; justify-content: center; padding: .42rem .7rem;
  min-height: 2.35rem; max-width: 100%; border: 1px solid transparent; border-radius: 8px;
  font-size: .875rem; line-height: 1.25; text-align: center; font-weight: 600; overflow-wrap: anywhere;
}
.primary { color: #13120f; background: var(--gold); border-color: var(--gold); }
.primary:hover { color: #13120f; background: #e1c385; }
.outlined { color: var(--ink); background: var(--surface-raised); border-color: #47494d; }
.outlined:hover { border-color: #777980; background: #272a2e; }
.ghost { color: var(--muted); background: transparent; }
.ghost:hover { color: var(--ink); background: var(--surface-raised); }
.destructive { color: var(--red); background: #30201f; border-color: #623a36; }
.destructive:hover { color: var(--red); background: #422825; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 13.5rem),1fr)); gap: .75rem; }
.project-card { display: grid; align-content: start; justify-items: start; width: 100%; height: 100%; min-height: 6.2rem; padding: .85rem; text-align: left; color: var(--ink); gap: .3rem; }
.project-card:hover { background: var(--surface-raised); border-color: #53555a; }
.project-card h2, .project-card strong { font-size: 1rem; overflow-wrap: anywhere; }
.project-card p, .project-card small { font-size: .875rem; }
.project-icon { margin-bottom: .25rem; border-color: var(--line); background: #202224; }
.task-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .58rem .65rem; border-top: 1px solid var(--line); }
.task-row .controls { margin: 0; }
.task-selected { background: #23211d; border-radius: 6px; }
.task-title { font-weight: 650; overflow-wrap: anywhere; }
.task-title:hover, .task-context a:hover { text-decoration: underline; }
.task-meta { display: flex; flex-wrap: wrap; gap: .4rem .7rem; align-items: center; color: var(--muted); margin-top: .25rem; }
.badge {
  display: inline-flex; gap: .35rem; align-items: center; padding: .17rem .49rem;
  font-size: .875rem; line-height: 1.2; border-radius: 6px; color: #b7b8ba; background: #282b2e; font-weight: 500;
}
.badge i, .marker { display: inline-block; width: .43rem; height: .43rem; border-radius: 50%; background: currentColor; flex: none; vertical-align: middle; }
.badge-active { background: #31281b; color: var(--gold); }
.badge-done { background: #23332b; color: var(--green); }
.badge-waiting { background: #222d3a; color: var(--blue); }
.badge-cancelled { background: #332524; color: var(--red); }
.marker { color: var(--gold); }
.project-2 { color: #78bb9b; } .project-3 { color: #bc9dec; } .project-4 { color: #79b9d9; } .project-5 { color: #df9294; }
.task-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(13rem, 17rem); gap: 1rem; align-items: start; }
.task-layout .panel:first-child { margin-top: 0; }
.task-context dl { margin: .75rem 0; }
.task-context dt { color: var(--muted); font-size: .875rem; }
.task-context dd { margin: 0 0 .65rem; overflow-wrap: anywhere; }
.task-context p { margin-top: .5rem; }
.task-overview > p { margin-top: .5rem; }
.goal-row, .passport-section, .history-day { border-top: 1px solid var(--line); padding: .8rem 0; margin-top: .5rem; }
.goal-row:last-child, .passport-section:last-child, .history-day:last-child { padding-bottom: 0; }
.goal-row p { margin: .25rem 0 .45rem; }
.goal-row h4 { font-weight: 650; }
summary { cursor: pointer; font-weight: 650; overflow-wrap: anywhere; }
.passport-section dd { margin: 0 0 .75rem; color: var(--muted); }
.empty-state { padding: .65rem 0; }
.preserve-lines, .passport-section dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.editor { max-width: 46rem; }
.form-field { margin-bottom: .85rem; }
.editor label, .form-field label { display: block; margin: .55rem 0 .3rem; font-size: .875rem; font-weight: 600; }
input:not([type=checkbox]):not([type=hidden]), select, textarea {
  width: 100%; min-width: 0; color: inherit; background: #111315; border: 1px solid #494b4e;
  border-radius: 8px; padding: .5rem .65rem; min-height: 2.45rem;
}
textarea { resize: vertical; }
.field-help { margin-top: .25rem; }
.errorlist { color: var(--red); margin: .3rem 0; padding-left: 1.25rem; }
.invalid input { border-color: var(--red); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; }
.auth-shell .workspace { max-width: 28rem; }
.login .brand { margin-bottom: 1.35rem; }
.months { display: flex; align-items: center; justify-content: space-between; gap: .25rem; margin-bottom: .65rem; }
.months a { font-size: .875rem; color: var(--muted); }
.months h2 { text-align: center; }
.calendar { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: center; }
.calendar th { color: var(--muted); font-size: .875rem; font-weight: 500; padding-bottom: .35rem; }
.calendar td { border: 1px solid var(--line); height: 3.2rem; vertical-align: top; }
.calendar td a { display: block; height: 100%; min-height: 3.2rem; padding: .35rem .1rem; }
.calendar td a:hover, .calendar [aria-current] { background: #30271b; color: var(--gold); }
.markers { display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem; }
.history-projects { display: flex; flex-wrap: wrap; list-style: none; gap: .55rem; padding: 0; font-size: .875rem; }
.history-item { margin: .45rem 0; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; }
.history-item summary span { display: inline-grid; vertical-align: middle; max-width: 80%; }
.history-item summary time { display: block; color: var(--muted); font-size: .875rem; font-weight: 400; }
.history-item p { margin: .55rem 0 .15rem; }
dialog { width: min(28rem,calc(100% - 2rem)); padding: 1.25rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
dialog p { margin-top: .65rem; }
dialog::backdrop { background: rgb(0 0 0 / .72); }
@media (max-width: 64rem) {
  :root { --sidebar: 13.75rem; }
  .task-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 47rem) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; border: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .5rem; padding: .55rem .8rem; }
  .sidebar-footer { margin: 0; grid-column: 2; grid-row: 1; }
  .main-nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .15rem; }
  .main-nav a { gap: .3rem; padding: .32rem .35rem; min-height: 2.25rem; }
  .nav-icon { display: none; }
  .sidebar-projects { display: none; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .calendar td, .calendar td a { height: 2.65rem; min-height: 2.65rem; }
}
.result-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
.period { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.period label { display: inline-flex; align-items: center; gap: .35rem; font-size: .875rem; }
.period input { width: auto; max-width: 100%; }
@media (max-width: 47rem) {
  .result-metrics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); }
}


/* Minimal task details */
.simple-task { max-width: 53rem; margin-top: 1.5rem; }
.simple-task-heading, .simple-subtask-heading { display: flex; align-items: center; gap: .8rem; }
.simple-task-heading h1 { font-size: 1.45rem; letter-spacing: -.025em; }
.square-check { width: 1.3rem; height: 1.3rem; display: grid; place-items: center; border: 1.5px solid #9b9da0; border-radius: 3px; color: #0b0c0e; background: transparent; flex: none; padding: 0; font-size: .85rem; line-height: 1; }
.square-check.checked { background: var(--gold); border-color: var(--gold); }
.completed-title { color: var(--muted); text-decoration: line-through; }
.simple-description { margin: .45rem 0 .75rem 2.15rem; }
.simple-description summary { color: var(--muted); font-size: .84rem; font-weight: 400; }
.simple-description form { margin-top: .65rem; }
.simple-description textarea { display: block; margin-bottom: .5rem; }
.subtask-area { border-top: 1px solid var(--line); margin-top: 1.7rem; padding-top: .9rem; }
.subtask-area > summary { font-weight: 600; }
.subtask-list { margin-top: .65rem; }
.simple-subtask { border-bottom: 1px solid var(--line); padding: .8rem 0; }
.simple-subtask-heading { margin-left: 1.25rem; }
.new-subtask { display: flex; gap: .5rem; margin: 1rem 0 0 1.25rem; }
.new-subtask input { flex: 1; }
@media (max-width: 47rem) { .new-subtask { flex-wrap: wrap; } }

/* Compact nested checklist: child items are visibly subordinate. */
.subtask-area { margin-top: 1rem; padding-top: .6rem; }
.subtask-area > summary { font-size: .9rem; color: var(--muted); }
.subtask-progress { margin-left: .35rem; font-size: .82rem; font-variant-numeric: tabular-nums; font-weight: 400; }
.subtask-list { margin-left: 1.25rem; }
.simple-subtask { padding: .55rem 0; }
.simple-subtask-heading { margin-left: .4rem; gap: .7rem; }
.simple-subtask .simple-description { margin: .2rem 0 .15rem 2.4rem; font-size: .83rem; color: var(--muted); }
.simple-task > .simple-description { margin-top: .35rem; font-size: .86rem; color: var(--muted); }
.new-subtask { margin: .65rem 0 0 1.65rem; }


/* Minimal Todoist-style new-task composer */
.quick-create { max-width: 44rem; margin: 1.5rem auto 0; }
.quick-create h1 { font-size: 1.35rem; margin-bottom: 1rem; }
.quick-create-form { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 1rem; }
.quick-create-field + .quick-create-field { margin-top: .5rem; }
.quick-create-form input[name="title"] { background: transparent; border: 0; border-radius: 0; padding: .3rem 0; min-height: 2rem; font-weight: 600; font-size: 1rem; }
.quick-create-form textarea[name="description"] { background: transparent; border: 0; border-radius: 0; padding: .25rem 0; min-height: 4rem; font-size: .875rem; resize: vertical; color: var(--ink); }
.quick-create-form input[name="title"]:focus, .quick-create-form textarea[name="description"]:focus { outline: 0; }
.quick-create-actions { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .65rem; }

/* Two-option task type switch */
.task-kind-switch { display: inline-flex; gap: .2rem; padding: .22rem; margin: .7rem 0; border: 1px solid var(--line); border-radius: 9px; background: #111315; }
.task-kind-option { display: inline-flex; position: relative; cursor: pointer; margin: 0 !important; font-weight: 500 !important; }
.task-kind-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.task-kind-option span { display: inline-block; padding: .4rem .8rem; border-radius: 6px; color: var(--muted); font-size: .85rem; }
.task-kind-option input:checked + span { background: var(--surface-raised); color: var(--ink); }
.task-kind-option input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Compact persistent action/decision markers in task lists */
.kind-tag { display: inline-block; flex: none; padding: .1rem .38rem; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); font-size: .72rem; font-weight: 500; line-height: 1.4; vertical-align: middle; }
.subtask-kind-select { width: auto !important; min-width: 7rem; flex: 0 0 auto; font-size: .83rem; }
@media (max-width: 47rem) { .subtask-kind-select { flex: 1 1 7rem; } }


/* Compact project home */
.compact-project-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1.1rem; padding-bottom:1.05rem; border-bottom:1px solid var(--line); }
.compact-project-intro { min-width:0; }
.compact-project-intro .subtitle { margin-top:.22rem; color:var(--muted); }
.compact-project-controls { display:flex; align-items:center; gap:.8rem; flex-wrap:wrap; }
.compact-project-stats { display:flex; align-items:center; gap:.55rem; margin:0; }
.compact-project-stats > div { min-width:8rem; padding:.4rem .75rem; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.compact-project-stats dt { font-size:.76rem; color:var(--muted); }
.compact-project-stats dd { margin:0; font-size:1.15rem; font-weight:650; font-variant-numeric:tabular-nums; }
.project-goals-link { display:flex; align-items:center; gap:.7rem; margin:1rem 0 1.3rem; padding:.62rem .85rem; border:1px solid var(--line); border-radius:8px; }
.project-goals-link:hover { background:var(--surface); border-color:#646466; }
.project-goals-link > span:last-child { margin-left:auto; color:var(--muted); font-size:1.3rem; }
.project-task-section { margin-top:1.15rem; }
.project-priority { display:flex; align-items:center; gap:.8rem; padding:1rem; border:1px solid #796139; background:#211e18; border-radius:9px; }
.project-priority-content { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; min-width:0; }
.project-priority-content > a { font-weight:650; overflow-wrap:anywhere; }
.project-priority-content > p { flex-basis:100%; font-size:.8rem; }
.project-remaining-list { border:1px solid var(--line); border-radius:9px; overflow:hidden; }
.project-remaining-row { display:flex; align-items:center; gap:.75rem; padding:.65rem .9rem; border-bottom:1px solid var(--line); }
.project-remaining-row:last-child { border-bottom:0; }
.project-remaining-title { min-width:0; flex:1; }
.project-remaining-title a { font-weight:550; overflow-wrap:anywhere; }
.project-remaining-title p { font-size:.8rem; }
.project-empty-remaining { padding:1rem; }
@media (max-width:47rem) {
  .compact-project-controls { width:100%; justify-content:space-between; }
  .compact-project-stats { flex:1; }
  .compact-project-stats > div { min-width:0; flex:1; }
  .project-remaining-row { gap:.45rem; padding:.6rem; }
}


/* Dedicated compact goals page */
.goals-page { max-width: 60rem; }
.goals-back { margin-bottom: 1rem; }
.goals-header { display:flex; align-items:end; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin: .6rem 0 1.5rem; }
.goals-section { margin-top:1rem; }
.goals-section > h2 { margin-bottom:.65rem; }
.goals-section-count { margin-left:.35rem; font-size:.82rem; font-weight:500; color:var(--muted); }
.goals-list { border:1px solid var(--line); border-radius:9px; overflow:hidden; }
.goal-compact-row { display:flex; align-items:center; gap:.85rem; padding:.8rem 1rem; border-bottom:1px solid var(--line); }
.goal-compact-row:last-child { border-bottom:0; }
.goal-compact-indicator { width:1.4rem; flex:none; color:var(--gold); font-size:1.05rem; text-align:center; }
.goal-compact-indicator.done { color:var(--green); }
.goal-compact-body { flex:1; min-width:0; }
.goal-compact-title { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.goal-compact-title a { font-weight:600; }
.goal-compact-values { margin-top:.3rem; font-size:.84rem; }
.goal-progress-track { display:block; width:min(100%, 22rem); height:.33rem; margin-top:.42rem; border:0; border-radius:8px; background:var(--line); }
.goal-progress-track::-webkit-progress-bar { background:var(--line); border-radius:8px; }
.goal-progress-track::-webkit-progress-value { background:var(--gold); border-radius:8px; }
.goal-progress-track::-moz-progress-bar { background:var(--gold); border-radius:8px; }
.goal-binary-state { display:block; margin-top:.27rem; color:var(--muted); font-size:.83rem; }
.goal-binary-state.achieved { color:var(--green); }
.goal-compact-meta { margin-top:.26rem; color:var(--muted); font-size:.76rem; }
.goal-compact-edit { white-space:nowrap; font-size:.82rem; }
.goals-empty { padding:1rem; }
.goals-completed { margin-top:1.4rem; }
.goals-completed > summary { margin-bottom:.65rem; }
@media (max-width:47rem) {
  .goal-compact-row { align-items:flex-start; padding:.7rem; gap:.55rem; }
  .goal-compact-edit { padding:.2rem; }
}


/* Optional due dates for actions, decisions and subtasks */
.quick-create-deadline { margin:.4rem 0 .65rem; display:flex; flex-wrap:wrap; align-items:center; gap:.55rem; }
.quick-create-deadline label { color:var(--muted); font-size:.85rem; }
.quick-create-form input[name="deadline"], .new-subtask input[name="deadline"] { width:auto; min-width:10rem; font-size:.84rem; }
.task-deadline { color:var(--muted); font-size:.81rem; }
.simple-task > .task-deadline { margin:.4rem 0 0 2.1rem; }
.subtask-deadline { margin:.2rem 0 0 2.4rem; }
.new-subtask input[name="deadline"] { flex:0 1 11rem; }


/* Compact goal composer */
.quick-goal { max-width: 38rem; margin: 1.5rem auto 0; }
.quick-goal h1 { margin-bottom: 1rem; font-size: 1.5rem; }
.quick-goal-form { padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.quick-goal-field { display: grid; gap: .3rem; margin: .65rem 0; }
.quick-goal-field label { font-size: .84rem; color: var(--muted); }
.quick-goal-field input { min-width: 0; }
.quick-goal-kind { margin: .5rem 0; }
.quick-goal-numeric { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .7rem; }
.quick-goal-numeric .quick-goal-field:last-child { grid-column: 1 / -1; }
.quick-goal-actions { display: flex; justify-content: flex-end; align-items: center; gap: .6rem; padding-top: .75rem; margin-top: .8rem; border-top: 1px solid var(--line); }
@media(max-width: 35rem) { .quick-goal-numeric { grid-template-columns: 1fr; } .quick-goal-numeric .quick-goal-field:last-child { grid-column:auto; } }


/* Interactive goal checkboxes */
.goal-check-form { display:flex; align-items:center; flex:none; }
.goal-check-link { text-decoration:none; }
.goal-check-link:hover { border-color:var(--gold); background:#2a261e; }
.goal-check-static { cursor:default; }

/* Subtask progress visible on project and dashboard task lists */
.subtask-count { display:inline-block; white-space:nowrap; margin-inline:.4rem .15rem; color:var(--muted); font-size:.78rem; font-weight:500; font-variant-numeric:tabular-nums; vertical-align:middle; }


/* Task completion: immediate strikethrough, then quick fade and exit. */
.task-just-completed a, .task-just-completed .project-priority-content,
.task-just-completed .project-remaining-title { text-decoration:line-through; color:var(--muted); }
.task-just-completed .square-check { background:var(--gold); border-color:var(--gold); color:var(--background); }
.task-fade-away { opacity:0; transform:translateY(-4px); transition:opacity .2s ease, transform .2s ease; pointer-events:none; }
@media(prefers-reduced-motion:reduce) { .task-fade-away { transition:none; } }

/* Trash lists and discrete destructive actions */
.icon-trash { border-radius:3px; transform:rotate(12deg); }
.trash-danger { color:var(--red); font-size:.77rem; }
.trash-danger:hover { color:#ffd2cd; }
.trash-section h2 { margin-bottom:.7rem; }
.trash-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.7rem; padding:.8rem 0; border-top:1px solid var(--line); }
.trash-entry { display:grid; gap:.15rem; min-width:0; }
.trash-entry strong { overflow-wrap:anywhere; }
.trash-entry small { color:var(--muted); }

.project-grid-item { display:flex; flex-direction:column; align-items:stretch; min-width:0; }
.project-grid-item > .project-card { flex:1; }
.project-grid-item > form { align-self:flex-end; }


/* Quiet deletion affordance: consistent across task and goal lists. */
.trash-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex: none;
}
.trash-icon-button:hover { color: var(--ink); background: var(--surface-raised); }
.trash-icon-button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.trash-icon-button svg { width: 16px; height: 16px; }

/* Dashboard: clicking any non-control area of a queue row opens the task. */
.queue-clickable { position:relative; cursor:pointer; }
.queue-clickable:hover { background:var(--surface-raised); }
.queue-clickable.task-selected:hover { background:#302a20; }
.queue-row-link { position:absolute; inset:0; z-index:1; border-radius:6px; }
.queue-clickable > .task-summary { pointer-events:none; }
.queue-clickable > .controls { position:relative; z-index:2; }
.queue-clickable:focus-within { outline:2px solid var(--gold); outline-offset:2px; }


/* Compact KPI strip on dashboard */
.results-compact { padding: .85rem 1.05rem; }
.results-heading { gap: .8rem 1.3rem; margin-bottom: .65rem; }
.results-heading h2 { font-size: 1rem; flex: none; }
.results-period { margin-left: auto; gap: .35rem; }
.results-period label { gap: .3rem; color: var(--muted); font-size: .78rem; }
.results-period input[type="date"] {
  width: 9.1rem; min-width: 0; padding: .34rem .5rem; min-height: 2rem;
  border-radius: 6px; font-size: .8rem; color: var(--ink);
}
.results-period .outlined, .results-period .ghost {
  padding: .34rem .55rem; min-height: 2rem; font-size: .8rem;
}
.results-compact .result-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0; margin: 0; border-top: 1px solid var(--line);
  padding-top: .55rem;
}
.results-compact .result-metrics .metric {
  display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap;
  background: none; border: 0; border-radius: 0;
  padding: .18rem .85rem; min-height: 1.9rem;
}
.results-compact .result-metrics .metric:first-child { padding-left: 0; }
.results-compact .result-metrics .metric + .metric { border-left: 1px solid var(--line); }
.results-compact .result-metrics dt { font-size: .8rem; }
.results-compact .result-metrics dd { font-size: 1.25rem; margin: 0; line-height: 1.15; }
@media (max-width: 57rem) {
  .results-period { margin-left: 0; }
  .results-heading { align-items: flex-start; }
}
@media (max-width: 39rem) {
  .results-compact { padding: .75rem; }
  .results-period { width: 100%; }
  .results-period label { flex: 1 1 8.5rem; }
  .results-period input[type="date"] { width: 100%; }
  .results-compact .result-metrics .metric { flex-direction: column-reverse; gap: .15rem; padding: .1rem .45rem; }
  .results-compact .result-metrics dt { font-size: .72rem; line-height: 1.25; }
  .results-compact .result-metrics dd { font-size: 1.12rem; }
}


/* Queue priority: use the grip to drag or press arrow keys. */
.draggable-task-list .task-row { transition: background .12s ease; }
.queue-drag-handle {
  position: relative; z-index: 3; flex: none;
  border: 0; background: transparent; color: var(--muted);
  width: 30px; height: 34px; border-radius: 6px;
  font-size: 1.3rem; line-height: 1; cursor: grab;
  touch-action: none; user-select: none;
}
.queue-drag-handle:hover, .queue-drag-handle:focus-visible {
  color: var(--ink); background: var(--surface-raised);
}
.queue-drag-handle:active { cursor: grabbing; }
.queue-is-dragging { opacity: .55; background: #29261f !important; pointer-events: none; }
.queue-is-dragging .queue-drag-handle { pointer-events: auto; }
.draggable-task-list .task-summary { flex: 1; min-width: 0; }


/* Glass Executive — restrained graphite glass and original KITN gold.
   Accent is deliberately confined to focus, selection and real controls.
   No decorative light streaks or ornamental gradients. */
:root {
  --background: #0b0c0e;
  --surface: #17191b;
  --surface-raised: #202225;
  --ink: #f3f1ec;
  --gold: #d5b16a; /* original KITN accent, never saturated orange */
  --line: #343639;
  --glass-border: rgba(243,241,236,.115);
  --glass-top: rgba(243,241,236,.048);
  --glass-bottom: rgba(243,241,236,.012);
}
body {
  background: var(--background);
}
.sidebar {
  background: linear-gradient(150deg, rgba(31,33,35,.55), rgba(15,16,18,.92) 55%),
    #111315;
  border-right: 1px solid var(--glass-border);
}
.panel, .day-bar, .metric, .project-card,
.project-goals-link, .goals-list, .project-remaining-list,
.project-priority, .quick-goal-form, .goals-page .panel {
  background: linear-gradient(155deg, var(--glass-top), var(--glass-bottom) 70%), rgba(23,25,27,.82);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 8px 24px rgba(0,0,0,.10);
}
@supports (backdrop-filter: blur(12px)) {
  .panel, .day-bar, .metric, .project-card, .project-goals-link,
  .goals-list, .project-remaining-list, .project-priority, .quick-goal-form {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}
.main-nav [aria-current] {
  color: var(--gold);
  background: rgba(213,177,106,.085);
  border-color: rgba(213,177,106,.24);
  box-shadow: inset 2px 0 0 rgba(213,177,106,.70);
}
.main-nav a:hover, .sidebar-projects a:hover {
  background: rgba(255,255,255,.048);
}
.sidebar-projects .selected-project {
  background: rgba(255,255,255,.065);
  box-shadow: inset 2px 0 0 rgba(213,177,106,.54);
}
.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #141311;
  box-shadow: none;
}
.primary:hover {
  color: #141311;
  background: #e1c385;
  border-color: #e1c385;
}
.outlined {
  background: rgba(255,255,255,.035);
  border-color: rgba(243,241,236,.19);
}
.outlined:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(243,241,236,.30);
}
.focus-card {
  background:
    linear-gradient(108deg, rgba(213,177,106,.075), rgba(213,177,106,.016) 58%),
    linear-gradient(160deg, rgba(243,241,236,.052), rgba(243,241,236,.01)),
    rgba(23,25,27,.90);
  border-color: rgba(213,177,106,.50);
  box-shadow:
    inset 0 1px 0 rgba(243,241,236,.085),
    0 0 0 1px rgba(213,177,106,.06),
    0 0 24px rgba(213,177,106,.075),
    0 12px 25px rgba(0,0,0,.16);
}
.focus-card #focus-title { color: var(--gold); }
.task-selected {
  background: rgba(213,177,106,.075);
  box-shadow: inset 2px 0 0 rgba(213,177,106,.65);
  border-radius: 6px;
}
.queue-clickable.task-selected:hover { background: rgba(213,177,106,.11); }
.queue-clickable:hover:not(.task-selected) { background: rgba(255,255,255,.045); }
.badge-active {
  background: rgba(213,177,106,.105);
  color: var(--gold);
  border: 1px solid rgba(213,177,106,.17);
}
.results-compact {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 5px 18px rgba(0,0,0,.08);
}
.results-compact .result-metrics .metric {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.results-compact .result-metrics .metric + .metric {
  border-left: 1px solid var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  .panel, .day-bar, .metric, .project-card, .project-goals-link,
  .goals-list, .project-remaining-list, .project-priority, .quick-goal-form {
    background: #191b1d;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .focus-card { background: #27231d; }
}


/* Compact accessible priority arrows, neutral until hovered. */
.priority-arrows {
  position: relative;
  z-index: 3; /* above full-row task link */
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  flex: none;
  margin: 0;
}
.priority-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.priority-arrow svg { width: 14px; height: 14px; }
.priority-arrow:hover:not(:disabled) { color: var(--ink); background: rgba(255,255,255,.07); }
.priority-arrow:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.priority-arrow:disabled { opacity: .18; cursor: default; }
.goal-compact-row .priority-arrows,
.project-remaining-row .priority-arrows { margin-left: auto; }
.project-priority .priority-arrows { margin-left: .3rem; }


/* Sortable queue: arrows ↑ / ↓ flank the central grip on the LEFT.
   Insertion lines are overlays, never layout-changing borders. */
.queue-priority-controls {
  position: relative;
  z-index: 3;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 30px;
  margin: 0;
  padding: 0;
}
.queue-priority-controls .priority-arrow {
  width: 28px;
  height: 17px;
  border-radius: 4px;
}
.queue-priority-controls .priority-arrow svg { width: 13px; height: 13px; }
.queue-priority-controls .queue-drag-handle {
  width: 28px;
  height: 25px;
  padding: 0;
  font-size: 1.2rem;
  cursor: grab;
  touch-action: none;
}
.queue-priority-controls .queue-drag-handle:active { cursor: grabbing; }
.draggable-task-list .task-row { position: relative; }
.draggable-task-list .queue-drop-before::before,
.draggable-task-list .queue-drop-after::after {
  content: "";
  position: absolute;
  left: 36px;
  right: 8px;
  z-index: 5;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 7px rgba(213,177,106,.22);
  pointer-events: none;
}
.draggable-task-list .queue-drop-before::before { top: -2px; }
.draggable-task-list .queue-drop-after::after { bottom: -2px; }
.queue-sortable-chosen {
  border-color: rgba(213,177,106,.35);
  background: rgba(213,177,106,.075);
}
.queue-sortable-ghost { opacity: .30; background: rgba(213,177,106,.11); }
.queue-sortable-drag {
  opacity: .96;
  border: 1px solid rgba(213,177,106,.44);
  border-radius: 8px;
  background: #202022;
  box-shadow: 0 12px 25px rgba(0,0,0,.3);
}
.queue-feedback { margin: .45rem .5rem 0; font-size: .8rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .draggable-task-list .task-row { transition: none; }
}


/* Permanent deletion is available only inside the trash. */
.trash-actions { display:flex; align-items:center; gap:.35rem; flex:none; }
.trash-actions form { display:flex; }
.trash-permanent-button {
  display:inline-flex; justify-content:center; align-items:center;
  width:36px; min-height:36px; padding:0;
  color:var(--muted); background:transparent;
  border:1px solid transparent; border-radius:8px;
}
.trash-permanent-button svg { width:16px; height:16px; }
.trash-permanent-button:hover { color:var(--red); background:rgba(242,162,152,.08); border-color:rgba(242,162,152,.22); }
.trash-permanent-button:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }


/* Single bulk trash action: restrained until a deliberate confirmation. */
.trash-empty-form { margin-left:auto; }
.trash-empty-button {
  display:inline-flex; align-items:center; justify-content:center;
  padding:.46rem .78rem; min-height:2.35rem; border-radius:8px;
  border:1px solid rgba(242,162,152,.3);
  color:var(--red); background:rgba(242,162,152,.055);
  font-size:.875rem; font-weight:600;
}
.trash-empty-button:hover:not(:disabled) {
  background:rgba(242,162,152,.12); border-color:rgba(242,162,152,.5);
}
.trash-empty-button:disabled { opacity:.32; cursor:default; }
.trash-empty-button:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }


/* Expandable subtasks on dashboard: quiet and accessible, no page navigation. */
.dashboard-subtasks { color:var(--ink); }
.dashboard-subtasks > summary {
  display: inline-flex; align-items:center; gap:.32rem;
  list-style:none; cursor:pointer; width:max-content; max-width:100%;
  border-radius:5px; padding:.17rem .35rem;
  color:var(--muted); font-size:.78rem; font-weight:500;
}
.dashboard-subtasks > summary::-webkit-details-marker { display:none; }
.dashboard-subtasks > summary::before {
  content:""; border:solid currentColor; border-width:0 1.4px 1.4px 0;
  padding:3px; transform:rotate(-45deg); margin-right:.4rem;
  transition:transform .14s ease;
}
.dashboard-subtasks[open] > summary::before { transform:rotate(45deg); }
.dashboard-subtasks > summary:hover { color:var(--ink); background:rgba(255,255,255,.045); }
.dashboard-subtasks > summary:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.dashboard-subtasks .subtask-count { margin:0; font-size:.76rem; }
.dashboard-subtask-list { margin:.45rem 0 .15rem 1.15rem; display:grid; gap:0; border-left:1px solid var(--line); }
.dashboard-subtask-item {
  display:flex; align-items:baseline; gap:.6rem;
  padding:.33rem .3rem .33rem .75rem;
  font-size:.84rem; line-height:1.4; overflow-wrap:anywhere;
}
.dashboard-subtask-item + .dashboard-subtask-item { border-top:1px solid rgba(255,255,255,.035); }
.dashboard-subtask-check {
  align-self:center; width:13px; height:13px; line-height:11px;
  display:inline-grid; place-items:center; flex:none;
  border:1px solid #717477; border-radius:3px; font-size:.7rem;
}
.dashboard-subtask-done .dashboard-subtask-check {
  color:#13120f; border-color:var(--gold); background:var(--gold);
}
.dashboard-subtask-done .dashboard-subtask-title { text-decoration:line-through; color:var(--muted); }
.dashboard-subtask-title { flex:1; min-width:0; }
.dashboard-subtask-item .kind-tag { font-size:.72rem; }
.dashboard-subtask-deadline { color:var(--muted); font-size:.75rem; flex:none; }
.queue-subtasks {
  flex:0 0 100%; min-width:0;
  padding-left:36px; position:relative; z-index:3;
}
.queue-subtasks .dashboard-subtask-list { margin-left:.35rem; }
.focus-subtasks { margin:.65rem 0 .1rem; }
@media (prefers-reduced-motion:reduce) {
  .dashboard-subtasks > summary::before { transition:none; }
}


/* Consistent collapsible subtasks on individual project pages. */
.project-subtasks { width:100%; margin-top:.32rem; }
.project-subtasks .dashboard-subtask-list { max-width:100%; }
.project-remaining-title .project-subtasks { margin-top:.35rem; }
.project-priority-content .project-subtasks { flex-basis:100%; }


/* Project page: one decision/task surface, quiet inline results, no card nesting. */
.project-inline-stats {
  display:flex; align-items:center; flex-wrap:wrap; gap:.55rem;
  margin:.65rem 0 1.1rem; font-size:.82rem; color:var(--muted);
}
.project-inline-stats > div {
  display:inline-flex; align-items:baseline; gap:.3rem;
  min-width:0; border:0; background:transparent; padding:0; border-radius:0;
}
.project-inline-stats dt { color:var(--muted); font-size:.82rem; }
.project-inline-stats dd {
  margin:0; font-size:.86rem; color:var(--ink); font-weight:650;
  font-variant-numeric:tabular-nums;
}
.compact-project-header { padding-bottom:0; border-bottom:0; align-items:flex-start; }
.compact-project-controls { gap:.4rem; align-self:center; }
.compact-project-controls .ghost { white-space:nowrap; }
.project-more-actions { position:relative; }
.project-more-actions > summary {
  list-style:none; display:grid; place-items:center; cursor:pointer;
  width:2.35rem; height:2.35rem; border-radius:8px;
  color:var(--muted); font-size:1.35rem; line-height:1;
}
.project-more-actions > summary::-webkit-details-marker { display:none; }
.project-more-actions > summary:hover,
.project-more-actions[open] > summary { background:rgba(255,255,255,.065); color:var(--ink); }
.project-more-actions > summary:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.project-more-menu {
  position:absolute; right:0; top:calc(100% + 5px); z-index:8;
  min-width:11rem; padding:.35rem; border-radius:9px;
  background:#222426; border:1px solid var(--line);
  box-shadow:0 14px 28px rgba(0,0,0,.35);
}
.project-more-menu button { display:block; text-align:left; width:100%; }
.project-goals-link { margin:.3rem 0 1.4rem; }
.project-unified-section { margin-top:.65rem; }
.project-unified-section > .section-heading { margin-bottom:.65rem; }
.project-unified-list {
  border:1px solid var(--glass-border,var(--line)); border-radius:10px;
  overflow:hidden; background:linear-gradient(155deg,rgba(243,241,236,.04),rgba(243,241,236,.01) 80%),rgba(23,25,27,.82);
}
.project-unified-list .project-list-label {
  color:var(--muted); font-size:.77rem; font-weight:600;
  padding:.7rem 1rem .15rem; letter-spacing:.015em;
}
.project-unified-list .project-list-label-focus { color:var(--gold); }
.project-unified-list .project-list-label-queue {
  padding:.7rem 1rem .4rem; border-top:1px solid var(--line);
}
.project-unified-list .project-priority {
  display:flex; align-items:flex-start; gap:.8rem;
  padding:.65rem 1rem 1rem; margin:0;
  border:0; border-radius:0; background:transparent; box-shadow:none;
  backdrop-filter:none; -webkit-backdrop-filter:none;
}
.project-unified-list .project-priority-content { flex:1; }
.project-unified-list .project-remaining-list {
  border:0; border-radius:0; overflow:visible;
  background:transparent; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none;
}
.project-unified-list .project-remaining-row {
  align-items:flex-start; border-bottom:0;
  padding:.75rem 1rem;
}
.project-unified-list .project-remaining-row + .project-remaining-row { border-top:1px solid var(--line); }
.project-unified-list .project-priority > .inline-task-complete,
.project-unified-list .project-remaining-row > .inline-task-complete { margin-top:.15rem; align-self:flex-start; }
.project-unified-list .project-empty-remaining { padding:1rem; }
@media (max-width:47rem) {
  .project-inline-stats { gap:.4rem; }
  .project-inline-stats dt { font-size:.76rem; }
  .project-unified-list .project-priority,
  .project-unified-list .project-remaining-row { padding-left:.65rem; padding-right:.65rem; }
}

/* Descriptions appear under task/decision titles across dashboard and projects. */
.task-description {
  color: var(--muted);
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: .82rem;
  line-height: 1.5;
}
.queue-task-description { margin: .24rem 0; }
.focus-task-description { margin: .3rem 0 .45rem; }
.project-priority-content > .task-description { flex-basis: 100%; }
.project-remaining-title > .task-description { margin-top: .3rem; }


/* Lightweight inline editing of project identity. */
.project-edit-panel {
  padding: 1rem 1.1rem;
  margin: .8rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  max-width: 42rem;
}
.project-edit-form { display: grid; gap: .3rem; }
.project-edit-form .form-field { margin: .2rem 0 .5rem; }
.project-edit-form textarea { min-height: 5rem; }
.project-edit-actions { display: flex; gap: .45rem; justify-content: flex-start; }
.project-edit-trigger { white-space: nowrap; }
html[data-theme="light"] .project-edit-panel { background: #fff; border-color: var(--line); }


/* Focus card: one clear task title, one metadata row, one subtask counter. */
.focus-card .focus-topline { margin-bottom:0; padding-bottom:.75rem; border-bottom:1px solid var(--line); }
.focus-card .focus-topline h2 { font-size:.87rem; letter-spacing:.025em; }
.focus-card .focus-topline .ghost { font-size:.78rem; }
.focus-main { padding-top:.85rem; }
.focus-card .focus-project {
  display:flex; align-items:center; gap:.43rem;
  color:var(--muted); font-size:.8rem; font-weight:500;
  margin:0 0 .45rem;
}
.focus-card .focus-project .marker { margin:0; }
.focus-task-layout { display:flex; align-items:flex-start; justify-content:space-between; gap:1.2rem; }
.focus-task-copy { flex:1; min-width:0; }
.focus-task-heading { display:flex; align-items:center; gap:.65rem; flex-wrap:wrap; }
.focus-card .focus-task-heading h3 {
  margin:0; font-size:1.34rem; line-height:1.3; letter-spacing:-.025em;
  color:var(--ink);
}
.focus-task-kind { font-size:.7rem; }
.focus-card .focus-task-description {
  margin:.3rem 0 0; color:var(--muted); font-size:.86rem;
  line-height:1.5; white-space:pre-line; overflow-wrap:anywhere;
}
.focus-task-layout .focus-open-task { flex:none; align-self:center; white-space:nowrap; }
.focus-card .focus-subtasks {
  margin:.95rem 0 0; padding:.65rem 0 0;
  border-top:1px solid var(--line);
}
.focus-card .focus-subtasks[hidden] { display:none; }
.focus-card .focus-subtasks > summary {
  display:flex; align-items:center; width:100%;
  font-size:.83rem; font-weight:550; padding:.25rem .15rem;
}
.focus-card .focus-subtasks > summary .subtask-count { margin-left:.25rem; }
.focus-card .focus-subtasks .dashboard-subtask-list {
  margin:.55rem 0 .1rem .55rem; border-left:1px solid var(--line);
}
@media (max-width:39rem) {
  .focus-task-layout { flex-direction:column; gap:.85rem; }
  .focus-task-layout .focus-open-task { align-self:flex-start; }
}


/* Clickable completion controls for dashboard queue/focus and nested subtasks. */
.queue-clickable > .queue-task-complete {
  position:relative; z-index:4; display:flex; align-items:center; flex:none;
}
.queue-clickable > .queue-task-complete .square-check { cursor:pointer; }
.queue-clickable > .queue-task-complete .square-check:hover,
.focus-task-complete .square-check:hover,
.subtask-complete .square-check:hover { border-color:var(--gold); }
.queue-clickable > .queue-priority-controls { position:relative; z-index:4; }
.queue-clickable > .queue-subtasks { position:relative; z-index:4; }
.focus-task-complete { display:flex; align-items:center; flex:none; }
.focus-task-complete .square-check { width:1.35rem; height:1.35rem; cursor:pointer; }
.subtask-complete { flex:none; display:flex; align-items:center; position:relative; z-index:4; }
.subtask-complete .dashboard-subtask-check {
  width:14px; height:14px; padding:0; border-radius:3px;
  cursor:pointer; background:transparent; color:var(--ink);
}
.dashboard-subtask-done .subtask-complete .dashboard-subtask-check,
.subtask-complete .dashboard-subtask-check.checked {
  background:var(--gold); border-color:var(--gold); color:#13120f;
}
.queue-clickable.task-just-completed .task-title,
.queue-clickable.task-just-completed .queue-task-description,
.focus-task-layout.task-just-completed .focus-task-title,
.focus-task-layout.task-just-completed .focus-task-description {
  text-decoration:line-through; color:var(--muted);
}
.queue-clickable.task-just-completed .queue-task-complete .square-check,
.focus-task-layout.task-just-completed .focus-task-complete .square-check {
  background:var(--gold); border-color:var(--gold); color:#13120f;
}
@media (max-width:47rem) {
  .queue-clickable > .queue-task-complete { order:0; }
}

/* Project completed tasks: retained in a reversible, collapsed archive. */
.project-completed-section { margin-top:1rem; border:1px solid var(--line); border-radius:9px; overflow:hidden; }
.project-completed-section > summary { cursor:pointer; padding:.8rem 1rem; font-weight:600; font-size:.9rem; }
.project-completed-section > summary:hover { background:var(--surface-raised); }
.project-completed-list { border-top:1px solid var(--line); }
.project-completed-row { display:flex; align-items:flex-start; gap:.8rem; padding:.7rem 1rem; border-bottom:1px solid var(--line); }
.project-completed-row:last-child { border-bottom:0; }
.completed-task-restore { display:flex; flex:none; align-items:center; margin:.08rem 0 0; }
.completed-task-restore .square-check { cursor:pointer; }
.project-completed-copy { display:flex; flex:1; min-width:0; align-items:baseline; flex-wrap:wrap; gap:.35rem .75rem; }
.project-completed-copy a { overflow-wrap:anywhere; }
.project-completed-date { font-size:.75rem; color:var(--muted); white-space:nowrap; }
.project-completed-empty { padding:.8rem 1rem; }
/* Keep queue checkbox aligned with the first line of the task title, not the tall reorder grip. */
.queue-clickable { align-items:flex-start; }
.queue-clickable > .queue-task-complete { align-self:flex-start; margin-top:.17rem; }
.queue-clickable > .task-summary { align-self:flex-start; padding-top:.1rem; }
.queue-clickable > .queue-priority-controls { align-self:flex-start; }
/* Project task checkboxes share a consistent first-line alignment. */
.project-unified-list .project-priority > .inline-task-complete,
.project-unified-list .project-remaining-row > .inline-task-complete { display:flex; align-items:center; margin:.1rem 0 0; flex:none; }
