/* FARO's colours, from faro.com and the CAM2 pages: FARO navy for the brand,
   royal blue for what you can click, a spark of orange for the pointer, cool
   greys for the page. Green, red and amber only for what they mean. */

:root {
  /* The same stack as elysiajs.com: the system's own font (San Francisco on
     Apple, Segoe UI on Windows), Inter where it is installed. */
  --font: -apple-system, BlinkMacSystemFont, Inter, system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(.2, 0, 0, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --r-lg: 8px;
  --r-md: 6px;
  --r-sm: 4px;
  --live: #3455db;
  --win: #3455db;

  --navy: #01426a;
  --orange: #ff4500;

  color-scheme: light;
  --bg: #f1f4f6;
  --band: linear-gradient(120deg, #01426a 0%, #003353 55%, #081e2e 100%);
  --surface: #ffffff;
  --raised: #ffffff;
  --field: #f1f4f6;
  --field-hover: #e4e9ed;
  --hover: rgba(1, 66, 106, .05);
  --border: #d9e0e5;
  --divider: #e6ebef;
  --text: #2f3234;
  --text-2: #52595d;
  --text-3: #7d868b;
  --heading: #01426a;
  --shadow: 0 1px 2px rgba(8, 30, 46, .12), 0 2px 6px rgba(8, 30, 46, .08);
  --shadow-soft: 0 2px 8px rgba(8, 30, 46, .14);

  --primary: #3455db;
  --primary-hover: #2945c2;
  --on-primary: #ffffff;
  --primary-tint: #e9edfb;
  --primary-ink: #2945c2;
  --success: #1e8e3e;
  --success-tint: #e6f4ea;
  --success-ink: #137333;
  --danger: #c62828;
  --danger-tint: #fdecea;
  --danger-ink: #b71c1c;
  --warning: #f29900;
  --warning-tint: #fef4e0;
  --warning-ink: #a15c00;
  --custard: #f9ab00;

  --beam: rgba(255, 255, 255, .09);
  --slice-a: #ffffff;
  --slice-b: #f1f4f6;
  --slice-c: #e6ebef;
  --slice-ink: #2f3234;
  --slice-line: #d9e0e5;
  --rim: #01426a;
  --rim-line: #003353;
  --rim-dot: rgba(255, 255, 255, .32);
  --rim-dot-on: #ffffff;
  --peg: #9aa8b2;
  --face-bg: #f1f4f6;
  --snack: #081e2e;
  --snack-ink: #ffffff;
  --snack-action: #8fa6ff;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #081e2e;
  --surface: #0d2738;
  --raised: #113047;
  --field: #113047;
  --field-hover: #173b55;
  --hover: rgba(255, 255, 255, .05);
  --border: #1d4059;
  --divider: #183850;
  --text: #e8eef3;
  --text-2: #a3b5c2;
  --text-3: #7d91a0;
  --heading: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .25);
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, .4);

  --primary: #3455db;
  --primary-hover: #4666e6;
  --on-primary: #ffffff;
  --primary-tint: rgba(52, 85, 219, .24);
  --primary-ink: #9db0ff;
  --success: #81c995;
  --success-tint: rgba(129, 201, 149, .14);
  --success-ink: #81c995;
  --danger: #f28b82;
  --danger-tint: rgba(242, 139, 130, .14);
  --danger-ink: #f28b82;
  --warning: #fdd663;
  --warning-tint: rgba(253, 214, 99, .14);
  --warning-ink: #fdd663;

  --beam: rgba(255, 255, 255, .06);
  --slice-a: #113047;
  --slice-b: #0d2738;
  --slice-c: #153a55;
  --slice-ink: #e8eef3;
  --slice-line: #1d4059;
  --rim: #003353;
  --rim-line: #01426a;
  --rim-dot: rgba(255, 255, 255, .28);
  --rim-dot-on: #ffffff;
  --peg: #4f6b80;
  --face-bg: #081e2e;
  --snack: #e8eef3;
  --snack-ink: #081e2e;
  --snack-action: #3455db;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .2s;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 18px; height: 18px; flex: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.muted { color: var(--text-3); }
.small { font-size: 12.5px; }

/* ------------------------------------------------------------ backdrop */

/* FARO navy across the top, with the cards resting on its lower edge. */
body::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 236px;
  background: var(--band);
}

/* Faint spotlights sweeping from above the page; nothing else behind it. */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.beam {
  position: absolute;
  top: -8vh;
  left: var(--x);
  width: 100vmax;
  height: 145vh;
  margin-left: -50vmax;
  transform-origin: 50% 0;
  background: conic-gradient(from 167deg at 50% 0%, transparent 0deg, var(--beam) 10deg, var(--beam) 16deg, transparent 26deg, transparent 360deg);
  -webkit-mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .5) 45%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .5) 45%, transparent 85%);
  animation: sweep var(--t) ease-in-out var(--d) infinite alternate;
  will-change: transform;
}

