/* ============================================================
                 Acpus — Paper Relay A tactile paper-cut brand surface wrapped around one durable workflow simulation. Color and silhouette both communicate state.
   ============================================================ */

:root {
  color-scheme: light;

  --paper: #fbf6eb;
    --paper-raised: #fff9ef;
    --paper-edge: #e7e0d3;
    --ink: #2d2f2f;
    --shadow: #1b1e1f;
    --blue: #0a46d4;
    --orange: #ffa012;
    /* --orange: #fa7408; */
    --red: #e64107;
    --blue-text: #0737a7;
    --orange-text: #943800;
    --muted: #625f58;
    --blue-light: #a9c0ff;
    --check-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.2 6.3 11.3 13 4.5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E");
    --check-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.2 6.3 11.3 13 4.5' fill='none' stroke='%23252828' stroke-width='2.4' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E");

  --st-run: var(--orange);
    --st-ok: var(--blue);
    --st-fail: var(--red);
    --st-await: var(--orange);
    --st-idle: #77736b;

    --sans: "Outfit", "Avenir Next", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    --tracking-display: -0.012em;

    --col: 1180px;
    --wide: 1440px;
    --topbar-height: 74px;
    --page-height: calc(100svh - var(--topbar-height));
    --hero-top-space: clamp(20px, 3.5vw, 48px);
    --space-cluster: clamp(12px, 1.2vw, 18px);
    --space-block: clamp(28px, 3vw, 44px);
    --space-section: clamp(76px, 8vw, 116px);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-stage: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-press: cubic-bezier(0.2, 0.8, 0.2, 1);
    /* One physical light source, three material levels. */
    --elevation-micro-x: 3px;
    --elevation-micro-y: 5px;
    --elevation-medium-x: 7px;
    --elevation-medium-y: 9px;
    --elevation-plate-x: clamp(8px, 0.65vw, 11px);
    --elevation-plate-y: clamp(11px, 1vw, 17px);
    --shadow-micro: var(--elevation-micro-x) var(--elevation-micro-y) 0 var(--shadow);
    --shadow-micro-raised: 4px 6px 0 var(--shadow);
    --shadow-medium: var(--elevation-medium-x) var(--elevation-medium-y) 0 var(--shadow);
    --shadow-plate: var(--elevation-plate-x) var(--elevation-plate-y) 0 var(--shadow);
  
    /* Colored offsets are paper underlays, never cast shadows or status lights. */
    --underlay-x: clamp(4px, 0.35vw, 6px);
    --underlay-y: clamp(6px, 0.55vw, 9px);
    --underlay-durable: var(--blue);
  
    --z-sticky: 30;
    --z-popover: 40;
    --z-skip: 60;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  display: none;
}
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--topbar-height);
}

body {
  min-width: 320px;
    background-color: var(--paper);
    background-image:
      radial-gradient(circle at 11px 9px, rgb(37 40 40 / 5%) 0 0.65px, transparent 0.75px),
      radial-gradient(circle at 29px 23px, rgb(255 255 255 / 62%) 0 0.7px, transparent 0.8px);
    background-size: 43px 37px, 47px 41px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
    font-weight: 520;
    line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  overflow: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

code,
pre,
.term {
  letter-spacing: 0;
  word-spacing: 0;
}
code {
  border-radius: 2px;
    background: rgb(37 40 40 / 9%);
    padding: 0.08em 0.32em;
  font-family: var(--mono);
  font-size: 0.83em;
}

a {
  color: var(--blue-text);
    text-decoration-color: currentColor;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
    transition: color 160ms ease;
}

a:hover {
  color: var(--orange-text);
}

:focus-visible {
  outline: 4px solid var(--blue);
    outline-offset: 4px;
}

.skip-link {
  position: fixed;
    z-index: var(--z-skip);
    top: -72px;
    left: 18px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 15px;
    font-family: var(--mono);
    font-size: 12px;
    text-decoration: none;
    box-shadow: var(--shadow-micro);
    transition: top 180ms var(--ease-out);
}

.skip-link:focus {
  top: 16px;
}

/* ---------------- navigation ---------------- */

.topbar {
  position: sticky;
    z-index: var(--z-sticky);
    top: 0;
    width: 100%;
    border-bottom: 2px solid var(--ink);
    background: var(--paper);
  }

  .topbar-inner {
    width: min(var(--col), calc(100% - 40px));
    min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  flex: none;
    color: var(--ink);
  text-decoration: none;
}

.brand-lockup {
  width: 132px;
  height: auto;
}

.topnav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 30px);
    font-size: 13px;
    font-weight: 850;
}

.topnav a {
  color: var(--ink);
  text-decoration: none;
}

.topnav a:hover {
  color: var(--blue-text);
}

.topnav-gh {
  border: 2px solid var(--ink);
    background: var(--orange);
    padding: 8px 14px;
    box-shadow: var(--shadow-micro);
    transition: transform 140ms var(--ease-press), box-shadow 140ms var(--ease-press);
}

.topnav-gh:hover {
  color: var(--ink) !important;
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-micro-raised);
  }
  
  .topnav-gh:active {
    transform: translate(var(--elevation-micro-x), var(--elevation-micro-y));
    box-shadow: none;
}

/* ---------------- hero ---------------- */

