/**
 * IOPA Frontend Design System
 *
 * Tokens grounded in the Teal design system, tuned for a financial-news
 * editorial feel (Repubblica / Sole24Ore inspired hierarchy).
 *
 * All CSS variables scoped under .iopa to avoid collision with admin tokens.
 *
 * @package IOPA
 */

/* ── 1. Design tokens ── */
.iopa {
  --teal-900: #0E3559;
  --teal-800: #134F82;
  --teal-700: #1B5FA8;
  --teal-600: #1F70BF;
  --teal-500: #4A8FCF;
  --teal-400: #77AEDE;
  --teal-300: #A6C9EA;
  --teal-200: #C8DDF1;
  --teal-100: #E2EDF7;
  --teal-50:  #F0F6FC;

  --ink:      #000000;
  --ink-2:    #1A1A1A;
  --ink-3:    #555555;
  --ink-4:    #888888;
  --line:     #E3E6E5;
  --line-2:   #EDEFEE;
  --paper:    #FAFAF7;
  --paper-2:  #F4F2EC;
  --white:    #FFFFFF;

  --gold:     #B8853A;
  --gold-2:   #E5BB6B;
  --red:      #C7282E;
  --green:    #1F70BF;
  --orange:   #E07A1A;
  --blue:     #1F5FAD;

  --bg:       #FFFFFF;
  --bg-soft:  var(--teal-50);
  --bg-paper: var(--paper);

  --font-serif: "PT Serif", Georgia, "Times New Roman", serif;
  --font-sans:  "PT Sans", -apple-system, Helvetica, Arial, sans-serif;
  --font-display: Arial, Helvetica, sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(14,53,89,0.06);
  --sh-2: 0 4px 14px rgba(14,53,89,0.08);
  --sh-3: 0 12px 32px rgba(14,53,89,0.12);

  /* Extended palette */
  --teal-950:  #0B2C49;
  --teal-900-hover: #08243D;

  /* Chip backgrounds */
  --chip-gold-bg: #FBF1DD;
  --chip-red-bg:  #FBE5E6;
  --chip-blue-bg: #E5EDF8;
  --chip-featured-text: #7A4F1B;

  /* Success state */
  --success-bg:    #E8F5E9;
  --success-color:  #2E7D32;

  /* Paywall */
  --pw-border:          #9aa6b8;
  --pw-shadow:          0 2px 6px rgba(14,44,77,0.20), 0 1px 2px rgba(14,44,77,0.12);
  --pw-secondary-text:  #6b7480;
  --pw-footer-text:     #6e6456;
  --pw-benefit-text:    #1c2632;
  --pw-radio-border:    #c2c8d0;

  /* Overlays (on dark backgrounds) */
  --overlay-light:   rgba(255,255,255,0.16);
  --overlay-subtle:  rgba(255,255,255,0.10);
  --text-on-dark:    rgba(255,255,255,0.82);
  --text-on-dark-2:  rgba(255,255,255,0.6);
  --text-on-dark-3:  rgba(255,255,255,0.5);

  /* Gold button */
  --sh-gold: 0 1px 0 rgba(255,255,255,0.18) inset, 0 4px 12px rgba(184,133,58,0.28);
  --focus-ring: 0 0 0 3px rgba(31,112,191,0.15);

  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
}

/* ── 2. Reset for .iopa namespace ── */
.iopa * { box-sizing: border-box; }
.iopa a { color: inherit; text-decoration: none; }
.iopa button {
  font: inherit; color: inherit; background: none;
  border: 0; padding: 0; cursor: pointer;
}
.iopa h1, .iopa h2, .iopa h3, .iopa h4 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
.iopa p { margin: 0; }
.iopa img { max-width: 100%; height: auto; }

/* ── 3. Typography utilities ── */
.iopa .eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--red);
}
.iopa .kicker {
  font-family: var(--font-display);
  font-weight: 800; letter-spacing: -0.02em;
}
.iopa .serif { font-family: var(--font-serif); }
.iopa .display { font-family: var(--font-display); }

/* ── 4. Buttons ── */
.iopa .btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-weight: 600; font-size: 15px;
  font-family: var(--font-sans);
  transition: background .18s, transform .12s, box-shadow .18s;
  white-space: nowrap;
}
.iopa .btn-primary {
  background: var(--teal-700);
  color: var(--white);
}
.iopa .btn-primary:hover { background: var(--teal-800); }
.iopa .btn-primary:active { transform: scale(0.99); }
.iopa .btn-dark {
  background: var(--teal-900);
  color: var(--white);
}
.iopa .btn-dark:hover { background: var(--teal-900-hover); }
.iopa .btn-gold {
  background: linear-gradient(180deg, var(--gold-2) 0%, var(--gold) 100%);
  color: var(--white);
  box-shadow: var(--sh-gold);
}
.iopa .btn-outline {
  background: transparent;
  color: var(--teal-800);
  box-shadow: inset 0 0 0 1.5px var(--teal-700);
}
.iopa .btn-outline:hover { background: var(--teal-50); }
.iopa .btn-ghost {
  color: var(--ink-3);
}
.iopa .btn-ghost:hover { color: var(--ink); }
.iopa .btn-plan {
  background: var(--plan-cta-bg, var(--teal-700));
  color: var(--white);
}
.iopa .btn-plan:hover { background: var(--plan-cta-hover, var(--teal-800)); }
.iopa .btn-block { width: 100%; }
.iopa .btn-lg { padding: 15px 22px; font-size: 16px; }
.iopa .btn-sm { padding: 8px 12px; font-size: 13px; border-radius: var(--r-sm); }

