:root {
    /* MODULE COLOURS — Reuben can safely adjust these values later. */
    --module-gold: #FFD200;
    --module-road-signs: #ff625c;
    --module-definitions: #9b8cff;
    --module-vehicle-controls: #4aa8ff;
    --module-rules: #49c979;
    --module-road-markings: #48d1c4;
}

body {
    --page-accent: var(--module-gold);
    --page-accent-rgb: 255, 210, 0;
    background:
    linear-gradient(
    180deg,
    #111111 0%,
    #1a1a1a 50%,
    #111111 100%);
    color:white;
    font-family: 'Poppins', sans-serif;
    text-align:center;
    margin:0;
}

.logo{
    transition:transform 0.3s;
    width:220px;
    animation: float 4s ease-in-out infinite;
    margin: 2px auto 2px 0;

}

.logo:hover{
    transform:scale(1.05);
}


h1{
    color:#FFD200;
    font-size:76px;
    font-weight:800;
    line-height:1.1;
    text-shadow:
        0 0 18px rgba(255,210,0,.18);

    margin-top:30px;
    margin-bottom: 45px;
}

p{
    font-size:18px;
    color:#d8d8d8;
    font-style: italic;
    max-width: 800px;
    margin:20px auto;
    line-height: 1.6;
    
}

.hero{
    max-width: 1100px;
    margin: 35px auto;
    text-align: center;
    padding: 20px;
    animation:fadeUp 1.5s ease;
}

body.module-road-signs {
    --page-accent: var(--module-road-signs);
    --page-accent-rgb: 255, 98, 92;
}

.home-header {
    margin-top: 18px;
    margin-bottom: 24px;
}

.home-header .header-logo {
    width: clamp(105px, 8.5vw, 135px);
}

.home-nav {
    flex: 0 1 auto;
}

@media (min-width: 761px) {
    .home-header {
        gap: 36px;
        margin-top: 22px;
        margin-bottom: 32px;
    }

    .home-header .header-logo {
        width: clamp(125px, 10vw, 155px);
    }

    .home-header .home-nav {
        padding: 16px 18px;
        gap: 8px;
    }

    .home-header .home-nav a {
        padding: 12px 15px;
        font-size: 1rem;
    }
}

.hero.home-hero {
    display: block;
    max-width: 1000px;
    margin-top: 0;
    padding-top: 12px;
}

.hero.home-hero h1 {
    max-width: 860px;
    margin: 10px auto 38px;
    text-align: center;
    font-size: clamp(2.4rem, 5vw, 3.2rem);
    font-weight: 700;
    font-style: normal;
    line-height: 1.2;
    letter-spacing: 0.035em;
}

.hero.home-hero > h2 {
    margin: 0 auto 20px;
    font-size: 1.2rem;
    color: #f4f4f4;
    font-weight: 700;
}

.hero.home-hero .tagline {
    letter-spacing: 0.045em;
}

.hero.home-hero .hero-practice-panel {
    box-sizing: border-box;
    width: min(1000px, calc(100% - 32px));
    max-width: 1000px;
    margin: 24px auto 26px;
    padding: 18px 26px;

    color: #f6f6f6;
    font-size: 1.05rem;
    font-weight: 500;
    font-style: normal;
    text-align: center;
    white-space: nowrap;

    background:
        linear-gradient(
            135deg,
            rgba(255, 210, 0, 0.15),
            rgba(255, 210, 0, 0.045)
        );
    border: 1px solid rgba(255, 210, 0, 0.48);
    border-radius: 20px;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.34),
        0 0 24px rgba(255, 210, 0, 0.12),
        inset 0 0 18px rgba(255, 210, 0, 0.045);
}

.hero.home-hero .hero-examiner-line {
    max-width: 1000px;
    margin: 24px auto 46px;
    color: #f4f4f4;
    font-weight: 700;
    font-style: italic;
}

@media (max-width: 600px) {
    .hero.home-hero h1 {
        letter-spacing: 0.018em;
    }

    .hero.home-hero .tagline {
        letter-spacing: 0.025em;
    }

    .hero.home-hero .hero-practice-panel {
        width: 100%;
        padding: 16px 18px;
        border-radius: 16px;
        white-space: normal;
    }
}

.home-hero + .features {
    padding-top: 110px;
}

@media (max-width: 760px) {
    .home-hero + .features {
        padding-top: 80px;
    }
}

@media (min-width: 701px) {
    .hero {
        display: grid;
        grid-template-columns: 250px minmax(0, 1fr);
        align-items: center;
        column-gap: clamp(36px, 6vw, 76px);
        padding-top: 34px;
    }

    .hero .logo {
        grid-column: 1;
        justify-self: start;
        width: 220px;
        margin: 0;
    }

    .hero h1 {
        grid-column: 2;
        width: 100%;
        margin: 0;
        text-align: left;
    }

    .hero > h2,
    .hero > p,
    .hero > .tagline,
    .hero > button {
        grid-column: 1 / -1;
    }

    .hero > h2 {
        margin: 56px auto 20px;
    }

    .hero > button {
        width: fit-content;
        justify-self: center;
    }
}

@keyframes fadeUp {
    from{
        opacity:0;
        transform:translateY(40px);
    }
    
    to{
    opacity: 1;
    transform:translateY(0);
    }
}

button{

    background:#FFD200;
    color:black;
    border:none;
    padding:22px 60px;
    font-size:22px;
    font-weight:bold;
    letter-spacing:1px;
    border-radius:12px;
    cursor:pointer;
    margin-top:30px;
    transition: 0.3s;
    box-shadow:0 0 20px rgba(255,210,0,.25);

    opacity: 0;

    animation: fadeUp 1s ease;
    animation-delay: 0.8s;
    animation-fill-mode: forwards;
}

button:hover {

    transform: scale(1.08);
    box-shadow:0 0 35px rgba(255,210,0,.6);
    background: #ffdf4d;    
}

.white {
    color: hsl(0, 20%, 99%);
    font-weight:900;
    text-shadow:4px 4px 12px rgba(0,0,0,.6)
}

h2{
    font-size:18px;
    color:#d8d8d8;
    font-style: italic;
    max-width: 1000px;
    margin:20px;
    line-height: 1.2;
    
}

h3{
    font-size:18px;
    color:#d8d8d8;
    font-style: italic;
    max-width: 1000px;
    margin:20px auto;
    line-height: 1.2;
}

nav {
    background: #1b1b1b;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    transition: 0.3s;
}
nav a:hover{
    color: #FFD200;
    transform:scale(1.1);
}

@keyframes float{
    0%{
        transform:translateY(0px);
    }

    50%{transform:translateY(-8px);
    }

    100%{transform:translateY(0px);
    }
}

.tagline{
    font-size:30px;
    font-weight:700;
    color:#FFD200;
    
}

.gold{
    color:#FFD200;

}

.features{
    padding:80px 20px;
    text-align: center;
}

.features-title {
    text-align: center;
    font-size: 42px;
    color: #FFD200;
    margin-bottom: 70px;
}

.features-container{

    display: flex;

    justify-content:center;

    gap:40px;

    flex-wrap:wrap;
}

.feature-card{

    min-height: 320px;
    display:flex;
    flex-direction: column;
    align-items:center;
    justify-content: flex-start;

    background:#1b1b1b;
    border-radius:24px;
    padding:40px;

    width:260px;

    transition:
    transform .35s ease,
    box-shadow .35s ease,
    border-color .35s ease,
    opacity .8s ease;

    border:1px solid rgba(255,210,0,.15);

    box-shadow:0 10px 30px rgba(0,0,0,.35);
    overflow:hidden;
    position:relative;

    opacity:0;
    transform: translateY(40px);

}

.feature-card.show{

    opacity:1;
    transform: translateY(0);

}

.feature-card:nth-child(1){
    transition-delay:0s;
}

.feature-card:nth-child(2){
    transition-delay:.15s;
}

.feature-card:nth-child(3){
    transition-delay:.30s;
}

.feature-card:nth-child(4){
    transition-delay:.45s;
}

.feature-card::before{

    content:"";

    position:absolute;

    top:0;
    left:-100%;

    width:100%;
    height:4px;

    background:#FFD200;

    transition:0.5s;

}

.feature-card:hover::before{

    left:0;

}

.feature-card:hover{

    transform:translateY(-15px) scale(1.03);

    border-color:#FFD200;

    box-shadow:
        0 20px 45px rgba(255,210,0,.25),
    0 0 35px rgba(255,210,0,.15);

}

.icon{

    font-size: 72px;

    margin-bottom:20px;

    transition:0.3s;

}

.feature-card:hover .icon{

     transform:scale(1.2) rotate(5deg);

    transition:transform .35s ease;

}

.feature-card h3{

    color:#FFD200;

    font-size:24px;

    margin-bottom:15px;

}

.feature-card p{

    font-size:16px;

    color:#d8d8d8;

    line-height:1.6;

}

.examiner{
    width: 150px;
    height: 150px;
    object-fit:contain;
    transition: 0.3s;
}

.feature-card:hover  .examiner{
    transform:scale(1.08);
}

.feature-card:nth-child(1) > .icon,
.feature-card:nth-child(3) > .icon,
.feature-card:nth-child(4) > .icon {
    display: none;
}

