/* ==========================================================================
   Warhogy Warcraft section (/warcraft/)

   Shared by the series hub (body.wc-hub-page) and every story page
   (body.wc-story-page). Story pages are generated by
   scripts/build-warcraft-story.mjs; the hub is hand-written.

   The site's base sheet (/css/styles.css) supplies the fixed top nav, the
   footer, fonts and the grainy dark background. This sheet only adds the
   reading layout: a hero with sourced artwork, a contents grid, a sticky
   chapter rail beside a single reading column, and the story cards on the
   hub. Gold is kept for wayfinding (numbers, labels, the active chapter);
   the body copy itself stays quiet so a 7,000-word read is not tiring.
   ========================================================================== */

.wc-page {
    --wc-nav: 80px;
    --wc-ink: #e9e5db;
    --wc-ink-2: rgba(233, 229, 219, 0.78);
    --wc-ink-3: rgba(233, 229, 219, 0.56);
    --wc-rule: rgba(255, 255, 255, 0.09);
    --wc-rule-strong: rgba(248, 212, 76, 0.28);
    --wc-panel: rgba(18, 18, 18, 0.72);
    --wc-gold: var(--brand-gold);
    --wc-gold-strong: var(--brand-gold-strong);
    --wc-warn: #ff9f73;
    --wc-measure: 760px;
    --wc-rail-w: 272px;
    min-height: 100vh;
    color: var(--wc-ink);
    background-color: #050505;
    background-image:
        radial-gradient(ellipse 1100px 700px at 50% -5%, rgba(248, 212, 76, 0.10), transparent 70%),
        radial-gradient(ellipse 900px 600px at 100% 20%, rgba(76, 120, 248, 0.06), transparent 70%);
    background-repeat: no-repeat;
}

html:has(.wc-page) {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html:has(.wc-page) {
        scroll-behavior: auto;
    }
}

.wc-page a:focus-visible,
.wc-page button:focus-visible,
.wc-page summary:focus-visible,
.wc-page [tabindex]:focus-visible {
    outline: 2px solid var(--wc-gold-strong);
    outline-offset: 3px;
}

.wc-page .nav-links a.active,
.wc-page .nav-links a[aria-current="true"] {
    color: var(--wc-gold);
}

/* --------------------------------------------------------------------------
   Shared atoms
   -------------------------------------------------------------------------- */
.wc-eyebrow,
.wc-kicker {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.74rem;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--wc-ink-3);
    margin: 0;
}

.wc-eyebrow {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.wc-eyebrow span:first-child,
.wc-kicker {
    color: var(--wc-gold);
}

.wc-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--wc-gold), var(--wc-gold-strong));
    color: #0a0a0a;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 0.86rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-m);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.wc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(248, 212, 76, 0.28);
}

.wc-button-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--wc-ink);
    border-color: rgba(248, 212, 76, 0.4);
}

.wc-button-ghost:hover {
    background: rgba(248, 212, 76, 0.1);
    color: #fff;
    box-shadow: none;
}

/* Tactical corner marks, matching the homepage guide cards. */
.wc-corners {
    position: relative;
}

.wc-corners::before,
.wc-corners::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--wc-gold);
    opacity: 0.45;
    pointer-events: none;
    z-index: 3;
}

.wc-corners::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.wc-corners::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* --------------------------------------------------------------------------
   Hero (story and hub)
   -------------------------------------------------------------------------- */
.wc-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: calc(var(--wc-nav) + 72px) 24px 64px;
    border-bottom: 1px solid var(--wc-rule-strong);
}

.wc-hero-art {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.wc-hero-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--focus, 50% 50%);
    filter: saturate(0.85) brightness(0.62);
    transform: scale(1.02);
}

.wc-hero-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 5, 5, 0.72) 0%, rgba(5, 5, 5, 0.45) 35%, rgba(5, 5, 5, 0.86) 78%, #050505 100%),
        linear-gradient(90deg, rgba(5, 5, 5, 0.75) 0%, rgba(5, 5, 5, 0.2) 60%, transparent 100%),
        repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(0, 0, 0, 0.14) 3px, rgba(0, 0, 0, 0.14) 4px);
}

.wc-hero-inner {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
}

.wc-breadcrumb {
    position: static;
    width: auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
    font-size: 0.82rem;
    color: var(--wc-ink-3);
}

.wc-breadcrumb a {
    color: var(--wc-ink-2);
    text-decoration: none;
}

