/* InteractiveBench and results sections. Shares the palette and type scale defined in style.css. */
:root {
  /* Task categories: categorical slots 1-6, stepped per theme and validated on each surface. */
  --cat-guidance: #3987e5;
  --cat-planning: #d95926;
  --cat-accessibility: #199e70;
  --cat-decision: #c98500;
  --cat-prevention: #d55181;
  --cat-finding: #008300;
  --grid: #232c3d;
  --axis: #364053;
  --surface: #131a2b;
  --node-bg: rgba(18, 24, 40, 0.94);
  --wire: rgba(255, 255, 255, 0.16);
  --view-wire: #e6ebf2;
  --wire-label-bg: rgba(18, 24, 40, 0.94);
  --tooltip-bg: rgba(10, 14, 24, 0.96);
  --div-scale: linear-gradient(90deg, #e66767, #8a4148 30%, #2a303a 50%, #2a5b96 70%, #3987e5);
}

:root[data-theme="light"] {
  /* Clean Meta-style categories (validated on white); every use carries the category name as a label. */
  --cat-guidance: #276ed2;
  --cat-planning: #e87045;
  --cat-accessibility: #00723b;
  --cat-decision: #dea71d;
  --cat-prevention: #a3378a;
  --cat-finding: #21a3bc;
  --grid: #e7ecf1;
  --axis: #cfd8e0;
  --surface: #ffffff;
  --node-bg: #ffffff;
  --wire: rgba(28, 43, 51, 0.2);
  --view-wire: #465a69;
  --wire-label-bg: #ffffff;
  --tooltip-bg: rgba(255, 255, 255, 0.98);
  --div-scale: linear-gradient(90deg, #e0603a, #f3b7a3 30%, #f1f4f7 50%, #a9c6f2 70%, #0064e0);
}

/* ---------- blocks inside a chapter ---------- */
.block {
  margin-top: clamp(88px, 11vw, 160px);
}

.block-head {
  max-width: 1240px;
  margin: 0 auto 34px;
  text-align: center;
}

.block-title {
  margin: 0;
  font-size: clamp(28.5px, 3.55vw, 43px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  font-family: var(--font-display);
}

.block-lede {
  max-width: 1160px;
  margin: 14px auto 0;
  color: var(--text-2);
  font-size: clamp(18px, 1.78vw, 20px);
  line-height: 1.6;
  text-wrap: balance;
}

/* ---------- the closed loop ---------- */
.loop-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(8px, 1.4vw, 18px);
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 300px at 15% 20%, var(--assistant-soft), transparent 70%),
    radial-gradient(600px 300px at 85% 30%, var(--action-soft), transparent 70%),
    var(--card);
  box-shadow: var(--shadow);
}

.loop {
  position: relative;
  aspect-ratio: 2 / 1;
  container-type: inline-size;
}

.loop-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ah {
  fill: var(--text-3);
}

.ah-guide {
  fill: var(--assistant);
}

.ah-ask {
  fill: var(--human);
}

.ah-act {
  fill: var(--action);
}

.ah-view {
  fill: var(--view-wire);
}

.wire .base,
.wire .lit {
  fill: none;
  stroke: var(--wire);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.wire .lit {
  stroke: color-mix(in srgb, var(--wc) 60%, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wire .flow {
  fill: none;
  stroke: var(--wc);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 18 100;
  stroke-dashoffset: 18;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.w-guide {
  --wc: var(--assistant);
}

.w-ask {
  --wc: var(--human);
}

.w-act {
  --wc: var(--action);
}

.w-view {
  --wc: var(--view-wire);
}

.loop[data-step="1"] .w-view .flow,
.loop[data-step="2"] .w-ask .flow,
.loop[data-step="3"] .w-guide .flow,
.loop[data-step="4"] .w-act .flow,
.loop[data-step="5"] .w-view .flow {
  opacity: 1;
  animation: wire-flow 1.25s linear infinite;
}

.loop[data-step="1"] .w-view .lit,
.loop[data-step="2"] .w-ask .lit,
.loop[data-step="3"] .w-guide .lit,
.loop[data-step="4"] .w-act .lit,
.loop[data-step="5"] .w-view .lit {
  opacity: 1;
}

.wire-label {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0.35cqw 0.9cqw;
  border-radius: 999px;
  color: var(--text-3);
  font-size: clamp(12.5px, 1.2cqw, 17.5px);
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.l-guide {
  left: 32.4%;
  top: 20.5%;
}

.l-ask {
  left: 32.4%;
  top: 46%;
}

.l-act {
  left: 67%;
  top: 28.6%;
}

.l-view {
  left: 67.5%;
  top: 86.7%;
  display: inline-flex;
  align-items: center;
  gap: 0.6cqw;
  border: 1px solid var(--line-strong);
  background: var(--wire-label-bg);
}

.l-view svg {
  width: 1.5cqw;
  min-width: 13px;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.loop[data-step="3"] .l-guide {
  color: var(--assistant);
}

.loop[data-step="2"] .l-ask {
  color: var(--human);
}

.loop[data-step="4"] .l-act {
  color: var(--action);
}

.loop[data-step="1"] .l-view,
.loop[data-step="5"] .l-view {
  color: var(--text);
  border-color: color-mix(in srgb, var(--view-wire) 45%, transparent);
}

.node {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 1cqw;
  padding: 1.4cqw;
  border-radius: 1.8cqw;
  border: 1px solid var(--line-strong);
  background: var(--node-bg);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.node-assistant {
  left: 2.5%;
  top: 10%;
  width: 25%;
  height: 47%;
  --nc: var(--assistant);
  --nc-soft: var(--assistant-soft);
}

.node-human {
  left: 37.5%;
  top: 10%;
  width: 25%;
  height: 47%;
  --nc: var(--human);
  --nc-soft: var(--human-soft);
}

.node-world {
  left: 71.5%;
  top: 5%;
  width: 26.5%;
  height: 62%;
  --nc: var(--action);
  --nc-soft: var(--action-soft);
}

.loop[data-step="1"] .node-world,
.loop[data-step="5"] .node-world,
.loop[data-step="6"] .node-world,
.loop[data-step="3"] .node-assistant,
.loop[data-step="6"] .node-assistant,
.loop[data-step="2"] .node-human,
.loop[data-step="4"] .node-human {
  border-color: color-mix(in srgb, var(--nc) 62%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--nc) 20%, transparent), 0 1.6cqw 4cqw -1cqw color-mix(in srgb, var(--nc) 38%, transparent);
}

.node-head {
  display: flex;
  align-items: center;
  gap: 1cqw;
}

.node-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 3.4cqw;
  height: 3.4cqw;
  border-radius: 1cqw;
  color: var(--nc);
  background: var(--nc-soft);
}

.node-icon svg {
  width: 62%;
  height: 62%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.node-icon svg .fill {
  fill: currentColor;
  stroke: none;
}

.node-head b {
  display: block;
  font-size: clamp(14px, 1.5cqw, 21.5px);
  letter-spacing: -0.01em;
}

.node-head em {
  display: block;
  color: var(--text-3);
  font-size: clamp(11.5px, 1.08cqw, 15.5px);
  font-style: normal;
}

.node-note {
  margin: 0;
  padding: 0.5cqw 0.8cqw;
  border-radius: 0.8cqw;
  border: 1px dashed color-mix(in srgb, var(--assistant) 40%, transparent);
  color: color-mix(in srgb, var(--assistant) 75%, var(--text));
  font-size: clamp(11.5px, 1.05cqw, 15px);
}

.node-bubble {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0.9cqw 1.1cqw;
  border-radius: 1.1cqw;
  border: 1px solid transparent;
  font-size: clamp(12.5px, 1.3cqw, 18.5px);
  line-height: 1.42;
  color: var(--text);
  transition: border-color 0.3s ease, background 0.3s ease, opacity 0.3s ease;
}

.node-assistant .node-bubble {
  background: var(--assistant-soft);
}

/* The question never shrinks below its text; the action area underneath gives up space instead. */
.node-human .node-bubble {
  flex: 0 0 auto;
  background: var(--human-soft);
}

.node-bubble:empty {
  opacity: 0;
}

.node-bubble.is-live {
  border-color: color-mix(in srgb, var(--nc) 45%, transparent);
}

.node-bubble.is-muted {
  color: var(--text-3);
  font-style: italic;
}

.node-bubble .caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: currentColor;
  animation: blink 0.9s steps(1) infinite;
}

.node-modes {
  display: flex;
  gap: 0.6cqw;
}

.node-modes span {
  flex: 1;
  padding: 0.35cqw 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: clamp(11px, 1cqw, 14.5px);
  text-align: center;
  transition: all 0.3s ease;
}

.node-modes span.is-on {
  border-color: var(--assistant);
  background: var(--assistant);
  color: var(--on-accent);
  font-weight: 700;
}

.node-act {
  position: relative;
  flex: 0 1 auto;
  min-height: 0;
  margin-top: auto;
}

.node-cmds {
  display: grid;
  gap: 0.55cqw;
  margin: 0;
  padding: 0;
  list-style: none;
}

.node-cmds li {
  padding: 0.5cqw 0.9cqw;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--action) 32%, transparent);
  background: var(--action-soft);
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(11.5px, 1.12cqw, 16px);
  opacity: 0;
  transform: translateX(-0.8cqw);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.node-cmds b {
  color: var(--action);
}

.node-wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 1.1cqw;
  border: 1px dashed var(--line-strong);
  color: var(--text-3);
  font-size: clamp(11.5px, 1.1cqw, 15.5px);
  transition: opacity 0.3s ease;
}

.loop[data-step="4"] .node-wait,
.loop[data-step="5"] .node-wait,
.loop[data-step="6"] .node-wait {
  opacity: 0;
}

.loop[data-step="4"] .node-cmds li,
.loop[data-step="5"] .node-cmds li,
.loop[data-step="6"] .node-cmds li {
  opacity: 1;
  transform: none;
}

.loop[data-step="4"] .node-cmds li:nth-child(2) {
  transition-delay: 0.7s;
}

.loop[data-step="4"] .node-cmds li:nth-child(3) {
  transition-delay: 1.4s;
}

.loop[data-step="5"] .node-cmds li,
.loop[data-step="6"] .node-cmds li {
  opacity: 0.45;
}

.fpv {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 1.2cqw;
  border: 1px solid var(--line);
  background: #000;
  color: var(--text);
}

.fpv img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.9s ease;
}

.fpv-after {
  opacity: 0;
}

.loop[data-step="5"] .fpv-after,
.loop[data-step="6"] .fpv-after {
  opacity: 1;
}

.loop[data-step="5"] .fpv-before,
.loop[data-step="6"] .fpv-before {
  opacity: 0;
}

.fpv-tag {
  position: absolute;
  top: 0.8cqw;
  left: 0.8cqw;
  display: inline-flex;
  align-items: center;
  gap: 0.5cqw;
  padding: 0.3cqw 0.8cqw;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: clamp(11.5px, 1.08cqw, 15.5px);
  font-weight: 650;
}

.fpv-tag .dot {
  width: 0.6cqw;
  height: 0.6cqw;
  min-width: 6px;
  min-height: 6px;
  border-radius: 50%;
  background: #ff5d5d;
  box-shadow: 0 0 8px rgba(255, 93, 93, 0.8);
}

.fpv-tag .t1,
.loop[data-step="5"] .fpv-tag .t0,
.loop[data-step="6"] .fpv-tag .t0 {
  display: none;
}

.loop[data-step="5"] .fpv-tag .t1,
.loop[data-step="6"] .fpv-tag .t1 {
  display: inline;
}

.verify {
  position: absolute;
  left: 0.8cqw;
  right: 0.8cqw;
  bottom: 0.8cqw;
  padding: 1cqw 1.2cqw;
  border-radius: 1cqw;
  background: rgba(6, 9, 13, 0.86);
  border: 1px solid rgba(94, 230, 208, 0.45);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(1.2cqw);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.loop[data-step="6"] .verify {
  opacity: 1;
  transform: none;
}

.verify p {
  margin: 0;
  font-size: clamp(11.5px, 1.15cqw, 16.5px);
  line-height: 1.55;
}

.verify i {
  display: inline-grid;
  place-items: center;
  width: 1.4cqw;
  height: 1.4cqw;
  min-width: 13px;
  min-height: 13px;
  margin-right: 0.6cqw;
  border-radius: 50%;
  background: var(--assistant);
  color: var(--on-accent);
  font-size: 0.8em;
  font-style: normal;
  font-weight: 800;
}

.verify .verify-title {
  margin-bottom: 0.3cqw;
  color: var(--text-3);
  font-size: clamp(10.5px, 0.95cqw, 14px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.verify .verify-pass {
  margin-top: 0.4cqw;
  color: var(--assistant);
  font-weight: 750;
}

.loop-controls {
  width: min(1100px, 100%);
  margin: 22px auto 0;
  text-align: center;
}

.loop-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.loop-steps button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 8px 16px 8px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--fill-1);
  color: var(--text-2);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.loop-steps b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--fill-2);
  font-size: 14px;
}

.loop-steps button.is-on {
  color: var(--text);
  border-color: color-mix(in srgb, var(--assistant) 60%, transparent);
  background: var(--assistant-soft);
}

.loop-steps button.is-on b {
  background: var(--assistant);
  color: var(--on-accent);
}

/* Progress of the current step, drawn under the active chip. */
.loop-steps button.is-on::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--assistant);
  transform-origin: left;
  animation: step-progress var(--dur, 3s) linear both;
}

.loop-steps.is-paused button.is-on::after {
  animation: none;
  transform: scaleX(1);
  opacity: 0.4;
}

.loop-caption {
  min-height: 3.2em;
  margin: 16px auto 0;
  max-width: 1100px;
  color: var(--text-2);
  font-size: 18.5px;
  line-height: 1.6;
  text-wrap: balance;
}

.loop-caption b {
  color: var(--text);
}

/* ---------- task cards ---------- */
.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  width: min(1440px, calc(100vw - 2 * clamp(16px, 4vw, 32px)));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.js .task-grid .reveal.is-in {
  transform: none;
}

/* Name, description and example first; the clip and its overlays sit at the bottom, level across a row. */
.task-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 0 18px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--c) 24%, var(--line));
  background: var(--card);
  transition: border-color 0.3s ease;
}

