body { background: #F5EFE2; }
main { display: block; }
img { max-width: 100%; }
[aria-current="page"] { color: #C84B32 !important; }
:focus-visible { outline: 2px solid #C84B32; outline-offset: 4px; }
[id] { scroll-margin-top: 90px; }
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { max-width: 100%; }
img, svg, video { max-width: 100%; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 18px; background: #0B1B26; color: #F5EFE2; }
.skip-link:focus { top: 12px; }
.cl-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Main navigation tabs — each tab takes a colour from the CAPSuLe logo. Text colours
   are paired per tab for WCAG AA contrast (white on magenta/blue, navy on orange/cyan). */
.cl-navlinks { display: flex; gap: 12px; flex: 1; justify-content: flex-end; align-items: center; }
.cl-tab { display: inline-flex; align-items: center; padding: 15px 22px; border: 1.5px solid #0B1B26; font: 600 13px 'JetBrains Mono', monospace; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease; }
.cl-tab--home { background: #D71768; color: #FFFFFF; }
.cl-tab--about { background: #1D4188; color: #FFFFFF; }
.cl-tab--support { background: #FB5B34; color: #0B1B26; }
.cl-tab--learn { background: #058DC2; color: #0B1B26; }
.cl-tab:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 #0B1B26; }
.cl-tab--home[aria-current="page"], .cl-tab--about[aria-current="page"] { color: #FFFFFF !important; }
.cl-tab--support[aria-current="page"], .cl-tab--learn[aria-current="page"] { color: #0B1B26 !important; }
.cl-tab[aria-current="page"] { box-shadow: 4px 4px 0 #0B1B26; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.cl-mobmenu .cl-tab { padding: 18px 24px; border: 0; border-bottom: 1.5px solid #0B1B26; font-size: 13px; letter-spacing: .18em; }
.cl-mobmenu .cl-tab:hover { transform: none; box-shadow: none; }
.cl-mobmenu .cl-tab[aria-current="page"] { box-shadow: inset 6px 0 0 #0B1B26; }
/* Account entry (Sign in / Library / Dashboard), kept apart from the four colour tabs. */
.cl-account { display: inline-flex; align-items: center; flex-shrink: 0; padding: 15px 18px; border: 1.5px solid #0B1B26; background: #F5EFE2; color: #0B1B26; font: 500 12px 'JetBrains Mono', monospace; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease; }
.cl-account:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 #C84B32; }
.cl-tab--account { background: #F5EFE2; color: #0B1B26; }
@media (max-width: 820px) { .cl-account { display: none !important; } }

/* Calls to action. Colours match the tab each button leads to. */
.cl-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.cl-cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 22px; border: 1.5px solid #0B1B26; color: #0B1B26; font: 11px 'JetBrains Mono', monospace; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; text-align: center; line-height: 1.4; box-shadow: 5px 5px 0 #0B1B26; transition: transform .15s ease, box-shadow .15s ease; }
.cl-cta:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 #0B1B26; }
.cl-cta:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #0B1B26; }
.cl-cta--learn { background: #058DC2; }
.cl-cta--support { background: #FB5B34; }
.cl-on-dark .cl-cta { border-color: #F5EFE2; box-shadow: 5px 5px 0 #F5EFE2; }
.cl-on-dark .cl-cta:hover { box-shadow: 7px 7px 0 #F5EFE2; }
@media (max-width: 600px) {
  .cl-ctas { flex-direction: column; align-items: stretch; }
}

.cl-programs-menu { position: relative; display: flex; }
.cl-programs-dropdown { display: none; position: absolute; top: calc(100% + 20px); left: 50%; transform: translateX(-50%); width: 300px; padding: 14px 0; background: #F5EFE2; border: 1.5px solid #0B1B26; box-shadow: 6px 6px 0 #C84B32; z-index: 60; }
.cl-programs-dropdown::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 22px; }
.cl-programs-menu:hover .cl-programs-dropdown, .cl-programs-menu:focus-within .cl-programs-dropdown { display: flex; flex-direction: column; }
.cl-programs-dropdown-label, .cl-mobile-articles > div { padding: 4px 18px 10px; color: #C84B32; font: 10px 'JetBrains Mono', monospace; letter-spacing: .18em; text-transform: uppercase; }
.cl-programs-dropdown a { padding: 8px 18px; color: #0B1B26; font: 14px 'Source Serif 4', Georgia, serif; line-height: 1.25; text-decoration: none; }
.cl-programs-dropdown a:hover, .cl-programs-dropdown a:focus-visible { background: #E8E2D1; color: #C84B32; }
.cl-mobile-articles { display: none; }

@media (max-width: 900px) {
  .cl-programs-dropdown { display: none !important; }
  .cl-navinner { height: 64px !important; padding-left: 20px !important; padding-right: 20px !important; gap: 12px !important; }
  .cl-navinner > a:first-child img { height: 40px !important; }
  .cl-footerinner { padding: 44px 22px 24px !important; }
  .cl-footergrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 32px 24px !important; padding-bottom: 36px !important; }
  [style*="max-width:1260px"] { max-width: 100% !important; }
  [style*="padding:80px 32px"],
  [style*="padding:80px 32px 72px"],
  [style*="padding:80px 0 72px"] { padding-top: 56px !important; padding-bottom: 56px !important; }
  [style*="gap:80px"] { gap: 36px !important; }
  [style*="padding:48px 52px"] { padding: 32px !important; }
  [style*="min-height:440px"] { min-height: 0 !important; }
  [style*="width:120px; height:68px"] { width: 96px !important; height: 54px !important; }
  [style*="font-size:88px"], [style*="font-size:80px"] { font-size: clamp(44px, 10vw, 68px) !important; }
  [style*="font-size:56px"], [style*="font-size:54px"], [style*="font-size:52px"], [style*="font-size:48px"] { font-size: clamp(34px, 7vw, 48px) !important; }
  [style*="font-size:40px"] { font-size: clamp(30px, 6vw, 40px) !important; }
  [style*="font-size:32px"] { font-size: clamp(25px, 5vw, 32px) !important; }
  [style*="letter-spacing:.2em"], [style*="letter-spacing:.22em"] { letter-spacing: .12em !important; }
}
@media (max-width: 820px) {
  .cl-mobile-articles { display: flex; flex-direction: column; padding: 12px 24px 14px; border-bottom: 1px solid rgba(11,27,38,.12); }
  .cl-mobile-articles a { padding: 5px 0; color: #0B1B26; font: 14px 'Source Serif 4', Georgia, serif; text-decoration: none; }
}

@media (max-width: 600px) {
  .cl-footergrid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .cl-footergrid > div:first-child { grid-column: auto; }
  .cl-footerinner > div:last-child { align-items: flex-start !important; flex-direction: column !important; }
  [style*="padding:80px 32px"],
  [style*="padding:80px 32px 72px"],
  [style*="padding:80px 0 72px"],
  [style*="padding:64px 32px"],
  [style*="padding:56px 32px 32px"] { padding: 42px 16px !important; }
  [style*="padding:0 32px"], [style*="padding: 0 32px"] { padding-left: 16px !important; padding-right: 16px !important; }
  [style*="padding:34px 32px"] { padding: 24px 16px !important; }
  [style*="padding:28px 22px"] { padding: 22px 16px !important; }
  [style*="padding:20px 24px"] { padding: 16px !important; }
  [style*="gap:56px"], [style*="gap:64px"] { gap: 28px !important; }
  [style*="font-size:20px"] { font-size: 18px !important; }
  [style*="font-size:19px"] { font-size: 17px !important; }
  [style*="font-size:18px"] { font-size: 16px !important; }
  [style*="font-size:17px"] { font-size: 16px !important; }
  [style*="display:flex; gap:12px"] { align-items: stretch !important; flex-direction: column !important; }
  [style*="display:flex; gap:12px"] > a { justify-content: center; width: 100%; }
  [style*="grid-template-columns:64px 1fr 64px"] { grid-template-columns: 40px minmax(0, 1fr) 40px !important; gap: 8px !important; }
  [style*="grid-template-columns:300px 1fr"] { grid-template-columns: 1fr !important; }
  [style*="width:64px; height:64px"] { width: 40px !important; height: 40px !important; font-size: 18px !important; }
  [style*="font-size:360px"] { font-size: 180px !important; }
  #cl-hero-grid { padding-left: 16px !important; padding-right: 16px !important; }
}

@media (max-width: 820px) {
  [style*="grid-template-columns:1fr"],
  [style*="grid-template-columns:1.4fr"],
  [style*="grid-template-columns:300px"],
  [style*="grid-template-columns:repeat("] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:64px"],
  [style*="grid-template-columns: 64px"] { grid-template-columns: 36px minmax(0, 1fr) 36px !important; gap: 8px !important; }
  [data-action] { width: 36px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .cl-rv { opacity: 1 !important; transform: none !important; }
  .cl-w1 { opacity: 1 !important; transform: none !important; }
  .cl-w2 { opacity: 0 !important; }
}
@media (min-width: 821px) and (max-width: 1080px) {
  .cl-navlinks { gap: 6px !important; }
  .cl-navlinks .cl-tab { padding: 13px 14px; font-size: 12px; letter-spacing: .08em !important; }
  .cl-account { padding: 13px 12px; font-size: 11px; letter-spacing: .08em; }
}
