/*
 * Styles added since the live style.css was built. style.css is hand-built
 * and untracked, and rebuilding it from build/sass does not reproduce it
 * exactly, so new rules live here. Each block is mirrored in build/sass;
 * drop this file once style.css is rebuilt from those sources.
 */

/* Course panels on essay pages: build/sass/scss/components/_course-promo.scss */
.course-promo{background:#fff;border-top:3px solid #ce132d;padding:2rem;margin:3rem 0 1rem}
.course-promo ul{list-style:none;margin:0;padding:0}
.course-promo a{text-decoration:none}
.course-promo .course-promo-kicker{font-family:work-sans,'Work Sans',sans-serif;font-size:0.75rem;letter-spacing:0.08em;text-transform:uppercase;color:#ce132d;margin:0 0 0.5rem}
.course-promo .course-promo-title{font-family:vesper-Libre,'Vesper Libre',serif;font-size:1.75rem;line-height:1.2;color:#333;white-space:normal;margin:0 0 0.75rem;padding:0}
.course-promo .course-promo-lede{font-size:0.95rem;line-height:1.6;margin:0 0 1.5rem;max-width:40em}
.course-promo .course-promo-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem}
.course-promo .course-promo-card{display:flex;flex-direction:column;height:100%;color:#333;background:#f9f6ef}
.course-promo .course-promo-card img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;background:#333}
.course-promo .course-promo-card .course-promo-name{font-family:vesper-Libre,'Vesper Libre',serif;font-size:1.3rem;line-height:1.2;padding:0.9rem 1rem 0.25rem}
.course-promo .course-promo-card .course-promo-price{font-size:0.85rem;padding:0 1rem;color:#666}
.course-promo .course-promo-card .course-promo-more{margin-top:auto;padding:0.75rem 1rem 1rem;font-size:0.9rem;font-weight:600;color:#ce132d}
.course-promo .course-promo-card .course-promo-more:after{content:" \2192"}
.course-promo .course-promo-card:hover .course-promo-name,.course-promo .course-promo-card:focus .course-promo-name{color:#ce132d}
.course-promo .course-promo-card:hover .course-promo-more,.course-promo .course-promo-card:focus .course-promo-more{text-decoration:underline}
.course-promo .course-promo-all{margin:1.25rem 0 0;font-size:0.9rem}
.course-promo .course-promo-all a{color:#ce132d;border-bottom:1px solid rgba(206,19,46,0.4)}
@media (max-width:720px){
  .course-promo{padding:1.5rem 1rem}
  .course-promo .course-promo-cards{grid-template-columns:1fr;gap:0.75rem}
  .course-promo .course-promo-card{display:grid;grid-template-columns:6.5rem 1fr;grid-template-rows:auto auto 1fr}
  .course-promo .course-promo-card img{grid-row:1/span 3;height:100%;aspect-ratio:auto}
  .course-promo .course-promo-card .course-promo-name{font-size:1.15rem;padding:0.6rem 0.75rem 0.2rem}
  .course-promo .course-promo-card .course-promo-price{padding:0 0.75rem}
  .course-promo .course-promo-card .course-promo-more{padding:0.4rem 0.75rem 0.6rem}
}
.sidebar .course-promo-compact{margin:0 0 2.5rem;padding:1.25rem 1.25rem 1.5rem;background:#f9f6ef}
.sidebar .course-promo-compact .course-promo-title{font-size:1.3rem;margin-bottom:0.5rem}
.sidebar .course-promo-compact .course-promo-lede{font-size:0.85rem;margin-bottom:0.75rem}
.sidebar .course-promo-compact ul{margin:0 0 1rem}
.sidebar .course-promo-compact ul li{border-top:1px solid rgba(51,51,51,0.12)}
.sidebar .course-promo-compact ul li a{display:flex;justify-content:space-between;align-items:baseline;gap:0.5rem;padding:0.6rem 0;font-size:0.9rem;color:#333}
.sidebar .course-promo-compact ul li a:hover,.sidebar .course-promo-compact ul li a:focus{color:#ce132d}
.sidebar .course-promo-compact .course-promo-price{white-space:nowrap;color:#ce132d;font-weight:600}
.sidebar .course-promo-compact .course-promo-button{font-family:work-sans,'Work Sans',sans-serif;display:block;text-align:center;background:#ce132d;color:#fff;padding:0.75rem 1rem;border-radius:3px;font-size:0.9rem}
.sidebar .course-promo-compact .course-promo-button:hover,.sidebar .course-promo-compact .course-promo-button:focus{background:#a5051c}
@media (max-width:720px){
  .sidebar .course-promo-compact{display:none}
}

/* Home hero photo: build/sass/scss/components/_hero.scss. WebP where supported
   (image-set with type), the JPEG otherwise; phones get a centre crop that
   shows exactly what the full image shows at that width. */
#hero .photo.photo-home{background-image:url(/img/photos/girl-book.jpg);background-image:image-set(url(/img/photos/girl-book.webp) type("image/webp"),url(/img/photos/girl-book.jpg) type("image/jpeg"))}
@media (max-width:480px){
  #hero .photo.photo-home{background-image:image-set(url(/img/photos/girl-book-480.webp) type("image/webp"),url(/img/photos/girl-book.jpg) type("image/jpeg"))}
}

/* Course cards (listings, course hub, home page, related courses):
   build/sass/scss/components/_course-cards.scss. The card is one link: the
   name's link is stretched over the whole card. */
.course-cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(16rem,1fr));gap:1.5rem}
.course-cards>li{display:flex}
.course-card{position:relative;display:flex;flex-direction:column;width:100%;background:#fff;border-top:3px solid #ce132d;color:#333;transition:box-shadow .15s ease-in-out}
.course-card:hover{box-shadow:0 4px 16px rgba(0,0,0,0.14)}
.course-card:focus-within{outline:3px solid #333;outline-offset:3px}
.course-card-image{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;background:#333}
.course-card-body{display:flex;flex-direction:column;flex:1;padding:1rem 1.1rem 1.1rem}
.course-card-kicker{font-family:work-sans,'Work Sans',sans-serif;font-size:0.7rem;font-weight:600;letter-spacing:0.08em;text-transform:uppercase;color:#a5051c;margin:0 0 0.4rem}
.course-card .course-card-name{font-family:vesper-Libre,'Vesper Libre',serif;font-size:1.35rem;line-height:1.2;color:#333;margin:0 0 0.5rem;padding:0;width:auto;white-space:normal}
.course-card .course-card-name a{color:inherit;text-decoration:none}
.course-card .course-card-name a:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:1}
.course-card .course-card-name a:focus{outline:none}
.course-card-summary{font-size:0.85rem;line-height:1.5;margin:0 0 1rem;color:#444}
.course-card-meta{margin:auto 0 0;font-size:0.8rem;color:#555}
.course-card-price{margin:0.5rem 0 0;font-size:0.8rem;color:#555}
.course-card-price strong{display:block;font-family:vesper-Libre,'Vesper Libre',serif;font-size:1.5rem;line-height:1.2;color:#333}
.course-card-more{margin-top:0.75rem;font-family:work-sans,'Work Sans',sans-serif;font-size:0.85rem;font-weight:600;color:#a5051c}
.course-card-more:after{content:" \2192"}
.course-card:hover .course-card-name{color:#ce132d}
.course-card:hover .course-card-more{text-decoration:underline}
@media (max-width:720px){
  .course-cards{grid-template-columns:1fr;gap:1rem}
  .course-card{display:grid;grid-template-columns:7rem 1fr}
  .course-card-image{height:100%;aspect-ratio:auto}
  .course-card-body{padding:0.75rem 0.9rem 0.9rem}
  .course-card .course-card-name{font-size:1.2rem}
  .course-card-summary{font-size:0.9rem;margin-bottom:0.6rem}
  .course-card-price strong{font-size:1.3rem}
}

/* Online course pages: build/sass/scss/components/_course-page.scss */
section.hero.course-header .overlay h1.course-title{font-size:3rem;line-height:1.05;width:100%;margin:0;color:#fff}
section.hero.course-header .overlay .text p.course-format{font-family:work-sans,'Work Sans',sans-serif;font-size:1rem;font-weight:400;margin:1rem 0 0}
section.hero.course-header .overlay.enrol-box{justify-content:center}
.course-summary{width:100%;max-width:32rem;padding:0.5rem 1rem;color:#222;font-size:0.9rem;line-height:1.4}
section.hero .overlay .course-summary h2.course-summary-title{font-family:work-sans,'Work Sans',sans-serif;font-size:0.8rem;font-weight:600;letter-spacing:0.08em;text-transform:uppercase;line-height:1.2;color:#a5051c;margin:0 0 0.5rem;width:auto}
.course-summary-price{margin:0;font-size:1rem}
.course-summary-amount{font-family:vesper-Libre,'Vesper Libre',serif;font-size:2.75rem;font-weight:700;line-height:1;color:#222;margin-right:0.25rem}
.course-summary-plan{margin:0.4rem 0 0}
section.hero .overlay .course-summary .button.course-summary-enrol{display:block;background:#ce132d;width:100%;text-align:center;margin:1rem 0;padding:1.1rem 1rem;font-size:1.15rem}
.course-summary-facts{list-style:none;margin:0;padding:0}
.course-summary-facts li{position:relative;padding:0.45rem 0 0.45rem 1.6rem;border-top:1px solid rgba(51,51,51,0.18)}
.course-summary-facts li:before{content:"\2713";position:absolute;left:0.1rem;top:0.45rem;color:#ce132d;font-weight:700}
@media (max-width:960px){
  section.hero.course-header .overlay h1.course-title{font-size:2.5rem;line-height:1.1}
  .course-summary{max-width:none;padding:0.5rem 0}
}
.course-summary-enrol:hover,.course-summary-enrol:focus,.enrol-bar-button:hover,.enrol-bar-button:focus{background:#a5051c}

.middle>.course-description{margin:2.5rem 0 1rem}
.course-section{margin:3rem 0 0}
.middle .course-section h2{font-size:1.75rem;line-height:1.3;color:#333;margin:0;padding:0 0 0.5rem;border-bottom:3px solid #ce132d}
.course-section-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0.75rem 1rem;margin-bottom:1rem}
.course-section-head h2{flex:1 0 100%}
.course-section-note{margin:0;font-size:0.85rem;color:#555}
.syllabus-toggle{font-family:work-sans,'Work Sans',sans-serif;font-size:0.85rem;font-weight:600;color:#a5051c;background:#fff;border:1px solid #ce132d;border-radius:3px;padding:0.5rem 0.9rem}
.syllabus-toggle:hover{background:#f9f6ef}
.syllabus-list{list-style:none;margin:0;padding:0;border-top:1px solid rgba(51,51,51,0.2)}
.syllabus-list>li{background:#fff;border-bottom:1px solid rgba(51,51,51,0.2)}
.syllabus-list summary{display:flex;align-items:baseline;gap:1rem;position:relative;padding:1rem 3rem 1rem 1rem;cursor:pointer;list-style:none;font-family:vesper-Libre,'Vesper Libre',serif;font-size:1.2rem;line-height:1.3}
.syllabus-list summary::-webkit-details-marker{display:none}
.syllabus-list summary:after{content:"+";position:absolute;right:1rem;top:0.75rem;font-family:work-sans,'Work Sans',sans-serif;font-size:1.5rem;color:#ce132d}
.syllabus-list details[open] summary:after{content:"\2212"}
.syllabus-list summary:hover .lessontitle{color:#ce132d}
.syllabus-list .lesson-number{flex:0 0 5.5rem;font-family:work-sans,'Work Sans',sans-serif;font-size:0.75rem;font-weight:600;letter-spacing:0.06em;text-transform:uppercase;color:#a5051c}
.syllabus-list .text{padding:0 1.5rem 1.25rem 7.5rem;font-size:0.9rem;line-height:1.6}
.syllabus-list .text p{margin:0 0 0.75rem}
.syllabus-list .text p:last-child{margin-bottom:0}
@media (max-width:720px){
  .syllabus-list summary{flex-direction:column;gap:0.2rem;font-size:1.15rem}
  .syllabus-list .lesson-number{flex:none}
  .syllabus-list .text{padding:0 1rem 1rem;font-size:1rem}
}
.faq-list dt{font-family:vesper-Libre,'Vesper Libre',serif;font-size:1.25rem;font-weight:700;line-height:1.3;margin:1.5rem 0 0.4rem;color:#333}
.faq-list dd{margin:0;font-size:0.9rem;line-height:1.65;max-width:46em}
.faq-list a,.course-faq-more a,.related-courses-all a{color:#a5051c;text-decoration:underline}
.course-faq-more{margin:2rem 0 0;font-size:0.9rem}
@media (max-width:960px){
  .faq-list dd,.course-faq-more{font-size:1rem}
}
main>section.related-courses{padding:0 0 4rem}
.related-courses-all{margin:1.5rem 0 0;font-size:0.95rem}

/* Phone enrol bar on course pages, shown by web/js/course-page.js while the
   fees box's button is off screen. */
.enrol-bar{display:none}
@media (max-width:720px){
  .enrol-bar{display:flex;align-items:center;gap:0.75rem;position:fixed;left:0;right:0;bottom:0;z-index:50;padding:0.6rem 1rem;padding-bottom:calc(0.6rem + env(safe-area-inset-bottom));background:#f9f6ef;border-top:3px solid #ce132d;box-shadow:0 -2px 12px rgba(0,0,0,0.18);transform:translateY(110%);visibility:hidden;transition:transform .2s ease-out,visibility .2s}
  .enrol-bar.is-visible{transform:none;visibility:visible}
  .enrol-bar-text{flex:1;min-width:0;margin:0;font-size:0.85rem;line-height:1.3}
  .enrol-bar-name{display:block;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .enrol-bar-plan{display:block;color:#555}
  .enrol-bar .button.enrol-bar-button{display:inline-block;width:auto;font-size:1rem;padding:0.9rem 1rem;white-space:nowrap}
  html.has-enrol-bar body{padding-bottom:4.5rem}
}
@media (prefers-reduced-motion:reduce){
  .enrol-bar,.course-card{transition:none}
}

/* Course listings and the courses hub: build/sass/scss/components/_course-browser.scss */
.course-browser{padding:2rem 0 1rem}
.course-facts{list-style:none;margin:0 0 2rem;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:1rem}
.course-facts li{background:#fff;border-left:3px solid #ce132d;padding:0.9rem 1rem;font-size:0.85rem;line-height:1.45;color:#444}
.course-facts strong{display:block;font-family:vesper-Libre,'Vesper Libre',serif;font-size:1.15rem;color:#333;margin-bottom:0.2rem}
.course-filter{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;margin:0 0 1rem}
.course-filter-label{font-size:0.85rem;color:#555;margin-right:0.25rem}
.course-filter a{font-family:work-sans,'Work Sans',sans-serif;font-size:0.9rem;font-weight:600;color:#a5051c;background:#fff;border:1px solid #ce132d;border-radius:2rem;padding:0.45rem 1rem;text-decoration:none}
.course-filter a:hover,.course-filter a:focus{background:#ce132d;color:#fff}
.course-filter-count{font-weight:400}
.course-group{padding-top:2rem;scroll-margin-top:5rem}
.course-group-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;border-bottom:3px solid #ce132d;padding-bottom:0.5rem;margin-bottom:1.5rem}
.course-group-head h2{font-size:1.9rem;line-height:1.2;color:#333;margin:0}
.course-group-head p{margin:0;font-size:0.95rem;color:#555;white-space:nowrap}
.course-browser-more{margin:2.5rem 0 0;font-size:0.9rem}
.course-browser-more a{color:#a5051c;text-decoration:underline}
@media (max-width:960px){
  .course-facts{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:720px){
  .course-facts{grid-template-columns:1fr;gap:0.5rem}
  .course-facts li{font-size:0.95rem}
  .course-group-head h2{font-size:1.5rem}
}
.study-options{list-style:none;margin:0 0 2.5rem;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:1.25rem}
.study-option{position:relative;display:flex;flex-direction:column;background:#fff;border-top:3px solid #ce132d;padding:1.25rem 1.25rem 1.1rem;font-size:0.9rem;line-height:1.5;color:#444;transition:box-shadow .15s ease-in-out}
.study-option:hover{box-shadow:0 4px 16px rgba(0,0,0,0.14)}
.study-option:focus-within{outline:3px solid #333;outline-offset:3px}
.study-option h2{font-size:1.35rem;line-height:1.2;color:#333;margin:0 0 0.5rem}
.study-option h2 a{color:inherit;text-decoration:none}
.study-option h2 a:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}
.study-option h2 a:focus{outline:none}
.study-option:hover h2{color:#ce132d}
.study-option-price{font-family:vesper-Libre,'Vesper Libre',serif;font-size:1.5rem;font-weight:700;color:#333;margin:0 0 0.5rem}
.study-option-price span{display:block;font-family:work-sans,'Work Sans',sans-serif;font-size:0.8rem;font-weight:400;color:#555}
.study-option p{margin:0 0 0.75rem}
.study-option-more{margin-top:auto;font-family:work-sans,'Work Sans',sans-serif;font-size:0.85rem;font-weight:600;color:#a5051c}
.study-option-more:after{content:" \2192"}
@media (max-width:1220px){
  .study-options{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:720px){
  .study-options{grid-template-columns:1fr;gap:0.75rem}
}
.course-group .course-card-kicker{display:none}
@media (max-width:720px){.course-card-summary{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}

/* Dates, fees and how to apply, above the tabs on the Postgraduate and
   Summer School pages: build/sass/scss/components/_key-facts.scss */
.key-facts{background:#fff;border-top:3px solid #ce132d;padding:1.5rem 2rem;margin:0 0 2.5rem}
.key-facts-list{display:grid;grid-template-columns:repeat(4,1fr);gap:1.5rem;margin:0}
.key-facts-list dt{font-family:work-sans,'Work Sans',sans-serif;font-size:0.75rem;font-weight:600;letter-spacing:0.08em;text-transform:uppercase;color:#a5051c;margin:0 0 0.4rem}
.key-facts-list dd{margin:0;font-size:0.9rem;line-height:1.5;color:#333}
.key-facts-list dd strong{font-family:vesper-Libre,'Vesper Libre',serif;font-size:1.35rem}
.key-facts-list a,.key-facts-actions a:not(.button){color:#a5051c;text-decoration:underline}
.key-facts-actions{display:flex;flex-wrap:wrap;align-items:center;gap:0.75rem 1.5rem;margin-top:1.5rem;padding-top:1.25rem;border-top:1px solid rgba(51,51,51,0.15)}
.key-facts-actions .button{font-size:1.05rem;padding:1rem 3rem}
.key-facts-actions .button:hover,.key-facts-actions .button:focus{background:#a5051c}
.key-facts-actions a:not(.button){font-size:0.9rem}
@media (max-width:1220px){
  .key-facts-list{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:720px){
  .key-facts{padding:1.25rem 1rem;margin-left:-1rem;margin-right:-1rem}
  .key-facts-list{grid-template-columns:1fr;gap:1rem}
  .key-facts-list dd{font-size:1rem}
  .key-facts-actions .button{width:100%;font-size:1.2rem;padding:1.2rem 1rem}
}
/* Phones and tablets: the course-section heroes (online courses,
   postgraduate, summer school) keep their first paragraph only, so the
   dates, fees and course lists start near the top. The full text is still in
   the page below. */
@media (max-width:1024px){
  section.hero.lighter.index .overlay .text.smaller p:not(:first-child){display:none}
}
/* Tablets and up: the hero had a fixed height with its text vertically
   centred, so long paragraphs ran up over the menu (768 px) or to the edges
   (around 1100 px). Let it grow instead. */
@media (min-width:721px){
  section.hero.lighter.index,section.hero:has(>.photo-home){height:auto;min-height:28rem;padding:2rem 0}
}
@media (min-width:721px) and (max-width:1024px){
  section.hero.lighter.index .overlay .text.smaller{font-size:1.3rem}
}

/* Home page: course finder and "Why study with the LSJ?":
   build/sass/scss/components/_home.scss */
main>section.find-course{padding:1rem 0 2rem}
main>section.find-course .study-options{grid-template-columns:repeat(5,1fr);margin-bottom:0}
.study-option h3{font-size:1.3rem;line-height:1.2;color:#333;margin:0 0 0.5rem}
.study-option h3 a{color:inherit;text-decoration:none}
.study-option h3 a:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}
.study-option h3 a:focus{outline:none}
.study-option:hover h3{color:#ce132d}
@media (max-width:1220px){
  main>section.find-course .study-options{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:960px){
  main>section.find-course .study-options{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:720px){
  main>section.find-course .study-options{grid-template-columns:1fr}
}
section.text-and-photo article>.text.why-lsj{font-size:1rem}
.why-lsj h2{font-size:2rem;line-height:1.2;color:#ce132d;margin:0 0 1.25rem}
.why-lsj ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,1fr);gap:1.25rem 2rem}
.why-lsj li{font-family:work-sans,'Work Sans',sans-serif;font-size:0.95rem;line-height:1.55;color:#444}
.why-lsj li strong{display:block;font-family:vesper-Libre,'Vesper Libre',serif;font-size:1.3rem;line-height:1.25;color:#333;margin-bottom:0.3rem}
@media (max-width:960px){
  .why-lsj ul{grid-template-columns:1fr}
  .why-lsj h2{font-size:1.75rem}
}
main>section.courses .course-cards{margin-bottom:2rem}

/* Accessibility basics: build/sass/scss/base/_a11y.scss.
   Visible keyboard focus everywhere (dark ring on light backgrounds, white
   on the red nav, the dark footer and the photo heroes). */
a:focus-visible,button:focus-visible,summary:focus-visible,[tabindex]:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #333;outline-offset:2px}
#nav a:focus-visible,#nav [tabindex]:focus-visible,.mobile-menu a:focus-visible,body>footer a:focus-visible,section.hero .overlay:not(.enrol-box) a:focus-visible{outline-color:#fff}
.tabs>li:focus-visible{outline:3px solid #333;outline-offset:-3px}
#nav .menu-dropdown a:focus-visible{outline-color:#333;outline-offset:-3px}
body>header>.inner .search .search-bar:focus-within{outline:3px solid #333;outline-offset:4px}
/* The 'More' menu opens for keyboard users too, not only on hover. */
body>#nav>ul>li.more:focus-within>ul.menu-dropdown{display:block;opacity:1;visibility:visible}
/* Footer headings: the brand red on #333 is 2.3:1; this pink is 5.6:1. */
body>footer>.inner:first-child h5{color:#ff8a99}

/* Fixed menu on scroll. style.css swaps the menu to a fixed bar at once and
   puts the logo and phone number into the row, so every link jumps sideways.
   Keep the links where they are: lay the logo and phone over the bar's
   padding and fade them (and a shadow) in instead. */
@media (min-width: 801px) {
  body>#nav { position: relative; transition: box-shadow .3s ease; }
  .sticky body>#nav { position: fixed; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
  html body>#nav .logo,
  html body>#nav .phone {
    display: flex !important; align-items: center; position: absolute; top: 0; height: 3rem;
    margin: 0; opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility 0s linear .3s;
  }
  html body>#nav .logo { left: 1rem; }
  html body>#nav .phone { right: 2rem; }
  html.sticky body>#nav .logo,
  html.sticky body>#nav .phone { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }
  html.sticky body>#nav>ul { padding: 0 2rem 0 5.85rem !important; }
}
/* Wide screens: the menu already leaves room on the left, so give it the
   sticky padding all the time and the links never move. */
@media (min-width: 1221px) {
  body>#nav>ul { padding: 0 2rem 0 5.85rem !important; }
}
/* Narrower screens: the links sit closer to the edge, so make room for the
   logo by sliding them over rather than jumping. The left padding leaves at
   least 12px between the logo's dot and the first link at every width (the
   logo grows with the screen). */
@media (min-width: 801px) and (max-width: 1220px) {
  body>#nav>ul { transition: padding .3s ease; }
  html.sticky body>#nav>ul { padding: 0 1rem 0 5.75rem !important; }
  html body>#nav .phone { right: .5rem; }
}
/* The phone number only fits beside the links on wide screens; until then
   show the phone icon that style.css already uses below 1220px. */
@media (min-width: 801px) and (max-width: 960px) {
  html.sticky body>#nav>ul { padding-left: 5.65rem !important; }
}
@media (min-width: 961px) and (max-width: 979px) {
  html.sticky body>#nav>ul { padding-left: 6rem !important; }
}
@media (min-width: 801px) and (max-width: 919px), (min-width: 961px) and (max-width: 1049px), (min-width: 1221px) and (max-width: 1281px) {
  html body>#nav .phone { display: none !important; }
}
@media (min-width: 1221px) and (max-width: 1659px) {
  html body>#nav .phone { text-indent: -9999px; font-size: 0; line-height: 0; width: 2rem;
    background: url("../img/icons/phone.svg") center center no-repeat; filter: brightness(2); background-size: 90%; right: 1rem; }
  html body>#nav .phone a { display: block; width: 100%; height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  body>#nav, body>#nav>ul, html body>#nav .logo, html body>#nav .phone { transition: none !important; }
}

/* Course finder cards (home and /courses/): the course name sits in a red
   band, like the navigation bar, so each card reads as a signpost. The price
   stays plain and bold below it, so prices are easy to compare and none looks
   like an offer. Bands in a row are the same height (the longest name runs to
   three lines in five columns). */
.study-option{border-top:0}
.study-option h2,.study-option h3{display:flex;align-items:flex-end;margin:-1.25rem -1.25rem 1rem;padding:0.85rem 1.25rem 0.8rem;background:#ce132d;color:#fff;transition:background-color .15s ease-in-out}
.study-option h2 a,.study-option h3 a{color:#fff}
.study-option:hover h2,.study-option:hover h3{color:#fff;background:#a5051c}
.study-option:focus-within h2,.study-option:focus-within h3{background:#a5051c}
.study-option-price{line-height:1.2}
.study-options .study-option h2{min-height:calc(2 * 1.2em + 1.65rem)}
/* Home: in five columns some names need three lines below about 1380px
   wide; above that all fit in two, so the band is only as tall as needed
   (Henry: top padding should match the bottom). Names are centred, so any
   spare height is shared equally above and below. */
main>section.find-course .study-option h3{min-height:calc(2 * 1.2em + 1.65rem);align-items:center}
@media (max-width:1400px){
  main>section.find-course .study-option h3{min-height:calc(3 * 1.2em + 1.65rem)}
}
@media (max-width:1220px){
  main>section.find-course .study-option h3{min-height:calc(2 * 1.2em + 1.65rem)}
}
@media (max-width:720px){
  .study-options .study-option h2,main>section.find-course .study-option h3{min-height:0}
}
@media (prefers-reduced-motion: reduce){
  .study-option h2,.study-option h3{transition:none}
}

/* Home page course grid: eight courses in 4, 2 or 1 columns, so the rows
   are always full (auto-fill gave 3 + 3 + 2 between 900 and 1280px). */
main>section.courses .course-cards{grid-template-columns:repeat(4,1fr)}
@media (max-width:1100px){
  main>section.courses .course-cards{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:600px){
  main>section.courses .course-cards{grid-template-columns:1fr}
}

/* Online course cards (home page and /courses/online-courses/): a red band
   under the photo holds the subject and course name, matching the "Find
   your course" cards; description and price stay on white. Names run to two
   lines at most, so the bands in a row share that height. */
.course-card{border-top:0}
.course-card .course-card-kicker,.course-card .course-card-name{background:#ce132d;transition:background-color .15s ease-in-out}
.course-card .course-card-kicker{color:#fff;margin:-1rem -1.1rem 0;padding:0.8rem 1.1rem 0.3rem}
.course-card .course-card-name{color:#fff;margin:0 -1.1rem 0.9rem;padding:0 1.1rem 0.85rem;min-height:calc(2 * 1.2em + 0.85rem);box-sizing:border-box}
.course-card:hover .course-card-name{color:#fff}
.course-card:hover .course-card-kicker,.course-card:hover .course-card-name,
.course-card:focus-within .course-card-kicker,.course-card:focus-within .course-card-name{background:#a5051c}
/* Grouped lists (/courses/online-courses/) hide the subject, so the band
   starts with the name: give it the subject's top spacing. */
.course-group .course-card .course-card-name{margin-top:-1rem;padding-top:0.85rem;min-height:calc(2 * 1.2em + 1.7rem)}
@media (max-width:600px){
  .course-card .course-card-name,.course-group .course-card .course-card-name{min-height:0}
}
@media (prefers-reduced-motion: reduce){
  .course-card .course-card-kicker,.course-card .course-card-name{transition:none}
}

/* Room for the sticky menu when a link scrolls to the tabs (Summer School). */
.tabs{scroll-margin-top:5rem}