.task-card:hover {
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
}

.task-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--c) 20%, transparent);
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 24%, transparent), color-mix(in srgb, var(--c) 5%, transparent) 75%);
}

.task-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--c);
  color: #fff;
  box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--c) 70%, transparent);
}

.task-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-head h4 {
  flex: 1;
  margin: 0;
  color: color-mix(in srgb, var(--c) 72%, var(--text));
  font-size: clamp(25px, 2.25vw, 32px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-family: var(--font-display);
}

.task-count {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-3);
  font-size: 14px;
}

.task-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 960 / 760;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #000;
  color: var(--text);
}

.task-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(6, 9, 14, 0.72);
  backdrop-filter: blur(6px);
  font-size: 14px;
  white-space: nowrap;
}

.task-act {
  top: 10px;
  left: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  border-color: rgba(166, 180, 255, 0.4);
  color: #dfe4ff;
  font-family: var(--mono);
  transition: opacity 0.25s ease;
}

.task-act b {
  color: var(--action);
}

.task-act:empty {
  opacity: 0;
}

.task-id {
  right: 10px;
  bottom: 10px;
  color: rgba(238, 242, 247, 0.78);
  font-family: var(--mono);
  font-size: 12.5px;
}

.task-badge {
  left: 10px;
  bottom: 10px;
  border-color: rgba(255, 184, 107, 0.5);
  color: #ffd9b0;
  font-weight: 650;
}

