@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ink: #17324d;
  --muted: #607485;
  --blue: #0788c9;
  --blue-dark: #08638e;
  --pink: #d51f87;
  --purple: #7526c9;
  --paper: #ffffff;
  --sidebar: #f5f8fb;
  --line: #dce6ee;
  --soft-blue: #eef7fc;
  --soft-pink: #fff0f8;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --card-bg: #ffffff;
  --button-text: #ffffff;
  --sidebar-active: #2563eb;
  --sidebar-hover: #e8efff;
  --sidebar-heading: #ffffff;
  --sidebar-heading-bg: #173b67;
  --sidebar-heading-border: #2563eb;
}
  
  body[data-theme='dark'] {
    --ink: #edf5ff;
    --muted: #9eb2c7;
    --blue: #4fc3ff;
    --blue-dark: #83d1ff;
    --pink: #ff73c5;
    --purple: #c89bff;
    --paper: #0d1725;
    --sidebar: #101d2d;
    --line: #22344c;
    --soft-blue: #16273a;
    --soft-pink: #2a1c2b;
    --topbar-bg: rgba(13, 23, 37, 0.96);
    --card-bg: #101d2d;
    --button-text: #06111d;
    --sidebar-active: #2563eb;
    --sidebar-hover: #1b2d49;
    --sidebar-heading: #ffffff;
    --sidebar-heading-bg: #173b67;
    --sidebar-heading-border: #3b82f6;
}

* { box-sizing: border-box; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.75;
}

body.welcome-locked { overflow-x: hidden; overflow-y: auto; }
body:not(.is-authenticated) .site-shell { display: none; }

.site-shell { min-height: 100vh; }

.site-loading {
  display: grid;
  min-height: min(52vh, 420px);
  justify-items: center;
  align-content: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.site-loading-canvas {
  display: block;
  width: min(192px, 52vw);
  height: min(192px, 52vw);
  overflow: visible;
}

.pdf-viewer-shell {
  width: min(1200px, calc(100vw - 78px));
  margin: 28px auto 42px;
  border: 1px solid rgba(25, 31, 38, 0.75);
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  background: #dcdcdc;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.pdf-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 8px 18px;
  background: linear-gradient(180deg, #373737 0%, #2d2d2d 100%);
  color: #f3f4f6;
  border-bottom: 1px solid rgba(15, 23, 42, 0.78);
}

.pdf-toolbar-section { display: flex; align-items: center; gap: 12px; }
.pdf-toolbar-left { min-width: 170px; }
.pdf-toolbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.8rem;
  font-weight: 600;
}

.pdf-toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: #f3f4f6;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.pdf-toolbar-icon {
  width: 29px;
  height: 29px;
  font-size: 0.95rem;
}

.pdf-toolbar-small {
  width: 26px;
  height: 26px;
  font-size: 0.95rem;
}

.pdf-toolbar-label,
.pdf-toolbar-divider {
  color: rgba(243, 244, 246, 0.87);
  font-weight: 700;
}

.pdf-toolbar-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #f9fafb;
}

.pdf-viewer-surface {
  padding: 12px 16px 18px;
  background: linear-gradient(180deg, #e6e6e6 0%, #d9d9d9 100%);
}

.pdf-viewer-frame {
  display: block;
  width: 100%;
  min-height: 860px;
  border: 1px solid rgba(17, 24, 39, 0.52);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 34px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 5px 24px rgba(23, 50, 77, 0.08);
  transition: transform 180ms ease;
}

body.header-hidden .topbar { transform: translateY(-100%); }

.brand {
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.stream-map-notice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 30px;
  border: 1px solid rgba(42, 127, 190, 0.78);
  border-radius: 32px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(122, 196, 240, 0.76) 0%, rgba(74, 163, 220, 0.7) 100%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  backdrop-filter: blur(12px) saturate(135%);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.68), inset 0 -4px 7px rgba(38, 116, 175, 0.28), 0 2px 0 rgba(224, 247, 255, 0.78), 0 8px 14px rgba(31, 111, 174, 0.24);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(25, 91, 139, 0.38);
  white-space: nowrap;
  transition: box-shadow 150ms ease, background-color 150ms ease;
}

.stream-map-notice:hover,
.stream-map-notice:focus-visible {
  background: linear-gradient(180deg, rgba(139, 207, 247, 0.82) 0%, rgba(82, 172, 226, 0.76) 100%);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.76), inset 0 -4px 7px rgba(38, 116, 175, 0.3), 0 2px 0 rgba(224, 247, 255, 0.82), 0 10px 17px rgba(31, 111, 174, 0.28);
}

.stream-map-notice:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.top-actions { display: flex; align-items: center; justify-self: end; gap: 10px; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 9px 12px;
  transform: translateY(-150%);
  border-radius: 6px;
  color: #ffffff;
  background: #173b67;
  font-size: 0.82rem;
  font-weight: 700;
}

.skip-link:focus { transform: translateY(0); }

.search-control { position: relative; }

.search-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid rgba(125, 131, 137, 0.38);
  border-radius: 22px;
  color: #17191c;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(229, 232, 235, 0.88));
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.95), inset 0 -3px 5px rgba(125, 131, 137, 0.12), 0 4px 9px rgba(42, 46, 50, 0.12);
  font: 600 0.78rem 'DM Sans', sans-serif;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.search-button:hover,
.search-button[aria-expanded="true"] {
  transform: perspective(500px) rotateX(3deg) translateY(-1px);
  border-color: rgba(106, 113, 119, 0.52);
  background: linear-gradient(145deg, #ffffff, #e7e9eb);
  box-shadow: inset 0 2px 3px #ffffff, inset 0 -3px 5px rgba(125, 131, 137, 0.15), 0 6px 12px rgba(42, 46, 50, 0.16);
}
.search-button:focus-visible,
.close-search-button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.content-search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  width: min(390px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--card-bg);
  box-shadow: 0 12px 32px rgba(23, 50, 77, 0.18);
}

.content-search-panel[hidden] { display: none; }
.content-search-panel label { display: block; margin-bottom: 7px; font-size: 0.82rem; font-weight: 700; }
.content-search-controls { display: flex; gap: 7px; }
.content-search-controls input { min-width: 0; flex: 1; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--paper); font: 400 0.82rem 'DM Sans', sans-serif; }
.content-search-controls input:focus-visible { border-color: var(--blue); outline: 3px solid color-mix(in srgb, var(--blue) 24%, transparent); outline-offset: 1px; }
.close-search-button { width: 38px; flex: 0 0 38px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--card-bg); font: 400 1.35rem/1 'DM Sans', sans-serif; cursor: pointer; }
.content-search-help { margin: 6px 0 0; color: var(--muted); font-size: 0.68rem; line-height: 1.45; }
.content-search-status { min-height: 1.4em; margin: 10px 0 4px; color: var(--muted); font-size: 0.72rem; }
.content-search-results { display: grid; max-height: min(48vh, 360px); gap: 4px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.content-search-results:empty { display: none; }
.content-search-results a { display: grid; gap: 3px; padding: 9px; border: 1px solid transparent; border-radius: 7px; color: var(--ink); text-decoration: none; }
.content-search-results a:hover,
.content-search-results a:focus-visible { border-color: var(--line); background: var(--sidebar-hover); }
.content-search-results a:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.content-search-results strong { color: var(--blue-dark); font-size: 0.78rem; }
.content-search-results span { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 0.7rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.profile-control { position: relative; }

.profile-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease;
}

.profile-button:hover,
.profile-button[aria-expanded="true"] {
  transform: translateY(-1px);
  border-color: var(--blue);
}

.profile-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.profile-avatar {
  display: grid;
  position: relative;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #ffffff;
  background: #173b67;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
}

.profile-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(320px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 12px 32px rgba(23, 50, 77, 0.18);
}

.profile-menu[hidden] { display: none; }

.profile-menu-identity { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.profile-menu-avatar { width: 42px; height: 42px; flex: 0 0 42px; font-size: 0.9rem; }
.profile-menu-user { min-width: 0; }
.profile-menu-user .account-name,
.profile-menu-user .account-email { margin-bottom: 2px; }
.profile-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-secondary-button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--card-bg); font: 600 0.72rem 'DM Sans', sans-serif; cursor: pointer; }
.profile-secondary-button:hover,
.profile-secondary-button:focus-visible { border-color: var(--blue); color: var(--blue-dark); }
.profile-secondary-button:focus-visible,
.profile-save-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.profile-photo-note { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 0.68rem; line-height: 1.4; }
.profile-name-form { padding: 12px 0; }
.profile-name-form label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.profile-name-controls { display: flex; gap: 7px; }
.profile-name-controls input { min-width: 0; flex: 1; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--paper); font: 400 0.78rem 'DM Sans', sans-serif; }
.profile-name-controls input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.profile-save-button { padding: 7px 11px; border: 0; border-radius: 6px; color: #ffffff; background: var(--blue-dark); font: 700 0.74rem 'DM Sans', sans-serif; cursor: pointer; }
.profile-save-button:disabled,
.profile-secondary-button:disabled { opacity: 0.6; cursor: wait; }

.home-button,
.menu-button {
  min-height: 38px;
  border: 1px solid rgba(125, 131, 137, 0.38);
  border-radius: 22px;
  padding: 7px 16px;
  color: #17191c;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(229, 232, 235, 0.88));
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.95), inset 0 -3px 5px rgba(125, 131, 137, 0.12), 0 4px 9px rgba(42, 46, 50, 0.12);
  font: 600 0.78rem 'DM Sans', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 160ms ease;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font: 400 1.15rem/1 'DM Sans', sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms ease;
}