.hero {
  padding: 0;
  }

  .hero-art-shell,
  .workbench-page,
  .movement,
  .coda {
    min-height: var(--page-height);
  }
  
  .hero-art-shell {
    position: relative;
    width: min(1480px, calc(100% - 28px));
    margin: 0 auto;
    padding: var(--hero-top-space) 0 clamp(24px, 5svh, 64px);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: var(--space-cluster);
    }
    
    .hero-art {
      display: block;
      width: 100%;
      height: auto;
      transform-origin: center;
    }

    .hero-art.is-entering {
      animation: hero-art-land 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    @keyframes hero-art-land {
      from {
        transform: translateY(-22px) rotate(-0.35deg) scale(0.98);
      }
    }

    .hero-tagline {
      position: absolute;
      inset-inline: 4%;
      bottom: 15%;
      color: var(--ink);
      font-size: clamp(20px, 5.5vw, 88px);
      font-weight: 900;
      letter-spacing: var(--tracking-display);
      line-height: 1;
      text-align: center;
      white-space: nowrap;
      pointer-events: none;
    }

    .hero-tagline.is-waiting {
      opacity: 0;
    }

    .hero-tagline-track {
      display: inline-block;
      text-align: left;
    }

                                                                .hero-tagline-track>span {
                                                                  display: inline-block;
                                                                  transform-origin: center bottom;
                                                                }
    .hero-tagline-from {
      color: var(--blue);
    }

    .hero-tagline-verb {
      color: var(--ink);
    }

    .hero-tagline-to {
      color: #e86200;
    }

                                                                .hero-tagline.is-entering .hero-tagline-from {
                                                                  animation: hero-word-left 520ms var(--ease-out) both;
    }

                                                                .hero-tagline.is-entering .hero-tagline-verb {
                                                                  animation: hero-word-stamp 520ms var(--ease-out) 90ms both;
                                                                }
                                
                                                                .hero-tagline.is-entering .hero-tagline-to {
                                                                  animation: hero-word-right 520ms var(--ease-out) 180ms both;
    }

    .hero-tagline-measure {
      position: absolute;
      visibility: hidden;
    }

                                                                @keyframes hero-word-left {
                                                                  0% {
                                                                    opacity: 0;
                                                                    transform: translate(-22px, -14px) rotate(-2.2deg) scale(0.94);
                                                                  }
                                
                                                                  82% {
                                                                    opacity: 1;
                                                                    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
                                                                  }
                                
                                                                  100% {
                                                                    opacity: 1;
                                                                    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
                                                                  }
                                                                }
                                
                                                                @keyframes hero-word-stamp {
                                                                  0% {
                                                                    opacity: 0;
                                                                    transform: translateY(18px) rotate(0.4deg) scale(0.92, 0.86);
                                                                  }
                                
                                                                  82% {
                                                                    opacity: 1;
                                                                    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
                                                                  }
                                
                                                                  100% {
                                                                    opacity: 1;
                                                                    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
                                                                  }
                                                                }
                                
                                                                @keyframes hero-word-right {
                                                                  0% {
                                                                    opacity: 0;
                                                                    transform: translate(22px, -12px) rotate(2.2deg) scale(0.94);
                                                                  }
                                
                                                                  82% {
                                                                    opacity: 1;
                                                                    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
                                                                  }
                                
                                                                  100% {
                                                                    opacity: 1;
                                                                    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
                                                                  }
    }

        .workbench-page {
          position: relative;
          width: 100%;
          display: grid;
          overflow: clip;
        }
    
        .workbench-page>.hero-intro,
        .workbench-page>.instrument {
          grid-area: 1 / 1;
        }
    .hero-ribbon {
      display: block;
      width: min(36%, 560px);
      height: auto;
    }
    
    .hero-intro {
      width: min(var(--col), calc(100% - 40px));
      margin: 0 auto;
        padding: var(--space-section) 0;
      display: grid;
      grid-template-columns: minmax(0, 0.82fr) minmax(520px, 1.18fr);
      align-items: center;
      gap: clamp(36px, 6vw, 84px);
      opacity: 1;
        transform: translateY(0);
        visibility: visible;
        transition:
          opacity 320ms var(--ease-stage) 120ms,
          transform 380ms var(--ease-stage) 120ms,
          visibility 0s linear 0s;
      }

      .workbench-page.is-stage-active>.hero-intro {
        opacity: 0;
        transform: translateY(-16px);
        visibility: hidden;
        pointer-events: none;
        transition:
          opacity 220ms var(--ease-stage),
          transform 260ms var(--ease-stage),
          visibility 0s linear 260ms;
    }
    
    .hero-copy {
      max-width: 520px;
}

.eyebrow {
  max-width: 36ch;
    color: var(--blue-text);
  font-family: var(--mono);
  font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.11em;
    line-height: 1.55;
  text-transform: uppercase;
}

.thesis {
  margin-top: 20px;
  font-size: clamp(44px, 5vw, 74px);
  font-weight: 950;
  letter-spacing: var(--tracking-display);
  line-height: 0.98;
  text-wrap: balance;
}

.thesis-sub {
  margin-top: 28px;
  display: grid;
  gap: 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.thesis-sub span {
  display: flex;
  align-items: center;
  gap: 11px;
}

.thesis-sub span::before {
  content: "";
  width: 8px;
    height: 8px;
  flex: none;
  background: var(--blue);
  opacity: 0.58;
}

.thesis-sub code {
  color: var(--ink);
}

.plate-deep {
  background: transparent;
}

.task-card {
  position: relative;
  padding: clamp(28px, 4vw, 46px);
    border: 1px solid var(--paper-edge);
    background: var(--paper-raised);
    box-shadow: var(--shadow-medium);
}

.task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.task-label {
  color: var(--blue-text);
  font-family: var(--mono);
  font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-corner {
  color: var(--blue);
    font-size: 18px;
    line-height: 1;
}

.task-text {
  max-width: 52ch;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 25px);
    font-weight: 780;
    letter-spacing: 0;
    line-height: 1.4;
    text-wrap: pretty;
}

.task-foot {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.task-hint {
  max-width: 35ch;
  display: grid;
  justify-items: start;
  gap: 9px;
  color: var(--muted);
}

.task-hint-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: var(--paper-raised);
  padding: 4px 8px 3px;
  box-shadow: 2px 3px 0 var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
  transform: rotate(-1deg);
  transform-origin: left center;
}

.task-hint-copy {
  font-size: 13px;
  font-weight: 620;
  line-height: 1.4;
  text-wrap: pretty;
}

.task-hint-copy code {
  color: var(--ink);
  font-weight: 600;
}

.btn {
  border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--orange);
    color: var(--ink);
    padding: 11px 20px;
    box-shadow: var(--shadow-micro);
  cursor: pointer;
  font-weight: 900;
    text-decoration: none;
    transition: transform 140ms var(--ease-press), box-shadow 140ms var(--ease-press), background 140ms ease;
}

.btn:hover {
    color: var(--ink);
      transform: translate(-1px, -1px);
      box-shadow: var(--shadow-micro-raised);
}

.btn-delegate {
  flex: none;
  white-space: nowrap;
}

.delegate-arrow {
  display: inline-block;
  margin-left: 3px;
  transition: transform 180ms var(--ease-out);
}

.btn-delegate:hover .delegate-arrow,
.btn-delegate:focus-visible .delegate-arrow {
  transform: translateX(4px);
}

.task-card.is-inviting .task-hint-kicker {
  animation: task-kicker-in 420ms var(--ease-out) both;
}

.task-card.is-inviting .btn-delegate {
  animation: delegate-invite 540ms var(--ease-out) 220ms both;
}

.task-card.is-inviting .delegate-arrow {
  animation: delegate-arrow-invite 420ms var(--ease-out) 330ms both;
}

.task-card.is-reminding .btn-delegate {
  animation: delegate-reminder 380ms var(--ease-out) both;
}

.task-card.is-reminding .delegate-arrow {
  animation: delegate-arrow-invite 320ms var(--ease-out) 70ms both;
}

.task-card.has-delegated .task-hint-kicker {
  background: var(--ink);
  box-shadow: none;
  transform: none;
}

@keyframes task-kicker-in {
  0% {
    opacity: 0.65;
    transform: translate3d(-12px, 3px, 0) rotate(-3deg);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }
}

@keyframes delegate-invite {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
    box-shadow: var(--shadow-micro);
  }
  48% {
    transform: translate3d(-2px, -3px, 0);
    box-shadow: 5px 8px 0 var(--shadow);
  }
}

