/* Navigate-specific component styles. Tokens (:root vars, reset, .app
   shell) live in shared/tokens.css, same as every other app. Most of the
   project-detail section below is ported verbatim from Do's app.css —
   same schema, same interactions, just without Do's domain='home' limit.
   New here: domain pills/badges, the matrix table, location cards, and
   the domain-tools settings list — none of which exist anywhere else in
   the suite. */

/* ---------- Header (shared shape with the rest of the suite) ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243,236,225,0.92);
  backdrop-filter: blur(8px);
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.wordmark { display: flex; align-items: center; gap: 8px; font-size: 22px; margin: 0 0 4px; text-decoration: none; }
.wordmark .underline { position: relative; }
.wordmark .underline::after {
  content: ""; position: absolute; left: 2px; right: -4px; bottom: -4px;
  height: 6px; background: var(--timber); opacity: 0.28; border-radius: var(--r-pill); transform: rotate(-0.6deg);
}
.header-row { display: flex; align-items: center; justify-content: space-between; }
.subtitle-row { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 12px 34px; }
.subtitle { font-size: 12px; color: var(--ink-soft); margin: 0; }
.subtitle-row .link { font-size: 12px; color: var(--timber); font-weight: 600; text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }

main { padding: 20px; display: flex; flex-direction: column; gap: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { font-size: 17px; margin: 0; }
.section-head .count { font-size: 12px; color: var(--ink-soft); }

.seg { display: inline-flex; background: var(--cream-bg); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 2px; flex-wrap: wrap; }
.seg button { border: none; background: transparent; font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-pill); color: var(--ink-soft); }
.seg button.active { background: var(--timber); color: #fff; }

/* ---------- Domain pills — one consistent colour language for the five
   domains, used on the matrix, project cards, and project detail badges. */
.domain-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .03em; }
.domain-pill.domain-home { background: var(--timber-tint); color: var(--timber-dark); }
.domain-pill.domain-ember { background: var(--cat-terracotta-tint); color: var(--cat-terracotta); }
.domain-pill.domain-guild { background: var(--cat-blue-tint); color: var(--cat-blue); }
.domain-pill.domain-wbc { background: var(--cat-sage-tint); color: var(--cat-sage); }
.domain-pill.domain-private { background: var(--cat-plum-tint); color: var(--cat-plum); }

