/* The customer portal's one stylesheet (T049; redesigned to the "Viewer Subscription Dashboard" design).

   Values are the design's own: its tokens, radii, type scale, shadows and motion, transcribed from the
   artboards' inline styles into classes. The policy is `style-src 'self'`, so nothing here comes from
   another origin and no page carries an inline style: the few values that move (a slider's fill, a
   chart's points) are custom properties a script sets through the CSSOM, which the policy allows.

   A shop's colours arrive as /theme.css, which sets three tokens and nothing else (theme.py):
     --brand     a surface or border: the primary button, the slider, "from us" in the chart, focus rings
     --on-brand  the text on a --brand surface (black or white, worked out by the portal)
     --accent    links and text buttons on the page surface (4.5:1 against white, checked at save)
   Every other colour of the design is derived from those or is the design's neutral palette. The neutral
   values below ARE the design: a page with no shop theme looks exactly like it. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  /* the three a shop may set */
  --brand: #0071e3;
  --on-brand: #ffffff;
  --accent: #0066cc;

  /* the design's palette */
  --bg: #f5f5f7;
  --card: #ffffff;
  --inset: #f5f5f7;
  --fill: rgba(118, 118, 128, 0.12);
  --label: #1d1d1f;
  --label-2: #6e6e73;
  --sep: rgba(60, 60, 67, 0.14);
  --tint: color-mix(in srgb, var(--brand) 10%, transparent);
  --tint-strong: color-mix(in srgb, var(--brand) 14%, transparent);
  --ours: var(--brand);
  --ours-wash: color-mix(in srgb, var(--brand) 12%, transparent);
  --total: #e8590c;
  --grid: #ededf0;
  --axis: #d2d2d7;
  --crosshair: rgba(60, 60, 67, 0.35);
  --danger: #d70015;
  --danger-fill: #d70015;
  --danger-tint: rgba(255, 59, 48, 0.1);
  --good: #34c759;
  --wait: #ff9f0a;
  --idle: #8e8e93;
  --thumb: #ffffff;
  --thumb-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
  --track: #e3e3e8;
  --switch-off: rgba(120, 120, 128, 0.16);
  --nav: rgba(245, 245, 247, 0.8);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --ease: cubic-bezier(0.3, 0.7, 0.4, 1);
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

/* ── base ──────────────────────────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.vs-sr,
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.vs-ico {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vs-fill-ico {
  fill: currentColor;
}

.vs-num {
  font-variant-numeric: tabular-nums;
}

.vs-press {
  transition: transform 0.2s var(--ease), filter 0.2s ease;
}

.vs-press:hover:not(:disabled) {
  filter: brightness(1.05);
}

.vs-press:active:not(:disabled) {
  transform: scale(0.97);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--card);
  color: var(--label);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--sep), 0 12px 32px rgba(0, 0, 0, 0.14);
}

.skip-link:focus {
  top: 8px;
}

/* A message line that belongs to a control: present in the page from the start (a live region has to
   exist before its text changes, and one that is display:none is not watched), and taking no room while it
   says nothing: an empty one is out of the flow, so it adds no gap to the card around it. */
.vs-msgline {
  margin: 0;
  font-size: 13px;
  color: var(--label-2);
  text-wrap: pretty;
}

.vs-msgline:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.vs-msgline-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--danger);
}

/* ── the header ────────────────────────────────────────────────────────────────────────────────── */

.vs-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--nav);
  border-bottom: 1px solid var(--sep);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.vs-nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.vs-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.vs-brand-mark {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--label);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-brand-logo {
  display: block;
  flex: none;
  height: 28px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.vs-brand-name {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* the account menu: a <details>, so it opens and the sign-out works without script */
.vs-acct {
  position: relative;
  flex: none;
  margin-right: -6px;
}

.vs-acct > summary {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.vs-acct > summary::-webkit-details-marker {
  display: none;
}

.vs-acct > summary::marker {
  content: "";
}

.vs-avatar {
  flex: none;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.vs-avatar-sm {
  width: 32px;
  height: 32px;
  background: var(--fill);
  color: var(--label);
  font-size: 13px;
  transition: box-shadow 0.2s ease;
}

.vs-acct[open] .vs-avatar-sm {
  box-shadow: 0 0 0 2px var(--brand);
}

.vs-avatar-md {
  width: 40px;
  height: 40px;
  background: #6e6e73;
  color: #ffffff;
  font-size: 15px;
}

.vs-avatar-lg {
  width: 60px;
  height: 60px;
  background: #6e6e73;
  color: #ffffff;
  font-size: 22px;
}

.vs-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 264px;
  padding: 6px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--sep), 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06);
  transform-origin: top right;
  animation: vs-pop 0.18s var(--ease);
}

.vs-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 12px;
}

