/* HG Academy public experience. Preserve existing course/editor layout. */
.hga-public-shell{display:block;width:100%;max-width:1250px;margin:0 auto;padding:20px 18px 48px;box-sizing:border-box;clear:both;font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#17243b}
.hga-masthead{display:flex;align-items:center;justify-content:space-between;clear:both;width:100%;box-sizing:border-box;gap:16px;margin:8px 0 26px;padding:20px 24px;border-radius:14px;background:linear-gradient(115deg,var(--hga-school-accent,#153876),#183e86 70%,#b91c1c);color:#fff}
.hga-masthead-brand{display:flex;gap:14px;align-items:center;min-width:0;flex:1}.hga-masthead-brand img,.hga-masthead-symbol{width:56px;height:56px;flex:0 0 56px;border-radius:12px;object-fit:contain;background:#fff;color:#163a80;display:grid;place-items:center;font-size:21px;font-weight:900}
.hga-masthead strong{font-size:22px;color:#fff}.hga-masthead p{margin:4px 0 0;color:#edf2ff;font-size:14px}.hga-masthead-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.hga-masthead-actions a{color:#fff;text-decoration:none;font-weight:650;white-space:nowrap}.hga-masthead-auth{background:#fff;color:#173e80;border-radius:8px;padding:9px 14px}.hga-masthead-actions a.hga-masthead-auth{color:#173e80}.hga-masthead-compact{padding-top:11px;padding-bottom:11px}
.hga-public-section{min-width:0;margin:0 0 30px}.hga-public-section h2{font-size:23px;margin:0 0 14px}.hga-public-heading h1{font-size:30px;margin-bottom:4px}
.hga-showcase-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:10px 0 30px}
.hga-showcase-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:18px}
.hga-showcase-columns .hga-showcase-grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
.hga-showcase-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid #e0e6f0;border-radius:14px;background:#fff;box-shadow:0 2px 14px rgba(20,43,84,.04)}
.hga-card-media{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;text-decoration:none;background:#edf2fa}.hga-card-media img{width:100%;height:100%;object-fit:cover;display:block}.hga-card-placeholder{height:100%;width:100%;display:grid;place-items:center;background:linear-gradient(120deg,#e6edf8,#d4dff0);color:#294778;font-weight:800;font-size:24px}
.hga-card-price{position:static;margin-left:auto;background:#e8effe;color:#153e81;border-radius:20px;padding:5px 10px;font-size:12px;font-weight:750;white-space:nowrap}
.hga-card-body{padding:16px;display:flex;flex:1;flex-direction:column;min-height:165px}.hga-card-kind{font-size:11px;font-weight:700;color:#1c58a4;text-transform:uppercase;letter-spacing:.05em}.hga-card-body h3{margin:6px 0 8px;font-size:18px;line-height:1.3;overflow-wrap:anywhere}.hga-card-body h3 a{color:#17243b;text-decoration:none}.hga-card-body p{color:#637087;font-size:13px;line-height:1.45;margin:0 0 12px}.hga-card-body p.hga-card-description{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.hga-card-meta{display:flex;justify-content:space-between;gap:8px;color:#62718c;font-size:12px;margin-top:auto;padding-bottom:10px}
.hga-card-cta{display:flex;align-items:center;justify-content:center;margin-top:auto;gap:8px;background:#244f9b;color:#fff;text-decoration:none;padding:10px 13px;border-radius:8px;font-weight:600;font-size:13px}.hga-card-cta:hover{color:#fff;background:#173b7a}
.hga-public-shell > .hga-masthead,.hg-single-course > .hga-masthead{float:none;clear:both;flex:0 0 auto;grid-column:1/-1;width:100%;max-width:none}
.hga-video-surface{position:relative;aspect-ratio:16/9;width:100%;overflow:hidden;background:#0c1626}.hga-video-surface iframe,.hga-video-surface video{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:100%;border:0;object-fit:contain}
.hg-single-course .hg-price-enroll{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.hg-single-course .hg-price-enroll .actions{order:10;flex:0 0 100%;margin-top:3px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px}
.hg-single-course .hg-price-enroll .actions button{display:inline-flex;align-items:center;gap:8px;border:1px solid #d6deec;background:#fff;color:#264575;border-radius:8px;font-size:13px;font-weight:600;padding:8px 14px;cursor:pointer}
.hg-single-course .hg-price-enroll .actions button:hover{background:#f2f6ff}
.hg-single-course .hg-price-enroll .actions .hga-action-link,.hg-single-course .hg-price-enroll .actions .hga-classmates summary{display:inline-flex;align-items:center;gap:6px;border:1px solid #d6deec;background:#fff;color:#264575;border-radius:8px;font-size:13px;font-weight:600;line-height:13px;padding:8px 14px;text-decoration:none;cursor:pointer;list-style:none}
.hg-single-course .hg-price-enroll .actions a.hga-action-link:hover,.hg-single-course .hg-price-enroll .actions .hga-classmates summary:hover{background:#f2f6ff;color:#264575}
.hg-single-course .hg-price-enroll .actions .hga-action-link.is-static{cursor:default}
.hg-single-course .hga-classmates{position:relative}.hg-single-course .hga-classmates summary::-webkit-details-marker{display:none}
.hg-single-course .hga-classmates-panel{position:absolute;z-index:20;left:0;top:calc(100% + 6px);width:min(320px,86vw);max-height:300px;overflow:auto;padding:12px;background:#fff;border:1px solid #d6deec;border-radius:12px;box-shadow:0 10px 30px rgba(0,29,110,.16);color:#0b2155;font-size:13px}
.hg-single-course .hga-classmates-panel ul{list-style:none;margin:8px 0 0;padding:0}.hg-single-course .hga-classmates-panel li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:7px 0;border-top:1px solid #edf1f8}
.hg-single-course .hga-classmates-panel li span{display:grid;font-weight:600}.hg-single-course .hga-classmates-panel small{font-weight:400;color:#5b6b85}.hg-single-course .hga-classmates-panel em{font-style:normal;font-size:12px;color:#5b6b85;white-space:nowrap}
.hg-single-course .hg-price-enroll .enroll-btn{display:inline-flex;align-items:center;gap:8px}.hg-single-course .hg-price-enroll .enroll-btn .hga-enroll-icon{flex:0 0 auto}
.hg-single-course .hg-course-eye,.hg-single-course .hg-course-login,.hg-single-course .hg-course-locked{margin-left:auto;flex:0 0 42px;min-width:42px;width:42px;min-height:34px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;box-sizing:border-box;text-align:center}
.hg-single-course .hg-course-locked{background:#f2f4f8;border:1px solid #e2e8f0;color:#69758d;opacity:1}
.hg-single-course .hg-course-login{width:auto;min-width:64px;flex-basis:64px;font-size:12px}
.hg-single-course .hg-lesson-item{display:flex;align-items:center;gap:8px;min-width:0}.hg-single-course .hg-lesson-item>span:nth-child(2){flex:1;min-width:0}
.hg-single-course .hga-announcement-toggle{border:0;background:none;color:#244f9b;cursor:pointer;font-weight:600;font-size:13px}
.hg-single-course .hg-module-chevron{margin-left:auto}
.hga-mobile-quickbar{display:none}
@media(max-width:850px){.hga-showcase-columns{gap:12px}.hga-showcase-columns .hga-showcase-grid{grid-template-columns:1fr}}
@media(max-width:720px){.hga-masthead{padding:13px;gap:8px;flex-wrap:wrap}.hga-masthead strong{font-size:18px}.hga-masthead-actions a{font-size:12px}.hga-masthead-actions{margin-left:auto}.hga-public-shell{width:calc(100% - 19px);padding:14px 0 70px}.hga-landing-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px}.hga-landing-columns .hga-showcase-grid{grid-template-columns:minmax(0,1fr)}.hga-landing-columns .hga-card-body{padding:9px;min-height:155px}.hga-landing-columns .hga-card-body h3{font-size:14px}.hga-landing-columns .hga-card-meta{font-size:11px;flex-wrap:wrap}.hga-landing-columns .hga-card-kicker{flex-wrap:wrap;gap:5px}.hga-landing-columns .hga-card-price{margin-left:0}.hga-landing-columns .hga-card-cta{font-size:11px;padding:9px 6px}.hga-landing-columns .hga-public-section h2{font-size:19px}
}

.hga-wishlist-login{display:inline-flex;align-items:center;gap:8px;border:1px solid #d6deec;background:#fff;color:#264575;border-radius:8px;font-size:13px;font-weight:600;padding:8px 14px;text-decoration:none}
.hga-portal-notice{max-width:750px;margin:35px auto;padding:22px;background:#fff;border:1px solid #d8e2f2;border-radius:12px}
.hga-my-course-actions .hg-btn{padding:7px 12px;font-size:12px}

/* Catalog filters, cards and masthead. */
.hga-card-kicker{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.hga-card-context{display:block;margin:3px 0 6px;color:#526982;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hga-card-instructor{display:inline-flex;align-items:center;gap:5px;min-width:0;overflow:hidden;text-overflow:ellipsis}
.hga-course-archive{width:100%;min-width:0;box-sizing:border-box}
.hga-archive-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.hga-archive-heading h2{margin:0;font-size:21px}
.hga-course-filters{display:flex;flex-direction:row;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 18px;padding:12px;background:#f7f9fd;border:1px solid #e0e7f1;border-radius:12px;max-width:100%;box-sizing:border-box}
.hga-course-filters input,.hga-course-filters select{box-sizing:border-box;height:40px;border:1px solid #cbd6e5;border-radius:8px;background:#fff;color:#253c62;font-size:12px;padding:7px 9px;min-width:0;flex:1 1 90px}
.hga-course-filters .hga-filter-search{flex:2 1 140px}
.hga-filter-actions{display:flex;gap:8px;flex:1 1 165px}
.hga-filter-btn{flex:1 1 0;min-height:40px;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-radius:8px;font-size:12px;font-weight:700;padding:0 12px;text-decoration:none;border:1px solid #244f9b;cursor:pointer}
.hga-filter-submit{background:#244f9b;color:#fff}
.hga-filter-reset{background:#fff;color:#244f9b}
.hga-filter-reset:hover{background:#eaf1ff}
.hga-landing-columns .hga-showcase-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
@media(max-width:850px){.hga-landing-columns .hga-showcase-grid{grid-template-columns:1fr}}
@media(max-width:720px){.hga-landing-columns .hga-showcase-grid{grid-template-columns:minmax(0,1fr)}.hga-course-filters{gap:6px;padding:8px}.hga-course-filters input,.hga-course-filters select{flex:1 1 80px;font-size:11px;padding:5px}.hga-course-filters .hga-filter-search{flex:1 1 100%}.hga-card-body{padding:12px}}

/* PATCH011: Keep the Archive masthead ABOVE the course grid, never as a side column. */
.hga-course-archive-page{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  width:calc(100% - 38px);
  max-width:1280px;
  margin:0 auto;
  padding:20px 0 54px;
  clear:both;
  float:none;
  min-width:0;
  box-sizing:border-box;
}
.hga-course-archive-page > .hga-masthead{
  align-self:stretch;
  flex:none;
  width:100%;
  margin:0 0 22px;
  float:none;
  clear:both;
  box-sizing:border-box;
}
.hga-course-archive-page > .hga-course-archive{
  display:block;
  flex:none;
  width:100%;
  min-width:0;
  clear:both;
}
.hga-course-archive-page .hga-showcase-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr))}
/* Public archive desktop: one aligned horizontal row with equal Search/Reset buttons. */
.hga-course-archive-page .hga-course-filters{
  display:grid;
  grid-template-columns:minmax(190px,1.8fr) repeat(5,minmax(84px,1fr)) minmax(154px,1.25fr);
  gap:10px;
  align-items:stretch;
  width:100%;
  max-width:100%;
}
.hga-course-filters input,.hga-course-filters select{
  width:100%;
  min-width:0;
  height:43px;
  margin:0;
  box-sizing:border-box;
}
.hga-course-filters .hga-filter-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  width:100%;
  min-width:0;
  align-items:stretch;
}
.hga-course-filters .hga-filter-btn{
  width:100%;
  min-width:0;
  min-height:43px;
  line-height:1.2;
  padding:9px 8px;
  text-align:center;
  box-sizing:border-box;
}
/* On the two-column Academy portal, filters reflow within the right column. */
.hga-landing-columns .hga-course-filters{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch;
  gap:8px;
}
.hga-landing-columns .hga-course-filters .hga-filter-search,
.hga-landing-columns .hga-course-filters .hga-filter-actions{grid-column:1 / -1}
.hga-landing-columns .hga-course-archive{width:100%;min-width:0}
.hga-landing-columns > .hga-public-section{min-width:0}
@media(max-width:1050px){
  .hga-course-archive-page .hga-course-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
  .hga-course-archive-page .hga-course-filters .hga-filter-search{grid-column:1 / -1}
  .hga-course-archive-page .hga-course-filters .hga-filter-actions{grid-column:span 2}
}
@media(max-width:720px){
  .hga-course-archive-page{width:calc(100% - 19px);padding:12px 0 60px}
  .hga-course-archive-page .hga-course-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .hga-course-archive-page .hga-course-filters .hga-filter-actions{grid-column:1 / -1}
  .hga-landing-columns .hga-course-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hga-course-archive-page .hga-masthead{margin-bottom:16px}
  .hga-course-archive-page .hga-showcase-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr))}
}
@media(max-width:420px){
  .hga-course-archive-page .hga-showcase-grid{grid-template-columns:1fr}
}

.hga-masthead-brand strong a{color:inherit;text-decoration:none}
.hga-applications{width:100%;max-width:1000px;margin:0 auto;padding:24px;box-sizing:border-box;overflow-wrap:anywhere}
.hga-application-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:16px}
.hga-application-grid article,.hga-application-grid>div{min-width:0}
@media(max-width:768px){
  .hga-applications{padding:10px 0 28px}
}
.hga-watch-controls:not([hidden]){display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px;background:#111e32;color:#fff}
.hga-watch-controls button{min-height:42px;border:0;border-radius:8px;padding:6px 12px;background:#edf3ff;color:#172c55;font-weight:700}
.hga-watch-controls progress{flex:1 1 90px;min-width:0;accent-color:#60a5fa}
.hga-watch-controls output{min-width:3em;text-align:right}
@media(min-width:601px) and (max-width:720px){body.admin-bar .hga-mobile-quickbar{top:46px}}

@media(max-width:768px){
  .hga-public-shell,.hga-course-archive-page{width:calc(100% - 19px);max-width:none;margin-inline:auto;padding-inline:0}
  .hg-single-course .hg-tab-content{width:100%;min-width:0;box-sizing:border-box}
}
.hga-player-controls [data-seek]{flex:1 1 110px;min-width:0;accent-color:#60a5fa}
.hga-player-controls label{color:#e4edff;font-size:13px;align-items:center;gap:5px;white-space:nowrap;flex:0 0 auto;margin:0}
.hga-player-controls label:not([hidden]){display:inline-flex}
.hga-player-controls [data-volume]{width:70px}
.hga-player-controls :focus-visible{outline:2px solid #93c5fd;outline-offset:2px}
.hga-video-frame:fullscreen{justify-content:center}
.hga-video-frame:fullscreen .hga-video-surface{flex:1;aspect-ratio:auto}
.hga-video-frame{display:block;width:100%;min-width:0;box-sizing:border-box;padding:3px;border:1px solid #5874ac;border-radius:12px;background:#111f39;overflow:hidden}
.hga-video-stage{position:relative;min-width:0;overflow:hidden;border-radius:8px;background:#0c1626}
.hga-video-interface:empty{display:none}
.hga-video-interface>.hga-watch-controls:not([hidden]){background:#0c1626;color:#fff;padding:8px 10px;gap:8px}
.hga-video-stage:has(video) .hga-video-interface{position:absolute;z-index:1;inset:auto 0 0}
.hga-video-stage:has(video) .hga-video-interface>.hga-watch-controls:not([hidden]){background:linear-gradient(transparent,#0b1426 38%);padding-top:20px}
.hga-video-interface .hga-watch-controls button{background:#24385c;color:#fff}
.hga-video-interface .hga-watch-controls output{white-space:nowrap}
.hga-video-frame:fullscreen .hga-video-stage{display:flex;flex-direction:column;height:100%;border-radius:0}
@media(max-width:480px){
 .hga-video-interface>.hga-watch-controls:not([hidden]){gap:5px;padding-inline:6px}
 .hga-video-interface .hga-watch-controls button{min-height:40px;padding-inline:8px}
 .hga-video-interface .hga-player-controls [data-seek]{flex-basis:80px}
}

.hga-verified-watch:not([hidden]){display:flex;align-items:center;gap:6px;flex:1 0 100%;font-size:12px}
.hga-verified-watch progress{max-width:180px}
.hga-engine-frame{--plyr-color-main:#416ed0;--plyr-control-spacing:8px}
.hga-engine-frame .hga-video-surface{aspect-ratio:auto}
.hga-engine-frame .hga-video-surface > video-player{display:block;width:100%}
.hga-engine-frame video-neutral-skin{display:block;width:100%}
.hga-engine-frame video-neutral-skin > :is(video,youtube-video,vimeo-video){position:relative;display:block;width:100%;height:auto;aspect-ratio:16/9}
.hga-engine-frame .hga-video-surface > video{position:relative;height:auto;aspect-ratio:16/9}
.hga-engine-frame .hga-video-surface > iframe{position:relative;height:auto;aspect-ratio:16/9}
.hga-engine-frame .hga-video-interface{position:static;display:block;background:#0c1626;color:#fff;font-size:12px}
.hga-engine-frame .hga-video-interface:has(> [hidden]):not(:has(> :not([hidden]))){display:none}
.hga-engine-status,.hga-engine-frame .hga-verified-watch{margin:0;padding:6px 10px}
.hg-lesson-video:has(.hga-engine-frame){display:block;aspect-ratio:auto}

/* PATCH012: restore only the four mobile navigation controls; never restyle course editor action buttons. */
@media (max-width:720px) {
  .hga-public-shell, .hga-course-archive-page {
    width:calc(100% - 19px);
    max-width:none;
    min-width:0;
    margin-inline:auto;
    padding-inline:0;
    box-sizing:border-box;
  }
  .hga-public-shell > :is(section, div, main, header),
  .hga-public-shell .hga-landing-columns,
  .hga-public-shell .hga-public-section,
  .hga-public-shell .hga-course-archive,
  .hga-public-shell .hga-showcase-grid,
  .hga-public-shell .hg-dashboard-layout,
  .hga-public-shell .hg-tab-content,
  .hga-public-shell .hg-course-overview,
  .hga-public-shell .hg-course-header,
  .hga-public-shell .hg-course-content-section,
  .hga-public-shell .hg-lesson-layout {
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }
  .hga-public-shell .hg-single-course {
    width:100%;
    max-width:none;
    padding:0;
    margin-inline:auto;
  }
  .hg-single-course.hg-single-course--direct {
    width:calc(100% - 19px);
    max-width:none;
    padding:0;
    margin-inline:auto;
    box-sizing:border-box;
  }
  .hg-single-course :is(.hg-course-overview,.hg-course-header,.hg-course-content-section,.hg-tab-content),
  .hg-lesson-player :is(.hg-lesson-layout,.hg-lesson-main,.hg-lesson-sidebar) {
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }
  .hg-lesson-player{width:calc(100% - 19px);max-width:none;margin-inline:auto;padding-inline:0;box-sizing:border-box}
  .hga-public-shell :is(img,video,iframe),.hg-single-course :is(img,video,iframe){max-width:100%}
  .hga-mobile-quickbar {
    position:sticky;
    top:0;
    z-index:99990;
    margin:0 0 12px;
    border-radius:10px;
    background:#fff;
    box-shadow:0 4px 16px #10204035;
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    justify-items:center;
    align-items:center;
    width:100%;
    min-width:0;
    min-height:56px;
    padding:7px 10px;
    gap:8px;
  }
  .hga-mobile-quickbar > :is(a,button) {
    box-sizing:border-box;
    appearance:none;
    display:flex;
    align-items:center;
    justify-content:center;
    width:44px;
    height:42px;
    min-width:44px;
    min-height:42px;
    margin:0;
    padding:0;
    border:1px solid #d7e2f2;
    border-radius:10px;
    background:#f1f5fd;
    color:#173b78;
    font:600 22px/1 system-ui,-apple-system,Segoe UI,sans-serif;
    text-align:center;
    text-decoration:none;
    box-shadow:none;
    cursor:pointer;
  }
  .hga-mobile-quickbar > :is(a,button):hover,
  .hga-mobile-quickbar > :is(a,button):focus-visible{background:#e2ecff;color:#123466;outline-offset:2px}
  .hga-mobile-quickbar > .hga-quick-toggle[aria-expanded="true"]{background:#dce8ff}
  .hga-menu-bars{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;width:22px;height:22px;margin:0;pointer-events:none}
  .hga-menu-bars > span{display:block;width:20px;height:2.5px;border-radius:3px;background:currentColor;flex:0 0 2.5px}
  .hga-mobile-quickbar nav{
    position:fixed;
    top:var(--hga-mobile-nav-top, 60px);
    left:9.5px;
    right:9.5px;
    bottom:calc(7px + env(safe-area-inset-bottom, 0px));
    width:auto;
    height:auto;
    max-height:none;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    -ms-overflow-style:none;
    padding:12px;
    box-sizing:border-box;
    background:#fff;
    border:1px solid #d5deea;
    border-radius:12px;
    box-shadow:0 8px 28px #14275035;
    z-index:99991;
  }
  .hga-mobile-quickbar nav::-webkit-scrollbar{width:0;height:0;display:none}
  body.hga-mobile-menu-open{overflow:hidden}
  .hga-mobile-quickbar nav .hg-sidebar{display:block;width:100%;max-width:none;border:0;margin:0;padding:0;box-shadow:none;background:transparent;overflow:visible;max-height:none}
  .hga-mobile-quickbar nav .hg-sidebar ul{list-style:none;padding:0;margin:0}
  .hga-mobile-quickbar nav .hg-sidebar li{list-style:none;margin:2px 0;padding:0}
  .hga-mobile-quickbar nav .hg-sidebar .section-title{margin:12px 0 4px;padding:12px 12px 5px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#64748b;border-top:1px solid #e7ecf4}
  .hga-mobile-quickbar nav .hg-sidebar a{min-height:44px;display:flex;gap:10px;align-items:center;width:100%;padding:10px 12px;text-decoration:none;font-size:14px;line-height:1.35;color:#283d60;background:transparent;border-radius:8px}
  .hga-mobile-quickbar nav .hg-sidebar a:hover,.hga-mobile-quickbar nav .hg-sidebar a:focus-visible{background:#eaf1ff;color:#123c80}
  .hga-mobile-quickbar nav .hg-sidebar a.logout{color:#ad2937}
  .hga-mobile-quickbar nav .hga-nav-current-course{border-bottom:1px solid #e1e9f6;padding-bottom:9px;margin-bottom:8px}
  .hga-mobile-quickbar nav .hga-nav-current-course a{min-height:44px}
  .hga-mobile-quickbar nav .hga-nav-current-course h2{margin:4px 12px 4px;padding:0;font-size:11px;font-weight:700;line-height:1.4;text-transform:uppercase;letter-spacing:.04em;color:#64748b}
  /* The desktop sidebar remains unchanged; the mobile bar uses its exact menu instead. */
  .hga-public-shell .hg-dashboard-layout > .hg-sidebar{display:none}

  .hga-mobile-quickbar nav[hidden]{display:none}
  .hga-mobile-quickbar nav section{margin:0 0 6px}
  .hga-mobile-quickbar nav a{font-size:14px;min-height:41px;display:flex;align-items:center;border-radius:6px;padding:9px 11px;box-sizing:border-box}
  .hga-mobile-quickbar nav a:focus-visible{outline:2px solid #3366c4;outline-offset:1px}
}

/* PATCH013 — Mobile dashboard, profile, school and course sections match the Academy header width.
   Override legacy inline dashboard <style> without !important or changing desktop styling. */
@media (max-width:720px) {
  .hga-public-shell,
  .hga-course-archive-page,
  .hga-public-shell .hg-container{
    width:calc(100vw - 19px);
    max-width:none;
    min-width:0;
    margin-left:auto;
    margin-right:auto;
    padding-left:0;
    padding-right:0;
    box-sizing:border-box;
  }
  .hga-public-shell :is(.hg-dashboard,.hga-profile,.hga-director-overview,.hga-portal-notice,.hga-course-archive,.hg-single-course,.hga-public-section,.hg-lesson-player,.hg-course-player),
  .hga-public-shell .hg-dashboard-layout,
  .hga-public-shell .hg-dashboard-layout > div:not(.hg-sidebar),
  .hga-public-shell .hg-tab-content,
  .hga-public-shell .hg-actions,
  .hga-public-shell .hg-announcement,
  .hga-public-shell .hg-stats-grid,
  .hga-public-shell .hga-profile-card,
  .hga-public-shell .hga-landing-columns{
    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
  }
  .hga-public-shell .hg-dashboard,
  .hga-public-shell .hga-profile,
  .hga-public-shell .hga-director-overview{
    margin:0;
    padding:0 0 22px;
  }
  .hga-public-shell .hg-dashboard-layout{display:block}
  .hga-public-shell .hg-dashboard-layout > div:not(.hg-sidebar){width:100%;max-width:100%;min-width:0}
  .hga-public-shell .hg-dashboard :is(.hg-dashboard-header,.hg-announcement,.hg-actions,.hg-stat-card),
  .hga-public-shell .hga-profile :is(.hga-profile-card,.hga-profile-header){max-width:100%;box-sizing:border-box}
  .hga-public-shell :is(.hg-table-wrap,.hga-table-wrap){max-width:100%;overflow-x:auto}
  .hga-public-shell :is(img,video,iframe){max-width:100%}
}

/* Checkboxes and radios keep their native size: generic 'input{width:100%;min-height:40px}' rules must not stretch them. */
.hga-public-shell input[type=checkbox],.hga-public-shell input[type=radio]{width:16px;height:16px;min-width:16px;min-height:0;max-width:none;flex:0 0 16px;display:inline-block;margin:0 6px 0 0;padding:0;vertical-align:middle;box-sizing:border-box}

/* Mobile hamburger panel: width fits the longest menu label; links styled like the Academy Management L1 step buttons. */
@media (max-width:720px){
  .hga-mobile-quickbar nav{right:auto;width:max-content;min-width:200px;max-width:calc(100vw - 19px)}
  .hga-mobile-quickbar nav .hg-sidebar a,
  .hga-mobile-quickbar nav .hga-nav-current-course a{width:auto;min-height:42px;margin:3px 0;padding:10px 13px;border:1px solid #e2e9f3;border-radius:8px;background:#fff;color:#364961;font-weight:600;font-size:13px;white-space:nowrap;transition:background .16s,color .16s}
  .hga-mobile-quickbar nav .hg-sidebar a:hover,
  .hga-mobile-quickbar nav .hg-sidebar a:focus-visible,
  .hga-mobile-quickbar nav .hga-nav-current-course a:hover{background:#eff5ff;color:#133e7a;border-color:#bad2f2}
  .hga-mobile-quickbar nav .hg-sidebar a.active{border-color:#bad2f2;background:#eaf3ff;color:#133e7a;box-shadow:inset 0 -3px 0 #c72e40}
  .hga-mobile-quickbar nav .hg-sidebar a.logout{color:#ad2937;border-color:#f1d3d7}
  .hga-mobile-quickbar nav .hg-sidebar .section-title{white-space:nowrap}
}
/* School Director dashboard (public portal). */
.hga-director-overview{max-width:1060px;margin:20px auto;padding:24px;background:#fff;border:1px solid #dde5f0;border-radius:16px;box-shadow:0 8px 26px #12284b0f;box-sizing:border-box}
.hga-director-head{text-align:center;max-width:680px;margin:0 auto 18px}
.hga-director-eyebrow{display:inline-block;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#c72e40;margin-bottom:6px}
.hga-director-head h1{margin:0 0 8px;font-size:clamp(22px,4vw,30px);line-height:1.2;color:#133e7a}
.hga-director-head p{margin:0;padding:12px 16px;font-size:14px;line-height:1.55;color:#3d5170;background:#f6f9fe;border:1px solid #e1e9f6;border-radius:10px}
.hga-director-manage{display:flex;align-items:center;justify-content:center;width:100%;min-height:46px;margin:0 0 20px;padding:10px 16px;box-sizing:border-box;border:1px solid #bad2f2;border-radius:10px;background:#eaf3ff;color:#133e7a;font-weight:700;font-size:15px;text-decoration:none;box-shadow:inset 0 -3px 0 #c72e40;transition:background .16s}
.hga-director-manage:hover,.hga-director-manage:focus-visible{background:#dcebff;color:#0f3270}
.hga-director-empty{text-align:center;color:#5b6b82}
@media (max-width:720px){.hga-public-shell .hga-director-overview{padding:14px}}
/* School card: counts aligned right, vertically centered on their line. */
.hga-school-card .hga-card-line{display:flex;align-items:center;justify-content:space-between;gap:10px}
.hga-school-card .hga-card-count{margin-left:auto;flex:0 0 auto;white-space:nowrap;font-size:12px;font-weight:700;color:#133e7a;background:#eaf3ff;border:1px solid #bad2f2;border-radius:999px;padding:3px 10px;line-height:1.3}.hga-school-card .hga-card-kind--right{margin-left:auto}
.hga-school-card .hga-card-count--left{margin-left:0;white-space:normal}
/* Live search status under the course filters. */
.hga-live-search-status:empty{display:none}
.hga-live-search-status{margin:8px 0 12px;padding:9px 14px;border-radius:8px;font-size:13px;font-weight:600}
.hga-live-search-status.has-results{background:#eaf3ff;color:#133e7a;border:1px solid #bad2f2}
.hga-live-search-status.no-results{background:#fff4f4;color:#a92732;border:1px solid #f0c4c9}
/* School card: "Director" left, full name right, cut with … when space runs out. */
.hga-school-card .hga-card-director{margin:-2px 0 6px}
.hga-school-card .hga-card-director-name{min-width:0;flex:1 1 auto;text-align:right;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:600;color:#243b61}
/* /hg-academy/ landing: school and course cards have the same size; buttons sit at the bottom. */
.hga-landing-columns .hga-showcase-card{min-height:400px;height:100%}
.hga-landing-columns .hga-showcase-card .hga-card-body{display:flex;flex-direction:column;flex:1 1 auto}
.hga-landing-columns .hga-showcase-card .hga-card-cta{margin-top:auto}
/* School description: always one line (… when longer), so every card keeps the same size. */
.hga-school-card .hga-school-desc{display:block;margin:0 0 8px;min-height:1.5em;line-height:1.5;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-line-clamp:unset}
.hga-landing-columns .hga-showcase-card{height:400px;min-height:400px}
/* /hg-academy/ landing: both column headings reserve the same height (two lines), so the
   school and course cards always start on the same line even when "Academy Courses" wraps. */
.hga-landing-columns .hga-archive-heading{min-height:52px;box-sizing:border-box}
.hga-landing-columns .hga-archive-heading{align-items:flex-start}
.hga-landing-columns .hga-archive-heading h2{line-height:1.2}
/* ==========================================================================
   Unified school/course card rows. Every row has a FIXED height, so row N of
   one card is always level with row N of the card beside it, whatever the text.
   Six text styles only:
     1 kind   11px uppercase bold blue      (row 1: type left, owner/teachers right)
     2 title  14px bold, 2 lines max + …    (names are often long: small size)
     3 desc   12.5px grey, 2 lines max + …
     4 info   label 11px uppercase + value 13px semi-bold, 1 line + …
     5 pill   12px bold blue on light blue  (counts / author)
     6 button 13px semi-bold white on blue
   ========================================================================== */
.hga-card-grid{display:flex;flex-direction:column;gap:0;padding:14px 14px 14px}
.hga-card-grid .hga-row{margin:0;min-width:0}
.hga-card-grid .hga-row-kind{display:flex;align-items:center;justify-content:space-between;gap:10px;height:18px;margin-bottom:8px;font-size:11px;line-height:18px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#1c58a4}
.hga-card-grid .hga-row-kind span{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.hga-card-grid .hga-row-kind span:last-child{flex:0 1 auto;text-align:right}
.hga-card-grid .hga-row-title{height:2.6em;margin-bottom:6px;font-size:14px;line-height:1.3;font-weight:700;color:#172b46;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.hga-card-grid .hga-row-title a{color:inherit;text-decoration:none}
.hga-card-grid .hga-row-desc{height:2.9em;margin-bottom:10px;font-size:12.5px;line-height:1.45;color:#586c87;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal}
.hga-card-grid .hga-row-info{display:flex;align-items:center;justify-content:space-between;gap:10px;height:22px;margin-bottom:10px;padding-top:8px;border-top:1px solid #edf1f7;box-sizing:content-box}
.hga-card-grid .hga-row-info span{flex:0 0 auto;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#1c58a4}
.hga-card-grid .hga-row-info strong{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:right;font-size:13px;font-weight:600;color:#243b61}
.hga-card-grid .hga-row-pills{display:flex;align-items:center;justify-content:space-between;gap:8px;height:26px;margin-bottom:12px}
.hga-card-grid .hga-row-pills span{min-width:0;max-width:60%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;font-weight:700;line-height:1.3;color:#133e7a;background:#eaf3ff;border:1px solid #bad2f2;border-radius:999px;padding:4px 10px}
.hga-card-grid .hga-card-cta{margin-top:auto}
/* ===== Course page (course-single.php) ===== */
/* Header: price left / enroll right, then Wishlist left / Share right — each pair vertically centered. */
.hg-price-enroll{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px 14px}
.hg-price-enroll .price{margin:0;justify-self:start}
.hg-price-enroll > form,.hg-price-enroll > .enroll-btn,.hg-price-enroll > .hg-checkout-unavailable{justify-self:end;margin:0}
.hg-price-enroll .actions{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0}
/* Tabs (Course Info, Reviews, Q&A...) stay on one line and slide horizontally. */
.hg-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.hg-tabs a{flex:0 0 auto;white-space:nowrap}
/* Course content: "Login" and the lock share one width; "?" explains the lock. */
.hg-lesson-item .hg-course-login,.hg-lesson-item .hg-course-locked{flex:0 0 72px;width:72px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:4px;margin-left:auto;min-height:28px;border-radius:7px}
.hg-lesson-item .hg-course-locked{border:1px solid #e6ebf3;background:#f8fafc;cursor:help}
.hga-lock-help{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:#dbe6f5;color:#133e7a;font-size:11px;font-weight:800;line-height:1}
/* Meta box: label left, value right. */
.hg-meta-box .item{display:flex;align-items:center;justify-content:space-between;gap:10px}
.hg-meta-box .item strong{flex:0 0 auto}
.hg-meta-box .item span{min-width:0;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Instructor card: profile left; "Since" top right, "View Profile" bottom right. */
.hga-instructor-card{display:flex;justify-content:space-between;align-items:stretch;gap:12px;padding:16px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:8px}
.hga-instructor-profile{display:flex;align-items:center;gap:12px;min-width:0}
.hga-instructor-profile img,.hga-instructor-avatar{width:48px;height:48px;border-radius:50%;flex:0 0 48px;object-fit:cover}
.hga-instructor-avatar{display:flex;align-items:center;justify-content:center;background:#e5e7eb;font-size:24px}
.hga-instructor-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hga-instructor-role{font-size:13px;color:#6b7280}
.hga-instructor-side{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;gap:8px;flex:0 0 auto;text-align:right}
.hga-instructor-since{font-size:12px;font-weight:700;color:#133e7a;background:#eaf3ff;border:1px solid #bad2f2;border-radius:999px;padding:3px 10px;white-space:nowrap}
.hga-since-short{display:none}
.hga-instructor-link{color:#1b4a98;text-decoration:none;font-size:13px;font-weight:600;white-space:nowrap}
@media (max-width:720px){
  .hga-since-full{display:none}.hga-since-short{display:inline}
  /* Card pills: one on top, one below. */
  .hga-card-grid .hga-row-pills{flex-direction:column;align-items:flex-start;justify-content:center;height:auto;gap:6px}
  .hga-card-grid .hga-row-pills span{max-width:100%}
  .hga-landing-columns .hga-showcase-card{height:auto;min-height:400px}
}/* Higher specificity than the inline <style> of course-single.php. */
html body .hg-price-enroll{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px 14px}
html body .hg-tabs{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}
html body .hg-tabs a{flex:0 0 auto;white-space:nowrap}
/* Course header: name left, category right; facts in two columns (left aligned / right aligned). */
.hga-course-titlebar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}
.hga-course-titlebar h1{margin:0;min-width:0;flex:1 1 auto;overflow-wrap:anywhere}
.hga-course-titlebar .category{flex:0 0 auto;white-space:nowrap}
html body .hga-course-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px;margin:0 0 14px}
html body .hga-course-facts span{white-space:nowrap;min-width:0;overflow:hidden;text-overflow:ellipsis}
html body .hga-course-facts span:nth-child(even){text-align:right}
/* Info box: label on top, value below; two columns, text centred in each. */
html body .hg-meta-box .item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-align:center}
html body .hg-meta-box .item span{text-align:center;white-space:normal}
/* Instructor "Since" never overlaps: it shrinks with … and the side column wraps under the profile when space runs out. */
.hga-instructor-card{flex-wrap:wrap}
.hga-instructor-profile{flex:1 1 160px}
.hga-instructor-side{flex:0 1 auto;min-width:0;max-width:100%}
.hga-instructor-since{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}
/* Card bottom row: side by side when both fit fully written, otherwise one above the other (no … cutting). */
.hga-card-grid .hga-row-pills{flex-wrap:wrap;height:auto;min-height:26px;row-gap:6px}
.hga-card-grid .hga-row-pills span{max-width:100%;overflow:visible;text-overflow:clip}
@media (max-width:720px){
  .hga-card-grid .hga-row-pills{flex-direction:row;align-items:center;justify-content:space-between}
}html body .hg-course-header .title-area .hga-course-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px;margin:0 0 14px}
/* Payout account (tutor portal + school screen). */
.hga-payout-page{max-width:720px;margin:20px auto;padding:22px;background:#fff;border:1px solid #dde5f0;border-radius:16px;box-sizing:border-box}
.hga-payout-box{display:grid;gap:14px}
.hga-payout-current{display:grid;gap:4px;padding:12px 14px;background:#eaf3ff;border:1px solid #bad2f2;border-radius:10px}
.hga-payout-current span{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#1c58a4}
.hga-payout-current strong{font-size:15px;color:#172b46;overflow-wrap:anywhere}
.hga-payout-current small{color:#5b6b82}
.hga-payout-none{margin:0;color:#7a5608;background:#fff7e3;border-left:4px solid #e1a526;padding:10px 12px;border-radius:6px}
.hga-payout-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px 16px}
.hga-payout-form label{display:grid;gap:6px;font-size:13px;font-weight:650;color:#294361}
.hga-payout-form label[hidden]{display:none}
.hga-payout-form input,.hga-payout-form select{min-height:40px;padding:8px 10px;border:1px solid #bdcddd;border-radius:8px;box-sizing:border-box;width:100%}
.hga-payout-save{grid-column:1/-1;justify-self:start;min-height:42px;padding:0 18px;border:0;border-radius:9px;background:#1b4a98;color:#fff;font-weight:700;cursor:pointer}
/* Tutor earnings summary (Withdrawals page) */
.hga-earning-title{font-size:15px;margin:18px 0 8px}
.hga-earning-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:0 0 18px}
.hga-earning-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:4px}
.hga-earning-card span{font-size:11px;color:#6b7280;text-transform:uppercase;letter-spacing:.03em}
.hga-earning-card strong{font-size:16px;color:#111827}
/* School fees (portal) */
.hga-fee-list{display:flex;flex-direction:column;gap:10px}
.hga-fee-card{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#fff;border:1px solid #e5e7eb;border-left:4px solid #f59e0b;border-radius:12px;padding:12px 14px}
.hga-fee-card--paid{border-left-color:#16a34a}.hga-fee-card--partial{border-left-color:#3b82f6}
.hga-fee-main,.hga-fee-amounts{display:flex;flex-direction:column;gap:3px;font-size:13px}
.hga-fee-main span,.hga-fee-amounts span{color:#6b7280;font-size:12px}
.hga-fee-amounts{align-items:flex-end;text-align:right}
@media (max-width:600px){.hga-fee-amounts{align-items:flex-start;text-align:left}}
/* Course price: offer / coupon */
.hg-price-enroll .price .hga-price-old{color:#9ca3af;font-weight:500;margin-right:6px;font-size:.85em}
.hg-price-enroll .price .hga-price-offer{display:block;font-size:11px;font-weight:600;color:#b45309}
.hga-coupon-input{display:block;width:100%;max-width:220px;margin:0 0 6px auto;padding:6px 10px;border:1px solid #d1d5db;border-radius:8px;font-size:13px}
.hga-coupon-error{color:#b91c1c;font-size:12px;margin:0 0 6px;text-align:right}
/* Checkbox: our own centred tick (WordPress' ::before tick was off-centre at 16px) */
.hga-public-shell input[type=checkbox]{-webkit-appearance:none;appearance:none;position:relative;width:16px!important;height:16px!important;min-width:16px;border:1.5px solid #8ca0b3;border-radius:4px;background:#fff center/12px 12px no-repeat;cursor:pointer;margin-top:0;box-shadow:none}
.hga-public-shell input[type=checkbox]::before,.hga-public-shell input[type=checkbox]:checked::before{content:none!important;display:none!important}
.hga-public-shell input[type=checkbox]:checked{background-color:#1d4ed8;border-color:#1d4ed8;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6 9.6 3.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
.hga-public-shell input[type=checkbox]:focus-visible{outline:2px solid #93c5fd;outline-offset:1px}
.hga-public-shell input[type=checkbox]:disabled{opacity:.5;cursor:not-allowed}
/* School rooms (HG Connect chat inside HG Academy) */
.hga-rooms-tabs{display:flex;gap:8px;overflow-x:auto;padding:4px 0 10px;margin-bottom:8px}
.hga-rooms-tab{flex:0 0 auto;padding:8px 14px;border:1px solid #dbe4ef;border-radius:999px;background:#fff;color:#0f172a;font-size:13px;font-weight:600;text-decoration:none;white-space:nowrap}
.hga-rooms-tab.is-active{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
.hga-rooms-chat .hg-connect-embed{border-radius:14px;overflow:hidden}
.hga-rooms-chat .hg-connect-embed-profile{background:#fff;border:1px solid #dbe4ef;border-radius:14px;padding:16px}
.hga-rooms-chat .hg-connect-embed-profile-form{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.hga-rooms-chat .hg-connect-embed-profile-form label{display:flex;flex-direction:column;font-size:12px;gap:4px}
.hga-rooms-chat .hg-connect-embed-profile-form input{padding:8px 10px;border:1px solid #bdcddd;border-radius:8px}
/* School rooms (HG Connect chat inside HG Academy) */
.hga-rooms-tabs{display:flex;gap:8px;overflow-x:auto;padding:4px 0 10px;margin-bottom:8px}
.hga-rooms-tab{flex:0 0 auto;padding:8px 14px;border:1px solid #dbe4ef;border-radius:999px;background:#fff;color:#0f172a;font-size:13px;font-weight:600;text-decoration:none;white-space:nowrap}
.hga-rooms-tab.is-active{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
.hga-rooms-chat .hg-connect-embed{border-radius:14px;overflow:hidden}
.hga-rooms-chat .hg-connect-embed-profile{background:#fff;border:1px solid #dbe4ef;border-radius:14px;padding:16px}
.hga-rooms-chat .hg-connect-embed-profile-form{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.hga-rooms-chat .hg-connect-embed-profile-form label{display:flex;flex-direction:column;font-size:12px;gap:4px}
.hga-rooms-chat .hg-connect-embed-profile-form input{padding:8px 10px;border:1px solid #bdcddd;border-radius:8px}
/* Course Q&A */
.hga-qa{display:flex;flex-direction:column;gap:12px}
.hga-qa-notice{margin:0;padding:10px 12px;border-radius:10px;background:#eff6ff;color:#1e3a8a;font-size:13px}
.hga-qa-notice--limit,.hga-qa-notice--length{background:#fef2f2;color:#991b1b}
.hga-qa-form{display:flex;flex-direction:column;gap:8px;background:#fff;border:1px solid #dbe4ef;border-radius:12px;padding:14px}
.hga-qa-form label{font-weight:600;font-size:14px}
.hga-qa-form textarea,.hga-qa-reply textarea{width:100%;box-sizing:border-box;border:1px solid #bdcddd;border-radius:8px;padding:8px 10px;font:inherit}
.hga-qa-form button{align-self:flex-start}
.hga-qa-form small{color:#64748b;font-size:12px}
.hga-qa-item{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:12px 14px;scroll-margin-top:90px}
.hga-qa-item:target{border-color:#1d4ed8;box-shadow:0 0 0 3px #dbeafe}
.hga-qa-q{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap}
.hga-qa-q p{margin:0;flex:1 1 200px;font-weight:600}
.hga-qa-num{color:#64748b;font-size:12px;font-weight:700}
.hga-qa-count{font-size:11px;color:#1d4ed8;background:#eff6ff;border-radius:999px;padding:2px 8px}
.hga-qa-a{margin-top:8px;padding:8px 10px;border-left:3px solid #1d4ed8;background:#f8fafc;border-radius:0 8px 8px 0;font-size:14px}
.hga-qa-a strong{font-size:12px;color:#1d4ed8}.hga-qa-a p{margin:4px 0 0}
.hga-qa-a--wait{border-left-color:#f59e0b;color:#92400e}
.hga-qa-reply{margin-top:8px}.hga-qa-reply summary{cursor:pointer;font-size:13px;color:#1d4ed8}
.hga-qa-reply form{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.hga-qa-empty,.hga-qa-login{color:#64748b;text-align:center;padding:20px}
.hga-rooms-chat .hg-error{margin:6px 0 10px;padding:8px 10px;border-radius:8px;background:#fef2f2;color:#991b1b;font-size:13px}

.hga-connect-saved{margin:8px 0 12px;padding:8px 12px;border-radius:8px;background:#ecfdf5;color:#065f46;font-size:13px;max-width:720px}
.hg-connect-embed-profile-form select{padding:7px 10px;border:1px solid #bdcddd;border-radius:8px;max-width:260px}

.hga-connect-notice{margin:8px 0;padding:8px 12px;border-radius:8px;background:#fff7ed;color:#9a3412;font-size:13px;max-width:720px}

/* School page */
.hga-school-hero{--hga-school-accent:#1d4ed8;background:#fff;border:1px solid #dbe4ef;border-top:4px solid var(--hga-school-accent);border-radius:16px;padding:20px;margin:0 0 26px;box-shadow:0 6px 18px rgba(15,23,42,.05)}
.hga-school-hero-id{display:flex;align-items:center;gap:14px}
.hga-school-hero-logo{width:64px;height:64px;border-radius:14px;object-fit:cover;flex:0 0 64px}
.hga-school-hero-logo--initials{display:flex;align-items:center;justify-content:center;background:var(--hga-school-accent);color:#fff;font-weight:800;font-size:22px}
.hga-school-hero-eyebrow{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--hga-school-accent)}
.hga-school-hero h1{margin:2px 0 0;font-size:26px;line-height:1.2}
.hga-school-hero-tagline{margin:4px 0 0;color:#64748b}
.hga-school-hero-about{margin:14px 0 0;color:#334155;line-height:1.55}
.hga-school-hero-facts{display:flex;flex-wrap:wrap;gap:8px;list-style:none;margin:14px 0 0;padding:0}
.hga-school-hero-facts li{background:#f1f5f9;border-radius:999px;padding:5px 12px;font-size:13px;color:#334155}
.hga-school-hero-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:16px}
.hga-school-auditorium{display:inline-flex;align-items:center;gap:10px;padding:10px 16px;border-radius:12px;background:var(--hga-school-accent);color:#fff!important;text-decoration:none!important;font-size:20px;box-shadow:0 4px 12px rgba(29,78,216,.25)}
.hga-school-auditorium span{display:flex;flex-direction:column;font-size:15px;font-weight:700;line-height:1.2}
.hga-school-auditorium small{font-size:12px;font-weight:500;opacity:.9}
.hga-school-hero-link{font-weight:600;color:var(--hga-school-accent)}
.hga-school-empty{background:#fff;border:1px dashed #cbd5e1;border-radius:12px;padding:16px;text-align:center;color:#64748b;margin:0}
.hga-school-back{margin-top:10px}
@media(max-width:600px){.hga-school-hero{padding:16px}.hga-school-hero h1{font-size:21px}.hga-school-hero-logo{width:52px;height:52px;flex-basis:52px}.hga-school-auditorium{width:100%;box-sizing:border-box}}

/* Sidebar: chat rooms */
.hga-nav-rooms .hga-nav-room-name{display:flex;flex-direction:column;line-height:1.25}
.hga-nav-rooms .hga-nav-room-name small{font-size:11px;color:#64748b;font-weight:500}
/* School page: numbers only (name/logo are in the header above) */
.hga-school-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;list-style:none;margin:0;padding:0}
.hga-school-stats li{background:#f8fafc;border:1px solid #e5edf6;border-radius:12px;padding:10px 6px;text-align:center;display:flex;flex-direction:column;gap:2px}
.hga-school-stats strong{font-size:22px;line-height:1.1;color:var(--hga-school-accent)}
.hga-school-stats span{font-size:12px;color:#64748b;text-transform:uppercase;letter-spacing:.04em}
.hga-school-hero-meta{margin:10px 0 0;color:#475569;font-size:13px;text-align:center}
.hga-school-hero .hga-school-hero-actions{justify-content:center}
@media(max-width:480px){.hga-school-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Join / no access (HG Connect room inside HG Academy) */
.hga-rooms-chat .hg-connect-join,.hga-rooms-chat .hg-connect-no-access{background:#fff;border:1px solid #dbe4ef;border-radius:14px;padding:16px;text-align:center}
.hga-rooms-chat .hg-connect-join h3{margin:0 0 6px;font-size:17px}
.hga-rooms-chat .hg-connect-join p{margin:0 0 12px;color:#475569}
.hga-rooms-chat .hg-connect-join button{padding:9px 22px;border-radius:10px;background:#1d4ed8;color:#fff;border:0;font-weight:700;cursor:pointer}
.hga-rooms-chat .hg-connect-no-access p{margin:0;color:#9a3412}
/* Q&A v2: send button inside the box, collapsible questions */
.hga-qa-box{position:relative}
.hga-qa-box textarea{width:100%;box-sizing:border-box;border:1px solid #bdcddd;border-radius:12px;padding:10px 52px 10px 12px;font:inherit;resize:vertical;min-height:84px}
.hga-qa-send{position:absolute;right:10px;bottom:12px;width:36px;height:36px;border-radius:50%;border:0;background:#1d4ed8;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 3px 8px rgba(29,78,216,.3);padding:0}
.hga-qa-send:hover{background:#1e40af}.hga-qa-send svg{margin-left:2px}
details.hga-qa-item{padding:0;overflow:hidden}
details.hga-qa-item>summary{list-style:none;cursor:pointer;padding:12px 14px;display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap}
details.hga-qa-item>summary::-webkit-details-marker{display:none}
details.hga-qa-item>summary::after{content:"▾";margin-left:auto;color:#64748b;transition:transform .2s}
details.hga-qa-item[open]>summary::after{transform:rotate(180deg)}
details.hga-qa-item .hga-qa-text{flex:1 1 200px;font-weight:600}
details.hga-qa-item[open]{border-color:#1d4ed8}
details.hga-qa-item>.hga-qa-a,details.hga-qa-item>.hga-qa-variants,details.hga-qa-item>.hga-qa-reply{margin:0 14px 12px}
.hga-qa-a--note{border-left-color:#10b981}.hga-qa-a--note strong{color:#047857}
.hga-qa-count--wait{background:#fef3c7;color:#92400e}
.hga-qa-variants{list-style:none;padding:8px 10px;background:#f8fafc;border-radius:8px;font-size:13px;color:#475569}
.hga-qa-variants li{padding:3px 0}
/* Course page: price on the left, enroll button on the right (forms included) */
html body .hg-price-enroll{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px;flex-wrap:wrap}
html body .hg-price-enroll .price{margin:0;text-align:left}
html body .hg-price-enroll > form,html body .hg-price-enroll > a.enroll-btn,html body .hg-price-enroll > span.enroll-btn{margin:0 0 0 auto!important;display:inline-flex;align-items:center;justify-content:center}
html body .hg-price-enroll > form .enroll-btn{margin:0!important;display:inline-flex;align-items:center;justify-content:center;gap:6px}
/* Q&A v3: instructor Edit first, answers window */
.hga-qa-teacher{margin:0 14px 10px}
.hga-qa-edit-btn{background:#eef2ff;color:#3730a3;border:0;border-radius:8px;padding:6px 14px;font-weight:700;cursor:pointer}
.hga-qa-edit-form{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.hga-qa-edit-form label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}
.hga-qa-edit-form small{font-weight:400;color:#64748b}
.hga-qa-edit-form textarea{width:100%;box-sizing:border-box;border:1px solid #bdcddd;border-radius:8px;padding:8px 10px;font:inherit}
.hga-qa-edit-form button{align-self:flex-start}
.hga-qa-multi{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.hga-qa-modal{width:calc(100% - 19px);max-width:560px;max-height:85vh;border:0;border-radius:16px;padding:0;box-shadow:0 20px 50px rgba(15,23,42,.3)}
.hga-qa-modal::backdrop{background:rgba(15,23,42,.45)}
.hga-qa-modal-head{position:sticky;top:0;display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#fff;border-bottom:1px solid #e5e7eb}
.hga-qa-modal-head button{width:32px;height:32px;border-radius:50%;border:0;background:#f1f5f9;font-size:18px;cursor:pointer}
.hga-qa-modal-item{padding:12px 16px;border-bottom:1px solid #f1f5f9}
.hga-qa-modal-q{margin:0 0 6px;font-weight:600}
/* Sign-in card: same brand band as the Academy header (gradient, white Hod-Gee mark), then a clean form. */
.hga-public-shell .hga-login{max-width:440px;margin:8px auto 36px;padding:0;background:#fff;border:1px solid #dde5f0;border-radius:16px;box-shadow:0 10px 30px #12284b14;overflow:hidden;box-sizing:border-box}
.hga-login-head{display:flex;align-items:center;gap:14px;padding:20px 22px;background:linear-gradient(115deg,var(--hga-school-accent,#153876),#183e86 70%,#b91c1c);color:#fff}
.hga-login-mark{flex:0 0 52px;width:52px;height:52px;padding:4px;box-sizing:border-box;border-radius:50%;background:#fff;display:grid;place-items:center}
.hga-login-mark img{width:100%;height:100%;display:block}
.hga-login-eyebrow{display:block;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#dbe6ff}
.hga-login-head h2{margin:2px 0 2px;font-size:22px;line-height:1.2;color:#fff}
.hga-login-head p{margin:0;font-size:14px;color:#edf2ff}
.hga-login-body{padding:22px}
.hga-login-body form{margin:0}
.hga-login-body form p{margin:0 0 14px}
.hga-login-body label{display:block;margin:0 0 6px;font-size:13px;font-weight:700;color:#2b3f5f}
.hga-login-body input[type=text],.hga-login-body input[type=password],.hga-login-body input[type=email]{display:block;width:100%;max-width:100%;min-height:46px;padding:10px 14px;box-sizing:border-box;border:1px solid #cfd9e8;border-radius:10px;background:#fff;color:#1f3150;font-size:15px}
.hga-login-body input[type=text]:focus,.hga-login-body input[type=password]:focus,.hga-login-body input[type=email]:focus{border-color:#183e86;outline:2px solid #bad2f2;outline-offset:0}
.hga-login-body .login-remember label{display:flex;align-items:center;gap:8px;margin:0;font-weight:600;color:#3d5170}
.hga-login-body .login-submit{margin:4px 0 0}
.hga-login-body .login-submit input[type=submit]{display:block;width:100%;min-height:48px;padding:12px 16px;border:1px solid #102e64;border-radius:10px;background:linear-gradient(180deg,#1d4590,#153876);color:#fff;font-size:16px;font-weight:700;cursor:pointer;box-shadow:inset 0 -3px 0 #c72e40,0 2px 0 #0e2753}
.hga-login-body .login-submit input[type=submit]:hover,.hga-login-body .login-submit input[type=submit]:focus-visible{background:linear-gradient(180deg,#2452a6,#183e86)}
.hga-login-forgot{margin:14px 0 0;text-align:center;font-size:14px}
.hga-login-forgot a,.hga-login .hg-login-footer a{color:#183e86;font-weight:700;text-decoration:none}
.hga-login .hg-login-footer{margin:16px 0 0;padding-top:14px;border-top:1px solid #e7edf6;text-align:center;font-size:14px;color:#5b6b85}
.hga-login .hg-login-error{margin:0 0 14px;padding:11px 14px;border:1px solid #f3c7cd;border-radius:10px;background:#fff4f5;color:#a3263f;font-size:14px;text-align:center}
@media (max-width:480px){.hga-login-head{padding:16px}.hga-login-head h2{font-size:20px}.hga-login-body{padding:18px 16px}}
/* Password field with its eye button (added by public-experience.js). */
.hga-pass-wrap{position:relative;display:block}
.hga-login-body .hga-pass-wrap input[type=password],.hga-login-body .hga-pass-wrap input[type=text]{padding-right:48px}
.hga-pass-eye{position:absolute;top:50%;right:6px;transform:translateY(-50%);display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:8px;background:transparent;color:#6b7a90;cursor:pointer}
.hga-pass-eye:hover,.hga-pass-eye:focus-visible{background:#eef3fb;color:#183e86}
.hga-pass-eye.is-on{color:#c72e40}

/* Course page: the Students number opens the course's student list for staff (tutor, teacher, admin). */
a.hga-info-link{color:inherit;text-decoration:none;border-radius:10px;transition:background .15s}
a.hga-info-link:hover,a.hga-info-link:focus-visible{background:#eef4ff;color:#133e7a}
/* Course info bar: every item sits on the same baseline, so the Students number lines up with the tutor name (owner 2026-11-27). */
.hg-single-course .hg-course-info-bar .info-item{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;text-align:center}
.hg-single-course .hg-course-info-bar .hga-info-icon{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:#eef4ff;font-size:18px;line-height:1}

/* ===== Portal dashboards (tutor, then student) — HG design shared with the admin pages (owner 2026-11-27).
   Placement: one item left; two → left + right corner; three or more share the row equally; same-size buttons. */
.hga-dash{--d-n:#133e7a;--d-r:#c72e40;--d-l:#dce7f4;max-width:1200px;margin:0 auto;color:#1c3156}
.hga-dash *{box-sizing:border-box}
.hga-dash-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;padding:14px 16px;background:#fff;border:1px solid var(--d-l);border-radius:16px;box-shadow:0 6px 18px rgba(15,46,87,.05)}
.hga-dash-person{display:flex;align-items:center;gap:12px;min-width:0}
.hga-dash-person img{border-radius:50%;flex:0 0 auto}
.hga-dash-person>span{display:grid;min-width:0}
.hga-dash-person strong{font-size:18px;color:var(--d-n);overflow-wrap:anywhere}
.hga-dash-eyebrow{color:#b82c39;text-transform:uppercase;font-size:11px;letter-spacing:.12em;font-weight:800}
.hga-dash-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 16px}
.hga-dash-stat{display:grid;gap:4px;padding:14px 16px;background:#f8fbff;border:1px solid var(--d-l);border-radius:12px;text-decoration:none;color:#1c3156;transition:background .15s,box-shadow .15s}
.hga-dash-stat:hover,.hga-dash-stat:focus-visible{background:#eaf3ff;box-shadow:inset 0 -3px 0 var(--d-r);color:var(--d-n)}
.hga-dash-stat strong{font-size:26px;line-height:1.1;color:var(--d-n)}
.hga-dash-stat span{font-size:12.5px;font-weight:600;color:#58708d}
.hga-dash-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:20px;align-items:start}
.hga-dash-main{min-width:0;display:grid;gap:16px}
.hga-dash .hg-sidebar{background:#fff;border:1px solid var(--d-l);border-radius:14px;padding:8px}
.hga-dash .hg-sidebar ul{list-style:none;margin:0;padding:0}
.hga-dash .hg-sidebar a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;text-decoration:none;color:#283d60;font-size:14px}
.hga-dash .hg-sidebar a:hover{background:#eff5ff;color:var(--d-n)}
.hga-dash .hg-sidebar a.active{background:#eaf3ff;color:var(--d-n);box-shadow:inset 3px 0 0 var(--d-r)}
.hga-dash .hg-sidebar .section-title{padding:10px 12px 4px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#64748b}
.hga-dash .hg-sidebar a.logout{color:#ad2937}
.hga-dash-card{background:#fff;border:1px solid var(--d-l);border-radius:16px;padding:16px;min-width:0}
.hga-dash-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}
.hga-dash-row h3{margin:0;font-size:17px;font-weight:800;color:var(--d-n)}
.hga-dash-link{font-size:13px;font-weight:700;color:var(--d-n);text-decoration:none}
.hga-dash-actions{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:10px}
.hga-dash-btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 14px;border:1.5px solid var(--d-n);border-radius:10px;background:#fff;color:var(--d-n);font:inherit;font-size:14px;font-weight:700;line-height:1.2;text-align:center;text-decoration:none;white-space:nowrap;cursor:pointer}
.hga-dash-btn:hover,.hga-dash-btn:focus-visible{background:#eaf3ff;color:var(--d-n)}
.hga-dash-btn.is-primary{background:var(--d-n);color:#fff}
.hga-dash-btn.is-primary:hover{background:#1a56db;border-color:#1a56db;color:#fff}
.hga-dash-btn.is-small{min-height:32px;padding:4px 10px;font-size:13px;border-radius:8px}
.hga-dash-table{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #e4eaf1;border-radius:12px}
.hga-dash-table table{width:max-content;min-width:100%;border-collapse:collapse;margin:0}
.hga-dash-table th{background:#f6f9fc;color:#294361;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;text-align:left;padding:10px 12px;white-space:nowrap}
.hga-dash-table td{padding:10px 12px;border-top:1px solid #eef2f6;white-space:nowrap;vertical-align:middle;font-size:14px}
.hga-dash-rowbtns{display:grid;grid-template-columns:repeat(3,minmax(84px,1fr));gap:6px}
.hga-dash-rowbtns form{margin:0;display:flex}
.hga-dash-rowbtns .hga-dash-btn{width:100%}
.hga-dash-bar{display:inline-block;vertical-align:middle;width:90px;height:8px;border-radius:9px;background:#e8edf6;overflow:hidden}
.hga-dash-bar i{display:block;height:100%;background:linear-gradient(90deg,#001d6e,#1a56db)}
.hga-dash-table td .hga-dash-btn.is-small{min-width:96px}
.hga-dash-status{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700;background:#f1f5f9;color:#475569}
.hga-dash-status.is-publish{background:#e7f6ee;color:#17643a}
.hga-dash-status.is-draft,.hga-dash-status.is-pending{background:#fff4dc;color:#7a4b00}
.hga-dash-empty{text-align:center;border:1px dashed #ccd9e7;border-radius:12px;background:#f9fbfe;padding:28px 18px;color:#586c82}
.hga-dash-empty strong{color:#203a5b}
.hga-dash-note{margin:0;padding:10px 14px;border-left:4px solid #1a56db;border-radius:10px;background:#eef5ff;font-weight:600;color:var(--d-n)}
.hga-dash .hga-ann{margin:0}
.hga-dash .hga-ann-item{background:#f8fbff;border:1px solid var(--d-l);border-left:4px solid var(--d-r)}
.hga-dash .hga-ann-item h4{color:var(--d-n)}
.hga-dash .hga-ann-meta{color:#58708d}
.hga-dash .hga-ann-msg{color:#1c3156}
@media(max-width:1024px){.hga-dash-layout{grid-template-columns:minmax(0,1fr)}.hga-dash-layout>.hg-sidebar{display:none}}
@media(max-width:600px){.hga-dash-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.hga-dash-btn{padding:8px 8px;font-size:13px}}