/* ═══════════════════════════════════════════
   Connect Filter — Dashboard Styles
   ═══════════════════════════════════════════ */
.cf-page *, .cf-page *::before, .cf-page *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.cf-navbar, .cf-navbar *, .cf-navbar *::before, .cf-navbar *::after { box-sizing: border-box; }

body.cf-page {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #ffffff; height: 100%;
  overflow-x: hidden; -webkit-overflow-scrolling: touch;
}

/* Page backgrounds */
.cf-page-dashboard, .cf-page-subdashboard { background: #200500; }
.cf-page-lesson { background: #FFF5E6; color: #333; }

/* ─── LOADING MASK ─── */
#cf-loading-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #200500; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 100px;
  opacity: 1; visibility: visible; transition: opacity 0.8s ease, visibility 0.8s ease;
}
#cf-loading-mask.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.cf-page-lesson #cf-loading-mask { background: #FFF5E6; }

.cf-loading-text {
  font-size: 22px; font-weight: 800; color: #ffffff; text-transform: uppercase;
  letter-spacing: 2px; margin-bottom: 24px; animation: cf-pulseText 1.5s infinite ease-in-out;
}
.cf-page-lesson .cf-loading-text { color: #333; }
@keyframes cf-pulseText { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }

/* ─── HAMSTER LOADER ─── */
.wheel-and-hamster { --dur: 1s; position: relative; width: 12em; height: 12em; font-size: 14px; }
.wheel, .hamster, .hamster div, .spoke { position: absolute; }
.wheel, .spoke { border-radius: 50%; top: 0; left: 0; width: 100%; height: 100%; }
.wheel { background: radial-gradient(100% 100% at center,hsla(0,0%,60%,0) 47.8%,hsl(0,0%,60%) 48%); z-index: 2; }
.hamster { animation: cf-hamster var(--dur) ease-in-out infinite; top: 50%; left: calc(50% - 3.5em); width: 7em; height: 3.75em; transform: rotate(4deg) translate(-0.8em,1.85em); transform-origin: 50% 0; z-index: 1; }
.hamster__head { animation: cf-hamsterHead var(--dur) ease-in-out infinite; background: hsl(30,90%,55%); border-radius: 70% 30% 0 100% / 40% 25% 25% 60%; box-shadow: 0 -0.25em 0 hsl(30,90%,80%) inset, 0.75em -1.55em 0 hsl(30,90%,90%) inset; top: 0; left: -2em; width: 2.75em; height: 2.5em; transform-origin: 100% 50%; }
.hamster__ear { animation: cf-hamsterEar var(--dur) ease-in-out infinite; background: hsl(0,90%,85%); border-radius: 50%; box-shadow: -0.25em 0 hsl(30,90%,55%) inset; top: -0.25em; right: -0.25em; width: 0.75em; height: 0.75em; transform-origin: 50% 75%; }
.hamster__eye { animation: cf-hamsterEye var(--dur) linear infinite; background-color: hsl(0,0%,0%); border-radius: 50%; top: 0.375em; left: 1.25em; width: 0.5em; height: 0.5em; }
.hamster__nose { background: hsl(0,90%,75%); border-radius: 35% 65% 85% 15% / 70% 50% 50% 30%; top: 0.75em; left: 0; width: 0.2em; height: 0.25em; }
.hamster__body { animation: cf-hamsterBody var(--dur) ease-in-out infinite; background: hsl(30,90%,90%); border-radius: 50% 30% 50% 30% / 15% 60% 40% 40%; box-shadow: 0.1em 0.75em 0 hsl(30,90%,55%) inset, 0.15em -0.5em 0 hsl(30,90%,80%) inset; top: 0.25em; left: 2em; width: 4.5em; height: 3em; transform-origin: 17% 50%; transform-style: preserve-3d; }
.hamster__limb--fr, .hamster__limb--fl { clip-path: polygon(0 0,100% 0,70% 80%,60% 100%,0% 100%,40% 80%); top: 2em; left: 0.5em; width: 1em; height: 1.5em; transform-origin: 50% 0; }
.hamster__limb--fr { animation: cf-hamsterFRLimb var(--dur) linear infinite; background: linear-gradient(hsl(30,90%,80%) 80%,hsl(0,90%,75%) 80%); transform: rotate(15deg) translateZ(-1px); }
.hamster__limb--fl { animation: cf-hamsterFLLimb var(--dur) linear infinite; background: linear-gradient(hsl(30,90%,90%) 80%,hsl(0,90%,85%) 80%); transform: rotate(15deg); }
.hamster__limb--br, .hamster__limb--bl { border-radius: 0.75em 0.75em 0 0; clip-path: polygon(0 0,100% 0,100% 30%,70% 90%,70% 100%,30% 100%,40% 90%,0% 30%); top: 1em; left: 2.8em; width: 1.5em; height: 2.5em; transform-origin: 50% 30%; }
.hamster__limb--br { animation: cf-hamsterBRLimb var(--dur) linear infinite; background: linear-gradient(hsl(30,90%,80%) 90%,hsl(0,90%,75%) 90%); transform: rotate(-25deg) translateZ(-1px); }
.hamster__limb--bl { animation: cf-hamsterBLLimb var(--dur) linear infinite; background: linear-gradient(hsl(30,90%,90%) 90%,hsl(0,90%,85%) 90%); transform: rotate(-25deg); }
.hamster__tail { animation: cf-hamsterTail var(--dur) linear infinite; background: hsl(0,90%,85%); border-radius: 0.25em 50% 50% 0.25em; box-shadow: 0 -0.2em 0 hsl(0,90%,75%) inset; top: 1.5em; right: -0.5em; width: 1em; height: 0.5em; transform: rotate(30deg) translateZ(-1px); transform-origin: 0.25em 0.25em; }
.spoke { animation: cf-spoke var(--dur) linear infinite; background: radial-gradient(100% 100% at center,hsl(0,0%,60%) 4.8%,hsla(0,0%,60%,0) 5%), linear-gradient(hsla(0,0%,55%,0) 46.9%,hsl(0,0%,65%) 47% 52.9%,hsla(0,0%,65%,0) 53%) 50% 50% / 99% 99% no-repeat; }
@keyframes cf-spoke { from { transform: rotate(0); } to { transform: rotate(-1turn); } }
@keyframes cf-hamster{ from, to { transform: rotate(4deg) translate(-0.8em,1.85em); } 50% { transform: rotate(0) translate(-0.8em,1.85em); } }
@keyframes cf-hamsterHead { from, 25%, 50%, 75%, to { transform: rotate(0); } 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(8deg); } }
@keyframes cf-hamsterEye { from, 90%, to { transform: scaleY(1); } 95% { transform: scaleY(0); } }
@keyframes cf-hamsterEar { from, 25%, 50%, 75%, to { transform: rotate(0); } 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(12deg); } }
@keyframes cf-hamsterBody { from, 25%, 50%, 75%, to { transform: rotate(0); } 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(-2deg); } }
@keyframes cf-hamsterFRLimb { from, 25%, 50%, 75%, to { transform: rotate(50deg) translateZ(-1px); } 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(-30deg) translateZ(-1px); } }
@keyframes cf-hamsterFLLimb { from, 25%, 50%, 75%, to { transform: rotate(-30deg); } 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(50deg); } }
@keyframes cf-hamsterBRLimb { from, 25%, 50%, 75%, to { transform: rotate(-60deg) translateZ(-1px); } 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(20deg) translateZ(-1px); } }
@keyframes cf-hamsterBLLimb { from, 25%, 50%, 75%, to { transform: rotate(20deg); } 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(-60deg); } }
@keyframes cf-hamsterTail { from, 25%, 50%, 75%, to { transform: rotate(30deg) translateZ(-1px); } 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(10deg) translateZ(-1px); } }

