:root {
    --home-ink: #1d1d1f;
    --home-muted: #6e6e73;
    --home-soft: #f5f5f7;
    --home-line: rgba(0, 0, 0, .1);
    --home-blue: #0066cc;
    --home-blue-dark: #004e9f;
}

body.home-body {
    min-height: 100vh;
    color: var(--home-ink);
    background:
        radial-gradient(circle at 50% -10%, rgba(255, 255, 255, .95), rgba(245, 245, 247, 0) 42%),
        linear-gradient(180deg, #fff 0%, #f5f5f7 58%, #fff 100%);
}

.home-navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 56px;
    border-bottom: 1px solid rgba(0, 0, 0, .07);
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(20px);
}

.home-navbar .navbar-brand,
.home-navbar .nav-link {
    color: var(--home-ink);
}

.home-navbar .navbar-brand {
    font-size: 18px;
}

.home-navbar .nav-link {
    color: #424245;
    font-size: 15px;
}

.home-navbar .nav-link:hover,
.home-navbar .navbar-brand:hover {
    color: var(--home-blue);
}

.home-navbar .btn-outline-light {
    color: var(--home-ink);
    border-color: rgba(0, 0, 0, .18);
}

.home-navbar .btn-outline-light:hover {
    color: #fff;
    background: var(--home-ink);
    border-color: var(--home-ink);
}

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

.home-navbar .navbar-toggler {
    border-color: rgba(0, 0, 0, .18);
}

.home-navbar .navbar-toggler-icon {
    filter: none;
}

.home-hero {
    padding: 86px 0 58px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(440px, 1.08fr);
    align-items: center;
    gap: clamp(34px, 6vw, 84px);
}

.hero-copy {
    max-width: 650px;
}

.home-kicker {
    margin-bottom: 16px;
    color: #86868b;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    color: #111;
    font-size: clamp(54px, 6.4vw, 96px);
    font-weight: 800;
    line-height: .98;
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 590px;
    margin: 24px 0 0;
    color: var(--home-muted);
    font-size: clamp(19px, 2vw, 24px);
    line-height: 1.58;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.home-primary,
.home-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.home-primary {
    color: #fff;
    background: var(--home-blue);
    box-shadow: 0 12px 28px rgba(0, 102, 204, .22);
}

.home-primary:hover {
    color: #fff;
    background: var(--home-blue-dark);
    transform: translateY(-1px);
}

.home-secondary {
    color: var(--home-blue);
    background: transparent;
}

.home-secondary:hover {
    color: var(--home-blue-dark);
    background: rgba(0, 102, 204, .08);
}

.hero-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    max-width: 520px;
    margin-top: 38px;
    overflow: hidden;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: var(--home-line);
}

.hero-facts div {
    padding: 18px 20px;
    background: rgba(255, 255, 255, .72);
}

.hero-facts strong {
    display: block;
    color: var(--home-ink);
    font-size: 30px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.hero-facts span {
    display: block;
    margin-top: 8px;
    color: var(--home-muted);
    font-size: 13px;
}

.student-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 560px;
    margin-top: 16px;
}

.student-strip span {
    padding: 7px 11px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 999px;
    color: #424245;
    background: rgba(255, 255, 255, .78);
    font-size: 13px;
    font-weight: 650;
}

.hero-paper {
    display: block;
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, .09);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 38px 90px rgba(0, 0, 0, .14);
    overflow: hidden;
    transform: translateZ(0);
    transition: transform .22s ease, box-shadow .22s ease;
}

.hero-paper:hover {
    color: inherit;
    transform: translateY(-4px);
    box-shadow: 0 48px 110px rgba(0, 0, 0, .17);
}

.paper-chrome {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    background: rgba(251, 251, 253, .88);
}

.paper-chrome span {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: #ff5f57;
}

.paper-chrome span:nth-child(2) {
    background: #febc2e;
}

.paper-chrome span:nth-child(3) {
    background: #28c840;
}

.paper-canvas {
    min-height: 560px;
    padding: clamp(28px, 4vw, 46px);
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .035) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(180deg, #fff 0%, #fbfbfd 100%);
}

.paper-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: #86868b;
    font-size: 14px;
    font-weight: 750;
}

