/* ================================================================
   EDUSPOT Portal — Design System
   Theme: #222831 · #393E46 · #00ADB5 · #EEEEEE
   WCAG 2.1 AA compliant
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Core palette */
  --dark: #222831;
  --dark-mid: #393E46;
  --accent: #00ADB5;
  --accent-hover: #009DA5;
  --accent-light: #E0F7FA;
  --light: #EEEEEE;

  /* Surfaces */
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-alt: #F0F1F3;
  --surface-hover: #E8EAED;

  /* Text */
  --text: #222831;
  --text-secondary: #4A4F58;
  --text-muted: #6B7280;
  --text-on-dark: #EEEEEE;
  /* Links on white/light: contrast ≥ 4.5:1 (WCAG AA body text) */
  --link-on-light: #005C63;
  --link-on-light-hover: #004048;
  --focus-ring: #006971;
  --border-input: #4B5563;

  /* Semantic */
  --success: #10B981;
  --success-bg: #ECFDF5;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;

  /* Borders / shadows */
  --border: #E5E7EB;
  --border-subtle: #F0F0F0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, .16);

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-full: 9999px;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 28px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  --header-h: 60px;
  --sidebar-w: 240px;
  --container: 1200px;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  font-size: 100%;
  scroll-behavior: smooth
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased
}

img {
  max-width: 100%;
  display: block
}

a {
  color: var(--link-on-light);
  text-decoration: none;
  transition: color .15s
}

a:hover {
  color: var(--link-on-light-hover)
}

ul,
ol {
  list-style: none
}

/* ---- Accessibility ---- */
.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
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: 9999;
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600
}

.skip-link:focus {
  top: var(--sp-2)
}

#liveRegion {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Focus on dark backgrounds (player, header, dark pages) [WCAG 2.4.7] ---- */
.page-player *:focus-visible,
.page-recording *:focus-visible {
  outline-color: #fff !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .5) !important;
}

.page-player .player-top *:focus-visible,
.page-player .site-header *:focus-visible,
.page-recording .site-header *:focus-visible {
  outline-color: #fff !important;
}

/* Keep accent-colored focus on light-bg elements inside player */
.page-player .player-col__card *:focus-visible {
  outline-color: var(--focus-ring) !important;
  box-shadow: none !important;
}

.page-player .tab:focus-visible,
.page-player .search-bar input:focus-visible,
.page-player .chapter-item:focus-visible,
.page-player .glossary-link:focus-visible {
  outline-color: var(--focus-ring) !important;
  box-shadow: none !important;
}

/* ---- Utilities ---- */
.hidden {
  display: none !important
}

.text-sm {
  font-size: var(--text-sm)
}

.text-xs {
  font-size: var(--text-xs)
}

.text-muted {
  color: var(--text-muted)
}

.text-center {
  text-align: center
}

.mt-2 {
  margin-top: var(--sp-2)
}

.mt-3 {
  margin-top: var(--sp-3)
}

.mt-4 {
  margin-top: var(--sp-4)
}

/* ================================================================
   HEADER
   ================================================================ */
/* Sticky (scrolls away with page until it reaches top — not position:fixed) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 var(--sp-6);
  background: var(--dark);
  color: var(--text-on-dark);
}

.site-header__brand {
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
}

.site-header__brand:hover {
  color: #fff
}

.site-header__brand:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
  color: #fff
}

.site-header__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2)
}

.site-header__nav a,
.site-header__nav button {
  color: rgba(255, 255, 255, .75);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: all .15s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

.site-header__nav a:hover,
.site-header__nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1)
}

.site-header__nav a:focus-visible,
.site-header__nav button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  color: #fff;
}

.site-header__nav .active {
  color: #fff;
  background: var(--accent)
}

.site-header__user {
  color: rgba(255, 255, 255, .6);
  font-size: var(--text-sm);
  margin: 0 var(--sp-2)
}

.site-header__hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: var(--sp-2)
}

/* Login page — compact sticky bar */
.site-header--loginbrand {
  position: sticky;
  top: 0;
  z-index: 100;
  height: auto;
  min-height: unset;
  justify-content: center;
  padding: var(--sp-3) var(--sp-4) var(--sp-2);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: rgba(17, 24, 39, .72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  flex-shrink: 0;
}

.site-header__loginbrand {
  width: 100%;
  max-width: min(960px, 92vw);
  margin: 0 auto;
  text-align: center;
  padding: var(--sp-2) var(--sp-4);
  box-sizing: border-box;
  border-radius: var(--r-md);
}

.site-header--loginbrand .site-header__wordmark {
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  font-weight: 700;
  border-bottom-width: 3px;
  padding-bottom: var(--sp-2);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}

.site-header--loginbrand .site-header__tagline {
  margin: var(--sp-3) auto 0;
  max-width: 38rem;
  font-size: clamp(0.75rem, 0.9vw + 0.55rem, 0.875rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, .96);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .65);
}

@media(min-width:960px) {
  .site-header--loginbrand .site-header__tagline {
    white-space: nowrap
  }
}

@media(max-width:959px) {
  .site-header--loginbrand .site-header__tagline {
    white-space: normal;
    max-width: 28rem;
  }
}

.site-header__wordmark {
  display: inline-block;
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1.15;
  text-decoration: none;
  border-bottom: 3px solid var(--accent);
  padding-bottom: var(--sp-2);
  transition: color .15s, border-color .15s;
}

.site-header__wordmark:hover {
  color: var(--light);
  border-color: var(--accent-hover)
}

.site-header__tagline {
  margin: var(--sp-4) auto 0;
  font-size: var(--text-sm);
  font-weight: 400;
  color: rgba(238, 238, 238, .72);
  line-height: 1.65;
  max-width: 36rem;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 600;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  line-height: 1.4;
}

.btn svg {
  width: 16px;
  height: 16px
}

.btn--primary {
  background: var(--accent);
  color: #fff
}

.btn--primary:hover {
  background: var(--accent-hover)
}

.btn--secondary {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border)
}

.btn--secondary:hover {
  background: var(--surface-hover)
}

.btn--danger {
  background: var(--danger);
  color: #fff
}

.btn--danger:hover {
  background: #DC2626
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary)
}

.btn--ghost:hover {
  background: var(--surface-alt)
}

.btn--white {
  background: #fff;
  color: var(--dark)
}

.btn--white:hover {
  background: var(--light)
}

.btn--sm {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--text-xs)
}

.btn--lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--text-base)
}

.btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px
}

/* Links as buttons: global `a` / `a:hover` must not recolor label over solid fills */
a.btn--primary,
a.btn--danger {
  color: #fff
}

a.btn--primary:hover,
a.btn--primary:focus-visible,
a.btn--danger:hover,
a.btn--danger:focus-visible {
  color: #fff
}

a.btn--secondary,
a.btn--secondary:hover,
a.btn--secondary:focus-visible {
  color: var(--text)
}

a.btn--white,
a.btn--white:hover,
a.btn--white:focus-visible {
  color: var(--dark)
}

/* ================================================================
   FORMS
   ================================================================ */
.form-group {
  margin-bottom: var(--sp-4)
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-1)
}

.form-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font);
  font-size: var(--text-sm);
  border: 1.5px solid #8B919A;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 92, 99, .2);
  outline: none
}

.form-input:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px
}

.form-error {
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: var(--sp-1)
}

/* ================================================================
   BADGE
   ================================================================ */
.badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--r-full);
  line-height: 1.6
}

.badge--green {
  background: var(--success-bg);
  color: #047857
}

.badge--red {
  background: var(--danger-bg);
  color: var(--danger)
}

.badge--teal {
  background: var(--accent-light);
  color: #00838F
}

.badge--ghost {
  background: var(--surface-alt);
  color: var(--text-muted)
}

/* ================================================================
   HOME PAGE — classic three-card layout (login | recordings + resources)
   ================================================================ */
/* Background video */
.login-video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.login-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.login-video-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}

@media (prefers-reduced-motion:reduce) {
  .login-video-bg video {
    display: none
  }

  .login-video-overlay {
    background: var(--dark)
  }
}

/* Login: single screen — no page scrollbar (recent-recordings list scrolls inside its card) */
.page-login {
  --text-muted: #5c6570;
  background: var(--dark);
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100dvh;
  max-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: none;
  box-sizing: border-box;
}

.page-login #main {
  flex: 1 1 auto;
  display: block;  /* changed from flex */
  overflow: auto;
}

.page-login .home-hero {
  display: flex;
  align-items: flex-start; /* changed from center to avoid cutoff */
  justify-content: center;
  min-height: 100%;
  padding: var(--sp-6) var(--sp-4);
  box-sizing: border-box;
}

.page-login .home-hero__inner {
  width: 100%;
  max-width: min(920px, 94vw);
  margin: auto; /* this centers vertically when larger than content, but allows scrolling when smaller */
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.page-login .home-landing-cards {
  flex: 1 1 auto;
  min-height: 0;
  gap: var(--sp-4);
  overflow: visible;
  padding-bottom: var(--sp-4);
}

.page-login .home-card {
  padding: var(--sp-5) var(--sp-6);
}

.page-login .home-card__title {
  margin-bottom: var(--sp-2)
}

.page-login .home-landing-cards__divider {
  min-height: 6rem;
  align-self: stretch
}

.home-hero {
  background: transparent;
  color: var(--text-on-dark);
  padding: var(--sp-10) var(--sp-6) var(--sp-12);
}

.home-hero__inner {
  max-width: min(920px, 94vw);
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.home-landing-cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6)
}

/* Flex avoids grid gap splitting the divider away from the cards */
.home-landing-cards__top {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--sp-6);
  width: 100%;
}

.home-card--login,
.home-card--recordings {
  flex: 1;
  min-width: 0;
}

.home-landing-cards__divider {
  width: 1px;
  flex-shrink: 0;
  align-self: stretch;
  min-height: 10rem;
  background: var(--border);
  box-shadow: 1px 0 0 rgba(0, 0, 0, .05);
}

.home-card {
  background: rgba(255, 255, 255, .95);
  border-radius: var(--r-lg);
  padding: var(--sp-8) var(--sp-8);
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  min-width: 0;
}

.home-card__title {
  margin: 0 0 var(--sp-3);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  line-height: 1.2;
}

.home-card__subtitle {
  margin: 0 0 var(--sp-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5
}

.home-card__footer {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0
}

.home-card__loading {
  padding: var(--sp-2) 0;
  font-size: var(--text-sm);
  color: var(--text-muted)
}

.page-login .home-card a:not(.btn) {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none
}

.page-login .home-card a:not(.btn):hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: .15em
}

.page-login .home-card a:not(.btn):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

.site-header--loginbrand .site-header__wordmark:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
  border-radius: 2px;
}

.page-login .home-card--login .form-group {
  margin-bottom: var(--sp-4)
}

.page-login .home-card--login .form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}

.page-login .home-card--login .form-input {
  min-height: 44px;
  width: 100%;
  padding: 10px 14px;
  font-size: var(--text-sm);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid #8B919A;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
}

.page-login .home-card--login .form-input:hover {
  border-color: #6B7280
}

.page-login .home-card--login .form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 173, 181, .15);
  outline: none
}

.page-login .btn--home-login {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  font-size: var(--text-base);
  font-weight: 600
}

.page-login .form-error {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--sp-3)
}

/* ---- A-001: Password visibility toggle ---- */
.pw-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* Give the input room for the toggle button so text doesn't overlap it */
.pw-field-wrap .pw-input {
  padding-right: 46px;
}

/* The toggle button: absolutely positioned inside the field on the right */
.pw-toggle-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  /* Minimum 44×44px touch target (WCAG 2.5.5) */
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  font-family: var(--font);
  transition: color .15s, background .15s;
  /* Ensure the button is in the tab order */
  z-index: 2;
}

.pw-toggle-btn:hover {
  color: var(--accent);
  background: rgba(0, 173, 181, .08);
}

/* Clear, visible focus ring that meets WCAG 2.4.7 */
.pw-toggle-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  color: var(--accent);
}

.pw-toggle-btn svg.pw-icon {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.home-resources-cols {
  list-style: disc;
  margin: 0;
  padding: 0 0 0 1.1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--sp-6);
  color: var(--text);
  line-height: 1.35;
  max-height: min(240px, 35vh);
  overflow-y: auto;
  scroll-behavior: smooth;
}

@media(min-width:520px) {
  .home-resources-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--sp-8);
    row-gap: 0;
  }
}

.home-resources-cols li {
  margin: 0;
  padding-left: 0;
  padding-bottom: var(--sp-1);
}

.home-resources-cols ::marker {
  color: var(--accent);
  font-size: 0.85em
}

.page-login .home-resources-cols a {
  display: inline;
  padding: 2px 0;
  vertical-align: baseline;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  line-height: inherit;
  min-height: 0;
}

.page-login .home-resources-cols a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: .12em
}

.page-login .home-resources-cols a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Recent list: compact bulleted links, scrollable when many items */
.home-recent-list.recordings-preview-list--home {
  margin: var(--sp-2) 0 0;
  padding: 0 0 0 1.1rem;
  list-style: disc;
  max-height: min(340px, min(48vh, 24rem));
  overflow-y: auto;
  scroll-behavior: smooth;
  border: none;
  background: transparent;
}

.page-login .home-recent-list.recordings-preview-list--home {
  max-height: min(280px, 35vh);
}

.home-recent-list.recordings-preview-list--home li {
  margin: 0;
  padding-left: 0;
  line-height: 1.35
}

.home-recent-list.recordings-preview-list--home li::before {
  display: none !important
}

.home-recent-list.recordings-preview-list--home ::marker {
  color: var(--accent);
  font-size: 0.85em
}

.home-recent-list.recordings-preview-list--home a {
  display: inline;
  padding: 2px 0;
  vertical-align: baseline;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent) !important;
  text-decoration: none !important;
  line-height: inherit;
  min-height: 0;
}

.home-recent-list.recordings-preview-list--home a:hover {
  color: var(--accent-hover) !important;
  text-decoration: underline !important
}

.home-recent-list.recordings-preview-list--home a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

