/* Content pages: home, about, contact, play, coming soon, Caissa, poetry, credits, rules and terms. */

/* Home */

.hero {
    text-align: center;
    padding: clamp(2rem, 8vw, 5rem) 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    color: var(--gold-ink);
    margin: 0 0 1rem;
}

.hero-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.upcoming h2 {
    text-align: center;
    margin-top: 0;
}

.upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.upcoming-card {
    display: block;
    padding: 1.4rem 1.5rem;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    color: var(--ink);
    text-decoration: none;
    border-radius: var(--radius);
}

a.upcoming-card {
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

a.upcoming-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
    a.upcoming-card, a.upcoming-card:hover { transition: none; transform: none; }
}

.upcoming-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.3rem;
}

.upcoming-card p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

/* A queen with a letter flying in: chess by email (images/hero-emblem.png, drawn at twice this size). */
.hero-emblem {
    display: block;
    width: 128px;
    height: 128px;
    margin: 0 auto 0.75rem;
}

.card-art {
    display: flex;
    align-items: center;
    height: 40px;
    margin-bottom: 0.6rem;
    color: var(--gold-ink);
}

.card-art .icon {
    width: 32px;
    height: 32px;
}

.card-art img {
    width: 40px;
    height: 40px;
}

.hero .lede {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.hero-note {
    margin: 1rem 0 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

/* The hero's pointer to the Chess Coach: for visitors who want to play now rather than by email. */
.hero-coach {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.25rem auto 0;
    padding: 0.6rem 1rem;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: var(--paper);
    font-size: 0.95rem;
    text-align: left;
}

.hero-coach img {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.hero-coach a {
    font-weight: 600;
}

@media (max-width: 600px) {
    .hero-coach {
        border-radius: 12px;
    }
}

/* Endgames */

.endgames .upcoming-card {
    display: flex;
    flex-direction: column;
}

.endgames .upcoming-card h2 {
    font-size: 1.35rem;
    margin: 0 0 0.3rem;
}

.endgames .upcoming-card p {
    margin-bottom: 1rem;
}

.endgames .upcoming-card .tag {
    align-self: flex-start;
    margin-top: auto;
}

.endgames .tag.available {
    background: var(--gold-ink);
    border-color: var(--gold-ink);
    color: var(--on-gold);
}

/* Home: chess by email */

.cbe-steps,
.cbe-sample,
.cbe-cta {
    margin-bottom: 3.5rem;
}

.cbe-steps h2,
.cbe-cta {
    text-align: center;
}

.cbe-step-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 0;
    padding: 0;
}

.cbe-step-list li {
    padding: 1.4rem 1.5rem;
    border-top: 3px solid var(--gold);
    background: var(--paper-deep);
}

.cbe-step-list .icon-badge {
    margin-bottom: 0.75rem;
}

.cbe-step-list h3 {
    font-size: 1.35rem;
    margin-bottom: 0.3rem;
}

.cbe-step-list p {
    margin: 0;
    color: var(--ink-soft);
}

.cbe-sample {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    gap: 2rem 3rem;
    align-items: center;
}

.cbe-sample h2 {
    margin-top: 0;
}

.cbe-points li {
    margin-bottom: 0.5rem;
}

.mail-mock {
    margin: 0;
    padding: 1rem;
    background: var(--field);
    border: 1px solid var(--rule);
    box-shadow: 0 6px 24px rgb(0 0 0 / 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.mail-mock-head {
    display: grid;
    gap: 0.15rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--rule);
    font-size: 0.85rem;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}

.mail-mock img {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
}

.mail-mock-moves {
    margin: 0.6rem 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.mail-mock-reply {
    margin-top: 0.9rem;
    padding: 0.7rem 0.9rem;
    border-left: 3px solid var(--gold);
    background: var(--paper-deep);
}

.mail-mock-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold-ink);
}

.mail-mock-reply p {
    margin: 0.2rem 0 0;
    font-family: var(--serif);
    font-size: 1.25rem;
}

.cbe-cta {
    padding: 2.5rem 1.5rem;
    border: 1px solid var(--rule);
    background: var(--paper-deep);
    border-radius: var(--radius);
}

.cbe-cta h2 {
    margin-top: 0;
}

.cbe-cta p {
    margin: 0;
    color: var(--ink-soft);
}

.cbe-cta .hero-links {
    margin-top: 1.5rem;
}

/* Home: the Chess Coach, the site's main feature, as the hero, in a tinted panel with a gold edge. The sample
   comments use the coach's own card style (css/games.css), on paper here. */
.coach-promo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    gap: 1.5rem 2.5rem;
    align-items: center;
    margin: 0 0 3.5rem;
    padding: 2rem 2rem 2.25rem;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    border-top: 4px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.coach-promo h2 { margin: 0; }
.coach-promo .eyebrow { margin-bottom: 0.4rem; }
.coach-promo-text > p { color: var(--ink-soft); margin: 0 0 1rem; }

.coach-promo-head {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1.1rem;
}

/* The coach's portrait (images/coach.webp, also on /coach), cropped to a round badge. */
.coach-promo-figure,
.card-art img.card-art-portrait {
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 15%;
    border: 2px solid var(--gold);
    background: var(--paper);
}

.coach-promo-figure {
    width: 96px;
    height: 96px;
}

.coach-promo-points {
    margin: 0 0 1.5rem;
    display: grid;
    gap: 0.4rem;
}

.coach-promo-sample .coach-comment { background: var(--paper); }

.coach-promo-sample {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.home-coach {
    margin-top: clamp(0rem, 2vw, 1rem);
    padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.75rem);
}

.home-coach h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); }
.home-coach .lede { margin: 0 0 1rem; }
.home-coach .coach-promo-figure { width: 112px; height: 112px; }

