:root {
  --bg: #eef0f4;
  --card: #ffffff;
  --ink: #16181d;
  --soft: #80838d;
  --line: #eceef2;
  --track: #f0f1f5;
  --accent: #5b5bf0;
}

*, *::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 {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 14px;
}

.card {
  width: min(316px, 100%);
  padding: 16px 16px 12px;
  border-radius: 24px;
  background: var(--card);
  box-shadow:
    0 0 0 1px rgba(22, 24, 29, 0.05),
    0 1px 2px rgba(22, 24, 29, 0.05),
    0 18px 36px -18px rgba(22, 24, 29, 0.22),
    0 44px 70px -44px rgba(22, 24, 29, 0.28);
}

.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }
.head__title { font-size: 15.5px; font-weight: 660; letter-spacing: -0.01em; }
.head__count { height: 24px; padding: 0 9px; overflow: hidden; border-radius: 99px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-size: 12px; line-height: 24px; font-weight: 640; white-space: nowrap; }
.head__count span { display: block; }

/* the role selector: a track with a thumb that slides and stretches */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 38px; margin-top: 12px; padding: 3px; border-radius: 13px; background: var(--track); box-shadow: inset 0 1px 2px rgba(22, 24, 29, 0.06); }
.seg__thumb { position: absolute; left: 3px; top: 3px; bottom: 3px; width: 10px; border-radius: 10px; background: #ffffff; box-shadow: 0 0 0 1px rgba(22, 24, 29, 0.05), 0 1px 2px rgba(22, 24, 29, 0.12), 0 6px 12px -6px rgba(22, 24, 29, 0.25); }
.seg__opt { position: relative; z-index: 1; border: 0; border-radius: 10px; background: none; color: var(--soft); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color 0.3s ease; }
.seg__opt[aria-checked="true"] { color: var(--ink); }
.seg__opt:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (hover: hover) { .seg__opt:hover { color: var(--ink); } }

.rows { list-style: none; margin-top: 8px; }
.row { position: relative; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 2px; }
.row + .row::before { content: ""; position: absolute; left: 2px; right: 2px; top: 0; height: 1px; background: var(--line); }
.row__name { flex: 1; min-width: 0; font-size: 14px; font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.35s ease; }
.row.is-off .row__name { color: var(--soft); }
.row__box { position: relative; flex: none; width: 24px; height: 24px; }
.row__fill { position: absolute; inset: 0; border-radius: 8px; background: var(--accent); box-shadow: 0 4px 8px -4px color-mix(in srgb, var(--accent) 70%, transparent); }
.row__ring { position: absolute; inset: 0; border-radius: 8px; box-shadow: inset 0 0 0 1.5px #d9dbe2; }
.row__box svg { position: absolute; inset: 0; width: 24px; height: 24px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.row__tick { stroke: #ffffff; stroke-width: 2.1; stroke-dasharray: 1; stroke-dashoffset: 1; }
.row__lock { stroke: #a6a9b3; stroke-width: 1.5; }

.foot { height: 18px; margin-top: 8px; padding: 0 2px; overflow: hidden; font-size: 12.5px; line-height: 18px; font-weight: 520; color: var(--soft); white-space: nowrap; }
.foot span { display: block; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #14151a;
  stroke: #ffffff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(20, 21, 26, 0.3));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (min-width: 900px) and (min-height: 680px) {
  .card { zoom: 1.3; }
}
@media (max-height: 420px) {
  .card { padding: 13px 15px 9px; }
  .row { height: 35px; }
  .seg { margin-top: 10px; }
}