.feature-card:nth-child(2) > .icon {
    width: 100%;
    height: 150px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon-wrap {
    width: 100%;
    height: 150px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.42));
    transition: transform 0.4s ease, filter 0.4s ease;
}

.feature-card:hover .benefit-icon {
    transform: translateY(-3px) scale(1.08);
    filter:
        drop-shadow(0 14px 18px rgba(0, 0, 0, 0.46))
        drop-shadow(0 0 11px rgba(255, 210, 0, 0.16));
}

.journey-container{

    display:flex;

    justify-content:center;

    align-items:flex-start;

    gap:40px;

    margin-top:60px;

    flex-wrap:wrap;

}

.journey-step{

    text-align:center;

    width:220px;

    padding:30px;

    transition:transform .35s ease;

    position:relative;

}

.journey-step:not(:last-child)::after{

    content:"→";

    position:absolute;

    right:-45px;

    top:65px;

    font-size:40px;

    color:#FFD200;

    font-weight:bold;

}

.journey-step{

    text-align:center;

    width:260px;

    padding:30px;

    transition:transform .35s ease;

}

.journey-step:hover{

    transform:translateY(-10px);

}

.journey-link{

    text-decoration:none;

    color:inherit;

    display:block;

}

.journey-link:hover .journey-step{

    transform:translateY(-10px);

}

.journey-container{

    display:flex;

    justify-content:center;

    align-items:flex-start;

    gap:40px;

    margin-top:60px;

    flex-wrap:wrap;

}

/* =========================
   LEARNING SECTION
========================= */

/* HOMEPAGE LEARNING JOURNEY */

.journey {
    padding: 90px 5%;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 210, 0, 0.025), rgba(0, 0, 0, 0.12));
}

.hero h1 {
    max-width: 860px;
    margin: 30px auto 38px;
    font-size: clamp(3rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
    text-shadow: 0 0 16px rgba(255, 210, 0, 0.14);
}

.attention-pulse {
    animation: cardAttentionPulse 1.65s ease-in-out both;
}

@keyframes cardAttentionPulse {
    0%,
    100% {
        transform: translateY(0) scale(1);
        border-color: rgba(255, 210, 0, 0.18);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }

    48% {
        transform: translateY(-9px) scale(1.025);
        border-color: #FFD200;
        box-shadow:
            0 18px 38px rgba(255, 210, 0, 0.25),
            0 0 24px rgba(255, 210, 0, 0.16);
    }
}

@media (prefers-reduced-motion: reduce) {
    .attention-pulse {
        animation: none;
    }

    .card-animation-ready .learning-card {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

.journey-title {
    max-width: none;
    margin: 0 auto 18px;
    color: #FFD200;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-style: normal;
}

.journey-container {
    gap: 18px;
    align-items: center;
}

.journey-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    color: transparent;
    font-size: 0;
}

.journey-arrow::before {
    content: "→";
    color: #FFD200;
    font-size: 2.1rem;
    font-weight: 800;
    filter: drop-shadow(0 0 8px rgba(255, 210, 0, 0.38));
}

.journey-link {
    pointer-events: auto;
}

.journey-step {
    box-sizing: border-box;
    width: 225px;
    min-height: 338px;
    padding: 32px 26px;
    background: #1b1b1b;
    border: 1px solid rgba(255, 210, 0, 0.18);
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    isolation: isolate;
}

.journey-step::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: #FFD200;
    transition: left 0.45s ease;
}

.journey-step:not(:last-child)::after {
    content: none;
}

.journey-step:hover {
    transform: translateY(-14px) scale(1.025);
    border-color: #FFD200;
    box-shadow:
        0 20px 45px rgba(255, 210, 0, 0.20),
        0 0 30px rgba(255, 210, 0, 0.10);
}

.journey-step:hover::before {
    left: 0;
}

.journey-icon {
    min-height: 112px;
    margin-bottom: 18px;
    font-size: 0;
    line-height: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
}

.journey-icon::before {
    display: none;
}

.journey-icon .journey-symbol {
    width: 78px;
    height: 78px;
    object-fit: contain;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.38));
    transition: transform 0.45s ease, filter 0.45s ease;
}

.journey-icon .journey-coach {
    width: 84px;
    height: 108px;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.42));
    transition: transform 0.45s ease, filter 0.45s ease;
}

.journey-link:nth-of-type(3) .journey-icon {
    flex-direction: row-reverse;
}

.journey-link:nth-of-type(1) .journey-icon::before { content: "📖"; }
.journey-link:nth-of-type(2) .journey-icon::before { content: "💻"; }
.journey-link:nth-of-type(3) .journey-icon::before { content: "📈"; }
.journey-link:nth-of-type(4) .journey-icon::before { content: "🏆"; }

.journey-step:hover .journey-icon::before {
    transform: scale(1.16) rotate(4deg);
}

.journey-step:hover .journey-symbol {
    transform: translateY(-4px) scale(1.08);
    filter:
        drop-shadow(0 12px 16px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 10px rgba(255, 210, 0, 0.18));
}

.journey-step:hover .journey-coach {
    transform: translateY(-3px) scale(1.04);
    filter:
        drop-shadow(0 12px 16px rgba(0, 0, 0, 0.46))
        drop-shadow(0 0 9px rgba(255, 210, 0, 0.13));
}

.journey-step.attention-pulse {
    animation-name: journeyCardAttentionPulse;
}

.journey-step.attention-pulse .journey-icon {
    animation: journeyArtworkAttention 1.65s ease-in-out both;
}

@keyframes journeyCardAttentionPulse {
    0%,
    100% {
        transform: translateY(0) scale(1);
        border-color: rgba(255, 210, 0, 0.18);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }

    48% {
        transform: translateY(0) scale(1);
        border-color: #FFD200;
        box-shadow:
            0 18px 38px rgba(255, 210, 0, 0.25),
            0 0 24px rgba(255, 210, 0, 0.16);
    }
}

@keyframes journeyArtworkAttention {
    0%,
    100% {
        transform: translateY(0);
    }

    48% {
        transform: translateY(-7px);
    }
}

.journey-step h3 {
    min-height: 58px;
    margin: 0 auto 12px;
    color: #FFD200;
    font-size: 1.2rem;
    font-style: normal;
}

.journey-step p {
    margin: 0 auto;
    color: #d8d8d8;
    font-size: 0.94rem;
    font-style: normal;
}

@media (max-width: 1180px) {
    .journey-arrow {
        display: none;
    }
}

@media (max-width: 700px) {
    .logo {
        width: 120px;
        margin-left: auto;
    }

    body > nav {
        flex-wrap: wrap;
        gap: 8px 14px;
        padding: 12px 10px;
    }

    body > nav a {
        font-size: 0.78rem;
        line-height: 1.25;
    }

    .hero {
        margin: 12px auto 24px;
        padding: 12px 18px 28px;
    }

    .hero h1 {
        margin: 18px auto 26px;
        font-size: clamp(2.4rem, 13vw, 3.65rem);
        line-height: 1.04;
        overflow-wrap: anywhere;
    }

    .hero h2 {
        margin-inline: auto;
        font-size: 1rem;
        line-height: 1.45;
    }

    .hero p {
        font-size: 0.98rem;
    }

    .hero .tagline {
        font-size: 1.4rem;
    }

    .hero button {
        width: 100%;
        max-width: 320px;
        padding: 17px 20px;
        font-size: 1rem;
    }

    .features,
    .journey,
    .learning-section {
        padding: 64px 18px;
    }

    .features-title,
    .journey-title,
    .learning-title {
        font-size: clamp(1.8rem, 9vw, 2.35rem);
        line-height: 1.15;
    }

    .journey-container,
    .learning-container {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .journey-container {
        flex-direction: column;
        align-items: stretch;
    }

    .journey-link,
    .journey-step,
    .learning-card {
        width: 100%;
        max-width: 390px;
        margin-inline: auto;
    }

    .learning-container {
        display: grid;
        gap: 22px;
    }

    .learning-card {
        min-height: 330px;
        padding: 32px 22px;
    }
}

.learning-section {
    padding: 100px 8%;
    text-align: center;
}

.learning-title {
    color: #ffcc33;
    font-size: 42px;
    font-style: italic;
    margin-bottom: 20px;
}

.features .features-title,
.journey .journey-title,
.learning-section .learning-title {
    width: 100%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    color: #FFD200;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    font-style: normal;
    line-height: 1.2;
    letter-spacing: normal;
    text-align: center;
}

.features .features-title {
    margin-top: 0;
    margin-bottom: 70px;
}

.journey .journey-title {
    margin-top: 0;
    margin-bottom: 18px;
}

.learning-section .learning-title {
    margin-top: 0;
    margin-bottom: 20px;
}

.learning-intro {
    color: #eeeeee;
    font-size: 20px;
    font-style: italic;
    margin-bottom: 60px;
}

.learning-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.learning-card {
    background: #1c1c1c;
    border: 1px solid #5b4a1b;
    border-radius: 20px;
    padding: 40px 25px;
    min-height: 360px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;

    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.card-animation-ready .learning-card {
    opacity: 0;
    transform: translateY(26px);
}

.card-animation-ready .learning-card.learning-card-visible {
    animation: learningCardFadeIn 1.1s ease forwards;
}

@keyframes learningCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(26px);
    }

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

.learning-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 25px rgba(255, 204, 51, 0.25);
}