.wc-breadcrumb a:hover {
    color: var(--wc-gold);
}

.wc-title {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: clamp(2.6rem, 6.2vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
    margin: 16px 0 22px;
    max-width: 16ch;
}

.wc-dek {
    font-size: clamp(1.1rem, 1.6vw, 1.32rem);
    line-height: 1.5;
    color: var(--wc-ink-2);
    max-width: 60ch;
    margin: 0 0 26px;
}

.wc-stats {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 0;
    margin: 0 0 28px;
}

.wc-stats li {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 13px;
    border: 1px solid rgba(248, 212, 76, 0.3);
    background: rgba(10, 10, 10, 0.55);
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.6px;
    color: var(--wc-ink-2);
}

.wc-stats i {
    color: var(--wc-gold);
    font-size: 0.72rem;
}

.wc-lead {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--wc-ink);
    max-width: 64ch;
    margin: 0 0 30px;
}

.wc-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* --------------------------------------------------------------------------
   Story page: contents grid
   -------------------------------------------------------------------------- */
.wc-contents {
    padding: 60px 24px;
    border-bottom: 1px solid var(--wc-rule);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.wc-contents-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 48px 64px;
    align-items: start;
}

.wc-contents h2,
.wc-sources-section h2,
.wc-section-title {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 0 0 20px;
}

.wc-route {
    border-left: 3px solid var(--wc-gold);
    padding: 12px 18px;
    background: rgba(248, 212, 76, 0.07);
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--wc-ink);
    margin: 0 0 18px;
}

.wc-route strong {
    color: #fff;
}

.wc-route a,
.wc-prose a,
.wc-next-story a:not(.wc-button) {
    color: var(--wc-gold);
    text-decoration: underline;
    text-decoration-color: rgba(248, 212, 76, 0.45);
    text-underline-offset: 3px;
}

.wc-route a:hover,
.wc-prose a:hover {
    color: var(--wc-gold-strong);
    text-decoration-color: currentColor;
}

.wc-spoilers {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--wc-ink-3);
    margin: 0;
}

.wc-spoilers i {
    color: var(--wc-warn);
    margin-top: 4px;
    flex: 0 0 auto;
}

.wc-toc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 32px;
}

.wc-toc-group h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--wc-gold);
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--wc-rule);
}

.wc-toc-group a {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 12px;
    align-items: baseline;
    padding: 8px 6px;
    margin: 0 -6px;
    text-decoration: none;
    color: var(--wc-ink);
    font-size: 0.97rem;
    line-height: 1.4;
    border-radius: var(--radius-m);
    transition: background 0.2s ease, color 0.2s ease;
}

.wc-toc-group a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.wc-toc-group a b {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--wc-gold);
}

.wc-toc-group a small {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--wc-ink-3);
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Story page: reader layout (rail + column)
   -------------------------------------------------------------------------- */
.wc-reader {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: var(--wc-rail-w) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

.wc-rail {
    position: sticky;
    top: calc(var(--wc-nav) + 28px);
    max-height: calc(100vh - var(--wc-nav) - 56px);
    overflow-y: auto;
    padding: 40px 0 24px;
    /* undo the base sheet's fixed-header styling for bare <nav> */
    width: auto;
    z-index: 5;
    border: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(248, 212, 76, 0.3) transparent;
}

.wc-rail-title {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 0.98rem;
    letter-spacing: 0.2px;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--wc-rule-strong);
}

.wc-rail-title a {
    color: #fff;
    text-decoration: none;
}

.wc-rail-title a:hover {
    color: var(--wc-gold);
}

.wc-rail-group {
    margin-bottom: 18px;
}

.wc-rail-group-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--wc-ink-3);
    margin: 0 0 6px;
}

.wc-rail ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wc-rail ol a {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 7px 10px 7px 10px;
    border-left: 2px solid transparent;
    color: var(--wc-ink-2);
    font-size: 0.86rem;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.wc-rail ol a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.wc-rail ol a.is-active {
    color: #fff;
    border-left-color: var(--wc-gold);
    background: rgba(248, 212, 76, 0.08);
}

.wc-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--wc-gold);
    flex: 0 0 22px;
}

.wc-rail-sources {
    display: block;
    margin-top: 10px;
    padding: 10px 12px;
    font-size: 0.82rem;
    color: var(--wc-gold);
    text-decoration: none;
    border-top: 1px solid var(--wc-rule);
}