.vs-menu-who {
  min-width: 0;
}

.vs-menu-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vs-menu-sub {
  margin: 0;
  font-size: 13px;
  color: var(--label-2);
}

.vs-menu-sep {
  height: 1px;
  margin: 0 4px 6px;
  background: var(--sep);
}

.vs-menu form {
  margin: 0;
}

/* The footer's links, which the dashboard carries in the menu instead of a footer. */
.vs-menu-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vs-menu-link {
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--label);
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.15s ease;
}

a.vs-menu-link:hover {
  background: var(--fill);
  text-decoration: none;
}

.vs-menu-aside {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 400;
  color: var(--label-2);
}

.vs-menu-langs ul {
  list-style: none;
  margin: 0;
  padding: 0 12px 2px;
  display: flex;
  gap: 16px;
}

.vs-menu-langs a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: var(--label-2);
}

.vs-menu-langs a[aria-current="true"] {
  color: var(--label);
  font-weight: 600;
}

.vs-menu-item {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--danger);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.15s ease;
}

.vs-menu-item:hover {
  background: var(--fill);
}

/* ── page frame ────────────────────────────────────────────────────────────────────────────────── */

.vs-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 36px) var(--gutter) 56px;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
}

.vs-main:focus {
  outline: none;
}

.vs-footer {
  padding: 0 var(--gutter) 28px;
  font-size: 13px;
  color: var(--label-2);
}

.vs-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.vs-footer p {
  margin: 0;
}

.vs-footer a {
  color: var(--label-2);
}

.vs-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.vs-footer-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
}

.vs-lang a[aria-current="true"] {
  color: var(--label);
  font-weight: 600;
}

.vs-banner {
  margin: 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--fill);
  font-size: 15px;
  text-wrap: pretty;
}

.vs-warning {
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--danger-tint);
  font-size: 13px;
}

/* ── the channel ───────────────────────────────────────────────────────────────────────────────── */

.vs-channel {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vs-channel-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vs-channel-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.vs-channel h1 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.vs-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px 0 9px;
  border-radius: 999px;
  background: var(--danger-fill);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.vs-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ffffff;
}

.vs-live-clock {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.vs-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label);
  font-size: 12px;
  font-weight: 600;
}

.vs-channel-sub {
  margin: 0;
  font-size: 15px;
  color: var(--label-2);
  text-wrap: pretty;
}

/* ── cards ─────────────────────────────────────────────────────────────────────────────────────── */

.vs-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: clamp(16px, 2vw, 24px);
}

.vs-card {
  min-width: 0;
  background: var(--card);
  border-radius: 22px;
  padding: clamp(18px, 2vw, 24px);
  display: flex;
  flex-direction: column;
}

.vs-card-controls {
  flex: 1 1 400px;
  gap: 20px;
}

.vs-card-audience {
  flex: 999 1 520px;
  gap: 16px;
}

.vs-card-ai {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px 32px;
}

.vs-hr {
  height: 1px;
  background: var(--sep);
}

.vs-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.vs-card-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.vs-aside {
  margin: 0;
  font-size: 13px;
  color: var(--label-2);
}

/* ── the status ────────────────────────────────────────────────────────────────────────────────── */

.vs-status {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vs-status-icon {
  --status: var(--idle);
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
}

.vs-status-icon[data-tone="good"] {
  --status: var(--good);
}

.vs-status-icon[data-tone="wait"] {
  --status: var(--wait);
}

.vs-status-pulse,
.vs-status-disc {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--status);
}

.vs-status-pulse {
  animation: vs-pulse 2.4s var(--ease) infinite;
}

