/* css/vg-guide.css — public guide pages: wiki.php, familiars-guide.php, about.php, the articles (inc/article.php)
   and vampire-name-generator.php. Uses the vg-v4.css tokens. */
/* ── Game Guide (public, 2026) ── */
.main-content { max-width: none; padding: 0; }
.site-header { display: none; }
.cta-section { display: none; }   /* the guide ends with its own join box */
.wk {
    --wk-panel: rgba(16, 10, 14, 0.82);
    --wk-deep: rgba(8, 4, 6, 0.7);
    --wk-line: rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    box-sizing: border-box;
}
.wk *, .wk *::before, .wk *::after { box-sizing: border-box; }
.wk-hero {
    padding: 2.5rem 2rem 2rem;
    margin-bottom: 1.5rem;
    border-radius: 18px;
    border: 1px solid var(--wk-line);
    text-align: center;
    background:
        radial-gradient(ellipse 80% 90% at 50% 0%, rgba(139, 26, 26, 0.35), transparent 70%),
        linear-gradient(180deg, rgba(10, 6, 8, 0.45), rgba(10, 6, 8, 0.92)),
        url("../images/home/hero-city-sm.webp") center 40% / cover no-repeat;
}
.wk-kicker {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--crimson-bright);
    margin-bottom: 0.5rem;
}
.wk-hero h1 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-bright);
}
.wk-hero p { margin: 0.75rem auto 0; max-width: 58ch; color: var(--text-dim); line-height: 1.6; }
.wk-search {
    display: block;
    width: 100%;
    max-width: 460px;
    margin: 1.25rem auto 0;
    padding: 0.8rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(232, 200, 92, 0.3);
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-bright);
    font: 500 1rem 'Inter', sans-serif;
}
.wk-search:focus { outline: none; border-color: var(--gold); }

/* Index */
.wk-group { margin-top: 2rem; }
.wk-group__head { display: flex; align-items: center; gap: 10px; margin: 0 0 0.9rem; font-family: var(--font-heading); font-size: 1.25rem; color: var(--gold-bright); }
.wk-group__head span { font-size: 1.1rem; }
.wk-group__head .vg2-ic { display: block; width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.wk-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 1.1rem 1.2rem;
    border-radius: 14px;
    border: 1px solid var(--wk-line);
    background: var(--wk-panel);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}
.wk-card:hover { border-color: rgba(232, 200, 92, 0.42); transform: translateY(-2px); }
.wk-card b { font-family: var(--font-heading); font-size: 1.05rem; color: var(--text-bright); letter-spacing: 0.02em; }
.wk-card small { color: var(--text-dim); font-size: 0.88rem; line-height: 1.5; }
.wk-card.is-pinned { border-color: rgba(212, 42, 42, 0.45); background: linear-gradient(135deg, rgba(139, 26, 26, 0.35), rgba(16, 10, 14, 0.85)); }
.wk-card__tag { align-self: flex-start; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-bright); background: rgba(232, 200, 92, 0.1); }
.wk-empty { display: none; padding: 2rem; text-align: center; color: var(--text-dim); }

/* Article */
.wk-crumbs { font-size: 0.88rem; color: var(--text-dim); margin-bottom: 1rem; }
.wk-crumbs a { color: var(--gold); text-decoration: none; }
.wk-crumbs span { margin: 0 6px; opacity: 0.6; }
.wk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.5rem; align-items: start; }
.wk-article {
    padding: 2rem 2.25rem;
    border-radius: 18px;
    border: 1px solid var(--wk-line);
    background: var(--wk-panel);
}
.wk-article > h1 { margin: 0 0 1.25rem; font-family: var(--font-heading); font-size: clamp(1.6rem, 3.5vw, 2.2rem); color: var(--text-bright); line-height: 1.2; }
.wk-content { line-height: 1.75; font-size: 1rem; overflow-wrap: anywhere; color: var(--text); }
.wk-content h2, .wk-content h3 { font-family: var(--font-heading); color: var(--gold-bright); line-height: 1.3; scroll-margin-top: 80px; }
.wk-content h2 { font-size: 1.3rem; margin: 2rem 0 0.5rem; padding-top: 1.25rem; border-top: 1px solid var(--wk-line); }
.wk-content h3 { font-size: 1.08rem; margin: 1.6rem 0 0.4rem; }
.wk-content > h2:first-child, .wk-content > h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.wk-content b { color: var(--text-bright); }
.wk-content a { color: var(--gold-bright); }
.wk-content img { max-width: 100%; height: auto; border-radius: 8px; }
.wk-content center { text-align: left; }
.wk-content font[size] { font-size: inherit; }
.wk-content table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1rem 0; border: 1px solid var(--wk-line); border-radius: 12px; overflow: hidden; display: block; overflow-x: auto; }
.wk-content th, .wk-content td { padding: 8px 12px; border-bottom: 1px solid var(--wk-line); font-size: 0.92rem; text-align: left; }
.wk-content th { background: rgba(0, 0, 0, 0.35); color: var(--text-dim); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.wk-aside { position: sticky; top: 76px; display: grid; gap: 12px; }
.wk-box { padding: 1.1rem 1.2rem; border-radius: 14px; border: 1px solid var(--wk-line); background: var(--wk-panel); }
.wk-box h2 { margin: 0 0 0.6rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); font-family: 'Inter', sans-serif; }
.wk-box ol, .wk-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wk-box a { display: block; padding: 5px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.9rem; line-height: 1.35; }
.wk-box a:hover { background: rgba(232, 200, 92, 0.08); color: var(--gold-bright); }
.wk-box .is-sub a { padding-left: 20px; font-size: 0.85rem; color: var(--text-dim); }
.wk-box .is-here a { color: var(--gold-bright); background: rgba(232, 200, 92, 0.08); }