.task-badge svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.task-memo {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: calc(100% - 120px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-memo li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(166, 180, 255, 0.45);
  background: rgba(6, 9, 14, 0.74);
  backdrop-filter: blur(6px);
  font-size: 13.5px;
  white-space: nowrap;
  animation: say-in 0.35s ease both;
}

.task-memo li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--action);
}

.task-memo li[data-kind="warn"] {
  border-color: rgba(255, 209, 102, 0.65);
}

.task-memo li[data-kind="warn"]::before {
  background: var(--reminder);
  box-shadow: 0 0 8px rgba(255, 209, 102, 0.8);
}

.task-memo li[data-kind="ok"] {
  border-color: rgba(94, 230, 208, 0.55);
}

.task-memo li[data-kind="ok"]::before {
  background: var(--assistant);
}

.task-say {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  min-height: calc(3 * 1.45em + 22px);
  margin: 12px 0 0;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--assistant) 32%, transparent);
  background: var(--assistant-soft);
  font-size: 16.5px;
  line-height: 1.45;
  text-wrap: pretty;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.task-say i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--assistant);
  -webkit-mask: var(--icon) center / 18px no-repeat;
  mask: var(--icon) center / 18px no-repeat;
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10.5c0-1.4 1.1-2.5 2.5-2.5h3.3c1 0 1.9.6 2.3 1.5l.4.9h1l.4-.9c.4-.9 1.3-1.5 2.3-1.5h3.3c1.4 0 2.5 1.1 2.5 2.5v1c0 2.5-2 4.5-4.5 4.5h-.6c-1.9 0-3.5-1.4-3.8-3.3h-.6C10.9 14.6 9.3 16 7.4 16h-.9C4.6 16 3 14.4 3 12.5v-2Z'/%3E%3C/svg%3E");
}