.vs-status-icon:not([data-pulse="true"]) .vs-status-pulse {
  display: none;
}

.vs-status-disc {
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.vs-status-icon[data-icon="clock"] .vs-ico-people,
.vs-status-icon[data-icon="people"] .vs-ico-clock {
  display: none;
}

.vs-status-text {
  flex: 1 1 auto;
  min-width: 0;
}

.vs-status-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.vs-status-sub {
  margin: 2px 0 0;
  font-size: 15px;
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
}

/* ── buttons ───────────────────────────────────────────────────────────────────────────────────── */

.vs-btn {
  width: 100%;
  height: 50px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.vs-btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}

.vs-btn-stop {
  background: var(--danger-tint);
  color: var(--danger);
}

.vs-btn:disabled {
  opacity: 0.45;
}

.vs-confirm {
  padding: 16px;
  border-radius: 20px;
  background: var(--inset);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vs-confirm-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vs-confirm-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.vs-confirm-desc {
  margin: 0;
  font-size: 15px;
  color: var(--label-2);
  text-wrap: pretty;
}

.vs-confirm-actions {
  display: flex;
  gap: 10px;
}

.vs-confirm-actions button {
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
}

.vs-btn-cancel {
  background: var(--card);
  color: var(--label);
}

.vs-btn-danger {
  background: var(--danger-fill);
  color: #ffffff;
}

/* ── viewers to send ───────────────────────────────────────────────────────────────────────────── */

.vs-viewers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vs-viewers-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.vs-viewers-head label {
  font-size: 15px;
  font-weight: 600;
}

.vs-viewers-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vs-figure {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.vs-figure-num {
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.vs-figure-unit {
  font-size: 15px;
  color: var(--label-2);
}

.vs-steppers {
  display: flex;
  gap: 8px;
}

.vs-step {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-step:disabled {
  opacity: 0.35;
}

.vs-slider {
  --frac: 0;
  position: relative;
  height: 44px;
}

.vs-slider-track,
.vs-slider-fill {
  position: absolute;
  left: 0;
  top: 19px;
  height: 6px;
  border-radius: 999px;
}

.vs-slider-track {
  right: 0;
  background: var(--track);
}

.vs-slider-fill {
  width: calc(14px + (100% - 28px) * var(--frac));
  background: var(--brand);
}

.vs-range {
  position: relative;
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.vs-range:disabled {
  cursor: default;
}

.vs-range:focus-visible {
  outline: none;
}

.vs-range::-webkit-slider-runnable-track {
  height: 44px;
  background: transparent;
  border: 0;
}

.vs-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: 8px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 3px 8px rgba(0, 0, 0, 0.16), 0 3px 1px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease;
}

.vs-range:active::-webkit-slider-thumb {
  transform: scale(1.08);
}

.vs-range::-moz-range-track {
  height: 44px;
  background: transparent;
  border: 0;
}

.vs-range::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 3px 8px rgba(0, 0, 0, 0.16), 0 3px 1px rgba(0, 0, 0, 0.06);
}

.vs-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--brand), 0 3px 8px rgba(0, 0, 0, 0.16);
}

.vs-range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--brand), 0 3px 8px rgba(0, 0, 0, 0.16);
}

.vs-slider-ends {
  display: flex;
  justify-content: space-between;
  margin-top: -8px;
  font-size: 13px;
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
}

/* ── segmented controls ────────────────────────────────────────────────────────────────────────── */