@keyframes delegate-reminder {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
    box-shadow: var(--shadow-micro);
  }
  52% {
    transform: translate3d(-1px, -2px, 0);
    box-shadow: var(--shadow-micro-raised);
  }
}

@keyframes delegate-arrow-invite {
  0%,
  100% {
    transform: translateX(0);
  }
  55% {
    transform: translateX(5px);
  }
}

.btn:active {
  transform: translate(var(--elevation-micro-x), var(--elevation-micro-y));
  box-shadow: none;
}

.btn[disabled] {
  cursor: default;
  opacity: 0.58;
    transform: translate(var(--elevation-micro-x), var(--elevation-micro-y));
  box-shadow: none;
}

/* ---------------- interactive instrument ---------------- */

.instrument {
  position: relative;
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(14px, 2svh, 22px) 20px;
    display: flex;
    flex-direction: column;
    justify-content: safe center;
    opacity: 0;
    clip-path: inset(8% 0 0);
    transform: translateY(24px);
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 220ms var(--ease-stage),
      transform 260ms var(--ease-stage),
      clip-path 260ms var(--ease-stage),
      visibility 0s linear 260ms;
}

.workbench-page.is-stage-active>.instrument {
  opacity: 1;
  clip-path: inset(0);
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 340ms var(--ease-stage) 140ms,
    transform 440ms var(--ease-stage) 140ms,
    clip-path 440ms var(--ease-stage) 140ms,
    visibility 0s linear 0s;
}

.stage-meta {
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  transition: opacity 160ms ease, transform 200ms var(--ease-out);
  }

  .workbench-page.is-complete .stage-shell {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
}

.stage-tag {
  max-width: 66ch;
    color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
    letter-spacing: 0.05em;
}

.stage-live {
  display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
    text-align: right;
}

.stage-live::before {
  content: "■";
  color: var(--st-idle);
  font-size: 11px;
}

.stage-live.is-running::before {
  content: "●";
  color: var(--st-run);
}

.stage-live.is-paused::before {
  content: "Ⅱ";
  color: var(--blue);
  font-weight: 900;
}

.stage-live.is-awaiting::before {
  content: "◆";
  color: var(--st-await);
}

.stage-live.is-done::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: none;
  background: var(--blue) var(--check-light) center / 13px 13px no-repeat;
}