.learning-icon {
    font-size: 55px;
    margin-bottom: 20px;
}

.learning-card:nth-child(3) > .learning-icon {
    display: none;
}

.learning-card:nth-child(1) > .learning-icon {
    display: none;
}

.learning-card:nth-child(2) > .learning-icon {
    display: none;
}

.learning-card:nth-child(4) > .learning-icon {
    display: none;
}

.rules-of-road-wrap,
.road-markings-wrap {
    width: 100%;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.rules-of-road-icon,
.road-markings-icon {
    width: min(245px, 100%);
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
    transition: transform 0.35s ease, filter 0.35s ease;
}

.learning-card:hover .rules-of-road-icon,
.learning-card:hover .road-markings-icon {
    transform: scale(1.06);
    filter:
        drop-shadow(0 12px 16px rgba(0, 0, 0, 0.38))
        drop-shadow(0 0 10px rgba(255, 210, 0, 0.14));
}

.road-signs-cluster-wrap {
    width: 100%;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.road-signs-cluster-icon {
    width: min(245px, 100%);
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
    transition: transform 0.35s ease, filter 0.35s ease;
}

.learning-card:hover .road-signs-cluster-icon {
    transform: scale(1.06);
    filter:
        drop-shadow(0 12px 16px rgba(0, 0, 0, 0.38))
        drop-shadow(0 0 10px rgba(255, 210, 0, 0.14));
}

.vehicle-trio-wrap {
    width: 100%;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.vehicle-trio-icon {
    width: min(245px, 100%);
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
    transition: transform 0.35s ease, filter 0.35s ease;
}

.learning-card:hover .vehicle-trio-icon {
    transform: scale(1.06);
    filter:
        drop-shadow(0 12px 16px rgba(0, 0, 0, 0.38))
        drop-shadow(0 0 10px rgba(255, 210, 0, 0.14));
}

@media (max-width: 700px) {
    .rules-of-road-icon,
    .road-markings-icon,
    .road-signs-cluster-icon,
    .vehicle-trio-icon {
        width: min(280px, 100%);
        height: 104px;
    }
}

.learning-card h3 {
    color: #ffcc33;
    font-size: 24px;
    font-style: italic;
    margin-bottom: 20px;
}

.learning-card p {
    color: #dddddd;
    font-size: 17px;
    line-height: 1.6;
    font-style: italic;
}

.learning-card button,
.learning-card .learning-button {
    display: inline-block;
    background: #ffcc33;
    color: #111111;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 17px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    margin-top: 30px;

    box-shadow: 0 0 15px rgba(255, 204, 51, 0.25);

    transition: transform 0.2s ease,
                box-shadow 0.2s ease;
}

.learning-card button:hover,
.learning-card .learning-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 204, 51, 0.5);
    background: #ffdf4d;
}

/* =========================
   ROAD SIGNS LEARNING PAGE
========================= */

.road-signs-page {
    padding: 6px 8% 14px;
    text-align: center;
}

.road-signs-header {
    margin-top: 22px;
    margin-bottom: 18px;
}

.lesson-dashboard-header {
    margin-top: 22px;
    margin-bottom: 18px;
}

.learning-hero h1 {
    width: 100%;
    max-width: none;
    margin: 0 auto 12px;
    color: #FFD200;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    font-style: normal;
    line-height: 1.2;
    letter-spacing: normal;
    text-align: center;
    text-shadow: none;
}

.learning-hero p {
    font-size: 1.08rem;
    font-style: italic;
    margin: 0 auto;
    text-align: center;
}

.learning-hero p strong {
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.9);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.learning-hero .sign-number {
    width: 100%;
    max-width: none;
    margin: 0 auto 12px;
    text-align: center;
}

.sign-introduction {
    max-width: 1000px;
    margin: 18px auto 18px;
}

.learning-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 17px 24px;
    background: linear-gradient(90deg, rgba(255, 210, 0, 0.065), rgba(255, 210, 0, 0.018));
    border: 1px solid rgba(255, 210, 0, 0.24);
    border-radius: 18px;
}

.learning-message h2 {
    color: #ffcc33;
    font-size: 2rem;
}

.learning-message p {
    width: 100%;
    max-width: 820px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    text-align: center;
}

.learning-message .learning-message-lead {
    color: #ffffff;
    font-weight: 700;
}

.sign-categories h2 {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    color: #ffcc33;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-style: normal;
    letter-spacing: 1.2px;
    margin-bottom: 6px;
    text-align: center;
}

.sign-category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px;
    max-width: 1200px;
    margin: auto;
}

.sign-category-card {
    background: #1c1c1c;
    border: 1px solid #5c4b18;
    border-radius: 20px;
    padding: 16px 18px;
    min-height: 292px;
    display: grid;
    grid-template-rows: 82px 42px 1fr auto;
    row-gap: 8px;
    align-items: center;
    text-align: center;
    grid-column: auto;
    position: relative;
    overflow: visible;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.sign-category-card::before {
    display: none;
}

.sign-category-card:hover {
    transform: translateY(-10px);
    border-color: #FFD200;
    box-shadow: 0 18px 36px rgba(255, 210, 0, 0.16);
}

.sign-category-card:hover::before {
    left: 0;
}

.category-icon {
    width: 100%;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    transition: transform 0.3s ease;
}

.category-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.38));
}

.sign-category-card:hover .category-icon {
    transform: translateY(-4px);
}

.sign-category-card h3 {
    color: #ffcc33;
    font-size: 1.2rem;
    margin: 0;
    align-self: center;
}

.sign-category-card p,
.category-copy p {
    font-size: 0.94rem;
    line-height: 1.6;
    margin: 0;
    align-self: center;
}

