:root {
  --bg: #000000;
  --card: #141416;
  --ink: #f4f3ef;
  --soft: rgba(244, 243, 239, 0.6);
  --faint: rgba(244, 243, 239, 0.34);
  --line: rgba(244, 243, 239, 0.1);
  --accent: #7c8cff;
  --paper: #f6f4ee;
  --dark: #17171c;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

.sd { position: relative; width: min(326px, 100%, calc((100vh - 170px) * 16 / 9 + 24px)); padding: 12px; border-radius: 24px; background: linear-gradient(180deg, #19191c, var(--card)); box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07); outline: none; }
.sd:focus-visible { box-shadow: 0 0 0 1px var(--line), 0 0 0 3px var(--ink); }

/* the screen: every slide sits on top of the others, only one is in view */
.sd__screen { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; background: #0a0a0c; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); touch-action: pan-y; }
.sd__slide { position: absolute; inset: 0; display: grid; align-content: center; justify-items: start; padding: 0 9%; border-radius: 14px; background: var(--paper); color: #1a191d; visibility: hidden; will-change: transform; }
.sd__slide.is-on { visibility: visible; }
.sd__kicker { font-size: 9.500px; line-height: 13px; font-weight: 680; letter-spacing: 0.02em; color: color-mix(in srgb, var(--accent) 72%, #1a191d); }
.sd__slide h2 { margin-top: 5px; font-size: clamp(22px, 8.400vw, 29px); line-height: 1; font-weight: 760; letter-spacing: -0.03em; }
.sd__slide p { margin-top: 7px; font-size: 11px; line-height: 15px; font-weight: 560; opacity: 0.66; }
.sd__slide--a .sd__arc { position: absolute; right: -14%; bottom: -46%; width: 62%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 50%, #ffffff), var(--accent)); }
.sd__slide--b { background: radial-gradient(90% 120% at 100% 100%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), #1f1f27; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09); }
.sd__slide--b .sd__kicker { color: var(--accent); }
.sd__big { margin-top: 2px; font-size: clamp(38px, 15vw, 54px); line-height: 1; font-weight: 780; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--accent); }
.sd__slide--b p { margin-top: 4px; }
.sd__flow { display: flex; align-items: center; gap: 5px; margin-top: 9px; width: 100%; }
.sd__flow span { flex: 1 1 0; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #ffffff; box-shadow: 0 0 0 1px rgba(26, 25, 29, 0.1), 0 4px 8px -5px rgba(26, 25, 29, 0.4); font-size: 10px; font-weight: 680; }
.sd__flow span:last-child { background: var(--accent); color: #ffffff; box-shadow: none; }
.sd__flow i { flex: none; width: 10px; height: 1.500px; border-radius: 1px; background: rgba(26, 25, 29, 0.3); }
.sd__slide--d { background: color-mix(in srgb, var(--accent) 16%, var(--paper)); }
.sd__plans { display: flex; gap: 7px; margin-top: 8px; }
.sd__plans span { display: grid; min-width: 64px; padding: 6px 10px 7px; border-radius: 10px; background: #ffffff; box-shadow: 0 0 0 1px rgba(26, 25, 29, 0.1); }
.sd__plans em { font-style: normal; font-size: 9.500px; font-weight: 660; opacity: 0.6; }
.sd__plans b { font-size: 19px; line-height: 22px; font-weight: 760; letter-spacing: -0.02em; }
.sd__plans .is-main { background: #1a191d; color: #ffffff; box-shadow: 0 8px 12px -8px rgba(26, 25, 29, 0.7); }
.sd__slide--e { background: var(--accent); color: #ffffff; }
.sd__slide--e .sd__kicker { color: rgba(255, 255, 255, 0.8); }

.sd__bar { display: flex; align-items: center; gap: 8px; height: 36px; margin-top: 8px; }
.sd__nav { flex: none; width: 32px; height: 32px; border: 0; border-radius: 11px; display: grid; place-items: center; background: #222226; color: var(--ink); cursor: pointer; outline: none; box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07); transition: background-color 0.2s ease, opacity 0.25s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sd__nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.800; stroke-linecap: round; stroke-linejoin: round; }
.sd__nav:disabled { opacity: 0.32; cursor: default; }
.sd__nav:focus-visible, .sd__thumb:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.sd__name { flex: 1 1 auto; height: 20px; overflow: hidden; text-align: center; font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: -0.005em; white-space: nowrap; }
.sd__name span { display: block; }
@media (hover: hover) { .sd__nav:not(:disabled):hover { background: #2c2c31; } }

.sd__thumbs { --i: 0; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.sd__thumb { position: relative; aspect-ratio: 16 / 9; border: 0; border-radius: 6px; background: var(--paper); cursor: pointer; outline: none; overflow: hidden; opacity: 0.55; transition: opacity 0.3s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sd__thumb.is-on { opacity: 1; }
.sd__thumb i { position: absolute; left: 14%; top: 30%; width: 44%; height: 12%; border-radius: 2px; background: currentColor; opacity: 0.8; box-shadow: 0 0.500em 0 -0.050em currentColor; font-size: 10px; }
.sd__thumb.sd__slide--a { color: #1a191d; }
.sd__thumb.sd__slide--b { background: #1f1f27; color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }
.sd__thumb.sd__slide--c { color: #1a191d; }
.sd__thumb.sd__slide--d { background: color-mix(in srgb, var(--accent) 16%, var(--paper)); color: #1a191d; }
.sd__thumb.sd__slide--e { background: var(--accent); color: #ffffff; }
/* one ring for all the thumbnails: it moves with a single number */
.sd__ring { position: absolute; top: -3px; bottom: -3px; left: calc(var(--i) * (100% + 6px) / 5 - 3px); width: calc((100% - 24px) / 5 + 6px); border-radius: 9px; box-shadow: inset 0 0 0 1.500px var(--ink); pointer-events: none; z-index: 2; }
@media (hover: hover) { .sd__thumb:hover { opacity: 1; } }

.sd__note { display: flex; align-items: center; gap: 7px; height: 28px; margin-top: 9px; padding: 0 9px; border-radius: 9px; background: rgba(244, 243, 239, 0.05); font-size: 11.500px; font-weight: 560; color: var(--soft); }
.sd__note svg { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--faint); stroke-width: 1.500; stroke-linecap: round; }
.sd__noteroll { flex: 1 1 auto; min-width: 0; height: 16px; line-height: 16px; overflow: hidden; white-space: nowrap; }
.sd__noteroll span { display: block; overflow: hidden; text-overflow: ellipsis; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #f4f3ef; stroke: #000000; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); z-index: 6; }
