/*
 * The shell: everything every page shares.
 *
 * The block below this comment is public/demo/ui.css, copied without a
 * change except for two removals: the three palettes, which now live in
 * tokens.css as one, and the demo's font picker, which is demo furniture.
 *
 * The demo is the drawing and this is the copy. When something needs to
 * change, change it in public/demo/ first and copy it here - that is the
 * only arrangement under which the two cannot drift apart.
 *
 * Each page's own stylesheet is a separate file, loaded only on that page,
 * exactly as the demo loads one <style> block per page: page-home.css,
 * page-game.css, page-stats.css, page-doc.css.
 */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font, Inter), system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }

:where(a, button, summary, select):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 10px;
}

/* ------------------------------------------------------------------ header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-head__row { display: flex; align-items: center; gap: 12px; height: 64px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  min-width: 0;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Five squares: the product, not a logo. */
.brand__mark {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 9px;
  background: var(--accent);
  flex: none;
}
.brand__mark i { background: var(--accent-ink); border-radius: 2px; opacity: .55; }
.brand__mark i:nth-child(1) { opacity: 1; }
.brand__mark i:nth-child(4) { opacity: .8; }

.streak-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--warm-soft);
  color: var(--warm);
  font-weight: 700;
  font-size: .8125rem;
  white-space: nowrap;
}
.streak-pill b { font-size: 1rem; }

@media (max-width: 559px) {
  .site-head__row { gap: 8px; height: 58px; }

  /*
   * All games goes. It points at the same place the wordmark does, and
   * on a 375px screen the two of them plus the streak and Stats left the
   * brand showing "Mimzo Gam". A duplicate link is the cheapest thing on
   * the bar to lose.
   */
  /* .site-head in front of it on purpose: .btn sets display later in this
     file, and at equal specificity the later rule wins. */
  .site-head .btn--home { display: none; }
  .brand { font-size: .9375rem; }
  .streak-pill { padding: 5px 10px; font-size: .75rem; }
  .streak-pill span { display: none; }
  .btn--sm { padding: 0 11px; font-size: .8125rem; min-height: 40px; }
}

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-mute); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: .875rem; border-radius: 10px; }
.btn--block { width: 100%; }

/* ------------------------------------------------------- cards and pieces */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.chip {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--ink-mute);
}
.chip--live { background: var(--accent-soft); color: var(--accent); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.section { padding: 48px 0 0; }
.section h2 { font-size: clamp(1.35rem, 3.6vw, 1.75rem); }
.section__sub { color: var(--ink-soft); margin-top: 6px; max-width: 60ch; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }

/* --------------------------------------------------------------------- qa */
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-weight: 650;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--accent); font-size: 1.25rem; line-height: 1; }
.qa[open] summary::after { content: "\2212"; }
.qa p { padding-bottom: 16px; color: var(--ink-soft); max-width: 68ch; }

/* ----------------------------------------------------------------- footer */
.site-foot {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--ink-mute);
  font-size: .875rem;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.site-foot a { text-decoration: none; font-weight: 600; color: var(--ink-soft); }
.site-foot a:hover { color: var(--accent); }

@media (min-width: 900px) {
  .wrap { padding-inline: 28px; }
  .section { padding: 72px 0 0; }
}

/* ===========================================================================
 * The parts of the product the demo did not draw.
 * ===========================================================================
 *
 * Sign-in, the consent banner, advertising slots, the daily challenge list,
 * the device list, the offline page. They are built from the same tokens and
 * the same shapes as everything above - a card is a card - but they were not
 * in the four pages that were designed, so they are here rather than in a
 * page sheet.
 */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
  padding: var(--space-3) var(--space-4);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus { left: 0; }

.card__title { font-size: var(--text-lg); font-weight: 700; }
.card__meta { margin-top: var(--space-2); color: var(--ink-soft); }

/* ------------------------------------------------------------------- auth */
.auth { max-width: 26rem; margin-inline: auto; }
.auth__title { font-size: var(--text-xl); }
.auth__lede { margin-top: var(--space-2); color: var(--ink-soft); }
.auth__error,
.auth__notice {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-weight: 600;
}
.auth__error { background: var(--bad-soft); color: var(--bad); }
.auth__notice { background: var(--warm-soft); color: var(--warm); }
.auth__divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--ink-mute);
  font-size: var(--text-sm);
}
.auth__divider::before,
.auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth__alt { margin-top: var(--space-4); font-size: var(--text-sm); color: var(--ink-soft); }
.auth__legal { margin-top: var(--space-4); font-size: var(--text-xs); color: var(--ink-mute); }
.btn--google { width: 100%; background: var(--surface); border-color: var(--line); }
.btn__icon { width: 18px; height: 18px; flex: none; }
.btn--danger { background: var(--bad-soft); color: var(--bad); }

/* ------------------------------------------------------------------ forms */
.field { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.field__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.field__input {
  width: 100%;
  font: inherit;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
}
.field__input:focus { border-color: var(--accent); }
.field__hint { font-size: var(--text-xs); color: var(--ink-mute); }
.account-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.account-actions .btn { flex: 1 1 11rem; }

/* ------------------------------------------------------------ advertising */
.ad-slot {
  display: grid;
  place-items: center;
  min-height: 90px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-mute);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ad-slot--leaderboard { min-height: 100px; }
.ad-slot__label { font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); }

/* ---------------------------------------------------------------- consent */
.consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px -18px rgba(31, 26, 19, 0.5);
}
.consent__inner {
  max-width: 46rem;
  margin-inline: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.consent__text { flex: 1 1 18rem; font-size: var(--text-sm); color: var(--ink-soft); }
.consent__actions { display: flex; gap: var(--space-2); }

/* ------------------------------------------------- the daily challenge */
.progress { height: 10px; margin-top: var(--space-3); border-radius: 999px; background: var(--bg-tint); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); }

.challenge-list { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.challenge-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-tint);
}
.challenge-item[data-done="1"] { opacity: 0.7; }
.challenge-item__num {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  font-size: var(--text-sm);
  font-weight: 800;
}
.challenge-item__body { flex: 1; min-width: 0; }
.challenge-item__name { display: block; font-weight: 700; }
.challenge-item__meta { display: block; font-size: var(--text-sm); color: var(--ink-mute); }

/* ------------------------------------------------------------- devices */
.device-list { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.device { padding: var(--space-3); border-radius: var(--radius-md); background: var(--bg-tint); }
.device__name { font-weight: 700; }
.device__meta { font-size: var(--text-sm); color: var(--ink-mute); }

/* A plain stack of cards, for the pages the demo did not draw. */
.stack { display: grid; gap: 16px; padding-block: 20px; }
