.live-experiment-page {
  --paper: #f7f3e8;
  --paper-deep: #eee7d7;
  --ink-live: #11100e;
  --muted-live: #726e64;
  --rule-live: #bdb5a5;
  --rule-soft: #d8d0bf;
  --lemon-live: #f2c746;
  --touch-target: 44px;
  color: var(--ink-live);
  background:
    radial-gradient(circle at 20% 15%, rgb(255 255 255 / 0.72), transparent 28rem),
    var(--paper);
}

.live-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.live-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--rule-soft);
}

.live-sidebar__button {
  display: inline-flex;
}

.live-sidebar__note {
  display: grid;
  margin-top: auto;
  gap: 12px;
  color: #3e3b35;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.live-sidebar__note p {
  margin: 0;
}

.live-mascot {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: grayscale(0.15) contrast(1.08);
}

.live-content {
  width: 100%;
  margin-left: 0;
  padding: 22px;
}

.experiment-canvas {
  display: grid;
  min-height: calc(100vh - 44px);
  padding: 28px 34px 0;
  border: 1px solid var(--rule-live);
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.018) 1px, transparent 1px),
    linear-gradient(0deg, rgb(0 0 0 / 0.014) 1px, transparent 1px),
    #fbf8ef;
  background-size: 22px 22px;
  grid-template-rows: 1fr auto auto;
  gap: 18px;
}

.experiment-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(min(100%, 320px), 0.78fr);
  align-items: start;
  gap: clamp(24px, 5vw, 86px);
}

.experiment-kicker,
.metadata-strip,
.panel-head,
.ledger-card,
.build-log-list,
.involved-list,
.experiment-status-strip {
  font-family: "Courier New", Courier, monospace;
}

.experiment-kicker {
  margin: 0 0 30px;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--rule-live);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(68px, 9.4vw, 100px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  text-transform: uppercase;
}

.experiment-subhead {
  width: max-content;
  max-width: 100%;
  margin: 22px 0 0;
  padding-bottom: 10px;
  background: linear-gradient(var(--lemon-live), var(--lemon-live)) 0 100% / 64px 5px no-repeat;
  font-family: "Courier New", Courier, monospace;
  font-size: 24px;
  font-weight: 700;
}

.experiment-intro {
  max-width: 660px;
  margin: 20px 0 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.55;
}

.experiment-actions {
  display: flex;
  margin-top: 22px;
  gap: 24px;
  flex-wrap: wrap;
}

.experiment-button,
.panel-button {
  display: inline-flex;
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid var(--ink-live);
  color: var(--ink-live);
  background: #fbf8ef;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.experiment-button:hover,
.panel-button:hover {
  background: var(--paper-deep);
}

.metadata-strip {
  margin: 22px 0 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.metadata-strip span::before,
.metadata-strip span::after {
  content: " · ";
  padding-inline: 10px;
}

.metadata-strip mark {
  color: inherit;
  background: linear-gradient(var(--lemon-live), var(--lemon-live)) 0 88% / 100% 5px no-repeat;
}

.ledger-card {
  position: relative;
  overflow: hidden;
  margin-top: 52px;
  border: 1px solid var(--rule-live);
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgb(0 0 0 / 0.025) 1px, transparent 1px),
    #f5efe2;
  background-size: 18px 18px;
  box-shadow: 0 3px 8px rgb(0 0 0 / 0.09);
}

.ledger-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 30% 12%, rgb(255 255 255 / 0.58), transparent 20rem);
  content: "";
}

.ledger-paperclip {
  position: absolute;
  top: -10px;
  right: 22px;
  z-index: 1;
  width: 18px;
  height: 70px;
  border: 3px solid #777268;
  border-left-color: transparent;
  border-radius: 14px;
  opacity: 0.7;
  transform: rotate(-12deg);
}

.ledger-head,
.ledger-list,
.ledger-foot {
  position: relative;
}

.ledger-head {
  display: flex;
  min-height: 58px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--rule-live);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ledger-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.1;
  text-transform: uppercase;
}

.ledger-head span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.ledger-list {
  margin: 0;
}

.ledger-list div {
  display: grid;
  min-height: 49px;
  border-bottom: 1px dashed var(--rule-soft);
  grid-template-columns: minmax(0, 1fr) 42%;
}