.home-recent-list.recordings-preview-list--home li.text-muted {
  list-style: none;
  margin-left: -1rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.page-login .home-powered {
  margin-top: var(--sp-3);
  padding-right: var(--sp-1);
  flex-shrink: 0;
  color: rgba(238, 238, 238, .78);
  font-size: var(--text-xs);
}

.video-credit {
  position: fixed;
  right: 14px;
  bottom: 10px;
  z-index: 90;
  margin: 0;
  text-align: right;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .01em;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(17, 24, 39, .7);
  border: 1px solid rgba(255, 255, 255, .2);
  text-shadow: none;
}

@media(max-width:768px) {
  .home-landing-cards__top {
    flex-direction: column;
    gap: var(--sp-4)
  }

  .home-landing-cards__divider {
    width: 100%;
    height: 1px;
    min-height: 0;
    align-self: stretch;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
  }

  .home-card {
    padding: var(--sp-6) var(--sp-5)
  }
}

@media (prefers-reduced-motion:reduce) {
  .page-login * {
    scroll-behavior: auto !important
  }
}

.resources-link-list--grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-1) var(--sp-6);
  margin-top: 0;
}

@media(min-width:520px) {
  .resources-link-list--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.resources-link-list--grid a,
.resources-link-list--a11y a {
  border-bottom: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 600;
}

.resources-link-list--grid a:hover,
.resources-link-list--a11y a:hover {
  background: rgba(0, 92, 99, .06)
}

.resources-link-list--grid li:first-child a {
  padding-top: var(--sp-2)
}

.home-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  align-items: start;
}

.home-split__col {
  min-width: 0
}

.home-side-panel .recordings-preview-card__title {
  margin-bottom: var(--sp-1)
}

.home-side-panel__hint {
  margin: 0 0 var(--sp-4);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.recordings-preview-card,
.login-resources-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  box-shadow: var(--shadow-xl);
  color: var(--text);
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, .08);
}

.recordings-preview-card.home-side-panel {
  min-height: 10rem
}

.recordings-preview-card__title {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text)
}

.recordings-preview-card__loading {
  padding: var(--sp-2) 0
}

.recordings-preview-list {
  margin-top: var(--sp-1)
}

.recordings-preview-list li {
  margin-bottom: var(--sp-2);
  padding-left: var(--sp-4);
  position: relative
}

.recordings-preview-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.recordings-preview-list a {
  font-weight: 500;
  font-size: var(--text-sm)
}

.resources-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.resources-link-list li {
  margin: 0;
  padding: 0
}

.resources-link-list a {
  display: block;
  padding: var(--sp-2) 0;
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: 500;
  line-height: 1.35;
  border-bottom: 1px solid var(--border-subtle);
  transition: color .15s, padding-left .15s;
}

.resources-link-list li:first-child a {
  padding-top: 0
}

.resources-link-list li:last-child a {
  border-bottom: none;
  padding-bottom: 0
}

.resources-link-list a:hover {
  color: var(--accent-hover);
  padding-left: var(--sp-1)
}

.resources-link-list a.resources-link-list__lead {
  font-weight: 600;
  color: var(--dark)
}

.resources-link-list a.resources-link-list__lead:hover {
  color: var(--accent-hover)
}

.resources-link-list--footer a {
  border-bottom: none;
  padding: var(--sp-1) 0;
}

.resources-link-list--footer li:first-child a {
  padding-top: 0
}

.home-powered {
  text-align: right;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, .32);
  margin-top: var(--sp-4)
}

.login-card__note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6
}

/* Legacy hero block (still used if present elsewhere) */
.hero {
  background: var(--dark);
  color: #fff;
  padding: var(--sp-16) var(--sp-6) var(--sp-12);
}

.hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--sp-12);
  align-items: center
}

.hero__tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(0, 173, 181, .2);
  border: 1px solid rgba(0, 173, 181, .4);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: .06em;
  margin-bottom: var(--sp-4);
}

.hero__title {
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--sp-4)
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, .65);
  margin-bottom: var(--sp-6);
  line-height: 1.7
}

.hero__features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  margin-top: var(--sp-4)
}

.hero__feature {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, .8)
}

.hero__feature svg {
  color: var(--accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0
}

/* Login Card */
.login-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-xl);
  color: var(--text);
}

.login-card--narrow {
  width: 100%;
  max-width: 400px;
  padding: var(--sp-6) var(--sp-6);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.login-card--split {
  width: 100%;
  max-width: none;
  padding: var(--sp-6) var(--sp-6);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.login-card__heading {
  margin: 0 0 var(--sp-5);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--dark);
}

.login-card__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--sp-1)
}

.login-card__subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-6)
}

.login-card .btn {
  width: 100%;
  justify-content: center
}

/* Stats */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-6)
}

.stats-bar__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: var(--sp-12)
}

.stat {
  text-align: center
}

.stat__number {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--accent)
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--text-muted)
}

/* Section */
.section {
  padding: var(--sp-12) var(--sp-6)
}

.section__inner {
  max-width: var(--container);
  margin: 0 auto
}

.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-8)
}

.section__title {
  font-size: var(--text-2xl);
  font-weight: 700
}

.section__subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--sp-1)
}

/* View Toggle */
.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--surface-alt);
  border-radius: var(--r-sm);
  padding: 2px
}

.view-toggle__btn {
  padding: var(--sp-2) var(--sp-3);
  border: none;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.view-toggle__btn svg {
  width: 18px;
  height: 18px
}

.view-toggle__btn--active,
.view-toggle__btn:hover {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm)
}

.view-toggle__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px
}

/* ================================================================
   CARDS / LIST
   ================================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5)
}

/* Full-width center: grid with one child leaves spinner in first column on the left */
.card-grid.recordings-grid--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(52dvh, 520px);
  width: 100%;
}

.card-grid.recordings-grid--loading .loading-overlay {
  padding: var(--sp-10)
}

.card {
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px)
}

.card:focus {
  outline: none
}

.card:focus-visible {
  box-shadow: var(--shadow-md), 0 0 0 2px var(--focus-ring);
  transform: translateY(-2px)
}

.card__thumb {
  position: relative;
  display: block;
  aspect-ratio: 16/9;
  background: var(--dark);
  overflow: hidden
}

.card__thumb:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--r-sm)
}

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.card__play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  background: rgba(34, 40, 49, .55);
  opacity: 0;
  transition: opacity .2s;
}

.card:hover .card__play-overlay,
.card:focus-within .card__play-overlay {
  opacity: 1
}

/* Hide Details hover overlay and disable thumb link during multi-select */
.is-multiselecting .card__play-overlay {
  display: none;
}
.is-multiselecting .card__thumb {
  pointer-events: none;
  cursor: default;
}

.card__play-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.card__play-icon svg {
  width: 20px;
  height: 20px;
  margin-left: 2px
}

.card__play-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}

.card__body {
  padding: var(--sp-4)
}

.card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4
}

.card__title a {
  color: var(--text)
}

.card__title a:hover {
  color: var(--accent)
}

.card__meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2)
}

.list-view {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2)
}

.list-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: background .15s;
  cursor: pointer;
}

.list-item:hover {
  background: var(--surface-hover)
}

.list-item:focus {
  outline: none
}

.list-item:focus-visible {
  box-shadow: 0 0 0 2px var(--focus-ring)
}

.list-item__thumb {
  width: 80px;
  height: 52px;
  flex-shrink: 0;
  background: var(--dark);
  border-radius: var(--r-sm);
  overflow: hidden
}

.list-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.list-item__content {
  flex: 1;
  min-width: 0
}

.list-item__title {
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.list-item__title a {
  color: var(--text)
}

.list-item__desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px
}

.list-item__actions {
  flex-shrink: 0
}

/* ================================================================
   DASHBOARD
   ================================================================ */
.dashboard {
  display: flex;
  min-height: calc(100vh - var(--header-h))
}

