/**
 * RetireSmart Health Service — design tokens (from auth mockups).
 * Use var(--rs-*) in CSS; Tailwind theme extension maps these in layouts.
 * Prefer this over Gulp/LESS — Workers serve static CSS from /public with no build step.
 */
:root {
  /* Brand — Figma 00.1_Login-0 */
  --rs-primary: #ae9a80;
  --rs-primary-hover: #9e8a74;
  --rs-primary-muted: #c4b3a0;
  --rs-secondary: #485b56;
  --rs-secondary-soft: #556b60;

  /* Surfaces */
  --rs-bg: #f8f7f2;
  --rs-bg-card: #ffffff;
  --rs-bg-input: #f8fafc;
  --rs-bg-input-alt: #f5f5f5;

  /* Text */
  --rs-text: #3e311f;
  --rs-text-muted: #757575;
  --rs-text-placeholder: rgba(62, 49, 31, 0.5);
  --rs-text-on-primary: #ffffff;
  --rs-text-on-dark: #ffffff;

  /* Borders / lines */
  --rs-border: rgba(204, 204, 204, 0.4);
  --rs-border-soft: #ebebeb;
  --rs-divider: #e0e0e0;

  /* Feedback */
  --rs-danger: #e02020;
  --rs-success: #58b39e;
  --rs-info-bg: #f0f7f4;
  --rs-error-bg: #fef2f2;
  --rs-error-border: #fecaca;
  --rs-error-text: #991b1b;

  /* Radius */
  --rs-radius-sm: 8px;
  --rs-radius-md: 12px;
  --rs-radius-input: 20px;
  --rs-radius-lg: 24px;
  --rs-radius-xl: 29px;
  --rs-radius-pill: 9999px;
  --rs-btn-radius: 1.5rem; /* 24px — mobile CTA */

  /* Buttons — match member (.rs-app) compact CTAs */
  --rs-btn-height: 2.25rem;
  --rs-btn-font-size: 0.9375rem; /* 15px */
  --rs-btn-font-size-outline: 0.9375rem;
  --rs-btn-line-height: 1.35;

  /* Shadow */
  --rs-shadow-card: 0 8px 32px rgba(46, 46, 46, 0.06);

  /* Type — system UI stack only (no Google Fonts).
     Many users reach the site from mainland China; fonts.gstatic.com is often
     blocked/slow. Prefer OS CJK fonts shipped on the device. */
  --rs-font:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'PingFang TC',
    'PingFang SC',
    'Hiragino Sans GB',
    'Microsoft JhengHei',
    'Microsoft YaHei UI',
    'Microsoft YaHei',
    'Noto Sans CJK TC',
    'Noto Sans CJK SC',
    'Source Han Sans TC',
    'WenQuanYi Micro Hei',
    'Helvetica Neue',
    Arial,
    sans-serif;
  --rs-font-display: var(--rs-font);

  /* Spacing */
  --rs-auth-pad: 1.75rem;
  --rs-space-field: 1.125rem;
}

@media (min-width: 640px) {
  :root {
    --rs-auth-pad: 2.5rem;
    --rs-space-field: 1.25rem;
  }
}

@media (min-width: 769px) {
  :root {
    --rs-btn-radius: 1.875rem; /* 30px */
    --rs-btn-height: 2.5rem;
    --rs-btn-font-size: 1rem; /* 16px */
    --rs-btn-font-size-outline: 1rem;
    --rs-btn-line-height: 1.35;
  }
}

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

html {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
}

/* ---------- Auth shell ---------- */
.rs-auth {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background: var(--rs-bg);
  color: var(--rs-text);
  font-family: var(--rs-font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* No default mobile tap / click blue flash on auth pages */
.rs-auth,
.rs-auth * {
  -webkit-tap-highlight-color: transparent;
}

.rs-auth a:focus,
.rs-auth button:focus {
  outline: none;
}

.rs-auth a:focus-visible,
.rs-auth button:focus-visible {
  outline: 2px solid var(--rs-primary);
  outline-offset: 2px;
}

.rs-auth__grid {
  position: relative;
  display: grid;
  min-height: 100dvh;
  width: 100%;
  grid-template-columns: 1fr;
  /* Mobile: lang → hero → form (stacked) */
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    'lang'
    'hero'
    'form';
}

@media (min-width: 769px) {
  .rs-auth__grid {
    grid-template-columns: minmax(300px, 50%) 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      'hero lang'
      'hero form';
  }
}

.rs-auth__lang-wrap {
  grid-area: lang;
  display: flex;
  position: static;
  z-index: 4;
  justify-content: flex-end;
  align-items: center;
  padding: max(0.45rem, env(safe-area-inset-top, 0px)) max(0.875rem, env(safe-area-inset-right, 0px))
    0.25rem max(0.875rem, env(safe-area-inset-left, 0px));
}

@media (min-width: 769px) {
  .rs-auth__lang-wrap {
    padding: 1.25rem 2.5rem 0;
    align-self: start;
  }
}

.rs-auth__hero-col {
  grid-area: hero;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 0;
}

@media (min-width: 769px) {
  .rs-auth__hero-col {
    position: sticky;
    top: 0;
    align-self: start;
    /* Include padding inside the viewport height — avoids page scrollbar */
    height: 100dvh;
    padding: 0.5rem 2.5rem 2.5rem;
    justify-content: flex-end;
  }
}

.rs-auth__form-col {
  grid-area: form;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  margin-top: 0;
  padding: 0;
}

@media (min-width: 769px) {
  .rs-auth__form-col {
    z-index: auto;
    padding: 0.5rem 2.5rem 2.5rem;
  }
}

.rs-auth__lang {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 1.95rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--rs-text);
  margin: 0;
  min-height: 1.75rem;
}

.rs-auth__lang a {
  color: inherit;
  text-decoration: none;
  opacity: 0.3;
  padding: 0 0 0.4rem;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  position: relative;
  border-bottom: 0;
  -webkit-tap-highlight-color: transparent;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.rs-auth__lang a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 30px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition:
    transform 0.22s ease,
    opacity 0.2s ease;
  opacity: 0;
}

.rs-auth__lang a[aria-current='true'] {
  opacity: 1;
  font-weight: 500;
}

/* Figma Group 66 — pill underline on active language */
.rs-auth__lang a[aria-current='true']::after {
  transform: scaleX(1);
  opacity: 1;
}

@media (hover: hover) {
  .rs-auth__lang a:hover {
    opacity: 0.8;
    transform: translateY(-1px);
  }

  .rs-auth__lang a[aria-current='true']:hover {
    opacity: 1;
  }

  .rs-auth__lang a:not([aria-current='true']):hover::after {
    transform: scaleX(1);
    opacity: 0.45;
  }
}

.rs-auth__lang a:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

.rs-auth__lang-sep {
  width: 1px;
  height: 1.1em;
  background: var(--rs-text);
  opacity: 0.35;
  user-select: none;
  font-size: 0;
  flex-shrink: 0;
}

.rs-auth__center {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  margin-top: 0px;
  margin-bottom: 0px;
  padding-bottom: 0;
}

@media (min-width: 769px) {
  .rs-auth__center {
    align-items: center;
    padding-bottom: 0.5rem;
    justify-content: flex-start;
    margin-top: 0;
    margin-bottom: 0;
  }
}

.rs-auth__center--top {
  align-items: flex-start;
  padding-top: 0.25rem;
}

@media (min-width: 769px) {
  .rs-auth__center--top {
    padding-top: 0.5rem;
  }
}

/* ---------- Hero panel ---------- */
.rs-hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  height: auto;
  border-radius: 0;
  overflow: hidden;
  /* background: var(--rs-secondary); */
}

@media (min-width: 769px) {
  .rs-hero {
    border-radius: var(--rs-radius-input);
    margin: 0;
    max-width: 600px;
  }
}

.rs-hero__carousel {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  z-index: 0;
  touch-action: pan-y;
  cursor: grab;
}

@keyframes rs-hero-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.rs-hero__slide {
  display: none;
  width: 100%;
  line-height: 0;
}

.rs-hero__slide.is-active {
  display: block;
  animation: rs-hero-fade-in 600ms ease;
}

.rs-hero .rs-hero__carousel img.rs-hero__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
}

.rs-hero .rs-hero__carousel img.rs-hero__img--mobile {
  display: none;
}

@media (max-width: 768px) {
  .rs-hero .rs-hero__carousel img.rs-hero__img--desktop {
    display: none;
  }

  .rs-hero .rs-hero__carousel img.rs-hero__img--mobile {
    display: block;
    object-position: center top;
  }
}

.rs-hero__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.rs-hero__band {
  position: relative;
  background: var(--rs-primary);
  color: var(--rs-bg);
  /* Extra bottom pad so sheet overlap still shows title + dots */
  padding: 0.85rem 1rem 5.25rem;
  clip-path: polygon(0 28%, 100% 0, 100% 100%, 0 100%);
}

@media (min-width: 769px) {
  .rs-hero__band {
    padding: 2rem 1.75rem 2.5rem;
    clip-path: polygon(0 22%, 100% 0, 100% 100%, 0 100%);
  }
}

.rs-hero__band::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 40px;
  background: var(--rs-secondary);
  clip-path: polygon(0 62%, 100% 0, 100% 100%, 0 100%);
  z-index: -1;
}

@media (min-width: 769px) {
  .rs-hero__band::before {
    top: -36px;
    height: 72px;
  }
}

.rs-hero__title {
  position: relative;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  max-width: 12em;
  white-space: pre-line;
  color: var(--rs-bg);
}

@media (min-width: 769px) {
  .rs-hero__title {
    font-size: clamp(1.75rem, 2.8vw, 3rem);
    font-weight: 500;
    line-height: 1.25;
  }
}

.rs-hero__dots {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: 0.4rem;
  z-index: 2;
}

@media (min-width: 769px) {
  .rs-hero__dots {
    right: 1.25rem;
  }
}

.rs-hero__dot {
  display: block;
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: transparent;
  cursor: pointer;
  margin: 0 3px;
}

@media (min-width: 769px) {
  .rs-hero__dot {
    width: 15px;
    height: 15px;
    margin: 0 5px;
  }
}

.rs-hero__dot.is-active {
  background: #fff;
}

/* ---------- Card / form ---------- */
.rs-card {
  width: 100%;
  max-width: none;
  background: var(--rs-bg-card);
  border-radius: 0;
  box-shadow: none;
  padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  min-height: 100%;
}

@media (min-width: 769px) {
  .rs-card {
    max-width: 32rem;
    border-radius: var(--rs-radius-xl);
    padding: var(--rs-auth-pad) clamp(1.25rem, 4vw, 2.5rem);
    min-height: 0;
  }
}

.rs-card--wide {
  max-width: 100%;
  padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 769px) {
  .rs-card--wide {
    padding: var(--rs-auth-pad) clamp(1rem, 4vw, 1.75rem);
  }
}

.rs-card__title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--rs-text);
  letter-spacing: -0.01em;
  line-height: 1.125;
}

@media (min-width: 769px) {
  .rs-card__title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    line-height: 1.2;
  }
}

.rs-card__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--rs-text);
  line-height: 1.6;
}

.rs-card__subtitle-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.rs-card__subtitle-row .rs-card__subtitle {
  margin: 0;
}

.rs-card__req-legend {
  margin: 0;
  font-size: 0.875rem;
  color: var(--rs-danger);
  line-height: 1.5;
  white-space: nowrap;
  flex-shrink: 0;
}

.rs-card__req-legend .rs-field__req {
  margin-left: 0;
}

.rs-card__user-guide {
  margin: 0.65rem 0 0;
  font-size: 0.875rem;
  color: var(--rs-muted, var(--rs-text));
  line-height: 1.5;
}

.rs-form > .rs-card__user-guide {
  margin: 0;
}

.rs-card__user-guide .rs-link {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.rs-card__section {
  margin-top: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--rs-text);
}

@media (min-width: 769px) {
  .rs-card__section {
    font-size: 1.125rem;
  }
}

.rs-form {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 769px) {
  .rs-form {
    margin-top: 1.75rem;
    gap: var(--rs-space-field);
  }
}

.rs-field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.rs-field__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--rs-text);
  line-height: 1.45;
}

.rs-field__req {
  color: var(--rs-danger);
  margin-left: 0.15rem;
}

.rs-field__hint-err {
  font-size: 0.75rem;
  color: var(--rs-danger);
}

.rs-field__hint {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--rs-text-muted);
}

.rs-field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.rs-field__icon {
  position: absolute;
  left: 1.15rem;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--rs-text);
  opacity: 0.55;
  pointer-events: none;
}

.rs-field__toggle {
  position: absolute;
  right: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: var(--rs-text-muted);
  cursor: pointer;
  border-radius: var(--rs-radius-pill);
}

.rs-field__toggle:hover {
  color: var(--rs-text);
}

.rs-input {
  width: 100%;
  appearance: none;
  border: 1px solid var(--rs-border);
  background: var(--rs-bg-input);
  color: var(--rs-text);
  font: inherit;
  font-weight: 500;
  /* 16px+ avoids iOS Safari auto-zoom on focus */
  font-size: 1rem;
  border-radius: var(--rs-radius-input);
  padding: 0.85rem 1rem;
  min-height: 3.25rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .rs-input {
    padding: 1rem 1.1rem;
    min-height: 3.75rem;
  }
}

.rs-input::placeholder {
  color: var(--rs-text-placeholder);
}

.rs-input--icon {
  padding-left: 3.25rem;
}

.rs-input--toggle {
  padding-right: 3rem;
}

.rs-input--soft {
  border: none;
  background: #f4f7fb;
  border-radius: var(--rs-radius-md);
  min-height: 0;
  padding: 0.85rem 0.9rem;
  font-size: 1rem;
}

@media (min-width: 640px) {
  .rs-input--soft {
    font-size: 0.875rem;
  }
}

.rs-input:focus {
  border-color: var(--rs-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rs-primary) 25%, transparent);
}

