/* Report-derived proportions and interaction. Sala verde tokens remain the only colour source.
   No remote assets, timers, authoring features or authority changes belong to this stage. */
body { line-height: var(--leading-text); font-weight: var(--weight-regular); }
h1, h2, h3 { line-height: var(--leading-tight); }
.brand, strong, b, .counter, .bar-label, .bar-value, .results-n, .stats dd,
.cloud li, .cloud-count, .answer-status, .rank-label, .rank-position, .points-total,
.type-choice, .type-icon, .data-table caption, .data-table th { font-weight: var(--weight-strong); }
.button, input, textarea, select { transition: background-color var(--dur-fast) var(--ease-snap), border-color var(--dur-fast) var(--ease-snap), transform var(--dur-moderate) var(--ease-spring); }
.button { min-height: var(--control-h); }
.button.small { min-height: var(--control-h); }
.button.large { min-height: var(--control-h-lg); }
.button:active:not(:disabled) { transform: scale(.97); }
:focus-visible, input:focus, textarea:focus, select:focus,
.board-item:focus-visible, .board-canvas:focus-visible {
  outline: 2px solid var(--accent-700); outline-offset: 2px;
  box-shadow: var(--focus-ring), var(--focus-halo);
}
.entry { max-width: 480px; padding-inline: var(--s-6); }
.entry .card-hero { border: 0; padding-inline: 0; }
.entry h1 { font-size: var(--text-3xl); font-weight: var(--weight-regular); }
.entry .lead { font-size: var(--text-md); color: var(--muted); }
.entry .code-input { height: 56px; border-radius: var(--r-lg); font-size: var(--text-3xl); }
.entry .button.block:not(.secondary) { background: var(--n-900); border-color: var(--n-900); }
[aria-invalid="true"] { border-color: var(--danger) !important; box-shadow: inset 0 0 0 1px var(--danger); }
.page-narrow:not(.entry) { max-width: 528px; padding-inline: var(--s-6); }
.answer-option { min-height: 56px; }
.answer-area textarea { min-height: 148px; }
.scale-row .answer-option { min-height: var(--s-12); }
.answer-status.saved { animation: received var(--dur-slow) var(--ease-spring); }
@keyframes received { from { transform: scale(.95); opacity: .3; } to { transform: scale(1); opacity: 1; } }

/* A useful home even before the first instrument exists. All three examples are real,
   published B2 instruments; there are no placeholder B7 template actions. */
.home-layout { display: grid; grid-template-columns: 232px minmax(0,1fr); width: min(1600px,100%); }
.home-sidebar { padding: var(--s-8) var(--s-6); border-right: 1px solid var(--line); }
.home-sidebar a { display: block; padding: var(--s-3); color: var(--ink); text-decoration: none; border-left: 2px solid transparent; }
.home-sidebar a[aria-current] { border-color: var(--accent); background: var(--accent-50); }
.home-layout > .page { width: 100%; }
.home-search { height: var(--s-12); width: min(480px,100%); margin-block: var(--s-6); }
.example-row { grid-template-columns: 1.15fr 2.7fr 1.15fr; gap: var(--s-3); }
.example-card, .example-card.primary { min-height: 320px; background: var(--bg-card-warm); border: 0; border-radius: var(--r-3xl); padding: var(--s-6); }
.example-card:nth-child(2) { background: var(--accent-100); }
.example-card form { margin-top: auto; }
.example-card .button { background: var(--n-900); border-color: var(--n-900); }
.example-preview { border-radius: var(--r-xl); background: var(--surface); overflow: hidden; }
.home-goals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--s-3); margin: var(--s-6) 0 var(--s-8); }
.home-goals a { color: var(--ink); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-xl); text-decoration: none; }
.home-goals a:hover { background: var(--n-50); border-color: var(--accent); }

/* The same result DOM serves every surface. Counts remain text, never colour-only. */
.results { container-type: inline-size; overflow-x: clip; }
.results-hidden { padding: var(--s-8); text-align: center; background: var(--n-50); border: 0; border-radius: var(--r-2xl); }
.results-hidden p { margin: 0 0 var(--s-3); }
.results-hidden .hidden-title { font-size: max(var(--text-xl),2.5cqw); font-weight: 600; color: var(--ink); }
.cloud li { max-width: 100%; line-height: 1.2; }
.cloud li[data-tone="2"] { color: var(--data-3); }
.cloud li[data-tone="4"] { color: var(--data-5); }
.cloud li[data-tone="5"] { color: var(--data-6); }
.waiting { text-align: center; color: var(--muted); }