.coach-promo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* Home: the Chess Coach hero, board-first: the pitch on the left, a board ready for the first move on the right
   (a link to /coach as White) with the coach's greeting under it, and the sample comments in a row below. */
.home-board-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    gap: 2rem 3.5rem;
    align-items: center;
    padding: clamp(0.5rem, 3vw, 2rem) 0 2rem;
}

.home-board-hero h1 { margin: 0 0 0.75rem; font-size: clamp(2.4rem, 5.5vw, 4rem); }
.home-board-hero .eyebrow { margin-bottom: 0.6rem; }
.home-board-hero .lede { margin: 0 0 1.25rem; }

.home-board-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.home-board-link img {
    display: block;
    width: 100%;
    height: auto;
    border: 6px solid var(--board-frame);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.home-board-link:hover img {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(24, 24, 27, 0.14), 0 28px 60px rgba(24, 24, 27, 0.14);
}

.home-board-turn {
    position: absolute;
    left: 50%;
    bottom: -0.9rem;
    transform: translateX(-50%);
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    background: var(--gold-ink);
    color: var(--on-gold);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.home-board-greeting {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin: 1.75rem 0 0;
    padding: 0.8rem 1rem;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--ink-soft);
}

.home-board-greeting img {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 15%;
    border: 2px solid var(--gold);
    background: var(--paper);
}

.home-board-greeting strong { color: var(--ink); }

.home-coach-sample {
    flex-direction: row;
    gap: 1rem;
    margin: 0 0 3.5rem;
}

.home-coach-sample .coach-comment { flex: 1; }

@media (max-width: 860px) {
    .home-board-hero { grid-template-columns: minmax(0, 1fr); }
    .home-board { max-width: 440px; width: 100%; margin: 0 auto; }
    .home-coach-sample { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .home-board-link img, .home-board-link:hover img { transition: none; transform: none; }
}

/* Home: the Chess Continuum, second, its banner picture beside the text. */
.home-continuum {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 1.5rem 2.5rem;
    align-items: center;
    margin: 0 0 3.5rem;
}

.home-continuum-art img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(24, 24, 27, 0.18);
}

.home-continuum h2 { margin: 0 0 0.75rem; }
.home-continuum .eyebrow { margin-bottom: 0.4rem; }
.home-continuum-text > p { color: var(--ink-soft); margin: 0 0 1rem; }

.home-continuum-points {
    margin: 0 0 1.5rem;
    display: grid;
    gap: 0.4rem;
}

/* Home: chess by email, third: a centred introduction above its steps and sample email. */
.home-email {
    text-align: center;
    padding: 2.5rem 0 1rem;
    margin-bottom: 2.5rem;
    border-top: 1px solid var(--rule);
}

.home-email h2 { margin: 0 0 0.75rem; }
.home-email .lede { max-width: 640px; margin: 0 auto; }
.home-email .hero-emblem { width: 96px; height: 96px; }

@media (max-width: 760px) {
    .cbe-sample,
    .home-continuum,
    .coach-promo {
        grid-template-columns: minmax(0, 1fr);
    }

    .coach-promo { padding: 1.5rem 1.25rem 1.75rem; }
    .coach-promo-figure,
    .home-coach .coach-promo-figure { width: 72px; height: 72px; }
}

/* About */

.about {
    margin: 0 auto;
}

.about li {
    margin-bottom: 0.5rem;
}

/* Contact */

.contact {
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(2rem, 8vw, 5rem) 0;
    text-align: center;
}

.contact-email {
    display: inline-block;
    margin-top: 1rem;
    font-family: var(--serif);
    font-size: 1.6rem;
    overflow-wrap: anywhere;
}

/* Play pages */

.play-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem 1.5rem;
    margin: 1.5rem 0 0;
    color: var(--ink-soft);
}

