﻿:root {
  --portal-ink: #0f172a;
  --portal-muted: #52607a;
  --portal-border: #d9e1ef;
  --portal-card: #ffffff;
  --portal-accent: #1f6feb;
  --portal-accent-2: #0ea5a4;
}

body {
  color: var(--portal-ink);
  background: #f3f6fb;
}

.portal-shell {
  max-width: 1500px;
}

.portal-hero { background: transparent; color: inherit; }

.hero-kicker {
  letter-spacing: .12em;
  opacity: .8;
}

.hero-sub {
  opacity: .88;
}

.portal-tools .search-box {
  width: min(360px, 80vw);
  border: 0;
}

.category-sidebar {
  top: 1rem;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.category-pill {
  border: 1px solid var(--portal-border);
  background: #fff;
  color: var(--portal-ink);
}

.category-pill.active {
  background: #e8f0ff;
  border-color: #b4ccff;
}

.file-card {
  border: 1px solid var(--portal-border) !important;
  background: var(--portal-card);
  transition: transform .15s ease, box-shadow .15s ease;
}

.file-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(30, 41, 59, .08) !important;
}

.table-skin {
  border: 1px solid var(--portal-border);
}

.table-skin thead th {
  color: var(--portal-muted);
  font-weight: 600;
}

.selection-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--portal-border);
  z-index: 999;
  max-height: 46vh;
  overflow-y: auto;
}

.turnstile-inline {
  min-width: 300px;
}

#turnstile-container {
  min-height: 65px;
}

@media (max-width: 991.98px) {
  .category-sidebar {
    position: static !important;
  }

  .selection-bar {
    padding-bottom: 1rem;
  }

  .turnstile-inline {
    width: 100%;
    min-width: 100%;
  }

  .selection-bar-content {
    align-items: stretch !important;
  }

  .selection-bar .d-flex.gap-2 {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .header-brand {
    display: grid !important;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "menu logo"
      "menu text";
    align-items: center;
    column-gap: .75rem;
    row-gap: .2rem;
  }

  .mobile-menu-btn {
    grid-area: menu;
    align-self: start;
    margin-top: .1rem;
  }

  .brand-logo-v2 {
    grid-area: logo;
    width: 120px;
  }

  .header-text {
    grid-area: text;
  }

  .portal-title {
    font-size: 1rem;
    line-height: 1.15;
  }
}

.tree-root,
.tree-root ul {
  list-style: none;
  margin: 0;
  padding-left: 1rem;
}

.tree-node {
  margin: .2rem 0;
  position: relative;
}

.tree-label {
  font-size: .85rem;
  color: #4b5563;
}

.tree-node::before {
  content: "";
  position: absolute;
  left: -.65rem;
  top: .8rem;
  width: .45rem;
  border-top: 1px solid #cbd5e1;
}



.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 1100;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: min(86vw, 360px);
  height: 100vh;
  overflow-y: auto;
  background: #fff;
  padding: 1rem;
  z-index: 1101;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
.hero-kicker { font-weight: 600; }
.portal-hero h1 { font-weight: 700; letter-spacing: -0.02em; }
.tree-link { background: transparent; border: 0; padding: 0; color: #4b5563; font-size: .85rem; text-align: left; }
.tree-link.active { color: #111827; font-weight: 600; }

.brand-logo {
  width: 170px;
  max-width: 48vw;
  height: auto;
  display: block;
}

.portal-header-v2 {
  background: #ffffff;
  border: 1px solid #dbe2ea;
}

.brand-logo-v2 {
  width: 110px;
  height: auto;
}

.portal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
}

.portal-subtitle {
  font-size: .95rem;
  color: #6b7280;
}

.search-box {
  width: min(360px, 70vw);
}

.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}

.download-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, .35);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.download-loading-card {
  width: min(92vw, 360px);
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #dbe2ea;
  padding: 1.1rem 1rem 1rem;
  text-align: center;
  animation: loading-card-in .22s ease-out;
}

.download-loading-logo {
  width: 88px;
  height: auto;
  display: block;
  margin: 0 auto .55rem;
  opacity: .95;
}

.download-loading-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto .75rem;
  border-radius: 999px;
  border: 4px solid #dbeafe;
  border-top-color: #2563eb;
  animation: spin .8s linear infinite;
}

.download-loading-title {
  font-weight: 700;
  color: #111827;
  font-size: 1rem;
}

.download-loading-subtitle {
  color: #6b7280;
  margin-top: .25rem;
  font-size: .95rem;
}

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

@keyframes loading-card-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