.category-copy {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.category-copy > span {
    color: #d8b84a;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.category-intro {
    margin: 0 auto 16px;
    font-style: normal;
}

.learn-button,
.category-coming-soon {
    display: inline-block;
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
}

.road-signs-final-test {
    width: min(1000px, 100%);
    margin: 34px auto 8px;
    padding: 24px 28px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: center;
    text-align: left;
    background: linear-gradient(120deg, rgba(255, 210, 0, 0.07), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(255, 210, 0, 0.25);
    border-radius: 20px;
}

.road-signs-final-test h2,
.road-signs-final-test p {
    margin: 0;
}

.road-signs-final-test h2 {
    margin: 4px 0 6px;
    color: #f4f4f4;
    font-size: 1.12rem;
}

.road-signs-final-test p:last-child {
    font-size: 0.9rem;
    font-style: normal;
}

.final-test-lock {
    font-size: 1.8rem;
}

.final-test-button[aria-disabled="true"] {
    pointer-events: none;
    color: #a7a7a7;
    background: #2a2a2a;
    box-shadow: none;
}

@media (max-width: 700px) {
    .road-signs-final-test {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .final-test-button {
        width: 100%;
    }
}

.learn-button {
    color: #111111;
    background: #ffcc33;
    box-shadow: 0 0 15px rgba(255, 204, 51, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.learn-button:hover {
    transform: scale(1.035);
    box-shadow: 0 0 25px rgba(255, 204, 51, 0.46);
}

.category-coming-soon {
    color: #a9a9a9;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

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

    .sign-category-card,
    .sign-category-card:nth-child(4),
    .sign-category-card:nth-child(5) {
        grid-column: auto;
    }

    .sign-category-card:last-child {
        grid-column: 1 / -1;
        width: min(100%, 390px);
        justify-self: center;
    }
}

@media (max-width: 600px) {
    .road-signs-page {
        padding: 14px 16px 60px;
    }

    .learning-hero h1 {
        font-size: clamp(1.9rem, 9vw, 2.25rem);
    }

    .learning-hero p {
        font-size: 0.98rem;
        line-height: 1.55;
    }

    .sign-introduction {
        margin: 22px auto 30px;
    }

    .learning-message {
        flex-direction: column;
        gap: 6px;
        padding: 15px 16px;
        border-radius: 15px;
    }

    .learning-message p {
        font-size: 0.94rem;
    }

    .sign-category-grid {
        grid-template-columns: 1fr;
    }

    .sign-category-card,
    .sign-category-card:last-child {
        grid-column: auto;
        width: 100%;
        min-height: 350px;
    }
}

.sign-category-card button {
    background: #ffcc33;
    border: none;
    border-radius: 12px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.sign-category-card button:hover {
    transform: scale(1.05);
}

/* =========================
   REGULATORY SIGN LESSON
========================= */

.stop-sign {

    width: 180px;
    height: 180px;

    background: #d62828;

    color: white;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 36px;
    font-weight: 800;

    border: 12px solid white;

    outline: 6px solid #d62828;

    transform: rotate(-45deg);

    border-radius: 12px;

    box-shadow:
        0 0 0 8px #111,
        0 15px 35px rgba(0,0,0,.5);

    margin: 50px auto;
}

.stop-sign::first-line {
    transform: rotate(-45deg);
}

/* =========================
   INFORMATION SIGN LESSON
========================= */

.sign-learning-page {
    padding: 42px 8% 60px;
    text-align: center;
}

.sign-learning-hero {
    max-width: 1000px;
    margin: 0 auto 40px;
}

.sign-learning-hero .sign-number {
    margin: 0 0 30px;
}

.sign-number {
    display: block;
    margin: 0 0 17px;
    padding: 0;
    color: #d8b84a;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sign-learning-hero h1 {
    color: #d6d6d6;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 32px;
}

.sign-learning-hero p {
    max-width: 820px;
    margin: 0 auto;
    color: #f5f5f5;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.6;
}

.sign-learning-card {
    max-width: 1100px;
    margin: 0 auto 64px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 38px;
    align-items: center;

    background: #1c1c1c;
    border: 1px solid #5c4b18;
    border-radius: 25px;
    padding: 36px 42px;
}

.sign-image-area img {
    width: min(225px, 100%);
    max-height: 400px;
    margin-inline: auto;
    object-fit: contain;
    transform: translateY(-10px);
}

.coach-review-card {
    max-width: 1120px;
    margin: 0 auto 52px;
    padding: 22px 28px;
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 24px;
    align-items: center;
    background: linear-gradient(110deg, rgba(255, 204, 0, 0.09), rgba(24, 24, 24, 0.96) 38%);
    border: 1px solid rgba(255, 204, 0, 0.46);
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.coach-review-card[hidden] {
    display: none;
}

.coach-review-card img {
    width: 112px;
    height: 122px;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.38));
}

.coach-review-copy h2 {
    margin: 3px 0 7px;
    color: #ffcf24;
    font-size: 1.35rem;
}

.coach-review-copy p:last-child {
    margin: 0;
    color: #eee;
    line-height: 1.55;
}

.coach-review-copy [data-review-codes] {
    color: #ffcf24;
    font-weight: 800;
}

.coach-review-link {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .coach-review-card {
        grid-template-columns: 82px 1fr;
        gap: 16px;
        padding: 18px;
    }

    .coach-review-card img {
        width: 78px;
        height: 92px;
    }

    .coach-review-link {
        grid-column: 1 / -1;
        width: 100%;
        text-align: center;
    }
}

.lesson-sequence {
    width: min(760px, 100%);
    margin: 0 auto 24px;
    color: #d8b84a;
    font-size: 0.68rem;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.lesson-sequence-track {
    height: 5px;
    margin-top: 9px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.lesson-sequence-track span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #c69f00, #ffd200);
    border-radius: inherit;
    box-shadow: 0 0 10px rgba(255, 210, 0, 0.35);
}

.lesson-load-error {
    width: min(620px, calc(100% - 32px));
    margin: 80px auto;
    padding: 38px;
    background: #1c1c1c;
    border: 1px solid #5c4b18;
    border-radius: 22px;
}

.final-assessment-page {
    width: min(980px, calc(100% - 32px));
    margin: 36px auto 70px;
}

.final-assessment-heading {
    margin-bottom: 28px;
}

.final-assessment-heading h1,
.final-assessment-locked h1,
.final-test-result h1 {
    color: #ffd200;
}

.final-question-card,
.final-assessment-locked,
.final-test-result {
    padding: clamp(24px, 5vw, 44px);
    background: #1c1c1c;
    border: 1px solid #5c4b18;
    border-radius: 24px;
}

.final-test-status {
    display: flex;
    justify-content: space-between;
    color: #d8b84a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.final-test-progress {
    height: 7px;
    margin: 10px 0 24px;
    overflow: hidden;
    background: #333;
    border-radius: 999px;
}

.final-test-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #c79f00, #ffd200);
}

.final-question-category {
    margin: 0 auto 12px;
    color: #ffcc33;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.final-question-image {
    width: min(190px, 60%);
    height: 190px;
    margin: 0 auto 20px;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.38));
}

.final-question-card h2 {
    margin-bottom: 22px;
    color: #fff;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
}

.final-next-question {
    margin-top: 18px;
    border: 0;
    cursor: pointer;
}

.final-assessment-locked > span {
    display: block;
    margin-bottom: 10px;
    font-size: 2.4rem;
}

.final-result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

.final-result-actions button {
    border: 0;
    cursor: pointer;
}

@media (max-width: 520px) {
    .final-test-status {
        flex-direction: column;
        gap: 4px;
    }

    .final-question-image {
        height: 150px;
    }

    .final-result-actions .dashboard-button {
        width: 100%;
    }
}

.sign-image-area {
    position: relative;
    min-height: 245px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(255, 210, 0, 0.07), rgba(12, 12, 12, 0.18));
    border: 1px solid rgba(255, 210, 0, 0.2);
    border-radius: 20px;
}

.sign-image-name {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 0;
    width: max-content;
    max-width: calc(100% - 24px);
    margin: 0;
    padding: 6px 13px;
    transform: translate(-50%, 50%);
    color: #f2f2f2;
    background: #181818;
    border: 1px solid rgba(255, 204, 0, 0.52);
    border-radius: 999px;
    font-size: clamp(0.58rem, 0.8vw, 0.7rem);
    font-style: italic;
    font-weight: 700;
    letter-spacing: 1.25px;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.28);
}

.lesson-position-cue {
    margin: 18px 0 0;
    padding: 7px 12px;
    color: #fff2bb;
    background: rgba(255, 204, 0, 0.08);
    border: 1px solid rgba(255, 204, 0, 0.42);
    border-radius: 999px;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 1.15px;
    line-height: 1.35;
    text-align: center;
}

.sign-image-area .lesson-sign-stop {
    width: min(185px, 100%);
    clip-path: polygon(29% 0, 71% 0, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0 71%, 0 29%);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.sign-content {
    text-align: left;
}

.learning-block {
    margin-bottom: 10px;
    padding: 13px 16px;
    background: rgba(10, 10, 10, 0.28);
    border-left: 3px solid rgba(255, 210, 0, 0.58);
    border-radius: 0 12px 12px 0;
}

.learning-block:last-child {
    margin-bottom: 0;
}

.learning-block h2 {
    margin: 0 0 6px;
    color: #ffcc33;
    font-size: 1.2rem;
}

.learning-block p {
    margin: 0;
    color: #f1f1f1;
    font-size: 1rem;
    line-height: 1.55;
}

.knowledge-check {
    width: min(810px, 100%);
    max-width: none;
    margin: 0 auto;

    background: linear-gradient(145deg, rgba(255, 210, 0, 0.035), #1c1c1c 42%);
    border: 1px solid #5c4b18;
    border-radius: 25px;
    padding: 30px 44px 34px;
}

.knowledge-check h2 {
    margin: 4px 0 0;
    color: #ffcc33;
    font-size: 1.18rem;
    font-weight: 700;
}

.knowledge-check p {
    font-size: 1.08rem;
    margin: 14px 0 22px;
}

.knowledge-check > .check-stage {
    margin: 0;
    color: #d8b84a;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.knowledge-check > h2 + p {
    color: #ffffff;
    font-weight: 700;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-options button {

    min-height: 54px;
    padding: 14px 22px;

    border: 2px solid rgba(255, 204, 51, 0.45);

    border-radius: 14px;

    background: #1a1a1a;

    color: #dddddd;

    font-size: 1rem;

    font-weight: 400;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.answer-options button:hover {

    transform: translateY(-3px);

    border-color: #ffcc33;

    background: #222222;

    box-shadow:
        0 0 18px rgba(255, 204, 51, 0.35);

}

#feedback {
    margin-top: 25px;
    font-size: 1.2rem;
    font-weight: bold;
}

.correct-answer {
    color: #7CFC00;
}

.wrong-answer {
    color: #ffcc33;
}


/* MOBILE */

@media (max-width: 800px) {

    .lesson-dashboard-header {
        margin-bottom: 0;
    }

    .sign-learning-page {
        padding-top: 8px;
    }

    .sign-learning-hero {
        margin-bottom: 32px;
    }

    .sign-learning-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
        border-radius: 22px;
    }

    .sign-image-area {
        min-height: 190px;
        padding: 20px;
        margin-bottom: 12px;
        border-radius: 16px;
    }

    .sign-image-name {
        max-width: calc(100% - 14px);
        padding: 6px 10px;
        font-size: 0.58rem;
        letter-spacing: 0.9px;
    }

    .sign-image-area img {
        transform: translateY(-6px);
    }

    .sign-image-area .lesson-sign-stop {
        width: min(145px, 58vw);
    }

    .sign-learning-hero h1 {
        font-size: clamp(1.45rem, 6.5vw, 1.8rem);
    }

    .sign-content {
        text-align: left;
    }

    .learning-block {
        padding: 13px 14px;
    }

    .learning-block h2 {
        font-size: 1.08rem;
    }

    .learning-block p {
        font-size: 0.95rem;
    }

    .sign-learning-hero p {
        font-size: 0.98rem;
    }

}

.sign-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sign-learning-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    margin-bottom: 28px;
}

.sign-learning-hero .sign-number,
.sign-learning-hero h1,
.sign-learning-hero > p {
    margin: 0;
}

.title-arrow {
    color: #ffcc33;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

@media (min-width: 801px) {
    .sign-learning-page {
        padding-top: 8px;
    }

    .sign-learning-hero {
        margin-bottom: 28px;
    }

    .sign-learning-card {
        gap: 40px;
        grid-template-columns: 0.8fr 1.2fr;
        padding: 30px 42px;
    }
}

.sign-learning-hero h1 {
    color: #FFD200;
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

/* =========================
   LEARNER DASHBOARD
========================= */

.learner-dashboard {
    width: min(1180px, 90%);
    margin: 0 auto;
    padding: 50px 0 100px;
}

.dashboard-welcome {
    margin-bottom: 50px;
}

.dashboard-label,
.continue-label {
    color: #c9a227;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.dashboard-welcome h1 {
    color: #e2e2e2;
    font-size: clamp(2.2rem, 4.4vw, 3.35rem);
    line-height: 1.08;
    margin: 12px 0;

    text-shadow:
        0 0 18px rgba(255, 210, 0, 0.14);
}

.dashboard-welcome p {
    color: #bdbdbd;
    font-size: 1.1rem;
}

.continue-card,
.readiness-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;

    margin-bottom: 65px;
    padding: 36px;

    background: #181818;
    border: 1px solid rgba(255, 210, 0, 0.35);
    border-radius: 22px;

    box-shadow:
        0 0 22px rgba(255, 210, 0, 0.08);
}

.continue-card h2,
.readiness-card h2 {
    color: #dedede;
    margin: 8px 0 10px;
}

.continue-card p,
.readiness-card p {
    color: #bdbdbd;
}

.dashboard-button,
.dashboard-card-link {
    display: inline-block;

    padding: 14px 24px;

    color: #111;
    background: #d9ad28;

    border-radius: 12px;

    font-weight: 600;
    text-decoration: none;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.dashboard-button:hover,
.dashboard-card-link:hover {
    transform: translateY(-3px);

    box-shadow:
        0 0 20px rgba(255, 210, 0, 0.35);
}

.dashboard-section {
    margin-bottom: 65px;
}

.dashboard-section > h2 {
    width: 100%;
    max-width: none;
    color: #dedede;
    font-size: 2rem;
    margin: 0 auto 30px;
    text-align: center;
}

.dashboard-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(320px, 1fr));

    gap: 28px;

}

.dashboard-card {
    padding: 30px;

    position: relative;
    display: flex;
    flex-direction: column;

    background: #181818;
    border: 1px solid rgba(255, 210, 0, 0.25);
    border-radius: 20px;

    text-align: left;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.dashboard-card:hover {
    transform: translateY(-6px);
    border-color: #d9ad28;

    box-shadow:
        0 0 24px rgba(255, 210, 0, 0.18);
}

.dashboard-icon {
    display: none;
}

.dashboard-art {
    width: 100%;
    height: 100px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.dashboard-art img {
    width: 165px;
    height: 100px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.38));
    transition: transform 0.35s ease, filter 0.35s ease;
}

.dashboard-card:hover .dashboard-art img {
    transform: translateY(-3px) scale(1.05);
    filter:
        drop-shadow(0 12px 16px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 9px rgba(255, 210, 0, 0.13));
}

.dashboard-card h3 {
    color: #dedede;
    font-size: 1.45rem;
    margin-bottom: 8px;
}

.dashboard-card p {
    color: #bdbdbd;
}

.progress-track {
    width: 100%;
    height: 12px;

    margin: 18px 0 8px;

    overflow: hidden;

    background: #303030;
    border-radius: 999px;
}

.progress-fill {
    height: 100%;

    background:
        linear-gradient(
            90deg,
            #a98215,
            #ffd200
        );

    border-radius: inherit;

    box-shadow:
        0 0 12px rgba(255, 210, 0, 0.35);
}

.progress-text {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.readiness-lock {
    font-size: 4rem;
}


@media (max-width: 800px) {

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .continue-card,
    .readiness-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-button {
        width: 100%;
        text-align: center;
    }

}

@media (max-width: 1100px) {

    .learner-dashboard {
        width: min(94%, 1000px);
    }

    .dashboard-grid {
        gap: 20px;
    }

    .dashboard-card {
        padding: 24px;
    }

    .continue-card,
    .readiness-card {
        padding: 28px;
    }

}

.continue-card,
.readiness-card,
.dashboard-card {
    box-sizing: border-box;
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   K53 KISS RESPONSIVE SAFETY FIXES
========================================= */

/* Prevent padding and borders from increasing widths */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}


/* ---------- NAVIGATION ---------- */

.navbar {
    width: 100%;
    min-height: 76px;
    padding: 16px clamp(20px, 5vw, 70px);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 24px;
}

.nav-links a {
    color: #e2e2e2;
    text-decoration: none;
    white-space: nowrap;
}


/* ---------- DASHBOARD WIDTH ---------- */

.learner-dashboard {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}


/* ---------- RESPONSIVE LEARNING GRID ---------- */

.dashboard-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(min(300px, 100%), 1fr));

    gap: 28px;
}


/* ---------- CONTINUE CARD ---------- */

.continue-card,
.readiness-card {
    width: 100%;
    max-width: 100%;
}

.continue-card > div,
.readiness-card > div {
    min-width: 0;
    flex: 1;
}

/* Prevent the button from stretching outside the card */
.continue-card .dashboard-button {
    flex-shrink: 0;
    max-width: 100%;
}


/* =========================================
   TABLET AND SMALL LAPTOP
========================================= */

@media (max-width: 900px) {

    .navbar {
        align-items: flex-start;
    }

    .nav-links {
        max-width: 65%;
    }

    .continue-card,
    .readiness-card {
        align-items: stretch;
        flex-direction: column;
    }

    .continue-card .dashboard-button {
        width: 100%;
        text-align: center;
    }

}


/* =========================================
   PHONE
========================================= */

@media (max-width: 600px) {

    .navbar {
        padding: 18px 20px;

        align-items: center;
        flex-direction: column;
    }

    .logo {
        text-align: center;
    }

    .nav-links {
        width: 100%;
        max-width: none;

        justify-content: center;
        gap: 10px 16px;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .learner-dashboard {
        width: calc(100% - 24px);
        padding: 55px 0 70px;
    }

    .dashboard-welcome {
        text-align: center;
        margin-bottom: 35px;
    }

    .dashboard-welcome h1 {
        font-size: clamp(2rem, 11vw, 2.8rem);
        line-height: 1.08;
    }

    .dashboard-welcome p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .continue-card,
    .readiness-card {
        padding: 26px 20px;
        border-radius: 18px;
    }

    .continue-card {
        text-align: center;
    }

    .continue-card .dashboard-button {
        display: block;
        width: 100%;

        margin: 8px 0 0;
        padding: 15px 16px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dashboard-card {
        padding: 24px 20px;
    }

    .dashboard-section > h2 {
        font-size: 1.7rem;
        text-align: center;
    }

    .readiness-lock {
        align-self: center;
    }

}

/* =========================================
   K53 KISS HEADER
========================================= */

.k53-header {
    width: min(1180px, calc(100% - 40px));
    margin: 30px auto 28px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}


/* BRAND */

.k53-brand {
    display: flex;
    flex-direction: column;

    color: inherit;
    text-align: left;
    text-decoration: none;
}

.brand-name {
    color: #e5e5e5;

    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: 2px;

    text-shadow:
        0 0 18px rgba(255, 210, 0, 0.18);

    animation: brandFloat 4s ease-in-out infinite;
}

.brand-message {
    margin-top: 4px;

    color: #a9a9a9;

    font-size: 0.72rem;
    letter-spacing: 0.7px;
}


@keyframes brandFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }

}


/* GOLD GLASS NAVIGATION */

.dashboard-nav {
    padding: 13px 14px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 210, 0, 0.14),
            rgba(255, 210, 0, 0.05)
        );

    border: 1px solid rgba(255, 210, 0, 0.42);
    border-radius: 20px;

    box-shadow:
        0 0 30px rgba(255, 210, 0, 0.15),
        inset 0 0 18px rgba(255, 210, 0, 0.05);

    backdrop-filter: blur(12px);
}

