/* sat ($SAT) - Windows 95 theme*/
:root {
  --desktop: #e9a463;
  --face: #c0c0c0;
  --light: #ffffff;
  --shadow: #808080;
  --dark: #000000;
  --title: #9c3d05;
  --title-2: #d9731f;
  --title-text: #ffffff;
  --link: #a3480e;
  --text: #000000;
  --frog: #f28c28;
  --font: "Pixelated MS Sans Serif", "MS Sans Serif", Tahoma, "Segoe UI", Arial, sans-serif;
  --pixel: "Silkscreen", "Courier New", monospace;
  --taskbar-h: 30px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--desktop);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.4;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(var(--taskbar-h) + 24px + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: none;
}
a { color: var(--link); }
a:focus-visible, button:focus-visible { outline: 1px dotted var(--dark); outline-offset: -4px; }
img { max-width: 100%; display: block; }
p { margin: 0 0 10px; }

/* Bevels */
.window, .btn, .field, .inset { border-style: solid; border-width: 2px; }
.window, .btn {
  background: var(--face);
  border-color: var(--light) var(--dark) var(--dark) var(--light);
  box-shadow: inset -1px -1px 0 var(--shadow), inset 1px 1px 0 var(--face);
}
.field, .inset {
  background: var(--light);
  border-color: var(--shadow) var(--light) var(--light) var(--shadow);
  box-shadow: inset 1px 1px 0 var(--dark), inset -1px -1px 0 #dfdfdf;
}

/* Desktop grid of windows */
.desktop { max-width: 960px; margin: 0 auto; display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .desktop { grid-template-columns: repeat(2, 1fr); }
  .span-2 { grid-column: span 2; }
}

.window { padding: 3px; }
.titlebar {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(90deg, var(--title), var(--title-2));
  color: var(--title-text); font-weight: bold; padding: 3px 4px 3px 6px;
  user-select: none;
}
.titlebar .ico { width: 16px; height: 16px; image-rendering: pixelated; }
.titlebar span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.titlebar .controls { display: flex; gap: 2px; }
.tb {
  width: 16px; height: 14px; padding: 0; font: bold 9px var(--font); line-height: 1;
  color: var(--dark); cursor: default;
}
.body { padding: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 28px; padding: 4px 14px; font: 13px var(--font); color: var(--text);
  text-decoration: none; cursor: pointer;
}
.btn:active { border-color: var(--dark) var(--light) var(--light) var(--dark); box-shadow: inset 1px 1px 0 var(--shadow); padding: 5px 13px 3px 15px; }
.btn.default { outline: 1px solid var(--dark); }
.btn.default:not(.tb) { background: var(--frog); font-weight: bold; }
.btn-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 720px) { .btn-row { grid-template-columns: repeat(4, 1fr); } }
.btn .ico { width: 20px; height: 20px; }

/* Hero window */
.hero .body { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.hero img { width: 120px; height: 120px; image-rendering: pixelated; }
.hero h1 { font: 700 34px/1 var(--pixel); margin: 0 0 4px; color: var(--title); text-shadow: 2px 2px 0 var(--frog); }
.hero .ticker { font-weight: bold; margin-bottom: 8px; color: var(--link); }
.hero .tagline { margin: 0; }
@media (max-width: 480px) { .hero .body { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* Contract window */
.ca-row { display: flex; gap: 6px; align-items: stretch; }
.field { flex: 1; min-width: 0; padding: 5px 6px; font: 12px "Courier New", monospace; overflow-wrap: anywhere; display: flex; align-items: center; }
.status {
  margin-top: 8px; padding: 2px 6px; font-size: 12px;
  border: 1px solid; border-color: var(--shadow) var(--light) var(--light) var(--shadow); min-height: 20px;
}

/* Readme: notepad look */
.notepad { padding: 8px; font: 13px "Courier New", monospace; white-space: pre-wrap; line-height: 1.45; }

/* Facts list */
.facts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.facts li { display: flex; gap: 8px; align-items: flex-start; }
.facts input { margin: 2px 0 0; accent-color: var(--frog); }
.window { display: flex; flex-direction: column; }
.window .body { flex: 1; }
.readme .body { display: flex; flex-direction: column; }
.readme .facts { flex: 1; margin-top: 14px; align-content: center; gap: 14px; }

/* Wizard */
.wizard .body { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .wizard .body { grid-template-columns: 150px 1fr; } }
.wizard-side { background: var(--frog); color: var(--dark); padding: 12px; font: 700 16px/1.2 var(--pixel); display: flex; align-items: center; justify-content: center; text-align: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start; }
.steps b { display: block; margin-bottom: 2px; }
.step-n {
  width: 24px; height: 24px; display: grid; place-items: center;
  background: var(--frog); color: var(--dark); font-weight: bold; border: 1px solid var(--dark);
}
.wizard-footer { display: flex; justify-content: flex-end; gap: 6px; padding: 0 12px 12px; }

/* Warning dialog */
.dialog .body { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.dialog .body p { font-size: 12px; }
.dialog .ok { display: flex; justify-content: center; padding: 0 12px 10px; }

/* Taskbar */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  height: calc(var(--taskbar-h) + env(safe-area-inset-bottom, 0px));
  padding: 2px 4px calc(2px + env(safe-area-inset-bottom, 0px));
  background: var(--face); border-top: 1px solid var(--light); box-shadow: 0 -1px 0 var(--shadow);
  display: flex; align-items: center; gap: 6px;
}
.start { font-weight: bold; padding: 2px 8px; min-height: 22px; }
.start .ico { width: 16px; height: 16px; image-rendering: pixelated; }
.task { flex: 1; min-width: 0; justify-content: flex-start; min-height: 22px; padding: 2px 8px; font-weight: normal; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.task.active { border-color: var(--dark) var(--light) var(--light) var(--dark); box-shadow: inset 1px 1px 0 var(--shadow); background: #ffe2c2; }
.tray { padding: 2px 8px; font-size: 12px; min-height: 22px; display: flex; align-items: center; gap: 8px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }