:root {
    --teal: #126e6c;
    --teal2: #0d5d5b;
    --tealSoft: #eaf4f3;
    --orange: #eb702b;
    --orange2: #df6421;
    --text: #202629;
    --muted: #737d7d;
    --line: #e1e7e5;
    --bg: #f8faf9;
    --white: #fff;
    --shadow: 0 12px 32px rgba(20, 42, 41, .08);
    --r: 20px
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: radial-gradient(circle at 5% 0, rgba(18, 110, 108, .04), transparent 28%), radial-gradient(circle at 95% 0, rgba(235, 112, 43, .04), transparent 28%), var(--bg);
    font-family: Inter, system-ui, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased
}

button,
input,
select {
    font: inherit
}

.page {
    width: min(1320px, calc(100% - 40px));
    margin: auto;
    padding: 28px 0 60px
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 42px 46px;
    border: 1px solid var(--line);
    border-radius: 25px;
    background: linear-gradient(110deg, #fff 0, #fff 62%, #f0f8f7 100%);
    box-shadow: 0 5px 18px rgba(20, 42, 41, .05)
}

.hero:before {
    content: "";
    position: absolute;
    width: 270px;
    height: 270px;
    right: -90px;
    top: -130px;
    border-radius: 50%;
    background: rgba(18, 110, 108, .07)
}

.heroText {
    position: relative;
    z-index: 1;
    max-width: 720px
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--tealSoft);
    color: var(--teal);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal)
}

h1 {
    margin: 14px 0 0;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.06;
    letter-spacing: -.045em
}

.hero p {
    max-width: 650px;
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7
}

.stats {
    position: absolute;
    right: 38px;
    bottom: 30px;
    display: flex;
    gap: 9px
}

.stat {
    min-width: 96px;
    padding: 11px 13px;
    border: 1px solid rgba(18, 110, 108, .12);
    border-radius: 13px;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(7px)
}

.stat b {
    display: block;
    font-size: 20px
}

.stat span {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600
}

.toolbar {
    display: flex;
    gap: 11px;
    margin: 26px 0 10px
}

.search {
    position: relative;
    flex: 1
}

.search svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    color: #98a2a1
}

.search input {
    width: 100%;
    height: 49px;
    padding: 0 15px 0 44px;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: 0;
    background: #fff;
    box-shadow: 0 4px 15px rgba(20, 42, 41, .04)
}

.search input:focus {
    border-color: #74a9a7;
    box-shadow: 0 0 0 4px rgba(18, 110, 108, .08)
}

select {
    height: 49px;
    min-width: 165px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    color: var(--text);
    outline: 0
}

.filter {
    display: flex;
    gap: 8px;
    overflow: auto;
    padding: 2px 1px 5px;
    scrollbar-width: none
}

.filter::-webkit-scrollbar {
    display: none
}

.filter button {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    background: #fff;
    color: #596564;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s
}

.filter button:hover {
    border-color: #8ab5b3;
    color: var(--teal)
}

.filter button.active {
    border-color: var(--teal);
    background: var(--teal);
    color: #fff
}

.course-filter {
    margin-top: 17px
}

.course-filter button {
    border-radius: 10px
}

.subject-filter {
    margin-top: 7px
}

.heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0 15px
}

.heading h2 {
    margin: 0;
    font-size: 21px;
    letter-spacing: -.025em
}

.count {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px
}

.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #fff;
    box-shadow: 0 5px 18px rgba(20, 42, 41, .055);
    cursor: pointer;
    transition: .2s
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: #d2dddb
}

.cover {
    position: relative;
    height: 215px;
    margin: 9px 9px 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--cover, #126e6c);
}

.cover:before {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    right: -70px;
    top: -90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12)
}

.cover:after {
    content: "";
    position: absolute;
    width: 115px;
    height: 115px;
    left: -60px;
    bottom: -75px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .08)
}

.coverLabel {
    position: absolute;
    z-index: 2;
    top: 13px;
    left: 13px;
    padding: 6px 8px;
    border-radius: 7px;
    background: rgba(0, 0, 0, .15);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em
}

.coverCenter {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 30px;
    color: #fff
}

.coverCenter strong {
    max-width: 230px;
    font-size: 24px;
    line-height: 1.12;
    letter-spacing: -.035em
}

.coverCenter small {
    display: block;
    margin-top: 8px;
    opacity: .85;
    font-size: 9px
}

.coverIcon {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 9px;
    color: #fff;
    opacity: .6;
    font-size: 22px
}

.body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px 17px 16px
}

.meta {
    display: flex;
    gap: 6px;
    align-items: center
}

.subject {
    padding: 5px 8px;
    border-radius: 7px;
    background: var(--tealSoft);
    color: var(--teal);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase
}

.type {
    font-size: 10px;
    color: #98a2a1;
    font-weight: 600
}

.title {
    margin: 11px 0 0;
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: -.02em
}

.author {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 11px
}

.desc {
    display: -webkit-box;
    overflow: hidden;
    margin: 9px 0 0;
    color: #707a79;
    font-size: 11px;
    line-height: 1.5;
    -webkit-box-orient: vertical
}

.bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px
}

.info {
    font-size: 10px;
    color: #99a3a2;
    font-weight: 600
}

.read {
    margin-left: auto;
    border: 0;
    border-radius: 9px;
    padding: 9px 13px;
    background: var(--teal);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer
}

.read:hover {
    background: var(--teal2)
}

.empty {
    display: none;
    grid-column: 1/-1;
    padding: 60px 20px;
    border: 1px dashed #d5dfdd;
    border-radius: 20px;
    text-align: center
}

.empty.show {
    display: block
}

.empty h3 {
    margin: 0;
    font-size: 17px
}

.empty p {
    margin: 7px;
    color: var(--muted);
    font-size: 12px
}

.modal {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(15, 31, 30, .48);
    backdrop-filter: blur(7px);
    animation: fade .16s
}

.panel {
    width: min(550px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    border: 1px solid #dfe6e4;
    border-radius: 23px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(10, 30, 29, .24);
    animation: up .2s
}

.modalCover {
    height: 185px;
    margin: 9px;
    border-radius: 17px;
    overflow: hidden;
    position: relative;
    background: var(--modalCover)
}

.modalCover div {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 35px;
    text-align: center;
    color: #fff
}

.modalCover strong {
    font-size: 27px;
    line-height: 1.1;
    letter-spacing: -.04em
}

.modalBody {
    padding: 22px 25px 25px
}

.modalTop {
    display: flex;
    gap: 14px;
    justify-content: space-between
}

.modalTop h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.18;
    letter-spacing: -.035em
}

.close {
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    border: 0;
    border-radius: 10px;
    background: #f1f5f4;
    color: #65706f;
    font-size: 23px;
    cursor: pointer
}

.modalAuthor {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 13px
}

.badge {
    padding: 6px 8px;
    border-radius: 7px;
    background: var(--tealSoft);
    color: var(--teal);
    font-size: 9px;
    font-weight: 800
}

.modalDesc {
    margin: 17px 0 0;
    color: #65706f;
    font-size: 12px;
    line-height: 1.65
}

.bookId {
    margin-top: 12px;
    color: #9aa3a2;
    font: 10px ui-monospace, monospace
}

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 21px
}

.action {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 51px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 750
}

.pdf {
    background: var(--tealSoft);
    color: var(--teal)
}

.buy {
    background: var(--orange);
    color: #fff
}

.buy:hover {
    background: var(--orange2)
}

.hint {
    text-align: center;
    color: #9aa3a2;
    font-size: 9px;
    line-height: 1.45;
    margin: 11px 0 0
}

@keyframes fade {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes up {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.985)
    }

    to {
        opacity: 1;
        transform: none
    }
}

@media(max-width:1100px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
}

@media(max-width:820px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .hero {
        padding: 32px 28px
    }

    .stats {
        position: static;
        margin-top: 24px;
        width: max-content
    }
}

@media(max-width:620px) {
    .page {
        width: calc(100% - 20px);
        padding-top: 12px
    }

    .hero {
        padding: 25px 20px;
        border-radius: 19px
    }

    .hero h1 {
        font-size: 31px
    }

    .hero p {
        font-size: 12px
    }

    .stats {
        width: 100%
    }

    .stat {
        flex: 1;
        min-width: 0
    }

    .toolbar {
        flex-direction: column
    }

    .toolbar select {
        width: 100%
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px
    }

    .cover {
        height: 142px;
        margin: 6px 6px 0;
        border-radius: 12px
    }

    .coverCenter {
        padding: 16px 8px
    }

    .coverCenter strong {
        font-size: 14px
    }

    .coverCenter small {
        font-size: 7px;
        margin-top: 5px
    }

    .coverLabel {
        top: 7px;
        left: 7px;
        padding: 4px 5px;
        font-size: 6px
    }

    .coverIcon {
        right: 7px;
        bottom: 5px;
        font-size: 15px
    }

    .body {
        padding: 10px 9px 9px
    }

    .subject {
        padding: 4px 5px;
        font-size: 7px
    }

    .type {
        display: none
    }

    .title {
        font-size: 12px;
        margin-top: 7px
    }

    .author {
        font-size: 9px;
        margin-top: 4px
    }

    .desc {
        font-size: 9px;
        line-height: 1.4;
        margin-top: 6px
    }

    .bottom {
        display: block;
        padding-top: 8px
    }

    .info {
        font-size: 8px
    }

    .read {
        width: 100%;
        margin-top: 7px;
        padding: 8px 5px;
        font-size: 9px
    }

    .heading {
        margin-top: 19px
    }

    .heading h2 {
        font-size: 18px
    }

    .count {
        font-size: 10px
    }

    .panel {
        border-radius: 20px
    }

    .modalCover {
        height: 145px
    }

    .modalBody {
        padding: 19px 17px 19px
    }

    .modalTop h2 {
        font-size: 21px
    }

    .actions {
        grid-template-columns: 1fr
    }

    .modalDesc {
        font-size: 11px
    }
}