.dashboard--full {
  flex: 1;
  display: block;
  max-width: min(1200px, 96vw);
  margin: 0 auto;
  padding: var(--sp-6);
  width: 100%;
  max-height: calc(100vh - var(--header-h));
  overflow: auto;
  scroll-behavior: smooth;
}

.site-header__crumb {
  color: rgba(255, 255, 255, .92);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-right: var(--sp-4)
}

.page-recording {
  background: var(--dark);
  min-height: 100vh
}

.page-recording .recording-page {
  background: transparent;
  padding: var(--sp-6) var(--sp-5) var(--sp-10)
}

.page-recording .recording-back__link {
  color: rgba(238, 238, 238, .85)
}

.page-recording .recording-back__link:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff
}

.page-recording .recording-detail {
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .4);
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--sp-6) 0;
  display: flex;
  flex-direction: column;
}

.sidebar__section-label {
  padding: 0 var(--sp-6);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .04em;
  margin-bottom: var(--sp-2);
  margin-top: var(--sp-6);
}

.sidebar__section-label:first-child {
  margin-top: 0
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all .15s;
  border-left: 3px solid transparent;
}

.sidebar__link:hover {
  background: var(--surface-alt);
  color: var(--text)
}

.sidebar__link--active {
  background: var(--accent-light);
  color: var(--accent-hover);
  border-left-color: var(--accent);
  font-weight: 600
}

.sidebar__link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0
}

.dashboard__main {
  flex: 1;
  padding: var(--sp-6);
  overflow-y: auto;
  display: flex;
  flex-direction: column
}

.dashboard__main--flush {
  padding-top: var(--sp-4)
}

.sidebar--minimal {
  padding-top: var(--sp-4);
  width: 215px
}

.sidebar--minimal .sidebar__link {
  margin-top: 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0
}

.toolbar--elevated {
  background: var(--surface);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-4)
}

.breadcrumbs a {
  color: var(--text-muted)
}

.breadcrumbs a:hover {
  color: var(--accent)
}

.breadcrumbs__sep {
  margin: 0 var(--sp-2);
  color: var(--border)
}

.breadcrumbs__current {
  color: var(--text);
  font-weight: 600
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap
}

.toolbar__search {
  flex: 1;
  min-width: 200px;
  position: relative
}

.toolbar__search svg {
  position: absolute;
  left: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none
}

.toolbar__search input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) 40px;
  border: 1.5px solid #8B919A;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  background: var(--surface)
}

.toolbar__search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 173, 181, .1);
  outline: none
}

.toolbar__folder select {
  padding: var(--sp-2) var(--sp-3);
  border: 1.5px solid #8B919A;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  background: var(--surface)
}

.toolbar__folder select:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px
}

/* Portal list + inline details (Google Images-style side panel) */
.portal-shell {
  display: flex;
  gap: var(--sp-5);
  align-items: flex-start
}

.portal-shell__list {
  flex: 1;
  min-width: 0
}

.portal-detail {
  width: min(420px, 36vw);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-h) + var(--sp-6));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  max-height: calc(100vh - var(--header-h) - var(--sp-10));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.portal-detail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
}

.portal-detail__title {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -.01em
}

.portal-detail__body {
  padding: var(--sp-4);
  overflow: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column
}

.portal-detail__loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-8);
  color: var(--text-muted);
  min-height: min(36dvh, 280px);
}

.portal-detail__thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--surface-alt);
  margin-bottom: var(--sp-3)
}

.portal-detail__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-3)
}

.portal-detail__meta dt {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: .04em
}

.portal-detail__meta dd {
  font-size: var(--text-sm);
  margin-top: 2px;
  word-break: break-word
}

.portal-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3)
}

/* Info Panel (legacy / embedded) */
.info-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-top: var(--sp-5);
}

.info-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5)
}

.info-panel__title {
  font-size: var(--text-xl);
  font-weight: 700
}

.info-panel__thumb {
  width: 140px;
  height: 90px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--dark)
}

.info-panel__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.info-panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-5)
}

.info-panel__field label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .03em
}

.info-panel__field p {
  font-size: var(--text-sm);
  margin-top: 2px;
  word-break: break-word
}

.info-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2)
}

/* ---- Recording detail page ---- */
.recording-page {
  min-height: calc(100vh - var(--header-h));
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--bg) 28%);
  padding: var(--sp-5) var(--sp-5) var(--sp-10);
}

.recording-page__inner {
  max-width: 880px;
  margin: 0 auto
}

.recording-back {
  margin-bottom: var(--sp-4)
}

.recording-back__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: background .15s, color .15s;
}

.recording-back__link:hover {
  background: var(--surface);
  color: var(--accent)
}

.recording-back__link:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px
}

.recording-back__link svg {
  flex-shrink: 0;
  opacity: .7
}

.recording-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-16);
  color: var(--text-muted);
}

.recording-loading p {
  font-size: var(--text-sm)
}

.recording-error {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  text-align: center;
  max-width: 420px;
  margin: var(--sp-8) auto;
  box-shadow: var(--shadow-md);
}

.recording-error p {
  color: var(--text-secondary)
}

.recording-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.recording-detail__hero {
  display: grid;
  grid-template-columns: minmax(0, 280px) 1fr;
  gap: var(--sp-6);
  align-items: center;
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  background: linear-gradient(145deg, rgba(0, 173, 181, .06) 0%, var(--surface) 48%);
  border-bottom: 1px solid var(--border-subtle);
}

.recording-detail__thumb-wrap {
  aspect-ratio: 16/9;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--dark);
  box-shadow: var(--shadow-md);
}

.recording-detail__thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.recording-detail__intro {
  min-width: 0
}

.recording-detail__badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--danger-bg);
  color: #B91C1C;
  margin-bottom: var(--sp-2);
}

.recording-detail__title {
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em
}

.recording-detail__subtitle {
  font-size: var(--text-sm);
  margin-top: var(--sp-2)
}

.recording-detail__cta {
  margin-top: var(--sp-5)
}

.recording-detail__body {
  padding: var(--sp-6) var(--sp-6) var(--sp-8)
}

.recording-detail__body-heading {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}

.recording-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-4) var(--sp-6);
  margin: 0 0 var(--sp-8);
}

.recording-meta-grid__item {
  margin: 0
}

.recording-meta-grid__item--full {
  grid-column: 1/-1
}

.recording-meta-grid__item dt {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: var(--sp-1);
}

.recording-meta-grid__item dd {
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.45;
  word-break: break-word
}

.recording-meta-grid__url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--text-xs)
}

.recording-admin {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--sp-6)
}

.recording-admin__hint {
  margin-bottom: var(--sp-3)
}

.recording-admin__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2)
}

/* Tree View */
.tree-view {
  padding: var(--sp-2) 0
}

.tree-node {
  margin-left: var(--sp-3)
}

.tree-node__toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  width: 100%;
  text-align: left;
  border-radius: var(--r-sm);
  transition: background .15s;
}

.tree-node__toggle:hover {
  background: var(--surface-alt)
}

.tree-node__toggle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  background: var(--surface-alt)
}

.tree-node__toggle svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform .2s
}

.tree-node--expanded>.tree-node__toggle svg {
  transform: rotate(90deg)
}

.tree-node__children {
  display: none
}

.tree-node--expanded>.tree-node__children {
  display: block
}

