
/* Top Goal 3 — V3.21.6 Premium Cards Overhaul
   Scope: frontend units + tests pages only */
.page-term-premium main,.page-tests-premium main,.term-premium-page,.tests-premium-page{background:linear-gradient(180deg,#fbfbff 0%,#f7f6ff 100%)}
.premium-hero-wrap{padding-top:24px!important;padding-bottom:42px!important}
.premium-overline{display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border-radius:999px;background:rgba(109,76,245,.08);color:#6c4cf2;font-size:13px;font-weight:900;letter-spacing:.2px}
.premium-hero-card,.premium-tests-hero{
  position:relative;overflow:hidden;border-radius:34px;padding:34px;
  border:1px solid rgba(117,96,243,.16);background:
  radial-gradient(circle at 10% 15%,rgba(255,255,255,.95),rgba(255,255,255,.76) 48%,rgba(246,247,255,.96) 100%);
  box-shadow:0 26px 80px rgba(30,41,59,.08), inset 0 1px 0 rgba(255,255,255,.72)
}
.premium-hero-card::before,.premium-tests-hero::before{
  content:"";position:absolute;inset-inline-end:-90px;top:-70px;width:240px;height:240px;border-radius:50%;
  background:radial-gradient(circle,rgba(124,92,255,.14),rgba(124,92,255,0));
}
.premium-hero-card::after,.premium-tests-hero::after{
  content:"";position:absolute;inset-inline-start:-120px;bottom:-120px;width:260px;height:260px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,182,120,.14),rgba(255,182,120,0));
}
.premium-hero-card h1,.premium-tests-hero h1{font-size:clamp(34px,3.6vw,56px)!important;line-height:1.05!important;margin:12px 0 14px!important;color:#1f2f59!important}
.premium-hero-card p,.premium-tests-hero p{max-width:760px;font-size:18px;line-height:1.95;color:#6b7280;margin:0}
.premium-hero-pills{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.premium-pill{
  display:inline-flex;align-items:center;gap:8px;padding:12px 15px;border-radius:18px;
  background:rgba(255,255,255,.86);border:1px solid rgba(110,90,240,.13);
  box-shadow:0 10px 24px rgba(30,41,59,.05);font-weight:800;color:#42526e
}
.premium-headline{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin-bottom:22px}
.premium-headline h2.section-title{margin:4px 0 6px!important;font-size:30px!important}
.premium-headline p{margin:0;color:#718198;line-height:1.9}
.headline-kicker{
  display:inline-flex;align-items:center;padding:7px 12px;border-radius:999px;
  background:#f4efff;color:#7656e3;font-weight:900;font-size:13px
}
.headline-side-chip{
  flex:0 0 auto;padding:12px 16px;border-radius:16px;
  background:linear-gradient(135deg,#6e50ff,#8f74ff);color:#fff;font-weight:900;
  box-shadow:0 14px 30px rgba(110,80,255,.28)
}

.premium-cards-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.premium-card{
  position:relative;display:flex;flex-direction:column;min-height:340px;overflow:hidden;
  border-radius:30px;padding:20px;border:1px solid rgba(96,111,140,.14);
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,248,255,.96));
  box-shadow:0 14px 34px rgba(30,41,59,.08), inset 0 1px 0 rgba(255,255,255,.8);
  text-decoration:none!important
}
.premium-card:hover{transform:translateY(-4px)}
.premium-card-glow{
  position:absolute;inset-inline-end:-38px;top:-42px;width:170px;height:170px;border-radius:50%;
  background:radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, white 78%), rgba(255,255,255,0) 70%);
  opacity:.95
}
.premium-card-top{position:relative;display:flex;justify-content:space-between;align-items:center;gap:8px;z-index:2}
.premium-badge{
  display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border-radius:999px;font-weight:900;font-size:12px
}
.premium-badge-soft{background:color-mix(in srgb,var(--accent) 10%,white 90%);color:var(--accent)}
.premium-badge-outline{background:#fff;border:1px solid color-mix(in srgb,var(--accent) 22%,white 78%);color:#55627d}
.premium-badge-danger{background:#fff2f2;color:#d95757;border:1px solid #ffd9d9}
.premium-card-body{position:relative;z-index:2;display:flex;flex-direction:column;gap:14px;margin-top:12px}
.premium-card-body h3{margin:0;font-size:31px;line-height:1.22;color:#22335c}
.premium-card-body p{margin:0;color:#748197;font-size:16px;line-height:1.9;min-height:58px}

.premium-unit-visual{position:relative;z-index:2;margin-top:16px}
.premium-visual-frame{
  position:relative;isolation:isolate;display:grid;place-items:center;height:176px;border-radius:26px;overflow:hidden;
  background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 14%,white 86%),#fff 72%);
  border:1px solid color-mix(in srgb,var(--accent) 14%,white 86%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8)
}
.premium-visual-frame.has-cover img{width:100%;height:100%;object-fit:cover}
.premium-visual-frame.generated-icon::before,
.premium-test-icon-wrap::before{
  content:"";position:absolute;width:108px;height:108px;border-radius:28px;
  background:linear-gradient(135deg,var(--accent),color-mix(in srgb,var(--accent) 65%, white 35%));
  box-shadow:0 18px 40px color-mix(in srgb,var(--accent) 34%, transparent);
}
.premium-visual-frame.generated-icon::after,
.premium-test-icon-wrap::after{
  content:"";position:absolute;width:66px;height:66px;border-radius:22px;background:rgba(255,255,255,.25);
  transform:translate(28px,18px)
}
.premium-main-icon{
  position:relative;z-index:2;font-size:64px;filter:drop-shadow(0 10px 22px rgba(17,24,39,.12))
}
.premium-visual-bg{
  position:absolute;inset-inline-start:18px;bottom:18px;width:84px;height:84px;border-radius:24px;
  background:rgba(255,255,255,.62);backdrop-filter:blur(5px)
}
.float-dot{position:absolute;border-radius:50%;background:#fff;box-shadow:0 8px 16px rgba(31,41,55,.08)}
.dot-a{width:14px;height:14px;inset-inline-end:22px;top:20px}
.dot-b{width:9px;height:9px;inset-inline-start:24px;top:24px;background:color-mix(in srgb,var(--accent) 30%,white 70%)}
.dot-c{width:20px;height:20px;inset-inline-end:32px;bottom:24px;background:rgba(255,255,255,.72)}
.premium-metrics-row,.premium-stats-grid{display:flex;flex-wrap:wrap;gap:10px}
.metric-chip{
  display:inline-flex;align-items:center;gap:7px;padding:10px 12px;border-radius:14px;background:#f7f8fe;
  color:#4a5875;border:1px solid rgba(98,115,148,.12);font-size:13px;font-weight:800
}
.metric-chip.success{background:#ecfaf3;color:#0f8f5d;border-color:#cdeedc}
.premium-action-row{
  margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:12px;
  padding:15px 16px;border-radius:18px;background:linear-gradient(135deg, color-mix(in srgb,var(--accent) 14%,white 86%), #fff)
}
.premium-action-text{font-weight:900;color:#263557}
.premium-action-arrow{
  width:38px;height:38px;border-radius:14px;display:grid;place-items:center;
  background:linear-gradient(135deg,var(--accent),color-mix(in srgb,var(--accent) 72%,white 28%));color:#fff;font-size:22px;
  box-shadow:0 14px 28px color-mix(in srgb,var(--accent) 30%, transparent)
}

/* tests page extras */
.premium-tests-hero{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);gap:24px;align-items:center}
.student-mini-card{
  position:relative;z-index:2;border-radius:26px;padding:20px;background:rgba(255,255,255,.82);
  border:1px solid rgba(110,80,255,.12);box-shadow:0 12px 28px rgba(30,41,59,.06)
}
.student-mini-card.guest{background:linear-gradient(180deg,#fff,#f6f2ff)}
.student-mini-avatar{
  width:58px;height:58px;border-radius:18px;display:grid;place-items:center;font-size:26px;
  background:linear-gradient(135deg,#7254ff,#9b83ff);color:#fff;box-shadow:0 16px 28px rgba(114,84,255,.24)
}
.student-mini-copy{margin-top:12px}
.student-mini-copy small{display:block;color:#7b879c;font-weight:700;margin-bottom:6px}
.student-mini-copy strong{display:block;font-size:22px;color:#20315c}
.student-mini-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.student-mini-actions a,.premium-guest-btn{
  display:inline-flex;align-items:center;justify-content:center;padding:12px 16px;border-radius:15px;
  background:#fff;border:1px solid rgba(112,86,242,.16);color:#6f50f5;font-weight:900;text-decoration:none!important
}
.student-mini-actions a:hover,.premium-guest-btn:hover{background:#6f50f5;color:#fff}
.premium-test-card{min-height:320px}
.premium-test-card.is-locked{opacity:.85}
.premium-test-head{display:grid;grid-template-columns:88px 1fr;gap:16px;align-items:center;position:relative;z-index:2;margin-top:18px}
.premium-test-icon-wrap{
  position:relative;display:grid;place-items:center;height:88px;border-radius:28px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 14%,white 86%),#fff);overflow:hidden;border:1px solid rgba(255,255,255,.74)
}
.premium-test-icon{position:relative;z-index:2;font-size:42px}
.premium-test-title-wrap h3{margin:0;font-size:25px;line-height:1.35;color:#20315b}
.premium-test-title-wrap p{margin:8px 0 0;color:#7c879b;font-size:14px;line-height:1.8}
.premium-empty-card{
  grid-column:1/-1;border-radius:30px;padding:34px;text-align:center;background:#fff;border:1px dashed #d9d6f2;color:#6e7b92
}
.premium-empty-icon{
  width:74px;height:74px;margin:0 auto 14px;border-radius:24px;display:grid;place-items:center;font-size:34px;
  background:linear-gradient(135deg,#f3efff,#fff)
}

/* responsive */
@media (max-width: 1100px){
  .premium-cards-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .premium-tests-hero{grid-template-columns:1fr}
}
@media (max-width: 760px){
  .premium-hero-card,.premium-tests-hero{padding:22px;border-radius:24px}
  .premium-headline{flex-direction:column;align-items:flex-start}
  .premium-cards-grid{grid-template-columns:1fr;gap:18px}
  .premium-card{min-height:auto;padding:16px;border-radius:22px}
  .premium-card-body h3,.premium-test-title-wrap h3{font-size:24px}
  .premium-visual-frame{height:154px}
  .premium-test-head{grid-template-columns:74px 1fr}
  .premium-test-icon-wrap{height:74px;border-radius:22px}
  .student-mini-copy strong{font-size:19px}
}

/* =========================================================
   V3.21.7 — Premium Homepage Cards
   ========================================================= */
.home-premium-page{min-height:calc(100vh - 80px)}
.home-premium-wrap{padding-top:24px!important}
.home-premium-hero{position:relative;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr);gap:28px;align-items:center;overflow:hidden;padding:38px;border-radius:36px;border:1px solid rgba(117,96,243,.16);background:radial-gradient(circle at 88% 16%,rgba(108,82,255,.12),transparent 26%),radial-gradient(circle at 14% 86%,rgba(55,187,230,.10),transparent 28%),linear-gradient(135deg,#fff 0%,#fbfaff 48%,#f3f8ff 100%);box-shadow:0 28px 80px rgba(30,41,59,.09),inset 0 1px 0 rgba(255,255,255,.78)}
.home-premium-hero::before{content:"";position:absolute;inset-inline-end:-120px;top:-120px;width:340px;height:340px;border-radius:50%;border:1px solid rgba(109,76,245,.08);box-shadow:0 0 0 36px rgba(109,76,245,.025),0 0 0 76px rgba(55,187,230,.018)}
.home-premium-copy{position:relative;z-index:2}.home-premium-copy h1{font-size:clamp(46px,6vw,78px)!important;line-height:1.02!important;letter-spacing:-.045em!important;margin:14px 0 18px!important;color:#17264d!important}.home-premium-copy>p{max-width:760px;margin:0;color:#6d7890;font-size:18px;line-height:2}
.home-premium-note{display:inline-flex;align-items:center;gap:10px;margin-top:18px;padding:12px 15px;border-radius:17px;background:#fff8e9;border:1px solid #ffe6b8;color:#8b671c;font-weight:800}.home-premium-note .note-icon{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:#ffecb8;color:#d88c12}
.home-premium-page .premium-pill svg,.premium-home-term-card .metric-chip svg,.premium-feature-card svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.home-premium-scene{position:relative;z-index:2;min-height:310px}.learning-scene-card{position:absolute;background:rgba(255,255,255,.86);border:1px solid rgba(98,115,148,.13);box-shadow:0 20px 52px rgba(30,41,59,.11);backdrop-filter:blur(14px)}.scene-card-main{inset:36px 36px 28px 40px;border-radius:32px;display:grid;place-items:center;background:linear-gradient(145deg,rgba(255,255,255,.94),rgba(246,244,255,.94))}.scene-card-main::before{content:"";position:absolute;inset:18px;border-radius:24px;border:1px dashed rgba(109,76,245,.13)}.scene-card-badge{position:absolute;top:20px;inset-inline-start:20px;padding:9px 12px;border-radius:13px;background:#f0ebff;color:#7254ef;font-weight:900;letter-spacing:.08em}.scene-book-svg{width:76%;max-width:245px;filter:drop-shadow(0 18px 22px rgba(39,47,78,.12))}.scene-card-small{width:132px;padding:14px;border-radius:20px;display:flex;align-items:center;gap:10px;font-weight:900;color:#46536d}.scene-card-small svg{width:25px;height:25px;fill:none;stroke:#7051f0;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.scene-a{inset-inline-start:-5px;top:18px;transform:rotate(-4deg)}.scene-b{inset-inline-end:-2px;bottom:12px;transform:rotate(4deg)}.home-scene-dot{position:absolute;border-radius:50%;box-shadow:0 10px 20px rgba(30,41,59,.08)}.home-scene-dot.d1{width:18px;height:18px;background:#ffb768;inset-inline-end:28px;top:42px}.home-scene-dot.d2{width:12px;height:12px;background:#45c5e8;inset-inline-start:14px;bottom:80px}.home-scene-star{position:absolute;color:#8166ff;font-size:24px}.home-scene-star.s1{inset-inline-end:24px;bottom:76px}.home-scene-star.s2{inset-inline-start:26px;top:126px;color:#ffae54;font-size:16px}.home-hero-image-frame{position:absolute;inset:10px;border-radius:30px;overflow:hidden;border:1px solid rgba(98,115,148,.12);box-shadow:0 20px 50px rgba(30,41,59,.12)}.home-hero-image-frame img{width:100%;height:100%;object-fit:cover;display:block}
.home-term-section{padding-top:34px!important}.premium-home-term-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:26px}.premium-home-term-card{position:relative;overflow:hidden;display:block;min-height:390px;padding:22px;border-radius:32px;border:1px solid rgba(96,111,140,.14);background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(249,249,255,.97));box-shadow:0 16px 40px rgba(30,41,59,.075),inset 0 1px 0 rgba(255,255,255,.82);text-decoration:none!important;transition:transform .28s var(--tg-ease,cubic-bezier(.2,.8,.2,1)),box-shadow .28s ease,border-color .28s ease}.premium-home-term-card:hover{transform:translateY(-7px);border-color:color-mix(in srgb,var(--accent) 24%,white 76%);box-shadow:0 28px 62px rgba(30,41,59,.13)}.premium-home-term-card::before{content:"";position:absolute;inset-inline-start:0;top:26px;bottom:26px;width:5px;border-radius:0 8px 8px 0;background:linear-gradient(180deg,var(--accent),color-mix(in srgb,var(--accent) 62%,white 38%))}.home-term-card-layout{position:relative;z-index:2;display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:18px;align-items:stretch;margin-top:18px}.home-term-card-copy{display:flex;flex-direction:column;min-width:0}.home-term-mini-kicker{color:var(--accent);font-weight:900;font-size:12px;letter-spacing:.04em}.home-term-card-copy h3{margin:8px 0 8px;font-size:clamp(30px,3.1vw,46px);line-height:1.25;color:#1f3059;letter-spacing:-.025em}.home-term-card-copy p{margin:0 0 16px;color:#77839a;font-size:15px;line-height:1.85}.home-term-card-copy .premium-action-row{margin-top:auto}.home-term-visual-premium{position:relative;display:grid;place-items:center;min-height:255px;border-radius:28px;overflow:hidden;background:linear-gradient(145deg,color-mix(in srgb,var(--accent) 11%,white 89%),#fff 78%);border:1px solid color-mix(in srgb,var(--accent) 13%,white 87%)}.home-term-image{position:absolute;inset:0}.home-term-image img{width:100%;height:100%;object-fit:cover;display:block}.home-term-svg-scene{position:relative;width:100%;height:100%;display:grid;place-items:center}.home-term-svg-scene svg{width:88%;max-width:220px;filter:drop-shadow(0 16px 22px rgba(30,41,59,.10))}.term-scene-number{position:absolute;top:16px;inset-inline-end:16px;width:46px;height:46px;border-radius:16px;display:grid;place-items:center;background:#fff;color:var(--accent);font-weight:950;box-shadow:0 10px 24px rgba(30,41,59,.08)}.term-orbit-dot{position:absolute;border-radius:50%;background:var(--accent);opacity:.15}.term-orbit-dot.od1{width:30px;height:30px;inset-inline-start:18px;bottom:28px}.term-orbit-dot.od2{width:14px;height:14px;inset-inline-end:30px;top:84px;opacity:.24}
.home-premium-features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding-top:10px!important}.premium-feature-card{display:flex;align-items:flex-start;gap:15px;padding:20px;border-radius:24px;background:rgba(255,255,255,.92);border:1px solid rgba(98,115,148,.12);box-shadow:0 12px 30px rgba(30,41,59,.055)}.feature-icon{width:52px;height:52px;flex:0 0 52px;border-radius:17px;display:grid;place-items:center}.feature-purple{background:#f0ebff;color:#7355ed}.feature-blue{background:#ebf8fd;color:#2ba5ce}.feature-orange{background:#fff3e8;color:#dd842f}.premium-feature-card b{display:block;color:#26375d;font-size:16px;margin-bottom:5px}.premium-feature-card span{display:block;color:#7b879b;font-size:13px;line-height:1.75}
@media(max-width:1100px){.home-premium-hero{grid-template-columns:1fr;gap:8px}.home-premium-scene{min-height:280px}.premium-home-term-grid{grid-template-columns:1fr}}
@media(max-width:760px){.home-premium-wrap{padding-top:14px!important}.home-premium-hero{padding:24px;border-radius:26px}.home-premium-copy h1{font-size:44px!important}.home-premium-copy>p{font-size:15px}.home-premium-scene{min-height:235px}.scene-card-main{inset:28px 22px 22px}.scene-card-small{width:112px;padding:11px;font-size:11px}.premium-home-term-grid{gap:18px}.premium-home-term-card{padding:17px;border-radius:24px;min-height:0}.home-term-card-layout{grid-template-columns:1fr}.home-term-visual-premium{min-height:190px;order:-1}.home-term-card-copy h3{font-size:30px}.home-premium-features{grid-template-columns:1fr}}
