/* Course catalog only. Lesson exercise presentation lives in courses/exercise.css. */
.course-catalog {
    box-sizing: border-box;
    color: #24546b;
    font-family: "Nunito", Arial, sans-serif;
    margin: 0 auto;
    max-width: 560px;
    padding: 0 10px 24px;
    width: 100%;
}

.course-catalog * { box-sizing: border-box; }
.course-catalog [hidden] { display: none !important; }

.course-level-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 -10px 14px;
    min-height: clamp(56px, 9svh, 70px);
    position: sticky;
    top: 65px;
    z-index: 9;
}
.course-level-tab {
    -webkit-tap-highlight-color: transparent;
    align-items: center;
    background: #f2faff;
    border: 1px solid rgb(182 213 255 / 78%);
    color: #7183d1;
    display: flex;
    flex-direction: column;
    font-size: clamp(12px, 3.8vw, 15px);
    font-weight: 900;
    gap: 3px;
    justify-content: center;
    line-height: 1;
    min-width: 0;
    padding: 10px 4px;
    text-decoration: none;
}
.course-level-tab:first-child { border-radius: 0 0 0 18px; }
.course-level-tab:last-child { border-radius: 0 0 18px 0; }
.course-level-tab strong { font-size: 1.3em; }
.course-level-tab--active { background: #ffcc08; color: #222939; }

.course-notice {
    background: rgb(255 245 202 / 94%);
    border: 1px solid rgb(255 231 151 / 85%);
    border-radius: 13px;
    color: #736444;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    margin: 12px 0;
    padding: 11px 13px;
}
.course-lesson-list { display: grid; gap: 10px; list-style: none; margin: 18px 0 0; padding: 0; }
.course-lesson-row {
    display: block;
    position: relative;
    scroll-margin-top: 152px;
}
.course-lesson-row--locked { cursor: pointer; }
.course-lesson-row--locked .course-button--locked { cursor: pointer; }
.course-lesson-card {
    background: #f3fbff;
    border: 2px solid #c5e3f3;
    border-radius: 12px;
    box-shadow: 0 2px 3px rgb(32 104 145 / 8%);
    min-width: 0;
    padding: 10px;
}
.course-lesson-row--current .course-lesson-card {
    background: #fffef7;
    border-color: #159bd9;
    box-shadow: 0 2px 4px rgb(22 143 195 / 14%);
}
.course-lesson-row--complete .course-lesson-card { background: #f3fcf6; border-color: #a9dcb9; }
.course-lesson-row--locked .course-lesson-card { background: #f1f8fc; border-color: #cbdde7; }
.course-lesson-row--locating .course-lesson-card {
    animation: course-lesson-locate 520ms linear;
    transform-origin: 50% 50%;
}
@keyframes course-lesson-locate {
    0%, 100% { box-shadow: 0 2px 4px rgb(22 143 195 / 14%); transform: rotate(0); }
    14.3%, 42.9%, 71.5% { box-shadow: 0 0 0 4px rgb(41 182 246 / 18%), 0 5px 12px rgb(21 155 217 / 22%); transform: rotate(-.6deg); }
    28.6%, 57.2%, 85.8% { box-shadow: 0 0 0 4px rgb(41 182 246 / 18%), 0 5px 12px rgb(21 155 217 / 22%); transform: rotate(.6deg); }
}
.course-lesson-heading {
    align-items: center;
    background: #e1f2fd;
    border-bottom: 1px solid #c5e3f3;
    border-radius: 10px 10px 0 0;
    display: grid;
    gap: 10px;
    grid-template-columns: 40px minmax(0, 1fr);
    margin: -10px -10px 8px;
    padding: 10px 10px 8px;
}
.course-lesson-heading-content { min-width: 0; }
.course-lesson-row--current .course-lesson-heading { background: #fff2b8; border-bottom-color: #efd783; }
.course-lesson-row--complete .course-lesson-heading { background: #def3e5; border-bottom-color: #bcdfc9; }
.course-lesson-row--locked .course-lesson-heading { background: #e6f0f6; border-bottom-color: #cbdde7; }
.course-lesson-number {
    align-items: center;
    background: #f8fcff;
    border: 2px solid #bddbec;
    border-radius: 10px;
    color: #32698c;
    display: flex;
    font-size: 16px;
    font-weight: 900;
    height: 40px;
    justify-content: center;
    line-height: 1;
    width: 40px;
}
.course-lesson-row--current .course-lesson-number { background: #ffcb05; border-color: #e7b700; color: #174ea6; }
.course-lesson-row--complete .course-lesson-number { background: #c2e8cd; border-color: #9ed5af; color: #2e6c43; }
.course-lesson-row--locked .course-lesson-number { background: #f7fafc; border-color: #c8d9e3; color: #5e7488; }
.course-lesson-card h2 {
    color: #235b87;
    font-size: clamp(18px, 4.8vw, 22px);
    font-weight: 900;
    line-height: 1.2;
    margin: 0;
    overflow-wrap: anywhere;
}
.course-lesson-row--current h2 { color: #174ea6; }
.course-lesson-row--complete h2 { color: #2e6c43; }
.course-lesson-row--locked h2 { color: #526d82; }
.course-lesson-body { align-items: stretch; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) auto; }
.course-lesson-info { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 60px; min-width: 0; }
.course-lesson-goal { align-items: center; color: #506f82; display: flex; font-size: 12px; font-weight: 700; line-height: 1.35; margin: 0; overflow-wrap: anywhere; padding: 2px 0 7px; }
.course-lesson-kind-row {
    align-items: center;
    display: flex;
    min-height: 25px;
    padding-top: 5px;
    position: relative;
}
.course-lesson-kind-row::before {
    background: #c5e3f3;
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    right: 0;
    top: -1.5px;
}
.course-lesson-row--current .course-lesson-kind-row::before { background: #efdfa3; }
.course-lesson-row--complete .course-lesson-kind-row::before { background: #c4e3ce; }
.course-lesson-row--locked .course-lesson-kind-row::before { background: #d5e3ec; }
.course-lesson-kind {
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
    padding: 3px 7px;
}
.course-lesson-kind--grammar { background: #ece4ff; border-color: #d7c6f5; color: #6443a0; }
.course-lesson-kind--practice { background: #d6f4e4; border-color: #ade3c8; color: #276746; }
.course-lesson-kind--review { background: #ffe6ba; border-color: #f2cd8d; color: #835317; }

.course-button {
    -webkit-tap-highlight-color: transparent;
    align-items: center;
    background-color: #147eac;
    background-image: none;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 2px 3px rgb(23 105 149 / 12%);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    gap: 7px;
    justify-content: center;
    line-height: 1.2;
    min-height: 36px;
    min-width: 0;
    padding: 7px 12px;
    text-align: center;
    text-decoration: none;
    transition: transform 80ms ease, filter 80ms ease;
}
.course-button--primary {
    background-color: #29b6f6;
    background-image: none;
    color: #15407a;
}
.course-button--complete {
    background-color: #a8ddb9;
    background-image: none;
    box-shadow: 0 1px 2px rgb(48 119 76 / 8%);
    color: #235b38;
}
.course-button--locked {
    background-color: #cce4f5;
    background-image: none;
    box-shadow: 0 1px 2px rgb(32 104 145 / 6%);
    color: #4b6579;
}
.course-button:disabled { cursor: default; filter: saturate(.55); opacity: .65; }
.course-button:not(.course-button--locked):active, .course-level-tab:active { filter: brightness(.96); transform: translateY(1px); }
.course-catalog a:focus-visible { outline: 3px solid #623cdb; outline-offset: 3px; }
.course-lesson-card :is(a, button):focus-visible { outline: 3px solid #147eac; outline-offset: 3px; }
.course-lesson-action {
    align-self: center;
    flex-direction: column;
    font-size: 10px;
    gap: 2px;
    height: 60px;
    letter-spacing: .2px;
    min-width: 80px;
    padding: 5px 8px;
    width: max-content;
}
.course-lesson-action-form { align-self: center; font: inherit; margin: 0; }
.course-lesson-action-icon {
    background: currentColor;
    display: block;
    flex: 0 0 25px;
    height: 25px;
    mask: url('/assets/img/svg/graduate.svg') center / contain no-repeat;
    -webkit-mask: url('/assets/img/svg/graduate.svg') center / contain no-repeat;
    width: 25px;
}
.course-lesson-action-label { display: block; line-height: 1.05; max-width: 100%; overflow-wrap: anywhere; transform: translateY(2px); }
.course-lesson-action:active { box-shadow: 0 1px 2px rgb(23 105 149 / 10%); }
.course-lesson-action.course-button--complete:active { box-shadow: 0 1px 2px rgb(48 119 76 / 8%); }
.course-button--locked { cursor: default; }
.course-catalog-footer { background: rgb(255 245 207 / 88%); border: 1px solid rgb(255 255 255 / 72%); border-radius: 18px; color: #696247; margin-top: 22px; padding: 15px; }
.course-catalog-footer strong { color: #514959; font-size: 17px; font-weight: 900; }
.course-catalog-footer p { font-size: 12px; font-weight: 700; line-height: 1.45; margin: 7px 0 0; }

@media (max-width: 359px) {
    .course-catalog { padding-left: 8px; padding-right: 8px; }
    .course-level-tabs { margin-left: -8px; margin-right: -8px; }
    .course-lesson-list { gap: 8px; }
    .course-lesson-heading { gap: 8px; grid-template-columns: 36px minmax(0, 1fr); }
    .course-lesson-number { font-size: 15px; height: 36px; width: 36px; }
    .course-lesson-body { gap: 8px; }
    .course-lesson-info { min-height: 60px; }
    .course-lesson-kind { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .course-catalog * { scroll-behavior: auto !important; transition: none !important; }
    .course-lesson-row--locating .course-lesson-card { animation: none !important; }
}
