@import url('https://fonts.googleapis.com/css2?family=Onest:wght@100..900&display=swap');

* {
    font-family: 'Onest', Arial, sans-serif;
    box-sizing: border-box;
    color: #333333;
    caret-color: transparent;
}

body {
    margin: 0;
    background: #f6f7f8;
}

@property --percent {
    syntax: "<number>";
    inherits: false;
    initial-value: 0;
}

.practice-content {
    background-color: #f6f7f8;

    min-height: 100vh;

    display: flex;
    justify-content: center;
}

footer.container {
    background: white;
}

footer hr {
    border-top: 3px solid #f6f7f8;
}

.practice-block {
    width: 100%;
    max-width: 74rem;
    margin-top: 7.2rem;
    padding: 0;
}

.practice-title {
    width: 75%;
    margin: 0 auto 1.45rem;
    text-align: center;
    font-size: 1.85rem;
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.section {
    display: flex;
    flex-direction: column;

    background-color: white;
    border-radius: 15px;

    padding: 1rem;
    overflow: hidden;
}

.section__header {
    width: 100%;
    border-radius: 12px;
    border: none;
    box-shadow: none;
}

.section__body {
    padding: 1rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.card {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 1rem;
    background: white;
    border-radius: 12px;

    text-decoration: none;
    color: #1f2933;

    transition: 0.5s ease;
    gap: 0.5rem;
    height: 3rem;
}

.card--java--small:hover {
    background-color: #c9e8ff;
    border-radius: 12px;
}

.card--spring--small:hover {
    background-color: #d1e9c6;
    border-radius: 12px;
}

.card--sql--small:hover {
    background-color: #fff0b8;
    border-radius: 12px;
}

.card--algorithms--small:hover {
    background-color: #ffcaca;
    border-radius: 12px;
}

.card--system-design--small:hover {
    background-color: #ddd8ff;
    border-radius: 12px;
}

.card--large {
    padding: 1rem;
    font-size: 1rem;

    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 3rem;
}

.card--java {
    background-color: #c9e8ff;
}

.card--spring {
    background-color: #d1e9c6;
}

.card--sql {
    background-color: #fff0b8;
}

.card--algorithms {
    background-color: #ffcaca;
}

.card--system-design {
    background-color: #ddd8ff;
}

.logo {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.logo--large {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;

    margin-bottom: 5rem;
}

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

.card h2 {
    margin: 0;
    text-align: center;
    font-weight: 550;
    font-size: 1.1rem;
}

.card h3 {
    margin: 0;
    text-align: left;
    font-weight: 500;
    font-size: 1rem;
}

/* Topic cards */

.card--java--small,
.card--spring--small,
.card--sql--small,
.card--algorithms--small,
.card--system-design--small {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 0.35rem;
    height: auto;
    padding: 0.5rem 0;

    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;

    text-decoration: none;
    color: #374151;

    position: relative;
    padding-left: 0.35rem;

    transition: 0.25s;
}

/* Topic progress */

.topic-progress-wrap {
    --ring-green: #7cb261;
    --ring-yellow: #e8c65a;
    --ring-track: #dfe4e9;

    position: relative;

    width: 1.45rem;
    height: 1.45rem;
    min-width: 1.45rem;
    flex: 0 0 1.45rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    overflow: visible;
}

.topic-progress-ring {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    display: block;

    overflow: visible;
}

.topic-progress-ring__track,
.topic-progress-ring__value {
    fill: none;
    stroke-width: 3;
    stroke-linecap: butt;
}

.topic-progress-ring__track {
    stroke: var(--ring-track);
}

.topic-progress-ring__value {
    stroke-dasharray: 0 100;
    transition: stroke-dasharray 0.45s ease;
}

.topic-progress-ring__value--lifetime {
    stroke: var(--ring-green);
}

.topic-progress-ring__value--season {
    stroke: var(--ring-yellow);
}

.topic-progress-hover {
    display: flex;
    align-items: center;
    gap: 0.35rem;

    max-height: 0;
    margin-top: 0;
    overflow: hidden;

    opacity: 0;
    transform: translateY(-2px);

    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;

    pointer-events: none;

    transition:
        opacity 0.16s ease,
        transform 0.16s ease,
        max-height 0.16s ease,
        margin-top 0.16s ease;
}

.topic-link:hover .topic-progress-hover,
.topic-link:focus-visible .topic-progress-hover {
    max-height: 1rem;
    margin-top: 0.22rem;

    opacity: 1;
    transform: translateY(0);
}

.topic-progress-hover__lifetime {
    color: #639e4d;
}

.topic-progress-hover__month {
    color: #c6a43c;
}

.topic-progress-hover__separator {
    color: #b8c0c9;
    font-weight: 500;
}

.topic-link__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.topic-link h3 {
    min-width: 0;
}

/* Dark theme progress */

body.dark-theme .topic-progress-wrap {
    --ring-track: #4b5563;
    --ring-green: #84bd6b;
    --ring-yellow: #e8c65a;
}

body.dark-theme .topic-progress-hover__lifetime {
    color: #9aca83;
}

body.dark-theme .topic-progress-hover__month {
    color: #efd16d;
}

body.dark-theme .topic-progress-hover__separator {
    color: #64748b;
}

/* Premium topic marker */

.topic-link--premium {
    position: relative;
}

.practice-premium-fire {
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
    pointer-events: none;
    opacity: 0.75;
}

/* ===== RESPONSIVE PASS ===== */
.practice-content {
    padding-left: clamp(1.25rem, 3vw, 2rem);
    padding-right: clamp(1.25rem, 3vw, 2rem);
}

@media (max-width: 700px) {
    .practice-block {
        margin-top: 6.5rem;
    }

    .practice-title {
        width: 100%;
    }

    .practice-description {
        width: 100%;
        margin-bottom: 1rem;
    }

    .cards-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
        margin-bottom: 3rem;
    }

    .test-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .section {
        padding: 0.85rem;
    }

    .card {
        min-width: 0;
        height: auto;
        min-height: 2.75rem;
    }

    .card h2,
    .card h3 {
        overflow-wrap: anywhere;
    }

}

