/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: Georgia, 'Times New Roman', serif;
    background: #ffffff;
    color: #111111;
    font-size: 1rem;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

p { margin-bottom: 1rem; line-height: 1.8; }
em { font-style: italic; }
strong { font-weight: 700; }
a { color: #1a4a8a; }
a:hover { color: #b91c1c; }
img { max-width: 100%; display: block; margin: 1rem 0; }

/* ── Layout ── */
.main-content {
    max-width: 820px;
    margin: 2rem auto;
    padding: 2rem 2rem 4rem;
    background: #ffffff;
    color: #111111;
    border-radius: 12px;
    box-shadow: 0 2px 24px rgba(0,0,0,0.13);
}

.main-content > h1 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    margin-top: 2rem;
    margin-bottom: 0.2rem;
}

/* ── Hero ── */
#hero {
    background: #111111;
    padding: 2.5rem 1rem;
    text-align: center;
}
#hero h1 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem;
}
#hero .hero-sub {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #aaaaaa;
    letter-spacing: 0.05em;
}
#hero .hero-dates {
    display: inline-block;
    margin-top: 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #888888;
    border: 1px solid #444444;
    padding: 0.2rem 0.8rem;
}

/* ── Disclaimer ── */
.disclaimer {
    background: #f8f8f8;
    border-left: 4px solid #aaaaaa;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #444444;
    font-style: italic;
    margin: 1.5rem 0 2rem;
}

/* ── Part headers ── */
.part-header {
    padding: 1.1rem 2rem;
    margin: 2.5rem -2rem 1.5rem;
    color: #ffffff;
}
.part-header .part-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.25rem;
    opacity: 0.75;
    color: #ffffff;
}
.part-header h2 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

/* Per-part colours */
#context    { background: #1e3a5f; }
#part1      { background: #14532d; }
#part2      { background: #7f1d1d; }
#part3      { background: #4c1d95; }
#part4      { background: #92400e; }
#part5      { background: #0c4a6e; }
#timeline   { background: #134e4a; }
#conclusion { background: #1c1917; }
#sources    { background: #374151; }

/* ── H3 topic headers — coloured per part via cascade ── */
.content h3 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 2rem 0 0.6rem;
    padding: 0.5rem 0.75rem;
    border-left: 5px solid #374151;
    background: #f5f5f5;
    color: #111111;
}

#context  ~ .content h3 { border-left-color: #1e3a5f; background: #eff4fb; }
#part1    ~ .content h3 { border-left-color: #15803d; background: #f0fdf4; }
#part2    ~ .content h3 { border-left-color: #b91c1c; background: #fef2f2; }
#part3    ~ .content h3 { border-left-color: #6d28d9; background: #f5f3ff; }
#part4    ~ .content h3 { border-left-color: #b45309; background: #fffbeb; }
#part5    ~ .content h3 { border-left-color: #0369a1; background: #f0f9ff; }

/* ── H4 sub-headings ── */
.content h4 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #555555;
    margin: 1.5rem 0 0.5rem;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 0.3rem;
}

/* ── Feature lists ── */
.feature-list { list-style: none; padding: 0; margin: 0.5rem 0 1.25rem; }
.feature-list li {
    padding: 0.4rem 0 0.4rem 1.5rem;
    position: relative;
    border-bottom: 1px solid #eeeeee;
    font-size: 0.95rem;
}
.feature-list li::before {
    content: '›';
    position: absolute;
    left: 0.3rem;
    color: #888888;
    font-size: 1.2rem;
    line-height: 1.5;
}

/* ── Steps list ── */
.steps-list { list-style: none; padding: 0; counter-reset: steps; margin: 0.5rem 0 1rem; }
.steps-list li {
    counter-increment: steps;
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eeeeee;
    font-size: 0.95rem;
    align-items: flex-start;
}
.steps-list li::before {
    content: none;
}

