/* Shared base for the raffle-book design used by Team Wheel, Retro and Team Votes.
   Fonts are self-hosted (the CSP allows no font CDN). Both are variable fonts under the
   SIL Open Font License; one file per subset serves every weight.
   Each section links this file before its own styles.css and sets --app on <body>. */

@font-face {
  font-family: "Big Shoulders Display"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/big-shoulders-display-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Big Shoulders Display"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/big-shoulders-display-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #16182b;          /* text, primary buttons */
  --ink-2: #4b4f68;        /* secondary text and hints: 7.9:1 on paper */
  --paper: #ffffff;
  --ground: #eceef3;       /* page background and side panels */
  --line: #cfd3de;         /* dividers only, never a control edge */
  --edge: #7d8299;         /* control edges: 3.7:1 on paper */
  --serial: #c8102e;       /* draw numbers on paper only, never on a coloured fill */
  --tangerine: #ff8a1f;    /* Team Wheel */
  --cerise: #ec4f86;       /* Retro */
  --sky: #45b0e6;          /* Team Votes */
  --focus: #1849d6;
  --danger: #b42318;
  --app: var(--ink);
  --app-soft: var(--ground);
  --radius: 6px;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --text: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --perf: 2px dashed var(--ink);
}
.app-wheel { --app: var(--tangerine); --app-soft: #ffe6cf; }
.app-retro { --app: var(--cerise);    --app-soft: #fde0ea; }
.app-votes { --app: var(--sky);       --app-soft: #dcf0fb; }

/* Text on an app-colour fill is always full ink (contrast). */
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Shared app shell (Team Wheel, Retro, Team Votes; never linked on Shop) ---------- */
.page { min-height: 100vh; display: flex; flex-direction: column; }

.bar {
  display: flex; align-items: center; gap: 14px; padding: 0 20px; min-height: 60px;
  background: var(--app); color: var(--ink);
}
.brand {
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  font: 900 1.45rem/1 var(--display); text-transform: uppercase; letter-spacing: .03em;
}
.brand .mark {
  width: 30px; height: 22px; border-radius: 3px; display: grid; place-items: center;
  background: var(--ink); color: var(--app); font-size: .8rem;
}
.room-name {
  font: 700 1.05rem/1.2 var(--text); padding-left: 14px; border-left: 2px solid rgb(22 24 43 / .35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}

.landing {
  flex: 1; display: grid; align-content: start; grid-template-columns: 1.1fr 1fr;
  gap: 56px; align-items: start; padding: 56px 64px; max-width: 1280px; width: 100%; margin: 0 auto;
}
.landing-side { display: grid; gap: 24px; min-width: 0; align-content: start; }

.landing-foot {
  width: 100%; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2);
}
.landing-foot .foot-inner {
  display: grid; gap: 14px; padding: 24px 64px; max-width: 1280px; width: 100%; margin: 0 auto;
}
.landing-foot a { color: var(--ink); }
.landing-foot .api-sign, .landing-foot .privacy-note { max-width: 75ch; }

.stage.narrow { flex: 1; max-width: 760px; width: 100%; margin: 0 auto; background: transparent; }

/* Bug-report trigger stays hidden until /bug-report.js sees #bugpin-widget mount. */
html:not(.bugpin-ready) [data-bug-report],
html:not(.bugpin-ready) .bug-report-sep {
  display: none !important;
}

.site-home button.link-btn {
  display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0;
  background: none; color: var(--ink-2); font: inherit; font-weight: inherit;
  line-height: inherit; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1.5px; white-space: normal;
}
.site-home button.link-btn:hover { background: none; color: var(--ink); }
.site-home button.link-btn:active { transform: none; }

/* Mobile room menu: invisible on desktop where .bar-menu flattens into .bar. */
.bar .room-menu-toggle,
.bar .menu-only {
  display: none;
}
.bar-menu { display: contents; }

@media (max-width: 760px) {
  .landing { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px 16px; }
  .landing-foot .foot-inner { padding: 20px 16px; }

  header.bar { position: relative; flex-wrap: wrap; padding: 10px 14px; gap: 8px; }
  header.bar .brand { font-size: 1.25rem; gap: 7px; }
  header.bar .spacer { display: none; }
  header.bar #copy-link,
  header.bar #copy-room-link,
  header.bar .bar-copy {
    order: 2; margin-left: auto; min-height: 38px; padding: 0 9px; gap: 5px;
  }
  header.bar .room-menu-toggle {
    order: 3; display: inline-flex; min-height: 38px; padding: 0 9px; gap: 5px;
  }
  header.bar .room-menu-toggle[aria-expanded="true"] { background: var(--paper); border-color: var(--ink); }
  header.bar .room-name {
    order: 5; flex: 1 1 100%; border-left: 0; padding-left: 0;
    border-top: 1px solid rgb(22 24 43 / .18); padding-top: 6px;
    white-space: normal; overflow-wrap: anywhere;
  }

  .bar-menu { display: none; }
  .bar-menu.open {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 25;
    background: var(--paper); color: var(--ink);
    border-bottom: 2px solid var(--ink);
    box-shadow: 0 10px 24px rgb(22 24 43 / .18);
    padding: 14px 16px; display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  }
  .bar-menu.open .menu-only { display: inline-flex; }
  .bar-menu.open span.menu-only { display: inline; }
  .bar-menu.open .menu-divider {
    display: block; border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%;
  }
  .bar-menu.open .who,
  .bar-menu.open .updated {
    display: block; white-space: normal; font-size: .95rem; color: var(--ink-2);
    padding-bottom: 10px; border-bottom: 1px solid var(--line);
  }
  .bar-menu.open .who b { color: var(--ink); }
  .bar-menu.open .present-wrap {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 10px 12px; background: var(--ground);
    border: 1.5px solid var(--line); border-radius: var(--radius);
  }
  .bar-menu.open .present { width: 100%; justify-content: flex-start; padding: 2px 0; min-height: 36px; }
  .bar-menu.open .present-tip {
    display: block; position: static; transform: none;
    background: transparent; color: var(--ink-2); box-shadow: none;
    padding: 4px 0 0; max-width: none; width: auto; pointer-events: auto;
  }
  .bar-menu.open .present-tip::before { display: none; }
}