/* ── 5. Form fields ── */
.iopa .field { display: block; margin-bottom: 14px; }
.iopa .field-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--ink-3); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.iopa .field-input,
.iopa .field-select {
  width: 100%; padding: 13px 14px;
  border-radius: var(--r-md);
  background: var(--white);
  font: inherit; font-size: 15px;
  color: var(--ink);
  border: 1.5px solid var(--line);
  transition: border-color .15s, box-shadow .15s;
}
.iopa .field-input:focus,
.iopa .field-select:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: var(--focus-ring);
}
.iopa .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.iopa .field-help { font-size: 12px; color: var(--ink-4); margin-top: 5px; }

/* ── 6. Chips & badges ── */
.iopa .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.iopa .chip-teal { background: var(--teal-100); color: var(--teal-800); }
.iopa .chip-gold { background: var(--chip-gold-bg); color: var(--gold); }
.iopa .chip-red  { background: var(--chip-red-bg); color: var(--red); }
.iopa .chip-blue { background: var(--chip-blue-bg); color: var(--blue); }
.iopa .chip-dark { background: var(--teal-900); color: var(--white); }

/* ── 7. Cards & surfaces ── */
.iopa .card-soft {
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  padding: 16px;
}

.iopa .plan {
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  background: var(--white);
  position: relative;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.iopa .plan.is-selected {
  border-color: var(--teal-700);
  box-shadow: var(--focus-ring);
}
.iopa .plan.is-popular {
  border-color: var(--plan-accent, var(--gold));
  transform: translateY(-4px);
}

.iopa .plan-hero {
  padding: 20px 16px;
  color: var(--white);
  margin: -18px -18px 16px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--plan-gradient, linear-gradient(160deg, var(--teal-700) 0%, var(--teal-900) 100%));
  border-bottom: var(--plan-hero-border, none);
}
.iopa .plan-hero-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--overlay-light);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--r-md);
  margin-bottom: 10px;
}

/* ── 8. Feature lists ── */
.iopa .feat-list { list-style: none; padding: 0; margin: 12px 0 0; }
.iopa .feat-list li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 6px 0;
  font-size: 14px;
  color: var(--ink-2);
}
.iopa .feat-list li svg { flex: 0 0 auto; margin-top: 2px; color: var(--plan-feat-color, var(--teal-700)); }

/* ── 9. Toggles, tabs, dividers ── */
.iopa .toggle {
  display: inline-flex; padding: 4px;
  background: var(--teal-50);
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
}
.iopa .toggle button {
  padding: 8px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-3);
  border-radius: var(--r-pill);
  transition: background .18s, color .18s;
  position: relative;
}
.iopa .toggle button.is-active {
  background: var(--teal-900); color: var(--white);
}
.iopa .toggle .save-tag {
  position: absolute;
  top: -10px; right: -8px;
  font-size: 9px; font-weight: 800;
  background: var(--gold);
  color: var(--white);
  padding: 2px 6px; border-radius: var(--r-pill);
  letter-spacing: 0.05em;
}

.iopa .tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  background: var(--white);
}
.iopa .tab {
  flex: 1; padding: 14px 0;
  text-align: center; font-size: 13px; font-weight: 600;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.iopa .tab.is-active { color: var(--teal-800); border-bottom-color: var(--teal-700); }

.iopa .divider { height: 1px; background: var(--line); margin: 16px 0; }
.iopa .divider-thick { height: 1px; background: var(--ink); }

/* ── 10. Avatars ── */
.iopa .avatar {
  width: 44px; height: 44px; border-radius: var(--r-pill);
  background: var(--teal-200); color: var(--teal-800);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  flex: 0 0 auto;
}

/* ── 11. Progress indicators ── */
.iopa .dots { display: flex; gap: 6px; justify-content: center; padding: 12px 0; }
.iopa .dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--line);
}
.iopa .dots .on { background: var(--teal-700); width: 18px; border-radius: 3px; }

.iopa .progress-bar {
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.iopa .progress-bar-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: var(--teal-700);
  border-radius: 2px;
  transition: width .3s ease;
}

.iopa .stat-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--ink-2);
}
.iopa .stat-row svg { color: var(--teal-700); flex: 0 0 auto; }

/* ── 12. Page: Pricing ── */
.iopa .plan-carousel {
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 16px;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 16px;
}
.iopa .plan-carousel::-webkit-scrollbar { display: none; }
.iopa .plan-carousel .plan {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

.iopa .pricing-hero {
  background: var(--white);
  color: var(--ink);
  padding: 32px 16px 48px;
  text-align: center;
}
.iopa .pricing-hero h1 {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.iopa .pricing-hero h1 .accent { color: var(--teal-700); }
.iopa .pricing-hero p {
  font-size: 15px; color: var(--ink-3);
  max-width: 400px; margin: 0 auto;
}

.iopa .benefits-section {
  padding: 32px 16px;
  background: var(--bg-soft);
}

/* ── 13. Page: Checkout ── */
.iopa .plan-recap-card {
  color: var(--white);
  padding: 18px;
  border-radius: var(--r-lg);
  margin: 14px 16px 0;
  position: relative;
}

.iopa .checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 16px;
}
.iopa .checkout-main { min-width: 0; }

.iopa .step-done {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border-radius: var(--r-md);
  font-size: 14px; color: var(--ink-2);
}
.iopa .step-done-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--success-bg); color: var(--success-color);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}

.iopa .payment-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.iopa .payment-tile {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  padding: 16px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  font-size: 12px; font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.iopa .payment-tile:hover {
  border-color: var(--teal-400);
}
.iopa .payment-tile.is-selected {
  border-color: var(--teal-700);
  box-shadow: var(--focus-ring);
  color: var(--teal-800);
}

.iopa .order-recap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}
.iopa .order-recap-row {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  font-size: 14px; color: var(--ink-2);
}
.iopa .order-recap-total {
  display: flex; justify-content: space-between;
  padding: 12px 0 0;
  font-size: 16px; font-weight: 700; color: var(--ink);
}