.rs-input--soft:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rs-primary) 22%, transparent);
}

.rs-id-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 42%) 1fr;
  gap: 0.5rem;
}

@media (max-width: 379px) {
  .rs-id-row {
    grid-template-columns: 1fr;
  }
}

.rs-settings__phone--modal {
  margin-top: 0.35rem;
}

.rs-settings__phone--display {
  flex: 1;
  min-width: 0;
  --iti-arrow-padding: 0;
}

.rs-settings__phone--display .iti__arrow {
  display: none;
}

.rs-settings__phone--display .iti__selected-dial-code {
  margin-left: 0;
}

.rs-settings__phone--display .iti__country-container {
  padding-left: 0.5rem;
}

.rs-settings__phone--display .iti__selected-country {
  pointer-events: none;
  cursor: default;
}

.rs-settings__phone--display .iti__selected-country-primary {
  padding-right: var(--iti-spacer-horizontal, 8px);
}

.rs-settings__phone--display .iti__tel-input {
  cursor: default;
  color: var(--rs-text-muted);
  pointer-events: none;
  /* ITI sets inline paddingLeft from the country control width; nudge so the
     number clears the flag after we hide the arrow / tighten dial spacing. */
  padding-left: 90px !important;
}

.rs-modal[data-rs-phone-modal] .iti__dropdown-content {
  z-index: 90;
}

.rs-phone .iti,
.rs-settings__phone .iti,
.rs-iti {
  width: 100%;
  display: block;
}

/* Absolute paths: relative url() in ITI CSS vars can miss, and `@` in
   flags@2x.webp is 307'd to %40 — CSS background-image does not follow that. */
:root {
  --iti-path-flags-1x: url("/static/vendor/intl-tel-input/img/flags.webp");
  --iti-path-flags-2x: url("/static/vendor/intl-tel-input/img/flags%402x.webp");
}

.iti {
  --iti-hover-color: color-mix(in srgb, var(--rs-primary) 12%, transparent);
  --iti-border-color: var(--rs-border);
  --iti-country-selector-bg: #fff;
  --iti-icon-color: var(--rs-text-muted);
}

.rs-phone .iti__selected-country,
.rs-settings__phone .iti__selected-country {
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
}

@media (min-width: 640px) {
  .rs-phone .iti__selected-country,
  .rs-settings__phone .iti__selected-country {
    font-size: 0.875rem;
  }
}

.rs-settings__phone .iti__tel-input {
  padding-right: 3rem;
}

.iti--detached-country-selector {
  z-index: 40;
}

.rs-select {
  width: 100%;
  appearance: none;
  border: none;
  background: var(--rs-bg-input)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23757575' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 0.9rem center;
  color: var(--rs-text);
  font: inherit;
  font-size: 1rem;
  border-radius: var(--rs-radius-md);
  padding: 0.85rem 2rem 0.85rem 0.9rem;
  outline: none;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .rs-select {
    font-size: 0.8125rem;
  }
}

.rs-select:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rs-primary) 22%, transparent);
}

.rs-select optgroup {
  font-style: normal;
  font-weight: 700;
  color: var(--rs-text-muted);
}

.rs-select option {
  font-weight: 400;
  color: var(--rs-text);
}

.rs-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rs-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--rs-text);
  line-height: 1.5;
  cursor: pointer;
}

.rs-check input {
  appearance: none;
  margin: 0rem 0 0;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border: 1.5px solid var(--rs-text);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.rs-check,
.rs-check:active,
.rs-check:focus,
.rs-check:focus-within {
  background: transparent;
  outline: none;
  box-shadow: none;
}

.rs-check input:checked {
  background-color: transparent;
  border-color: var(--rs-text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2 6.6 11.2 12.5 4.8' stroke='%233e311f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.95rem 0.95rem;
}

.rs-check input:active,
.rs-check input:focus,
.rs-check input:focus-visible,
.rs-check input:checked:active,
.rs-check input:checked:focus,
.rs-check input:checked:focus-visible {
  background-color: transparent;
  outline: none;
  box-shadow: none;
}

.rs-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--rs-secondary);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button.rs-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  text-align: inherit;
}

.rs-link:hover {
  color: var(--rs-secondary-soft);
  text-decoration: underline;
}

.rs-link:focus {
  outline: none;
}

.rs-link:focus-visible {
  outline: 2px solid var(--rs-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.rs-link--strong {
  color: var(--rs-text);
  font-weight: 600;
}

.rs-check .rs-link,
.rs-check .rs-link:hover {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.rs-check .rs-link::after {
  content: none;
}

.rs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 100%;
  border: 0;
  border-radius: var(--rs-btn-radius);
  padding: 0.45rem 1.35rem;
  min-height: var(--rs-btn-height);
  font: inherit;
  font-size: var(--rs-btn-font-size);
  font-weight: 600;
  line-height: var(--rs-btn-line-height);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 769px) {
  .rs-btn {
    padding: 0.45rem 1.5rem;
  }
}

.rs-btn--inline {
  width: auto;
}

.rs-btn--primary {
  background: var(--rs-primary);
  color: var(--rs-text-on-primary);
}

.rs-btn--primary:hover {
  background: var(--rs-primary-hover);
}

.rs-btn--primary:focus-visible {
  outline: 2px solid var(--rs-primary-hover);
  outline-offset: 2px;
}

.rs-btn.is-disabled,
.rs-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.rs-btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  opacity: 0.85;
  cursor: wait;
}

.rs-btn.is-loading > * {
  opacity: 0;
}

.rs-btn.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.1rem;
  height: 1.1rem;
  margin: -0.55rem 0 0 -0.55rem;
  border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
  border-top-color: var(--rs-text-on-primary, #fff);
  border-radius: 50%;
  animation: rs-btn-spin 0.7s linear infinite;
}

.rs-btn--outline.is-loading::after {
  border-top-color: var(--rs-primary);
}

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

.rs-btn--outline {
  background: var(--rs-bg-card);
  color: var(--rs-text);
  border: 1px solid var(--rs-primary);
  font-size: var(--rs-btn-font-size-outline);
}

.rs-btn--outline:hover {
  background: color-mix(in srgb, var(--rs-primary) 8%, white);
}

.rs-btn--outline:focus-visible {
  outline: 2px solid var(--rs-primary);
  outline-offset: 2px;
}

.rs-btn__accent {
  color: var(--rs-primary);
}

.rs-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ccc;
  font-size: 0.875rem;
  font-weight: 500;
}

.rs-or::before,
.rs-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rs-divider);
}

.rs-pwd-ok {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: var(--rs-success);
}

.rs-pwd-ok[data-ok='false'] {
  color: var(--rs-text-muted);
}

.rs-alert {
  border-radius: var(--rs-radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  margin-bottom: 0.25rem;
}

.rs-alert--error {
  background: var(--rs-error-bg);
  border: 1px solid var(--rs-error-border);
  color: var(--rs-error-text);
}

.rs-alert--success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.rs-card > .rs-alert {
  margin-top: 1rem;
}

.rs-auth-back {
  margin: 0;
  text-align: center;
}

.rs-form > .rs-card__section:first-child {
  margin-top: 0;
}

.rs-divider {
  height: 1px;
  background: var(--rs-divider);
  margin: 0.25rem 0;
}

.rs-checks {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rs-register-family {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rs-register-family__note {
  margin: 0;
  color: var(--rs-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.rs-register-family__slot {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.25rem;
}

.rs-register-family__slot + .rs-register-family__slot {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rs-border);
}

.rs-register-family__slot-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--rs-text);
}

/* App shells (Tailwind pages) share the same system font tokens */
.rs-app-body {
  font-family: var(--rs-font);
  -webkit-font-smoothing: antialiased;
}

.rs-app-body .font-display {
  font-family: var(--rs-font-display);
  font-weight: 600;
}

/* ---------- Questionnaire (wizard inside AppLayout) ---------- */
.rs-q__main {
  width: min(560px, 100%);
  margin: 0 auto;
}

.rs-q-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rs-q-form > .rs-alert {
  margin-bottom: 1rem;
}

.rs-landing-hero__wash {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.12), transparent 40%);
}

#rs-q-wizard .rs-q-card {
  display: none;
}

#rs-q-wizard .rs-q-card.is-current {
  display: flex;
}

#rs-q-wizard .rs-q-card[hidden] {
  display: none !important;
}

.rs-q-progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.875rem;
  color: var(--rs-text);
  margin-bottom: 0.5rem;
}

.rs-q-progress__track {
  height: 4px;
  border-radius: var(--rs-radius-pill);
  background: var(--rs-border);
  overflow: hidden;
}

.rs-q-progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  appearance: none;
}

.rs-q-progress__fill::-webkit-progress-bar {
  background: transparent;
}

.rs-q-progress__fill::-webkit-progress-value {
  background: var(--rs-secondary);
  border-radius: inherit;
}

.rs-q-progress__fill::-moz-progress-bar {
  background: var(--rs-secondary);
  border-radius: inherit;
}

.rs-q-card {
  background: var(--rs-bg-card);
  border-radius: var(--rs-radius-lg);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--rs-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rs-q-question {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.45;
}

.rs-q-question__note {
  font-weight: 500;
  color: var(--rs-text-muted);
  font-size: 0.95em;
}

.rs-q-subhead {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.rs-q-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--rs-text-muted);
  line-height: 1.5;
}

.rs-q-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.rs-q-field__label {
  font-size: 0.875rem;
  font-weight: 600;
}

.rs-q-input {
  width: 100%;
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-md);
  background: var(--rs-bg-input-alt);
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--rs-text);
  outline: none;
  box-sizing: border-box;
  appearance: none;
}

.rs-q-input:focus {
  border-color: var(--rs-primary);
  background: #fff;
}

.rs-q-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23757575' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.rs-q-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.rs-q-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rs-q-option {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: var(--rs-radius-md);
  background: var(--rs-bg-input-alt);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.45;
  transition: border-color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.rs-q-option__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  width: 100%;
}

.rs-q-option__label {
  font-weight: 600;
  text-align: left;
}

.rs-q-option__detail {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--rs-text-muted);
  text-align: left;
}

.rs-q-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rs-q-option.is-selected {
  border-color: var(--rs-text);
  background: #fff;
}

.rs-q-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.rs-q-nav--single {
  grid-template-columns: 1fr;
  margin-top: 1.25rem;
}

.rs-q-gate-body {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--rs-text-muted, #5c6570);
}

.rs-q-nav__btn {
  width: 100%;
}

.rs-q-nav__btn[hidden] {
  display: none !important;
}

.rs-q-nav .rs-btn {
  min-height: 2.75rem;
  padding: 0 1rem;
  font-size: 1rem;
  line-height: 1.35;
  gap: 0.5rem;
}

.rs-q-nav__chev {
  flex-shrink: 0;
  width: 0.625rem;
  height: 1.25rem;
  display: block;
}

@media (min-width: 769px) {
  .rs-q-nav .rs-btn {
    min-height: 3rem;
    font-size: 1.0625rem;
  }
}

.rs-q-error {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--rs-radius-md);
  background: var(--rs-error-bg);
  border: 1px solid var(--rs-error-border);
  color: var(--rs-error-text);
  font-size: 0.875rem;
  line-height: 1.45;
}

.rs-q-error[hidden] {
  display: none !important;
}

.rs-q-nav__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rs-q-skip {
  text-align: center;
  margin: 0;
  font-size: 0.875rem;
}

.rs-q-skip a {
  color: var(--rs-text-muted);
  text-decoration: none;
}

.rs-q-skip a:hover {
  color: var(--rs-text);
  text-decoration: underline;
}

.rs-q-medas {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.rs-q-medas__item {
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-md);
  background: #fff;
}

.rs-q-medas__q {
  display: flex;
  gap: 0;
  align-items: flex-start;
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--rs-text);
  text-align: left;
}

.rs-q-medas__n {
  flex-shrink: 0;
  min-width: 25px;
  color: var(--rs-primary);
  font-variant-numeric: tabular-nums;
}

.rs-q-medas__note {
  margin: -0.35rem 0 0.75rem;
  padding-left: 25px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--rs-text-muted);
}

.rs-q-medas__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-left: 25px;
}

.rs-q-medas__opts .rs-q-option {
  flex: 1 1 6.5rem;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.rs-q-options--compact {
  gap: 0.5rem;
}

.rs-q-options--compact .rs-q-option {
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
}

@media (min-width: 768px) {
  .rs-q-question {
    font-size: 1.1875rem;
  }

  .rs-q-subhead,
  .rs-q-field__label {
    font-size: 0.9375rem;
  }

  .rs-q-option {
    padding: 0.95rem 1.1rem;
    font-size: 0.9375rem;
  }

  .rs-q-option__detail {
    font-size: 0.8125rem;
  }

  .rs-q-medas__q {
    font-size: 0.9375rem;
  }

  .rs-q-medas__opts .rs-q-option,
  .rs-q-options--compact .rs-q-option {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .rs-q-card {
    padding: 1.15rem 1rem;
  }

  .rs-q-question {
    font-size: 1rem;
  }

  .rs-q-option {
    padding: 0.75rem 0.85rem;
    font-size: 0.8125rem;
  }

  .rs-q-option__detail {
    font-size: 0.6875rem;
  }

  .rs-q-medas__q {
    font-size: 0.8125rem;
  }

  .rs-q-medas__opts .rs-q-option {
    flex: 1 1 calc(50% - 0.25rem);
    font-size: 0.75rem;
    min-height: 2.5rem;
  }
}

/* ---------- Welcome popup ---------- */
.rs-welcome {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.rs-welcome__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 46, 46, 0.55);
}

.rs-welcome__panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(90dvh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: var(--rs-radius-lg);
  padding: 1.25rem 1.35rem 1.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.rs-welcome__panel--dual {
  width: min(860px, 100%);
}

.rs-welcome__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rs-welcome__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
}

.rs-welcome__skip {
  border: 0;
  background: transparent;
  color: var(--rs-text-muted);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.15rem 0.25rem;
  white-space: nowrap;
}

.rs-welcome__skip:hover {
  color: var(--rs-text);
  text-decoration: underline;
}

.rs-welcome__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .rs-welcome__grid:not(.rs-welcome__grid--single) {
    grid-template-columns: 1fr 1fr;
  }
}