@keyframes sweep {
  from { transform: rotate(var(--a)); }
  to { transform: rotate(var(--b)); }
}

.b1 { --x: 8%; --a: 4deg; --b: -42deg; --t: 17s; --d: -3s; }
.b2 { --x: 36%; --a: 28deg; --b: -22deg; --t: 21s; --d: -9s; }
.b3 { --x: 66%; --a: -26deg; --b: 22deg; --t: 19s; --d: -5s; }
.b4 { --x: 94%; --a: -4deg; --b: 44deg; --t: 23s; --d: -12s; }

.shell {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 16px clamp(16px, 3vw, 32px) 32px;
}

/* ------------------------------------------------------------ top bar */

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0 18px; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.logo {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
}

.logo i {
  position: relative;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #3455db, #01426a 55%, #3455db);
}

.logo i::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

body.spinning .logo i { animation: turn .8s linear infinite; }

@keyframes turn { to { transform: rotate(360deg); } }

.brand-text { min-width: 0; }
.brand-text h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .01em; line-height: 1.2; color: #fff; }
.brand-text p { margin: 2px 0 0; font-size: 13px; color: rgba(255, 255, 255, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.toolbar { display: flex; align-items: center; gap: 4px; }
.toolbar-sep { width: 1px; height: 20px; margin: 0 6px; background: rgba(255, 255, 255, .3); }

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .1);
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
}

.live i { width: 8px; height: 8px; border-radius: 50%; background: #81c995; }
.live.off i { background: var(--text-3); }

.icon-btn {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.icon-btn:hover { background: var(--hover); color: var(--text); }
.topbar .icon-btn { color: rgba(255, 255, 255, .85); }
.topbar .icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.icon-btn .i { width: 20px; height: 20px; }

/* ------------------------------------------------------------ layout */

/* Work in progress on the left, the wheel in the middle, the people on the right. */
.layout {
  display: grid;
  grid-template-columns: minmax(300px, 370px) minmax(0, 1fr) minmax(300px, 370px);
  grid-template-areas: "work stage people";
  gap: 16px;
  align-items: start;
}

.stage { grid-area: stage; }
.col-work { grid-area: work; }
.col-people { grid-area: people; }
.col-work, .col-people { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* ------------------------------------------------------------ stage */

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px clamp(16px, 3vw, 32px) 22px;
  overflow: hidden;
}

.announce {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 112px;
  margin-bottom: 12px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
}

.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--live);
}

.headline {
  max-width: 100%;
  color: var(--heading);
  padding: 0 6px 2px;
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.headline.won { color: var(--primary-ink); }
.headline.pop { animation: pop .5s var(--ease-out); }

@keyframes pop {
  from { transform: translateY(6px); opacity: 0; }
}

.subline {
  display: flex;
  width: 100%;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  min-height: 32px;
  font-size: 14px;
  color: var(--text-2);
}

.subline > * { flex: none; }
.subline .pr-chip { height: 28px; font-size: 13px; max-width: 60%; }
.subline .pr-title { flex: 0 1 auto; max-width: 420px; color: var(--text); font-weight: 500; }

/* ------------------------------------------------------------ wheel */

.wheel {
  /* As big as fits: the whole stage, spin button included, stays on screen. */
  --size: min(100%, clamp(300px, 100svh - 440px, 540px));
  position: relative;
  width: var(--size);
  aspect-ratio: 1;
  container-type: inline-size;
  user-select: none;
  -webkit-user-select: none;
  animation: arrive .8s var(--ease-out) both;
}

@keyframes arrive { from { opacity: 0; transform: scale(.97); } }

.wheel::after {
  content: "";
  position: absolute;
  left: 10%; right: 10%; bottom: -3%;
  height: 10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(60, 64, 67, .18), transparent);
}

.wheel > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.rim { fill: var(--rim); stroke: var(--rim-line); stroke-width: 2; }
.groove { fill: var(--rim-line); }

.bulb .halo { display: none; }
.bulb .core { fill: var(--rim-dot); transition: fill .3s; }

.wheel[data-state="spinning"] .bulb .core, .wheel[data-state="won"] .bulb .core { fill: var(--rim-dot-on); }

.wheel[data-state="spinning"] .bulb {
  animation: chase .49s linear infinite;
  animation-delay: calc(var(--k) * -.07s);
}

@keyframes chase {
  0% { opacity: 1; }
  40%, 100% { opacity: .25; }
}

.wheel-face { transform-origin: 50% 50%; }
.wheel.moving .wheel-face { will-change: transform; }

.face-bg { fill: var(--face-bg); }

.ghost { fill: var(--slice-a); stroke: var(--slice-line); stroke-width: 2; }
.ghost.alt { fill: var(--slice-b); }

