:root {
  /* compliance vocabulary: transcript line numbers, Space Grotesk** for clear interface copy */
  --paper: #F4E6C8;
  --apricot: #F28C5B;
  --cobalt: #2257A7;
  --green: #5E8C61;
  --violet: #34224F;
  --red: #C83E4D;
  --night: #171421;
  --shadow: #CBBEA4;
  --fraunces: 'Fraunces', serif;
  --kr: 'Noto Sans KR', sans-serif;
  --space: 'Space Grotesk', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html { background: var(--night); }

body {
  margin: 0;
  min-height: 500vh;
  color: var(--violet);
  font-family: var(--space);
  background: var(--paper);
  overflow-x: hidden;
}

button { font: inherit; color: inherit; }

.deliberation {
  --hour-angle: -18deg;
  --shadow-length: 1;
  position: relative;
  min-height: 500vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(242, 140, 91, .34), transparent 24rem),
    linear-gradient(180deg, #F4E6C8 0%, #F4E6C8 52%, #34224F 78%, #171421 100%);
  isolation: isolate;
}

.sky-wash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    conic-gradient(from var(--hour-angle) at 22% 46%, rgba(242, 140, 91, .18), rgba(34, 87, 167, .12), rgba(203, 190, 164, .18), rgba(200, 62, 77, .1), rgba(242, 140, 91, .18)),
    repeating-linear-gradient(90deg, rgba(52, 34, 79, .035) 0 1px, transparent 1px 5.5rem);
  mix-blend-mode: multiply;
  z-index: -2;
}

.scene {
  position: relative;
  min-height: 100vh;
  padding: 7vh 6vw;
}

.forum-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  pointer-events: none;
}

.sundial {
  position: absolute;
  width: min(104vw, 980px);
  aspect-ratio: 1;
  left: -22vw;
  top: 50%;
  transform: translateY(-50%) rotate(calc(var(--hour-angle) * .18));
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 16%, rgba(244, 230, 200, .9) 17% 18%, transparent 19% 31%, rgba(203, 190, 164, .35) 32% 33%, transparent 34% 47%, rgba(34, 87, 167, .1) 48% 49%, transparent 50%),
    conic-gradient(from -32deg, rgba(242, 140, 91, .32), rgba(244, 230, 200, .18), rgba(94, 140, 97, .12), rgba(200, 62, 77, .13), rgba(242, 140, 91, .32));
  box-shadow: inset 0 0 0 2px rgba(52, 34, 79, .18), 0 2rem 6rem rgba(52, 34, 79, .14);
  transition: transform .4s ease-out;
}

.dial-rim {
  position: absolute;
  inset: 4.2%;
  border: 2px solid var(--violet);
  border-radius: 50%;
  opacity: .88;
}

.dial-rim::before,
.dial-rim::after {
  content: '';
  position: absolute;
  inset: 8%;
  border: 1px dashed rgba(52, 34, 79, .38);
  border-radius: 50%;
}

.dial-rim::after { inset: 21%; border-style: solid; border-color: rgba(203, 190, 164, .8); }

.rim-wordmark {
  position: absolute;
  right: 7%;
  top: 20%;
  transform: rotate(28deg);
  padding: .45rem .8rem .55rem;
  border: 2px solid var(--cobalt);
  border-radius: 999px;
  background: var(--paper);
  color: var(--night);
  font-family: var(--fraunces);
  font-size: clamp(1.7rem, 4vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -.05em;
  box-shadow: .35rem .35rem 0 var(--shadow);
}

.discussion-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(52, 34, 79, .22);
  animation: ringDrift 18s linear infinite;
}

.ring-one { inset: 15%; border-color: rgba(34, 87, 167, .46); }
.ring-two { inset: 28%; border-color: rgba(200, 62, 77, .38); animation-direction: reverse; }
.ring-three { inset: 41%; border-color: rgba(94, 140, 97, .42); animation-duration: 24s; }

.hour-hand {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 43%;
  height: .72rem;
  transform-origin: left center;
  transform: rotate(var(--hour-angle));
  background: repeating-linear-gradient(90deg, var(--night) 0 .9rem, transparent .9rem 1.35rem);
  color: var(--night);
  transition: transform .4s ease-out;
}

