/* The front pages (B-189): the look of the game pages (/games/<name>), the answer pages (/answers/<name>) and
   the home page's sections under the join box. Loaded after /brand/next/brand.css. Every color is one of the
   brand's tokens (--ha-*). Phone first (390 px wide, every link and button 48 px or taller); wider screens
   get more columns. The pages themselves are made by scripts/build-pages.mjs. */
.fp, .fp * { box-sizing: border-box; }
html.ha-theme { background: var(--ha-bg-deep); }
html.ha-theme body { margin: 0; min-height: 100%; height: auto; color: var(--ha-text); font-family: var(--ha-font-body); font-size: 17px; line-height: 1.5; background: var(--ha-dots), var(--ha-stage); background-color: var(--ha-bg-deep); background-attachment: fixed; -webkit-text-size-adjust: 100%; }
main.fp { max-width: 760px; margin: 0 auto; padding: 10px 18px calc(30px + env(safe-area-inset-bottom)); overflow-wrap: break-word; }
.fp h1, .fp h2, .fp h3, .fp-sec h2, .fp-sec h3 { font-family: var(--ha-font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: 1.1; margin: 0; }
.fp h1 { font-size: 36px; margin-top: 16px; }
.fp h2, .fp-sec h2 { font-size: 25px; margin: 34px 0 10px; color: var(--ha-yellow); }
.fp h3, .fp-sec h3 { font-size: 20px; }
.fp p { margin: 0 0 12px; }
.fp ul, .fp ol { margin: 0 0 12px; padding-left: 24px; }
.fp li { margin-bottom: 6px; }
.fp a, .fp-sec a { color: var(--ha-cyan); }
.fp article a:not(.ha-btn):not(.fp-game), .fp-center a, .fp-more a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; }
.fp a:focus-visible, .fp-sec a:focus-visible, .fp-faq summary:focus-visible { outline: none; box-shadow: var(--ha-focus); border-radius: var(--ha-radius-sm); }

.fp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.fp-logo { display: flex; align-items: center; min-height: 48px; flex: 0 1 auto; min-width: 0; }
.fp-logo img { display: block; height: 40px; width: auto; max-width: 100%; }
.fp a.fp-topplay { display: inline-flex; align-items: center; flex: 0 0 auto; color: var(--ha-on-yellow); text-decoration: none; font-size: 17px; padding: 0 16px; white-space: nowrap; }
.fp-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin: 6px 0 10px; font-size: 15px; color: var(--ha-text-dim); }
.fp-crumbs a { display: inline-flex; align-items: center; min-height: 48px; color: var(--ha-text-dim); }

.fp-art { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--ha-panel); border: var(--ha-border); border-radius: var(--ha-radius-lg); box-shadow: var(--ha-shadow-pop); }
.fp-what, .fp-lead { font-size: 20px; line-height: 1.4; color: var(--ha-text); margin: 10px 0 14px; }
.fp-sec .fp-lead { color: var(--ha-text-dim); font-size: 17px; margin: 0 0 14px; }
.fp-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.fp-facts div { background: var(--ha-panel); border: 2px solid var(--ha-line); border-radius: var(--ha-radius-md); padding: 10px 12px; }
.fp-facts dt { font-size: 14px; color: var(--ha-text-dim); }
.fp-facts dd { margin: 2px 0 0; font: 400 22px/1.1 var(--ha-font-display); text-transform: uppercase; }
.fp a.fp-play { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 64px; margin: 18px 0 8px; font-size: 26px; color: var(--ha-on-yellow); text-decoration: none; text-align: center; }
.fp-small { color: var(--ha-text-dim); font-size: 15px; text-align: center; }
.fp-opts { columns: 2 240px; }

/* game cards: the picture carries the game's name as its logo; the words under it say what it is */
.fp-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
a.fp-game { display: flex; flex-direction: column; min-height: 48px; min-width: 0; background: var(--ha-panel); border: var(--ha-border); border-radius: var(--ha-radius-md); box-shadow: var(--ha-shadow-pop); overflow: hidden; color: var(--ha-text); text-decoration: none; }
a.fp-game:active { transform: translateY(4px); box-shadow: none; }
a.fp-game img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--ha-panel-2); border-bottom: var(--ha-border); }
.fp-gname { font: 400 19px/1.1 var(--ha-font-display); text-transform: uppercase; padding: 10px 10px 0; }
.fp-gwhat { font-size: 14px; line-height: 1.3; color: var(--ha-text-dim); padding: 4px 10px 0; flex: 1 1 auto; }
.fp-gmeta { font-size: 13px; font-weight: 700; color: var(--ha-yellow); padding: 6px 10px 10px; }
a.fp-game[hidden] { display: none; }