.slice-fill { stroke: var(--slice-line); stroke-width: 2; stroke-linejoin: round; transition: fill .4s, stroke .4s; }
.slice-fill.a { fill: var(--slice-a); }
.slice-fill.b { fill: var(--slice-b); }
.slice-fill.c { fill: var(--slice-c); }

/* Each teammate's colour, as a band along the outside of their slice. */
.slice-band { fill: none; stroke-width: 14; }

.slice { transition: opacity .5s var(--ease-out), transform .7s var(--ease-spring); }
.slice.dim { opacity: .45; }
.slice.win { transform: translate(var(--dx), var(--dy)); }
.slice.win .slice-fill { fill: var(--primary-tint); stroke: var(--primary); stroke-width: 4; }
.slice.win .label { fill: var(--primary-ink); }

.label {
  fill: var(--slice-ink);
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -.01em;
  dominant-baseline: central;
  text-anchor: end;
}

.peg { fill: var(--peg); }

.hub {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 2;
  width: 19%;
  aspect-ratio: 1;
  margin: -9.5% 0 0 -9.5%;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--on-primary);
  cursor: pointer;
  background: var(--primary);
  box-shadow: 0 0 0 1.2cqw #fff, 0 0 0 calc(1.2cqw + 1px) var(--border), var(--shadow);
  transition: transform .25s var(--ease-out), background .2s, box-shadow .2s;
}

.hub span { font-size: 3.1cqw; font-weight: 600; letter-spacing: .12em; text-indent: .12em; text-transform: uppercase; }
.hub:hover:not(:disabled) { background: var(--primary-hover); transform: scale(1.04); }
.hub:active:not(:disabled) { transform: scale(.97); }
.hub:disabled { cursor: default; background: var(--field-hover); color: var(--text-3); box-shadow: 0 0 0 1.2cqw var(--surface), 0 0 0 calc(1.2cqw + 1px) var(--border); }
.wheel[data-state="spinning"] .hub:disabled { background: var(--primary); color: var(--on-primary); }

.pointer {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: -2.5%;
  width: 8.4%;
  margin-left: -4.2%;
  transform-origin: 50% 34.2%;
  filter: drop-shadow(0 1px 2px rgba(60, 64, 67, .35));
}

.pointer svg { display: block; width: 100%; height: auto; overflow: visible; }
.pointer-a { stop-color: #ff6a33; }
.pointer-b { stop-color: var(--orange); }
.pointer .gem { fill: #fff; }

/* ------------------------------------------------------------ spin form */

.spin-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(100%, 580px); margin-top: 28px; }

/* The pull request box works like Google's search box. */
.pr-field {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 8px 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: text;
  transition: box-shadow .2s, border-color .2s;
}

.pr-field:hover, .pr-field:focus-within { border-color: transparent; box-shadow: var(--shadow-soft); }
.pr-field > .i { color: var(--text-3); }

.pr-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.pr-field input::placeholder { color: var(--text-3); }

.detected { flex: none; max-width: 55%; display: flex; animation: rise .2s var(--ease-out); }
.detected .pr-chip { max-width: 100%; }

/* Beside it, who is at the screen: left out of the draw for their own pull request. */
.pr-line { display: flex; gap: 10px; }
.pr-line .pr-field { flex: 1; min-width: 0; }

.me-field {
  position: relative;
  flex: none;
  width: 190px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: box-shadow .2s, border-color .2s;
}

.me-field:hover, .me-field:focus-within { border-color: transparent; box-shadow: var(--shadow-soft); }

.me-field select {
  width: 100%;
  height: 100%;
  padding: 0 34px 0 50px;
  border: 0;
  border-radius: inherit;
  outline: 0;
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.me-field.nobody select { color: var(--text-3); font-weight: 400; }
.me-field select option { font-weight: 400; }

/* An open list is drawn with the options' own colours, and some browsers put
   them on a white list whatever the theme: so they carry the theme's colours,
   or dark mode shows white on white. */
.me-field select option, .editor select option { background-color: var(--surface); color: var(--text); }
.me-field select:disabled { cursor: default; }

.me-face {
  position: absolute;
  left: 12px; top: 50%;
  width: 28px; height: 28px;
  margin-top: -14px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  pointer-events: none;
}

.me-face .avatar { width: 28px; height: 28px; font-size: 11.5px; }
.me-field .chevron { position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--text-3); pointer-events: none; }

@keyframes rise { from { opacity: 0; transform: translateY(3px); } }

.spin-row { display: flex; gap: 10px; }

.segmented {
  position: relative;
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.segmented .thumb {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 50%;
  background: var(--primary-tint);
  transition: transform .3s var(--ease-out);
}

.segmented[data-mode="even"] .thumb { transform: translateX(100%); }

.segmented button {
  position: relative;
  z-index: 1;
  min-width: 80px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.segmented button + button { border-left: 1px solid var(--border); }
.segmented button[aria-checked="true"] { color: var(--primary-ink); }
.segmented button:disabled { cursor: default; }

.btn-primary {
  flex: 1;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
}

.btn-primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: var(--shadow); }
.btn-primary:disabled { cursor: default; background: var(--field-hover); color: var(--text-3); }
body.spinning .btn-primary:disabled { background: var(--primary); color: var(--on-primary); opacity: .8; }
body.spinning .btn-primary .i { animation: turn .8s linear infinite; }

.hint { margin: 0; min-height: 20px; text-align: center; font-size: 12.5px; color: var(--text-3); }

/* ------------------------------------------------------------ hand-pick */

.btn-hand {
  flex: none;
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--primary-ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}

.btn-hand:hover:not(:disabled), .btn-hand[aria-expanded="true"] { background: var(--primary-tint); }
.btn-hand:disabled { color: var(--text-3); cursor: default; }

.hand-panel {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  animation: rise .2s var(--ease-out);
}

.hand-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 13px; color: var(--text-2); }
.hand-list { display: flex; flex-wrap: wrap; gap: 8px; }

.hand-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.hand-chip .avatar { width: 28px; height: 28px; font-size: 11px; }
.hand-chip small { font-size: 11px; font-weight: 400; color: var(--text-3); }
.hand-chip:hover:not(:disabled) { background: var(--primary-tint); border-color: var(--primary); }
.hand-chip:disabled { opacity: .5; cursor: not-allowed; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px 0 6px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.tag .i { width: 13px; height: 13px; }
.tag.direct { color: var(--warning-ink); background: var(--warning-tint); }
.tag.respin { color: var(--primary-ink); background: var(--primary-tint); }

.eyebrow.direct { color: var(--warning-ink); }
.eyebrow.direct::before { background: var(--warning); }

/* ------------------------------------------------------------ panels */

.panel { overflow: hidden; }

.panel-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; }

.badge-icon {
  width: 32px; height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--primary-tint);
  color: var(--heading);
}

