/* Blog shell - borrows the game's Windows 98 look (teal desktop, silver
   windows, navy title bars) without shipping 98.css itself. Body copy stays
   in a readable system face: the game's pixel fonts are fine for short UI
   labels but tiring across a 2000-word article. */

@font-face {
  font-family: 'Super Mario Bros NES';
  src: url('/fonts/Super-Mario-Bros-NES.ttf') format('truetype');
  font-display: swap;
}

:root {
  --desktop: #008080;
  --silver: #c0c0c0;
  --face: #ececec;
  --navy: #000080;
  --navy-light: #1084d0;
  --text: #1b1b1b;
  --text-muted: #4a4a4a;
  --link: #0000c8;
  --link-visited: #551a8b;
  --accent: #008000;
  --gold: #f7ff14;

  --font-title: 'Super Mario Bros NES', Tahoma, 'Segoe UI', sans-serif;
  --font-body: Tahoma, 'Segoe UI', Verdana, system-ui, sans-serif;

  --bevel-out: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  --bevel-in: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}

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

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

body {
  margin: 0;
  background: var(--desktop);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  padding-inline: 16px;
  padding-block: 0 48px;
}

a { color: var(--link); }
a:visited { color: var(--link-visited); }
a:focus-visible, button:focus-visible { outline: 2px dotted var(--text); outline-offset: 2px; }

/* ---- Top bar (taskbar-like) ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 820px;
  margin: 0 auto;
  padding-block: 14px;
}
.brand {
  font-family: var(--font-title);
  font-size: 15px;
  color: #fff;
  text-decoration: none;
  text-shadow: 2px 2px 0 #004040;
  letter-spacing: 1px;
}
.brand:visited { color: #fff; }
.brand small { font-family: var(--font-body); font-size: 13px; letter-spacing: 0; text-shadow: none; opacity: .85; }

/* ---- Win98 button ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--silver);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--bevel-out);
  cursor: pointer;
}
.btn:visited { color: var(--text); }
.btn:active { box-shadow: var(--bevel-in); }
.btn-primary { background: var(--silver); color: var(--navy); }
.btn-primary:visited { color: var(--navy); }

/* ---- Window ---- */
.window {
  max-width: 820px;
  margin: 0 auto;
  background: var(--silver);
  box-shadow: var(--bevel-out);
  padding: 3px;
}
.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  background: linear-gradient(90deg, var(--navy), var(--navy-light));
  color: #fff;
  font-family: var(--font-title);
  font-size: 11px;
  letter-spacing: 1px;
}
.title-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window-body {
  margin: 3px;
  padding: clamp(18px, 4vw, 40px);
  background: var(--face);
  box-shadow: var(--bevel-in);
}

/* ---- Article typography ---- */
.article { margin: 0 auto; }
.breadcrumbs { font-size: 14px; color: var(--text-muted); margin: 0 0 18px; }
.breadcrumbs a { color: var(--text-muted); }
.article h1 {
  font-size: clamp(26px, 4.2vw, 36px);
  line-height: 1.2;
  margin: 0 0 12px;
  text-wrap: balance;
}
.article h2 { font-size: 24px; line-height: 1.3; margin: 2em 0 .5em; text-wrap: balance; }
.article h3 { font-size: 19px; line-height: 1.35; margin: 1.6em 0 .4em; }
.article p, .article ul, .article ol { margin: 0 0 1.1em; }
.article li { margin-bottom: .35em; }
.article strong { color: #000; }
.article code {
  font-family: Consolas, 'Courier New', monospace;
  font-size: .9em;
  background: #fff;
  padding: 1px 5px;
  box-shadow: var(--bevel-in);
}
.article blockquote {
  margin: 1.4em 0;
  padding: 12px 16px;
  background: #fff;
  box-shadow: var(--bevel-in);
}
.article blockquote p:last-child { margin-bottom: 0; }
.article img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.6em auto .4em;
  box-shadow: var(--bevel-out);
  padding: 3px;
  background: var(--silver);
  image-rendering: auto;
}
.article img + em, .article .caption {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 1.6em;
}
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
.article table { border-collapse: collapse; width: 100%; font-size: 15px; background: #fff; }
.article th, .article td { text-align: left; padding: 8px 10px; border: 1px solid #a0a0a0; }
.article th { background: var(--silver); }

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

/* ---- CTA (play the game) ---- */
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 2.4em 0;
  padding: 18px 20px;
  background: var(--silver);
  box-shadow: var(--bevel-out);
}
.article > .cta:last-child {
  margin-bottom: 0;
}
.cta p { margin: 0; font-weight: 700; flex: 1 1 260px; min-width: 0; }

/* ---- Related posts ---- */
.related { margin-top: 3em; padding-top: 1.4em; border-top: 2px groove #fff; }
.related h2 { font-size: 20px; margin-top: 0; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }

/* ---- Blog index ---- */
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.post-card {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  background: #fff;
  box-shadow: var(--bevel-in);
}
.post-card h2 { font-size: 20px; margin: 0; line-height: 1.3; }
.post-card p { margin: 0; color: var(--text-muted); font-size: 15px; }
.post-card time { font-size: 13px; color: var(--text-muted); }

.footer {
  max-width: 820px;
  margin: 24px auto 0;
  color: #e6ffff;
  font-size: 14px;
  text-align: center;
}
.footer a, .footer a:visited { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