.dashboard-nav a {
    position: relative;
    padding: 10px 13px;

    color: #d6d6d6;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;

    border-radius: 10px;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.dashboard-nav a.active {
    color: #ffffff;
    background: rgba(var(--page-accent-rgb), 0.16);

    box-shadow:
        inset 0 0 0 1px rgba(var(--page-accent-rgb), 0.36),
        inset 0 0 14px rgba(var(--page-accent-rgb), 0.10),
        0 0 15px rgba(var(--page-accent-rgb), 0.10);
}

.dashboard-nav a:hover {
    color: #fff3bf;

    background: rgba(255, 210, 0, 0.1);

    transform: translateY(-2px);

    box-shadow:
        0 0 14px rgba(255, 210, 0, 0.2);
}

.dashboard-nav a::after {
    content: "";

    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 4px;

    height: 2px;

    background: var(--page-accent);

    border-radius: 999px;

    transform: scaleX(0);

    transition: transform 0.2s ease;
}

.dashboard-nav a:hover::after,
.dashboard-nav a.active::after {
    transform: scaleX(1);
}

.sign-out-link {
    color: #c5a95a !important;
}


/* =========================================
   COACH REUBEN WELCOME
========================================= */

.coach-welcome {
    width: min(1180px, calc(100% - 40px));
    margin: 28px auto 8px;
    padding: 28px 34px;

    display: flex;
    align-items: center;
    gap: 22px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 210, 0, 0.08),
            rgba(24, 24, 24, 0.92)
        );

    border: 1px solid rgba(255, 210, 0, 0.32);
    border-radius: 24px;

    box-shadow:
        0 0 28px rgba(255, 210, 0, 0.1);
}