.iopa .promo-row { margin-bottom: 16px; }
.iopa .promo-row .field-label { margin-bottom: 6px; display: block; }
.iopa .promo-row .promo-input-row { display: flex; gap: 8px; }
.iopa .promo-row .field-input { flex: 1; }

.iopa .recap-plan-name { font-weight: 800; font-size: 18px; }
.iopa .recap-billing { font-size: 12px; opacity: 0.85; }

.iopa .text-sm-tertiary { font-size: 13px; color: var(--ink-3); }
.iopa .text-md-danger { color: var(--red); font-size: 14px; }

/* ── 14. Page: Confirmation ── */
.iopa .confirmation-hero {
  text-align: center;
  padding: 40px 16px 32px;
  background: linear-gradient(180deg, var(--teal-50) 0%, var(--white) 100%);
}
.iopa .confirmation-icon {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--teal-700);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: var(--sh-3);
}

.iopa .receipt-card {
  border: 2px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  margin: 0 16px;
}
.iopa .receipt-row {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.iopa .receipt-row-label { color: var(--ink-3); }
.iopa .receipt-row-value { font-weight: 600; color: var(--ink); }

.iopa .unlocked-list {
  padding: 24px 16px;
}
.iopa .unlocked-item {
  display: flex; gap: 14px; align-items: center;
  padding: 10px 0;
}
.iopa .unlocked-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--teal-100); color: var(--teal-700);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}

/* ── 15. Page: Profile dashboard ── */
.iopa .profile-hero {
  background: var(--teal-900);
  color: var(--white);
  padding: 24px 16px;
}
.iopa .profile-hero .avatar {
  width: 56px; height: 56px;
  font-size: 20px;
  background: var(--teal-700);
  color: var(--white);
  margin-bottom: 12px;
}
.iopa .profile-hero h2 {
  font-size: 22px; font-weight: 700;
  margin-bottom: 4px;
}
.iopa .profile-hero p {
  font-size: 13px; color: var(--text-on-dark-2);
}

.iopa .profile-stats {
  display: flex; gap: 24px;
  margin-top: 16px;
}
.iopa .profile-stat {
  text-align: center;
}
.iopa .profile-stat-value {
  font-size: 22px; font-weight: 700;
  font-family: var(--font-display);
}
.iopa .profile-stat-label {
  font-size: 11px; color: var(--text-on-dark-3);
  text-transform: uppercase; letter-spacing: 0.06em;
}

.iopa .profile-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.iopa .profile-nav {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.iopa .profile-nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 14px 16px;
  font-size: 15px; font-weight: 500;
  color: var(--ink-2);
  border: none; background: none;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.iopa .profile-nav-item:hover { background: var(--teal-50); }
.iopa .profile-nav-item.is-active {
  background: var(--teal-100);
  color: var(--teal-800);
  font-weight: 700;
}
.iopa .profile-nav-item svg { color: var(--ink-4); flex: 0 0 auto; }
.iopa .profile-nav-item.is-active svg { color: var(--teal-700); }

.iopa .profile-section {
  display: none;
  padding: 16px;
}
.iopa .profile-section.is-visible { display: block; }

.iopa .subscription-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
}
.iopa .subscription-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}

.iopa .upsell-card {
  background: linear-gradient(135deg, var(--teal-50) 0%, var(--chip-gold-bg) 100%);
  border: 1px solid var(--gold-2);
  border-radius: var(--r-lg);
  padding: 20px;
  text-align: center;
  margin-top: 16px;
}

/* ── 16. Page: Edit profile ── */
.iopa .billing-type-toggle {
  display: inline-flex; padding: 3px;
  background: var(--teal-50);
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.iopa .billing-type-toggle button {
  padding: 8px 14px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-3);
  border-radius: var(--r-pill);
  transition: background .18s, color .18s;
}
.iopa .billing-type-toggle button.is-active {
  background: var(--teal-900); color: var(--white);
}

.iopa .billing-fields { display: none; }
.iopa .billing-fields.is-visible { display: block; }

.iopa .avatar-upload {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.iopa .avatar-upload .avatar {
  width: 80px; height: 80px;
  font-size: 28px;
}

/* ── 17. Page: Paywall ── */
.iopa .article-fade {
  position: relative;
  height: 120px;
  margin-top: -20px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--white) 80%);
  pointer-events: none;
}

.iopa-paywall-teaser { position: relative; }
.iopa-teaser-block { /* inherits prose styles from the theme */ }
.iopa-teaser-fade {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 0%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 0%, transparent 100%);
  position: relative;
}
@supports not ((-webkit-mask-image: linear-gradient(#000, transparent)) or (mask-image: linear-gradient(#000, transparent))) {
  .iopa-teaser-fade::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 100%);
    pointer-events: none;
  }
}

.iopa.iopa-paywall {
  font-family: var(--font-sans);
  color: var(--ink-2);
}
.iopa.iopa-paywall .paywall {
  margin: 14px 12px 22px;
  border: 1.5px solid var(--pw-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--pw-shadow);
}