.tree-leaf {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-8);
  font-size: var(--text-sm);
  color: var(--text);
  cursor: pointer;
  border-radius: var(--r-sm);
  margin-left: var(--sp-3);
  transition: background .15s;
}

.tree-leaf:hover {
  background: var(--accent-light);
  color: var(--accent-hover)
}

.tree-leaf:focus {
  outline: none
}

.tree-leaf:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  background: var(--accent-light)
}

.tree-leaf__thumb {
  width: 52px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--dark);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}

.tree-leaf__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: top
}

.tree-leaf__label {
  min-width: 0;
  flex: 1;
  line-height: 1.35
}

/* Loading */
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-16);
  color: var(--text-muted)
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.empty-state {
  text-align: center;
  padding: var(--sp-16) var(--sp-6);
  color: var(--text-muted)
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--sp-4);
  color: var(--border)
}

.empty-state h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--sp-2)
}

/* ================================================================
   PLAYER PAGE
   ================================================================ */
.player-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-h));
  overflow: hidden;
  background: var(--bg)
}

.page-player .site-header {
  height: 52px;
  min-height: 52px;
  padding-block: 0
}

.page-player .player-layout {
  height: calc(100vh - 52px)
}

/* Compact title strip — more vertical space for video */
.player-top {
  padding: var(--sp-2) var(--sp-5);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.player-top__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  max-width: 100%;
  min-width: 0;
}

.player-top__back {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-sm);
  white-space: nowrap;
}

.player-top__back:hover {
  color: var(--accent);
  background: var(--surface-alt)
}

.player-top__back:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  color: var(--accent);
  background: var(--surface-alt)
}

.player-top__back svg {
  width: 14px;
  height: 14px
}

.player-top__text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  justify-content: center
}

.player-top__title {
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.player-top__meta {
  font-size: 10px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main workspace: padded “gutter” so columns read as separate cards */
.player-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  padding: var(--sp-5) var(--sp-6);
}

.page-player .player-main-area {
  padding: var(--sp-3) var(--sp-5) var(--sp-4)
}

/* 40% / 60% split — video + tabs | slide + strip */
.player-split {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--sp-6);
  min-height: 0;
}

.player-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: var(--sp-4)
}

.player-col--media {
  flex: 0 0 40%;
  max-width: 40%;
  min-width: min(100%, 300px);
}

.player-col--slides {
  flex: 1 1 60%;
  min-width: 0;
}

.player-col__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Left: video fills upper card */
.player-col__card--video {
  flex: 1 1 52%;
  min-height: 200px
}

.player-col__card--video .player-pane {
  flex: 1;
  min-height: 180px;
  border-radius: inherit;
}

/* Left: glossary + lecture search (no tabs) — taller so more terms visible */
.player-col__card--panels {
  flex: 1 1 48%;
  min-height: 200px;
  max-height: min(48vh, 520px);
}

/* Right: large slide */
.player-col__card--slide-main {
  flex: 1 1 auto;
  min-height: 220px
}

.player-col__card--slide-main .player-pane {
  flex: 1;
  min-height: 220px
}

.player-col__card--strip {
  flex: 0 0 auto
}

.player-pane {
  position: relative;
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d0f;
  cursor: pointer;
  overflow: hidden
}

.player-col__card--video .player-pane {
  background: #000;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.player-pane--slide {
  background: #101418
}

.player-pane--slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.video-container {
  width: 100%;
  flex: 1;
  min-height: 160px;
  position: relative;
  background: #000
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.player-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: var(--sp-8)
}

.player-error svg {
  margin-bottom: var(--sp-4);
  color: var(--danger)
}

.player-error p {
  font-size: var(--text-sm);
  max-width: 320px
}

.player-pane__fs-hint {
  position: absolute;
  bottom: var(--sp-2);
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, .6);
  color: rgba(255, 255, 255, .7);
  font-size: var(--text-xs);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

.player-pane:hover .player-pane__fs-hint {
  opacity: 1
}

/* Keyboard / screen-reader equivalent to double-click fullscreen (WCAG 2.1.1) */
.player-fs-btn {
  position: absolute;
  bottom: var(--sp-2);
  left: var(--sp-2);
  z-index: 3;
  padding: var(--sp-1) var(--sp-3);
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 255, 255, .95);
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.player-fs-btn:hover {
  background: rgba(0, 0, 0, .72);
  border-color: rgba(255, 255, 255, .4)
}

.player-fs-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px
}

.player-fs-btn--slide {
  left: auto;
  right: var(--sp-2);
  bottom: var(--sp-2)
}

.player-pane__time-badge {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  padding: 2px 8px;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .55);
  color: rgba(255, 255, 255, .85);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.player-pane__slide-name {
  position: absolute;
  bottom: 50px;
  right: var(--sp-2);
  max-width: 200px;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .75);
  color: rgba(255, 255, 255, .95);
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
  max-height: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  pointer-events: none;
}

/* Slide strip (inside right-column card) */
.player-slide-strip__label {
  margin: 0;
  padding: var(--sp-2) var(--sp-4) 0;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-secondary);
}

.player-slide-strip__label .text-muted {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal
}

.player-slide-strip {
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  overflow: hidden;
  background: var(--surface-alt);
  border-top: 1px solid var(--border-subtle);
}

.slide-strip__inner {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: var(--sp-1) 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, .25) transparent;
}

.slide-strip__inner::-webkit-scrollbar {
  height: 6px
}

.slide-strip__inner::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .2);
  border-radius: 3px
}

.slide-strip__empty {
  padding: var(--sp-2);
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-xs)
}

.thumb-item {
  flex-shrink: 0;
  width: 180px;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color .15s, transform .15s;
  position: relative
}

.thumb-item:hover {
  border-color: rgba(0, 173, 181, .5);
  transform: scale(1.05)
}

.thumb-item:focus {
  outline: none
}

.thumb-item:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring)
}

.thumb-item--active {
  border-color: var(--accent)
}

.thumb-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block
}

.thumb-item__time {
  display: block;
  text-align: center;
  font-size: .7rem;
  padding: 3px 2px;
  background: linear-gradient(135deg, rgba(100, 120, 140, .7), rgba(80, 100, 120, .7));
  color: #000;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.thumb-item__name {
  display: block;
  text-align: center;
  font-size: .7rem;
  padding: 3px 4px;
  background: rgba(0, 173, 181, .15);
  color: rgba(255, 255, 255, .85);
  word-break: break-word;
  line-height: 1.25;
  max-height: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 500;
}

.thumb-item--broken {
  background: rgba(255, 255, 255, .05)
}

.thumb-item--broken img {
  visibility: hidden
}

/* Hover preview tooltip */
.thumb-preview {
  position: fixed;
  z-index: 500;
  pointer-events: none;
  background: #111;
  border: 2px solid var(--accent);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  width: 240px;
  opacity: 0;
  transition: opacity .15s;
}

.thumb-preview--visible {
  opacity: 1
}

.thumb-preview img {
  width: 100%;
  display: block
}

.thumb-preview__label {
  padding: 3px 8px;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-size: var(--text-xs);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.search-hit {
  background: rgba(0, 173, 181, .45);
  color: var(--text);
  padding: 0 .12em;
  border-radius: 2px;
  font: inherit
}

.chapter-item--search .chapter-item__title {
  text-align: left
}

.player-col__card--panels .player-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  overflow: hidden;
  min-height: 0
}

