@font-face {
  font-family: 'ChicagoFLF';
  src: url('/fonts/ChicagoFLF.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/InterVariable.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

:root {
  --sand:       #E5DAB6;
  --sand-dot:   #C9BE94;
  --gray:       #C0C0C0;
  --gray-light: #DEDEDE;
  --gray-dark:  #7B7B7B;
  --border:     #000000;
  --title:      #7E7E9F;
  --surface:    #ffffff;
  --text:       #0E0E0E;
  --text-dim:   #5C5C5C;
  --accent:     #F4A12B;
  --accent-dark:#C97D14;
  --chrome:     'ChicagoFLF', 'Geneva', monospace;
  --body:       'Inter', system-ui, sans-serif;
}

html {
  background-color: var(--sand);
  background-image: radial-gradient(var(--sand-dot) 1px, transparent 1px);
  background-size: 4px 4px;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 24px 16px 64px;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

/* CRT scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.032) 3px,
    rgba(0, 0, 0, 0.032) 4px
  );
}

.page {
  max-width: 680px;
  margin: 0 auto;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-family: var(--chrome);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
}
.back-link:hover { color: var(--text); }

/* Mac OS 8 window */
.window {
  background: var(--gray);
  border: 1px solid var(--border);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}

.window__titlebar {
  height: 22px;
  background: var(--title);
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.18) 0px,
    rgba(255, 255, 255, 0.18) 1px,
    transparent 1px,
    transparent 2px
  );
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.window__close {
  position: absolute;
  left: 6px;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  background: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 9px;
  color: var(--text);
  box-shadow: inset 1px 1px 0 var(--gray-light), inset -1px -1px 0 var(--gray-dark);
}
.window__close:hover { background: var(--gray-light); }

.window__title {
  font-family: var(--chrome);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  pointer-events: none;
}

.window__content {
  background: var(--surface);
  padding: 28px 32px 40px;
}

/* Status bar */
.window__status {
  height: 18px;
  background: var(--gray);
  border-top: 1px solid var(--border);
  padding: 0 8px;
  display: flex;
  align-items: center;
  font-family: 'JetBrains Mono', 'Menlo', 'Courier New', monospace;
  font-size: 10px;
  color: var(--text-dim);
}

/* Typography */
h1 {
  font-family: var(--chrome);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.2;
}

.meta {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 28px;
}

h2 {
  font-family: var(--chrome);
  font-size: 13px;
  font-weight: 700;
  margin: 28px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray);
}

p  { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 12px; padding-left: 20px; }
li { margin-bottom: 4px; }

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

strong { font-weight: 600; }

/* Footer nav */
.footer-links {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--gray);
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .window__content { padding: 20px 18px 32px; }
  body { padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  body::after { display: none; }
}
