/* QuickStand – Plan / MyPlan styles (stand-plan.css)
   Scope: only used on /plan and /myplan
*/

/* ------------------------------------------------------------------------- */
/* /plan + /myplan shared page tokens (scoped)                                */
/* ------------------------------------------------------------------------- */
body.qs-plan-page{
  --qs-bg: #f4f9ff;
  --qs-card: #ffffff;
  --qs-text: #05335a;
  --qs-muted: #5f748a;
  --qs-border: rgba(5, 51, 90, 0.14);

  --qs-primary: #0b4b7c;
  --qs-primary-2: #0b6bcb;

  --qs-shadow: 0 14px 50px rgba(5, 51, 90, 0.10);
  --qs-shadow-soft: 0 10px 26px rgba(5, 51, 90, 0.09);
  --qs-radius: 18px;

  --qs-container: 1180px;
  --qs-page-pad: clamp(14px, 3.1vw, 40px);
  --qs-gap: clamp(12px, 2.2vw, 18px);

  --qs-focus: rgba(11,107,203,0.35);

  margin: 0;
  /* keep the global fixed-header offset from header.css intact on /plan + /my-plan */
  padding: calc(var(--qs-header-h, 78px) + var(--qs-safe-top, 0px)) 0 0;
  min-height: 100vh;
  color: var(--qs-text);
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(11,107,203,.22), rgba(11,107,203,0) 60%),
    radial-gradient(1000px 600px at 20% -250px, rgba(11,75,124,.20), rgba(11,75,124,0) 55%),
    var(--qs-bg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  scroll-padding-top: calc(var(--qs-header-h, 78px) + var(--qs-safe-top, 0px) + 12px);
}

body.qs-plan-page > .qs-plan-page{
  padding: 0 0 calc(var(--qs-page-pad) + 22px);
  min-height: calc(100vh - (var(--qs-header-h, 78px) + var(--qs-safe-top, 0px)));
}

