/* ═══════════════════════════════════════════════════════════════════
   Agent War - Design System v5
   Light airy theme · Outfit headings · DM Sans body
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Background */
  --bg: #ffffff;
  --bg-elevated: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --surface-active: #e8f0fe;

  /* Border */
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.1);
  --border-accent: rgba(37, 99, 235, 0.22);

  /* Text */
  --text: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;

  /* Accent — blue */
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --accent-dim: #1d4ed8;
  --accent-glow: rgba(59, 130, 246, 0.07);
  --accent-glow-strong: rgba(59, 130, 246, 0.14);

  /* Semantic */
  --ok: #16a34a;
  --ok-bg: rgba(22, 163, 74, 0.06);
  --ok-border: rgba(22, 163, 74, 0.2);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.06);
  --warning-border: rgba(217, 119, 6, 0.2);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.06);
  --danger-border: rgba(220, 38, 38, 0.2);

  /* Shape */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Shadow — polished but not heavy */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.06);
}

/* ═══════════════════════════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════════════════════════ */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59, 130, 246, 0.03) 0%, transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: 'Outfit', 'DM Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text);
}

h1 { font-size: clamp(36px, 4.5vw, 56px); letter-spacing: -0.02em; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
h4 { font-size: 15px; }

p {
  margin: 0;
  line-height: 1.65;
  color: var(--text-secondary);
}

pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow: auto;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════
   Common elements
   ═══════════════════════════════════════════════════════════════════ */

button,
.button,
.nav a,
select,
input,
textarea {
  font-family: inherit;
  font-size: 14px;
}

button,
.button,
.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  user-select: none;
}

button:hover,
.button:hover,
.nav a:hover {
  background: var(--surface-hover);
  border-color: rgba(0, 0, 0, 0.15);
}

button:active,
.button:active {
  transform: scale(0.98);
}

.nav a.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--border-accent);
}

button.primary,
.button.primary {
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent-dim) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

button.primary:hover,
.button.primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
}

button.primary:active,
.button.primary:active {
  transform: scale(0.98) translateY(0);
}