.stage-meta-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.ctl.stage-task-btn {
  flex: none;
  border-color: var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.ctl.stage-task-btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.stage-shell {
  position: relative;
  isolation: isolate;
  transition: opacity 160ms ease, transform 200ms var(--ease-out);
}


.stage {
  position: relative;
  z-index: 1;
    height: clamp(600px, calc(var(--page-height) - 76px), 800px);
    border: 3px solid var(--ink);
    background: var(--ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stage-head {
  min-height: 54px;
    padding: 8px 14px;
    border-bottom: 2px solid rgb(251 246 235 / 20%);
    background: var(--ink);
    color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
}

.filetab {
  border: 1px solid transparent;
    background: transparent;
    color: var(--paper);
    padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  transition: border-color 150ms ease, background 150ms ease;
}

.filetab:hover {
  border-color: rgb(251 246 235 / 55%);
    background: rgb(251 246 235 / 8%);
}

.filetab-arrow {
  color: var(--orange);
    display: inline-block;
  transition: transform 200ms var(--ease-out);
}

.filetab[aria-expanded="true"] .filetab-arrow {
  transform: rotate(90deg);
}

.filetab-name {
  font-weight: 600;
}

.filetab-meta {
  color: rgb(251 246 235 / 66%);
    font-size: 10.5px;
}

.stage-authoring {
  color: var(--orange);
    font-size: 11px;
    font-weight: 600;
}

.stage-authoring::before {
  content: "●";
  margin-right: 8px;
}

.stage-controls {
  display: flex;
  gap: 8px;
}

.ctl {
  border: 1px solid rgb(251 246 235 / 45%);
    border-radius: 0;
    background: transparent;
    color: var(--paper);
    padding: 6px 10px;
    cursor: pointer;
  font-family: var(--mono);
  font-size: 10.5px;
    font-weight: 600;
    transition: background 140ms ease, color 140ms ease, transform 100ms ease;
}

.ctl:hover {
  background: var(--paper);
    color: var(--ink);
}

.ctl:active {
  transform: translateY(2px);
}

.stage-body {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--paper-raised);
  display: flex;
}

.stage-idle {
  width: 100%;
    min-height: 100%;
    background: var(--paper-raised);
    color: var(--ink);
    display: grid;
    place-items: center;
    padding: 24px;
  text-align: center;
  font-size: clamp(17px, 2vw, 22px);
    font-weight: 850;
}

.stage-idle p::before {
  content: "■";
  margin-right: 12px;
  color: var(--orange);
}

.code {
  --code-gutter-x: 22px;
    --code-highlight: rgb(178 126 82 / 22%);
  flex: none;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 20px var(--code-gutter-x);
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--paper-raised);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.58;
  tab-size: 2;
  transition: width 500ms var(--ease-out), padding 500ms var(--ease-out), opacity 320ms ease;
}

.stage-body.is-split .code {
  width: 42%;
  border-right: 2px solid var(--ink);
}

.stage-body.is-graph-full .code {
  width: 0;
  padding-inline: 0;
  opacity: 0;
  pointer-events: none;
}

.code .cl {
  display: block;
  min-height: 1.58em;
  white-space: pre;
  transition: opacity 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.code .cl.is-pending {
  display: none;
}

.code .cl.is-fresh {
  animation: lineIn 220ms var(--ease-out);
}

.code .cl.is-dim {
  opacity: 0.3;
}

.code .cl.is-lit {
  background: var(--code-highlight);
    box-shadow:
      calc(-1 * var(--code-gutter-x)) 0 0 var(--code-highlight),
      var(--code-gutter-x) 0 0 var(--code-highlight);
    color: var(--ink);
}

.code .cl.is-lit::before {
  content: "●";
  display: inline-block;
  width: 14px;
    margin-left: -16px;
    color: var(--orange);
    font-size: 8px;
    vertical-align: middle;
  }

  .code .cl .caret {
  width: 7px;
  height: 1.05em;
  background: var(--orange);
    display: inline-block;
  vertical-align: text-bottom;
  animation: blink 0.85s steps(1) infinite;
}

@keyframes lineIn {
  from {
    opacity: 0;
    transform: translateX(-7px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes blink {
  50% { opacity: 0; }
}

.tok-k {
  color: var(--blue-text);
  font-weight: 600;
}

.tok-s {
  color: var(--orange-text);
}

.tok-t {
  color: #584199;
}

.tok-n {
  color: #a42d0a;
}

.tok-c {
  color: var(--muted);
}

.tok-g {
  color: var(--orange-text);
}
.stage-body .code.as-overlay {
  position: absolute;
  z-index: 20;
  inset: 0;
  width: auto;
  padding: 20px 22px;
    background: var(--paper-raised);
  opacity: 1;
  pointer-events: auto;
}

.graph-col {
  position: relative;
  flex: none;
  width: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
  transition: width 500ms var(--ease-out);
}

.stage-body.is-split .graph-col {
  width: 58%;
}

.stage-body.is-graph-full .graph-col {
  width: 100%;
}

.graph-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.graph-viewport.can-pan {
  overflow-x: auto;
  justify-content: flex-start;
}

.graph-zoom {
  flex: none;
  overflow: hidden;
  transition: width 500ms var(--ease-out), height 500ms var(--ease-out);
}

.graph {
  position: relative;
  width: 940px;
  height: 400px;
  transform-origin: 0 0;
  transition: transform 500ms var(--ease-out);
}

.graph svg.edges {
  position: absolute;
  inset: 0;
  width: 940px;
  height: 400px;
  pointer-events: none;
}

.edge {
  fill: none;
  stroke: var(--blue);
    stroke-width: 3;
    opacity: 0.44;
    transition: opacity 260ms ease;
}

.edge.is-live {
  stroke: var(--orange);
    opacity: 1;
}

.edge.is-signal {
  stroke: var(--orange);
    stroke-dasharray: 7 6;
    opacity: 0.78;
}

.edge.is-signal.is-calling {
  opacity: 1;
  animation: march 0.9s linear infinite;
}

.edge.draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawEdge 650ms var(--ease-out) forwards;
}

.token {
  fill: var(--orange);
  stroke: var(--ink);
  stroke-width: 2;
  rx: 4px;
}

@keyframes march {
  to {
    stroke-dashoffset: -26;
  }
}

@keyframes drawEdge {
  to {
    stroke-dashoffset: 0;
  }
}
.node {
  position: absolute;
  overflow: hidden;
    border: 2px solid var(--ink);
    background: var(--paper-raised);
  padding: 7px 10px 9px;
  box-shadow: none;
    color: var(--ink);
  font-family: var(--mono);
  transition:
      border-color 220ms ease,
      background 220ms ease,
      box-shadow 220ms ease,
      top 350ms var(--ease-out),
      height 350ms var(--ease-out);
}

.node .n-id {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
  white-space: nowrap;
}

.node .n-id>span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.node .n-agent {
  margin-top: 3px;
  color: var(--muted);
    font-size: 9.5px;
  white-space: nowrap;
}

.node .n-state {
  margin-top: 3px;
    color: var(--st-idle);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dot {
  position: relative;
    width: 11px;
    height: 11px;
  flex: none;
  border-radius: 0;
    background: var(--blue);
    transition: background 220ms ease, clip-path 220ms ease, border-radius 220ms ease;
}

.node.is-running {
  border-color: var(--orange);
    box-shadow: var(--shadow-micro);
}

.node.is-running .dot,
.fitem.is-running .dot {
  border-radius: 50%;
  background: var(--orange);
  animation: pulse 1.05s ease-in-out infinite;
}

.node.is-running .n-state {
  color: var(--orange-text);
}

.node.is-complete {
  border-color: var(--blue);
}

.node.is-complete .dot,
.fitem.is-complete .dot {
  background: var(--blue) var(--check-light) center / 9px 9px no-repeat;
}

.node.is-complete .n-state {
  color: var(--blue-text);
}

.node.is-failed,
.fitem.is-failed {
  border-color: var(--red);
}

.node.is-failed {
  box-shadow: none;
}

.node.is-failed .dot,
.fitem.is-failed .dot {
  background: var(--red);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.node.is-failed .n-state {
  color: #a32908;
}

.node.is-awaiting {
  border-color: var(--orange);
    box-shadow: var(--shadow-micro);
}

.node.is-awaiting .dot {
  border-radius: 50%;
  background: var(--orange);
  animation: pulse 1.3s ease-in-out infinite;
}

.node.is-awaiting .n-state {
  color: var(--orange-text);
}

@keyframes pulse {
  0%,
    100% {
      transform: scale(1);
      opacity: 1;
    }

                50% {
                  transform: scale(0.62);
                  opacity: 0.62;
                }
                }
        
                .stage.is-paused .dot,
.stage.is-paused .edge.is-signal {
  animation-play-state: paused;
}

.fanout {
  border: 2px dashed var(--blue);
    background: rgb(255 249 239 / 86%);
  padding: 6px 10px 10px;
  box-shadow: none;
    transition: border-color 260ms ease, top 350ms var(--ease-out), height 350ms var(--ease-out);
}

.fanout .f-head {
  height: 24px;
    padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  white-space: nowrap;
}

.fanout .f-side {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.fanout .f-side .n-state {
  margin-top: 0;
}

.fanout-items {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fitem {
  height: 32px;
  border: 1px solid var(--ink);
    background: var(--paper-raised);
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
    font-family: var(--mono);
    font-size: 10px;
  opacity: 0;
  transform: translateY(6px);
  white-space: nowrap;
    transition: opacity 260ms ease, transform 260ms var(--ease-out), border-color 220ms ease;
}

.fitem.is-in {
  opacity: 1;
  transform: none;
}

.fitem .f-meta {
  margin-left: auto;
  color: var(--muted);
    font-size: 8.5px;
}

.fitem .f-agent {
  border: 1px solid var(--paper-edge);
    padding: 1px 5px;
    color: var(--muted);
    font-size: 8.5px;
}

.fitem.is-running {
  border-color: var(--orange);
}

.fitem.is-complete {
  border-color: var(--blue);
}

.fitem.is-queued .dot {
  background: var(--st-idle);
}
.retry-key {
  position: absolute;
  z-index: 6;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--red);
    color: white;
    padding: 6px 10px;
    box-shadow: var(--shadow-micro);
    cursor: pointer;
  font-family: var(--mono);
  font-size: 9.5px;
    font-weight: 600;
    animation: retryNudge 1.1s ease-in-out infinite;
    transition: transform 100ms ease, box-shadow 100ms ease;
}

.retry-key:hover {
  background: #ff5427;
}

.retry-key:active {
  transform: translate(var(--elevation-micro-x), var(--elevation-micro-y));
  box-shadow: none;
}

@keyframes retryNudge {

  0%,
  100% {
    translate: 0 0;
  }

        50% {
          translate: 0 -3px;
        }
        }

.graph-hint {
  position: absolute;
  z-index: 5;
  bottom: 10px;
  left: 14px;
    color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
    font-weight: 600;
}

.artifact-tray {
  position: absolute;
  z-index: 5;
  right: 12px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
}

.tray-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.tray-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.tray-chip {
  border: 1px solid var(--ink);
    background: var(--blue);
    color: white;
    padding: 4px 8px;
    font-size: 9px;
    animation: chipIn 280ms var(--ease-out);
}

@keyframes chipIn {
  from {
      opacity: 0;
      transform: translateY(7px);
    }
  to { opacity: 1; transform: none; }
}

.gate-tip-shell {
  position: absolute;
  z-index: 7;
  isolation: isolate;
    display: grid;
    color: var(--ink);
  font-family: var(--mono);
  transform-origin: 50% 100%;
    animation: tipIn 360ms var(--ease-out);
  }

  .gate-tip-shell::before,
  .gate-tip-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  
  .gate-tip-shell::before {
    z-index: -2;
    background: var(--shadow);
    transform: translate(var(--elevation-medium-x), var(--elevation-medium-y));
  }
  
  .gate-tip-shell::after {
    z-index: -1;
    background: var(--orange);
  }
  
  .gate-tip-panel {
    width: calc(100% - 4px);
    margin: 2px;
    background: var(--paper-raised);
    padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

@keyframes tipIn {
  from {
      opacity: 0;
      transform: translateY(12px) scale(0.94);
    }
  to { opacity: 1; transform: none; }
}

.gate-tip-shell .gt-label {
  color: var(--ink);
  font-size: 10px;
    line-height: 1.55;
}

.gate-tip-shell .gt-label em {
  color: var(--orange-text);
  font-family: var(--sans);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.btn-signal {
  width: 100%;
  padding: 8px 10px;
    font-size: 11px;
}

.term {
  flex: none;
  height: 128px;
    overflow-y: auto;
    border-top: 2px solid rgb(251 246 235 / 18%);
    background: var(--ink);
    color: var(--paper);
    padding: 11px 16px 13px;
  font-family: var(--mono);
  font-size: 10.5px;
    line-height: 1.72;
}

.term:empty::before {
  content: "terminal · commands echo here";
  display: block;
  padding-top: 38px;
    color: rgb(251 246 235 / 46%);
    font-size: 9.5px;
  text-align: center;
}

.term .tline {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

.term .t-cmd {
  color: white;
  font-weight: 600;
}

.term .t-cmd::before {
  content: "$ ";
  color: var(--orange);
}

.term .t-ok {
  color: var(--blue-light);
}

.term .t-err {
  color: #ff7c59;
}

.term .t-await {
  color: var(--orange);
}

.term .t-dim {
  color: rgb(251 246 235 / 62%);
}

.term .t-gilt {
  color: var(--orange);
}

.complete-plate {
  position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    isolation: isolate;
    width: min(840px, calc(100% - 40px));
    max-width: 840px;
    margin: 0;
    padding: clamp(28px, 4vw, 44px);
  opacity: 0;
    transform: translate(-50%, calc(-50% + 18px));
    visibility: hidden;
    pointer-events: none;
  text-align: center;
  transition:
      opacity 180ms var(--ease-out),
      transform 240ms var(--ease-out),
      visibility 0s linear 240ms;
  }

  .workbench-page.is-complete .complete-plate {
    opacity: 1;
    transform: translate(-50%, -50%);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 50ms, 50ms, 0s;
  }

        .complete-plate::before,
        .complete-plate::after {
          content: "";
          position: absolute;
          inset: 0;
        }
    
        .complete-plate::before {
          z-index: -1;
          border: 1px solid var(--paper-edge);
          background: var(--paper-raised);
        }

.complete-kicker {
  display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--blue-text);
  font-family: var(--mono);
  font-size: 10.5px;
    font-weight: 600;
    overflow-wrap: anywhere;
  }
  
  .complete-kicker::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    background: var(--blue) var(--check-light) center / 14px 14px no-repeat;
}

.complete-stats {
  margin: 24px 0 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(18px, 4vw, 42px);
}

.complete-stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}

.complete-stats dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
    font-weight: 600;
}

.complete-stats dd {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
}

.complete-question {
  font-size: clamp(19px, 2.2vw, 23px);
    font-weight: 850;
    text-wrap: balance;
}

.complete-endings {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.ending {
  min-width: 128px;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--paper);
    padding: 11px 16px;
    box-shadow: var(--shadow-micro);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 120ms var(--ease-press), box-shadow 120ms var(--ease-press), background 120ms ease;
}

.ending code {
  background: none;
  padding: 0;
  color: var(--blue-text);
    font-size: 11px;
  font-weight: 600;
}

.ending span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ending:hover,
.ending.is-chosen {
  background: var(--orange);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-micro-raised);
}

.ending:active {
  transform: translate(var(--elevation-micro-x), var(--elevation-micro-y));
  box-shadow: none;
}

.complete-note {
  margin-top: 20px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
}

/* ---------------- story movements ---------------- */

.movement {
  width: 100%;
    max-width: none;
    padding:
      var(--space-section) max(24px, calc((100vw - var(--col)) / 2)) calc(var(--space-section) + 8px);
    scroll-margin-top: 0;
    background: var(--ink);
    color: var(--paper);
  }
  
  .movement+.movement {
    border-top: 1px solid rgb(251 246 235 / 18%);
}

.movement-head {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
    grid-template-areas:
      "no title"
      "no pull";
    align-items: start;
    column-gap: clamp(24px, 4vw, 58px);
}

.movement-no {
  grid-area: no;
  color: var(--blue);
    font-size: clamp(66px, 8vw, 112px);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 0.8;
}

.movement-title {
  grid-area: title;
  max-width: 14ch;
    font-size: clamp(46px, 6vw, 82px);
    font-weight: 950;
    letter-spacing: var(--tracking-display);
    line-height: 0.94;
    text-wrap: balance;
}

.movement-pull {
  grid-area: pull;
  max-width: 38ch;
    margin-top: 16px;
    color: rgb(251 246 235 / 72%);
    font-size: clamp(19px, 2.3vw, 27px);
    font-weight: 820;
    line-height: 1.22;
    text-wrap: balance;
}

.movement-body {
  padding: var(--space-block) 0 0 196px;
}

.prose {
  max-width: 70ch;
    font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.68;
  text-wrap: pretty;
}

.prose em {
  font-style: normal;
    font-weight: 900;
  }
  
  .movement .prose code {
    background: rgb(251 246 235 / 10%);
    color: var(--paper);
}

.prose-small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

.duo {
  margin-top: var(--space-block);
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
    gap: 22px;
}

.mini-term {
  min-width: 0;
  border: 1px solid rgb(251 246 235 / 18%);
    background: var(--ink);
    color: var(--paper);
    box-shadow: none;
}

.mini-term figcaption {
  border-bottom: 1px solid rgb(251 246 235 / 22%);
    padding: 11px 15px;
    color: var(--orange);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}

.mini-term pre {
  overflow-x: auto;
    padding: 17px 18px 20px;
  font-family: var(--mono);
  font-size: clamp(0.8125rem, 0.8vw, 0.875rem);
    line-height: 1.65;
  }
  
  .mini-term code {
    background: none;
    color: inherit;
    padding: 0;
    font: inherit;
  }
  
  .mini-term .t-cmd {
    color: white;
  }
  
  .mini-term .t-ok {
    color: var(--blue-light);
  }
  
  .mini-term .t-dim {
    color: rgb(251 246 235 / 58%);
  }
  
  #m-cast {
    background: var(--ink);
    color: var(--paper);
  }
  
  #m-cast .movement-no {
    color: var(--orange);
  }
  
  #m-cast .movement-pull {
    color: rgb(251 246 235 / 72%);
  }
  
  #m-cast .prose {
    color: var(--paper);
  }
  
  #m-cast code {
    background: rgb(251 246 235 / 10%);
    color: var(--paper);
}

