.odm-directory,
.odm-subject-page {
    --odm-ink: #182230;
    --odm-muted: #667085;
    --odm-line: #e7eaf0;
    --odm-soft: #f6f8fb;
    --odm-accent: #3458d4;
    --odm-accent-dark: #2445b5;
    color: var(--odm-ink);
    font-family: inherit;
    width: 100%;
}

.odm-directory {
    margin: 28px 0;
}

.odm-directory__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 28px;
}

.odm-directory__intro {
    min-width: 0;
}

.odm-eyebrow {
    display: inline-block;
    margin: 0 0 9px;
    color: var(--odm-accent);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .13em;
    line-height: 1.4;
}

.odm-directory__title,
.odm-subject-page__title {
    margin: 0 0 8px;
    color: var(--odm-ink);
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.12;
}

.odm-directory__description,
.odm-subject-page__lead {
    max-width: 650px;
    margin: 0;
    color: var(--odm-muted);
    font-size: 15px;
    line-height: 1.7;
}

.odm-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    height: 48px;
    border: 1px solid var(--odm-line);
    border-radius: 12px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.odm-search:focus-within {
    border-color: rgba(52, 88, 212, .55);
    box-shadow: 0 0 0 4px rgba(52, 88, 212, .08);
}

.odm-search > svg {
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    margin-left: 15px;
    color: #8290a5;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
}

.odm-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0 14px 0 10px;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--odm-ink);
    font: inherit;
    font-size: 14px;
}

.odm-search input::placeholder {
    color: #98a2b3;
    opacity: 1;
}

.odm-search__hint {
    flex: 0 0 auto;
    margin-right: 12px;
    padding: 3px 6px;
    border: 1px solid #e8ebf0;
    border-radius: 5px;
    color: #98a2b3;
    font-size: 10px;
}

.odm-search--subjects {
    flex: 0 1 330px;
}

.odm-subject-grid {
    display: grid;
    grid-template-columns: repeat(var(--odm-columns, 3), minmax(0, 1fr));
    gap: 16px;
}

.odm-subject-card {
    position: relative;
    display: flex;
    min-height: 194px;
    flex-direction: column;
    padding: 22px 22px 19px;
    overflow: hidden;
    border: 1px solid var(--odm-line);
    border-radius: 16px;
    background: #fff;
    color: var(--odm-ink) !important;
    text-decoration: none !important;
    box-shadow: 0 3px 12px rgba(16, 24, 40, .025);
    transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease, background .22s ease;
}

.odm-subject-card:hover {
    transform: translateY(-3px);
    border-color: rgba(52, 88, 212, .35);
    background: linear-gradient(145deg, #fff 55%, #f7f9ff 100%);
    box-shadow: 0 14px 32px rgba(16, 24, 40, .075);
}

.odm-subject-card:focus-visible,
.odm-download:focus-visible,
.odm-back-link:focus-visible {
    outline: 3px solid rgba(52, 88, 212, .35);
    outline-offset: 3px;
}

.odm-subject-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 21px;
}

.odm-subject-card__icon {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border: 1px solid #e9edfb;
    border-radius: 12px;
    background: #f4f6ff;
    color: var(--odm-accent);
}

.odm-subject-card__icon svg {
    width: 29px;
    height: 29px;
}

.odm-subject-card__arrow {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 50%;
    background: var(--odm-soft);
    color: #8390a4;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.odm-subject-card__arrow svg {
    width: 16px;
    height: 16px;
}

.odm-subject-card:hover .odm-subject-card__arrow {
    transform: translateX(2px);
    background: #eaf0ff;
    color: var(--odm-accent);
}

.odm-subject-card__name {
    display: block;
    margin-bottom: 6px;
    color: var(--odm-ink);
    font-size: 18px;
    font-weight: 680;
    letter-spacing: -.02em;
    line-height: 1.3;
}

.odm-subject-card__description {
    display: block;
    min-height: 22px;
    margin-bottom: 17px;
    color: var(--odm-muted);
    font-size: 13px;
    line-height: 1.55;
}

.odm-subject-card__description--muted {
    color: #98a2b3;
}

.odm-subject-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: #68758a;
    font-size: 12px;
    font-weight: 550;
}

