﻿:root {
    color-scheme: light;
    --red: #c6382c;
    --red-dark: #a72c24;
    --blue: #2868ad;
    --green: #258052;
    --ink: #202127;
    --muted: #6b6d73;
    --line: #d7d4d0;
    --paper: #fff;
    --canvas: #f7f7f6;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    scroll-behavior: smooth
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    line-height: 1.65
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 14px max(24px, calc((100% - 1120px)/2));
    border-bottom: 2px solid var(--red);
    background: var(--paper)
}

.brand {
    flex: 0 0 auto;
    color: var(--red);
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none
}

.contents {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px
}

.contents a {
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--ink);
    text-decoration: none;
    font-size: .86rem;
    font-weight: 650
}

.contents a:hover,
.contents a:focus-visible {
    background: #fbecea;
    color: var(--red-dark)
}

main {
    width: min(100% - 40px, 1120px);
    margin: 30px auto 0;
    padding: 0 0 64px
}

main>h1 {
    margin: 0 0 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--red);
    color: var(--red);
    font-size: clamp(1.8rem, 4vw, 2.35rem);
    line-height: 1.25
}

.intro-note {
    color: var(--muted)
}

.slides {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 34px 22px
}

.slide,
.exercise-box {
    min-width: 0;
    padding: 23px 26px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--blue);
    border-radius: 12px;
    background: var(--paper);
    text-align: left
}

.slides>:nth-child(even) {
    border-left-color: var(--green)
}

.slide.wide,
.exercise-box {
    grid-column: 1/-1
}

.slide h2 {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: 1.25rem;
    line-height: 1.35
}

.slide-content {
    display: grid;
    justify-items: start;
    gap: 8px
}

.slide-content p {
    width: 100%;
    margin: 0;
    white-space: pre-wrap
}

.bullet {
    position: relative;
    padding-left: 1.1em
}

.bullet::before {
    content: "";
    position: absolute;
    left: .15em;
    top: .78em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red)
}

.visual-table-wrap {
    width: 100%;
    margin: 12px 0 2px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper)
}

.visual-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
    text-align: left
}

.visual-table caption {
    padding: 10px 12px;
    color: var(--blue);
    font-weight: 750;
    text-align: left
}

.visual-table th {
    padding: 10px 12px;
    background: var(--red);
    color: white
}

.visual-table td {
    min-width: 120px;
    padding: 9px 12px;
    border-top: 1px solid var(--line)
}

.visual-table tr:nth-child(even) td {
    background: #faf8f7
}

.slide-illustrations {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
    margin-top: 14px
}

.slide-illustration {
    flex: 1 1 220px;
    max-width: 500px;
    min-width: min(100%, 180px);
    margin: 0
}

.slide-illustration img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    border-radius: 8px;
    object-fit: initial;
    object-position: initial
}

.slide-illustration figcaption {
    display: none
}

.exercise-box h3 {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: 1.25rem
}

.exercise-context {
    color: var(--muted)
}

.exercise-prompt {
    display: grid;
    gap: 8px;
    line-height: 1.7;
    text-align: left
}

.exercise-prompt p {
    margin: 0;
    white-space: pre-wrap
}

.alternatives {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    text-align: left
}

.alternative-item {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    text-align: left;
    line-height: 1.55
}

.answer-button {
    margin-top: 16px;
    padding: 9px 15px;
    border: 0;
    border-radius: 6px;
    background: var(--red);
    color: white;
    font: inherit;
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer
}

.answer-button:hover,
.answer-button:focus-visible {
    background: var(--red-dark)
}

.answer-key {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-left: 4px solid var(--green);
    border-radius: 4px;
    background: #eff8f2;
    color: #185d3a;
    font-weight: 750;
    text-align: left
}

.answer-key p {
    margin: 4px 0 0;
    color: var(--ink);
    font-weight: 400;
    line-height: 1.6
}

.answer-key[hidden] {
    display: none
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .45s ease, transform .45s ease
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0)
}

.exercise-cta,
.return-cta {
    display: flex;
    margin-top: 34px
}

.exercise-cta {
    justify-content: flex-end
}

.return-cta {
    justify-content: flex-start
}

.exercise-cta a,
.return-cta a {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 7px;
    background: var(--red);
    color: white;
    text-decoration: none;
    font-weight: 700
}

.return-cta a {
    background: var(--blue)
}

footer {
    padding: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
    font-size: .86rem
}

footer span {
    padding: 0 7px;
    color: var(--red)
}

@media(max-width:720px) {
    .site-header {
        position: static;
        display: block;
        padding: 12px 16px
    }

    .brand {
        display: block;
        margin-bottom: 8px;
        text-align: center
    }

    .contents {
        justify-content: center
    }

    .contents a {
        font-size: .8rem
    }

    main {
        width: min(100% - 28px, 600px);
        margin-top: 24px
    }

    .slides {
        grid-template-columns: 1fr;
        gap: 14px
    }

    .slide.wide,
    .exercise-box {
        grid-column: auto
    }

    .slide,
    .exercise-box {
        padding: 19px 18px
    }

    .visual-table {
        min-width: 480px
    }
}

@media(prefers-reduced-motion:reduce) {

    .scroll-reveal,
    .scroll-reveal.is-visible {
        opacity: 1;
        transform: none;
        transition: none
    }
}