.vs-join {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vs-seg-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vs-seg-group h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

/* The thumb sits under the pressed option. Its place and width are worked out from the markup alone
   (which option is pressed, how many there are), so it is right before any script has run. */
.vs-seg {
  --seg-n: 1;
  --seg-i: 0;
  position: relative;
  display: flex;
  height: 44px;
  border-radius: 999px;
  background: var(--fill);
}

.vs-seg:has(> button:nth-of-type(2)) { --seg-n: 2; }
.vs-seg:has(> button:nth-of-type(3)) { --seg-n: 3; }
.vs-seg:has(> button:nth-of-type(4)) { --seg-n: 4; }
.vs-seg:has(> button:nth-of-type(5)) { --seg-n: 5; }
.vs-seg:has(> button:nth-of-type(6)) { --seg-n: 6; }
.vs-seg:has(> button:nth-of-type(7)) { --seg-n: 7; }
.vs-seg:has(> button:nth-of-type(2)[aria-pressed="true"]) { --seg-i: 1; }
.vs-seg:has(> button:nth-of-type(3)[aria-pressed="true"]) { --seg-i: 2; }
.vs-seg:has(> button:nth-of-type(4)[aria-pressed="true"]) { --seg-i: 3; }
.vs-seg:has(> button:nth-of-type(5)[aria-pressed="true"]) { --seg-i: 4; }
.vs-seg:has(> button:nth-of-type(6)[aria-pressed="true"]) { --seg-i: 5; }
.vs-seg:has(> button:nth-of-type(7)[aria-pressed="true"]) { --seg-i: 6; }

.vs-seg-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: calc(var(--seg-i) * 100% / var(--seg-n) + 3px);
  width: calc(100% / var(--seg-n) - 6px);
  border-radius: 999px;
  background: var(--thumb);
  box-shadow: var(--thumb-shadow);
  transition: left 0.32s var(--ease);
}

.vs-seg:not(:has(> button[aria-pressed="true"])) .vs-seg-thumb {
  display: none;
}

.vs-seg > button {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  padding: 0 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--label);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.vs-seg > button[aria-pressed="true"] {
  font-weight: 600;
}

.vs-seg > button:disabled {
  color: var(--label-2);
}

.vs-seg-range {
  width: 100%;
  max-width: 420px;
}

/* Below the design's narrowest artboard (390 px), five options get under 52 px each: a step smaller keeps a
   long label ("30 Tage") inside its own option. */
@media (max-width: 359px) {
  .vs-seg > button {
    font-size: 13px;
    letter-spacing: -0.01em;
  }
}

/* A stored value outside the choices is shown as an option of its own (choicesFor), so a row can hold six.
   Six labels do not fit one line each on a phone: German ("10 Min.") is left with under 6 px around a label
   below 410 px. There the unit goes under the number ("15" over "min"); every row of five stays as the
   design has it, and from 410 px six fit on one line in both languages. */
@media (max-width: 409px) {
  .vs-seg:has(> button:nth-of-type(6)) > button {
    font-size: 13px;
    line-height: 1.1;
    white-space: normal;
    word-spacing: 100vw;
  }
}

.vs-caption {
  margin: 0;
  font-size: 13px;
  color: var(--label-2);
  text-wrap: pretty;
  font-variant-numeric: tabular-nums;
}

/* ── the audience ──────────────────────────────────────────────────────────────────────────────── */

.vs-readouts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
}

.vs-readout {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vs-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--label-2);
}

.vs-key-total {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--total);
}

.vs-key-ours {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--ours);
}

.vs-readout-num {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.vs-chart {
  flex: 1 1 auto;
  min-height: 224px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vs-plot-row {
  flex: 1 1 auto;
  min-height: 200px;
  display: flex;
  gap: 8px;
}

.vs-plot {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.vs-gridline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  margin-top: -0.5px;
  background: var(--grid);
}

.vs-gridline-zero {
  background: var(--axis);
}

.vs-plot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  touch-action: pan-y;
  cursor: crosshair;
}

.vs-plot svg:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 6px;
  border-radius: 6px;
}

.vs-area {
  fill: var(--ours-wash);
  stroke: none;
}

.vs-line-ours,
.vs-line-total {
  fill: none;
  stroke-width: 2px;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.vs-line-ours {
  stroke: var(--ours);
}

.vs-line-total {
  stroke: var(--total);
}

.vs-crosshair {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: -0.5px;
  background: var(--crosshair);
  pointer-events: none;
}

.vs-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--card);
  pointer-events: none;
}

.vs-dot-total {
  background: var(--total);
}

.vs-dot-ours {
  background: var(--ours);
}

.vs-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.vs-empty p {
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--inset);
  font-size: 13px;
  color: var(--label-2);
}

.vs-yaxis {
  position: relative;
  flex: none;
  width: 36px;
}

