/* Lunar Interactive, design C: Horizon.
   Night sky up top, a curved moon horizon, content on the pale moon surface. Red Hat Display + Text. */
:root {
  --bg: #E3E0EA;
  --surface: #F5F4F8;
  --surface-2: #ECEAF1;
  --field: #FFFFFF;
  --line: #CDC9D8;
  --line-2: #B9B4C7;
  --text: #15131F;
  --text-2: #34303F;
  --muted: #5A5668;
  --accent: #4B37B0;
  --primary: #15131F;
  --on-primary: #FFFFFF;
  --primary-hover: #34303F;
  --ghost-hover: rgba(21, 19, 31, .06);
  --sky: #0D0B18;
  --sky-text: #F1EFF7;
  --sky-muted: #A29DB8;
  --header-bg: var(--sky);
  --header-line: var(--sky);
  --header-line-2: rgba(255, 255, 255, .2);
  --head-text: var(--sky-text);
  --head-muted: var(--sky-muted);
  --ok: #1D7A50;
  --pending: #8F6200;
  --bad: #B23B22;
  --danger-line: rgba(178, 59, 34, .4);
  --danger-text: #B23B22;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%235A5668' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --display: "Red Hat Display", "Segoe UI", sans-serif;
  --body: "Red Hat Text", "Segoe UI", system-ui, sans-serif;
  --r-sm: 10px;
  --r: 18px;
  --r-lg: 24px;
  --h-weight: 700;
  --h1-weight: 800;
  --h1-track: -.01em;
  color-scheme: light;
}
/* ---------- shared layout. Each design sets the tokens above this block and adds its own pieces below it. ---------- */
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--text); }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
#app { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
#view { flex: 1; outline: none; }

.wrap {
  max-width: 1120px; margin: 0 auto; width: 100%;
  padding-left: max(clamp(16px, 4vw, 32px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 4vw, 32px), env(safe-area-inset-right, 0px));
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: var(--h-weight, 600); margin: 0; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; text-transform: var(--h1-case, none); letter-spacing: var(--h1-track, 0); font-weight: var(--h1-weight, 700); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.15; }
h3 { font-size: 1.2rem; line-height: 1.25; }

/* demo bar (only shows when the site has no database configured) */
.demo-bar { background: var(--surface); border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.demo-bar .wrap { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; padding-block: 8px; }
.demo-bar strong { color: var(--pending); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; }
.seg button { background: none; border: 0; border-radius: 999px; padding: 3px 12px; cursor: pointer; color: var(--muted); font-size: .82rem; }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-family: inherit; font-size: inherit; }

