/* Keep the mobile countdown, action, and close control in separate lanes. */
.catalog-subject-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:760px){
 .promo-dismissed .topbar{height:112px}
 .promo{padding:0 38px 0 12px}
 .promo-content{display:grid;width:100%;height:100%;max-width:none;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:28px 28px;align-content:center;align-items:center;column-gap:5px;row-gap:2px}
 .promo-countdown{grid-column:1 / -1;grid-row:1;justify-self:center;transform:none;margin:0;gap:2px;min-width:0}
 .promo-time-group{height:24px;gap:2px}
 .promo-digit,.promo .promo-digit{width:18px;height:24px;border-radius:5px;font-size:13px;line-height:1}
 .promo-countdown>i{width:5px;font-size:13px}
 .promo .promo-cta{grid-column:2;grid-row:2;height:26px;min-width:0;padding:0 9px;gap:3px;font-size:11px;white-space:nowrap}
 .promo .promo-message{grid-column:1;grid-row:2;display:flex;align-items:center;min-width:0;height:28px;overflow:hidden;white-space:nowrap}
 .promo .promo-message>strong{display:none}
 .promo .promo-message>span{display:inline-flex;align-items:baseline;font-size:13px;line-height:24px;font-weight:600;white-space:nowrap;opacity:1}
 .promo .promo-message .promo-sale-five{display:inline;font-size:21px;line-height:1;font-weight:850;color:#fff1a8;margin:0 2px;text-shadow:0 1px 7px #00343c99}
 .promo:not(.is-counting) .promo-content{grid-template-rows:28px}
 .promo:not(.is-counting) .promo-message{grid-column:1;grid-row:1;justify-content:flex-start}
 .promo:not(.is-counting) .promo-cta{grid-row:1}
 .promo button#promoClose{top:21px;right:4px;width:28px;height:28px}
}
/* Portrait screens use two compact rows; landscape keeps six cards in one row. */
@media(orientation:portrait) and (max-width:1024px), (orientation:landscape) and (max-width:760px){
 .catalog-subject-grid{gap:8px;margin-bottom:14px}
 .catalog-subject-grid .subject-card{min-height:86px;padding:10px;border-radius:13px}
 .catalog-subject-grid .subject-top,.catalog-subject-grid .subject-bottom{gap:0}
 .catalog-subject-grid .subject-icon{width:30px;height:30px;border-radius:9px}
 .catalog-subject-grid .subject-icon svg{width:18px;height:18px}
 .catalog-subject-grid .subject-name{font-size:14px;line-height:1.2}
 .catalog-subject-grid .subject-num,.catalog-subject-grid .subject-desc,.catalog-subject-grid .subject-arrow{display:none}
}
@media(orientation:portrait) and (max-width:1024px){
 .catalog-subject-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(orientation:portrait) and (max-width:360px){
 .catalog-subject-grid{gap:6px}
 .catalog-subject-grid .subject-card{min-height:80px;padding:8px}
 .catalog-subject-grid .subject-name{font-size:13px}
}
@media(max-width:360px){
 .promo{padding-left:8px;padding-right:34px}
 .promo .promo-cta{padding-inline:7px;font-size:10px}
 .promo .promo-message>span{font-size:12px}
 .promo .promo-message .promo-sale-five{font-size:19px}
 .promo button#promoClose{right:2px}
}

/* Compact phone announcement and account navigation. */
.header-shortcut>svg{display:none}
@media(max-width:760px){
 .promo{padding-inline:8px}
 .promo-content{grid-template-columns:auto auto;justify-content:center;column-gap:5px}
 .promo .promo-message{gap:3px;overflow:visible}
 .promo .promo-message>strong{display:inline;font-size:11px;line-height:24px;font-weight:500}
 .promo .promo-message>span{font-size:11px}
 .promo .promo-message .promo-sale-five{font-size:20px}
 .promo .promo-cta{padding:0 6px;font-size:10px;height:25px}
 .promo button#promoClose{top:4px}
 .topbar,.promo-dismissed .topbar{height:80px;padding:10px 10px 28px;gap:5px}
 .top-actions{flex-wrap:nowrap;gap:5px;flex:0 1 auto;margin-left:auto}
 .mobile-menu{width:28px;height:30px;padding:0;flex:none}
 .top-actions .header-shortcut{display:grid;place-items:center;width:28px;height:30px;padding:0;flex:none;border-radius:9px}
 .header-shortcut>span{display:none}
 .header-shortcut>svg{display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
 .header-bell{width:28px;height:30px}
 .header-wallet{padding:0 2px}
 .wallet-trigger{padding:0 4px;gap:3px}
 .wallet-trigger[data-wallet-panel=quota] small{display:none}
 .top-actions .auth-nav{white-space:nowrap;padding:0 7px;font-size:10px;flex:none}
 .top-actions .auth-nav.account-avatar{width:30px;height:30px;padding:0}
 .resource-nav{left:10px;right:10px;bottom:7px;justify-content:center;gap:6px}
 .pricing-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0}
 .pricing-tabs button{min-width:0;padding:12px 4px;white-space:nowrap;font-size:14px}
}
@media(max-width:360px){
 .promo .promo-message>strong,.promo .promo-message>span{font-size:10px}
 .promo .promo-message .promo-sale-five{font-size:18px}
 .promo .promo-cta{padding-inline:5px;font-size:9px}
 .topbar,.promo-dismissed .topbar{padding-inline:8px;gap:3px}
 .top-actions{gap:3px}
 .wallet-trigger small{display:none}
 .wallet-trigger{font-size:10px;padding-inline:3px}
 .resource-total,.resource-suggest-link{font-size:8px}
}

@media(max-width:760px){
 body.membership-reference .pricing-banner{padding:22px 20px;border-radius:20px;text-align:left}
 .membership-reference .pricing-banner>.member-eyebrow{position:static;top:auto;display:flex;align-items:center;gap:10px;font-size:9px;line-height:1.5;letter-spacing:1.5px;margin:0 0 14px}
 .membership-reference .pricing-banner>.member-eyebrow::before{content:"";display:block;flex:0 0 30px;width:30px;height:30px;background:url("logo-symbol.svg") center/contain no-repeat}
 body.membership-reference .pricing-banner h1{font-size:clamp(20px,5.5vw,25px);line-height:1.35;letter-spacing:0;margin:0 0 10px}
 .pricing-banner .poster-title-intro,.pricing-banner .poster-title-offer{display:block;white-space:nowrap}
 .pricing-banner .poster-title-offer{margin-top:6px}
 .pricing-banner .membership-sale-number{font-size:1.25em;line-height:1;font-weight:800}
 body.membership-reference .pricing-banner p{font-size:12px;line-height:1.7;margin:0;letter-spacing:0}
 .pricing-banner .poster-clock{position:static;transform:none;width:100%;max-width:none;margin:22px 0 0;text-align:center}
 .pricing-banner .poster-clock-units{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:100%;text-align:center}
 .pricing-banner .poster-clock-units>div{min-width:0}
 .pricing-banner .poster-clock-units b{font-size:32px;line-height:1.15;letter-spacing:0;font-variant-numeric:tabular-nums}
 .pricing-banner .poster-clock-units small{font-size:10px;line-height:1.4;margin-top:6px;letter-spacing:0}
}


/* Phone banner: keep the close target aligned with the countdown and simplify the action. */
@media(max-width:760px){
  .promo button#promoClose{top:50%;transform:translateY(-50%)}
  .promo .promo-cta{height:18px;min-height:18px;padding:0 7px;border-radius:5px;background:#fff1a8;color:#073d46;font-size:9px;line-height:18px;transform:translateY(-1px)}
  .promo .promo-cta:hover{background:#fff1a8;color:#073d46}
}


/* Phone-only home shortcut and a quieter half-size announcement glow. */
.mobile-home{display:none}
@media(max-width:760px){
  .promo-aurora::before,.promo-aurora::after{width:clamp(264px,28.8vw,600px);height:156px;filter:blur(13px);opacity:.7}
  .mobile-home{display:grid;place-items:center;flex:none;width:28px;height:30px;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--muted);text-decoration:none}
  .mobile-home:hover{color:var(--accent);background:var(--soft)}
  .mobile-home svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
}

@media(max-width:760px){.header-bell svg{transform:translateX(-1px)}}

@media(max-width:760px){
 .topbar,.promo-dismissed .topbar{height:58px;padding:10px;gap:5px;flex-wrap:nowrap}
 .topbar .resource-nav{position:static;inset:auto;display:flex;flex:1;min-width:0;justify-content:center;margin:0}
 .topbar .resource-suggest-link{display:none}
 .topbar .resource-total{font-size:9px;padding:3px 5px;white-space:nowrap}
 .topbar .top-actions{margin-left:0;flex-shrink:0}
 .promo .promo-message .promo-sale-five{background:linear-gradient(135deg,#ffb45e,#ff7020);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;text-shadow:none}
 .promo .promo-cta,.promo .promo-cta:hover{background:linear-gradient(135deg,#ffb45e,#ff7020);color:#49250c}
}
@media(max-width:360px){
 .topbar,.promo-dismissed .topbar{padding-inline:6px;gap:3px}
 .topbar .resource-total{font-size:8px;padding-inline:3px}
}

@media(max-width:760px){.promo .promo-message .promo-sale-five{background-image:linear-gradient(135deg,#ffd18a,#ffbc68)}}

@media(max-width:760px){.topbar,.promo-dismissed .topbar{align-items:center}.topbar .resource-nav{align-self:center;align-items:center}.topbar .resource-total{display:inline-flex;align-items:center;line-height:1.4;margin-block:0}}
