/* ============================================================================
   Computopedia — THE single site stylesheet.
   Y2K / late-90s retro CHROME (Win2000 + GeoCities) over a CLEAN, readable,
   accessible, responsive content core. No per-page CSS anywhere else.
   ========================================================================== */

:root {
  --beige: #c0c0c0;          /* classic Win gray */
  --beige-lt: #d4d0c8;
  --panel: #ece9d8;          /* Win2000 window face */
  --paper: #ffffff;
  --ink: #1a1a1a;
  --dim: #5a5a5a;
  --navy: #000080;           /* titlebar blue */
  --navy2: #1084d0;
  --teal: #008080;           /* Win95 desktop */
  --link: #0000cc;
  --link-visited: #551a8b;
  --accent: #008000;         /* phosphor-ish green accent */
  --hairline: #808080;
  --bevel-lt: #ffffff;
  --bevel-dk: #404040;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--teal);
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 4px);
  color: var(--ink);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding: 16px;
}

/* ---- window frame (the retro "app window" the whole site lives in) ---- */
.winframe {
  max-width: 920px;
  margin: 0 auto;
  background: var(--panel);
  border: 2px solid;
  border-color: var(--bevel-lt) var(--bevel-dk) var(--bevel-dk) var(--bevel-lt);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
}

.titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, var(--navy), var(--navy2));
  color: #fff;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 14px;
  padding: 3px 6px;
}

/* ---- header / nav ---- */
.site-header {
  padding: 14px 20px 10px;
  border-bottom: 2px groove var(--beige-lt);
  background: var(--panel);
}
.logo {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 30px;
  font-weight: bold;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.5px;
  text-shadow: 1px 1px 0 #fff;
}
.site-nav { margin: 8px 0 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
  display: inline-block;
  background: var(--beige);
  border: 2px solid;
  border-color: var(--bevel-lt) var(--bevel-dk) var(--bevel-dk) var(--bevel-lt);
  padding: 3px 9px;
  font-size: 13px;
  color: #000;
  text-decoration: none;
}
.site-nav a:hover { background: var(--beige-lt); }
.site-nav a:active { border-color: var(--bevel-dk) var(--bevel-lt) var(--bevel-lt) var(--bevel-dk); }
.tagline-strip { margin: 8px 0 0; font-size: 12px; color: var(--dim); font-style: italic; }

/* ---- content surface: CLEAN white paper, readable ---- */
.content {
  background: var(--paper);
  margin: 12px;
  padding: 22px 28px;
  border: 2px solid;
  border-color: var(--bevel-dk) var(--bevel-lt) var(--bevel-lt) var(--bevel-dk);
  min-height: 300px;
}
.content h1 {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 27px;
  line-height: 1.2;
  margin: 0 0 6px;
  color: #111;
  border-bottom: 3px double var(--hairline);
  padding-bottom: 8px;
}
.content h2 {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 20px;
  margin: 26px 0 8px;
  color: var(--navy);
  border-bottom: 1px solid var(--beige);
  padding-bottom: 3px;
}
.content h3 { font-size: 16px; margin: 18px 0 6px; color: #222; }
.content p { margin: 0 0 13px; }
.content a { color: var(--link); }
.content a:visited { color: var(--link-visited); }
.content strong { color: #000; }
.content code {
  font-family: "Courier New", monospace;
  background: #f0f0e8;
  border: 1px solid #ddd;
  padding: 0 3px;
  font-size: 0.92em;
}

/* breadcrumb */
.breadcrumb {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 12px;
  word-spacing: 1px;
}
.breadcrumb a { color: var(--teal); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* tagline under h1 (writer emits <p><em>…</em></p>) */
.content h1 + p em { color: var(--dim); font-size: 1.05em; }

/* ---- tables (specs): real tables, readable, headerless two-column ---- */
.content table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0 18px;
  font-size: 14px;
}
.content table td {
  border: 1px solid var(--beige);
  padding: 5px 10px;
  vertical-align: top;
}
.content table tr td:first-child {
  background: var(--panel);
  font-weight: bold;
  white-space: nowrap;
  width: 1%;
  color: #333;
}
.content table tr:nth-child(even) td:last-child { background: #fafaf7; }

/* lists */
.content ul, .content ol { margin: 0 0 14px; padding-left: 26px; }
.content li { margin: 3px 0; }

/* ---- footnotes / references ---- */
.content sup a {
  text-decoration: none;
  color: var(--accent);
  font-weight: bold;
  font-size: 0.7em;
  padding: 0 1px;
}
.content sup a:hover { text-decoration: underline; }
.content h2 + ol li[id^="ref-"],
.content ol li[id^="ref-"] { font-size: 13px; color: #333; margin: 4px 0; }
li[id^="ref-"]:target { background: #fffbcc; }

/* related machines block */
.related {
  margin-top: 28px;
  border-top: 2px groove var(--beige-lt);
  padding-top: 10px;
}
.related h2 { font-size: 16px; border: none; color: var(--navy); }
.related ul { list-style: square; columns: 2; }

/* ---- index/home pages ---- */
.hero { text-align: center; padding: 16px 0 8px; }
.lead { font-size: 1.05em; color: var(--dim); }
.card-grid {
  list-style: none; padding: 0; margin: 14px 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px;
}
.card { display: flex; }            /* let each <li> stretch so cards match height */
.card a {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  width: 100%; min-height: 60px;    /* uniform card size */
  background: var(--panel);
  border: 2px solid;
  border-color: var(--bevel-lt) var(--bevel-dk) var(--bevel-dk) var(--bevel-lt);
  padding: 10px 14px; text-decoration: none; color: #000;
}
.card strong { line-height: 1.2; }
.card a:hover { background: var(--beige-lt); }
.card .count {
  font-family: "Courier New", monospace; font-size: 12px;
  background: var(--navy); color: #fff; padding: 1px 6px; border-radius: 2px;
}
.model-list { list-style: square; }
.model-list a { color: var(--link); }
.ascii {
  background: #000; color: #00cc33; font-family: "Courier New", monospace;
  padding: 12px; font-size: 13px; line-height: 1.4; overflow-x: auto;
  display: inline-block; text-align: left; border: 2px inset #333;
}

/* figures (hero images, added later by the image pipeline) */
.content figure { margin: 14px 0; text-align: center; }
.content figure img { max-width: 100%; height: auto; border: 1px solid var(--hairline); }
.content figcaption { font-size: 12px; color: var(--dim); margin-top: 4px; }
.content figcaption small { color: #888; }

/* ---- footer ---- */
.site-footer {
  padding: 12px 20px 18px;
  border-top: 2px groove var(--beige-lt);
  font-size: 12px;
  color: var(--dim);
  text-align: center;
}
.site-footer p { margin: 4px 0; }
.dim { color: var(--dim); }

/* ---- responsive: collapse the retro frame to a clean single column ---- */
@media (max-width: 600px) {
  body { padding: 0; font-size: 15px; }
  .winframe { box-shadow: none; border: none; }
  .content { margin: 6px; padding: 16px; }
  .content h1 { font-size: 22px; }
  .related ul { columns: 1; }
  .content table tr td:first-child { white-space: normal; }
  .logo { font-size: 24px; }
}