/* ---------- Matrix view (dashboard) ---------- */
.matrix-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.matrix-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--cream-card); box-shadow: var(--shadow-sm); }
.matrix-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.matrix-table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft);
  padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none;
}
.matrix-table th.active-sort { color: var(--timber-dark); }
.matrix-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.matrix-table tr:last-child td { border-bottom: none; }
.matrix-table tr.matrix-row { cursor: pointer; text-decoration: none; color: inherit; }
.matrix-table tr.matrix-row:hover { background: var(--cream-bg); }
.matrix-title { font-weight: 600; font-size: 13.5px; }
.matrix-next-step { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.matrix-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.matrix-target-date { font-size: 12px; white-space: nowrap; }
.matrix-target-date.overdue { color: var(--cat-terracotta); font-weight: 700; }
.matrix-target-date.soon { color: var(--cat-ochre); font-weight: 700; }
.matrix-target-date.none { color: var(--ink-soft); font-style: italic; }
.matrix-readiness-mini { display: flex; align-items: center; gap: 6px; }
.matrix-readiness-mini .track { width: 46px; height: 5px; background: var(--border); border-radius: var(--r-pill); overflow: hidden; }
.matrix-readiness-mini .fill { height: 100%; background: var(--timber); }
.matrix-open-link { color: var(--timber); }
.matrix-empty { padding: 30px 16px; text-align: center; }

/* ---------- Recommend panel (matrix view — same interaction as Do's) --- */
.recommend-btn { width: 100%; background: var(--timber); color: #fff; border: none; border-radius: var(--r-md); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; font-family: var(--font-display); font-weight: 700; font-size: 14.5px; box-shadow: var(--shadow-md); transition: transform var(--fast) var(--ease); }
.recommend-btn:hover { transform: translateY(-1px); }
.recommend-panel { margin-top: 12px; background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-sm); display: none; }
.recommend-panel.open { display: block; }
.recommend-item { padding: 10px 0; border-top: 1px solid var(--border); text-decoration: none; color: inherit; display: block; }
.recommend-item:first-child { border-top: none; padding-top: 0; }
.lead { font-family: var(--font-display); font-weight: 700; font-size: 14px; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.rtitle { font-weight: 700; font-size: 13.5px; margin: 0 0 3px; }
.rwhy { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin: 0; }
.recommend-empty { font-size: 12.5px; color: var(--ink-soft); margin: 0; }
.recommend-source { font-size: 10.5px; color: var(--ink-soft); text-align: right; margin: 8px 0 0; font-style: italic; }

/* ---------- Location view (dashboard) ---------- */
.location-here-card { background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-sm); }
.location-here-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.location-here-head .licon { font-size: 22px; }
.location-here-head .lname { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.location-here-empty { font-size: 13px; color: var(--ink-soft); text-align: center; padding: 20px 0; }
.location-task-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.location-task-list li { background: var(--cream-bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px; }
.location-task-list .ltitle { font-weight: 600; font-size: 12.5px; color: var(--ink-soft); margin: 0 0 2px; }
.locations-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.location-row { display: flex; align-items: center; gap: 10px; background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 13px; box-shadow: var(--shadow-sm); }
.location-row .licon { font-size: 18px; }
.location-row-body { flex: 1; }
.location-row-name { font-size: 13px; font-weight: 600; }
.location-row-meta { font-size: 11px; color: var(--ink-soft); }
.location-remove { border: none; background: transparent; color: var(--ink-soft); padding: 2px; font-size: 12px; }
.location-add-form { display: flex; flex-direction: column; gap: 8px; background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; margin-top: 12px; }
.location-add-form input, .location-add-form select { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 9px 11px; font-family: var(--font-body); font-size: 13px; background: var(--cream-bg); }
.location-use-current { align-self: flex-start; }

/* ---------- Domain tools settings list ---------- */
.domain-tools-list { display: flex; flex-direction: column; gap: 8px; }
.domain-tool-row { display: flex; align-items: center; gap: 10px; background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 13px; box-shadow: var(--shadow-sm); }
.domain-tool-body { flex: 1; min-width: 0; }
.domain-tool-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.domain-tool-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); background: var(--cream-bg); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 2px 7px; }
.domain-tool-notes { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.domain-tool-open { color: var(--timber); flex-shrink: 0; }
.domain-tool-remove { border: none; background: transparent; color: var(--ink-soft); padding: 2px; font-size: 12px; flex-shrink: 0; }
.domain-tool-add-form { display: flex; flex-direction: column; gap: 8px; background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; margin-top: 12px; }
.domain-tool-add-form input, .domain-tool-add-form select { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 9px 11px; font-family: var(--font-body); font-size: 13px; background: var(--cream-bg); }

/* ---------- Add project modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(58,46,36,0.35); display: none; align-items: flex-end; justify-content: center; z-index: 50; }
.modal-overlay.open { display: flex; }
@media (min-width: 600px) { .modal-overlay { align-items: center; } }
.modal { background: var(--cream-card); width: 100%; max-width: 480px; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 22px 20px 26px; box-shadow: var(--shadow-lg); max-height: 85vh; overflow-y: auto; position: relative; }
@media (min-width: 600px) { .modal { border-radius: var(--r-lg); } }
.modal h3 { font-size: 16px; margin: 0 0 14px; }
.modal .qgroup { margin-bottom: 18px; }
.modal .qlabel { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; display: block; }
.modal textarea, .modal input[type=text], .modal select { width: 100%; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; font-family: var(--font-body); font-size: 13.5px; background: var(--cream-bg); resize: vertical; }
.choice-row { display: flex; gap: 8px; flex-wrap: wrap; }
.choice-btn { flex: 1 1 auto; border: 1px solid var(--border); background: var(--cream-bg); border-radius: var(--r-sm); padding: 12px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); text-align: left; }
.choice-btn.active { border-color: var(--timber); background: var(--timber-tint); color: var(--timber-dark); }
.first-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.first-steps li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; background: var(--cream-bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 9px 11px; }
.first-steps .num { font-family: var(--font-display); font-weight: 700; color: var(--timber); flex-shrink: 0; }
.first-tools { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.first-tools li { font-size: 12px; background: var(--cream-bg); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 5px 11px; }
.modal-submit { width: 100%; background: var(--timber); color: #fff; border: none; border-radius: var(--r-pill); padding: 13px; font-weight: 700; font-family: var(--font-display); margin-top: 6px; }
.modal-submit:disabled { opacity: 0.5; cursor: default; }
.modal-secondary { width: 100%; background: transparent; color: var(--ink-soft); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 11px; font-weight: 600; font-size: 12.5px; margin-top: 8px; }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--ink-soft); font-size: 18px; }
.plan-status { font-size: 12px; color: var(--ink-soft); margin: -6px 0 12px; }
.plan-status.error { color: var(--cat-terracotta); }

/* ---------- FAB + person picker ---------- */
.fab { position: fixed; right: 20px; bottom: 24px; width: 56px; height: 56px; border-radius: var(--r-pill); background: var(--timber); color: #fff; border: none; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); transition: transform var(--fast) var(--ease), background var(--fast) var(--ease); z-index: 30; }
.fab:hover { transform: translateY(-2px) scale(1.03); background: var(--timber-dark); }

.person-btn { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--cream-card); display: flex; align-items: center; justify-content: center; color: var(--timber); }
.person-sheet { position: fixed; inset: 0; background: rgba(58,46,36,0.35); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.person-sheet[hidden] { display: none; }
.person-sheet .panel { background: var(--cream-card); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 20px; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); }
.person-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.person-option { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-md); border: 1.5px solid var(--border); background: var(--cream-bg); text-align: left; }
.person-option.selected { border-color: var(--timber); background: var(--timber-tint); }
.person-option .avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; }

