/* Dispensator — a sunlit Roman sky. The sky changes from morning to dusk as you scroll; each section
   has its own marble landmark standing on clouds; content sits on cream cards. */
:root {
  --sun: #f6c04a; --sun-deep: #e29a1d; --gold: #b97c14; --cream: #fdf6ea; --cream-2: #efdfc6; --ink: #3a2417; --ink-soft: #6e5545;
  --brown: #2e1d15; --navy: #2c3a6b; --ok: #3f7d4f; --bad: #b0392b; --wait: #c58a1c;
  --sky-top: #33407a; --sky-mid: #9a8fcc; --sky-low: #f7cfa6;
  --display: "Fraunces", Georgia, serif; --sans: "Nunito", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter: clamp(20px, 5vw, 80px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--sky-top); scroll-behavior: auto; }
body { color: var(--ink); font: 500 18px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
code { font: 500 .86em var(--mono); background: rgba(58,36,23,.07); padding: .12em .45em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--sun-deep); outline-offset: 3px; border-radius: 6px; }
html.over-chibi, html.over-chibi body { cursor: pointer; }

/* the sky: gradient + drifting cloud puffs + a few twinkles */
#sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(60% 45% at 72% 22%, rgba(255,236,200,.55), transparent 70%), linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 52%, var(--sky-low) 100%); }
#sky .puff { position: absolute; width: 520px; height: 180px; opacity: .55; will-change: transform; }
#sky .tw { position: absolute; width: 22px; height: 22px; background: #fff3c9; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: tw 3.6s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255,230,160,.9)); }
@keyframes tw { 0%, 100% { opacity: .25; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }

/* loader */
#loader { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 26px;
  background: linear-gradient(180deg, #33407a, #9a8fcc 60%, #f7cfa6); transition: opacity .7s ease .15s, visibility 0s .9s; }
#loader img { width: 132px; height: 132px; animation: spin 2.4s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes spin { 50% { transform: perspective(500px) rotateY(180deg); } 100% { transform: perspective(500px) rotateY(360deg); } }
.ld-bar { width: 160px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 0; background: var(--sun); transition: width .4s; }
#loader.done { opacity: 0; visibility: hidden; }

/* steward + speech */
#chibi { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 6; pointer-events: none; }
.bubble { position: fixed; z-index: 7; left: 0; top: 0; max-width: 260px; padding: 11px 16px 12px; background: var(--cream); color: var(--ink); border-radius: 18px; border: 2.5px solid var(--ink);
  font: 700 17px/1.35 var(--sans); box-shadow: 0 14px 26px -12px rgba(40,20,60,.55);
  transform: translate(-50%, -100%) scale(.8); opacity: 0; transition: opacity .25s, transform .4s cubic-bezier(.3,1.5,.5,1); pointer-events: none; }
.bubble.show { opacity: 1; transform: translate(-50%, -100%) scale(1); }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -14px; width: 18px; height: 18px; background: var(--cream); border: 2.5px solid var(--ink); border-top: 0; border-left: 0; transform: translateX(-50%) rotate(45deg); }

/* nav: a dark rounded bar floating under the top edge */
.nav { position: fixed; z-index: 20; top: 10px; left: 10px; right: 10px; display: flex; align-items: center; gap: 26px; padding: 10px 12px 10px 16px;
  background: rgba(46,29,21,.84); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 22px; box-shadow: 0 12px 30px -16px rgba(20,10,30,.7); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 21px var(--display); font-variation-settings: "SOFT" 100; letter-spacing: .01em; color: var(--cream); }
.logo img { display: block; }
.links { display: flex; gap: 4px; font: 700 15.5px var(--sans); }
.links a { text-decoration: none; color: rgba(253,246,234,.86); padding: 7px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.links a:hover { background: rgba(255,255,255,.08); }
.links a.on { background: #f8dfa4; color: var(--ink); }
.nav-r { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.ca-pill { display: inline-flex; align-items: center; gap: 8px; font: 700 14px var(--sans); color: rgba(253,246,234,.9); text-decoration: none; max-width: 230px; white-space: nowrap; }
.ca-pill::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #4cd07a; box-shadow: 0 0 8px #4cd07a; }
.ca-pill span { overflow: hidden; text-overflow: ellipsis; }
.x-link { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); transition: background .2s; }
.x-link:hover { background: rgba(255,255,255,.16); }
.x-link svg { display: block; width: 17px; height: 17px; fill: var(--cream); }
.x-follow { margin-top: 18px; } .x-follow svg { fill: currentColor; width: 16px; height: 16px; }
.foot-x { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--cream); font-weight: 800; } .foot-x svg { width: 15px; height: 15px; fill: currentColor; }
[hidden] { display: none !important; }

/* buttons: rounded pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 20px; border-radius: 999px; border: 2px solid transparent; font: 800 16px var(--sans); text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn.sun, .btn.ochre { background: linear-gradient(180deg, #ffd56a, var(--sun)); color: var(--ink); box-shadow: 0 6px 0 -1px var(--sun-deep), 0 14px 24px -12px rgba(120,70,0,.6); }
.btn.sun:hover, .btn.ochre:hover { transform: translateY(-1px); }
.btn.glass { background: rgba(46,29,21,.55); color: #fff; border-color: rgba(255,255,255,.45); backdrop-filter: blur(6px); }
.btn.glass:hover { background: rgba(46,29,21,.7); }
.btn.dark { background: var(--brown); color: var(--cream); }
.btn.line { background: transparent; color: inherit; border-color: currentColor; }
.btn.line:hover { background: rgba(58,36,23,.06); }
.btn.big { padding: 15px 28px; font-size: 18px; }
.btn.small { padding: 6px 14px; font-size: 14px; box-shadow: none; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* sections: transparent, the sky shows through; each has its landmark at the bottom */
main { position: relative; z-index: 5; }
.room { position: relative; min-height: 112vh; padding: 140px var(--gutter) 180px; display: flex; flex-direction: column; justify-content: center; }
.backdrop { position: absolute; left: 0; right: 0; bottom: 0; height: 88%; z-index: 0; pointer-events: none; will-change: transform; }
.backdrop svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* cream cards */
.panel { position: relative; z-index: 1; width: min(640px, 50%); padding: clamp(28px, 3.4vw, 48px); background: rgba(253,246,234,.97); color: var(--ink); border-radius: 30px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.7) inset, 0 34px 70px -34px rgba(40,20,70,.65); }
.side-r { margin-left: auto; }

/* type */
.h1, .h2, .coinword, .logo { font-optical-sizing: auto; }
.h1 { font: 800 clamp(50px, 6.2vw, 96px)/.98 var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -.02em; color: #fff; text-shadow: 0 4px 30px rgba(30,20,70,.35); max-width: 11ch; }
.h1 em { font-style: normal; color: var(--sun); display: inline-block; }
.h2 { font: 800 clamp(32px, 3.2vw, 50px)/1.06 var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -.015em; max-width: 18ch; color: var(--ink); }
.lead { font-size: 19px; line-height: 1.6; margin-top: 16px; max-width: 34em; color: var(--ink-soft); }
.small { font-size: 15px; margin-top: 18px; color: var(--ink-soft); }

/* hero: text straight on the sky */
.hero { min-height: 100vh; padding-top: 130px; padding-bottom: 60px; justify-content: space-between; }
.hero-copy { position: relative; z-index: 1; margin-top: 5vh; }
.hero .lead { color: #fff; font-size: 21px; font-weight: 700; max-width: 25em; text-shadow: 0 2px 14px rgba(30,20,70,.45); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.perks { position: relative; z-index: 1; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 48px; padding: 22px 8px;
  background: rgba(46,29,21,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 24px; border: 1px solid rgba(255,220,150,.25); color: var(--cream); }
.perks li { display: flex; gap: 14px; align-items: center; padding: 4px 22px; }
.perks li + li { border-left: 1px solid rgba(255,230,180,.18); }
.perks .ic { flex: none; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(180deg, #ffd96f, #eaa52a); box-shadow: inset 0 -3px 0 rgba(120,60,0,.25); }
.perks .ic svg { width: 26px; height: 26px; stroke: var(--ink); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.perks b { display: block; font: 800 17px/1.2 var(--sans); }
.perks span { display: block; font-size: 14.5px; line-height: 1.35; color: rgba(253,246,234,.75); margin-top: 3px; }

/* problem */
.three { display: grid; gap: 16px; margin-top: 24px; }
.three p { padding: 14px 16px 14px 18px; background: #fff; border-radius: 16px; border-left: 5px solid var(--sun); font-size: 17px; color: var(--ink-soft); }
.three strong, .facts2 strong { font: 800 1.08em var(--sans); color: var(--ink); display: block; }

/* how it works: three step cards in a row, the terminal under them */
.how-card { width: min(1060px, 74%); }
.stepcards { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin-top: 26px; counter-reset: s; }
.stepcards li { counter-increment: s; position: relative; padding: 30px 18px 18px; background: #fff; border-radius: 20px; text-align: center; box-shadow: 0 10px 24px -16px rgba(80,40,20,.5); }
.stepcards li::before { content: counter(s); position: absolute; left: 50%; top: -16px; transform: translateX(-50%); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); color: var(--ink); font: 800 16px var(--sans); box-shadow: 0 0 0 4px var(--cream); }
.stepcards li:not(:last-child)::after { content: ''; position: absolute; right: -24px; top: 50%; width: 12px; height: 12px; border-top: 3px solid var(--sun-deep); border-right: 3px solid var(--sun-deep); transform: translateY(-50%) rotate(45deg); }
.stepcards svg { width: 34px; height: 34px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stepcards b { display: block; font: 800 19px var(--sans); margin-top: 6px; }
.stepcards code { display: inline-block; margin-top: 6px; font-size: 13.5px; background: rgba(246,192,74,.22); }
.stepcards p { margin-top: 8px; font-size: 15px; line-height: 1.45; color: var(--ink-soft); }
.term { margin-top: 26px; background: var(--brown); color: var(--cream); border-radius: 18px; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 16px; border-bottom: 1px solid rgba(246,192,74,.25); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(253,246,234,.22); }
.term-bar i:first-child { background: #f08a6c; } .term-bar i:nth-child(2) { background: var(--sun); } .term-bar i:nth-child(3) { background: #7dc98a; }
.term-bar span { margin-left: 8px; font: 700 14px var(--sans); color: rgba(253,246,234,.7); }
.term-body { font: 13.5px/1.75 var(--mono); padding: 16px 18px; min-height: 230px; white-space: pre-wrap; }
.term-body .u { color: #fff; } .term-body .u::before { content: '> '; color: var(--sun); }
.term-body .t { color: rgba(253,246,234,.6); } .term-body .ok { color: #a8d8a0; } .term-body .wait { color: var(--sun); } .term-body .no { color: #f0907e; }

/* rules: a wax tablet in a wooden frame */
.tabletpanel { width: min(780px, 60%); }
.play { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.pol, .ask { padding: 22px; background: #2e231d; border-radius: 16px; color: var(--cream); box-shadow: inset 0 2px 12px rgba(0,0,0,.6), 0 0 0 6px #8a5a33; }
.pol label { display: block; font-size: 15.5px; color: rgba(253,246,234,.86); margin-bottom: 18px; }
.pol output { font: 800 17px var(--sans); color: var(--sun); }
input[type=range] { width: 100%; margin-top: 8px; accent-color: var(--sun); }
.ask-h { display: block; font: 800 19px var(--sans); color: var(--cream); margin-bottom: 10px; }
.ask-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ask-row input { width: 108px; font: 800 19px var(--sans); padding: 7px 10px; background: #1f1712; color: var(--cream); border: 1px solid rgba(246,192,74,.5); border-radius: 10px; }
.ask-row .unit { font-weight: 800; color: rgba(253,246,234,.7); }
.ask-row select { flex: 1; min-width: 150px; font: 15px var(--sans); padding: 9px; background: #1f1712; color: var(--cream); border: 1px solid rgba(246,192,74,.5); border-radius: 10px; }
.spent { font-size: 15px; margin: 14px 0; }
.verdict { margin-top: 14px; padding: 12px 14px; border-left: 4px solid; border-radius: 10px; background: rgba(0,0,0,.25); font-size: 15.5px; }
.verdict b { display: block; font: 800 19px var(--sans); }
.verdict.yes { border-color: #8fca86; color: #cfe8c9; } .verdict.ask { border-color: var(--sun); color: #f7dfa6; } .verdict.no { border-color: #f0907e; color: #f6c2b8; }

/* approvals + the wax seal */
.mock { margin-top: 24px; background: #fff; border-radius: 18px; box-shadow: 0 16px 34px -22px rgba(60,30,20,.6); overflow: hidden; }
.mock-head { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--cream-2); font: 800 15px var(--sans); }
.mock-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wait); }
.mock-head .where { margin-left: auto; font: 13px var(--mono); color: var(--ink-soft); }
.req { position: relative; display: flex; align-items: center; gap: 18px; padding: 18px 16px; }
.req-text { flex: 1; }
.req-text b { font: 800 19px var(--sans); } .req-text p { font-size: 15.5px; color: var(--ink-soft); } .req-text small { font-size: 13.5px; color: var(--ink-soft); opacity: .85; }
.req-btns { display: flex; align-items: center; gap: 10px; flex: none; }
.sealbtn { position: relative; width: 74px; height: 74px; border: 0; cursor: pointer; border-radius: 47% 53% 50% 50% / 52% 46% 54% 48%; color: #f6d9c8;
  background: radial-gradient(circle at 38% 32%, #c4473a, #8f2018 58%, #6a150f); box-shadow: inset 0 0 0 5px rgba(255,255,255,.08), inset 0 -6px 10px rgba(0,0,0,.35), 0 6px 14px -4px rgba(80,10,5,.6);
  font: 800 15px var(--sans); transition: transform .15s; }
.sealbtn::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; border: 1.5px solid rgba(255,220,200,.35); }
.sealbtn:hover { transform: rotate(-6deg) scale(1.04); }
.sealbtn:active { transform: scale(.94); }
.stamp { position: absolute; right: 120px; top: 50%; width: 112px; height: 112px; margin-top: -56px; display: grid; place-items: center; pointer-events: none; opacity: 0;
  border-radius: 46% 54% 52% 48% / 50% 46% 54% 50%; background: radial-gradient(circle at 38% 32%, #c4473a, #8f2018 60%, #6a150f); box-shadow: inset 0 -8px 14px rgba(0,0,0,.35), 0 10px 20px -8px rgba(80,10,5,.6); }
.stamp img { width: 74%; height: 74%; border-radius: 50%; filter: sepia(1) saturate(2.2) hue-rotate(-28deg) brightness(.72) contrast(1.2); mix-blend-mode: luminosity; opacity: .9; }
.stamp.on { animation: press .55s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes press { 0% { opacity: 0; transform: scale(1.8) rotate(-24deg); } 60% { opacity: 1; transform: scale(.92) rotate(-8deg); } 100% { opacity: 1; transform: scale(1) rotate(-10deg); } }
.req.sealed .req-btns { visibility: hidden; }
.req.refused { opacity: .55; }
.req-after { padding: 0 16px 16px; font-size: 15.5px; color: var(--ink-soft); }

/* agents */
.logos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.logos span { display: inline-flex; align-items: center; gap: 9px; padding: 8px 15px; background: #fff; border-radius: 999px; font: 700 15.5px var(--sans); color: var(--ink); box-shadow: 0 0 0 1px var(--cream-2); }
.logos svg { width: 18px; height: 18px; }
.code { margin-top: 20px; padding: 16px 18px; background: var(--brown); border-radius: 16px; font: 13.5px/1.7 var(--mono); color: var(--cream); overflow-x: auto; }

/* honest */
.facts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin-top: 22px; }
.facts2 p { font-size: 16px; color: var(--ink-soft); }
.boundary { margin-top: 24px; padding: 14px 18px; background: rgba(246,192,74,.18); border-radius: 16px; border-left: 5px solid var(--sun-deep); font: 700 17px/1.5 var(--sans); }

/* token */
.coinword { font: 800 clamp(34px, 4vw, 62px)/1.05 var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -.015em; color: var(--gold); max-width: 100%; overflow-wrap: anywhere; }
.ca-box { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 10px 10px 10px 18px; background: #fff; border: 2px dashed rgba(226,154,29,.6); border-radius: 16px; }
.ca-box .lbl { font: 800 15px var(--sans); color: var(--gold); }
.ca-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; color: var(--ink); font-size: 15px; }

/* install */
.cmd { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 10px 10px 10px 18px; background: var(--brown); color: var(--cream); border-radius: 16px; font: 14px var(--mono); }
.cmd .pr { color: var(--sun); } .cmd span:nth-child(2) { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 14px; margin-top: 22px; }
.steps li { counter-increment: s; position: relative; padding-left: 46px; font-size: 16.5px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); color: var(--ink); font: 800 15px var(--sans); }
.steps code { font-size: 14px; background: rgba(246,192,74,.22); }

.foot { position: relative; z-index: 5; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 24px var(--gutter); background: var(--brown); color: rgba(253,246,234,.72); font-size: 15px; }
.toast { position: fixed; left: 50%; bottom: 84px; z-index: 50; transform: translate(-50%, 14px); opacity: 0; padding: 10px 18px; background: var(--cream); color: var(--ink); border-radius: 999px; border: 2px solid var(--ink); font: 700 15px var(--sans); transition: all .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* one reveal per section: the card rises in */
.panel { transition: transform 1s cubic-bezier(.2,.75,.15,1), opacity .8s ease; }
.room:not(.in) .panel { opacity: 0; transform: translateY(40px); }

@media (max-width: 1100px) { .perks { grid-template-columns: 1fr 1fr; row-gap: 16px; } .perks li:nth-child(3) { border-left: 0; } }
@media (max-width: 960px) {
  body { font-size: 17px; }
  .links { display: none; }
  .nav { gap: 12px; padding: 8px 10px 8px 12px; }
  .nav .btn { display: none; }
  .ca-pill { max-width: 160px; font-size: 13px; }
  .room { min-height: auto; padding: 110px 16px 190px; }
  .hero { min-height: 100vh; justify-content: flex-start; padding-top: 100px; }
  .panel, .how-card, .tabletpanel { width: 100%; margin: 0; }
  .perks { grid-template-columns: 1fr; } .perks li + li { border-left: 0; }
  .stepcards { grid-template-columns: 1fr; gap: 26px; } .stepcards li:not(:last-child)::after { right: 50%; top: auto; bottom: -20px; transform: translateX(50%) rotate(135deg); }
  .play, .facts2 { grid-template-columns: 1fr; }
  .req { flex-direction: column; align-items: stretch; } .stamp { right: 20px; top: 30px; margin-top: 0; }
  .bubble { display: none; }
}
@media (prefers-reduced-motion: reduce) { .panel { transition: none; } .room:not(.in) .panel { opacity: 1; transform: none; } #loader img, #sky .tw { animation: none; } }

/* announcement pill under the nav (set from the admin panel) */
.announce { position: fixed; z-index: 19; top: 92px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 8px 18px; border-radius: 999px; background: linear-gradient(180deg, #ffd56a, var(--sun)); color: var(--ink); font: 800 15px var(--sans); box-shadow: 0 10px 24px -12px rgba(40,20,60,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 960px) { .announce { top: 74px; font-size: 13px; } }