.paper-canvas h2 {
    max-width: 520px;
    margin: 34px 0 18px;
    color: #111;
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0;
}

.paper-rule {
    width: 84px;
    height: 4px;
    border-radius: 999px;
    background: var(--home-blue);
}

.mock-question {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 42px;
}

.mock-question span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(0, 102, 204, .2);
    border-radius: 8px;
    color: var(--home-blue);
    background: #f1f7ff;
    font-weight: 800;
}

.mock-question p {
    margin: 0;
    color: #424245;
    font-size: 19px;
    font-weight: 700;
}

.mock-code {
    display: grid;
    gap: 13px;
    margin: 28px 0;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 8px;
    background: #1d1d1f;
}

.mock-code i {
    display: block;
    width: 92%;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d7e7ff, #91c7ff);
}

.mock-code i:nth-child(2) {
    width: 74%;
}

.mock-code i:nth-child(3) {
    width: 83%;
}

.mock-code i:nth-child(4) {
    width: 58%;
}

.mock-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.mock-options b {
    display: grid;
    place-items: center;
    height: 54px;
    border: 1px solid rgba(0, 0, 0, .13);
    border-radius: 8px;
    color: #424245;
    background: rgba(255, 255, 255, .9);
    font-size: 18px;
}

.paper-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.paper-foot span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #424245;
    background: #f5f5f7;
    font-size: 13px;
    font-weight: 700;
}

.paper-library {
    padding: 52px 0 92px;
}

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

.library-head h2 {
    margin: 0;
    color: #111;
    font-size: clamp(34px, 4.8vw, 58px);
    font-weight: 800;
    line-height: 1.05;
}

.library-head p {
    max-width: 560px;
    margin: 0;
    color: var(--home-muted);
    font-size: 17px;
    line-height: 1.62;
}

.featured-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.featured-paper {
    min-height: 132px;
    padding: 18px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 8px;
    color: inherit;
    background: #fff;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.featured-paper:hover,
.paper-card:hover {
    color: inherit;
    transform: translateY(-2px);
    border-color: rgba(0, 0, 0, .18);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .08);
}

.featured-paper span,
.featured-paper em {
    display: block;
    color: var(--home-muted);
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

.featured-paper strong {
    display: block;
    margin: 18px 0 8px;
    color: var(--home-ink);
    font-size: 24px;
    line-height: 1.1;
}

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

.paper-card {
    display: flex;
    flex-direction: column;
    min-height: 244px;
    padding: 22px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 8px;
    background: rgba(255, 255, 255, .88);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card-date {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--home-muted);
    font-size: 13px;
    font-weight: 750;
}

.card-date em {
    color: #1d1d1f;
    font-style: normal;
}

.paper-card h3 {
    margin: 30px 0 14px;
    color: #111;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.28;
}

.card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.card-stats span {
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 999px;
    color: #424245;
    background: #f5f5f7;
    font-size: 13px;
    font-weight: 650;
}

.paper-card a {
    margin-top: auto;
    color: var(--home-blue);
    font-weight: 750;
    text-decoration: none;
}

.paper-card a:hover {
    color: var(--home-blue-dark);
    text-decoration: underline;
}

.library-note {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    color: var(--home-muted);
    font-size: 14px;
}

.library-note span {
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px dashed rgba(0, 0, 0, .18);
    border-radius: 8px;
    color: var(--home-muted);
    background: #fff;
}

.home-footer {
    color: var(--home-muted);
    padding: 28px 0;
    background: #fff;
}

@media (max-width: 1200px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        max-width: 780px;
        text-align: center;
        margin: 0 auto;
    }

    .hero-copy p,
    .hero-facts {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions,
    .student-strip {
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .featured-row,
    .paper-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .library-head {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .home-hero {
        padding: 58px 0 38px;
    }

    .hero-copy h1 {
        font-size: 52px;
    }

    .hero-facts,
    .featured-row,
    .paper-grid {
        grid-template-columns: 1fr;
    }

    .hero-paper {
        border-radius: 8px;
    }

    .paper-canvas {
        min-height: 480px;
        padding: 24px;
    }

    .mock-options {
        grid-template-columns: repeat(2, 1fr);
    }
}
