/* Crossway — crosswayapp.com
   A System 7 shareware page, executed with modern polish.
   Design system: the page is a classic Mac desktop — menu bar on top,
   content sections as windows, the donate ask as an alert dialog.
   Single deliberate appearance (Platinum light) — this is a period piece.
   No frameworks, no build step, no external requests: every asset is
   served from this site. */

/* ---------- tokens ---------- */

:root {
  --ink: #000000;
  --paper: #ffffff;
  --desktop-a: #afafaf;      /* 50%-dither desktop pattern, cell A */
  --desktop-b: #cfcfcf;      /* cell B */
  --dim: #8a8a8a;            /* disabled chrome */
  --muted: #4a4a4a;          /* captions, fine print */
  --link: #0000c8;           /* period hyperlink blue */
  --link-visited: #551a8b;
  --font-display: "ChicagoFLF", "Charcoal", "Geneva", "Helvetica Neue", sans-serif;
  --font-body: "Geneva", Verdana, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Monaco", "Menlo", "Courier New", monospace;
  --border: 1.5px;           /* the classic 1px frame, at today's densities */
  --radius-btn: 9px;
}

@font-face {
  font-family: "ChicagoFLF";
  src: url("assets/ChicagoFLF.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------- ground ---------- */

* { box-sizing: border-box; }

html {
  scroll-padding-top: 52px; /* clear the sticky menu bar on anchor jumps */
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  color: var(--ink);
  background-color: #c2c2c2; /* explicit ground even if gradients fail */
  background-image: repeating-conic-gradient(
    var(--desktop-a) 0% 25%, var(--desktop-b) 0% 50%);
  background-size: 4px 4px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--paper); }

:focus-visible {
  outline: 2px dashed var(--ink); /* marching ants */
  outline-offset: 2px;
}

/* ---------- type ---------- */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: normal;
  line-height: 1.25;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}
h1 { font-size: 34px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 2px; }

small, .caption {
  font-size: 12.5px;
  color: var(--muted);
}

code, kbd {
  font-family: var(--font-mono);
  font-size: 0.86em;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- menu bar (site nav) ---------- */

.menubar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 14px;
  background: var(--paper);
  border-bottom: var(--border) solid var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  overflow-x: auto;
}
.menubar a {
  color: var(--ink);
  text-decoration: none;
  padding: 5px 10px;
  white-space: nowrap;
}
.menubar a:visited { color: var(--ink); }
.menubar a:hover, .menubar a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: none;
}
.menubar .apptitle {
  padding: 5px 10px 5px 2px;
  white-space: nowrap;
}
.menubar .cmdglyph { font-size: 17px; margin-right: 6px; }
.menubar .spacer { flex: 1; }

/* ---------- desktop layout ---------- */

.desktop {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}
.desktop > * + * { margin-top: 40px; }

/* ---------- window ---------- */

.mac-window {
  background: var(--paper);
  border: var(--border) solid var(--ink);
  box-shadow: 3px 3px 0 0 var(--ink);
}

.titlebar {
  position: relative;
  height: 28px;
  border-bottom: var(--border) solid var(--ink);
  text-align: center;
}
.titlebar::before {           /* the racing stripes */
  content: "";
  position: absolute;
  inset: 6px 8px;
  background: repeating-linear-gradient(
    180deg, var(--ink) 0 1.5px, transparent 1.5px 4.5px);
}
.titlebar .title {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 28px;
  background: var(--paper);
  padding: 0 12px;
}
.closebox {
  position: absolute;
  left: 10px;
  top: 7px;
  width: 13px;
  height: 13px;
  background: var(--paper);
  border: var(--border) solid var(--ink);
  box-shadow: 0 0 0 4px var(--paper); /* white pad over the stripes */
}

.window-body { padding: 26px 30px; }
.window-body.flush { padding: 0; }
.window-body.flush img { display: block; width: 100%; height: auto; }

/* two windows side by side on the desktop (the hero illustrations) */
.window-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.window-body.figure { padding: 20px 22px; }
.window-body.figure svg {
  display: block;
  width: 100%;
  height: auto;
}
.figcaption {
  margin-top: 12px;
  text-align: center;
}