.player-side--tabs {
  padding-top: 0
}

/* Glossary | Search tabs (player only) */
.player-col__card--panels .tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0
}

.player-col__card--panels .tab {
  flex: 1;
  padding: var(--sp-2) var(--sp-2);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: background .15s, color .15s;
  text-align: center;
}

.player-col__card--panels .tab:hover {
  color: var(--text);
  background: var(--surface-alt)
}

.player-col__card--panels .tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent)
}

.player-col__card--panels .tab:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px
}

.player-col__card--panels .tab-panel--player {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0
}

.player-col__card--panels .tab-panel--player[hidden] {
  display: none !important
}

.player-glossary-card__subtitle {
  margin: 0;
  /* padding: var(--sp-1) var(--sp-3) 2px; */
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.player-lecture-search--tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: var(--sp-2) var(--sp-3);
  gap: var(--sp-1)
}

.search-bar--flush {
  padding: 0;
  border-bottom: none
}

.player-search-results {
  flex: 1;
  min-height: 80px;
  max-height: none;
  overflow-y: auto;
  margin-top: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-alt);
  scroll-behavior: smooth;
}

.player-search-results:empty {
  display: none
}

.player-glossary-body {
  flex: 1;
  overflow-y: auto;
  min-height: 72px;
  padding: 0 var(--sp-1) var(--sp-1);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, .2) transparent;
  scroll-behavior: smooth;
}

.player-glossary-body::-webkit-scrollbar {
  width: 6px
}

.player-glossary-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .2);
  border-radius: 3px
}

.glossary-empty {
  padding: var(--sp-2) var(--sp-3);
  margin: 0;
  font-size: 11px
}

.chapter-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.35;
  color: var(--text);
  transition: background .15s;
}

.chapter-item:hover {
  background: var(--surface-alt)
}

.chapter-item:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
  z-index: 1;
  position: relative
}

.chapter-item__time {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  min-width: 66px;
  font-variant-numeric: tabular-nums
}

.chapter-item__title {
  flex: 1
}

.glossary-item {
  padding: 2px 6px 3px;
  border-bottom: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  font-size: 11px;
  line-height: 1.2;
}

.glossary-item__word {
  font-weight: 600;
  color: var(--text);
  word-break: break-word
}

.glossary-caption-flag {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 10px
}

.glossary-item__times {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.3;
  word-break: break-word
}

.glossary-time-sep {
  color: var(--border);
  margin: 0 2px;
  user-select: none
}

.glossary-link {
  color: var(--link-on-light);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

button.glossary-link {
  font: inherit;
  display: inline;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: inherit;
}

.glossary-link:hover {
  text-decoration: underline;
  color: var(--link-on-light-hover)
}

.glossary-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
  border-radius: 2px
}

.search-bar {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border);
  align-items: center
}

.search-bar input {
  flex: 1;
  padding: 6px 10px;
  border: 1.5px solid #8B919A;
  border-radius: var(--r-sm);
  font-size: 12px;
  line-height: 1.35
}

.search-bar input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(0, 173, 181, .18);
  outline-offset: 0
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--dark);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(80px);
  opacity: 0;
  transition: transform .3s, opacity .3s;
  pointer-events: none;
  min-width: 220px;
  max-width: 380px;
}

.toast--visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast__msg {
  flex: 1;
}

.toast__close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: opacity .15s;
}
.toast__close:hover,
.toast__close:focus-visible {
  opacity: 1;
  outline: 2px solid rgba(255,255,255,0.6);
  outline-offset: 1px;
}

.toast--error   { background: var(--danger); }
.toast--success { background: var(--success); }
.toast--warning { background: var(--warning); color: #1a1a1a; }
.toast--warning .toast__close { color: #1a1a1a; }
.toast--info    { background: var(--accent); }

/* ---- Footer ---- */
.site-footer {
  padding: var(--sp-5);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--surface)
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media(max-width:1024px) {
  .hero__inner {
    grid-template-columns: 1fr
  }

  .login-card {
    max-width: 440px
  }

  .player-main-area {
    padding: var(--sp-4)
  }

  .page-player .player-main-area {
    padding: var(--sp-3) var(--sp-4)
  }

  .player-split {
    flex-direction: column;
    gap: var(--sp-4)
  }

  .player-col--media {
    flex: none;
    max-width: 100%;
    min-width: 0
  }

  .player-col--slides {
    flex: none
  }

  .player-col__card--panels {
    max-height: min(50vh, 480px)
  }

  .player-col__card--slide-main {
    min-height: min(45vh, 400px)
  }

  .stats-bar__inner {
    flex-wrap: wrap;
    gap: var(--sp-6)
  }

  .portal-shell {
    flex-direction: column
  }

  .portal-detail {
    width: 100%;
    position: static;
    max-height: none;
  }
}

@media(max-width:768px) {
  .recording-detail__hero {
    grid-template-columns: 1fr;
    text-align: center
  }

  .recording-detail__thumb-wrap {
    max-width: 400px;
    margin: 0 auto
  }

  .recording-detail__cta {
    display: flex;
    justify-content: center
  }

  .sidebar {
    position: fixed;
    left: -100%;
    top: var(--header-h);
    bottom: 0;
    z-index: 90;
    transition: left .3s
  }

  .sidebar--open {
    left: 0;
    box-shadow: var(--shadow-lg)
  }

  .site-header__hamburger {
    display: none
  }

  .hero {
    padding: var(--sp-8) var(--sp-4)
  }

  .hero__title {
    font-size: 1.75rem
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr))
  }

  .info-panel__grid {
    grid-template-columns: 1fr 1fr
  }

  .player-main-area {
    padding: var(--sp-3)
  }

  .page-player .player-main-area {
    padding: var(--sp-2) var(--sp-3)
  }

  .player-col__card--slide-main {
    min-height: 260px
  }

  .thumb-item {
    width: 120px
  }

  .thumb-preview {
    width: 180px
  }

  /* A-016: Player page mobile responsiveness improvements */
  .player-layout {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .player-top {
    padding: var(--sp-2) var(--sp-3);
  }

  .player-top__inner {
    flex-wrap: wrap;
    gap: var(--sp-2);
  }

  .player-top__text {
    min-width: 0;
    flex: 1 1 auto;
  }

  .player-main-area {
    padding: var(--sp-2) var(--sp-3);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .player-split {
    flex-direction: column;
    gap: var(--sp-3);
  }

  .player-col--media,
  .player-col--slides {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .player-col__card--panels {
    max-height: 40vh;
    min-height: 200px;
  }

  .player-col__card--slide-main {
    min-height: 220px;
  }

  .slide-strip__inner {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .player-slide-strip {
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  .page-player .site-header__nav {
    flex-wrap: wrap;
    gap: var(--sp-1);
  }

  .page-player .site-header__nav a,
  .page-player .site-header__nav button {
    font-size: 0.75rem;
    padding: var(--sp-1) var(--sp-2);
  }
}

/* ================================================================
   RESPONSIVE — Extra small screens (A-016: Player mobile fix)
   ================================================================ */
@media(max-width:480px) {
  .page-player .player-main-area {
    padding: var(--sp-1) var(--sp-2);
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
  }

  .player-top__title {
    font-size: var(--text-base);
  }

  .player-top__meta {
    font-size: var(--text-xs);
  }

  .player-col__card--panels {
    max-height: 35vh;
    min-height: 180px;
  }

  .player-col__card--slide-main {
    min-height: 180px;
  }

  .thumb-item {
    width: 100px;
  }

  .page-player .site-header {
    height: auto;
    min-height: var(--header-h);
    flex-wrap: wrap;
    padding: var(--sp-2) var(--sp-3);
    gap: var(--sp-2);
  }

  .page-player .site-header__nav {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--sp-1);
  }
}

/* ================================================================
   MARKETING / RESOURCE PAGES (aligned with portal chrome)
   ================================================================ */
.page-marketing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.page-marketing .marketing-main {
  flex: 1;
  padding: var(--sp-8) var(--sp-6);
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}

.page-marketing .marketing-page-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
  margin: 0 0 var(--sp-2);
}

.page-marketing .marketing-lede {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 var(--sp-8);
  line-height: 1.6;
}

.page-marketing .marketing-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  padding: var(--sp-8);
  margin-bottom: var(--sp-6);
}

.page-marketing .marketing-prose {
  font-size: var(--text-base);
  color: var(--text);
  line-height: 1.75;
  max-width: 68ch;
}

.page-marketing .marketing-prose h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: var(--sp-8) 0 var(--sp-3);
  color: var(--text);
}

.page-marketing .marketing-prose h2:first-child {
  margin-top: 0
}

.page-marketing .marketing-prose h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: var(--sp-6) 0 var(--sp-2);
  color: var(--dark-mid);
}

