/* Brand primitives and semantic surfaces from ~/lab/brand/tokens.css (v0.1). */
:root {
  color-scheme: light;
  --brand-primary: #016bfd;
  --brand-accent: #fdd23e;
  --brand-ink: #1e1e1e;
  --surface-white: #fff;
  --surface-subtle: #f5f8fc;
  --surface-primary-soft: #eaf2ff;
  --surface-accent-soft: #fff8dc;
  --line: #dfe7f2;
  --line-strong: #c6d4e6;
  --muted: #5d6a7e;
  --selected-ink: #004eb8;
  --locked-ink: #126044;
  --locked-soft: #e8f7f0;
  --ease: cubic-bezier(.2, .75, .25, 1);
  color: var(--brand-ink);
  background: var(--surface-subtle);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
button, .export { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; }
h1, h2, p { margin: 0; }
.shell { max-width: 1536px; min-height: 100vh; margin-inline: auto; padding: clamp(18px, 3.1vw, 48px); }
.masthead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding-bottom: clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); margin-bottom: 20px;
}
.masthead-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.eyebrow {
  display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: var(--selected-ink);
  font: 700 11px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .14em;
}
.eyebrow::before { content: ""; width: 14px; height: 3px; border-radius: 2px; background: var(--brand-accent); }
h1 { font-size: clamp(29px, 3.4vw, 50px); font-weight: 790; line-height: 1.14; letter-spacing: -.025em; }
.badge {
  align-self: center; padding: 8px 12px; border: 1px solid #f4e6ac; border-radius: 999px;
  color: var(--brand-ink); background: var(--surface-accent-soft); font-size: 12px; font-weight: 700; text-align: center;
}
.layout { display: grid; grid-template-columns: clamp(206px, 22vw, 288px) minmax(0, 1fr); gap: clamp(12px, 1.5vw, 24px); height: max(390px, calc(100dvh - 218px)); }
.panel { min-width: 0; min-height: 0; background: var(--surface-white); border: 1px solid var(--line); }
.leaders { display: flex; flex-direction: column; padding: 16px 12px 12px; border-radius: 18px; }
.list-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 2px 7px 14px; border-bottom: 1px solid var(--line); }
.list-header h2 { font-size: 17px; line-height: 1.25; }
#progress { padding: 4px 8px; border-radius: 999px; background: var(--surface-subtle); color: var(--muted); white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; }
.cards { display: flex; flex-direction: column; gap: 4px; margin: 7px -3px -3px; padding: 3px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; flex: 0 0 auto;
  min-width: 0; min-height: 52px; padding: 8px 9px; border: 1px solid transparent; border-radius: 10px;
  color: inherit; background: transparent; text-align: left; transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.card:not(:disabled):hover { background: var(--surface-subtle); }
.card[aria-pressed=true] { border-color: #b6d4ff; background: var(--surface-primary-soft); }
.card[aria-pressed=true]:hover:not(:disabled) { background: #dfeaff; }
.card[aria-pressed=true] .card-name { color: var(--selected-ink); }
.avatar {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-subtle); color: var(--muted); font-size: 12px; font-weight: 760; font-variant-numeric: tabular-nums;
}
.card[aria-pressed=true] .avatar { background: var(--brand-primary); color: white; }
.card.locked .avatar { background: var(--locked-soft); color: var(--locked-ink); }
.card-name { font-size: 15px; font-weight: 680; overflow-wrap: anywhere; }
.card-meta { color: var(--muted); font-size: 12px; line-height: 1.15; white-space: nowrap; }
.card.locked .card-meta { color: var(--locked-ink); }
.stage {
  display: grid; place-items: center; overflow: auto; padding: clamp(14px, 3vw, 48px); border-radius: 28px;
  background: radial-gradient(ellipse at center, #f6faff 0%, var(--surface-white) 65%);
  box-shadow: 0 8px 28px rgba(32, 60, 100, .035);
}
#stage-content { width: min(730px, 100%); text-align: center; }
#stage-title { font-size: clamp(27px, 4vw, 54px); font-weight: 790; line-height: 1.12; letter-spacing: -.02em; }
#stage-title::before { content: ""; display: block; width: 32px; height: 4px; margin: 0 auto 15px; border-radius: 3px; background: var(--brand-accent); }
.muted { color: var(--muted); line-height: 1.55; margin-top: 10px; }
.primary, .secondary, .export { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 999px; font-weight: 720; text-align: center; text-decoration: none; }
.primary, .export { color: var(--surface-white); background: var(--brand-primary); border: 1px solid transparent; }
.primary:hover:not(:disabled), .export:hover { background: var(--selected-ink); }
.primary:disabled { color: var(--muted); background: var(--surface-white); border-color: var(--line-strong); }
.secondary { color: var(--selected-ink); background: var(--surface-white); border: 1px solid var(--line-strong); }
.secondary:hover { background: var(--surface-primary-soft); }
#primary { gap: 13px; min-height: 62px; padding: 11px 15px 11px 24px; font-size: clamp(17px, 1.75vw, 23px); box-shadow: 0 12px 28px rgba(1, 107, 253, .22); transition: background 160ms var(--ease), box-shadow 160ms var(--ease); }
#primary:disabled { box-shadow: none; }
.button-arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--brand-ink); background: var(--brand-accent); font-size: 19px; line-height: 1; }
#primary:disabled .button-arrow { color: var(--muted); background: var(--surface-subtle); }
.members { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0; margin: clamp(18px, 2.6vw, 32px) 0 0; list-style: none; }
.members li { padding: clamp(10px, 1.45vw, 19px) 6px; border: 1px solid var(--line); border-radius: 14px; color: var(--brand-ink); background: var(--surface-white); font-size: clamp(15px, 1.8vw, 25px); font-weight: 730; overflow-wrap: anywhere; }
.members.reveal li { animation: reveal .34s var(--ease) both; }
.members.reveal li:nth-child(3n+2) { animation-delay: .12s; }
.members.reveal li:nth-child(3n) { animation-delay: .24s; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.export { font-size: 14px; }
.feedback { min-height: 24px; margin-top: 12px; display: flex; align-items: center; gap: 12px; color: var(--muted); }
dialog { width: min(430px, calc(100% - 32px)); max-width: 100%; border: 1px solid var(--line); border-radius: 22px; padding: 24px; color: inherit; box-shadow: 0 20px 60px #1e1e1e22; }
dialog::backdrop { background: #17274466; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@media (max-width: 600px) {
  .layout { grid-template-columns: minmax(122px, .84fr) minmax(0, 1.16fr); gap: 8px; }
  .leaders { padding: 9px 5px; }
  .list-header { padding-inline: 2px; gap: 4px; }
  .list-header h2 { font-size: 14px; }
  #progress { padding-inline: 4px; font-size: 11px; }
  .card { grid-template-columns: auto minmax(0, 1fr); gap: 3px 5px; padding-inline: 4px; }
  .card-meta { grid-column: 2; }
  .card-name { font-size: 13px; }
  .avatar { grid-row: span 2; width: 26px; height: 26px; }
  .stage { border-radius: 18px; padding: 8px; }
  #primary { padding: 8px; min-height: 46px; gap: 5px; }
  .button-arrow { width: 22px; height: 22px; font-size: 14px; }
  .members { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .members.reveal li { animation: none; }
  .card, #primary { transition: none; }
}