.rs-welcome__card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rs-welcome__media {
  width: 100%;
  aspect-ratio: 16 / 7;
  border-radius: var(--rs-radius-md);
  background-size: cover;
  background-position: center;
  background-color: #e8e2d8;
}

.rs-welcome__media--memtrax {
  background-image: url('/images/welcome-memtrax.png');
}

.rs-welcome__media--health {
  background-image: url('/images/welcome-health.png');
}

.rs-welcome__card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

.rs-welcome__card-body {
  margin: 0;
  font-size: 0.875rem;
  color: var(--rs-text-muted);
  line-height: 1.55;
  flex: 1;
}

.rs-welcome__card .rs-btn {
  margin-top: 0.25rem;
}

.rs-health-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 1rem;
}

.rs-health-metric {
  background: #fff;
  border: 1px solid var(--rs-border-soft);
  border-radius: var(--rs-radius-md);
  padding: 1rem 1.1rem;
}

.rs-health-metric__label {
  font-size: 0.75rem;
  color: var(--rs-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rs-health-metric__value {
  margin-top: 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
}


/* ---------- App shell (member) ---------- */
.rs-app {
  margin: 0;
  min-height: 100dvh;
  background: var(--rs-bg);
  color: var(--rs-text);
  font-family: var(--rs-font);
  -webkit-font-smoothing: antialiased;
  --rs-app-pad-top: 0.75rem;
  --rs-app-pad-inline: 1.25rem;
  --rs-app-pad-bottom: 5rem;
  --rs-app-shell-gap: 0;
}

@media (min-width: 768px) {
  .rs-app {
    --rs-app-pad-top: 1.25rem;
    --rs-app-pad-inline: 2rem;
    --rs-app-pad-bottom: 3rem;
    --rs-app-shell-gap: 2rem;
  }
}

/* App CTAs — same compact tokens as auth; wider padding on desktop cards.
   Questionnaire nav buttons keep their own sizing. */
.rs-app .rs-btn:not(.rs-q-nav__btn) {
  min-height: var(--rs-btn-height);
  padding: 0.45rem 1.35rem;
  font-size: var(--rs-btn-font-size);
  line-height: var(--rs-btn-line-height);
}

.rs-app .rs-btn--outline {
  font-size: var(--rs-btn-font-size-outline);
}

@media (min-width: 769px) {
  .rs-app .rs-btn:not(.rs-q-nav__btn) {
    padding: 0.45rem 5.35rem;
  }
}

.rs-app__shell {
  display: flex;
  min-height: 100dvh;
  overflow-x: clip;
  gap: var(--rs-app-shell-gap);
}

.rs-app__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.rs-app__content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--rs-app-pad-top) var(--rs-app-pad-inline) var(--rs-app-pad-bottom);
  flex: 1;
}

@media (min-width: 768px) {
  .rs-app__content {
    padding-left: 0;
  }
}

@media (max-width: 767px) {
  .rs-topbar {
    display: none;
  }
}

.rs-sidebar {
  display: none;
  width: 9rem; /* 144px — Figma Menu / Rectangle 15 */
  flex-shrink: 0;
  align-self: flex-start;
  min-height: calc(100dvh - var(--rs-app-pad-top) - var(--rs-app-pad-bottom));
  margin: var(--rs-app-pad-top) 0 var(--rs-app-pad-bottom) var(--rs-app-pad-inline);
  padding: 0 0 var(--rs-app-pad-top);
  background: var(--rs-primary);
  color: #fff;
  flex-direction: column;
  align-items: stretch;
  position: sticky;
  top: var(--rs-app-pad-top);
  left: 0;
  z-index: 12;
  overflow: visible;
  box-sizing: border-box;
  border-radius: var(--rs-radius-lg);
}

/* Vertical rail divider — Figma Menu right edge; stays above active bubble. */
.rs-sidebar::after {
  content: '';
  position: absolute;
  top: var(--rs-radius-lg);
  right: 0;
  bottom: var(--rs-radius-lg);
  width: 1px;
  background: rgba(255, 255, 255, 0.32);
  z-index: 10;
  pointer-events: none;
}

@media (min-width: 768px) {
  .rs-sidebar {
    display: flex;
  }
}

.rs-sidebar__brand {
  display: block;
  align-self: stretch;
  margin: 0 0 1.25rem;
  padding: 0 0.625rem;
  color: #fff;
  text-align: center;
  text-decoration: none;
  position: relative;
  z-index: 11;
}

.rs-sidebar__brand-text {
  display: block;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: pre-line;
  padding-top: 2rem;
}

.rs-sidebar__divider {
  flex-shrink: 0;
  height: 1px;
  margin: 0 0.625rem 2.25rem;
  background: rgba(255, 255, 255, 0.32);
  position: relative;
  z-index: 11;
}

.rs-sidebar__nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4rem; /* ~137px item pitch in Figma (74px row + 64px gap) */
  flex: 1;
  width: 100%;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.rs-sidebar__link {
  position: relative;
  display: block;
  width: 100%;
  min-height: 4.625rem; /* ~74px icon + label — Figma Group 40 */
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.rs-sidebar__bubble {
  position: absolute;
  left: 1.875rem; /* Union x=70, rail x=40 → 30px inset */
  right: -1px; /* stop at vertical rail line */
  width: auto;
  height: 7.1875rem; /* 163px — Figma Union / Group 270 */
  top: 50%;
  transform: translateY(-50%);
  background: var(--rs-bg);
  border-radius: var(--rs-radius-lg) 0 0 var(--rs-radius-lg);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.2s ease;
}

/* Outer corner caps — extend cream past the rail line (Figma ~17px overhang). */
.rs-sidebar__bubble::before,
.rs-sidebar__bubble::after {
  content: '';
  position: absolute;
  right: -1.0625rem;
  width: 1.25rem;
  height: 1.25rem;
  pointer-events: none;
  z-index: 1;
}

.rs-sidebar__bubble::before {
  top: 0;
}

.rs-sidebar__bubble::after {
  bottom: 0;
}

.rs-sidebar__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem; /* ~10px icon-to-label in Figma Group 40 */
  padding: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.rs-sidebar__link:hover,
.rs-sidebar__link:focus-visible,
.rs-sidebar__link.is-active {
  color: var(--rs-text);
}

.rs-sidebar__link:hover .rs-sidebar__bubble,
.rs-sidebar__link:focus-visible .rs-sidebar__bubble,
.rs-sidebar__link.is-active .rs-sidebar__bubble {
  opacity: 1;
}

.rs-sidebar__link:hover .rs-sidebar__content,
.rs-sidebar__link:focus-visible .rs-sidebar__content,
.rs-sidebar__link.is-active .rs-sidebar__content {
  transform: translateX(1.1875rem);
}

.rs-sidebar__link:hover .rs-sidebar__icon,
.rs-sidebar__link:focus-visible .rs-sidebar__icon,
.rs-sidebar__link.is-active .rs-sidebar__icon {
  color: var(--rs-primary);
}

/* Foot links (admin) — no bubble shift; keep white on taupe. */
.rs-sidebar__link--plain:hover,
.rs-sidebar__link--plain:focus-visible,
.rs-sidebar__link--plain.is-active {
  color: #fff;
}

.rs-sidebar__link--plain:hover .rs-sidebar__content,
.rs-sidebar__link--plain:focus-visible .rs-sidebar__content,
.rs-sidebar__link--plain.is-active .rs-sidebar__content {
  transform: none;
}

.rs-sidebar__link--plain:hover .rs-sidebar__icon,
.rs-sidebar__link--plain:focus-visible .rs-sidebar__icon,
.rs-sidebar__link--plain.is-active .rs-sidebar__icon {
  color: #fff;
}

.rs-sidebar__icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  color: #fff;
  transition: color 0.2s ease;
}

.rs-sidebar__icon--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1rem;
  font-weight: 700;
}

.rs-sidebar__label {
  display: block;
  width: 7.625rem;
  max-width: calc(100% - 1rem);
}

.rs-sidebar__foot {
  margin-top: auto;
  padding-top: 4rem; /* match .rs-sidebar__nav gap */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2rem;
  width: 100%;
  overflow: visible;
}

.rs-sidebar__foot > form {
  display: flex;
  justify-content: center;
}

.rs-sidebar__logout {
  width: 7.625rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 0.35rem 0;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.rs-sidebar__logout:hover {
  opacity: 0.88;
}

.rs-nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.rs-nav-icon--sm {
  width: 1.1rem;
  height: 1.1rem;
}

.rs-nav-icon--fab {
  width: 1.5rem;
  height: 1.5rem;
}

.rs-topbar {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* No greeting — keep page titles (settings, booking detail, …) aligned with greet row */
.rs-topbar--solo {
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .rs-topbar {
    display: flex;
  }
}

.rs-topbar__lang {
  display: flex;
  justify-content: flex-end;
}

.rs-topbar__greet {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
}

.rs-tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1px 1.1875rem 1px 1.125rem;
  border-radius: 1.875rem;
  background: var(--rs-secondary);
  color: var(--rs-bg);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.625rem;
  white-space: nowrap;
}

.rs-tier-badge__icon {
  display: block;
  width: 15.25px;
  height: 13.547px;
  flex-shrink: 0;
}

.rs-topbar__lang .rs-auth__lang {
  margin: 0;
}

.rs-mobile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 50px;
  padding: 0 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--rs-border-soft);
}

.rs-mobile-bar__brand {
  font-weight: 600;
  color: var(--rs-text);
  text-decoration: none;
  font-size: 0.9375rem;
  line-height: 1.35;
  max-width: calc(100% - 3rem);
}

.rs-mobile-bar__menu {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0.35rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.rs-mobile-bar__menu span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--rs-text);
  border-radius: 1px;
  transform-origin: center;
  transition:
    transform 0.28s ease,
    opacity 0.2s ease;
}

.rs-mobile-bar__menu.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.rs-mobile-bar__menu.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.rs-mobile-bar__menu.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.rs-mobile-banner {
  display: none;
}

body.rs-drawer-open {
  overflow: hidden;
}

.rs-offscreen {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rs-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  pointer-events: none;
}

.rs-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.rs-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(62, 49, 31, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rs-drawer.is-open .rs-drawer__backdrop {
  opacity: 1;
}

.rs-drawer__panel {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  background: var(--rs-bg);
  color: var(--rs-text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.rs-drawer.is-open .rs-drawer__panel {
  transform: translateX(0);
}

.rs-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 50px;
  padding: 0 1.25rem;
  background: #fff;
  color: var(--rs-text);
  flex-shrink: 0;
}

.rs-drawer__title {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.35;
  max-width: calc(100% - 2.5rem);
}

.rs-drawer__close {
  position: relative;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.rs-drawer__close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.125rem;
  height: 2px;
  margin: -1px 0 0 -0.5625rem;
  background: var(--rs-text);
  border-radius: 1px;
  transform-origin: center;
}

.rs-drawer__close span:first-child {
  transform: rotate(45deg);
}

.rs-drawer__close span:last-child {
  transform: rotate(-45deg);
}

.rs-drawer__nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: auto;
  background: var(--rs-bg);
  gap: 1px; /* Figma m_menu: 1px cream separators between 80px white rows */
}

.rs-drawer__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 50px;
  padding: 0 1.25rem;
  color: var(--rs-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.35;
  background: #fff;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.rs-drawer__link.is-active {
  background: var(--rs-bg);
}

.rs-drawer__link:not(.is-active):hover,
.rs-drawer__link:not(.is-active):focus-visible {
  background: color-mix(in srgb, var(--rs-primary) 7%, #fff);
}

.rs-drawer__icon,
.rs-drawer__label,
.rs-drawer__chev {
  position: relative;
  z-index: 1;
}

.rs-drawer__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--rs-secondary);
  transition: color 0.2s ease;
}

.rs-drawer__link:hover .rs-drawer__icon,
.rs-drawer__link:focus-visible .rs-drawer__icon,
.rs-drawer__link.is-active .rs-drawer__icon {
  color: var(--rs-primary);
}

.rs-drawer__icon--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--rs-primary) 25%, #fff);
  font-size: 0.75rem;
  font-weight: 700;
}

.rs-drawer__chev {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.75rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: var(--rs-text);
  opacity: 0.7;
  transition: transform 0.28s ease, opacity 0.2s ease;
}

.rs-drawer__chev svg {
  display: block;
  width: 0.75rem;
  height: 1.5rem;
}

.rs-drawer__link:hover .rs-drawer__chev,
.rs-drawer__link:focus-visible .rs-drawer__chev {
  transform: translateX(0.2rem);
  opacity: 1;
}

.rs-drawer__foot {
  flex-shrink: 0;
  background: var(--rs-bg);
  margin-top: 1px;
}

.rs-drawer__lang {
  padding: 0.75rem 1.25rem 0.35rem;
}

.rs-drawer__lang .rs-auth__lang {
  justify-content: center;
  gap: 1.25rem;
}

.rs-drawer__logout-wrap {
  padding: 0.25rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

.rs-drawer__logout {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--rs-text-muted);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.65rem 0;
  cursor: pointer;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.rs-drawer__logout:hover {
  color: var(--rs-text);
}

.rs-contact-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 4.5rem;
  padding: 0.65rem 0.35rem;
  border-radius: 50%;
  aspect-ratio: 1;
  justify-content: center;
  background: #fff;
  color: var(--rs-text);
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.rs-contact-fab span {
  display: none;
}

@media (min-width: 768px) {
  .rs-contact-fab {
    width: auto;
    aspect-ratio: auto;
    border-radius: var(--rs-radius-lg);
    padding: 0.75rem 0.85rem;
    max-width: 5.5rem;
  }
  .rs-contact-fab span {
    display: block;
  }
}

/* ---------- Booking ---------- */
.rs-book {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rs-book-unlimited {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rs-book-unlimited__head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rs-book-unlimited__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.rs-book-unlimited__title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--rs-text);
  line-height: 1.35;
}

.rs-book-unlimited__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--rs-radius-pill);
  background: rgba(72, 91, 86, 0.1);
  color: var(--rs-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.rs-book-unlimited__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--rs-text-muted);
  line-height: 1.5;
}

