:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #2f2b26;
  --muted: #8a847b;
  --line: #e8e4dc;
  --accent: #2f6f5e;
  --accent-soft: #e5f0ec;
  --warn: #b5532f;
  --radius: 12px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

.app { max-width: 760px; margin: 0 auto; padding: 40px 16px 80px; }
.app.wide { max-width: 1280px; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; margin: 28px 0 10px; }
h3 { font-size: 1.05rem; margin: 20px 0 8px; }
h4 { font-size: 0.8rem; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

.eyebrow { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 600; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.mono { font-family: var(--mono); }
.lede { font-size: 1.1rem; color: var(--muted); margin: 0 0 24px; }
.error { color: var(--warn); margin: 0; }

/* ---- Forms and buttons ---- */

.stack { display: grid; gap: 16px; max-width: 420px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
input {
  font: inherit; font-weight: 400; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

button {
  font: inherit; cursor: pointer; border-radius: 10px; padding: 10px 18px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
button:disabled { opacity: 0.4; cursor: default; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; padding: 12px 20px; }
button.ghost { background: transparent; }

/* ---- Panels and callouts ---- */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.callout { background: var(--accent-soft); border-radius: 10px; padding: 14px 18px; margin: 20px 0; }
.waiting { margin-top: 20px; }

/* ---- Taste game ---- */

.game { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.game-top { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.timer { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.timer-bar { height: 100%; background: var(--accent); animation: drain linear forwards; transform-origin: left; }
@keyframes drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.trolley { font-size: 2.4rem; margin: 0; }
.dilemma { font-size: 1.7rem; line-height: 1.3; margin: 8px 0 28px; }
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.track-choice {
  text-align: left; padding: 22px; min-height: 120px; font-size: 1.05rem;
  border-radius: var(--radius); background: var(--surface); transition: border-color 0.15s, transform 0.1s;
}
.track-choice:hover:not(:disabled) { border-color: var(--accent); }
.track-choice:active:not(:disabled) { transform: scale(0.99); }
.track-choice.picked { border-color: var(--accent); background: var(--accent-soft); opacity: 1; }
.track-choice .key { display: block; color: var(--muted); font-size: 0.85rem; margin-bottom: 8px; }

/* ---- Profile chart ---- */

.profile-chart { width: 100%; height: auto; margin: 8px 0; }
.profile-chart .track { stroke: var(--line); stroke-width: 4; stroke-linecap: round; }
.profile-chart .mid { stroke: var(--muted); stroke-width: 1.5; }
.profile-chart .fill { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; opacity: 0.5; }
.profile-chart .dot { fill: var(--accent); }
.profile-chart .dot.empty { fill: var(--surface); stroke: var(--muted); stroke-width: 1.5; }
.profile-chart .pole { font: 13px var(--font); fill: var(--muted); }
.profile-chart .pole.on { fill: var(--text); font-weight: 600; }
.taste-bullets { padding-left: 20px; margin: 0; }
.taste-bullets li { margin-bottom: 6px; }

/* ---- Notion-like documents ---- */

.doc { font-size: 1.02rem; }
.doc h1 { font-size: 2.2rem; margin-top: 0; }
.doc h2 { font-size: 1.4rem; margin-top: 32px; }
.doc img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.doc table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 0.95rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.doc th { background: #f5f3ee; font-weight: 600; }
.doc code { font-family: var(--mono); font-size: 0.9em; background: #f2efe9; padding: 2px 5px; border-radius: 4px; }
.doc pre { background: #f2efe9; padding: 14px; border-radius: 8px; overflow-x: auto; }
.doc pre code { background: none; padding: 0; }
.doc hr { border: none; border-top: 1px solid var(--line); margin: 28px 0; }
.doc a { color: var(--accent); }

/* ---- Copy blocks and cards ---- */

.copy { display: flex; gap: 8px; align-items: center; margin-top: 6px; background: #f2efe9; border-radius: 8px; padding: 8px 8px 8px 12px; }
.copy code { flex: 1; font: 0.85rem var(--mono); word-break: break-all; }
.copy button { padding: 6px 12px; font-size: 0.85rem; flex-shrink: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.card-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }

/* ---- Game C: tiles ---- */

.tile {
  position: relative; display: grid; gap: 6px; align-content: start; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tile, var(--line));
  border-radius: 10px; padding: 10px 12px; font-size: 0.92rem;
}
.tile p { margin: 0; color: #5c564e; }
.tile-type { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--tile, var(--muted)); }
.tile-picture { font-size: 2.6rem; text-align: center; line-height: 1.2; padding: 6px 0; }
.tile-code { margin: 0; font: 0.78rem/1.4 var(--mono); background: #1f1c19; color: #e9e4da; border-radius: 6px; padding: 8px; overflow-x: auto; white-space: pre; }
.tile-image { width: 100%; max-height: 180px; object-fit: cover; border-radius: 6px; }
.tile-remove {
  position: absolute; top: 4px; right: 4px; border: none; background: none;
  font-size: 1.1rem; line-height: 1; padding: 4px 8px; color: var(--muted);
}
.tile.description { --tile: #5b6f8f; }
.tile.persona { --tile: #2f6f5e; }
.tile.picture { --tile: #8a6bb0; }
.tile.data { --tile: #3f7fa8; }
.tile.constraint { --tile: #8a7a5c; }
.tile.technical { --tile: #444; }
.tile.herring { --tile: #c48a1d; }
.tile.trapdoor { --tile: #b5532f; background: #fdf3ef; }
.tile.custom { --tile: var(--accent); background: var(--accent-soft); }

.app:has(.taskd) { max-width: 1180px; }
.taskd-grid { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }
.benchmark {
  display: grid; gap: 2px; background: var(--accent-soft); border-radius: 10px; padding: 12px 16px; margin: 8px 0 4px;
}
.benchmark span:last-child { color: #4b5a54; }
.benchmark .axis-name, .challenge-axis .axis-name {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); font-weight: 600;
}
.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tile-pick { padding: 0; border: 2px solid transparent; border-radius: 12px; background: none; display: grid; }
.tile-pick .tile { height: 100%; }
.tile-pick:hover:not(:disabled) .tile { border-color: var(--accent); }
.tile-pick.picked { border-color: var(--accent); }
.tile-pick.picked .tile::after {
  content: '✓'; position: absolute; top: 6px; right: 8px; color: var(--accent); font-weight: 700;
}
.tile-add {
  display: grid; place-items: center; align-content: center; gap: 4px; min-height: 110px;
  border: 2px dashed var(--line); border-radius: 12px; color: var(--muted); background: none;
}
.tile-add span { font-size: 1.8rem; line-height: 1; }
.tile-add:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.add-card {
  display: grid; gap: 12px; margin-top: 14px; padding: 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
}
.add-card textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
.add-card-actions { display: flex; justify-content: flex-end; gap: 8px; }
.add-card .error:empty { display: none; }
.hand {
  position: sticky; top: 24px; display: grid; gap: 10px; padding: 16px;
  background: #f2efe9; border-radius: var(--radius);
}
.hand h3 { margin: 0 0 4px; font-size: 1rem; }

/* ---- Game C summary: candidate brief and evaluator's key ---- */

.brief-wait {
  display: flex; align-items: flex-start; gap: 16px; margin-top: 8px; padding: 28px 32px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.brief-wait strong { font-size: 1.1rem; }
.brief-wait p { margin: 4px 0 0; }
.brief-wait .spinner { margin-top: 3px; flex-shrink: 0; }
.spinner {
  width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* One row per paragraph: the brief reads as one document down the left,
   and each paragraph's key entries sit level with it on the right. */
.brief-doc { margin-top: 8px; }
.brief-row { display: grid; grid-template-columns: 3fr 2fr; }
.brief-text {
  background: var(--surface); border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  padding: 4px 32px 14px; font-size: 1.05rem; line-height: 1.65;
}
.brief-text p { margin: 0; }
.brief-key { background: #f2efe9; padding: 4px 20px 14px; }
.brief-head .brief-text { border-top: 1px solid var(--line); border-radius: var(--radius) 0 0 0; padding-top: 28px; }
.brief-head .brief-key { border-radius: 0 var(--radius) 0 0; padding-top: 28px; }
.brief-head h2 { margin: 0 0 8px; font-size: 1.6rem; }
.brief-row:last-child .brief-text { border-bottom: 1px solid var(--line); border-radius: 0 0 0 var(--radius); padding-bottom: 28px; }
.brief-row:last-child .brief-key { border-radius: 0 0 var(--radius) 0; padding-bottom: 28px; }
.time-limit { display: inline-block; background: #f2efe9; border-radius: 999px; padding: 4px 12px; font-size: 0.9rem; margin: 0; }
.marker {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin-left: 2px;
  border-radius: 9px; font-size: 0.7rem; font-weight: 700; color: #fff; vertical-align: super; line-height: 1;
}
.marker.plus { background: #2f8a4e; }
.marker.minus { background: #c0392b; }
.material-picture { font-size: 3rem; line-height: 1.2; margin: 10px 0 0; }
.material-image { max-width: 100%; max-height: 260px; border-radius: 8px; margin: 10px 0 0; display: block; }
.brief-text .tile-code { margin-top: 10px; font-size: 0.8rem; }
.deliverable { padding-top: 14px; }
.deliverable h3 { margin: 0 0 4px; font-size: 1rem; }
.deliverable p { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; }
.key-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.key-list li {
  display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: start;
  background: var(--surface); border-radius: 10px; padding: 10px 12px; border-left: 4px solid;
}
.key-list li.plus { border-left-color: #2f8a4e; }
.key-list li.minus { border-left-color: #c0392b; }
.key-list p { margin: 2px 0 4px; font-size: 0.9rem; color: #5c564e; }
.sign {
  min-width: 34px; height: 24px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; color: #fff; font-size: 0.85rem;
}
.plus .sign { background: #2f8a4e; }
.minus .sign { background: #c0392b; }
.key-source { font-size: 0.75rem; color: var(--muted); }

/* ---- Challenges: one column per player, side by side ---- */

.app:has(.compare) { max-width: 1600px; }
.challenges { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; margin-top: 20px; align-items: flex-start; }
.challenge {
  flex: 0 0 320px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
}
.challenge-full { padding: 0; border: none; background: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.challenge-axis { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.challenge-full .challenge-axis { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.challenge-axis .aiming { margin: 0; font-size: 0.9rem; color: var(--muted); }
.challenge-tiles { display: grid; gap: 8px; }

/* ---- Phase 4: discussion, one long scrolling page ---- */

.app:has(.discussion) { max-width: 1180px; }
.discussion { font-size: 1.05rem; line-height: 1.65; }
.discussion-head { padding-bottom: 8px; }
.discussion-head h1 { font-size: 2.4rem; }
.discussion .topic { max-width: 760px; margin: 0 auto; padding: 56px 0 24px; border-top: 1px solid var(--line); }
.discussion .topic:first-of-type { border-top: none; }
.discussion #your-assignment, .discussion #assignments { max-width: none; }
.topic-number { font: 700 0.85rem var(--mono); color: var(--accent); margin: 0 0 4px; letter-spacing: 0.08em; }
.discussion .topic h2 { font-size: 1.9rem; margin: 0 0 16px; }
.discussion .topic h3 { font-size: 1.2rem; margin: 32px 0 8px; }
.discussion .topic p { margin: 0 0 14px; }
.discussion .placeholder { color: var(--muted); font-style: italic; }
.stages { padding-left: 22px; }
.stages li { margin-bottom: 10px; }

.exhibit { margin: 28px 0; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.exhibit figcaption { font-size: 0.95rem; margin-bottom: 14px; }
.exhibit svg { width: 100%; height: auto; display: block; }
.exhibit-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.exhibit-source { font-size: 0.82rem; color: var(--muted); margin: 12px 0 0 !important; }
.chart-title { font: 600 13px var(--font); fill: var(--text); }
.chart-label { font: 12px var(--font); fill: var(--muted); }
.chart-value { font: 600 13px var(--font); fill: var(--text); }
.exhibit .axis { stroke: #b8b0a3; stroke-width: 1; }
.exhibit .bar { fill: var(--accent); }
.exhibit .bar.base { fill: #9cc1b4; }
.exhibit .bar.spike { fill: var(--accent); }
.exhibit .bar.muted { fill: #e2ddd3; }
.exhibit .bar-zero { stroke: var(--warn); stroke-width: 3; }
.exhibit table { width: 100%; border-collapse: collapse; font-size: 0.92rem; line-height: 1.45; }
.exhibit th, .exhibit td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
.exhibit thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.weight-table td { text-align: center; }
.weight-table th:first-child { white-space: nowrap; }
.weight-table i, .weight-key i {
  display: inline-block; border-radius: 50%; background: var(--accent); vertical-align: middle;
}
.w1 { width: 8px; height: 8px; opacity: 0.35; }
.w2 { width: 13px; height: 13px; opacity: 0.65; }
.w3 { width: 18px; height: 18px; }
.weight-key { margin-right: 14px; white-space: nowrap; }
.weight-key i { margin-right: 4px; }
.funnel .stage { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.funnel .stage.internal { fill: #f2efe9; stroke: #b8b0a3; }
.funnel .stage.narrow { fill: #cfe3db; }
.funnel .stage-text { font: 600 14px var(--font); fill: var(--text); }
.funnel .stage-note { font: italic 12px var(--font); fill: var(--muted); }

/* ---- Host ---- */

.host-bar {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.share { flex: 1; min-width: 280px; max-width: 640px; }
.share .copy { margin-top: 0; }
.share .copy code { font-size: 1.05rem; }
.stages {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 0; margin-bottom: 28px; border-bottom: 1px solid var(--line);
}
.steps-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.step { padding: 8px 14px; font-size: 0.92rem; }
.step.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.step-sep { color: var(--muted); }
.host-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
.host-layout.no-aside { grid-template-columns: 1fr; }
.host-layout.no-aside aside { display: none; }
.progress-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.progress-list li {
  display: grid; grid-template-columns: minmax(140px, 1fr) 2fr 70px; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px;
}
.progress-track { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.4s; }
.progress-count { text-align: right; font-size: 0.9rem; color: var(--muted); }
.progress-list li.done .progress-count { color: var(--accent); font-weight: 600; }
.host-layout aside h2 { margin-top: 0; }
.players { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.players th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.8rem; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.players td { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.big-stat { font-size: 2.6rem; font-weight: 700; margin: 12px 0; }
.big-stat .muted { font-size: 1.1rem; font-weight: 400; }

/* ---- Modal ---- */

.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(47, 43, 38, 0.45);
  display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto;
}
.modal {
  position: relative; width: 100%; max-width: 760px; background: var(--surface);
  border-radius: 16px; padding: 32px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.modal-close {
  position: absolute; top: 12px; right: 12px; border: none; background: none;
  font-size: 1.6rem; line-height: 1; padding: 6px 10px; color: var(--muted);
}
.modal > .primary { margin-top: 20px; }

/* ---- Player: signed-in bar and tabs ---- */

.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.who { display: flex; align-items: center; gap: 12px; }
.who strong { display: block; line-height: 1.2; }
.who .muted { font-size: 0.85rem; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.tabs {
  display: flex; gap: 4px; padding: 0 24px; background: var(--surface);
  border-bottom: 1px solid var(--line); overflow-x: auto;
}
.tab {
  border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none;
  padding: 12px 14px; color: var(--muted); white-space: nowrap;
}
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tab:disabled { opacity: 0.35; }
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--warn); margin-left: 7px; vertical-align: middle;
}

/* ---- Host: games list ---- */

.games-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.games-head h1 { margin: 0; }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.folder {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.folder:hover { border-color: var(--accent); }
.folder-icon { font-size: 2rem; line-height: 1; }
.folder-body { display: grid; gap: 2px; }
.button-link {
  display: inline-block; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--accent);
  color: var(--accent); text-decoration: none; font-weight: 600;
}
.button-link:hover { background: var(--accent-soft); }
.back-link { display: inline-block; margin-bottom: 12px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--accent); }
.game-title { font-size: 1.6rem; margin: 0 0 6px; }
.game-title .muted { font-weight: 400; font-size: 1.1rem; }

/* ---- Host: view switch, results, group preference ---- */

.host-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.view-switch { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.view-switch button { border: none; border-radius: 0; padding: 8px 14px; }
.view-switch button.active { background: var(--text); color: #fff; }
.group-card { margin: 20px 0 28px; }
.group-card h2 { margin-top: 0; }
.group-cols { display: grid; grid-template-columns: 3fr 2fr; gap: 28px; align-items: center; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.result-card {
  display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 16px;
  border-radius: var(--radius); background: var(--surface);
}
.result-card:hover { border-color: var(--accent); }
[data-focus] { cursor: pointer; }
.progress-list li[data-focus]:hover, .players tr[data-focus]:hover td { background: var(--accent-soft); }

/* ---- Game B: eval design ---- */

.app:has(.evald) { max-width: 1120px; }
.axis-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 20px 0 24px; }
.axis-step {
  padding: 6px 12px; font-size: 0.85rem; border-radius: 999px; background: var(--surface);
}
.axis-step.active { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.axis-step.done::before { content: '✓ '; color: var(--accent); }
.evald-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.evald-pick h2 { margin-top: 4px; font-size: 1.4rem; }
.lean { color: var(--muted); }
.options { display: grid; gap: 12px; margin: 16px 0; }
.option {
  text-align: left; padding: 16px 18px; border-radius: var(--radius); background: var(--surface);
  display: grid; gap: 4px;
}
.option strong { font-size: 1.05rem; }
.option span { color: var(--muted); font-size: 0.95rem; }
.option:hover { border-color: var(--accent); }
.option.chosen { border: 2px solid var(--accent); background: var(--accent-soft); }
.option.chosen span { color: var(--text); }
.evald-nav { display: flex; justify-content: space-between; margin-top: 28px; }
.app:has(.summary-screens) { max-width: 1640px; }
.summary-screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; align-items: start; }
.summary-screen { margin: 0; display: grid; gap: 12px; }
.summary-screen figcaption { display: grid; gap: 2px; min-height: 110px; }
.summary-screen figcaption span:not(.axis-name) { color: var(--muted); font-size: 0.88rem; }
.summary-screen .axis-name { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); font-weight: 600; }
.summary-screen .phone { width: 100%; position: static; font-size: 13px; }
.summary-screen .phone-body { min-height: 380px; }

/* ---- Mock phone ---- */

.phone {
  width: 300px; max-width: 100%; margin: 0 auto; border: 10px solid #1f1c19; border-radius: 36px;
  background: #faf8f4; overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  position: sticky; top: 24px; font-size: 14px;
}
.phone-status { display: flex; justify-content: space-between; padding: 8px 18px 4px; font-size: 11px; color: #555; }
.phone-header { display: flex; align-items: center; gap: 8px; padding: 6px 16px 10px; border-bottom: 1px solid #eee8de; }
.phone-header .muted { font-size: 11px; }
.phone-logo {
  width: 24px; height: 24px; border-radius: 7px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.phone-body { min-height: 420px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.m-placeholder { margin: auto; text-align: center; color: var(--muted); padding: 0 20px; }
.m-hero { display: grid; text-align: center; padding: 14px 0; }
.m-hero-label { font-size: 12px; color: var(--muted); }
.m-hero-value { font-size: 40px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.m-hero-sub { font-size: 12px; color: var(--muted); }
.m-text { margin: 0; }
.m-text.strong { font-weight: 700; }
.m-text.muted { color: var(--muted); font-size: 12px; text-align: center; }
.m-card { background: #fff; border: 1px solid #eee8de; border-radius: 12px; padding: 12px; display: grid; gap: 4px; }
.m-card p { margin: 0; color: #5c564e; font-size: 13px; }
.m-card.promo { background: #fff4d6; border-color: #f0d58a; }
.m-card.partner { background: #eef2ff; border-color: #c7d0f5; }
.m-card.info { background: var(--accent-soft); border-color: #bfd9cf; }
.m-badge {
  justify-self: start; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  background: #1f1c19; color: #fff; padding: 2px 6px; border-radius: 4px;
}
.m-button { display: block; text-align: center; padding: 11px; border-radius: 12px; font-weight: 600; border: 1px solid #ddd5c8; background: #fff; }
.m-button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.m-buttons { display: flex; gap: 8px; }
.m-buttons .m-button { flex: 1; }
.m-list, .m-toggles { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.m-list li { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid #eee8de; border-radius: 10px; padding: 8px 10px; }
.m-list-body { display: grid; }
.m-list-body span { font-size: 12px; color: var(--muted); }
.m-status { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.m-status.ok { background: var(--accent-soft); color: var(--accent); }
.m-status.warn { background: #fdecd9; color: #b5532f; }
.m-status.info { background: #ecebe7; color: #77706a; }
.m-toggles li { display: flex; justify-content: space-between; align-items: center; padding: 8px 2px; border-bottom: 1px solid #eee8de; font-size: 13px; }
.m-toggle { width: 34px; height: 20px; border-radius: 10px; background: #d8d2c8; position: relative; flex-shrink: 0; }
.m-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.m-toggle.on { background: var(--accent); }
.m-toggle.on::after { left: 16px; }
.m-chat { display: grid; gap: 8px; }
.m-bubble { margin: 0; padding: 9px 12px; border-radius: 14px; max-width: 85%; font-size: 13px; }
.m-bubble.agent { background: #fff; border: 1px solid #eee8de; justify-self: start; border-bottom-left-radius: 4px; }
.m-bubble.you { background: var(--accent); color: #fff; justify-self: end; border-bottom-right-radius: 4px; }
.m-banner { text-align: center; padding: 10px; border-radius: 10px; font-weight: 700; }
.m-banner.beta { background: #1f1c19; color: #fff; font-size: 11px; letter-spacing: 0.15em; padding: 4px; }
.m-banner.celebrate { background: #fff4d6; }
.m-input { margin-top: auto; border: 1px solid #ddd5c8; border-radius: 20px; padding: 10px 14px; color: var(--muted); background: #fff; }
.m-empty { margin: auto 0; text-align: center; display: grid; gap: 4px; padding: 20px 8px; }
.m-empty-icon { font-size: 36px; }
.m-empty p { margin: 0; color: var(--muted); font-size: 13px; }
.m-steps { display: flex; gap: 6px; justify-content: center; }
.m-steps span { width: 24px; height: 4px; border-radius: 2px; background: #ddd5c8; }
.m-steps span.on { background: var(--accent); }
.m-field { display: grid; gap: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }
.m-field-value { border: 1px solid #ddd5c8; border-radius: 8px; padding: 9px 10px; background: #fff; color: var(--text); font-size: 14px; }
.m-mic { display: grid; justify-items: center; gap: 6px; margin-top: auto; color: var(--muted); font-size: 12px; }
.m-mic-button { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: 26px; }
.m-tabs { margin-top: auto; display: flex; justify-content: space-around; border-top: 1px solid #eee8de; padding-top: 10px; font-size: 12px; color: var(--muted); }
.m-tabs span.on { color: var(--accent); font-weight: 700; }

/* ---- Small screens ---- */

@media (max-width: 760px) {
  .app { padding: 24px 16px 60px; }
  .panel { padding: 22px; }
  h1 { font-size: 1.6rem; }
  .dilemma { font-size: 1.35rem; }
  .tracks, .taskd-grid, .host-layout, .brief-row, .exhibit-pair { grid-template-columns: 1fr; }
  .discussion-head h1 { font-size: 1.8rem; }
  .discussion .topic { padding-top: 40px; }
  .exhibit { padding: 16px 14px; }
  .hand { position: static; }
  .brief-text { padding-left: 18px; padding-right: 18px; }
  .group-cols, .evald-grid { grid-template-columns: 1fr; }
  .phone { position: static; }
  .modal { padding: 24px 20px; }
  .topbar, .tabs { padding-left: 16px; padding-right: 16px; }
  .progress-list li { grid-template-columns: 1fr 70px; }
  .progress-track { grid-column: 1 / -1; grid-row: 2; }
  .track-choice { min-height: 90px; }
}
