/* The blog: its own stylesheet, so its pages look the same whichever version of the home page is live.
   White, with almost-black writing, like the rest of the site. */

@font-face { font-family: 'Fredoka'; src: url('/fonts/fredoka-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito-900.ttf') format('truetype'); font-weight: 900; font-display: swap; }

:root {
  color-scheme: light;
  --page: #FFFFFF;
  --ink: #15171C;
  --text: #2B2F36;
  --soft: #5B6270;
  --edge: #E5E7EB;
  --tint: #F6F7F9;
  --link: #A34F00;
  --gold: #FFDE59;
  --gold-pale: #FFF7D9;
  --sea-pale: #EAF5FF;
  --green: #58CC02;
  --green-dark: #3F9A00;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 700 18px/1.65 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { text-decoration-thickness: 3px; }
h1, h2, h3 { font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; font-weight: 700; color: var(--ink); line-height: 1.15; text-wrap: balance; }
strong { color: var(--ink); font-weight: 900; }

/* ---------- Top bar ---------- */

.blog-top { border-bottom: 2px solid var(--edge); background: var(--page); }
.blog-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1100px; margin: 0 auto; padding: 12px 16px; }
.blog-home { display: flex; align-items: center; gap: 10px; line-height: 0; text-decoration: none; }
.blog-home .coin { width: 40px; height: 40px; }
.blog-home .word { width: 150px; height: auto; }
.blog-nav { display: flex; gap: 6px; }
.blog-nav a { padding: 8px 14px; border-radius: 999px; color: var(--ink); font-weight: 900; text-decoration: none; }
.blog-nav a:hover { background: var(--tint); }
.blog-nav a[aria-current] { background: var(--gold-pale); }

/* ---------- A post ---------- */

.post { max-width: 740px; margin: 0 auto; padding: 26px 16px 20px; }
.crumbs { margin: 0 0 14px; color: var(--soft); font-size: 15px; }
.crumbs a { color: var(--soft); }
.post h1 { margin: 0; font-size: clamp(34px, 6.4vw, 50px); }
.byline { margin: 12px 0 22px; color: var(--soft); font-size: 15.5px; }
.lead-art { display: block; width: 100%; aspect-ratio: 5 / 3; object-fit: cover; border-radius: 24px; background: var(--tint); }
.post h2 { margin: 44px 0 10px; font-size: clamp(27px, 4.6vw, 34px); }
.post h3 { margin: 28px 0 6px; font-size: 22px; }
.post p { margin: 0 0 16px; }
.post ul, .post ol { margin: 0 0 18px; padding-left: 26px; }
.post li { margin: 7px 0; }
.post li::marker { color: var(--soft); font-weight: 900; }