.rs-book-unlimited .rs-btn--primary {
  background: var(--rs-secondary);
}

.rs-book-unlimited .rs-btn--primary:hover {
  background: var(--rs-secondary-soft);
}

.rs-book-balance-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: fit-content;
}

.rs-book-balance-wrap--exhausted {
  width: 100%;
}

.rs-book-balance-wrap--exhausted .rs-book-balance {
  width: fit-content;
}

.rs-book-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: #fff;
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-input);
  width: 100%;
}

.rs-book-quota-hint {
  margin: 0;
  width: 100%;
  max-width: none;
  font-size: 0.875rem;
  color: var(--rs-text-muted);
  line-height: 1.5;
}

.rs-book-quota-hint .rs-link {
  font-size: inherit;
}

@media (min-width: 768px) {
  .rs-book-quota-hint {
    font-size: 1rem;
    line-height: 1.55;
  }
}

.rs-book-balance__label {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--rs-text);
}

.rs-book-balance__n {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--rs-secondary);
  white-space: nowrap;
}

.rs-book-grid,
.rs-article-grid,
.rs-premium-grid,
.rs-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
  gap: 1rem;
}

@media (min-width: 768px) {
  .rs-book-grid,
  .rs-article-grid,
  .rs-premium-grid,
  .rs-card-grid {
    gap: 1.25rem;
  }
}

.rs-book-card {
  background: #fff;
  border-radius: var(--rs-radius-lg);
  overflow: hidden;
  box-shadow: var(--rs-shadow-card);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease;
}

.rs-book-card__media,
.rs-book-hero {
  aspect-ratio: 16 / 7;
  background-size: cover;
  background-position: center;
  background-color: #e8e2d8;
}

.rs-book-card__media {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  background: #e8e2d8;
  isolation: isolate;
}

.rs-card-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.rs-card-hero-bg__img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center bottom;
  transition: transform 0.45s ease;
}

.rs-card-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.rs-article-card__media .rs-card-hero-bg::after,
.rs-premium-card__media .rs-card-hero-bg::after {
  /* background: linear-gradient(160deg, rgba(168, 150, 124, 0.3), rgba(46, 46, 46, 0.2)); */
}

.rs-book-hero {
  position: relative;
  border-radius: var(--rs-radius-lg);
  margin-bottom: 1.25rem;
  max-height: 220px;
  overflow: hidden;
}

/* Booking detail — full-width hero + panel; form column centered (Figma 128:1679) */
.rs-book-detail {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.rs-book-detail__panel {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--rs-shadow-card);
  /* Do not use overflow:hidden here — it clips position:fixed slot modals
     (rs-book-slots__modal) so the hero paints above the backdrop. */
}

.rs-book-detail__hero {
  position: relative;
  z-index: 0;
  width: 100%;
  aspect-ratio: 16 / 7;
  height: auto;
  background: #e8e2d8;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.rs-book-card__body {
  padding: 1rem 1.1rem 1.15rem;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

@media (min-width: 700px) {
  .rs-book-card__body {
    padding: 1.25rem 1.25rem 1.35rem;
    padding-top: 0;
    gap: 0.65rem;
  }
}

.rs-book-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.rs-book-card__text {
  margin: 0;
  flex: 1;
  font-size: 0.875rem;
  color: var(--rs-text-muted);
  line-height: 1.55;
}

.rs-book-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.15rem;
  align-items: stretch;
}

.rs-btn--card {
  width: 100%;
  align-self: stretch;
  margin-top: 0;
}

@media (min-width: 768px) {
  body:has(.rs-bottom-promo) .rs-contact-fab {
    display: none;
  }
}

/* ---------- Bottom promo (MemTrax + contact) — Figma Group 206, fixed bottom-right ---------- */
.rs-bottom-promo {
  position: fixed;
  z-index: 35;
  right: var(--rs-app-pad-inline);
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  max-width: calc(100% - 2 * var(--rs-app-pad-inline));
  pointer-events: none;
}

.rs-bottom-promo > * {
  pointer-events: auto;
}

@media (min-width: 768px) {
  .rs-bottom-promo {
    left: auto;
    right: 3.25rem; /* Figma ~52px from frame right on 1512px artboard */
    bottom: 2rem; /* Figma ~32px from frame bottom */
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.625rem; /* Figma ~42px between Group 181 and Group 109 */
    width: auto;
    max-width: min(36.875rem, calc(100vw - 3.25rem - 9rem)); /* 590px cluster; leave sidebar room */
  }
}

body:has(.rs-bottom-promo) .rs-app__content {
  padding-bottom: calc(
    var(--rs-app-pad-bottom) + 10rem + env(safe-area-inset-bottom, 0px)
  );
}

@media (min-width: 768px) {
  body:has(.rs-bottom-promo) .rs-app__content {
    padding-bottom: calc(
      var(--rs-app-pad-bottom) + 11rem + env(safe-area-inset-bottom, 0px)
    );
  }
}

body:has(.rs-bottom-promo):has(.rs-premium-page--professional) .rs-app__content {
  padding-bottom: calc(
    var(--rs-app-pad-bottom) + 11.5rem + env(safe-area-inset-bottom, 0px)
  );
}

@media (min-width: 768px) {
  body:has(.rs-bottom-promo):has(.rs-premium-page--professional) .rs-app__content {
    padding-bottom: calc(
      var(--rs-app-pad-bottom) + 11rem + 2.5rem + env(safe-area-inset-bottom, 0px)
    );
  }
}

body:has(.rs-bottom-promo) .rs-contact-fab {
  bottom: calc(11rem + env(safe-area-inset-bottom, 0px));
}

/* MemTrax promo card — Figma Group 181 (node 146:1467) */
@keyframes rs-memtrax-promo-idle {
  0%,
  62%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: var(--rs-shadow-card);
  }
  70% {
    transform: translateY(-10px) scale(1.035);
    box-shadow: 0 18px 40px rgba(46, 46, 46, 0.2);
  }
  78% {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 26px rgba(46, 46, 46, 0.14);
  }
  86% {
    transform: translateY(-7px) scale(1.025);
    box-shadow: 0 14px 32px rgba(46, 46, 46, 0.17);
  }
  94% {
    transform: translateY(0) scale(1);
    box-shadow: var(--rs-shadow-card);
  }
}

@keyframes rs-memtrax-promo-cta-nudge {
  0%,
  55%,
  100% {
    transform: translateX(0);
    opacity: 1;
  }
  65% {
    transform: translateX(6px);
    opacity: 0.85;
  }
  75% {
    transform: translateX(0);
    opacity: 1;
  }
  85% {
    transform: translateX(5px);
    opacity: 0.9;
  }
  95% {
    transform: translateX(0);
    opacity: 1;
  }
}

.rs-memtrax-promo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  max-width: calc(100vw - 2 * var(--rs-app-pad-inline));
}

