/* Article layout for /articles/ pages, EN and locale copies (owner a510). Same class names as the pilot
   (/assets/css/preview-article.css, kept for /preview/train-games/), plus rules for content the older articles
   carry (hub post lists, CTA, blockquotes, small inline-sized figures). Spec: /home/railsandrivals/seo/ARTICLE-TEMPLATE.md */

/* Source Serif 4: static instances at opsz 18 (20 KB each instead of the 122 KB variable file, so the preload
   does not compete with the lead image on slow phones) */
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/source-serif-4-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 600 700; font-display: swap; src: url(/assets/fonts/source-serif-4-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/source-serif-4-italic-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/assets/fonts/playfair-display-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'UnifrakturMaguntia'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/unifrakturmaguntia-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Metric-matched fallbacks so the swap to the web fonts barely moves text */
@font-face { font-family: 'Source Serif Fallback'; src: local('Georgia'), local('Times New Roman'), local('Liberation Serif'), local('DejaVu Serif'); size-adjust: 104%; ascent-override: 92%; descent-override: 30%; }
@font-face { font-family: 'Playfair Fallback'; src: local('Georgia'), local('Times New Roman'), local('Liberation Serif'), local('DejaVu Serif'); size-adjust: 106%; ascent-override: 102%; descent-override: 24%; }

:root {
    --bg: #ffffff;
    --paper: #faf6ee;
    --paper-line: #e9e1d1;
    --ink: #1f1b16;
    --ink-soft: #5a5046;
    --red: #8b2500;
    --red-dark: #6e1d00;
    --gold: #a87a0a;
    --rule: #2a241c;
    --serif: 'Source Serif 4', 'Source Serif Fallback', Georgia, serif;
    --display: 'Playfair Display', 'Playfair Fallback', Georgia, serif;
    --measure: 40.5rem;           /* ~68ch of 19px body text */
    --header-h: 56px;
    /* names used by inline styles inside older article bodies */
    --border: #2a241c;
    --ink-light: #5a5046;
    --paper-dark: #e9e1d1;
    --red-accent: #8b2500;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.125rem;            /* 18px */
    line-height: 1.65;
    font-optical-sizing: auto;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
}
@media (min-width: 900px) { body { font-size: 1.1875rem; } }  /* 19px */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 0.5rem 1rem; z-index: 200; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ========== COMPACT STICKY MASTHEAD ========== */
.pv-header {
    position: sticky; top: 0; z-index: 100;
    background: #fff;
    border-bottom: 3px double var(--rule);
}
.pv-header-inner {
    max-width: 1120px; margin: 0 auto;
    min-height: var(--header-h);
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0 1rem;
}
.pv-logo {
    font-family: 'UnifrakturMaguntia', Georgia, serif;
    font-size: 1.55rem; line-height: 1;
    color: var(--ink); text-decoration: none; white-space: nowrap;
    margin-right: auto;
}
.pv-logo:hover { color: var(--ink); }
.pv-nav { font-family: var(--display); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }
.pv-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem 1.1rem; flex-wrap: wrap; }
.pv-nav a { color: var(--ink); text-decoration: none; padding: 0.35rem 0; display: inline-block; }
.pv-nav a:hover { color: var(--red); }
.pv-nav a[aria-current] { color: var(--red); border-bottom: 2px solid var(--red); }

.pv-menu { position: relative; }
.pv-menu > summary {
    list-style: none; cursor: pointer;
    font-family: var(--display); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em;
    border: 1px solid var(--rule); padding: 0 0.8rem; min-height: 40px; display: flex; align-items: center; gap: 0.45rem;
    user-select: none;
}
.pv-menu > summary::-webkit-details-marker { display: none; }
.pv-menu > summary::before { content: ''; width: 14px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; }
.pv-menu[open] > summary { background: var(--paper); }
.pv-menu-panel {
    position: absolute; right: 0; top: calc(100% + 8px);
    width: min(88vw, 300px);
    background: #fff; border: 1px solid var(--rule); box-shadow: 0 10px 30px rgba(31, 27, 22, 0.15);
    padding: 0.5rem 1rem 1rem;
}
.pv-menu-panel .pv-nav ul { flex-direction: column; gap: 0; }
.pv-menu-panel .pv-nav a { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--paper-line); }
.pv-menu-panel .pv-nav a[aria-current] { border-bottom-color: var(--paper-line); }
.pv-langs { margin-top: 0.9rem; font-size: 0.95rem; }
.pv-langs summary { cursor: pointer; color: var(--ink-soft); padding: 0.4rem 0; min-height: 40px; display: flex; align-items: center; }
.pv-langs-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.75rem; padding-top: 0.25rem; }
.pv-langs-list a { color: var(--ink); text-decoration: none; padding: 0.45rem 0; font-size: 0.9rem; }
.pv-langs-list a.active { color: var(--red); font-weight: 600; }
.pv-desktop-nav { display: none; }
@media (min-width: 960px) {
    .pv-desktop-nav { display: block; }
    .pv-menu-panel .pv-nav { display: none; }
    .pv-menu > summary { border: 0; padding: 0; min-height: 40px; color: var(--ink-soft); }
    .pv-menu > summary::before { display: none; }
    .pv-menu > summary::after { content: '\25BE'; font-size: 0.7rem; }
    .pv-menu-panel { padding-top: 0; }
    .pv-langs { margin-top: 0.5rem; }
    .pv-langs summary { display: none; }
    .pv-logo { font-size: 1.9rem; }
}
.pv-menu-label-desktop { display: none; }
@media (min-width: 960px) { .pv-menu-label-mobile { display: none; } .pv-menu-label-desktop { display: inline; } }