.home-button:hover,
.menu-button:hover {
  transform: perspective(500px) rotateX(3deg) translateY(-1px);
  border-color: rgba(106, 113, 119, 0.52);
  background: linear-gradient(145deg, #ffffff, #e7e9eb);
  box-shadow: inset 0 2px 3px #ffffff, inset 0 -3px 5px rgba(125, 131, 137, 0.15), 0 6px 12px rgba(42, 46, 50, 0.16);
}
.theme-toggle:hover {
  transform: translateY(-1px);
}

.theme-toggle-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  border-radius: 999px;
  background: #ffcc00;
  transition: background 160ms ease;
}

.theme-toggle-switch::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
  content: "";
  transition: transform 160ms ease;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-switch { background: #ffcc00; }
.theme-toggle[aria-pressed="true"] .theme-toggle-switch::after { transform: translateX(16px); }
.theme-toggle-icon { display: block; width: 14px; color: var(--ink); text-align: center; }

.sidebar {
  position: fixed;
  top: 68px;
  bottom: 0;
  left: 0;
  width: 264px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 16px 20px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  scrollbar-color: color-mix(in srgb, var(--muted) 32%, transparent) transparent;
  scrollbar-width: thin;
  transition: top 180ms ease;
}

body.header-hidden .sidebar { top: 0; }

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0 12px;
  padding: 9px 10px;
  border: 1px solid var(--sidebar-heading-border);
  border-radius: 8px;
  color: var(--sidebar-heading);
  background: var(--sidebar-heading-bg);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.sidebar-title::before {
  width: 3px;
  height: 15px;
  flex: 0 0 3px;
  border-radius: 999px;
  background: var(--sidebar-heading);
  content: "";
}

.sidebar .day-nav-title {
  margin-top: 17px;
}

.sidebar .nav-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  margin: 0 0 5px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--muted) 16%, transparent);
  border-radius: 11px;
  color: var(--ink);
  background: linear-gradient(145deg, color-mix(in srgb, var(--paper) 96%, white), color-mix(in srgb, var(--sidebar) 82%, var(--paper)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), inset 0 -2px 4px color-mix(in srgb, var(--muted) 8%, transparent), 0 3px 7px rgba(23, 50, 77, 0.07);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 180ms ease;
}

.sidebar .nav-button::before {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  color: var(--muted);
  content: "";
}

.sidebar .nav-button:not(.nav-subitem)::before {
  display: none;
}

.sidebar .nav-button[aria-current="page"] {
  border-color: color-mix(in srgb, var(--sidebar-active) 75%, white);
  color: #ffffff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--sidebar-active) 82%, white), var(--sidebar-active) 72%);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), inset 0 -2px 4px rgba(18, 57, 122, 0.18), 0 4px 10px color-mix(in srgb, var(--sidebar-active) 24%, transparent);
}

.sidebar .nav-subitem {
  width: 100%;
  min-height: 34px;
  padding-left: 13px;
  font-size: 0.78rem;
}

.sidebar .nav-subitem::before {
  width: 7px;
  height: 7px;
  flex-basis: 7px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 65%, transparent);
}

.sidebar .nav-subitem[data-completed="true"]::before {
  background: #16a34a;
  box-shadow: 0 0 0 2px color-mix(in srgb, #16a34a 18%, transparent);
}

.sidebar .nav-button:hover,
.sidebar .nav-button:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--blue) 38%, var(--line));
  color: var(--blue-dark);
  background: linear-gradient(145deg, var(--paper), color-mix(in srgb, var(--soft-blue) 74%, var(--sidebar)));
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 5px 11px rgba(7, 136, 201, 0.13);
}

.sidebar .nav-button[aria-current="page"]:hover,
.sidebar .nav-button[aria-current="page"]:focus-visible {
  border-color: color-mix(in srgb, var(--sidebar-active) 75%, white);
  color: #ffffff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--sidebar-active) 82%, white), var(--sidebar-active) 72%);
}

.sidebar .nav-button[aria-current="page"]::before,
.sidebar .nav-button:not(.nav-subitem):not([aria-current="page"])::before {
  border-color: currentColor;
  color: inherit;
}

.sidebar .nav-button:focus-visible,
.sidebar .community-link:focus-visible {
  outline: 2px solid var(--blue-dark);
  outline-offset: 2px;
}

