@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url(/fonts/SpaceGrotesk-500.ttf) format('truetype'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url(/fonts/SpaceGrotesk-700.ttf) format('truetype'); }

:root {
  color-scheme: dark;
  --bg: #0E0F12;
  --card: #1A1C21;
  --lime: #C6F432;
  --flame: #FF7A1A;
  --text: #F2F2F2;
  --muted: #9A9CA3;
  --line: color-mix(in srgb, var(--text) 14%, transparent);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 17px/1.65 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 16px; }

a { color: var(--lime); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
[tabindex='-1']:focus { outline: none; } /* a heading focused by script, not a control */

header { padding: 20px 0 8px; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--lime); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.mark::before { content: ''; width: .7em; height: .7em; border-radius: 50%; background: var(--flame); }

h1 { margin: 32px 0 8px; font-size: clamp(2rem, 7vw, 2.9rem); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
h2 { margin: 40px 0 8px; font-size: 1.3rem; line-height: 1.3; font-weight: 700; color: var(--lime); }
p, ul { margin: 0 0 14px; }
ul { padding-left: 1.25em; }
li { margin-bottom: 6px; }
.muted { color: var(--muted); }
.lede { font-size: 1.15rem; color: var(--muted); }

.card { background: var(--card); border-radius: 16px; padding: 20px; margin: 0 0 12px; }
.card > :last-child { margin-bottom: 0; }
.card h2 { margin-top: 0; }
.draft { border: 1px solid var(--flame); background: color-mix(in srgb, var(--flame) 8%, var(--card)); font-weight: 700; color: var(--flame); } /* always with .card: its 16px radius */

dl.processors { display: grid; gap: 12px; margin: 0; }
dl.processors div { background: var(--card); border-radius: 16px; padding: 16px 20px; }
dl.processors dt { font-weight: 700; }
dl.processors dd { margin: 4px 0 0; color: var(--muted); }

.links { display: grid; gap: 12px; padding: 0; list-style: none; }
.links a { display: block; background: var(--card); border-radius: 16px; padding: 18px 20px; font-weight: 700; text-decoration: none; }
.links a:hover { outline: 2px solid var(--lime); }

form { display: grid; gap: 12px; }
label { font-weight: 700; }
input {
  width: 100%; min-height: 52px; padding: 12px 14px;
  background: var(--bg); color: var(--text);
  border: 2px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 1.15rem;
}
input[inputmode='numeric'] { letter-spacing: .4em; text-align: center; font-size: 1.5rem; }
.btn {
  min-height: 52px; padding: 12px 20px;
  background: var(--lime); color: var(--bg);
  border: 0; border-radius: 12px;
  font: 700 1.05rem 'Space Grotesk', system-ui, sans-serif; cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.danger { background: var(--flame); }
.btn.ghost { background: transparent; color: var(--lime); border: 2px solid var(--line); }
.error { color: var(--flame); font-weight: 700; margin: 12px 0 0; }
.error:empty { margin: 0; }
[hidden] { display: none !important; }

footer { margin-top: 56px; padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}

/* The dare, group invite and profile pages (web/functions/_lib/pages.ts) */
.share .btn { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
.share > .btn { margin: 24px 0 12px; }
.installs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.installs .btn { line-height: 1.25; font-size: .95rem; }
.installs small { color: var(--muted); font-size: .8rem; font-weight: 500; }
.btn.off { color: var(--muted); cursor: default; }
.avatar { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 50%; font-size: 32px; font-weight: 700; line-height: 1; }
.tape { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; margin-top: 24px; }
.side { display: grid; justify-items: center; align-content: start; gap: 2px; min-width: 0; padding: 16px 8px; background: var(--card); border-radius: 16px; text-align: center; }
.side .avatar { margin-bottom: 8px; }
.side strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side span:not(.avatar) { color: var(--muted); font-size: .85rem; line-height: 1.4; }
.vs { align-self: center; color: var(--flame); font-size: 1.25rem; font-weight: 700; }
.share h1 { overflow-wrap: anywhere; }
.code { margin: 24px 0 0; color: var(--muted); text-align: center; }
.code strong { display: block; color: var(--lime); font-size: clamp(2.6rem, 14vw, 3.6rem); line-height: 1.2; letter-spacing: .12em; }
.state { margin: 24px 0 0; padding: 14px 18px; border: 1px solid var(--flame); border-radius: 12px; color: var(--flame); font-weight: 700; }
.emoji { margin: 32px 0 0; font-size: 3.5rem; line-height: 1; }
.rows { list-style: none; padding: 4px 20px; }
.rows li { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 0; }
.rows li + li { border-top: 1px solid var(--line); }
.rows li > .muted { flex: none; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 16px; margin: 32px 0 20px; }
.who h1, .who p { margin: 0; }
.grid { font: inherit; font-size: .95rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