.wc-rail-sources:hover {
    color: var(--wc-gold-strong);
    text-decoration: underline;
}

.wc-rail-progress {
    height: 2px;
    margin: 18px 10px 0;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.wc-rail-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--wc-gold), var(--wc-gold-strong));
    transition: width 0.15s linear;
}

.wc-column {
    max-width: var(--wc-measure);
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Story page: chapters
   -------------------------------------------------------------------------- */
.wc-chapter,
.wc-sources-section {
    padding: 72px 0 52px;
    border-bottom: 1px solid var(--wc-rule);
    scroll-margin-top: calc(var(--wc-nav) + 20px);
}

.wc-chapter-head {
    margin-bottom: 30px;
}

.wc-chapter-head .wc-eyebrow {
    margin-bottom: 14px;
}

.wc-chapter-head h2 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: clamp(1.75rem, 3.4vw, 2.45rem);
    line-height: 1.14;
    letter-spacing: -0.015em;
    color: #fff;
    margin: 0;
}

.wc-figure {
    margin: 0 0 34px;
}

.wc-frame {
    position: relative;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: #0b0b0b;
    border: 1px solid rgba(248, 212, 76, 0.26);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.wc-frame::before,
.wc-frame::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--wc-gold);
    opacity: 0.55;
    pointer-events: none;
    z-index: 3;
}

.wc-frame::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.wc-frame::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.wc-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--focus, 50% 50%);
}

.wc-frame.is-full {
    aspect-ratio: auto;
}

.wc-frame.is-full img {
    height: auto;
}

.wc-frame.is-dual {
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    background: rgba(248, 212, 76, 0.26);
}

.wc-frame.is-dual img {
    aspect-ratio: 16 / 9;
    height: auto;
    background: #0b0b0b;
}

.wc-figure figcaption {
    padding: 12px 2px 0;
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--wc-ink-3);
}

.wc-credit {
    display: block;
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(248, 212, 76, 0.7);
    text-decoration: none;
}

a.wc-credit:hover {
    color: var(--wc-gold-strong);
    text-decoration: underline;
}

.wc-prose {
    font-size: 1.07rem;
    line-height: 1.78;
    color: var(--wc-ink);
}

.wc-prose p {
    margin: 0 0 1.25em;
}

.wc-prose p:last-child {
    margin-bottom: 0;
}

.wc-prose strong {
    color: #fff;
    font-weight: 600;
}

.wc-prose h3 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.38rem;
    line-height: 1.3;
    color: #fff;
    margin: 2.1em 0 0.75em;
    scroll-margin-top: calc(var(--wc-nav) + 20px);
}

.wc-prose h4 {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--wc-gold);
    margin: 1.8em 0 0.6em;
}

.wc-callout {
    border-left: 3px solid var(--wc-gold);
    background: rgba(248, 212, 76, 0.07);
    padding: 14px 18px;
    margin: 1.4em 0;
}

.wc-callout-warn {
    border-left-color: var(--wc-warn);
    background: rgba(255, 159, 115, 0.08);
}

.wc-table-wrap {
    overflow-x: auto;
    margin: 1.6em 0;
    border: 1px solid var(--wc-rule);
    border-radius: var(--radius-m);
    -webkit-overflow-scrolling: touch;
}

.wc-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    line-height: 1.5;
}

.wc-table-wrap th {
    text-align: left;
    background: rgba(248, 212, 76, 0.1);
    color: var(--wc-gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 11px 14px;
    border-bottom: 1px solid var(--wc-rule-strong);
    white-space: nowrap;
}

.wc-table-wrap td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--wc-rule);
    vertical-align: top;
    color: var(--wc-ink-2);
}

.wc-table-wrap td:first-child {
    color: #fff;
    font-weight: 600;
}

.wc-table-wrap tbody tr:last-child td {
    border-bottom: 0;
}

.wc-table-wrap tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.025);
}

.wc-sources {
    margin-top: 36px;
    border: 1px solid var(--wc-rule);
    background: rgba(255, 255, 255, 0.025);
    border-radius: var(--radius-m);
}

.wc-sources summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wc-ink-2);
}

.wc-sources summary::-webkit-details-marker {
    display: none;
}

.wc-sources summary::before {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--wc-gold);
    border-bottom: 2px solid var(--wc-gold);
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

.wc-sources[open] summary::before {
    transform: rotate(45deg);
}