/* header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--header-bg); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--header-bg); border-bottom: 1px solid var(--header-line, var(--line)); color: var(--head-text, var(--text)); }
.top-in { display: flex; align-items: center; gap: 12px 28px; min-height: 68px; padding-block: 10px; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; line-height: 1; flex: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.wm-text { font-family: var(--display); font-weight: 600; font-size: 1.02rem; white-space: nowrap; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { font-family: var(--display); font-weight: 500; font-size: .98rem; text-decoration: none; color: var(--head-muted, var(--muted)); padding: 8px 12px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--head-text, var(--text)); }
.head-cta:empty { display: none; }
.head-cta, .account { position: relative; flex: none; }

.user-chip { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 16px 4px 4px; border: 1px solid var(--header-line-2, var(--line-2)); border-radius: 999px; font-size: .95rem; }
.user-chip::-webkit-details-marker { display: none; }
.avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-family: var(--display); font-size: .72rem; font-weight: 600; color: var(--muted); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 40px; height: 40px; font-size: .85rem; }
.role-tag { font-size: .78rem; color: var(--head-muted, var(--muted)); }
.menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r); display: flex; flex-direction: column; padding: 6px; z-index: 25; }
.menu a, .menu button { text-align: left; background: none; border: 0; border-radius: var(--r-sm); padding: 10px 12px; text-decoration: none; cursor: pointer; font-size: .95rem; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }

/* buttons: one quiet hover, no shadows or movement */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 8px 24px; border: 1px solid var(--line-2); border-radius: var(--btn-r, 999px); background: transparent;
  font-family: var(--display); font-weight: var(--btn-weight, 600); font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none; color: inherit;
  cursor: pointer; transition: background-color .15s, border-color .15s;
}
.btn:hover:not(:disabled) { background: var(--ghost-hover); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.small { min-height: 38px; padding: 6px 16px; font-size: .92rem; }
.btn.danger { border-color: var(--danger-line); color: var(--danger-text); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.busy { pointer-events: none; opacity: .6; }
.btn[aria-disabled="true"] { opacity: .5; cursor: default; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ext { width: 1em; height: 1em; flex: none; }

/* live counts */
.live-pill { display: inline-block; font-size: .95rem; color: var(--muted); white-space: nowrap; }
.live-pill b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* page sections */
.page-head { padding-block: clamp(56px, 9vw, 104px) clamp(28px, 4vw, 44px); display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.page-head p { color: var(--muted); max-width: 54ch; margin: 14px 0 0; font-size: 1.08rem; }
.page-head .eyebrow + h1, .page-head .link + h1 { margin-top: 16px; }
.eyebrow { font-family: var(--display); font-weight: 600; font-size: .85rem; color: var(--accent); margin: 0; }
.section { padding-block: clamp(48px, 7vw, 80px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 24px; }
.head-side { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.link { font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.pb { padding-bottom: clamp(56px, 8vw, 96px); }

.empty { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(36px, 6vw, 60px) 24px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); margin: 0 0 8px; font-size: 1.3rem; }
.empty p { margin: 0 auto; max-width: 46ch; }
.empty p + .btn, .empty p + .actions { margin-top: 22px; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; color: var(--text-2); margin: 0 0 24px; }
.loading { color: var(--muted); padding: 40px 0; }

/* games */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 32px 24px; }
.game-wrap { position: relative; min-width: 0; }
.game { display: flex; flex-direction: column; text-decoration: none; height: 100%; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 2.2rem; color: var(--line-2); }
.ccu-badge { position: absolute; left: 12px; bottom: 12px; display: inline-block; background: rgba(10, 9, 16, .78); color: #F1EFF6; border-radius: 999px; padding: 4px 12px; font-size: .85rem; }
.ccu-badge b { font-weight: 600; font-variant-numeric: tabular-nums; }
.game-body { padding: 14px 2px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.game-body h3 { font-size: 1.25rem; min-width: 0; overflow-wrap: anywhere; }
a.game:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.play { display: inline-flex; align-items: center; gap: 5px; font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--accent); white-space: nowrap; text-decoration: none; }
.example-tag { position: absolute; top: 12px; left: 12px; font-size: .75rem; font-weight: 700; background: #E2B65A; color: #15131F; border-radius: 999px; padding: 3px 10px; }
.owner-tools { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; z-index: 2; }
.owner-tools .btn { background: var(--surface); }
.soon-badge { position: absolute; left: 12px; bottom: 12px; background: rgba(10, 9, 16, .78); color: #F1EFF6; border-radius: 999px; padding: 4px 12px; font-size: .82rem; font-weight: 600; }
.game.upcoming .game-body { flex-direction: column; align-items: flex-start; gap: 8px; }
.gb-text { min-width: 0; display: grid; gap: 4px; }
.game-desc { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }

/* team */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 48px 24px; }
.person { position: relative; display: flex; flex-direction: column; min-width: 0; }
.person .portrait { overflow: hidden; display: grid; place-items: center; background: var(--surface); }
.person .portrait img { width: 100%; height: 100%; object-fit: cover; }
.person .portrait .ph { font-family: var(--display); font-weight: 600; font-size: 2.4rem; color: var(--line-2); }
.person .info { display: flex; gap: 12px; min-width: 0; max-width: 100%; }
.who-txt { min-width: 0; max-width: 100%; display: grid; gap: 2px; }
.person h3 { font-size: 1.2rem; overflow-wrap: anywhere; }
.person .rank { font-size: .92rem; color: var(--muted); }
.person .owner-tools { top: 0; right: 0; }
.icon-link { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; color: var(--text); }
.icon-link:hover { background: var(--ghost-hover); }
.icon-link img, .icon-link svg { width: 18px; height: 18px; }

/* careers + appeals */
.positions { display: grid; border-top: 1px solid var(--line); }
.position { padding: 28px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: center; }
.position h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin: 0 0 6px; }
.position p { margin: 0; color: var(--muted); max-width: 68ch; }
.position.is-closed h3, .position.is-closed > div > p { color: var(--muted); }
.position h3 .pill { vertical-align: middle; margin-left: 10px; }
.pos-actions { display: grid; gap: 8px; justify-items: stretch; min-width: 0; }
.pos-actions .btn { width: 100%; }
.meta { font-size: .9rem; color: var(--muted); margin-top: 12px; display: flex; gap: 6px 18px; flex-wrap: wrap; }
.reqs { margin-top: 14px; }
.reqs h4 { margin: 0 0 6px; font-size: .95rem; }
.reqs ul { margin: 0; padding-left: 20px; display: grid; gap: 3px; color: var(--text-2); }
.deadline { color: var(--accent); }
.deadline.soon { color: var(--pending); }

.pill { display: inline-flex; align-items: center; font-family: var(--body); font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: color-mix(in srgb, currentColor 13%, transparent); }
.pill.pending { color: var(--pending); }
.pill.accepted, .pill.open { color: var(--ok); }
.pill.declined { color: var(--bad); }
.pill.closed { color: var(--muted); }
.page-head h1 + p .pill { margin-left: 6px; vertical-align: middle; }

/* forms */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 40px); max-width: 760px; }
.apply-form { display: grid; gap: 28px; }
.q { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.q-label { font-weight: 600; font-size: 1.05rem; }
.q-label em { color: var(--bad); font-style: normal; }
.q-hint { color: var(--muted); font-size: .9rem; }
input[type="text"], input[type="url"], input[type="number"], input[type="search"], input[type="datetime-local"], textarea, select {
  width: 100%; background: var(--field); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 14px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
textarea { min-height: 128px; resize: vertical; }
select { appearance: none; padding-right: 40px; cursor: pointer; background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
input[type="file"] { font-size: .92rem; color: var(--muted); max-width: 100%; }
input[type="file"]::file-selector-button { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; margin-right: 12px; cursor: pointer; }
.counter { font-size: .8rem; color: var(--muted); justify-self: end; font-variant-numeric: tabular-nums; }
.counter.near { color: var(--pending); }
.counter.full { color: var(--bad); }
.choices { display: grid; gap: 8px; }
.choices.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.choice { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--field); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); }
.choice input { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; flex: none; }
.form-error { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); border-radius: var(--r-sm); padding: 10px 14px; margin: 0; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: .95rem; }
.field small { color: var(--muted); font-weight: 400; }
.field > .field-hint { font-weight: 400; font-size: .88rem; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: .95rem; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 180px; min-width: 0; }
.apply-extras { margin-bottom: 16px; padding-block: 22px; }
.apply-extras .reqs { margin-top: 0; }
.apply-extras .meta { margin-top: 12px; }

/* my applications + admin */
.apps { display: grid; gap: 12px; }
.app { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; overflow: hidden; }
.app-head { display: flex; gap: 12px 16px; align-items: center; padding: 18px 22px; flex-wrap: wrap; }
.app-head .who { display: flex; gap: 12px; align-items: center; min-width: 0; flex: 1; }
.app-head h3 { font-size: 1.12rem; overflow-wrap: anywhere; }
.app-head .when { font-size: .88rem; color: var(--muted); }
.answers { border-top: 1px solid var(--line); padding: 18px 22px; display: grid; gap: 16px; margin: 0; }
.answers dt { font-size: .88rem; color: var(--muted); }
.answers dd { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.app-actions { border-top: 1px solid var(--line); padding: 14px 22px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
details.app > summary { list-style: none; cursor: pointer; }
details.app > summary::-webkit-details-marker { display: none; }
.toggle-hint { font-size: .85rem; color: var(--muted); }
details[open] .toggle-hint::after { content: " \25B4"; }
details:not([open]) .toggle-hint::after { content: " \25BE"; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 16px; margin-bottom: -1px; cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--muted); white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.toolbar select { width: auto; min-width: 200px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: .88rem; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip .n { margin-left: 7px; font-variant-numeric: tabular-nums; font-weight: 700; }
.table-list { display: grid; border-top: 1px solid var(--line); }
.tl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.tl-row .who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.tl-row .nm { font-weight: 600; overflow-wrap: anywhere; }
.tl-row .sm { font-size: .85rem; color: var(--muted); }
.tl-row .ctl { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.kind-tag { display: block; font-size: .8rem; color: var(--accent); margin-bottom: 2px; }
.admin-sub { font-size: 1.45rem; margin-bottom: 16px; }
.appeal-status { display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px 18px; margin-bottom: 32px; color: var(--muted); }
.appeal-status.is-open { color: var(--text-2); }

.qb { display: grid; gap: 14px; }
.qb-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); padding: 18px; display: grid; gap: 12px; }
.qb-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.qb-type { font-family: var(--display); font-weight: 600; font-size: .92rem; color: var(--accent); }
.qb-ctl { display: flex; gap: 6px; }
.qb-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.qb-add span { color: var(--muted); font-size: .9rem; margin-right: 4px; }

.decision { margin-right: auto; align-self: center; color: var(--muted); font-size: .9rem; }
.decision b { color: var(--text); font-weight: 600; }
.notes { border-top: 1px solid var(--line); padding: 16px 22px 18px; display: grid; gap: 12px; background: var(--surface-2); }
.notes-head { font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--accent); display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.notes-head span { color: var(--muted); font-family: var(--body); font-size: .85rem; font-weight: 400; }
.snote { display: flex; gap: 12px; align-items: flex-start; }
.note-main { flex: 1; min-width: 0; }
.note-meta { font-size: .85rem; color: var(--muted); }
.note-meta b { color: var(--text); font-weight: 600; }
.note-main p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.snote .linkish { font-size: .82rem; flex: none; }
.note-form { display: grid; gap: 6px; }
.note-form textarea { min-height: 64px; }
.note-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.role-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; }
.role-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--field); cursor: pointer; min-width: 0; }
.role-opt:has(input:checked) { border-color: var(--accent); }
.role-opt input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.role-opt span:last-of-type { overflow-wrap: anywhere; }
.role-opt small { margin-left: auto; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.role-opt.is-locked { opacity: .55; cursor: not-allowed; }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.bot-line { flex-basis: 100%; order: 10; color: var(--muted); font-size: .85rem; }
.bot-line:empty { display: none; }
.dm-box { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); padding: 16px; display: grid; gap: 14px; }
.dm-box code { font-size: .88em; color: var(--accent); }

.passers-card { max-width: 640px; }
.passers { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.passer-name { font-weight: 600; margin-right: 10px; overflow-wrap: anywhere; }
.passer-date { color: var(--muted); font-size: .88rem; }

/* modal + toast */
.modal-back { position: fixed; inset: 0; background: rgba(6, 5, 12, .6); z-index: 50; display: grid; place-items: start center; overflow-y: auto;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal { width: 100%; max-width: 560px; background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 34px); margin-block: 4vh; }
.modal.wide { max-width: 820px; }
.modal h2 { font-size: 1.6rem; margin-bottom: 18px; }
.modal form { display: grid; gap: 16px; }
.modal p { margin: 0; color: var(--text-2); }

#toast { position: fixed; left: 50%; bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 12px)); transform: translateX(-50%); opacity: 0; pointer-events: none; z-index: 60; background: var(--primary); color: var(--on-primary); border-radius: var(--r-sm); padding: 12px 20px; transition: opacity .2s; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; }
#toast.err { background: var(--bad); color: #fff; }

/* footer */
.foot { margin-top: clamp(64px, 9vw, 104px); border-top: 1px solid var(--line); }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 10px 24px; flex-wrap: wrap; padding-block: 24px 30px; font-size: .9rem; color: var(--muted); }
.foot-links { display: inline-flex; gap: 8px 22px; flex-wrap: wrap; }
.foot-links a { color: var(--text-2); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* privacy */
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.3rem, 2.4vw, 1.55rem); margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 12px; color: var(--text-2); }
.prose ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); }