.task-say span {
  animation: say-in 0.4s ease both;
}

.task-say[data-who="human"] {
  border-color: color-mix(in srgb, var(--human) 36%, transparent);
  background: var(--human-soft);
}

.task-say[data-who="human"] i {
  background: var(--human);
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7.6' r='4'/%3E%3Cpath d='M3.8 21c.7-4.6 4.1-7.2 8.2-7.2s7.5 2.6 8.2 7.2z'/%3E%3C/svg%3E");
}

.task-say[data-who="alert"] {
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.task-say[data-who="alert"] i {
  background: var(--danger);
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5 1.5 21h21zM11 9h2v6h-2zm0 8h2v2h-2z'/%3E%3C/svg%3E");
}

.task-say[data-who="quiet"] {
  border-color: var(--line);
  background: var(--fill-1);
  color: var(--text-3);
  font-style: italic;
}

.task-say[data-who="quiet"] i {
  background: var(--text-3);
}

.task-focus {
  margin: 18px 20px 0;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.4;
  text-wrap: pretty;
}

.task-eg {
  margin: 10px 20px 0;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
}

.task-eg b {
  color: color-mix(in srgb, var(--c) 70%, var(--text));
}

.eg-label {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 15%, transparent);
  color: color-mix(in srgb, var(--c) 78%, var(--text));
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.task-demo {
  margin: auto 16px 0;
  padding-top: 18px;
}

/* ---------- results: chart containers ---------- */
.viz {
  width: min(1360px, 100%);
  margin: 0 auto clamp(36px, 4vw, 56px);
  padding: 22px clamp(14px, 2vw, 26px) 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
}

.viz-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: 18px;
}