.wc-sources summary:hover {
    color: #fff;
}

.wc-sources-count {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--wc-gold);
    border: 1px solid rgba(248, 212, 76, 0.35);
    border-radius: 999px;
    padding: 2px 9px;
}

.wc-source-list {
    margin: 0;
    padding: 4px 18px 16px 42px;
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--wc-ink-2);
}

.wc-source-list li {
    margin: 6px 0;
}

.wc-source-list li::marker {
    font-family: 'JetBrains Mono', monospace;
    color: var(--wc-ink-3);
    font-size: 0.75rem;
}

.wc-source-pub {
    color: var(--wc-ink-3);
}

.wc-source-list a {
    color: var(--wc-ink);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.25);
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.wc-source-list a:hover {
    color: var(--wc-gold);
}

.wc-chapter-nav {
    position: static;
    width: auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: inherit;
    text-align: left;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 36px;
}

.wc-chapter-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 48%;
    text-decoration: none;
    color: var(--wc-ink-2);
    font-size: 0.92rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.wc-chapter-link.is-next {
    text-align: right;
    margin-left: auto;
}

.wc-chapter-link-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--wc-gold);
}

.wc-chapter-link span:last-child {
    color: #fff;
    font-weight: 600;
}

.wc-chapter-link:hover span:last-child {
    color: var(--wc-gold);
}

/* --------------------------------------------------------------------------
   Story page: sources section and series footer
   -------------------------------------------------------------------------- */
.wc-sources-section .wc-eyebrow {
    margin-bottom: 14px;
}

.wc-sources-section .wc-prose {
    font-size: 0.98rem;
    color: var(--wc-ink-2);
}

.wc-story-end {
    padding: 56px 0 96px;
}

.wc-next-story {
    position: relative;
    padding: 30px 32px;
    border: 1px solid var(--wc-rule-strong);
    background: var(--wc-panel);
}

.wc-next-story::before,
.wc-next-story::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--wc-gold);
    opacity: 0.5;
}

.wc-next-story::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.wc-next-story::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.wc-next-story h3 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    margin: 12px 0 10px;
}

.wc-next-story p {
    color: var(--wc-ink-2);
    line-height: 1.65;
    margin: 0 0 22px;
    max-width: 60ch;
}

/* --------------------------------------------------------------------------
   Hub page
   -------------------------------------------------------------------------- */
.wc-hub-hero .wc-title {
    max-width: 18ch;
}

.wc-section {
    padding: 64px 24px;
    border-bottom: 1px solid var(--wc-rule);
}

.wc-section-inner {
    max-width: 1120px;
    margin: 0 auto;
}

.wc-section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px 32px;
    margin-bottom: 32px;
}

.wc-section-head .wc-section-title {
    margin: 10px 0 0;
}

.wc-section-head p {
    max-width: 52ch;
    color: var(--wc-ink-2);
    line-height: 1.65;
    margin: 0;
}

.wc-story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.wc-story-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 20, 0.62);
    border: 1px solid rgba(248, 212, 76, 0.2);
    border-radius: var(--radius-m);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.wc-story-card::before,
.wc-story-card::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--wc-gold);
    opacity: 0.45;
    z-index: 3;
    transition: all 0.3s ease;
}

.wc-story-card::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.wc-story-card::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

a.wc-story-card:hover {
    transform: translateY(-4px);
    border-color: rgba(248, 212, 76, 0.5);
    background: rgba(28, 28, 28, 0.78);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

a.wc-story-card:hover::before,
a.wc-story-card:hover::after {
    opacity: 0.9;
    width: 28px;
    height: 28px;
}

.wc-story-card-art {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0b0b0b;
}

.wc-story-card-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--focus, 50% 50%);
    filter: grayscale(0.55) saturate(1.1);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.wc-story-card-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 40%, rgba(20, 20, 20, 0.9) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.16) 2px, rgba(0, 0, 0, 0.16) 4px);
    pointer-events: none;
}

a.wc-story-card:hover .wc-story-card-art img {
    filter: grayscale(0) saturate(1.15);
    transform: scale(1.04);
}

.wc-story-card-num {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--wc-gold);
    background: rgba(5, 5, 5, 0.75);
    border: 1px solid rgba(248, 212, 76, 0.4);
    padding: 4px 10px;
    border-radius: 999px;
}

.wc-story-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 26px 26px;
}

