/* Clauding It Up: shared design system. Dark, bold, screen-share friendly. */
@font-face {
  font-family: 'Bricolage';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url(/fonts/bricolage-latin.woff2) format('woff2-variations'), url(/fonts/bricolage-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: 'Bricolage';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url(/fonts/bricolage-latin-ext.woff2) format('woff2-variations'), url(/fonts/bricolage-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #0c0a18;
  --bg: #100d20;
  --surface: #19152f;
  --surface-2: #221d3f;
  --surface-3: #2c2651;
  --line: #372f63;
  --text: #f6f3ff;
  --muted: #a8a0d4;
  --faint: #8d86c0; /* >= 4.5:1 on --surface and --surface-2 (WCAG AA) */

  --yellow: #ffd23f;
  --yellow-deep: #d9a800;
  --pink: #ff4f8b;
  --pink-deep: #c9285f;
  --on-pink: #2a0614; /* text on --pink: 5.9:1 (white was 3.1:1) */
  --cyan: #35d0ff;
  --cyan-deep: #0994c2;
  --lime: #b8f236;
  --lime-deep: #7fb10c;
  --amber: #ffb627;
  --amber-deep: #d27f00;
  --violet: #9b7bff;
  --good: #3ee08f;
  --bad: #ff5b5b;
  --warn: #ffb627;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: 'Bricolage', ui-rounded, 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 110% -10%, rgba(255, 79, 139, .16), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(53, 208, 255, .12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--yellow); text-underline-offset: 3px; }
a:hover { color: #fff; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--pink); color: #fff; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

h1, h2, h3, h4, .display {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  font-stretch: 90%;
}
h1 { font-size: clamp(2.4rem, 7vw, 5rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.8rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .88rem; }
.tiny { font-size: .76rem; }
.mono { font-family: var(--mono); font-size: .9em; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.grow { flex: 1 1 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--surface-3);
  --b-deep: #1a1633;
  --b-text: var(--text);
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: .7em 1.25em;
  border: 0;
  border-radius: 14px;
  background: var(--b);
  color: var(--b-text);
  font-weight: 750;
  font-size: 1rem;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--b-deep);
  transform: translateY(0);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease, background .15s;
  user-select: none;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); color: var(--b-text); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--b-deep); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: grayscale(.4); transform: none; }
.btn.primary { --b: var(--yellow); --b-deep: var(--yellow-deep); --b-text: #1b1400; }
.btn.pink { --b: var(--pink); --b-deep: var(--pink-deep); --b-text: var(--on-pink); }
.btn.cyan { --b: var(--cyan); --b-deep: var(--cyan-deep); --b-text: #04222e; }
.btn.lime { --b: var(--lime); --b-deep: var(--lime-deep); --b-text: #182300; }
.btn.danger { --b: #3a1830; --b-deep: #200b1a; --b-text: #ff8fa5; }
.btn.ghost { --b: transparent; --b-deep: transparent; box-shadow: none; border: 2px solid var(--line); }
.btn.ghost:active { transform: translateY(1px); }
.btn.big { min-height: 64px; font-size: 1.25rem; padding: .8em 1.6em; border-radius: 18px; box-shadow: 0 6px 0 var(--b-deep); }
.btn.huge { min-height: 84px; font-size: 1.6rem; padding: .8em 2em; border-radius: 22px; box-shadow: 0 7px 0 var(--b-deep); }
.btn.sm { min-height: 36px; padding: .35em .8em; font-size: .88rem; border-radius: 10px; box-shadow: 0 3px 0 var(--b-deep); }
.btn.block { width: 100%; white-space: normal; text-align: center; }
.btn.icon { padding: 0; width: 44px; min-height: 44px; }
.btn .ico { width: 1.2em; height: 1.2em; flex: none; }

/* ---------- Inputs ---------- */
.field { display: block; }
.field > .label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.field > .hint { display: block; color: var(--muted); font-size: .84rem; margin-top: 4px; }
.input, .textarea, .select {
  width: 100%;
  background: var(--ink);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1.05rem;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 140px; resize: vertical; font-family: var(--mono); font-size: .92rem; line-height: 1.45; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 210, 63, .18); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input.code {
  text-transform: uppercase;
  letter-spacing: .4em;
  text-align: center;
  font-weight: 800;
  font-size: 2.2rem;
  padding: 12px 8px 12px calc(8px + .4em);
  font-stretch: 85%;
}

/* Phones and touch screens: 44px tap targets, and 16px+ text fields so iOS Safari doesn't zoom on focus. */
@media (max-width: 760px), (pointer: coarse) {
  .btn.sm { min-height: 44px; }
  .btn.icon.sm { width: 44px; min-height: 44px; }
  .textarea { font-size: 16px; }
}

/* ---------- Cards & chips ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 40%), var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; }
.card.tight { padding: 16px; border-radius: var(--radius); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  font-size: .84rem; font-weight: 700;
  white-space: nowrap;
}
.chip.yellow { background: rgba(255, 210, 63, .14); border-color: rgba(255, 210, 63, .45); color: var(--yellow); }
.chip.pink { background: rgba(255, 79, 139, .14); border-color: rgba(255, 79, 139, .45); color: #ff8db4; }
.chip.good { background: rgba(62, 224, 143, .12); border-color: rgba(62, 224, 143, .45); color: var(--good); }
.chip.bad { background: rgba(255, 91, 91, .12); border-color: rgba(255, 91, 91, .45); color: #ff8a8a; }
.chip.warn { background: rgba(255, 182, 39, .12); border-color: rgba(255, 182, 39, .45); color: var(--warn); }

/* ---------- Team colours ---------- */
.team-pink  { --team: var(--pink);  --team-deep: var(--pink-deep);  --team-text: var(--on-pink); }
.team-cyan  { --team: var(--cyan);  --team-deep: var(--cyan-deep);  --team-text: #04222e; }
.team-lime  { --team: var(--lime);  --team-deep: var(--lime-deep);  --team-text: #182300; }
.team-amber { --team: var(--amber); --team-deep: var(--amber-deep); --team-text: #271600; }
.team-dot { width: .8em; height: .8em; border-radius: 50%; background: var(--team); display: inline-block; flex: none; }

/* ---------- Avatars ---------- */
.avatar { display: inline-block; width: 48px; height: 48px; flex: none; }
.avatar svg { width: 100%; height: 100%; overflow: visible; }
.avatar.xl { width: 132px; height: 132px; }
.avatar.lg { width: 76px; height: 76px; }
.avatar.sm { width: 32px; height: 32px; }
.avatar.xs { width: 24px; height: 24px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 1000; width: min(520px, calc(100% - 32px)); pointer-events: none; }
.toast {
  background: var(--surface-3); border: 1.5px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: 14px; font-weight: 650; box-shadow: var(--shadow);
  animation: toast-in .35s var(--ease-pop);
}
.toast.bad { border-color: var(--bad); }
.toast.good { border-color: var(--good); }
@keyframes toast-in { from { transform: translateY(20px) scale(.95); opacity: 0; } }

/* ---------- Motion ---------- */
@keyframes pop-in { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes rise-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes pulse-red { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 91, 91, .6); } 50% { box-shadow: 0 0 0 18px rgba(255, 91, 91, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
.pop-in { animation: pop-in .5s var(--ease-pop) both; }
.rise-in { animation: rise-in .5s cubic-bezier(.2, .8, .2, 1) both; }
.bob { animation: bob 2.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Site chrome ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 44px; height: 44px; }
.brand .wordmark { font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; line-height: .95; font-stretch: 85%; }
.brand .wordmark em { font-style: normal; color: var(--yellow); }
.brand:hover { color: var(--text); }
.footer { padding: 48px 0 32px; color: var(--faint); font-size: .85rem; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(6, 4, 14, .72); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 500; padding: 16px; animation: fade .2s; }
.modal { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; animation: pop-in .35s var(--ease-pop); }
.modal:focus { outline: none; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Print ---------- */
@media print {
  body { background: #fff !important; color: #111 !important; }
  .no-print, .toasts, .confetti-canvas { display: none !important; }
}

/* ---------- Simple centred pages ---------- */
.page-center { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 24px 0; }
.page-card { max-width: 520px; }
.page-card img { margin: 0 auto 12px; }
.page-card h1 { margin-bottom: 8px; }