button:disabled,
.button[aria-disabled="true"],
.nav a[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.icon,
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.icon {
  width: 16px;
  height: 16px;
}

.icon svg,
.brand-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

input,
textarea,
select {
  width: 100%;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 11px 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-tertiary);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.55;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════════════
   Shell — topbar, nav, branding
   ═══════════════════════════════════════════════════════════════════ */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 20px;
  align-items: center;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.brand::before {
  content: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 9px;
  color: var(--accent-strong);
  background: linear-gradient(180deg, rgba(79, 124, 255, 0.14), rgba(79, 124, 255, 0.08));
  border: 1px solid rgba(79, 124, 255, 0.22);
  box-shadow: 0 8px 18px rgba(79, 124, 255, 0.12);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.nav a {
  min-height: 34px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nav a:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.nav a[href*="#/profile"],
.nav a[href*="#/lobby"],
.nav a[href*="#/matchmaking"],
.nav a[href*="#/history"],
.nav a[href*="#/create-agent"],
.nav a[href*="#/provider-credentials"] {
  border-color: transparent;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.language-switcher select {
  min-width: 100px;
  width: auto;
  min-height: 34px;
  padding: 6px 32px 6px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-elevated);
}

.meta {
  color: var(--text-secondary);
  font-size: 13px;
}

#userBadge {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#userBadge button,
#userBadge .button {
  min-height: 34px;
  padding: 7px 14px;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════
   Announcements
   ═══════════════════════════════════════════════════════════════════ */

.announcement-bar {
  max-width: 1480px;
  margin: 18px auto 0;
  padding: 0 24px;
}

.announcement {
  border: 1px solid var(--border-accent);
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.announcement + .announcement {
  margin-top: 10px;
}

.announcement-body {
  margin-top: 6px;
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 14px;
}

.announcement-body p {
  margin: 0 0 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   Page layout
   ═══════════════════════════════════════════════════════════════════ */

.page {
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 80px;
  flex: 1;
}

.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.panel,
.card,
.hero-visual {
  border-radius: var(--radius-lg);
}

.panel {
  padding: 24px;
}

.card {
  padding: 18px;
}

.stack {
  display: grid;
  gap: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid.tight {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* ═══════════════════════════════════════════════════════════════════
   Hero (home page)
   ═══════════════════════════════════════════════════════════════════ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 20px;
  align-items: stretch;
}

.hero-copy,
.hero-visual {
  min-height: 320px;
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 18px;
}

.hero-visual {
  padding: 28px;
  display: grid;
  align-content: center;
  gap: 18px;
  background:
    radial-gradient(ellipse at 60% 30%, rgba(59, 130, 246, 0.04) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.hero-visual .signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.signal {
  min-height: 72px;
  border-radius: var(--radius);
  border: 1px solid var(--border-accent);
  background: var(--accent-glow);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  color: var(--accent);
  transition: background 200ms ease;
}

.signal:hover {
  background: var(--accent-glow-strong);
}

/* ═══════════════════════════════════════════════════════════════════
   Metrics & stats
   ═══════════════════════════════════════════════════════════════════ */

.hero-stat-grid,
.metric-grid,
.score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric,
.stat-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 16px;
}

.metric .meta,
.stat-card .meta {
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric strong,
.stat-card strong {
  font-size: 22px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: var(--accent-strong);
}

/* ═══════════════════════════════════════════════════════════════════
   Status, actions, toolbar
   ═══════════════════════════════════════════════════════════════════ */

.actions,
.inline-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-control {
  margin: 8px 0 12px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto;
  gap: 10px;
  align-items: center;
}

.status {
  border-radius: var(--radius);
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
}

.status:empty {
  display: none;
}

.status.ok {
  color: var(--ok);
  border-color: var(--ok-border);
  background: var(--ok-bg);
}

.status.error {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.status.warning {
  color: var(--warning);
  border-color: var(--warning-border);
  background: var(--warning-bg);
}

/* ═══════════════════════════════════════════════════════════════════
   Details / expandable
   ═══════════════════════════════════════════════════════════════════ */

details {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 10px;
}

summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════
   Avatars
   ═══════════════════════════════════════════════════════════════════ */

.avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  border: 2px solid var(--border-strong);
  object-fit: cover;
  background: var(--bg-elevated);
}

.avatar.large {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
}

/* ═══════════════════════════════════════════════════════════════════
   Agent cards
   ═══════════════════════════════════════════════════════════════════ */

.agent-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.agent-card > .actions {
  grid-column: 1 / -1;
}

.agent-card .meta {
  line-height: 1.55;
}

.agent-card.selected {
  border-color: var(--border-accent);
  background: var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════════════════
   Chips, tags, pills
   ═══════════════════════════════════════════════════════════════════ */

.chip-row,
.tag-row,
.nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.chip.active {
  color: var(--accent-strong);
  border-color: var(--border-accent);
  background: var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════════════════
   Section headers
   ═══════════════════════════════════════════════════════════════════ */

.section {
  display: grid;
  gap: 14px;
}

.section-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.section-body {
  display: grid;
  gap: 14px;
}

/* ═══════════════════════════════════════════════════════════════════
   Two-pane layout (lobby default)
   ═══════════════════════════════════════════════════════════════════ */

.two-pane {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 16px;
}

.sidebar .panel {
  padding: 20px;
}

/* ═══════════════════════════════════════════════════════════════════
   Leaderboard
   ═══════════════════════════════════════════════════════════════════ */

.leaderboard-row {
  display: grid;
  grid-template-columns: auto 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  transition: background 160ms ease, border-color 160ms ease;
}

.leaderboard-row:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.leaderboard-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
}

.leaderboard-row .avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
}

.leaderboard-row .meta {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════
   Board grid (Philosophy / Entertainment)
   ═══════════════════════════════════════════════════════════════════ */

.board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.board-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.board-panel.highlight {
  border-color: var(--border-accent);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(59, 130, 246, 0.025) 0%, transparent 50%),
    var(--surface);
}

.board-panel .agent-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

/* ═══════════════════════════════════════════════════════════════════
   Matchmaking
   ═══════════════════════════════════════════════════════════════════ */

.match-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 380px;
  gap: 20px;
  align-items: start;
}

.stepper {
  display: grid;
  gap: 8px;
}

.step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.step .bubble {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
}

.step.active {
  border-color: var(--border-accent);
  background: var(--accent-glow);
  transform: translateX(4px);
}

.step.active .bubble {
  background: var(--accent-strong);
  border-color: transparent;
  color: #fff;
}

.match-stage {
  display: grid;
  gap: 16px;
}

.match-card,
.result-card,
.profile-card,
.admin-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.match-card {
  padding: 18px;
}

/* ═══════════════════════════════════════════════════════════════════
   Transcript & Judge
   ═══════════════════════════════════════════════════════════════════ */

.transcript-line {
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.65;
}

.judge-round {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 12px;
}

/* ═══════════════════════════════════════════════════════════════════
   Result page
   ═══════════════════════════════════════════════════════════════════ */

.result-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 320px;
  gap: 18px;
  align-items: stretch;
}

.result-summary {
  display: grid;
  gap: 12px;
}

.result-summary .winner {
  font-size: 32px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: var(--accent-strong);
  letter-spacing: -0.02em;
}

.result-summary .reason {
  color: var(--text);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════════
   Profile
   ═══════════════════════════════════════════════════════════════════ */

.profile-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-tab {
  min-height: 34px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 160ms ease;
}

.profile-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.profile-tab.active {
  background: var(--accent-glow);
  border-color: var(--border-accent);
  color: var(--accent-strong);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
}

.profile-side {
  display: grid;
  gap: 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   Table list
   ═══════════════════════════════════════════════════════════════════ */

.table-list {
  display: grid;
  gap: 10px;
}

.table-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.table-item .actions {
  justify-content: flex-start;
}

/* ═══════════════════════════════════════════════════════════════════
   Admin
   ═══════════════════════════════════════════════════════════════════ */

.admin-layout {
  display: grid;
  gap: 18px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 190px 190px auto;
  gap: 10px;
  align-items: center;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-grid .panel {
  min-height: 100%;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-list .card {
  padding: 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   Turnstile widget
   ═══════════════════════════════════════════════════════════════════ */

.turnstile-widget {
  min-height: 0;
}

.turnstile-widget.compact {
  display: inline-block;
  vertical-align: middle;
}

.header-captcha {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   Screen grid
   ═══════════════════════════════════════════════════════════════════ */

.screen-grid {
  display: grid;
  gap: 18px;
}

/* ═══════════════════════════════════════════════════════════════════
   Spacing helpers for card content
   ═══════════════════════════════════════════════════════════════════ */

.hero-copy .actions,
.profile-card .actions,
.board-panel .actions,
.match-card .actions,
.result-card .actions,
.admin-card .actions {
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════════════════════════ */

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--accent-glow-strong);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(59, 130, 246, 0);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floating {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

.pop-in {
  animation: popIn 240ms ease-out;
}

.floating {
  animation: floating 5s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════════
   Empty states & loading
   ═══════════════════════════════════════════════════════════════════ */

.empty-state {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
}

.empty-state h3 {
  color: var(--text-secondary);
}

.empty-state p {
  max-width: 360px;
}

/* ═══════════════════════════════════════════════════════════════════
   Notification dot
   ═══════════════════════════════════════════════════════════════════ */

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.dot.ok { background: var(--ok); }
.dot.warning { background: var(--warning); }
.dot.danger { background: var(--danger); }

/* ═══════════════════════════════════════════════════════════════════
   Verification flow — auth pages
   ═══════════════════════════════════════════════════════════════════ */

.verification-card {
  border: 1px solid var(--border-accent);
  background: var(--accent-glow);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.verification-card h4 {
  font-size: 14px;
  color: var(--accent-strong);
}

.captcha-section {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--bg-elevated);
}

.captcha-section .section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.hero-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero-path,
.preview-list {
  display: grid;
  gap: 10px;
}

.path-step,
.preview-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.path-step strong,
.preview-row strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  color: var(--text);
}

.path-step p,
.preview-row p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 13px;
}

.path-index {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent-strong);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 1280px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }

  .language-switcher,
  #userBadge {
    justify-self: start;
    grid-column: span 2;
  }

  .hero,
  .two-pane,
  .match-shell,
  .profile-layout,
  .result-head {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .admin-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .admin-grid,
  .board-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  .board-panel.highlight {
    order: -1;
  }
}

@media (max-width: 840px) {
  .page {
    padding: 20px 14px 60px;
  }

  .topbar {
    padding: 12px 16px;
  }

  .nav {
    gap: 4px;
  }

  .nav a {
    font-size: 12px;
    padding: 6px 10px;
  }

  .hero-stat-grid,
  .metric-grid,
  .score-grid {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .leaderboard-row {
    grid-template-columns: auto 44px minmax(0, 1fr);
  }

  .leaderboard-row .actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .panel {
    padding: 18px;
  }
}

/* ===== Premium workspace redesign v6 ===== */
:root {
  --bg: #f5f8ff;
  --bg-elevated: #fbfdff;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-hover: #f4f8ff;
  --surface-active: #eaf1ff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);
  --border-accent: rgba(79, 124, 255, 0.22);
  --text: #0f172a;
  --text-secondary: #50617d;
  --text-tertiary: #8a95ab;
  --accent: #4f7cff;
  --accent-strong: #265ef0;
  --accent-dim: #1d4ed8;
  --accent-glow: rgba(79, 124, 255, 0.08);
  --accent-glow-strong: rgba(79, 124, 255, 0.14);
  --ok: #15803d;
  --ok-bg: rgba(21, 128, 61, 0.06);
  --ok-border: rgba(21, 128, 61, 0.2);
  --warning: #b45309;
  --warning-bg: rgba(180, 83, 9, 0.06);
  --warning-border: rgba(180, 83, 9, 0.2);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.06);
  --danger-border: rgba(220, 38, 38, 0.2);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 6px 20px rgba(15, 23, 42, 0.04);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 26px 72px rgba(15, 23, 42, 0.08);
}

html {
  background: var(--bg);
}

body {
  font-family: "Instrument Sans", "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(79, 124, 255, 0.09), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(14, 165, 233, 0.06), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%),
    linear-gradient(90deg, rgba(79, 124, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(79, 124, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, auto, 48px 48px, 48px 48px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 18%),
    radial-gradient(circle at 50% 0%, rgba(79, 124, 255, 0.06), transparent 32%);
  opacity: 0.75;
  z-index: -1;
}

h1,
h2,
h3,
h4,
h5 {
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(46px, 5vw, 74px);
  line-height: 0.96;
}

h2 {
  font-size: 30px;
}

h3 {
  font-size: 20px;
}

p {
  color: var(--text-secondary);
}

.app-shell {
  position: relative;
}

.topbar {
  max-width: 1560px;
  margin: 14px auto 0;
  padding: 12px 14px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  box-shadow: var(--shadow-sm);
}

.brand {
  font-size: 18px;
}

.brand::before {
  content: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 10px;
  color: var(--accent-strong);
  background: linear-gradient(180deg, rgba(79, 124, 255, 0.12), rgba(79, 124, 255, 0.06));
  border: 1px solid rgba(79, 124, 255, 0.2);
  box-shadow: 0 8px 18px rgba(79, 124, 255, 0.1);
}

.nav {
  padding: 6px;
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.nav a {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-secondary);
}

.nav a.active {
  color: var(--accent-strong);
  background: #fff;
  border-color: rgba(79, 124, 255, 0.18);
  box-shadow: 0 8px 18px rgba(79, 124, 255, 0.08);
}

.language-switcher,
#userBadge {
  align-self: center;
}

#userBadge button,
#userBadge .button {
  border-radius: 999px;
}

.announcement-bar {
  max-width: 1560px;
}

.announcement {
  border-radius: 18px;
  border: 1px solid rgba(79, 124, 255, 0.16);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.page {
  max-width: 1560px;
  padding: 26px 20px 92px;
}

.panel,
.card,
.hero-visual,
.board-panel,
.match-card,
.result-card,
.profile-card,
.admin-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel::after,
.card::after,
.board-panel::after,
.match-card::after,
.result-card::after,
.profile-card::after,
.admin-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 124, 255, 0.2), transparent);
  opacity: 0.9;
  pointer-events: none;
}

.panel {
  padding: 24px;
}

.card {
  padding: 18px;
}

.grid,
.hero,
.two-pane,
.match-shell,
.profile-layout,
.result-head {
  gap: 22px;
}

.hero {
  align-items: stretch;
}

.hero-copy {
  min-height: 460px;
  padding: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.94)),
    linear-gradient(135deg, rgba(79, 124, 255, 0.04), transparent 45%);
}

.hero-copy h1 {
  max-width: 12ch;
}

.hero-copy p {
  max-width: 56ch;
  font-size: 16px;
}

.hero-visual {
  min-height: 460px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.96));
}

.preview-grid {
  display: grid;
  gap: 12px;
}

.preview-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.preview-card-hero {
  min-height: 188px;
}

.preview-card .signal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-stat-grid,
.metric-grid,
.score-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric,
.stat-card {
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.metric strong,
.stat-card strong {
  font-size: 20px;
  color: var(--accent-strong);
}

.signal-grid {
  gap: 10px;
}

.signal {
  min-height: 60px;
  border-radius: 16px;
  border: 1px solid rgba(79, 124, 255, 0.18);
  background: linear-gradient(180deg, rgba(79, 124, 255, 0.09), rgba(79, 124, 255, 0.04));
  color: var(--accent-strong);
}

button,
.button,
.nav a {
  min-height: 40px;
  border-radius: 14px;
}

button.primary,
.button.primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-dim));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
}

button.primary:hover,
.button.primary:hover {
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.2);
}

input,
textarea,
select {
  border-radius: 14px;
  border-color: rgba(15, 23, 42, 0.09);
  background: #f8fbff;
}

label {
  text-transform: none;
  letter-spacing: 0.02em;
  color: #55647f;
  font-size: 12px;
}

.chip {
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.08);
}