:root[data-theme="dark"] .badge-icon { color: var(--primary-ink); }
.badge-icon .i { width: 18px; height: 18px; }

.panel-title { flex: 1; min-width: 0; }
.panel-title h2 { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; line-height: 1.4; color: var(--heading); }
.panel-title p { margin: 1px 0 0; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pill {
  min-width: 24px;
  padding: 2px 9px;
  border-radius: var(--r-sm);
  background: var(--field);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pill:empty { display: none; }
.reviews-card .panel-head .pill { background: var(--primary-tint); color: var(--primary-ink); }

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px;
  padding: 10px 0 12px;
  border-top: 1px solid var(--divider);
}

.person-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.person-link:hover .name, .person-link.name:hover { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; }
[data-person] { cursor: pointer; }

.empty { padding: 22px 14px; text-align: center; font-size: 13px; color: var(--text-3); }

.foot { margin-top: 24px; text-align: center; font-size: 12px; color: var(--text-3); }

/* ------------------------------------------------------------ team */

.add { display: flex; gap: 8px; padding: 6px 16px 8px; }

.add input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  outline: 0;
  transition: box-shadow .2s, border-color .2s;
}

.add input::placeholder { color: var(--text-3); }
.add input:hover, .add input:focus { border-color: transparent; box-shadow: var(--shadow-soft); }

.btn-soft, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.btn-soft {
  height: 40px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--primary-tint);
  color: var(--primary-ink);
  font-size: 14px;
}

.btn-soft .i { width: 18px; height: 18px; }
.btn-soft:hover { box-shadow: var(--shadow); }

.btn-ghost {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--primary-ink);
  font-size: 13px;
}

.btn-ghost .i { width: 16px; height: 16px; }
.btn-ghost:hover { background: var(--primary-tint); }
.btn-ghost.armed { color: #fff; background: var(--danger); }

.roster, .timeline, .board {
  list-style: none;
  margin: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.roster { max-height: 440px; padding: 2px 8px 8px; }

.member {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 6px 7px 8px;
  border-radius: var(--r-sm);
  transition: background .15s;
}

.member:hover { background: var(--hover); }

.avatar {
  --c: #1a73e8;
  width: 36px; height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c);
  color: var(--ink, #fff);
  font-size: 14px;
  font-weight: 500;
  transition: filter .3s, opacity .3s;
}

.member.out .avatar { filter: grayscale(1); opacity: .45; }

.who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.who .name, .who .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .name { font-size: 14px; font-weight: 500; }
.who .meta { font-size: 12px; color: var(--text-2); }
.member.out .name { color: var(--text-3); }
.who-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.who-top .name { min-width: 0; }

/* The chance of being picked, as a ring. */
.ring { position: relative; width: 38px; height: 38px; display: grid; place-items: center; flex: none; }

.ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--divider) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
}

