:root {
    --ink: #14213d;
    --muted: #697386;
    --line: #e6eaf0;
    --soft: #f5f7fb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --body-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --display-font: "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --radius-md: 18px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --shadow-soft: 0 18px 50px rgba(15, 23, 42, .05);
    --shadow-hover: 0 28px 72px rgba(15, 23, 42, .1);
}

html {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--soft);
    color: var(--ink);
    font-family: var(--body-font);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
    line-height: 1.68;
}

a { text-decoration: none; }

.page-shell { min-height: calc(100vh - 137px); }

.page-shell .container,
.page-shell .container-fluid {
    padding-bottom: 2.75rem;
    padding-top: 1.75rem;
}

.brand-mark {
    font-family: var(--display-font);
    color: var(--ink);
    display: inline-flex;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.035em;
}

.hero-section {
    align-items: center;
    background:
        linear-gradient(90deg, rgba(8, 18, 40, .88), rgba(8, 18, 40, .28)),
        url("https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1800&q=80") center / cover;
    border-radius: 8px;
    display: flex;
    min-height: 360px;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 4rem);
}

.hero-copy {
    color: #fff;
    max-width: 720px;
}

.hero-copy h1 {
    font-family: var(--display-font);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    letter-spacing: -.05em;
    line-height: .96;
    margin-bottom: 1.05rem;
    text-wrap: balance;
}

.hero-copy p {
    color: rgba(255,255,255,.86);
    font-size: 1.2rem;
    line-height: 1.85;
    max-width: 620px;
}