/* Hero */
.iopa.iopa-paywall .pw-hero {
  background: var(--pw-hero);
  color: var(--white);
  padding: 18px 18px 24px;
  border-bottom: var(--pw-hero-border);
  position: relative;
}
.iopa.iopa-paywall .kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--white); margin-bottom: 11px;
}
.iopa.iopa-paywall .kicker .crown { width: 16px; height: 16px; color: var(--pw-accent); display: inline-flex; }
.iopa.iopa-paywall .kicker .crown svg { width: 16px; height: 16px; }
.iopa.iopa-paywall .pw-hero h2 {
  font-family: var(--font-serif);
  font-weight: 700; font-size: 25px; line-height: 1.16;
  letter-spacing: -0.02em; margin: 0 0 8px; max-width: 100%;
  text-align: left; color: var(--white);
}
.iopa.iopa-paywall .pw-hero h2 .gold { color: var(--pw-headline); display: block; }
.iopa.iopa-paywall .pw-hero h2 .line2 { display: block; max-width: 62%; color: var(--white); }
.iopa.iopa-paywall .pw-sub { font-size: 14.5px; color: var(--pw-sub-color); max-width: 60%; }

/* Accedi block */
.iopa.iopa-paywall .accedi-block {
  position: absolute; right: 22px; bottom: 22px; text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 7px;
}
.iopa.iopa-paywall .abbonato-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--pw-abb-label);
}
.iopa.iopa-paywall .accedi-btn {
  background: transparent; color: var(--pw-accent);
  border: 1.5px solid var(--pw-accedi-border);
  border-radius: 8px; padding: 6px 16px; font-family: inherit;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.15s; text-decoration: none;
}
.iopa.iopa-paywall .accedi-btn:hover {
  background: var(--pw-accent-strong); color: var(--pw-accedi-hover-color);
  border-color: var(--pw-accent-strong);
}

/* Plans section */
.iopa.iopa-paywall .pw-plans {
  background: var(--pw-plans-bg);
  padding: 18px 12px 20px;
}
.iopa.iopa-paywall .plans {
  display: flex; flex-direction: column; gap: 16px;
}

/* Plan card */
.iopa.iopa-paywall .plan {
  border-radius: 12px; cursor: pointer; position: relative;
  transition: all 0.18s; background: var(--white);
  border: 1.5px solid var(--pw-plan-border);
  display: block;
}
.iopa.iopa-paywall .plan input { position: absolute; opacity: 0; pointer-events: none; }
.iopa.iopa-paywall .plan.selected {
  border: 2px solid var(--pw-sel-border);
  box-shadow: var(--pw-sel-shadow);
}

/* Plan body grid */
.iopa.iopa-paywall .plan-body {
  display: grid; grid-template-columns: 20px 1fr auto;
  align-items: center; gap: 10px; padding: 13px;
}
.iopa.iopa-paywall .plan.selected .plan-body { padding: 12.5px 12px; }