.viz-title {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.02em;
  font-family: var(--font-display);
  font-weight: 600;
}

.viz-sub {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 16px;
}

/* Leaderboard filters read as buttons: labelled groups of raised pills, the chosen one filled. */
.board-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-3);
  font-size: 14.5px;
}

.board-hint svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: hint-tap 1.6s ease-in-out infinite;
}

.board-hint.is-used svg {
  animation: none;
}

@keyframes hint-tap {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-2px, -3px);
  }
}

.board-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 28px;
  margin: 0 0 22px;
}

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

.ctl-label {
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seg button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 32, 64, 0.07);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.seg button:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.seg button.is-on {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-accent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 32%, transparent);
  transform: none;
}

.seg button i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.seg button.is-on i {
  box-shadow: 0 0 0 1.5px var(--on-accent);
}

/* The first time the leaderboard is seen, the unselected buttons light up in turn. */
.seg.is-hinting button:not(.is-on) {
  animation: seg-hint 1.1s ease calc(var(--k, 0) * 90ms) both;
}

@keyframes seg-hint {
  0%,
  100% {
    border-color: var(--line-strong);
  }
  40% {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
  }
}

.viz-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 15px;
  line-height: 1.5;
}

.viz-foot b {
  color: var(--text-2);
}

.table-toggle {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}

.table-toggle:hover {
  color: var(--text);
  border-color: var(--text-3);
}

.viz-table {
  margin-top: 14px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
  text-align: left;
}

.data-table thead th {
  color: var(--text-3);
  font-weight: 650;
}

.data-table tbody td {
  color: var(--text-2);
}

.data-table tbody td:first-child {
  color: var(--text);
}

.data-table .best {
  color: var(--text);
  font-weight: 800;
}

.data-table .group-row th {
  color: var(--text-2);
  text-align: center;
  border-bottom: 0;
}

/* ---------- leaderboard ---------- */
.board {
  --row: 44px;
  position: relative;
  padding-top: 26px;
}

.board-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--plot-left);
  right: var(--plot-right);
  pointer-events: none;
}

.board-grid > span {
  position: absolute;
  top: 18px;
  bottom: 0;
  width: 1px;
  background: var(--grid);
}

.board-grid em {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  color: var(--text-3);
  font-size: 13.5px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.board-grid .oracle {
  background: color-mix(in srgb, var(--assistant) 45%, transparent);
}

.board-grid .oracle-l {
  color: var(--assistant);
  white-space: nowrap;
  transform: translateX(-100%);
}

.board-rows {
  position: relative;
}

.board-row {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--row);
  display: grid;
  grid-template-columns: 30px var(--name-w) 1fr;
  align-items: center;
  transition: transform 0.7s cubic-bezier(0.3, 0.8, 0.25, 1);
}