.hour-hand span {
  position: absolute;
  left: 10%;
  bottom: 1rem;
  width: 22rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sun-shadow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(38% * var(--shadow-length));
  height: 28%;
  transform-origin: left center;
  transform: rotate(calc(var(--hour-angle) + 16deg));
  background: linear-gradient(90deg, rgba(203, 190, 164, .65), transparent);
  clip-path: polygon(0 42%, 100% 0, 100% 100%, 0 58%);
  transition: width .35s ease-out, transform .35s ease-out;
}

.voice-token {
  position: absolute;
  width: 4.1rem;
  height: 4.1rem;
  border-radius: 50%;
  border: 2px solid var(--night);
  display: grid;
  place-items: center;
  font-family: var(--fraunces);
  font-weight: 900;
  font-size: 1.45rem;
  cursor: pointer;
  box-shadow: .7rem .9rem 0 rgba(52, 34, 79, .18);
  z-index: 5;
  transition: transform .25s ease, box-shadow .25s ease;
}

.voice-token:hover { transform: translateY(-.4rem) scale(1.05); box-shadow: 1.05rem 1.2rem 0 rgba(52, 34, 79, .2); }
.apricot-token { left: 58%; top: 43%; background: var(--apricot); }
.cobalt-token { right: 18vw; top: 24vh; background: var(--cobalt); color: var(--paper); }
.red-token { right: 32vw; top: 67vh; background: var(--red); color: var(--paper); }

.chair {
  position: absolute;
  width: 1.6rem;
  height: 2.6rem;
  border: 2px solid var(--violet);
  border-radius: 1rem 1rem .25rem .25rem;
  opacity: .72;
}
.chair::after { content: ''; position: absolute; left: -.35rem; right: -.35rem; bottom: -.55rem; height: 2px; background: var(--violet); }
.chair-a { left: 66%; top: 22%; transform: rotate(41deg); }
.chair-b { left: 70%; top: 70%; transform: rotate(126deg); }
.chair-c { left: 35%; top: 17%; transform: rotate(-21deg); }
.question-pin { position: absolute; left: 47%; top: 43%; font: 900 6rem var(--fraunces); color: rgba(52, 34, 79, .17); }

.margin-note {
  position: absolute;
  max-width: 22rem;
  padding: 1.1rem 1.25rem;
  background: rgba(244, 230, 200, .82);
  border: 1px solid rgba(52, 34, 79, .28);
  box-shadow: .45rem .45rem 0 rgba(203, 190, 164, .65);
  transform: rotate(-2deg);
}
.margin-note p { margin: .55rem 0 0; line-height: 1.5; }
.kr-label { font-family: var(--kr); font-weight: 900; letter-spacing: .14em; color: var(--red); }
.dawn-note { right: 7vw; top: 18vh; }
.noon-note { left: 8vw; bottom: 10vh; transform: rotate(2deg); }
.afternoon-note { right: 9vw; bottom: 13vh; }
.blue-note { left: 8vw; top: 15vh; transform: rotate(1deg); }

.seal {
  position: absolute;
  right: 18vw;
  bottom: 16vh;
  width: 8rem;
  height: 8rem;
  display: grid;
  place-items: center;
  border: 3px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font-family: var(--kr);
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  transform: rotate(-13deg);
  background: rgba(244, 230, 200, .55);
}

.chapter-label {
  position: sticky;
  top: 7vh;
  z-index: 3;
  width: max-content;
  color: var(--night);
}
.chapter-label span { display: block; font-family: var(--mono); color: var(--cobalt); letter-spacing: .16em; }
.chapter-label strong { font-family: var(--fraunces); font-size: clamp(2.6rem, 8vw, 7.5rem); line-height: .9; letter-spacing: -.07em; }

