/* demo.cucumbs.com front page: one folded note on a dark page. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.room {
  margin: 0; min-height: 100vh;
  background: #0a1511 radial-gradient(70% 50% at 50% 0%, #10261d 0%, rgba(10, 21, 17, 0) 70%) no-repeat;
  color: #e6eee8;
  font: 400 1.0625rem/1.6 var(--cu-font-sans);
}
a { color: #8fdcb5; text-underline-offset: 0.18em; }
a:hover { color: #c4f2da; }
:where(a, button, [tabindex]):focus-visible { outline: 3px solid #ffc76e; outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; background: #ffc76e; color: #1a1205; padding: 0.5rem 1rem; z-index: 30; }
.skip:focus { left: 1rem; top: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.room__main { width: min(100%, 44rem); margin: 0 auto; padding: 4.5rem 1.25rem 3rem; }
.room__title { margin: 0 0 0.4rem; font-size: 1.6rem; font-weight: 600; letter-spacing: 0.01em; color: #e6eee8; }
.room__hint { margin: 0 0 2.5rem; color: #b2c3b8; font-size: 0.95rem; }

.desk { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }

/* the trail of hands the note passed through */
.trail { list-style: none; margin: 0; padding: 0.4rem 0 0; display: grid; gap: 2.1rem; font-size: 0.8rem; color: #b2c3b8; }
.trail li { position: relative; padding-left: 1.1rem; }
.trail li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 0.5rem; height: 0.5rem; border-radius: 50%; border: 1px solid #557a69; background: #0a1511; }
.trail li + li::after { content: ""; position: absolute; left: 0.24rem; bottom: calc(100% - 0.3em); height: 2.1rem; border-left: 1px solid #8fdcb5; opacity: 0; }
.trail li.is-on::before { background: #8fdcb5; border-color: #8fdcb5; }
.trail li.is-on::after { opacity: 0.4; }
.trail li.is-here { color: #e6eee8; }
.js .trail li:not(.is-on) { color: #6f857a; }
.js .trail li:not(.is-on) { visibility: visible; }

/* the note */
.note {
  position: relative; padding: 1.5rem 1.6rem 1.25rem; border-radius: 6px;
  background: #13241d linear-gradient(180deg, rgba(143, 220, 181, 0.05), rgba(143, 220, 181, 0) 45%);
  border: 1px solid #2a4639;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 50px -24px rgba(0, 0, 0, 0.9);
}
.js .note { cursor: pointer; }
.js .note.is-at-gate, .js .note.is-closed { cursor: default; }
.note__outside { margin: 0; color: #b2c3b8; font-style: italic; }
.fold { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px dashed #2f4c40; }
.fold p { margin: 0 0 0.5rem; }
.fold__label { margin: 0 0 0.6rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #8fdcb5; }
.fold__label span { margin-left: 0.5rem; letter-spacing: 0.02em; text-transform: none; font-weight: 400; color: #b2c3b8; }
.lab { display: inline-block; min-width: 6.2rem; font: 600 0.72rem/1.6 var(--cu-font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: #ffc76e; }
.draft { font-family: var(--cu-font-mono); font-size: 0.9rem; line-height: 1.7; color: #e6eee8; padding-left: 0.9rem; border-left: 2px solid #2f4c40; }

.gate { margin-top: 1.4rem; padding: 1rem 1.1rem; border: 1px solid #6b5426; border-radius: 6px; background: #1a140a; text-align: center; }
.gate__q { margin: 0; font-size: 1.35rem; font-weight: 600; color: #ffc76e; letter-spacing: 0.02em; }
.gate__static { margin: 0.4rem 0 0; color: #d9ccb0; font-size: 0.9rem; }
.js .gate__static { display: none; }
.gate__choices { display: flex; justify-content: center; gap: 0.75rem; margin-top: 0.75rem; }
.gate__btn, .note__unfold, .after__again {
  appearance: none; min-height: 2.75rem; min-width: 5.5rem; padding: 0.4rem 1.1rem; border-radius: 999px; cursor: pointer;
  font: 600 0.95rem/1 var(--cu-font-sans); background: #1d3a2f; color: #e6eee8; border: 1px solid #557a69;
}
.gate__btn:hover, .note__unfold:hover, .after__again:hover { border-color: #8fdcb5; color: #c4f2da; }
.note__unfold { display: block; margin: 1.25rem 0 0 auto; min-width: 0; font-weight: 500; font-size: 0.85rem; background: transparent; color: #b2c3b8; border-color: #2f4c40; }

.after { grid-column: 2; margin-top: 0.25rem; }
.after__line { margin: 0 0 0.75rem; color: #b2c3b8; }
.after__list { margin: 0 0 0.9rem; padding: 0; list-style: none; color: #9fb3a7; font-size: 0.95rem; }
.after__list li { padding: 0.15rem 0; }
.after__list li::before { content: "– "; color: #6f857a; }
.after__coda { margin: 0 0 1.1rem; color: #e6eee8; font-style: italic; }
.after__again { min-width: 0; font-size: 0.85rem; font-weight: 500; background: transparent; color: #b2c3b8; border-color: #2f4c40; }

.room__foot { margin: 3.5rem 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1.5rem; font-size: 0.85rem; color: #9fb3a7; }
.room__down { color: #9fb3a7; }
.room__down:hover { color: #c4f2da; }

/* folding: only when motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  .fold.is-opening, .gate.is-opening { animation: unfold 420ms ease-out both; transform-origin: top center; }
  .trail li::after { transition: opacity 600ms ease; }
  .note.is-folding { animation: refold 380ms ease-in both; }
}
@keyframes unfold { from { opacity: 0; transform: perspective(600px) rotateX(-55deg); } to { opacity: 1; transform: none; } }
@keyframes refold { to { opacity: 0; transform: perspective(600px) rotateX(70deg) scaleY(0.3); } }

[hidden] { display: none !important; }

@media (max-width: 560px) {
  .room__main { padding-top: 2.5rem; }
  .desk { grid-template-columns: minmax(0, 1fr); }
  .trail { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; padding: 0; }
  .trail li + li::after { left: -0.95rem; bottom: auto; top: 0.68em; height: 0; width: 0.75rem; border-left: 0; border-top: 1px solid #8fdcb5; }
  .after { grid-column: 1; }
  .note { padding: 1.2rem 1.1rem 1rem; }
  .lab { display: block; min-width: 0; }
}
@media print { .note__unfold, .gate__choices { display: none; } }