.wc-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    background: rgba(248, 212, 76, 0.12);
    border: 1px solid rgba(248, 212, 76, 0.3);
    color: var(--wc-gold);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.wc-tag.is-muted {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--wc-ink-3);
}

.wc-story-card h3 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 8px;
}

.wc-story-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    color: var(--wc-ink-3);
}

.wc-story-card-meta i {
    color: var(--wc-gold);
    margin-right: 6px;
}

.wc-story-card p {
    font-size: 0.97rem;
    line-height: 1.65;
    color: var(--wc-ink-2);
    margin: 0 0 18px;
    flex: 1;
}

.wc-story-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--wc-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.86rem;
    transition: gap 0.3s ease, color 0.3s ease;
}

a.wc-story-card:hover .wc-story-card-cta {
    gap: 14px;
    color: var(--wc-gold-strong);
}

.wc-story-card.is-upcoming {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(14, 14, 14, 0.55);
}

.wc-story-card.is-upcoming::before,
.wc-story-card.is-upcoming::after {
    opacity: 0.2;
}

.wc-story-card.is-upcoming .wc-story-card-art {
    display: grid;
    place-items: center;
    background:
        radial-gradient(ellipse at center, rgba(248, 212, 76, 0.08), transparent 70%),
        repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, 0.025) 14px 15px);
}

.wc-story-card.is-upcoming .wc-story-card-art i {
    font-size: 2.6rem;
    color: rgba(248, 212, 76, 0.35);
}

.wc-story-card.is-upcoming h3 {
    color: var(--wc-ink-2);
}

.wc-story-card.is-upcoming .wc-story-card-cta {
    color: var(--wc-ink-3);
}

/* Hub: start-here chapter shortcuts */
.wc-route-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.wc-route-card {
    position: relative;
    display: block;
    padding: 20px 22px;
    border: 1px solid var(--wc-rule);
    background: rgba(255, 255, 255, 0.025);
    border-radius: var(--radius-m);
    color: var(--wc-ink);
    text-decoration: none;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.wc-route-card:hover {
    border-color: var(--wc-rule-strong);
    background: rgba(248, 212, 76, 0.06);
    transform: translateY(-2px);
}

.wc-route-card .wc-num {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.wc-route-card strong {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.3;
}

.wc-route-card span:last-child {
    display: block;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--wc-ink-3);
}

/* Hub: about the series */
.wc-about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.wc-about-grid article {
    padding: 24px 26px;
    border-left: 2px solid var(--wc-gold);
    background: linear-gradient(90deg, rgba(248, 212, 76, 0.06), transparent 70%);
}

.wc-about-grid h3 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    margin: 0 0 10px;
}

.wc-about-grid p {
    color: var(--wc-ink-2);
    line-height: 1.65;
    font-size: 0.97rem;
    margin: 0;
}

/* Hub: tighter rhythm than the story pages. The hub is a short index, so
   the hero, sections and cards drop most of the breathing room the long
   reads need. */
.wc-hub-page .wc-hero {
    padding: calc(var(--wc-nav) + 40px) 24px 40px;
}

.wc-hub-page .wc-breadcrumb {
    margin-bottom: 14px;
}

.wc-hub-page .wc-title {
    margin: 10px 0 14px;
}

.wc-hub-page .wc-dek {
    margin-bottom: 22px;
    max-width: 56ch;
}

.wc-hub-page .wc-section {
    padding: 36px 24px;
}

.wc-hub-page .wc-section-head {
    margin-bottom: 18px;
}

.wc-hub-page .wc-section-head .wc-section-title {
    margin-top: 4px;
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}

.wc-hub-page .wc-section-head p {
    font-size: 0.94rem;
}

.wc-hub-page .wc-story-grid {
    gap: 20px;
}

.wc-hub-page .wc-story-card-body {
    padding: 16px 20px 18px;
}

.wc-hub-page .wc-tag {
    margin-bottom: 10px;
}