@media (max-width: 860px) {
  .position { grid-template-columns: minmax(0, 1fr); }
  .pos-actions { justify-items: start; }
  .pos-actions .btn { width: auto; }
}
@media (max-width: 720px) {
  .top-in { flex-wrap: wrap; column-gap: 12px; min-height: 0; padding-block: 12px 0; }
  .head-cta { margin-left: auto; }
  .head-cta:empty + .account { margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .nav::-webkit-scrollbar { display: none; }
  .tl-row { grid-template-columns: minmax(0, 1fr); }
  .tl-row .ctl { justify-content: flex-start; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { flex: 1; }
}
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .wm-text { font-size: .92rem; }
  .brand-mark { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}


/* ---------- design C pieces ---------- */
.top .btn { border-color: var(--header-line-2); color: var(--sky-text); }
.top .btn:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.wm-text { font-weight: 800; }
#view { overflow-x: clip; }

/* moon horizon: a very large circle in the page colour, its top edge peeking into the sky */
.hero { min-height: calc(100svh - 69px - 80px); display: flex; flex-direction: column; background: linear-gradient(var(--sky) calc(100% - 2px), var(--bg) 0); color: var(--sky-text); overflow: hidden; }
.hero-in { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-block: clamp(48px, 7vw, 88px) clamp(56px, 6vw, 80px); }
.foot { margin-top: 0; border-top-color: transparent; }
.home-games { padding-bottom: clamp(56px, 8vw, 96px); }
.hero-mark { width: clamp(64px, 8vw, 92px); height: auto; margin-bottom: 28px; }
.hero h1 { font-size: clamp(2.5rem, 7vw, 5.2rem); line-height: 1; }
.lede { margin: 16px 0 0; font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--sky-muted); }
.hero .actions { justify-content: center; margin-top: 32px; }
.hero .btn.primary { background: var(--sky-text); border-color: var(--sky-text); color: var(--text); }
.hero .btn.primary:hover { background: #FFFFFF; border-color: #FFFFFF; }
.hero .btn:not(.primary) { border-color: rgba(255, 255, 255, .28); color: var(--sky-text); }
.hero .btn:not(.primary):hover { background: rgba(255, 255, 255, .08); }
.hero .actions .btn { min-width: 140px; }
/* values are at most "999.9K+" (compact()), so two columns fit even on phones */
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 240px)); justify-content: center; margin: clamp(40px, 5vw, 56px) 0 0; width: 100%; }
.hero-stats > div { display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; padding-inline: 12px; min-width: 0; }
.hero-stats > div + div { border-left: 1px solid rgba(255, 255, 255, .14); }
.hero-stats dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 3.4vw, 2.6rem); white-space: nowrap; line-height: 1; font-variant-numeric: tabular-nums; color: var(--sky-text); }
.hero-stats dt { font-family: var(--display); font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sky-muted); white-space: nowrap; }
.horizon { position: relative; height: clamp(72px, 9vw, 120px); display: flex; justify-content: center; align-items: flex-start; }
.horizon::before, .page-head::after { content: ""; position: absolute; left: 50%; width: 400vw; aspect-ratio: 1; border-radius: 50%; background: var(--bg); transform: translateX(-50%); }
.horizon::before { top: 0; }
.horizon-btn { position: relative; z-index: 1; transform: translateY(-50%); background: var(--accent); border-color: var(--accent); color: #FFFFFF; min-height: 52px; padding-inline: 30px; }
.horizon-btn:hover:not(:disabled) { background: #5A46C4; border-color: #5A46C4; }

/* inner pages: the title sits in the sky band above the same horizon */
.page-head { position: relative; isolation: isolate; overflow-y: clip; color: var(--sky-text); margin-bottom: clamp(32px, 5vw, 56px); padding-bottom: calc(7vw + 56px); }
.page-head::before { content: ""; position: absolute; z-index: -2; inset: 0 auto 2px 50%; width: 100vw; transform: translateX(-50%); background: var(--sky); }
/* the arc drops about 6.4vw from its peak to the screen edge, so it starts 7vw up */
.page-head::after { z-index: -1; top: calc(100% - 7vw - 10px); }
.page-head p { color: var(--sky-muted); }
.page-head .link, .page-head .eyebrow { color: #C3B8FF; }
.page-head .btn { border-color: var(--header-line-2); color: var(--sky-text); }
.page-head .btn:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.page-head .live-pill { color: var(--sky-muted); }
.page-head .live-pill b { color: var(--sky-text); }
.page-head .pill.open { color: #7FE0B4; }
.page-head .pill.closed { color: var(--sky-muted); }

.people { gap: 48px 24px; }
.person { align-items: center; text-align: center; }
.person .portrait { width: min(calc(100% - 16px), 172px); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 6px var(--surface); }
.person .info { flex-direction: column; align-items: center; gap: 14px; padding-top: 22px; }
.icon-link img { filter: invert(1); }

@media (max-width: 520px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 340px; }
  .people { grid-template-columns: 1fr 1fr; gap: 40px 16px; }
  .person h3 { font-size: 1.1rem; }
}
/* only one stat showing (visit counts not available yet) */
.hero-stats:has(> div[hidden]) { grid-template-columns: minmax(0, 240px); }
