:root {
  --bg: #f6f3ee;
  --card: #fffdf9;
  --ink: #1b1a18;
  --soft: rgba(27, 26, 24, 0.56);
  --line: rgba(27, 26, 24, 0.1);
  --accent: #0f8a5f;
}

*, *::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;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ip { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(348px, 100%); padding: 18px 16px 16px; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1.500px var(--line), 0 30px 44px -30px rgba(60, 40, 20, 0.45); }
.ip__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 2px; }
.ip__head strong { font-size: 16px; line-height: 20px; font-weight: 740; letter-spacing: -0.01em; }
.ip__total { font-size: 12.500px; line-height: 16px; font-weight: 640; color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ip__total b { font-weight: 740; color: var(--ink); }

.ip__seg { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: 38px; padding: 3px; border-radius: 13px; background: rgba(27, 26, 24, 0.06); }
.ip__pick { position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc((100% - 6px) / 3); border-radius: 10px; background: #ffffff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 8px -4px rgba(27, 26, 24, 0.35), 0 0 0 1px rgba(27, 26, 24, 0.05); }
.ip__opt { position: relative; display: grid; place-items: center; height: 32px; border-radius: 10px; font-size: 12.500px; font-weight: 680; color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; transition: color 0.25s; }
.ip__opt[aria-pressed="true"] { color: var(--ink); }
.ip__opt:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }

.ip__hero { display: flex; align-items: center; gap: 12px; height: 44px; padding-left: 2px; }
.ip__num { flex: none; min-width: 142px; font-size: 40px; line-height: 44px; font-weight: 760; font-stretch: 92%; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ip__what { display: grid; gap: 2px; min-width: 0; }
.ip__what b { font-size: 14px; line-height: 18px; font-weight: 700; }
.ip__clip { display: block; overflow: hidden; white-space: nowrap; }
.ip__clip span { display: block; overflow: hidden; text-overflow: ellipsis; }
.ip__what .ip__clip { height: 15px; font-size: 12px; line-height: 15px; font-weight: 640; color: var(--accent); font-variant-numeric: tabular-nums; }

.ip__plan { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ip__blocks { position: relative; height: 34px; }
/* twelve blocks: the script gives each its place and width for the plan chosen */
.ip__blk { position: absolute; left: 0; top: 4px; width: 20px; height: 26px; border-radius: 8px; background: rgba(27, 26, 24, 0.1); box-shadow: inset 0 0 0 1px rgba(27, 26, 24, 0.06); transition: background-color 0.25s; }
.ip__blk.is-first { background: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 10px -6px var(--accent); }
.ip__blk.is-on:not(.is-first) { background: rgba(27, 26, 24, 0.34); }
.ip__blk:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.ip__ends { display: flex; justify-content: space-between; gap: 10px; padding: 0 2px; font-size: 11px; line-height: 14px; font-weight: 660; color: var(--soft); font-variant-numeric: tabular-nums; }
.ip__ends .ip__clip { height: 14px; text-align: right; }

.ip__note { padding: 10px 12px; border-radius: 14px; background: rgba(27, 26, 24, 0.045); }
.ip__note .ip__clip { height: 18px; font-size: 13px; line-height: 18px; font-weight: 660; font-variant-numeric: tabular-nums; }

.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: #1b1a18; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }

@media (hover: hover) { .ip__opt:hover { color: var(--ink); } }
@media (max-width: 350px) { .ip { padding: 16px 13px 14px; } .ip__num { font-size: 36px; min-width: 128px; } .ip__hero { gap: 10px; } .ip__opt { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .ip__opt, .ip__blk { transition: none; } }