.odm-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6b83e4;
}

.odm-live-status {
    min-height: 0;
    color: var(--odm-muted);
    font-size: 12px;
}

.odm-directory.is-loading .odm-subject-grid,
.odm-files-app.is-loading .odm-file-list {
    opacity: .48;
    pointer-events: none;
}

.odm-empty {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    border: 1px dashed #dfe4ec;
    border-radius: 15px;
    background: #fafbfc;
    text-align: center;
}

.odm-empty__icon {
    display: grid;
    width: 45px;
    height: 45px;
    margin-bottom: 12px;
    place-items: center;
    border-radius: 13px;
    background: #eef2ff;
    color: var(--odm-accent);
}

.odm-empty__icon svg {
    width: 27px;
    height: 29px;
}

.odm-empty strong {
    color: var(--odm-ink);
    font-size: 15px;
    font-weight: 650;
}

.odm-empty p {
    max-width: 420px;
    margin: 6px 0 0;
    color: var(--odm-muted);
    font-size: 13px;
    line-height: 1.6;
}

.odm-route {
    width: 100%;
}

.odm-subject-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(26px, 5vw, 58px) 22px 70px;
}

.odm-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 34px;
    color: #667085 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: color .2s ease;
}

.odm-back-link:hover {
    color: var(--odm-accent) !important;
}

.odm-back-link svg {
    width: 17px;
    height: 17px;
}

.odm-subject-page__header {
    padding-bottom: 29px;
    border-bottom: 1px solid var(--odm-line);
}

.odm-subject-page__title {
    font-size: clamp(30px, 4.2vw, 45px);
}

.odm-subject-page__lead {
    margin-top: 12px;
}

.odm-subject-page__content {
    max-width: 850px;
    padding: 23px 0 5px;
    color: #475467;
    font-size: 15px;
    line-height: 1.75;
}

.odm-subject-page__content > :last-child {
    margin-bottom: 0;
}

.odm-files-app {
    margin-top: 34px;
}

.odm-files-app__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 19px;
}

.odm-files-app__heading h2 {
    margin: 0 0 4px;
    color: var(--odm-ink);
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -.025em;
}

.odm-files-count {
    margin: 0;
    color: var(--odm-muted);
    font-size: 13px;
}

.odm-files-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
}

.odm-search--files {
    flex: 1 1 auto;
    max-width: 440px;
    height: 44px;
}

.odm-sort-label {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    color: #667085;
    font-size: 12px;
    font-weight: 600;
}

.odm-sort-label select {
    min-width: 142px;
    height: 42px;
    margin: 0;
    padding: 0 32px 0 12px;
    border: 1px solid var(--odm-line);
    border-radius: 10px;
    background-color: #fff;
    color: var(--odm-ink);
    font: inherit;
    font-size: 13px;
    box-shadow: none;
}

.odm-file-list__items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.odm-file-row {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 76px;
    margin: 0 !important;
    padding: 13px 16px;
    border: 1px solid var(--odm-line);
    border-radius: 13px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.odm-file-row:hover {
    transform: translateY(-1px);
    border-color: #d4dcf4;
    box-shadow: 0 7px 20px rgba(16, 24, 40, .045);
}

.odm-file-row__icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 46px;
    place-items: center;
    border-radius: 9px;
    background: #f1f4ff;
    color: #4564d6;
}

.odm-file-row__icon svg {
    display: block;
    width: 31px;
    height: 35px;
}

.odm-file-row__details {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
}

.odm-file-row__name {
    overflow: hidden;
    color: var(--odm-ink);
    font-size: 14px;
    font-weight: 640;
    line-height: 1.4;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
}

.odm-file-row__meta {
    color: #98a2b3;
    font-size: 11px;
    line-height: 1.3;
}