.wc-hub-page .wc-story-card h3 {
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.wc-hub-page .wc-story-card-meta {
    margin-bottom: 10px;
}

.wc-hub-page .wc-story-card p {
    font-size: 0.93rem;
    line-height: 1.55;
    margin-bottom: 12px;
}

.wc-hub-page .wc-route-grid {
    gap: 12px;
}

.wc-hub-page .wc-route-card {
    padding: 14px 16px;
}

.wc-hub-page .wc-route-card .wc-num {
    margin-bottom: 4px;
}

.wc-hub-page .wc-route-card strong {
    font-size: 0.98rem;
    margin-bottom: 3px;
}

.wc-hub-page .wc-route-card span:last-child {
    font-size: 0.84rem;
    line-height: 1.45;
}

.wc-hub-page .wc-about-grid {
    gap: 16px;
}

.wc-hub-page .wc-about-grid article {
    padding: 14px 18px;
}

.wc-hub-page .wc-about-grid h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.wc-hub-page .wc-about-grid p {
    font-size: 0.92rem;
    line-height: 1.55;
}

@media (max-width: 768px) {
    .wc-hub-page .wc-hero {
        padding: calc(var(--wc-nav) + 28px) 20px 32px;
    }

    .wc-hub-page .wc-section {
        padding: 28px 20px;
    }
}

/* Story pages: a compact header so the first chapter is one short scroll
   away. The hero carries only the title, the dek and the stat chips; the
   contents grid follows immediately. */
.wc-story-page .wc-hero {
    padding: calc(var(--wc-nav) + 36px) 24px 32px;
}

.wc-story-page .wc-breadcrumb {
    margin-bottom: 12px;
}

.wc-story-page .wc-title {
    font-size: clamp(2.1rem, 4.4vw, 3.3rem);
    margin: 8px 0 12px;
}

.wc-story-page .wc-dek {
    font-size: clamp(1rem, 1.3vw, 1.12rem);
    margin-bottom: 18px;
    max-width: 66ch;
}

.wc-story-page .wc-stats {
    margin-bottom: 0;
}

.wc-story-page .wc-contents {
    padding: 32px 24px;
}

.wc-story-page .wc-contents-inner {
    gap: 24px 48px;
}

.wc-story-page .wc-contents h2 {
    font-size: clamp(1.3rem, 2.2vw, 1.6rem);
    margin-bottom: 12px;
}

.wc-story-page .wc-route {
    padding: 10px 14px;
    font-size: 0.92rem;
    margin-bottom: 12px;
}

.wc-story-page .wc-spoilers {
    font-size: 0.8rem;
}

.wc-story-page .wc-toc-grid {
    gap: 18px 28px;
}

.wc-story-page .wc-toc-group a {
    padding: 5px 6px;
    font-size: 0.92rem;
}

.wc-story-page .wc-rail {
    padding-top: 28px;
}

.wc-story-page .wc-chapter {
    padding-top: 52px;
}

.wc-story-page .wc-chapter-head {
    margin-bottom: 22px;
}

.wc-story-page .wc-chapter-head .wc-eyebrow {
    margin-bottom: 10px;
}

/* Hub: shorter card artwork. */
.wc-hub-page .wc-story-card-art {
    aspect-ratio: 2 / 1;
}

@media (max-width: 768px) {
    .wc-story-page .wc-hero {
        padding: calc(var(--wc-nav) + 24px) 20px 26px;
    }

    .wc-story-page .wc-contents {
        padding: 26px 20px;
    }

    .wc-story-page .wc-chapter {
        padding-top: 40px;
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .wc-reader {
        gap: 40px;
        --wc-rail-w: 236px;
    }
}

@media (max-width: 960px) {
    .wc-contents-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .wc-reader {
        display: block;
    }

    /* The rail becomes a slim, sticky strip of chapter numbers under the
       site header; the group titles and chapter names are hidden. */
    .wc-rail {
        position: sticky;
        top: var(--wc-nav);
        max-height: none;
        overflow: visible;
        padding: 0;
        margin: 0 -24px;
        z-index: 900;
        background: rgba(5, 5, 5, 0.92);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--wc-rule-strong);
    }

    .wc-rail-inner {
        display: flex;
        align-items: center;
        gap: 6px;
        overflow-x: auto;
        padding: 10px 16px;
        scrollbar-width: none;
    }

    .wc-rail-inner::-webkit-scrollbar {
        display: none;
    }

    .wc-rail-title,
    .wc-rail-group-title,
    .wc-rail-text,
    .wc-rail-progress {
        display: none;
    }

    .wc-rail-group {
        display: contents;
    }

    .wc-rail ol {
        display: contents;
    }

    .wc-rail ol a {
        padding: 0;
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
        justify-content: center;
        align-items: center;
        border: 1px solid var(--wc-rule);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.03);
    }

    .wc-rail ol a .wc-num {
        flex: 0 0 auto;
        color: var(--wc-ink-2);
    }

    .wc-rail ol a.is-active {
        border-color: var(--wc-gold);
        background: rgba(248, 212, 76, 0.14);
    }

    .wc-rail ol a.is-active .wc-num {
        color: var(--wc-gold);
    }

    .wc-rail-sources {
        flex: 0 0 auto;
        margin: 0 0 0 6px;
        padding: 8px 12px;
        border: 1px solid var(--wc-rule);
        border-top: 1px solid var(--wc-rule);
        border-radius: 999px;
        font-size: 0.74rem;
        white-space: nowrap;
    }

    .wc-column {
        max-width: none;
    }

    .wc-chapter,
    .wc-sources-section,
    .wc-prose h3 {
        scroll-margin-top: calc(var(--wc-nav) + 72px);
    }

    .wc-chapter {
        padding-top: 56px;
    }
}