.roster {
  max-width: 820px;
    margin-top: var(--space-block);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
    list-style: none;
}

.roster li {
  border: 2px solid var(--ink);
    background: var(--paper);
    color: var(--ink);
    padding: 7px 14px;
  font-family: var(--mono);
  font-size: 11px;
    font-weight: 600;
}

.roster .roster-more {
  background: var(--orange);
}

.toy {
  position: relative;
  margin-top: var(--space-block);
    border: 3px solid var(--ink);
    background: var(--paper);
    color: var(--ink);
    padding: clamp(20px, 3vw, 30px);
    box-shadow: var(--shadow-medium);
}

.toy-head {
  margin-bottom: 22px;
    color: var(--blue-text);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
}

.toy-chain {
  padding: 3px 3px 9px;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
}

.toy-node {
  width: 158px;
  flex: none;
    border: 2px solid var(--blue);
    background: var(--paper-raised);
    padding: 10px 11px;
    box-shadow: none;
  font-family: var(--mono);
  transition: border-color 220ms ease, background 220ms ease, opacity 220ms ease;
}

.toy-node .tn-id {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
    font-weight: 600;
}

.toy-node .tn-agent {
  margin-top: 7px;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: var(--paper);
    color: var(--blue-text);
    padding: 4px 8px;
    cursor: pointer;
  font-family: var(--mono);
  font-size: 9.5px;
    font-weight: 600;
}