.odm-download {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #e1e7f7;
    border-radius: 9px;
    background: #f8f9ff;
    color: var(--odm-accent) !important;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none !important;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.odm-download:hover {
    border-color: var(--odm-accent);
    background: var(--odm-accent);
    color: #fff !important;
}

.odm-download svg {
    width: 16px;
    height: 16px;
}

.odm-empty--files {
    min-height: 170px;
}

@media (max-width: 900px) {
    .odm-subject-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .odm-directory__header {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
        margin-bottom: 20px;
    }

    .odm-search--subjects {
        flex: 0 0 auto;
        width: 100%;
    }

    .odm-subject-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 11px;
    }

    .odm-subject-card {
        min-height: 170px;
        padding: 18px;
    }

    .odm-subject-card__top {
        margin-bottom: 16px;
    }

    .odm-subject-page {
        padding-right: 16px;
        padding-left: 16px;
    }

    .odm-files-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .odm-search--files {
        max-width: none;
    }

    .odm-sort-label {
        justify-content: space-between;
    }

    .odm-sort-label select {
        flex: 1 1 auto;
        max-width: 230px;
    }

    .odm-file-row {
        gap: 10px;
        padding: 11px;
    }

    .odm-file-row__icon {
        flex-basis: 37px;
        width: 37px;
        height: 42px;
    }

    .odm-file-row__icon svg {
        width: 27px;
        height: 31px;
    }

    .odm-file-row__name {
        font-size: 12px;
    }

    .odm-download {
        width: 38px;
        min-width: 38px;
        padding: 0;
    }

    .odm-download span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .odm-directory *,
    .odm-subject-page * {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* Wersja 1.1.0 – izolacja układu od stylów motywu i responsywny kontener */
.odm-directory,
.odm-subject-page {
    box-sizing: border-box;
    width: calc(100% - 40px);
    max-width: 1410px;
    margin-right: auto;
    margin-left: auto;
    font-family: inherit;
}

.odm-directory *,
.odm-directory *::before,
.odm-directory *::after,
.odm-subject-page *,
.odm-subject-page *::before,
.odm-subject-page *::after {
    box-sizing: border-box;
}

.odm-directory {
    margin-top: clamp(30px, 4.2vw, 58px);
    margin-bottom: clamp(36px, 5vw, 68px);
    padding: 0;
}

.odm-directory__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    align-items: end;
    gap: 24px 36px;
    margin: 0 0 28px;
}

.odm-directory__intro {
    min-width: 0;
}

.odm-directory__title,
.odm-subject-page__title {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.odm-directory__description {
    max-width: 680px;
}

.odm-search--subjects {
    width: 100%;
    max-width: 360px;
    min-width: 0;
    justify-self: end;
}

.odm-subject-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(var(--odm-columns, 3), minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
}

.odm-subject-card {
    width: 100%;
    min-width: 0;
    min-height: 190px;
}

.odm-empty--subjects {
    grid-column: 1 / -1;
    width: 100%;
}

.odm-live-status {
    margin-top: 8px;
}

.odm-route {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.odm-subject-page {
    max-width: 1410px;
    padding: clamp(28px, 4vw, 50px) 0 clamp(48px, 6vw, 76px);
}

.odm-subject-page__content,
.odm-files-app {
    width: 100%;
    max-width: 900px;
}

.odm-files-app {
    margin-top: 34px;
}

.odm-files-toolbar {
    flex-wrap: wrap;
}

.odm-file-row__actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.odm-file-action {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid #e1e7f7;
    border-radius: 9px;
    background: #f8f9ff;
    color: var(--odm-accent) !important;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.odm-file-action:hover {
    transform: translateY(-1px);
    border-color: var(--odm-accent);
    background: var(--odm-accent);
    color: #fff !important;
}

.odm-file-action:focus-visible {
    outline: 3px solid rgba(52, 88, 212, .3);
    outline-offset: 3px;
}

.odm-file-action svg {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.odm-file-action--preview {
    border-color: #e5e9f0;
    background: #fff;
    color: #526176 !important;
}

.odm-file-action--preview:hover {
    border-color: #cbd5e5;
    background: #f3f6fb;
    color: #26364b !important;
}

.odm-download {
    margin: 0;
}

/* Okno podglądu plików */
.odm-preview-modal[hidden] {
    display: none !important;
}

.odm-preview-modal {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(12, 21, 36, .72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.odm-preview-modal__dialog {
    position: relative;
    display: flex;
    width: min(100%, 960px);
    max-height: min(90vh, 900px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.odm-preview-modal__header {
    display: flex;
    min-height: 62px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid #e9edf3;
}

.odm-preview-modal__title {
    min-width: 0;
    margin: 0 !important;
    overflow: hidden;
    color: #182230;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.odm-preview-modal__close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid #e6eaf0;
    border-radius: 10px;
    background: #fff;
    color: #475467;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.odm-preview-modal__close:hover {
    background: #f4f6f9;
    color: #182230;
}

.odm-preview-modal__body {
    display: flex;
    min-height: 180px;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 18px;
    background: #f5f7fa;
}

.odm-preview-modal__body img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(90vh - 120px);
    margin: auto;
    object-fit: contain;
}

.odm-preview-modal__body iframe {
    display: block;
    width: 100%;
    height: min(76vh, 760px);
    border: 0;
    background: #fff;
}

.odm-preview-modal__body audio,
.odm-preview-modal__body video {
    display: block;
    width: 100%;
    max-width: 820px;
    max-height: calc(90vh - 130px);
}

.odm-preview-modal__unsupported {
    max-width: 520px;
    padding: 28px;
    text-align: center;
}

.odm-preview-modal__unsupported strong {
    display: block;
    margin-bottom: 8px;
    color: #182230;
    font-size: 16px;
}

.odm-preview-modal__unsupported p {
    margin: 0 0 18px;
    color: #667085;
    font-size: 13px;
    line-height: 1.65;
}

.odm-preview-modal__download {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 9px;
    background: var(--odm-accent);
    color: #fff !important;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none !important;
}

.odm-preview-modal__download:hover {
    background: var(--odm-accent-dark);
}

@media (max-width: 900px) {
    .odm-directory,
    .odm-subject-page {
        width: calc(100% - 36px);
    }

    .odm-directory__header {
        grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
        gap: 20px;
    }

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

@media (max-width: 640px) {
    .odm-directory,
    .odm-subject-page {
        width: calc(100% - 32px);
    }

    .odm-directory {
        margin-top: 30px;
        margin-bottom: 40px;
    }

    .odm-directory__header {
        display: flex;
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
        margin-bottom: 20px;
    }

    .odm-directory__title {
        font-size: clamp(27px, 8vw, 34px);
    }

    .odm-directory__description {
        font-size: 14px;
    }

    .odm-search--subjects {
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }

    .odm-subject-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .odm-subject-card {
        min-height: 168px;
        padding: 18px;
    }

    .odm-subject-page {
        padding-top: 26px;
        padding-bottom: 46px;
    }

    .odm-subject-page__title {
        font-size: clamp(29px, 8vw, 38px);
    }

    .odm-files-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .odm-search--files {
        width: 100%;
        max-width: none;
    }

    .odm-sort-label {
        justify-content: space-between;
    }

    .odm-sort-label select {
        flex: 1 1 auto;
        max-width: 230px;
    }

    .odm-file-row {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px 12px;
        padding: 12px;
    }

    .odm-file-row__icon {
        grid-row: 1;
        grid-column: 1;
    }

    .odm-file-row__details {
        grid-row: 1;
        grid-column: 2;
    }

    .odm-file-row__actions {
        grid-row: 2;
        grid-column: 2;
        justify-content: flex-start;
        margin-left: 0;
    }

    .odm-file-action {
        width: auto;
        min-width: 0;
        min-height: 36px;
        padding: 0 10px;
    }

    .odm-download span {
        display: inline;
    }

    .odm-preview-modal {
        padding: 10px;
    }

    .odm-preview-modal__dialog {
        width: 100%;
        max-height: 94vh;
        border-radius: 12px;
    }

    .odm-preview-modal__header {
        min-height: 54px;
        padding: 8px 12px;
    }

    .odm-preview-modal__body {
        padding: 10px;
    }

    .odm-preview-modal__body iframe {
        height: 78vh;
    }
}

@media (max-width: 360px) {
    .odm-file-action {
        gap: 5px;
        padding: 0 8px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .odm-file-action,
    .odm-subject-card {
        transition-duration: .01ms !important;
    }
}

/* Wersja 1.2.0 – wycentrowany, nowoczesny układ katalogu */
.odm-directory,
.odm-directory * {
    box-sizing: border-box;
}

.odm-directory {
    display: block !important;
    float: none !important;
    clear: both;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: clamp(34px, 5vw, 66px) 0 clamp(42px, 5.5vw, 76px) !important;
    padding: 0 !important;
    color: #182536;
}

.odm-directory__container {
    display: block;
    width: calc(100% - 48px) !important;
    max-width: 1240px !important;
    min-width: 0 !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

.odm-directory__header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 370px);
    align-items: end;
    gap: 28px 48px;
    margin: 0 0 30px !important;
    padding: 0 !important;
}

.odm-directory__intro {
    min-width: 0;
}

.odm-eyebrow {
    margin-bottom: 12px;
    color: #4564d6;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15em;
    line-height: 1.45;
}

.odm-directory__title {
    margin: 0 0 10px !important;
    color: #182536 !important;
    font-size: clamp(30px, 3.3vw, 42px) !important;
    font-weight: 750 !important;
    letter-spacing: -.045em !important;
    line-height: 1.08 !important;
}

.odm-directory__description {
    max-width: 660px;
    margin: 0 !important;
    color: #68778c !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
}

.odm-search--subjects {
    justify-self: end;
    width: 100%;
    max-width: 370px;
    min-width: 0;
    height: 54px;
    border: 1px solid #e3e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(20, 35, 60, .035);
}

.odm-search--subjects:focus-within {
    border-color: rgba(69, 100, 214, .55);
    box-shadow: 0 0 0 4px rgba(69, 100, 214, .09), 0 8px 24px rgba(20, 35, 60, .05);
}

.odm-search input {
    color: #26364b;
    font-size: 14px;
}

.odm-search input::placeholder {
    color: #9aa6b6;
}

.odm-subject-grid {
    display: grid !important;
    width: 100% !important;
    min-width: 0;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 390px)) !important;
    align-items: stretch;
    justify-content: center;
    gap: 20px;
    margin: 0 !important;
    padding: 0 !important;
}

.odm-subject-card {
    display: flex !important;
    width: 100% !important;
    max-width: 390px;
    min-width: 0;
    min-height: 218px;
    flex-direction: column;
    justify-self: center;
    padding: 25px 25px 22px !important;
    border: 1px solid #e6eaf1 !important;
    border-radius: 19px !important;
    background: linear-gradient(155deg, #fff 0%, #fff 72%, #f8faff 100%) !important;
    box-shadow: 0 5px 20px rgba(25, 43, 74, .045), 0 1px 2px rgba(25, 43, 74, .025) !important;
    color: #182536 !important;
    text-decoration: none !important;
    transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease, background .24s ease;
}

.odm-subject-card:hover {
    transform: translateY(-4px);
    border-color: #cbd5f4 !important;
    background: linear-gradient(150deg, #fff 0%, #fff 55%, #f3f6ff 100%) !important;
    box-shadow: 0 16px 38px rgba(32, 55, 105, .10), 0 3px 8px rgba(32, 55, 105, .035) !important;
}

.odm-subject-card__top {
    align-items: center;
    margin-bottom: 25px;
}

.odm-subject-card__icon {
    width: 48px;
    height: 48px;
    border: 1px solid #e4eaff;
    border-radius: 15px;
    background: linear-gradient(145deg, #f5f7ff, #edf1ff);
    color: #4564d6;
}

.odm-subject-card__arrow {
    width: 34px;
    height: 34px;
    background: #f4f6fa;
    color: #8290a5;
}

.odm-subject-card__name {
    margin-bottom: 7px;
    color: #1c293a;
    font-size: 19px;
    font-weight: 720;
    letter-spacing: -.025em;
    line-height: 1.3;
}

.odm-subject-card__description {
    min-height: 22px;
    margin-bottom: 20px;
    color: #78869a;
    font-size: 13px;
    line-height: 1.6;
}

.odm-subject-card__meta {
    gap: 9px;
    color: #6b7890;
    font-size: 12px;
    font-weight: 650;
}

.odm-dot {
    width: 7px;
    height: 7px;
    background: #5876e5;
    box-shadow: 0 0 0 3px rgba(88, 118, 229, .10);
}

.odm-live-status {
    margin-top: 12px;
    color: #718096;
    font-size: 12px;
}

.odm-empty--subjects {
    grid-column: 1 / -1;
    width: min(100%, 560px);
    justify-self: center;
    border-color: #dfe5ef;
    background: linear-gradient(145deg, #fbfcff, #f7f9fc);
}

/* Strona konkretnego przedmiotu zachowuje tę samą oś i równe marginesy. */
.odm-subject-page {
    width: calc(100% - 48px) !important;
    max-width: 1120px !important;
    min-width: 0;
    margin-right: auto !important;
    margin-left: auto !important;
    padding: clamp(32px, 4.5vw, 56px) 0 clamp(48px, 6vw, 76px) !important;
}

.odm-subject-page__header {
    padding-bottom: 30px;
    border-bottom-color: #e7ebf2;
}

.odm-subject-page__title {
    color: #182536 !important;
    font-size: clamp(32px, 4vw, 46px) !important;
    font-weight: 750 !important;
    letter-spacing: -.045em !important;
}

.odm-files-app {
    width: 100%;
    max-width: 940px;
    margin-top: 38px;
}

.odm-file-row {
    min-height: 78px;
    padding: 15px 17px;
    border-color: #e7ebf1;
    border-radius: 14px;
    box-shadow: 0 2px 7px rgba(22, 35, 58, .025);
}

.odm-file-row:hover {
    border-color: #d5ddf2;
    box-shadow: 0 9px 24px rgba(22, 35, 58, .055);
}

@media (max-width: 900px) {
    .odm-directory__container {
        width: calc(100% - 40px) !important;
    }

    .odm-directory__header {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
        gap: 20px;
    }

    .odm-subject-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 390px)) !important;
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .odm-directory {
        margin-top: 30px !important;
        margin-bottom: 42px !important;
    }

    .odm-directory__container {
        width: calc(100% - 32px) !important;
    }

    .odm-directory__header {
        display: flex !important;
        align-items: stretch;
        flex-direction: column;
        gap: 17px;
        margin-bottom: 22px !important;
    }

    .odm-directory__title {
        font-size: clamp(29px, 8vw, 36px) !important;
    }

    .odm-directory__description {
        font-size: 14px !important;
    }

    .odm-search--subjects {
        width: 100%;
        max-width: none;
        height: 51px;
    }

    .odm-subject-grid {
        grid-template-columns: minmax(0, 390px) !important;
        justify-content: center;
        gap: 13px;
    }

    .odm-subject-card {
        min-height: 190px;
        padding: 21px !important;
        border-radius: 16px !important;
    }

    .odm-subject-card__top {
        margin-bottom: 20px;
    }

    .odm-subject-page {
        width: calc(100% - 32px) !important;
        padding-top: 28px !important;
        padding-bottom: 48px !important;
    }

    .odm-files-app {
        margin-top: 30px;
    }
}

@media (max-width: 380px) {
    .odm-directory__container,
    .odm-subject-page {
        width: calc(100% - 28px) !important;
    }

    .odm-subject-card {
        padding: 18px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .odm-subject-card,
    .odm-file-row {
        transition-duration: .01ms !important;
    }
}


/* Wersja 1.3.0 – integracja z szerokością kontenera Blocksy.
   Shortcode dziedziczy szerokość obszaru treści strony. Widoki własne (archiwum
   i pojedynczy przedmiot) korzystają z natywnego .ct-container motywu. */
.odm-route {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.odm-route--archive > .odm-blocksy-container,
.odm-route--single > .odm-blocksy-container {
    width: 100%;
    min-width: 0;
}

.odm-directory {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.odm-directory__container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* Na shortcode szerokość wyznacza nadrzędny kontener Blocksy.
   Nie nakładamy drugiego, sztywnego limitu 1240 px. */
.odm-subject-page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.odm-subject-page__content,
.odm-files-app {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 689.98px) {
    .odm-directory__container {
        width: 100% !important;
    }

    .odm-subject-page {
        width: 100% !important;
    }
}


/* Wersja 1.4.0 – pełna szerokość dostępna w Blocksy i akcent #d43117. */
.odm-directory,
.odm-subject-page {
    --odm-accent: #d43117;
    --odm-accent-dark: #ae2612;
    --odm-accent-soft: #fff2ee;
    --odm-accent-border: rgba(212, 49, 23, .22);
    --odm-accent-ring: rgba(212, 49, 23, .14);
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* Szerokością zewnętrzną zarządza Blocksy (ct-container / obszar treści). */
.odm-directory__container,
.odm-subject-page,
.odm-subject-page__content,
.odm-files-app {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.odm-directory__container {
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.odm-subject-page {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.odm-eyebrow,
.odm-back-link:hover {
    color: var(--odm-accent) !important;
}

.odm-search:focus-within {
    border-color: var(--odm-accent-border) !important;
    box-shadow: 0 0 0 4px var(--odm-accent-ring) !important;
}

.odm-search > svg {
    color: var(--odm-accent);
}

.odm-subject-card:hover {
    border-color: var(--odm-accent-border) !important;
    background: linear-gradient(150deg, #fff 0%, #fff 57%, #fff6f3 100%) !important;
    box-shadow: 0 16px 38px rgba(90, 31, 19, .09), 0 3px 8px rgba(90, 31, 19, .03) !important;
}

.odm-subject-card:focus-visible,
.odm-download:focus-visible,
.odm-file-action:focus-visible,
.odm-back-link:focus-visible {
    outline: 3px solid var(--odm-accent-ring) !important;
    outline-offset: 3px;
}

.odm-subject-card__icon {
    border-color: rgba(212, 49, 23, .13) !important;
    background: linear-gradient(145deg, #fff7f4, #ffede8) !important;
    color: var(--odm-accent) !important;
}

.odm-subject-card__arrow {
    background: #f7f4f2;
}

.odm-subject-card:hover .odm-subject-card__arrow {
    background: var(--odm-accent-soft) !important;
    color: var(--odm-accent) !important;
}

.odm-dot {
    background: var(--odm-accent) !important;
    box-shadow: 0 0 0 3px rgba(212, 49, 23, .10) !important;
}

.odm-empty__icon {
    background: var(--odm-accent-soft) !important;
    color: var(--odm-accent) !important;
}

.odm-file-row:hover {
    border-color: var(--odm-accent-border) !important;
    box-shadow: 0 9px 24px rgba(90, 31, 19, .055);
}

.odm-file-row__icon {
    background: linear-gradient(145deg, #fff7f4, #ffede8) !important;
    color: var(--odm-accent) !important;
}

.odm-file-action,
.odm-download {
    border-color: rgba(212, 49, 23, .20) !important;
    background: #fff7f4 !important;
    color: var(--odm-accent) !important;
}

.odm-file-action:hover,
.odm-download:hover {
    border-color: var(--odm-accent) !important;
    background: var(--odm-accent) !important;
    color: #fff !important;
}

.odm-file-action--preview {
    border-color: rgba(212, 49, 23, .18) !important;
    background: #fff !important;
    color: var(--odm-accent) !important;
}

.odm-file-action--preview:hover {
    border-color: var(--odm-accent) !important;
    background: var(--odm-accent) !important;
    color: #fff !important;
}

.odm-sort-label select:focus {
    border-color: var(--odm-accent) !important;
    outline: 0;
    box-shadow: 0 0 0 3px var(--odm-accent-ring) !important;
}

.odm-preview-modal__download {
    background: var(--odm-accent) !important;
    color: #fff !important;
}

.odm-preview-modal__download:hover {
    background: var(--odm-accent-dark) !important;
}

.odm-preview-modal__close:hover {
    border-color: var(--odm-accent-border);
    background: var(--odm-accent-soft);
    color: var(--odm-accent);
}

@media (max-width: 640px) {
    .odm-directory__container,
    .odm-subject-page,
    .odm-subject-page__content,
    .odm-files-app {
        width: 100% !important;
        max-width: 100% !important;
    }
}


/* Wersja 1.5.0 – kafelki zawsze rozpoczynają się od lewej strony siatki. */
.odm-subject-grid {
    justify-content: start !important;
    justify-items: start !important;
}

.odm-subject-card {
    justify-self: start !important;
}

.odm-empty--subjects {
    justify-self: start !important;
}

@media (max-width: 640px) {
    .odm-subject-grid {
        justify-content: start !important;
        justify-items: start !important;
        grid-template-columns: minmax(0, min(100%, 390px)) !important;
    }

    .odm-subject-card {
        justify-self: start !important;
    }
}
