/* page.css — chrome for the generated static pages (/day/…, /<game>/…, /archive).
   The browsing app has its own chrome in ui.css; these pages are plain documents, so
   they get their own, smaller stylesheet. sheet.css draws the printable sheet itself
   and is shared by both.

   Structure the generator relies on: everything that must not print is inside
   .chrome-top / .chrome-bottom, and the sheet is a direct child of body between them.
   That keeps the print rules to two selectors instead of a :not() chain that has to
   know the tree (which is how the app's print CSS once blanked the page). */
:root{
  --bg:#f6f7f9; --panel:#fff; --ink:#101418; --muted:#5d6874; --line:#e3e7ec;
  --brand:#0a66c2; --brand-soft:#e8f1fb; --radius:12px;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);
  font:15px/1.55 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
a{color:var(--brand)}
.wrap{max-width:820px;margin:0 auto;padding:0 20px}

.chrome-top{padding:20px 0 18px}
.chrome-bottom{padding:22px 0 56px}

.site{display:flex;flex-wrap:wrap;gap:10px;align-items:baseline;justify-content:space-between;
  padding-bottom:12px;border-bottom:1px solid var(--line);margin-bottom:18px}
.site a.home{font-weight:700;color:var(--ink);text-decoration:none;font-size:15px}
.site .tag{color:var(--muted);font-size:13px}

h1{font-size:25px;line-height:1.2;margin:0 0 8px;letter-spacing:-.01em}
h2{font-size:17px;margin:26px 0 10px}
.lede{color:var(--muted);margin:0 0 14px}
.crumbs{font-size:13px;color:var(--muted);margin:0 0 10px}
.crumbs a{text-decoration:none}
.crumbs a:hover{text-decoration:underline}

.tools{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 4px}
.btn{appearance:none;border:1px solid var(--line);background:#fff;padding:9px 15px;
  border-radius:8px;font:inherit;font-weight:600;cursor:pointer;color:var(--ink);text-decoration:none}
.btn:hover{border-color:#c9d2dc}
.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}

/* the sheet sits on its own, page-like, and scales down on narrow screens */
.stage{display:flex;justify-content:center;padding:18px 12px}
.stage .sheet{box-shadow:0 1px 3px rgba(16,20,24,.10),0 8px 28px rgba(16,20,24,.07);
  border:1px solid var(--line);transform-origin:top center}

.pager{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;margin:0 0 6px}
.pager span{color:#aab3bd}

.tiles{list-style:none;padding:0;margin:0;display:grid;gap:8px;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
.tiles a{display:block;background:var(--panel);border:1px solid var(--line);border-radius:10px;
  padding:10px 12px;text-decoration:none;color:var(--ink);font-weight:600}
.tiles a:hover{border-color:var(--brand);color:var(--brand)}
.tiles small{display:block;color:var(--muted);font-weight:400;font-size:12.5px;margin-top:2px}

/* month blocks on the archive + per-game index pages */
.months{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
.month{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:12px 14px}
.month h3{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);
  margin:0 0 8px;font-weight:700}
.month ul{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:6px}
.month a{display:inline-block;background:var(--bg);border-radius:6px;padding:3px 8px;
  text-decoration:none;font-size:13px;font-weight:600}
.month a:hover{background:var(--brand-soft)}

.sitenav{border-top:1px solid var(--line);margin-top:28px;padding-top:16px;
  color:var(--muted);font-size:13.5px}
.sitenav a{margin-right:12px;white-space:nowrap}
.sitenav p{margin:10px 0 0}

@media screen and (max-width:640px){
  .wrap{padding:0 14px}
  h1{font-size:21px}
  .stage{padding:12px 0}
  .stage .sheet{box-shadow:none}
}

/* MUST BE LAST — see ui.css. iOS can still match width queries during a print run, so
   the print reset lives at the end of the file where it always wins the cascade. */
@media print{
  html,body{margin:0;padding:0;background:#fff;height:auto}
  .chrome-top,.chrome-bottom{display:none!important}
  .stage{display:block;padding:0;height:auto!important}
  .stage .sheet{box-shadow:none;border:0;transform:none!important}
}