.vs-ytick {
  position: absolute;
  left: 0;
  transform: translateY(-50%);
  font-size: 11px;
  line-height: 1;
  color: var(--label-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.vs-xaxis {
  display: flex;
  gap: 8px;
}

.vs-xticks {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 16px;
}

.vs-xspacer {
  flex: none;
  width: 36px;
}

.vs-xtick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 11px;
  line-height: 16px;
  color: var(--label-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.vs-table {
  flex: 1 1 auto;
  min-height: 224px;
  max-height: 360px;
  overflow: auto;
  border-radius: 14px;
  background: var(--inset);
}

.vs-table-head,
.vs-table li {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.vs-table-head {
  position: sticky;
  top: 0;
  padding: 10px 14px;
  background: var(--inset);
  font-size: 12px;
  font-weight: 600;
  color: var(--label-2);
}

.vs-table ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vs-table li {
  padding: 8px 14px;
  border-top: 1px solid var(--sep);
  font-size: 13px;
}

.vs-r {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.vs-chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: -4px;
}

.vs-chart-foot p {
  margin: 0;
  font-size: 13px;
  color: var(--label-2);
}

.vs-link-btn {
  height: 44px;
  margin: -6px -4px -6px 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
}

/* ── AI chatters ───────────────────────────────────────────────────────────────────────────────── */

.vs-ai-main {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vs-ai-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.vs-ai-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-sparkle {
  fill: currentColor;
  stroke-width: 1.2;
}

.vs-ai-heading {
  flex: 1 1 auto;
  min-width: 0;
}

.vs-ai-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.vs-ai-heading p {
  margin: 2px 0 0;
  font-size: 15px;
  color: var(--label-2);
  text-wrap: pretty;
}

.vs-switch {
  flex: none;
  width: 51px;
  height: 44px;
  margin-top: -4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: flex;
  align-items: center;
}

.vs-switch:disabled {
  opacity: 0.45;
}

.vs-switch-track {
  position: relative;
  display: block;
  width: 51px;
  height: 31px;
  border-radius: 999px;
  background: var(--switch-off);
  transition: background 0.25s ease;
}

.vs-switch[aria-checked="true"] .vs-switch-track {
  background: var(--good);
}

.vs-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 3px 1px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s var(--ease);
}

.vs-switch[aria-checked="true"] .vs-switch-knob {
  transform: translateX(20px);
}

/* Without the add-on: "AI chatters aren't part of your plan", and the shop's way to add them. */
.vs-ai-locked {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.vs-ai-locked .vs-ico {
  flex: none;
  color: var(--label-2);
}

.vs-ai-locked p {
  margin: 0;
  flex: 1 1 180px;
  font-size: 15px;
}

.vs-addplan {
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.vs-addplan:hover {
  text-decoration: none;
}

.vs-instr {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.vs-instr label {
  font-size: 15px;
  font-weight: 600;
}

.vs-optional {
  font-weight: 400;
  color: var(--label-2);
}

.vs-text {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 112px;
  resize: vertical;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: var(--inset);
  color: var(--label);
  font-size: 15px;
  line-height: 1.45;
}

.vs-text::placeholder {
  color: var(--label-2);
  opacity: 1;
}

.vs-text:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--brand);
}

.vs-text[aria-invalid="true"] {
  box-shadow: 0 0 0 1.5px var(--danger);
}

.vs-instr-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.vs-instr-help {
  margin: 0;
  flex: 1 1 200px;
  font-size: 13px;
  color: var(--label-2);
}

.vs-save {
  flex: none;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label-2);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vs-save[data-dirty="true"] {
  background: var(--brand);
  color: var(--on-brand);
}

.vs-save:not([data-saved="true"]) .vs-save-check {
  display: none;
}

.vs-msgs {
  flex: 999 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vs-msgs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vs-msgs-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.vs-msgs-note {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--label-2);
  text-wrap: pretty;
}

.vs-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label);
  font-size: 12px;
  font-weight: 600;
}

.vs-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--idle);
}

.vs-pill[data-tone="good"] .vs-pill-dot {
  background: var(--good);
}

.vs-msgs-empty {
  margin: 0;
  padding: 20px 0;
  border-top: 1px solid var(--sep);
  font-size: 15px;
  color: var(--label-2);
  text-align: center;
}

.vs-msgs ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vs-msg {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 -10px;
  padding: 9px 10px;
  border-top: 1px solid var(--sep);
}

.vs-msg p {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.vs-msg time {
  flex: none;
  font-size: 13px;
  color: var(--label-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.vs-msg-new {
  animation: vs-msg 1.8s ease-out;
}

/* ── sign-in and the error pages ───────────────────────────────────────────────────────────────── */

/* The card is centred in the window below the header, as in the design; the footer starts below the fold. */
.vs-main-center {
  min-height: calc(100vh - 53px);
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 6vh, 64px) var(--gutter);
}

.vs-sheet {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 44px) clamp(20px, 5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.vs-sheet-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.vs-sheet-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--label);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-sheet-logo {
  display: block;
  max-width: 200px;
  height: 56px;
  width: auto;
  object-fit: contain;
}

.vs-sheet h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.vs-sheet-lead {
  margin: 6px 0 0;
  font-size: 17px;
  color: var(--label-2);
  text-wrap: pretty;
}

.vs-form {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vs-alert {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--danger-tint);
  color: var(--label);
  font-size: 15px;
  line-height: 1.35;
}

.vs-alert .vs-ico {
  flex: none;
  color: var(--danger);
}

.vs-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vs-float {
  position: relative;
}

.vs-input {
  display: block;
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 24px 16px 8px;
  border: 0;
  border-radius: 14px;
  background: var(--inset);
  color: var(--label);
  font-size: 17px;
  line-height: 24px;
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow 0.2s ease;
}

.vs-input-pass {
  padding-right: 56px;
}

.vs-input:focus-visible {
  outline: none;
}

.vs-input:focus {
  box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 4px var(--tint-strong);
}

.vs-input[aria-invalid="true"] {
  box-shadow: inset 0 0 0 1.5px var(--danger);
}

.vs-input[aria-invalid="true"]:focus {
  box-shadow: inset 0 0 0 1.5px var(--danger), 0 0 0 4px var(--danger-tint);
}

.vs-input:-webkit-autofill {
  -webkit-text-fill-color: var(--label);
  transition: background-color 600000s 0s, color 600000s 0s;
}

.vs-float-label {
  position: absolute;
  left: 16px;
  top: 18px;
  font-size: 17px;
  line-height: 20px;
  color: var(--label-2);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.2s var(--ease);
}

.vs-input:focus + .vs-float-label,
.vs-input:not(:placeholder-shown) + .vs-float-label,
.vs-input:-webkit-autofill + .vs-float-label {
  transform: translateY(-10px) scale(0.7);
}

.vs-eye {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--label-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-eye[aria-pressed="true"] .vs-eye-open,
.vs-eye:not([aria-pressed="true"]) .vs-eye-shut {
  display: none;
}

.vs-field-error {
  margin: 0 0 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--danger);
}

.vs-submit {
  margin-top: 6px;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.vs-submit:hover {
  text-decoration: none;
}

.vs-submit:not([data-busy="true"]) .vs-spin {
  display: none;
}

.vs-spin {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  animation: vs-spin 0.8s linear infinite;
}

.vs-forgot {
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -12px 0 -8px;
  padding: 0 8px;
  font-size: 15px;
}

.vs-forgot-help {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: -12px 0 -8px;
  text-align: center;
}

.vs-forgot-help > .vs-forgot {
  margin: 0;
  color: var(--accent);
  list-style: none;
  cursor: pointer;
}

.vs-forgot-help > .vs-forgot::-webkit-details-marker {
  display: none;
}

.vs-forgot-help > .vs-forgot::marker {
  content: "";
}

.vs-forgot-help > .vs-forgot:hover {
  text-decoration: underline;
}

.vs-forgot-text {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--label-2);
  text-wrap: pretty;
}

/* ── motion ────────────────────────────────────────────────────────────────────────────────────── */

@keyframes vs-pulse {
  0% {
    transform: scale(1);
    opacity: 0.45;
  }
  80%,
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

@keyframes vs-pop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes vs-msg {
  0% {
    background: var(--tint);
    opacity: 0;
    transform: translateY(-6px);
  }
  15% {
    opacity: 1;
    transform: none;
  }
  100% {
    background: transparent;
  }
}

@keyframes vs-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