.section-head {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.section-head h1,
.section-head h2 {
    font-family: var(--display-font);
    letter-spacing: -.03em;
    line-height: 1.08;
    font-weight: 800;
    margin: 0;
}

.section-head p {
    color: var(--muted);
    margin: .35rem 0 0;
}

.file-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

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

.file-card,
.panel,
.stat-card,
.auth-card,
.empty-state {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.auth-card h1 {
    font-family: var(--display-font);
    letter-spacing: -.04em;
    line-height: 1.05;
}

.file-card {
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    min-height: 220px;
    padding: 1.15rem;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.file-card:hover {
    border-color: rgba(37, 99, 235, .35);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.file-icon,
.file-detail-icon {
    align-items: center;
    background: #eaf1ff;
    border-radius: 8px;
    color: var(--primary);
    display: inline-flex;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.file-title {
    font-family: var(--display-font);
    font-weight: 800;
    line-height: 1.14;
    margin: 0;
    text-wrap: balance;
}

.file-excerpt {
    color: var(--muted);
    font-size: .94rem;
    line-height: 1.72;
    margin: 0;
}

.file-card__format {
    align-self: flex-start;
}

.file-card__meta,
.file-meta {
    display: flex;
    font-size: .88rem;
    justify-content: space-between;
    gap: .75rem;
}

.file-card__meta {
    color: var(--muted);
}

.file-card__meta span,
.file-meta span {
    min-width: 0;
}

.category-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.category-card {
    background:
        linear-gradient(180deg, rgba(37, 99, 235, .07), rgba(255, 255, 255, .98));
    border: 1px solid var(--line);
    border-radius: 20px;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    padding: 1.15rem;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.category-card:hover {
    border-color: rgba(37, 99, 235, .28);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .08);
    transform: translateY(-2px);
}

.category-card h3 {
    font-family: var(--display-font);
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    margin: .35rem 0 .5rem;
    text-wrap: balance;
}

.category-card p {
    color: var(--muted);
    margin: 0;
}

.category-card__eyebrow {
    color: var(--primary);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.category-card__action {
    align-items: center;
    color: var(--primary);
    display: inline-flex;
    gap: .35rem;
    font-size: .9rem;
    font-weight: 700;
    margin-top: 1rem;
}

.tag-pill {
    border-radius: 999px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.tag-pill:hover {
    box-shadow: 0 10px 24px rgba(37, 99, 235, .18);
    transform: translateY(-1px);
}

.search-filter-panel .form-label {
    font-size: .88rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.panel {
    padding: 1.25rem;
}

.stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.stat-card {
    padding: 1rem;
}

.stat-card span {
    color: var(--muted);
    display: block;
    font-size: .9rem;
}

.stat-card strong {
    display: block;
    font-size: 1.8rem;
    line-height: 1.2;
    margin-top: .45rem;
}

.account-hub {
    padding: 1.15rem;
}

.account-hub__grid {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.account-hub__item {
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(245, 247, 251, .96));
    border: 1px solid var(--line);
    border-radius: 18px;
    color: inherit;
    display: flex;
    gap: .85rem;
    min-height: 78px;
    padding: .85rem .95rem;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.account-hub__item:hover {
    border-color: rgba(37, 99, 235, .24);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.account-hub__item.is-active {
    background: linear-gradient(180deg, rgba(37, 99, 235, .09), rgba(255, 255, 255, .98));
    border-color: rgba(37, 99, 235, .34);
    box-shadow: 0 18px 44px rgba(37, 99, 235, .08);
}

.account-hub__icon {
    align-items: center;
    background: #eaf1ff;
    border-radius: 14px;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 44px;
    font-size: 1.08rem;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.account-hub__body {
    flex: 1 1 auto;
    min-width: 0;
}

.account-hub__body strong {
    display: block;
    font-family: var(--display-font);
    font-size: .98rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.12;
}

.account-hub__body small {
    color: var(--muted);
    display: block;
    font-size: .82rem;
    line-height: 1.35;
    margin-top: .18rem;
}

.account-hub .badge {
    align-self: flex-start;
    margin-left: auto;
}

.auth-body {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(20, 33, 61, .04)),
        var(--soft);
    display: flex;
    min-height: 100vh;
    justify-content: center;
    padding: 1rem;
}

.auth-wrap {
    max-width: 460px;
    width: 100%;
}

.auth-card {
    padding: 1.5rem;
}

.auth-card h1 {
    font-size: 1.7rem;
    font-weight: 850;
    margin-bottom: 1.25rem;
}

.auth-divider {
    align-items: center;
    color: var(--muted);
    display: flex;
    gap: .75rem;
    margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
    background: var(--line);
    content: "";
    flex: 1;
    height: 1px;
}

.auth-divider span {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.file-detail-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.file-detail-head h1 {
    font-weight: 850;
    margin-bottom: .4rem;
}

.file-detail-head p {
    color: var(--muted);
    margin-bottom: .75rem;
}

.file-detail-icon {
    flex: 0 0 64px;
    font-size: 1.8rem;
    height: 64px;
    width: 64px;
}

.comment-item {
    border-top: 1px solid var(--line);
    padding: 1rem 0 0;
}

.comment-item + .comment-item { margin-top: 1rem; }
.comment-item p { margin: .4rem 0 0; }

.empty-state {
    color: var(--muted);
    grid-column: 1 / -1;
    padding: 2rem;
    text-align: center;
}

.rich-editor {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.rich-editor-toolbar {
    background: linear-gradient(180deg, rgba(245, 247, 251, .96), rgba(255, 255, 255, .96));
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .55rem;
}

.rich-editor-toolbar .btn {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-width: 2.25rem;
    padding: .35rem .5rem;
}

.rich-editor-toolbar .btn.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.rich-editor-surface {
    background: #fff;
    border-top: 1px solid var(--line);
    cursor: text;
    display: block;
    line-height: 1.75;
    min-height: 280px;
    outline: none;
    overflow: auto;
    padding: 1rem;
    position: relative;
    white-space: pre-wrap;
    word-break: break-word;
}

.rich-editor-surface[data-empty="true"]::before {
    color: var(--muted);
    content: attr(data-placeholder);
    pointer-events: none;
}

.rich-editor-surface img,
.rich-text img {
    border-radius: 8px;
    display: block;
    height: auto;
    max-width: 100%;
}

.rich-text img {
    cursor: zoom-in;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.rich-text img:hover {
    box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
    opacity: .98;
    transform: scale(1.01);
}

.rich-editor-surface p,
.rich-text p {
    margin-bottom: 1rem;
}

.rich-editor-surface p:last-child,
.rich-text p:last-child {
    margin-bottom: 0;
}

.rich-text {
    line-height: 1.75;
}

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
    font-weight: 800;
    margin: 1.1rem 0 .65rem;
}

.rich-text ul,
.rich-text ol {
    margin-bottom: 1rem;
    padding-left: 1.35rem;
}

.rich-text blockquote {
    border-left: 4px solid var(--line);
    color: var(--muted);
    margin: 1rem 0;
    padding-left: 1rem;
}

.file-description {
    max-width: 100%;
}

.upload-dropzone {
    align-items: center;
    background:
        linear-gradient(180deg, rgba(37, 99, 235, .08), rgba(255, 255, 255, .96));
    border: 1px dashed rgba(37, 99, 235, .28);
    border-radius: 14px;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    gap: .9rem;
    justify-content: space-between;
    padding: 1rem;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus-visible {
    border-color: rgba(37, 99, 235, .55);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.upload-dropzone.is-dragover {
    background:
        linear-gradient(180deg, rgba(37, 99, 235, .14), rgba(255, 255, 255, .98));
    border-color: var(--primary);
    box-shadow: 0 18px 44px rgba(37, 99, 235, .16);
}

.upload-dropzone__icon {
    align-items: center;
    background: #eaf1ff;
    border-radius: 12px;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 56px;
    font-size: 1.6rem;
    height: 56px;
    justify-content: center;
    width: 56px;
}

.upload-dropzone__content {
    flex: 1 1 auto;
    min-width: 0;
}

.upload-dropzone__title {
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.25;
}

.upload-dropzone__text {
    color: var(--muted);
    margin-top: .2rem;
}

.upload-dropzone__button {
    align-self: center;
    flex: 0 0 auto;
}

.image-lightbox {
    align-items: center;
    background: rgba(15, 23, 42, .92);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    transition: opacity .18s ease;
    z-index: 3000;
}

.image-lightbox[hidden] {
    display: none !important;
}

.image-lightbox:not([hidden]) {
    opacity: 0;
}

.image-lightbox.is-open {
    opacity: 1;
}

.image-lightbox__backdrop {
    inset: 0;
    position: absolute;
}

.image-lightbox__inner {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-width: min(96vw, 1400px);
    position: relative;
    width: 100%;
    z-index: 1;
}

.image-lightbox__img {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 32px 96px rgba(0, 0, 0, .4);
    max-height: calc(100vh - 7rem);
    max-width: 100%;
    object-fit: contain;
    width: auto;
}

.image-lightbox__caption {
    color: rgba(255, 255, 255, .82);
    font-size: .95rem;
    max-width: 100%;
    text-align: center;
}

.image-lightbox__close {
    align-items: center;
    background: rgba(255, 255, 255, .14);
    border: 0;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    height: 2.5rem;
    justify-content: center;
    position: absolute;
    right: 0;
    top: -3rem;
    width: 2.5rem;
}

.image-lightbox__close:hover {
    background: rgba(255, 255, 255, .22);
}

body.image-lightbox-open {
    overflow: hidden;
}

.upload-files-summary {
    background:
        linear-gradient(180deg, rgba(37, 99, 235, .05), rgba(255, 255, 255, .96));
    border: 1px dashed rgba(37, 99, 235, .24);
    border-radius: 8px;
    padding: 1rem;
}

.upload-files-summary.is-empty {
    color: var(--muted);
}

.upload-files-summary ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.upload-files-summary li {
    align-items: center;
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    padding: .55rem .75rem;
}

.upload-files-summary li + li {
    margin-top: .5rem;
}

.upload-files-summary .file-info {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: .65rem;
    min-width: 0;
}

.upload-files-summary .file-name {
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-word;
}

.upload-files-summary .file-size,
.upload-files-summary .file-more {
    color: var(--muted);
    white-space: nowrap;
}

.upload-files-summary .file-remove {
    flex: 0 0 auto;
    padding-left: .45rem;
    padding-right: .45rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Modern resource-share redesign overrides */
body {
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, .08), transparent 30%),
        radial-gradient(circle at right top, rgba(14, 165, 233, .05), transparent 22%),
        var(--soft);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.page-shell .container {
    padding-bottom: 2.5rem;
    padding-top: 1.5rem;
}

.panel,
.file-card,
.stat-card,
.auth-card,
.empty-state {
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .06);
}

.panel {
    padding: 1.35rem;
}

.navbar.site-navbar {
    background: rgba(255, 255, 255, .84)!important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, .9)!important;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .05);
}

.navbar.site-navbar .navbar-brand {
    font-family: var(--display-font);
    letter-spacing: -.03em;
}

.navbar.site-navbar .nav-link {
    color: var(--ink);
    font-weight: 600;
}

.navbar.site-navbar .nav-link:hover,
.navbar.site-navbar .nav-link:focus {
    color: var(--primary);
}

.navbar.site-navbar .site-navbar__actions {
    flex-wrap: wrap;
}

.navbar.site-navbar .site-navbar__action,
.navbar.site-navbar .site-navbar__action-button {
    align-items: center;
    display: inline-flex;
    gap: .45rem;
    justify-content: center;
    white-space: nowrap;
}

.navbar.site-navbar .site-navbar__action {
    border-radius: 999px;
    color: var(--ink);
    font-weight: 700;
    padding: .42rem .72rem;
}

.navbar.site-navbar .site-navbar__action:hover,
.navbar.site-navbar .site-navbar__action:focus {
    background: rgba(37, 99, 235, .07);
    color: var(--primary);
}

.navbar.site-navbar .site-navbar__action i,
.navbar.site-navbar .site-navbar__action-button i {
    font-size: .95rem;
    line-height: 1;
}

.navbar.site-navbar .site-navbar__action .badge {
    margin-left: .1rem;
}

.navbar.site-navbar .site-navbar__action-button {
    border-radius: 999px;
}

.navbar.site-navbar .btn,
.navbar.site-navbar .input-group-text,
.navbar.site-navbar .form-control {
    border-radius: 999px;
}

.navbar.site-navbar .form-control {
    min-height: 2.85rem;
}

.navbar.site-navbar .form-control::placeholder {
    color: #94a3b8;
}

.section-head {
    border-left: 4px solid var(--primary);
    padding-left: .85rem;
}

.section-head h1,
.section-head h2 {
    font-size: 1.4rem;
    letter-spacing: -.02em;
}

.section-head__link {
    align-items: center;
    color: var(--primary);
    display: inline-flex;
    font-weight: 700;
    gap: .35rem;
}

.section-head__link:hover {
    color: var(--primary-dark);
}

.home-hero {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    isolation: isolate;
    padding: .75rem 0 0;
    position: relative;
    z-index: 2;
}

.home-hero::before {
    background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(37, 99, 235, 0) 42%, rgba(15, 23, 42, .03));
    border-radius: 28px;
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

.home-hero__copy {
    padding-top: .25rem;
}

.home-hero__copy h1 {
    font-family: var(--display-font);
    font-size: clamp(2.2rem, 4vw, 4rem);
    font-weight: 900;
    letter-spacing: -.05em;
    line-height: .9;
    margin-bottom: .7rem;
    text-wrap: balance;
}

.home-hero__copy p {
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.6;
    max-width: 620px;
}

.home-stats-carousel {
    margin-top: 1.25rem;
    max-width: 590px;
    padding-bottom: 2.25rem;
    position: relative;
}

.home-stats-carousel__viewport {
    min-height: 178px;
    position: relative;
}

.home-stat-card {
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    inset: 0;
    opacity: 0;
    overflow: hidden;
    padding: 1rem 1.1rem 1.05rem;
    pointer-events: none;
    position: absolute;
    transform: translate3d(0, 10px, 0) scale(.985);
    transition: transform .4s ease, opacity .4s ease, box-shadow .4s ease, border-color .4s ease;
    width: 100%;
}

.home-stat-card.is-active {
    box-shadow: var(--shadow-hover);
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
    z-index: 3;
}

.home-stat-card.is-next {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(.985);
    z-index: 1;
}

.home-stat-card.is-prev {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(.985);
    z-index: 1;
}

.home-stat-card__head {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: .85rem;
    margin-bottom: 1rem;
}

.home-stat-card__icon {
    align-items: center;
    border-radius: 20px;
    display: inline-flex;
    font-size: 1.2rem;
    height: 50px;
    justify-content: center;
    width: 50px;
}

.home-stat-card__icon--primary {
    background: linear-gradient(180deg, rgba(37, 99, 235, .14), rgba(37, 99, 235, .05));
    color: var(--primary);
}

.home-stat-card__icon--indigo {
    background: linear-gradient(180deg, rgba(79, 70, 229, .14), rgba(79, 70, 229, .05));
    color: #4f46e5;
}

.home-stat-card__icon--violet {
    background: linear-gradient(180deg, rgba(124, 58, 237, .14), rgba(124, 58, 237, .05));
    color: #7c3aed;
}

.home-stat-card strong {
    color: var(--ink);
    display: block;
    font-family: var(--display-font);
    font-size: clamp(1.9rem, 2vw, 2.2rem);
    font-weight: 900;
    letter-spacing: -.05em;
    line-height: 1;
    margin-bottom: .2rem;
}

.home-stat-card h3 {
    font-family: var(--display-font);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.12;
    margin: 0 0 .42rem;
    text-wrap: balance;
}

.home-stat-card p {
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
    max-width: 34ch;
}

.home-stats-carousel__controls {
    align-items: center;
    display: flex;
    gap: .7rem;
    margin-top: .75rem;
}

.home-stats-carousel__arrow {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    height: 2.4rem;
    justify-content: center;
    width: 2.4rem;
}

.home-stats-carousel__dots {
    align-items: center;
    display: flex;
    flex: 1;
    gap: .45rem;
    justify-content: center;
}

.home-stats-carousel__dot {
    background: var(--line);
    border: 0;
    border-radius: 999px;
    height: 8px;
    padding: 0;
    transition: width .2s ease, background-color .2s ease, transform .2s ease;
    width: 8px;
}

.home-stats-carousel__dot.is-active {
    background: var(--primary);
    transform: scale(1.08);
    width: 22px;
}

.home-hero__visual {
    align-self: start;
    margin-top: -30px;
}

.hero-carousel {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: .1rem 0 .35rem;
    position: relative;
}

.hero-carousel__viewport {
    min-height: 136px;
    overflow: visible;
    position: relative;
    transition: height .35s ease;
}

.hero-carousel__slide {
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transform: translate3d(0, 14px, 0) scale(.985);
    transition:
        opacity .46s cubic-bezier(.22, .61, .36, 1),
        transform .46s cubic-bezier(.22, .61, .36, 1),
        box-shadow .32s ease,
        border-color .32s ease;
    will-change: transform, opacity;
    width: 100%;
}

.hero-carousel[data-hero-carousel-direction="next"] .hero-carousel__slide:not(.is-active) {
    transform: translate3d(18px, 14px, 0) scale(.985);
}

.hero-carousel[data-hero-carousel-direction="prev"] .hero-carousel__slide:not(.is-active) {
    transform: translate3d(-18px, 14px, 0) scale(.985);
}

.hero-carousel__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
    z-index: 2;
}

.hero-carousel__controls {
    align-items: center;
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(37, 99, 235, .1);
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
    display: flex;
    gap: .45rem;
    justify-content: space-between;
    margin: .7rem auto 0;
    max-width: 18rem;
    padding: .28rem .4rem;
    position: static;
    width: 100%;
    z-index: 3;
    backdrop-filter: blur(16px);
}

.hero-carousel__arrow {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    height: 1.9rem;
    justify-content: center;
    width: 1.9rem;
}

.hero-carousel__dots {
    align-items: center;
    display: flex;
    flex: 1;
    gap: .45rem;
    justify-content: center;
}

.hero-carousel__dot {
    background: var(--line);
    border: 0;
    border-radius: 999px;
    height: 8px;
    padding: 0;
    transition: width .2s ease, background-color .2s ease, transform .2s ease;
    width: 8px;
}

.hero-carousel__dot.is-active {
    background: var(--primary);
    transform: scale(1.08);
    width: 22px;
}

.hero-stack {
    display: grid;
    gap: .9rem;
    padding-top: .5rem;
    position: relative;
}

.hero-resource {
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    color: inherit;
    display: block;
    padding: .8rem .9rem;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.hero-resource:hover {
    border-color: rgba(37, 99, 235, .28);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.hero-resource--featured {
    min-height: 124px;
    padding-bottom: .7rem;
    position: relative;
    z-index: 2;
}

.hero-carousel__card-link {
    border-radius: inherit;
    inset: 0;
    display: block;
    position: absolute;
    z-index: 1;
}

.hero-resource--mini {
    margin-left: 2.5rem;
    min-height: 102px;
    position: relative;
}

.hero-resource--mini-1 {
    margin-left: 4.5rem;
}

.hero-resource__top,
.hero-resource__mini-top {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.hero-resource h3 {
    font-family: var(--display-font);
    font-size: 1.2rem;
    font-weight: 850;
    letter-spacing: -.045em;
    line-height: 1.1;
    margin: .26rem 0 .12rem;
    text-wrap: balance;
}

.hero-resource h4 {
    font-family: var(--display-font);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.12;
    margin: .9rem 0 .35rem;
    text-wrap: balance;
}

.hero-resource p {
    color: var(--muted);
    line-height: 1.52;
    margin: 0;
}

.hero-resource__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .35rem;
}

.hero-resource__chips span {
    background: rgba(37, 99, 235, .07);
    border-radius: 999px;
    color: var(--primary);
    font-size: .82rem;
    font-weight: 700;
    padding: .3rem .6rem;
}

.hero-resource__footer,
.hero-resource__mini-footer {
    align-items: center;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .82rem;
    gap: .55rem .75rem;
    justify-content: space-between;
    margin-top: .25rem;
    padding-top: .25rem;
}

.hero-resource__price {
    color: var(--primary);
    font-weight: 800;
}

.hero-resource__mini-top .file-resource-tile {
    transform: scale(.88);
    transform-origin: left top;
}

.hero-resource__more {
    align-items: center;
    color: var(--primary);
    display: inline-flex;
    gap: .35rem;
    font-weight: 700;
    justify-content: flex-end;
    margin-top: .25rem;
    width: 100%;
}

.home-discovery-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(250, 252, 255, .96));
    border: 1px solid rgba(37, 99, 235, .12);
    margin-top: .5rem;
    position: relative;
    z-index: 4;
}

.home-discovery-panel__header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.home-discovery-panel__grid {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, .85fr) minmax(0, 1.55fr) minmax(180px, .7fr);
}

.home-discovery-panel__search .input-group-text,
.home-discovery-panel__search .form-control,
.home-discovery-panel__search .btn {
    border-radius: 999px;
}

.home-discovery-panel__search .form-control {
    min-height: 3.1rem;
}

.home-discovery-panel__filters {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
    min-height: 3.1rem;
}

.search-chip {
    align-items: center;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    display: inline-flex;
    font-weight: 600;
    padding: .52rem .85rem;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.search-chip--active {
    background: rgba(37, 99, 235, .08);
    border-color: rgba(37, 99, 235, .25);
    color: var(--primary);
}

.search-chip:hover {
    border-color: rgba(37, 99, 235, .3);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.search-chip--soft {
    background: rgba(37, 99, 235, .06);
    border-color: rgba(37, 99, 235, .12);
    color: var(--primary);
}

.home-discovery-panel__sort .form-label {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.home-discovery-panel__sort .form-select {
    border-radius: 999px;
    min-height: 3.1rem;
}

.file-card--resource {
    gap: .9rem;
    min-height: 260px;
    padding: 1.15rem;
}

.file-card__top {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.file-card__badge-stack {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.file-resource-tile {
    align-items: center;
    background: linear-gradient(180deg, rgba(37, 99, 235, .08), rgba(37, 99, 235, .03));
    border-radius: 22px;
    color: var(--primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 84px;
    min-width: 84px;
    padding: .75rem;
    text-align: center;
}

.file-resource-tile i {
    font-size: 1.65rem;
    line-height: 1;
}

.file-resource-tile span {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    margin-top: .25rem;
}

.file-resource-tile--blue {
    background: linear-gradient(180deg, rgba(37, 99, 235, .16), rgba(37, 99, 235, .06));
    color: #1d4ed8;
}

.file-resource-tile--red {
    background: linear-gradient(180deg, rgba(239, 68, 68, .16), rgba(239, 68, 68, .06));
    color: #dc2626;
}

.file-resource-tile--green {
    background: linear-gradient(180deg, rgba(22, 163, 74, .16), rgba(22, 163, 74, .06));
    color: #16a34a;
}

.file-resource-tile--amber {
    background: linear-gradient(180deg, rgba(245, 158, 11, .18), rgba(245, 158, 11, .06));
    color: #d97706;
}

.file-resource-tile--teal {
    background: linear-gradient(180deg, rgba(14, 116, 144, .16), rgba(14, 116, 144, .06));
    color: #0f766e;
}

.file-resource-tile--slate {
    background: linear-gradient(180deg, rgba(51, 65, 85, .14), rgba(51, 65, 85, .05));
    color: #334155;
}

.file-card__body {
    flex: 1 1 auto;
}

.file-card__footer {
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding-top: 1rem;
}

.file-card__stats,
.file-card__meta {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: .75rem;
}

.file-card__stats {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.file-card__meta {
    color: var(--muted);
    font-size: .84rem;
    font-variant-numeric: tabular-nums;
}

.file-card__meta span:last-child {
    text-align: right;
}

.file-title {
    font-size: 1.08rem;
}

.file-excerpt {
    font-size: .92rem;
    line-height: 1.65;
}

.file-grid--compact.file-grid--scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: .25rem;
    scroll-snap-type: x proximity;
}

.file-grid--compact.file-grid--scroll .file-card {
    flex: 0 0 240px;
    min-width: 240px;
    scroll-snap-align: start;
}

.collection-hero {
    align-items: flex-start;
    background: linear-gradient(180deg, rgba(37, 99, 235, .07), rgba(255, 255, 255, 1));
    display: grid;
    gap: 1.15rem;
    grid-template-columns: 104px minmax(0, 1fr) minmax(260px, 320px);
}

.collection-hero__tile {
    min-height: 104px;
    min-width: 104px;
}

.collection-hero__body h1 {
    font-family: var(--display-font);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -.05em;
    line-height: 1.01;
    margin-bottom: .6rem;
    text-wrap: balance;
}

.collection-hero__body > p {
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.82;
    margin-bottom: .95rem;
    max-width: 900px;
}

.collection-hero__eyebrow {
    color: var(--primary);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    margin-bottom: .45rem;
    text-transform: uppercase;
}

.collection-hero__stats {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.collection-hero__stats--stacked {
    grid-template-columns: 1fr;
}

.collection-hero__stat {
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: .95rem 1rem;
}

.collection-hero__stat span {
    color: var(--muted);
    display: block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    margin-bottom: .2rem;
    text-transform: uppercase;
}

.collection-hero__stat strong {
    font-variant-numeric: tabular-nums;
    display: block;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.uploader-profile-card {
    background: linear-gradient(180deg, rgba(37, 99, 235, .05), rgba(255, 255, 255, 1));
}

.uploader-profile-card hr {
    border-color: var(--line);
    opacity: 1;
}

.uploader-meta dt {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.uploader-meta dd {
    font-size: .95rem;
    margin-bottom: .5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.uploader-bio {
    color: var(--muted);
    line-height: 1.82;
}

.file-hero {
    align-items: flex-start;
    background: linear-gradient(180deg, rgba(37, 99, 235, .06), rgba(255, 255, 255, 1));
    display: grid;
    gap: 1.15rem;
    grid-template-columns: 104px minmax(0, 1fr);
}

.file-hero__icon {
    min-height: 104px;
    min-width: 104px;
}

.file-hero__body h1 {
    font-family: var(--display-font);
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 900;
    letter-spacing: -.05em;
    line-height: 1.01;
    margin-bottom: .6rem;
    text-wrap: balance;
}

.file-hero__body > p {
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.82;
    margin-bottom: .95rem;
    max-width: 920px;
}

.file-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.file-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.file-info-panel dl dt {
    color: var(--muted);
    font-weight: 700;
}

.file-info-panel dl dd {
    margin-bottom: .65rem;
}

.file-info-panel dl dd:last-child {
    margin-bottom: 0;
}

.file-description-panel .rich-text {
    max-width: 100%;
}

.file-side-card .alert:last-child {
    margin-bottom: 0;
}

.file-points-card {
    background: linear-gradient(180deg, rgba(37, 99, 235, .05), rgba(255, 255, 255, .98));
    border: 1px solid rgba(37, 99, 235, .14);
}

.share-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.share-links__item {
    align-items: center;
    background: rgba(255, 255, 255, .98);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    display: inline-flex;
    height: 2.55rem;
    justify-content: center;
    width: 2.55rem;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.share-links__item:hover {
    border-color: rgba(37, 99, 235, .3);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
    color: var(--primary);
    transform: translateY(-1px);
}

.share-links__item i {
    font-size: 1rem;
}

.panel--table {
    padding: 1.1rem 1.2rem;
}

.panel--table table thead th {
    border-bottom-color: var(--line);
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.panel--table table tbody td {
    padding-bottom: .95rem;
    padding-top: .95rem;
    font-variant-numeric: tabular-nums;
}

.panel--table a {
    color: inherit;
    font-weight: 700;
}

.panel--table a:hover {
    color: var(--primary);
}

@media (min-width: 992px) {
    .home-hero__copy h1 {
        font-size: clamp(2.05rem, 3.55vw, 3.55rem);
        line-height: .94;
        margin-bottom: .65rem;
    }

    .home-hero__copy p {
        font-size: .92rem;
        line-height: 1.62;
    }

    .hero-resource h3 {
        font-size: 1.08rem;
        line-height: 1.08;
    }

    .hero-resource p {
        font-size: .9rem;
        line-height: 1.48;
    }

    .hero-resource__chips span {
        font-size: .75rem;
        padding: .24rem .52rem;
    }

    .hero-resource__footer,
    .hero-resource__mini-footer {
        font-size: .78rem;
        gap: .5rem .8rem;
    }

    .home-discovery-panel {
        padding: 1.1rem 1.15rem;
    }

    .home-discovery-panel__header {
        margin-bottom: .95rem;
    }

    .home-discovery-panel__header h2 {
        font-size: 1.1rem;
        line-height: 1.15;
    }

    .home-discovery-panel__header p {
        font-size: .92rem;
        line-height: 1.5;
        max-width: 52ch;
    }

    .home-discovery-panel__search .input-group-text,
    .home-discovery-panel__search .form-control,
    .home-discovery-panel__search .btn {
        font-size: .94rem;
    }

    .home-discovery-panel__search .form-control {
        min-height: 3rem;
    }

    .search-chip {
        font-size: .86rem;
        padding: .48rem .8rem;
    }

    .home-discovery-panel__sort .form-label {
        font-size: .72rem;
        letter-spacing: .045em;
    }

    .home-discovery-panel__sort .form-select {
        font-size: .94rem;
        min-height: 3rem;
    }
}

@media (max-width: 991.98px) {
    .home-hero,
    .file-hero,
    .collection-hero {
        grid-template-columns: 1fr;
    }

    .hero-resource--mini,
    .hero-resource--mini-1 {
        margin-left: 0;
    }

    .collection-hero__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-discovery-panel__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .home-hero__copy h1 {
        font-size: 2.4rem;
    }

    .file-hero__icon {
        min-height: 84px;
        min-width: 84px;
    }

    .file-grid--compact.file-grid--scroll .file-card {
        flex-basis: 220px;
        min-width: 220px;
    }

    .collection-hero__tile {
        min-height: 84px;
        min-width: 84px;
    }
}

@media (max-width: 767.98px) {
    .page-shell .container {
        padding-bottom: 1.5rem;
        padding-top: 1rem;
    }

    .panel,
    .file-card,
    .stat-card,
    .auth-card,
    .empty-state {
        border-radius: 16px;
    }

    .panel {
        padding: 1rem;
    }

    .navbar.site-navbar .container {
        gap: .75rem;
    }

    .navbar.site-navbar .navbar-brand {
        font-size: 1.05rem;
    }

    .navbar.site-navbar .navbar-toggler {
        align-items: center;
        background: rgba(255, 255, 255, .9);
        border-color: rgba(20, 33, 61, .12);
        border-radius: 14px;
        display: inline-flex;
        box-shadow: none;
        justify-content: center;
        min-height: 2.5rem;
        min-width: 2.75rem;
        padding: .45rem .6rem;
    }

    .navbar.site-navbar .navbar-toggler:focus {
        box-shadow: 0 0 0 .15rem rgba(37, 99, 235, .14);
    }

    .navbar.site-navbar .navbar-toggler i {
        color: var(--ink);
        font-size: 1.45rem;
        line-height: 1;
        transform: translateY(-1px);
    }

    .navbar.site-navbar .navbar-toggler-icon {
        background-position: center;
        background-repeat: no-repeat;
        background-size: 1.2rem 1.2rem;
        opacity: .88;
    }

    .navbar.site-navbar .navbar-toggler-symbol {
        color: var(--ink);
        font-size: 1.45rem;
        line-height: 1;
        transform: translateY(-1px);
    }

    .navbar.site-navbar .navbar-collapse {
        padding: .75rem 0 1rem;
    }

    .navbar.site-navbar .navbar-nav {
        align-items: stretch;
        gap: .5rem !important;
        width: 100%;
    }

    .navbar.site-navbar .nav-item,
    .navbar.site-navbar .nav-link,
    .navbar.site-navbar .btn {
        width: 100%;
    }

    .navbar.site-navbar .nav-link,
    .navbar.site-navbar .btn {
        justify-content: center;
        text-align: center;
    }

    .navbar.site-navbar form[role="search"] {
        margin-left: 0 !important;
        width: 100%;
    }

    .navbar.site-navbar .input-group {
        width: 100%;
    }

    .account-hub {
        padding: 1rem;
    }

    .account-hub__grid {
        gap: .7rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-hub__item {
        min-height: 72px;
        padding: .8rem .85rem;
    }

    .account-hub__body strong {
        font-size: .94rem;
    }

    .account-hub__body small {
        font-size: .78rem;
    }

    .home-hero {
        gap: 1rem;
        padding-top: .5rem;
    }

    .home-hero::before {
        border-radius: 20px;
    }

    .home-hero__copy {
        padding-top: 0;
    }

    .home-hero__copy h1 {
        font-size: clamp(2rem, 9vw, 2.7rem);
        line-height: 1.02;
        margin-bottom: .75rem;
    }

    .home-hero__copy p {
        font-size: .98rem;
        line-height: 1.65;
    }

    .home-hero__actions {
        display: grid !important;
        gap: .65rem !important;
    }

    .home-hero__actions .btn {
        justify-content: center;
        width: 100%;
    }

    .home-hero__visual {
        margin-top: .25rem;
    }

    .hero-carousel {
        gap: .6rem;
        padding-top: 0;
    }

    .hero-carousel__viewport {
        min-height: 242px;
    }

    .hero-carousel__controls {
        gap: .45rem;
        left: .7rem;
        right: .7rem;
        bottom: .7rem;
        max-width: none;
        padding: .32rem .45rem;
    }

    .hero-carousel__arrow {
        height: 2.25rem;
        width: 2.25rem;
    }

    .hero-resource {
        padding: .9rem;
    }

    .hero-resource--featured {
        min-height: auto;
        padding-bottom: .6rem;
    }

    .hero-resource__top {
        align-items: flex-start;
        flex-direction: column;
        gap: .55rem;
    }

    .hero-resource h3 {
        font-size: 1.03rem;
        line-height: 1.08;
    }

    .hero-resource h4 {
        font-size: .96rem;
    }

    .hero-resource p {
        display: -webkit-box;
        font-size: .86rem;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        line-height: 1.42;
        overflow: hidden;
    }

    .hero-resource__chips {
        gap: .3rem;
        margin-top: .3rem;
    }

    .hero-resource__chips span {
        font-size: .72rem;
        padding: .24rem .5rem;
    }

    .hero-resource__footer,
    .hero-resource__mini-footer {
        gap: .45rem .7rem;
    }

    .hero-carousel__controls {
        gap: .3rem;
        margin-top: .55rem;
        max-width: 15rem;
        padding: .22rem .35rem;
    }

    .hero-carousel__arrow {
        height: 1.75rem;
        width: 1.75rem;
    }

    .hero-carousel__dots {
        gap: .3rem;
    }

    .hero-carousel__dot {
        height: 6px;
        width: 6px;
    }

    .hero-carousel__dot.is-active {
        width: 18px;
    }

    .home-discovery-panel {
        padding: .82rem;
        margin-top: 0;
    }

    .home-discovery-panel__header {
        display: block;
        margin-bottom: .7rem;
    }

    .home-discovery-panel__header .btn {
        margin-top: .35rem;
        font-size: .82rem;
        padding: .38rem .6rem;
    }

    .home-discovery-panel__header h2 {
        font-size: 1rem;
        line-height: 1.15;
    }

    .home-discovery-panel__header p {
        font-size: .86rem;
        line-height: 1.45;
    }

    .home-discovery-panel__search .input-group {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .home-discovery-panel__search .input-group-text {
        border-radius: 18px 0 0 18px;
        border-right: 0;
        font-size: .9rem;
        justify-content: center;
        flex: 0 0 auto;
        min-width: 3rem;
    }

    .home-discovery-panel__search .form-control {
        border-left: 0 !important;
        border-radius: 0;
        font-size: .9rem;
        flex: 1 1 auto;
        min-height: 3rem;
        min-width: 0;
    }

    .home-discovery-panel__search .btn {
        border-radius: 0 18px 18px 0;
        font-size: .9rem;
        flex: 0 0 auto;
        min-width: 5.8rem;
        width: auto;
    }

    .home-discovery-panel__filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: .25rem;
        scrollbar-width: none;
    }

    .home-discovery-panel__filters::-webkit-scrollbar {
        display: none;
    }

    .search-chip {
        flex: 0 0 auto;
        font-size: .88rem;
        padding: .42rem .72rem;
        white-space: nowrap;
    }

    .home-discovery-panel__sort .form-label {
        font-size: .7rem;
        line-height: 1.15;
    }

    .home-discovery-panel__sort .form-select {
        font-size: .9rem;
        min-height: 2.8rem;
    }

    .section-head {
        display: block;
    }

    .section-head__link {
        margin-top: .35rem;
    }

    .panel--table {
        padding: .95rem;
    }

    .panel--table table thead th,
    .panel--table table tbody td {
        font-size: .88rem;
        padding-bottom: .75rem;
        padding-top: .75rem;
    }

    .file-hero {
        gap: .8rem;
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .file-hero__icon {
        align-self: flex-start;
        min-height: 72px;
        min-width: 72px;
    }

    .file-hero__body h1 {
        font-size: clamp(1.7rem, 7vw, 2.2rem);
    }

    .file-hero__body > p {
        font-size: .97rem;
    }

    .file-meta-strip .badge {
        font-size: .76rem;
        line-height: 1.2;
    }

    .file-tag-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: .25rem;
        scrollbar-width: none;
    }

    .file-tag-row::-webkit-scrollbar {
        display: none;
    }

    .tag-pill {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .file-detail-layout {
        display: flex;
        flex-direction: column;
    }

    .file-detail-layout > .col-lg-4 {
        order: -1;
    }

    .file-detail-layout > .col-lg-8,
    .file-detail-layout > .col-lg-4 {
        width: 100%;
    }

    .file-side-card .btn,
    .file-side-card .btn-outline-warning,
    .file-side-card .btn-primary,
    .file-side-card .btn-outline-dark,
    .file-side-card .btn-outline-danger {
        width: 100%;
    }

    .collection-hero {
        gap: .9rem;
        padding: 1rem;
    }

    .collection-hero__body h1 {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
    }

    .collection-hero__body > p {
        font-size: .97rem;
    }

    .collection-hero__stats {
        grid-template-columns: 1fr;
    }

    .collection-hero__stat strong {
        font-size: 1.22rem;
    }

    .share-links {
        justify-content: flex-start;
    }

    .share-links__item {
        height: 42px;
        width: 42px;
    }

    .file-grid--compact.file-grid--scroll {
        gap: .75rem;
        margin-right: -1rem;
        padding-right: 1rem;
    }

    .file-grid--compact.file-grid--scroll .file-card {
        flex-basis: 190px;
        min-width: 190px;
    }
}

@media (max-width: 575.98px) {
    .page-shell .container {
        padding-inline: .85rem;
    }

    .navbar.site-navbar .container {
        padding-left: .85rem;
        padding-right: .85rem;
    }

    .navbar.site-navbar .form-control {
        min-height: 2.75rem;
    }

    .home-hero__copy h1 {
        font-size: clamp(1.6rem, 7.4vw, 1.95rem);
    }

    .home-discovery-panel {
        padding: .9rem;
    }

    .home-discovery-panel__header {
        margin-bottom: .8rem;
    }

    .home-discovery-panel__grid {
        gap: .75rem;
    }

    .home-discovery-panel__filters {
        gap: .5rem;
    }

    .hero-resource__footer,
    .hero-resource__mini-footer {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: .25rem .4rem;
        justify-content: space-between;
        font-size: .72rem;
    }

    .hero-resource__footer > span,
    .hero-resource__mini-footer > span {
        white-space: nowrap;
    }

    .hero-resource__more {
        justify-content: flex-start;
    }

    .file-hero__icon {
        min-height: 64px;
        min-width: 64px;
    }

    .file-info-panel dl dt,
    .file-info-panel dl dd {
        font-size: .93rem;
    }

    .file-info-panel dl dt {
        flex: 0 0 100%;
        margin-bottom: .15rem;
    }

    .file-info-panel dl dd {
        margin-left: 0;
    }

    .file-description-panel .rich-text img {
        border-radius: 12px;
        height: auto;
        max-width: 100%;
    }
}