.chip.active {
  background: var(--accent-glow);
  color: var(--accent-strong);
  border-color: rgba(79, 124, 255, 0.18);
}

.two-pane,
.match-shell,
.profile-layout {
  align-items: start;
}

.sidebar,
.profile-side {
  top: 94px;
}

.board-grid {
  gap: 18px;
}

.board-panel {
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.95));
}

.board-panel.highlight {
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.06);
}

.board-panel .agent-card,
.agent-card {
  align-items: start;
  gap: 16px;
}

.agent-card.selected {
  background: rgba(79, 124, 255, 0.05);
  border-color: rgba(79, 124, 255, 0.18);
}

.leaderboard-row {
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.step {
  border-radius: 18px;
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.94);
}

.step.active {
  transform: translateX(6px);
  background: rgba(79, 124, 255, 0.06);
}

.match-card {
  padding: 20px;
}

.result-card {
  padding: 24px;
}

.result-summary .winner {
  font-size: 34px;
  color: var(--accent-strong);
}

.transcript-line {
  background: rgba(248, 251, 255, 0.96);
  border-left-color: var(--accent);
  border-radius: 0 14px 14px 0;
}

.judge-round {
  border-top-color: rgba(15, 23, 42, 0.08);
}

.profile-tabs {
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(248, 251, 255, 0.92);
}