.rs-memtrax-promo__card {
  position: relative;
  display: flex;
  align-items: stretch;
  /* vw max-width: avoid width:100% in fixed shrink-to-fit parent (Safari blows out). */
  width: 26.625rem; /* 426px */
  max-width: 100%;
  /* Definite height on all viewports — Safari expands flex imgs to intrinsic size otherwise. */
  height: 8.5625rem; /* 137px */
  min-height: 8.5625rem;
  max-height: 8.5625rem;
  border-radius: 1.038rem; /* ~16.6px */
  background: linear-gradient(to right, #ae9a80, #8b9d87);
  box-shadow: var(--rs-shadow-card);
  box-sizing: border-box;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  animation: rs-memtrax-promo-idle 3.2s ease-in-out 3;
  transition: box-shadow 0.25s ease;
}

.rs-memtrax-promo__minimize {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(46, 46, 46, 0.28);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(46, 46, 46, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rs-memtrax-promo__minimize:hover {
  background: rgba(46, 46, 46, 0.42);
}

.rs-memtrax-promo__minimize:active {
  transform: scale(0.96);
}

.rs-memtrax-promo__minimize-icon {
  display: block;
  width: 0.7rem;
  height: 0.125rem;
  border-radius: 999px;
  background: currentColor;
}

.rs-memtrax-promo__restore {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem 0.55rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: linear-gradient(to right, #ae9a80, #8b9d87);
  color: #fff;
  box-shadow: var(--rs-shadow-card);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rs-memtrax-promo__restore:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(46, 46, 46, 0.16);
}

.rs-memtrax-promo__restore-icon {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.rs-memtrax-promo.is-minimized .rs-memtrax-promo__card,
.rs-memtrax-promo.is-minimized .rs-memtrax-promo__minimize,
html.rs-memtrax-promo-min .rs-memtrax-promo__card,
html.rs-memtrax-promo-min .rs-memtrax-promo__minimize {
  display: none;
}

.rs-memtrax-promo.is-minimized .rs-memtrax-promo__restore,
html.rs-memtrax-promo-min .rs-memtrax-promo__restore {
  display: inline-flex;
}

html.rs-memtrax-promo-min .rs-app__content,
body:has(.rs-memtrax-promo.is-minimized) .rs-app__content {
  padding-bottom: calc(
    var(--rs-app-pad-bottom) + 5.5rem + env(safe-area-inset-bottom, 0px)
  );
}

@media (min-width: 768px) {
  html.rs-memtrax-promo-min .rs-app__content,
  body:has(.rs-memtrax-promo.is-minimized) .rs-app__content {
    padding-bottom: calc(
      var(--rs-app-pad-bottom) + 11rem + env(safe-area-inset-bottom, 0px)
    );
  }
}

html.rs-memtrax-promo-min .rs-contact-fab,
body:has(.rs-memtrax-promo.is-minimized) .rs-contact-fab {
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

html.rs-memtrax-promo-min:has(.rs-premium-page--professional) .rs-app__content,
body:has(.rs-memtrax-promo.is-minimized):has(.rs-premium-page--professional) .rs-app__content {
  padding-bottom: calc(
    var(--rs-app-pad-bottom) + 5.5rem + env(safe-area-inset-bottom, 0px)
  );
}

@media (min-width: 768px) {
  html.rs-memtrax-promo-min:has(.rs-premium-page--professional) .rs-app__content,
  body:has(.rs-memtrax-promo.is-minimized):has(.rs-premium-page--professional) .rs-app__content {
    padding-bottom: calc(
      var(--rs-app-pad-bottom) + 11rem + 2.5rem + env(safe-area-inset-bottom, 0px)
    );
  }
}

.rs-memtrax-promo__photo {
  position: relative;
  flex: 0 0 32%;
  max-width: 8.5625rem; /* 137px */
  min-width: 0;
  align-self: stretch;
  overflow: hidden;
}

.rs-memtrax-promo__photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  transform: scaleX(-1);
}

.rs-memtrax-promo__content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.3125rem; /* ~5px — Figma title → body */
  min-width: 0;
  /* Extra right pad so copy clears the minimize control */
  padding: 2.375rem 0.5rem 1rem 0.5rem;
}

.rs-memtrax-promo__badge {
  position: absolute;
  top: 0.625rem; /* ~10px */
  left: 0.5rem;
  right: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 2.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.rs-memtrax-promo__badge-icon {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.rs-memtrax-promo__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.29;
}

@media (min-width: 768px) {
  .rs-memtrax-promo__card {
    max-width: 26.625rem;
  }

  .rs-memtrax-promo__content {
    padding: 3.075rem 2rem 1.125rem 0.9375rem;
    gap: 0.3125rem;
  }

  .rs-memtrax-promo__content:lang(en) {
    padding: 2.875rem 2rem 1.125rem 0.9375rem;
    gap: 0.1125rem;
  }

  .rs-memtrax-promo__badge {
    left: 0.9375rem;
  }

  .rs-memtrax-promo__title {
    font-size: 1.5rem; /* 24px */
    line-height: 1.29;
    padding-right: 0;
  }
}

.rs-memtrax-promo__body {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.43;
  padding-right: 0.25rem;
  white-space: pre-line;
}

.rs-memtrax-promo__body:lang(en) {
  font-size: 0.8rem;
  padding-top: 7px;
}

@media (min-width: 768px) {
  .rs-memtrax-promo__body:lang(en) {
    font-size: 0.875rem;
    padding-top: 0px;
  }
}

.rs-memtrax-promo__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.125rem; /* ~7px total from body — Figma body → CTA */
  font-size: 0.9345rem;
  font-weight: 600;
  line-height: 1.45;
}

.rs-memtrax-promo__cta-arrow {
  display: block;
  width: 0.5rem;
  height: 0.875rem;
  flex-shrink: 0;
  animation: rs-memtrax-promo-cta-nudge 3.2s ease-in-out infinite;
}

@media (hover: hover) {
  .rs-memtrax-promo__card:hover {
    animation-play-state: paused;
    box-shadow: 0 14px 36px rgba(46, 46, 46, 0.14);
  }

  .rs-memtrax-promo__card:hover .rs-memtrax-promo__cta-arrow {
    animation-play-state: paused;
  }

  .rs-contact-chip:hover {
    transform: translateY(-4px);
  }
}

.rs-memtrax-promo__card:active {
  animation-play-state: paused;
  transition-duration: 0.1s;
}

@media (prefers-reduced-motion: reduce) {
  .rs-memtrax-promo__card,
  .rs-memtrax-promo__cta-arrow {
    animation: none;
  }
}

.rs-contact-chip {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6875rem; /* ~11px — 80 + 11 + 24 + top pad ≈ 131px */
  width: 7.625rem; /* Figma Group 109 — 122px */
  height: 8.1875rem; /* Figma — 131px */
  flex-shrink: 0;
  text-decoration: none;
  color: var(--rs-text);
  transition: transform 0.25s ease;
}

@media (min-width: 768px) {
  .rs-contact-chip {
    display: flex;
  }
}

.rs-contact-chip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem; /* 80px circle — Figma Group 109 */
  height: 5rem;
  border-radius: 50%;
  background: var(--rs-primary);
  color: var(--rs-text-on-primary);
  box-shadow: 0 4px 18px rgba(174, 154, 128, 0.35);
}

.rs-contact-chip__icon .rs-nav-icon {
  width: 2.5rem; /* Figma solar:call-medicine-bold — 40px */
  height: 2.5rem;
}

.rs-contact-chip__label {
  width: 100%;
  font-size: 0.875rem; /* 14px — Figma caption */
  font-weight: 500;
  line-height: 1.7142857143; /* 24px */
  text-align: center;
  filter: drop-shadow(1px 0px 2px #f8f7f2);
}

.rs-contact-chip:active {
  transform: translateY(-1px);
  transition-duration: 0.1s;
}

.rs-book-form {
  position: relative;
  /* Avoid z-index here — it creates a stacking context that traps
     rs-book-slots__modal below the hero / sidebar. */
  background: transparent;
  border-radius: 0;
  padding: 1.25rem 2.125rem 2.5rem;
  box-shadow: none;
  max-width: none;
  margin: 0;
}

.rs-book-form__main {
  max-width: 38.125rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.rs-book-form__back {
  color: var(--rs-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Back navigation — Figma weui:arrow-filled + label */
.rs-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--rs-text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  line-height: 2;
  margin-bottom: 0.75rem;
}

.rs-back-link__arrow {
  flex-shrink: 0;
  width: 0.5rem;
  height: 1rem;
  display: block;
  transform: scaleX(-1);
}

.rs-back-link__icon {
  flex-shrink: 0;
  width: 0.5rem;
  height: 1rem;
  display: block;
}

.rs-back-link--muted {
  color: #5c6b4a;
}

.rs-back-link--muted:hover {
  text-decoration: underline;
}

.rs-book-form__title {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.125;
}

.rs-book-form__desc {
  margin: 0 0 1.5rem;
  color: var(--rs-text);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.45;
}

.rs-book-fieldset {
  border: 0;
  margin: 0 0 1.25rem;
  padding: 0;
}

.rs-book-fieldset legend {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  padding: 0;
}

.rs-book-location {
  /* background-color: var(--rs-bg); */
  border: 1px solid var(--rs-border);
}

.rs-book-location-fields .rs-book-location {
  margin-top: 0.75rem;
}

.rs-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.rs-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: var(--rs-radius-md);
  background: var(--rs-bg-input-alt);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.3;
}

.rs-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.rs-chip.is-selected {
  border-color: var(--rs-text);
  background: #fff;
}

.rs-book-slot-label {
  margin: 0.75rem 0 0.45rem;
  font-size: 0.85rem;
  color: var(--rs-text-muted);
}

.rs-book-cal {
  width: 100%;
  max-width: none;
}
.rs-book-cal__trigger-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
}
.rs-book-cal__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--rs-border, #e6ddd2);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--rs-text);
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}
.rs-book-cal__trigger:hover,
.rs-book-cal.is-open .rs-book-cal__trigger {
  border-color: var(--rs-brand, #c45c26);
}
.rs-book-cal__clear {
  flex: 0 0 auto;
  align-self: stretch;
  padding: 0 0.9rem;
  border: 1px solid var(--rs-border, #e6ddd2);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--rs-text-muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.rs-book-cal__clear:hover {
  border-color: var(--rs-text-muted);
  color: var(--rs-text);
}
.rs-book-cal__trigger-chevron {
  color: var(--rs-text-muted);
  font-size: 0.75rem;
  transition: transform 0.15s ease;
}
.rs-book-cal.is-open .rs-book-cal__trigger-chevron {
  transform: rotate(180deg);
}
.rs-book-cal__body {
  margin: 0;
  width: 100%;
  max-width: none;
}
.rs-book-cal__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.rs-book-cal__month {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--rs-text);
}
.rs-book-cal__nav {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--rs-border, #e6ddd2);
  background: #fff;
  color: var(--rs-text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.rs-book-cal__nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.rs-book-cal__weekdays,
.rs-book-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
}
.rs-book-cal__weekdays {
  margin-bottom: 0.35rem;
}
.rs-book-cal__weekdays > span {
  text-align: center;
  font-size: 0.7rem;
  color: var(--rs-text-muted);
}
.rs-book-cal__day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: #fff;
  color: var(--rs-text);
  font-size: 0.85rem;
  cursor: pointer;
}
.rs-book-cal__day.is-empty {
  visibility: hidden;
  pointer-events: none;
}
.rs-book-cal__day.is-disabled,
.rs-book-cal__day:disabled {
  color: var(--rs-text-muted);
  opacity: 0.38;
  cursor: not-allowed;
  background: transparent;
  text-decoration: line-through;
}
.rs-book-cal__day.is-selected {
  border-color: var(--rs-text);
  background: var(--rs-brand-50, #f7f1ea);
  font-weight: 600;
}
.rs-book-cal__day:not(:disabled):hover {
  border-color: var(--rs-border, #e6ddd2);
}

@media (min-width: 769px) {
  .rs-book-cal__toolbar {
    margin-bottom: 0.45rem;
  }
  .rs-book-cal__weekdays,
  .rs-book-cal__grid {
    gap: 0.2rem;
  }
  .rs-book-cal__weekdays {
    margin-bottom: 0.25rem;
  }
  .rs-book-cal__day {
    aspect-ratio: auto;
    height: 2.35rem;
    border-radius: 0.45rem;
    font-size: 0.82rem;
  }
}

.rs-book-slots {
  margin: 0 0 1.25rem;
}
.rs-book-slots__head {
  margin-bottom: 0.85rem;
}
.rs-book-slots__title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--rs-text);
}
.rs-book-slots__hint {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--rs-text-muted);
}
.rs-book-slots__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 480px) {
  .rs-book-slots__cards {
    grid-template-columns: 1fr 1fr;
  }
}
.rs-book-slots__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 0.95rem 1rem;
  text-align: left;
  font: inherit;
  color: var(--rs-text);
  background: #fff;
  border: 1.5px dashed var(--rs-border, #e6ddd2);
  border-radius: var(--rs-radius-md, 0.75rem);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.rs-book-slots__card:hover,
.rs-book-slots__card:focus-visible {
  border-style: solid;
  border-color: var(--rs-primary, #c45c26);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rs-primary, #c45c26) 18%, transparent);
  outline: none;
}
.rs-book-slots__card.is-filled {
  border-style: solid;
  border-color: color-mix(in srgb, var(--rs-primary, #c45c26) 45%, var(--rs-border, #e6ddd2));
  background: color-mix(in srgb, var(--rs-primary, #c45c26) 5%, #fff);
}
.rs-book-slots__card-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rs-text-muted);
}
.rs-book-slots__card-value {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--rs-text);
}
.rs-book-slots__card:not(.is-filled) .rs-book-slots__card-value {
  font-weight: 600;
  color: var(--rs-text-muted);
}
.rs-book-slots__card-cta {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rs-primary, #c45c26);
}
.rs-book-slots__panel {
  text-align: left;
}
.rs-book-slots__panel .rs-chip-row {
  min-width: 0;
  max-width: 100%;
}
.rs-book-slots__panel-shell {
  width: min(440px, 100%);
  max-height: min(90dvh, 100%);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.rs-book-slots__actions {
  margin-top: 1rem;
}
.rs-book-slots__actions .rs-btn {
  width: 100%;
}

@media (max-width: 639px) {
  .rs-modal.rs-book-slots__modal {
    padding:
      max(0.75rem, env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px));
    align-items: center;
    justify-content: center;
  }

  .rs-modal.rs-book-slots__modal .rs-modal__panel {
    width: 100%;
    max-width: none;
    max-height: min(90dvh, 100%);
    padding:
      1.25rem 1rem
      calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }
}

.rs-book-form__slot-hint {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--rs-text-muted);
}
.rs-book-form__submit {
  margin-top: 0.75rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}

.rs-book-form__submit .rs-forward-arrow {
  flex-shrink: 0;
  width: 0.5rem;
  height: 1rem;
  display: block;
}

/* Online seminar catalogue (reuses .rs-book-grid / .rs-book-card) */
.rs-seminar-list .rs-back-link {
  margin-bottom: 0;
}

.rs-seminar-list .rs-book-card__body {
  padding-top: 1rem;
  gap: 0.4rem;
}

.rs-seminar-list .rs-book-card__body form,
.rs-seminar-list .rs-book-card__body > .rs-btn--card,
.rs-seminar-list .rs-book-card__body > .rs-seminar-card__booked {
  width: 100%;
  margin-top: auto;
}

.rs-seminar-list .rs-btn--primary {
  background: var(--rs-secondary);
}

.rs-seminar-list .rs-btn--primary:hover {
  background: var(--rs-secondary-soft);
}

.rs-seminar-list__completed .rs-book-grid {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.rs-seminar-list__title {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
}

.rs-seminar-list__desc {
  margin: 0;
  color: var(--rs-text);
  font-size: 1rem;
  line-height: 1.5;
}

.rs-seminar-card__fields {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 0.5rem;
  row-gap: 0.35rem;
  align-items: start;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.rs-seminar-card__label {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}

.rs-seminar-card__label::after {
  content: ':';
}

.rs-seminar-card__value {
  margin: 0;
  min-width: 0;
  white-space: pre-line;
}

.rs-seminar-card__booked {
  margin: 0.25rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: var(--rs-radius-md);
  background: var(--rs-bg);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.rs-seminar-list__title--section {
  margin-top: 2.25rem;
  font-size: 1.375rem;
}

.rs-seminar-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 1.5rem;
  overflow: hidden;
  background: #000;
  border-radius: var(--rs-radius-md);
}

.rs-seminar-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 767px) {
  .rs-book-detail__panel {
    border-radius: 16px;
  }

  .rs-book-detail__hero {
    border-radius: 16px 16px 0 0;
  }

  .rs-book-form {
    padding: 0rem 1.25rem 2rem;
  }

  .rs-book-form .rs-back-link {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
  }

  .rs-book-form__title {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .rs-book-form__desc {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }

  .rs-book-fieldset legend {
    font-size: 0.875rem;
  }

  .rs-chip {
    font-size: 0.8125rem;
    padding: 0.55rem 0.85rem;
  }

  .rs-seminar-list {
    gap: 0.5rem;
  }

  .rs-seminar-list .rs-back-link {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .rs-seminar-list__title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.15rem;
  }

  .rs-seminar-list__desc {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.35rem;
  }

  .rs-seminar-list__title--section {
    margin-top: 1.75rem;
    font-size: 1.125rem;
  }
}

/* ---------- Filters / status / modal ---------- */
.rs-filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 1.25rem;
  border-radius: var(--rs-btn-radius);
  border: 1px solid var(--rs-primary);
  color: var(--rs-text);
  text-decoration: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--rs-bg-card);
  cursor: pointer;
}
.rs-filter-pill.is-active {
  background: var(--rs-primary);
  color: var(--rs-text-on-primary);
  border-color: var(--rs-primary);
}
.rs-mybook__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}
.rs-mybook__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-bottom: 0;
}
.rs-mybook__empty {
  text-align: left;
  color: var(--rs-text-muted);
  padding: 2rem 1rem;
}
.rs-mybook__groups {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.rs-mybook__group-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rs-text);
}
.rs-mybook__head {
  display: none;
  /* 5 cols (guide column hidden until assigned guides are confirmed) */
  grid-template-columns: 1.1fr 1.35fr 0.9fr 1.05fr 0.85fr;
  gap: 0.75rem;
  padding: 0 1rem 0.5rem;
  font-size: 0.75rem;
  color: var(--rs-text-muted);
}
.rs-mybook__head > span:last-child {
  text-align: right;
}
@media (min-width: 900px) {
  .rs-mybook__head { display: grid; }
}
.rs-mybook__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.rs-mybook__row {
  background: #fff;
  border-radius: var(--rs-radius-md);
  padding: 1rem;
  box-shadow: var(--rs-shadow-card);
  display: grid;
  gap: 0.65rem;
}
.rs-mybook__row > div::before {
  content: attr(data-label);
  display: block;
  font-size: 0.7rem;
  color: var(--rs-text-muted);
  margin-bottom: 0.15rem;
}
@media (min-width: 900px) {
  .rs-mybook__row {
    /* 5 cols (guide column hidden until assigned guides are confirmed) */
    grid-template-columns: 1.1fr 1.35fr 0.9fr 1.05fr 0.85fr;
    align-items: center;
  }
  .rs-mybook__row > div::before { display: none; }
}
.rs-mybook__content { font-size: 0.85rem; color: var(--rs-text-muted); line-height: 1.4; }
.rs-mybook__datetime { white-space: pre-line; font-size: 0.85rem; line-height: 1.4; }
.rs-mybook__datetime-when { white-space: pre-line; display: block; }
/* Guide column styles kept for when the feature is enabled */
.rs-mybook__guide { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.rs-mybook__avatar {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: linear-gradient(135deg, #c4b3a0, #8a7a68);
  flex-shrink: 0;
}
.rs-mybook__status-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
@media (min-width: 900px) {
  .rs-mybook__status-cell { align-items: flex-end; text-align: right; }
}
.rs-mybook__again { font-size: 0.8rem; color: var(--rs-text-muted); text-decoration: none; }
.rs-mybook__again.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.rs-mybook__notice {
  margin: 0 0 1rem;
}
.rs-mybook__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 0.15rem;
}
.rs-mybook__cancel-form {
  display: inline;
  margin: 0;
}
.rs-mybook__action {
  font-size: 0.8rem;
  color: var(--rs-brand);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.rs-mybook__action--danger {
  color: #b42318;
}
.rs-mybook__session {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.rs-mybook__session-link {
  color: var(--rs-brand);
  text-decoration: underline;
  word-break: break-all;
}
.rs-mybook__session-pending {
  color: var(--rs-text-muted);
}
.rs-status {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.35rem 0.75rem; border-radius: var(--rs-radius-pill);
  font-size: 0.8rem; font-weight: 600; color: #fff;
}
.rs-status--confirmed { background: #5c4e42; }
.rs-status--pending { background: #a8967c; }
.rs-status--completed { background: #c5c5c5; color: #333; }
.rs-status--cancelled { background: #d4b0b0; color: #5c3a3a; }
.rs-status--no-show { background: #d4c4b0; color: #5c4a3a; }
.rs-status--muted { background: #ddd; color: #666; }

.rs-modal {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.rs-modal[hidden] {
  display: none !important;
}
.rs-modal__close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: #e8e8e8; color: #666; text-decoration: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.rs-modal__backdrop {
  position: absolute; inset: 0; background: rgba(46,46,46,0.5); text-decoration: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.rs-modal__panel {
  position: relative; background: #fff; border-radius: var(--rs-radius-lg);
  padding: 2rem 1.5rem 1.75rem; width: min(420px, 100%);
  box-shadow: 0 16px 48px rgba(0,0,0,0.18); text-align: center;
}
.rs-modal__check {
  width: 4rem; height: 4rem; margin: 0.5rem auto 1rem;
  border-radius: 50%; background: var(--rs-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.75rem;
}
.rs-modal__warn {
  width: 4rem; height: 4rem; margin: 0.5rem auto 1rem;
  border-radius: 50%; background: var(--rs-error-bg, #fef2f2); color: var(--rs-error-text, #991b1b);
  border: 2px solid var(--rs-error-border, #fecaca);
  display: flex; align-items: center; justify-content: center; font-size: 1.75rem; font-weight: 700;
}
.rs-modal__msg { margin: 0; font-size: 1.1rem; font-weight: 600; }
.rs-modal[data-rs-premium-quota-nudge] .rs-modal__msg {
  padding-bottom: 1.25rem;
}
.rs-modal__title { margin: 0 0 1rem; font-size: 1.15rem; font-weight: 700; }
.rs-modal--stack { z-index: 80; }
.rs-modal__panel--confirm {
  text-align: left;
}
.rs-modal__panel--confirm .rs-modal__title {
  text-align: center;
  margin-bottom: 0.75rem;
}
.rs-modal__panel--confirm .rs-modal__warn {
  margin-bottom: 0.75rem;
}
.rs-mybook-cancel__impact {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--rs-text-muted);
  text-align: center;
}
.rs-family-confirm__note {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--rs-text-muted);
  text-align: center;
}
.rs-family-confirm__review {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-md);
  background: color-mix(in srgb, var(--rs-primary) 4%, #fff);
}
.rs-family-confirm__row {
  display: grid;
  grid-template-columns: minmax(5.5rem, 38%) 1fr;
  gap: 0.35rem 0.75rem;
  padding: 0.35rem 0;
}
.rs-family-confirm__row + .rs-family-confirm__row {
  border-top: 1px solid var(--rs-border);
}
.rs-family-confirm__row dt {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--rs-text-muted);
}
.rs-family-confirm__row dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--rs-text);
  word-break: break-word;
}
.rs-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: stretch;
}
.rs-modal__actions .rs-btn {
  flex: 1 1 auto;
  min-width: 0;
}

.rs-tel-popup .rs-modal__panel {
  width: min(22.5rem, 100%);
}
.rs-tel-popup__number {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--rs-text);
  user-select: all;
  -webkit-user-select: all;
}
.rs-tel-popup__qr {
  display: flex;
  justify-content: center;
  margin: 0 auto 1rem;
  padding: 0.75rem;
  width: fit-content;
  background: #fff;
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-md);
}
.rs-tel-popup__qr img {
  display: block;
  width: 10.5rem;
  height: 10.5rem;
}
.rs-tel-popup__hint {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--rs-text-muted);
}
.rs-modal__form { display: flex; flex-direction: column; gap: 1rem; text-align: left; }

.rs-modal__panel > .rs-alert {
  margin-bottom: 1rem;
  text-align: left;
}

.rs-modal__action {
  margin-top: 1.25rem;
}

/* Family member edit + confirm — mobile */
@media (max-width: 639px) {
  .rs-modal[data-rs-family-modal],
  .rs-modal[data-rs-family-confirm],
  .rs-modal[data-rs-phone-modal],
  .rs-modal[data-rs-mybook-cancel-confirm],
  .rs-modal[data-rs-premium-quota-nudge] {
    padding:
      max(0.75rem, env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px));
    align-items: center;
    justify-content: center;
  }

  .rs-modal[data-rs-family-modal] .rs-modal__panel,
  .rs-modal[data-rs-family-confirm] .rs-modal__panel,
  .rs-modal[data-rs-phone-modal] .rs-modal__panel,
  .rs-modal[data-rs-mybook-cancel-confirm] .rs-modal__panel,
  .rs-modal[data-rs-premium-quota-nudge] .rs-modal__panel {
    width: 100%;
    max-width: none;
    max-height: min(90dvh, 100%);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--rs-radius-lg);
    padding:
      1.25rem 1rem
      calc(1.25rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  }

  .rs-modal[data-rs-family-modal] .rs-modal__title,
  .rs-modal[data-rs-family-confirm] .rs-modal__title,
  .rs-modal[data-rs-phone-modal] .rs-modal__title,
  .rs-modal[data-rs-mybook-cancel-confirm] .rs-modal__title {
    font-size: 1.05rem;
    line-height: 1.35;
    padding-right: 2rem;
    margin-bottom: 0.85rem;
  }

  .rs-modal[data-rs-family-modal] .rs-modal__close,
  .rs-modal[data-rs-family-confirm] .rs-modal__close,
  .rs-modal[data-rs-phone-modal] .rs-modal__close,
  .rs-modal[data-rs-mybook-cancel-confirm] .rs-modal__close {
    top: 0.65rem;
    right: 0.65rem;
  }

  .rs-modal[data-rs-family-modal] .rs-q-input,
  .rs-modal[data-rs-phone-modal] .rs-q-input {
    font-size: 1rem;
    min-height: 2.75rem;
  }

  .rs-modal[data-rs-family-modal] .rs-btn--primary[data-rs-family-submit],
  .rs-modal[data-rs-phone-modal] .rs-btn--primary[data-rs-phone-submit] {
    width: 100%;
    min-height: 2.75rem;
  }

  .rs-modal[data-rs-family-confirm] .rs-modal__panel--confirm .rs-modal__warn,
  .rs-modal[data-rs-mybook-cancel-confirm] .rs-modal__panel--confirm .rs-modal__warn {
    width: 3.25rem;
    height: 3.25rem;
    margin-top: 0.15rem;
    margin-bottom: 0.65rem;
    font-size: 1.5rem;
  }

  .rs-family-confirm__note {
    font-size: 0.875rem;
    text-align: left;
  }

  .rs-family-confirm__review {
    padding: 0.75rem 0.85rem;
  }

  .rs-family-confirm__row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding: 0.5rem 0;
  }

  .rs-family-confirm__row dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .rs-family-confirm__row dd {
    font-size: 1rem;
  }

  .rs-modal__actions {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .rs-modal__actions .rs-btn {
    flex: 1 1 auto;
    width: 100%;
    min-height: 2.75rem;
  }
}

body.rs-family-modal-open {
  overflow: hidden;
}

.rs-modal__panel--wide {
  width: min(520px, 100%);
  text-align: left;
}
.rs-modal__panel--legal {
  width: min(42rem, 100%);
  height: auto;
  max-height: min(85dvh, 100%);
  padding: 2.75rem 0 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rs-modal[data-rs-legal-modal],
.rs-modal[data-rs-refs-modal] {
  z-index: 100;
}
.rs-modal[data-rs-legal-modal] .rs-modal__close,
.rs-modal[data-rs-refs-modal] .rs-modal__close {
  z-index: 2;
}
body.rs-legal-modal-open,
body.rs-refs-modal-open {
  overflow: hidden;
}
.rs-legal-modal__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 1.5rem 1.5rem;
  text-align: left;
}
.rs-legal-modal__scroll .rs-modal__title {
  margin: 0 0 1rem;
  padding-right: 2rem;
  font-size: 1.15rem;
  line-height: 1.35;
}
.rs-legal-modal__scroll .rs-legal-doc[hidden] {
  display: none !important;
}
@media (max-width: 768px) {
  .rs-modal[data-rs-legal-modal],
  .rs-modal[data-rs-refs-modal] {
    padding:
      max(0.75rem, env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px));
    align-items: center;
    justify-content: center;
  }
  .rs-modal[data-rs-legal-modal] .rs-modal__panel--legal,
  .rs-modal[data-rs-refs-modal] .rs-modal__panel--legal {
    width: 100%;
    height: auto;
    max-height: min(85dvh, 100%);
    border-radius: var(--rs-radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    padding-top: 2.75rem;
  }
  .rs-modal[data-rs-legal-modal] .rs-modal__close,
  .rs-modal[data-rs-refs-modal] .rs-modal__close {
    top: 0.65rem;
    right: 0.65rem;
  }
  .rs-legal-modal__scroll {
    padding: 0 1rem 1.25rem;
  }
  .rs-legal-modal__scroll .rs-modal__title {
    font-size: 1.05rem;
    margin-bottom: 0.85rem;
  }
  .rs-legal-modal__scroll .rs-legal-doc__section h2,
  .rs-legal-modal__scroll .rs-legal-doc__section h3 {
    font-size: 1rem;
  }
  .rs-legal-modal__scroll .rs-legal-doc__body {
    font-size: 0.9rem;
    line-height: 1.55;
  }
}
.rs-modal__panel--video {
  width: min(52rem, 100%);
  padding: 0;
  overflow: hidden;
  background: #000;
}
.rs-modal__panel--video .rs-modal__close {
  z-index: 2;
  top: 0.5rem;
  right: 0.5rem;
  background: #fff;
  color: #2e2e2e;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 4px 14px rgba(0, 0, 0, 0.28);
}
.rs-modal__panel--video .rs-seminar-player {
  margin: 0;
  border-radius: 0;
}
.rs-modal__body {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--rs-text-muted);
}

/* ---------- Settings (Figma 06.1_edit) ---------- */
.rs-settings {
  width: 100%;
}

.rs-settings__title {
  margin: 0 0 0.65rem;
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--rs-text);
}

@media (max-width: 767px) {
  .rs-settings__title {
    font-size: 1.25rem;
    line-height: 1.35;
  }
}

.rs-settings__identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1.35rem;
}

.rs-settings__name {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--rs-text);
}

