:root { font-size:16px; }
body { overflow-wrap:anywhere; }
button { cursor:pointer; min-height:48px; padding:12px 16px; }
.shell { padding-top:18px; }
header { padding-bottom:18px; border-bottom:1px solid #dce4dd; }
h1 { font-size:26px; line-height:1.25; margin:0; }
h2 { font-size:18px; margin:24px 0 12px; }
h3 { font-size:16px; }
small,.muted { color:#65766e; line-height:1.5; }
.list-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:28px 0 20px; }
.page-toolbar { display:grid; grid-template-columns:1fr auto; gap:12px; padding:16px 0 8px; }
.page-toolbar > button:first-child { grid-column:1/-1; justify-self:start; }
.page-toolbar > button:last-child:not(:first-child) { align-self:start; }
.quiet { background:transparent; color:#205b4c; border:1px solid #dce4dd; }
.rows,.summary { background:white; border:1px solid #dce4dd; border-radius:16px; overflow:hidden; }
.entity-row { display:flex; align-items:center; gap:12px; width:100%; padding:16px; border-radius:0; text-align:left; background:white; color:#253830; font-weight:400; border-bottom:1px solid #e9ede9; }
.entity-row:last-child { border-bottom:0; }
.entity-row > span:first-child { flex:1; min-width:0; }
.entity-row strong { display:block; font-weight:600; line-height:1.4; }
.entity-row small { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; margin-top:5px; font-size:14px; white-space:pre-wrap; }
.entity-row .badge { flex-shrink:0; margin:0; font-size:11px; }
.task-project,.task-details,.task-result { display:block; white-space:normal; }
.task-project { color:#65766e; margin-top:4px; }
.task-details { color:#205b4c; margin-top:3px; }
.task-result { color:#65766e; margin-top:3px; }
.entity-row .task-details { display:block; -webkit-line-clamp:unset; overflow:visible; white-space:normal; }
.entity-row .task-project,.entity-row .task-result,.entity-row .task-waiting { display:-webkit-box; -webkit-line-clamp:2; overflow:hidden; }
.overdue,.entity-row .overdue { color:#a23c22; }
.answer-card { background:#fff; border:1px solid #cbdcd2; border-radius:16px; padding:16px; margin:12px 0; }
.answer-card .entity-row { border:0; padding:0; }
.answer-card .prose { overflow-wrap:anywhere; }
.reminder-card { background:white; border:1px solid #dce4dd; border-radius:16px; padding:16px; margin:12px 0; }
.reminder-card .entity-row { padding:0 0 12px; border:0; }
.brief-entry { margin:0 0 16px; width:100%; }
.brief-project-title { font-size:20px; line-height:1.4; font-weight:600; }
.brief-facts,.brief-section { background:white; padding:16px; border:1px solid #dce4dd; border-radius:16px; margin:16px 0; }
.brief-fact + .brief-fact { margin-top:20px; }
.brief-facts h2,.brief-section > h2 { margin:0 0 8px; }
.brief-facts .prose { margin:0; }
.brief-section .entity-row { padding:12px 0; }
.brief-section .empty { padding:12px 0; }
.material-pin { margin:4px 12px 12px; font-size:13px; }
.material-choice { border-bottom:1px solid #e9ede9; }
.plan-list-row { display:flex; align-items:center; border-bottom:1px solid #e9ede9; }
.plan-list-row:last-child { border-bottom:0; }
.plan-list-row > .entity-row { flex:1; min-width:0; border:0; }
.plan-order { display:flex; flex-shrink:0; gap:4px; padding:8px; }
.plan-order button { min-width:44px; min-height:48px; padding:8px; font-size:22px; }
.plan-order button:disabled { opacity:.25; cursor:default; }
@media(min-width:900px) { .brief-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; } .brief-fact + .brief-fact { margin-top:0; } }
.entity-row:active { background:#e7efe8; }
.project-meta { color:#718078; font-size:13px; margin-bottom:16px; }
.project-tabs { display:flex; gap:4px; margin:0 0 20px; padding:4px; background:#e8eee7; border-radius:14px; }
.project-tabs button { flex:1 1 0; min-width:0; white-space:nowrap; padding-left:8px; padding-right:8px; font-size:13px; }
.project-tabs button { flex:1; background:transparent; color:#607069; padding:10px 4px; font-size:14px; }
.project-tabs [aria-selected=true] { background:white; color:#205b4c; box-shadow:0 1px 4px #0001; }
.summary .entity-row small { display:block; white-space:pre-wrap; }
.summary .entity-row strong { font-size:13px; color:#718078; font-weight:500; }
.summary .entity-row small { font-size:16px; color:#243c32; }
details { margin:20px 0; }
summary { cursor:pointer; min-height:48px; padding:14px 0; color:#52685c; }
.add-button { display:block; margin:24px 0; width:100%; }
.prose { white-space:pre-wrap; line-height:1.65; }
.timeline article { padding:18px 0; border-bottom:1px solid #dce4dd; }
.timeline .entity-row { background:transparent; padding:0; min-height:48px; }
.timeline article h3 { margin:0; }
.timeline .prose { margin:8px 0; }
.empty { padding:16px; margin:0; }
dialog { width:min(calc(100% - 24px),560px); max-height:calc(100dvh - 32px); overflow-y:auto; padding:20px; }
.dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.dialog-head h2 { padding:0; margin:0; }
dialog label { display:grid; gap:8px; color:#52645c; font-size:14px; }
.field { display:grid; gap:8px; }
dialog input,dialog textarea,dialog select { color:#1f2d29; background:white; }
dialog textarea { min-height:160px; }
.field-hint { margin:0; color:#718078; font-size:13px; line-height:1.45; }
.menu { display:grid; gap:8px; }
.menu button { background:#eef3ee; color:#205b4c; text-align:left; }
.journal-entry { border-bottom:1px solid #dce4dd; padding:16px 0; }
.journal-entry small { display:block; margin-top:8px; }
.message:not(:empty) { position:fixed; z-index:100; bottom:90px; left:16px; right:16px; background:#205b4c; color:white; padding:14px; border-radius:14px; box-shadow:0 4px 20px #0002; }
.saving button { opacity:.6; pointer-events:none; }
.bottom-nav { padding-bottom:max(8px,env(safe-area-inset-bottom)); }
.bottom-nav button { white-space:nowrap; font-size:11px; padding:4px 1px; }
button:focus-visible { outline:3px solid #78bdb0; outline-offset:2px; }
.file-preview { display:block; max-width:100%; max-height:55vh; object-fit:contain; margin:12px auto; }
.download-link { display:block; padding:14px; border-radius:12px; background:#205b4c; color:white; text-align:center; text-decoration:none; margin-top:16px; }
input[type=file] { width:100%; max-width:100%; padding:10px; }
.admin-section { margin:0 0 24px; padding:18px; border:1px solid #dce4dd; border-radius:16px; background:white; }
.admin-section h2 { margin:0 0 8px; }
.admin-section p { margin:8px 0; }
.admin-section code { display:block; overflow-wrap:anywhere; margin:12px 0; padding:10px; border-radius:10px; background:#f4f7f2; color:#41554b; font-size:12px; }
.admin-section .rows { margin-top:12px; }
.memory-search { display:grid; gap:10px; margin:0 0 20px; }
.memory-search label { color:#52645c; font-size:14px; }
.search-controls { display:flex; gap:8px; align-items:center; }
.search-controls input { min-width:0; }
.search-controls button { flex-shrink:0; }
.search-archive { display:flex; gap:8px; align-items:center; }
.search-archive input { flex:0 0 auto; width:18px; height:18px; }
.search-result small { white-space:normal; }
.search-result .search-meta { display:block; white-space:normal; color:#65766e; }
.search-result .search-snippet { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; margin-top:4px; white-space:pre-wrap; color:#253830; line-height:1.45; }
.today-group { margin:24px 0; }
.today-group h2 { margin-bottom:10px; }
.task-filters { margin:0 0 16px; }
.task-filters .project-tabs { margin-bottom:8px; }
.check-field { display:flex; align-items:center; gap:8px; }
.check-field input { flex:0 0 auto; width:18px; height:18px; }
.ai-summary-section { margin:16px 0; padding:14px 0; border-bottom:1px solid #dce4de; }
.ai-summary-section h3 { margin:0 0 8px; }
.ai-summary-section details { margin:8px 0; }
#ai-summary-body blockquote { margin:10px 0; padding-left:12px; border-left:3px solid #b9cec3; white-space:pre-wrap; overflow-wrap:anywhere; }
#sync-refresh { flex:0 0 44px; min-width:44px; min-height:44px; padding:6px; font-size:26px; line-height:1; }
#sync-status { margin:8px 0; padding:10px 14px; border-radius:12px; background:#edf3ee; font-size:14px; }
[data-sync-status]:empty { display:none; }
@media(max-width:480px){header{gap:8px}.header-actions{gap:6px}#role-switch{padding:10px;max-width:145px;overflow:hidden;text-overflow:ellipsis}.brand{gap:6px;font-size:19px}}
@media (min-width:960px) { .bottom-nav { display:none; } #app-panel { padding-bottom:24px; } }

/* Task chains stay compact until expanded, including on narrow phones. */
.task-chain { margin: 20px 0; padding: 14px; border: 1px solid #dce4dd; border-radius: 16px; background: #fff; }
.task-chain summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: #205b4c; }
.task-chain h3 { font-size: 15px; margin-bottom: 6px; }
.task-chain-list { padding-left: 24px; margin-bottom: 0; }
.task-chain-list li { padding: 8px 0; border-bottom: 1px solid #e4eee5; }
.task-chain-list li:last-child { border-bottom: 0; }
.task-chain-list li[aria-current="step"] { background: #eef5ef; border-radius: 10px; }
.task-chain .entity-row { min-width: 0; width: 100%; }
.task-chain .entity-row strong, .task-chain .prose { overflow-wrap: anywhere; }
.task-chain .chain-result { margin: 4px 12px 10px; font-size: 14px; }