.coach-image-wrap {
    width: 130px;
    min-width: 130px;
    height: 130px;

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

    overflow: hidden;

    background: #202020;

    border: 2px solid rgba(255, 210, 0, 0.45);
    border-radius: 50%;

    box-shadow:
        0 0 22px rgba(255, 210, 0, 0.18);
}

.coach-image {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.coach-message {
    min-width: 0;
    text-align: left;
}

.coach-label {
    margin: 0 0 7px;

    color: #c9a227;

    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.coach-message h2 {
    margin: 0 0 8px;

    color: #e2e2e2;

    font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.coach-message p {
    max-width: 720px;
    margin: 0 0 10px;

    color: #bdbdbd;

    line-height: 1.7;
}

.coach-message strong {
    color: #d9ad28;
}


/* =========================================
   HEADER TABLET
========================================= */

@media (max-width: 950px) {

    .k53-header {
        width: calc(100% - 32px);
        flex-direction: column;
        gap: 16px;
    }

    .dashboard-nav {
        width: 100%;
    }

}


/* =========================================
   HEADER PHONE
========================================= */

@media (max-width: 600px) {

    .k53-header {
        margin-top: 22px;
    }

    .dashboard-nav {
        padding: 10px 8px;
        gap: 4px;
    }

    .dashboard-nav a {
        padding: 9px 10px;
        font-size: 0.82rem;
    }

    .coach-welcome {
        flex-direction: column;
        text-align: center;
        gap: 18px;
        padding: 24px 20px;
    }

    .coach-message {
        text-align: center;
    }

    .coach-message p {
        margin-left: auto;
        margin-right: auto;
    }

}

/* K53 KISS LEARNING BADGE */

.k53-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.header-logo {
    display: block;

    width: clamp(110px, 9vw, 145px);
    height: auto;

    border-radius: 50%;

    filter:
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.12))
        drop-shadow(0 0 18px rgba(255, 210, 0, 0.16));

    animation: logoFloat 5s ease-in-out infinite;

    transition:
        transform 0.25s ease,
        filter 0.25s ease;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }

}

.k53-brand:hover .header-logo {
    transform: translateY(-3px) scale(1.03);

    filter:
        drop-shadow(0 0 12px rgba(255, 255, 255, 0.18))
        drop-shadow(0 0 22px rgba(255, 210, 0, 0.24));
}


@media (max-width: 600px) {
    .header-logo {
        width: 96px;
    }
}

.continue-card .dashboard-button {
    padding: 18px 34px;
    min-width: 190px;
    text-align: center;
}

@media (max-width: 600px) {

    .continue-card .dashboard-button {
        width: 100%;
        min-width: 0;
        padding: 16px 18px;
    }

}

.continue-card {
    text-align: center;
}

.continue-card > div {
    width: 100%;
}

.continue-card .dashboard-button {
    margin-top: 18px;
}

@media (min-width: 901px) {

    .continue-card {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        text-align: center;
    }

}

@media (max-width: 600px) {

    .dashboard-card {
        padding: 22px 18px;
    }

    .dashboard-card h3 {
        margin-top: 10px;
        margin-bottom: 10px;
        font-size: 1.5rem;
    }

    .dashboard-card p {
        margin-bottom: 12px;
    }

    .dashboard-icon {
        font-size: 2rem;
    }

    .dashboard-card-link {
        width: 100%;
        text-align: center;
    }
}

/* =========================================
   CONFIDENCE CARD
========================================= */

.confidence-card {
    width: min(900px, calc(100% - 40px));
    margin: 70px auto;
    padding: 52px 36px 46px;

    text-align: center;

    background:
        radial-gradient(
            circle at top,
            rgba(255, 210, 0, 0.10),
            transparent 42%
        ),
        linear-gradient(
            135deg,
            rgba(255, 210, 0, 0.06),
            rgba(20, 20, 20, 0.97)
        );

    border: 1px solid rgba(255, 210, 0, 0.32);
    border-radius: 28px;

    box-shadow:
        0 0 32px rgba(255, 210, 0, 0.09),
        inset 0 0 22px rgba(255, 210, 0, 0.025);

    animation: confidenceCardFade 0.65s ease both;
}

.confidence-icon {
    margin-bottom: 14px;

    font-size: 3.1rem;
    line-height: 1;

    animation: confidenceBrickLift 3.5s ease-in-out infinite;
}

.confidence-label {
    margin: 0 0 12px;

    color: #c9a227;

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2.2px;
}

.confidence-card h2 {
    margin: 0 0 16px;

    color: #eeeeee;

    font-size: clamp(1.75rem, 4vw, 2.25rem);
    line-height: 1.15;

    text-shadow:
        0 0 16px rgba(255, 210, 0, 0.12);
}

.confidence-message {
    max-width: 650px;
    margin: 0 auto 22px;

    color: #c9c9c9;

    font-size: 1rem;
    line-height: 1.75;
}

.confidence-quote {
    margin: 0 auto 30px;

    color: #d9ad28;

    font-size: 1.08rem;
    font-style: italic;
    line-height: 1.65;
}

.confidence-button {
    display: inline-block;
    min-width: 190px;
    padding: 16px 26px;

    text-align: center;
}

@keyframes confidenceBrickLift {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }

}

@keyframes confidenceCardFade {

    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

}

@media (max-width: 600px) {

    .confidence-card {
        width: calc(100% - 24px);
        margin: 45px auto;
        padding: 38px 22px 34px;
        border-radius: 22px;
    }

    .confidence-icon {
        font-size: 2.7rem;
    }

    .confidence-card h2 {
        font-size: 1.75rem;
    }

    .confidence-message {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .confidence-quote {
        font-size: 1rem;
    }

    .confidence-button {
        width: 100%;
        min-width: 0;
    }

}/* =========================================
   CONTINUE LEARNING CARD — POLISHED
========================================= */

.continue-card {
    width: 100%;
    padding: 38px 42px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 40px;

    text-align: left;

    background:
        radial-gradient(
            circle at top left,
            rgba(255, 210, 0, 0.08),
            transparent 40%
        ),
        #171717;

    border: 1px solid rgba(255, 210, 0, 0.38);
    border-radius: 24px;

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.24),
        0 0 24px rgba(255, 210, 0, 0.06);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.continue-card:hover {
    transform: translateY(-3px);

    border-color: rgba(255, 210, 0, 0.58);

    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.30),
        0 0 30px rgba(255, 210, 0, 0.10);
}

.continue-card > div {
    width: 100%;
    min-width: 0;
}

.continue-label {
    margin-bottom: 10px;

    color: #c9a227;

    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.continue-card h2 {
    margin: 0 0 10px;

    color: #f0f0f0;

    font-size: clamp(1.45rem, 3vw, 2rem);
}

.continue-card p {
    color: #c7c7c7;
}

.continue-card .progress-track {
    width: 100%;
    height: 12px;
    margin-top: 20px;

    overflow: hidden;

    background: #303030;
    border-radius: 999px;
}

.continue-card .progress-fill {
    position: relative;

    height: 100%;

    background:
        linear-gradient(
            90deg,
            #c79912,
            #ffd400,
            #e4b622
        );

    border-radius: inherit;

    box-shadow:
        0 0 14px rgba(255, 210, 0, 0.35);

    overflow: hidden;
}

.continue-card .progress-fill::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            105deg,
            transparent 25%,
            rgba(255, 255, 255, 0.35) 48%,
            transparent 70%
        );

    transform: translateX(-120%);
    animation: progressShimmer 3.2s ease-in-out infinite;
}

.progress-text {
    margin-top: 10px;

    color: #d9ad28 !important;

    font-size: 0.9rem;
    font-weight: 600;
}

.continue-card .dashboard-button {
    min-width: 190px;
    margin: 0;

    padding: 17px 28px;

    text-align: center;
    white-space: nowrap;

    border-radius: 13px;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.22),
        0 0 16px rgba(255, 210, 0, 0.10);
}

.continue-card .dashboard-button:hover {
    transform: translateY(-3px);

    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.28),
        0 0 22px rgba(255, 210, 0, 0.20);
}

@keyframes progressShimmer {

    0%,
    60% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(120%);
    }

}


/* TABLET AND PHONE */

@media (max-width: 900px) {

    .continue-card {
        grid-template-columns: 1fr;
        gap: 24px;

        text-align: center;
    }

    .continue-card .dashboard-button {
        width: 100%;
        min-width: 0;
    }

}

@media (max-width: 600px) {

    .continue-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .continue-card .progress-track {
        height: 11px;
    }

}

/* =========================================
   DASHBOARD HERO
========================================= */

.dashboard-welcome {

    width: min(900px, calc(100% - 40px));

    margin: 90px auto 80px;

    text-align: center;
}