/* Local reset */
body.qs-plan-page .qs-plan-page *,
body.qs-plan-page .qs-plan-page *::before,
body.qs-plan-page .qs-plan-page *::after{
  box-sizing: border-box;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  body.qs-plan-page .qs-plan-page *,
  body.qs-plan-page .qs-plan-page *::before,
  body.qs-plan-page .qs-plan-page *::after{
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ------------------------------------------------------------------------- */
/* Container                                                                  */
/* ------------------------------------------------------------------------- */
.qs-plan-container{
  width: min(var(--qs-container), 100%);
  margin: 0 auto;
  padding: 0 var(--qs-page-pad);
}

/* ------------------------------------------------------------------------- */
/* Hero                                                                       */
/* ------------------------------------------------------------------------- */
.qs-plan-hero{
  padding: clamp(22px, 4.2vw, 44px) 0 0;
}

/* ✅ FIX: true centered title even with right action button */
.qs-plan-hero-top{
  display: grid;
  grid-template-columns: 1fr minmax(0, 860px) 1fr;
  align-items: start;
  gap: 16px;
}

/* center content column */
.qs-plan-hero-top > :first-child{
  grid-column: 2;
}

/* right actions column */
.qs-plan-hero-actions{
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 10px;
  align-items: center;
}

.qs-plan-title{
  font-weight: 950;
  letter-spacing: -0.03em;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.05;
  margin: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.qs-plan-eyebrow{
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 900;
  font-size: 11px;
  color: rgba(5, 51, 90, 0.62);
  margin: 0 0 8px;
  text-align: center;
}

.qs-plan-sub{
  margin: 10px auto 0;
  max-width: 78ch;
  font-size: clamp(13px, 1.6vw, 15px);
  line-height: 1.6;
  color: var(--qs-muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.qs-plan-hero-actions .qs-btn{
  white-space: nowrap;
}

.qs-plan-hero-meta{
  margin: 18px auto 0;
  width: min(860px, 100%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.qs-hero-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(5, 51, 90, 0.12);
  color: rgba(5, 51, 90, 0.88);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 8px 18px rgba(5, 51, 90, 0.06);
}

.qs-hero-chip b{
  font-weight: 950;
  color: var(--qs-text);
}

.qs-hero-chip--status{
  background: rgba(11,107,203,0.10);
  border-color: rgba(11,107,203,0.18);
}
.qs-hero-chip--plan{
  background: rgba(11,75,124,0.10);
  border-color: rgba(11,75,124,0.18);
}
.qs-hero-chip--warn{
  background: rgba(255,178,0,0.12);
  border-color: rgba(255,178,0,0.22);
}
.qs-hero-chip--danger{
  background: rgba(240,82,82,0.10);
  border-color: rgba(240,82,82,0.18);
}
.qs-hero-chip--muted{
  background: rgba(95,116,138,0.10);
  border-color: rgba(95,116,138,0.18);
}

/* Mobile: stack & center action button */
@media (max-width: 720px){
  .qs-plan-hero-top{
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .qs-plan-hero-top > :first-child{
    grid-column: auto;
  }
  .qs-plan-hero-actions{
    grid-column: auto;
    justify-self: center;
    justify-content: center;
    width: 100%;
  }
}

/* Notice box */
.qs-plan-moment{
  margin: 18px auto 0;
  width: min(860px, 100%);
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(11,107,203,0.22);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 10px 26px rgba(5, 51, 90, 0.06);
  text-align: center;
}

.qs-plan-moment-title{
  font-weight: 950;
  font-size: 13px;
  margin-bottom: 4px;
}

.qs-plan-moment-text{
  color: var(--qs-muted);
  font-size: 13px;
}

/* ------------------------------------------------------------------------- */
/* Segmented toggles                                                          */
/* ------------------------------------------------------------------------- */
.qs-plan-switches{
  margin-top: clamp(18px, 2.8vw, 26px);
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.qs-seg{
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(5,51,90,0.12);
  box-shadow: 0 10px 22px rgba(5,51,90,0.06);
  backdrop-filter: blur(10px);
}

.qs-toggle-btn{
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(5, 51, 90, 0.74);
  font-weight: 950;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  min-width: 120px;
  text-align: center;
  user-select: none;
  transition: background .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}

.qs-toggle-btn:hover{
  background: rgba(11,107,203,0.08);
}

.qs-toggle-btn.is-active{
  background: linear-gradient(180deg, rgba(11,107,203,0.16), rgba(11,107,203,0.10));
  border: 1px solid rgba(11,107,203,0.26);
  color: var(--qs-text);
  box-shadow: 0 8px 16px rgba(5, 51, 90, 0.08);
}

.qs-toggle-btn:active{ transform: scale(0.98); }

.qs-toggle-btn.is-disabled,
.qs-toggle-btn[aria-disabled="true"],
.qs-toggle-btn:disabled{
  opacity: 0.58;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none;
}

/* NEW: yearly hint line */
.qs-plan-billing-note{
  margin: 12px auto 0;
  text-align: center;
  color: rgba(5,51,90,0.62);
  font-size: 13px;
}

.qs-plan-hint{
  display: block;
  width: min(860px, 100%);
  margin: 14px auto 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(11,107,203,0.16);
  box-shadow: 0 10px 26px rgba(5, 51, 90, 0.06);
  text-align: left;
  color: var(--qs-text);
  font-size: 13px;
  line-height: 1.5;
}

/* Focus rings */
.qs-toggle-btn:focus-visible,
body.qs-plan-page .qs-plan-page .qs-btn:focus-visible{
  outline: 3px solid var(--qs-focus);
  outline-offset: 2px;
}


.qs-note{
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(5, 51, 90, 0.12);
  color: var(--qs-text);
  font-size: 13px;
  line-height: 1.5;
}

.qs-note + .qs-note{
  margin-top: 10px;
}

.qs-note__title{
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 950;
  color: var(--qs-text);
}

.qs-note--muted{
  background: rgba(255,255,255,0.72);
  border-color: rgba(95,116,138,0.18);
}

.qs-note--info{
  background: rgba(11,107,203,0.10);
  border-color: rgba(11,107,203,0.18);
}

.qs-note--warn{
  background: rgba(255,178,0,0.12);
  border-color: rgba(255,178,0,0.22);
}

.qs-note--danger{
  background: rgba(240,82,82,0.10);
  border-color: rgba(240,82,82,0.18);
}

.qs-note code{
  overflow-wrap: anywhere;
}

.qs-portal-box{
  width: min(860px, 100%);
  margin: 14px auto 0;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(5, 51, 90, 0.12);
  box-shadow: 0 10px 24px rgba(5, 51, 90, 0.06);
}

.qs-portal-box__title{
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 950;
  color: var(--qs-text);
}

.qs-portal-box__text{
  margin: 0;
  color: var(--qs-muted);
  font-size: 12px;
  line-height: 1.45;
}

.qs-portal-box__actions{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.qs-portal-box .qs-btn{
  min-width: 170px;
}

@media (max-width: 720px){
  .qs-portal-box{
    flex-direction: column;
    align-items: stretch;
  }
  .qs-portal-box__actions{
    width: 100%;
  }
  .qs-portal-box .qs-btn{
    width: 100%;
    min-width: 0;
  }
}

/* ------------------------------------------------------------------------- */
/* /plan grid                                                                 */
/* ------------------------------------------------------------------------- */
.qs-plan-grid{
  margin-top: clamp(18px, 3vw, 30px);
  display: grid;
  gap: var(--qs-gap);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

@media (max-width: 1250px){
  .qs-plan-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px){
  .qs-plan-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .qs-plan-grid{ grid-template-columns: 1fr; }
}

/* NEW: Bundle view centers 2 cards nicely */
.qs-plan-grid.is-bundle-view{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 640px){
  .qs-plan-grid.is-bundle-view{
    grid-template-columns: 1fr;
    max-width: none;
  }
}

/* ------------------------------------------------------------------------- */
/* Pricing cards                                                              */
/* ------------------------------------------------------------------------- */
.qs-card{
  background: rgba(255,255,255,0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--qs-border);
  border-radius: var(--qs-radius);
  box-shadow: var(--qs-shadow);
  padding: clamp(16px, 2.4vw, 22px);
  display: flex;
  flex-direction: column;
  min-height: 500px;
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform .18s ease, box-shadow .18s ease;
}

@media (max-width: 640px){
  .qs-card{ min-height: auto; }
}

.qs-card::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 240px at 50% -120px, rgba(11,107,203,.12), rgba(11,107,203,0) 55%);
  opacity: .7;
  pointer-events: none;
}

.qs-card > *{ position: relative; }

@media (hover:hover) and (pointer:fine){
  .qs-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 18px 62px rgba(5, 51, 90, 0.12);
  }
}

.qs-card.is-featured{
  border-color: rgba(11,107,203,0.42);
  box-shadow: 0 18px 72px rgba(11,107,203,0.14);
}
.qs-card.is-featured::after{
  content:"";
  position:absolute;
  left:0; right:0; top:0;
  height:4px;
  background: linear-gradient(90deg, rgba(11,107,203,0), rgba(11,107,203,0.75), rgba(11,107,203,0));
  opacity: .85;
  pointer-events:none;
}
.qs-card.is-current{
  border-color: rgba(11,75,124,0.56);
  box-shadow: 0 18px 72px rgba(11,75,124,0.14);
}

.qs-card-top{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.qs-card-title{
  font-weight: 950;
  letter-spacing: -0.01em;
  font-size: clamp(16px, 1.7vw, 18px);
  margin: 0;
  overflow-wrap: anywhere;
}

.qs-popular{
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 950;
  font-size: 12px;
  color: #0b3f68;
  background: rgba(11,107,203,0.12);
  border: 1px solid rgba(11,107,203,0.20);
  white-space: nowrap;
}

.qs-card.is-featured .qs-popular{
  background: rgba(11,107,203,0.16);
  border-color: rgba(11,107,203,0.28);
}

.qs-price{
  margin-top: 2px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  row-gap: 6px;
}

.qs-price-main{
  font-weight: 950;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.qs-price-sub{
  font-weight: 900;
  color: rgba(5,51,90,0.62);
  font-size: 13px;
}

/* NEW: extra note under yearly price */
.qs-price-note{
  margin-top: 8px;
  font-size: 12px;
  color: rgba(5,51,90,0.62);
  line-height: 1.35;
}

.qs-card-desc{
  margin-top: 10px;
  color: var(--qs-muted);
  font-size: 13px;
  line-height: 1.5;
  min-height: 38px;
  overflow-wrap: anywhere;
}

.qs-features{
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.qs-features li{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: rgba(5,51,90,0.88);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  min-width: 0;
}

.qs-features li::before{
  content:"✓";
  font-weight: 950;
  color: rgba(11,107,203,0.85);
  margin-top: 1px;
  flex: 0 0 auto;
}

.qs-card-cta{
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(5,51,90,0.08);
}

.qs-card-meta{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qs-mini-text{
  font-size: 12px;
  color: rgba(5,51,90,0.60);
  line-height: 1.45;
}

.qs-mini-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.72);
  color: rgba(5,51,90,0.80);
}

.qs-mini-badge--info{
  background: rgba(11,107,203,0.10);
  border-color: rgba(11,107,203,0.18);
}
.qs-mini-badge--warn{
  background: rgba(255,178,0,0.12);
  border-color: rgba(255,178,0,0.22);
}
.qs-mini-badge--danger{
  background: rgba(240,82,82,0.10);
  border-color: rgba(240,82,82,0.18);
}
.qs-mini-badge--muted{
  background: rgba(95,116,138,0.10);
  border-color: rgba(95,116,138,0.18);
}
.qs-mini-badge--success{
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.18);
}

/* Buttons (scoped) */
body.qs-plan-page .qs-plan-page .qs-btn{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(5,51,90,0.14);
  background: rgba(255,255,255,0.78);
  color: var(--qs-text);
  font-weight: 950;
  font-size: 13px;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(5,51,90,0.06);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  min-height: 42px;
}

body.qs-plan-page .qs-plan-page .qs-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.92);
}

body.qs-plan-page .qs-plan-page .qs-btn-primary{
  background: linear-gradient(180deg, rgba(11,107,203,0.20), rgba(11,75,124,0.18));
  border: 1px solid rgba(11,107,203,0.28);
}

body.qs-plan-page .qs-plan-page .qs-btn-primary:hover{
  background: linear-gradient(180deg, rgba(11,107,203,0.24), rgba(11,75,124,0.20));
}

body.qs-plan-page .qs-plan-page .qs-btn.is-disabled,
body.qs-plan-page .qs-plan-page .qs-btn[aria-disabled="true"],
body.qs-plan-page .qs-plan-page .qs-btn:disabled{
  opacity: 0.62;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none;
}

.qs-card-cta .qs-btn{ width: 100%; }

.qs-trust{
  margin-top: 18px;
  text-align: center;
  color: rgba(5,51,90,0.60);
  font-size: 12px;
}

/* ------------------------------------------------------------------------- */
/* /myplan (dashboard look)                                                   */
/* ------------------------------------------------------------------------- */

/* ✅ FIX: /myplan hero should align like a container (button not at screen edge) */
body.qs-plan-page.qs-myplan-page .qs-plan-hero{
  padding-bottom: 10px;
  max-width: var(--qs-container);
  margin: 0 auto;
  padding-left: var(--qs-page-pad);
  padding-right: var(--qs-page-pad);
}

/* 2-column top grid */
body.qs-plan-page.qs-myplan-page .qs-myplan-grid{
  max-width: var(--qs-container);
  margin: 18px auto 0;
  padding: 0 var(--qs-page-pad);
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: clamp(14px, 2vw, 18px);
}

@media (max-width: 980px){
  body.qs-plan-page.qs-myplan-page .qs-myplan-grid{
    grid-template-columns: 1fr;
  }
}

/* Myplan cards */
body.qs-plan-page.qs-myplan-page .qs-card{
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(11,42,74,.10);
  overflow: hidden;
  padding: 0;
  min-height: auto;
  display: block;
  transition: box-shadow .18s ease, transform .18s ease;
}

@media (hover:hover) and (pointer:fine){
  body.qs-plan-page.qs-myplan-page .qs-card:hover{
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(11,42,74,.12);
  }
}

body.qs-plan-page.qs-myplan-page .qs-card::before{ display: none; }

/* Header / body blocks */
body.qs-plan-page.qs-myplan-page .qs-card-header{
  padding: 14px 16px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.qs-plan-page.qs-myplan-page .qs-card-title{
  margin: 0;
  font-weight: 900;
  letter-spacing: -.01em;
  font-size: 14px;
}

body.qs-plan-page.qs-myplan-page .qs-card-subtitle{
  margin-top: 4px;
  font-size: 12px;
  color: var(--qs-muted);
  line-height: 1.35;
}

body.qs-plan-page.qs-myplan-page .qs-card-pill{
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: var(--qs-text);
  background: rgba(0,148,255,.10);
  border: 1px solid rgba(0,148,255,.18);
  white-space: nowrap;
}

body.qs-plan-page.qs-myplan-page .qs-card-body{
  padding: 0 16px 16px;
  font-size: 13px;
  color: var(--qs-text);
}

body.qs-plan-page.qs-myplan-page .qs-card-footnote{
  margin-top: 10px;
  font-size: 12px;
  color: var(--qs-muted);
  line-height: 1.45;
}

/* Actions */
body.qs-plan-page.qs-myplan-page .qs-card-actions{
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.qs-plan-page.qs-myplan-page .qs-card-actions--stack{
  align-items: flex-start;
}

body.qs-plan-page.qs-myplan-page .qs-state-strip{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

body.qs-plan-page.qs-myplan-page .qs-note{
  margin-top: 0;
  margin-bottom: 14px;
}

body.qs-plan-page.qs-myplan-page .qs-note + .qs-kv{
  margin-top: 0;
}

body.qs-plan-page.qs-myplan-page .qs-open-checkout-card{
  margin-top: 14px;
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(255, 251, 242, 0.92);
}

body.qs-plan-page.qs-myplan-page .qs-open-checkout-badge{
  margin-left: auto;
}

body.qs-plan-page.qs-myplan-page .qs-open-checkout-text{
  margin: 0 0 10px;
  max-width: 76ch;
  color: var(--qs-text);
  font-weight: 760;
  line-height: 1.5;
}

body.qs-plan-page.qs-myplan-page .qs-open-checkout-target{
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  border: 1px solid rgba(5, 51, 90, 0.08);
}

body.qs-plan-page.qs-myplan-page .qs-open-checkout-actions{
  margin-top: 12px;
}

body.qs-plan-page.qs-myplan-page .qs-open-checkout-hint{
  margin-top: 8px;
}

/* My Plan: disabled manage button */

body.qs-plan-page.qs-myplan-page .qs-btn.is-disabled{
  opacity: .60;
  cursor: not-allowed;
}

body.qs-plan-page.qs-myplan-page .qs-muted-inline{
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--qs-muted);
  line-height: 1.35;
  margin-left: 2px;
}

body.qs-plan-page.qs-myplan-page .qs-cta-note{
  width: 100%;
  margin-top: 2px;
}

body.qs-plan-page.qs-myplan-page .qs-billing-portal-note{
  color: var(--qs-muted);
  max-width: 620px;
}

body.qs-plan-page.qs-myplan-page .qs-card-actions .qs-btn{
  padding: 10px 12px;
  border-radius: 12px;
}

/* Key/value rows */
body.qs-plan-page.qs-myplan-page .qs-kv{
  margin-top: 10px;
  display: grid;
  gap: 0;
}

body.qs-plan-page.qs-myplan-page .qs-kv-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px dashed rgba(0,0,0,.10);
}

body.qs-plan-page.qs-myplan-page .qs-kv-row:first-child{ border-top: 0; }

body.qs-plan-page.qs-myplan-page .qs-kv-key{
  color: var(--qs-muted);
  font-size: 12px;
  font-weight: 800;
}

body.qs-plan-page.qs-myplan-page .qs-kv-val{
  font-weight: 900;
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* Limits list */
body.qs-plan-page.qs-myplan-page .qs-limit-panels{
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 980px){
  body.qs-plan-page.qs-myplan-page .qs-limit-panels{
    grid-template-columns: 1fr;
  }
}

body.qs-plan-page.qs-myplan-page .qs-limit-panel{
  padding: 14px;
  border-radius: 16px;
  background: rgba(248,251,255,0.92);
  border: 1px solid rgba(5, 51, 90, 0.08);
}

body.qs-plan-page.qs-myplan-page .qs-limit-panel-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

body.qs-plan-page.qs-myplan-page .qs-limit-panel-title{
  font-size: 13px;
  font-weight: 950;
  color: var(--qs-text);
}

body.qs-plan-page.qs-myplan-page .qs-limit-panel-subtitle{
  margin-top: 3px;
  font-size: 12px;
  color: var(--qs-muted);
  line-height: 1.35;
}

body.qs-plan-page.qs-myplan-page .qs-limit-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.qs-plan-page.qs-myplan-page .qs-value-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(2,132,199,.08);
  border: 1px solid rgba(2,132,199,.14);
  color: var(--qs-text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

body.qs-plan-page.qs-myplan-page .qs-value-pill b{
  font-weight: 950;
}

/* Includes section */
body.qs-plan-page.qs-myplan-page .qs-include-wrap{
  max-width: var(--qs-container);
  margin: 18px auto 26px;
  padding: 0 var(--qs-page-pad);
}

body.qs-plan-page.qs-myplan-page .qs-include-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 16px);
}

@media (max-width: 1100px){
  body.qs-plan-page.qs-myplan-page .qs-include-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px){
  body.qs-plan-page.qs-myplan-page .qs-include-grid{
    grid-template-columns: 1fr;
  }
}

body.qs-plan-page.qs-myplan-page .qs-include-block{
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(11,42,74,.08);
  overflow: hidden;
  padding: 0;
}

/* Accordion */
body.qs-plan-page.qs-myplan-page .qs-acc{ display: block; }

body.qs-plan-page.qs-myplan-page .qs-acc-summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  user-select: none;
  transition: background .16s ease;
}

body.qs-plan-page.qs-myplan-page .qs-acc-summary:hover{
  background: rgba(11,107,203,0.06);
}

body.qs-plan-page.qs-myplan-page .qs-acc-summary::-webkit-details-marker{ display: none; }

body.qs-plan-page.qs-myplan-page .qs-acc-title{
  font-weight: 900;
  font-size: 13px;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

body.qs-plan-page.qs-myplan-page .qs-acc-summary::after{
  content: "▾";
  font-weight: 900;
  color: rgba(5,51,90,0.55);
  transition: transform .16s ease;
}

body.qs-plan-page.qs-myplan-page details[open] > .qs-acc-summary{
  border-bottom: 1px solid rgba(0,0,0,.06);
}

body.qs-plan-page.qs-myplan-page details[open] > .qs-acc-summary::after{
  transform: rotate(180deg);
}

body.qs-plan-page.qs-myplan-page .qs-acc-summary:focus-visible{
  outline: 3px solid var(--qs-focus);
  outline-offset: 2px;
  border-radius: 14px;
}

body.qs-plan-page.qs-myplan-page .qs-acc-content{
  padding: 0 14px 12px;
}

body.qs-plan-page.qs-myplan-page .qs-include-item{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed rgba(0,0,0,.10);
  font-size: 13px;
  flex-wrap: wrap;
}

body.qs-plan-page.qs-myplan-page .qs-include-item:first-of-type{ border-top: 0; }

body.qs-plan-page.qs-myplan-page .qs-include-item span{
  min-width: 0;
  color: rgba(5,51,90,0.84);
  overflow-wrap: anywhere;
}

body.qs-plan-page.qs-myplan-page .qs-include-item b{
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(2,132,199,.10);
  border: 1px solid rgba(2,132,199,.18);
  white-space: nowrap;
  flex: 0 0 auto;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px){
  body.qs-plan-page.qs-myplan-page .qs-acc-summary{
    padding: 16px 14px 14px;
  }
  body.qs-plan-page.qs-myplan-page .qs-acc-content{
    padding-bottom: 14px;
  }
}

body.qs-plan-page.qs-myplan-page .qs-acc-summary{
  list-style: none;
}

body.qs-plan-page.qs-myplan-page .qs-acc-summary::-webkit-details-marker{
  display: none;
}


/* Product polish for /plan + /my-plan */
.qs-plan-hero-meta .qs-hero-chip{
  min-height: 40px;
  padding: 9px 14px;
}
.qs-plan-moment{
  text-align: left;
  background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(255,255,255,0.78));
}
.qs-portal-box{ align-items: stretch; }
.qs-portal-box__title{ font-size: 15px; }
.qs-portal-box__text{ font-size: 13px; }
.qs-plan-hint{ border-radius: 14px; }
body.qs-plan-page .qs-btn.is-disabled{ opacity: .72; }
body.qs-plan-page .qs-card-cta .qs-btn,
body.qs-plan-page .qs-portal-box .qs-btn{ justify-content: center; }

body.qs-plan-page.qs-myplan-page .qs-card-subtitle{ max-width: 56ch; }
body.qs-plan-page.qs-myplan-page .qs-state-strip{ margin-bottom: 12px; }
body.qs-plan-page.qs-myplan-page .qs-limit-panel{
  padding: 16px;
  background: linear-gradient(180deg, rgba(248,251,255,0.98), rgba(255,255,255,0.94));
}
body.qs-plan-page.qs-myplan-page .qs-limit-panel-subtitle{ max-width: 28ch; }
body.qs-plan-page.qs-myplan-page .qs-limit-list{
  display: grid;
  gap: 10px;
}
body.qs-plan-page.qs-myplan-page .qs-limit-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(11,107,203,0.05);
  border: 1px solid rgba(11,107,203,0.10);
}
body.qs-plan-page.qs-myplan-page .qs-limit-item span{
  color: var(--qs-muted);
  font-size: 12px;
  line-height: 1.35;
}
body.qs-plan-page.qs-myplan-page .qs-limit-item b{
  color: var(--qs-text);
  font-size: 14px;
  font-weight: 950;
  text-align: right;
}
body.qs-plan-page.qs-myplan-page .qs-card-actions--stack{ gap: 10px; }
body.qs-plan-page.qs-myplan-page .qs-card-footnote{
  margin-top: 14px;
  color: var(--qs-muted);
  line-height: 1.5;
}
@media (max-width: 720px){
  .qs-plan-hero-meta{ justify-content: flex-start; }
  .qs-portal-box{ flex-direction: column; }
  .qs-portal-box__actions,
  .qs-portal-box__actions .qs-btn{ width: 100%; }
  body.qs-plan-page.qs-myplan-page .qs-limit-item{
    align-items: flex-start;
    flex-direction: column;
  }
  body.qs-plan-page.qs-myplan-page .qs-limit-item b{ text-align: left; }
}


/* ------------------------------------------------------------------------- */
/* My Plan overview rebuild                                                   */
/* ------------------------------------------------------------------------- */
body.qs-plan-page.qs-myplan-page .qs-myplan-grid{
  grid-template-columns: 1fr;
}

body.qs-plan-page.qs-myplan-page .qs-limits-card{
  grid-column: 1 / -1;
}

body.qs-plan-page.qs-myplan-page .qs-card-body--limits{
  display: grid;
  gap: 16px;
}

body.qs-plan-page.qs-myplan-page .qs-limit-overview{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.qs-plan-page.qs-myplan-page .qs-limit-overview > .qs-limit-panel:last-child:nth-child(odd){
  grid-column: 1 / -1;
}

body.qs-plan-page.qs-myplan-page .qs-limit-panel{
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248,251,255,0.98), rgba(255,255,255,0.94));
  border: 1px solid rgba(5, 51, 90, 0.08);
  min-width: 0;
}

body.qs-plan-page.qs-myplan-page .qs-limit-panel-head{
  margin-bottom: 14px;
}

body.qs-plan-page.qs-myplan-page .qs-limit-panel-title{
  font-size: 14px;
}

body.qs-plan-page.qs-myplan-page .qs-limit-panel-subtitle{
  max-width: 26ch;
  font-size: 12px;
}

body.qs-plan-page.qs-myplan-page .qs-limit-rows{
  display: grid;
  gap: 10px;
}

body.qs-plan-page.qs-myplan-page .qs-limit-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(11,107,203,0.05);
  border: 1px solid rgba(11,107,203,0.10);
  min-width: 0;
}

body.qs-plan-page.qs-myplan-page .qs-limit-row-label{
  display: block;
  min-width: 0;
  color: var(--qs-muted);
  font-size: 13px;
  line-height: 1.35;
}

body.qs-plan-page.qs-myplan-page .qs-limit-row-value{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11,107,203,0.10);
  border: 1px solid rgba(11,107,203,0.16);
  color: var(--qs-text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

body.qs-plan-page.qs-myplan-page .qs-card-actions--limits{
  margin-top: 0;
  padding-top: 2px;
}

@media (max-width: 980px){
  body.qs-plan-page.qs-myplan-page .qs-limit-overview{
    grid-template-columns: 1fr;
  }
  body.qs-plan-page.qs-myplan-page .qs-limit-overview > .qs-limit-panel:last-child:nth-child(odd){
    grid-column: auto;
  }
}

@media (max-width: 640px){
  body.qs-plan-page.qs-myplan-page .qs-limit-row{
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
  body.qs-plan-page.qs-myplan-page .qs-limit-row-value{
    justify-content: flex-start;
    white-space: normal;
  }
}


/* ------------------------------------------------------------------------- */
/* Final product polish for /plan + /my-plan                                 */
/* ------------------------------------------------------------------------- */
.qs-plan-moment{
  text-align: left;
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.76));
}

.qs-plan-moment-title{
  letter-spacing: .01em;
}

.qs-plan-moment-text{
  line-height: 1.55;
}

.qs-portal-box{
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.78));
}

.qs-portal-box__title{
  font-size: 15px;
}

.qs-portal-box__text{
  font-size: 13px;
  line-height: 1.55;
}

body.qs-plan-page .qs-btn.is-disabled{
  opacity: .72;
  color: rgba(5,51,90,.72);
  background: rgba(255,255,255,.72);
}

body.qs-plan-page .qs-mini-text{
  line-height: 1.5;
}

body.qs-plan-page .qs-trust{
  color: var(--qs-muted);
}

body.qs-plan-page.qs-myplan-page .qs-card-subtitle{
  max-width: 52ch;
}

body.qs-plan-page.qs-myplan-page .qs-card-footnote{
  margin-top: 16px;
  line-height: 1.6;
}

body.qs-plan-page.qs-myplan-page .qs-note{
  background: rgba(11,107,203,0.05);
  border-color: rgba(11,107,203,0.10);
}

body.qs-plan-page.qs-myplan-page .qs-note.qs-note--warn{
  background: rgba(255,178,0,0.08);
  border-color: rgba(255,178,0,0.16);
}

body.qs-plan-page.qs-myplan-page .qs-state-strip{
  margin-bottom: 16px;
}

body.qs-plan-page.qs-myplan-page .qs-cta-note{
  color: var(--qs-muted);
  line-height: 1.5;
}

@media (max-width: 720px){
  .qs-plan-moment{
    text-align: left;
  }
}


.qs-plan-policy-note{
  margin-top: 12px;
}

.qs-card-actions .qs-plan-policy-note{
  width: 100%;
  text-align: left;
}


/* ------------------------------------------------------------------------- */
/* Billing Payment Element on /plan                                           */
/* ------------------------------------------------------------------------- */
.qs-billing-payment-panel{
  margin-top: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(11,107,203,0.20);
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 4%, rgba(0,148,255,0.13), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  box-shadow: 0 18px 56px rgba(5,51,90,0.13);
  padding: clamp(16px, 2.4vw, 24px);
  overflow: hidden;
}

.qs-billing-payment-panel[hidden]{
  display: none !important;
}

.qs-billing-payment-panel::before{
  content: none;
  display: none;
}

.qs-billing-payment-shell{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.qs-billing-payment-copy h2{
  margin: 6px 0 6px;
  color: var(--qs-primary);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.qs-billing-payment-copy p{
  margin: 0;
  color: var(--qs-muted);
  font-weight: 800;
  line-height: 1.45;
}

.qs-billing-payment-detail{
  margin-top: 8px !important;
  color: #31516f !important;
  font-size: 0.95rem;
}

.qs-billing-payment-actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.qs-billing-payment-actions .qs-btn[aria-busy="true"]{
  cursor: wait;
  opacity: .82;
}

.qs-billing-payment-mount-wrap{
  border: 1px solid rgba(5,51,90,0.12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(5,51,90,0.08);
  padding: clamp(10px, 2vw, 18px);
}

.qs-billing-payment-mount{
  min-height: 360px;
}

.qs-billing-payment-panel[data-state="starting"] .qs-billing-payment-mount,
.qs-billing-payment-panel[data-state="loading"] .qs-billing-payment-mount,
.qs-billing-payment-panel[data-state="confirming"] .qs-billing-payment-mount{
  min-height: 180px;
  position: relative;
}

.qs-billing-payment-panel[data-state="starting"] .qs-billing-payment-mount::before,
.qs-billing-payment-panel[data-state="loading"] .qs-billing-payment-mount::before{
  content: "Payment Element wird geladen …";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--qs-muted);
  font-weight: 900;
}

.qs-billing-payment-panel[data-state="confirming"] .qs-billing-payment-mount{
  opacity: .62;
  pointer-events: none;
}

.qs-billing-payment-panel[data-state="error"] .qs-billing-payment-mount-wrap,
.qs-billing-payment-panel[data-state="complete"] .qs-billing-payment-mount-wrap{
  display: none;
}

.qs-billing-payment-panel[data-state="error"]{
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  border-color: rgba(174, 83, 0, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf3 100%);
  box-shadow: 0 14px 36px rgba(5,51,90,0.10);
  padding: clamp(16px, 2vw, 22px);
}

.qs-billing-payment-panel[data-state="error"] .qs-billing-payment-shell{
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 0;
}

.qs-billing-payment-panel[data-state="error"] .qs-billing-payment-copy h2{
  margin-top: 4px;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  letter-spacing: -0.02em;
}

.qs-billing-payment-panel[data-state="error"] .qs-billing-payment-copy p{
  max-width: 64ch;
}

.qs-billing-payment-panel[data-state="error"] .qs-billing-payment-detail{
  display: block;
  margin-top: 12px !important;
  padding: 12px 14px;
  border: 1px solid rgba(174, 83, 0, 0.16);
  border-radius: 16px;
  background: rgba(255, 178, 0, 0.08);
  color: #5e4307 !important;
  font-size: 0.93rem;
  font-weight: 800;
}

.qs-billing-payment-panel[data-state="error"] .qs-billing-payment-actions{
  justify-content: flex-start;
}

.qs-billing-payment-panel[data-state="error"] .qs-billing-payment-footnote{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(5,51,90,0.09);
}

.qs-billing-payment-panel[data-state="complete"]{
  border-color: rgba(18,183,106,0.32);
}

.qs-billing-payment-panel[data-state="complete"]{
  background:
    radial-gradient(circle at 12% 8%, rgba(18,183,106,0.12), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7fff9 100%);
  box-shadow: 0 18px 52px rgba(18,183,106,0.12);
}

.qs-billing-payment-success{
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 20px;
  border: 1px solid rgba(26,127,55,0.22);
  background: linear-gradient(180deg, rgba(232,248,238,0.98), rgba(255,255,255,0.98));
  color: #0f5f2a;
  box-shadow: 0 14px 28px rgba(26,127,55,0.12);
}

.qs-billing-payment-success[hidden]{
  display: none !important;
}

.qs-billing-payment-success-ring{
  position: relative;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #19a35b;
  box-shadow: 0 12px 26px rgba(25,163,91,0.24);
  animation: qsBillingPaymentSuccessPop 0.38s ease-out both;
}

.qs-billing-payment-success-ring svg{
  position: absolute;
  inset: 0;
  width: 54px;
  height: 54px;
  transform: rotate(-90deg);
}

.qs-billing-payment-success-track,
.qs-billing-payment-success-progress{
  fill: none;
  stroke-width: 4;
}

.qs-billing-payment-success-track{
  stroke: rgba(255,255,255,0.32);
}

.qs-billing-payment-success-progress{
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-dasharray: 138.2;
  stroke-dashoffset: 138.2;
  animation: qsBillingPaymentRingClose 1.35s ease-out forwards;
}

.qs-billing-payment-success-ring span{
  position: relative;
  z-index: 1;
  font-weight: 950;
  font-size: 1.55rem;
  line-height: 1;
  transform: translateY(-1px);
  animation: qsBillingPaymentCheckIn 0.42s ease-out 0.42s both;
}

.qs-billing-payment-success-copy strong{
  display: block;
  color: #0c4d24;
  font-weight: 950;
  margin-bottom: 3px;
}

.qs-billing-payment-success-copy span{
  display: block;
  color: #27613d;
  font-weight: 800;
  line-height: 1.38;
  font-size: 0.94rem;
}

.qs-billing-payment-panel[data-state="complete"] .qs-billing-payment-method-head,
.qs-billing-payment-panel[data-state="complete"] .qs-billing-payment-footnote,
.qs-billing-payment-panel[data-state="complete"] .qs-billing-country{
  display: none !important;
}

.qs-billing-payment-panel[data-state="complete"] .qs-billing-payment-summary{
  border-color: rgba(26,127,55,0.18);
  background: rgba(255,255,255,0.92);
}

@keyframes qsBillingPaymentRingClose{
  0% { stroke-dashoffset: 138.2; }
  100% { stroke-dashoffset: 0; }
}

@keyframes qsBillingPaymentSuccessPop{
  0% { transform: scale(0.74); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes qsBillingPaymentCheckIn{
  0% { transform: scale(0.45) translateY(-1px); opacity: 0; }
  100% { transform: scale(1) translateY(-1px); opacity: 1; }
}

.qs-billing-payment-footnote{
  margin-top: 12px;
  color: var(--qs-muted);
  font-size: 0.92rem;
  font-weight: 800;
}

@media (max-width: 760px){
  .qs-billing-payment-shell{
    grid-template-columns: 1fr;
  }

  .qs-billing-payment-actions{
    justify-content: stretch;
  }

  .qs-billing-payment-actions .qs-btn{
    width: 100%;
  }

  .qs-billing-payment-mount{
    min-height: 430px;
  }
}



/* Billing UX cleanup: custom confirmation modal */
.qs-billing-confirm {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 24, 44, 0.46);
  backdrop-filter: blur(3px);
}

.qs-billing-confirm[hidden] {
  display: none !important;
}

.qs-billing-confirm__card {
  width: min(520px, 100%);
  background: #ffffff;
  border: 1px solid rgba(112, 170, 226, 0.38);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(7, 36, 65, 0.24);
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
}

.qs-billing-confirm__icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #08345c;
  background: #dcecff;
  border: 1px solid rgba(112, 170, 226, 0.55);
}

.qs-billing-confirm__copy h2 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  color: #073763;
}

.qs-billing-confirm__copy p {
  margin: 0;
  color: #365a7a;
  line-height: 1.55;
}

.qs-billing-confirm__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

@media (max-width: 560px) {
  .qs-billing-confirm {
    padding: 16px;
  }

  .qs-billing-confirm__card {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .qs-billing-confirm__actions {
    justify-content: stretch;
  }

  .qs-billing-confirm__actions .qs-btn {
    width: 100%;
  }
}


/* Billing self-service panels: invoices + payment method */
.qs-billing-self-panel {
  margin-top: 18px;
  border: 1px solid rgba(112, 170, 226, 0.35);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(5, 51, 90, 0.08);
  padding: 18px;
}

.qs-billing-self-panel[hidden] {
  display: none !important;
}

.qs-billing-self-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.qs-billing-self-head h2 {
  margin: 0 0 4px;
  color: #073763;
  font-size: 1.08rem;
  font-weight: 950;
}

.qs-billing-self-head p {
  margin: 0;
  color: #55708c;
  font-weight: 750;
  line-height: 1.45;
}

.qs-billing-self-body {
  display: grid;
  gap: 12px;
}

.qs-billing-self-loading,
.qs-billing-self-empty {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(5, 51, 90, 0.12);
  background: rgba(240, 247, 255, 0.76);
  color: #0b3763;
  font-weight: 850;
}

.qs-billing-invoice-list {
  display: grid;
  gap: 10px;
}

.qs-billing-invoice-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(5, 51, 90, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

.qs-billing-invoice-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.qs-billing-invoice-main b {
  color: #073763;
}

.qs-billing-invoice-main span,
.qs-billing-invoice-main small {
  color: #55708c;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.qs-billing-invoice-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
  white-space: nowrap;
}

.qs-billing-invoice-meta strong {
  color: #073763;
  font-size: 1rem;
}

.qs-billing-invoice-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(95, 116, 138, 0.10);
  border: 1px solid rgba(95, 116, 138, 0.20);
  color: #425d78;
  font-size: 12px;
  font-weight: 950;
}

.qs-billing-invoice-status.is-paid {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.26);
  color: #166534;
}

.qs-billing-invoice-status.is-open {
  background: rgba(255, 178, 0, 0.14);
  border-color: rgba(255, 178, 0, 0.28);
  color: #7a4d00;
}

.qs-billing-invoice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.qs-billing-country {
  position: relative;
  display: grid;
  gap: 7px;
}

.qs-billing-country-label {
  color: #073763;
  font-size: 0.9rem;
  font-weight: 900;
}

.qs-billing-country-button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(5, 51, 90, 0.14);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.98);
  color: #073763;
  font: inherit;
  font-weight: 900;
  padding: 11px 13px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(5, 51, 90, 0.05);
}

