/* The conversation exhibit is isolated from the accepted token exhibit. */
.cx-exhibit {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f2faf5;
  overflow: hidden;
}
.cx-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.cx-toolbar .speed {
  margin-left: 12px;
}
.cx-turn-counter {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cx-chapters {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 14px 24px;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  color: #526f61;
  font-size: 11px;
}
.cx-chapters li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cx-chapters li span {
  display: grid;
  place-items: center;
  border: 1px solid #a4c4b5;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 9px;
}
.cx-chapters .is-current {
  color: var(--teal);
  font-weight: 700;
}
.cx-chapters .is-current span {
  color: white;
  background: var(--teal);
  border-color: var(--teal);
}
.cx-chapters .is-past span {
  background: #cce6d7;
}
.cx-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}
.cx-chat {
  padding: 25px 18px 20px;
  border-right: 1px solid var(--line);
  min-width: 0;
  background: #f7fcf8;
}
.cx-column-title > span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}
.cx-column-title h3 {
  font-size: 21px;
  font-weight: 600;
  margin-top: 8px;
  letter-spacing: -0.035em;
  line-height: 1.25;
}
.cx-chat-log {
  height: 460px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #a8cabb transparent;
  margin-top: 20px;
  padding: 0 3px 12px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.cx-empty {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 35px;
}
.cx-bubble {
  font-size: 11px;
  line-height: 1.8;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
  max-width: 100%;
  flex-shrink: 0;
}
.cx-bubble b {
  display: block;
  font-size: 9px;
  letter-spacing: 0.02em;
  margin-bottom: 5px;
  font-weight: 700;
  color: #355749;
}
.cx-bubble.cx-user {
  background: #d7ede1;
  margin-left: 20px;
  border-bottom-right-radius: 2px;
}
.cx-bubble.cx-assistant {
  margin-right: 15px;
  border-bottom-left-radius: 2px;
}
.cx-bubble-note {
  display: none;
  font-size: 9px;
  line-height: 1.6;
  color: #885017;
  margin-top: 8px;
}
.cx-bubble.cx-excluded {
  border: 1px dashed #b07843;
  background: #fff6e8;
}
.cx-excluded .cx-bubble-note {
  display: block;
}
.cx-chat-note {
  font-size: 10px;
  line-height: 1.75;
  color: var(--muted);
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
.cx-lab {
  padding: 25px 22px 20px;
  min-width: 0;
}
.cx-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin: 15px 0 20px;
  font-size: 9px;
  color: #3c6050;
}
.cx-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cx-legend span:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  border: 1px solid #779687;
  background: #a8c4b4;
}
.cx-legend .cx-key-system:before {
  background: #edcd94;
}
.cx-legend .cx-key-material:before {
  background: #bed6ca;
}
.cx-legend .cx-key-user:before {
  background: #72d2b9;
}
.cx-legend .cx-key-assistant:before {
  background: #c3dba3;
}
.cx-board {
  background: #032c26;
  color: #effff5;
  border: 1px solid #184d3c;
  border-radius: 15px;
  padding: 22px 20px 0;
  min-width: 0;
  position: relative;
}
.cx-window-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.cx-window-heading b {
  font-weight: 650;
  color: #9ae7cc;
}
.cx-window-heading > span:last-child {
  font:
    10px ui-monospace,
    Consolas,
    monospace;
  color: #c3decd;
  text-align: right;
}
.cx-budget {
  height: 5px;
  background: #295143;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  margin-bottom: 16px;
}
.cx-budget i {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  background: #84d8b7;
  transition:
    width 0.22s,
    left 0.22s;
}
.cx-budget i + i {
  background: #a5b3a480;
}
.cx-tape-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #7caa93 #194a3a;
  border: 1px solid #669783;
  border-right: 3px solid #edcd94;
  border-radius: 6px;
  background: #194637;
  isolation: isolate;
}
.cx-tape {
  height: 68px;
  position: relative;
  width: 100%;
  /* The shortest complete message (8 / 290 tokens) keeps a 24px tap target. */
  min-width: 900px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 39px,
    #93b5a30c 39px,
    #93b5a30c 40px
  );
  overflow: hidden;
}
.cx-block {
  position: absolute;
  top: 3px;
  bottom: 3px;
  min-height: 0;
  padding: 0 1px;
  border: 0;
  border-right: 3px solid #143e31;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  color: #103f2b;
  transition:
    box-shadow 0.16s,
    opacity 0.16s;
  font-size: 12px;
  white-space: nowrap;
  min-width: 0;
  line-height: 1.4;
}
.cx-block small {
  font:
    8px ui-monospace,
    monospace;
  font-weight: 400;
  opacity: 0.8;
}
.cx-block b {
  font-weight: 650;
  font-size: 11px;
  max-width: 100%;
}
.cx-block.cx-system,
.cx-block.cx-system:hover:enabled {
  background: #edcd94;
}
.cx-block.cx-material,
.cx-block.cx-material:hover:enabled {
  background: #bed6ca;
}
.cx-block.cx-user,
.cx-block.cx-user:hover:enabled {
  background: #72d2b9;
}
.cx-block.cx-assistant,
.cx-block.cx-assistant:hover:enabled {
  background: #c3dba3;
}
.cx-block.is-reading {
  box-shadow: inset 0 0 0 2px white;
}
.cx-block.is-growing {
  box-shadow: inset 0 0 0 2px #97ffd2;
  min-width: 24px;
  z-index: 1;
}
.cx-block:focus-visible {
  outline-offset: -3px;
  outline-color: #032c26;
}
.cx-reserved {
  pointer-events: none;
  position: absolute;
  top: 4px;
  bottom: 4px;
  border: 1px dashed #95b29d;
  border-radius: 4px;
  color: #cbe0d1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
}
.cx-beam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 16px 4px #d6ffcb99;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}
.cx-tape-foot {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #abcab7;
  font-size: 8px;
  margin-top: 8px;
  line-height: 1.6;
}
.cx-limit {
  color: #edcd94;
  white-space: nowrap;
}
.cx-readout {
  margin-top: 18px;
  padding: 13px 15px;
  border-left: 2px solid #70b18e;
  border-radius: 0 6px 6px 0;
  background: #103c2e;
  min-height: 106px;
}
.cx-tape-help {
  color: #b5d5c1;
  font-size: 10px;
  line-height: 1.6;
  margin-top: 10px;
}
.cx-readout > span {
  display: block;
  font-size: 9px;
  font-weight: 650;
  color: #a8d8bc;
  line-height: 1.6;
  margin-bottom: 6px;
}
.cx-readout p {
  font-size: 12px;
  line-height: 1.75;
  overflow: auto;
  max-height: 90px;
  scrollbar-width: thin;
  scrollbar-color: #669e81 transparent;
}
.cx-work-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px 175px;
  gap: 10px;
  align-items: stretch;
  margin-top: 20px;
}
.cx-output {
  border: 1px solid #466d52;
  border-radius: 10px;
  background: #0d382a;
  padding: 14px 16px;
  min-width: 0;
}
.cx-card-label {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px;
  color: #bfe8c1;
  font-size: 9px;
  line-height: 1.6;
  margin-bottom: 10px;
}
.cx-card-label > span:first-child {
  font-weight: 650;
}
.cx-card-label > span:last-child {
  font-variant-numeric: tabular-nums;
  font-size: 8px;
}
.cx-output p {
  font-size: 13px;
  line-height: 1.8;
  min-height: 108px;
  max-height: 150px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #75a787 transparent;
}
.cx-output-arrow {
  align-self: center;
  text-align: center;
  color: #9de4ba;
  font-size: 26px;
}
.cx-model {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #46745c;
  border-radius: 12px;
  background: #174635;
  padding: 15px;
  min-width: 0;
}
.cx-model-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cx-model-top strong {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.cx-model-ring {
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
  color: #92e6bd;
  display: block;
}
.cx-token-choice {
  padding-top: 13px;
  margin-top: 12px;
  border-top: 1px solid #3c6f53;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.cx-token-choice > span {
  font-size: 8px;
  max-width: 55px;
  line-height: 1.7;
  color: #b6d7c0;
}
.cx-token-choice b {
  font-size: 14px;
  color: #dcffc3;
  overflow-wrap: anywhere;
  max-width: 80px;
  font-weight: 550;
  line-height: 1.6;
}
.cx-model a {
  font-size: 8px;
  color: #c3e0c8;
  margin-top: 12px;
  line-height: 1.7;
  min-height: 25px;
}
.cx-return {
  height: 76px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1px;
}
.cx-circuit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.cx-circuit path {
  stroke: #528169;
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
}
.cx-circuit circle {
  fill: #c9ffbc;
  filter: drop-shadow(0 0 6px #abffd0);
}
.cx-return > span {
  position: relative;
  z-index: 1;
  text-align: center;
  background: #032c26;
  padding: 4px 14px;
  font-size: 9px;
  color: #bce2c6;
  max-width: 90%;
  line-height: 1.7;
}
.cx-overflow .cx-budget i {
  background: #ebc78c;
}
.cx-overflow .cx-tape-viewport {
  border-color: #ffcf90;
}
.cx-overflow #cx-budget-label {
  color: #ffdcab;
}
.cx-exhibit[data-phase="rewind"] #cx-origin {
  color: #e1ffd5;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.cx-exhibit[data-phase="generate"] .cx-model {
  border-color: #c8f7a8;
  box-shadow: 0 0 22px #aaf1a115;
}
.cx-exhibit[data-phase="feedback"] #cx-return-path,
.cx-exhibit[data-phase="feedback"] #cx-return-arrow,
.cx-exhibit[data-phase="generate"] #cx-input-path {
  stroke: #c9ffbc;
  stroke-width: 2;
}
.cx-playing[data-phase="generate"] .cx-model-ring {
  animation: cx-model-cycle 1.1s linear infinite;
}
.cx-playing[data-phase="rewind"] #cx-origin {
  animation: cx-origin-glow 0.7s ease-in-out 2;
}
.cx-playing[data-phase="send"] .cx-readout {
  animation: cx-origin-glow 0.7s ease-out;
}
.cx-lost {
  margin-top: 14px;
  border: 1px solid #c8a774;
  border-radius: 9px;
  background: #fff3dd;
  padding: 13px 15px;
  color: #70431a;
}
.cx-lost > b {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  display: block;
  margin-bottom: 4px;
}
.cx-lost p {
  font-size: 11px;
  line-height: 1.7;
}
.cx-caption {
  display: flex;
  align-items: start;
  gap: 17px;
  padding: 22px 25px;
  border-top: 1px solid var(--line);
  background: #e5f3e9;
  min-height: 121px;
}
.cx-caption > span {
  font-size: 26px;
  font-weight: 400;
  color: var(--teal);
  line-height: 1.35;
  min-width: 30px;
  font-variant-numeric: tabular-nums;
}
.cx-caption strong {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
  display: block;
  margin-bottom: 6px;
}
.cx-caption p {
  font-size: 12px;
  line-height: 1.8;
  color: #3d6250;
  max-width: 1050px;
}
.cx-footnote {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  padding: 17px 25px;
  border-top: 1px solid var(--line);
  background: #f7fcf8;
}
.cx-footnote p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.cx-footnote strong {
  font-weight: 600;
}
@keyframes cx-model-cycle {
  to {
    transform: rotate(360deg);
  }
}
@keyframes cx-origin-glow {
  50% {
    opacity: 0.55;
  }
}
@media (max-width: 1120px) {
  .cx-layout {
    grid-template-columns: 235px minmax(0, 1fr);
  }
  .cx-lab {
    padding: 23px 17px 18px;
  }
  .cx-work-row {
    grid-template-columns: minmax(0, 1fr) 24px 153px;
    gap: 7px;
  }
  .cx-model {
    padding: 12px;
  }
  .cx-output {
    padding: 13px;
  }
  .cx-board {
    padding: 18px 15px 0;
  }
  .cx-readout p {
    font-size: 11px;
  }
  .cx-output p {
    font-size: 12px;
  }
  .cx-model-top strong {
    font-size: 13px;
  }
  .cx-model-ring {
    font-size: 31px;
  }
  .cx-chat {
    padding: 23px 14px 18px;
  }
}
@media (max-width: 900px) {
  .cx-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .cx-lab {
    grid-row: 1;
    padding: 24px;
  }
  .cx-chat {
    grid-row: 2;
    border-right: none;
    border-top: 1px solid var(--line);
    padding: 23px 24px;
  }
  .cx-chat-log {
    height: 265px;
    display: block;
  }
  .cx-bubble {
    max-width: 70%;
    margin-bottom: 10px;
  }
  .cx-bubble.cx-user {
    margin-left: auto;
    margin-right: 0;
  }
  .cx-bubble.cx-assistant {
    margin-right: auto;
    margin-left: 0;
  }
  .cx-chat-note {
    margin-top: 0;
  }
  .cx-work-row {
    grid-template-columns: minmax(0, 1fr) 36px 190px;
    gap: 12px;
  }
  .cx-model-top strong {
    font-size: 16px;
  }
  .cx-output p {
    font-size: 14px;
    min-height: 112px;
  }
  .cx-readout p {
    font-size: 12px;
  }
  .cx-caption {
    min-height: 138px;
  }
}
@media (max-width: 600px) {
  .cx-exhibit {
    border-radius: 14px;
  }
  .cx-toolbar {
    padding: 12px;
    gap: 7px;
    flex-wrap: wrap;
  }
  .cx-toolbar > .primary {
    font-size: 12px;
    padding: 9px 13px;
  }
  .cx-toolbar .speed {
    margin-left: auto;
    font-size: 10px;
    gap: 5px;
  }
  .cx-toolbar .speed select {
    font-size: 11px;
    padding: 0 5px;
  }
  .cx-turn-counter {
    flex-basis: 100%;
    font-size: 10px;
    text-align: left;
    margin-top: 4px;
  }
  .cx-chapters {
    padding: 12px 14px;
    justify-content: space-between;
    gap: 8px;
    font-size: 9px;
  }
  .cx-chapters li {
    gap: 4px;
  }
  .cx-chapters li span {
    width: 18px;
    height: 18px;
    font-size: 8px;
  }
  .cx-lab {
    padding: 20px 12px 16px;
  }
  .cx-column-title h3 {
    font-size: 20px;
  }
  .cx-lab > .cx-column-title {
    padding-inline: 4px;
  }
  .cx-legend {
    font-size: 9px;
    gap: 8px 12px;
    margin: 13px 4px 16px;
  }
  .cx-board {
    padding: 16px 12px 0;
    border-radius: 11px;
  }
  .cx-window-heading {
    font-size: 9px;
    gap: 8px;
    align-items: start;
  }
  .cx-window-heading > span:first-child {
    max-width: 130px;
  }
  .cx-window-heading > span:last-child {
    font-size: 9px;
    max-width: 132px;
    line-height: 1.6;
  }
  .cx-tape {
    height: 65px;
  }
  .cx-tape-foot {
    font-size: 8px;
    gap: 8px;
  }
  .cx-tape-caption {
    max-width: 70%;
  }
  .cx-limit {
    font-size: 8px;
  }
  .cx-readout {
    margin-top: 16px;
    padding: 11px 12px;
    min-height: 139px;
  }
  .cx-readout p {
    font-size: 12px;
    max-height: 110px;
  }
  .cx-readout > span {
    font-size: 9px;
  }
  .cx-work-row {
    grid-template-columns: minmax(0, 1fr) 20px 108px;
    gap: 5px;
    margin-top: 16px;
  }
  .cx-output {
    padding: 10px;
  }
  .cx-output p {
    font-size: 12px;
    line-height: 1.75;
    min-height: 158px;
    max-height: 210px;
  }
  .cx-card-label {
    font-size: 9px;
    gap: 4px;
  }
  .cx-card-label > span:last-child {
    font-size: 8px;
  }
  .cx-model {
    padding: 10px 8px;
  }
  .cx-model-top {
    flex-direction: column;
    gap: 8px;
    align-items: start;
  }
  .cx-model-top strong {
    font-size: 13px;
  }
  .cx-model-ring {
    font-size: 33px;
  }
  .cx-token-choice {
    flex-direction: column;
    align-items: start;
    gap: 6px;
    padding-top: 9px;
    margin-top: 10px;
  }
  .cx-token-choice > span {
    max-width: 100%;
    font-size: 8px;
  }
  .cx-token-choice b {
    max-width: 100%;
    font-size: 12px;
  }
  .cx-model a {
    font-size: 8px;
    margin-top: 9px;
    min-height: 38px;
  }
  .cx-output-arrow {
    font-size: 22px;
  }
  .cx-return {
    height: 90px;
  }
  .cx-return > span {
    font-size: 8px;
    max-width: 87%;
    padding: 4px 9px;
  }
  .cx-lost {
    padding: 12px;
  }
  .cx-chat {
    padding: 19px 16px;
  }
  .cx-bubble {
    max-width: 89%;
    font-size: 12px;
  }
  .cx-chat-log {
    height: 290px;
    margin-top: 17px;
  }
  .cx-chat-note {
    font-size: 10px;
  }
  .cx-caption {
    gap: 10px;
    padding: 18px 15px;
    min-height: 174px;
  }
  .cx-caption > span {
    font-size: 21px;
    min-width: 25px;
  }
  .cx-caption strong {
    font-size: 13px;
  }
  .cx-caption p {
    font-size: 11px;
  }
  .cx-footnote {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px;
  }
  .cx-footnote p {
    font-size: 9px;
  }
}
@media (max-width: 360px) {
  .cx-toolbar > .primary {
    font-size: 11px;
    padding-inline: 10px;
  }
  .cx-toolbar .reset {
    width: 40px;
  }
  .cx-toolbar .speed {
    margin-left: 0;
  }
  .cx-work-row {
    grid-template-columns: minmax(0, 1fr) 18px 96px;
  }
  .cx-lab {
    padding-inline: 9px;
  }
  .cx-board {
    padding-inline: 10px;
  }
  .cx-output {
    padding: 9px;
  }
  .cx-output p {
    font-size: 11px;
  }
  .cx-model-top strong {
    font-size: 12px;
  }
  .cx-chapters {
    padding-inline: 11px;
    font-size: 8px;
  }
}
@supports (overflow: clip) {
  @media (max-width: 900px) {
    .cx-exhibit {
      overflow: clip;
    }
    .cx-toolbar {
      position: sticky;
      top: 0;
      z-index: 6;
      box-shadow: 0 5px 18px #032c2610;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .cx-exhibit * {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  .cx-toolbar,
  .cx-circuit {
    display: none;
  }
  .cx-layout {
    display: block;
  }
  .cx-chat-log {
    height: auto;
  }
  .cx-board {
    break-inside: avoid;
  }
  .cx-tape {
    min-width: 0;
  }
}