.dashboard-label {

    color: #c9a227;

    font-size: .82rem;

    font-weight: 700;

    letter-spacing: 4px;

    text-transform: uppercase;

    margin-bottom: 18px;
}

.dashboard-welcome h1 {

    margin: 0;

    color: #ffffff;

    font-size: clamp(3rem, 6vw, 4.8rem);

    font-weight: 800;

    line-height: 1;

    text-shadow:
        0 0 30px rgba(255,210,0,.10);
}

.dashboard-subtitle {

    display: block;

    width: 100%;

    margin: 22px auto 0;

    text-align: center;

    color: #d9ad28;

    font-size: clamp(1.45rem,2vw,2rem);

    font-weight: 600;

    line-height: 1.4;

    text-shadow:
        0 0 14px rgba(255,210,0,.10);
}

.dashboard-description {

    max-width: 760px;

    margin: 30px auto 0;

    text-align: center;

    color: #dddddd;

    font-size: 1.18rem;

    line-height: 1.9;
}

/* =========================================
   FOUNDATION BRICK LABEL
========================================= */

.brick-label {
    position: absolute;
    z-index: 2;
    top: -14px;
    left: 22px;

    margin: 0;
    padding: 5px 12px;

    color:#c9a227;

    background: #181818;
    border: 1px solid rgba(255, 210, 0, 0.4);
    border-radius: 999px;
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.35);

    font-size:.72rem;

    font-weight:700;

    letter-spacing:2px;

    text-transform:uppercase;
}

.dashboard-card > h3 {
    min-height: 58px;
    margin: 8px 0;
    display: flex;
    align-items: center;
}

.dashboard-card > h3 + p {
    min-height: 58px;
    margin: 0;
    display: flex;
    align-items: center;
}

.dashboard-card > .progress-track {
    margin: 10px 0 8px;
}

.dashboard-card > .progress-text {
    min-height: 28px;
    margin: 0 0 18px;
}

.dashboard-card > .dashboard-card-link {
    align-self: flex-start;
    margin-top: auto;
}

/* =========================================
   MASTER LESSON — POLISHED APPLICATION STAGE
========================================= */

[hidden] {
    display: none !important;
}


/* LESSON HEADER LOGO */

.lesson-brand {
    display: inline-flex;
    align-items: center;

    color: inherit;
    text-decoration: none;
}

.lesson-header-logo {
    display: block;

    width: 92px;
    height: 92px;

    object-fit: contain;
    border-radius: 50%;

    filter:
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.12))
        drop-shadow(0 0 18px rgba(255, 210, 0, 0.18));
}


/* STEP 2 — SIGN AND QUESTION TOGETHER */

.exam-check {
    width: min(1100px, calc(100% - 40px));
    margin: 60px auto;
    padding: 42px;

    display: grid;
    grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
    align-items: center;
    gap: 45px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 210, 0, 0.06),
            rgba(22, 22, 22, 0.98)
        );

    border: 1px solid rgba(255, 210, 0, 0.34);
    border-radius: 25px;

    box-shadow:
        0 0 28px rgba(255, 210, 0, 0.08);

    animation: lessonStageReveal 0.5s ease both;
}

.exam-sign-reminder {
    text-align: center;
}

.sign-reminder-label {
    margin: 0 0 20px;

    color: #c9a227;

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.exam-sign-image {
    width: min(190px, 100%);
    margin: 0 auto 20px;

    object-fit: contain;

    background: #ffffff;
    border-radius: 8px;

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.32),
        0 0 18px rgba(255, 210, 0, 0.10);
}

.sign-reminder-message {
    margin: 0 auto;

    color: #c9c9c9;

    font-size: 0.92rem;
    line-height: 1.6;
}

.exam-question-area {
    min-width: 0;
    text-align: center;
}

.exam-question {
    max-width: 680px;
    margin: 20px auto 28px;
}

.exam-answer-options {
    width: min(680px, 100%);
    margin: 0 auto;
}

.exam-answer-options button {
    width: 100%;
    min-height: 58px;
    margin: 0;

    padding: 16px 22px;

    font-size: 0.98rem;
    line-height: 1.45;
}


/* FEEDBACK BREATHING ROOM */

.answer-feedback {
    margin-top: 26px;
    padding: 18px 20px;

    border-radius: 14px;
    line-height: 1.65;
}

.correct-answer {
    color: #b8ff70;

    background: rgba(124, 252, 0, 0.06);
    border: 1px solid rgba(124, 252, 0, 0.20);
}

.wrong-answer {
    color: #ffd85a;

    background: rgba(255, 210, 0, 0.05);
    border: 1px solid rgba(255, 210, 0, 0.18);
}

.coach-correction {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    grid-template-areas:
        "image heading"
        "image explanation";
    align-items: center;
    gap: 10px;
    text-align: left;
}

.coach-correction-image {
    grid-area: image;
    align-self: end;
    width: 105px;
    max-height: 145px;
    object-fit: contain;
    object-position: bottom;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.3));
}

.coach-correction-heading {
    grid-area: heading;
}

.coach-correction-heading strong,
.coach-correction-heading span {
    display: block;
}

.coach-correction-heading span {
    margin-top: 8px;
    color: #ffd85a;
    font-size: 0.9rem;
    font-weight: 700;
}

.coach-correction-explanation {
    grid-area: explanation;
    margin: 6px 0 8px;
    color: #e3e3e3;
    font-size: 0.96rem;
    font-style: normal;
    line-height: 1.6;
}

@media (max-width: 520px) {
    .knowledge-check {
        width: calc(100% - 24px);
        padding: 28px 18px;
    }

    .knowledge-check .answer-feedback {
        padding: 14px 12px;
    }

    .coach-correction {
        display: grid;
        grid-template-columns: 88px minmax(0, 1fr);
        grid-template-areas:
            "image heading"
            "explanation explanation";
        gap: 12px 14px;
        text-align: left;
    }

    .coach-correction-image {
        width: 88px;
        max-height: 132px;
        margin: 0;
    }

    .coach-correction-heading strong {
        font-size: 0.96rem;
    }

    .coach-correction-heading span {
        margin-top: 8px;
        font-size: 0.82rem;
        line-height: 1.4;
    }

    .coach-correction-explanation {
        margin: 2px 0 0;
        font-size: 0.9rem;
        line-height: 1.55;
    }
}


/* SUCCESS CARD */

.lesson-success {
    width: min(760px, calc(100% - 40px));
    margin: 65px auto;
    padding: 52px 36px 44px;

    text-align: center;

    background:
        radial-gradient(
            circle at top,
            rgba(255, 210, 0, 0.11),
            transparent 43%
        ),
        #171717;

    border: 1px solid rgba(255, 210, 0, 0.38);
    border-radius: 26px;

    box-shadow:
        0 0 32px rgba(255, 210, 0, 0.10);

    animation: lessonStageReveal 0.55s ease both;
}

.floating-brick {
    margin-bottom: 18px;

    font-size: 3.5rem;
    line-height: 1;

    animation: floatingBrickEarned 1.2s ease both;
}

.lesson-success h2 {
    margin: 0 0 14px;

    color: #f1f1f1;

    font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.lesson-success-message {
    max-width: 600px;
    margin: 0 auto 22px;

    color: #d4d4d4;

    font-size: 1.08rem;
    line-height: 1.7;
}

.lesson-success strong {
    display: block;

    margin: 0 0 30px;

    color: #d9ad28;
}

.lesson-success.is-progress-break {
    border-color: rgba(112, 181, 255, 0.48);
    background:
        radial-gradient(circle at top, rgba(82, 151, 223, 0.14), transparent 45%),
        #171717;
}

.lesson-success.is-progress-break h2,
.lesson-success.is-category-complete h2 {
    color: #ffcf24;
}

.lesson-success.is-category-complete {
    border-color: rgba(255, 210, 0, 0.7);
    box-shadow: 0 0 38px rgba(255, 210, 0, 0.16);
}

.lesson-success-actions,
.memory-finish-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.memory-game-button {
    background: transparent;
    color: #ffcf24;
    border: 1px solid rgba(255, 207, 36, 0.72);
    box-shadow: none;
}

.memory-game-button:hover {
    color: #111;
    background: #ffcf24;
}

/* ROAD SIGN MEMORY BREAK */

.memory-game-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 70px;
}

.memory-game-hero {
    margin: 0 auto 30px;
    text-align: center;
}

.memory-game-hero h1 {
    margin: 8px 0 10px;
    color: #ffcf24;
    font-size: clamp(2rem, 5vw, 3.25rem);
}

.memory-game-hero > p:last-child {
    color: #f3f3f3;
    font-style: italic;
}

.memory-game-panel {
    padding: 30px;
    background: linear-gradient(145deg, rgba(255, 204, 0, 0.07), rgba(24, 24, 24, 0.98) 36%);
    border: 1px solid rgba(255, 204, 0, 0.42);
    border-radius: 26px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.25);
}

.memory-game-topline {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 12px;
}

.memory-game-topline h2 {
    margin: 4px 0 0;
    color: #fff;
}

.memory-game-score {
    display: flex;
    gap: 10px;
}

.memory-game-score span {
    min-width: 92px;
    padding: 9px 13px;
    color: #ddd;
    background: #111;
    border: 1px solid rgba(255, 204, 0, 0.3);
    border-radius: 999px;
    text-align: center;
}