/* ─── MODAL ─── */
#cf-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85); display: none;
  align-items: flex-start; justify-content: center; z-index: 2147483647;
  padding: 20px; backdrop-filter: blur(4px);
}
#cf-modal-overlay.visible { display: flex; }
.cf-modal-box {
  margin-top: 40px; background: #200500; border: 2px solid rgba(255,255,255,0.2);
  border-radius: 24px; padding: 30px; max-width: 400px; width: 100%;
  text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
.cf-modal-title { font-size: 20px; font-weight: 800; margin-bottom: 12px; color: #fff; }
.cf-modal-text { font-size: 15px; color: #ccc; margin-bottom: 24px; line-height: 1.5; }
.cf-modal-actions { display: flex; gap: 12px; }
.btn-modal { flex: 1; padding: 14px; border-radius: 12px; font-weight: 700; cursor: pointer; border: none; font-size: 14px; }
.btn-confirm { background: #04409E; color: white; }
.btn-cancel { background: rgba(255,255,255,0.1); color: white; }

/* ─── NAVBAR ─── */
.cf-navbar {
  position: sticky; top: 0; flex-shrink: 0; height: 70px; background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.05); display: flex; align-items: center;
  padding: 0 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.2); z-index: 100;
  overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
}
.cf-navbar::-webkit-scrollbar { display: none; }

/* Logo in navbar */
.cf-nav-logo {
  display: flex; align-items: center; margin-right: 10px; flex-shrink: 0;
  text-decoration: none; padding: 0 8px;
}
.cf-nav-logo-img { height: 40px; width: auto; }
.cf-nav-logo-text {
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
}
.cf-nav-logo-text .logo-connect { color: #D63384; font-style: italic; }
.cf-nav-logo-text .logo-filter { color: #04409E; font-style: italic; }

.cf-navbar .nav-spacer { flex: 1; }

.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none; color: #555; font-size: 11px; font-weight: 600;
  margin: 0 5px; cursor: pointer; padding: 8px 10px; border-radius: 8px;
  transition: background 0.2s; min-width: 70px; flex-shrink: 0; border: none; background: transparent;
}
.nav-item:hover { background: #f0f0f0; }
.nav-item.active { background: #e0e0e0; color: #000; }
.nav-item .nav-icon { margin-bottom: 4px; }
.nav-item .nav-icon svg { width: 24px; height: 24px; fill: #777; display: block; transition: fill 0.2s; }
.nav-item .nav-icon .nav-icon-img { width: 24px; height: 24px; object-fit: contain; display: block; }
.nav-item:hover .nav-icon svg { fill: #2b2b2b; }
.nav-item.active .nav-icon svg { fill: #000; }

/* ─── APP CONTAINER ─── */
#cf-app-container { width: 100%; padding: 20px; padding-bottom: 40px; max-width: 1200px; margin: 0 auto; }
.cf-header { text-align: center; margin-bottom: 24px; }
.cf-logo-text { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: #fff; text-transform: uppercase; }

/* ─── PROGRESS CARD ─── */
.cf-progress-card {
  background: #ffffff; border-radius: 20px; padding: 24px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3); margin-bottom: 24px;
}
.cf-progress-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-weight: 800; color: #04409E; }
.cf-track { width: 100%; height: 16px; background: #eee; border-radius: 99px; overflow: hidden; }
.cf-fill { height: 100%; width: 0; background: #04409E; transition: width 0.8s cubic-bezier(0.22,1,0.36,1); }

/* ─── GRID & CARDS ─── */
.cf-grid {
  display: grid; grid-template-columns: 1fr; gap: 20px;
  max-width: 1000px; margin: 0 auto 20px auto;
}
@media (min-width: 650px) { .cf-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)); } }
@media (min-width: 1100px) { .cf-grid { grid-template-columns: repeat(3, minmax(280px, 1fr)); } }

.cf-card {
  position: relative; border-radius: 24px; padding: 24px; color: white;
  cursor: pointer; min-height: 200px; display: flex; flex-direction: column;
  justify-content: space-between; box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s; overflow: hidden;
  background-size: cover; background-position: center;
}
.cf-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,0.3); }
.cf-card:active { transform: scale(0.97); }

/* Locked card overlay — grayscale + dark + blur */
.cf-card.locked { cursor: not-allowed; }
.cf-card.locked::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30,30,30,0.6); backdrop-filter: grayscale(1) blur(2px); z-index: 5;
}
.cf-card.locked:hover { transform: none; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }

/* Lock icon overlay */
.cf-lock-overlay {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 10; font-size: 40px; background: rgba(255,255,255,0.1);
  width: 60px; height: 60px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}
.cf-card.locked .cf-lock-overlay { display: flex; }

/* Card content */
.cf-card-top {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  z-index: 2; pointer-events: none;
}
.cf-card-title {
  font-size: 22px; font-weight: 800; line-height: 1.1; max-width: 100%;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.cf-card-bottom {
  display: flex; justify-content: space-between; align-items: flex-end;
  z-index: 20; margin-top: 20px;
}
.cf-status {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  opacity: 0.9; text-shadow: 0 1px 3px rgba(0,0,0,0.5); pointer-events: none;
}

/* Icon box on cards */
.cf-icon-box {
  width: 88px; height: 88px; background: rgba(255,255,255,0.15);
  border-radius: 24px; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); flex-shrink: 0; padding: 12px;
  border: 1px solid rgba(255,255,255,0.2); pointer-events: none;
}
.cf-icon-box img {
  width: 100%; height: 100%; object-fit: contain; display: block; mix-blend-mode: screen;
}

/* Card buttons */
.btn-undo {
  background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.6);
  color: white; padding: 6px 14px; border-radius: 99px; font-size: 12px;
  font-weight: 700; cursor: pointer; z-index: 20; transition: background 0.2s;
}
.btn-undo:hover { background: rgba(0,0,0,0.7); }

.btn-complete-dash {
  background: #04409E; border: 1px solid rgba(255,255,255,0.4);
  color: white; padding: 6px 14px; border-radius: 99px; font-size: 12px;
  font-weight: 700; cursor: pointer; z-index: 20; transition: background 0.2s;
}
.btn-complete-dash:hover { background: #032d70; }

/* Hide button for optional cards */
.btn-hide-card {
  position: absolute; top: 16px; right: 16px;
  background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.4);
  color: white; padding: 6px 14px; border-radius: 99px; font-size: 12px;
  font-weight: 700; cursor: pointer; z-index: 30; transition: background 0.2s;
}
.btn-hide-card:hover { background: rgba(0,0,0,0.8); }

/* ─── HIDDEN CATEGORIES ACCORDION ─── */
.dash-manager-container { display: flex; flex-direction: column; max-width: 1000px; margin: 0 auto 30px auto; }
.cf-accordion {
  width: 100%; background: rgba(255,255,255,0.05); padding: 16px;
  border-radius: 16px; border: 1px solid rgba(255,255,255,0.1);
}
.cf-accordion-header {
  font-size: 14px; font-weight: 800; text-transform: uppercase; color: #ccc;
  letter-spacing: 1px; cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; list-style: none; outline: none;
}
.cf-accordion-header::-webkit-details-marker { display: none; }
.cf-accordion-header::after { content: '\25BC'; font-size: 12px; transition: transform 0.2s; color: #ccc; }
.cf-accordion[open] .cf-accordion-header::after { transform: rotate(180deg); }

.dash-item.hidden-state {
  background: rgba(255,255,255,0.1); margin-top: 12px; border-radius: 12px;
  padding: 12px 16px; display: flex; justify-content: space-between; align-items: center;
}
.dash-item.hidden-state .dash-item-title { font-size: 15px; font-weight: 700; color: #fff; opacity: 0.8; }
.btn-unhide {
  background: #fff; color: #333; border: 1px solid #ccc; padding: 6px 14px;
  border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 12px; transition: background 0.2s;
}
.btn-unhide:hover { background: #e0e0e0; }

/* ─── BACK BUTTON (sub-dashboard) ─── */
.cf-back-main-btn {
  display: inline-block; padding: 12px 28px; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3); border-radius: 12px;
  color: #fff; font-weight: 700; font-size: 14px; text-decoration: none;
  transition: background 0.2s;
}
.cf-back-main-btn:hover { background: rgba(255,255,255,0.2); }

/* ─── LESSON PAGE ─── */
.cf-lesson-container { padding: 20px; max-width: 1200px; margin: 0 auto; }

.cf-back-btn {
  display: inline-block; padding: 10px 20px; background: #fff;
  border: 1px solid #ddd; border-radius: 8px; color: #333;
  font-weight: 600; font-size: 14px; text-decoration: none;
  margin-bottom: 20px; transition: background 0.2s;
}
.cf-back-btn:hover { background: #f0f0f0; }

.cf-lesson-card {
  background: #fff; border-radius: 20px; padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08); max-width: 900px; margin: 0 auto;
}
.cf-lesson-title { font-size: 28px; font-weight: 800; color: #333; margin: 0 0 8px 0; }
.cf-lesson-subtitle { font-size: 18px; font-weight: 600; color: #555; margin: 0 0 8px 0; }
.cf-lesson-instructions { font-size: 14px; color: #777; margin-bottom: 20px; }

.cf-videoask-wrapper {
  width: 100%; min-height: 400px; margin-bottom: 20px;
  border-radius: 16px; overflow: hidden; background: #f5f5f5;
}
.cf-videoask-wrapper iframe { display: block; width: 100%; height: 600px; }

.cf-videoask-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 400px; color: #999; font-size: 16px; text-align: center; padding: 40px;
}
.cf-videoask-placeholder .cf-small { font-size: 12px; color: #bbb; margin-top: 8px; }
.cf-videoask-placeholder code { background: #eee; padding: 2px 6px; border-radius: 4px; font-size: 11px; }

.cf-complete-lesson-btn {
  display: block; width: 100%; padding: 18px; background: #666;
  color: white; border: none; border-radius: 12px; font-size: 16px;
  font-weight: 700; cursor: pointer; text-align: center; transition: background 0.3s;
}
.cf-complete-lesson-btn:hover { background: #04409E; }
.cf-complete-lesson-btn.active { background: #04409E; }

/* ─── PAGE HEIGHT ─── */
/* Keeps the footer at the bottom of short pages (e.g. sub-dashboards with
   only 2 cards) by giving the main app container a viewport-relative min-height. */
#cf-app-container { min-height: calc(100vh - 200px); }

/* ─── FOOTER ─── */
.cf-footer {
  text-align: center; padding: 30px 20px; font-size: 14px; font-weight: 600;
  color: #333; background: #ffffff;
}

/* ─── TABLET ─── */
@media (max-width: 768px) {
  .cf-navbar { height: 64px; padding: 0 6px; }
  .cf-nav-logo-text { font-size: 18px; }
  .nav-item { min-width: 64px; font-size: 10px; padding: 8px 8px; }

  #cf-app-container { padding: 16px; }
  .cf-logo-text { font-size: 22px; }

  .cf-lesson-container { padding: 16px; }
  .cf-lesson-card { padding: 24px; }
  .cf-lesson-title { font-size: 24px; }
  .cf-lesson-subtitle { font-size: 16px; }

  /* Larger touch targets for card buttons */
  .btn-undo, .btn-complete-dash, .btn-hide-card {
    padding: 10px 18px; font-size: 13px; min-height: 44px;
  }
  .btn-unhide { padding: 10px 18px; font-size: 13px; min-height: 44px; }
  .btn-modal { padding: 16px; font-size: 15px; min-height: 48px; }
  .cf-complete-lesson-btn { padding: 20px; font-size: 17px; min-height: 56px; }
  .cf-back-btn { padding: 12px 24px; min-height: 44px; }
  .cf-back-main-btn { padding: 14px 28px; min-height: 44px; }
}

/* ─── MOBILE ─── */
@media (max-width: 480px) {
  .cf-navbar { height: 60px; padding: 0 4px; }
  .nav-item { min-width: 60px; font-size: 10px; padding: 6px 6px; margin: 0 2px; }
  .nav-item .nav-icon svg { width: 20px; height: 20px; }
  .nav-item .nav-icon .nav-icon-img { width: 20px; height: 20px; }
  .cf-nav-logo-text { font-size: 16px; }

  #cf-app-container { padding: 12px; }
  .cf-logo-text { font-size: 20px; }
  .cf-progress-card { padding: 16px; border-radius: 16px; }

  .cf-card { min-height: 160px; padding: 16px; border-radius: 18px; }
  .cf-card-title { font-size: 18px; }
  .cf-icon-box { width: 64px; height: 64px; border-radius: 16px; padding: 8px; }

  .cf-lesson-container { padding: 10px; }
  .cf-lesson-card { padding: 16px; border-radius: 16px; }
  .cf-lesson-title { font-size: 20px; }
  .cf-lesson-subtitle { font-size: 14px; }
  .cf-lesson-instructions { font-size: 13px; }
  .cf-videoask-wrapper { min-height: 300px; }
  .cf-videoask-wrapper iframe { height: 90dvh; }

  .cf-modal-box { padding: 24px; border-radius: 20px; }
  .cf-modal-title { font-size: 18px; }
  .cf-modal-text { font-size: 14px; }

  .cf-footer { padding: 24px 16px; font-size: 13px; }

  .dash-item.hidden-state { padding: 14px 16px; }
  .dash-item.hidden-state .dash-item-title { font-size: 14px; }
}

@media (max-width: 360px) {
  .cf-nav-logo { display: none; }
  .cf-card { min-height: 140px; }
  .cf-card-title { font-size: 16px; }
  .cf-lesson-title { font-size: 18px; }
}

/* ─── ADA / ACCESSIBILITY ─── */

/* Skip navigation link (screen readers + keyboard) */
.cf-skip-link {
  position: absolute; top: -100px; left: 0; z-index: 10000;
  background: #04409E; color: #fff; padding: 12px 24px; font-weight: 700; font-size: 14px;
  text-decoration: none; border-radius: 0 0 8px 0;
}
.cf-skip-link:focus { top: 0; }

/* Screen reader only utility */
.cf-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Focus-visible outlines for keyboard navigation (WCAG 2.4.7) */
.cf-page a:focus-visible,
.cf-page button:focus-visible,
.cf-navbar a:focus-visible,
.cf-navbar button:focus-visible {
  outline: 3px solid #04409E; outline-offset: 2px; border-radius: 4px;
}
.cf-card:focus-visible {
  outline: 3px solid #fff; outline-offset: 2px;
}
.btn-modal:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Reduced motion for vestibular disorders (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #cf-loading-mask { transition: none; opacity: 1; }
  #cf-loading-mask.hidden { opacity: 0; visibility: hidden; }
  .cf-fill { transition: none; }
}

/* ─── SECTION HEADINGS (Foundation / Preferences) ─── */
.cf-section-title {
  grid-column: 1 / -1;
  margin: 14px 0 -6px; padding: 0 4px;
  font-size: 14px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}
.cf-section-title:first-child { margin-top: 0; }