.toy-node .tn-agent:hover {
  background: var(--orange);
    color: var(--ink);
}

.toy-node .tn-verdict {
  margin-top: 7px;
    color: var(--blue-text);
    font-size: 9px;
    font-weight: 600;
  text-transform: uppercase;
}

.toy-link {
  position: relative;
  width: 34px;
  height: 3px;
    flex: none;
  align-self: center;
  background: var(--blue);
}

.toy-link::after {
  content: "";
  position: absolute;
  right: -1px;
    top: -4px;
    border: 5px solid transparent;
    border-left-color: var(--blue);
}

.toy-node.is-reused {
  background: #eef2ff;
    border-color: var(--blue);
    opacity: 0.78;
}

.toy-node.is-rerun {
  border-color: var(--orange);
}

.toy-node.is-rerun .tn-verdict {
  color: var(--orange-text);
}

.toy-node.is-changed {
  background: #fff0df;
}

.toy-picker {
  position: absolute;
  z-index: var(--z-popover);
    max-width: 300px;
    border: 2px solid var(--ink);
    background: var(--paper-raised);
    padding: 9px;
    box-shadow: var(--shadow-micro);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.toy-picker button {
  border: 1px solid var(--ink);
    border-radius: 0;
    background: var(--paper);
    padding: 5px 9px;
    cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
}

.toy-picker button:hover {
  background: var(--orange);
}

.toy-picker button.is-current {
  background: var(--blue);
    color: white;
}

.toy-echo {
  min-height: 1.6em;
    margin-top: 18px;
    color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
}

.toy-echo.is-cmd {
  color: var(--ink);
}

.toy-echo.is-cmd::before {
  content: "$ ";
  color: var(--orange-text);
}

.toy-result {
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
}

.toy-result .tr-reuse {
  color: var(--blue-text);
}

.toy-result .tr-rerun {
  color: var(--orange-text);
}
.toy-result .tr-reset {
  margin-left: 12px;
  border: 0;
    background: transparent;
    color: var(--blue-text);
    cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#m-control {
  background: var(--ink);
  color: var(--paper);
}

#m-control .movement-no {
  color: var(--blue);
}

