:root {
  --navy: #071433;
  --navy-2: #0b1f4a;
  --ink: #10182b;
  --muted: #5c6780;
  --line: #dce3ef;
  --paper: #f3f6fb;
  --card: #ffffff;
  --teal: #0f9d8e;
  --teal-2: #14b8a6;
  --indigo: #4338ca;
  --cui: #2e3192;
  --danger: #be123c;
  --shadow: 0 18px 50px rgba(7, 20, 51, 0.08);
  --radius: 18px;
  --header-h: 72px;
  --font: Inter, ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: -0.03em; }
.wrap { width: calc(100% - 32px); max-width: 1180px; margin: 0 auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.utility-bar {
  background: var(--navy);
  color: rgba(255,255,255,.82);
  font-size: 12.5px;
  letter-spacing: .01em;
}
.utility-bar-inner {
  display: flex; justify-content: space-between; gap: 16px;
  align-items: center; min-height: 36px; flex-wrap: wrap;
}
.utility-bar-links { display: flex; gap: 16px; }
.utility-bar-links a { color: #fff; opacity: .88; }
.utility-bar-links a:hover { opacity: 1; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(220,227,239,.9);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 46px; height: 46px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; }
.brand-eyebrow { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.brand-title { font-weight: 700; font-size: 16px; color: var(--navy); }
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a {
  padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px;
}
.main-nav a.active, .main-nav a:hover { color: var(--navy); background: #eef2ff; }

.hero {
  position: relative; color: #fff; overflow: hidden;
  min-height: 560px; display: grid; align-items: end;
}
.hero-media, .hero-veil { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.hero-veil {
  background:
    linear-gradient(90deg, rgba(7,20,51,.94) 0%, rgba(7,20,51,.78) 42%, rgba(7,20,51,.28) 100%),
    linear-gradient(180deg, rgba(7,20,51,.2), rgba(7,20,51,.55));
}
.hero-inner { position: relative; z-index: 1; padding: 72px 0 92px; }
.hero-copy { max-width: 640px; width: 100%; min-width: 0; }
.hero-kicker {
  margin: 0 0 12px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: #99f6e4; font-weight: 700;
}
.hero h1 {
  margin: 0; font-size: clamp(32px, 5vw, 58px); line-height: 1.08; color: #fff;
  overflow-wrap: break-word;
}
.hero-accent { color: #5eead4; }
.hero-subtitle { margin: 16px 0 26px; font-size: 17px; color: rgba(255,255,255,.86); max-width: 54ch; overflow-wrap: break-word; }
.hero-search {
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--ink); border-radius: 999px;
  padding: 8px 8px 8px 16px; box-shadow: var(--shadow);
}
.hero-search svg { flex: none; color: var(--muted); }
.hero-search input {
  flex: 1; border: 0; outline: none; background: transparent; min-width: 0; width: 100%; font-size: 15px;
}
.hero-search button {
  border: 0; background: linear-gradient(135deg, var(--cui), var(--indigo));
  color: #fff; font-weight: 700; border-radius: 999px; padding: 12px 18px; cursor: pointer;
}
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.hero-pills li {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 600;
}
.hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath fill='%23f3f6fb' d='M0 48h720C1080 48 1260 0 1440 0v80H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}

.stats-band { margin-top: -28px; position: relative; z-index: 2; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow); padding: 8px;
}
.stats-grid article { padding: 18px 16px 16px; text-align: center; }
.stats-grid p { margin: 0; font-size: 34px; color: var(--navy); }
.stats-grid span { color: var(--muted); font-size: 13px; font-weight: 600; }

.page { padding: 48px 0 80px; }
.page-browse { padding-top: 28px; }
.section-heading {
  display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 18px; flex-wrap: wrap;
}
.section-heading h2 { margin: 0; font-size: 32px; color: var(--navy); }
.count { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.inline-filter input, .search-page-form input {
  width: min(320px, 100%); border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: 10px 14px; outline: none;
}
.inline-filter input:focus, .search-page-form input:focus { border-color: #a5b4fc; box-shadow: 0 0 0 4px rgba(67,56,202,.12); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 12px; cursor: pointer; font-weight: 600; color: var(--muted);
}
.chip em { font-style: normal; color: #94a3b8; margin-left: 4px; font-size: 12px; }
.chip.active, .chip:hover { border-color: #c7d2fe; color: var(--cui); background: #eef2ff; }

.collection-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px;
}
.collection-grid.compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.collection-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 1px 0 rgba(7,20,51,.02);
  transition: transform .18s ease, box-shadow .18s ease;
}
.collection-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.collection-card-banner {
  height: 104px; position: relative; color: #fff; padding: 16px;
  display: flex; align-items: end;
}
.collection-card-banner::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.28), transparent 42%);
}
.dept-pill {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
}
.collection-card-name { position: relative; z-index: 1; font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.collection-card-body { padding: 16px 16px 14px; }
.collection-card-title {
  margin: 0 0 10px; min-height: 44px; font-weight: 600; color: var(--navy); font-size: 15px;
}
.collection-card-meta {
  display: flex; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: 12.5px; font-weight: 600;
}
.collection-card-link {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 6px;
  color: var(--indigo); font-weight: 700; font-size: 13px;
}

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; font-weight: 600; }
.breadcrumbs a:hover { color: var(--indigo); }
.crumb-sep { opacity: .45; }
.crumb-current { color: var(--navy); }
.browse-hero {
  display: flex; justify-content: space-between; gap: 20px; align-items: end;
  margin: 22px 0 20px; flex-wrap: wrap;
}
.browse-hero > div { min-width: 0; flex: 1 1 240px; }
.browse-hero h1 { margin: 4px 0 8px; font-size: clamp(30px, 4vw, 44px); color: var(--navy); }
.eyebrow { margin: 0; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lede { color: var(--muted); max-width: 62ch; overflow-wrap: break-word; }
.browse-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.view-toggle { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.view-toggle button {
  border: 0; background: transparent; border-radius: 999px; padding: 8px 12px; cursor: pointer; font-weight: 700; color: var(--muted);
}
.view-toggle button.active { background: var(--navy); color: #fff; }
.mini-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px;
}
.mini-stats div {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
}
.mini-stats strong { display: block; font-size: 22px; color: var(--navy); }
.mini-stats span { color: var(--muted); font-size: 12.5px; font-weight: 600; }

.browse-section { margin-bottom: 28px; }
.browse-section-title {
  margin: 0 0 12px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 800;
}
.folder-grid, .file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  color: inherit; cursor: pointer;
}
.card:hover { border-color: #c7d2fe; box-shadow: var(--shadow); }
.icon-badge {
  flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: #eef2ff; color: var(--indigo); font-size: 10px; font-weight: 800;
}
.icon-badge.folder { background: #ecfeff; color: #0f766e; }
.icon-badge.doc, .icon-badge.document { background: #fef3c7; color: #b45309; }
.icon-badge.slides { background: #ffe4e6; color: #be123c; }
.icon-badge.image { background: #f3e8ff; color: #7e22ce; }
.icon-badge.video { background: #dbeafe; color: #1d4ed8; }
.card .name { margin: 0; font-weight: 700; color: var(--navy); word-break: break-word; }
.card .meta { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.card .body { flex: 1; min-width: 0; }
.chevron { color: #94a3b8; }
.video-card .thumb {
  flex: none; width: 72px; height: 48px; border-radius: 10px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #0b1f4a, #4338ca);
}

.browser-list .folder-grid,
.browser-list .file-grid { grid-template-columns: 1fr; }
.browser-list .video-card .thumb { width: 48px; height: 36px; }

.empty-state, .filter-empty {
  text-align: center; padding: 48px 16px; color: var(--muted);
}
.empty-state .title { color: var(--navy); font-weight: 700; font-size: 20px; margin-bottom: 6px; }
code { background: #eef2ff; padding: 1px 6px; border-radius: 6px; }

.search-page-form {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 8px 8px 16px; margin-bottom: 28px;
}
.search-page-form input { flex: 1; border: 0; outline: none; width: auto; }
.search-page-form button {
  border: 0; background: var(--navy); color: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 700; cursor: pointer;
}
.result-list { display: grid; gap: 8px; }
.result-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  width: 100%; text-align: left; cursor: pointer; color: inherit;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
}
.result-row:hover { border-color: #c7d2fe; box-shadow: var(--shadow); }
.result-row small { display: block; color: var(--muted); }
.result-row .meta { color: var(--muted); font-size: 13px; }

.prose { max-width: 760px; }
.prose h1 { margin: 8px 0 12px; font-size: 42px; color: var(--navy); }
.prose h2 { margin: 28px 0 8px; font-size: 22px; color: var(--navy); }
.text-link { color: var(--indigo); font-weight: 700; }

.site-footer {
  background: var(--navy); color: rgba(255,255,255,.8); padding: 48px 0 0; margin-top: auto;
}
.footer-columns { display: grid; grid-template-columns: 1.4fr .7fr .7fr .8fr; gap: 28px; padding-bottom: 36px; }
.footer-about { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; margin-bottom: 10px; }
.footer-about img { width: 36px; height: 36px; }
.footer-blurb { margin: 0; font-size: 14px; max-width: 42ch; }
.footer-heading { color: #99f6e4; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; }
.footer-links { display: grid; gap: 8px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom-inner {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 0; font-size: 13px;
}

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(7,20,51,.72); z-index: 80;
  display: grid; place-items: center; padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.modal-panel {
  width: min(1100px, 100%); background: #0b1220; color: #fff; border-radius: 20px;
  overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.4);
  max-height: calc(100vh - 32px); display: flex; flex-direction: column;
}
.modal-panel.mode-video { width: auto; max-width: min(1100px, 100%); }
.modal-header, .modal-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; flex: none; }
.modal-close {
  border: 0; background: rgba(255,255,255,.08); color: #fff; width: 36px; height: 36px;
  border-radius: 999px; cursor: pointer;
}
.modal-stage {
  background: #000; position: relative; line-height: 0;
  display: flex; align-items: center; justify-content: center;
}
.modal-stage video {
  display: block; width: min(1100px, calc(100vw - 32px)); height: auto;
  max-height: calc(100vh - 160px); background: #000; vertical-align: top;
}
.modal-stage iframe {
  width: min(1100px, 100%); height: min(70vh, 720px); border: 0; display: block; background: #111;
}
.modal-stage img {
  display: block; width: auto; height: auto; max-width: 100%;
  max-height: calc(100vh - 160px); object-fit: contain; background: #000;
}
.modal-footer .title { margin: 0; font-weight: 700; }
.modal-footer .subtitle { margin: 2px 0 0; color: #94a3b8; font-size: 13px; }
.modal-actions { display: flex; align-items: center; gap: 10px; }
.speed-control { position: relative; }
.speed-toggle, .btn {
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: #fff;
  border-radius: 999px; padding: 8px 12px; cursor: pointer; font-weight: 700;
}
.speed-menu {
  position: absolute; right: 0; bottom: 42px; background: #111827; border-radius: 12px; overflow: hidden; min-width: 88px;
}
.speed-menu button { display: block; width: 100%; border: 0; background: transparent; color: #fff; padding: 8px 12px; text-align: left; cursor: pointer; }
.speed-menu button.active, .speed-menu button:hover { background: #4338ca; }
.modal-video-error { padding: 32px; text-align: center; color: #fca5a5; }

@media (max-width: 900px) {
  .stats-grid, .mini-stats, .footer-columns { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 480px; }
  .hero-media img { object-position: 80% 40%; }
}
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; min-height: auto; padding: 10px 0; }
  .main-nav { width: 100%; justify-content: flex-start; }
}
@media (max-width: 640px) {
  .utility-bar-inner { align-items: flex-start; }
  .stats-grid, .mini-stats, .footer-columns { grid-template-columns: 1fr; }
  .brand-title { font-size: 15px; }
  .hero-inner { padding: 48px 0 72px; }
  .hero-kicker { letter-spacing: .08em; }
  .hero-kicker-extra { display: none; }
  .hero-accent { display: block; }
  .hero-subtitle { font-size: 15px; }
  .browse-hero .lede { display: none; }
  .collection-card-title { min-height: 0; }
  .hero-search {
    display: grid;
    grid-template-columns: auto 1fr;
    border-radius: 22px;
    padding: 10px;
    gap: 8px 10px;
  }
  .hero-search button { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