.ledger-list dt,
.ledger-list dd {
  display: flex;
  margin: 0;
  padding: 12px 12px;
  align-items: center;
  font-weight: 700;
}

.ledger-list dt {
  text-transform: uppercase;
}

.ledger-list dd {
  border-left: 1px solid var(--rule-live);
  justify-content: flex-end;
  font-size: 18px;
}

.ledger-list .ledger-status {
  color: #b88712;
  font-size: 15px;
  text-transform: uppercase;
}

.ledger-foot {
  display: grid;
  border-top: 1px solid var(--rule-live);
  grid-template-columns: 1fr 120px 1fr;
}

.ledger-foot>* {
  display: grid;
  min-height: 68px;
  margin: 0;
  padding: 12px;
  align-content: center;
  text-align: center;
}

.ledger-foot p {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
}

.ledger-foot strong {
  border-inline: 1px solid var(--rule-live);
  font-size: 11px;
  text-transform: uppercase;
}

.experiment-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr 1fr;
  gap: 14px;
}

.experiment-panel {
  display: grid;
  min-height: 292px;
  padding: 16px;
  border: 1px solid var(--rule-live);
  background: rgb(251 248 239 / 0.74);
  align-content: stretch;
  gap: 14px;
}

.build-log-panel,
.current-bet-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.involved-panel {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.panel-head {
  display: flex;
  min-height: 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-soft);
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2,
.panel-head p {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.panel-head span {
  color: var(--muted-live);
  font-size: 11px;
}

.build-log-list,
.involved-list {
  display: grid;
  padding: 0;
  margin: 0;
  list-style: none;
}

.build-log-list li {
  display: grid;
  min-height: 58px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--rule-soft);
  grid-template-columns: 72px minmax(0, 1fr) 54px;
  align-items: baseline;
  gap: 12px;
}

.entry-number {
  color: #c99b14;
  font-size: 26px;
  font-weight: 400;
}

.build-log-list h3,
.involved-list h3 {
  margin: 0 0 5px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.build-log-list p,
.involved-list p,
.current-bet-panel p,
.panel-note {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.build-log-list time {
  font-size: 18px;
  font-weight: 700;
  text-align: right;
  text-transform: uppercase;
}

.panel-button {
  width: 100%;
  margin-top: 0;
  min-height: var(--touch-target);
  padding: 8px 12px;
  align-self: end;
}

.panel-button--yellow {
  background: #ffd564;
}

.panel-button--yellow:hover {
  background: #f0c34b;
}

.current-bet-panel {
  position: relative;
  overflow: hidden;
}

.current-bet-panel::after {
  position: absolute;
  right: -90px;
  bottom: 24px;
  width: 400px;
  aspect-ratio: 760 / 507;
  background: var(--current-bet-art, url("/images/cloud-flip-computer-fire-ink.webp")) center / contain no-repeat;
  content: "";
  opacity: 0.65;
  mix-blend-mode: normal;
  pointer-events: none;
}

.current-bet-panel>* {
  position: relative;
  z-index: 1;
}

.current-bet-panel p {
  max-width: min(330px, calc(100% - 190px));
}

.current-bet-layout {
  display: grid;
  min-height: 172px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.current-bet-layout h3 {
  margin: 10px 0;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 0.98;
  text-transform: uppercase;
}

.involved-list li {
  display: grid;
  min-height: 58px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--rule-soft);
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
}

.involved-list>li>span {
  text-align: center;
}

.involved-icon {
  display: grid;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  place-items: center;
}

.involved-icon svg {
  display: block;
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--ink-live);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.involved-icon--clipboard svg {
  transform: rotate(-2deg);
}

.involved-icon--vote svg {
  transform: rotate(1deg);
}

.involved-icon--eye svg {
  width: 35px;
}

.involved-list a {
  font-size: 20px;
  font-weight: 700;
  text-align: right;
}

.panel-note {
  text-transform: uppercase;
}

.experiment-status-strip {
  display: grid;
  min-height: 42px;
  margin: 0 -34px;
  padding: 10px 22px;
  border-top: 1px solid var(--rule-live);
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 0.7fr);
  align-items: center;
  gap: 18px;
  color: var(--muted-live);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.experiment-status-strip span:nth-child(2) {
  text-align: center;
}

.experiment-status-strip span:last-child {
  text-align: right;
}

.experiment-status-strip strong {
  color: #b88712;
}

@media (max-width: 1180px) {

  .experiment-hero,
  .experiment-grid {
    grid-template-columns: 1fr;
  }

  .ledger-card {
    margin-top: 0;
  }

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

  .build-log-panel {
    grid-column: 1 / -1;
  }

  .current-bet-panel::after {
    right: 22px;
    width: clamp(210px, 32%, 290px);
  }

  .current-bet-panel p {
    max-width: min(360px, calc(100% - 220px));
  }
}

@media (max-width: 980px) {
  .current-bet-panel::after {
    right: 14px;
    bottom: 52px;
    width: clamp(190px, 30%, 240px);
    opacity: 0.72;
  }

  .current-bet-panel p {
    max-width: min(330px, calc(100% - 185px));
  }
}

@media (max-width: 820px) {
  .live-shell {
    display: block;
  }

  .live-sidebar {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 14px 12px 0;
    border-right: 0;
  }

  .live-sidebar .sidebar__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
  }

  .live-sidebar .brand {
    width: 142px;
  }

  .live-sidebar__note,
  .live-sidebar__button {
    display: none;
  }

  .live-content {
    padding: 10px 8px 36px;
  }

  .experiment-canvas {
    min-height: 0;
    padding: 18px 16px 0;
  }

  .experiment-kicker {
    margin-bottom: 22px;
  }

  .hero-copy h1 {
    font-size: clamp(48px, 15vw, 82px);
  }

  .experiment-actions,
  .experiment-button {
    width: 100%;
  }

  .experiment-actions {
    gap: 10px;
  }

  .metadata-strip {
    display: grid;
    gap: 5px;
  }

  .metadata-strip span::before,
  .metadata-strip span::after {
    display: none;
  }

  .experiment-grid,
  .current-bet-layout {
    grid-template-columns: 1fr;
  }

  .current-bet-layout {
    min-height: 168px;
    gap: 0;
  }

  .current-bet-panel::after {
    right: 10px;
    bottom: 52px;
    width: clamp(150px, 36vw, 210px);
    opacity: 0.42;
  }

  .current-bet-panel p {
    max-width: min(320px, calc(100% - 150px));
  }

  .experiment-status-strip {
    margin: 0 -16px;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .experiment-status-strip span,
  .experiment-status-strip span:nth-child(2),
  .experiment-status-strip span:last-child {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .live-sidebar__link {
    display: none;
  }

  .experiment-canvas {
    padding: 14px 12px 0;
  }

  .experiment-intro {
    font-size: 18px;
  }

  .hero-copy h1 {
    letter-spacing: -0.025em;
  }

  .current-bet-layout {
    min-height: 220px;
  }

  .current-bet-panel::after {
    right: 50%;
    bottom: 46px;
    width: min(76vw, 250px);
    opacity: 0.22;
    transform: translateX(50%);
  }

  .current-bet-panel p {
    max-width: none;
  }

  .ledger-head,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ledger-list div {
    grid-template-columns: 1fr;
  }

  .ledger-list dd {
    border-left: 0;
    border-top: 1px dashed var(--rule-soft);
    justify-content: flex-start;
  }

  .ledger-foot {
    grid-template-columns: 1fr;
  }

  .ledger-foot strong {
    border-block: 1px solid var(--rule-live);
    border-inline: 0;
  }

  .build-log-list li {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .build-log-list time {
    text-align: left;
  }

  .experiment-status-strip {
    margin-inline: -12px;
  }

}

@media (max-width: 700px) {
  .live-sidebar {
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    padding: 10px 12px 0;
  }

  .live-sidebar .sidebar__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--touch-target);
    align-items: center;
    justify-content: stretch;
    gap: 8px;
  }

  .live-sidebar .brand {
    width: 138px;
    max-width: 58vw;
  }

  .live-sidebar .category-nav,
  .live-sidebar .junk-drawer-module {
    display: none;
  }

  .live-sidebar.is-mobile-compact {
    padding: 6px 10px;
  }

  .live-sidebar.is-mobile-compact .brand {
    width: 112px;
    max-width: 34vw;
  }
}