/* Join */
.wk-join {
    margin-top: 2.5rem;
    padding: 2rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    text-align: center;
    background: radial-gradient(ellipse 90% 80% at 50% 0%, rgba(139, 26, 26, 0.3), transparent 70%), rgba(14, 8, 12, 0.9);
}
.wk-join h2 { margin: 0 0 0.5rem; font-family: var(--font-heading); font-size: 1.4rem; color: var(--text-bright); }
.wk-join p { margin: 0 auto 1.25rem; max-width: 52ch; color: var(--text-dim); line-height: 1.6; }
.wk-box .wk-join-mini { text-align: center; }
.wk-join .vg-btn, .wk-box .vg-btn { display: inline-block; }

@media (max-width: 900px) {
    .wk-layout { grid-template-columns: 1fr; }
    .wk-aside { position: static; }
}
@media (max-width: 620px) {
    .wk { padding: 1rem 1rem 2.5rem; }
    .wk-hero { padding: 1.75rem 1.1rem 1.4rem; }
    .wk-article { padding: 1.4rem 1.1rem; }
    .wk-grid { grid-template-columns: 1fr; }
}

/* ── Shared bits for the new guide pages (gd-) ── */
.gd-byline { margin: -0.5rem 0 1.25rem; font-size: 0.875rem; color: var(--text-faint); }
.gd-byline a { color: var(--gold); }
.gd-lead { font-size: 1.0625rem; line-height: 1.7; color: var(--text); margin: 0 0 1rem; }
.gd-faq details { border: 1px solid var(--wk-line); border-radius: 12px; background: var(--wk-deep); margin: 0 0 8px; }
.gd-faq summary { cursor: pointer; padding: 0.85rem 1rem; font-weight: 600; color: var(--text-bright); list-style-position: inside; }
.gd-faq details p { margin: 0; padding: 0 1rem 1rem; line-height: 1.65; color: var(--text); }
.gd-cta { display: inline-block; margin-top: 0.5rem; }

/* Animated pixel sprite: images/sprites/{slug}-full-64-idle.png is 8 frames of 64px */
.gd-sprite {
    display: block;
    width: 96px; height: 96px;
    margin: 0 auto;
    background-repeat: no-repeat;
    background-size: 768px 96px;
    image-rendering: pixelated;
    animation: gdIdle96 1s steps(8) infinite;
}
.gd-sprite--lg { width: 192px; height: 192px; background-size: 1536px 192px; animation-name: gdIdle192; }
@keyframes gdIdle96 { from { background-position: 0 0; } to { background-position: -768px 0; } }
@keyframes gdIdle192 { from { background-position: 0 0; } to { background-position: -1536px 0; } }
@media (prefers-reduced-motion: reduce) { .gd-sprite { animation: none; } }

