.optics-menu-card {
    color: inherit;
    text-decoration: none;
}

.optics-badge {
    color: #123d63;
    background: #dff3ff;
}

.optics-view {
    --optics-ink: #143354;
    --optics-muted: #425a74;
    --optics-line: #c9dbea;
    --optics-blue: #22578e;
    --optics-light: #eef7ff;
    color: var(--optics-ink);
}

.optics-view [hidden] {
    display: none;
}

.optics-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 28%);
    align-items: center;
    gap: 20px;
    margin: 18px 0 22px;
    padding: clamp(22px, 4vw, 44px);
    border-radius: var(--border-radius-lg);
    color: #fff;
    background: linear-gradient(116deg, #102b4b, #1d4b78);
}

.optics-kicker {
    display: block;
    color: var(--optics-blue);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.optics-hero .optics-kicker {
    color: #b5e6ff;
}

.optics-hero h2,
.optics-view h3,
.optics-view h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.15;
}

.optics-hero h2 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 5.2vw, 3.65rem);
    max-width: 17ch;
}

.optics-hero p {
    max-width: 45ch;
    color: #e3f2ff;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.optics-hero-art {
    display: block;
    width: 100%;
    max-height: 188px;
}

.optics-lab,
.optics-quiz {
    padding: clamp(16px, 3vw, 32px);
    border: 1px solid var(--optics-line);
    margin-bottom: 22px;
}

.optics-view h3 {
    margin: 4px 0 14px;
    font-size: clamp(1.55rem, 3.8vw, 2rem);
}

.optics-view h4 {
    margin-bottom: 8px;
    font-size: 1.22rem;
}

.optics-stations,
.optics-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.optics-stations {
    margin-bottom: 16px;
}

.optics-stations button,
.optics-options button {
    min-height: 44px;
    padding: 7px 14px;
    border: 1px solid #9dbbd6;
    border-radius: 22px;
    color: var(--optics-ink);
    background: #fff;
    font: 800 .97rem/1.25 var(--font-body);
    cursor: pointer;
}

.optics-stations button:hover,
.optics-options button:hover {
    background: var(--optics-light);
}

.optics-stations button[aria-pressed="true"],
.optics-options button[aria-pressed="true"] {
    background: var(--optics-blue);
    border-color: var(--optics-blue);
    color: #fff;
}

.optics-view :focus-visible,
.optics-menu-card:focus-visible {
    outline: 3px solid #a0540c;
    outline-offset: 3px;
}

.optics-bench {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.optics-figure {
    margin: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #132f50;
    color: #eef7ff;
}

.optics-figure figcaption,
.optics-legend {
    padding: 9px 14px;
    font-size: .9rem;
    font-weight: 800;
}

.optics-figure svg {
    display: block;
    width: 100%;
    height: auto;
}

.optics-figure text {
    fill: #e8f4ff;
    font: 800 18px var(--font-body);
}

.optics-ray {
    fill: none;
    stroke: #ffd761;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.optics-legend {
    color: #d4e9fb;
    border-top: 1px solid #345678;
}

.optics-legend span {
    color: #ffd761;
}

.optics-controls {
    display: grid;
    align-items: start;
    padding: 16px;
    border-radius: 16px;
    background: var(--optics-light);
}

.optics-controls > div {
    grid-area: 1 / 1;
}

.optics-controls > [hidden] {
    display: block;
    visibility: hidden;
}

.optics-controls .optics-options {
    margin-top: 12px;
}

.optics-discovery {
    margin-top: 12px;
    padding-left: 10px;
    border-left: 3px solid #4c89bc;
}

.optics-angle-label {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-weight: 800;
}

.optics-controls input[type="range"] {
    display: block;
    width: 100%;
    height: 44px;
    accent-color: var(--optics-blue);
    cursor: pointer;
}

.optics-fact {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff4ce;
    color: #5a3d14;
}

#optics-progress {
    margin-bottom: 12px;
    color: var(--optics-muted);
    font-weight: 800;
}

#optics-feedback {
    min-height: 1.6em;
    margin-top: 10px;
}

#optics-feedback[data-outcome],
.optics-options button[data-outcome] {
    background: #fff3d6;
    color: #69421b;
}

#optics-feedback[data-outcome] {
    padding: 8px 12px;
    border-radius: 12px;
}

#optics-feedback[data-outcome="correct"],
.optics-options button[data-outcome="correct"] {
    background: #e0f6ea;
    color: #155735;
}

.optics-options button[aria-disabled="true"] {
    cursor: default;
}

.optics-quiz-actions {
    margin-top: 6px;
}

.optics-quiz-actions .btn {
    min-height: 44px;
    background: var(--optics-blue);
    color: #fff;
}

@media (max-width: 680px) {
    .optics-hero {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .optics-hero-art {
        display: none;
    }

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

    #optics-material-note,
    #optics-lens-note {
        min-height: 4lh;
    }

    .optics-stations button {
        flex: 1 1 auto;
        padding-inline: 8px;
    }
}

@media (max-width: 360px) {
    #optics-material-note,
    #optics-lens-note {
        min-height: 5lh;
    }
}