.memory-game-score strong {
    color: #ffcf24;
}

.memory-game-message {
    min-height: 1.6em;
    margin: 0 0 24px;
    color: #f1f1f1;
    font-style: italic;
    text-align: center;
}

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

.memory-card {
    position: relative;
    min-height: 190px;
    padding: 0;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 18px;
    cursor: pointer;
    perspective: 900px;
    transform-style: preserve-3d;
}

.memory-card-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 204, 0, 0.5);
    border-radius: 18px;
    backface-visibility: hidden;
    transition: transform 0.48s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.memory-card-back {
    z-index: 2;
    color: #ffcf24;
    background: radial-gradient(circle at top, rgba(255, 204, 0, 0.13), transparent 48%), #151515;
    transform: rotateY(0deg);
}

.memory-card-back img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(255, 210, 0, 0.18));
}

.memory-card-back span {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.memory-card-front {
    z-index: 1;
    color: #fff;
    background: #f5f5f2;
    transform: rotateY(180deg);
}

.memory-card-front img {
    width: 100%;
    height: 145px;
    object-fit: contain;
}

.memory-card-front small {
    color: #8c6c00;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.memory-card-front strong {
    color: #171717;
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    line-height: 1.35;
    text-align: center;
}

.memory-card.is-flipped .memory-card-back,
.memory-card.is-matched .memory-card-back {
    z-index: 1;
    transform: rotateY(180deg);
}

.memory-card.is-flipped .memory-card-front,
.memory-card.is-matched .memory-card-front {
    z-index: 2;
    transform: rotateY(0deg);
}

.memory-card.is-matched .memory-card-front {
    border-color: #61d487;
    box-shadow: 0 0 22px rgba(66, 210, 116, 0.28);
}

.memory-game-finish {
    width: min(720px, 100%);
    margin: 42px auto 0;
    padding: 38px 30px;
    color: #eee;
    background: #171717;
    border: 1px solid rgba(255, 204, 0, 0.58);
    border-radius: 24px;
    text-align: center;
}

.memory-game-finish h2 {
    margin: 0 0 10px;
    color: #ffcf24;
    font-size: 2rem;
}

.memory-replay-button {
    min-width: 180px;
    padding: 15px 24px;
    color: #ffcf24;
    background: transparent;
    border: 1px solid #ffcf24;
    border-radius: 13px;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 820px) {
    .memory-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .memory-game-page {
        width: min(100% - 20px, 1180px);
        padding-top: 18px;
    }

    .memory-game-panel {
        padding: 18px 12px;
        border-radius: 20px;
    }

    .memory-game-topline {
        align-items: flex-start;
        flex-direction: column;
    }

    .memory-game-score {
        width: 100%;
    }

    .memory-game-score span {
        flex: 1;
        min-width: 0;
    }

    .memory-card-grid {
        gap: 10px;
    }

    .memory-card {
        min-height: 158px;
    }

    .memory-card-face {
        padding: 12px;
    }

    .memory-card-front img {
        height: 116px;
    }

    .lesson-success-actions > *,
    .memory-finish-actions > * {
        width: 100%;
    }
}

.lesson-next-button {
    display: inline-block;

    min-width: 260px;
    padding: 17px 28px;

    color: #111111;
    background: #d9ad28;

    border-radius: 13px;

    text-align: center;
}

@keyframes floatingBrickEarned {

    0% {
        opacity: 0;
        transform:
            translateY(26px)
            scale(0.65)
            rotate(-8deg);
    }

    65% {
        opacity: 1;
        transform:
            translateY(-8px)
            scale(1.08)
            rotate(3deg);
    }

    100% {
        opacity: 1;
        transform:
            translateY(0)
            scale(1)
            rotate(0);
    }

}


/* TABLET AND PHONE */

@media (max-width: 800px) {

    .exam-check {
        grid-template-columns: 1fr;
        gap: 30px;

        padding: 34px 24px;
    }

    .exam-sign-image {
        width: 165px;
    }

}

@media (max-width: 600px) {

    .lesson-header-logo {
        width: 78px;
        height: 78px;
    }

    .exam-check {
        width: calc(100% - 24px);
        margin: 42px auto;
        padding: 30px 18px;
    }

    .lesson-success {
        width: calc(100% - 24px);
        margin: 45px auto;
        padding: 40px 22px 34px;
    }

    .lesson-next-button {
        width: 100%;
        min-width: 0;
    }

}

/* Four foundation cards across on larger desktop screens. */
@media (min-width: 1101px) {
    .learner-dashboard .dashboard-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }

    .learner-dashboard .dashboard-card {
        padding: 24px 22px;
    }

    .learner-dashboard .dashboard-art img {
        width: 145px;
    }
}

.exam-intro {
    color: #c9c9c9;
    margin: 8px auto 28px;
}

.exam-test {
    padding: 26px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 210, 0, 0.16);
    border-radius: 18px;
    animation: lessonStageReveal 0.45s ease both;
}

.exam-test-label {
    margin: 0;
    color: #d9ad28;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.exam-test button:disabled {
    cursor: default;
    opacity: 0.82;
}

.lesson-coach-image {
    display: block;
    width: min(290px, 78%);
    max-height: 330px;
    margin: -28px auto 18px;
    object-fit: contain;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.35));
}

/* FINAL HOMEPAGE PHONE LAYOUT */
@media (min-width: 701px) {
    .hero h1 {
        margin: 0;
        text-align: left;
    }
}

@media (max-width: 700px) {
    body > nav {
        flex-wrap: wrap;
        gap: 8px 14px;
        padding: 12px 10px;
    }

    body > nav a {
        font-size: 0.78rem;
        line-height: 1.25;
    }

    .hero {
        margin-top: 10px;
        padding: 10px 18px 28px;
    }

    .hero .logo {
        width: 92px;
        margin: 0 auto 6px 0;
    }

    .hero h1 {
        margin: 16px auto 24px;
        font-size: clamp(1.95rem, 8.5vw, 2.3rem);
        font-weight: 700;
        line-height: 1.12;
        letter-spacing: -0.015em;
    }

    .learning-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .learning-card {
        width: 100%;
        max-width: 390px;
        min-height: 330px;
        margin-inline: auto;
    }
}

/* Codes 2 & 3 control diagrams: large enough to read the numbers, tap for full-screen (5. JavaScript/diagram-zoom.js) */
.controls-lesson-page .control-learning-card { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 30px; }
.controls-lesson-page .control-image-area { padding: 14px 14px 26px; }
.controls-lesson-page .control-image-area img { width: 100%; max-height: 460px; border-radius: 12px; transform: none; }
.controls-lesson-page .exam-check { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 34px; }
.controls-lesson-page .exam-sign-image { width: 100%; margin-bottom: 10px; }
.controls-final-test-page .final-question-image { width: min(620px, 100%); height: auto; max-height: 360px; margin-bottom: 8px; border-radius: 12px; background: #fff; filter: none; }
img[data-zoomable] { cursor: zoom-in; }
img[data-zoomable]:focus-visible { outline: 3px solid #ffcf21; outline-offset: 3px; }
.diagram-zoom-hint { margin: 10px 0 0; color: #ffcf21; font-size: .82rem; font-weight: 700; text-align: center; }
.controls-final-test-page .diagram-zoom-hint { margin: 0 0 18px; }
.diagram-zoom { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 56px 10px 20px; background: rgba(0, 0, 0, .94); cursor: zoom-out; }
.diagram-zoom[hidden] { display: none; }
.diagram-zoom img { width: 100%; max-width: 1400px; max-height: calc(100% - 40px); object-fit: contain; border-radius: 8px; background: #fff; }
.diagram-zoom-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 1px solid #ffcf21; border-radius: 50%; color: #111; background: #ffcf21; font-size: 1.2rem; font-weight: 900; cursor: pointer; }
.diagram-zoom-help { margin: 0; color: #ddd; font-size: .85rem; }
body.diagram-zoom-open { overflow: hidden; }

@media (max-width: 800px) {
    .controls-lesson-page .control-learning-card, .controls-lesson-page .exam-check { grid-template-columns: 1fr; }
    .controls-lesson-page .control-image-area { padding: 8px 8px 24px; }
}
@media (max-width: 600px) {
    .controls-lesson-page .control-learning-card { padding: 10px; }
    .controls-lesson-page .control-image-area { padding: 4px 4px 24px; }
    .controls-lesson-page .exam-check { padding: 22px 10px; }
    .controls-final-test-page .final-question-card { padding-inline: 12px; }
}

/* Site footer and Credits page */
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 40px; padding: 22px 16px; border-top: 1px solid rgba(255, 207, 33, .2); color: #a8a8a8; font-size: .82rem; text-align: center; }
.site-footer a { color: #ffcf21; font-weight: 700; }
.module-overview.credits-list { grid-template-columns: 1fr 1fr; align-items: start; }
.credits-list a { color: #ffcf21; }
.credits-list p { line-height: 1.6; }
@media (max-width: 760px) { .module-overview.credits-list { grid-template-columns: 1fr; } }
.credits-built-by { margin: 24px 0 0; color: #a8a8a8; font-size: .82rem; text-align: center; }
