:root {
  --beige: #efe9d4;
  --beige-dark: #d8cfae;
  --ink: #25201a;
  --muted: #6e655a;
  --line: #c8bf9e;
  --paper: #faf6e8;
  --accent: #5a3a1e;
  --accent-light: #f1e4cf;
  --keycap: #d9d4be;
  --crt: #0b0f0a;
  --crt-glow: #7dd87d;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 16px/1.6 Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(120, 100, 60, 0.02) 0px,
      rgba(120, 100, 60, 0.02) 1px,
      transparent 1px,
      transparent 3px
    );
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.prose-wrap { max-width: 760px; }

a { color: var(--accent); }
a:hover { color: #2a1a0a; }
.muted { color: var(--muted); }
.back {
  display: inline-block; margin: 18px 0;
  font-family: "Courier New", monospace; font-size: 0.9rem;
  text-decoration: none; color: var(--muted);
}
.back:hover { color: var(--accent); }

/* ===== Header ===== */
.site-header {
  background: var(--ink);
  color: var(--beige);
  padding: 16px 0;
  border-bottom: 4px solid var(--beige-dark);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand {
  color: var(--beige);
  text-decoration: none;
  font-family: "Courier New", monospace;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark { color: #7dd87d; font-size: 1.2rem; }
.site-header nav a {
  color: var(--beige-dark);
  margin-left: 20px;
  text-decoration: none;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}
.site-header nav a:hover { color: #fff; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(180deg, var(--beige) 0%, var(--paper) 100%);
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-family: "Courier New", monospace;
  font-size: 2.4rem;
  margin: 0 0 12px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.hero-tag {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--accent);
  margin: 0 0 12px;
}
.hero-blurb {
  max-width: 720px;
  color: var(--ink);
  font-size: 1.05rem;
  margin: 0;
}

/* ===== Era section on home ===== */
.era-section { margin: 48px 0; }
.era-head {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 8px;
}
.era-head h2 { margin: 0; font-family: "Courier New", monospace; font-size: 1.5rem; }
.era-head h2 a { color: var(--ink); text-decoration: none; }
.era-head h2 a:hover { color: var(--accent); }
.era-years {
  font-family: "Courier New", monospace; font-size: 0.95rem;
  color: var(--muted); letter-spacing: 0.05em;
}
.era-tag { color: var(--muted); font-style: italic; margin: 4px 0 18px; }

/* ===== System grid (home) ===== */
.machine-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px;
}
.machine-card {
  display: block;
  background: var(--beige);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.machine-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(60, 40, 20, 0.12); }
.thumb {
  background: var(--paper);
  height: 150px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.card-body { padding: 12px 14px; }
.card-name { font-family: "Courier New", monospace; font-weight: 700; font-size: 1rem; }
.card-year { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

/* A faux-CRT thumbnail instead of a photo. */
.sys-screen {
  width: 100%; height: 100%;
  background: radial-gradient(120% 120% at 50% 30%, #16201a 0%, var(--crt) 70%);
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 16px 18px;
  font-family: "Courier New", monospace;
  color: var(--crt-glow);
  text-shadow: 0 0 6px rgba(125, 216, 125, 0.5);
}
.sys-category { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.sys-prompt { font-size: 1.05rem; }
.sys-prompt::before { content: "C:\\> "; opacity: 0.6; }
.sys-screen.v86 .sys-prompt::before { content: "boot> "; }
.sys-pending { font-size: 0.7rem; color: #d8b878; letter-spacing: 0.08em; }
.sys-go { font-size: 0.7rem; color: var(--crt-glow); letter-spacing: 0.08em; opacity: 0.85; }

/* ===== System detail page ===== */
.machine { background: var(--beige); border: 1px solid var(--line); border-radius: 4px; padding: 28px 32px; margin: 18px 0 24px; }
.machine-header { margin-bottom: 14px; }
.machine-year { font-family: "Courier New", monospace; color: var(--muted); font-size: 0.95rem; letter-spacing: 0.06em; }
.machine-header h1 { margin: 4px 0 4px; font-family: "Courier New", monospace; font-size: 2rem; }
.sys-summary { font-size: 1.15rem; font-style: italic; color: var(--accent); margin: 0 0 22px; }

/* Emulator stage */
.emu-stage {
  background: #000;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  margin: 0 0 12px;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6);
}
.emu-mount {
  position: relative;
  width: 100%;
  min-height: 360px;
  aspect-ratio: 4 / 3;
  background: var(--crt);
  border-radius: 4px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.emu-mount canvas, .emu-mount .v86-screen { max-width: 100%; }
.emu-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 24px;
  background: radial-gradient(120% 120% at 50% 35%, #16201a 0%, var(--crt) 75%);
}
.emu-start-btn {
  font-family: "Courier New", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--crt);
  background: var(--crt-glow);
  border: none;
  border-radius: 4px;
  padding: 14px 26px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(125, 216, 125, 0.45);
  transition: transform 0.1s, box-shadow 0.15s;
}
.emu-start-btn:hover { transform: translateY(-1px); box-shadow: 0 0 26px rgba(125, 216, 125, 0.7); }
.emu-note { color: var(--crt-glow); font-family: "Courier New", monospace; font-size: 0.85rem; max-width: 420px; opacity: 0.85; margin: 0; }
.emu-hint { font-size: 0.85rem; margin: 0 0 20px; }

/* Install-pending placeholder */
.emu-pending {
  background: #2b2418; color: var(--beige);
  border: 1px solid var(--accent); border-radius: 6px;
  padding: 22px 26px; margin: 0 0 18px;
}
.emu-pending h2 { font-family: "Courier New", monospace; font-size: 1.1rem; margin: 0 0 10px; color: #e8c178; }
.emu-pending code { background: rgba(0,0,0,0.35); padding: 1px 6px; border-radius: 3px; color: #7dd87d; }
.asset-list { font-family: "Courier New", monospace; }

/* Specs / prose (shared with museum look) */
.specs { background: var(--paper); border: 1px solid var(--line); padding: 16px 20px; border-radius: 4px; margin: 20px 0; }
.specs h2 { margin: 0 0 10px; font-family: "Courier New", monospace; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; }
.specs dl { display: grid; grid-template-columns: minmax(120px, 0.32fr) 1fr; gap: 6px 18px; margin: 0; }
.specs dt { font-family: "Courier New", monospace; color: var(--muted); font-size: 0.9rem; }
.specs dd { margin: 0; word-break: break-word; }
.prose h2 { font-family: "Courier New", monospace; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 24px 0 8px; }
.prose p { margin: 0 0 12px; font-size: 1.05rem; }

.prev-next { display: flex; justify-content: space-between; gap: 12px; margin: 16px 0 40px; font-family: "Courier New", monospace; }
.prev-next a { text-decoration: none; color: var(--accent); }
.prev-next a:hover { text-decoration: underline; }

/* ===== Footer ===== */
.site-footer {
  background: var(--ink); color: var(--beige-dark);
  padding: 24px 0; margin-top: 36px;
  font-family: "Courier New", monospace; font-size: 0.85rem;
}
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: #d8cfae; }
.img-credits { max-width: 760px; }

/* ===== Prose pages ===== */
.prose-wrap h1 { font-family: "Courier New", monospace; margin: 8px 0 16px; }
.prose-wrap h2 { font-family: "Courier New", monospace; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 28px; }