/* The short answer at the top of a post. */
.answer { margin: 26px 0 8px; padding: 18px 20px; border-radius: 20px; background: var(--sea-pale); }
.answer p { margin: 0; }
.answer .label { display: block; margin-bottom: 4px; color: #0B5DA8; font-size: 14px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }

/* A tip from the crew. */
.tip { margin: 22px 0; padding: 16px 20px; border-radius: 20px; background: var(--gold-pale); }
.tip p { margin: 0; }
.tip .label { display: block; margin-bottom: 4px; color: #8A5A00; font-size: 14px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }

/* Tables scroll sideways inside their own box on a phone, never the page. */
.table-wrap { margin: 18px 0 22px; overflow-x: auto; border: 2px solid var(--edge); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.4; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; }
th { background: var(--tint); color: var(--ink); font-weight: 900; white-space: nowrap; }
tr + tr td { border-top: 1px solid var(--edge); }
td.num, th.num { text-align: right; white-space: nowrap; }
/* In a table too wide for a phone, the first column stays put while the rest slides. */
.wide th:first-child, .wide td:first-child { position: sticky; left: 0; background: var(--page); box-shadow: 1px 0 0 var(--edge); }
.wide th:first-child { background: var(--tint); }

/* A row of real cards. */
.cards { display: flex; justify-content: center; gap: 14px; margin: 24px 0 26px; padding: 0; }
.cards figure { flex: 1 1 0; max-width: 180px; margin: 0; text-align: center; }
.cards img { display: block; width: 100%; filter: drop-shadow(0 10px 16px rgba(16, 24, 40, 0.18)); }
.cards figcaption { margin-top: 8px; color: var(--soft); font-size: 14.5px; line-height: 1.35; }
.cards-note { margin: -10px 0 22px; color: var(--soft); font-size: 15px; text-align: center; }

.faq-list h3 { margin-top: 22px; }

/* A screenshot of the game, in a phone shape. */
.phone-shot { margin: 26px auto 28px; text-align: center; }
.phone-shot img { display: block; width: min(64vw, 270px); margin: 0 auto; border: 7px solid #15171C; border-radius: 40px; box-shadow: 0 16px 30px rgba(16, 24, 40, 0.18); }
.phone-shot figcaption { margin-top: 12px; color: var(--soft); font-size: 15px; }

/* Numbered steps. */
.steps-list { counter-reset: step; margin: 14px 0 22px; padding: 0; list-style: none; }
.steps-list li { position: relative; margin: 0 0 12px; padding: 2px 0 0 48px; min-height: 36px; }
.steps-list li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--ink); font-family: 'Fredoka', 'Nunito', sans-serif; font-size: 18px; line-height: 34px; text-align: center; }

.sources { margin-top: 36px; padding-top: 18px; border-top: 2px solid var(--edge); color: var(--soft); font-size: 15px; }
.sources h2 { margin: 0 0 8px; font-size: 22px; }
.sources li { margin: 5px 0; }
.sources a { color: var(--soft); overflow-wrap: anywhere; }

/* ---------- What's next: about the game, and more posts ---------- */

.cta { display: flex; align-items: center; gap: 22px; margin: 46px 0 10px; padding: 22px 24px; border-radius: 26px; background: #0F2152; color: #DCE6FF; }
.cta img { flex: none; width: 120px; }
.cta h2 { margin: 0 0 6px; color: #FFFFFF; font-size: 28px; }
.cta p { margin: 0 0 14px; }
.cta strong { color: #FFFFFF; }
.button {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 16px;
  background: var(--green);
  box-shadow: 0 4px 0 var(--green-dark);
  color: #FFFFFF;
  font-weight: 900;
  text-decoration: none;
}
.button:hover { filter: brightness(1.05); }
.button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--green-dark); }

.more { max-width: 1100px; margin: 0 auto; padding: 18px 16px 10px; }
.more > h2 { margin: 18px 0 16px; font-size: 28px; text-align: center; }

/* Post cards, on the blog's front page and under each post. */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.post-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 2px solid var(--edge); border-radius: 24px; background: var(--page); color: inherit; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(16, 24, 40, 0.1); }
.post-card img { display: block; width: 100%; aspect-ratio: 5 / 3; object-fit: cover; background: var(--tint); }
.post-card div { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.post-card h3 { margin: 0 0 6px; font-size: 22px; }
.post-card p { margin: 0 0 12px; color: var(--soft); font-size: 16px; line-height: 1.5; }
.post-card .read { margin-top: auto; color: var(--link); font-size: 15px; font-weight: 900; }

/* The blog's front page. */
.blog-intro { max-width: 760px; margin: 0 auto; padding: 40px 16px 8px; text-align: center; }
.blog-intro h1 { margin: 0; font-size: clamp(38px, 7vw, 56px); }
.blog-intro p { margin: 10px 0 0; color: var(--soft); }
.blog-front { max-width: 940px; margin: 0 auto; padding: 22px 16px 10px; }
.blog-front .post-list { grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 24px; }
/* The newest post goes across the top, picture beside the words. */
.blog-front .post-list .featured { grid-column: 1 / -1; }
@media (min-width: 801px) {
  .featured .post-card { flex-direction: row; }
  .featured .post-card img { width: 52%; aspect-ratio: auto; min-height: 100%; }
  .featured .post-card div { justify-content: center; padding: 26px 30px; }
  .featured .post-card h3 { font-size: 30px; }
  .featured .post-card p { font-size: 17px; }
}
.blog-front .cta { max-width: 740px; margin: 40px auto 10px; }

/* ---------- Bottom ---------- */

.blog-foot { margin-top: 40px; padding: 26px 16px 34px; border-top: 2px solid var(--edge); color: var(--soft); font-size: 15px; text-align: center; }
.blog-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-bottom: 10px; }
.blog-foot nav a { color: var(--ink); font-weight: 900; text-decoration: none; }
.blog-foot nav a:hover { text-decoration: underline; }
.blog-foot p { max-width: 640px; margin: 6px auto 0; }

/* ---------- Phones ---------- */

@media (max-width: 600px) {
  body { font-size: 17px; }
  .blog-home .coin { width: 34px; height: 34px; }
  .blog-home .word { width: 118px; }
  .blog-nav a { padding: 7px 11px; }
  .lead-art { border-radius: 18px; }
  .cards { gap: 8px; }
  .cards figcaption { font-size: 13px; }
  .cta { flex-direction: column; text-align: center; padding: 22px 18px; }
  .cta img { width: 96px; }
  .post-list { grid-template-columns: 1fr; }
  table { font-size: 15px; }
  th, td { padding: 9px 10px; }
  /* Headings may wrap, so three-column tables fit across a phone without scrolling. */
  th { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .post-card, .post-card:hover { transition: none; transform: none; }
}