.prose .play-stats {
    justify-content: flex-start;
}

.play-stats strong {
    font-family: var(--serif);
    font-size: 1.5rem;
    color: var(--ink);
    margin-right: 0.25rem;
}

/* How to play: phrases a player could write, shown as small boxes rather than italic bullets. */

.play-guide h2 {
    margin-top: 2.5rem;
}

.step-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step-num {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--gold-ink);
    color: var(--on-gold);
    font: 500 1rem/1 var(--sans);
}

.play-cta {
    margin: 1.5rem 0 0;
}

.say-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 1rem 0;
}

.say-list li,
.say {
    display: inline-block;
    margin: 0;
    padding: 0.3rem 0.75rem;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    border-radius: 6px;
    color: var(--ink);
}

.say-list li::before,
.say-list li::after,
.say::before,
.say::after {
    content: '"';
    color: var(--ink-soft);
}

.say-table {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.75rem 1.5rem;
    align-items: baseline;
    margin: 1rem 0;
}

.say-table dt {
    font-weight: 500;
}

.say-table dd {
    margin: 0;
    color: var(--ink-soft);
}

.play-end {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
}

.play-end .note {
    margin-top: 1rem;
}

.play-end .button + .button {
    margin-left: 0.75rem;
}

/* How it works: the key rules in one box, and the time limit as a day-by-day line. */

.at-a-glance {
    margin: 1.5rem 0 0;
    padding: 1.1rem 1.25rem 0.6rem;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    border-radius: 6px;
}

.timeline {
    list-style: none;
    margin: 1rem 0;
    padding: 0 0 0 1.25rem;
    border-left: 2px solid var(--gold);
}

.timeline li {
    position: relative;
    margin-bottom: 0.9rem;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: calc(-1.25rem - 6px);
    top: 0.45em;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold-ink);
}

.timeline-day {
    display: inline-block;
    min-width: 3.75rem;
    font-weight: 500;
    color: var(--gold-ink);
}

@media (max-width: 560px) {
    .say-table {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .say-table dd {
        margin-bottom: 0.8rem;
    }
}

.upcoming + .upcoming {
    margin-top: 2.5rem;
}

/* Coming-soon pages */

.message-piece {
    display: block;
    margin: 0 auto 1rem;
    width: 72px;
    height: 72px;
}

.message-page {
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(2rem, 8vw, 5rem) 0;
    text-align: center;
}

/* Caissa */

.caissa {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.portrait {
    margin: 0;
    position: sticky;
    top: 2rem;
}

/* Its own shape (a little taller than wide), not cropped: the chess pieces sit at its lower left edge. */
.portrait img {
    width: 100%;
    height: auto;
    border: 10px solid var(--paper-deep);
    outline: 1px solid var(--gold);
    display: block;
}

.portrait figcaption {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
    text-align: center;
}

.prose {
    max-width: 65ch;
}

@media (max-width: 760px) {
    .caissa {
        grid-template-columns: 1fr;
    }

    .portrait {
        position: static;
        max-width: 360px;
        margin: 0 auto;
    }
}

/* Poetry */

.poetry {
    max-width: 640px;
    margin: clamp(3rem, 8vw, 5rem) auto 0;
    text-align: center;
}

/* Faint portrait of Caissa behind each poem. */
.poem {
    position: relative;
    isolation: isolate;
}

.poem::before {
    content: "";
    position: absolute;
    inset: 2.5rem 0 0;
    z-index: -1;
    background: url("../images/poetry-watermark.svg") center top 2rem / auto min(70%, 520px) no-repeat;
    opacity: 0.12;
    pointer-events: none;
}

.poem {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--rule);
}

.poem h3 {
    margin-top: 0;
    font-size: 1.6rem;
}

.poem p {
    font-family: var(--serif);
    font-size: 1.3rem;
    line-height: 1.6;
}

.poem .author {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--ink-soft);
}

