/* The public site's demos at /demos/ (coder-1167; wgit-platform-pm
 * branding/public_demos/PUBLIC_DEMOS_DESIGN.md v1.2 §3): dusk over still water, the app's own
 * screens standing in it. The landing page's own fonts and colours; no outside request. */

@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:200 800;font-display:swap;src:url(../fonts/plus-jakarta-sans-latin-wght-normal.woff2) format('woff2')}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/playfair-display-latin-700-normal.woff2) format('woff2')}

:root {
  --nv: #0A1428;
  --bl: #2563EB;
  --bl6: #1D4ED8;
  --bll: #6EA8FE;
  --am: #F5B544;
  --ink: #0F172A;
  --ink2: #475569;
  --ink3: #5B6A80;
  --line: #E3E8F0;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --hx: 30vw;
  --hy: 40vh;
  --glow: 1;
  --wl: 80px;
  --ww: 360px;
  --wt: 50vh;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  overflow: hidden; background: #030713; color: #fff; font-family: var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
:focus-visible { outline: 3px solid var(--bll); outline-offset: 2px; border-radius: 8px; }

/* ---- the sky (design §3.4): CSS behind the canvas; the horizon is --hy, the sun on it at --hx ---- */
#sky{position:fixed;inset:0;z-index:0;background:
  linear-gradient(to bottom,#02050E 0,#050E26 calc(var(--hy)*.3),#0A1C47 calc(var(--hy)*.66),#183A80 calc(var(--hy)*.92),#3A66BE calc(var(--hy) - 1px),
  #17357A var(--hy),#0B1D45 calc(var(--hy) + 6vh),#06102A calc(var(--hy) + 26vh),#030713 100%)}
#sky i{position:absolute;inset:0;opacity:var(--glow);transition:opacity 2.6s ease}
#sky .g1{background:radial-gradient(ellipse 90vmax 26vh at var(--hx) var(--hy),rgba(110,168,254,.55),rgba(110,168,254,0) 70%)}
#sky .g2{background:radial-gradient(ellipse 46vmax 5vh at var(--hx) var(--hy),rgba(255,206,140,.7),rgba(245,181,68,0) 72%)}
#sky .cl{opacity:calc(var(--glow)*.9);background:
  radial-gradient(ellipse 30vmax 1vh at calc(var(--hx) - 24vmax) calc(var(--hy) - 5.5vh),rgba(150,184,255,.26),rgba(150,184,255,0) 70%),
  radial-gradient(ellipse 24vmax .8vh at calc(var(--hx) + 34vmax) calc(var(--hy) - 8.5vh),rgba(150,184,255,.2),rgba(150,184,255,0) 70%),
  radial-gradient(ellipse 40vmax 1.3vh at calc(var(--hx) + 12vmax) calc(var(--hy) - 3.2vh),rgba(255,204,150,.26),rgba(255,204,150,0) 70%),
  radial-gradient(ellipse 22vmax .7vh at calc(var(--hx) - 6vmax) calc(var(--hy) - 11vh),rgba(140,170,255,.16),rgba(140,170,255,0) 70%),
  radial-gradient(ellipse 52vmax 1.6vh at calc(var(--hx) - 40vmax) calc(var(--hy) - 14vh),rgba(110,150,255,.1),rgba(110,150,255,0) 70%)}
#sky .sun{background:radial-gradient(circle at var(--hx) var(--hy),#FFF6E2 0,rgba(255,220,160,.95) 1vmax,rgba(245,181,68,.4) 2.4vmax,rgba(245,181,68,0) 7vmax);
  clip-path:inset(0 0 calc(100% - var(--hy)) 0)}
#sky .col{background:radial-gradient(ellipse 5vmax 34vh at var(--hx) var(--hy),rgba(255,222,176,.3),rgba(255,222,176,0) 72%),
  radial-gradient(ellipse 60vmax 12vh at var(--hx) var(--hy),rgba(110,168,254,.28),rgba(110,168,254,0) 70%);
  clip-path:inset(var(--hy) 0 0 0)}
#hz{position:fixed;left:0;right:0;top:calc(var(--hy) - 1px);height:2px;z-index:1;
  background:radial-gradient(ellipse 70vmax 100% at var(--hx) 50%,rgba(255,244,224,1),rgba(170,204,255,.4) 55%,rgba(160,196,255,0))}
#vig{position:fixed;inset:0;z-index:3;pointer-events:none;background:radial-gradient(ellipse 120% 100% at 50% 45%,rgba(0,0,0,0) 55%,rgba(2,5,12,.55))}
.fx { position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none; }

