/* Fixed desktop shell; application content owns its scrolling. */
:root { --bg: #141416; --panel: #202023; --panel2: #28282c; --line: #3b3b43; --text: #f1eff3; --muted: #a7a4af; color-scheme: dark; }
html, body { width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: var(--bg); }
.desktop { position: relative; isolation: isolate; height: 100vh; height: 100dvh; overflow: hidden; display: grid; grid-template-rows: 76px minmax(0, 1fr) 88px; background: radial-gradient(ellipse at 13% 85%, #54413228, transparent 50%), radial-gradient(ellipse at 85% 20%, #45425e26, transparent 55%), #161618; }
.desktop::before { content: ""; position: absolute; inset: 76px 0 88px; pointer-events: none; z-index: -1; background-image: radial-gradient(#c0b8d012 .7px, transparent .7px); background-size: 24px 24px; mask-image: linear-gradient(90deg, transparent, #000, transparent); }
.desktop [id] { scroll-margin-top: 16px; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; }
.desktop svg { display: block; width: 24px; height: 24px; flex: none; }
.desktop-topbar { position: relative; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 36px; border-bottom: 1px solid #ffffff08; background: #17171ac4; }
.desktop-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.desktop-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; border: 1px solid #ffffff23; color: #e9e5f0; background: #2b292f; font-size: 19px; font-weight: 850; }
.desktop-brand b { display: block; font-size: 13px; letter-spacing: .15em; }
.desktop-brand small { display: block; margin-top: 2px; font-size: 8px; color: #96939f; letter-spacing: .16em; }
.desktop-toolbar { display: flex; align-items: center; gap: 14px; }
.launcher-search { display: flex; align-items: center; gap: 8px; width: 330px; border: 1px solid #44414d; border-radius: 10px; padding: 8px 12px; background: #232226; }
.launcher-search input { border: 0; outline: 0; min-width: 0; width: 100%; color: var(--text); background: transparent; font-size: 12px; }
.launcher-search input::placeholder { color: #a09ba9; }
.launcher-search kbd { font: 9px system-ui; white-space: nowrap; color: #8e8999; border: 1px solid #48424e; padding: 2px 4px; border-radius: 4px; }
.search-symbol { font-size: 23px; line-height: 20px; color: #b0a9bc; }
.desktop-attention, .desktop-github, .desktop-shared-files { display: flex; gap: 6px; align-items: center; justify-content: center; min-width: 32px; min-height: 36px; background: transparent; border: 0; color: #bbb4c5; text-decoration: none; font-size: 11px; padding: 0; }
.desktop-attention svg, .desktop-github svg, .desktop-shared-files svg { width: 19px; height: 19px; }
.desktop-attention { color: #e9bf86; }
.desktop-attention:hover, .desktop-github:hover, .desktop-shared-files:hover { color: white; }
.desktop-content { min-height: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: center; gap: clamp(24px, 5vw, 90px); padding: 24px clamp(28px, 5vw, 80px); max-width: 1600px; width: 100%; margin: auto; height: 100%; }
.desktop-apps { min-width: 0; }
.desktop-welcome { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 14px 32px; gap: 12px; }
.desktop-kicker { color: #938d9d; letter-spacing: .18em; font-size: 9px; }
.desktop-welcome h1 { margin: 6px 0 0; font-size: clamp(24px, 2.5vw, 34px); letter-spacing: -.045em; font-weight: 550; }
.desktop-hint { font-size: 11px; color: #96909f; padding-bottom: 5px; }
.desktop-icon-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 10px; }
.desktop-shortcut { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 11px; min-width: 0; border: 1px solid transparent; background: transparent; padding: 12px 5px; color: #dbd6e2; border-radius: 15px; font-size: 12px; font-weight: 500; line-height: 1.3; }
.desktop-shortcut > span:last-child { text-align: center; min-height: 30px; display: grid; place-items: start center; }
.app-icon { --app-color: #bfa0f5; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 19px; background: var(--app-color); color: #28252d; box-shadow: inset 0 1px 1px #ffffffa3, inset 0 -2px 2px #00000016, 0 8px 18px #0003; flex: none; transition: transform .15s ease; }
.app-icon svg { width: 33px; height: 33px; stroke-width: 1.6; }
.desktop-shortcut:hover { background: #ffffff05; border-color: #ffffff12; color: white; }
.desktop-shortcut:hover .app-icon { transform: translateY(-4px); }
.desktop-shortcut:active .app-icon { transform: translateY(0) scale(.96); }
.desktop-widgets { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-height: 0; }
.widget-label { color: #b6afbd; font-size: 9px; letter-spacing: .14em; font-weight: 650; }
.widget-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.widget-heading svg { width: 17px; height: 17px; color: #c0b9cd; }
.desktop-clock { padding: 0 5px 4px; }
.desktop-clock .time { font-size: 40px; font-weight: 350; letter-spacing: -.045em; font-variant-numeric: tabular-nums; line-height: 1.45; }
.desktop-clock #date { color: #a59dae; font-size: 11px; }
.desktop-clock .local-dot { background: #a9d9b5; }
.desktop-project, .desktop-timer, .desktop-notes { border: 1px solid #ffffff15; border-radius: 14px; background: #2523299e; padding: 16px 18px; box-shadow: 0 6px 18px #0000000d; }
.desktop-project { --accent: #efab99; }
.desktop-project > a { display: grid; gap: 6px; text-decoration: none; }
.desktop-project > a > b { font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desktop-project-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 3px; font-size: 10px; color: #aaa3b3; }
.desktop-project-meta > b { font-size: 13px; color: var(--accent); }
.desktop-project-meta span b { font-weight: 500; }
.desktop-project .progress { height: 3px; margin: 5px 0 10px; background: #ffffff10; }
.desktop-project .desktop-next { display: flex; align-items: center; justify-content: space-between; gap: 5px; font-size: 10px; color: #c8bbc5; }
.desktop-next span { margin-left: auto; color: #98909f; }
.desktop-timer { --accent: #b5a4e6; }
.desktop-timer .timer { font-size: 37px; font-weight: 450; line-height: 1.2; letter-spacing: -.035em; margin: 8px 0; padding: 0; text-align: left; }
.desktop-timer .progress { background: #ffffff10; height: 3px; margin: 0 0 12px; }
.timer-buttons { display: flex; gap: 5px; }
.timer-buttons .btn { padding: 5px 8px; font-size: 10px; min-height: 30px; border-color: #4c4654; background: transparent; }
.timer-buttons .primary { color: #24202d; background: var(--accent); border: 0; }
.timer-buttons .timer-reset { padding-inline: 6px; }
.desktop-notes { --accent: #e5cd9c; }
.saved-label { font-size: 9px; color: #9e9385; }
.desktop-notes .notes { background: transparent; border: 0; border-radius: 0; color: #ded4c4; font-size: 12px; line-height: 1.7; padding: 10px 0 0; min-height: 90px; height: 90px; resize: none; }
.desktop-notes .notes::placeholder { color: #938c95; }
.desktop-notes:focus-within { border-color: #b5a077; }
.desktop-bottom { position: relative; z-index: 90; display: flex; justify-content: center; align-items: center; gap: 20px; padding: 8px 28px 18px; min-width: 0; }
.desktop-local, .desktop-version { position: absolute; bottom: 33px; color: #847e8c; font-size: 9px; letter-spacing: .02em; }
.desktop-local { left: 36px; }
.desktop-version { right: 36px; }
.desktop-dock { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #ffffff21; background: #302d36e6; backdrop-filter: blur(20px); border-radius: 18px; box-shadow: 0 12px 36px #0005; max-width: min(740px, 70vw); overflow-x: auto; scrollbar-width: thin; }
.desktop-dock button { position: relative; display: grid; place-items: center; padding: 0 0 5px; background: transparent; border: 0; flex: none; }
.desktop-dock .app-icon { width: 40px; height: 40px; border-radius: 12px; box-shadow: inset 0 1px 1px #fff8, 0 3px 8px #0002; }
.desktop-dock .app-icon svg { width: 22px; height: 22px; }
.desktop-dock button:hover .app-icon { transform: translateY(-2px); }
.dock-home { width: 32px; color: #cfc6db; }
.dock-divider { height: 28px; border-left: 1px solid #ffffff25; margin-right: 2px; }
.dock-running { position: absolute; width: 4px; height: 3px; border-radius: 2px; background: #dad3e7; bottom: -1px; opacity: 0; }
.is-running .dock-running { opacity: .4; }
.is-active .dock-running { opacity: 1; width: 12px; }
.running-apps { display: contents; }
.running-apps .is-active { border-bottom: 2px solid #ded5e9; }
.launcher-results { position: absolute; top: 64px; right: 80px; width: min(460px, calc(100vw - 28px)); max-height: min(520px, calc(100dvh - 130px)); overflow: auto; background: #29262f; border: 1px solid #5d5266; border-radius: 14px; padding: 10px; box-shadow: 0 20px 70px #0008; }
.launcher-result-heading { padding: 7px 10px 10px; color: #a49bac; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.launcher-results button { display: flex; width: 100%; gap: 12px; padding: 11px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; }
.launcher-results button:hover, .launcher-results button:focus { background: #ffffff0d; }
.launcher-results button > span:nth-child(2) { flex: 1; min-width: 0; }
.launcher-results b, .launcher-results small { display: block; }
.launcher-results b { font-size: 12px; font-weight: 550; }
.launcher-results small { font-size: 10px; color: #afa2b9; margin-top: 3px; }
.launcher-results p { padding: 0 10px; }

/* A small, nonmodal window manager. The desktop and widgets continue running underneath. */
.window-layer { position: absolute; top: 86px; left: 20px; right: 20px; bottom: 94px; pointer-events: none; z-index: 50; }
.app-window { position: absolute; width: min(960px, calc(100% - 48px)); height: min(710px, calc(100% - 36px)); display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid #59535e; border-radius: 14px; background: #202024; box-shadow: 0 26px 100px #0009, 0 2px 9px #0005; pointer-events: auto; overflow: hidden; }
.app-window.is-focused { border-color: color-mix(in srgb, var(--accent) 55%, #59535e); box-shadow: 0 28px 110px #000a, 0 0 0 1px #ffffff08; }
.window-titlebar { display: flex; align-items: center; gap: 10px; height: 48px; flex: none; padding: 0 8px 0 17px; background: #2e2b32; border-bottom: 1px solid #413b48; cursor: grab; user-select: none; touch-action: none; }
.is-focused .window-titlebar { background: color-mix(in srgb, var(--accent) 8%, #2c2931); }
.window-app-icon { color: var(--accent); }
.window-app-icon svg { width: 20px; height: 20px; }
.window-titlebar h2 { flex: 1; margin: 0; min-width: 0; font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.window-controls { display: flex; gap: 4px; }
.window-controls button { display: grid; place-items: center; width: 33px; min-height: 32px; border: 0; border-radius: 6px; color: #bcb4c5; background: transparent; }
.window-controls svg { width: 17px; height: 17px; }
.window-controls button:hover { background: #ffffff13; color: white; }
.window-controls [data-window-action="close"]:hover { background: #c76473; }
.app-window.is-maximized { left: 0 !important; top: 0 !important; width: 100%; height: 100%; border-radius: 10px; }
.app-window.is-dragging, .is-dragging .window-titlebar { cursor: grabbing; }
.window-body { flex: 1; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #66606c transparent; padding: 22px; container-type: inline-size; }
.window-body > .panel, .window-body > [class$="-section"] { margin: 0; padding: 0; border: 0; background: transparent; border-radius: 0; box-shadow: none; --accent: inherit; }
#windowLayer .window-body > [id] { --accent: inherit; }
.window-body > * + .panel, .window-body > * + [class$="-section"] { margin-top: 28px; }
.window-body > .window-sections + * { margin-top: 16px; }
.window-sections { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.window-sections a { padding: 6px 12px; border: 1px solid #514855; border-radius: 7px; font-size: 11px; color: var(--accent); text-decoration: none; }
.window-sections a:hover { background: #ffffff0b; }
.window-body .project-future { margin-bottom: 12px; }
.window-body .project-empty, .window-body .empty-state { background: #26242a; border-color: #49414e; }
.window-body .stat, .window-body .module-card, .window-body .component-row, .window-body .team-member, .window-body .workload-row, .window-body .todo, .window-body .tool, .window-body .link, .window-body .calc-card, .window-body .calc-panel, .window-body .intelligence-card, .window-body .readiness-row, .window-body .attention-item { background: #27262c; border-color: #403b47; }
.window-body .task-form, .window-body .module-form, .window-body .project-form, .window-body .team-form, .window-body .kanban-column, .window-body .copilot-overview { background: #1b1b1f; }
.window-body input, .window-body select, .window-body textarea { background-color: #1b1b20; border-color: #49414f; }
.window-body .btn { background: #332f39; border-color: #52485e; }
.window-body .btn.primary { background: var(--accent); color: #222029; border-color: transparent; }
.window-body .ico { background: #34303b; }
.window-body .bar { background: var(--accent); }
.window-body .kanban-board { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.window-body .team-layout { grid-template-columns: 1fr; }
.window-body .calc-list { align-content: start; }
.window-body .intel-table { background: #25242b; }
.window-body .intel-table th { background: #322d39; }
.window-body .title { margin-bottom: 10px; }
.shared-file-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.shared-file-info { min-width: 0; overflow-wrap: anywhere; }
.shared-file-info h5 { margin: 0; }
.shared-file-info p { margin: 5px 0; }
.shared-file-domain { display: block; color: #a9a2af; margin-top: 5px; }
.shared-file-actions { display: flex; gap: 7px; flex: none; }
.shared-files-form { margin-top: 14px; }
.shared-files-fields { display: grid; gap: 10px; }
.shared-files-form input { min-width: 0; }
#sharedFilesAddButton { margin-top: 10px; }
#sharedFilesStatus { min-height: 1.5em; margin: 8px 0 0; color: #b9b0c4; }
@media (max-width: 600px) { .shared-file-card { align-items: stretch; flex-direction: column; } .shared-file-actions { align-self: flex-start; } }
.window-body .project-intelligence-wrap { grid-template-columns: minmax(0, 1fr); }
.window-body .copilot-panel { overflow: visible; }
@container (max-width: 800px) {
  .task-filters, .research-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .task-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbox-layout { grid-template-columns: minmax(0, 1fr); }
  .calc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-doc-stats, .budget-summary, .experiment-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .copilot-context-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (max-width: 520px) {
  .task-filters, .research-toolbar, .task-form-grid, .project-form-grid, .document-detail-grid, .budget-breakdowns { grid-template-columns: minmax(0, 1fr); }
  .project-stats.overview-primary, .project-doc-stats, .budget-summary, .experiment-stats, .health-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-header, .module-card-head, .copilot-overview { flex-direction: column; }
  .title > .small { flex-basis: 100%; }
  .title > .btn { margin-left: 0; }
  .component-row, .component-importer, .copilot-controls { grid-template-columns: minmax(0, 1fr); }
  .component-number { text-align: left; }
  .todo { grid-template-columns: 20px minmax(0, 1fr); }
  .todo-actions { grid-column: 2; justify-content: flex-end; }
  .workload-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workload-row b { grid-column: 1 / -1; }
  .intelligence-grid, .metrics-grid, .two-col { grid-template-columns: minmax(0, 1fr); }
  .copilot-context-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1150px) {
  .desktop { grid-template-rows: 64px minmax(0, 1fr) 76px; }
  .desktop-content { grid-template-columns: minmax(0, 1fr) 258px; gap: 24px; padding: 20px 32px; }
  .desktop-topbar { padding-inline: 28px; }
  .desktop-icon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; }
  .desktop-welcome { margin-bottom: 20px; }
  .desktop-hint { display: none; }
  .desktop-shortcut { gap: 8px; padding-block: 8px; font-size: 11px; }
  .app-icon { width: 57px; height: 57px; border-radius: 17px; }
  .desktop-widgets { gap: 12px; }
  .desktop-clock .time { font-size: 34px; }
  .desktop-project, .desktop-timer, .desktop-notes { padding: 13px 15px; }
  .desktop-notes .notes { height: 75px; min-height: 75px; }
  .desktop-local, .desktop-version { display: none; }
  .window-layer { top: 74px; bottom: 82px; left: 12px; right: 12px; }
}
@media (max-width: 850px) {
  .desktop-content { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 18px; padding: 14px 32px; }
  .desktop-icon-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 16px 6px; }
  .desktop-welcome { margin: 0 6px 18px; }
  .desktop-welcome h1 { font-size: 25px; }
  .desktop-kicker { display: none; }
  .desktop-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .desktop-clock { padding: 4px 12px; align-self: center; }
  .desktop-clock .time { font-size: 33px; }
  .desktop-project { padding: 12px 16px; }
  .desktop-project-meta { margin-top: 8px; }
  .desktop-notes .notes { height: 80px; min-height: 80px; }
  .launcher-search { width: 255px; }
  .desktop-dock { max-width: calc(100vw - 32px); }
}
@media (max-width: 600px) {
  .desktop { grid-template-rows: 66px minmax(0, 1fr) 68px; }
  .desktop-topbar { padding: 9px 16px; gap: 12px; align-items: center; }
  .desktop-brand { gap: 8px; }
  .desktop-brand small { display: none; }
  .desktop-brand b { font-size: 10px; letter-spacing: .1em; }
  .desktop-mark { width: 27px; height: 27px; border-radius: 8px; font-size: 15px; }
  .desktop-toolbar { gap: 8px; flex: 1; min-width: 0; justify-content: flex-end; }
  .launcher-search { width: 100%; max-width: 170px; min-width: 0; padding: 7px 9px; }
  .launcher-search input { font-size: 11px; }
  .launcher-search kbd, .desktop-github, .desktop-shared-files { display: none; }
  .desktop-attention { gap: 3px; min-width: 29px; }
  .desktop-attention svg { width: 15px; height: 15px; }
  .desktop-content { padding: 8px 16px; gap: 14px; align-content: center; }
  .desktop-welcome { margin: 0 3px 10px; }
  .desktop-welcome h1 { font-size: 19px; margin: 0; }
  .desktop-icon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 4px; }
  .desktop-shortcut { gap: 5px; padding: 4px 0; border-radius: 9px; font-size: 9px; }
  .desktop-shortcut > span:last-child { min-height: 22px; }
  .app-icon { width: 45px; height: 45px; border-radius: 13px; }
  .app-icon svg { width: 26px; height: 26px; }
  .desktop-widgets { gap: 9px; }
  .widget-label { font-size: 8px; letter-spacing: .08em; }
  .desktop-clock { padding: 0 5px; }
  .desktop-clock .widget-label { display: none; }
  .desktop-clock .time { font-size: 24px; letter-spacing: -.04em; }
  .desktop-clock #date { font-size: 9px; max-width: 145px; }
  .desktop-project, .desktop-timer, .desktop-notes { padding: 10px; border-radius: 10px; min-width: 0; }
  .desktop-project > a { gap: 4px; }
  .desktop-project > a > b { font-size: 11px; }
  .desktop-project-meta { font-size: 8px; margin: 5px 0 0; gap: 3px; }
  .desktop-project-meta > b { font-size: 10px; }
  .desktop-project .progress { margin: 3px 0 0; }
  .desktop-project .desktop-next { display: none; }
  .desktop-timer .timer { font-size: 28px; margin: 7px 0; }
  .desktop-timer .progress { margin-bottom: 7px; }
  .timer-buttons { flex-wrap: wrap; gap: 4px; }
  .timer-buttons .btn { font-size: 9px; padding: 3px 7px; min-height: 25px; }
  .timer-buttons .timer-reset { padding-inline: 6px; }
  .desktop-notes .notes { height: 105px; min-height: 0; font-size: 11px; }
  .saved-label { font-size: 8px; }
  .widget-heading svg { width: 14px; height: 14px; }
  .desktop-bottom { padding: 4px 10px 10px; }
  .desktop-dock { border-radius: 14px; gap: 7px; padding: 7px 10px; max-width: calc(100vw - 20px); }
  .desktop-dock .app-icon { width: 34px; height: 34px; border-radius: 10px; }
  .desktop-dock .app-icon svg { width: 19px; height: 19px; }
  .dock-home { width: 25px; }
  .desktop-dock .dock-home svg { width: 20px; height: 20px; }
  .launcher-results { top: 59px; right: 14px; }
  .window-layer { top: 66px; bottom: 70px; left: 8px; right: 8px; }
  .app-window, .app-window.is-maximized { left: 0 !important; top: 0 !important; width: 100%; height: 100%; border-radius: 11px; }
  .window-titlebar { height: 44px; padding-left: 12px; gap: 8px; cursor: default; }
  .window-controls { gap: 1px; }
  .window-controls button { width: 30px; }
  .window-controls [data-window-action="maximize"] { display: none; }
  .window-body { padding: 15px; }
}
@media (max-height: 720px) and (min-width: 851px) {
  .desktop { grid-template-rows: 58px minmax(0, 1fr) 66px; }
  .desktop-content { padding-block: 8px; }
  .desktop-welcome { margin-bottom: 10px; }
  .desktop-icon-grid { gap: 4px; }
  .desktop-shortcut { padding-block: 4px; }
  .desktop-widgets { gap: 8px; }
  .desktop-clock .time { font-size: 26px; }
  .desktop-notes .notes { height: 50px; min-height: 50px; }
  .desktop-project, .desktop-timer, .desktop-notes { padding-block: 10px; }
}
@media (max-height: 740px) and (max-width: 600px) {
  .desktop-welcome { display: none; }
  .desktop-content { gap: 7px; padding-block: 4px; }
  .desktop-icon-grid { gap: 3px; }
  .desktop-shortcut { padding-block: 2px; }
  .app-icon { width: 36px; height: 36px; border-radius: 11px; }
  .desktop-notes .notes { height: 80px; }
}
@media (prefers-reduced-motion: reduce) { .app-icon { transition: none; } }
/* V1.1: compact live widgets surround the application launcher. */
.desktop { --desktop-accent: #85d9ed; background: radial-gradient(ellipse at 50% 44%, #78648d16, transparent 52%), #161618; }
.desktop::before { background-image: linear-gradient(#c0b8d008 1px, transparent 1px), linear-gradient(90deg, #c0b8d008 1px, transparent 1px); background-size: 48px 48px; }
.desktop[data-wallpaper="blueprint"] { background: radial-gradient(ellipse at center, #25445744, transparent 70%), #141b23; }
.desktop[data-wallpaper="blueprint"]::before { background-size: 24px 24px; background-image: linear-gradient(#91b9cb13 1px, transparent 1px), linear-gradient(90deg, #91b9cb13 1px, transparent 1px); }
.desktop[data-wallpaper="midnight"] { background: radial-gradient(ellipse at 50% 60%, #6c498c25, transparent 65%), #101017; }
.desktop[data-wallpaper="clean"] { background: #19191c; }
.desktop[data-wallpaper="clean"]::before { display: none; }
.desktop-mark { color: var(--desktop-accent); }
.launcher-search:focus-within { border-color: var(--desktop-accent); }
.desktop-topbar { gap: 20px; }
.desktop-toolbar { margin-left: auto; }
.desktop-clock { text-align: right; padding: 0; flex: none; }
.desktop-clock .widget-label { display: none; }
.desktop-clock .time { font-size: 23px; line-height: 1.25; letter-spacing: -.03em; }
.desktop-clock #date { font-size: 9px; margin-top: 3px; }
.desktop-content { grid-template-columns: minmax(195px, 245px) minmax(0, 1fr) minmax(195px, 245px); grid-template-rows: 175px 115px 100px 150px; grid-template-areas: "project apps mission" "attention apps health" "team apps health" "notes radar timer"; gap: 18px 28px; align-content: center; align-items: stretch; padding: 16px 36px; }
.desktop-apps { grid-area: apps; align-self: center; }
.desktop-welcome { margin: 0 12px 20px; }
.desktop-welcome h1 { font-size: 30px; }
.desktop-hint { display: none; }
.desktop-icon-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px 5px; }
.desktop-shortcut { padding: 8px 2px; gap: 9px; font-size: 11px; }
.desktop-shortcut .app-icon { width: var(--icon-size, 62px); height: var(--icon-size, 62px); border-radius: 29%; transition: transform .15s ease, box-shadow .15s ease; }
.desktop-shortcut:hover .app-icon { transform: translateY(-3px) scale(1.04); box-shadow: 0 6px 24px color-mix(in srgb, var(--app-color) 20%, transparent), inset 0 1px 1px #fff9; }
.desktop-shortcut:active .app-icon { transform: scale(.96); }
.desktop[data-icon-size="small"] { --icon-size: 52px; }
.desktop[data-icon-size="large"] { --icon-size: 70px; }
.desktop-widget { min-width: 0; border: 1px solid #ffffff12; border-radius: 14px; background: #24232994; padding: 16px; box-shadow: 0 6px 18px #0000000d; overflow: hidden; }
.desktop-widget a { text-decoration: none; }
.desktop-widget .widget-heading { color: #9a939f; font-size: 11px; margin-bottom: 12px; }
.desktop-widget .widget-heading:hover { color: var(--desktop-accent); }
.desktop-project { grid-area: project; }
.desktop-alerts { grid-area: attention; }
.desktop-team { grid-area: team; }
.desktop-mission { grid-area: mission; }
.desktop-health { grid-area: health; }
.desktop-notes { grid-area: notes; }
.desktop-timer { grid-area: timer; }
.desktop-project > a > b { font-size: 17px; margin-top: 3px; }
.desktop-project-meta { margin: 10px 0 3px; text-transform: uppercase; font-size: 9px; letter-spacing: .05em; }
.project-counts { display: flex; flex-wrap: wrap; gap: 3px 9px; font-size: 10px; color: #b0a8b7; }
.project-counts b { font-weight: 500; color: #e0d6dd; }
.widget-detail { display: block; color: #948d9c; font-size: 10px; margin-top: 7px; line-height: 1.5; }
.desktop-project .desktop-next { margin-top: 9px; font-size: 9px; }
.widget-empty { font-size: 11px; color: #a9a2af; line-height: 1.6; margin: 0; }
.widget-issue { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 10px; color: #c4bbc9; }
.widget-issue span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget-issue i { width: 5px; height: 5px; border-radius: 50%; background: #dbc491; flex: none; }
.widget-issue .signal-high { background: #e79b8e; }
.widget-issue .signal-low { background: #a5bba6; }
.team-pulse-top { display: flex; gap: 10px; align-items: center; }
.team-pulse-top b { color: #c9bdd7; font-size: 10px; font-weight: 500; }
.team-avatars { display: flex; padding-left: 3px; }
.team-avatars > span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #46404f; color: #d2c2e9; font-size: 8px; border: 2px solid #28252e; margin-left: -3px; }
.desktop-team .widget-heading { margin-bottom: 8px; }
#desktopMission button { display: flex; align-items: flex-start; text-align: left; gap: 8px; width: 100%; padding: 0; margin-top: 12px; background: transparent; border: 0; color: #d5ceda; }
#desktopMission button > span:last-child { min-width: 0; }
#desktopMission b { font-size: 11px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
#desktopMission small { display: block; font-size: 9px; color: #a297aa; margin-top: 2px; text-transform: capitalize; }
.mission-dot { width: 7px; height: 7px; margin-top: 4px; border: 1px solid #a5c4aa; border-radius: 50%; flex: none; }
#desktopMission button:hover b { color: #b5e4bf; }
.health-mini { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 18px; color: #b0a8b8; font-size: 10px; }
.health-mini b { font-weight: 450; color: #d1c7da; }
.health-track { grid-column: 1 / -1; height: 3px; background: #ffffff0c; border-radius: 3px; overflow: hidden; }
.health-track i { display: block; height: 100%; background: #a8b6c9; }
.desktop-radar { grid-area: radar; align-self: center; justify-self: center; text-align: center; opacity: .75; }
.desktop-radar > .widget-label { font-size: 8px; color: #8e8799; letter-spacing: .2em; }
#desktopRadar svg { width: 280px; height: 126px; max-width: 100%; overflow: visible; }
.radar-lines { stroke: #c1b3cf25; stroke-width: .7; fill: none; }
#desktopRadar circle { fill: var(--node-color); }
#desktopRadar text { fill: #a79fb3; font-size: 8px; }
#desktopRadar a:hover text, #desktopRadar a:focus text { fill: var(--node-color); }
#desktopRadar a:focus { outline: none; }
#desktopRadar a:focus circle { stroke: white; stroke-width: 2px; }
.desktop-notes .notes { height: 88px; min-height: 0; }
.desktop-timer .timer { margin: 4px 0 8px; }
.desktop-timer .widget-heading { margin-bottom: 0; }
.desktop-dock { gap: 9px; max-width: calc(100vw - 40px); }
.desktop-local, .desktop-version { bottom: 5px; font-size: 8px; }
.desktop-settings-form { display: grid; gap: 22px; max-width: 480px; }
.desktop-settings-form > label { display: grid; gap: 8px; font-size: 12px; }
.desktop-settings-form select { width: 100%; padding: 10px; border-radius: 8px; }
.desktop-settings-form fieldset { border: 1px solid #49414f; border-radius: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 18px; }
.desktop-settings-form legend { font-size: 12px; color: #bcb2c7; padding: 0 5px; }
.desktop-settings-form fieldset label { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.desktop-settings-form input { accent-color: var(--desktop-accent); }
@media (max-width: 1150px) and (min-width: 851px) {
  .desktop-content { grid-template-columns: 190px minmax(0, 1fr) 190px; grid-template-rows: 166px 105px 100px 132px; gap: 12px 16px; padding: 12px 24px; }
  .desktop-widget { padding: 12px; }
  .desktop-welcome h1 { font-size: 25px; }
  .desktop-welcome { margin-bottom: 15px; }
  .desktop-shortcut { font-size: 9px; gap: 8px; padding: 6px 0; }
  .desktop-shortcut .app-icon { width: var(--icon-size, 48px); height: var(--icon-size, 48px); }
  .desktop[data-icon-size="small"] { --icon-size: 40px; }
  .desktop[data-icon-size="large"] { --icon-size: 54px; }
  .desktop-icon-grid { gap: 16px 2px; }
  .desktop-project > a > b { font-size: 14px; }
  .project-counts { font-size: 9px; }
  .desktop-timer .timer { font-size: 29px; }
  .timer-buttons { gap: 3px; }
  .timer-buttons .btn { font-size: 9px; padding: 4px 6px; }
  .desktop-notes .notes { height: 75px; }
  #desktopRadar svg { width: 240px; height: 105px; }
}
@media (max-width: 850px) {
  .desktop-content { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto 155px 105px 140px; grid-template-areas: "apps apps apps" "project mission health" "attention team health" "notes radar timer"; gap: 12px; padding: 14px 24px; }
  .desktop-icon-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px 4px; }
  .desktop-shortcut .app-icon { width: var(--icon-size, 53px); height: var(--icon-size, 53px); }
  .desktop[data-icon-size="small"] { --icon-size: 45px; }
  .desktop[data-icon-size="large"] { --icon-size: 60px; }
  .desktop-shortcut { font-size: 10px; }
  .desktop-welcome { margin-bottom: 12px; }
  .desktop-welcome h1 { font-size: 24px; }
  .desktop-widget { padding: 12px; }
  .desktop-project > a > b { font-size: 14px; }
  .desktop-project .desktop-next { display: none; }
  .desktop-timer .timer { font-size: 30px; }
  .timer-buttons { flex-wrap: wrap; }
  .timer-buttons .btn { padding: 3px 6px; font-size: 9px; min-height: 25px; }
  #desktopRadar svg { width: 215px; height: 105px; }
  .launcher-search { width: 240px; }
  .desktop-topbar { padding-inline: 24px; gap: 15px; }
}
@media (max-width: 600px) {
  .desktop { grid-template-rows: 64px minmax(0, 1fr) 64px; }
  .desktop-topbar { padding: 8px 14px; gap: 10px; }
  .desktop-toolbar { margin: 0; }
  .desktop-attention, .desktop-brand > span:last-child { display: none; }
  .desktop-clock .time { font-size: 16px; }
  .desktop-clock #date { font-size: 8px; }
  .desktop-clock { min-width: 76px; }
  .launcher-search { max-width: none; padding: 7px; }
  .desktop-content { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto 106px 88px 74px 111px; grid-template-areas: "apps apps" "project mission" "attention health" "team radar" "notes timer"; gap: 8px; padding: 5px 14px; }
  .desktop-welcome { margin: 0 3px 5px; }
  .desktop-welcome h1 { font-size: 18px; }
  .desktop-icon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px 4px; }
  .desktop-shortcut { gap: 4px; padding: 2px 0; font-size: 9px; }
  .desktop-shortcut > span:last-child { min-height: 20px; }
  .desktop-shortcut .app-icon { width: var(--icon-size, 39px); height: var(--icon-size, 39px); }
  .desktop-shortcut .app-icon svg { width: 23px; height: 23px; }
  .desktop[data-icon-size="small"] { --icon-size: 33px; }
  .desktop[data-icon-size="large"] { --icon-size: 43px; }
  .desktop-widget { padding: 9px; border-radius: 10px; }
  .desktop-widget .widget-heading { margin-bottom: 5px; }
  .widget-label { font-size: 7px; }
  .desktop-project > a > b { font-size: 11px; margin: 0; }
  .desktop-project-meta { margin-top: 5px; font-size: 8px; }
  .desktop-project .progress { margin: 3px 0 5px; }
  .project-counts { font-size: 8px; gap: 3px 7px; }
  .widget-detail { font-size: 8px; margin-top: 3px; }
  .widget-empty { font-size: 9px; }
  .widget-issue { font-size: 9px; margin-top: 8px; gap: 5px; }
  #desktopMission button { margin-top: 5px; gap: 5px; }
  #desktopMission b { font-size: 9px; }
  #desktopMission small { font-size: 7px; margin-top: 0; }
  .team-avatars > span { width: 19px; height: 19px; font-size: 6px; }
  .team-pulse-top { gap: 6px; }
  .team-pulse-top b { font-size: 8px; }
  .health-mini { font-size: 8px; grid-template-columns: 1fr 35px 22px; margin-top: 5px; gap: 5px; align-items: center; }
  .health-mini b { grid-column: 3; grid-row: 1; text-align: right; }
  .health-track { grid-column: 2; grid-row: 1; height: 2px; }
  .desktop-radar > .widget-label { font-size: 6px; }
  #desktopRadar svg { width: 156px; height: 62px; }
  #desktopRadar text { font-size: 10px; }
  .desktop-notes .notes { height: 68px; padding-top: 4px; font-size: 10px; }
  .saved-label { font-size: 7px; }
  .desktop-timer .timer { font-size: 25px; margin: 3px 0 5px; }
  .desktop-timer .progress { margin-bottom: 5px; }
  .timer-buttons .btn { padding: 2px 5px; font-size: 8px; min-height: 22px; }
  .desktop-dock { max-width: calc(100vw - 20px); gap: 7px; }
  .desktop-dock .app-icon { width: 28px; height: 28px; border-radius: 9px; }
  .desktop-dock .app-icon svg { width: 17px; height: 17px; }
}
@media (prefers-reduced-motion: reduce) { .desktop-shortcut .app-icon { transition: none; } }
/* Keep compact text independent of the workspace's larger form line heights. */
.desktop-content { width: 100%; max-width: 1600px; }
.desktop-shortcut > span:last-child { min-height: 18px; }
.desktop-widget { line-height: 1.35; }
.desktop-widget .widget-heading { line-height: 1.3; }
#desktopTeam, #desktopHealth { display: block; }
#desktopMission button { min-height: 0; line-height: 1.35; }
#desktopMission b, #desktopMission small { line-height: 1.35; }
.desktop-radar { line-height: 1.2; }
.desktop-radar > .widget-label { display: block; margin-bottom: 5px; }
.desktop-notes .notes { display: block; }
@media (max-width: 600px) {
  .desktop-topbar { min-width: 0; }
  .desktop-clock { min-width: 70px; }
  .desktop-shortcut > span:last-child { min-height: 15px; }
  .desktop-shortcut { line-height: 1.1; }
  .desktop-welcome h1 { line-height: 1.3; }
  .desktop-widget .widget-heading { font-size: 9px; }
  .health-mini { margin-top: 4px; line-height: 1.15; }
  #desktopMission button { margin-top: 4px; }
  .desktop-radar > .widget-label { margin-bottom: 2px; }
}
.desktop-project .desktop-next { margin-top: 5px; }
#desktopMission button { margin-top: 8px; }
.desktop-team .widget-detail { margin-top: 4px; }
.desktop-timer .timer { margin-bottom: 6px; }
@media (max-width: 600px) {
  .desktop[data-icon-size="large"] { --icon-size: 41px; }
  #desktopMission button { margin-top: 3px; }
}

#desktopProjectDetails { display: block; }
#desktopRadar .radar-hit { fill: transparent; stroke: none; }
@media (max-width: 600px) { #desktopRadar text { font-size: 14px; } }