#m-control .movement-pull {
  color: rgb(251 246 235 / 72%);
}
.keys {
  max-width: 920px;
    margin-top: 42px;
    border-bottom: 1px solid rgb(251 246 235 / 28%);
  display: grid;
    grid-template-rows: repeat(6, 66px);
}

.key {
  border-top: 1px solid rgb(251 246 235 / 28%);
    height: 100%;
      padding: 8px 4px;
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(260px, 0.9fr);
    align-items: center;
      gap: 48px;
}

.key code {
  background: transparent;
    color: var(--paper);
  padding: 0;
    font-size: 13px;
      font-weight: 600;
  overflow-wrap: anywhere;
}

.key p {
  color: rgb(251 246 235 / 82%);
  font-size: 15px;
  line-height: 1.5;
}

.key-note {
  display: block;
    margin-top: 5px;
    color: var(--blue-light);
  font-family: var(--mono);
  font-size: 9px;
    font-weight: 600;
  }
  
  #m-after {
    background: var(--ink);
    color: var(--paper);
  }
  
  #m-after .movement-no {
    color: var(--orange);
  }
  
  #m-after .movement-pull,
  #m-after .prose {
    color: var(--paper);
  }
  
  #m-after code {
    background: rgb(251 246 235 / 10%);
    color: var(--paper);
}

.endings-grid {
  margin-top: var(--space-block);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 24px;
}

.ending-plate {
  position: relative;
    border: 2px solid var(--paper-edge);
    outline: 3px solid transparent;
    outline-offset: 5px;
    background: var(--paper-raised);
    color: var(--ink);
    padding: 26px;
    box-shadow: none;
    transition: outline-color 220ms ease, background 220ms ease;
  }
  
    .ending-plate:nth-child(2) {
    background: var(--paper-raised);
    color: var(--ink);
}

.ending-plate.is-chosen {
  outline-color: var(--orange);
  }
  
  .ending-plate.is-chosen::before {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--orange) var(--check-ink) center / 17px 17px no-repeat;
}

.ending-cmd {
  background: none !important;
    color: var(--blue-text) !important;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  overflow-wrap: anywhere;
  }

.ending-pull {
  margin: 18px 0 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.008em;
    line-height: 1.1;
}

/* ---------------- closing ---------------- */
.coda {
  width: 100%;
    margin: 0;
    padding: 0 max(20px, calc((100vw - var(--col)) / 2));
    background: var(--ink);
    box-shadow: none;
    color: var(--paper);
  display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
  text-align: center;
}

.coda-content {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(48px, 7svh, 72px) 0;
  align-self: center;
}
.coda-line {
  font-size: clamp(44px, 6vw, 84px);
    font-weight: 950;
    letter-spacing: var(--tracking-display);
    line-height: 1.02;
    text-wrap: balance;
}

.coda-line em {
  color: var(--orange);
  font-style: normal;
}

.btn-coda {
  display: inline-block;
  margin-top: 42px;
  background: var(--paper);
  font-size: 18px;
  }

  .btn-coda:hover {
    background: var(--orange);
}

.footer {
  width: 100%;
  margin: 0 auto;
  border-top: 1px solid rgb(251 246 235 / 24%);
    padding: 24px 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 42px;
  }
  
  .footer-brand {
    flex: none;
    text-decoration: none;
  }
  
  .footer-brand img {
    width: 170px;
    height: auto;
  }
  
  .footer-copy {
    max-width: 620px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
}

.footer-note {
  color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    text-align: right;
}

.footer-nav {
  flex: none;
    font-size: 13px;
    font-weight: 900;
}

.footer-nav a {
  color: var(--paper);
}

.footer-nav a:hover {
  color: var(--orange);
}
/* Content remains visible before and without JavaScript. */
.reveal {
  translate: 0 10px;
    transition: translate 520ms var(--ease-out);
}

.reveal.is-in {
  translate: 0;
}

/* ---------------- responsive ---------------- */

@media (min-width: 861px) and (max-height: 1160px) {
  .movement {
    padding-top: clamp(30px, 4svh, 38px);
    padding-bottom: clamp(34px, 4.5svh, 42px);
  }

  .movement-body {
    padding-top: 24px;
  }

  .duo,
  .roster,
  .toy,
  .endings-grid {
    margin-top: 24px;
  }

  .toy {
    padding-block: 20px;
  }

  .toy-head {
    margin-bottom: 14px;
  }

  .toy-echo {
    margin-top: 12px;
  }

  .keys {
    margin-top: 24px;
  }

}