.fp-steps, .fp-cost { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.fp-steps li, .fp-cost li { background: var(--ha-panel); border: 2px solid var(--ha-line); border-radius: var(--ha-radius-lg); padding: 14px 16px; margin: 0; }
.fp-steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: center; }
.fp-steps b { grid-row: span 2; align-self: start; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--ha-radius-pill); background: var(--ha-yellow); color: var(--ha-on-yellow); border: var(--ha-border); font: 400 22px/1 var(--ha-font-display); }
.fp-steps p, .fp-cost p { margin: 4px 0 0; color: var(--ha-text-dim); font-size: 16px; line-height: 1.4; }
.fp-cost h3 { color: var(--ha-yellow); font-size: 24px; }
.fp-center { text-align: center; }

.fp-faq details { background: var(--ha-panel); border: 2px solid var(--ha-line); border-radius: var(--ha-radius-md); margin: 0 0 10px; }
.fp-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 16px; cursor: pointer; list-style: none; font-weight: 800; font-size: 18px; line-height: 1.25; }
.fp-faq summary::-webkit-details-marker { display: none; }
.fp-faq summary::after { content: '+'; flex: 0 0 auto; font: 400 26px/1 var(--ha-font-display); color: var(--ha-yellow); }
.fp-faq details[open] summary::after { content: '-'; }
.fp-faq details p { margin: 0; padding: 0 16px 14px; color: var(--ha-text-dim); }
.fp-more { list-style: none; padding: 0; margin: 0; }
.fp-more li { margin: 0; border-top: 2px solid var(--ha-line); }
.fp-more li:first-child { border-top: 0; }
.fp-more a { min-height: 56px; padding: 6px 0; }

.fp-foot { margin-top: 40px; padding-top: 16px; border-top: 2px solid var(--ha-line); text-align: center; color: var(--ha-text-dim); font-size: 15px; }
.fp-foot p { margin: 0 0 4px; }
.fp-foot a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 8px; color: var(--ha-text-dim); }

@media (min-width: 620px) {
  .fp-games { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .fp-facts { grid-template-columns: repeat(4, 1fr); }
  .fp-steps, .fp-cost { grid-template-columns: repeat(3, 1fr); }
  .fp-steps li { grid-template-columns: 1fr; row-gap: 8px; }
  .fp-steps b { grid-row: auto; }
  .fp h1 { font-size: 46px; }
  .fp a.fp-play { width: auto; min-width: 320px; display: inline-flex; padding: 0 40px; }
}
@media (min-width: 1000px) {
  .fp-sec .fp-games { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .fp * { transition: none !important; } }
/* High scores across the country (Nov 21, public/shared/showcase.js): on the home page and at the top of /scores */
.scx-box { margin: 14px auto 18px; max-width: 640px; }
.scx { position: relative; padding: 16px 16px 12px; background: var(--ha-panel); border: 2px solid var(--ha-line); border-radius: 18px; }
.fp .scx-h, .scx-h { margin: 0 0 10px; font-size: 18px; color: var(--ha-yellow); text-align: center; }
.scx-slide { display: block; color: var(--ha-text); text-decoration: none; min-height: 220px; }
.scx-slide[hidden] { display: none; }
.scx-game { display: block; font-family: var(--ha-font-display); font-size: 22px; text-align: center; text-transform: uppercase; }
.scx-board { display: block; color: var(--ha-text-dim); font-size: 15px; text-align: center; margin: 2px 0 10px; }
.scx-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.scx-line { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; background: var(--ha-panel-2); border-radius: 12px; }
.scx-rank { flex: 0 0 auto; width: 28px; font-family: var(--ha-font-display); font-size: 22px; text-align: center; color: var(--ha-yellow); }
.scx-av { flex: 0 0 auto; font-size: 26px; }
.scx-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.scx-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.scx-who small { color: var(--ha-text-dim); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scx-score { flex: 0 0 auto; font-family: var(--ha-font-display); font-size: 18px; }
.scx-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 10px; }
.scx-dot { width: 48px; height: 48px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.scx-dot::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--ha-line); }
.scx-dot[aria-current="true"]::after { background: var(--ha-yellow); }
.scx-dot:focus-visible { outline: 3px solid var(--ha-focus); border-radius: 12px; }
.scx-feed { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 2px solid var(--ha-line); display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--ha-text-dim); }
@media (prefers-reduced-motion: no-preference) { .scx-slide:not([hidden]) { animation: scx-in .35s ease-out; } }
@keyframes scx-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.scx-fav { display: inline-block; margin-right: 8px; font-family: 'GN Emoji', var(--ha-font-body); }