.board-row:hover .board-bar {
  filter: brightness(1.12);
}

.board-row:hover .board-name {
  color: var(--text);
}

.board-rank {
  color: var(--text-3);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.board-row.is-top .board-rank {
  color: var(--text);
  font-weight: 800;
}

.board-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 12px;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.15;
  transition: color 0.2s ease;
}

.board-name small {
  color: var(--text-3);
  font-size: 13.5px;
  font-weight: 500;
}

.board-track {
  position: relative;
  height: 100%;
  margin-right: var(--plot-right);
}

.board-bar {
  position: absolute;
  left: 0;
  top: 50%;
  height: 16px;
  margin-top: -8px;
  width: 0;
  border-radius: 0 4px 4px 0;
  background: var(--bar);
  transition: width 0.8s cubic-bezier(0.3, 0.8, 0.25, 1), background 0.5s ease, filter 0.2s ease;
}

.board-val {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: left 0.8s cubic-bezier(0.3, 0.8, 0.25, 1);
}

.board-row.is-top .board-val::after {
  content: "best";
  margin-left: 7px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

/* ---------- capability heatmap ---------- */
.div-legend {
  display: grid;
  grid-template-columns: auto 180px auto;
  align-items: center;
  column-gap: 10px;
  color: var(--text-2);
  font-size: 14px;
}

.div-scale {
  height: 10px;
  border-radius: 999px;
  background: var(--div-scale);
}

.div-legend em {
  grid-row: 2;
  color: var(--text-3);
  font-size: 12.5px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.div-legend em:nth-of-type(1) {
  grid-column: 2;
  justify-self: start;
}

.div-legend em:nth-of-type(2) {
  grid-column: 2;
  justify-self: center;
}

.div-legend em:nth-of-type(3) {
  grid-column: 2;
  justify-self: end;
}

.heat-wrap {
  overflow-x: auto;
}

.heat {
  width: 100%;
  min-width: 860px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

.heat th {
  padding: 4px 6px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 650;
  text-align: center;
  white-space: nowrap;
}

.heat .grp th {
  padding-bottom: 6px;
  color: var(--text-2);
  font-size: 13.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.heat .grp th span {
  display: block;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line-strong);
}

.heat tbody th,
.heat thead tr:last-child th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--card-solid);
}

.heat tbody th {
  padding-right: 14px;
  color: var(--text);
  font-size: 15.5px;
  font-weight: 600;
  text-align: left;
}

.heat td {
  height: 34px;
  border-radius: 5px;
  font-size: 15px;
  text-align: center;
  cursor: default;
  transition: outline-color 0.15s ease;
  outline: 2px solid transparent;
  outline-offset: -1px;
}

.heat td.best {
  font-weight: 800;
}

.heat td.best::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 4px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 0.15em;
}

.heat .gap,
.heat .gap:hover {
  padding: 0;
  background: none;
  outline-color: transparent;
}

.heat td:hover {
  outline-color: var(--text);
}

.heat tr.is-hl th {
  color: var(--text);
}

.heat tbody tr:not(.is-hl).dim td {
  opacity: 0.55;
}

/* ---------- findings ---------- */
.findings-head {
  margin-top: clamp(76px, 9.5vw, 124px);
}

.findings {
  display: grid;
  gap: 18px;
  width: min(1360px, 100%);
  margin: 0 auto;
}

.finding {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: center;
  padding: 26px clamp(16px, 2.2vw, 30px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
}

.finding-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--action-soft);
  color: var(--action);
  font-weight: 800;
}

.finding h4 {
  margin: 0;
  font-size: clamp(22.5px, 2.2vw, 27.5px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
  font-family: var(--font-display);
  font-weight: 600;
}

.finding-text p {
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.62;
  text-wrap: pretty;
}

.finding-viz {
  min-width: 0;
}

.mini-title {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 650;
}

.mini-note {
  margin: 4px 0 0;
  color: var(--text-3);
  font-size: 14.5px;
}

.mini-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 14.5px;
}