@media (min-width: 861px) and (max-height: 820px) {
  #m-cast {
    padding-block: 22px 26px;
  }

  #m-cast .movement-title {
    font-size: 64px;
  }

  #m-cast .movement-pull {
    margin-top: 10px;
    font-size: 21px;
  }

  #m-cast .movement-body {
    padding-top: 16px;
  }

  #m-cast .prose {
    max-width: 80ch;
    font-size: 17px;
    line-height: 1.5;
  }

  #m-cast .roster {
    max-width: none;
    margin-top: 16px;
    gap: 8px;
  }

  #m-cast .roster li {
    padding: 5px 10px;
    font-size: 10px;
  }

  #m-cast .toy {
    margin-top: 16px;
    padding-block: 14px;
  }

  #m-cast .toy-head {
    margin-bottom: 10px;
  }

  #m-cast .toy-echo {
    margin-top: 8px;
  }
}
@media (max-width: 1040px) {
  .hero-intro {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 780px;
  }

  .task-card {
    max-width: 880px;
  }

        .duo {
          grid-template-columns: minmax(0, 1fr);
        }
  .movement-body {
    padding-left: 132px;
  }
}
@media (max-width: 860px) {
  .topnav a:not(.topnav-gh) {
    display: none;
  }

  .movement-head {
    grid-template-columns: 92px minmax(0, 1fr);
      column-gap: 22px;
  }

                .movement-body {
                  padding-left: 114px;
  }

  .stage-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    }
.stage-meta-actions {
  width: 100%;
  justify-content: space-between;
}
    
    .stage-live {
      text-align: left;
  }

                .code {
    overflow-x: auto;
    font-size: 10.5px;
  }

.key {
  grid-template-columns: 1fr;
  gap: 10px;
}

.footer-copy {
  align-items: flex-end;
  flex-direction: column;
  gap: 10px;
}
}

@media (max-width: 640px) {
  :root {
    --topbar-height: 64px;
    --hero-top-space: 14px;
          

                    html {
                      scroll-padding-top: 70px;
                    }
  body {
    font-size: 16px;
    }
    
    .topbar-inner {
      width: min(100% - 28px, var(--col));
      min-height: 62px;
    }
    
    .brand-lockup {
      width: 108px;
    }
    
    .topnav-gh {
      padding: 6px 10px;
      font-size: 12px;
    }
    
    .hero-art-shell {
      width: calc(100% - 12px);
      padding-bottom: clamp(20px, 5svh, 42px);
    }
    
    .hero-ribbon {
      width: 58%;
    }
    
    .hero-intro {
      width: calc(100% - 32px);
      margin: 0 auto;
    }
    
    .thesis {
      font-size: clamp(40px, 13vw, 58px);
    }
    
    .task-card {
      padding: 26px 22px 28px;
    }
    
    .task-foot {
      align-items: stretch;
      flex-direction: column;
    }

    .task-hint {
      max-width: none;
    }
    
    .btn-delegate {
      width: 100%;
    }
    
    .instrument {
      padding-inline: 14px;
    }
    
    .stage {
      height: max(560px, calc(var(--page-height) - 88px));
    }
    
    .stage-head {
      min-height: 50px;
      padding-inline: 8px;
    }
    
    .filetab {
      padding-inline: 5px;
  }

  .filetab-meta {
    display: none;
  }

                .stage-authoring {
                  display: none;
                }
        
                .ctl {
                  padding-inline: 7px;
                }
  .tray-label {
    display: none;
  }

                .artifact-tray {
                  left: 10px;
                  right: 10px;
                  align-items: flex-end;
  }

                .tray-items {
    width: 100%;
  }

                .term {
                  height: 142px;
                  padding-inline: 11px;
                  font-size: 9.5px;
                }
  .complete-plate {
    padding: 28px 20px 32px;
    }
    
    .complete-stats {
      gap: 16px 24px;
    }
    
    .complete-endings {
      align-items: stretch;
    }
    
    .ending {
      flex: 1 1 120px;
    }
    
    .movement {
      padding-inline: 20px;
    }
    
    .movement-head {
      display: block;
    }
    
    .movement-no {
      margin-bottom: 24px;
      font-size: 64px;
    }
    
    .movement-title {
      font-size: clamp(43px, 13vw, 64px);
    }
    
    .movement-body {
      padding-left: 0;
    }
    
    .duo {
      grid-template-columns: minmax(0, 1fr);
    }
    
    .roster {
      gap: 8px;
    }
    
    .toy {
      padding: 20px 16px;
    }
    
    .toy-picker {
      max-width: calc(100% - 24px);
    }
    
    .key {
      height: auto;
      padding-block: 18px;
    }
.keys {
  display: block;
}

    #m-control {
      padding-block: 28px 24px;
    }

    #m-control .movement-head {
      display: grid;
      grid-template-columns: 44px minmax(0, 1fr);
      grid-template-areas:
        "no title"
        "no pull";
      column-gap: 12px;
    }

    #m-control .movement-no {
      margin: 4px 0 0;
      font-size: 44px;
    }

    #m-control .movement-title {
      font-size: 40px;
      line-height: 0.92;
    }

    #m-control .movement-pull {
      margin-top: 8px;
      font-size: 15px;
      line-height: 1.2;
    }

    #m-control .movement-body {
      padding-top: 14px;
    }

    #m-control .prose {
      font-size: 13px;
      line-height: 1.43;
    }

    #m-control .keys {
      margin-top: 16px;
      display: grid;
      grid-template-rows: repeat(6, minmax(58px, auto));
    }

    #m-control .key {
      min-height: 58px;
      padding: 7px 4px;
      grid-template-columns: minmax(112px, 0.7fr) minmax(0, 1.3fr);
      gap: 12px;
    }

    #m-control .key code {
      font-size: 9.5px;
      white-space: nowrap;
    }

    #m-control .key p {
      font-size: 12px;
      line-height: 1.3;
    }
    
    .endings-grid {
      grid-template-columns: 1fr;
    }
    
    .coda {
      width: 100%;
    }
    
    .footer {
      align-items: flex-start;
      flex-direction: column;
      gap: 26px;
    }
.footer-copy {
  align-items: flex-start;
}

.footer-note {
  text-align: left;
}
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

    .workbench-page>.hero-intro,
    .workbench-page>.instrument,
    .workbench-page.is-stage-active>.hero-intro,
    .workbench-page.is-stage-active>.instrument,
    .workbench-page.is-complete .stage-shell {
      clip-path: none;
      transform: none;
    }

    .complete-plate,
    .workbench-page.is-complete .complete-plate {
      transform: translate(-50%, -50%);
    }

    .task-card.is-inviting .task-hint-kicker,
    .task-card.is-inviting .btn-delegate,
    .task-card.is-inviting .delegate-arrow,
    .task-card.is-reminding .btn-delegate,
    .task-card.is-reminding .delegate-arrow {
      animation: none;
    }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    translate: none;
  }
}
}