/* ---------- Credits: license text ---------- */
.license {
    margin: 0 0 1.5rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--rule);
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}

.license p:last-child { margin-bottom: 0; }

/* ---------- Rules of chess ---------- */
.rules-contents {
    font: 0.95rem/1.8 var(--sans);
    margin: 0 0 1.5rem;
}

/* Each link as tall as its line, so it's an easy target for a thumb. */
.rules-contents a {
    display: inline-block;
}

.rules-board {
    margin: 1rem 0 1.25rem;
}

.rules-board img {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
}

.rules-board figcaption {
    font: 0.9rem/1.5 var(--sans);
    color: var(--ink-soft);
    margin-top: 0.4rem;
    max-width: 34rem;
}

.rules h2[id], .glossary dt[id] { scroll-margin-top: 5rem; }

.glossary dt {
    font-weight: 600;
    margin-top: 0.9rem;
}

.glossary dd {
    margin: 0.2rem 0 0;
}

/* ---------- Terms: copyright agent's contact details ---------- */
.agent {
    font-style: normal;
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--rule);
    overflow-wrap: anywhere;
}


/* Book */

.book-cover {
    display: block;
    width: min(100%, 360px);
    height: auto;
    margin: 1.5rem auto 2rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 32px rgb(0 0 0 / 0.25);
}


/* ---------- Puzzles: board beside the question; the picked answer shows green (right) or red (wrong) ---------- */
.puzzle-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    align-items: flex-start;
    margin: 1rem 0 2rem;
}

.puzzle-board {
    width: min(100%, 360px);
    height: auto;
    border: 6px solid var(--board-frame);
}

.puzzle-form {
    flex: 1 1 320px;
    min-width: 0;
}

.puzzle-form fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 1rem;
}

.puzzle-form legend {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.puzzle-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--field);
    cursor: pointer;
}

.puzzle-choice:hover {
    border-color: var(--gold);
}

.puzzle-choice input {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0.15rem 0 0;
    flex-shrink: 0;
}

.puzzle-choice.right,
.puzzle-feedback.right {
    border-color: var(--win);
}

.puzzle-choice.wrong,
.puzzle-feedback.wrong {
    border-color: var(--danger);
}

.puzzle-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
}

.puzzle-pager a {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    text-decoration: none;
}

.puzzle-pager a[aria-current="page"] {
    border-color: var(--gold);
    font-weight: 600;
}

.puzzle-feedback {
    border-left: 4px solid;
    padding: 0.25rem 1rem;
    margin-bottom: 1rem;
    background: var(--paper-deep);
}

/* Board puzzles: the coach's tap-to-move board (css/games.css) beside the feedback, as big as the screen's height
   allows while leaving room for the feedback column beside it on a wide screen. */
.puzzle-board-column {
    --coach-board: clamp(360px, calc(100vh - 12rem), 640px);
    width: min(100%, var(--coach-board));
}

/* The level toggles: a row at the top of the column right of the board (below it on a narrow screen). Picked ones
   are filled. */
.puzzle-board-layout .puzzle-form {
    flex: 1 1 240px;
}

.puzzle-levels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.puzzle-levels-label {
    width: 100%;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
}

.puzzle-levels .puzzle-level.on {
    background: var(--gold-ink);
    border-color: var(--gold-ink);
    color: var(--on-gold);
}

.puzzle-feedback:not(.right):not(.wrong) {
    border-color: var(--rule);
}

