/* The articles at /articole/ (built by scripts/make-articles.mjs), on the design system in tokens.css (DESIGN.md):
   the presentation page's header, buttons and ie stitch, around a column made for reading. The boxes inside an article:
   .answer (the short, honest answer, first), .honest (what we don't know, or why), .in-game (where it is in the game),
   .play-card (the game, at the end of every article). */
:root {
  --blue: var(--brand); --red: var(--primary); --red-dark: var(--primary-edge); --paper: var(--surface); --cream: var(--page);
  --sand: #f6ecd6; --flag-red: #ce1126;
  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --flag: linear-gradient(90deg, var(--brand) 0 33.3%, var(--fun-yellow) 33.3% 66.6%, var(--flag-red) 66.6%);
  --stitch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Crect width='36' height='18' fill='%23fff9ed'/%3E%3Cpath d='M18 2l7 7-7 7-7-7z' fill='%23b5443d'/%3E%3Cpath d='M18 6.5l2.5 2.5-2.5 2.5-2.5-2.5z' fill='%23fff9ed'/%3E%3Cpath d='M3 7h2v4H3zM2 8h4v2H2zM31 7h2v4h-2zM30 8h4v2h-4z' fill='%23002b7f'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { background: var(--cream); -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--font-body); font-weight: 600; font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--cream); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--fun-yellow); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.12; color: var(--blue); text-wrap: balance; }
h1 { font-size: clamp(32px, 5.4vw, 46px); margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: clamp(24px, 3.4vw, 30px); margin: 40px 0 10px; }
h3 { font-family: var(--font-body); font-size: var(--fs-heading); color: var(--ink); margin: 26px 0 6px; }
p, ul, ol { margin: 0 0 16px; }
ul, ol { padding-left: 24px; }
li { margin-bottom: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 8px 14px; border-radius: 10px; background: var(--paper); font-weight: 800; box-shadow: var(--shadow); }
.skip:focus { top: 12px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px;
  font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--red);
}
.eyebrow::before { content: ''; width: 24px; height: 4px; border-radius: 2px; background: var(--flag); }
.ie { height: 18px; background: var(--stitch) center / 36px 18px repeat-x; border-block: 3px solid var(--blue); }