/* Radio */
.iopa.iopa-paywall .radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--pw-radio-border); background: var(--white);
  position: relative; transition: all 0.16s;
  display: block;
}
.iopa.iopa-paywall .radio::after {
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  background: var(--pw-dot); transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.iopa.iopa-paywall .plan.selected .radio { border-color: var(--pw-radio-sel); }
.iopa.iopa-paywall .plan.selected .radio::after { background: var(--pw-dot-sel); transform: scale(1); }

/* Plan name & price */
.iopa.iopa-paywall .plan-name {
  font-size: 18px; font-weight: 700; color: var(--pw-name);
  letter-spacing: -0.01em;
}
.iopa.iopa-paywall .price { text-align: right; min-width: 0; }
.iopa.iopa-paywall .price .amount {
  font-size: 21px; font-weight: 800; color: var(--pw-name);
  letter-spacing: -0.02em; line-height: 1; display: block; white-space: nowrap;
}
.iopa.iopa-paywall .price .per {
  display: block; font-size: 12px; color: var(--pw-secondary-text); margin-top: 3px;
}

/* Annual plan extras */
.iopa.iopa-paywall .annual-left { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.iopa.iopa-paywall .annual-left .plan-name { line-height: 1.05; }
.iopa.iopa-paywall .annual-sub { font-size: 12px; color: var(--pw-secondary-text); white-space: nowrap; }
.iopa.iopa-paywall .annual-right { display: flex; align-items: center; gap: 8px; }
.iopa.iopa-paywall .discount-pill {
  background: var(--pw-pill-bg); color: var(--pw-pill-color);
  border: 1px solid var(--pw-pill-border);
  font-size: 12px; font-weight: 800; padding: 4px 8px;
  border-radius: 100px; white-space: nowrap;
  box-shadow: var(--pw-pill-shadow, none);
}
.iopa.iopa-paywall .annual-price { text-align: right; }
.iopa.iopa-paywall .annual-price .amount {
  font-size: 21px; font-weight: 800; color: var(--pw-name);
  letter-spacing: -0.025em; line-height: 1; display: block; white-space: nowrap;
}
.iopa.iopa-paywall .annual-price .per {
  display: block; font-size: 12px; color: var(--pw-secondary-text); margin-top: 3px;
}

/* Best tab */
.iopa.iopa-paywall .best-tab {
  position: absolute; top: -12px; left: 16px;
  background: var(--pw-tab-bg); color: var(--pw-tab-color);
  font-size: 12px; font-weight: 800; padding: 4px 13px;
  border-radius: 100px; z-index: 2; white-space: nowrap;
  letter-spacing: 0.01em;
  box-shadow: var(--pw-tab-shadow, none);
}

/* CTA button */
.iopa.iopa-paywall .pw-cta {
  width: 100%; background: var(--pw-cta-bg); color: var(--white);
  font-family: inherit; font-size: 19px; font-weight: 700;
  padding: 16px; border: none; border-radius: 12px;
  cursor: pointer; margin-top: 18px; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: var(--pw-cta-shadow, none);
  text-decoration: none;
}
.iopa.iopa-paywall .pw-cta:hover {
  background: var(--pw-cta-hover);
  box-shadow: var(--pw-cta-hover-shadow, none);
}
.iopa.iopa-paywall .pw-cta svg { width: 19px; height: 19px; transition: transform 0.15s; }
.iopa.iopa-paywall .pw-cta:hover svg { transform: translateX(3px); }

/* Recess note */
.iopa.iopa-paywall .recess-note {
  margin-top: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--pw-recess-bg); border: 1px solid var(--pw-recess-border);
  border-radius: 10px; padding: 12px 14px;
  font-size: 14px; font-weight: 600; color: var(--pw-recess-color);
}
.iopa.iopa-paywall .recess-note svg { width: 17px; height: 17px; color: var(--pw-accent-strong); flex-shrink: 0; }
.iopa.iopa-paywall .pw-foot {
  text-align: center; margin-top: 11px;
  font-size: 14px; color: var(--pw-footer-text);
}
.iopa.iopa-paywall .pw-foot .sep { opacity: 0.55; margin: 0 5px; }

/* Benefits */
.iopa.iopa-paywall .pw-benefits { background: var(--white); padding: 18px 18px 22px; }
.iopa.iopa-paywall .benefit {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 0; font-size: 17px; color: var(--pw-benefit-text);
}
.iopa.iopa-paywall .benefit .ic {
  width: var(--pw-bic-size); height: var(--pw-bic-size);
  border-radius: 50%; background: var(--pw-bic-bg); color: var(--pw-bic-color);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.iopa.iopa-paywall .benefit .ic svg { width: var(--pw-bic-icon); height: var(--pw-bic-icon); }
.iopa.iopa-paywall .benefit strong { font-weight: 700; }

/* Desktop layout — text/padding improvements */
@media (min-width: 768px) {
  .iopa.iopa-paywall .paywall { max-width: 880px; margin: 22px auto 48px; border-radius: 20px; }
  .iopa.iopa-paywall .pw-hero { padding: 30px 36px 34px; }
  .iopa.iopa-paywall .accedi-block { right: 36px; bottom: 30px; }
  .iopa.iopa-paywall .pw-hero h2 { font-size: 34px; }
  .iopa.iopa-paywall .pw-hero h2 .line2 { max-width: 70%; }
  .iopa.iopa-paywall .pw-sub { font-size: 16px; max-width: 55%; }
  .iopa.iopa-paywall .pw-plans { padding: 28px 36px 32px; }
  .iopa.iopa-paywall .plan-body { grid-template-columns: 26px 1fr auto; gap: 16px; padding: 18px 22px; }
  .iopa.iopa-paywall .plan.selected .plan-body { padding: 17.5px 21px; }
  .iopa.iopa-paywall .radio { width: 22px; height: 22px; }
  .iopa.iopa-paywall .plan-name { font-size: 21px; }
  .iopa.iopa-paywall .price .amount,
  .iopa.iopa-paywall .annual-price .amount { font-size: 25px; }
  .iopa.iopa-paywall .price .per,
  .iopa.iopa-paywall .annual-price .per { font-size: 13px; }
  .iopa.iopa-paywall .annual-sub { font-size: 13px; }
  .iopa.iopa-paywall .annual-right { gap: 14px; }
  .iopa.iopa-paywall .discount-pill { font-size: 13.5px; padding: 5px 11px; }
  .iopa.iopa-paywall .pw-cta { font-size: 20px; }
  .iopa.iopa-paywall .pw-benefits { padding: 26px 36px 30px; }
}
/* Wide layout — side-by-side plans and 3-column benefits.
   Uses container query so it only triggers when the paywall card itself
   is wide enough, regardless of viewport width (articles have sidebars). */
.iopa.iopa-paywall .paywall { container-type: inline-size; }
@container (min-width: 700px) {
  .iopa.iopa-paywall .plans { flex-direction: row; gap: 18px; align-items: stretch; }
  .iopa.iopa-paywall .plan { flex: 1; display: flex; align-items: center; }
  .iopa.iopa-paywall .plan-body { width: 100%; }
  .iopa.iopa-paywall .pw-cta { max-width: 420px; margin-left: auto; margin-right: auto; }
  .iopa.iopa-paywall .recess-note { max-width: 520px; margin-left: auto; margin-right: auto; }
  .iopa.iopa-paywall .benefits-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .iopa.iopa-paywall .benefit { flex-direction: column; align-items: flex-start; gap: 12px; padding: 0; font-size: 16px; line-height: 1.4; }
}

/* ── Notification toggle switch ── */
.iopa .notif-toggle {
  position: relative;
  width: 40px; height: 22px;
  background: var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition: background .2s;
  flex: 0 0 auto;
}
.iopa .notif-toggle.is-on {
  background: var(--teal-700);
}
.iopa .notif-toggle .knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: var(--sh-1);
  transition: left .2s;
}
.iopa .notif-toggle.is-on .knob {
  left: 20px;
}

/* ── 18. Desktop breakpoints ── */
@media (min-width: 768px) {
  .iopa .plan-carousel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    overflow: visible;
    scroll-snap-type: none;
    padding: 8px 0 16px;
  }
  .iopa .plan-carousel .plan {
    flex: none;
    scroll-snap-align: none;
  }

  .iopa .dots { display: none; }

  .iopa .pricing-hero {
    padding: 48px 32px 64px;
  }
  .iopa .pricing-hero h1 {
    font-size: 56px;
  }
  .iopa .pricing-hero p {
    font-size: 17px;
    max-width: 540px;
  }

  .iopa .checkout-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    padding: 24px;
  }

  .iopa .order-recap {
    position: sticky;
    top: 80px;
  }

  .iopa .payment-tiles {
    grid-template-columns: repeat(4, 1fr);
  }

  .iopa .confirmation-hero {
    padding: 56px 32px 40px;
  }
  .iopa .confirmation-icon {
    width: 96px; height: 96px;
  }

  .iopa .profile-hero {
    padding: 32px;
  }
  .iopa .profile-hero .avatar {
    width: 64px; height: 64px;
    font-size: 24px;
  }
  .iopa .profile-hero h2 { font-size: 28px; }

  .iopa .profile-grid {
    grid-template-columns: 260px 1fr;
  }

  .iopa .profile-nav {
    background: var(--paper);
    border-bottom: none;
    border-right: 1px solid var(--line);
    padding: 16px 0;
  }

  .iopa .profile-section {
    padding: 24px 32px;
    max-width: 720px;
  }
}