.mini-legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.mini-legend i {
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.mini-legend i.ring {
  border-radius: 50%;
  background: transparent !important;
  border: 2px solid var(--k);
}

.mini-legend i.dot {
  border-radius: 50%;
}

.mini-legend i.line {
  width: 14px;
  height: 2px;
  border-radius: 1px;
}

.mini-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* F1 gap meter */
.gap-meter {
  position: relative;
  padding: 50px 0 46px;
}

.gap-track {
  position: relative;
  height: 24px;
  border-radius: 6px;
  background: var(--assistant-soft);
  border: 1px solid color-mix(in srgb, var(--assistant) 30%, transparent);
}

.gap-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 5px 4px 4px 5px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 55%, var(--surface)), var(--primary));
  transition: width 1.4s cubic-bezier(0.3, 0.8, 0.25, 1) 0.2s;
}

.gap-meter.is-in .gap-fill {
  width: 41.7%;
}

.gap-tick {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 26px;
  margin: -13px 0 0 -5px;
}

.gap-tick::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.gap-mark {
  position: absolute;
  white-space: nowrap;
}

.gap-mark b {
  display: block;
  font-size: 22.5px;
  letter-spacing: -0.02em;
}

.gap-mark span {
  color: var(--text-3);
  font-size: 14px;
}

.gap-mark.top {
  top: 46px;
  text-align: center;
}

.gap-mark.bottom {
  bottom: 0;
}

/* The empty part of the track is the gap; its label sits inside it. */
.gap-span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 41.7%;
  right: 0;
  display: grid;
  place-items: center;
}

.gap-span em {
  color: var(--primary);
  font-size: 14px;
  font-style: normal;
  font-weight: 650;
  white-space: nowrap;
}

/* F2 dumbbells, F5 strips, F3 stacks: shared row anatomy */
.mrow {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  min-height: 32px;
}

.mrow-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 15.5px;
  font-weight: 600;
  white-space: nowrap;
}

.mrow-label i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.mplot {
  position: relative;
  height: 32px;
}

.mplot .gl {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--grid);
}

.maxis {
  position: relative;
  height: 18px;
  margin-left: 112px;
}