/* ── Spec boxes ── */
.spec-box {
    background: #f8f8f8;
    border: 1px solid #dddddd;
    border-top: 3px solid #111111;
    padding: 0.9rem 1.1rem;
    margin: 1.25rem 0;
    font-size: 0.875rem;
}
.spec-box .spec-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #555555;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #dddddd;
}
.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px dotted #dddddd;
    gap: 1rem;
}
.spec-row:last-child { border-bottom: none; }
.spec-row .label { color: #444444; font-size: 0.875rem; }
.spec-row .value { font-family: 'IBM Plex Mono', monospace; font-size: 0.82rem; color: #111111; text-align: right; }

/* ── Quotes ── */
.quote {
    background: #f8f8f8;
    border-left: 4px solid #111111;
    padding: 0.9rem 1.2rem;
    margin: 1.25rem 0;
    font-style: italic;
    font-size: 1rem;
    color: #222222;
}
.quote-attr {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    font-size: 0.8rem;
    font-family: 'IBM Plex Mono', monospace;
    color: #666666;
}

/* ── Easter egg ── */
.easter-egg {
    background: #111111;
    color: #88cc88;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}
.easter-egg::before {
    content: '// BINARY DECODED FROM PACKAGE BACK COVER';
    display: block;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: #666666;
    margin-bottom: 0.5rem;
}

/* ── Team cards ── */
.team-card {
    border: 1px solid #dddddd;
    border-left: 4px solid #111111;
    padding: 0.65rem 1rem;
    margin-bottom: 0.5rem;
    background: #fafafa;
}
.team-card .name { font-family: 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 0.9rem; color: #111111; margin-bottom: 0.1rem; }
.team-card .role { font-size: 0.875rem; color: #444444; }
.pseudonym { color: #888888; font-weight: 400; font-style: italic; }

/* ── Opinion box ── */
.opinion-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #d97706;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}
.opinion-box .opinion-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #92400e;
    margin-bottom: 0.5rem;
}
.opinion-box p { font-size: 0.95rem; color: #111111; margin-bottom: 0.4rem; }
.opinion-box p:last-child { margin-bottom: 0; }
.privacy-note { font-size: 0.84rem; color: #666666; font-style: italic; }

/* ── Person cards ── */
.person-card {
    background: #fafafa;
    border: 1px solid #dddddd;
    border-top: 3px solid #111111;
    padding: 1rem;
    height: 100%;
}
.person-card .person-name {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #111111;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dddddd;
}
.person-card p { font-size: 0.9rem; color: #333333; margin: 0; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 1.75rem; margin: 1rem 0; }
.timeline::before {
    content: '';
    position: absolute;
    left: 0.4rem; top: 0.5rem; bottom: 0;
    width: 1px;
    background: #cccccc;
}
.timeline-entry { position: relative; margin-bottom: 1.5rem; }
.timeline-entry::before {
    content: '';
    position: absolute;
    left: -1.5rem; top: 0.45rem;
    width: 8px; height: 8px;
    background: #111111;
    border-radius: 50%;
}
.timeline-year {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: #111111;
    margin-bottom: 0.2rem;
}
.timeline-items { list-style: none; padding: 0; font-size: 0.875rem; color: #333333; }
.timeline-items li { margin-bottom: 0.2rem; padding-left: 0.75rem; position: relative; line-height: 1.6; }
.timeline-items li::before { content: '–'; position: absolute; left: 0; color: #aaaaaa; }

/* ── SNES table ── */
.snes-table { width: 100%; font-size: 0.875rem; border-collapse: collapse; }
.snes-table th {
    background: #f0f0f0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #333333;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid #111111;
    text-align: left;
}
.snes-table td { padding: 0.45rem 0.75rem; border-bottom: 1px solid #eeeeee; color: #111111; }
.snes-table tr:hover td { background: #f8f8f8; }
.note-small { font-size: 0.875rem; color: #555555; }

/* ── Sources ── */
.sources-section h5 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #111111;
    margin-bottom: 0.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #111111;
}
.sources-section ul { list-style: none; padding: 0; font-size: 0.84rem; }
.sources-section ul li {
    padding: 0.25rem 0 0.25rem 0.85rem;
    color: #333333;
    position: relative;
    line-height: 1.5;
    border-bottom: 1px solid #f0f0f0;
}
.sources-section ul li::before { content: '–'; position: absolute; left: 0; color: #aaaaaa; }

/* ── Closing quote ── */
.closing-quote {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
    margin: 2.5rem 0;
    font-style: italic;
    color: #333333;
    font-size: 1.05rem;
    line-height: 1.9;
}

/* ── Footer ── */
.site-footer {
    background: #111111;
    padding: 1.5rem 0;
    margin-top: 3rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: #888888;
}
.site-footer .brand { color: #ffffff; font-weight: 600; }

@media (max-width: 768px) {
    .main-content { padding: 0 1rem 2rem; }
}