.ribbon {
  position: absolute;
  width: min(56rem, 72vw);
  padding: 1rem 2rem;
  border-radius: 999px;
  font-family: var(--fraunces);
  font-size: clamp(1.7rem, 3.3vw, 4.4rem);
  line-height: 1;
  box-shadow: 0 .9rem 0 rgba(203, 190, 164, .55);
}
.ribbon span { display: block; animation: unfurl 1.4s ease both; }
.cobalt-ribbon { right: -7vw; top: 27vh; color: var(--paper); background: var(--cobalt); transform: rotate(-7deg); }
.red-ribbon { left: 12vw; top: 56vh; color: var(--paper); background: var(--red); transform: rotate(9deg); }

.chalk-arrow {
  position: absolute;
  width: 22vw;
  height: .35rem;
  background: var(--green);
  border-radius: 999px;
  opacity: .82;
}
.chalk-arrow::after { content: ''; position: absolute; right: -.6rem; top: -.55rem; border-left: 1rem solid var(--green); border-top: .7rem solid transparent; border-bottom: .7rem solid transparent; }
.arrow-one { left: 35vw; top: 44vh; transform: rotate(26deg); }
.arrow-two { left: 46vw; top: 61vh; transform: rotate(-33deg); background: var(--red); }
.arrow-two::after { border-left-color: var(--red); }

.paper-tabs {
  position: sticky;
  top: 26vh;
  width: 12rem;
  display: grid;
  gap: .55rem;
  z-index: 4;
}
.amendment-tab {
  border: 2px solid var(--violet);
  background: var(--paper);
  padding: .65rem .9rem;
  text-align: left;
  font-family: var(--kr);
  font-weight: 900;
  cursor: pointer;
  box-shadow: .25rem .25rem 0 var(--shadow);
  transition: transform .2s ease, background .2s ease;
}
.amendment-tab.active, .amendment-tab:hover { background: var(--apricot); transform: translateX(1rem); }

.revision-card {
  position: absolute;
  left: 28vw;
  top: 27vh;
  width: min(54rem, 62vw);
  min-height: 22rem;
  padding: 2rem;
  background: rgba(244, 230, 200, .9);
  border: 2px solid var(--night);
  clip-path: polygon(0 0, 96% 0, 100% 9%, 100% 100%, 5% 100%, 0 91%);
  box-shadow: 1.2rem 1.2rem 0 rgba(94, 140, 97, .28);
}
.mono-id { font-family: var(--mono); color: var(--green); letter-spacing: .16em; }
.revision-card h1 { margin: 2rem 0 1rem; font-family: var(--fraunces); font-size: clamp(3.5rem, 7vw, 8rem); line-height: .86; letter-spacing: -.07em; text-decoration: underline wavy rgba(200, 62, 77, .6); }
.revision-card p { max-width: 30rem; line-height: 1.6; }
.revision-card.flip h1 { animation: phraseFlip .45s ease; }
.eraser-moon { position: absolute; right: 18vw; top: 20vh; width: 9rem; height: 9rem; border-radius: 50%; background: var(--shadow); box-shadow: inset -1.1rem -.8rem 0 rgba(52, 34, 79, .2); }

.scene-blue { color: var(--paper); }
.braid {
  position: absolute;
  left: 22vw;
  width: 58vw;
  padding: .8rem 1.4rem;
  border: 1px solid rgba(244, 230, 200, .55);
  border-radius: 999px;
  font-family: var(--fraunces);
  font-size: clamp(1.8rem, 4vw, 5.2rem);
  line-height: 1;
  transform-origin: center;
}
.braid-a { top: 32vh; background: rgba(34, 87, 167, .72); transform: rotate(-8deg); }
.braid-b { top: 45vh; background: rgba(200, 62, 77, .72); transform: rotate(5deg); }
.braid-c { top: 58vh; background: rgba(94, 140, 97, .72); transform: rotate(-2deg); }
.consensus-ring { position: absolute; inset: 17vh 18vw; border: 2px dashed rgba(244, 230, 200, .45); border-radius: 50%; animation: ringDrift 28s linear infinite; }
.firefly-field i { position: absolute; width: .65rem; height: .65rem; border-radius: 50%; background: var(--apricot); box-shadow: 0 0 1.2rem var(--apricot); offset-path: path('M120,420 C240,80 520,110 650,350 C760,560 380,670 160,500'); animation: firefly 8s linear infinite; }
.firefly-field i:nth-child(2) { animation-delay: -1s; background: var(--green); }
.firefly-field i:nth-child(3) { animation-delay: -2.4s; background: var(--red); }
.firefly-field i:nth-child(4) { animation-delay: -3.2s; background: var(--cobalt); }
.firefly-field i:nth-child(5) { animation-delay: -4.8s; }
.firefly-field i:nth-child(6) { animation-delay: -6.1s; background: var(--paper); }