.page-marketing .marketing-prose p {
  margin: 0 0 var(--sp-4)
}

.page-marketing .marketing-prose a {
  color: var(--link-on-light);
  font-weight: 600
}

.page-marketing .marketing-prose a:hover {
  color: var(--link-on-light-hover);
  text-decoration: underline;
  text-underline-offset: .12em
}

.page-marketing .marketing-embed {
  width: 100%;
  min-height: min(75vh, 800px);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-alt);
}

.page-marketing .marketing-pdf {
  width: 100%;
  min-height: 75vh;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-top: var(--sp-6);
}

/* Tech spec: inline PDF area (iframe or PDF.js canvas pages). */
.page-marketing iframe.marketing-pdf--inline,
.page-marketing .marketing-pdf--inline {
  display: block;
  width: 100%;
  min-height: min(85vh, 920px);
  margin-top: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-alt);
}

.page-marketing .techspec-pdf-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-4) var(--sp-3) var(--sp-8);
  min-height: min(70vh, 800px);
}

.page-marketing .techspec-pdf-viewer .techspec-pdf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-16);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.page-marketing .techspec-pdf-page {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
  background: #fff;
}

.page-marketing .marketing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
  align-items: center;
}

.page-marketing .marketing-slideshow {
  max-width: min(960px, 100%);
  margin: 0 auto;
  padding: 0 var(--sp-2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.page-marketing .marketing-slideshow .slideshow,
.page-marketing .marketing-slideshow #timer {
  margin: 0 auto;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: block;
}

/* Full slide dimensions for slideshow.js math (global img { max-width:100% } would shrink slides) */
.page-marketing .marketing-slideshow .slideshow img {
  max-width: none;
  width: 930px;
  height: auto;
}

.page-marketing .marketing-slideshow .slideshow-nav {
  width: 100% !important;
  max-width: 930px;
  box-sizing: border-box;
  margin: var(--sp-5) auto 0;
  padding: var(--sp-3) 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  clear: both;
}

.page-marketing .marketing-slideshow .slideshow-play-stop {
  float: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}

.page-marketing .marketing-slideshow .slideshow-next-prev {
  float: none;
  text-align: inherit;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  justify-content: flex-end;
}

.page-marketing .marketing-slideshow .slideshow-prev,
.page-marketing .marketing-slideshow .slideshow-next,
.page-marketing .marketing-slideshow .slideshow-play,
.page-marketing .marketing-slideshow .slideshow-stop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-4);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--dark-mid);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}

.page-marketing .marketing-slideshow .slideshow-prev:hover,
.page-marketing .marketing-slideshow .slideshow-next:hover,
.page-marketing .marketing-slideshow .slideshow-play:hover,
.page-marketing .marketing-slideshow .slideshow-stop:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--text);
}

.page-marketing .marketing-slideshow .slideshow-prev:focus-visible,
.page-marketing .marketing-slideshow .slideshow-next:focus-visible,
.page-marketing .marketing-slideshow .slideshow-play:focus-visible,
.page-marketing .marketing-slideshow .slideshow-stop:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.page-marketing .site-footer {
  margin-top: auto
}

@media(max-width:768px) {
  .page-marketing .marketing-main {
    padding: var(--sp-5) var(--sp-4)
  }

  .page-marketing .marketing-card {
    padding: var(--sp-5)
  }
}

/* ================================================================
   EDIT RECORDING MODAL
   ================================================================ */
/* Additional button variants */
.btn--edit {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
}

.btn--edit:hover {
  background: linear-gradient(135deg, #0d7a72, #0b8278);
  filter: brightness(1.08)
}

.btn--edit:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px
}

.btn--danger-outline {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger);
}

.btn--danger-outline:hover {
  background: var(--danger-bg)
}

.btn--danger-outline:focus-visible {
  outline: 3px solid #ef4444;
  outline-offset: 2px
}

/* Modal backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(20, 24, 31, .65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}

.modal-backdrop--open {
  display: flex;
  animation: modalFadeIn .18s ease
}

@keyframes modalFadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

/* Modal box */
.edit-modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 72px rgba(0, 0, 0, .28), 0 4px 16px rgba(0, 0, 0, .14);
  width: 100%;
  max-width: 520px;
  animation: modalSlideUp .22s cubic-bezier(.34, 1.28, .64, 1);
  display: flex;
  flex-direction: column;
  max-height: 90dvh;
  overflow: hidden;
  border: 1px solid var(--border);
}

@keyframes modalSlideUp {
  from {
    opacity: .3;
    transform: translateY(18px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* Header */
.edit-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6) var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0, 173, 181, .04) 0%, transparent 60%);
}

.edit-modal__title {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text);
}

.edit-modal__title svg {
  color: var(--accent);
  flex-shrink: 0
}

.edit-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  transition: background .15s, color .15s;
}

.edit-modal__close:hover {
  background: var(--danger-bg);
  color: var(--danger)
}

.edit-modal__close:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px
}

/* Form */
.edit-modal__form {
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.edit-modal__field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1)
}

.edit-modal__field--inline {
  flex-direction: row;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.edit-modal__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.edit-modal__field--inline .edit-modal__label {
  flex-shrink: 0;
  min-width: 7rem
}

.edit-modal__select,
.edit-modal__input {
  width: 100%;
  padding: 10px var(--sp-3);
  font-family: var(--font);
  font-size: var(--text-sm);
  border: 1.5px solid #8B919A;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}

.edit-modal__select:focus,
.edit-modal__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 173, 181, .15);
  outline: none;
}

.edit-modal__select:focus-visible,
.edit-modal__input:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.edit-modal__hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.edit-modal__hint--inline {
  flex: 1;
  min-width: 0;
}

/* Toggle switch */
.edit-modal__toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.edit-modal__toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.edit-modal__toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--r-full);
  transition: background .2s;
}

.edit-modal__toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .2s;
}

.edit-modal__toggle-input:checked+.edit-modal__toggle-slider {
  background: var(--accent)
}