.qs-billing-country-button:focus-visible {
  outline: none;
  border-color: rgba(0, 148, 255, 0.70);
  box-shadow: 0 0 0 4px rgba(0, 148, 255, 0.16);
}

.qs-billing-country-caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(7, 55, 99, 0.70);
  border-bottom: 2px solid rgba(7, 55, 99, 0.70);
  transform: rotate(45deg) translateY(-2px);
  flex: 0 0 auto;
}

.qs-billing-country-panel {
  position: absolute;
  z-index: 45;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  max-height: 230px;
  overflow: auto;
  border: 1px solid rgba(5, 51, 90, 0.14);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(5, 51, 90, 0.16);
  padding: 6px;
}

.qs-billing-country-panel[hidden] {
  display: none !important;
}

.qs-billing-country-option {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 0;
  background: transparent;
  color: #073763;
  border-radius: 12px;
  padding: 10px 11px;
  font: inherit;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.qs-billing-country-option small {
  color: #607895;
  font-weight: 900;
}

.qs-billing-country-option:hover,
.qs-billing-country-option:focus-visible,
.qs-billing-country-option.is-selected {
  outline: none;
  background: rgba(0, 148, 255, 0.10);
}

.qs-billing-payment-method-mount {
  min-height: 220px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(5, 51, 90, 0.12);
  background: rgba(255, 255, 255, 0.94);
}

.qs-billing-self-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}