@media (max-width: 768px) {
    .wc-hero {
        padding: calc(var(--wc-nav) + 48px) 20px 48px;
    }

    .wc-reader,
    .wc-contents,
    .wc-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .wc-rail {
        margin: 0 -20px;
    }

    .wc-toc-grid {
        grid-template-columns: 1fr;
    }

    .wc-frame {
        aspect-ratio: 16 / 9;
    }

    .wc-frame.is-dual {
        grid-template-columns: 1fr;
    }

    .wc-prose {
        font-size: 1.02rem;
        line-height: 1.72;
    }

    .wc-table-wrap table {
        font-size: 0.86rem;
    }

    .wc-table-wrap th,
    .wc-table-wrap td {
        padding: 9px 10px;
    }

    .wc-chapter-nav {
        flex-direction: column;
    }

    .wc-chapter-link,
    .wc-chapter-link.is-next {
        max-width: none;
        text-align: left;
        margin-left: 0;
    }

    .wc-next-story {
        padding: 24px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wc-page *,
    .wc-page *::before,
    .wc-page *::after {
        transition: none !important;
        animation: none !important;
    }
}

@media print {
    .wc-page {
        background: #fff;
        color: #111;
        --wc-ink: #111;
        --wc-ink-2: #333;
        --wc-ink-3: #555;
        --wc-rule: #ddd;
    }

    .wc-page nav,
    .wc-rail,
    .wc-hero-art,
    .wc-hero-ctas,
    .wc-chapter-nav,
    .wc-story-end,
    .scroll-indicator,
    .wc-page footer {
        display: none !important;
    }

    .wc-hero {
        padding: 0 0 24px;
    }

    .wc-title,
    .wc-chapter-head h2,
    .wc-prose h3,
    .wc-prose strong,
    .wc-table-wrap td:first-child {
        color: #000;
        text-shadow: none;
    }

    .wc-reader {
        display: block;
        padding: 0;
    }

    .wc-chapter {
        break-before: page;
        padding: 0 0 24px;
    }

    .wc-sources {
        display: none;
    }

    .wc-prose a {
        color: inherit;
        text-decoration: none;
    }
}

/* Lists inside chapter prose (numbered plans, short bullet lists). */
.wc-prose .wc-list {
    margin: 0 0 1.25em 1.5em;
    padding: 0;
}

.wc-prose .wc-list li {
    margin: 0.45em 0;
    padding-left: 0.25em;
}

.wc-prose .wc-list li::marker {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--wc-gold);
}

/* Story hero notes: the "short on time" route and the spoiler line now live
   in the hero, since the separate contents grid was removed. The sticky rail
   is the only table of contents. */
.wc-story-page .wc-hero-notes {
    max-width: 70ch;
    margin-top: 18px;
}

.wc-story-page .wc-hero-notes .wc-route {
    margin-bottom: 10px;
    background: rgba(10, 10, 10, 0.55);
}

.wc-story-page .wc-hero-notes .wc-spoilers {
    font-size: 0.8rem;
}

.wc-story-page .wc-reader {
    padding-top: 8px;
}

@media (max-width: 960px) {
    .wc-story-page .wc-reader {
        padding-top: 0;
    }
}

/* The base sheet sets overflow-x: hidden on html and body, which makes body a
   scroll container and silently disables position: sticky for every
   descendant (the chapter rail and the mobile chapter strip). clip prevents
   horizontal scrolling without creating a scroll container. */
html:has(.wc-page),
body.wc-page {
    overflow-x: clip;
    overflow-y: visible;
}