/* ── 19. Utility classes ── */
.iopa .flex-1 { flex: 1; }
.iopa .flex-center { display: flex; align-items: center; }
.iopa .flex-center-gap-6 { display: flex; align-items: center; gap: 6px; }
.iopa .flex-center-gap-8 { display: flex; align-items: center; gap: 8px; }
.iopa .flex-center-gap-10 { display: flex; align-items: center; gap: 10px; }
.iopa .flex-center-gap-12 { display: flex; align-items: center; gap: 12px; }
.iopa .flex-center-gap-14 { display: flex; align-items: center; gap: 14px; }
.iopa .flex-start-gap-10 { display: flex; align-items: flex-start; gap: 10px; }
.iopa .flex-start-gap-12 { display: flex; align-items: flex-start; gap: 12px; }
.iopa .flex-between { display: flex; justify-content: space-between; }
.iopa .flex-between-center { display: flex; justify-content: space-between; align-items: center; }
.iopa .flex-between-top { display: flex; justify-content: space-between; align-items: flex-start; }
.iopa .flex-between-baseline { display: flex; justify-content: space-between; align-items: baseline; }
.iopa .flex-baseline-gap-4 { display: flex; align-items: baseline; gap: 4px; }
.iopa .flex-col { display: flex; flex-direction: column; }
.iopa .flex-center-justify { display: flex; justify-content: center; }
.iopa .grid-gap-8 { display: grid; gap: 8px; }
.iopa .grid-gap-10 { display: grid; gap: 10px; }
.iopa .text-center { text-align: center; }
.iopa .text-right { text-align: right; }
.iopa .text-uppercase { text-transform: uppercase; }
.iopa .relative { position: relative; }
.iopa .mb-0 { margin-bottom: 0; }
.iopa .mb-4 { margin-bottom: 4px; }
.iopa .mb-8 { margin-bottom: 8px; }
.iopa .mb-10 { margin-bottom: 10px; }
.iopa .mb-12 { margin-bottom: 12px; }
.iopa .mb-14 { margin-bottom: 14px; }
.iopa .mb-16 { margin-bottom: 16px; }
.iopa .mt-2 { margin-top: 2px; }
.iopa .mt-4 { margin-top: 4px; }
.iopa .mt-6 { margin-top: 6px; }
.iopa .mt-8 { margin-top: 8px; }
.iopa .mt-10 { margin-top: 10px; }
.iopa .mt-12 { margin-top: 12px; }
.iopa .mt-14 { margin-top: 14px; }
.iopa .mt-16 { margin-top: 16px; }
.iopa .mt-20 { margin-top: 20px; }
.iopa .pt-4 { padding-top: 4px; }
.iopa .text-danger { color: var(--red); }
.iopa .text-gold { color: var(--gold); }
.iopa .text-gold-2 { color: var(--gold-2); }
.iopa .text-primary { color: var(--teal-700); }
.iopa .text-primary-dark { color: var(--teal-800); }
.iopa .text-ink { color: var(--ink); }
.iopa .text-ink-2 { color: var(--ink-2); }
.iopa .text-ink-3 { color: var(--ink-3); }
.iopa .text-ink-4 { color: var(--ink-4); }
.iopa .text-white { color: var(--white); }
.iopa .font-semibold { font-weight: 600; }
.iopa .font-bold { font-weight: 700; }
.iopa .font-extrabold { font-weight: 800; }
.iopa .opacity-7 { opacity: 0.7; }
.iopa .opacity-85 { opacity: 0.85; }