/* ---- the world: a logical stage, scaled to the screen; every page and card is placed in it ---- */
.stage { position: fixed; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }

/* A page: the app's screen in a window frame. */
.pg {
  position: absolute; left: 0; top: 0; border-radius: 12px; overflow: hidden; background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08), 0 0 60px rgba(110, 168, 254, .12);
  backface-visibility: hidden; will-change: transform;
}
.win {
  display: flex; align-items: center; gap: 7px; padding: 0 12px; background: #EEF2F8;
  border-bottom: 1px solid var(--line); color: var(--ink3); font-size: 12px;
}
.win i { width: 9px; height: 9px; border-radius: 50%; background: #CFD7E4; flex: none; }
.win span {
  flex: 1; margin-left: 10px; max-width: 46%; background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[data-mode="mob"] .win { gap: 5px; padding: 0 8px; font-size: 10.5px; }
[data-mode="mob"] .win i { width: 6px; height: 6px; }
[data-mode="mob"] .win span { max-width: none; margin-left: 6px; padding: 1px 8px; text-align: center; }
.scr { position: relative; overflow: hidden; }
.st { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ov { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.ptr {
  position: absolute; left: 0; top: 0; width: 25px; height: 36px; opacity: 0; transform-origin: 0 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 36'%3E%3Cpath d='M2 2v27l7-6.5 4.8 10.6 4.6-2-4.8-10.4 9.4-.3z' fill='%23fff' stroke='%230F172A' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
}
.ptr.touch {
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255, 255, 255, .5);
  border: 2.5px solid rgba(37, 99, 235, .9); transform-origin: 50% 50%;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .35);
}
.ring { position: absolute; width: 46px; height: 46px; border: 3px solid var(--bl); border-radius: 50%; opacity: 0; transform: translate(-50%, -50%); }
.typed { position: absolute; white-space: pre-wrap; overflow-wrap: break-word; padding: 1px 2px; border-radius: 3px; }
.typed .kept { color: transparent; }
.caret { display: inline-block; width: 1.5px; height: 1.1em; margin-left: 1px; vertical-align: -.15em; background: currentColor; }
.tick {
  position: absolute; right: 5%; top: 9%; width: 24%; aspect-ratio: 1; border-radius: 50%; opacity: 0;
  transform: scale(.4); transition: opacity .35s ease, transform .45s cubic-bezier(.3, 1.6, .5, 1);
  background: var(--bl) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 64% no-repeat;
  box-shadow: 0 0 0 8px rgba(110, 168, 254, .35), 0 6px 20px rgba(0, 0, 0, .4);
}
.pg.done .tick { opacity: 1; transform: none; }
.haze { position: absolute; inset: 0; background: #1E4189; opacity: 0; pointer-events: none; border-radius: inherit; }

/* The ending's cards (design §3.4): white, rounded, a soft blue glow and a faint reflection. */
.card {
  position: absolute; left: 0; top: 0; padding: 12px 16px 14px; border-radius: 14px; background: #fff; color: var(--ink);
  box-shadow: 0 0 0 1px rgba(110, 168, 254, .35), 0 10px 34px rgba(110, 168, 254, .42), 0 18px 40px rgba(0, 0, 0, .35);
  backface-visibility: hidden; will-change: transform;
}
.card small { display: block; font-size: 12px; font-weight: 750; letter-spacing: .2px; color: var(--bl); }
.card b { display: block; margin-top: 3px; font-size: 15.5px; line-height: 1.3; font-weight: 750; letter-spacing: -.1px; }
.card span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--ink3); }
.card .refl {
  position: absolute; left: 10%; right: 10%; top: 100%; height: 46%; margin-top: 8px; border-radius: 12px;
  background: linear-gradient(rgba(190, 214, 255, .1), rgba(190, 214, 255, 0)); filter: blur(8px); pointer-events: none;
}
.card.ready { box-shadow: 0 0 0 2.5px var(--bl), 0 10px 34px rgba(110, 168, 254, .5), 0 18px 40px rgba(0, 0, 0, .35); }
.card.done { box-shadow: 0 0 0 2px #22A55B, 0 10px 34px rgba(110, 230, 160, .45), 0 18px 40px rgba(0, 0, 0, .35); }
.card.done small { color: #15803D; }
.card.done::after { content: ""; position: absolute; right: 12px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: #22A55B; box-shadow: 0 0 10px #4ADE80; }
.card.wait { background: #E9EDF4; color: #475569; box-shadow: 0 0 0 1px rgba(160, 180, 210, .5), 0 10px 30px rgba(110, 168, 254, .2), 0 18px 40px rgba(0, 0, 0, .35); }
.card.wait small { color: #6B7A90; }
.card.idea { background: #FFF4DE; box-shadow: 0 0 0 2px var(--am), 0 10px 34px rgba(245, 181, 68, .5), 0 18px 40px rgba(0, 0, 0, .35); }
.card.idea small { color: #B45309; }
.card.plate { background: #E6EEFC; }
.card.plate small { color: var(--bl6); }
[data-mode="mob"] .card { padding: 14px 18px 16px; border-radius: 16px; }
[data-mode="mob"] .card small { font-size: 16px; }
[data-mode="mob"] .card b { font-size: 21px; }
[data-mode="mob"] .card span { font-size: 17.5px; }
.saying {
  position: absolute; left: 0; top: 0; padding: 14px 20px; border-radius: 14px; background: #fff; color: var(--ink);
  font-size: 19px; line-height: 1.45; font-weight: 550;
  box-shadow: 0 0 0 2px var(--bll), 0 14px 40px rgba(110, 168, 254, .45);
}
[data-mode="mob"] .saying { font-size: 17px; }
.env {
  position: absolute; left: 0; top: 0; width: 28px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 20'%3E%3Crect x='1' y='1' width='26' height='18' rx='3' fill='%23fff' stroke='%232563EB' stroke-width='1.6'/%3E%3Cpath d='m2.5 3 11.5 8.5L25.5 3' fill='none' stroke='%232563EB' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat;
  filter: drop-shadow(0 0 8px rgba(110, 168, 254, .9));
}

/* ---- the header ---- */
.top {
  position: fixed; left: 0; right: 0; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 18px;
  padding: 0 calc(var(--wl) - 4px);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; letter-spacing: -.3px; text-decoration: none; color: #fff; }
.logo img { width: 26px; height: 26px; }
.back {
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(5, 12, 30, .35);
  color: #fff; font-size: 14px; font-weight: 650;
}
.back:hover { background: rgba(255, 255, 255, .1); }
[data-mode="mid"] .top { padding: 0 24px; height: 60px; }
[data-mode="mob"] .top { padding: 0 14px; height: 48px; justify-content: space-between; }
[data-mode="mob"] .logo { font-size: 16px; }
[data-mode="mob"] .logo img { width: 22px; height: 22px; }
[data-mode="mob"] .back { height: 36px; padding: 0 12px; font-size: 13px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px;
  font-weight: 650; font-size: 14.5px; border: 1px solid transparent; white-space: nowrap; transition: background-color .2s ease;
}
.btn.pri { background: var(--bl); color: #fff; box-shadow: 0 8px 24px rgba(37, 99, 235, .35); }
.btn.pri:hover { background: var(--bl6); }
.btn.ghost { border-color: rgba(255, 255, 255, .45); background: rgba(5, 12, 30, .3); color: #fff; }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }

/* ---- the chooser (§3.1) ---- */
.chooser { position: fixed; inset: 0; z-index: 10; overflow-y: auto; overscroll-behavior: contain; padding: 70px 28px 48px; }
.chead { text-align: center; max-width: 760px; margin: 0 auto; }
.chead h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.5px; line-height: 1.08; text-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
.chead p { margin: 12px 0 0; color: #C5D0E2; font-size: 17px; }
.cards {
  list-style: none; margin: 34px auto 0; padding: 0; display: grid; gap: 26px 22px; justify-content: center;
  grid-template-columns: repeat(4, minmax(0, 272px));
}
.dcard {
  display: flex; flex-direction: column; background: #fff; color: var(--ink); border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 46px rgba(110, 168, 254, .2);
  animation: drift calc(6.5s + var(--i) * .83s) ease-in-out calc(var(--i) * -1.7s) infinite alternate;
}
.dcard:nth-child(even) { animation-direction: alternate-reverse; }
@keyframes drift {
  from { transform: perspective(1000px) rotateY(-2.2deg) rotateX(1deg) translateY(0); }
  to { transform: perspective(1000px) rotateY(2.4deg) rotateX(-1.2deg) translateY(-7px); }
}
.dpic { aspect-ratio: 2 / 1; overflow: hidden; background: #EEF2F8; border-bottom: 1px solid var(--line); }
.dpic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.dtx { display: flex; flex-direction: column; gap: 5px; padding: 12px 16px 14px; flex: 1; }
.darea { font-size: 11.5px; font-weight: 750; letter-spacing: 1.1px; text-transform: uppercase; color: var(--bl6); }
.dtx h2 { margin: 0; font-size: 16.5px; line-height: 1.28; letter-spacing: -.2px; }
.dtx p { margin: 0 0 6px; color: var(--ink2); font-size: 13px; line-height: 1.45; flex: 1; }
.dtx .btn { height: 38px; padding: 0 15px; font-size: 14px; }
.dtx .btn { align-self: flex-start; }
.nojs { text-align: center; color: #C5D0E2; }
[data-mode="mid"] .cards { grid-template-columns: repeat(3, minmax(0, 272px)); }
[data-mode="mob"] .chooser { padding: 64px 18px 40px; }
[data-mode="mob"] .chead { padding-top: 6px; }
[data-mode="mob"] .chead h1 { font-size: 32px; }
[data-mode="mob"] .chead p { font-size: 15.5px; }
[data-mode="mob"] .cards { grid-template-columns: minmax(0, 354px); margin-top: max(26px, calc(var(--hy) - 160px)); gap: 22px; }
[data-mode="mob"] .dpic { aspect-ratio: 16 / 9; }

/* ---- the playing demo (§3.2) ---- */
.player { position: fixed; z-index: 10; }
.words { pointer-events: none; }
.words .demo { font-size: 12.5px; font-weight: 650; color: #9FB3D6; letter-spacing: .2px; }
.words .k { margin-top: 14px; font-size: 13px; font-weight: 750; color: var(--bll); letter-spacing: .3px; }
.words h2 { margin: 6px 0 0; font-size: 28px; line-height: 1.18; letter-spacing: -.4px; font-weight: 750; text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
.words p { margin: 8px 0 0; font-size: 16px; line-height: 1.5; color: #C5D0E2; text-shadow: 0 2px 14px rgba(0, 0, 0, .6); }
.ctl, .end { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.bars { display: flex; gap: 2px; flex: 0 1 auto; min-width: 0; }
.bar { display: flex; align-items: center; flex: 0 1 34px; width: 34px; min-width: 16px; height: 32px; padding: 0 3px; border: 0; background: none; }
.bar i { display: block; width: 100%; height: 4px; border-radius: 99px; background: #4A6290; overflow: hidden; }
.bar b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--bll); }
.bar.done b { width: 100%; }
.bar:hover i { background: #6880AE; }
.play {
  height: 38px; min-width: 64px; padding: 0 14px; border-radius: 9px; border: 1px solid #5C77A8;
  background: rgba(5, 12, 30, .35); color: #DCE4F2; font-size: 13px; font-weight: 600; flex: none;
}
.play:hover { background: rgba(255, 255, 255, .08); }
[data-mode="side"] .player { left: var(--wl); top: var(--wt); width: var(--ww); }
[data-mode="mid"] .player, [data-mode="mob"] .player {
  left: 0; right: 0; bottom: 0; padding: 14px 24px 18px;
  background: linear-gradient(to bottom, rgba(3, 7, 19, 0), rgba(3, 7, 19, .82) 30%, rgba(3, 7, 19, .92));
}
[data-mode="mid"] .player { height: 190px; }
[data-mode="mid"] .words h2 { font-size: 22px; }
[data-mode="mid"] .words .k { margin-top: 6px; }
[data-mode="mid"] .ctl, [data-mode="mid"] .end { margin-top: 12px; }
[data-mode="mob"] .player { height: 170px; padding: 16px 14px 10px; }
[data-mode="mob"] .words .demo { display: none; }
[data-mode="mob"] .words .k { margin-top: 0; font-size: 12px; }
[data-mode="mob"] .words h2 { margin-top: 3px; font-size: 18.5px; }
[data-mode="mob"] .words p { margin-top: 4px; font-size: 14px; line-height: 1.42; }
[data-mode="mob"] .ctl { position: absolute; left: 10px; right: 10px; bottom: 8px; margin: 0; gap: 4px; }
[data-mode="mob"] .player.ended .ctl, [data-mode="mid"] .player.ended .ctl { display: none; }
[data-mode="mob"] .end { position: absolute; left: 14px; right: 14px; bottom: 10px; margin: 0; gap: 10px; }
[data-mode="mob"] .end .btn { flex: 1 1 0; padding: 0 10px; }
[data-mode="mob"] .bars { flex: 1 1 auto; flex-wrap: nowrap; gap: 0; min-width: 0; }
[data-mode="mob"] .bar { flex: 1 1 0; width: auto; min-width: 0; height: 44px; }
[data-mode="mob"] .play { width: 56px; min-width: 0; height: 44px; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  .dcard { animation: none; }
  .tick, #sky i { transition: none; }
}