/* buttons, as on the presentation page: primary (Play), secondary (everything else) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.2; color: #fff;
  background: var(--red); padding: 12px 22px; border-radius: 14px; border: 0;
  box-shadow: 0 4px 0 var(--red-dark), 0 10px 24px -10px #7e2c2799; transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 6px 0 var(--red-dark), 0 14px 28px -12px #7e2c27aa; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--red-dark); }
.btn.small { font-size: 15px; padding: 8px 16px; border-radius: 11px; box-shadow: 0 3px 0 var(--red-dark); }
.btn.secondary { background: var(--paper); color: var(--blue); box-shadow: inset 0 0 0 2px var(--line-strong), 0 4px 0 var(--line-strong); }
.btn.secondary:hover { background: #fff; box-shadow: inset 0 0 0 2px var(--blue), 0 6px 0 var(--line-strong); }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--gutter); padding-top: max(10px, env(safe-area-inset-top));
  background: #fff9edeb; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 4px solid; border-image: var(--flag) 1;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--flag-red); font-family: var(--font-display); font-weight: 800; font-size: 21px; white-space: nowrap; margin-right: auto; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 2px 6px #10244d30; }
.top-nav { display: flex; gap: 2px; }
.top-nav a { text-decoration: none; font-weight: 800; font-size: 15px; color: var(--ink); padding: 6px 10px; border-radius: 9px; white-space: nowrap; }
.top-nav a:hover { background: var(--sand); }
@media (max-width: 420px) { .brand span { display: none; } }

/* an article */
.article-main { max-width: 760px; margin: 0 auto; padding: 18px var(--gutter) 56px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 22px; }
.crumbs a { color: var(--muted); }
.article-head { margin-bottom: 22px; }
.byline { color: var(--muted); font-size: 15px; margin: 0; }
.byline a { color: var(--muted); }
.lead { font-size: 19px; line-height: 1.6; text-wrap: pretty; }
.article figure { margin: 26px 0; }
.article figure img { border-radius: 14px; box-shadow: var(--shadow); width: 100%; }
.article figure.dish { display: flex; align-items: center; gap: 16px; }
.article figure.dish img { width: 84px; flex: none; box-shadow: none; border-radius: 0; filter: drop-shadow(0 8px 10px #10244d33); }
.article figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.article figure.dish figcaption { margin: 0; }
.answer {
  margin: 24px 0; padding: 18px 20px 4px; border-radius: 16px; background: var(--paper);
  border: 2px solid var(--line-strong); border-left: 8px solid var(--blue);
}
.answer h2 { margin: 0 0 8px; font-size: 22px; }
.honest { margin: 24px 0; padding: 16px 20px 2px; border-radius: 16px; background: #fdf4dc; border: 2px dashed #e2c87a; }
.honest b:first-child { color: var(--primary-edge); }
.in-game { margin: 32px 0; padding: 18px 20px 4px; border-radius: 16px; background: var(--card); }
.in-game h2 { margin-top: 0; }
.article blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--fun-yellow); font-style: italic; }
.table-wrap { overflow-x: auto; margin: 0 0 18px; }
.article table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--paper); border-radius: 12px; overflow: hidden; }
.article th, .article td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { background: var(--card); font-weight: 800; }
.sources { font-size: 14px; color: var(--muted); border-top: 2px dashed var(--line); padding-top: 14px; margin-top: 32px; }
.play-card {
  display: flex; gap: 18px; align-items: flex-start; margin: 40px 0 0; padding: 20px;
  border-radius: 18px; background: var(--blue); color: #fff;
}
.play-card img { width: 72px; flex: none; filter: drop-shadow(0 8px 10px #0006); }
.play-card p { margin: 0 0 14px; }
.play-card .play-title { font-family: var(--font-display); font-weight: 800; font-size: 22px; margin: 0 0 6px; color: var(--fun-yellow); }
.play-card .btn { box-shadow: 0 4px 0 var(--red-dark), 0 10px 24px -10px #000a; }
.play-card .play-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 0; }
/* Apple's own "Download on the App Store" badge, unchanged (img/app-store.svg): as tall as the button beside it */
.store-badge { display: inline-flex; border-radius: 8px; transition: transform .15s; }
.play-card .store-badge img { display: block; height: 46px; width: auto; filter: none; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge:active { transform: translateY(1px); }
@media (max-width: 520px) { .play-card { flex-direction: column; } .play-card img { width: 56px; } }

/* cards: the related articles and the list of all of them */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.card { margin: 0; }
.card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.card a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-pic { display: block; aspect-ratio: 3 / 2; background: var(--card); overflow: hidden; }
.card-pic img { width: 100%; height: 100%; object-fit: cover; }
.card-pic.dish { display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, #fff 0 30%, var(--card) 70%); }
.card-pic.dish img { width: 42%; height: auto; object-fit: contain; filter: drop-shadow(0 8px 10px #10244d33); }
.card-text { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 16px; }
.card-cat { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.card h3 { margin: 0; font-family: var(--font-display); font-size: 19px; line-height: 1.2; color: var(--blue); }
.card-d { font-size: 14px; line-height: 1.5; color: var(--muted); }
/* on a phone, a small picture beside the title, so the list doesn't run for metres */
@media (max-width: 560px) {
  .card a { flex-direction: row; align-items: stretch; }
  .card-pic { flex: none; width: 96px; aspect-ratio: auto; }
  .card-pic.dish img { width: 64%; }
  .card-text { padding: 12px 14px 14px 12px; min-width: 0; }
  .card h3 { font-size: 17px; }
  .card-d { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
}
.related { margin-top: 48px; }
.related h2 { margin-top: 0; }
.related .all { margin: 22px 0 0; text-align: center; }

/* the list of articles */
.index-main { max-width: 1160px; margin: 0 auto; padding: 22px var(--gutter) 56px; }
.index-head { max-width: 760px; margin: 18px auto 12px; text-align: center; }
.index-jump { font-weight: 800; }
.shelf { margin-top: 44px; }
.shelf header { max-width: 760px; margin-bottom: 18px; }
.shelf h2 { margin: 0 0 6px; }
.shelf-lead { color: var(--muted); }
.promise { max-width: 760px; margin: 56px auto 0; padding: 20px 22px 6px; border-radius: 16px; background: var(--card); }
.promise h2 { margin-top: 0; }

footer { text-align: center; font-size: 14px; color: var(--muted); padding: 0 var(--gutter) max(28px, env(safe-area-inset-bottom)); }
footer .ie { margin: 0 calc(-1 * var(--gutter)) 22px; border-top: 0; }
footer nav { margin: 0 0 8px; line-height: 2; }
footer p { margin: 0 0 6px; }
