:root {
  --bg: #f3f2ee;
  --ink: #16171b;
  --soft: rgba(22, 23, 27, 0.56);
  --line: rgba(22, 23, 27, 0.1);
  --card: #ffffff;
  --pass: #16171b;
}

*, *::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: clamp(8px, 2.400vh, 26px) clamp(12px, 4vw, 40px);
}

/* every size also looks at the height of the window, so the whole tool sits in a short box */
.cc { width: min(420px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(8px, 2.200vh, 16px); }

.cc__flip { perspective: 900px; }
.cc__preview { display: flex; align-items: center; gap: clamp(12px, 4vw, 22px); height: clamp(84px, 25vh, 168px); padding: 0 clamp(16px, 5vw, 28px); border-radius: 24px; box-shadow: inset 0 0 0 1px var(--line), 0 20px 36px -26px rgba(22, 23, 27, 0.4); overflow: hidden; }
.cc__aa { font-size: clamp(44px, min(17vw, 15vh), 84px); line-height: 1; font-weight: 760; font-stretch: 108%; letter-spacing: -0.04em; }
.cc__lines { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cc__lines b { font-size: clamp(14px, 2.700vh, 17px); font-weight: 680; line-height: 1.2; }
.cc__lines span { font-size: 11.500px; font-weight: 520; line-height: 1.35; }

.cc__read { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.cc__ratio { display: flex; align-items: baseline; gap: 2px; }
.cc__ratio b { --w: 500; font-size: clamp(34px, min(11vw, 9vh), 52px); line-height: 0.95; font-weight: 400; font-variation-settings: "wght" var(--w), "wdth" 106; letter-spacing: -0.03em; }
.cc__ratio i { font-style: normal; font-size: 16px; font-weight: 640; color: var(--soft); }
.cc__roll { display: block; overflow: hidden; }
.cc__roll > span { display: block; white-space: nowrap; }
.cc__verdict { height: 22px; line-height: 22px; padding-bottom: 0; font-size: 14px; font-weight: 700; }

.cc__marks { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cc__marks li { display: flex; align-items: center; gap: 6px; height: clamp(34px, 8.500vh, 42px); padding: 0 10px 0 8px; border-radius: 13px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--soft); font-size: 12px; white-space: nowrap; transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; }
.cc__marks li.is-on { background: var(--pass); color: #ffffff; box-shadow: inset 0 0 0 1px var(--pass); }
.cc__marks svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.900; stroke-linecap: round; stroke-linejoin: round; }
.cc__marks .ok { display: none; }
.cc__marks li.is-on .ok { display: inline; }
.cc__marks li.is-on .no { display: none; }
.cc__marks b { font-weight: 720; }
.cc__marks span { margin-left: auto; font-weight: 600; opacity: 0.7; }

.cc__slider { position: relative; height: 40px; outline: none; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; }
.cc__slider:active { cursor: grabbing; }
.cc__track { position: absolute; left: 0; right: 0; top: 7px; height: 26px; border-radius: 13px; box-shadow: inset 0 0 0 1px rgba(22, 23, 27, 0.12); overflow: hidden; }
.cc__ticks i { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #ffffff; mix-blend-mode: difference; opacity: 0.75; }
.cc__ticks b { position: absolute; top: 7px; font-size: 9.500px; font-weight: 760; letter-spacing: 0.03em; color: #ffffff; mix-blend-mode: difference; opacity: 0.85; transform: translateX(-100%); padding-right: 5px; }
.cc__thumb { position: absolute; left: 0; top: 2px; width: 36px; height: 36px; margin-left: -18px; border-radius: 50%; background: #ffffff; box-shadow: 0 0 0 1px rgba(22, 23, 27, 0.1), 0 4px 10px -3px rgba(22, 23, 27, 0.4), inset 0 0 0 7px #ffffff, inset 0 0 0 18px var(--now, #16171b); will-change: transform; }
.cc__slider:focus-visible .cc__thumb { box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 7px #ffffff, inset 0 0 0 18px var(--now, #16171b); }

.cc__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cc__well { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 11px; font-weight: 600; color: var(--soft); }
.cc__well i { flex: none; width: 26px; height: 26px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(22, 23, 27, 0.14); }
.cc__well span { display: flex; flex-direction: column; line-height: 1.25; }
.cc__well b { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 600; color: var(--ink); }
.cc__well:last-child { flex-direction: row-reverse; text-align: right; }
.cc__swap { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 2px 5px -2px rgba(22, 23, 27, 0.2); color: var(--ink); cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.cc__swap svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.700; stroke-linecap: round; stroke-linejoin: round; }
.cc__swap:active { transform: scale(0.9); }
.cc__swap:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }

@media (hover: hover) {
  .cc__swap:hover { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .cc__marks li, .cc__swap { transition: none; }
}

.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(22, 23, 27, 0.3)); z-index: 5; }