.maxis span {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  color: var(--text-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.db-line {
  position: absolute;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: color-mix(in srgb, var(--action) 50%, transparent);
}

.db-dot {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--surface);
}

.db-dot.best {
  background: var(--action);
}

.db-dot.mean {
  background: var(--surface);
  border: 2px solid color-mix(in srgb, var(--action) 65%, var(--text-3));
}

.db-val {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 12px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hit {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  cursor: default;
}

.stack {
  position: absolute;
  inset: 6px 0;
  display: flex;
  gap: 2px;
}

.stack span {
  position: relative;
  height: 100%;
  min-width: 2px;
  transition: filter 0.15s ease;
}

.stack span:first-child {
  border-radius: 4px 0 0 4px;
}

.stack span:last-child {
  border-radius: 0 4px 4px 0;
}

.stack span:hover {
  filter: brightness(1.15);
}

.stack span em {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-style: normal;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.strip-dot {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: var(--dot-c);
  box-shadow: 0 0 0 2px var(--surface);
}

.strip-dot.is-key {
  z-index: 2;
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
}

.strip-oracle {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  margin-left: -1px;
  background: var(--text-3);
}

.strip-note {
  position: absolute;
  top: -6px;
  margin-left: 9px;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.strip-note.is-left {
  margin-left: -9px;
  transform: translateX(-100%);
}

/* F4 paired comparison */
.pair-row {
  display: grid;
  grid-template-columns: 136px 1fr;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.pair-row + .pair-row {
  border-top: 1px solid var(--line);
}

.pair-label {
  color: var(--text);
  font-size: 15.5px;
  font-weight: 600;
}

.pair-label small {
  display: block;
  color: var(--text-3);
  font-size: 13.5px;
  font-weight: 500;
}

.pair-bars {
  display: grid;
  gap: 4px;
}

.pair-bar {
  position: relative;
  height: 14px;
}

.pair-bar span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 0 4px 4px 0;
  background: var(--k);
  transition: width 1s cubic-bezier(0.3, 0.8, 0.25, 1);
}

.pair-bar em {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 8px;
  color: var(--text);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- closing, citation, footer ---------- */
.closing {
  width: min(1160px, 100%);
  margin: clamp(104px, 13vw, 176px) auto 0;
  text-align: center;
}

.closing-text {
  margin: 0;
  font-size: clamp(24px, 2.8vw, 34.5px);
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: -0.01em;
  text-wrap: balance;
  background: var(--spark-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-display);
}

.cite {
  width: min(1100px, 100%);
  margin: clamp(64px, 8vw, 110px) auto 0;
}

.cite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cite-head h3 {
  margin: 0;
  font-size: 22.5px;
  font-family: var(--font-display);
  font-weight: 600;
}

.copy-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--fill-1);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--text);
}

.bib {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 70px;
}

.footer-meta {
  height: 18px;
  width: auto;
  opacity: 0.9;
}

/* ---------- cursor glow ---------- */
.glow {
  position: relative;
}

.glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow:hover::after {
  opacity: 1;
}

/* ---------- tooltip ---------- */
.tooltip {
  position: fixed;
  z-index: 50;
  max-width: 280px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--tooltip-bg);
  box-shadow: var(--shadow);
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.45;
  pointer-events: none;
}

.tooltip .tt-value {
  display: block;
  color: var(--text);
  font-size: 17.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.tooltip .tt-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tooltip .tt-key {
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

/* ---------- animation ---------- */
@keyframes wire-flow {
  from {
    stroke-dashoffset: 18;
  }
  to {
    stroke-dashoffset: -100;
  }
}

@keyframes step-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes say-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finding {
    grid-template-columns: 1fr;
  }
}

/* The loop collapses to a vertical stack once node text would get too small. */
@media (max-width: 860px) {
  .loop {
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    gap: 34px;
    padding: 6px;
  }
  .loop-wires,
  .wire-label {
    display: none;
  }
  .node {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
  }
  .node + .node::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -28px;
    width: 2px;
    height: 22px;
    margin-left: -1px;
    background: linear-gradient(var(--line-strong), var(--nc));
  }
  .node-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .node-head b {
    font-size: 17px;
  }
  .node-head em,
  .node-note {
    font-size: 13.5px;
  }
  .node-note {
    padding: 6px 10px;
    border-radius: 10px;
  }
  .node-bubble {
    min-height: 3em;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 15.5px;
  }
  .node-modes span,
  .node-cmds li {
    font-size: 13.5px;
    padding: 4px 10px;
  }
  .node-cmds {
    gap: 6px;
  }
  .node-wait {
    border-radius: 12px;
    font-size: 13.5px;
  }
  .fpv {
    flex: none;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
  }
  .fpv-tag,
  .verify p {
    font-size: 13.5px;
  }
  .fpv-tag {
    top: 8px;
    left: 8px;
    padding: 3px 9px;
  }
  .verify {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 10px 12px;
  }
  .verify i {
    margin-right: 6px;
  }
}

@media (max-width: 700px) {
  .task-grid {
    grid-template-columns: 1fr;
  }
  .board {
    --row: 52px;
  }
  .board-name {
    font-size: 14px;
  }
  .board-row.is-top .board-val::after {
    display: none;
  }
  .div-legend {
    grid-template-columns: auto 120px auto;
  }
  .mrow {
    grid-template-columns: 108px 1fr;
  }
  .mrow-label {
    font-size: 13.5px;
  }
  .maxis {
    margin-left: 108px;
  }
  .board-grid .t-mid,
  .board-grid .oracle-l .pct {
    display: none;
  }
  .pair-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wire .flow {
    opacity: 0 !important;
  }
}

/* ---------- light theme: Meta-style pastel surfaces ---------- */
:where(:root[data-theme="light"]) .loop-shell {
  background: #f7f9fc;
}

:where(:root[data-theme="light"]) .node {
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(16, 32, 64, 0.06), 0 10px 26px rgba(16, 32, 64, 0.07);
}

:where(:root[data-theme="light"]) .node-assistant {
  background: var(--meta-blue);
}

:where(:root[data-theme="light"]) .node-human {
  background: var(--meta-peach);
}

:where(:root[data-theme="light"]) .node-world {
  background: var(--meta-mint);
}

:where(:root[data-theme="light"]) .node .node-bubble {
  background: #ffffff;
}

:where(:root[data-theme="light"]) .task-head {
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 15%, #ffffff), color-mix(in srgb, var(--c) 6%, #f3f0fb) 80%);
}

:where(:root[data-theme="light"]) .task-head h4 {
  color: var(--text);
}

:where(:root[data-theme="light"]) .task-icon {
  background: #ffffff;
  color: var(--c);
  box-shadow: 0 2px 8px rgba(16, 32, 64, 0.1);
}