.ring b { position: relative; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: -.03em; color: var(--text-2); }
.member.out .ring b { font-family: var(--font); font-size: 9.5px; color: var(--text-3); }
.member.me .ring b { font-family: var(--font); font-size: 10px; font-weight: 600; color: var(--primary-ink); }

.switch {
  position: relative;
  width: 36px; height: 20px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--border);
  cursor: pointer;
  transition: background .2s;
}

.switch i {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(60, 64, 67, .4);
  transition: transform .2s var(--ease-out);
}

.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"] i { transform: translateX(16px); }
:root[data-theme="dark"] .switch[aria-checked="true"] i { background: #202124; }

.remove {
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s, background .15s, color .15s;
}

.remove .i { width: 16px; height: 16px; }
.member:hover .remove, .remove:focus-visible { opacity: 1; }
.remove:hover { color: var(--danger); background: var(--danger-tint); }
.remove.armed { width: auto; padding: 0 10px; border-radius: var(--r-sm); opacity: 1; color: #fff; background: var(--danger); font-size: 12px; font-weight: 500; }

@media (hover: none) { .remove { opacity: 1; } }

/* Marks: a red card for every review somebody dropped. */
.marks { display: inline-flex; align-items: center; gap: 1px; flex: none; font-size: 11.5px; font-weight: 600; color: var(--danger); }
.marks .i { width: 15px; height: 15px; }

/* ------------------------------------------------------------ recent picks */

.timeline { max-height: 520px; padding: 2px 10px 10px; }

.pick {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 9px 6px 12px;
}

/* A thread down to the pick before. */
.pick::before {
  content: "";
  position: absolute;
  left: 21px; top: 44px; bottom: -8px;
  width: 2px;
  background: var(--divider);
}

.pick:last-child::before { display: none; }
.pick .avatar { width: 32px; height: 32px; font-size: 13px; margin-top: 1px; }
.pick-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pick-top .name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-top time { flex: none; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pick-meta { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.pick-pr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; margin-top: 5px; font-size: 13px; color: var(--text-2); }
.pick-pr .muted { font-size: 12.5px; }
.pick.gone .pick-pr { opacity: .7; }
.pick.fresh { animation: fresh 1.6s var(--ease-out); }

@keyframes fresh {
  0% { opacity: 0; background: var(--primary-tint); }
  20% { opacity: 1; }
  100% { background: transparent; }
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.state .i { width: 12px; height: 12px; }
.state.open { color: var(--primary-ink); background: var(--primary-tint); }
.state.done { color: var(--success-ink); background: var(--success-tint); }
.state.dropped { color: var(--danger-ink); background: var(--danger-tint); }
.state.passed { color: var(--text-2); background: var(--field); }

.by { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.by b { font-weight: 500; color: var(--text-2); }

.reason {
  display: block;
  margin-top: 6px;
  padding: 6px 10px;
  border-left: 2px solid var(--danger);
  border-radius: 0 6px 6px 0;
  background: var(--danger-tint);
  font-size: 12.5px;
  color: var(--text);
  quotes: "“" "”";
}

.pr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}

a.pr-chip:hover { border-color: var(--primary); color: var(--primary-ink); background: var(--primary-tint); }
.pr-chip .i { width: 14px; height: 14px; color: var(--text-3); }
.pr-chip .repo { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
a.pr-chip:hover .repo { color: inherit; }
.pr-chip b { font-family: var(--mono); font-weight: 500; font-size: .96em; }
.pr-chip .out { width: 12px; height: 12px; margin-left: -1px; }

.pr-title { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------ in review */

/* One line per review when there is room for it, two in the narrow column. */
.reviews-card { container-type: inline-size; }
.table-wrap { padding: 0 8px 8px; }

.reviews, .reviews thead, .reviews tbody { display: block; width: 100%; }
.reviews { font-size: 14px; }

.reviews tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 96px auto;
  grid-template-areas: "pr who since act";
  align-items: center;
  column-gap: 12px;
}

.reviews thead tr { padding: 6px 12px 8px; border-bottom: 1px solid var(--divider); }

.reviews th {
  display: block;
  padding: 0;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

.h-pr { grid-area: pr; }
.h-who { grid-area: who; }
.h-since { grid-area: since; }
.h-act { grid-area: act; }

.review {
  position: relative;
  padding: 12px;
  border-bottom: 1px solid var(--divider);
  border-radius: var(--r-sm);
  transition: background .15s, opacity .3s, transform .3s var(--ease-out);
}

.review:last-child { border-bottom-color: transparent; }
.review:hover { background: var(--hover); }
.review.open { background: var(--bg); border-bottom-color: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.review.dropping { box-shadow: inset 0 0 0 1px var(--danger); }
.review.fresh { animation: fresh 1.6s var(--ease-out); }
.review.leaving { opacity: 0; transform: translateX(12px); }

.review td { display: block; min-width: 0; padding: 0; }
.review td.pr { grid-area: pr; }
.review td.reviewer { grid-area: who; }
.review td.since { grid-area: since; }
.review td.act { grid-area: act; text-align: right; }

.pr-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.review .pr-title { color: var(--text); }

.person { display: inline-flex; align-items: center; gap: 9px; min-width: 0; max-width: 100%; }
.person .avatar { width: 28px; height: 28px; font-size: 12px; }
.person .name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-text { display: grid; min-width: 0; line-height: 1.25; }
.since-inline { display: none; font-size: 12px; color: var(--text-2); }

.since { color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 13px; }
.since.stale, .since-inline.stale { color: var(--warning-ink); }

.act-buttons { display: inline-flex; align-items: center; gap: 4px; }

.finish, .drop-btn, .edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.finish {
  padding: 0 14px 0 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary-ink);
}

.finish .i { width: 16px; height: 16px; }
.finish:hover, .finish[aria-expanded="true"] { background: var(--primary-tint); border-color: transparent; }
.finish .short { display: none; }

.drop-btn {
  padding: 0 12px 0 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
}

.drop-btn .i { width: 16px; height: 16px; }
.drop-btn:hover, .drop-btn[aria-expanded="true"] { color: var(--danger-ink); background: var(--danger-tint); }

.edit-btn {
  padding: 0 12px 0 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
}

.edit-btn .i { width: 16px; height: 16px; }
.edit-btn:hover, .edit-btn[aria-expanded="true"] { color: var(--primary-ink); background: var(--primary-tint); }

/* Correcting a review still going on: its link, its title, who opened it. */
.review.editing { box-shadow: inset 0 0 0 1px var(--primary); }

.editor { display: grid; gap: 10px; animation: rise .2s var(--ease-out); }
.editor .field { display: grid; gap: 4px; min-width: 0; }
.editor .field > span:first-child { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.editor .field small { font-weight: 400; color: var(--text-3); }
.edit-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }

.editor input, .editor select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 14px;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}

.editor input[name="link"] { font-family: var(--mono); font-size: 13px; }
.editor input::placeholder { color: var(--text-3); }
.editor input:focus, .editor select:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.editor input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.editor select { padding-right: 34px; appearance: none; -webkit-appearance: none; text-overflow: ellipsis; cursor: pointer; }

.select-wrap { position: relative; display: block; min-width: 0; }
.select-wrap .chevron { position: absolute; right: 10px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--text-3); pointer-events: none; }

.edit-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.edit-error { font-size: 12.5px; color: var(--danger-ink); }

.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, opacity .15s;
}

.btn-save .i { width: 16px; height: 16px; }
.btn-save:hover:not(:disabled) { background: var(--primary-hover); box-shadow: var(--shadow); }
.btn-save:disabled { opacity: .5; cursor: default; }

.review td.score-cell, .review td.drop-cell, .review td.edit-cell {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}

.score { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; animation: rise .2s var(--ease-out); }
.score-label { font-size: 13px; color: var(--text-2); }
.points { display: flex; flex-wrap: wrap; gap: 6px; }

.points button {
  min-width: 38px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.points button:hover { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.score .btn-ghost { margin-left: auto; }

.dropper { display: grid; gap: 10px; animation: rise .2s var(--ease-out); }
.dropper label { font-size: 13.5px; font-weight: 500; }

.dropper textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.45;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}

.dropper textarea::placeholder { color: var(--text-3); }
.dropper textarea:focus { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }

.drop-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.drop-warn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.drop-warn .i { width: 16px; height: 16px; flex: none; color: var(--danger); }
.drop-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.drop-count { font-size: 12px; color: var(--text-3); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--danger);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: box-shadow .15s, opacity .15s;
}

:root[data-theme="dark"] .btn-danger { color: #202124; }
.btn-danger .i { width: 16px; height: 16px; }
.btn-danger:hover:not(:disabled) { box-shadow: var(--shadow); }
.btn-danger:disabled { opacity: .38; cursor: default; }

.reviews tr.none { display: block; }

@container (max-width: 620px) {
  .reviews thead { display: none; }
  .reviews tr.review {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "pr pr" "who act";
    row-gap: 10px;
  }
  .review td.since { display: none; }
  .since-inline { display: block; }
  .finish .long { display: none; }
  .finish .short { display: inline; }
  .drop-btn, .edit-btn { width: 32px; padding: 0; justify-content: center; }
  .drop-btn .long, .edit-btn .long { display: none; }
  .edit-row { grid-template-columns: minmax(0, 1fr); }
  .score { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .score .btn-ghost { grid-column: 2; grid-row: 1; margin: -6px -6px -6px 0; }
  .points { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .points button { min-width: 0; padding: 0; }
}

/* ------------------------------------------------------------ leaderboard */

.podium { display: none; }

.board { padding: 2px 8px 6px; }

.leader {
  display: grid;
  grid-template-columns: 24px auto minmax(0, 1fr) 70px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-sm);
  transition: background .15s;
}

.leader:hover { background: var(--hover); }
.leader.zero { opacity: .6; }

.rank {
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.leader.first .rank { background: var(--primary-tint); color: var(--primary-ink); }

.leader .avatar { width: 32px; height: 32px; font-size: 13px; }
.leader-body { min-width: 0; display: grid; gap: 6px; }
.leader-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.leader-top .name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.natas { display: inline-flex; align-items: center; gap: 1px; flex: none; font-size: 12px; font-weight: 600; color: var(--warning-ink); }
.natas .i { width: 17px; height: 17px; }

.progress { height: 4px; border-radius: 2px; background: var(--divider); overflow: hidden; }

.progress i {
  display: block;
  width: var(--to);
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  animation: fill 1s var(--ease-out);
}

@keyframes fill { from { width: var(--from); } }

.tally { display: grid; justify-items: end; line-height: 1.2; }
.tally b { font-family: var(--mono); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tally b small { margin-left: 2px; font-family: var(--font); font-size: 11px; font-weight: 400; color: var(--text-3); }
.tally > span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

.nata-pill { display: inline-flex; align-items: center; gap: 4px; }
.nata-pill .i { width: 16px; height: 16px; }
.nata-rule { display: inline-flex; align-items: center; gap: 8px; }
.nata-rule .i { width: 18px; height: 18px; }

/* ------------------------------------------------------------ a teammate's statistics */

dialog.profile {
  width: min(720px, calc(100vw - 32px));
  max-width: none;
  max-height: min(88vh, 880px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}

dialog.profile::backdrop { background: rgba(32, 33, 36, .6); }

.sheet {
  position: relative;
  max-height: min(88vh, 880px);
  overflow: auto;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 4px 8px 3px rgba(60, 64, 67, .15), 0 1px 3px rgba(60, 64, 67, .3);
  animation: sheet .25s var(--ease-out);
  scrollbar-width: thin;
}

@keyframes sheet { from { opacity: 0; transform: translateY(8px); } }

.sheet-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 20px 18px 24px;
  border-bottom: 1px solid var(--divider);
}

.sheet-head .avatar { width: 56px; height: 56px; font-size: 22px; }
.sheet-head h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.01em; line-height: 1.2; }
.sheet-head p { margin: 4px 0 0; font-size: 13px; color: var(--text-2); }
.sheet-head .icon-btn { margin-left: auto; align-self: flex-start; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 18px 24px 4px; }

.tile {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.tile > span { font-size: 12px; font-weight: 500; color: var(--text-2); }
.tile b { font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
.tile small { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile small .i { width: 16px; height: 16px; flex: none; }
.tile.hero b { color: var(--primary-ink); }
.tile.marked { border-color: var(--danger); }
.tile.marked b { color: var(--danger-ink); }
.tile.marked small .i { color: var(--danger); }

.sheet-sub { display: flex; align-items: center; gap: 10px; margin: 20px 24px 6px; font-size: 14px; font-weight: 600; }
.marks-pill { background: var(--danger-tint); color: var(--danger-ink); }

/* The Teams address, for the @mentions in Teams. Drawn again
   with the statistics, so it does not rise like the review editor does. */
.teams-form { gap: 6px; margin: 16px 24px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); animation: none; }
.teams-row { display: flex; align-items: center; gap: 8px; }
.teams-row input { flex: 1; min-width: 0; }
.teams-form .edit-error:empty { display: none; }

.person-prs { list-style: none; margin: 0; padding: 0 14px 18px; }

.pr-row { display: grid; gap: 6px; padding: 12px 10px; border-radius: var(--r-sm); }
.pr-row + .pr-row { border-top: 1px solid var(--divider); }
.pr-row:hover { background: var(--hover); }
.pr-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.pr-row-top .pr-title { color: var(--text); }
.pr-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--text-2); }
.drops .pr-row { gap: 4px; }

/* ------------------------------------------------------------ the pop-up after a spin */

dialog.verdict { width: min(460px, calc(100vw - 32px)); }
.verdict .sheet { border-top: 4px solid var(--c); text-align: center; }

.verdict-head { display: grid; justify-items: center; gap: 10px; padding: 26px 24px 4px; }
.verdict-head .eyebrow::before { background: var(--c); }
.verdict-head .avatar { width: 72px; height: 72px; font-size: 28px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--c); animation: pop .5s var(--ease-spring); }
.verdict-head h2 { max-width: 100%; margin: 4px 0 0; overflow: hidden; font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: var(--heading); white-space: nowrap; text-overflow: ellipsis; }

.verdict-body { display: grid; justify-items: center; gap: 10px; padding: 0 24px 20px; }
.verdict-body p { margin: 0; }
.verdict-lead { font-size: 14px; color: var(--text-2); }
.verdict-pr { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; max-width: 100%; }
.verdict-pr .pr-chip { height: 30px; font-size: 13.5px; }
.verdict-pr .pr-title { color: var(--text); font-weight: 500; }
.verdict-url { max-width: 100%; font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--primary-ink); overflow-wrap: anywhere; text-decoration: none; }
.verdict-url:hover { text-decoration: underline; text-underline-offset: 3px; }
.verdict-none { font-size: 12.5px; color: var(--text-3); }
.verdict-by { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.verdict-by .avatar { width: 22px; height: 22px; font-size: 9.5px; }
.verdict-by b { font-weight: 500; color: var(--text); }
.verdict-body .verdict-ask { margin-top: 8px; font-size: 16px; font-weight: 600; color: var(--text); }

.verdict-foot { display: flex; gap: 10px; padding: 0 24px 12px; }
.verdict-foot .btn-primary { flex: 1.2; }
.verdict-note { margin: 0; padding: 0 24px 20px; font-size: 12px; color: var(--text-3); }
.verdict-error { margin: 0; padding: 0 24px 12px; font-size: 12.5px; color: var(--danger-ink); }
.verdict-cancel { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; padding: 0 24px 8px; }
.verdict-cancel .btn-ghost { color: var(--text-2); }
.verdict-cancel .btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--hover); }
.verdict-cancel .btn-ghost:disabled { opacity: .5; cursor: default; }

.btn-line {
  flex: 1;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.btn-line .i { width: 16px; height: 16px; }
.btn-line:hover:not(:disabled) { background: var(--hover); border-color: var(--text-3); }
.btn-line:disabled { opacity: .5; cursor: default; }

/* ------------------------------------------------------------ snackbars, confetti */

.toasts {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 50;
  display: grid;
  gap: 8px;
  justify-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(92vw, 520px);
  min-height: 48px;
  padding: 8px 16px;
  border-radius: 4px;
  background: var(--snack);
  color: var(--snack-ink);
  box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12);
  font-size: 14px;
  pointer-events: auto;
  animation: toast .25s var(--ease-out);
  transition: opacity .25s, transform .25s;
}

.toast::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: #f28b82; }
.toast.done::before { background: #81c995; }
.toast.nata::before, .toast.mark::before { display: none; }
.toast.mark .i { color: #f28b82; }
.toast .i { width: 24px; height: 24px; }
.toast.leaving { opacity: 0; transform: translateY(8px); }

@keyframes toast { from { opacity: 0; transform: translateY(8px); } }

.toast-action {
  margin: -6px -8px -6px 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--snack-action);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.toast-action:hover { background: rgba(255, 255, 255, .08); }
:root[data-theme="dark"] .toast-action:hover { background: rgba(26, 115, 232, .08); }

.confetti { position: fixed; inset: 0; z-index: 40; width: 100%; height: 100%; pointer-events: none; }

/* ------------------------------------------------------------ smaller screens */

@media (max-width: 1340px) {
  .layout {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    grid-template-areas: "work stage" "work people";
  }
  .col-people { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "work" "people"; }
  .col-work { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (max-width: 760px) {
  .col-work, .col-people { display: flex; flex-direction: column; align-items: stretch; }
}

@media (max-width: 560px) {
  .brand-text p { display: none; }
  .live span { display: none; }
  .live { width: 32px; justify-content: center; padding: 0; }
  .toolbar-sep { display: none; }
  .stage { padding: 18px 14px 16px; }
  .announce { min-height: 96px; }
  .spin-form { margin-top: 22px; }
  .spin-row { flex-direction: column; }
  .btn-primary, .btn-hand { flex: none; justify-content: center; }
  .detected { max-width: 50%; }
  .pr-line { flex-direction: column; }
  .pr-line .pr-field { flex: none; }
  .me-field { width: 100%; }
  .verdict-foot { flex-direction: column-reverse; }
  .verdict-foot .btn-primary, .btn-line { flex: none; }
  .panel-head { padding: 12px 12px 6px; }
  .add { padding: 6px 12px 8px; }
  .panel-foot { margin: 0 12px; }
  .away-hint { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; padding: 16px 16px 4px; }
  .sheet-head { padding: 20px 14px 16px 16px; }
  .sheet-head .avatar { width: 48px; height: 48px; font-size: 18px; }
  .sheet-sub { margin: 18px 16px 6px; }
  .teams-form { margin: 16px 16px 0; }
  .teams-row { flex-wrap: wrap; justify-content: flex-end; }
  .teams-row input { flex-basis: 100%; }
  .person-prs { padding: 0 8px 14px; }
  dialog.profile { width: calc(100vw - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