/* terminal command block (Troubleshooting page) */
pre.cmd {
  border: var(--border) solid var(--ink);
  background: var(--paper);
  padding: 10px 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  margin: 10px 0 0;
}

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

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: var(--border) solid var(--ink);
  border-radius: var(--radius-btn);
  padding: 7px 22px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
}
.btn:visited { color: var(--ink); }
.btn:active {                  /* the authentic press inversion */
  background: var(--ink);
  color: var(--paper);
}

/* default button: the double outline ring */
.btn-default {
  position: relative;
}
.btn-default::after {
  content: "";
  position: absolute;
  inset: -6.5px;
  border: 3px solid var(--ink);
  border-radius: calc(var(--radius-btn) + 6px);
  pointer-events: none;
}

/* disabled: dimmed chrome + a dither wash over the face */
.btn.is-disabled {
  color: var(--dim);
  border-color: var(--dim);
  cursor: default;
  pointer-events: none;
  background-image: repeating-conic-gradient(
    rgba(255, 255, 255, 0.55) 0% 25%, transparent 0% 50%);
  background-size: 2px 2px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.btn-row.right { justify-content: flex-end; }

/* ---------- keycaps ---------- */

.key {
  display: inline-block;
  min-width: 34px;
  padding: 4px 10px 5px;
  font-family: var(--font-display);
  font-size: 15px;
  text-align: center;
  background: var(--paper);
  border: var(--border) solid var(--ink);
  border-radius: 7px;
  box-shadow: 0 2.5px 0 0 var(--ink);
  line-height: 1.2;
}
.key + .key { margin-left: 6px; }

.chord {
  white-space: nowrap;
}

.shortcut-table {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 26px;
  align-items: center;
}
.shortcut-table .what { margin: 0; }
.shortcut-table .what strong { font-family: var(--font-display); font-weight: normal; }

/* ---------- alert dialog ---------- */

.mac-dialog {
  position: relative;
  background: var(--paper);
  border: var(--border) solid var(--ink);
  box-shadow: 3px 3px 0 0 var(--ink);
}
.mac-dialog::before {          /* inner frame line — the modal look */
  content: "";
  position: absolute;
  inset: 4px;
  border: var(--border) solid var(--ink);
  pointer-events: none;
}
.dialog-body {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px 24px;
  padding: 34px 36px 30px;
}
.dialog-icon { grid-row: span 2; }
.dialog-icon svg { display: block; }
.dialog-actions {
  grid-column: 2;
  margin-top: 18px;
}

/* ---------- read-me list ---------- */

.steps {
  margin: 0;
  padding-left: 1.4em;
}
.steps li { margin-bottom: 0.7em; }
.steps li:last-child { margin-bottom: 0; }

.notice {
  border: var(--border) solid var(--ink);
  padding: 12px 16px;
  margin-top: 18px;
  background-image: repeating-conic-gradient(
    rgba(0, 0, 0, 0.04) 0% 25%, transparent 0% 50%);
  background-size: 2px 2px;
}

/* ---------- lede ---------- */

.lede { text-align: center; }
.lede h1 { margin-bottom: 0.35em; }
.lede .tagline {
  font-size: 17px;
  max-width: 34em;
  margin: 0 auto 1.6em;
}
.lede .btn-row { justify-content: center; margin-bottom: 14px; }

/* ---------- footer ---------- */

.footer {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink);
}
.footer .links {
  font-family: var(--font-display);
  font-size: 14px;
  margin-bottom: 10px;
}
.footer .links a { color: var(--ink); }
.footer .links a:visited { color: var(--ink); }
.footer .fineprint { color: var(--muted); }

/* ---------- small screens ---------- */

@media (max-width: 700px) {
  h1 { font-size: 26px; }
  .desktop { padding: 24px 12px 56px; }
  .desktop > * + * { margin-top: 28px; }
  .window-duo { grid-template-columns: 1fr; gap: 28px; }
  .window-body { padding: 20px 18px; }
  .dialog-body {
    grid-template-columns: 1fr;
    padding: 26px 22px 24px;
  }
  .dialog-icon { grid-row: auto; }
  .dialog-actions { grid-column: 1; }
  .shortcut-table { gap: 14px 16px; }
}