/* /my-plan subscription manager ------------------------------------------------ */
.qs-subscription-manager {
  margin-top: 18px;
  padding: 16px 16px 14px;
  border-radius: 20px;
  border: 1px solid rgba(5, 51, 90, 0.10);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(5, 51, 90, 0.055);
}

.qs-subscription-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(5, 51, 90, 0.08);
}

.qs-subscription-manager-head h2 {
  margin: 0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.qs-subscription-manager-head p {
  margin: 4px 0 0;
  color: var(--qs-muted);
  font-weight: 720;
  line-height: 1.4;
}

.qs-manager-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.qs-manager-tile {
  appearance: none;
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(5, 51, 90, 0.11);
  background: rgba(250, 253, 255, 0.92);
  color: var(--qs-text);
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  box-shadow: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.qs-manager-tile:hover,
.qs-manager-tile:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(11, 107, 203, 0.26);
  background: rgba(244, 250, 255, 0.98);
  outline: none;
}

.qs-manager-tile--primary,
.qs-manager-tile--good,
.qs-manager-tile--danger {
  background: rgba(250, 253, 255, 0.92);
  border-color: rgba(5, 51, 90, 0.11);
}

.qs-manager-tile--danger:hover,
.qs-manager-tile--danger:focus-visible {
  border-color: rgba(190, 92, 30, 0.28);
  background: rgba(255, 249, 244, 0.96);
}

.qs-manager-tile.is-disabled,
.qs-manager-tile:disabled {
  cursor: not-allowed;
  opacity: .52;
  transform: none;
  box-shadow: none;
}

.qs-manager-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 107, 203, 0.08);
  border: 1px solid rgba(11, 107, 203, 0.13);
  font-weight: 1000;
  font-size: 15px;
}