/* ── 20. Text / typography components ── */
.iopa .text-xs-label {
  font-size: 11px; color: var(--ink-4);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.iopa .text-xs-sub { font-size: 11px; color: var(--ink-3); }
.iopa .text-xs-muted { font-size: 11px; color: var(--ink-4); font-weight: 400; }
.iopa .text-xs-faded { font-size: 10px; opacity: 0.8; }
.iopa .text-sm-secondary { font-size: 12px; color: var(--ink-3); }
.iopa .text-sm-muted { font-size: 12px; opacity: 0.7; }
.iopa .text-md { font-size: 14px; color: var(--ink-2); }
.iopa .text-md-bold { font-weight: 600; font-size: 14px; }
.iopa .text-md-secondary { font-size: 14px; color: var(--ink-3); }
.iopa .text-lead {
  font-size: 15px; color: var(--ink-3); line-height: 1.55;
}
.iopa .text-lead-md { font-size: 15px; color: var(--ink-2); }
.iopa .heading-section {
  font-size: 16px; font-weight: 700;
}
.iopa .heading-page {
  font-size: 32px; color: var(--ink); letter-spacing: -0.02em;
}
.iopa .price-display {
  font-family: var(--font-display);
  font-size: 38px; font-weight: 800; letter-spacing: -0.02em;
}
.iopa .price-large {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
}
.iopa .price-xl {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 800;
}

/* ── 21. Component classes ── */
.iopa .card-empty {
  text-align: center; padding: 32px;
}
.iopa .card-empty-m { text-align: center; padding: 32px; margin: 16px; }
.iopa .card-notice-success {
  border-color: var(--green); margin: 16px 16px 0; padding: 12px 16px;
}
.iopa .card-notice-success p { margin: 0; font-size: 14px; color: var(--green); font-weight: 600; }
.iopa .card-notice-error { border-color: var(--red); }
.iopa .card-notice-info { border-color: var(--teal-600); }
.iopa .error-list {
  margin: 0; padding: 0 0 0 16px; color: var(--red); font-size: 14px;
}
.iopa .tag-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; opacity: 0.7;
}
.iopa .eyebrow-gold { color: var(--gold); }
.iopa .eyebrow-primary { color: var(--teal-800); }
.iopa .eyebrow-muted { color: var(--ink-3); }
.iopa .pitch-text {
  font-size: 13px; opacity: 0.85; line-height: 1.5;
}
.iopa .plan-price-block {
  padding: 18px 0 0; flex: 1;
  display: flex; flex-direction: column;
}
.iopa .plan-heading {
  font-size: 22px; font-weight: 800; line-height: 1.1;
}
.iopa .chip-featured {
  background: var(--white); color: var(--chip-featured-text); font-size: 10px;
}
.iopa .chip-success { background: var(--green); color: var(--white); }
.iopa .icon-circle {
  width: 36px; height: 36px; border-radius: 50%;
  flex: 0 0 auto; display: flex;
  align-items: center; justify-content: center;
}
.iopa .icon-circle-white {
  background: var(--white); color: var(--teal-700); box-shadow: var(--sh-1);
}
.iopa .icon-circle-teal {
  background: var(--teal-50); color: var(--teal-700);
}
.iopa .icon-badge {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
}
.iopa .subscription-meta {
  margin-top: 10px; padding: 8px;
  background: var(--bg-soft); border-radius: var(--r-sm);
  font-size: 12px; color: var(--ink-2);
}
.iopa .button-group { display: flex; gap: 6px; }
.iopa .receipt-total {
  display: flex; justify-content: space-between;
  align-items: baseline; padding-top: 4px;
}
.iopa .progress-wrapper { padding: 16px 16px 0; }
.iopa .progress-labels {
  display: flex; justify-content: space-between;
  margin-top: 8px; font-size: 11px; color: var(--ink-3);
}
.iopa .progress-active { font-weight: 700; color: var(--teal-800); }
.iopa .recap-header {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-3);
}
.iopa .cta-block {
  padding: 24px 16px 28px; display: grid; gap: 8px;
}
.iopa .checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.iopa .checkbox-styled { margin-top: 2px; accent-color: var(--teal-700); }
.iopa .link-primary { color: var(--teal-700); font-weight: 600; }
.iopa .invoice-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.iopa .address-text {
  font-style: normal; font-size: 14px;
  color: var(--ink-2); line-height: 1.6;
}
.iopa .legal-note {
  font-size: 11px; color: var(--ink-4);
  text-align: center; margin-top: 10px; line-height: 1.5;
}
.iopa .benefit-row {
  display: flex; gap: 12px; align-items: flex-start;
}
.iopa .benefit-title {
  font-weight: 700; font-size: 14px;
}
.iopa .benefit-desc {
  font-size: 12px; color: var(--ink-3);
}
.iopa .section-benefits {
  background: var(--paper-2); padding: 28px 18px;
}
.iopa .section-benefits-heading {
  font-size: 18px; font-weight: 700;
}
.iopa .toggle-center {
  display: flex; justify-content: center; margin-top: 20px;
}
.iopa .plan-price-period {
  font-size: 13px; color: var(--ink-3);
}
.iopa .plan-annual-note {
  font-size: 11px; color: var(--ink-4); margin-top: 2px;
}

/* ── Extra utility classes for inline-style removal ── */
.iopa .text-sm { font-size: 12px; }
.iopa .divider-sm { height: 1px; background: var(--line); margin: 12px 0; }
.iopa .m-16 { margin: 16px; }
.iopa .card-empty-sm { text-align: center; padding: 24px; }
.iopa .heading-sm { font-size: 18px; }
.iopa .profile-stat-box {
  background: var(--overlay-subtle);
  padding: 12px 16px;
  border-radius: var(--r-md);
  flex: 1;
}
.iopa .payment-detail-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.iopa .payment-detail-footer {
  font-size: 12px; color: var(--ink-4);
  margin-top: 12px; line-height: 1.5;
}

/* ── 22. Legacy (.iopa-no-access) ── */
.iopa-no-access {
  padding: 24px;
  margin: 20px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  text-align: center;
}
.iopa-no-access h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--ink-2);
}
.iopa-no-access p {
  margin: 0;
  color: var(--ink-3);
}
.iopa-no-access a {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 20px;
  background: var(--teal-700);
  color: var(--white);
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 600;
}
.iopa-no-access a:hover {
  background: var(--teal-800);
}

/* ── 23. Login page (B7) ── */

/* ── Mobile: centred card ── */
.iopa.iopa-login { padding: 26px 18px 40px; }
.iopa.iopa-login .login-split { display: flex; flex-direction: column; align-items: center; }
.iopa.iopa-login .login-aside { display: none; }
.iopa.iopa-login .login-main { width: 100%; display: flex; justify-content: center; }

/* ── Card ── */
.iopa.iopa-login .login-card {
  width: 100%; max-width: 420px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: 26px 22px;
}
.iopa.iopa-login .login-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal-600);
}
.iopa.iopa-login .login-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--ink); margin: 8px 0 6px; line-height: 1.12;
}
.iopa.iopa-login .login-sub { font-size: 14px; color: var(--ink-3); line-height: 1.5; }