/* ---------- Empty state ---------- */
.empty-state { border: 1.5px dashed var(--border); border-radius: var(--r-md); padding: 22px 16px; text-align: center; color: var(--ink-soft); }
.empty-state .headline { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.empty-state .sub { font-size: 12.5px; }

/* =========================================================
   PROJECT DETAIL PAGE — ported from Do, unchanged interactions
   ========================================================= */
.back-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.back-btn { border: 1px solid var(--border); background: var(--cream-card); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink); box-shadow: var(--shadow-sm); text-decoration: none; flex-shrink: 0; }
.header-title { font-size: 18px; margin: 0; flex: 1; }

.meta-row { display: flex; align-items: center; justify-content: space-between; }
.last-activity { font-size: 11.5px; color: var(--ink-soft); }

.badge-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); }
.badge.imp-high { background: var(--cat-terracotta-tint); color: var(--cat-terracotta); }
.badge.imp-medium { background: var(--cat-ochre-tint); color: var(--cat-ochre); }
.badge.imp-low { background: var(--cat-sage-tint); color: var(--cat-sage); }
.badge.urg-high { background: var(--ink); color: #fff; }
.badge.urg-medium { background: var(--timber-tint); color: var(--timber-dark); }
.badge.urg-low { background: var(--border); color: var(--ink-soft); }
.badge.plan-source { background: var(--cream-card); color: var(--ink-soft); border: 1px solid var(--border); }

/* READINESS */
.readiness-card { background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-sm); }
.readiness-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.readiness-top .rnum { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.readiness-top .rlabel { font-size: 12px; color: var(--ink-soft); }
.track { height: 8px; background: var(--border); border-radius: var(--r-pill); overflow: hidden; }
.fill { height: 100%; background: var(--timber); border-radius: var(--r-pill); transition: width 400ms var(--ease); }
.readiness-sub { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }

/* PLAN */
.plan-text { font-size: 13.5px; line-height: 1.6; color: var(--ink); background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; margin: 0; white-space: pre-wrap; }
.plan-empty { font-size: 12.5px; color: var(--ink-soft); font-style: italic; }

/* PRIORITY + DOMAIN editors */
.priority-editor { margin-top: 0; padding-top: 0; border-top: none; }
.editor-row { margin-bottom: 8px; }
.editor-row .elabel { font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; display: block; }

/* STEPS */
.steps-list { display: flex; flex-direction: column; gap: 8px; }
.step-row { display: flex; align-items: flex-start; gap: 11px; background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.step-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease); margin-top: 1px; background: transparent; }
.step-check svg { opacity: 0; transition: opacity var(--fast) var(--ease); }
.step-row.done .step-check { background: var(--timber); border-color: var(--timber); }
.step-row.done .step-check svg { opacity: 1; }
.step-body { flex: 1; min-width: 0; }
.step-text { font-size: 13.5px; transition: color var(--fast) var(--ease), text-decoration var(--fast) var(--ease); }
.step-row.done .step-text { color: var(--ink-soft); text-decoration: line-through; }
.step-location { font-size: 11px; color: var(--cat-ochre); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.step-num { font-family: var(--font-display); font-weight: 700; color: var(--timber); font-size: 12px; flex-shrink: 0; margin-top: 2px; }
.step-remove { border: none; background: transparent; color: var(--ink-soft); padding: 2px; flex-shrink: 0; font-size: 12px; }

/* TOOLS & MATERIALS */
.tool-list { display: flex; flex-direction: column; gap: 8px; }
.tool-row { background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.tool-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tool-name { font-size: 13.5px; font-weight: 600; }
.status-chip { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); flex-shrink: 0; border: none; }
.status-chip.owned { background: var(--cat-sage-tint); color: var(--cat-sage); }
.status-chip.need_to_buy { background: var(--cat-terracotta-tint); color: var(--cat-terracotta); }
.status-chip.need_to_borrow { background: var(--cat-ochre-tint); color: var(--cat-ochre); }
.tool-sub { font-size: 11.5px; color: var(--ink-soft); margin-top: 4px; }
.tool-action { margin-top: 8px; display: flex; gap: 6px; }
.mini-btn { border: 1px solid var(--border); background: var(--cream-bg); border-radius: var(--r-pill); padding: 6px 12px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.mini-btn.primary { background: var(--timber); border-color: var(--timber); color: #fff; }

.complete-section { padding: 4px 0 8px; }
.btn-complete {
  width: 100%; background: var(--cat-sage); color: #fff; border: none; border-radius: var(--r-pill);
  padding: 15px; font-weight: 700; font-family: var(--font-display); font-size: 15px;
  box-shadow: var(--shadow-md); transition: transform var(--fast) var(--ease);
}
.btn-complete:hover { transform: translateY(-1px); }
.btn-complete:disabled { opacity: 0.6; transform: none; }
.completed-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--cat-sage-tint); color: var(--cat-sage);
  border-radius: var(--r-pill); padding: 14px 20px; font-weight: 700; font-size: 15px;
}
.completed-banner .link { font-weight: 600; font-size: 13px; }

.add-bar { display: flex; gap: 8px; margin-top: 4px; }
.add-bar input { flex: 1; border: 1px solid var(--border); background: var(--cream-card); border-radius: var(--r-pill); padding: 9px 15px; font-family: var(--font-body); font-size: 13px; }
.add-bar button { background: var(--timber); color: #fff; border: none; border-radius: var(--r-pill); padding: 0 16px; font-weight: 700; font-size: 12.5px; }

/* ---------- Budget card (project detail) ---------- */
.budget-card { background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-sm); }
.budget-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.budget-stat { display: flex; flex-direction: column; gap: 2px; }
.budget-stat .bnum { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.budget-stat .blabel { font-size: 10.5px; color: var(--ink-soft); }
.budget-stat.pending .bnum { color: var(--cat-terracotta); }
.budget-track { height: 10px; background: var(--border); border-radius: var(--r-pill); overflow: hidden; display: flex; }
.paid-fill { background: var(--timber); height: 100%; transition: width 400ms var(--ease); }
.pending-fill { background: var(--cat-terracotta); opacity: .55; height: 100%; transition: width 400ms var(--ease); }
.budget-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 11px; color: var(--ink-soft); flex-wrap: wrap; align-items: center; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.budget-overspend { color: var(--cat-terracotta); font-weight: 700; }
.budget-empty { font-size: 12.5px; color: var(--ink-soft); }
.cost-input { width: 84px; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 8px; font-family: var(--font-body); font-size: 12px; background: var(--cream-bg); }

/* ---------- Decisions (project detail) ---------- */
.decision-card { background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow-sm); margin-bottom: 8px; }
.decision-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.decision-q { font-size: 13.5px; font-weight: 600; line-height: 1.4; margin: 0; }
.decision-people { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-soft); margin-bottom: 10px; }
.decision-answers { display: flex; gap: 6px; }
.answer-btn { flex: 1; border: 1px solid var(--border); background: var(--cream-bg); border-radius: var(--r-pill); padding: 7px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.answer-btn.yes.active { background: var(--cat-sage-tint); border-color: var(--cat-sage); color: var(--cat-sage); }
.answer-btn.no.active { background: var(--cat-terracotta-tint); border-color: var(--cat-terracotta); color: var(--cat-terracotta); }
.answer-btn.maybe.active { background: var(--cat-ochre-tint); border-color: var(--cat-ochre); color: var(--cat-ochre); }
.decision-resolved { font-size: 12px; color: var(--cat-sage); font-weight: 600; display: flex; align-items: center; gap: 6px; margin: 0; }
.decision-resolved.no-color { color: var(--cat-terracotta); }
.decision-reason { font-size: 11.5px; color: var(--ink-soft); margin: 4px 0 0; font-style: italic; }
.decision-stale { font-size: 10.5px; color: var(--cat-terracotta); font-weight: 700; margin: 4px 0 0; }
.no-reason { display: none; margin-top: 8px; }
.no-reason.show { display: block; }
.no-reason textarea { width: 100%; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; font-family: var(--font-body); font-size: 12.5px; background: var(--cream-bg); resize: vertical; }
.decision-add { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.decision-add-row { display: flex; gap: 8px; }
.decision-add-row select { border: 1px solid var(--border); background: var(--cream-card); border-radius: var(--r-sm); padding: 0 8px; font-size: 12.5px; }
.decision-hint { font-size: 11px; color: var(--ink-soft); margin: 0; line-height: 1.4; }
.step-deleted-note { font-size: 11px; color: var(--ink-soft); font-style: italic; margin: 4px 0 0; }

/* ---------- Resources (project detail) ---------- */
.resource-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.resource-row { display: flex; align-items: center; gap: 10px; background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 13px; box-shadow: var(--shadow-sm); }
.resource-icon { width: 30px; height: 30px; border-radius: var(--r-sm); background: var(--timber-tint); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--timber-dark); }
.resource-body { flex: 1; min-width: 0; }
.resource-title { font-size: 13px; font-weight: 600; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-title a { color: inherit; }
.resource-meta { font-size: 11px; color: var(--ink-soft); margin: 2px 0 0; }
.resource-remove { border: none; background: transparent; color: var(--ink-soft); padding: 2px; flex-shrink: 0; font-size: 12px; }
.add-resource-bar { display: flex; gap: 8px; }

/* ---------- Notification bell (verbatim copy of the suite-wide pattern,
   see notifications.js) ---------- */
.notif-btn {
  position: relative;
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--border);
  background: var(--cream-card); display: flex; align-items: center; justify-content: center;
  color: var(--timber); cursor: pointer;
}
.notif-badge {
  position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: var(--r-pill); background: var(--cat-terracotta); color: #fff;
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: 300px; max-height: 380px;
  overflow-y: auto; background: var(--cream-card); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg); z-index: 60; padding: 4px 0;
}
.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.notif-panel-head .link { font-size: 11.5px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.notif-empty { padding: 16px 14px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }
.notif-row { display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); }
.notif-row-body { flex: 1; }
.notif-title { font-size: 13px; font-weight: 600; margin: 0 0 2px; }
.notif-body { font-size: 12px; color: var(--ink-soft); margin: 0 0 2px; }
.notif-when { font-size: 10.5px; color: var(--ink-soft); margin: 0; opacity: 0.8; }
.notif-dismiss { border: none; background: transparent; color: var(--ink-soft); font-size: 11px; cursor: pointer; padding: 2px 4px; border-radius: 50%; }
.notif-row-dismissing { opacity: 0.45; pointer-events: none; }
.notif-dismiss:hover { background: var(--timber-tint); color: var(--timber); }
#notif-slot { position: relative; }

