/* The desktop shares the studio's charcoal, walnut and warm metal palette. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.on-desktop { overflow: hidden; }
.on-desktop > header { display: none; }
.desktop-shell {
  position: fixed; inset: 0; z-index: 20; height: 100dvh; width: 100%;
  display: flex; flex-direction: column; padding: 0 24px 18px; gap: 14px;
  overflow: hidden; isolation: isolate; transform-origin: 0 0;
  background: radial-gradient(ellipse at 75% 30%, #61472c33, transparent 60%),
    linear-gradient(135deg, #292925, #1d1e1b 55%, #27231d);
}
.desktop-shell::before { content: ''; position: absolute; z-index: -1; inset: auto 0 0; height: 7px; background: repeating-linear-gradient(0deg, #4d3827 0 1px, #38291e 1px 3px); }
.desktop-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 82px; border-bottom: 1px solid #bfa27b30; }
.desktop-wordmark { margin: 0; font-size: 30px; letter-spacing: -.035em; font-weight: 500; line-height: 1; }
.desktop-actions { display: flex; gap: 12px; }
.desktop-actions button { background: transparent; border-color: transparent; color: #c7bda9; font-size: 13px; }
.desktop-actions button:last-child { border-color: #7c6950; color: #ecd6b5; }
.desktop-surface { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 6px; }
.desktop-welcome { width: min(680px, 85%); margin: 8vh auto 0; }
.desktop-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .18em; color: #cdb28c; }
.desktop-headline { font-size: clamp(30px, 4vw, 57px); line-height: 1.16; letter-spacing: -.045em; color: #eee5d6; }
.desktop-hint { color: #b7b1a6; font-size: 14px; max-width: 42ch; }
.desktop-dock { flex: none; width: min(900px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 10px; background: #28251feF; border: 1px solid #837058; border-top-color: #aa9270; border-radius: 13px; box-shadow: 0 8px 28px #0004; }
.dock-app { position: relative; display: flex; flex-direction: column; gap: 7px; align-items: center; justify-content: flex-start; padding: 8px 5px 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; line-height: 1.2; }
.dock-app:hover { background: #433a2d; }
.dock-app[aria-pressed=true] { background: #4a3c2a; border-color: #b49260; }
.dock-app[data-open=true]::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #e8bd86; position: absolute; bottom: 3px; }
.dock-icon { display: grid; place-items: center; height: 38px; width: 42px; color: #e7c692; border: 1px solid #887351; border-radius: 8px; background: linear-gradient(145deg, #51432f, #2c2a23); font: 500 24px/1 ui-monospace, monospace; }
.dock-app[data-app=terminal] .dock-icon { color: #d4d9ba; background: #1a201d; }
.dock-app[data-app=snake] .dock-icon { color: #bad1aa; }
.dock-label { color: #e2d7c6; font-size: 12px; text-align: center; }
.desktop-window { position: absolute; display: flex; flex-direction: column; min-width: 0; background: #23231f; border: 1px solid #6d6557; border-radius: 10px; overflow: hidden; box-shadow: 0 14px 38px #0005; }
.desktop-window[data-focused=true] { border-color: #b59565; box-shadow: 0 20px 58px #0008, 0 0 0 1px #d3b27a1c; }
.window-titlebar { display: flex; align-items: center; flex: none; gap: 8px; padding: 5px 8px 5px 16px; background: #302c25; border-bottom: 1px solid #4f473b; }
[data-focused=true] > .window-titlebar { background: linear-gradient(100deg, #44392b, #302c25); }
.window-title { flex: 1; min-width: 0; text-align: left; padding: 6px 0; border: 0; background: transparent; color: #d5c9b7; font-size: 14px; line-height: 1.3; cursor: grab; touch-action: none; border-radius: 0; }
.window-title:hover { background: transparent; color: #f4e4cb; }
[data-dragging=true] .window-title { cursor: grabbing; }
.window-title:focus-visible { outline-offset: -2px; box-shadow: none; }
.window-close { font-size: 24px; font-weight: 300; line-height: 1; width: 44px; height: 44px; padding: 4px; background: transparent; border-color: transparent; }
.window-close:focus-visible { outline-offset: -3px; box-shadow: none; }
.window-body { flex: 1; min-height: 0; padding: 28px 32px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #78664e #24231f; }
.window-body h2 { font-size: 25px; font-weight: 450; letter-spacing: -.03em; margin: 0 0 20px; }
.window-body p { font-size: 15px; line-height: 1.7; }
.window-body .evidence { margin: 22px 0; }
.outbound-actions a, .app-about .window-body > a { padding: 9px 14px; border: 1px solid #8e7755; border-radius: 5px; font-size: 14px; text-decoration: none; }
.file-toolbar { display: flex; align-items: center; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid #514a3f; margin-bottom: 28px; }
.file-toolbar button { padding: 8px 12px; font-size: 13px; }
.file-toolbar button[aria-disabled=true] { color: #aaa395; }
.file-path { color: #beb5a5; font-size: 13px; }
.project-folders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.project-folder { display: flex; align-items: center; flex-direction: column; justify-content: flex-start; gap: 18px; padding: 24px 12px; min-height: 160px; font-size: 14px; text-align: center; border-color: transparent; background: #2b2a24; }
.folder-icon { position: relative; width: 58px; height: 40px; display: block; margin-top: 10px; border: 1px solid #c9a779; border-radius: 3px; background: linear-gradient(150deg, #b08a56, #795b37); box-shadow: 0 4px 10px #0003; }
.folder-icon::before { content: ''; position: absolute; width: 26px; height: 9px; left: -1px; top: -9px; border-radius: 3px 4px 0 0; border: 1px solid #c9a779; border-bottom: 0; background: #967244; }
.file-views { display: flex; gap: 8px; margin-bottom: 26px; }
.file-views button { background: transparent; border-color: #625846; font-size: 14px; }
.file-views button[aria-pressed=true] { background: #493b2a; color: #f2d3a2; border-color: #b29365; }
.terminal-app { display: flex; flex-direction: column; background: #1b201c; font-family: ui-monospace, Consolas, monospace; padding: 20px 24px; }
.terminal-app .terminal-notice { color: #b8c3a6; font-size: 13px; border-bottom: 1px solid #46503e; padding-bottom: 16px; margin-bottom: 12px; }
.terminal-log { flex: 1; overflow-y: auto; min-height: 60px; padding: 4px 10px 0 2px; scrollbar-color: #738065 #1b201c; }
.terminal-app .terminal-command { color: #e3c18f; margin: 8px 0; font-size: 13px; }
.terminal-output { color: #d3dcc8; margin: 0 0 22px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.terminal-form { flex: none; display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid #46503e; font-size: 13px; }
.terminal-form > span { white-space: nowrap; color: #e3c18f; }
.terminal-form input { flex: 1; width: 0; background: #20291f; font-size: 14px; }
.terminal-form button { flex: none; white-space: nowrap; font-size: 13px; padding: 8px 12px; }
/* Model app. Recorded output is walnut/amber; text generated in this browser is sage, and each is also labelled in words. */
.language-model { max-width: 780px; }
.model-facts { padding-left: 20px; color: #d2cabe; font-size: 14px; }
.model-facts li { padding-left: 5px; margin-bottom: 14px; }
select { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid #8b775a; border-radius: 5px; color: #eee4d4; background: #302d25; font: inherit; text-overflow: ellipsis; }
select:focus-visible, .terminal-log:focus-visible, .generation-reason:focus-visible, .generated-output:focus-visible { outline: 3px solid #ffce8b; outline-offset: 3px; }
.model-panel { margin: 30px 0 0; padding: 22px 24px 8px; border: 1px solid #4a4337; border-radius: 8px; background: #26251f; }
.model-recorded { border-left: 3px solid #a98557; }
.model-generate { border-left: 3px solid #7f9171; background: #212520; }
.model-panel-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; font-size: 16px; font-weight: 500; letter-spacing: -.01em; color: #eee5d6; }
.model-chip { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 600; line-height: 1.6; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.model-chip-recorded { color: #f1d3a6; background: #4a3a28; border: 1px solid #8a6c46; }
.model-chip-live { color: #d6e2c2; background: #2f3a2b; border: 1px solid #6c8160; }
.model-chip-off { color: #d8d0c2; background: #33302a; border: 1px solid #6d6557; }
.model-chip-end { color: #e9e2d4; background: #3a3630; border: 1px solid #6d6557; }
.model-panel .field > span { color: #d5ccbc; }
.recorded-sample { max-width: none; white-space: pre-wrap; margin-top: 18px; padding: 22px; border: 1px solid #544b3d; border-radius: 5px; background: #1c1e1b; color: #cdc7bb; }
.sample-opening { color: #f1c888; font-weight: 550; }
.model-prompt-field { gap: 8px; }
.model-prompt { min-height: 72px; padding: 12px 14px; line-height: 1.55; color: #eef0e6; background: #1b201c; border-color: #6c8160; resize: vertical; overflow-wrap: anywhere; }
.model-prompt[readonly] { color: #c9cebf; border-style: dashed; }
.model-prompt:disabled { color: #b4ada1; background: #25231f; border-color: #555048; }
.model-prompt[aria-invalid=true] { border-color: #e39a7c; }
.model-prompt-hint { display: block; margin-top: 6px; font-size: 12px; line-height: 1.5; color: #b9b4a8; }
.model-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.model-actions button { min-width: 108px; }
.model-generate-button:not(:disabled) { color: #142012; background: #b9cf9f; border-color: #d3e4bd; font-weight: 600; }
.model-generate-button:not(:disabled):hover { background: #cadcb3; }
.model-stop-button { border-color: #c79a6c; color: #f4d9b8; }
.language-model .samples-note, .language-model .sample-stop, .language-model .model-publication, .language-model .generation-reason, .language-model .model-settings { font-size: 13px; color: #bcb2a2; }
.language-model .generation-reason { margin: 12px 0 14px; min-height: 1.7em; }
.language-model[data-model-state=error] .generation-reason { color: #f0b49a; }
.language-model[data-model-state=running] .generation-reason, .language-model[data-model-state=loading] .generation-reason { color: #d6e2c2; }
.model-progress { position: relative; height: 6px; margin: 0 0 18px; overflow: hidden; border-radius: 3px; background: #33382f; }
.model-progress-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: #b9cf9f; transition: width .2s linear; }
.model-progress[data-mode=indeterminate] .model-progress-fill { width: 34%; animation: model-progress 1.4s ease-in-out infinite; }
@keyframes model-progress { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.model-result { margin: 0 0 18px; }
.model-result-head { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.generated-output { max-width: none; white-space: pre-wrap; max-height: 320px; overflow-y: auto; margin: 0; padding: 18px 20px; border: 1px solid #46503e; border-radius: 5px; background: #1b201c; color: #dfe5d4; scrollbar-color: #738065 #1b201c; }
.generated-opening { color: #c9d6b0; font-weight: 550; }
.generated-text { color: #eef0e6; }
.language-model[data-model-state=running] .generated-text::after { content: '▍'; margin-left: 1px; color: #b9cf9f; animation: model-caret 1s steps(2) infinite; }
@keyframes model-caret { 50% { opacity: 0; } }
.model-result[data-end=stopped] .generated-output, .model-result[data-end=error] .generated-output { border-style: dashed; }
.language-model .model-settings { margin: -6px 0 14px; }
.language-model .model-publication { margin-top: 26px; border-top: 1px solid #514a3f; padding-top: 20px; }
@media (prefers-reduced-motion: reduce) {
  .model-progress[data-mode=indeterminate] .model-progress-fill { width: 100%; animation: none; opacity: .45; }
  .language-model[data-model-state=running] .generated-text::after { animation: none; }
  .model-progress-fill { transition: none; }
}
.desktop-note + .desktop-note { border-top: 1px solid #514a3f; margin-top: 32px; padding-top: 26px; }
@media (max-width: 700px) {
  .desktop-shell { padding: 0 10px max(12px, env(safe-area-inset-bottom)); gap: 10px; }
  .desktop-bar { min-height: 96px; gap: 8px; }
  .desktop-wordmark { font-size: 23px; flex: none; }
  .desktop-actions { flex-direction: column; align-items: stretch; gap: 0; }
  .desktop-actions button { min-height: 44px; padding: 4px 10px; font-size: 12px; }
  .desktop-window { border-radius: 7px; }
  .desktop-window:not([data-focused=true]) { visibility: hidden; }
  .window-titlebar { padding-left: 12px; }
  .window-title { cursor: default; font-size: 13px; touch-action: manipulation; }
  .window-body { padding: 20px 18px; }
  .window-body h2 { font-size: 22px; }
  .window-body p { font-size: 14px; }
  .desktop-dock { gap: 2px; padding: 5px 3px; border-radius: 9px; }
  .dock-app { padding: 8px 1px 12px; gap: 5px; min-width: 0; }
  .dock-icon { width: 33px; height: 32px; font-size: 20px; }
  .dock-label { font-size: 10px; line-height: 1.2; overflow-wrap: normal; }
  .dock-app[data-app=language-model] .dock-label { font-size: 0; }
  .dock-app[data-app=language-model] .dock-label::after { content: 'Model'; font-size: 10px; }
  .project-folders { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .project-folder { padding: 20px 8px; min-height: 140px; font-size: 13px; }
  .file-toolbar { gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
  .terminal-app { padding: 16px 12px; }
  .terminal-form { gap: 6px; }
  .terminal-form input { padding: 8px; }
  .terminal-form button { padding: 8px; }
  .recorded-sample, .generated-output { padding: 14px; }
  .model-panel { margin-top: 24px; padding: 16px 14px 4px; }
  .model-actions button { flex: 1 1 120px; }
  .desktop-welcome { width: 90%; margin-top: 6vh; }
}

.app-snake .window-body { container-type: inline-size; }