.rs-settings__section {
  margin-bottom: 1.35rem;
}

.rs-settings__h {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 700;
  color: var(--rs-text);
}

.rs-settings__h--lg {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.rs-settings__hint {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  line-height: 1.55;
  font-weight: 500;
  color: var(--rs-text-muted);
}

.rs-settings__warn {
  color: var(--rs-danger);
  font-size: 0.75rem;
  font-weight: 500;
}

.rs-settings__rule {
  border: 0;
  border-top: 1px solid var(--rs-border);
  margin: 0.25rem 0 1.5rem;
}

/* Quota table — Figma 147:1206 (shared Part 2 pool) */
.rs-quota-table {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  background: #fff;
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-input);
  overflow: hidden;
}

.rs-quota-table__remaining {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.15rem 1rem 0.85rem;
  text-align: center;
  border-bottom: 1px solid var(--rs-border);
}

.rs-quota-table__shared {
  margin: 0;
  max-width: 22rem;
  font-size: 0.75rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--rs-text-muted);
}

@media (min-width: 640px) {
  .rs-quota-table {
    grid-template-columns: 1fr 1fr;
  }

  .rs-quota-table--cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .rs-quota-table__remaining {
    grid-column: 1 / -1;
  }

  .rs-quota-table__cell + .rs-quota-table__cell {
    border-left: 1px solid var(--rs-border);
  }
}

.rs-quota-table__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem;
  text-align: center;
}

@media (max-width: 639px) {
  .rs-quota-table__cell + .rs-quota-table__cell {
    border-top: 1px solid var(--rs-border);
  }
}

.rs-quota-table__n {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--rs-text);
  white-space: nowrap;
}

.rs-quota-table__label {
  max-width: 12rem;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--rs-text);
  white-space: pre-line;
}

/* Collapsible AIA entitlement guide under settings quota */
.rs-quota-guide {
  margin-top: 0.85rem;
}

.rs-quota-guide__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--rs-secondary);
  user-select: none;
}

.rs-quota-guide__summary::-webkit-details-marker {
  display: none;
}