/* A white 16:9 stage in a quiet letterbox. The mobile variant keeps the content
   readable rather than shrinking touch targets to presentation proportions. */
body.projection, body.projection.presenting-question { background: var(--letterbox); display: grid; align-content: center; }
body.projection.stage-mode > .topbar { display: none; }
body.projection:not(.stage-mode) > .topbar { z-index: 3; background: var(--surface, #fff); }
.projection-layout, .presenting-question .projection-layout {
  container-type: inline-size; position: relative; width: min(100vw,177.7778vh); aspect-ratio: 16 / 9;
  min-height: 0; margin: auto; display: grid; grid-template-columns: minmax(0,1fr) 25%;
  gap: 3cqw; padding: 6.4cqw 4.6cqw 7cqw; align-items: start;
  background: var(--surface); overflow: hidden;
}
.projection-stage { min-width: 0; width: 100%; padding: 0; align-self: start; max-height: 100%; overflow: auto; scrollbar-width: thin; }
.projection-session { font-size: max(14px,1cqw); font-weight: 400; margin-bottom: 1cqw; }
.projection-stage .eyebrow { font-size: max(14px,1cqw); letter-spacing: 0; margin-bottom: 1cqw; }
.projection-stage h1 { font-size: max(24px,5.4cqw); line-height: 1.2; margin-bottom: 1.5cqw; font-weight: 600; overflow-wrap: anywhere; }
.projection-stage .activity-body { font-size: max(16px,2.25cqw); line-height: 1.4; }
.presenting-question .projection-layout { grid-template-columns: minmax(0,1fr); }
.presenting-question .projection-stage h1 { font-size: max(20px,3cqw); font-weight: 400; margin-bottom: 1cqw; }
.presenting-question .projection-stage .activity-body { font-size: max(14px,1.5cqw); }
.projection-question { margin-top: 1cqw; gap: 1cqw; }
.projection-reception { font-size: max(14px,1cqw); font-weight: 400; }
.results-projection { container-type: normal; --q-cloud-unit: max(16px,1.6cqw); --q-column-height: 17cqw; font-size: max(14px,1.4cqw); gap: 1cqw; }
.results-projection .cloud { min-height: 23cqw; align-content: center; gap: .8cqw 1.5cqw; }
.results-projection .cloud li { font-size: calc(var(--q-cloud-unit) * var(--weight)); }
.results-projection .cloud-count { font-size: max(14px,1cqw); }
.results-projection .entries { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.7cqw 2cqw; columns: auto; max-height: 29cqw; overflow: auto; padding: .3cqw; mask-image: linear-gradient(transparent,#000 1%,#000 97%,transparent); }
.results-projection .entries li { margin: 0; background: var(--bg-response); border-radius: 1.3cqw; padding: 2.1cqw; font-size: max(14px,1.75cqw); }
.results-projection .bar-label { font-size: max(14px,2cqw); font-weight: 400; }
.results-projection .bar-value { font-size: max(14px,2cqw); }
.results-projection .bars:not(.ranking-results) { grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); align-items: end; gap: 2cqw; grid-template-rows: repeat(6, auto); }
.results-projection .bars:not(.ranking-results) .bar-row { grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; grid-template-columns: minmax(0,1fr); grid-template-areas: 'image' 'value' 'track' 'label' 'badge' 'positions'; text-align: center; justify-items: center; }
.results-projection .bars:not(.ranking-results) .bar-track { display: flex; align-items: end; width: 75%; height: 17cqw; border-radius: 0; background: var(--n-50); border-bottom: .35cqw solid var(--accent); }
.results-projection .bars:not(.ranking-results) .bar-fill { width: 100%; height: var(--share); border-radius: 0; }
.results-projection .stats dd { font-size: max(18px,3cqw); }
.projection-join { padding: 1.4cqw; border-radius: 1.4cqw; border: 0; background: var(--n-100); min-width: 0; }
.projection-join h2 { font-size: max(14px,1.1cqw); letter-spacing: 0; text-transform: none; margin-bottom: 1cqw; }
.projection-join .join-url, .projection-join .join-url strong { font-size: max(14px,1.25cqw); margin: 0; }
.projection-join .join-code { font-size: max(24px,2.6cqw); font-weight: 600; }
.projection-join .qr { width: 100%; max-width: 20cqw; margin: 1cqw auto; padding: .6cqw; }
.projection-count { font-size: max(14px,1cqw); margin-top: 1cqw; }
.projection-count .counter { font-size: max(20px,2cqw); }
.presenting-question .projection-join { display: none; }
.presenting-question.qr-open .projection-layout { grid-template-columns: minmax(0,1fr) 22%; }
.presenting-question.qr-open .projection-join { display: flex; }
.present-bar { position: absolute; left: 1.4cqw; right: 1.4cqw; bottom: 1.4cqw; display: flex; justify-content: space-between; flex-wrap: nowrap; gap: 1cqw; }
.present-join { font-size: max(13px,1.1cqw); padding: .7cqw 1cqw; min-width: 0; overflow-wrap: anywhere; }
.present-count { font-size: max(14px,1.1cqw); min-height: 40px; display: grid; place-items: center; padding: .7cqw 1cqw; font-weight: 600; background: var(--accent-200); }
.present-progress { position: absolute; height: clamp(3px,.28cqw,6px); display: block; }
.present-progress span { transition: width var(--dur-chart) var(--ease-standard); }
.projection-controls { position: absolute; bottom: 1cqw; left: 1.4cqw; display: flex; gap: 8px; z-index: 3; transition: opacity var(--dur-fast) var(--ease-snap); }  /* bottom corner: never over the join line or the brand (owner capture, L126) */
.projection-controls .actions { flex-wrap: nowrap; }
.projection-controls button { width: var(--control-h); height: var(--control-h); border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
body.controls-idle .projection-controls:not(:focus-within) { opacity: .35; }  /* dimmed, never unclickable: a button a direct click cannot reach does not work (uso real D1) */
.projection-presenter { position: absolute; bottom: 1cqw; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 6; transition: opacity var(--dur-fast) var(--ease-snap); }
.projection-presenter button { min-width: var(--control-h); height: var(--control-h); padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.projection-presenter button[aria-pressed="false"] { color: var(--muted, #666); text-decoration: line-through; }
.projection-presenter button:disabled { opacity: .35; cursor: default; }
body.controls-idle .projection-presenter:not(:focus-within) { opacity: .35; }
.projection-presenter .projection-message { align-self: center; max-width: 36cqw; }
/* On a question the pills sit on the bottom line, so the bar takes the row above them and wraps (uso real D2). */
.presenting-question .projection-presenter { bottom: calc(1.4cqw + 52px); flex-wrap: wrap; justify-content: center; max-width: calc(100% - 2.8cqw); }
/* The countdown of the presentation menu (ev_72c69fb2 a_timer, a_presview): a small menu that opens above the bar. */
.projection-countdown { position: relative; display: flex; }
.projection-countdown-menu { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: max-content; max-width: min(560px, 90vw); padding: 8px; border: 1px solid var(--line); border-radius: var(--r-3xl); background: var(--surface); box-shadow: var(--shadow-3); }
.projection-countdown-menu[hidden] { display: none; }
body.screen-blank .projection-stage, body.screen-blank .projection-join, body.screen-blank .present-bar { visibility: hidden; }
.shortcut-help { position: fixed; inset: 12% auto auto 50%; transform: translateX(-50%); width: min(600px,calc(100vw - 32px)); max-height: 75vh; overflow: auto; padding: var(--s-8); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3xl); box-shadow: var(--shadow-3); z-index: 10; }
.shortcut-help dl { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); }
.shortcut-help dd { margin: 0; }
.shortcut-help kbd { background: var(--n-100); border-radius: var(--r-sm); padding: var(--s-1) var(--s-2); }

/* AFFiNE-derived calm canvas, original notes, unchanged board protocol. */
.board-canvas { background-color: var(--n-50); background-image: radial-gradient(var(--board-dot) 1px,transparent 1px); background-size: 24px 24px; user-select: none; }
.board-tools { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); border-radius: var(--r-xl); padding: var(--s-2); }
.board-item { box-shadow: var(--shadow-1); border-radius: var(--r-sm); }
.board-item.is-selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.board-item-text { font-weight: 400; }
.board-item.kind-frame { background: transparent; border: 1px solid var(--line-strong); box-shadow: none; }
.board-connector { vector-effect: non-scaling-stroke; }
.board-world { transition: none; }

@media (min-width: 1101px) { .home-layout { grid-template-columns: 272px minmax(0,1fr); } }
@media (max-width: 1000px) {
  .home-layout { grid-template-columns: minmax(0,1fr); }
  .home-sidebar { display: none; }
  .example-row { grid-template-columns: minmax(0,1fr); }
  .example-card, .example-card.primary { min-height: 240px; }
}
@media (max-width: 620px) {
  .home-goals { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .projection-layout, .presenting-question .projection-layout { width: 100%; aspect-ratio: auto; min-height: 100dvh; grid-template-columns: minmax(0,1fr); gap: var(--s-6); padding: 72px var(--s-6) 112px; }
  body.projection:not(.stage-mode) { display: flex; flex-direction: column; align-content: normal; min-height: 100dvh; }
  body.projection:not(.stage-mode) > .projection-layout { flex: 1; min-height: 0; }
  .projection-stage { max-height: none; overflow: visible; }
  .projection-join .qr { max-width: 200px; }
  .projection-join { padding: var(--s-6); border-radius: var(--r-xl); }
  .presenting-question.qr-open .projection-layout { grid-template-columns: minmax(0,1fr); }
  .present-bar { bottom: var(--s-4); left: var(--s-4); right: var(--s-4); align-items: center; flex-wrap: wrap; }
  .present-count { margin-left: auto; }
  .results-projection .entries { grid-template-columns: minmax(0,1fr); max-height: 55vh; gap: var(--s-3); }
  .results-projection .entries li { padding: var(--s-6); border-radius: var(--r-xl); font-size: var(--text-lg); }
  .results-projection .cloud li { font-size: calc(12px * var(--weight)); }
  .results-projection .bar-value { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

.join-hidden .present-join { visibility: hidden; }
.join-slide-off .present-join { visibility: hidden; }
.console-blank .activity-card { visibility: hidden; }
.console-qr-hidden #join-qr { display: none; }
.console-join-hidden .join-box { visibility: hidden; }
.home-goals .button { width: 100%; height: 100%; text-align: left; justify-content: flex-start; border-radius: var(--r-xl); }
.example-preview.results { display: block; height: 140px; padding: var(--s-3); font-size: var(--text-xs); }
.example-preview .results-n, .example-preview > .muted { display: none; }
.example-preview .cloud { gap: var(--s-2); padding: 0; }
.example-preview .cloud li { font-size: calc(7px * var(--weight)); }
.example-preview .entries li { font-size: var(--text-sm); }

.board-workspace { position: relative; min-width: 0; }
.board-palette { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: var(--s-1); max-width: calc(100% - 24px); overflow-x: auto; padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-2); }
.board-palette .button { flex-shrink: 0; min-height: 44px; padding-inline: var(--s-3); }
.board:not(.has-selection) > .board-tools { display: none; }
.board-workspace:has(.board-canvas[hidden]) .board-palette { display: none; }
.board-tools { justify-self: center; }
.board-palette .button:hover { background: var(--accent-100); }

.board-item.kind-frame .board-item-text { font-size: calc(var(--text-md) / var(--board-zoom-factor, 1)); }
.board-item.is-selected { outline-width: calc(2px / var(--board-zoom-factor, 1)); }

.home-search { font: inherit; font-size: var(--text-md); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--n-100); color: var(--ink); }
.shortcut-help::backdrop { background: var(--scrim); }
.board { gap: var(--s-3); }
.board-note-form > label, .board-note-form > .hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.board-note-text { min-height: 44px; height: 44px; }
#board[data-mode="presenter"] { border: 0; padding: var(--s-3) 0; }
#board[data-mode="presenter"] .board-canvas { height: max(360px,calc(100dvh - 330px)); }
@media (max-width:620px) { #board[data-mode="presenter"] .board-canvas { height: 55dvh; } }

/* B4 conversation on the room screen: published questions and comments use the same response cards as open text. */
.results-projection .qa-list, .results-projection .comment-feed { gap: 1.2cqw; max-height: 29cqw; overflow: auto; padding: .3cqw; }
.results-projection .qa-item, .results-projection .comment-item { background: var(--bg-response); border: 0; border-radius: 1.3cqw; padding: 1.6cqw 2.1cqw; font-size: max(14px,1.9cqw); }
.results-projection .qa-item.is-answered { border: .2cqw dashed var(--n-300, currentColor); }
/* Suite S32: labels on the home lists and their filter */
.label-filter-bar { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-block: var(--s-3); }
.label-filter-bar[hidden] { display: none; }
.label-filter { font: inherit; padding: var(--s-1) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); cursor: pointer; }
.label-filter[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.label-chips { display: flex; flex-wrap: wrap; gap: var(--s-1); list-style: none; margin: var(--s-1) 0 0; padding: 0; }
.label-chip { font-size: var(--text-sm, .85rem); padding: 0 var(--s-2); border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--muted, #555); }
.label-form { margin-top: var(--s-2); }
.label-input { width: 100%; font: inherit; padding: var(--s-1) var(--s-2); }
