:root {
  font-family: system-ui, sans-serif;
  font-size: 14px; color: #d8dede; background: #111517; color-scheme: dark;
  --green: #a6d78f; --muted: #99a6aa; --line: #354047; --panel: #191f23; --surface: #222b30;
}
* { box-sizing: border-box; }
pre, code, kbd, samp { font-family: inherit; }
[hidden] { display: none !important; }
body { margin: 0; display: flex; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: inherit; padding: 9px 12px; border-radius: 3px; text-decoration: none; font-size: 12px; }
button:hover, .button:hover { background: #2b353b; border-color: #66767c; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
button.primary { background: #a6d78f; color: #152011; border-color: #a6d78f; font-weight: 700; }
button.primary:hover { background: #bce6a8; }
button:disabled { opacity: .45; cursor: default; }
a { color: var(--green); text-underline-offset: 3px; }
input, textarea, select { background: #111719; border: 1px solid var(--line); border-radius: 3px; padding: 10px; width: 100%; color: inherit; }
input::placeholder, textarea::placeholder { color: #839197; }
textarea { resize: vertical; line-height: 1.6; background: #fff; color: #50565c; color-scheme: light; }
label { display: block; font-size: 12px; }
label input, label textarea, label select { margin-top: 7px; }
#file-sidebar { background: #151b1e; width: 230px; flex-shrink: 0; border-right: 1px solid var(--line); padding: 27px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 12px; align-items: center; font-size: 18px; font-weight: 700; margin: 0 8px 25px; }
.prompt { color: var(--green); font-size: 22px; }
nav { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
nav button { display: flex; justify-content: space-between; gap: 8px; border: 1px solid transparent; background: transparent; text-align: left; padding: 11px 12px; }
nav button.active { background: #25342b; color: #c1e6ad; border-color: #405747; }
nav .section { font-size: 10px; letter-spacing: 1px; color: var(--muted); margin: 19px 12px 8px; }
.reference-misc { display: flex; flex-direction: column; gap: 4px; padding-left: 12px; }
.reference-misc[hidden] { display: none; }
.reference-tree-children { display:flex; flex-direction:column; gap:4px; padding-left:12px; border-left:1px solid #3d4d58; margin-left:5px; }
.reference-tree-children[hidden] { display:none; }
.search-reference-option { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 13px; }
.search-reference-option input { width: auto; }
.search-file-group { margin: 18px 0; }
.search-file-group h2 { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.search-file-group h2 button { text-align: left; overflow-wrap: anywhere; }
.search-line { display: flex; align-items: baseline; gap: 12px; width: 100%; margin: 5px 0; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.count { font-size: 10px; color: var(--muted); background: #111719; padding: 2px 6px; border-radius: 2px; }
.aside-bottom { margin-top: auto; padding-top: 24px; }
.aside-bottom button { width: 100%; }
.aside-bottom a.button { display: block; margin-top: 10px; text-align: center; }
.aside-bottom small { font-size: 10px; display: block; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; white-space: pre-line; margin-top: 13px; }
main { padding: 30px 32px 100px; flex: 1; min-width: 0; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 23px; }
.header-actions { display: flex; gap: 8px; }
#settings-mobile { display: none; }
h1 { font-size: 25px; line-height: 1.3; margin: 0; font-weight: 600; }
h2 { font-size: 18px; margin: 0; }
h3 { font-size: 15px; }
p { line-height: 1.65; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.toolbar > input { flex: 1; min-width: 100px; }
#status { font-size: 11px; color: var(--muted); min-height: 18px; margin: 4px 0 15px; line-height: 1.6; }
#status.error { color: #ebbe80; cursor: pointer; }
#file-tabs { display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 17px; scrollbar-width: thin; }
#file-tabs button { flex-shrink: 0; border-radius: 3px 3px 0 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; padding: 12px 15px; font-size: 12px; margin: 0 3px 0 0; }
#file-tabs button[aria-selected="true"] { color: var(--green); background: var(--panel); border-bottom-color: var(--green); }
#file-tabs button:hover { color: #e2e9e9; }
#file-tabs .file-tab { display: flex; flex-shrink: 0; margin-right: 3px; }
#file-tabs .file-tab > button { margin-right: 0; }
#file-tabs .file-tab:has(.close-file-tab) > [data-file] { padding-right: 8px; }
#file-tabs .close-file-tab { padding: 8px; min-width: 30px; font-size: 18px; }
#file-tabs .file-tab:has([aria-selected="true"]) > .close-file-tab { background: var(--panel); border-bottom-color: var(--green); }
.draft-dot { margin-left: 8px; color: #e8bf80; font-size: 9px; }
.file-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
#file-path { color: #cad4d6; overflow-wrap: anywhere; font: inherit; font-size: 12px; }
.file-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#file-status { color: var(--muted); font-size: 11px; margin: 10px 0; }
#file-text { display: block; min-height: 420px; height: calc(100vh - 320px); padding: 20px; border: 1px solid #c9cdd0; border-radius: 2px; font: 13px/1.85 system-ui, sans-serif; tab-size: 4; background: #fff; color: #50565c; caret-color: #333; white-space: pre; overflow: auto; }
#file-text:read-only { background: #f3f4f5; }
.warning { color: #f2ce93; background: #302a20; border: 1px solid #62513b; padding: 11px 14px; font-size: 12px; line-height: 1.65; }
.task-list { border: 1px solid var(--line); background: var(--panel); border-radius: 3px; overflow: hidden; }
.task { display: flex; align-items: center; gap: 13px; padding: 17px; border-bottom: 1px solid var(--line); }
.task:last-child { border: 0; }
.task.selected { background: #25342b; box-shadow: inset 4px 0 var(--green); }
.task-inline { cursor: default; }
.task-inline textarea { min-height: 85px; margin-bottom: 10px; }
.task-inline .hint { margin-bottom: 0; }
.list-key { color: var(--green); font: inherit; font-size: 11px; margin-right: 6px; }
#refile-task { overflow-wrap: anywhere; color: var(--muted); }
#refile-options { display: grid; gap: 8px; }
#refile-options button { display: flex; align-items: center; gap: 16px; text-align: left; }
#refile-options kbd { color: var(--green); font: inherit; }
#priority-task { overflow-wrap: anywhere; color: var(--muted); }
#priority-options { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; }
#priority-options button { padding: 10px 4px; }
#priority-options button[aria-pressed="true"] { color: var(--green); border-color: var(--green); background: #25342b; }
#priority-options button[data-priority=""] { grid-column: 1 / -1; }
.task:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
#content:focus, #file-workspace:focus { outline: none; }
#keyboard-help { padding: 3px 7px; color: var(--muted); background: transparent; font-size: 10px; }
#keyboard-guide { position: fixed; right: 14px; bottom: 12px; z-index: 25; max-width: min(780px,calc(100vw - 32px)); display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: #151b1e; color: var(--muted); box-shadow: 0 3px 16px #0005; font-size: 11px; }
#keyboard-context { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; line-height: 1.7; }
#keyboard-context > span { white-space: nowrap; }
#keyboard-context kbd { font: inherit; color: var(--green); }
.key-separator { color: #66767c; }
#shortcuts table { width: 100%; border-collapse: collapse; font-size: 12px; }
#shortcuts th, #shortcuts td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); line-height: 1.6; }
#shortcuts th { width: 39%; color: var(--green); font-weight: normal; }
.task input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); flex-shrink: 0; }
.task-main { flex: 1; min-width: 0; cursor: pointer; }
.task-title { line-height: 1.6; overflow-wrap: anywhere; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.task.done .project-tag, .task.done .context-tag { color: var(--muted); background: transparent; }
.project-group { margin-bottom: 18px; border: 1px solid var(--line); background: var(--panel); }
.project-toggle, .project-count { display: block; width: 100%; text-align: left; padding: 10px 16px; border: 0; color: var(--muted); }
.project-toggle.project-all-done, .project-count.project-all-done { color: var(--green); }
.project-heading { padding: 17px; color: var(--muted); overflow-wrap: anywhere; }
.project-visibility { margin-bottom: 16px; }
.project-children { margin: 0 12px 12px 24px; border-left: 2px solid var(--line); }
.project-children .task { background: #151b1e; }
.project-children .project-tag, .project-children .context-tag { white-space: normal; overflow-wrap: anywhere; }
.project-empty { margin: 0; padding: 12px; color: var(--muted); }
.meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 7px; font-size: 10px; color: var(--muted); }
.tag { background: #263136; border-radius: 2px; padding: 3px 7px; }
.tag.due { background: #3d3222; color: #ecc28a; }
.tag.priority { background: #2a3b2d; color: #b6df9e; }
.project-tag { background: #29323a; padding: 2px 4px; border-radius: 3px; font-weight: 700; white-space: nowrap; }
.context-tag { font-style: italic; white-space: nowrap; }
.project-color-0 { color: #a6d78f; }
.project-color-1 { color: #87ceeb; }
.project-color-2 { color: #eab676; }
.project-color-3 { color: #c6a0f6; }
.project-color-4 { color: #ee99b7; }
.project-color-5 { color: #8bd5ca; }
.project-color-6 { color: #eed49f; }
.project-color-7 { color: #b7bdf8; }
.reference-list { border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.reference-row { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.reference-row:last-child { border-bottom: 0; }
.reference-name { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; color: var(--green); overflow-wrap: anywhere; }
.reference-name small { display: block; color: var(--muted); margin-top: 8px; }
.reference-row .file-actions { flex-shrink: 0; }
button.danger { color: #f0a4a4; }
.task .edit { font-size: 11px; color: var(--green); background: #222c26; white-space: nowrap; }
.task-buttons { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.empty { padding: 52px 25px; border: 1px dashed var(--line); text-align: center; border-radius: 3px; color: var(--muted); line-height: 1.7; }
.empty strong { display: block; color: #d8dede; font-size: 18px; margin-bottom: 10px; }
footer { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 10px; padding: 22px 0; }
.calendar-nav { display: flex; gap: 10px; align-items: center; margin-bottom: 15px; }
.calendar-nav strong { flex: 1; }
.calendar { background: var(--panel); display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 25px; }
.day-name { font-size: 11px; text-align: center; padding: 10px; color: var(--muted); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.day { min-height: 104px; border: 0; border-radius: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; padding: 9px; background: var(--panel); font-size: 12px; }
.day.today { box-shadow: inset 0 0 0 1px var(--green); background: #24312a; }
.day.selected-day { outline: 2px solid #8ed8df; outline-offset: -3px; }
.schedule-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.schedule-heading h2 { flex: 1 1 220px; }
#calendar-schedule { scroll-margin-top: 20px; }
#calendar-schedule:focus { outline: none; }
.day.blank { background: #12191c; }
.calendar-once { --event-color: #8ed8df; --event-bg: #20373b; }
.calendar-repeat { --event-color: #c4a7e7; --event-bg: #342b43; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12px; margin-bottom: 15px; }
.calendar-legend span { color: var(--event-color); }
.event { display: block; background: var(--event-bg); color: var(--event-color); font-size: 10px; padding: 4px; margin-top: 5px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; border-radius: 2px; }
.task.calendar-once, .task.calendar-repeat { border-left: 3px solid var(--event-color); }
.calendar-kind { background: var(--event-bg); color: var(--event-color); }
.cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.card { background: var(--panel); padding: 22px; border-radius: 3px; border: 1px solid var(--line); }
.card strong { font-size: 25px; display: block; color: var(--green); margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 12px; }
.reference { padding: 24px; white-space: pre-wrap; line-height: 1.8; background: #fff; color: #50565c; border-radius: 2px; border: 1px solid #c9cdd0; overflow-wrap: anywhere; }
#checklist-notes { margin-top: 28px; }
#notes-content { padding: 20px; background: #fff; color: #50565c; border: 1px solid #c9cdd0; border-radius: 2px; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.8 system-ui, sans-serif; }
dialog { background: var(--panel); color: inherit; border: 1px solid #556269; border-radius: 4px; padding: 25px; width: min(565px,95vw); max-height: 92vh; box-shadow: 0 20px 90px #0009; }
dialog::backdrop { background: #0009; }
dialog label { margin: 15px 0; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.dialog-heading button { border: 0; font-size: 23px; padding: 2px 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.hint { font-size: 11px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.connection-path { font: 12px system-ui, sans-serif; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
#toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); padding: 13px 20px; border: 1px solid #74847a; border-radius: 3px; background: #25352b; color: #e7eee9; z-index: 20; max-width: 90vw; line-height: 1.6; }
@media(max-width:1000px) {
  main { padding: 25px 22px 110px; } #file-sidebar { width: 205px; padding: 24px 11px; }
  .toolbar { flex-wrap: wrap; } .toolbar > input { flex-basis: 100%; }
  .file-toolbar { align-items: flex-start; flex-direction: column; }
  .day { min-height: 80px; padding: 5px; } .event { font-size: 9px; }
}
@media(max-width:620px) {
  #keyboard-guide, .list-key { display: none; }
  body { display: block; } #file-sidebar { position: relative; width: auto; height: auto; padding: 16px; }
  .brand { margin: 0 0 14px; } nav { flex-direction: row; overflow: auto; }
  nav button { flex-shrink: 0; padding: 9px 12px; } nav .section, .aside-bottom { display: none; }
  main { padding: 22px 16px; } header { align-items: center; } h1 { font-size: 21px; }
  #settings-mobile { display: block; } .header-actions button { font-size: 11px; padding: 8px; }
  #file-tabs button { font-size: 11px; padding: 10px 12px; }
  .file-actions { gap: 6px; } .file-actions button { font-size: 10px; padding: 9px; }
  #file-text { min-height: 350px; height: 55vh; padding: 13px; font-size: 12px; }
  .toolbar { gap: 7px; } .task { padding: 14px 11px; } .task .edit { padding: 7px; }
  .two { gap: 10px; } .cards { grid-template-columns: 1fr; }
  .reference-row { flex-wrap: wrap; gap: 8px; padding: 12px; }
  .reference-name { flex-basis: 100%; }
  .day { min-height: 67px; } .event { font-size: 8px; } .calendar-nav button { padding: 8px; }
}

#mobile-nav, #drawer-close { display: none; }
#upload-status { padding: 12px 0; color: var(--green); font-size: 12px; }
.reference-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumbs button { color: var(--green); }
@media(max-width:620px) {
  #mobile-nav { display: flex; align-items: center; gap: 8px; margin: -6px 0 18px; }
  #mobile-nav button { flex: 1; min-height: 48px; padding: 10px; color: var(--green); }
  #mobile-nav button[aria-current="true"] { background: #25342b; border: 1px solid var(--green); box-shadow: inset 0 0 0 1px var(--green); }
  #mobile-nav svg { display: block; width: 24px; height: 24px; margin: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  #file-sidebar { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(320px,86vw); height: 100dvh; transform: translateX(-100%); visibility: hidden; padding: 16px; }
  .drawer-open #file-sidebar { transform: translateX(0); visibility: visible; }
  .drawer-open { overflow: hidden; }
  #drawer-shade { position: fixed; inset: 0; z-index: 39; background: #0009; border: 0; border-radius: 0; }
  #drawer-close { display: block; align-self: flex-end; font-size: 24px; margin-bottom: 12px; }
  #file-sidebar .brand { display: none; }
  #file-sidebar nav { flex-direction: column; overflow: auto; }
  #file-sidebar nav button { flex-shrink: 0; }
  #file-sidebar nav .section { display: block; }
  #file-sidebar .aside-bottom { display: block; padding-top: 12px; }
  #settings-mobile, #file-tabs { display: none !important; }
  .file-toolbar { position: sticky; top: 0; padding: 10px 0; background: #111517; z-index: 2; }
  #file-text { height: 55dvh; min-height: 160px; }
  .reference-toolbar .file-actions { width: 100%; }
}

.task-email{display:inline-flex;align-items:center;padding:6px 8px;color:#b6ddcf;font-size:12px;white-space:nowrap}.editor-email{margin-bottom:12px}.task-email:focus-visible{outline:2px solid #b6ddcf;outline-offset:3px}
@media(max-width:620px){.task-email{grid-column:2;white-space:normal}}
@media(max-width:620px){
  #content.swipe-task-lists { touch-action: pan-y pinch-zoom; min-height: 45dvh; }
}

.project-tag[data-project-link]{cursor:pointer;text-decoration:underline;text-underline-offset:3px}.project-tag[data-project-link]:focus-visible{outline:2px solid currentColor;outline-offset:3px}.project-group:focus{outline:1px solid #a6d78f;outline-offset:3px;scroll-margin-top:12px}

.swipe-overlay{position:fixed;overflow:hidden;z-index:8;pointer-events:none;background:#111517;contain:layout paint}.swipe-screen{position:absolute;inset:0;overflow:hidden;background:#111517;will-change:transform}.swipe-screen>div{width:100%;min-height:100%;background:#111517}

/* Approved compact desktop/mobile theme. Semantic tag colors remain independent. */
:root{font-size:13px;color:#d4dde3;background:#101417;--green:#89cff0;--muted:#93a4af;--line:#37444d;--panel:#191f24;--surface:#28333c;--raised-shadow:0 2px 0 #080d11,0 3px 5px #0006,inset 0 1px 0 #ffffff12}
*,*::before,*::after{border-radius:0!important}
button,.button{background:linear-gradient(#2c3841,#232d35);border:1px solid #42505b;border-top-color:#566570;border-bottom-color:#10171c;padding:6px 10px;min-height:30px;font-size:11px;box-shadow:var(--raised-shadow);transition:background .1s,box-shadow .08s}
button:hover,.button:hover{background:#344653;border-color:#637d8c;color:#ecf6fc}
button:active,.button:active{background:#172d3b;box-shadow:inset 0 2px 3px #0008;border-color:#587c91}
button.primary{background:#89cff0;color:#10212b;border-color:#afdff5 #3e6e88 #264f65 #afdff5;box-shadow:0 2px 0 #050c11,inset 0 1px 0 #e0f4ff66}
button.primary:hover{background:#a5ddf6}
button.primary:active{box-shadow:inset 0 2px 3px #0007}
input,select{padding:7px 9px;background:#121b22;box-shadow:inset 0 1px 3px #0005}
input[type=checkbox],input[type=radio]{accent-color:var(--green);box-shadow:none}
#file-sidebar{width:202px;padding:14px 8px 10px;background:#141a1f}
.brand{font-size:14px;gap:8px;font-weight:500;margin:0 7px 16px}.prompt{font-size:16px}
nav{gap:5px;padding:0 2px 4px}
nav button{background:linear-gradient(#29343e,#202b33);border:1px solid #42505b;border-top-color:#566570;border-bottom-color:#10171c;box-shadow:var(--raised-shadow);padding:6px 8px;min-height:32px;font-size:11px}
nav button.active{background:#233d4d;color:#89cff0;border-color:#64899e;box-shadow:inset 2px 0 #89cff0,inset 0 1px 0 #ffffff18,0 2px 0 #080d11,0 3px 5px #0006}
nav button:active{box-shadow:inset 0 2px 3px #0008;background:#172d3b}
nav .section{font-size:9px;letter-spacing:.1em;margin:14px 7px 5px}
.count{background:transparent;padding:0 2px}.reference-misc{gap:5px}
.aside-bottom{padding-top:14px}.aside-bottom a.button{margin-top:7px}.aside-bottom small{margin-top:9px;font-size:9px}
main{padding:14px 20px 70px}header{margin-bottom:12px;gap:12px}h1{font-size:20px;font-weight:500;letter-spacing:-.04em}h2{font-size:16px;font-weight:500}h3{font-size:13px}
.toolbar{gap:8px;margin-bottom:7px}.toolbar>input{font-size:12px}#status{font-size:10px;min-height:15px;margin:3px 0 10px}
#file-tabs{margin-bottom:12px;background:#141a1f;border-top:1px solid var(--line)}
#file-tabs button{font-size:10px;padding:7px 10px;margin:0;border-top:0;box-shadow:none;background:transparent}
#file-tabs button[aria-selected=true]{background:#1d2a33;color:#89cff0;border-bottom-color:#89cff0}#file-tabs .close-file-tab{font-size:15px;padding:4px 7px}
#file-tabs .file-tab{margin-right:0}.file-actions{gap:6px}.file-toolbar{gap:10px;margin-bottom:8px}
#file-text{padding:14px;line-height:1.7;background:#fff;color:#50565c;box-shadow:inset 0 2px 4px #0002}
.task-list{border-top-color:#4a5a65;box-shadow:0 3px 7px #0004}
.task{padding:9px 12px;gap:10px;min-height:44px;background:#181f25;border-bottom-color:#2b3741}.task:nth-child(2n){background:#151c22}
.task:hover{background:#202d37}.task.selected{background:#203645;box-shadow:inset 2px 0 #89cff0}
.task-title{font-size:12px;line-height:1.65}.meta{margin-top:4px;gap:5px}.tag{padding:1px 4px;background:#22313c}.tag.priority{color:#c6e8f9;background:#263d4d}
.task .edit{font-size:10px;background:linear-gradient(#2c3841,#232d35);color:#a2bdcc;padding:5px 8px}
.task-buttons{gap:4px}.project-tag{background:transparent;padding:0 1px;font-weight:500}.context-tag{font-size:.95em}
.context-tag.project-color-0{color:#d7a9c4}.context-tag.project-color-1{color:#c3b5e5}.context-tag.project-color-2{color:#d4bb90}.context-tag.project-color-3{color:#a8c5bd}.context-tag.project-color-4{color:#c2b6a6}.context-tag.project-color-5{color:#b0bad5}.context-tag.project-color-6{color:#d1b1a2}.context-tag.project-color-7{color:#a3c1cc}
.task.done .project-tag,.task.done .context-tag{color:var(--muted)}
.project-group{margin-bottom:10px;box-shadow:0 2px 4px #0004}.project-toggle,.project-count{padding:7px 12px;font-size:11px;background:#212d37}.project-heading{padding:10px 12px}.project-visibility{margin-bottom:10px}.project-children{margin:0 8px 8px 16px}.project-children .task{background:#161f26}
.reference-row{padding:9px 10px;gap:10px}.reference-name{padding:6px 8px;background:linear-gradient(#29343e,#202b33);border:1px solid #42505b;border-top-color:#566570;box-shadow:var(--raised-shadow)}.reference-name small{margin-top:3px;font-size:10px}
.reference-toolbar{margin-bottom:10px}.empty{padding:28px 16px}.empty strong{font-size:15px;font-weight:500}.card{padding:14px}.card strong{font-size:20px}
.calendar-nav{gap:8px;margin-bottom:10px}.calendar{margin-bottom:16px;box-shadow:0 3px 7px #0004}.day{min-height:83px;padding:6px;box-shadow:none;background:#171f26}.day:hover{background:#24323e}.day.today{background:#203846;box-shadow:inset 0 0 0 1px #89cff0}.day.blank{background:#11191f}.day-name{font-size:10px;padding:6px;background:#1e2932}.event{padding:2px 3px;margin-top:3px;border-left:2px solid var(--event-color)}.calendar-legend{font-size:11px;gap:12px;margin-bottom:10px}
.calendar-once{--event-color:#89cff0;--event-bg:#293e4d}.calendar-repeat{--event-color:#c4a7e7;--event-bg:#332f44}
dialog{padding:18px;border-color:#647d8d;border-top-color:#879ba8;box-shadow:4px 6px 0 #070d12,0 20px 70px #000a}dialog label{margin:11px 0}.dialog-heading{margin-bottom:12px}.dialog-actions{margin-top:16px;gap:8px}.dialog-heading button{border:1px solid #42505b;font-size:20px;min-height:28px}.two{gap:10px}
#keyboard-guide{padding:6px 9px;font-size:10px;gap:8px;background:#141b21;box-shadow:0 2px 4px #0005}#keyboard-help{min-height:24px;padding:2px 6px}
#toast{background:#243c4c;border-color:#7298b0;color:#def1fc;padding:9px 14px;font-size:12px}
footer{padding:14px 0;font-size:10px}.project-group:focus{outline-color:#89cff0}#priority-options button[aria-pressed=true]{background:#233d4d}.task-email{color:#a9d4eb}
.swipe-overlay,.swipe-screen,.swipe-screen>div{background:#101417}
@media(max-width:1000px){main{padding:14px 16px 80px}#file-sidebar{width:194px;padding:14px 8px}.toolbar{flex-wrap:wrap}.toolbar>input{flex-basis:100%}}
@media(max-width:620px){
 main{padding:14px 12px}header{margin-bottom:10px}h1{font-size:18px}.header-actions button{padding:7px 9px}
 button,.button{min-height:44px}#mobile-nav{gap:2px;margin:0 0 12px}#mobile-nav button{min-height:46px;padding:7px;min-width:0;background:linear-gradient(#2c3841,#232d35)}
 #mobile-nav button[aria-current=true]{background:#1a3446;border-color:#89cff0;box-shadow:inset 0 2px 4px #0007,0 0 0 1px #0a141b}#mobile-nav svg{width:21px;height:21px;stroke-width:1.6;stroke-linecap:square;stroke-linejoin:miter}
 #file-sidebar{width:min(290px,86vw);padding:12px}.drawer-open #file-sidebar{background:#141a1f}#file-sidebar nav button{min-height:44px;padding:8px 10px}#drawer-close{min-height:36px;margin-bottom:8px}#drawer-shade{box-shadow:none}
 .task{padding:8px;gap:8px}.task-title{font-size:13px}.task .edit{min-width:44px;min-height:44px;padding:7px}.task input[type=checkbox]{position:relative;width:20px;height:20px;margin:10px 4px}.task input[type=checkbox]::before{content:"";position:absolute;inset:-12px}
 .file-toolbar{background:#101417;padding:8px 0}.file-actions button{min-height:44px}.reference-row{padding:8px}.reference-name{min-height:44px}.file-actions{gap:6px}.toolbar{gap:6px}
 .day{min-height:66px;padding:4px;box-shadow:none}.calendar-nav button{padding:6px 8px}.day-name{font-size:9px;padding:6px 2px}.calendar-legend{font-size:11px}.event{font-size:8px}
 #status{margin-bottom:9px}.project-children{margin-left:12px}.project-toggle{min-height:44px}.dialog-heading button{min-height:36px}.dialog-actions{position:sticky;bottom:-18px;background:var(--panel);padding:10px 0;margin-bottom:-8px}footer{padding:12px 0}
}
.task-file-link{color:#89cff0;text-decoration:underline;text-underline-offset:3px;cursor:pointer;overflow-wrap:anywhere}.task-file-link:focus-visible{outline:2px solid #89cff0;outline-offset:2px}.task.done .task-file-link{color:var(--muted)}#task-file-choices{display:grid;gap:6px}

/* Compact reference file explorer. */
.reference-explorer{min-width:0;border:1px solid #3d4d58;background:#151c21}
.reference-explorer .reference-toolbar{padding:8px;margin:0;border-bottom:1px solid #3d4d58}
.explorer-actions{display:flex;gap:5px;flex-wrap:wrap;padding:7px 8px;border-bottom:1px solid #3d4d58}
.explorer-actions button{padding:5px 9px;font-size:12px}
.explorer-columns{display:grid;grid-template-columns:minmax(130px,.65fr) minmax(260px,1.5fr) minmax(180px,1fr);min-height:340px}
.explorer-parent,.explorer-main,.explorer-preview{min-width:0;max-height:65vh;overflow:auto}
.explorer-parent,.explorer-main{border-right:1px solid #3d4d58}
.explorer-parent button{display:block;border:0;box-shadow:none;background:none;width:100%;text-align:left;padding:6px 8px;overflow-wrap:anywhere;font-size:12px}
.explorer-parent button.current{background:#263746;color:#89cff0}
.explorer-label{padding:7px 10px;border-bottom:1px solid #3d4d58;color:#93a4af;font-size:11px;overflow-wrap:anywhere}
.explorer-row,.explorer-row-head{display:grid;grid-template-columns:minmax(0,1fr) 85px 28px;align-items:center;gap:8px}
.explorer-row{min-height:34px;padding:5px 8px;border-bottom:1px solid #26323b;cursor:default;outline-offset:-2px}
.explorer-row:hover{background:#202e39}.explorer-row[aria-selected=true]{background:#233e4e;box-shadow:inset 3px 0 #89cff0}
.explorer-row:focus-visible{outline:1px solid #89cff0}.explorer-row.is-cut .explorer-filename{opacity:.5}
.explorer-filename{overflow-wrap:anywhere;font-size:13px}.explorer-icon{display:inline-block;width:20px;color:#89cff0}
.explorer-row small{font-size:11px;color:#93a4af}.explorer-preview{padding:12px;background:#11191f}
.explorer-preview-name{color:#89cff0;overflow-wrap:anywhere;margin-bottom:6px}.explorer-preview small{overflow-wrap:anywhere;color:#93a4af}
.explorer-preview pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.6 system-ui, sans-serif;border-top:1px solid #3d4d58;padding-top:10px}
.explorer-preview-child{padding:3px 0;font-size:12px;overflow-wrap:anywhere}
.explorer-status,.explorer-cut-status{padding:7px 10px;border-top:1px solid #3d4d58;color:#93a4af;font-size:11px;overflow-wrap:anywhere}
.explorer-status span{display:block;margin-top:4px}.explorer-cut-status{color:#89cff0}.explorer-cut-status button{font-size:11px;padding:3px 7px;margin-left:8px}
.explorer-more{padding:2px!important;min-width:26px;min-height:26px;box-shadow:none!important}
#move-source{overflow-wrap:anywhere}#move-folders{display:grid;gap:4px;max-height:45vh;overflow:auto;padding:10px 0}#move-folders button{text-align:left;overflow-wrap:anywhere}#move-breadcrumbs{flex-wrap:wrap}
@media(max-width:1100px){.explorer-columns{grid-template-columns:minmax(240px,1.6fr) minmax(160px,1fr)}.explorer-parent{display:none}}
@media(max-width:750px){.explorer-columns{grid-template-columns:1fr;min-height:180px}.explorer-preview{display:none}.explorer-main{border-right:0;max-height:none}.explorer-row{min-height:48px}.explorer-actions button{min-height:40px}.explorer-status span{display:none}.explorer-more{min-height:36px!important}.reference-explorer .breadcrumbs{flex-wrap:wrap}}

/* Directories are containers; filenames remain simple clickable text. */
nav button.reference-file-link{background:transparent;border-color:transparent;box-shadow:none;color:var(--ink,#d4dde3)}
nav button.reference-file-link:hover{text-decoration:underline;background:#ffffff08}
nav button.reference-file-link.active{color:#89cff0;border-left-color:#89cff0}
.explorer-directory{background:linear-gradient(#2c3841,#232d35);border:1px solid #43545f;box-shadow:inset 0 1px #ffffff12,0 2px #080d11;margin-bottom:4px;cursor:pointer}
.explorer-directory:hover{background:linear-gradient(#344550,#293843)}
.explorer-file{background:transparent;border-bottom:1px solid #26323b;box-shadow:none}
.explorer-file .explorer-filename{cursor:pointer}
.explorer-file:hover .explorer-filename{text-decoration:underline}

.reference-explorer .explorer-drop{outline:2px solid #89cff0;outline-offset:-2px;background:#29495b}

#explorer-actions-list{display:grid;gap:6px}#explorer-actions-list button{text-align:left}#explorer-actions-title{overflow-wrap:anywhere}

@media(max-width:620px){
 #reference-dialog[open]{position:fixed;top:calc(var(--reference-viewport-top,0px) + 8px);bottom:auto;left:0;right:0;margin:0 auto;padding:12px;max-height:calc(var(--reference-viewport-height,100dvh) - 16px);overflow:hidden}
 #reference-form{display:flex;flex-direction:column;min-height:0;max-height:calc(var(--reference-viewport-height,100dvh) - 42px)}
 #reference-form>.dialog-heading,#reference-form>.dialog-actions{flex-shrink:0}
 #reference-form>.reference-dialog-body{min-height:0;overflow-y:auto;overscroll-behavior:contain}
 #reference-form>.dialog-actions{position:static;margin:8px 0 0;padding:6px 0 0}
 #reference-content{max-height:38dvh;min-height:90px}
}

.project-completed-controls{display:flex;justify-content:flex-end;padding:3px 5px}
.project-completed-controls button{display:flex;align-items:center;justify-content:center;min-width:36px;min-height:36px;padding:6px}

.reference-destination{position:relative;min-width:0}
#refile-reference-files{max-height:min(42vh,320px);overflow:auto;border:1px solid #43545f;background:#151c21;box-shadow:0 5px 12px #0006;margin-top:3px;padding:4px}
#refile-reference-files button{width:100%;margin:2px 0;padding:8px;overflow-wrap:anywhere}
#refile-reference-files .destination-file{background:transparent;box-shadow:none;border-color:transparent}
#refile-reference-files [aria-selected=true]{outline:1px solid #89cff0;outline-offset:-1px;background:#203a48}

#delete-task { margin-right: auto; }