.qs-manager-tile--danger .qs-manager-icon {
  background: rgba(220, 122, 43, 0.08);
  border-color: rgba(220, 122, 43, 0.14);
}

.qs-manager-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.qs-manager-copy strong {
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qs-manager-copy small {
  color: var(--qs-muted);
  font-weight: 720;
  line-height: 1.3;
}

.qs-manager-pending {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 174, 54, 0.24);
  background: rgba(255, 251, 242, 0.92);
}

.qs-manager-pending strong {
  display: block;
  font-weight: 1000;
}

.qs-manager-pending span {
  display: block;
  margin-top: 2px;
  color: var(--qs-muted);
  font-weight: 720;
}

.qs-subscription-manager #qsBillingMsg,
.qs-subscription-manager .qs-plan-policy-note {
  margin-top: 12px;
}

@media (max-width: 1020px) {
  .qs-manager-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .qs-manager-grid {
    grid-template-columns: 1fr;
  }

  .qs-subscription-manager-head,
  .qs-manager-pending {
    align-items: stretch;
    flex-direction: column;
  }

  .qs-manager-pending .qs-btn {
    width: 100%;
  }
}

/* Modal buttons live outside .qs-plan-page; style them explicitly. */
.qs-billing-confirm__actions .qs-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid rgba(5, 51, 90, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #073763;
  font-weight: 950;
  font-size: 13px;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(5, 51, 90, 0.08);
  min-height: 42px;
  cursor: pointer;
}