.profile-tab {
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
}

.profile-tab.active {
  background: #fff;
  box-shadow: 0 8px 18px rgba(79, 124, 255, 0.08);
}

.admin-toolbar {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(248, 251, 255, 0.9);
}

.status {
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.94);
}

.verification-card {
  border-radius: 18px;
  border-color: rgba(79, 124, 255, 0.18);
  background: linear-gradient(180deg, rgba(79, 124, 255, 0.06), rgba(255, 255, 255, 0.92));
}

.captcha-section {
  border-radius: 18px;
  background: rgba(248, 251, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.08);
}

.empty-state {
  border-radius: 22px;
  border: 1px dashed rgba(79, 124, 255, 0.2);
  background: rgba(248, 251, 255, 0.92);
}

.pop-in {
  animation: popIn 240ms ease-out;
}

@media (max-width: 1280px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }

  .language-switcher,
  #userBadge {
    grid-column: span 2;
    justify-self: start;
  }

  .hero,
  .two-pane,
  .match-shell,
  .profile-layout,
  .result-head {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .profile-side {
    position: static;
  }

  .grid,
  .board-grid,
  .hero-stat-grid,
  .metric-grid,
  .score-grid,
  .admin-grid,
  .preview-card .signal-grid {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .admin-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .page {
    padding: 18px 14px 60px;
  }

  .topbar {
    padding: 10px 12px;
    border-radius: 20px;
  }

  .nav {
    gap: 4px;
    padding: 4px;
  }

  .nav a {
    font-size: 12px;
    padding: 6px 10px;
  }

  .panel,
  .card,
  .board-panel,
  .match-card,
  .result-card {
    padding: 18px;
  }

  h1 {
    font-size: clamp(36px, 12vw, 48px);
  }
}

.auth-shell {
  display: flex;
  justify-content: center;
}

.auth-panel {
  width: min(100%, 640px);
}

.auth-panel .actions {
  align-items: center;
}

.hero-visual {
  align-content: start;
}

.preview-card-hero {
  min-height: 320px;
}

.auth-panel p {
  max-width: 54ch;
}

.verification-card.compact,
.captcha-section.compact {
  padding: 12px 14px;
}

.verification-card.compact .inline-control {
  margin: 4px 0 6px;
}

.verification-card.compact .meta,
.captcha-section.compact .meta {
  font-size: 12px;
  line-height: 1.45;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: -2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
}

.auth-links a {
  color: inherit;
}

.auth-links a:hover {
  text-decoration: underline;
}

.language-switcher {
  text-transform: none;
  letter-spacing: 0;
}

.lobby-entry-panel {
  transform-origin: top right;
  will-change: transform, opacity;
}

.lobby-entrance-pop {
  animation: popIn 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  .lobby-entrance-pop {
    animation: none;
  }
}

/* ===== Agent War product-system alignment from DESIGN.md ===== */
:root {
  --bg: #ffffff;
  --bg-elevated: #f7f7f7;
  --surface: #ffffff;
  --surface-hover: #eef0f3;
  --surface-active: #eef0f3;
  --border: #dee1e6;
  --border-strong: #d2d7df;
  --border-accent: rgba(0, 82, 255, 0.34);
  --text: #0a0b0d;
  --text-secondary: #5b616e;
  --text-tertiary: #7c828a;
  --accent: #0052ff;
  --accent-strong: #0052ff;
  --accent-dim: #003ecc;
  --accent-glow: rgba(0, 82, 255, 0.08);
  --accent-glow-strong: rgba(0, 82, 255, 0.14);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 0 rgba(10, 11, 13, 0.04);
  --shadow: 0 8px 24px rgba(10, 11, 13, 0.06);
  --shadow-lg: 0 18px 48px rgba(10, 11, 13, 0.08);
}

body {
  background: #ffffff;
}

body::before {
  display: none;
}

h1 {
  font-weight: 600;
  letter-spacing: -0.035em;
}

h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.topbar {
  min-height: 64px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--border);
  box-shadow: none;
}