.iopa.iopa-login form { margin-top: 20px; }

/* ── Alerts ── */
.iopa.iopa-login .iopa-login-error,
.iopa.iopa-login .iopa-login-info {
  padding: 12px 16px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 600; margin-top: 16px;
}
.iopa.iopa-login .iopa-login-error {
  background: var(--chip-red-bg); color: var(--red); border: 1px solid var(--chip-red-bg);
}
.iopa.iopa-login .iopa-login-info {
  background: var(--teal-50); color: var(--teal-800); border: 1px solid var(--teal-200);
}

/* ── Input group: leading icon + optional trailing eye toggle ── */
.iopa.iopa-login .login-ig { position: relative; display: block; }
.iopa.iopa-login .login-ig .lead {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--ink-4); pointer-events: none; display: flex;
}
.iopa.iopa-login .login-ig .field-input { padding-left: 42px; }
.iopa.iopa-login .login-ig.has-eye .field-input { padding-right: 46px; }
.iopa.iopa-login .eye-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-4); background: none; border: 0; cursor: pointer;
}
.iopa.iopa-login .eye-btn:hover { color: var(--ink-2); background: var(--teal-50); }
.iopa.iopa-login .eye-btn .eye-off { display: none; }
.iopa.iopa-login .eye-btn.is-visible .eye-open { display: none; }
.iopa.iopa-login .eye-btn.is-visible .eye-off { display: inline; }

/* ── Remember + forgot row ── */
.iopa.iopa-login .login-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 2px 0 18px;
}
.iopa.iopa-login .remember {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--ink-2); cursor: pointer; user-select: none;
}
.iopa.iopa-login .remember input { position: absolute; opacity: 0; pointer-events: none; }
.iopa.iopa-login .remember .box {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid var(--line); background: var(--white);
  transition: all .15s; display: flex; align-items: center; justify-content: center;
  color: var(--white);
}
.iopa.iopa-login .remember .box svg { width: 14px; height: 14px; opacity: 0; transition: opacity .12s; }
.iopa.iopa-login .remember input:checked + .box { background: var(--teal-700); border-color: var(--teal-700); }
.iopa.iopa-login .remember input:checked + .box svg { opacity: 1; }
.iopa.iopa-login .forgot {
  font-size: 13.5px; font-weight: 700; color: var(--teal-700);
  cursor: pointer; white-space: nowrap;
}
.iopa.iopa-login .forgot:hover { color: var(--teal-800); text-decoration: underline; }

/* ── Secure notice ── */
.iopa.iopa-login .login-secure {
  margin-top: 16px; display: flex; align-items: center; justify-content: center;
  gap: 7px; font-size: 12px; color: var(--ink-4);
}
.iopa.iopa-login .login-secure svg { color: var(--teal-600); }

/* ── Footer ── */
.iopa.iopa-login .login-foot {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
  text-align: center; font-size: 14px; color: var(--ink-3);
}
.iopa.iopa-login .login-foot a { color: var(--teal-700); font-weight: 700; }
.iopa.iopa-login .login-foot a:hover { text-decoration: underline; }

/* ── Logged-in state ── */
.iopa.iopa-login .login-loggedin-msg {
  font-size: 15px; color: var(--ink-2); text-align: center; margin-bottom: 16px;
}
.iopa.iopa-login .login-links {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.iopa.iopa-login .login-links a {
  display: block; padding: 12px 16px;
  background: var(--teal-50); border-radius: var(--r-md);
  color: var(--teal-800); font-weight: 600; font-size: 14px;
  transition: background .15s;
}
.iopa.iopa-login .login-links a:hover { background: var(--teal-100); }

/* ── Desktop: brand panel + form panel ── */
@media (min-width: 768px) {
  .iopa.iopa-login { padding: 0; }

  .iopa.iopa-login .login-split {
    display: grid; grid-template-columns: 1.05fr 1fr;
    min-height: 620px;
  }

  /* Left: brand panel */
  .iopa.iopa-login .login-aside {
    display: flex; flex-direction: column; justify-content: center;
    background:
      radial-gradient(120% 90% at 12% 0%, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 55%),
      linear-gradient(165deg, var(--teal-800) 0%, var(--teal-900) 70%, var(--teal-950) 100%);
    color: var(--white); padding: 56px; overflow: hidden;
  }
  .iopa.iopa-login .login-aside .a-eyebrow {
    font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--gold-2); margin-bottom: 16px;
  }
  .iopa.iopa-login .login-aside h2 {
    font-family: var(--font-display); font-size: 38px; font-weight: 800;
    letter-spacing: -0.025em; line-height: 1.1; max-width: 12ch; color: var(--white);
  }
  .iopa.iopa-login .login-aside p {
    margin-top: 14px; font-size: 16px; line-height: 1.55;
    color: var(--text-on-dark); max-width: 38ch;
  }
  .iopa.iopa-login .login-aside .a-list {
    margin-top: 30px; display: flex; flex-direction: column; gap: 16px;
  }
  .iopa.iopa-login .login-aside .a-item {
    display: flex; align-items: center; gap: 13px; font-size: 15.5px;
    color: var(--text-on-dark);
  }
  .iopa.iopa-login .login-aside .a-item .ic {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    background: var(--overlay-subtle); color: var(--gold-2);
    display: flex; align-items: center; justify-content: center;
  }

  /* Right: form panel */
  .iopa.iopa-login .login-main {
    background: var(--white); display: flex; align-items: center; justify-content: center;
    padding: 48px 40px;
  }
  .iopa.iopa-login .login-card {
    border: 0; box-shadow: none; padding: 0; max-width: 380px;
  }
  .iopa.iopa-login .login-title { font-size: 30px; }
}
