/* Shared by every page. Colours are the game's own (apple/Shared/Views, apple/tools/app_icon.py). */
@font-face { font-family: "Silkscreen"; src: url("/assets/fonts/Silkscreen-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/assets/fonts/Silkscreen-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --sky: #0e1f36;        /* the icon's night sky, top */
  --soil: #19110a;       /* the last row of dirt under the grass */
  --night: #07110a;      /* the forest region's sky; the page */
  --card: #1d2019;       /* PixelCardStyle */
  --line: #2a3a2c;
  --text: #e8ede3;
  --dim: #9aa391;
  --gold: #f5d35a;       /* GOOD band, coins, TIMBER! */
  --gold-deep: #9a5a22;
  --green: #6fd86f;      /* PERFECT */
  --leaf: #3e8e34;       /* the PLAY button */
  --red: #e05a4f;        /* MISS */
  --snow: #f2f6fa;
  --cell: 5px;           /* one pixel of the scenery */
  --prose: 600px;
  --pixel: "Silkscreen", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* pixel art stays sharp at any size */
.px, canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff2a8; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--pixel); font-weight: 700; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(22px, 2.9vw, 29px); margin-bottom: 18px; }
h3 { font-size: 17px; color: var(--gold); margin: 34px 0 8px; }
p { margin: 0 0 14px; }
.prose { max-width: var(--prose); color: #cfd6c8; }
.dim { color: var(--dim); }
.nowrap { white-space: nowrap; }

/* The night forest from the app icon, ground at the bottom. Pages put their masthead and title in it. */
.sky {
  position: relative;
  background: url("/media/night.png") center bottom / calc(var(--cell) * 400) auto repeat-x, var(--sky);
  image-rendering: pixelated;
  padding-bottom: calc(var(--cell) * 16);
}
.sky.festive { background-image: url("/media/night-snow.png"); }
/* the dirt fades into the page */
.sky::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 90px; background: linear-gradient(var(--soil), var(--night)); pointer-events: none; }
.sky > .wrap { position: relative; z-index: 1; }
/* later content paints over the fade below the sky */
main { position: relative; }
.snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 38px; height: 38px; border-radius: 9px; border: 2px solid #000; }
.brand span { font-family: var(--pixel); font-weight: 700; font-size: 15px; }
.nav { display: flex; gap: 22px; }
.nav a { font-family: var(--pixel); font-size: 14px; color: #c6cfd8; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }

/* the title of a support or policy page, standing on the grass */
.page-title { padding: 30px 0 14px; }
.page-title h1 { font-size: clamp(30px, 5vw, 46px); color: #fff; text-shadow: 0 3px 0 #8a8f84, 0 5px 0 #000; }
.page-title p { margin: 16px 0 0; color: #c6cfd8; }
main section.first { padding-top: 64px; }
main section.first + section { padding-top: 56px; }

/* the two-line title, drawn like the game's menu: white over grey, gold over brown */
.logo { font-family: var(--pixel); font-weight: 700; line-height: 1; margin: 0; }
.logo span { display: block; }
.logo .l1 { color: #fff; text-shadow: 0 .07em 0 #8a8f84, 0 .12em 0 #000; }
.logo .l2 { color: var(--gold); text-shadow: 0 .07em 0 var(--gold-deep), 0 .12em 0 #000; margin-top: .18em; }

/* the game's pixel card and button (PixelCardStyle, PixelButtonStyle) */
.panel { background: var(--card); border: 2px solid #000; box-shadow: inset 0 2px 0 rgba(255,255,255,.08), 0 4px 0 rgba(0,0,0,.5); }
.btn {
  display: inline-block; font-family: var(--pixel); font-weight: 700; font-size: 17px; line-height: 1.2;
  color: #fff; text-decoration: none; padding: 13px 20px 15px;
  background: var(--leaf); border: 2px solid #000;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.28), inset 0 -3px 0 rgba(0,0,0,.4), 0 3px 0 #000;
}
.btn:hover { color: #fff; background: #46a03b; }
.btn:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255,255,255,.1), inset 0 -1px 0 rgba(0,0,0,.4), 0 1px 0 #000; }

main section { padding-top: 96px; }

footer { margin-top: 110px; padding: 28px 0 44px; border-top: 2px solid #000; box-shadow: 0 -2px 0 var(--line); }
.footrow { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; font-size: 15px; color: var(--dim); }
.footrow p { margin: 0; }
.legal { display: block; margin-top: 10px; font-size: 12px; line-height: 1.5; color: #6f7a69; max-width: 560px; }
.footrow nav { display: flex; gap: 20px; }
.footrow nav a { font-family: var(--pixel); font-size: 14px; color: var(--text); text-decoration: none; }
.footrow nav a:hover { color: var(--gold); }

@media (max-width: 560px) {
  :root { --cell: 4px; }
  body { font-size: 16px; }
  main section { padding-top: 72px; }
  .brand span { display: none; }
  .nav { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:active { transform: none; }
}