.rs-quota-guide__summary::after {
  content: '';
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.rs-quota-guide[open] > .rs-quota-guide__summary::after {
  transform: rotate(-135deg);
  margin-top: 0.25rem;
}

.rs-quota-guide__summary:focus-visible {
  outline: 2px solid var(--rs-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.rs-quota-guide__scroll {
  margin-top: 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rs-quota-guide__table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  border: 1px solid #1a1a1a;
  background: #fff;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #1a1a1a;
}

.rs-quota-guide__table th,
.rs-quota-guide__table td {
  border: 1px solid #1a1a1a;
  padding: 0.55rem 0.65rem;
  vertical-align: top;
  text-align: left;
}

.rs-quota-guide__table thead th {
  background: color-mix(in srgb, var(--rs-primary) 22%, #fff);
  font-weight: 700;
}

.rs-quota-guide__table th:last-child,
.rs-quota-guide__table td:last-child {
  width: 38%;
}

.rs-quota-guide__part td {
  background: color-mix(in srgb, var(--rs-primary) 22%, #fff);
  font-weight: 700;
}

.rs-quota-guide__table td.rs-quota-guide__limit {
  white-space: pre-line;
  vertical-align: middle;
}

.rs-quota-guide__block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rs-quota-guide__item-title,
.rs-quota-guide__choose,
.rs-quota-guide__exclusive {
  margin: 0;
}

.rs-quota-guide__choose {
  font-size: 0.92em;
  color: color-mix(in srgb, var(--rs-text) 72%, transparent);
}

.rs-quota-guide__exclusive {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.rs-quota-guide__list {
  margin: 0.15rem 0 0.35rem;
  padding: 0;
  list-style: none;
}

.rs-quota-guide__list li {
  position: relative;
  padding-left: 1.1rem;
}

.rs-quota-guide__list--diamond li::before {
  content: '❖';
  position: absolute;
  left: 0;
  top: 0;
}

.rs-quota-guide__list--dash li::before {
  content: '–';
  position: absolute;
  left: 0.15rem;
  top: 0;
}

@media (max-width: 639px) {
  .rs-quota-guide__scroll {
    margin-top: 0.5rem;
  }

  .rs-quota-guide__table {
    min-width: 0;
    font-size: 0.6875rem;
    line-height: 1.35;
  }

  .rs-quota-guide__table th,
  .rs-quota-guide__table td {
    padding: 0.35rem 0.4rem;
  }

  .rs-quota-guide__block {
    gap: 0.1rem;
  }

  .rs-quota-guide__exclusive {
    margin-bottom: 0.15rem;
  }

  .rs-quota-guide__list {
    margin: 0.05rem 0 0.1rem;
  }

  .rs-quota-guide__list li {
    padding-left: 0.9rem;
  }
}

.rs-settings__field-form,
.rs-settings__pwd {
  width: 100%;
}

.rs-settings__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rs-settings__label {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--rs-text);
}

.rs-settings__control {
  position: relative;
  display: block;
}

.rs-settings__input {
  width: 100%;
  min-height: 3rem;
  box-sizing: border-box;
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-input);
  background: var(--rs-bg-input);
  padding: 0 3rem 0 1rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--rs-text);
  outline: none;
  appearance: none;
}

.rs-settings__input::placeholder {
  color: var(--rs-text-placeholder);
}

.rs-settings__input:focus {
  border-color: var(--rs-primary);
  background: #fff;
}

.rs-settings__input--readonly {
  padding-right: 1rem;
  color: var(--rs-text-muted);
  cursor: default;
  pointer-events: none;
}

.rs-settings__icon-btn {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--rs-radius-pill);
}

.rs-settings__icon-btn:focus-visible {
  outline: 2px solid var(--rs-primary);
  outline-offset: 2px;
}

.rs-settings__icon {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.rs-family-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
}

.rs-family-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: max-content;
  min-width: 5.5rem;
  max-width: 9rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

button.rs-family-item {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.rs-family-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--rs-border);
  box-sizing: border-box;
  overflow: hidden;
}

.rs-family-avatar__name {
  display: block;
  max-width: 4.5rem;
  padding: 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--rs-text);
  word-break: break-word;
}

.rs-family-avatar--add {
  border: 0;
  background: transparent;
  overflow: visible;
}

.rs-family-avatar__add-icon {
  display: block;
  width: 5.5rem;
  height: 5.5rem;
  object-fit: contain;
}

.rs-family-item__role {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--rs-text);
}

.rs-family-item__change {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--rs-primary);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.rs-family-edits {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.7;
  color: #fe5d5c;
  text-align: left;
}

.rs-settings__pwd {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rs-app .rs-settings__pwd-submit {
  align-self: flex-start;
  width: auto;
  min-width: 10rem;
  margin-top: 0.25rem;
}

/* ---------- Articles / premium ---------- */
.rs-article-card, .rs-premium-card {
  background: #fff; border-radius: var(--rs-radius-lg); overflow: hidden;
  box-shadow: var(--rs-shadow-card); text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: box-shadow 0.25s ease;
}
.rs-article-card__media, .rs-premium-card__media {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: #e8e2d8;
  isolation: isolate;
}
.rs-article-card__body, .rs-premium-card__body {
  padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1;
  padding-top: 0;
}
.rs-article-card__title, .rs-premium-card__title { margin: 0; font-size: 1.05rem; font-weight: 700; }
.rs-article-card__summary, .rs-premium-card__text {
  margin: 0; flex: 1; font-size: 0.85rem; color: var(--rs-text-muted); line-height: 1.5;
}
.rs-article-card__meta { font-size: 0.75rem; color: var(--rs-text-placeholder); }
.rs-premium__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.rs-premium-card__pro {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rs-text);
}
.rs-premium-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.35rem;
  align-items: stretch;
}
[data-rs-premium-detail-body] {
  white-space: pre-line;
}

.rs-premium-detail__panel {
  max-height: min(85dvh, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 1.25rem;
}
.rs-premium-detail__scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  text-align: left;
}
.rs-premium-detail__scroll .rs-modal__title {
  padding-right: 2rem;
}
.rs-premium-detail__scroll .rs-modal__body {
  margin-bottom: 0;
}
.rs-premium-detail__pro {
  margin: -0.5rem 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rs-text);
}
.rs-premium-detail__wa {
  width: 100%;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .rs-modal[data-rs-premium-detail-modal] {
    padding:
      max(0.75rem, env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px));
  }
  .rs-premium-detail__panel {
    width: 100%;
    max-width: none;
    max-height: min(90dvh, 100%);
    padding:
      1.25rem 1rem
      calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }
  .rs-premium-detail__scroll .rs-modal__title {
    font-size: 1.05rem;
    line-height: 1.35;
    margin-bottom: 0.85rem;
  }
}

/* Premium professionals carousel — Figma Frame 15 (node 146:1444) */
.rs-premium-pros {
  margin-top: 2.5rem;
  margin-bottom: 0;
  scroll-margin-bottom: calc(8rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .rs-premium-pros {
    scroll-margin-bottom: calc(12rem + env(safe-area-inset-bottom, 0px));
  }
}

.rs-premium-pros__title {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--rs-green, #485b56);
  text-align: left;
}

.rs-premium-pros__carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.35rem;
}

.rs-premium-pros__track-wrap {
  overflow: hidden;
  min-width: 0;
}

.rs-premium-pros__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0.15rem 0.75rem;
  scrollbar-width: none;
}

.rs-premium-pros__track::-webkit-scrollbar {
  display: none;
}

.rs-premium-pros__card {
  /* Mobile: show ~2.5 cards in the visible track (peek invites scroll) */
  flex: 0 0 calc((100% - 1.5rem) / 2.5);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.35rem 0.25rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  border-radius: var(--rs-radius-md);
  transition: background 0.15s ease;
}

@media (min-width: 640px) {
  .rs-premium-pros__card {
    flex: 0 0 14.5rem;
    gap: 1rem;
    padding: 0.5rem 0.75rem 0.25rem;
  }
}

@media (hover: hover) {
  .rs-premium-pros__card:hover {
    background: rgba(255, 255, 255, 0.55);
  }
}

.rs-premium-pros__avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: color-mix(in srgb, var(--rs-green, #485b56) 14%, white);
  border: 1px solid color-mix(in srgb, var(--rs-green, #485b56) 18%, transparent);
}

.rs-premium-pros__avatar--empty {
  background: color-mix(in srgb, var(--rs-green, #485b56) 14%, white);
  border: 1px solid color-mix(in srgb, var(--rs-green, #485b56) 18%, transparent);
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .rs-premium-pros__avatar {
    width: 5.5rem;
    height: 5.5rem;
  }
}

@media (min-width: 768px) {
  .rs-premium-pros__avatar {
    width: 7.4375rem;
    height: 7.4375rem;
  }
}

.rs-premium-pros__name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--rs-green, #485b56);
}

@media (min-width: 640px) {
  .rs-premium-pros__name {
    font-size: 1.05rem;
  }
}

@media (min-width: 768px) {
  .rs-premium-pros__name {
    font-size: 1.15rem;
  }
}

.rs-premium-pros__role {
  margin: -0.2rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  color: #3e311f;
}

@media (min-width: 640px) {
  .rs-premium-pros__role {
    margin-top: -0.35rem;
    font-size: 0.875rem;
    line-height: 1.45;
  }
}

@media (min-width: 768px) {
  .rs-premium-pros__role {
    font-size: 0.95rem;
  }
}

.rs-premium-pros__nav {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--rs-border-soft);
  border-radius: 50%;
  background: #fff;
  color: var(--rs-green, #485b56);
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--rs-shadow-card);
  flex-shrink: 0;
}

.rs-premium-pros__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.rs-premium-pros__modal {
  text-align: center;
}

.rs-premium-pros__modal-avatar {
  width: 7.4375rem;
  height: 7.4375rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 1rem;
  background: color-mix(in srgb, var(--rs-green, #485b56) 14%, white);
  border: 1px solid color-mix(in srgb, var(--rs-green, #485b56) 18%, transparent);
}

.rs-premium-pros__modal-avatar[hidden],
.rs-premium-pros__modal-avatar.rs-premium-pros__avatar--empty[hidden] {
  display: none;
}

.rs-premium-pros__modal-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--rs-green, #485b56);
}

.rs-premium-pros__modal-role {
  margin: 0.35rem 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #3e311f;
}

.rs-premium-pros__modal-bio {
  text-align: center;
  color: #3e311f;
  margin-bottom: 0;
  white-space: pre-line;
}

@media (hover: hover) {
  .rs-book-card:hover,
  .rs-article-card:hover,
  .rs-premium-card:hover {
    box-shadow: 0 12px 32px rgba(46, 46, 46, 0.1);
  }

  .rs-book-card:hover .rs-card-hero-bg__img,
  .rs-article-card:hover .rs-card-hero-bg__img,
  .rs-premium-card:hover .rs-card-hero-bg__img {
    transform: scale(1.06);
  }
}

.rs-book-card:active,
.rs-article-card:active,
.rs-premium-card:active {
  transition-duration: 0.1s;
}

.rs-article-detail {
  max-width: 1200px;
  margin: 0 auto;
}

.rs-article-detail__panel {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--rs-shadow-card);
  overflow: hidden;
}

.rs-article-detail__hero {
  position: relative;
  height: clamp(11rem, 24vw, 20.375rem);
  background: #e8e2d8;
  overflow: hidden;
  margin: 0;
}

.rs-article-detail__content {
  position: relative;
  z-index: 1;
  padding: 1.25rem 2.125rem 2.5rem;
}

.rs-article-detail__title {
  margin: 0rem auto 1.5rem;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.125;
  color: var(--rs-text);
  max-width: 38.125rem;
}

.rs-article-detail__body {
  /* font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.444; */
  color: var(--rs-text);
  max-width: 38.125rem;
  margin: 0 auto;
}

.rs-article-detail__body p,
.rs-article-detail__body ul,
.rs-article-detail__body ol,
.rs-article-detail__body blockquote {
  margin: 0 0 1rem;
}

.rs-article-detail__body ul,
.rs-article-detail__body ol {
  padding-left: 1.25rem;
}

.rs-article-detail__body li {
  margin: 0 0 0.35rem;
}

.rs-article-detail__body a {
  color: inherit;
  text-decoration: underline;
}

.rs-article-detail__body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.rs-article-detail__body h2,
.rs-article-detail__body h3,
.rs-article-detail__body h4 {
  margin: 1.25rem 0 0.75rem;
  font-weight: 600;
}

.rs-article-detail__body h2 { 
  font-size: 1.2rem;
}

.rs-article-booking-cta {
  max-width: 38.125rem;
  margin: 2rem auto 0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--rs-radius-md);
  background: var(--rs-bg);
  border: 1px solid var(--rs-border, #e8e2d8);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rs-article-booking-cta__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--rs-text);
}

.rs-article-booking-cta__body {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--rs-text-muted);
}

.rs-article-booking-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.rs-article-booking-cta__actions .rs-btn {
  flex: 1 1 10rem;
  min-width: 0;
  width: auto;
  padding-left: 1.35rem;
  padding-right: 1.35rem;
  text-align: center;
}

@media (max-width: 767px) {
  .rs-article-detail__panel {
    border-radius: 16px;
  }

  .rs-article-detail__content {
    padding: 1rem 1.25rem 2rem;
  }

  .rs-article-detail__content .rs-back-link {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
  }

  .rs-article-detail__title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 1rem;
  }
  .rs-article-detail__body h2 {
    font-size: 1rem;
  }

  .rs-article-detail__body {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.55;
  }

  .rs-article-booking-cta {
    margin-top: 1.5rem;
    padding: 1rem 1.125rem;
  }

  .rs-article-booking-cta__title {
    font-size: 1rem;
  }

  .rs-article-booking-cta__body {
    font-size: 0.8125rem;
  }
}

/* Figma Group 105 — card hero bottom wave */
.rs-hero-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  z-index: 2;
}

/* ---------- Health report ---------- */
.rs-health-empty {
  max-width: 36rem;
  padding: 0;
}

.rs-health-empty__title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.rs-health-empty__desc {
  margin: 0 0 1.25rem;
  color: var(--rs-text);
  font-size: 1rem;
  line-height: 1.5;
}

.rs-health-empty__cta {
  display: inline-flex;
  width: auto;
  min-width: 10rem;
  padding-inline: 2rem;
}

.rs-report__toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.rs-report__toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.rs-report__toolbar-actions .rs-btn {
  width: auto;
  padding-inline: 1.25rem;
}

.rs-report-cover {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin: 0 0 1.15rem;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
}

.rs-report__title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
}

.rs-report__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--rs-text-muted);
  white-space: nowrap;
}

.rs-report-card {
  background: #fff;
  border-radius: var(--rs-radius-lg);
  padding: 1.25rem;
  box-shadow: var(--rs-shadow-card);
  margin-bottom: 1rem;
}

.rs-report-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.rs-report-card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.rs-report__basics {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.rs-report__overall-lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

.rs-report__note {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--rs-text-muted);
  line-height: 1.55;
}

.rs-report-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.rs-report-list--pills {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rs-report-list--pills li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #eef7f3;
  color: #1f5c4f;
  font-size: 0.85rem;
  font-weight: 600;
}

.rs-report-check {
  flex-shrink: 0;
  color: #2a7a6a;
}

.rs-report-list--improve li strong {
  color: var(--rs-text);
}

.rs-report-domains {
  display: grid;
  gap: 0.75rem;
}

.rs-report-domain {
  padding: 0.9rem 1rem;
  border-radius: var(--rs-radius-md);
  background: var(--rs-bg);
  border-left: 4px solid #58b39e;
}

.rs-report-domain.is-mid {
  border-left-color: #e8c547;
}

.rs-report-domain.is-warn {
  border-left-color: #e0a04a;
}

.rs-report-domain.is-high {
  border-left-color: #e06060;
}

.rs-report-domain__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
}

