:root {
  color-scheme: dark;
  --bg: #101113;
  --panel: #17181b;
  --panel-raised: #1c1d21;
  --panel-hover: #222328;
  --line: #292a30;
  --line-soft: #222328;
  --text: #f1f1f3;
  --muted: #898b96;
  --faint: #63656f;
  --accent: #aaa3ff;
  --accent-strong: #c0bbff;
  --accent-wash: #262438;
  --green: #82d2ad;
  --yellow: #e4c47b;
  --red: #ed8b92;
  --blue: #86b8f4;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
::selection { background: #5b5688; color: #fff; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; z-index: 20; inset: 0 auto 0 0; width: 232px; display: flex; flex-direction: column;
  padding: 23px 14px 14px; background: #131416; border-right: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px; margin: 0 0 30px; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #464451; border-radius: 10px; color: #d4d0ff; background: #24232d; font: 700 14px Manrope, sans-serif; letter-spacing: -.05em; }
.brand-name { max-width: 146px; overflow: hidden; font: 700 11.5px Manrope, sans-serif; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.brand-caption { color: var(--muted); font-size: 10px; margin-top: 3px; }
.nav-label { color: #5e6069; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 0 11px 9px; }
.nav-list { display: grid; gap: 3px; }
.nav-item { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 11px; border: 0; border-radius: 7px; color: #9b9da7; background: transparent; font-size: 12.5px; cursor: pointer; transition: background .16s ease, color .16s ease; }
.nav-item:hover { background: #1c1d20; color: #e2e2e6; }
.nav-item.active { color: #efeff3; background: #232429; box-shadow: inset 2px 0 0 var(--accent); }
.nav-item.active .icon { color: var(--accent); }
.nav-item .icon { color: #777985; }
.nav-count { margin-left: auto; color: #767884; font-size: 10px; }
.sidebar-spacer { flex: 1; }
.workspace-mini { display: flex; align-items: center; gap: 10px; margin: 0 2px 13px; padding: 11px 10px; border: 1px solid var(--line); border-radius: 9px; background: #17181a; }
.avatar { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; color: #d8d4ff; background: #373448; border-radius: 50%; font-size: 11px; font-weight: 700; }
.workspace-title { font-size: 11px; font-weight: 600; }
.workspace-sub { color: var(--muted); font-size: 10px; margin-top: 3px; }
.sidebar-footer { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 2px; }
.local-label { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 10px; }
.local-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px #82d2ad1c; }
.icon-button { display: inline-grid; place-items: center; width: 31px; height: 31px; border: 1px solid transparent; border-radius: 7px; color: #92949e; background: transparent; cursor: pointer; transition: .15s ease; }
.icon-button:hover { color: var(--text); border-color: var(--line); background: var(--panel-hover); }

.main-shell { min-height: 100vh; margin-left: 232px; }
.topbar { position: sticky; z-index: 15; top: 0; display: flex; align-items: center; gap: 18px; min-height: 66px; padding: 0 38px; background: #101113ed; border-bottom: 1px solid var(--line-soft); backdrop-filter: blur(16px); }
.breadcrumbs { display: flex; align-items: center; gap: 8px; min-width: 160px; color: #686a75; font-size: 11px; white-space: nowrap; }
.breadcrumbs strong { color: #d5d5da; font-weight: 500; }
.search-wrap { position: relative; width: min(470px, 100%); margin: 0 auto; }
.search-box { display: flex; align-items: center; gap: 9px; height: 35px; padding: 0 10px; border: 1px solid #2a2b31; border-radius: 7px; background: #17181b; color: #888a94; transition: border-color .16s, background .16s; }
.search-box:focus-within { border-color: #625d82; background: #1a1a1f; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.search-box input::placeholder { color: #747681; }
.search-hint { flex: 0 0 auto; padding: 2px 5px; border: 1px solid #373840; border-radius: 4px; color: #747681; font-size: 9px; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; min-width: 160px; gap: 7px; }
.today-label { padding-right: 7px; color: #81838d; font-size: 10px; white-space: nowrap; }
.cloud-sync-indicator { max-width: 128px; overflow: hidden; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px; color: var(--muted); background: transparent; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cloud-sync-indicator:hover:not(:disabled) { border-color: var(--line); background: var(--panel-hover); color: var(--text); }
.cloud-sync-indicator.synced { color: var(--green); }
.cloud-sync-indicator.syncing, .cloud-sync-indicator.loading, .cloud-sync-indicator.migrating { color: var(--blue); }
.cloud-sync-indicator.offline, .cloud-sync-indicator.error, .cloud-sync-indicator.migration { color: var(--yellow); }
.cloud-sync-indicator:disabled { cursor: default; }
.top-avatar { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: #e0ddff; background: #39364b; font-size: 10px; font-weight: 700; }
.content { width: min(1210px, 100%); padding: 34px 42px 88px; margin: 0 auto; }
.cloud-notice { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 16px; margin: 0 0 20px; border: 1px solid #484358; border-radius: 9px; background: #1b1a23; }
.cloud-notice strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 11px; }
.cloud-notice p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.cloud-notice-detail { display: block; margin-top: 5px; color: var(--accent-strong); font-size: 9px; }
.cloud-notice-error { margin-top: 5px !important; color: var(--red) !important; }
.cloud-notice-subtle { border-color: var(--line); background: var(--panel); }
.cloud-notice-actions { display: flex; flex: 0 0 auto; gap: 6px; align-items: center; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 0 0 24px; }
.eyebrow { margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font: 700 26px/1.2 Manrope, 'DM Sans', sans-serif; letter-spacing: -.045em; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.heading-actions { display: flex; gap: 8px; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; color: #dedee3; background: #191a1d; font-size: 11px; font-weight: 500; cursor: pointer; transition: .16s ease; white-space: nowrap; }
.button:hover { background: #24252a; border-color: #41424a; }
.button.primary { color: #171620; border-color: #c6c2ff; background: #bbb6ff; font-weight: 700; }
.button.primary:hover { background: #cfccff; }
.button.quiet { color: #a8a9b2; background: transparent; }
.button.danger { color: var(--red); }
.button.small { min-height: 28px; padding: 0 9px; font-size: 10px; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.icon { width: 15px; height: 15px; display: inline-block; flex: 0 0 auto; vertical-align: middle; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-title h2 { margin: 0; color: #e3e3e7; font: 600 13px Manrope, sans-serif; letter-spacing: -.015em; }
.section-title .muted { color: var(--muted); font-size: 10px; }
.cloud-project-heading { margin-top: 24px; }
.cloud-project-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.project-notes { margin: 0 0 14px; }
.project-notes p { margin: 7px 0 0; color: var(--text); font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.section { margin-top: 27px; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.card-pad { padding: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.card-header h3 { margin: 0; font-size: 11px; font-weight: 600; color: #dedee3; }
.card-header .minor { color: var(--muted); font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 13px; }
.grid-span-8 { grid-column: span 8; }
.grid-span-7 { grid-column: span 7; }
.grid-span-6 { grid-column: span 6; }
.grid-span-5 { grid-column: span 5; }
.grid-span-4 { grid-column: span 4; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat-card { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: #151619; }
.stat-icon { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #34343b; border-radius: 7px; color: var(--accent); background: #21212b; }
.stat-value { font: 700 17px Manrope, sans-serif; letter-spacing: -.04em; }
.stat-label { margin-top: 2px; color: var(--muted); font-size: 9px; }
.suggestion-card { position: relative; overflow: hidden; padding: 17px; border: 1px solid #363448; border-radius: 10px; background: #1b1a23; }
.suggestion-kicker { display: flex; align-items: center; gap: 7px; color: #bbb6f2; font-size: 10px; font-weight: 600; }
.spark { color: #cbc7ff; }
.suggestion-title { margin: 14px 0 7px; font: 600 14px/1.45 Manrope, sans-serif; color: #efedf9; }
.suggestion-copy { margin: 0; max-width: 520px; color: #aaa8b7; font-size: 11px; line-height: 1.7; }
.suggestion-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 17px; }
.suggestion-footnote { color: #777585; font-size: 9px; }
.project-list { display: grid; gap: 0; }
.project-row { display: flex; align-items: center; gap: 11px; padding: 11px 1px; border-top: 1px solid var(--line-soft); cursor: pointer; }
.project-row:first-child { padding-top: 2px; border-top: 0; }
.project-glyph { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #33343b; border-radius: 8px; color: #c9c4ff; background: #22212c; font: 700 11px Manrope, sans-serif; }
.project-row:hover .project-name { color: var(--accent-strong); }
.project-main { min-width: 0; flex: 1; }
.project-name { overflow: hidden; color: #e2e2e6; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.project-meta { overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.project-trailing { display: flex; align-items: center; gap: 8px; }
.status-pill, .tag, .priority, .type-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 21px; padding: 2px 7px; border: 1px solid #383941; border-radius: 999px; color: #aeb0b9; background: #202126; font-size: 9px; white-space: nowrap; }
.status-pill.active { color: var(--green); border-color: #385348; background: #1d2a25; }
.status-pill.planned { color: var(--yellow); border-color: #4a4230; background: #29251d; }
.status-pill.paused { color: #b5a4ec; border-color: #413954; background: #282333; }
.task-list { display: grid; }
.task-row { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.task-row:first-child { border-top: 0; padding-top: 1px; }
.check-button { width: 17px; height: 17px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #565861; border-radius: 5px; color: #191a1d; background: transparent; cursor: pointer; }
.check-button:hover { border-color: var(--accent); }
.check-button.checked { border-color: var(--green); color: #17211c; background: var(--green); }
.task-text { min-width: 0; flex: 1; color: #d9d9de; font-size: 10.5px; line-height: 1.4; }
.task-row.is-done .task-text { color: #777984; text-decoration: line-through; }
.task-description { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.5; white-space: normal; }
.task-source { margin-left: 5px; vertical-align: middle; }
.task-sub { margin-top: 4px; color: #777984; font-size: 9px; }
.priority { min-height: 18px; padding: 1px 6px; font-size: 8px; }
.priority.high { color: var(--red); border-color: #493437; background: #2b2022; }
.priority.medium { color: var(--yellow); border-color: #494131; background: #28241c; }
.priority.low { color: #9a9ca7; border-color: #383941; background: #202126; }
.knowledge-row, .decision-row, .activity-row { display: flex; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.knowledge-row:first-child, .decision-row:first-child, .activity-row:first-child { border-top: 0; padding-top: 1px; }
.record-icon { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; color: var(--blue); background: #1e2732; }
.record-icon.decision { color: var(--yellow); background: #2a261d; }
.record-icon.activity { color: var(--accent); background: #24222d; }
.record-copy { flex: 1; min-width: 0; }
.record-title { color: #dedee3; font-size: 10.5px; font-weight: 600; line-height: 1.45; }
.record-meta { margin-top: 4px; color: #81838d; font-size: 9px; line-height: 1.5; }
.record-actions { display: flex; align-items: flex-start; gap: 3px; opacity: .45; transition: opacity .15s; }
.knowledge-row:hover .record-actions, .decision-row:hover .record-actions { opacity: 1; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.tag { min-height: 18px; padding: 1px 6px; color: #a5a6af; border-color: #303137; background: #1d1e22; font-size: 8px; }
.decision-copy { display: flex; flex-direction: column; gap: 5px; }
.decision-answer { color: #a8a5ca; font-size: 9px; }
.activity-dot { width: 7px; height: 7px; margin: 5px 4px 0 2px; flex: 0 0 auto; border: 1px solid #857fca; border-radius: 50%; background: #45415f; }
.activity-row { position: relative; }
.activity-time { margin-left: auto; flex: 0 0 auto; color: #71737d; font-size: 9px; white-space: nowrap; }
.today-continue-card { overflow: hidden; padding: 20px; border: 1px solid #38354f; border-radius: 12px; background: linear-gradient(112deg, #201f2b 0%, #191a20 72%); }
.today-continue-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.today-continue-copy { min-width: 0; flex: 1; }
.today-continue-copy h2 { margin: 15px 0 5px; color: #f0eef9; font: 700 21px/1.2 Manrope, sans-serif; letter-spacing: -.04em; }
.today-last-work { margin: 0; color: #a7a5b3; font-size: 11px; line-height: 1.6; }
.today-status { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.today-status span { padding: 5px 8px; border: 1px solid #393942; border-radius: 999px; color: #b2b3bd; background: #202126; font-size: 9px; }
.today-next { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 12px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #34343d; }
.today-next span { color: #a9a5d5; font-size: 9px; font-weight: 600; }
.today-next strong { color: #e4e2ef; font-size: 11px; font-weight: 600; line-height: 1.55; }
.today-continue-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }
.suggestion-detail { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: start; gap: 8px; margin-top: 11px; padding-top: 10px; border-top: 1px solid #34343d; }
.suggestion-detail > span { color: #a9a5d5; font-size: 9px; font-weight: 600; }
.suggestion-detail > strong, .suggestion-detail > p { margin: 0; color: #e4e2ef; font-size: 11px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.suggestion-detail > p { color: #b9b8c4; font-weight: 400; }
.suggestion-error { margin: 10px 0 0; color: #e0a68b; font-size: 10px; line-height: 1.5; }
.runner-status { margin: 12px 0 0; padding: 9px 11px; border: 1px solid #393942; border-radius: 8px; color: #c8c4e6; background: #202126; font-size: 10px; line-height: 1.5; }
.runner-success { border-color: #31513f; color: #a7d3b5; }
.dashboard-health { padding: 16px; }
.dashboard-health .card-header { margin-bottom: 13px; }
.dashboard-health .card-header h2, .card-header h2 { margin: 0; color: #dedee3; font-size: 12px; font-weight: 600; }
.dashboard-health .card-header p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.companion-status { margin: 0 0 13px; padding: 9px 11px; border: 1px solid var(--line-soft); border-radius: 7px; color: var(--muted); background: var(--panel-raised); font-size: 9px; line-height: 1.5; }
.companion-status.online { border-color: #347b5d66; color: #8bd4ad; background: #347b5d12; }
.companion-status.checking { border-color: #857fca55; color: #b6b1e7; background: #857fca12; }
.companion-status.offline { border-color: #be8e4e66; color: #e4bd80; background: #be8e4e12; }
.dashboard-health-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 7px; }
.health-metric { min-width: 0; padding: 10px 9px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--panel-raised); }
.health-metric strong { display: block; color: #dcdbe5; font: 700 17px Manrope, sans-serif; letter-spacing: -.04em; }
.health-metric span { display: block; min-height: 26px; margin-top: 4px; color: #a9aab4; font-size: 9px; line-height: 1.4; }
.health-metric small { display: block; color: #777984; font-size: 8px; line-height: 1.4; }
.health-metric.needs-attention strong { color: var(--yellow); }
.dashboard-data-note { margin-top: 11px; color: #777984; font-size: 8px; line-height: 1.5; }
.dashboard-alert-list, .dashboard-change-list { display: grid; }
.dashboard-alert, .dashboard-change { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.dashboard-alert:first-child, .dashboard-change:first-child { border-top: 0; padding-top: 1px; }
.alert-mark, .change-mark { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px #e4c47b16; }
.change-mark.commit, .change-mark.new { background: var(--blue); box-shadow: 0 0 0 3px #86b8f416; }
.change-mark.sync { background: var(--green); box-shadow: 0 0 0 3px #82d2ad16; }
.dashboard-alert-copy { display: grid; gap: 3px; min-width: 0; flex: 1; }
.dashboard-alert-copy strong { overflow: hidden; color: #dedee3; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-alert-copy span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.dashboard-alert .button, .dashboard-change .button { flex: 0 0 auto; }
.dashboard-recent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-recent-project { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px 4px; border: 0; border-top: 1px solid var(--line-soft); color: inherit; background: transparent; text-align: left; cursor: pointer; }
.dashboard-recent-project:nth-child(-n+2) { border-top: 0; }
.dashboard-recent-project:hover .dashboard-recent-copy strong { color: var(--accent-strong); }
.dashboard-recent-copy { display: grid; gap: 4px; min-width: 0; flex: 1; }
.dashboard-recent-copy strong { overflow: hidden; color: #dedee3; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-recent-copy span { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-recent-time { flex: 0 0 auto; color: #81838d; font-size: 8px; white-space: nowrap; }
.dashboard-recent-project > .icon { color: #777984; width: 13px; height: 13px; }
.empty-state { padding: 28px 16px; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.6; }
.empty-state strong { display: block; margin-bottom: 5px; color: #d1d1d7; font-size: 12px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; }
.filter-list { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-button { min-height: 28px; padding: 0 10px; border: 1px solid transparent; border-radius: 6px; color: #92949e; background: transparent; font-size: 10px; cursor: pointer; }
.filter-button:hover { color: #d3d4da; background: #1a1b1f; }
.filter-button.active { color: #e3e1fa; border-color: #3f3c55; background: #24222f; }
.project-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.project-card { padding: 16px; cursor: pointer; transition: border-color .16s, transform .16s; }
.project-card:hover { border-color: #464450; transform: translateY(-1px); }
.project-card-top { display: flex; align-items: flex-start; gap: 11px; }
.project-card .project-glyph { width: 37px; height: 37px; font-size: 12px; }
.project-card .project-main { padding-top: 2px; }
.project-card h3 { margin: 0; font: 600 13px Manrope, sans-serif; letter-spacing: -.02em; }
.project-card p { min-height: 34px; margin: 13px 0 15px; color: #a0a1aa; font-size: 10px; line-height: 1.65; }
.project-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 11px; border-top: 1px solid var(--line-soft); color: #777984; font-size: 9px; }
.project-card-github { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 9px; }
.github-overview-status, .github-status { color: var(--muted); font-size: 9px; white-space: nowrap; }
.github-info-card { padding: 16px; margin-bottom: 14px; }
.github-info-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.github-info-head h3 { margin: 0; font-size: 12px; }
.github-info-head p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.github-data-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.github-data-cell { min-width: 0; padding: 10px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--panel-raised); }
.github-data-value { margin-top: 6px; color: var(--text); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.github-data-link { color: var(--accent-strong); overflow-wrap: anywhere; }
.github-data-link:hover { text-decoration: underline; }
.detail-topline { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; color: #888a94; font-size: 10px; }
.detail-hero { padding: 19px; margin-bottom: 14px; }
.detail-hero-head { display: flex; justify-content: space-between; gap: 15px; }
.detail-hero-copy { min-width: 0; }
.detail-hero h2 { margin: 0; font: 700 21px Manrope, sans-serif; letter-spacing: -.04em; }
.detail-hero p { margin: 8px 0 0; color: #a2a3ad; font-size: 11px; line-height: 1.65; }
.detail-links { display: flex; flex-wrap: wrap; gap: 9px 15px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.detail-link { display: flex; align-items: center; gap: 6px; min-width: 0; color: #9d9eaa; font-size: 9px; overflow-wrap: anywhere; }
.detail-link:hover { color: var(--accent-strong); }
.detail-link .icon { width: 13px; height: 13px; }
.detail-meta-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.meta-card { padding: 12px 14px; }
.meta-label { color: #777984; font-size: 9px; }
.meta-value { margin-top: 7px; color: #e1e1e6; font-size: 11px; line-height: 1.55; }
.subgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.knowledge-card { padding: 14px; }
.knowledge-card h3 { margin: 9px 0 5px; color: #e1e1e6; font-size: 11px; }
.knowledge-card p { display: -webkit-box; overflow: hidden; margin: 0; color: #92949e; font-size: 10px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.task-panel { padding: 15px; }
.task-detail-row { display: flex; align-items: center; gap: 10px; min-height: 39px; border-top: 1px solid var(--line-soft); }
.task-detail-row:first-child { border-top: 0; }
.task-detail-row .task-text { font-size: 10px; }
.detail-all-link { color: var(--accent); font-size: 9px; cursor: pointer; }
.decision-card { padding: 16px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s; }
.decision-card:hover { border-color: #484451; }
.decision-card-top { display: flex; justify-content: space-between; gap: 12px; }
.decision-card h3 { margin: 0; font-size: 12px; line-height: 1.5; }
.decision-card p { margin: 9px 0 0; color: #9fa0aa; font-size: 10px; line-height: 1.6; }
.decision-result { display: inline-flex; align-items: center; gap: 6px; margin-top: 13px; color: #d1cafa; font-size: 10px; }
.decision-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.decision-detail-cell { padding: 10px; border: 1px solid var(--line-soft); border-radius: 7px; background: #141518; }
.decision-detail-cell .meta-value { color: #b4b5be; font-size: 10px; }
.content-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.knowledge-external { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); overflow-wrap: anywhere; }
.knowledge-external:hover { color: var(--accent-strong); }

.search-results { position: absolute; z-index: 40; top: calc(100% + 7px); left: 0; right: 0; overflow: hidden; border: 1px solid #383941; border-radius: 9px; background: #1b1c20; box-shadow: 0 18px 50px #0008; }
.search-results-head { padding: 10px 12px 7px; color: #81838d; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.search-result { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px; border: 0; color: #d8d8dd; background: transparent; text-align: left; cursor: pointer; }
.search-result:hover, .search-result.selected { background: #292a30; }
.search-result .record-icon { width: 25px; height: 25px; }
.search-result-copy { min-width: 0; flex: 1; }
.search-result-title { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.search-result-sub { overflow: hidden; margin-top: 3px; color: #888a94; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.search-result-type { color: #8c8e98; font-size: 8px; }
.search-no-results { padding: 14px; color: var(--muted); font-size: 10px; text-align: center; }
.search-footer { display: flex; justify-content: space-between; padding: 8px 11px; border-top: 1px solid var(--line); color: #767883; font-size: 8px; }

.assistant-launcher { position: fixed; z-index: 30; right: 25px; bottom: 24px; display: flex; align-items: center; gap: 9px; height: 43px; padding: 0 15px 0 10px; border: 1px solid #77719d; border-radius: 999px; color: #f0efff; background: #252333; box-shadow: 0 8px 30px #0006; cursor: pointer; transition: transform .18s, background .18s; }
.assistant-launcher:hover { background: #302d43; transform: translateY(-2px); }
.assistant-orb { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid #746f9b; border-radius: 50%; color: #d7d3ff; background: #343149; }
.assistant-launcher span:last-child { font-size: 10px; font-weight: 600; }
.assistant-panel { position: fixed; z-index: 31; right: 22px; bottom: 79px; display: flex; flex-direction: column; width: 375px; max-height: min(610px, calc(100vh - 110px)); overflow: hidden; border: 1px solid #3c3b49; border-radius: 13px; background: #191a1e; box-shadow: 0 22px 80px #0009; animation: panel-in .18s ease-out; }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.assistant-head { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.assistant-head-copy { flex: 1; min-width: 0; }
.assistant-head-title { font-size: 11px; font-weight: 700; }
.ai-mode-hint { margin-top: 4px; color: #a6a4b3; font-size: 9px; }
.ai-mode.real { color: #a6dfc3; border-color: #315c49; background: #1d3329; }
.ai-mode.mock { color: #d3d0f5; border-color: #45415d; background: #282637; }
.assistant-context { overflow: hidden; margin-top: 4px; color: #898a96; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.assistant-messages { display: flex; flex: 1; flex-direction: column; gap: 11px; overflow-y: auto; min-height: 160px; padding: 15px; }
.chat-message { max-width: 91%; padding: 10px 11px; border: 1px solid #2a2b31; border-radius: 10px 10px 10px 3px; color: #c9cad2; background: #202126; font-size: 10px; line-height: 1.65; white-space: pre-wrap; }
.chat-message.user { align-self: flex-end; border-color: #44415b; border-radius: 10px 10px 3px 10px; color: #e0defa; background: #292736; }
.chat-message.pending { opacity: .72; }
.chat-message.error { border-color: #714b4b; color: #f0c7c7; }
.chat-retry { display: inline-block; margin-left: 9px; padding: 2px 8px; border: 1px solid #8b6666; border-radius: 999px; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.chat-retry:hover { background: rgb(255 255 255 / 8%); }
.assistant-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 11px; }
.suggestion-chip { min-height: 27px; padding: 0 9px; border: 1px solid #373741; border-radius: 999px; color: #aaaab4; background: #202126; font-size: 9px; cursor: pointer; }
.suggestion-chip:hover { color: #dad8f9; border-color: #5a5676; }
.suggestion-chip:disabled, .send-button:disabled { opacity: .55; cursor: wait; }
.assistant-compose { display: flex; align-items: flex-end; gap: 8px; padding: 11px; border-top: 1px solid var(--line); }
.assistant-compose textarea { flex: 1; max-height: 90px; min-height: 38px; resize: none; padding: 10px; border: 1px solid #36373e; border-radius: 8px; outline: none; color: var(--text); background: #121315; font-size: 10px; line-height: 1.4; }
.assistant-compose textarea::placeholder { color: #747681; }
.assistant-compose textarea:focus { border-color: #635e83; }
.send-button { width: 36px; height: 36px; flex: 0 0 auto; border: 1px solid #c3bfff; border-radius: 8px; color: #1a1922; background: #b7b2f5; cursor: pointer; }
.assistant-note { padding: 0 12px 9px; color: #6f7079; font-size: 8px; text-align: center; }

.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 18px; background: #08090bd9; backdrop-filter: blur(6px); animation: fade-in .15s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(540px, 100%); max-height: min(88vh, 820px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #383941; border-radius: 12px; background: #191a1e; box-shadow: 0 24px 80px #0009; }
.modal.wide { width: min(650px, 100%); }
.modal:has(.codex-task-body) { width: min(700px, 100%); }
.confirm-modal { width: min(440px, 100%); }
.confirm-message { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.modal-head { display: flex; align-items: flex-start; gap: 15px; padding: 17px 18px 14px; border-bottom: 1px solid var(--line); }
.modal-head-copy { flex: 1; }
.modal-head h2 { margin: 0; font: 600 15px Manrope, sans-serif; }
.modal-head p { margin: 5px 0 0; color: #888a94; font-size: 10px; }
.modal-body { overflow-y: auto; padding: 17px 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.codex-task-body { display: grid; gap: 12px; }
.codex-plan { display: grid; gap: 8px; }
.codex-plan > div { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.codex-plan > div > span { color: var(--muted); font-size: 10px; }
.codex-plan strong, .codex-plan code { color: var(--text); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.codex-plan code { grid-column: 2; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.codex-task-details summary { color: var(--accent-strong); font-size: 10px; cursor: pointer; }
.codex-task-body textarea { width: 100%; min-height: 180px; margin-top: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--panel-raised); font: 10px/1.55 ui-monospace, Consolas, monospace; resize: vertical; }
.codex-diff { max-height: min(44vh, 360px); overflow: auto; margin: 0; padding: 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--panel-raised); font: 9px/1.55 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 12px; }
.field { min-width: 0; display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #a8a9b2; font-size: 10px; font-weight: 500; }
.field label .optional { color: #696b75; font-weight: 400; }
.field input, .field textarea, .field select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #35363d; border-radius: 7px; outline: 0; color: #e6e6eb; background: #121315; font-size: 10px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #645f85; }
.field textarea { min-height: 76px; resize: vertical; line-height: 1.55; }
.field textarea.short { min-height: 54px; }
.field input::placeholder, .field textarea::placeholder { color: #666872; }
.field select { cursor: pointer; }
.recommendation-box { padding: 11px 12px; border: 1px solid #3b394e; border-radius: 8px; color: #b9b6ce; background: #201f29; font-size: 10px; line-height: 1.65; }
.recommendation-label { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; color: #d3d0ee; font-size: 9px; font-weight: 700; }
.toast-region { position: fixed; z-index: 70; top: 78px; right: 22px; display: grid; gap: 7px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; max-width: min(360px, calc(100vw - 40px)); padding: 10px 13px; border: 1px solid #3b4b42; border-radius: 8px; color: #d9e8df; background: #1b2821; box-shadow: 0 10px 35px #0005; font-size: 10px; animation: toast-in .2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 1050px) {
  .content { padding-right: 27px; padding-left: 27px; }
  .topbar { padding-right: 25px; padding-left: 25px; }
  .grid-span-8, .grid-span-7 { grid-column: span 12; }
  .grid-span-5, .grid-span-4 { grid-column: span 6; }
}
@media (max-width: 760px) {
  .sidebar { position: sticky; inset: auto; width: 100%; height: auto; display: block; padding: 10px 12px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { display: none; }
  .nav-label, .sidebar-spacer, .workspace-mini, .sidebar-footer { display: none; }
  .nav-list { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 8px; scrollbar-width: none; }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-item { justify-content: center; gap: 7px; min-width: max-content; padding: 9px 11px; font-size: 10px; }
  .nav-item.active { box-shadow: inset 0 -2px 0 var(--accent); }
  .nav-count { display: none; }
  .main-shell { margin-left: 0; }
  .topbar { position: sticky; top: 0; min-height: 57px; gap: 9px; padding: 0 13px; }
  .breadcrumbs { min-width: 0; max-width: 112px; gap: 5px; font-size: 9px; }
  .search-wrap { width: auto; flex: 1; }
  .search-box { height: 33px; gap: 6px; padding: 0 8px; }
  .search-box input { font-size: 10px; }
  .search-hint, .today-label { display: none; }
  .topbar-actions { min-width: 30px; }
  .cloud-sync-indicator { max-width: 100px; font-size: 8px; }
  .cloud-notice { align-items: stretch; flex-direction: column; gap: 11px; padding: 12px; }
  .cloud-notice-actions { justify-content: flex-end; }
  .topbar-actions .icon-button:not(.theme-toggle) { display: none; }
  .content { padding: 25px 16px 98px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 19px; }
  .page-heading .heading-actions { width: 100%; }
  .page-heading .heading-actions .button { flex: 1; }
  h1 { font-size: 23px; }
  .stat-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 13px; }
  .stat-card { padding: 10px; gap: 9px; }
  .stat-icon { width: 26px; height: 26px; }
  .stat-value { font-size: 15px; }
  .dashboard-grid { gap: 10px; }
  .grid-span-8, .grid-span-7, .grid-span-6, .grid-span-5, .grid-span-4 { grid-column: span 12; }
  .section { margin-top: 21px; }
  .project-cards { grid-template-columns: minmax(0,1fr); }
  .project-card p { min-height: auto; }
  .detail-meta-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .github-data-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .github-overview-status { display: none; }
  .subgrid { grid-template-columns: minmax(0,1fr); }
  .detail-hero-head { align-items: flex-start; }
  .detail-hero h2 { font-size: 18px; }
  .detail-hero .button { min-height: 30px; padding: 0 9px; font-size: 9px; }
  .assistant-launcher { right: 15px; bottom: 15px; height: 41px; }
  .assistant-panel { inset: auto 0 0; width: 100%; max-height: 83dvh; border-radius: 14px 14px 0 0; }
  .toast-region { top: 66px; right: 12px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 91dvh; border-radius: 13px 13px 0 0; }
  .modal-body { padding: 15px; }
  .modal-head { padding: 15px; }
  .modal-foot { padding: 11px 15px max(11px, env(safe-area-inset-bottom)); }
}
@media (max-width: 430px) {
  .breadcrumbs { max-width: 84px; }
  .breadcrumbs span:first-child, .breadcrumbs .crumb-sep { display: none; }
  .content { padding-right: 12px; padding-left: 12px; }
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .field.full { grid-column: auto; }
  .detail-meta-grid { grid-template-columns: minmax(0,1fr); }
  .github-info-head { flex-direction: column; }
  .github-status { white-space: normal; }
  .decision-detail-grid { grid-template-columns: minmax(0,1fr); }
  .activity-time { display: none; }
  .toolbar { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.login-screen { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 390px); padding: 34px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 24px 80px rgb(0 0 0 / 16%); }
.login-mark { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 20px; border: 1px solid #464451; border-radius: 11px; color: #d4d0ff; background: #24232d; font: 700 16px Manrope, sans-serif; }
.login-card h1 { font-size: 23px; }
.login-subtitle { margin: 8px 0 25px; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 9px; }
.login-form label { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.login-form input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--panel-raised); font-size: 14px; }
.login-form input:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.login-submit { min-height: 42px; margin-top: 9px; border: 1px solid #c6c2ff; border-radius: 8px; color: #171620; background: #bbb6ff; font-size: 13px; font-weight: 700; cursor: pointer; }
.login-submit:hover { background: #cfccff; }
.login-submit:disabled { opacity: .65; cursor: wait; }
.login-status { min-height: 18px; margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.login-status:empty { display: none; }
.login-status.error { color: var(--red); }
[data-theme="light"] .login-card { box-shadow: 0 24px 80px rgb(28 35 48 / 10%); }

@media (max-width: 430px) {
  .login-screen { padding: 16px; }
  .login-card { padding: 26px 22px; }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-raised: #fafbfc;
  --panel-hover: #f0f2f6;
  --line: #dfe3e9;
  --line-soft: #eaedf1;
  --text: #20232b;
  --muted: #68707d;
  --faint: #818895;
  --accent: #675dc0;
  --accent-strong: #5147a1;
  --accent-wash: #f0eefb;
  --green: #32795d;
  --yellow: #8b641b;
  --red: #ad4d58;
  --blue: #3b6f9b;
}

:root[data-theme="light"] ::selection { background: #dedaf4; color: #282447; }
[data-theme="light"] .sidebar { background: #eff1f5; }
[data-theme="light"] .brand-mark { border-color: #d9d7e8; color: #514b87; background: #e8e6f4; }
[data-theme="light"] .nav-label { color: #818794; }
[data-theme="light"] .nav-item { color: #5e6571; }
[data-theme="light"] .nav-item:hover { color: #282d37; background: #e7eaf0; }
[data-theme="light"] .nav-item.active { color: #292744; background: #e5e3f2; }
[data-theme="light"] .nav-item .icon, [data-theme="light"] .nav-count { color: #737b88; }
[data-theme="light"] .workspace-mini { background: #f7f8fa; }
[data-theme="light"] .avatar, [data-theme="light"] .top-avatar { color: #514b87; background: #e7e5f3; }
[data-theme="light"] .icon-button { color: #707785; }
[data-theme="light"] .topbar { background: rgb(250 251 253 / 91%); }
[data-theme="light"] .breadcrumbs { color: #747b87; }
[data-theme="light"] .breadcrumbs strong { color: #303540; }
[data-theme="light"] .search-box { border-color: #dce1e8; color: #69717e; background: #ffffff; }
[data-theme="light"] .search-box:focus-within { border-color: #a59ed9; background: #ffffff; }
[data-theme="light"] .search-box input::placeholder, [data-theme="light"] .search-hint { color: #858c98; }
[data-theme="light"] .search-hint { border-color: #dce1e8; }
[data-theme="light"] .today-label { color: #6f7784; }
[data-theme="light"] .cloud-notice { border-color: #d9d6eb; background: #f7f6fc; }
[data-theme="light"] .theme-toggle { color: #5f55af; }
[data-theme="light"] .button { color: #3f4652; background: #ffffff; }
[data-theme="light"] .button:hover { border-color: #cbd1da; background: #f0f2f6; }
[data-theme="light"] .button.primary { color: #ffffff; border-color: #6258b6; background: #6d63c2; }
[data-theme="light"] .button.primary:hover { background: #5e54b4; }
[data-theme="light"] .button.quiet { color: #626a77; background: transparent; }
[data-theme="light"] .button.quiet:hover { color: #343a46; background: #eceef3; }
[data-theme="light"] .button.danger { color: #a3424d; }
[data-theme="light"] .section-title h2, [data-theme="light"] .card-header h3 { color: #303540; }
[data-theme="light"] .stat-card { background: #ffffff; }
[data-theme="light"] .stat-icon { border-color: #e0e1ed; background: #f0eff8; }
[data-theme="light"] .suggestion-card { border-color: #e1def0; background: #f1eff9; }
[data-theme="light"] .suggestion-kicker { color: #5d54aa; }
[data-theme="light"] .spark { color: #5d54aa; }
[data-theme="light"] .suggestion-title { color: #302d44; }
[data-theme="light"] .suggestion-copy { color: #5f5d6c; }
[data-theme="light"] .suggestion-footnote { color: #747183; }
[data-theme="light"] .project-glyph { border-color: #e0deef; color: #5c55a5; background: #f0eff8; }
[data-theme="light"] .project-name, [data-theme="light"] .record-title, [data-theme="light"] .task-text { color: #303540; }
[data-theme="light"] .status-pill, [data-theme="light"] .tag, [data-theme="light"] .priority, [data-theme="light"] .type-pill { border-color: #dfe3e9; color: #636b78; background: #f4f6f8; }
[data-theme="light"] .status-pill.active { color: #2f7457; border-color: #cfe2d7; background: #edf6f0; }
[data-theme="light"] .status-pill.planned { color: #805d1d; border-color: #eadfca; background: #faf5e9; }
[data-theme="light"] .status-pill.paused { color: #62568f; border-color: #ded9ee; background: #f2f0f8; }
[data-theme="light"] .check-button { color: #353b46; border-color: #c7cdd6; background: #ffffff; }
[data-theme="light"] .check-button.checked { color: #ffffff; border-color: #388565; background: #388565; }
[data-theme="light"] .task-row.is-done .task-text, [data-theme="light"] .task-sub, [data-theme="light"] .meta-label { color: #77808d; }
[data-theme="light"] .priority.high { color: #a34852; border-color: #edd4d7; background: #fcf0f1; }
[data-theme="light"] .priority.medium { color: #805d1d; border-color: #eadfca; background: #faf5e9; }
[data-theme="light"] .priority.low { color: #6d7582; border-color: #e0e4ea; background: #f4f6f8; }
[data-theme="light"] .record-icon { background: #edf3f8; }
[data-theme="light"] .record-icon.decision { background: #f8f3e8; }
[data-theme="light"] .record-icon.activity { background: #efedf8; }
[data-theme="light"] .record-meta, [data-theme="light"] .project-card-bottom, [data-theme="light"] .activity-time { color: #727a87; }
[data-theme="light"] .tag { color: #626a77; border-color: #e2e5eb; background: #f3f5f8; }
[data-theme="light"] .decision-answer, [data-theme="light"] .decision-result { color: #615694; }
[data-theme="light"] .activity-dot { border-color: #7770bd; background: #d7d3f0; }
[data-theme="light"] .empty-state strong { color: #353b46; }
[data-theme="light"] .filter-button { color: #656d7a; }
[data-theme="light"] .filter-button:hover { color: #343a46; background: #eceef3; }
[data-theme="light"] .filter-button.active { color: #51489d; border-color: #ddd9ef; background: #f0eef9; }
[data-theme="light"] .project-card:hover, [data-theme="light"] .decision-card:hover { border-color: #c9c5df; }
[data-theme="light"] .project-card p, [data-theme="light"] .detail-hero p, [data-theme="light"] .knowledge-card p, [data-theme="light"] .decision-card p { color: #626b78; }
[data-theme="light"] .project-card-bottom { color: #737b87; }
[data-theme="light"] .detail-topline, [data-theme="light"] .detail-link { color: #66707d; }
[data-theme="light"] .detail-link:hover, [data-theme="light"] .knowledge-external:hover { color: #5147a1; }
[data-theme="light"] .meta-value, [data-theme="light"] .knowledge-card h3 { color: #303540; }
[data-theme="light"] .decision-detail-cell { background: #f7f8fa; }
[data-theme="light"] .decision-detail-cell .meta-value { color: #58616e; }
[data-theme="light"] .knowledge-details { margin-top: 8px; }
[data-theme="light"] .knowledge-details summary { color: #596372; font-size: 9px; cursor: pointer; }
[data-theme="light"] .knowledge-details .content-text { margin-top: 7px; }
[data-theme="light"] .search-results { border-color: #dce1e8; background: #ffffff; box-shadow: 0 18px 50px rgb(25 32 44 / 14%); }
[data-theme="light"] .search-results-head, [data-theme="light"] .search-result-type { color: #747c89; }
[data-theme="light"] .search-result { color: #353b46; }
[data-theme="light"] .search-result:hover, [data-theme="light"] .search-result.selected { background: #f1f0f8; }
[data-theme="light"] .search-result-sub, [data-theme="light"] .search-footer { color: #737b87; }
[data-theme="light"] .assistant-launcher { color: #ffffff; border-color: #5b539d; background: #5e568f; box-shadow: 0 8px 28px rgb(29 30 46 / 18%); }
[data-theme="light"] .assistant-launcher:hover { background: #51497f; }
[data-theme="light"] .assistant-orb { color: #5b539d; border-color: #d8d4ef; background: #f0eef9; }
[data-theme="light"] .assistant-panel { border-color: #dce1e8; background: #ffffff; box-shadow: 0 22px 70px rgb(24 30 42 / 18%); }
[data-theme="light"] .assistant-context { color: #727b88; }
[data-theme="light"] .ai-mode-hint { color: #727b88; }
[data-theme="light"] .ai-mode.mock { color: #51498e; border-color: #ded9f0; background: #f0eef9; }
[data-theme="light"] .ai-mode.real { color: #286346; border-color: #c9e1d2; background: #edf7f0; }
[data-theme="light"] .chat-message { color: #424a56; border-color: #e1e5eb; background: #f4f6f8; }
[data-theme="light"] .chat-message.pending { color: #727b88; }
[data-theme="light"] .chat-message.user { color: #433c72; border-color: #ded9f0; background: #f0eef9; }
[data-theme="light"] .chat-message.error { color: #8c3434; border-color: #e8bebe; background: #fff5f5; }
[data-theme="light"] .chat-retry { border-color: #d59b9b; }
[data-theme="light"] .suggestion-chip { color: #5e6673; border-color: #dfe3e9; background: #f7f8fa; }
[data-theme="light"] .suggestion-chip:hover { color: #4f4696; border-color: #c9c4e6; }
[data-theme="light"] .assistant-compose textarea { color: #303540; border-color: #d8dde5; background: #fbfcfd; }
[data-theme="light"] .assistant-compose textarea::placeholder, [data-theme="light"] .assistant-note { color: #78818d; }
[data-theme="light"] .assistant-compose textarea:focus { border-color: #928acb; }
[data-theme="light"] .send-button { color: #ffffff; border-color: #6258b6; background: #6d63c2; }
[data-theme="light"] .modal-backdrop { background: rgb(34 38 48 / 42%); }
[data-theme="light"] .modal { border-color: #dce1e8; background: #ffffff; box-shadow: 0 24px 80px rgb(24 30 42 / 20%); }
[data-theme="light"] .modal-head p { color: #6e7784; }
[data-theme="light"] .field label { color: #505967; }
[data-theme="light"] .field label .optional { color: #7e8793; }
[data-theme="light"] .field input, [data-theme="light"] .field textarea, [data-theme="light"] .field select { color: #303540; border-color: #d8dde5; background: #fbfcfd; }
[data-theme="light"] .field input:focus, [data-theme="light"] .field textarea:focus, [data-theme="light"] .field select:focus { border-color: #928acb; }
[data-theme="light"] .field input::placeholder, [data-theme="light"] .field textarea::placeholder { color: #818a96; }
[data-theme="light"] .recommendation-box { color: #514b70; border-color: #e0dced; background: #f6f4fb; }
[data-theme="light"] .recommendation-label { color: #51498e; }
[data-theme="light"] .toast { color: #315e47; border-color: #cfe2d6; background: #eff7f1; box-shadow: 0 10px 35px rgb(28 47 36 / 12%); }

@media (max-width: 760px) {
  [data-theme="light"] .sidebar { background: #eff1f5; }
}
.grid-span-12 { grid-column: span 12; }
.local-project-section { margin: 0 0 25px; }
.local-project-section > .section-title { align-items: flex-end; margin-bottom: 12px; }
.local-project-section .section-title h2 { margin: 0; }
.local-section-note { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.local-project-list { display: grid; gap: 8px; }
.local-project-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.local-project-main { min-width: 0; flex: 1 1 38%; }
.local-project-main h3 { margin: 0 0 4px; color: var(--text); font-size: 11px; }
.local-project-main code { display: block; color: #858792; font-size: 9px; overflow-wrap: anywhere; }
.local-project-link { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.local-project-link a { color: var(--accent-strong); }
.local-project-meta { display: flex; align-items: center; justify-content: flex-end; flex: 1 1 42%; flex-wrap: wrap; gap: 6px 11px; color: var(--muted); font-size: 9px; }
.local-state { display: inline-flex; align-items: center; padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; color: #aaaab4; background: #202126; font-size: 9px; white-space: nowrap; }
.local-state.ok { color: var(--green); border-color: #385348; background: #1d2a25; }
.local-state.warning { color: var(--yellow); border-color: #514130; background: #2a251e; }
.local-companion-notice { padding: 17px; }
.local-companion-notice strong { color: var(--text); font-size: 11px; }
.local-companion-notice p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.local-companion-notice code { color: var(--accent-strong); }
.local-data-card { padding: 16px; margin-bottom: 14px; }
.local-data-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.local-data-cell { min-width: 0; padding: 10px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--panel-raised); }
.local-data-value { margin-top: 6px; color: var(--text); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.local-data-value .minor { display: inline-block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.local-documents { margin-top: 13px; }
.local-document-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 7px; }
.local-document { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 8px 9px; border: 1px solid var(--line-soft); border-radius: 6px; color: var(--green); font-size: 9px; }
.local-document.missing { color: var(--yellow); }
.local-document small { min-width: 0; color: #8c8e98; font-size: 8px; text-align: right; overflow-wrap: anywhere; }
.local-scan-note { margin: 12px 0 0; color: var(--muted); font-size: 9px; }
.local-reminder-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.local-reminder { min-width: 0; padding: 10px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--panel-raised); }
.local-reminder strong { color: var(--text); font-size: 9px; }
.local-reminder strong span { color: var(--accent-strong); }
.local-reminder p { margin: 6px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; overflow-wrap: anywhere; }
.local-clear { margin-bottom: 10px; color: var(--muted); font-size: 10px; }
.local-readonly-note { margin-top: 14px; }
.local-readonly-note strong { color: var(--text); font-size: 10px; }
.local-readonly-note p { margin: 6px 0 0; color: var(--muted); font-size: 9px; }

@media (max-width: 850px) {
  .local-reminder-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .local-project-row { flex-wrap: wrap; }
  .local-project-meta { justify-content: flex-start; order: 3; flex-basis: 100%; }
}

@media (max-width: 560px) {
  .local-data-grid, .local-document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .local-reminder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .local-project-section > .section-title { align-items: flex-start; flex-direction: column; }
  .local-project-section > .section-title .heading-actions { width: 100%; }
}

[data-theme="light"] .local-project-row, [data-theme="light"] .local-data-cell, [data-theme="light"] .local-reminder { background: #f7f8fa; }
[data-theme="light"] .local-project-main code, [data-theme="light"] .local-data-value, [data-theme="light"] .local-document small { color: #59616d; }
[data-theme="light"] .local-state.ok { color: #2f7457; border-color: #cfe2d7; background: #edf6f0; }
[data-theme="light"] .local-state.warning { color: #8a592a; border-color: #ead7c4; background: #fbf1e7; }
[data-theme="light"] .today-continue-card { border-color: #ddd9ee; background: linear-gradient(112deg, #f3f1fb 0%, #ffffff 72%); }
[data-theme="light"] .today-continue-copy h2 { color: #2f2d43; }
[data-theme="light"] .today-last-work { color: #5e6470; }
[data-theme="light"] .today-status span { border-color: #e0e2e9; color: #59616d; background: #ffffff; }
[data-theme="light"] .today-next { border-color: #e2e2eb; }
[data-theme="light"] .today-next span { color: #5d54aa; }
[data-theme="light"] .today-next strong { color: #353746; }
[data-theme="light"] .suggestion-detail { border-color: #e2e2eb; }
[data-theme="light"] .suggestion-detail > strong, [data-theme="light"] .suggestion-detail > p { color: #353746; }
[data-theme="light"] .runner-status { border-color: #dedee9; color: #504a77; background: #f6f5fb; }
[data-theme="light"] .runner-success { border-color: #cfe2d7; color: #2f7457; }
[data-theme="light"] .dashboard-health .card-header h2, [data-theme="light"] .card-header h2 { color: #303540; }
[data-theme="light"] .health-metric { background: #f7f8fa; }
[data-theme="light"] .health-metric strong { color: #303540; }
[data-theme="light"] .health-metric span { color: #59616d; }
[data-theme="light"] .health-metric.needs-attention strong { color: #94601f; }
[data-theme="light"] .dashboard-alert-copy strong, [data-theme="light"] .dashboard-recent-copy strong { color: #303540; }
[data-theme="light"] .dashboard-recent-project:hover .dashboard-recent-copy strong { color: #5147a1; }
[data-theme="light"] .dashboard-recent-time { color: #727a87; }

@media (max-width: 1100px) {
  .dashboard-health-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .dashboard-health-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .today-continue-main { align-items: flex-start; flex-direction: column; gap: 16px; }
  .today-continue-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .today-continue-actions .button { justify-content: center; }
  .dashboard-recent-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-recent-project:nth-child(2) { border-top: 1px solid var(--line-soft); }
  .dashboard-recent-project:nth-child(1) { border-top: 0; }
}

@media (max-width: 560px) {
  .codex-plan > div { grid-template-columns: 76px minmax(0, 1fr); }
  .modal-foot:has([data-action="apply-codex-document"]) { flex-wrap: wrap; }
  .modal-foot:has([data-action="apply-codex-document"]) .button { flex: 1 1 auto; }
}

@media (max-width: 430px) {
  .dashboard-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-alert, .dashboard-change { align-items: flex-start; flex-wrap: wrap; }
  .dashboard-alert-copy { min-width: calc(100% - 20px); }
  .dashboard-alert .button, .dashboard-change .button { margin-left: 15px; }
}
