/* ammonia's website: a windows 98 desktop for the chrome, plain readable text for everything you read */

:root {
  --desktop: #1f7a74;
  --face: #c3c3c3;
  --light: #ffffff;
  --mid: #dfdfdf;
  --shadow: #808080;
  --dark: #000000;
  --title-a: #0a246a;
  --title-b: #1084d0;
  --paper: #ffffff;
  --ink: #000000;
  --link: #0b38a8;
  --chrome: Tahoma, Verdana, "Segoe UI", sans-serif;
  --read: "Atkinson Hyperlegible", Verdana, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--desktop); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--desktop);
  color: var(--ink);
  font: 13px/1.4 var(--chrome);
  padding: 48px 16px 32px;
}

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

:focus-visible { outline: 2px dotted var(--dark); outline-offset: 2px; }

/* ---------- windows ---------- */

.window {
  background: var(--face);
  padding: 3px;
  box-shadow:
    inset -1px -1px var(--dark), inset 1px 1px var(--mid),
    inset -2px -2px var(--shadow), inset 2px 2px var(--light);
  margin: 0 auto;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 2px 3px 2px 4px;
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
  color: #fff;
  font-weight: bold;
  font-size: 13px;
}

.titlebar h1, .titlebar h2, .titlebar p {
  margin: 0;
  font: inherit;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.titlebar img { width: 16px; height: 16px; image-rendering: pixelated; }

.close {
  width: 18px;
  height: 16px;
  padding: 0;
  display: grid;
  place-items: center;
  font: bold 12px/1 var(--chrome);
  color: var(--dark);
}

.body { padding: 14px 12px 12px; }

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 26px;
  padding: 4px 14px;
  background: var(--face);
  color: var(--dark);
  font: 13px var(--chrome);
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow:
    inset -1px -1px var(--dark), inset 1px 1px var(--light),
    inset -2px -2px var(--shadow), inset 2px 2px var(--mid);
}

.button:active {
  box-shadow:
    inset -1px -1px var(--light), inset 1px 1px var(--dark),
    inset -2px -2px var(--mid), inset 2px 2px var(--shadow);
  padding: 5px 13px 3px 15px;
}

/* the 98 "default button" has an extra black ring */
.button.default { outline: 1px solid var(--dark); outline-offset: -1px; }

.button:focus-visible { outline: 1px dotted var(--dark); outline-offset: -5px; }

.close.button { min-width: 0; min-height: 0; padding: 0; }
.close.button:active { padding: 1px 0 0 1px; }

/* ---------- the hero dialog ---------- */

.dialog { max-width: 520px; }

.dialog .body { display: flex; gap: 16px; padding: 22px 18px 18px; }

.dialog-icon { flex: none; width: 40px; height: 40px; }

.dialog-text { font-size: 14px; line-height: 1.5; }
.dialog-text p { margin: 0 0 10px; max-width: 46ch; }
.dialog-text strong { font-size: 18px; display: block; margin-bottom: 6px; }

.actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 12px 14px;
}

/* the joke dialog that appears when you try to close the first one */
.popup {
  position: fixed;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 32px));
  z-index: 10;
}

.popup[hidden] { display: none; }

.popup.shake { animation: shake 0.3s steps(4) 1; }

@keyframes shake {
  25% { transform: translate(calc(-50% - 6px), -50%); }
  50% { transform: translate(calc(-50% + 6px), -50%); }
  75% { transform: translate(calc(-50% - 3px), -50%); }
}

@media (prefers-reduced-motion: reduce) {
  .popup.shake { animation: none; }
}

/* ---------- the command list (explorer "details" view) ---------- */

.explorer { max-width: 760px; margin-top: 40px; }

.pane {
  background: var(--paper);
  margin: 2px;
  box-shadow:
    inset -1px -1px var(--light), inset 1px 1px var(--shadow),
    inset -2px -2px var(--mid), inset 2px 2px var(--dark);
  padding: 2px;
  overflow-x: auto;
}

table { border-collapse: collapse; width: 100%; font-size: 13px; }

th {
  text-align: left;
  font-weight: normal;
  background: var(--face);
  padding: 3px 8px;
  box-shadow:
    inset -1px -1px var(--dark), inset 1px 1px var(--light),
    inset -2px -2px var(--shadow);
  white-space: nowrap;
}

td { padding: 5px 8px; vertical-align: top; font-family: var(--read); font-size: 14px; }

td:first-child { white-space: nowrap; font-family: var(--chrome); font-size: 13px; }

tr:nth-child(even) td { background: #f3f3f3; }

.statusbar {
  display: flex;
  gap: 4px;
  margin-top: 2px;
  font-size: 12px;
}

.statusbar > * {
  flex: 1;
  padding: 2px 6px;
  box-shadow: inset -1px -1px var(--light), inset 1px 1px var(--shadow);
}

.statusbar > :last-child { flex: none; }

/* ---------- reading pages (terms / privacy) ---------- */

.notepad { max-width: 820px; }

.notepad .pane { padding: 28px clamp(18px, 5vw, 56px) 40px; overflow: visible; }

.prose {
  font: 17px/1.65 var(--read);
  max-width: 68ch;
}

.prose h1 { font-size: 30px; line-height: 1.2; margin: 0 0 6px; }
.prose h2 { font-size: 20px; line-height: 1.3; margin: 36px 0 8px; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose .updated { color: #444; margin-bottom: 28px; }
.prose .summary {
  background: #ffffe1; /* the 98 tooltip yellow */
  border: 1px solid var(--dark);
  padding: 12px 16px;
}

.back { margin: 0 auto 14px; max-width: 820px; }

/* ---------- footer (desktop icons along the bottom) ---------- */

footer {
  max-width: 760px;
  margin: 40px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
  font-size: 13px;
}

footer a { color: #fff; }
footer p { margin: 0; color: #fff; opacity: 0.85; }

@media (max-width: 560px) {
  body { padding-top: 24px; }
  .dialog .body { flex-direction: column; align-items: flex-start; gap: 10px; }
  .actions .button { flex: 1; }
  .prose { font-size: 16px; }
  .prose h1 { font-size: 26px; }
}
