/* =====================================================================
   2 by 2 Napoleonic's — shared styling for the 2by2 section.
   Used by 2by2/index.html and 2by2/vthree/index.html.
   Edit the look HERE only, so the pages cannot drift apart.
   ===================================================================== */

:root {
    color-scheme: light;
    --ink: #211a14;
    --muted: #5f564b;
    --paper: #fbfaf6;
    --panel: #ffffff;
    --line: #d9d0c2;
    --accent: #7f1d1d;
    --accent-dark: #581414;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
}

header,
main,
footer {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    padding-top: 42px;
    padding-bottom: 20px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 30px;
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
}

h1 {
    margin: 0;
    font-size: clamp(2.4rem, 8vw, 5rem);
    font-weight: normal;
    letter-spacing: 0.02em;
    line-height: 0.95;
}

.subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 1.25rem;
    font-variant: small-caps;
    letter-spacing: 0.08em;
}

.intro {
    max-width: 720px;
    margin-top: 24px;
    font-size: 1.1rem;
}

/* Two-column layout: content beside a figure */
.grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 28px;
    align-items: start;
    margin: 20px 0 36px;
}

section,
figure {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    margin: 0;
}

main > section + section {
    margin-top: 24px;
}

h2 {
    margin: 0 0 12px;
    font-size: 1.35rem;
    font-weight: normal;
    font-variant: small-caps;
    letter-spacing: 0.06em;
}

h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: normal;
    font-style: italic;
}

ul {
    margin: 0;
    padding-left: 1.2rem;
}

li {
    margin: 0 0 10px;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover,
a:focus {
    color: var(--accent-dark);
}

/* Big tappable download links */
.action-list {
    display: grid;
    gap: 12px;
    padding: 0;
    list-style: none;
}

.action-list a {
    display: block;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 13px 14px;
    background: #fffdf9;
    font-family: Arial, sans-serif;
    font-weight: 700;
}

.action-list span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
    font-weight: normal;
}

figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    background: #fff;
}

figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.95rem;
    font-style: italic;
}

footer {
    padding-bottom: 42px;
    color: var(--muted);
    font-size: 0.95rem;
}

/* ---------------------------------------------------------------
   Front-door extras (2by2/index.html)
   --------------------------------------------------------------- */

/* Hero photograph, full width above the fold */
figure.hero {
    padding: 14px;
    margin: 8px 0 32px;
}

figure.hero img {
    border-radius: 4px;
}

figure.hero figcaption {
    text-align: center;
    font-size: 1rem;
}

/* Three routes into the game */
.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
    margin: 0 0 24px;
}

.cards section {
    height: 100%;
}

.cards .lede {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.98rem;
}

/* A quieter row of secondary links */
.also {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    font-size: 0.98rem;
}

.also li {
    margin: 0;
}

/* Gallery thumbnails */
.thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.thumbs li {
    margin: 0;
}

.thumbs a {
    display: block;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
}

.thumbs img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
}

.thumbs span {
    display: block;
    margin-top: 7px;
}

/* Editorial note */
.whatsnew p {
    max-width: 66ch;
}

.whatsnew p:last-child {
    margin-bottom: 0;
}

@media (max-width: 860px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    header,
    main,
    footer {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    section,
    figure {
        padding: 18px;
    }
}