.rs-domain-scale {
  margin: 0.45rem 0 0.6rem;
}

.rs-domain-scale--legend {
  margin: 1.25rem auto 0rem;
  max-width: 800px;
}

.rs-domain-scale__track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.rs-domain-scale__seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.rs-domain-scale__seg--1 {
  background: #58b39e;
}

.rs-domain-scale__seg--2 {
  background: #d4b02e;
}

.rs-domain-scale__seg--3 {
  background: #e0a04a;
}

.rs-domain-scale__seg--4 {
  background: #e06060;
}

.rs-domain-scale__legend {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  color: var(--rs-text-muted);
  line-height: 1.3;
}

.rs-domain-scale__legend-end {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.rs-domain-scale__legend-arrow {
  flex-shrink: 0;
  width: 0.65rem;
  height: 0.65rem;
  color: inherit;
  opacity: 0.85;
}

.rs-domain-scale__legend-arrow--left {
  transform: scaleX(-1);
}

.rs-report-domain__body {
  margin: 0;
  font-size: 0.85rem;
  color: var(--rs-text-muted);
  line-height: 1.55;
}

.rs-report-card--attention {
  background: #fffaf5;
  border: 1px solid #f0e0d0;
}

.rs-report__attention-intro {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.rs-report__tip {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  color: var(--rs-text-muted);
  line-height: 1.5;
}

.rs-report-support {
  margin: 0 0 1.25rem;
}

.rs-report-support > h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.rs-report-support__intro {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--rs-text-muted);
  line-height: 1.55;
}

.rs-report-support__quota {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #8b3a4a;
}

.rs-report-support__quota strong {
  margin-left: 0.15rem;
}

.rs-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.rs-support-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--rs-bg-card);
  box-shadow: var(--rs-shadow-card);
  border: 1px solid var(--rs-border-soft);
}

.rs-support-card__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  background: color-mix(in srgb, var(--rs-primary) 12%, #fff);
  border-top: 3px solid var(--rs-primary);
}

.rs-support-card__head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rs-secondary);
}

.rs-support-card__icon {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--rs-primary) 22%, #fff);
  color: var(--rs-secondary);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.rs-support-card__badge {
  margin-left: auto;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rs-success) 18%, #fff);
  color: var(--rs-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.rs-support-card__body {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem 1rem 1rem;
}

.rs-support-card--has-recommended {
  border-color: color-mix(in srgb, var(--rs-primary) 35%, var(--rs-divider));
}

.rs-support-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.6rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--rs-divider);
  background: #fff;
  color: var(--rs-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.rs-support-link:hover {
  border-color: var(--rs-primary);
  background: color-mix(in srgb, var(--rs-primary) 10%, #fff);
}

.rs-support-link--recommended {
  border-color: color-mix(in srgb, var(--rs-primary) 55%, var(--rs-divider));
  /* background: color-mix(in srgb, var(--rs-primary) 10%, #fff); */
  background: #fffaf5;
}

.rs-support-link__label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.rs-support-link__badge {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--rs-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.rs-support-link--disabled {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
  border-color: var(--rs-divider);
  background: var(--rs-bg-input-alt);
  color: var(--rs-text-muted);
}

.rs-support-link--disabled .rs-support-link__arrow {
  color: var(--rs-text-muted);
}

.rs-support-link__arrow {
  flex-shrink: 0;
  color: var(--rs-primary-hover);
}

.rs-support-card--home-assessment .rs-support-card__head,
.rs-support-card--home .rs-support-card__head,
.rs-support-card--online .rs-support-card__head,
.rs-support-card--daily .rs-support-card__head {
  background: color-mix(in srgb, var(--rs-primary) 12%, #fff);
  border-top-color: var(--rs-primary);
}

.rs-support-card--home-assessment .rs-support-card__icon,
.rs-support-card--home .rs-support-card__icon,
.rs-support-card--online .rs-support-card__icon,
.rs-support-card--daily .rs-support-card__icon {
  background: color-mix(in srgb, var(--rs-primary) 22%, #fff);
  color: var(--rs-secondary);
}

.rs-support-card--daily .rs-support-card__badge {
  /* background: color-mix(in srgb, var(--rs-primary) 18%, #fff); */
  color: var(--rs-secondary);
}

.rs-report-disclaimer {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid #e6ddd0;
  background: #fffaf5;
}

.rs-report-disclaimer h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #5c4e42;
}

.rs-report-disclaimer__icon {
  color: #8a6a4a;
  flex-shrink: 0;
}

.rs-report-disclaimer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--rs-text-muted);
  line-height: 1.6;
}

.rs-report-refs {
  margin: 0 0 1.25rem;
  text-align: center;
}

.rs-report-refs .rs-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.rs-refs-list {
  margin: 0;
  padding: 0 0 0 1.2rem;
  display: grid;
  gap: 0.85rem;
}

.rs-refs-list li {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--rs-text);
}

.rs-refs-list a.rs-link {
  display: inline;
  font-size: inherit;
  font-weight: 500;
  word-break: break-all;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

@media (max-width: 767px) {
  .rs-health-empty {
    padding: 0;
  }

  .rs-report__toolbar {
    margin-bottom: 1rem;
  }

  .rs-health-empty__title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.35rem;
  }

  .rs-health-empty__desc {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }

  .rs-report-cover {
    flex-direction: column;
    align-items: flex-start;
  }

  .rs-report__title {
    font-size: 1.2rem;
    line-height: 1.3;
  }

  .rs-report-card {
    padding: 1rem;
  }

  .rs-report-card h2 {
    font-size: 0.9375rem;
    margin-bottom: 0.6rem;
  }

  .rs-report__note,
  .rs-report-domain__body,
  .rs-report-disclaimer p {
    font-size: 0.75rem;
  }

  .rs-report-list,
  .rs-report__basics,
  .rs-report__overall-lead {
    font-size: 0.85rem;
  }

  .rs-support-grid {
    grid-template-columns: 1fr;
  }

  .rs-report-support > h2 {
    font-size: 1.05rem;
  }
}

@media print {
  @page {
    margin: 12mm;
  }

  html,
  body,
  body.rs-app {
    background: #fff !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  /* Hide app chrome (match real class names) */
  .no-print,
  .rs-sidebar,
  .rs-mobile-chrome,
  .rs-drawer,
  .rs-topbar,
  .rs-page-banner,
  .rs-bottom-promo,
  .rs-contact-fab,
  .rs-contact-chip,
  header,
  nav,
  footer,
  aside {
    display: none !important;
  }

  .rs-app__shell,
  .rs-app__main,
  .rs-app__content {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    gap: 0 !important;
    overflow: visible !important;
  }

  body:has(#rs-health-report) .rs-app__content > :not(#rs-health-report),
  body:has(#rs-health-report) .rs-app__shell > :not(.rs-app__main),
  body:has(#rs-health-report) .rs-app__main > :not(.rs-app__content) {
    display: none !important;
  }

  #rs-health-report {
    display: block !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* Do NOT avoid breaks on the whole report — that creates a blank first page */
  .rs-report-card,
  .rs-support-card,
  .rs-report-disclaimer,
  .rs-report-domain {
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .rs-report-card,
  .rs-support-card,
  .rs-report-disclaimer {
    border: 1px solid #ddd;
  }

  .rs-support-grid {
    break-inside: auto;
  }

  /* Browsers omit backgrounds by default; preserve report scale + accent colors. */
  #rs-health-report,
  #rs-health-report * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* Guest legal / registration consent documents — content only (no auth hero) */
.rs-legal-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.rs-legal-page__header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: max(0.45rem, env(safe-area-inset-top, 0px)) max(0.875rem, env(safe-area-inset-right, 0px))
    0.25rem max(0.875rem, env(safe-area-inset-left, 0px));
}

.rs-legal-page__main {
  flex: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.5rem 0 2rem;
}

.rs-legal-page .rs-legal-doc.rs-card {
  width: 100%;
  max-width: 100%;
  min-height: 0;
}

@media (min-width: 769px) {
  .rs-legal-page__header {
    padding: 1.25rem 2.5rem 0;
  }

  .rs-legal-page__main {
    padding: 1rem 2.5rem 3rem;
  }

  .rs-legal-page .rs-legal-doc.rs-card {
    max-width: 100%;
    border-radius: var(--rs-radius-xl);
    box-shadow: var(--rs-shadow-card);
    padding: var(--rs-auth-pad) clamp(1.25rem, 4vw, 2rem);
  }
}

.rs-legal-doc .rs-back-link {
  margin-bottom: 1rem;
}

.rs-legal-doc .rs-card__title {
  margin-top: 0.25rem;
  font-size: 1.35rem;
  line-height: 1.35;
}

.rs-legal-doc__body {
  margin-top: 1rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--rs-text);
}

.rs-legal-doc__body p {
  margin: 0 0 0.9rem;
}

.rs-legal-doc__body a.rs-link {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  color: var(--rs-secondary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.rs-legal-doc__body a.rs-link:hover {
  color: var(--rs-secondary-soft);
}

.rs-legal-doc__section {
  margin-top: 1.25rem;
}

.rs-legal-doc__section--sub {
  padding-left: 1.5rem;
}

.rs-legal-doc__section h2,
.rs-legal-doc__section h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--rs-text);
}

.rs-legal-doc__section h3 {
  font-size: 1rem;
}

.rs-legal-doc__section ol {
  margin: 0 0 0.9rem;
  padding-left: 1.25rem;
}

/* Number sits in its own column; body text is not glued to "1.2". */
.rs-legal-doc__section ol.rs-legal-doc__items--prefixed {
  list-style: none;
  /* padding-left: 0; */
}

.rs-legal-doc__section ol.rs-legal-doc__items--prefixed > li {
  position: relative;
  padding-left: 2.75rem;
}

.rs-legal-doc__section ol.rs-legal-doc__items--prefixed > li::before {
  content: attr(data-legal-num);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.4rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.rs-legal-doc__section--sub ol.rs-legal-doc__items--prefixed > li {
  padding-left: 3.6rem;
}

.rs-legal-doc__section--sub ol.rs-legal-doc__items--prefixed > li::before {
  width: 3.35rem;
}

.rs-legal-doc__section ol ol.rs-legal-doc__items--prefixed {
  margin: 0.4rem 0 0.25rem;
  padding-left: 0;
}

.rs-legal-doc__section ol ol.rs-legal-doc__items--prefixed > li {
  padding-left: 3.1rem;
}

.rs-legal-doc__section ol ol.rs-legal-doc__items--prefixed > li::before {
  width: 2.85rem;
}

.rs-legal-doc__section li {
  margin-bottom: 0.55rem;
}

.rs-legal-doc__section ol ol li {
  margin-bottom: 0.35rem;
}

@media (min-width: 769px) {
  .rs-legal-doc .rs-card__title {
    font-size: 1.5rem;
    line-height: 1.35;
  }

  .rs-legal-doc__section h2 {
    font-size: 1.125rem;
  }

  .rs-legal-doc__section h3 {
    font-size: 1.05rem;
  }
}

/* —— MemTrax in-app iframe shell —— */
body.rs-app--memtrax .rs-app__content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: var(--rs-app-pad-bottom);
}

body.rs-app--memtrax .rs-topbar {
  display: none;
}

.rs-memtrax-frame {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: min(70dvh, 40rem);
  background: #fff;
}

.rs-memtrax-frame__iframe {
  flex: 1;
  width: 100%;
  min-height: min(65dvh, 36rem);
  border: 0;
  background: #f7f7f5;
}

.rs-memtrax-frame__fallback {
  margin: 0;
  padding: 0.55rem 0 0.75rem;
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--rs-ink, #1a1a1a) 65%, transparent);
}

@media (min-width: 768px) {
  .rs-memtrax-frame__fallback {
    padding-left: var(--rs-app-pad-inline);
  }
}

.rs-memtrax-frame__fallback-link {
  color: var(--rs-primary);
  font-weight: 600;
}

.rs-memtrax-frame--error {
  padding: 0 0 1.25rem;
}

.rs-memtrax-frame--error .rs-alert {
  margin: 1rem 0 0;
}

.rs-memtrax-frame__error-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

@media (max-width: 767px) {
  body.rs-app--memtrax {
    overflow: hidden;
  }

  body.rs-app--memtrax .rs-app__shell,
  body.rs-app--memtrax .rs-app__main {
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
  }

  body.rs-app--memtrax .rs-app__main {
    min-height: 0;
  }

  body.rs-app--memtrax .rs-app__content {
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  body.rs-app--memtrax .rs-memtrax-frame {
    margin: 0;
    min-height: 0;
    height: 100%;
  }

  body.rs-app--memtrax .rs-memtrax-frame__iframe {
    min-height: 0;
  }

  body.rs-app--memtrax .rs-memtrax-frame__fallback {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
  }

  body.rs-app--memtrax .rs-memtrax-frame--error {
    padding: 1rem;
    overflow: auto;
  }
}
