:root {
  --bg: #ffffff;
  --card: #f7f5f1;
  --ink: #1b1a1d;
  --soft: rgba(27, 26, 29, 0.56);
  --quiet: rgba(27, 26, 29, 0.06);
  --accent: #8a2846;
}

*, *::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 10px;
}

.ag { position: relative; width: min(316px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 22px 20px 20px; border-radius: 30px; background: linear-gradient(180deg, #fbfaf8, var(--card)); box-shadow: inset 0 0 0 1px rgba(27, 26, 29, 0.07), inset 0 1px 0 #ffffff, 0 1px 2px rgba(27, 26, 29, 0.05), 0 26px 44px -30px rgba(27, 26, 29, 0.4); text-align: center; }
.ag button { font: inherit; border: 0; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; color: inherit; background: none; }
.ag button:focus-visible { box-shadow: 0 0 0 2px #fbfaf8, 0 0 0 4px var(--ink); }
.ag__roll { display: block; overflow: hidden; }
.ag__roll > span { display: block; white-space: nowrap; }
.ag__roll--in { display: inline-block; vertical-align: bottom; }

/* the seal: a dial of ticks, a ring that closes on yes, the age in the middle */
.ag__seal { position: relative; width: 78px; height: 78px; display: grid; place-items: center; }
.ag__seal svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; }
.ag__dial { stroke: var(--ink); stroke-width: 2.400; stroke-dasharray: 0.160 0.840; opacity: 0.22; }
.ag__track { stroke: rgba(27, 26, 29, 0.09); stroke-width: 3; }
.ag__ring { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.ag__tick { stroke: var(--accent); stroke-width: 3.400; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.ag__num { position: relative; display: flex; align-items: flex-start; font-size: 27px; line-height: 30px; font-weight: 780; font-stretch: 96%; letter-spacing: -0.02em; }
.ag__num i { font-style: normal; font-size: 15px; line-height: 20px; font-weight: 760; color: var(--accent); margin-left: 1px; }
.ag__ripple { position: absolute; inset: 7px; border-radius: 50%; box-shadow: 0 0 0 2px var(--accent); opacity: 0; pointer-events: none; }

.ag__title { margin-top: 14px; font-size: 21px; line-height: 26px; font-weight: 740; font-stretch: 102%; letter-spacing: -0.018em; white-space: nowrap; }
.ag__title > span, .ag__sub > span { display: block; }
.ag__sub { margin-top: 4px; font-size: 13.500px; line-height: 18px; font-weight: 520; color: var(--soft); white-space: nowrap; }

/* the two folds: what you answer with, and what is left once you have */
.ag__fold { width: calc(100% + 8px); margin: 0 -4px -18px; padding: 0 4px 18px; overflow: hidden; }
.ag__fold--shut { height: 0; opacity: 0; visibility: hidden; }

.ag__seg { position: relative; display: flex; height: 36px; margin-top: 14px; padding: 3px; border-radius: 18px; background: var(--quiet); }
.ag__seg button { position: relative; z-index: 1; flex: 1 1 0; min-width: 0; height: 30px; border-radius: 15px; font-size: 13px; font-weight: 640; color: var(--soft); transition: color 0.25s; }
.ag__seg button[aria-checked="true"] { color: var(--ink); }
.ag__thumb { position: absolute; left: 0; top: 3px; width: 60px; height: 30px; border-radius: 15px; background: #ffffff; box-shadow: 0 1px 2px rgba(27, 26, 29, 0.12), 0 4px 10px -4px rgba(27, 26, 29, 0.2); }

.ag__row { display: flex; gap: 8px; margin-top: 12px; }
.ag__row button { height: 48px; border-radius: 24px; font-size: 15px; font-weight: 720; font-stretch: 104%; white-space: nowrap; }
.ag__press { display: inline-block; }
.ag .ag__no { flex: none; width: 84px; background: var(--quiet); }
.ag .ag__yes { flex: 1 1 0; min-width: 0; background: var(--accent); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 14px 22px -14px var(--accent); transition: filter 0.25s; }
.ag .ag__yes:focus-visible { box-shadow: 0 0 0 2px #fbfaf8, 0 0 0 4px var(--ink); }

.ag .ag__back { display: inline-flex; align-items: center; gap: 7px; height: 36px; margin-top: 14px; padding: 0 16px 0 12px; border-radius: 18px; font-size: 13px; font-weight: 660; }
.ag .ag__back { font-stretch: 102%; background: var(--quiet); }
.ag__back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.600; stroke-linecap: round; stroke-linejoin: round; }

@media (hover: hover) {
  .ag .ag__yes:hover { filter: brightness(1.12); }
  .ag .ag__no:hover, .ag .ag__back:hover { background: rgba(27, 26, 29, 0.1); }
  .ag__seg button:hover { color: var(--ink); }
}

.ag__say { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; pointer-events: none; opacity: 0; fill: var(--ink); stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 3px rgba(27, 26, 29, 0.3)); z-index: 5; }