.edit-modal__toggle-input:checked+.edit-modal__toggle-slider::before {
  transform: translateX(20px)
}

.edit-modal__toggle-input:focus-visible+.edit-modal__toggle-slider {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--r-full);
}

/* Actions */
.edit-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--sp-2);
}

/* Status */
.edit-modal__status {
  font-size: var(--text-sm);
  min-height: 1.2em;
  line-height: 1.5;
  border-radius: var(--r-sm);
  padding: 0;
}

.edit-modal__status--ok {
  color: #047857;
  background: var(--success-bg);
  padding: var(--sp-2) var(--sp-3);
}

.edit-modal__status--error {
  color: #B91C1C;
  background: var(--danger-bg);
  padding: var(--sp-2) var(--sp-3);
}

@media(max-width:540px) {
  .edit-modal {
    max-width: 100%;
    border-radius: var(--r-md) var(--r-md) 0 0;
    margin: auto auto 0
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0
  }
}

/* ================================================================
   TRANSCRIPT PANEL (Audio Description alternative — WCAG 1.2.5)
   ================================================================ */
.transcript-panel {
  flex: 1;
  overflow-y: auto;
  min-height: 72px;
  padding: 0 var(--sp-1) var(--sp-1);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, .2) transparent;
  scroll-behavior: smooth
}

.transcript-panel::-webkit-scrollbar {
  width: 6px
}

.transcript-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .2);
  border-radius: 3px
}

.transcript-entry {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
  transition: background .15s;
}

.transcript-entry:hover {
  background: var(--surface-alt)
}

.transcript-entry:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
  z-index: 1;
  position: relative
}

.transcript-entry--active {
  background: var(--accent-light);
  border-left: 3px solid var(--accent)
}

.transcript-entry__time {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  min-width: 58px;
  font-variant-numeric: tabular-nums
}

.transcript-entry__text {
  flex: 1;
  word-break: break-word
}

.transcript-empty {
  padding: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5
}

.transcript-desc {
  padding: var(--sp-2) var(--sp-3) 0;
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0
}

/* ================================================================
   HIGH CONTRAST MODE (WCAG best practice — prefers-contrast)
   ================================================================ */
@media (prefers-contrast:more) {
  :root {
    --border: #6B7280;
    --border-subtle: #9CA3AF;
    --text-muted: #374151;
    --accent: #008B92;
    --link-on-light: #004248;
  }

  .form-input,
  .edit-modal__input,
  .edit-modal__select,
  .toolbar__search input,
  .toolbar__folder select,
  .search-bar input {
    border-width: 2px;
    border-color: #374151
  }

  .card {
    border-width: 2px
  }

  .btn {
    border: 2px solid transparent
  }

  .btn--primary {
    border-color: var(--accent)
  }

  .btn--secondary {
    border-width: 2px
  }

  *:focus-visible {
    outline-width: 3px !important
  }
}

/* ================================================================
   WEBVTT SUBTITLES OVERRIDES
   ================================================================ */

video::-webkit-media-text-track-display {
  /* Override any inline positioning in the VTT file itself */
  top: auto !important;
  bottom: 10px !important;
  transform: none !important;
}

video::cue {
  background: rgba(0, 0, 0, 0.8) !important;
  color: #fff !important;
  font-size: 16px !important;
  line-height: normal !important;
}

/* ================================================================
   Multi-select: Three-dot Context Menu
   ================================================================ */

/* Card three-dot menu button */
.card {
  position: relative;
}

.card__actions-menu {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__menu-btn,
.list-item__menu-btn,
.tree-leaf__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all .2s;
  color: var(--text-muted);
  z-index: 20;
}

.card__menu-btn:hover,
.list-item__menu-btn:hover,
.tree-leaf__menu-btn:hover {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transform: scale(1.05);
}

.card__menu-btn:focus-visible,
.list-item__menu-btn:focus-visible,
.tree-leaf__menu-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.card__menu-btn svg,
.list-item__menu-btn svg,
.tree-leaf__menu-btn svg {
  width: 18px;
  height: 18px;
  stroke: none;
}

/* Checkbox shown when selected */
.card__checkbox,
.list-item__checkbox,
.tree-leaf__checkbox {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  color: white;
  z-index: 18;
  cursor: pointer;
  animation: popIn .2s ease-out;
}

/* Unselected-but-available checkbox: empty ring, no fill, no checkmark */
.card__checkbox--empty,
.list-item__checkbox--empty,
.tree-leaf__checkbox--empty {
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(0, 173, 181, 0.55);
  box-shadow: none;
}

.card__checkbox--empty svg,
.list-item__checkbox--empty svg,
.tree-leaf__checkbox--empty svg {
  display: none;
}

.card__checkbox {
  top: var(--sp-2);
  right: var(--sp-2);
}

.list-item__checkbox {
  margin-left: auto;
  margin-right: var(--sp-2);
  flex-shrink: 0;
}

.tree-leaf__checkbox {
  margin-left: auto;
  margin-right: var(--sp-2);
  flex-shrink: 0;
}

.card__checkbox svg,
.list-item__checkbox svg,
.tree-leaf__checkbox svg {
  width: 16px;
  height: 16px;
  stroke: none;
}

@keyframes popIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Selected state styling */
.card--selected {
  background: var(--accent-light);
  border-color: var(--accent);
}

.list-item--selected {
  background: var(--accent-light);
}

.tree-leaf--selected {
  background: var(--accent-light);
}

/* List item styling */
.list-item {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: var(--sp-2) var(--sp-3);
  gap: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: all .2s;
  margin-bottom: var(--sp-2);
}

.list-item:hover {
  box-shadow: var(--shadow-sm);
}

.list-item__menu-btn {
  order: 10;
  flex-shrink: 0;
}

/* Tree leaf styling */
.tree-leaf {
  position: relative;
  padding: var(--sp-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.tree-leaf__menu-btn {
  order: 10;
  flex-shrink: 0;
  margin-left: auto;
}

/* Context menu dropdown */
.card-context-menu {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  min-width: 200px;
  overflow: hidden;
  animation: slideUp .2s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-context-menu__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  transition: all .15s;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-context-menu__item:last-child {
  border-bottom: none;
}

.card-context-menu__item:hover,
.card-context-menu__item:focus {
  background: var(--surface-alt);
  color: var(--accent);
  outline: none;
}

.card-context-menu__item:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.card-context-menu__item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
}

.card-context-menu__item--danger {
  color: var(--warning);
}

.card-context-menu__item--danger:hover {
  background: var(--warning-bg);
}

.card-context-menu__item--danger-delete {
  color: var(--danger);
  border-top: 1px solid var(--border-subtle);
}

.card-context-menu__item--danger-delete:hover {
  background: var(--danger-bg);
}

/* Batch actions bar */
.batch-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-3);
  animation: slideDown .3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.batch-actions__count {
  font-weight: 600;
  color: var(--text);
  margin-right: auto;
}

.batch-actions button {
  white-space: nowrap;
}

/* Loading state for batch bar */
.batch-actions--busy {
  gap: var(--sp-3);
  pointer-events: none;
  color: var(--text-secondary);
  font-weight: 500;
}

.batch-actions__status {
  font-size: var(--text-sm);
}

.batch-spinner {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* Inline spinner inside buttons (e.g. edit modal Save) */
.btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 6px;
  vertical-align: middle;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.hidden {
  display: none !important;
}
