* { box-sizing: border-box; }
html { background: #000; color-scheme: dark; }
body { margin: 0; background: #000; color: #fff; }
.terminal-window.window {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 3px;
  background: silver;
}
.title-bar { min-height: 28px; flex-shrink: 0; padding: 3px 4px; }
.title-bar-text { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
.title-bar-text img { flex-shrink: 0; image-rendering: pixelated; }
.title-bar-controls { flex-shrink: 0; margin-left: 8px; }
.title-bar-controls button { cursor: pointer; }
.title-bar-controls button:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.terminal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 3px;
  padding: clamp(24px, 4vw, 64px);
  background: #000;
  color: #fff;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  font-family: "Lucida Console", Consolas, Menlo, monospace;
  text-align: left;
}
.identity { flex-shrink: 0; }
.command, .prompt { margin: 0; font: 15px/1.5 "Lucida Console", Consolas, Menlo, monospace; }
.command { margin-bottom: 24px; }
h1 { margin: 0; color: #fff; font: 700 clamp(36px, 5vw, 68px)/1.12 "Pixelated MS Sans Serif", Arial, sans-serif; letter-spacing: normal; }
.role { margin: 12px 0 0; color: #fff; font: 400 clamp(20px, 2.4vw, 30px)/1.4 "Pixelated MS Sans Serif", Arial, sans-serif; }
.command.folders-command { margin: clamp(32px, 4vh, 48px) 0 0; }
.folders {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, 112px);
  gap: 24px 16px;
  width: min(100%, 672px);
  margin-top: 16px;
  margin-left: -12px;
}
.folder, .folder:visited {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  align-self: start;
  gap: 8px;
  min-width: 0;
  min-height: 104px;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 8px 4px;
  color: #fff;
  background: transparent;
  font: 14px/1.45 "Pixelated MS Sans Serif", Arial, sans-serif;
  text-decoration: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
button.folder:not(:disabled):active { box-shadow: none; padding: 8px 4px; }
.folder img { width: 64px; height: 64px; flex-shrink: 0; image-rendering: pixelated; }
.folder-label { padding: 2px 5px; border: 1px solid transparent; }
.folder:hover .folder-label, .folder:focus-visible .folder-label { background: #000080; color: #fff; border: 1px dotted #fff; }
.folder:focus { outline: none; }
.folder:active .folder-label { background: #000080; color: #fff; }
.services-window { width: min(580px, calc(100% - 32px)); max-height: calc(100vh - 32px); max-height: calc(100svh - 32px); margin: auto; border: 0; padding: 3px; color: #000; color-scheme: light; }
.services-window::backdrop { background: rgb(0 0 0 / .55); }
.services-window .title-bar-text { overflow: visible; }
.services-body { padding: 16px; font-size: 14px; line-height: 1.6; }
.services-body p { margin: 0 0 16px; }
.services-body ul { margin: 0; padding-left: 24px; }
.services-body li { padding: 4px 0; }
.services-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.services-actions button { min-height: 32px; cursor: pointer; }
.prompt { margin-top: auto; padding-top: 24px; padding-bottom: 8px; }
.cursor { animation: blink 1.1s steps(1, end) infinite; }
.status-bar { flex-shrink: 0; margin-top: 3px; color: #000; gap: 3px; }
.status-bar-field { margin: 0; min-height: 21px; padding: 3px 6px; font-size: 11px; }
.status-bar-field:first-child { flex: 1; }
.status-bar-field:last-child { flex: 0 0 auto; min-width: 112px; }
.skip-link { position: absolute; top: -100px; left: 8px; z-index: 5; padding: 10px; background: #fff; color: #000; }
.skip-link:focus { top: 8px; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (max-width: 639px) {
  .title-bar-text { max-width: calc(100vw - 46px); font-size: 11px; white-space: nowrap; overflow: hidden; }
  .terminal-body { padding: 32px 22px 20px; }
  .command, .prompt { font-size: 13px; }
  .command { margin-bottom: 28px; }
  h1 { font-size: clamp(32px, 9vw, 44px); }
  .role { font-size: 20px; margin-top: 10px; }
  .command.folders-command { margin-top: 32px; }
  .folders { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 112px; width: 100%; margin-top: 16px; margin-left: 0; gap: 24px 12px; }
  .folder { font-size: 13px; }
  .folder img { width: 56px; height: 56px; }
  .prompt { padding-top: 36px; }
  .status-bar-field:last-child { min-width: 90px; }
}
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
@media (forced-colors: active) { .folder-label { border: 1px solid LinkText; } }