/* Familiar index */
.gd-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 1.25rem 0 0; }
.gd-filters a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--wk-line); background: rgba(0, 0, 0, 0.4); color: var(--text); font-size: 0.875rem; text-decoration: none; }
.gd-filters a:hover, .gd-filters a.is-on { border-color: rgba(232, 200, 92, 0.5); color: var(--gold-bright); }
.gd-family { margin-top: 2rem; scroll-margin-top: 90px; }
.gd-family__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 0.9rem; }
.gd-family__head h2 { margin: 0; font-family: var(--font-heading); font-size: 1.3rem; color: var(--gold-bright); }
.gd-family__head p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }
.gd-fams { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gd-fam {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 0.9rem 0.6rem 0.8rem;
    border-radius: 14px; border: 1px solid var(--wk-line); background: var(--wk-panel);
    color: inherit; text-decoration: none; text-align: center;
    transition: border-color .15s ease, transform .15s ease;
}
.gd-fam:hover { border-color: rgba(232, 200, 92, 0.42); transform: translateY(-2px); }
.gd-fam b { font-family: var(--font-heading); font-size: 0.95rem; color: var(--text-bright); line-height: 1.25; }
.gd-fam small { font-size: 0.8125rem; color: var(--text-dim); }
.gd-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-bright); background: rgba(232, 200, 92, 0.1); }
.gd-tag--crimson { color: #ffd2d2; background: rgba(139, 26, 26, 0.45); }

/* Familiar detail */
.gd-fam-hero { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; }
.gd-fam-hero__art { padding: 1rem 0; border-radius: 16px; background: radial-gradient(circle at 50% 60%, rgba(139, 26, 26, 0.35), rgba(0, 0, 0, 0.35) 70%); }
.gd-fam-hero h1 { margin: 0 0 0.35rem; font-family: var(--font-heading); font-size: clamp(1.7rem, 4vw, 2.4rem); color: var(--text-bright); line-height: 1.15; }
.gd-fam-hero .gd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0.9rem; }
.gd-quote { margin: 0; font-style: italic; color: var(--text); line-height: 1.65; }
.gd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.gd-stats li { padding: 0.65rem 0.75rem; border-radius: 10px; background: var(--wk-deep); border: 1px solid var(--wk-line); }
.gd-stats span { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.gd-stats b { font-size: 1.15rem; color: var(--text-bright); }
.gd-moves { display: grid; gap: 8px; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.gd-moves li { padding: 0.75rem 0.9rem; border-radius: 10px; background: var(--wk-deep); border: 1px solid var(--wk-line); }
.gd-moves b { color: var(--text-bright); }
.gd-moves small { display: block; margin-top: 2px; color: var(--text-dim); font-size: 0.875rem; }
.gd-types { display: flex; flex-wrap: wrap; gap: 6px; }
.gd-types a { padding: 4px 10px; border-radius: 999px; text-decoration: none; font-size: 0.875rem; font-weight: 600; }
.gd-types--strong a { color: #b8f5a0; background: rgba(60, 160, 60, 0.18); border: 1px solid rgba(120, 220, 100, 0.3); }
.gd-types--weak a { color: #ffc4c4; background: rgba(160, 40, 40, 0.22); border: 1px solid rgba(240, 120, 120, 0.3); }
.gd-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 0.75rem; }

/* Name generator */
.gd-gen { display: grid; gap: 1rem; }
.gd-gen__opts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.gd-gen__opts fieldset { border: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gd-gen__opts legend { float: left; margin-right: 6px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.gd-gen__opts label { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--wk-line); background: rgba(0, 0, 0, 0.4); cursor: pointer; font-size: 0.9rem; }
.gd-gen__opts label:has(input:checked) { border-color: rgba(232, 200, 92, 0.6); color: var(--gold-bright); }
.gd-gen__opts input { accent-color: var(--gold); }
.gd-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.gd-names li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0.7rem 0.9rem; border-radius: 10px; border: 1px solid var(--wk-line); background: var(--wk-deep); }
.gd-names b { font-family: var(--font-heading); color: var(--text-bright); font-size: 1.05rem; overflow-wrap: anywhere; }
.gd-names a { flex: 0 0 auto; font-size: 0.8125rem; color: var(--gold-bright); white-space: nowrap; }

@media (max-width: 620px) {
    .gd-fam-hero { grid-template-columns: 1fr; text-align: center; }
    .gd-fam-hero .gd-tags { justify-content: center; }
    .gd-fams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gd-sprite--lg { width: 144px; height: 144px; background-size: 1152px 144px; animation-name: gdIdle144; }
}
@keyframes gdIdle144 { from { background-position: 0 0; } to { background-position: -1152px 0; } }

/* Prose spacing (the vg-v4 reset zeroes every margin) */
.wk-content p, .wk-content ul, .wk-content ol { margin: 0 0 1rem; }
.wk-content ul, .wk-content ol { padding-left: 1.25rem; }
.wk-content li { margin: 0 0 0.4rem; line-height: 1.65; }
.wk-content .gd-stats, .wk-content .gd-moves { padding-left: 0; }
.wk-content .gd-stats li, .wk-content .gd-moves li { margin: 0; }
.wk-article > .wk-kicker { margin-bottom: 0.25rem; }
/* tables: never break a word mid-letter (wk-content uses overflow-wrap:anywhere for long URLs in prose) */
.wk-content th, .wk-content td { overflow-wrap: normal; word-break: normal; }
@media (max-width: 620px) { .wk-content th, .wk-content td { padding: 8px 9px; } }
/* Long sprite grids: sections below the fold aren't rendered, so their sprite sheets aren't fetched until scrolled to */
.gd-family { content-visibility: auto; contain-intrinsic-size: auto 640px; }
