/* Computer layout (screens wider than 820px): the header, banner and page share one aligned 1200px column; the banner is
   compact so the chapter is on the first screen; the left column stays in view while reading; subjects are a tidy list.
   Phones and tablets are not affected. Loaded last. */
@media (min-width:821px){
  /* one column for everything: the header's contents line up with the page below */
  .top{padding-left:max(24px,calc((100% - 1200px) / 2 + 24px));padding-right:max(24px,calc((100% - 1200px) / 2 + 24px))}
  .layout{max-width:1200px;padding:0 24px;grid-template-columns:280px minmax(0,1fr);gap:24px;margin:20px auto}
  .hero{max-width:1152px;width:calc(100% - 48px);box-sizing:border-box}
  body.tool-view .layout{max-width:920px}

  /* a compact welcome banner */
  .hero{margin:20px auto 0;padding:20px 28px;min-height:0;gap:20px}
  .hero h1{font-size:clamp(1.55rem,2.1vw,2rem);line-height:1.15;margin:6px 0 4px}
  .hero .hero-text p:not(.eyebrow){max-width:620px;margin:6px 0 0;font-size:.95rem}
  .hero .mascot-img{width:118px;border-radius:18px;border-width:2px}
  .hero .cb-hero-logo{width:auto;max-width:240px;min-height:0;padding:12px 16px;border-radius:18px}
  .hero .cb-hero-logo img{max-height:104px}
  /* notices (new class quiz, plan active) line up with the page */
  .ac-notice{max-width:1200px;padding:0 24px}

  /* the left column stays in view while the notes scroll */
  .side{position:sticky;top:84px;max-height:calc(100vh - 100px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
  body.tool-view .side{position:static}

  /* subjects as a list: icon, name, number of chapters */
  .subjects{grid-template-columns:1fr!important;gap:6px!important}
  .subjects .tile{flex-direction:row;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;min-height:0}
  .subjects .tile .ico{width:32px;height:32px;flex:none}
  .subjects .tile b{font-size:.9rem;line-height:1.2}
  .subjects .tile small{margin-left:auto;white-space:nowrap}
  .subjects .tile.on::after{display:none}   /* the highlighted row already shows the chosen subject */

  /* the chapter's title banner, slimmer */
  #main .banner{min-height:132px;padding:18px 22px;border-radius:16px}
  #main .banner h2{font-size:1.45rem}
  #main .banner img.mood-banner{width:84px;height:84px}
  #main>.card{padding:22px 26px}
  #main p.lead{font-size:1.02rem}

  /* the top bar: a distinct brand bar in the banner's deep indigo with a gold edge, white text and a gold mark on the
     selected item; drop-down lists keep their white card look */
  .top{background:linear-gradient(105deg,var(--hero-a) 0%,color-mix(in srgb,var(--hero-a) 50%,var(--hero-b)) 55%,var(--hero-b) 100%);color:#fff;border-bottom:3px solid var(--gold);box-shadow:0 8px 24px -12px rgba(20,18,80,.6)}
  .top .brand,.top .brand b,.top .brand span:not(.logo-face){color:#fff}
  .top .brand em{color:var(--gold)}
  :is(:root,:root[data-theme]) .top .brand small,:is(:root,:root[data-theme]) .top .brand .cb-by{color:rgba(255,255,255,.78)}
  :is(:root,:root[data-theme]) .top .brand .cb-name{color:var(--cb-nd,#fff)}
  .top .brand .logo-face{box-shadow:0 0 0 2px rgba(255,255,255,.85)}
  #rmBar>.rm-items>button,#rmBar>.rm-one>button,#rmBar>.rm-more>.rm-morebtn{color:rgba(255,255,255,.9)}
  #rmBar>.rm-items>button:hover,#rmBar>.rm-one>button:hover,#rmBar>.rm-more>.rm-morebtn:hover{background:rgba(255,255,255,.14);color:#fff}
  #rmBar>.rm-items>button.on,#rmBar>.rm-one>button.on,#rmBar>.rm-more>.rm-morebtn.on,#rmBar>.rm-more>.rm-morebtn[aria-expanded=true]{background:rgba(255,255,255,.18);color:#fff;box-shadow:inset 0 -3px 0 var(--gold)}
  #rmBar>.rm-more>.rm-morebtn{border:0}
  #rmSide>.rm-start{background:var(--gold);color:#1b1a5c;box-shadow:0 2px 0 rgba(0,0,0,.25)}
  #rmSide>.rm-more>.rm-morebtn,#rmSide>button:not(.rm-start){background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.3)}
  .top .rm-more-list,.top .rm-more-list button{color:var(--text)}
  /* sign in, theme and (students) the Study / Progress / Quizzes / Profile keys and the tools row */
  :is(:root,:root[data-theme]) .top #auth,:is(:root,:root[data-theme]) .top #theme,
  :is(:root,:root[data-theme]) .top .top-actions .tab:not(.active),:is(:root,:root[data-theme]) .top .subnav button:not(.active){background:rgba(255,255,255,.12);color:#fff;border-color:rgba(255,255,255,.3);box-shadow:0 3px 0 rgba(0,0,0,.28)}
  :is(:root,:root[data-theme]) .top .top-actions .tab.active,:is(:root,:root[data-theme]) .top .subnav button.active{background:#fff;color:#2a2680;border-color:#fff;box-shadow:0 3px 0 var(--gold)}
  @media (hover:hover){:is(:root,:root[data-theme]) .top #auth:hover,:is(:root,:root[data-theme]) .top #theme:hover,:is(:root,:root[data-theme]) .top .top-actions .tab:not(.active):hover,:is(:root,:root[data-theme]) .top .subnav button:not(.active):hover{background:rgba(255,255,255,.22);color:#fff}}
  .top .subnav{border-top-color:rgba(255,255,255,.18)}
}
@media (min-width:1500px){
  .layout{max-width:1280px}
  .hero{max-width:1232px}
  .top{padding-left:calc((100% - 1280px) / 2 + 24px);padding-right:calc((100% - 1280px) / 2 + 24px)}
  .layout{grid-template-columns:300px minmax(0,1fr)}
}