/* ========== ARTICLE ========== */
.pv-crumbs { max-width: var(--measure); margin: 1.1rem auto 0; padding: 0 1.25rem; font-size: 0.85rem; color: var(--ink-soft); font-family: var(--serif); }
.pv-crumbs a { color: var(--ink-soft); }
.pv-crumbs span[aria-hidden] { margin: 0 0.35rem; }

.pv-article { padding: 0 1.25rem 3rem; }
.pv-article > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.pv-article > .pv-wide { max-width: 1040px; }
.pv-article > figure { max-width: 760px; }

.pv-kicker { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); margin-top: 0.9rem; margin-bottom: 0.4rem; }
.pv-article h1 {
    font-family: var(--display); font-weight: 800;
    font-size: clamp(1.95rem, 7vw, 3.1rem); line-height: 1.12; letter-spacing: -0.01em;
    margin-top: 0; margin-bottom: 0.75rem; text-wrap: balance;
}
.pv-byline { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--paper-line); }

.pv-article h2 {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(1.55rem, 5.2vw, 2.1rem); line-height: 1.2;
    margin-top: 3rem; margin-bottom: 0.75rem; padding-top: 1.1rem;
    border-top: 3px double var(--rule); text-wrap: balance;
}
.pv-article h3 {
    font-family: var(--display); font-weight: 700;
    font-size: 1.25rem; line-height: 1.3;
    margin-top: 2rem; margin-bottom: 0.4rem;
}
.pv-article h3 a { color: var(--ink); text-decoration-color: var(--paper-line); text-decoration-thickness: 2px; }
.pv-article h3 a:hover { color: var(--red); text-decoration-color: var(--red); }
.pv-article p, .pv-article ul, .pv-article ol { margin-top: 0; margin-bottom: 1.1rem; }
.pv-article ul, .pv-article ol { padding-left: 1.3rem; }
.pv-article li { margin-bottom: 0.4rem; }
.pv-article em { color: var(--ink-soft); }

/* Figures */
.pv-article figure { margin-top: 1.75rem; margin-bottom: 1.75rem; }
.pv-article figure img { width: 100%; height: auto; border-radius: 3px; background: var(--paper); }
.pv-article figcaption { font-size: 0.82rem; line-height: 1.5; color: var(--ink-soft); margin-top: 0.5rem; }
.pv-article figcaption a { color: var(--ink-soft); }
.pv-lead-figure { margin-top: 0.5rem !important; }

/* Quick pick */
.pv-quickpick {
    background: var(--paper); border: 1px solid var(--paper-line); border-top: 4px solid var(--red);
    padding: 1.1rem 1.15rem 0.9rem; margin-top: 1.75rem; margin-bottom: 1.75rem;
}
.pv-quickpick h2 { all: unset; display: block; font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin-bottom: 0.6rem; }
.pv-quickpick ol { list-style: none; padding: 0; margin: 0 0 0.6rem; }
.pv-quickpick li { display: grid; grid-template-columns: minmax(7.5rem, 38%) 1fr; gap: 0.75rem; padding: 0.6rem 0; border-top: 1px solid var(--paper-line); margin: 0; align-items: baseline; }
.pv-quickpick li:first-child { border-top: 0; }
.pv-qp-type { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-family: var(--display); }
.pv-qp-game { font-weight: 600; }
.pv-qp-game a { color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--paper-line); }
.pv-qp-game a:hover { color: var(--red); border-bottom-color: var(--red); }
.pv-qp-game a::after { content: ' \2192'; color: var(--red); }
.pv-quickpick .pv-qp-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }

.pv-intro { font-size: 1.05em; }

