:root {
  --desk: #c5cfc6;
  --ink: #1c2430;
  --paper: #f3ecdc;
  --paper-edge: #d9d0bb;
  --muted: #5c675f;
  --link: #1d4e45;
  --session: #243028;
  --session-ink: #d7e2da;
  --win: #f3f6fb;
  --win-ink: #1b1b1b;
  --linux: #2b2118;
  --linux-ink: #f3e6c8;
  --screen-win: #0c0c0c;
  --screen-linux: #1a140f;
  --screen-session: #121814;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--desk);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.45;
}

.desk {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1f7a4d;
}

.pulse.live {
  box-shadow: 0 0 0 0 rgba(31, 122, 77, 0.6);
  animation: beat 1.6s ease-out infinite;
}

@keyframes beat {
  70% { box-shadow: 0 0 0 8px rgba(31, 122, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 122, 77, 0); }
}

.incident {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 22px;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  padding: 16px 18px 8px;
  margin-bottom: 18px;
}

.incident h1,
.incident h2 {
  margin: 0 0 6px;
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  font-weight: 600;
}

.incident h1 { font-size: 32px; line-height: 1; }
.incident h2 { font-size: 22px; }
.incident p { margin: 0 0 8px; }
.incident a { color: var(--link); }

.controls {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

button {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #8d907f;
  border-radius: 4px;
  padding: 8px 14px;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #1d4e45;
  outline-offset: 2px;
}

button:hover { background: #fffaf0; }

.stage {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  margin: 0 0 8px;
  color: var(--muted);
}

.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.done { color: var(--ink); }

.work { min-width: 0; }

.now {
  background: #edf1ea;
  border: 1px solid #8d907f;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.now p { margin: 0; }

.viewport {
  position: relative;
  min-height: 520px;
}
.viewport[data-os="windows"] {
  border: 0;
  background:
    radial-gradient(ellipse at 18% 16%, #7ad7ff 0%, transparent 36%),
    radial-gradient(ellipse at 78% 78%, #7a5cff 0%, transparent 42%),
    linear-gradient(165deg, #0a4f8c, #10284f 58%, #1b1460);
  min-height: 560px;
  padding: 36px 22px 58px;
}
.win-desktop { display: none; }
.viewport[data-os="windows"] .win-desktop { display: block; }
.pc-name {
  position: absolute;
  top: 14px;
  left: 18px;
  margin: 0;
  color: #f4f7fb;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 13px;
}
.taskbar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: rgba(32, 32, 32, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #f3f3f3;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 12px;
}
.start-mark {
  width: 16px;
  height: 16px;
  background:
    linear-gradient(#5eb3ff, #5eb3ff) 0 0 / 7px 7px no-repeat,
    linear-gradient(#5eb3ff, #5eb3ff) 9px 0 / 7px 7px no-repeat,
    linear-gradient(#5eb3ff, #5eb3ff) 0 9px / 7px 7px no-repeat,
    linear-gradient(#5eb3ff, #5eb3ff) 9px 9px / 7px 7px no-repeat;
}
.task-search {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 4px 10px;
}
.task-ps {
  margin-left: 4px;
  padding: 4px 8px 6px;
  border-bottom: 2px solid #7ad7ff;
}
.tray { margin-left: auto; }
.window {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 460px;
}
.viewport[data-os="windows"] .window {
  height: 470px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.viewport {
  border: 1px solid #1c2430;
  background: var(--screen-session);
  display: flex;
  flex-direction: column;
}

.titlebar {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  background: var(--session);
  color: var(--session-ink);
  font-size: 14px;
}

.viewport[data-os="windows"] .titlebar {
  grid-template-columns: auto auto 1fr auto;
  background: #f3f3f3;
  color: #1a1a1a;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  min-height: 32px;
  padding-left: 10px;
}

.ps-icon { display: none; }

.viewport[data-os="windows"] .ps-icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  background: #012456;
  color: #fff;
  font-family: Consolas, monospace;
  font-size: 9px;
}

.viewport[data-os="windows"] .title { text-align: left; }

.viewport[data-os="linux"] .titlebar {
  background: var(--linux);
  color: var(--linux-ink);
}

.title { text-align: center; }

.marks, .win-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.win-controls { justify-content: flex-end; }

.marks i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid currentColor;
  display: block;
}

.viewport[data-os="linux"] .marks i { background: currentColor; border: 0; opacity: 0.85; }
.viewport[data-os="windows"] .marks { display: none; }
.viewport[data-os="linux"] .win-controls,
.viewport[data-os="session"] .win-controls { visibility: hidden; }

.screen {
  margin: 0;
  padding: 16px 16px 20px;
  min-height: 420px;
  max-height: 52vh;
  overflow: auto;
  font-family: "IBM Plex Mono", "ui-monospace", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
  color: #d7e2da;
  white-space: pre-wrap;
  background: var(--screen-session);
}

.viewport[data-os="windows"] .screen {
  background: #012456;
  color: #f2f2f2;
  font-family: Consolas, "Cascadia Mono", ui-monospace, monospace;
  min-height: 0;
  max-height: none;
  flex: 1;
}

.viewport[data-os="linux"] .screen {
  background: var(--screen-linux);
  color: #e6d7c3;
}

.line { margin: 0; }
.line.cmd { color: #f7f4ee; }
.viewport[data-os="linux"] .line.cmd { color: #f0c27a; }
.viewport[data-os="windows"] .line.cmd { color: #ffffff; }
.viewport[data-os="windows"] .line.note { color: #d6e6ff; }
.viewport[data-os="windows"] .line.ok { color: #b7f0c8; }
.viewport[data-os="windows"] .line.hit { color: #ffd7a8; }
.line.ok { color: #b7e0c4; }
.line.hit { color: #f0c2b4; }
.line.note { color: #f4efe4; margin-top: 10px; }
.caret {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: currentColor;
  vertical-align: text-bottom;
  margin-left: 2px;
}

.folder h2 {
  margin: 0 0 6px;
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  font-size: 28px;
  font-weight: 600;
}

.folder-note, .fine {
  color: var(--muted);
  margin: 0 0 12px;
}

.sheet {
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  padding: 14px 16px 12px;
  margin-bottom: 12px;
}

.sheet h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.sheet p { margin: 0 0 8px; }
.sheet .name, .ticket-id {
  font-family: "Iowan Old Style", Palatino, serif;
  font-size: 22px;
  margin-bottom: 6px;
}

.sheet a { color: var(--link); }

.sheet ul {
  margin: 0;
  padding-left: 18px;
}

.sheet li { margin: 4px 0; }

.player {
  border-top: 1px solid var(--paper-edge);
  padding-top: 8px;
}

.frame {
  min-height: 3.2em;
  margin: 0 0 8px;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fine { margin-top: 16px; font-size: 14px; }

@media (max-width: 980px) {
  .mast, .incident { display: flex; flex-direction: column; align-items: flex-start; }
  .stage { grid-template-columns: 1fr; }
  .incident h1 { font-size: 28px; }
  .screen { max-height: 48vh; min-height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  .caret { display: none; }
  .pulse.live { animation: none; }
}