/* ---------- Brain dump capture bar (dashboard) ---------- */
.braindump-bar { display: flex; gap: 8px; align-items: center; }
.braindump-bar input {
  flex: 1; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--cream-card);
  padding: 11px 16px; font-family: var(--font-body); font-size: 13.5px; box-shadow: var(--shadow-sm);
}
.dump-mic {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border);
  background: var(--cream-card); color: var(--timber); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.dump-mic.listening { background: var(--cat-terracotta); border-color: var(--cat-terracotta); color: #fff; animation: dump-pulse 1.2s infinite; }
@keyframes dump-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(196,108,74,0.4); } 50% { box-shadow: 0 0 0 6px rgba(196,108,74,0); } }
.dump-submit {
  background: var(--timber); color: #fff; border: none; border-radius: var(--r-pill);
  padding: 11px 18px; font-weight: 700; font-family: var(--font-display); font-size: 13px; flex-shrink: 0;
}
.dump-submit:disabled { opacity: 0.6; }

/* ---------- Dormant-project nudge banner (dashboard) ---------- */
.dormant-banner {
  background: var(--cream-card); border: 1px solid var(--border); border-left: 3px solid var(--cat-ochre);
  border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.dormant-head { font-weight: 700; font-family: var(--font-display); font-size: 13.5px; margin-bottom: 8px; }
.dormant-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.dormant-row:first-child { border-top: none; }
.dormant-title { flex: 1; min-width: 120px; font-size: 12.5px; font-weight: 600; color: inherit; text-decoration: none; }
.dormant-days { font-size: 11px; color: var(--ink-soft); }
.dormant-snooze { border: 1px solid var(--border); background: transparent; border-radius: var(--r-pill); padding: 4px 10px; font-size: 10.5px; font-weight: 600; color: var(--ink-soft); }

/* ---------- Energy/time capacity toggle (recommend panel) ---------- */
.capacity-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

/* ---------- Cross-project blockers (blockers.html) ---------- */
.blocker-group { background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.blocker-group-head { font-weight: 700; font-family: var(--font-display); font-size: 13.5px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.blocker-group-head .count { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.blocker-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 12.5px; }
.blocker-item:first-child { border-top: none; }
.blocker-item a { color: inherit; font-weight: 600; text-decoration: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blocker-item .blocker-sub { font-size: 11px; color: var(--ink-soft); flex-shrink: 0; }

/* ---------- Brain dump inbox (inbox.html) ---------- */
.dump-card { background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.dump-content { font-size: 13.5px; margin: 0 0 10px; line-height: 1.4; }
.dump-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dump-actions button, .dump-actions select { font-size: 11.5px; border-radius: var(--r-pill); padding: 6px 12px; font-weight: 600; }
.dump-action-project { border: none; background: var(--timber); color: #fff; }
.dump-action-step { border: 1px solid var(--border); background: transparent; color: var(--ink); }
.dump-action-archive { border: 1px solid var(--border); background: transparent; color: var(--ink-soft); }
.dump-step-picker { display: none; margin-top: 8px; gap: 6px; }
.dump-step-picker.open { display: flex; }
.dump-step-picker select { flex: 1; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 8px; }

/* ---------- AI tool-suggestion backfill (tools.html) ---------- */
.backfill-card { background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow-sm); margin-bottom: 4px; }
.backfill-lead { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 10px; line-height: 1.4; }
.backfill-status { font-size: 12px; margin: 8px 0 0; line-height: 1.4; }
.backfill-status.error { color: var(--cat-terracotta); }

/* ---------- Step effort + physical-action flag (project detail) ---------- */
.step-body { display: flex; flex-direction: column; gap: 4px; }
.step-meta-row { display: flex; align-items: center; gap: 6px; }
.effort-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 7px; border-radius: var(--r-pill); border: 1px solid var(--border); color: var(--ink-soft); background: var(--cream-bg); }
.effort-tag.effort-quick { color: var(--cat-sage); border-color: var(--cat-sage); }
.effort-tag.effort-deep { color: var(--cat-terracotta); border-color: var(--cat-terracotta); }
.physical-flag { border: none; background: transparent; padding: 1px 4px; font-size: 12px; color: var(--border); }
.physical-flag.active { color: var(--cat-ochre); }
.step-location { font-size: 10.5px; color: var(--cat-ochre); font-weight: 600; }

/* ---------- Atlas bubble-matrix view ---------- */
.atlas-wrap { background: var(--cream-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px; box-shadow: var(--shadow-sm); margin-top: 4px; }
#atlas-svg { width: 100%; height: auto; display: block; }
.atlas-bubble { cursor: pointer; transition: opacity var(--fast) var(--ease); }
.atlas-bubble:hover circle, .atlas-bubble:focus-visible circle { opacity: 1 !important; }
.atlas-hint { font-size: 12px; color: var(--ink-soft); text-align: center; margin: 10px 0 0; }
.atlas-legend { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.atlas-legend-group { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.atlas-legend-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); width: 52px; flex-shrink: 0; }
.atlas-legend-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink); }
.atlas-swatch { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.atlas-swatch.domain-home { background: var(--timber); }
.atlas-swatch.domain-ember { background: var(--cat-terracotta); }
.atlas-swatch.domain-guild { background: var(--cat-blue); }
.atlas-swatch.domain-wbc { background: var(--cat-sage); }
.atlas-swatch.domain-private { background: var(--cat-plum); }
.atlas-dot-sample { display: inline-block; border-radius: 50%; background: var(--timber); opacity: 0.6; }