.scene-night { color: var(--paper); background: radial-gradient(circle at 74% 48%, rgba(242, 140, 91, .18), transparent 22rem); }
.night-table {
  position: relative;
  margin: 8vh auto 0;
  width: min(68rem, 86vw);
  min-height: 68vh;
  padding: 4rem;
  background: rgba(23, 20, 33, .88);
  border: 1px solid rgba(244, 230, 200, .26);
  box-shadow: 0 0 0 1.3rem rgba(52, 34, 79, .42), 0 2rem 7rem rgba(0,0,0,.35);
}
.lantern { position: absolute; right: 5rem; top: 4rem; width: 5rem; height: 7rem; border-radius: 2rem 2rem .8rem .8rem; border: 2px solid var(--apricot); background: radial-gradient(circle, rgba(242, 140, 91, .9), rgba(242, 140, 91, .08) 65%); box-shadow: 0 0 5rem rgba(242, 140, 91, .45); }
.night-table h2 { margin: 0; max-width: 46rem; font-family: var(--fraunces); font-size: clamp(4rem, 9vw, 9.5rem); line-height: .83; letter-spacing: -.08em; }
.midnight-line { max-width: 34rem; font-size: 1.25rem; line-height: 1.6; color: var(--shadow); }
.footnotes { margin-top: 3rem; padding: 0; list-style: none; display: grid; gap: 1rem; font-family: var(--mono); color: #F4E6C8; }
.footnotes li { border-top: 1px solid rgba(244, 230, 200, .22); padding-top: 1rem; }
.footnotes span { color: var(--apricot); margin-right: 1rem; }
.quote-gate { position: absolute; top: 10vh; font-family: var(--fraunces); font-size: 26vw; line-height: 1; color: rgba(244, 230, 200, .08); }
.quote-gate.left { left: 3vw; }
.quote-gate.right { right: 3vw; }

.listening-shadow {
  position: fixed;
  left: 0;
  top: 0;
  max-width: 18rem;
  padding: .75rem 1rem;
  background: var(--night);
  color: var(--paper);
  border: 1px solid var(--apricot);
  font-family: var(--kr);
  font-size: .82rem;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -140%) rotate(-2deg);
  transition: opacity .18s ease;
  z-index: 20;
}
.listening-shadow.visible { opacity: 1; }
.hour-indicator { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 12; padding: .65rem .9rem; border: 1px solid rgba(52, 34, 79, .26); background: rgba(244, 230, 200, .78); color: var(--night); font: 600 .78rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.hour-indicator::after { content: "Grotesk*"; display: none; }

@keyframes ringDrift { to { transform: rotate(360deg); } }
@keyframes unfurl { from { clip-path: inset(0 100% 0 0); transform: translateX(3rem); } to { clip-path: inset(0); transform: translateX(0); } }
@keyframes phraseFlip { 0% { transform: rotateX(0); opacity: 1; } 45% { transform: rotateX(90deg); opacity: .2; } 100% { transform: rotateX(0); opacity: 1; } }
@keyframes firefly { to { offset-distance: 100%; } }

@media (max-width: 760px) {
  .sundial { left: -60vw; width: 150vw; }
  .margin-note { position: relative; top: auto; right: auto; left: auto; bottom: auto; margin: 2rem 0 0 auto; }
  .chapter-label strong { font-size: 3.6rem; }
  .ribbon { width: 86vw; left: 7vw; right: auto; }
  .red-ribbon { top: 65vh; }
  .revision-card { left: 8vw; width: 84vw; }
  .paper-tabs { top: 18vh; }
  .braid { left: 7vw; width: 86vw; }
  .night-table { padding: 2rem; }
}