.puzzle-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ---------- Chess Continuum (Pages/Play/Continuum.razor, ContinuumGame.razor; js/continuum.js) ---------- */
/* The list page: a hero with the banner picture, the stats as tiles, four ways to play as cards, and the games as a grid
   of board cards. */
.continuum-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
    gap: 1.5rem 2.5rem;
    align-items: center;
    padding: 2rem 2rem 2.25rem;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    border-top: 4px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.continuum-hero h1 { margin-top: 0; }
.continuum-hero .lede { margin-bottom: 1.25rem; }
.continuum-hero .note { margin: 0.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

.continuum-hero-board {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--ink-soft);
    font-size: 0.85rem;
    text-decoration: none;
}

.continuum-hero-board img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(24, 24, 27, 0.18);
    transition: transform 0.2s;
}

.continuum-hero-board:hover img { transform: translateY(-3px) rotate(-0.5deg); }
.continuum-hero-board strong { color: var(--gold-ink); }

.continuum-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
}

.continuum-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0 0;
}

.continuum-stats > div {
    padding: 0.9rem 1rem;
    border: 1px solid var(--rule);
    border-left: 3px solid var(--gold);
    background: var(--paper);
    border-radius: var(--radius);
}

.continuum-stats dt {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.continuum-stats dd {
    margin: 0.15rem 0 0;
    font-family: var(--serif);
    font-size: 2.2rem;
    line-height: 1.1;
    color: var(--ink);
}

.continuum-results { margin-top: 0.5rem; }
.continuum-ways-title { margin: 2.5rem 0 1rem; }

.continuum-ways {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.continuum-way {
    padding: 1.3rem 1.4rem;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

.continuum-way h3 { font-size: 1.35rem; margin: 0 0 0.3rem; }
.continuum-way p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.continuum-rules {
    max-width: 46rem;
    margin: 1.25rem 0 0;
}

.continuum-rules summary {
    cursor: pointer;
    color: var(--gold-ink);
    font-weight: 500;
}

.continuum-rules ul { margin: 0.75rem 0 0; color: var(--ink-soft); }
.continuum-rules li { margin-bottom: 0.35rem; }

.continuum-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 2.5rem 0 1rem;
    scroll-margin-top: 1rem;
}

.continuum-tabs a {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    text-decoration: none;
}

.continuum-tabs a[aria-current="page"] {
    border-color: var(--gold);
    font-weight: 600;
}

.continuum-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1rem;
}

.continuum-list a {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    height: 100%;
    padding: 0.9rem;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
    border-radius: var(--radius);
}

.continuum-list a:hover { border-color: var(--gold); transform: translateY(-2px); }

.continuum-list img {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 3px;
}

.continuum-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.continuum-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--serif);
    font-size: 1.3rem;
}

.continuum-chip {
    padding: 0.05rem 0.55rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    font-family: var(--sans);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.continuum-chip.open { color: var(--win); }
.continuum-chip.kept { color: var(--gold-ink); }
.continuum-chip.over { color: var(--ink-soft); }

@media (max-width: 760px) {
    .continuum-hero { grid-template-columns: minmax(0, 1fr); padding: 1.5rem 1.25rem 1.75rem; }
    .continuum-hero-board { max-width: 280px; }
    .continuum-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .continuum-list img { width: 96px; height: 96px; }
}

.continuum-moves {
    border-collapse: collapse;
    margin: 0 0 1.5rem;
    font-family: var(--serif);
}

.continuum-moves th {
    text-align: left;
    font-weight: 600;
    color: var(--ink-soft);
    padding: 0 0.75rem 0.25rem 0;
}

.continuum-moves td {
    padding: 0.15rem 0.75rem 0.15rem 0;
    vertical-align: baseline;
}

.continuum-move {
    border: 0;
    background: none;
    padding: 0.1rem 0.3rem;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 1.05rem;
    color: var(--ink);
    cursor: pointer;
}

.continuum-move.inherited { color: var(--ink-soft); }
.continuum-move.current { background: var(--gold-soft); color: var(--board-frame); }  /* as .replay-move.current */

.continuum-by {
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.continuum-branches { padding-left: 1.2rem; }

/* The Chess Continuum page's banner: the full picture, as wide as the text. */
.continuum-banner {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