.brand-mark {
  border-radius: 999px;
  color: var(--accent);
  background: var(--surface-hover);
  border-color: var(--border);
  box-shadow: none;
}

.nav {
  background: var(--bg-elevated);
  border-color: var(--border);
}

.nav a.active {
  color: var(--accent);
  border-color: var(--border);
  box-shadow: none;
}

button,
.button {
  min-height: 44px;
  border-radius: 100px;
  padding: 12px 20px;
}

button.primary,
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: none;
}

button.primary:hover,
.button.primary:hover {
  background: var(--accent-dim);
  box-shadow: none;
  transform: translateY(-1px);
}

input,
textarea,
select {
  min-height: 48px;
  border-radius: 12px;
  background: #ffffff;
  border-color: var(--border);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.panel,
.card,
.hero-visual,
.board-panel,
.match-card,
.result-card,
.profile-card,
.admin-card,
.preview-card {
  border-radius: 24px;
  border-color: var(--border);
  background: #ffffff;
  box-shadow: none;
}

.panel::after,
.card::after,
.board-panel::after,
.match-card::after,
.result-card::after,
.profile-card::after,
.admin-card::after {
  display: none;
}

.hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(520px, 1.08fr);
  gap: 24px;
}

.hero-copy {
  min-height: 560px;
  padding: 48px;
  background: #ffffff;
}