.qs-billing-confirm__actions .qs-btn-primary {
  background: linear-gradient(180deg, rgba(211, 232, 251, 0.96), rgba(176, 211, 241, 0.96));
  border-color: rgba(11, 107, 203, 0.32);
  color: #073763;
}

.qs-billing-confirm__actions .qs-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .qs-billing-self-head,
  .qs-billing-invoice-item {
    grid-template-columns: 1fr;
  }

  .qs-billing-self-head {
    align-items: stretch;
  }

  .qs-billing-invoice-meta,
  .qs-billing-invoice-actions {
    justify-items: start;
    justify-content: flex-start;
  }

  .qs-billing-self-head .qs-btn,
  .qs-billing-invoice-actions .qs-btn,
  .qs-billing-self-actions .qs-btn {
    width: 100%;
  }

  .qs-billing-self-actions {
    justify-content: stretch;
  }
}


.qs-plan-start-note {
  margin: 12px auto 0;
  max-width: min(920px, 100%);
  padding: 12px 14px;
  border-radius: 15px;
  border: 1px solid rgba(11, 107, 203, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: var(--qs-text);
  font-weight: 760;
  line-height: 1.45;
}

.qs-plan-start-note strong {
  font-weight: 1000;
}

.qs-plan-start-note a {
  color: var(--qs-primary);
  font-weight: 1000;
  text-decoration: none;
}

.qs-plan-start-note a:hover,
.qs-plan-start-note a:focus-visible {
  text-decoration: underline;
}

.qs-plan-start-note--muted {
  color: var(--qs-muted);
}


/* Billing checkout stage: when a payment starts on /plan, render a calm
   in-page checkout screen instead of appending a large block below the catalog. */
body.qs-billing-payment-mode .qs-plan-hero,
body.qs-billing-payment-mode #qsPlanGrid,
body.qs-billing-payment-mode .qs-trust,
body.qs-billing-payment-mode .qs-plan-policy-note {
  display: none !important;
}

body.qs-billing-payment-mode .qs-plan-container {
  max-width: 1040px;
}

body.qs-billing-payment-mode .qs-plan-compare {
  padding: clamp(14px, 3vh, 28px) 0 clamp(22px, 5vh, 46px);
}

body.qs-billing-payment-mode .qs-billing-payment-panel {
  display: block;
  width: min(920px, 100%);
  margin: 0 auto;
  min-height: auto;
  border-radius: 24px;
  border: 1px solid rgba(36, 111, 166, .18);
  box-shadow: 0 18px 54px rgba(14, 52, 86, .12);
  background: #fff;
  padding: clamp(18px, 2.7vw, 30px);
}

body.qs-billing-payment-mode .qs-billing-payment-panel::before {
  height: 4px;
  margin: calc(-1 * clamp(18px, 2.7vw, 30px)) calc(-1 * clamp(18px, 2.7vw, 30px)) clamp(18px, 2.2vw, 24px);
  border-radius: 24px 24px 0 0;
}

body.qs-billing-payment-mode .qs-billing-payment-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

body.qs-billing-payment-mode .qs-billing-payment-copy {
  max-width: 760px;
}

body.qs-billing-payment-mode .qs-billing-payment-copy h2 {
  max-width: 760px;
  margin-top: 10px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

body.qs-billing-payment-mode .qs-billing-payment-copy p {
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 800;
}

body.qs-billing-payment-mode .qs-billing-payment-detail {
  max-width: 720px;
  font-size: .96rem;
  font-weight: 760;
}

body.qs-billing-payment-mode .qs-billing-payment-actions {
  justify-content: flex-start;
  gap: 10px;
}

body.qs-billing-payment-mode .qs-billing-payment-actions .qs-btn {
  min-height: 42px;
}

body.qs-billing-payment-mode .qs-billing-payment-mount-wrap {
  max-width: 640px;
  margin: 18px auto 0;
  border-radius: 20px;
}

body.qs-billing-payment-mode .qs-billing-payment-footnote {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

body.qs-billing-payment-mode .qs-billing-payment-panel[data-state="error"] {
  border-color: rgba(185, 28, 28, .18);
  background:
    linear-gradient(180deg, rgba(255, 251, 250, .96), #fff 42%),
    #fff;
}

body.qs-billing-payment-mode .qs-billing-payment-panel[data-state="error"] .qs-billing-payment-shell,
body.qs-billing-payment-mode .qs-billing-payment-panel[data-state="complete"] .qs-billing-payment-shell {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

body.qs-billing-payment-mode .qs-billing-payment-panel[data-state="error"] .qs-billing-payment-actions,
body.qs-billing-payment-mode .qs-billing-payment-panel[data-state="complete"] .qs-billing-payment-actions {
  justify-content: flex-start;
}

@media (max-width: 760px) {
  body.qs-billing-payment-mode .qs-plan-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  body.qs-billing-payment-mode .qs-billing-payment-panel {
    width: 100%;
    border-radius: 20px;
    padding: 16px;
  }

  body.qs-billing-payment-mode .qs-billing-payment-panel::before {
    margin: -16px -16px 16px;
    border-radius: 20px 20px 0 0;
  }

  body.qs-billing-payment-mode .qs-billing-payment-actions {
    justify-content: stretch;
  }

  body.qs-billing-payment-mode .qs-billing-payment-actions .qs-btn {
    width: 100%;
  }

  body.qs-billing-payment-mode .qs-billing-payment-copy h2 {
    font-size: clamp(1.45rem, 8vw, 2rem);
  }

  body.qs-billing-payment-mode .qs-billing-payment-mount {
    min-height: 430px;
  }
}



/* Billing checkout stage polish: force a full-width, readable single-screen layout. */
body.qs-billing-payment-mode #qsBillingPaymentPanel.qs-billing-payment-panel {
  width: min(880px, calc(100vw - 32px)) !important;
  max-width: 880px !important;
  margin: clamp(18px, 4vh, 42px) auto !important;
  padding: clamp(20px, 3vw, 34px) !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-shell {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 18px !important;
  width: 100% !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-copy {
  order: 1 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-actions {
  order: 2 !important;
  width: 100% !important;
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 10px !important;
  margin-top: 2px !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-copy h2,
body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-copy p,
body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-detail {
  max-width: 740px !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  hyphens: none !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-copy h2 {
  font-size: clamp(1.55rem, 3vw, 2.25rem) !important;
  line-height: 1.12 !important;
  margin: 8px 0 8px !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-mount-wrap,
body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-footnote {
  width: min(640px, 100%) !important;
  max-width: 640px !important;
}

@media (max-width: 760px) {
  body.qs-billing-payment-mode #qsBillingPaymentPanel.qs-billing-payment-panel {
    width: calc(100vw - 24px) !important;
    margin: 14px auto !important;
    padding: 16px !important;
  }

  body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-actions {
    align-items: stretch !important;
  }
}


/* ------------------------------------------------------------------------- */
/* Milestone 5: /my-plan CSS polish                                           */
/* Scope: visual spacing/card/CTA refinement only.                            */
/* ------------------------------------------------------------------------- */
body.qs-plan-page.qs-myplan-page .qs-myplan-grid {
  gap: clamp(16px, 2.4vw, 24px);
  align-items: start;
}

body.qs-plan-page.qs-myplan-page .qs-card {
  border-radius: 22px;
  border-color: rgba(5, 51, 90, 0.09);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(11, 42, 74, 0.085);
}

body.qs-plan-page.qs-myplan-page .qs-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 18px 18px 12px;
}

body.qs-plan-page.qs-myplan-page .qs-card-body {
  padding: 0 18px 18px;
}

body.qs-plan-page.qs-myplan-page .qs-card-title {
  font-size: 15px;
  line-height: 1.25;
}

body.qs-plan-page.qs-myplan-page .qs-card-subtitle {
  max-width: 68ch;
  line-height: 1.48;
}

body.qs-plan-page.qs-myplan-page .qs-card-pill,
body.qs-plan-page.qs-myplan-page .qs-mini-badge {
  justify-content: center;
  max-width: 100%;
  line-height: 1.25;
  text-align: center;
}

body.qs-plan-page.qs-myplan-page .qs-state-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(5, 51, 90, 0.08);
  background: rgba(248, 251, 255, 0.78);
}

body.qs-plan-page.qs-myplan-page .qs-state-strip .qs-mini-badge {
  min-height: 32px;
  padding: 7px 11px;
}

body.qs-plan-page.qs-myplan-page .qs-open-checkout-card {
  margin-top: 16px;
  border-radius: 22px;
}

body.qs-plan-page.qs-myplan-page .qs-open-checkout-card .qs-card-header {
  align-items: center;
}

body.qs-plan-page.qs-myplan-page .qs-open-checkout-badge {
  margin-left: 0;
  justify-self: end;
}

body.qs-plan-page.qs-myplan-page .qs-open-checkout-actions,
body.qs-plan-page.qs-myplan-page .qs-card-actions {
  gap: 10px;
  align-items: center;
}

body.qs-plan-page.qs-myplan-page .qs-open-checkout-actions .qs-btn,
body.qs-plan-page.qs-myplan-page .qs-card-actions .qs-btn {
  min-height: 44px;
  padding-inline: 14px;
  white-space: normal;
  text-align: center;
}

body.qs-plan-page.qs-myplan-page .qs-subscription-manager {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border-color: rgba(5, 51, 90, 0.09);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 32px rgba(5, 51, 90, 0.06);
}

body.qs-plan-page.qs-myplan-page .qs-subscription-manager-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

body.qs-plan-page.qs-myplan-page .qs-subscription-manager-head h2 {
  line-height: 1.18;
}

body.qs-plan-page.qs-myplan-page .qs-subscription-manager-head p {
  max-width: 72ch;
  line-height: 1.48;
}

body.qs-plan-page.qs-myplan-page .qs-subscription-manager-head .qs-mini-badge {
  justify-self: end;
  margin-top: 2px;
}

body.qs-plan-page.qs-myplan-page .qs-manager-grid {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
  align-items: stretch;
}

body.qs-plan-page.qs-myplan-page .qs-manager-tile {
  min-height: 94px;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: flex-start;
  gap: 13px;
  padding: 15px;
  border-radius: 18px;
  background: rgba(250, 253, 255, 0.98);
}

body.qs-plan-page.qs-myplan-page .qs-manager-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  margin-top: 1px;
}

body.qs-plan-page.qs-myplan-page .qs-manager-copy {
  gap: 5px;
}

body.qs-plan-page.qs-myplan-page .qs-manager-copy strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
}

body.qs-plan-page.qs-myplan-page .qs-manager-copy small {
  display: block;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

body.qs-plan-page.qs-myplan-page .qs-manager-tile.is-disabled,
body.qs-plan-page.qs-myplan-page .qs-manager-tile:disabled {
  background: rgba(246, 249, 252, 0.86);
}

body.qs-plan-page.qs-myplan-page .qs-manager-pending {
  margin-top: 14px;
  padding: 14px 15px;
  border-radius: 18px;
  gap: 14px;
}

body.qs-plan-page.qs-myplan-page .qs-manager-pending span {
  line-height: 1.45;
}

body.qs-plan-page.qs-myplan-page .qs-subscription-manager #qsBillingMsg,
body.qs-plan-page.qs-myplan-page .qs-subscription-manager .qs-plan-policy-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.5;
}

body.qs-plan-page.qs-myplan-page .qs-billing-self-panel {
  margin-top: 16px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
}

body.qs-plan-page.qs-myplan-page .qs-billing-self-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  margin-bottom: 16px;
}

body.qs-plan-page.qs-myplan-page .qs-billing-self-head h2 {
  line-height: 1.2;
}

body.qs-plan-page.qs-myplan-page .qs-billing-self-head p {
  max-width: 68ch;
}

body.qs-plan-page.qs-myplan-page .qs-billing-invoice-item {
  gap: 12px;
  padding: 15px;
  border-radius: 18px;
}

body.qs-plan-page.qs-myplan-page .qs-billing-invoice-actions .qs-btn,
body.qs-plan-page.qs-myplan-page .qs-billing-self-actions .qs-btn {
  white-space: normal;
  text-align: center;
}

body.qs-plan-page.qs-myplan-page .qs-card-actions--limits {
  gap: 10px;
  justify-content: flex-start;
}

@media (max-width: 860px) {
  body.qs-plan-page.qs-myplan-page .qs-manager-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.qs-plan-page.qs-myplan-page .qs-myplan-grid {
    margin-top: 14px;
    gap: 16px;
  }

  body.qs-plan-page.qs-myplan-page .qs-card-header,
  body.qs-plan-page.qs-myplan-page .qs-subscription-manager-head,
  body.qs-plan-page.qs-myplan-page .qs-billing-self-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body.qs-plan-page.qs-myplan-page .qs-card-pill,
  body.qs-plan-page.qs-myplan-page .qs-subscription-manager-head .qs-mini-badge,
  body.qs-plan-page.qs-myplan-page .qs-open-checkout-badge {
    justify-self: start;
    margin-left: 0;
  }

  body.qs-plan-page.qs-myplan-page .qs-state-strip {
    align-items: stretch;
  }

  body.qs-plan-page.qs-myplan-page .qs-state-strip .qs-mini-badge {
    width: 100%;
  }

  body.qs-plan-page.qs-myplan-page .qs-card-actions,
  body.qs-plan-page.qs-myplan-page .qs-open-checkout-actions,
  body.qs-plan-page.qs-myplan-page .qs-billing-self-actions,
  body.qs-plan-page.qs-myplan-page .qs-billing-invoice-actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
  }

  body.qs-plan-page.qs-myplan-page .qs-card-actions .qs-btn,
  body.qs-plan-page.qs-myplan-page .qs-open-checkout-actions .qs-btn,
  body.qs-plan-page.qs-myplan-page .qs-billing-self-actions .qs-btn,
  body.qs-plan-page.qs-myplan-page .qs-billing-invoice-actions .qs-btn {
    width: 100%;
  }

  body.qs-plan-page.qs-myplan-page .qs-subscription-manager {
    padding: 16px;
  }

  body.qs-plan-page.qs-myplan-page .qs-manager-tile {
    min-height: auto;
    padding: 14px;
  }

  body.qs-plan-page.qs-myplan-page .qs-manager-pending {
    flex-direction: column;
    align-items: stretch;
  }

  body.qs-plan-page.qs-myplan-page .qs-manager-pending .qs-btn {
    width: 100%;
  }

  body.qs-plan-page.qs-myplan-page .qs-billing-invoice-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  body.qs-plan-page.qs-myplan-page .qs-billing-invoice-meta,
  body.qs-plan-page.qs-myplan-page .qs-billing-invoice-actions {
    justify-items: start;
    justify-content: stretch;
  }
}

@media (max-width: 460px) {
  body.qs-plan-page.qs-myplan-page .qs-card-header,
  body.qs-plan-page.qs-myplan-page .qs-card-body,
  body.qs-plan-page.qs-myplan-page .qs-subscription-manager,
  body.qs-plan-page.qs-myplan-page .qs-billing-self-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  body.qs-plan-page.qs-myplan-page .qs-manager-tile {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 11px;
  }

  body.qs-plan-page.qs-myplan-page .qs-manager-icon {
    width: 36px;
    height: 36px;
  }
}


/* Billing Payment Element — Checkout-like custom layout on /plan. */
body.qs-billing-payment-mode #qsBillingPaymentPanel.qs-billing-payment-panel{
  width: min(900px, calc(100vw - 32px)) !important;
  max-width: 900px !important;
  margin: clamp(18px, 4vh, 42px) auto !important;
  padding: clamp(16px, 2.4vw, 22px) !important;
  border-radius: clamp(20px, 2.6vw, 26px) !important;
  border: 1px solid rgba(0, 51, 102, 0.12) !important;
  background:
    radial-gradient(circle at 12% 8%, rgba(0,148,255,0.10), transparent 34%),
    linear-gradient(180deg, rgba(240,247,255,0.96) 0%, rgba(255,255,255,0.98) 100%) !important;
  box-shadow: 0 18px 38px rgba(13, 31, 54, 0.08) !important;
  overflow: visible !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel::before,
body.qs-billing-payment-mode #qsBillingPaymentPanel::after{
  content: none !important;
  display: none !important;
}

.qs-billing-payment-head{
  margin-bottom: 14px;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-copy h2{
  margin: 6px 0 6px !important;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.025em !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-copy p{
  max-width: 680px !important;
  color: var(--qs-muted);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.45;
}

.qs-billing-payment-grid{
  display: grid;
  grid-template-columns: minmax(230px, 0.82fr) minmax(330px, 1.18fr);
  gap: clamp(14px, 2.4vw, 22px);
  align-items: start;
}

.qs-billing-payment-summary{
  border-radius: 22px;
  border: 1px solid rgba(0, 51, 102, 0.10);
  background: linear-gradient(180deg, rgba(240, 247, 255, 0.95), rgba(255, 255, 255, 0.96));
  padding: 14px;
  color: var(--qs-primary);
}

.qs-billing-payment-summary-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 51, 102, 0.08);
}

.qs-billing-payment-summary-kicker{
  display: block;
  color: var(--qs-muted);
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.qs-billing-payment-summary-head strong{
  display: block;
  margin-top: 3px;
  font-size: 1.15rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.qs-billing-payment-amount{
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 14px;
  background: rgba(0, 51, 102, 0.07);
  border: 1px solid rgba(0, 51, 102, 0.11);
  color: var(--qs-primary);
  font-weight: 950;
  white-space: nowrap;
}

.qs-billing-payment-summary-lines{
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 51, 102, 0.08);
}

.qs-billing-payment-summary-line{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--qs-muted);
  font-weight: 850;
  font-size: 0.92rem;
}

.qs-billing-payment-summary-line strong{
  color: var(--qs-primary);
  white-space: nowrap;
}

.qs-billing-payment-summary-features{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.qs-billing-payment-summary-features[hidden]{
  display: none !important;
}

.qs-billing-payment-summary-features li{
  position: relative;
  padding-left: 18px;
  color: var(--qs-primary);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.qs-billing-payment-summary-features li::before{
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #1688d8;
  font-weight: 950;
}

.qs-billing-payment-summary-note{
  margin: 12px 0 0;
  color: var(--qs-muted);
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 750;
}

.qs-billing-payment-method{
  min-width: 0;
}

.qs-billing-payment-method-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--qs-primary);
}

.qs-billing-payment-method-head strong{
  font-size: 1.05rem;
  font-weight: 950;
}

.qs-billing-payment-method-head span{
  color: var(--qs-muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.qs-billing-country--payment{
  margin-bottom: 12px;
}

.qs-billing-country--payment .qs-billing-country-button{
  appearance: none;
  -webkit-appearance: none;
  min-height: 46px;
  border-radius: 15px;
  color: var(--qs-primary);
}

.qs-billing-country--payment .qs-billing-country-caret{
  width: 0;
  height: 0;
  border: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  opacity: 0.76;
  transform: none;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.qs-billing-country--payment .qs-billing-country-button[aria-expanded="true"] .qs-billing-country-caret{
  transform: rotate(180deg);
  opacity: 1;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-mount-wrap{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: clamp(10px, 1.8vw, 14px) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(0, 51, 102, 0.10) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 20px 46px rgba(0, 51, 102, 0.08) !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-mount{
  min-height: 180px !important;
}

.qs-billing-payment-panel[data-state="ready"] .qs-billing-payment-mount{
  min-height: 178px !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-footnote{
  width: 100% !important;
  max-width: none !important;
  margin: 12px 0 0 !important;
  padding: 11px 13px;
  border-radius: 15px;
  border: 1px solid rgba(0, 51, 102, 0.10);
  background: rgba(0, 51, 102, 0.045);
  color: var(--qs-muted);
  font-weight: 800;
  line-height: 1.42;
  font-size: 0.91rem;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-actions{
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 14px !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-actions .qs-btn{
  min-height: 44px;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-actions .qs-btn-primary{
  min-width: 220px;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel .js-qs-billing-payment-hosted[hidden],
body.qs-billing-payment-mode #qsBillingPaymentPanel .js-qs-billing-payment-retry[hidden],
body.qs-billing-payment-mode #qsBillingPaymentPanel .js-qs-billing-payment-submit[hidden],
body.qs-billing-payment-mode #qsBillingPaymentPanel .js-qs-billing-payment-close[hidden]{
  display: none !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel[data-state="error"]{
  max-width: 760px !important;
  border-color: rgba(174, 83, 0, 0.22) !important;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf3 100%) !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel[data-state="error"] .qs-billing-payment-grid{
  grid-template-columns: 1fr;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel[data-state="error"] .qs-billing-payment-summary,
body.qs-billing-payment-mode #qsBillingPaymentPanel[data-state="error"] .qs-billing-payment-method-head,
body.qs-billing-payment-mode #qsBillingPaymentPanel[data-state="error"] .qs-billing-country--payment{
  display: none !important;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel[data-state="error"] .qs-billing-payment-detail{
  display: block;
  margin-top: 12px !important;
  padding: 12px 14px;
  border: 1px solid rgba(174, 83, 0, 0.16);
  border-radius: 16px;
  background: rgba(255, 178, 0, 0.08);
  color: #5e4307 !important;
  font-size: 0.93rem;
  font-weight: 800;
}

body.qs-billing-payment-mode #qsBillingPaymentPanel[data-state="error"] .qs-billing-payment-mount-wrap{
  display: none !important;
}

@media (max-width: 860px){
  .qs-billing-payment-grid{
    grid-template-columns: 1fr;
  }

  .qs-billing-payment-summary{
    order: 1;
  }

  .qs-billing-payment-method{
    order: 2;
  }
}

@media (max-width: 720px){
  body.qs-billing-payment-mode #qsBillingPaymentPanel.qs-billing-payment-panel{
    width: calc(100vw - 24px) !important;
    margin: 14px auto !important;
    padding: 14px !important;
    border-radius: 20px !important;
  }

  .qs-billing-payment-summary-head,
  .qs-billing-payment-method-head{
    flex-direction: column;
    gap: 6px;
  }

  .qs-billing-payment-amount{
    width: 100%;
    text-align: center;
  }

  body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-actions{
    flex-direction: column;
    align-items: stretch !important;
  }

  body.qs-billing-payment-mode #qsBillingPaymentPanel .qs-billing-payment-actions .qs-btn{
    width: 100%;
    min-width: 0;
  }
}