.sidebar .community-link {
  margin-top: auto;
  align-self: center;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #147849;
  border-radius: 999px;
  color: white;
  background: #1d9b61;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.sidebar .community-link:hover,
.sidebar .community-link:focus-visible {
  background: #147849;
}

.account-name { overflow-wrap: anywhere; margin: 0 0 3px; color: var(--ink); font-size: 0.9rem; font-weight: 700; }
.account-email { overflow-wrap: anywhere; margin: 0 0 12px; color: var(--muted); font-size: 0.76rem; }
.profile-learning-link { display: block; padding: 9px 10px; border-radius: 7px; color: var(--blue-dark); background: var(--sidebar-hover); font-size: 0.82rem; font-weight: 700; text-decoration: none; }
.profile-learning-link:hover,
.profile-learning-link:focus-visible { color: var(--blue-dark); background: color-mix(in srgb, var(--blue) 18%, var(--sidebar-hover)); }
.profile-learning-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.profile-menu .account-notice { min-height: 1.3em; margin: 8px 0; color: var(--muted); font-size: 0.72rem; }
.sign-out-button { width: 100%; min-height: 34px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--card-bg); font: 600 0.8rem 'DM Sans', sans-serif; cursor: pointer; }
.sign-out-button:hover { border-color: var(--pink); color: var(--pink); }
.sign-out-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.auth-gate {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  isolation: isolate;
  background: #100638;
}
body.is-authenticated .auth-gate { display: none; }
.auth-scene { position: absolute; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse at 50% 48%, #32127d 0, #1c0c60 46%, #100638 100%); }
.auth-scene::before { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.2) 0.7px, transparent 0.8px); background-size: 24px 24px; content: ''; opacity: 0.2; mask-image: radial-gradient(ellipse at center, transparent 0, #000 90%); }
.auth-blob { position: absolute; display: block; border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: inset -16px -18px 34px rgba(35, 0, 99, 0.38), inset 12px 10px 25px rgba(255, 255, 255, 0.22), 0 18px 50px rgba(12, 0, 46, 0.28); animation: auth-blob-drift 11s ease-in-out infinite alternate; will-change: transform, border-radius; }
.auth-blob--one { top: 2%; left: -3%; width: 210px; height: 132px; border-radius: 58% 42% 49% 51% / 47% 40% 60% 53%; background: radial-gradient(ellipse at 30% 26%, #ff83db 0, #e521c9 31%, #9b12dc 63%, #5d13bc 100%); }
.auth-blob--two { top: -72px; left: 25%; width: 142px; height: 142px; border-radius: 50% 50% 44% 56% / 55% 45% 55% 45%; background: radial-gradient(circle at 32% 28%, #ffe276 0, #ff7952 29%, #e72a9f 66%, #9814c9 100%); animation-delay: -2s; animation-duration: 8s; }
.auth-blob--three { top: 11%; right: 3%; width: 225px; height: 192px; border-radius: 52% 48% 57% 43% / 44% 54% 46% 56%; background: radial-gradient(ellipse at 32% 28%, #bc75ff 0, #8518ef 45%, #5124c4 76%, #d51f9d 100%); animation-delay: -4s; animation-duration: 10s; }
.auth-blob--four { right: -4%; bottom: 7%; width: 245px; height: 154px; border-radius: 42% 58% 53% 47% / 52% 42% 58% 48%; background: radial-gradient(ellipse at 33% 28%, #ffad69 0, #ff4b91 33%, #c518db 70%, #7624dc 100%); animation-delay: -1s; animation-duration: 9s; }
.auth-blob--five { bottom: -6%; left: 7%; width: 236px; height: 178px; border-radius: 53% 47% 43% 57% / 40% 57% 43% 60%; background: radial-gradient(ellipse at 28% 27%, #ffe05e 0, #ff764e 26%, #fa318e 57%, #ab13d4 100%); animation-delay: -6s; animation-duration: 8.5s; }
.auth-blob--six { bottom: -78px; left: 43%; width: 164px; height: 164px; border-radius: 48% 52% 57% 43% / 53% 44% 56% 47%; background: radial-gradient(circle at 32% 28%, #ca78ff 0, #8f28f2 45%, #5e25cc 75%, #e22caa 100%); animation-delay: -8s; animation-duration: 12s; }
.auth-blob--seven { top: 53%; left: -62px; width: 166px; height: 142px; border-radius: 55% 45% 44% 56% / 47% 56% 44% 53%; background: radial-gradient(ellipse at 34% 29%, #ff9c73 0, #ff3f9e 37%, #bd19e2 72%, #7326d7 100%); animation-delay: -3s; animation-duration: 9.5s; }
@keyframes auth-blob-drift {
  0% { transform: translate3d(-28px, -24px, 0) rotate(-9deg) scale(0.96); border-radius: 55% 45% 50% 50% / 48% 42% 58% 52%; }
  50% { border-radius: 44% 56% 42% 58% / 56% 46% 54% 44%; }
  100% { transform: translate3d(38px, 32px, 0) rotate(10deg) scale(1.04); border-radius: 52% 48% 58% 42% / 42% 58% 42% 58%; }
}
.auth-panel { position: relative; z-index: 1; width: min(100%, 480px); padding: 38px 42px; border: 1px solid rgba(255, 255, 255, 0.26); border-radius: 24px; color: #fff; background: rgba(42, 22, 119, 0.48); box-shadow: 0 28px 90px rgba(5, 0, 34, 0.44), inset 0 1px rgba(255, 255, 255, 0.2); backdrop-filter: blur(25px) saturate(145%); }
.auth-panel .welcome-label { margin: 0 0 10px; color: rgba(255, 255, 255, 0.76); text-align: center; }
.auth-panel h1 { margin: 0 0 26px; color: #fff; font: 700 1.65rem/1.2 'Space Grotesk', sans-serif; text-align: center; }
.auth-form { display: grid; gap: 9px; }
.auth-form[hidden] { display: none; }
.auth-form label { margin-top: 5px; color: rgba(255, 255, 255, 0.96); font-size: 0.84rem; font-weight: 700; }
.auth-form input { width: 100%; min-height: 46px; padding: 9px 3px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.55); border-radius: 0; color: #fff; background: transparent; font: 400 0.95rem 'DM Sans', sans-serif; }
.auth-form textarea { width: 100%; min-height: 88px; padding: 9px 11px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 8px; color: #fff; background: rgba(255, 255, 255, 0.08); font: 400 0.9rem 'DM Sans', sans-serif; resize: vertical; }
.auth-form input:focus-visible { outline: 0; border-color: #ffb5e8; box-shadow: 0 1px #ffb5e8; }
.auth-form textarea:focus-visible { outline: 2px solid #ffb5e8; outline-offset: 2px; }
.auth-form p { margin: 0 0 5px; color: rgba(255, 255, 255, 0.82); font-size: 0.84rem; }
.auth-optional { color: rgba(255, 255, 255, 0.7); font-size: 0.76rem; font-weight: 400; }
.auth-submit { min-height: 48px; margin-top: 14px; border: 0; border-radius: 999px; color: #25104f; background: #fff; font: 700 0.9rem 'DM Sans', sans-serif; cursor: pointer; transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
.auth-submit:hover { transform: translateY(-1px); background: #ffe5f5; box-shadow: 0 8px 22px rgba(10, 0, 46, 0.24); }
.auth-submit:disabled { opacity: 0.55; cursor: wait; }
.auth-link { justify-self: start; padding: 3px 0; border: 0; color: rgba(255, 255, 255, 0.9); background: transparent; font: 600 0.82rem 'DM Sans', sans-serif; text-align: left; cursor: pointer; }
.auth-link:hover { color: #ffb5e8; text-decoration: underline; }
.auth-link:focus-visible { outline: 2px solid #ffb5e8; outline-offset: 2px; }
.auth-status { min-height: 1.5em; margin: 14px 0 0; color: rgba(255, 255, 255, 0.84); font-size: 0.82rem; }
@media (max-width: 560px) {
  .auth-gate { padding: 16px; }
  .auth-panel { padding: 30px 24px; border-radius: 20px; }
  .auth-panel h1 { font-size: 1.45rem; }
  .auth-blob--one { left: -90px; width: 180px; }
  .auth-blob--two { left: 58%; width: 100px; height: 100px; }
  .auth-blob--three { top: 8%; right: -135px; width: 190px; height: 170px; }
  .auth-blob--four { right: -120px; width: 190px; }
  .auth-blob--five { left: -65px; width: 185px; }
  .auth-blob--six { left: 63%; width: 120px; height: 120px; }
  .auth-blob--seven { left: -105px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-blob { animation: none; will-change: auto; }
  .auth-submit { transition: none; }
}

.learning-dashboard-heading { margin-bottom: 32px; }
.content .learning-dashboard-heading h1 { margin: 0 0 7px; font: 700 2rem/1.15 'Space Grotesk', sans-serif; }
.learning-dashboard-heading > p:last-child { margin: 0; color: var(--muted); }
.learning-profile { margin: 0 0 30px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.content .learning-profile h2 { margin: 0 0 8px; font-size: 1.05rem; }
.learning-profile p { margin: 3px 0; color: var(--muted); font-size: 0.88rem; }
.learning-profile .learning-profile-name { color: var(--ink); font-weight: 700; }
.learning-dashboard-section { margin: 28px 0 38px; }
.content .learning-dashboard-section h2 { margin: 0 0 12px; padding: 0 0 8px; border-bottom: 1px solid var(--line); font-size: 1.15rem; }
.learning-progress-list,
.learning-bookmark-list,
.learning-quiz-list,
.learning-activity-list { margin: 0; padding: 0; list-style: none; }
.learning-progress-list li,
.learning-bookmark-list li,
.learning-quiz-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; border-bottom: 1px solid var(--line); }
.learning-progress-list a { color: var(--blue-dark); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.learning-bookmark-list a,
.learning-quiz-list a { color: var(--blue-dark); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.learning-progress-list a:hover,
.learning-bookmark-list a:hover,
.learning-quiz-list a:hover { text-decoration: underline; }
.learning-quiz-list li > span { color: var(--muted); font-size: 0.82rem; }
.learning-complete,
.learning-incomplete { flex: 0 0 auto; color: var(--muted); font-size: 0.78rem; }
.learning-complete { color: #147849; font-weight: 700; }
.learning-activity-list li { padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; }

.content.learning-dashboard-view {
  width: auto;
  max-width: none;
  margin-left: 264px;
  padding: 34px clamp(22px, 3.4vw, 54px) 64px;
}

.learning-dashboard { width: min(100%, 1440px); margin: 0 auto; }
.learning-dashboard-welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.dashboard-eyebrow { margin: 0 0 5px; color: var(--blue-dark); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; }
.learning-dashboard-welcome h1 { margin: 0; color: var(--ink); font: 700 clamp(1.45rem, 2.5vw, 2rem)/1.15 'Space Grotesk', sans-serif; }
.dashboard-welcome-note { margin: 6px 0 0; color: var(--muted); font-size: 0.82rem; }
.dashboard-profile { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 7px 12px 7px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--card-bg); }
.dashboard-profile-avatar { position: relative; display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: #173b67; font-size: 0.82rem; font-weight: 700; }
.dashboard-profile-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dashboard-profile-details { display: grid; min-width: 0; gap: 2px; }
.dashboard-profile-name { overflow: hidden; color: var(--ink); font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-profile-email { overflow: hidden; max-width: 190px; color: var(--muted); font-size: 0.66rem; text-overflow: ellipsis; white-space: nowrap; }

.dashboard-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.dashboard-stat-card,
.dashboard-panel { min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--card-bg); box-shadow: 0 5px 18px rgba(23, 50, 77, 0.045); }
.dashboard-stat-card { display: grid; min-height: 132px; align-content: start; gap: 7px; padding: 15px; }
.dashboard-stat-card:nth-child(1) { border-color: color-mix(in srgb, #0788c9 30%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, #0788c9 12%, var(--card-bg)), var(--card-bg) 82%); }
.dashboard-stat-card:nth-child(2) { border-color: color-mix(in srgb, #16834a 30%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, #16834a 12%, var(--card-bg)), var(--card-bg) 82%); }
.dashboard-stat-card:nth-child(3) { border-color: color-mix(in srgb, #7c3aed 30%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, #7c3aed 12%, var(--card-bg)), var(--card-bg) 82%); }
.dashboard-stat-card:nth-child(4) { border-color: color-mix(in srgb, #d97706 30%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, #d97706 12%, var(--card-bg)), var(--card-bg) 82%); }
.dashboard-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 0.72rem; font-weight: 600; }
.dashboard-stat-icon { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; color: var(--blue-dark); background: var(--soft-blue); font-size: 0.9rem; font-weight: 700; }
.dashboard-stat-card:nth-child(1) .dashboard-stat-icon { color: #0877aa; background: color-mix(in srgb, #0788c9 16%, var(--card-bg)); }
.dashboard-stat-card:nth-child(2) .dashboard-stat-icon { color: #147849; background: color-mix(in srgb, #16834a 16%, var(--card-bg)); }
.dashboard-stat-card:nth-child(3) .dashboard-stat-icon { color: #6d28d9; background: color-mix(in srgb, #7c3aed 16%, var(--card-bg)); }
.dashboard-stat-card:nth-child(4) .dashboard-stat-icon { color: #b45309; background: color-mix(in srgb, #d97706 16%, var(--card-bg)); }
.dashboard-stat-value { color: var(--ink); font: 700 1.7rem/1 'Space Grotesk', sans-serif; }
.dashboard-stat-card > small { color: var(--muted); font-size: 0.68rem; }
.dashboard-progress-summary { display: flex; align-items: center; gap: 12px; }
.dashboard-progress-summary > div:last-child { display: grid; gap: 3px; }
.dashboard-progress-summary > div:last-child strong { color: var(--ink); font: 700 0.88rem 'Space Grotesk', sans-serif; }
.dashboard-progress-summary > div:last-child small { color: var(--muted); font-size: 0.67rem; }
.dashboard-progress-ring { display: grid; width: 66px; height: 66px; flex: 0 0 66px; place-items: center; border-radius: 50%; background: conic-gradient(var(--blue) var(--progress-percent), var(--sidebar) 0); animation: dashboard-ring-appear 650ms cubic-bezier(0.2, 0.75, 0.25, 1) both; }
@keyframes dashboard-ring-appear {
  from { opacity: 0.65; transform: rotate(-24deg) scale(0.88); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}
.dashboard-stat-card { animation: dashboard-panel-enter 480ms cubic-bezier(0.2, 0.75, 0.25, 1) both; }
.dashboard-stat-card:nth-child(2) { animation-delay: 55ms; }
.dashboard-stat-card:nth-child(3) { animation-delay: 110ms; }
.dashboard-stat-card:nth-child(4) { animation-delay: 165ms; }
.dashboard-panel { animation: dashboard-panel-enter 520ms cubic-bezier(0.2, 0.75, 0.25, 1) both; }
.dashboard-main-grid > .dashboard-panel { animation-delay: 90ms; }
.dashboard-side-column .dashboard-panel:nth-child(2) { animation-delay: 140ms; }
.dashboard-side-column .dashboard-panel:nth-child(3) { animation-delay: 190ms; }
@keyframes dashboard-panel-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.dashboard-progress-ring::before { position: absolute; width: 52px; height: 52px; border-radius: 50%; background: var(--card-bg); content: ""; }
.dashboard-progress-ring { position: relative; }
.dashboard-progress-ring span { position: relative; z-index: 1; color: var(--ink); font-size: 0.8rem; font-weight: 700; }

.dashboard-main-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(245px, 0.85fr); align-items: start; gap: 14px; }
.dashboard-panel { padding: 17px; }
.dashboard-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.dashboard-panel-heading h2,
.content .dashboard-panel h2 { margin: 0; padding: 0; border: 0; color: var(--ink); font: 700 0.98rem 'Space Grotesk', sans-serif; }
.dashboard-panel-heading .dashboard-eyebrow { margin: 0 0 3px; }
.dashboard-panel-caption { color: var(--muted); font-size: 0.66rem; }
.dashboard-study-panel { min-height: 285px; }
.dashboard-week-chart { display: grid; height: 174px; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; gap: 12px; padding: 15px 4px 8px; border-bottom: 1px solid var(--line); }
.dashboard-week-column { display: grid; height: 100%; grid-template-rows: 18px minmax(0, 1fr) 20px; justify-items: center; align-items: end; gap: 5px; }
.dashboard-week-count,
.dashboard-week-label { color: var(--muted); font-size: 0.63rem; white-space: nowrap; }
.dashboard-week-track { display: flex; width: min(32px, 70%); height: 100%; align-items: end; overflow: hidden; border-radius: 7px 7px 3px 3px; background: var(--sidebar); }
.dashboard-week-track span { width: 100%; min-height: 0; border-radius: inherit; background: linear-gradient(180deg, #32a6d5, #2563eb); transform-origin: bottom; animation: dashboard-bar-enter 700ms cubic-bezier(0.2, 0.75, 0.25, 1) both; }
.dashboard-week-column:nth-child(2) .dashboard-week-track span { animation-delay: 55ms; }
.dashboard-week-column:nth-child(3) .dashboard-week-track span { animation-delay: 110ms; }
.dashboard-week-column:nth-child(4) .dashboard-week-track span { animation-delay: 165ms; }
.dashboard-week-column:nth-child(5) .dashboard-week-track span { animation-delay: 220ms; }
.dashboard-week-column:nth-child(6) .dashboard-week-track span { animation-delay: 275ms; }
@keyframes dashboard-bar-enter {
  from { transform: scaleY(0.08); opacity: 0.55; }
  to { transform: scaleY(1); opacity: 1; }
}
.dashboard-chart-legend { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 11px; color: var(--muted); font-size: 0.67rem; }
.dashboard-chart-legend > span:first-child { display: flex; align-items: center; gap: 6px; }
.dashboard-chart-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.dashboard-module-details { margin-top: 14px; border-top: 1px solid var(--line); }
.dashboard-module-details summary { padding-top: 11px; color: var(--blue-dark); font-size: 0.74rem; font-weight: 700; cursor: pointer; }
.dashboard-module-details .learning-progress-list { max-height: 300px; overflow-y: auto; margin-top: 7px; }
.dashboard-module-details .learning-progress-list li { min-height: 38px; }
.dashboard-module-details .learning-progress-list a { font-size: 0.74rem; }
.dashboard-module-details .learning-progress-list span { font-size: 0.67rem; }
.dashboard-side-column { display: grid; gap: 12px; }
.dashboard-continue-panel { border-color: color-mix(in srgb, var(--blue) 28%, var(--line)); background: linear-gradient(140deg, var(--card-bg), var(--soft-blue)); }
.dashboard-continue-panel h2 { margin: 0 0 6px !important; }
.dashboard-next-module { min-height: 2.7em; margin: 0 0 12px; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.dashboard-continue-link { display: inline-flex; min-height: 36px; align-items: center; gap: 12px; padding: 7px 12px; border-radius: 6px; color: #fff !important; background: var(--blue-dark); font-size: 0.73rem; font-weight: 700; text-decoration: none; }
.dashboard-continue-link:hover { background: #074f73; }
.dashboard-continue-link span { font-size: 1rem; }
.dashboard-inline-count { display: grid; min-width: 25px; height: 25px; place-items: center; padding: 0 6px; border-radius: 999px; color: var(--blue-dark); background: var(--soft-blue); font-size: 0.68rem; font-weight: 700; }
.dashboard-bookmarks-panel .dashboard-panel-heading,
.dashboard-activity-panel .dashboard-panel-heading,
.dashboard-quiz-panel .dashboard-panel-heading { margin-bottom: 7px; }
.dashboard-main-grid .learning-bookmark-list,
.dashboard-main-grid .learning-quiz-list,
.dashboard-main-grid .learning-activity-list { max-height: 205px; overflow-y: auto; }
.dashboard-main-grid .learning-bookmark-list li,
.dashboard-main-grid .learning-quiz-list li { min-height: 38px; gap: 5px; padding: 5px 0; }
.dashboard-main-grid .learning-bookmark-list a,
.dashboard-main-grid .learning-quiz-list a { font-size: 0.72rem; }
.dashboard-main-grid .learning-quiz-list li > span,
.dashboard-main-grid .learning-activity-list li { font-size: 0.67rem; }
.dashboard-main-grid .learning-activity-list li { padding: 7px 0; }
.dashboard-quiz-panel { grid-column: 1; }
.community-dashboard { grid-column: 1 / -1; margin-top: 4px; }

.community-dashboard {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 10px 28px rgba(23, 50, 77, 0.06);
}

.community-dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.content .community-dashboard .community-dashboard-heading h2 { border: 0; margin: 0; padding: 0; }
.community-dashboard-heading .checkin-kicker { margin: 0 0 4px; }
.community-dashboard-intro,
.community-dashboard-status { color: var(--muted); font-size: 0.82rem; }
.community-dashboard-intro { margin: 8px 0 16px; }
.community-dashboard-error { color: #b42318; }
.community-refresh-button { min-height: 36px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--card-bg); font: 600 0.76rem 'DM Sans', sans-serif; cursor: pointer; }
.community-refresh-button:hover,
.community-refresh-button:focus-visible { border-color: var(--blue); color: var(--blue-dark); }
.community-refresh-button:disabled { opacity: 0.6; cursor: wait; }
.community-dashboard-results { display: grid; gap: 22px; }
.community-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.community-metric-card { display: grid; gap: 4px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.community-metric-card:nth-child(1) { border-color: color-mix(in srgb, #0788c9 32%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, #0788c9 12%, var(--card-bg)), var(--card-bg) 84%); }
.community-metric-card:nth-child(2) { border-color: color-mix(in srgb, #16834a 32%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, #16834a 12%, var(--card-bg)), var(--card-bg) 84%); }
.community-metric-card:nth-child(3) { border-color: color-mix(in srgb, #7c3aed 32%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, #7c3aed 12%, var(--card-bg)), var(--card-bg) 84%); }
.community-metric-card strong { color: var(--blue-dark); font: 700 1.5rem/1.1 'Space Grotesk', sans-serif; }
.community-metric-card:nth-child(1) strong { color: #0877aa; }
.community-metric-card:nth-child(2) strong { color: #147849; }
.community-metric-card:nth-child(3) strong { color: #6d28d9; }
.community-metric-card span { color: var(--muted); font-size: 0.72rem; }
body[data-theme='dark'] .dashboard-stat-card:nth-child(1) .dashboard-stat-icon,
body[data-theme='dark'] .community-metric-card:nth-child(1) strong { color: #63c9f5; }
body[data-theme='dark'] .dashboard-stat-card:nth-child(2) .dashboard-stat-icon,
body[data-theme='dark'] .community-metric-card:nth-child(2) strong { color: #69d49a; }
body[data-theme='dark'] .dashboard-stat-card:nth-child(3) .dashboard-stat-icon,
body[data-theme='dark'] .community-metric-card:nth-child(3) strong { color: #c2a0ff; }
body[data-theme='dark'] .dashboard-stat-card:nth-child(4) .dashboard-stat-icon { color: #ffc06b; }
.community-learner-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.content .community-learner-table { min-width: 620px; margin: 0; font-size: 0.76rem; }
.community-learner-table caption { padding: 11px 12px; color: var(--muted); background: var(--paper); text-align: left; font-size: 0.72rem; }
.community-learner-table th,
.community-learner-table td { padding: 10px 12px; }
.community-learner-table tbody tr:nth-child(odd) { background: color-mix(in srgb, #0788c9 5%, var(--card-bg)); }
.community-learner-table tbody tr:nth-child(even) { background: color-mix(in srgb, #16834a 5%, var(--card-bg)); }
.community-learner-table tbody tr:hover { background: color-mix(in srgb, #0788c9 11%, var(--card-bg)); }
.community-learner-table tbody th { color: var(--ink); background: transparent; text-align: left; }
.community-learner-table tbody td { color: var(--ink); background: transparent; }
.community-learner-table progress { width: 100px; height: 9px; accent-color: #16834a; vertical-align: middle; }

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 50, 77, 0.46);
  backdrop-filter: blur(3px);
}

.welcome-overlay.is-dismissed {
  display: none;
}

.assessment-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(23, 50, 77, 0.58);
  backdrop-filter: blur(3px);
}

.assessment-overlay.is-dismissed { display: none; }

.assessment-dialog {
  position: relative;
  width: min(100%, 900px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 30px 32px 26px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-top: 5px solid var(--blue);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 22px 60px rgba(23, 50, 77, 0.3);
}

.assessment-dialog h1 { margin: 0 0 18px; color: var(--ink); font: 700 1.6rem/1.2 'Space Grotesk', sans-serif; }
.assessment-close { position: absolute; top: 10px; right: 10px; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font: 400 1.8rem/1 'DM Sans', sans-serif; cursor: pointer; }
.assessment-close:hover,
.assessment-close:focus-visible { color: var(--ink); background: var(--soft-blue); outline: 2px solid var(--blue); outline-offset: 1px; }
.assessment-dialog .assessment-change-note { margin: 12px 0 0; font-size: 0.82rem; }

.welcome-dialog {
  position: relative;
  width: min(100%, 510px);
  padding: 30px 32px 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-top: 5px solid var(--pink);
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 22px 60px rgba(23, 50, 77, 0.24);
}

.welcome-close { position: absolute; top: 10px; right: 10px; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font: 400 1.8rem/1 'DM Sans', sans-serif; cursor: pointer; }
.welcome-close:hover,
.welcome-close:focus-visible { color: var(--ink); background: var(--soft-blue); outline: 2px solid var(--blue); outline-offset: 1px; }

.welcome-label {
  margin: 0 0 8px;
  color: var(--pink) !important;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.welcome-dialog h1 {
  margin: 0 0 16px;
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.55rem;
  line-height: 1.2;
}

.welcome-dialog p:not(.welcome-label) {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.agree-button {
  width: 100%;
  margin-top: 8px;
  padding: 11px 16px;
  border: 0;
  border-radius: 7px;
  color: white;
  background: var(--blue);
  font: 700 0.92rem 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.agree-button:hover,
.agree-button:focus-visible {
  background: var(--blue-dark);
  outline: none;
  transform: translateY(-1px);
}

.quick-access {
  margin: 28px 0 18px;
  padding: 22px 22px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--soft-blue), var(--soft-pink));
  box-shadow: 0 8px 22px rgba(23, 50, 77, 0.04);
}

.quick-access-header {
  margin-bottom: 18px;
}

.quick-access-kicker {
  margin: 0 0 6px;
  color: var(--pink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quick-access-header h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.2;
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-height: 140px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(7, 136, 201, 0.18);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.quick-link-card:hover,
.quick-link-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 16px 28px rgba(7, 136, 201, 0.08);
  outline: none;
}

.quick-link-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  font: 700 0.76rem 'Space Grotesk', sans-serif;
}

.quick-link-card strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
}

.quick-link-card small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.content {
  max-width: 980px;
  margin-left: 248px;
  padding: 58px clamp(32px, 7vw, 110px) 100px;
}

.content.day-module-view {
  max-width: 1400px;
  min-height: calc(100vh - 68px);
  padding: 42px clamp(24px, 4vw, 56px) 72px;
  background:
    radial-gradient(ellipse at 12% 4%, rgba(255, 255, 255, 0.9), transparent 34%),
    radial-gradient(ellipse at 92% 14%, rgba(125, 211, 252, 0.38), transparent 38%),
    linear-gradient(140deg, #dff4ff 0%, #c9eaff 48%, #e7f7ff 100%);
}

body[data-theme='dark'] .content.day-module-view {
  background:
    radial-gradient(ellipse at 12% 4%, rgba(79, 195, 255, 0.13), transparent 34%),
    radial-gradient(ellipse at 92% 14%, rgba(37, 99, 235, 0.16), transparent 38%),
    linear-gradient(140deg, #102b40 0%, #132d46 48%, #102638 100%);
}

.day-content-frame {
  min-height: calc(100vh - 190px);
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 42px rgba(23, 87, 126, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

body[data-theme='dark'] .day-content-frame {
  border-color: rgba(182, 220, 245, 0.2);
  background: rgba(28, 55, 77, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.day-content-frame > h1 {
  max-width: 780px;
  margin: 0 0 22px;
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.site-footer {
  margin-left: 264px;
  padding: 24px clamp(24px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--sidebar);
}

.site-footer-content {
  display: grid;
  max-width: 1120px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 24px;
  margin: 0 auto;
}

.site-footer p { margin: 0; }
.site-footer-brand { color: var(--ink); font-size: 0.86rem; font-weight: 700; }
.site-footer-note,
.site-footer-copyright { font-size: 0.72rem; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; grid-column: 2; grid-row: 1 / span 2; }
.site-footer-links a { color: var(--blue-dark); font-size: 0.78rem; font-weight: 600; text-decoration: none; }
.site-footer-links a:hover,
.site-footer-links a:focus-visible { color: var(--blue); text-decoration: underline; }
.site-footer-links a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.content > h1 {
  max-width: 780px;
  margin: 0 0 22px;
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.content > blockquote {
  margin: 22px 0 36px;
  padding: 16px 22px;
  border-left: 5px solid var(--pink);
  border-radius: 0 10px 10px 0;
  background: var(--soft-pink);
  color: var(--ink);
}

.content h2 {
  margin: 64px 0 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--blue-dark);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  line-height: 1.2;
}

.content h3 {
  margin-top: 35px;
  color: var(--purple);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
}

.content h4 { color: var(--pink); font-family: 'Space Grotesk', sans-serif; }
.content p {
  color: var(--ink);
}
.content strong { color: var(--ink); }

.content a { color: var(--blue-dark); font-weight: 600; }
.content a:hover { color: var(--pink); }

.content table {
  width: 100%;
  margin: 20px 0 28px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
}

.content th {
  color: white;
  background: var(--blue-dark);
  text-align: left;
}

.content th, .content td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.content tr:nth-child(even) td { background: var(--soft-blue); }

.content pre {
  overflow-x: auto;
  margin: 22px 0;
  padding: 20px 22px;
  border-radius: 9px;
  color: #e7f7ff;
  background: #17324d;
  box-shadow: 0 12px 28px rgba(23, 50, 77, 0.13);
}

.content code { font-family: Consolas, monospace; }
.content p code, .content li code { padding: 2px 5px; border-radius: 4px; background: var(--soft-blue); color: var(--blue-dark); }

.content img {
  display: block;
  width: 100%;
  min-height: 150px;
  margin: 22px 0 8px;
  padding: 24px;
  border: 2px dashed #9cb3c1;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbfd, #eef7fc);
  object-fit: contain;
}

.content img:not([src*='data:']) { color: var(--muted); }
.content hr { margin: 54px 0; border: 0; border-top: 1px solid var(--line); }

.module-checkin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 64px 0 20px;
  padding: 26px 0;
  border-top: 2px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.module-checkin-copy { min-width: 0; }
.checkin-kicker { margin: 0 0 5px; color: var(--pink) !important; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.content .module-checkin h2 { margin: 0 0 7px; padding: 0; border: 0; color: var(--ink); font-size: 1.3rem; }
.module-checkin-copy > p:not(.checkin-kicker) { margin: 0 0 7px; color: var(--muted); font-size: 0.86rem; }
.module-checkin-copy a { font-size: 0.86rem; }
.module-checkin-actions { display: grid; justify-items: start; gap: 9px; flex: 0 0 auto; }
.bookmark-button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: var(--card-bg);
  font: 600 0.84rem 'DM Sans', sans-serif;
  cursor: pointer;
}
.bookmark-button[aria-pressed='true'] { border-color: var(--pink); color: var(--pink); }
.bookmark-button:disabled { opacity: 0.55; cursor: wait; }
.bookmark-button:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.completion-button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: var(--card-bg);
  font: 600 0.84rem 'DM Sans', sans-serif;
  cursor: pointer;
}
.completion-button[aria-pressed='true'] { border-color: var(--blue-dark); color: white; background: var(--blue-dark); }
.completion-button:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.checkin-status { min-height: 1.4em; margin: 0; color: var(--muted); font-size: 0.76rem; }
.module-quiz { margin: 30px 0 38px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-bg); }
.content .module-quiz h2 { margin: 0 0 6px; padding: 0; border: 0; color: var(--ink); font-size: 1.25rem; }
.module-quiz-intro,
.module-quiz-status { margin: 0 0 16px; color: var(--muted); font-size: 0.86rem; }
.module-quiz-question { margin: 18px 0; padding: 0; border: 0; }
.module-quiz-question legend { margin-bottom: 9px; color: var(--ink); font-weight: 700; }
.module-quiz-option { display: flex; align-items: flex-start; gap: 9px; margin: 8px 0; color: var(--ink); font-size: 0.9rem; cursor: pointer; }
.module-quiz-option input { margin-top: 4px; accent-color: var(--blue); }
.module-quiz-explanation { margin: 8px 0 0 24px; color: var(--muted); font-size: 0.82rem; }
.module-quiz-submit,
.module-quiz-retake { min-height: 40px; padding: 8px 15px; border: 0; border-radius: 5px; color: var(--button-text); background: var(--blue); font: 600 0.84rem 'DM Sans', sans-serif; cursor: pointer; }
.module-quiz-submit:disabled { opacity: 0.55; cursor: wait; }
.module-quiz-submit:focus-visible,
.module-quiz-retake:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.module-quiz-result { margin: 12px 0; color: var(--ink); font-weight: 700; }
.module-feedback {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 16px 32px;
  margin: 0 0 48px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.module-feedback-heading { grid-column: 1 / -1; }
.module-feedback-heading h2 { margin: 0 0 4px; padding: 0; border: 0; font-size: 1.15rem; }
.module-feedback-heading p,
.feedback-counts,
.feedback-status { margin: 0; color: var(--muted); font-size: 0.82rem; }
.feedback-counts { align-self: end; }
.feedback-form { display: grid; gap: 12px; }
.feedback-form fieldset { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; border: 0; }
.feedback-form legend { width: 100%; margin-bottom: 3px; font-size: 0.84rem; font-weight: 700; }
.feedback-choice { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--card-bg); font-size: 0.82rem; cursor: pointer; }
.feedback-choice:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.feedback-choice input { accent-color: var(--blue); }
.feedback-form label[for='feedback-comment'] { font-size: 0.84rem; font-weight: 700; }
.feedback-form textarea { width: 100%; min-height: 86px; resize: vertical; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--card-bg); font: 400 0.86rem 'DM Sans', sans-serif; }
.feedback-form textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.feedback-submit { justify-self: start; min-height: 38px; padding: 7px 13px; border: 0; border-radius: 5px; color: var(--button-text); background: var(--blue); font: 600 0.82rem 'DM Sans', sans-serif; cursor: pointer; }
.feedback-submit:disabled { opacity: 0.55; cursor: not-allowed; }
.feedback-submit:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.feedback-status { min-height: 1.4em; }

.content.day-resources-view {
  max-width: 1400px;
  padding-top: 42px;
}

.resources-heading h1 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.15;
}

.resources-heading > p:last-child,
.day-overview p:last-child { color: var(--muted); }

.resource-kicker {
  margin: 0 0 7px;
  color: var(--pink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.day-overview {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 30px 0;
  padding: 22px 26px;
  border-left: 5px solid var(--blue);
  background: linear-gradient(110deg, var(--soft-blue), var(--soft-pink));
}

.day-stamp {
  display: grid;
  flex: 0 0 68px;
  aspect-ratio: 1;
  place-content: center;
  border-radius: 7px;
  color: white;
  background: var(--blue-dark);
  text-align: center;
  line-height: 1;
}

.day-stamp span { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; }
.day-stamp strong { margin-top: 4px; font: 700 1.65rem 'Space Grotesk', sans-serif; }
.day-overview h2 { margin: 0; padding: 0; border: 0; color: var(--ink); font-size: 1.35rem; }
.day-overview p { margin: 5px 0 0; }

.resource-browser {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 520px;
  border-top: 1px solid var(--line);
}

.resource-groups {
  padding: 18px 14px 18px 0;
  border-right: 1px solid var(--line);
}

.resource-group-button,
.resource-topic-button {
  width: 100%;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.resource-group-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 0 5px;
  padding: 11px 12px;
  border-radius: 5px;
  font-size: 0.86rem;
  font-weight: 700;
}

.resource-group-button span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.resource-group-button:hover,
.resource-group-button.is-active { color: var(--blue-dark); background: var(--soft-blue); }

.resource-workspace {
  display: grid;
  grid-template-columns: minmax(210px, 270px) minmax(0, 1fr);
}

.resource-topics {
  padding: 18px 14px;
  border-right: 1px solid var(--line);
}

.resource-topic-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 5px;
  padding: 11px 9px;
  border-left: 3px solid transparent;
  border-radius: 0 5px 5px 0;
}

.resource-topic-button:hover,
.resource-topic-button.is-active {
  border-left-color: var(--pink);
  background: var(--soft-pink);
}

.topic-number { color: var(--blue-dark); font: 700 0.76rem 'Space Grotesk', sans-serif; }
.resource-topic-button strong { display: block; font-size: 0.84rem; line-height: 1.35; }
.resource-topic-button small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.74rem; line-height: 1.4; }

.resource-detail-panel { min-width: 0; padding: 25px clamp(18px, 3vw, 38px) 50px; }
.resource-detail-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.resource-detail-heading h2 { margin: 0; padding: 0; border: 0; color: var(--ink); font-size: 1.8rem; }
.resource-detail-heading p:not(.resource-kicker) { margin: 7px 0 0; color: var(--muted); }
.resource-external { flex: 0 0 auto; padding: 8px 12px; border-radius: 5px; color: white !important; background: var(--blue-dark); font-size: 0.78rem; text-decoration: none; }
.resource-external:hover { background: var(--pink); }
.resource-section { padding-top: 17px; }
.resource-section h3 { margin: 0 0 8px; color: var(--blue-dark); font-size: 1.08rem; }
.resource-section p,
.resource-section li { color: var(--ink); font-size: 0.91rem; line-height: 1.65; }
.resource-section p { margin: 0 0 12px; }
.resource-section ul { margin: 8px 0 15px; padding-left: 22px; }
.resource-section a { color: var(--blue-dark); }

.resource-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin: 13px 0 5px;
}

.content .resource-image {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--card-bg);
}

.content .resource-image img {
  width: 100%;
  min-height: 0;
  max-height: 360px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.resource-image figcaption {
  min-height: 122px;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 14px;
  color: var(--muted);
  background: repeating-linear-gradient(135deg, var(--sidebar), var(--sidebar) 10px, var(--paper) 10px, var(--paper) 20px);
  text-align: center;
}

.resource-image figcaption strong { color: var(--blue-dark); font: 700 1.05rem 'Space Grotesk', sans-serif; }
.resource-image figcaption span { font-size: 0.8rem; }
.resource-image figcaption code { color: var(--muted); font-size: 0.7rem; overflow-wrap: anywhere; }

.content.stream-map-view {
  --map-glass: rgba(255, 255, 255, 0.56);
  --map-glass-strong: rgba(255, 255, 255, 0.76);
  --map-glass-border: rgba(255, 255, 255, 0.76);
  --map-glass-shadow: 0 12px 28px rgba(23, 87, 126, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  max-width: 1400px;
  min-height: calc(100vh - 68px);
  padding-top: 42px;
  background:
    radial-gradient(ellipse at 12% 4%, rgba(255, 255, 255, 0.9), transparent 34%),
    radial-gradient(ellipse at 92% 14%, rgba(125, 211, 252, 0.4), transparent 38%),
    linear-gradient(140deg, #dff4ff 0%, #c9eaff 48%, #e7f7ff 100%);
}
body[data-theme='dark'] .content.stream-map-view {
  --map-glass: rgba(28, 55, 77, 0.62);
  --map-glass-strong: rgba(29, 58, 82, 0.8);
  --map-glass-border: rgba(182, 220, 245, 0.2);
  --map-glass-shadow: 0 12px 28px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(ellipse at 12% 4%, rgba(79, 195, 255, 0.13), transparent 34%),
    radial-gradient(ellipse at 92% 14%, rgba(37, 99, 235, 0.16), transparent 38%),
    linear-gradient(140deg, #102b40 0%, #132d46 48%, #102638 100%);
}
.map-heading { max-width: 760px; }
.map-heading .map-kicker,
.map-kicker { margin: 0 0 7px; color: var(--pink); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.map-heading h1 { margin: 0; font: 700 clamp(2rem, 4vw, 2.7rem)/1.15 'Space Grotesk', sans-serif; }
.map-intro { margin: 10px 0 0; color: var(--muted); }
.assessment-panel { margin-top: 24px; padding: 18px; border: 1px solid var(--map-glass-border); border-left: 4px solid var(--pink); border-radius: 16px; background: var(--map-glass); box-shadow: var(--map-glass-shadow); -webkit-backdrop-filter: blur(16px) saturate(135%); backdrop-filter: blur(16px) saturate(135%); }
.assessment-panel-heading { margin-bottom: 12px; }
.assessment-panel-heading h2 { margin: 0; color: var(--ink); font: 700 1.15rem 'Space Grotesk', sans-serif; }
.assessment-table-wrap { overflow-x: auto; }
.assessment-table { width: 100%; min-width: 560px; border-collapse: collapse; color: var(--ink); background: rgba(255, 255, 255, 0.24); font-size: 0.88rem; table-layout: fixed; text-align: left; }
.assessment-table th,
.assessment-table td { padding: 13px 16px; border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent); vertical-align: top; overflow-wrap: anywhere; }
.assessment-table th { padding: 13px 16px; color: #fff; background: linear-gradient(135deg, #168ec6, #08638e); font-weight: 700; text-align: left; }
.assessment-table th:first-child { border-top-left-radius: 5px; }
.assessment-table th:last-child { border-top-right-radius: 5px; }
.assessment-table th:nth-child(1),
.assessment-table td:nth-child(1) { width: 24%; }
.assessment-table th:nth-child(2),
.assessment-table td:nth-child(2) { width: 24%; }
.assessment-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--soft-blue) 58%, transparent); }
.assessment-table tbody tr:last-child td { border-bottom: 0; }
.assessment-change-note { margin: 12px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.assessment-change-note strong { color: var(--pink); }
.map-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 28px 0; }
.map-stats > div { display: grid; gap: 1px; padding: 15px 18px; border: 1px solid var(--map-glass-border); border-radius: 14px; background: var(--map-glass); box-shadow: var(--map-glass-shadow); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.map-stats > div:first-child { padding-left: 18px; }
.map-stats > div:last-child { border-right: 0; }
.map-stats strong { font: 700 1.5rem 'Space Grotesk', sans-serif; }
.map-stats span { color: var(--muted); font-size: 0.78rem; }
.map-progress { margin: 0 0 26px; }
.map-progress-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.map-progress-heading h2 { margin: 0; padding: 0; border: 0; color: var(--ink); font-size: 1rem; }
.map-progress-heading > span { color: var(--muted); font-size: 0.82rem; }
.map-progress-track { height: 9px; overflow: hidden; border: 1px solid var(--map-glass-border); border-radius: 999px; background: var(--map-glass); box-shadow: inset 0 1px 3px rgba(23, 50, 77, 0.1); }
.map-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #59c5f4, #1688cf 72%, #2563eb); box-shadow: 0 0 12px rgba(22, 136, 207, 0.35); transition: width 240ms ease; }
.map-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 0.55fr); gap: 7px 14px; align-items: center; }
.map-toolbar label { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.map-toolbar input,
.map-toolbar select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--map-glass-border); border-radius: 12px; color: var(--ink); background: var(--map-glass-strong); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 5px 12px rgba(23, 87, 126, 0.08); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font: 500 0.88rem 'DM Sans', sans-serif; }
.map-toolbar input { border-color: var(--map-glass-border); border-radius: 12px; background: var(--map-glass-strong); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 5px 12px rgba(23, 87, 126, 0.08); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.map-toolbar input:focus,
.map-toolbar select:focus { border-color: var(--blue); outline: 3px solid color-mix(in srgb, var(--blue) 20%, transparent); }
.map-results { margin: 18px 0 10px; color: var(--muted); font-size: 0.78rem; }
.map-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.map-day-card { display: flex; flex-direction: column; min-width: 0; padding: 14px; border: 1px solid var(--map-glass-border); border-radius: 16px; color: var(--ink); background: var(--map-glass); box-shadow: var(--map-glass-shadow); -webkit-backdrop-filter: blur(14px) saturate(130%); backdrop-filter: blur(14px) saturate(130%); font: inherit; text-align: left; cursor: pointer; animation: dashboard-panel-enter 420ms cubic-bezier(0.2, 0.75, 0.25, 1) both; transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 180ms ease; }
.map-day-card:nth-child(3n + 2) { animation-delay: 45ms; }
.map-day-card:nth-child(3n) { animation-delay: 90ms; }
.map-day-card:hover { transform: perspective(900px) rotateX(1deg) translateY(-3px) scale(1.005); border-color: color-mix(in srgb, var(--blue) 58%, white); background: var(--map-glass-strong); box-shadow: 0 14px 26px rgba(7, 104, 160, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.9); }
.map-day-card:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.map-day-card.is-selected { border-color: color-mix(in srgb, var(--blue-dark) 55%, white); background: color-mix(in srgb, var(--soft-blue) 72%, var(--map-glass)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 17%, transparent), var(--map-glass-shadow); }
.map-day-card.is-complete { border-color: rgba(47, 163, 108, 0.5); background: linear-gradient(145deg, rgba(218, 247, 231, 0.72), var(--map-glass)); }
.map-day-card.is-complete .map-badge { color: #16683d; background: rgba(184, 238, 204, 0.72); }
.map-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 9px; }
.map-card-top > div { display: grid; gap: 2px; }
.map-card-top strong { font: 700 0.92rem 'Space Grotesk', sans-serif; }
.map-card-top time { color: var(--muted); font-size: 0.72rem; }
.map-badge { max-width: 60%; padding: 4px 9px; border: 1px solid color-mix(in srgb, var(--blue) 14%, transparent); border-radius: 999px; color: var(--blue-dark); background: color-mix(in srgb, var(--soft-blue) 74%, transparent); font-size: 0.66rem; line-height: 1.35; text-align: right; }
.map-card-topics { display: grid; margin-top: 10px; }
.map-card-topics > span { padding: 6px 0; border-top: 1px solid var(--line); font-size: 0.79rem; font-weight: 600; line-height: 1.45; }
.map-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: auto; padding-top: 12px; }
.map-meeting-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; margin-left: auto; padding: 6px 16px; border: 1px solid rgba(70, 71, 117, 0.5); border-radius: 999px; color: #ffffff; background: linear-gradient(145deg, rgba(112, 115, 183, 0.95), rgba(70, 71, 117, 0.95)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 4px 10px rgba(70, 71, 117, 0.2); font: 600 0.74rem 'DM Sans', sans-serif; text-decoration: none; transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease; }
.map-meeting-button:hover, .map-meeting-button:focus-visible { background: linear-gradient(145deg, #777ac0, #4b4c85); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 7px 14px rgba(70, 71, 117, 0.27); transform: translateY(-1px); outline: none; }
.content a.map-meeting-button,
.content a.map-meeting-button:visited,
.content a.map-meeting-button:hover,
.content a.map-meeting-button:focus-visible { color: #ffffff; }
.map-view-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 7px 15px; border: 1px solid rgba(255, 255, 255, 0.48); border-radius: 999px; color: white; background: linear-gradient(145deg, #36b5e7, #087bbd); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 4px 10px rgba(7, 123, 189, 0.22); font: 700 0.74rem 'DM Sans', sans-serif; text-decoration: none; transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease; }
.map-view-button:hover, .map-view-button:focus-visible { background: linear-gradient(145deg, #53c7f0, #086ba6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 7px 14px rgba(7, 123, 189, 0.3); transform: translateY(-1px); outline: none; }
.content a.map-view-button,
.content a.map-view-button:visited,
.content a.map-view-button:hover,
.content a.map-view-button:focus-visible { color: #ffffff; }
.map-day-card.is-complete .map-view-button { background: linear-gradient(145deg, #36b87a, #16834f); }
.map-day-card.is-complete .map-view-button:hover,
.map-day-card.is-complete .map-view-button:focus-visible { background: linear-gradient(145deg, #45c98b, #147849); }
.map-empty { grid-column: 1 / -1; margin: 0; padding: 30px 0; color: var(--muted); text-align: center; }
.map-selected { margin-top: 30px; padding: 20px; border: 1px solid var(--map-glass-border); border-radius: 16px; background: var(--map-glass); box-shadow: var(--map-glass-shadow); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.map-selected-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.map-selected-heading .map-kicker { margin-bottom: 3px; }
.map-selected-heading h2 { margin: 0; padding: 0; border: 0; color: var(--ink); font-size: 1.25rem; }
.map-selected-heading h2 span { color: var(--muted); }
.map-selected-heading time { padding-top: 18px; color: var(--muted); font-size: 0.8rem; }
.map-selected ol { margin: 14px 0 0; padding-left: 22px; }
.map-selected li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; }

@media (max-width: 760px) {
  .topbar { height: 60px; padding: 0 16px; }
  .brand { font-size: 0.92rem; }
  .sidebar { top: 60px; z-index: 15; width: min(84vw, 300px); transform: translateX(-105%); transition: transform 180ms ease; box-shadow: 12px 0 30px rgba(23, 50, 77, 0.14); }
  .sidebar.is-open { transform: translateX(0); }
  .content { margin-left: 0; padding: 38px 20px 70px; }
  .content.day-module-view { min-height: calc(100vh - 60px); padding: 30px 16px 55px; }
  .day-content-frame { min-height: calc(100vh - 145px); padding: 24px 20px; border-radius: 18px; }
  .content.learning-dashboard-view { margin-left: 0; padding: 26px 18px 54px; }
  .site-footer { margin-left: 0; padding: 22px 20px; }
  .content-search-panel { left: auto; right: 0; }
  .content h2 { margin-top: 46px; }
  .content.day-resources-view { padding: 30px 16px 55px; }
  .day-overview { align-items: flex-start; gap: 14px; padding: 17px; }
  .day-stamp { flex-basis: 54px; }
  .day-overview h2 { font-size: 1.1rem; }
  .resource-browser { grid-template-columns: 1fr; }
  .resource-groups { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .resource-group-button { flex: 0 0 auto; width: auto; margin: 0; }
  .resource-workspace { grid-template-columns: 1fr; }
  .resource-topics { display: flex; gap: 7px; overflow-x: auto; padding: 12px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .resource-topic-button { flex: 0 0 min(78vw, 250px); margin: 0; }
  .resource-detail-panel { padding: 22px 0 40px; }
  .content.stream-map-view { padding: 30px 16px 55px; }
  .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-stats > div { padding: 12px; }
  .resource-detail-heading { display: block; }
  .resource-detail-heading h2 { margin-top: 0; font-size: 1.5rem; }
  .resource-external { display: inline-block; margin-top: 14px; }
  .module-checkin { align-items: flex-start; flex-direction: column; gap: 18px; margin-top: 46px; }
  .module-checkin-actions { width: 100%; }
  .learning-progress-list li,
  .learning-bookmark-list li,
  .learning-quiz-list li { align-items: flex-start; flex-direction: column; gap: 3px; padding: 10px 0; }
  .community-dashboard { padding: 16px; }
  .community-metrics { grid-template-columns: 1fr; }
  .learning-dashboard-welcome { align-items: flex-start; flex-direction: column; }
  .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-main-grid { grid-template-columns: 1fr; }
  .dashboard-side-column { grid-row: auto; }
  .dashboard-quiz-panel,
  .community-dashboard { grid-column: 1; }
  .dashboard-week-chart { gap: 7px; }
  .auth-gate { padding: 16px; }
  .auth-panel { padding: 25px 22px; }
  .module-feedback { grid-template-columns: 1fr; gap: 12px; }
  .module-feedback-heading { grid-column: auto; }
    .home-button,
    .menu-button,
    .theme-toggle {
      padding: 8px 12px;
      font-size: 0.78rem;
    }
  .home-button,
  .menu-button { padding: 7px 10px; font-size: 0.72rem; }
  .theme-toggle { padding: 4px; font-size: 1rem; }
  .welcome-dialog { padding: 25px 22px 23px; }
  .welcome-dialog h1 { font-size: 1.35rem; }
}

@media (max-width: 640px) {
  .topbar {
    height: 112px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 36px 34px 1fr;
    gap: 0 8px;
    padding: 5px 12px;
  }
  .brand { grid-column: 1; grid-row: 1; font-size: 0.78rem; }
  .top-actions { grid-column: 1 / -1; grid-row: 2; justify-self: center; gap: 5px; }
  .top-actions > * { padding: 6px 7px; font-size: 0.68rem; }
  .top-actions > .theme-toggle { padding: 4px; font-size: 1rem; }
  .search-button { width: 34px; min-height: 32px; padding: 5px; }
  .search-button span { display: none; }
  .search-button svg { width: 17px; height: 17px; }
  .top-actions > .profile-control { padding: 0; font-size: inherit; }
  .profile-button { width: 32px; height: 32px; }
  .profile-avatar { width: 26px; height: 26px; font-size: 0.68rem; }
  .stream-map-notice { grid-column: 1 / -1; grid-row: 3; justify-self: center; min-height: 38px; padding: 5px 22px; }
  .sidebar { top: 112px; }
  body.header-hidden .sidebar { top: 0; }
  .content-search-panel { left: 50%; right: auto; transform: translateX(-50%); }
  .site-footer-content { grid-template-columns: 1fr; gap: 8px; }
  .site-footer-links { grid-column: 1; grid-row: auto; }
}

@media (max-width: 520px) {
  .content.day-module-view { padding: 24px 12px 42px; }
  .day-content-frame { min-height: calc(100vh - 150px); padding: 20px 16px; border-radius: 16px; }
  .content.learning-dashboard-view { padding: 22px 13px 42px; }
  .dashboard-stat-grid { gap: 8px; }
  .dashboard-stat-card { min-height: 118px; padding: 12px; }
  .dashboard-progress-summary { gap: 8px; }
  .dashboard-progress-ring { width: 56px; height: 56px; flex-basis: 56px; }
  .dashboard-progress-ring::before { width: 44px; height: 44px; }
  .dashboard-progress-ring span { font-size: 0.72rem; }
  .dashboard-week-chart { gap: 3px; padding-right: 0; padding-left: 0; }
  .dashboard-week-label { font-size: 0.57rem; }
  .dashboard-week-track { width: min(25px, 70%); }
  .map-grid { grid-template-columns: 1fr; }
  .map-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-stats > div:nth-child(2) { border-right: 0; }
  .map-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .map-stats > div:first-child { padding-left: 12px; }
  .map-toolbar { grid-template-columns: 1fr; }
  .map-category-label { margin-top: 5px; }
  .map-selected-heading { display: block; }
  .map-selected-heading time { display: block; padding-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