.hero-copy h1 {
  max-width: 11ch;
}

.hero-visual {
  min-height: 560px;
  padding: 24px;
  background: #0a0b0d;
  color: #ffffff;
  border-color: #0a0b0d;
}

.product-preview-card {
  display: grid;
  gap: 16px;
  height: 100%;
  padding: 24px;
  border-radius: 24px;
  background: #16181c;
  color: #ffffff;
}

.product-preview-card .meta,
.product-preview-card p {
  color: #a8acb3;
}

.product-preview-card h3,
.product-preview-card strong {
  color: #ffffff;
}

.product-preview-head,
.preview-match-card,
.preview-judge-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.product-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
}

.preview-lobby,
.preview-board,
.preview-match-card,
.preview-judge-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  padding: 16px;
}

.preview-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.preview-toolbar span,
.preview-status-stack span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.preview-agent-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-agent-row:first-of-type {
  border-top: 0;
}

.preview-agent-row.selected {
  margin: 0 -8px;
  padding: 12px 8px;
  border-radius: 16px;
  border-top: 0;
  background: rgba(0, 82, 255, 0.22);
}

.preview-agent-row span:last-child {
  color: #a8acb3;
  font-size: 12px;
  font-weight: 700;
}

.preview-agent-row p {
  margin: 2px 0 0;
  font-size: 12px;
}

.preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef0f3;
  color: #0a0b0d;
  font-size: 12px;
  font-weight: 800;
}

.preview-board ol {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.preview-board li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.preview-board li span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 800;
}

.preview-board li em {
  color: #a8acb3;
  font-style: normal;
  font-weight: 700;
}

.preview-status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.preview-match-card,
.preview-judge-card {
  display: grid;
}

.preview-match-card p,
.preview-judge-card p {
  margin: 0;
}

.path-step,
.preview-row {
  border-radius: 24px;
  background: #ffffff;
}

.path-index {
  border-radius: 999px;
  background: var(--surface-hover);
  color: var(--accent);
}

@media (max-width: 1280px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-visual {
    min-height: auto;
  }
}

@media (max-width: 840px) {
  .product-preview-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 28px;
  }

  .product-preview-card {
    padding: 18px;
  }
}