/* Comparison table */
.pv-table-title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin: 2rem auto 0.6rem; }
.pv-table-wrap { margin-bottom: 1.5rem; }
.pv-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
.pv-table th, .pv-table td { padding: 0.55rem 0.6rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--paper-line); }
.pv-table thead th { font-family: var(--display); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 2px solid var(--rule); background: #fff; position: sticky; top: var(--header-h); }
.pv-table tbody tr:nth-child(even) { background: var(--paper); }
.pv-table tbody tr.pv-ours { background: #fff3e0; }
.pv-table td:first-child { font-weight: 600; }
.pv-table td:first-child a { color: var(--ink); }
.pv-tag { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.1rem 0.45rem; border: 1px solid var(--paper-line); background: #fff; white-space: nowrap; }

@media (max-width: 640px) {
    .pv-table, .pv-table tbody, .pv-table tr, .pv-table td { display: block; width: 100%; }
    .pv-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .pv-table tbody tr, .pv-table tbody tr:nth-child(even) { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 1rem; background: #fff; border: 1px solid var(--paper-line); border-left: 4px solid var(--gold); margin-bottom: 0.9rem; padding: 0.3rem 0.9rem 0.75rem; }
    .pv-table tbody tr.pv-ours { border-left-color: var(--red); background: #fffaf2; }
    .pv-table td { border: 0; padding: 0.2rem 0; font-size: 0.95rem; width: auto; }
    .pv-table td::before { content: attr(data-label); display: block; font-family: var(--display); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); line-height: 1.3; }
    .pv-table td[data-label="Platforms"], .pv-table td.pv-span { grid-column: 1 / -1; }
    .pv-table td:first-child { grid-column: 1 / -1; font-family: var(--display); font-size: 1.15rem; font-weight: 700; padding: 0.35rem 0 0.4rem; border-bottom: 1px solid var(--paper-line); margin-bottom: 0.15rem; }
    .pv-table td:first-child::before { content: none; }
}
@media (min-width: 641px) and (max-width: 1079px) {
    .pv-table-wrap { overflow-x: auto; }
    .pv-table thead th { position: static; }
    .pv-table { min-width: 860px; }
}

/* Game sections */
.pv-ours-note { font-size: 0.85rem; color: var(--ink-soft); }
.pv-disclosure { background: var(--paper); border-left: 3px solid var(--gold); padding: 0.8rem 1rem; font-size: 0.95rem; }
.pv-disclosure em { color: var(--ink); }

.pv-related { list-style: none; padding: 0 !important; }
.pv-related li { border-top: 1px solid var(--paper-line); padding: 0.65rem 0; margin: 0; }
.pv-related li:last-child { border-bottom: 1px solid var(--paper-line); }
.pv-related a { text-decoration: none; font-weight: 600; }
.pv-related a::after { content: ' \2192'; }
.pv-sources { font-size: 0.9rem; color: var(--ink-soft); }
.pv-sources li { margin-bottom: 0.25rem; }

/* ========== OLDER ARTICLE CONTENT ========== */
.pv-article blockquote { margin: 0 auto 1.1rem; border-left: 3px solid var(--gold); background: var(--paper); padding: 0.8rem 1rem; font-style: italic; }
.pv-article blockquote p:last-child { margin-bottom: 0; }
.pv-article .pv-intro { border-left: 3px solid var(--red); padding-left: 0.9rem; }
.pv-article img[style*="max-width"] { width: 100%; }   /* inline max-width caps it, as in the old template */
.pv-article .whyte-chart { margin-bottom: 1.5rem; }
.pv-article .whyte-chart figure { margin: 0; }
.pv-article .cta { text-align: center; margin-top: 2.5rem; margin-bottom: 0.5rem; }
.pv-article .cta a { display: inline-block; background: var(--red); color: #fff; padding: 0.8rem 1.6rem; text-decoration: none; font-family: var(--display); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.9rem; }
.pv-article .cta a:hover { background: var(--red-dark); color: #fff; }
.pv-article .post-list { list-style: none; padding: 0; }
.pv-article .post-list li { border-bottom: 1px solid var(--paper-line); padding: 0.9rem 0; margin: 0; }
.pv-article .post-list li > a:not([tabindex]) { font-family: var(--display); font-weight: 700; font-size: 1.12rem; line-height: 1.3; color: var(--ink); text-decoration: none; }
.pv-article .post-list li > a:not([tabindex]):hover { color: var(--red); }
.pv-article .post-list img { border-radius: 3px; }
.pv-article .post-meta { font-size: 0.88rem; color: var(--ink-soft); }
@media (max-width: 480px) { .pv-article li img[style*="float:left"] { width: 112px !important; height: 63px !important; } }
.pv-article .pv-table-wrap:not(.pv-wide) .pv-table { min-width: 0; }
@media (min-width: 1080px) { .pv-table-wrap { overflow-x: auto; } .pv-table thead th { position: static; } }
mark.oq { background: #ffe58a; color: #1a1612; padding: 0 0.2rem; font-family: sans-serif; font-size: 0.85em; }

/* ========== FOOTER ========== */
.pv-footer { border-top: 3px double var(--rule); background: var(--paper); padding: 2rem 1.25rem 2.5rem; text-align: center; font-size: 0.88rem; color: var(--ink-soft); }
.pv-footer-logo { font-family: 'UnifrakturMaguntia', Georgia, serif; font-size: 1.6rem; color: var(--ink); margin: 0 0 0.25rem; }
.pv-footer-motto { font-style: italic; margin: 0 0 1.25rem; }
.pv-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.1rem 1.2rem; max-width: 720px; margin: 0 auto 1rem; padding: 0; list-style: none; }
.pv-footer-links a { color: var(--ink); text-decoration: none; display: inline-block; padding: 0.45rem 0; font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.pv-footer-links a:hover { color: var(--red); }
.pv-footer p { margin: 0; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
