/* ========================================
   NPC DOSSIER TEMPLATE
   Shared styling for individual NPC pages in /NPCS
   Canonical source: Aagil.html
   Include via: <link rel="stylesheet" href="../css/npc-dossier.css">
   ======================================== */

body { background: #0f1209 !important; }
#npc-dossier-content { padding: 0 !important; background: #0f1209 !important; }
.npc-dossier-container { max-width: 100% !important; padding: 0 !important; margin: 0 !important; background: transparent !important; border: none !important; }
.wiki-page { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem 3rem; font-family: Georgia, 'Times New Roman', serif; }

/* Hero */
.wiki-hero { background: #0a0d05; border-bottom: 2px solid #d4a832; padding: 2rem 2.25rem 1.75rem; margin-bottom: 1.5rem; position: relative; overflow: hidden; }
.wiki-hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(ellipse 60% 80% at 85% 50%, rgba(212,168,50,0.06) 0%, transparent 70%), url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 6L46 24H65L50 36L56 55L40 43L24 55L30 36L15 24H34Z' fill='none' stroke='rgba(212,168,50,0.07)' stroke-width='1'/%3E%3C/svg%3E") repeat; pointer-events: none; }
.wiki-hero-crumb { font-family: sans-serif; font-size: 11px; color: rgba(212,168,50,0.4); letter-spacing: 0.06em; margin-bottom: 0.6rem; position: relative; }
.wiki-hero-crumb a { color: rgba(212,168,50,0.4); text-decoration: none; }
.wiki-hero-crumb a:hover { color: #f0c040; }
.wiki-hero-name { font-size: 2.4rem; font-weight: 700; color: #e8b830; margin: 0 0 0.2rem; letter-spacing: 0.02em; line-height: 1.1; position: relative; text-shadow: 0 0 30px rgba(212,168,50,0.25); }
.wiki-hero-subtitle { font-style: italic; font-size: 1.05rem; color: rgba(212,168,50,0.6); margin: 0 0 1rem; position: relative; }
.wiki-hero-tags { display: flex; flex-wrap: wrap; gap: 7px; position: relative; }
.wiki-hero-tag { background: rgba(212,168,50,0.1); border: 1px solid rgba(212,168,50,0.3); border-radius: 20px; padding: 3px 12px; font-family: sans-serif; font-size: 11px; color: rgba(212,168,50,0.75); letter-spacing: 0.04em; }
.wiki-hero-tag.prominent { background: rgba(212,168,50,0.2); border-color: rgba(212,168,50,0.55); color: #e8b830; font-weight: 600; }

/* Layout */
.wiki-layout { display: grid; grid-template-columns: 1fr 255px; gap: 1.5rem; align-items: start; }

/* Sections */
.wiki-section { background: #161b0a; border: 1px solid rgba(212,168,50,0.18); border-radius: 6px; overflow: hidden; margin-bottom: 1.25rem; }
.wiki-section-header { background: #0d1007; padding: 9px 16px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid rgba(212,168,50,0.3); }
.wiki-section-icon { font-size: 15px; opacity: 0.75; }
.wiki-section-title { margin: 0; font-size: 1rem; font-weight: 600; color: #d4a832; letter-spacing: 0.03em; }
.wiki-section-body { padding: 1rem 1.25rem; font-size: 0.875rem; line-height: 1.75; color: #c8bfa0; display: flow-root; }
.wiki-section-body a, .wiki-history-text a { color: #f0c040; text-decoration: none; }
.wiki-section-body a:hover, .wiki-history-text a:hover { color: #ffe080; text-decoration: underline; }

/* Basic info stat grid */
.wiki-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wiki-stat-cell { background: #1e2410; border: 1px solid rgba(212,168,50,0.15); border-radius: 4px; padding: 8px 12px; }
.wiki-stat-label { font-family: sans-serif; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: #8a7a50; margin-bottom: 2px; }
.wiki-stat-value { font-size: 0.9rem; color: #e0d4b0; font-weight: 600; }

/* Floated portrait images within section bodies */
.wiki-float, .wiki-float-left { background: #1a1f0d; border: 1px solid rgba(212,168,50,0.2); border-radius: 4px; overflow: hidden; font-size: 11px; }
.wiki-float { float: right; margin: 0 0 1rem 1.25rem; width: 170px; }
.wiki-float-left { float: left; margin: 0 1.25rem 1rem 0; width: 170px; }
.wiki-float img, .wiki-float-left img { width: 100%; display: block; object-fit: cover; }
.wiki-float-img-placeholder { width: 100%; height: 110px; background: #1e2812; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: rgba(212,168,50,0.3); font-size: 11px; }
.wiki-float-img-placeholder svg { width: 28px; height: 28px; opacity: 0.3; }
.wiki-float-caption { padding: 6px 8px; color: #7a6e48; font-style: italic; line-height: 1.4; font-size: 11px; font-family: sans-serif; }
.wiki-float a.wiki-float-expand { display: block; text-align: center; padding: 4px; font-size: 10px; color: #f0c040; text-decoration: none; border-top: 1px solid rgba(212,168,50,0.2); font-family: sans-serif; }
.wiki-float a.wiki-float-expand:hover { color: #ffe080; }
.clearfix::after { content: ''; display: table; clear: both; }

/* Sub-headings */
.wiki-sub-heading { font-family: sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #8a7a50; border-bottom: 1px solid rgba(212,168,50,0.2); padding-bottom: 4px; margin: 1rem 0 0.5rem; }
.wiki-sub-heading:first-child { margin-top: 0; }

/* Personality traits */
.wiki-trait-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.wiki-trait-col-head { font-family: sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.wiki-trait-col-head.pos { color: #6ab870; }
.wiki-trait-col-head.neg { color: #c07878; }
.wiki-trait-col-head.dangerous { color: #c07878; }
.wiki-trait-col-head.disturbing { color: #c084fc; }
.wiki-trait-list { list-style: none; margin: 0; padding: 0; }
.wiki-trait-list li { padding: 5px 0; font-size: 0.84rem; color: #b8af90; border-bottom: 1px solid rgba(212,168,50,0.1); display: flex; align-items: flex-start; gap: 7px; line-height: 1.4; }
.wiki-trait-list li::before { flex-shrink: 0; margin-top: 2px; }
.wiki-trait-list.pos li::before { content: '✦'; color: #6ab870; font-size: 9px; }
.wiki-trait-list.neg li::before { content: '◆'; color: #c07878; font-size: 9px; }
.wiki-trait-list.dangerous li::before { content: '◆'; color: #c07878; font-size: 9px; }
.wiki-trait-list.disturbing li::before { content: '◆'; color: #c084fc; font-size: 9px; }

/* Likes / dislikes */
.wiki-pref-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.wiki-pref-head { font-family: sans-serif; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #8a7a50; margin-bottom: 6px; }
.wiki-pref-list { list-style: none; margin: 0; padding: 0; }
.wiki-pref-list li { font-size: 0.82rem; padding: 3px 0; border-bottom: 1px solid rgba(212,168,50,0.1); color: #b0a888; }

/* Quotes */
.wiki-quote { border-left: 3px solid rgba(212,168,50,0.45); padding: 0.6rem 1rem; margin: 0.75rem 0; font-style: italic; font-size: 0.9rem; color: #a89870; background: rgba(212,168,50,0.05); border-radius: 0 4px 4px 0; }
.wiki-quote p { margin: 0; }

/* History / goals entries */
.wiki-history-entry { margin-bottom: 1rem; }
.wiki-history-entry:last-child { margin-bottom: 0; }
.wiki-history-label { font-family: sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #8a7a50; margin-bottom: 4px; }
.wiki-history-text { font-size: 0.875rem; line-height: 1.75; color: #c0b898; }
.wiki-history-divider { border: none; border-top: 1px solid rgba(212,168,50,0.15); margin: 1rem 0; }

/* Relationship tags */
.wiki-rel-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wiki-rel-tag { border-radius: 20px; padding: 4px 11px; font-family: sans-serif; font-size: 11px; text-decoration: none; transition: opacity 0.15s; }
.wiki-rel-tag:hover { opacity: 0.75; }
.wiki-rel-tag.family { background: rgba(212,168,50,0.1); border: 1px solid rgba(212,168,50,0.35); color: #d4a832; }
.wiki-rel-tag.parent { background: rgba(212,168,50,0.1); border: 1px solid rgba(212,168,50,0.35); color: #d4a832; }
.wiki-rel-tag.ally { background: rgba(80,160,80,0.12); border: 1px solid rgba(80,160,80,0.35); color: #7ec87e; }
.wiki-rel-tag.neutral { background: rgba(200,160,64,0.1); border: 1px solid rgba(200,160,64,0.3); color: #d4a832; }
.wiki-rel-tag.enemy { background: rgba(200,70,70,0.12); border: 1px solid rgba(200,70,70,0.4); color: #d47c7c; }

/* Relationship grid cards - alternate to .wiki-rel-tags for large families/friend lists */
.wiki-rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.wiki-rel-card { display: block; text-decoration: none; background: #1e2410; border: 1px solid rgba(212,168,50,0.15); border-left: 3px solid #d4a832; border-radius: 4px; padding: 7px 10px; transition: background 0.15s, border-color 0.15s; }
.wiki-rel-card:hover { background: #262d14; }
.wiki-rel-card.ally { border-left-color: #7ec87e; }
.wiki-rel-card.neutral { border-left-color: #c8a840; }
.wiki-rel-card.enemy { border-left-color: #d47c7c; }
.wiki-rel-card-name { font-size: 0.85rem; color: #e0d4b0; font-weight: 600; }
.wiki-rel-card-role { font-family: sans-serif; font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: #8a7a50; margin-top: 3px; }

/* Status / relationships key-value rows */
.wiki-info-row { display: flex; border-bottom: 1px solid rgba(212,168,50,0.15); padding: 7px 0; font-size: 0.875rem; }
.wiki-info-row:last-child { border-bottom: none; }
.wiki-info-key { font-family: sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #8a7a50; width: 130px; flex-shrink: 0; padding-top: 1px; }
.wiki-info-val { color: #d0c4a0; flex: 1; }

/* Mana/ability effect box - optional section for a bloodline-derived or magical effect on an item/attack */
.wiki-mana-box { background: #1a1f0d; border: 1px solid rgba(212,168,50,0.18); border-radius: 6px; overflow: hidden; }
.wiki-mana-box-header { background: #0d1007; padding: 8px 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid rgba(212,168,50,0.25); }
.wiki-mana-box-title { font-family: sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #c084fc; }
.wiki-mana-row { display: flex; border-bottom: 1px solid rgba(212,168,50,0.12); padding: 7px 12px; font-size: 0.84rem; }
.wiki-mana-row:last-child { border-bottom: none; }
.wiki-mana-row-key { font-family: sans-serif; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #8a7a50; width: 120px; flex-shrink: 0; padding-top: 1px; }
.wiki-mana-row-val { color: #c0b898; line-height: 1.6; flex: 1; }

/* Equipment/companion thumbnail gallery - optional section for notable items or pets a character keeps, click-to-expand */
.equip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.equip-thumb { width: 80px; background: #1a1f0d; border: 1px solid rgba(212,168,50,0.2); border-radius: 4px; overflow: hidden; cursor: pointer; }
.equip-thumb img { width: 100%; height: 80px; object-fit: cover; display: block; }
.equip-thumb-caption { padding: 4px 6px; color: #7a6e48; font-family: sans-serif; font-size: 10px; line-height: 1.3; font-style: italic; }

/* Lore/cultural-notes box - optional section, plain paragraph content or key-value rows */
.wiki-lore-box { background: rgba(180,140,60,0.07); border: 1px solid rgba(212,168,50,0.25); border-radius: 6px; padding: 1rem 1.25rem; margin: 0.75rem 0; }
.wiki-lore-box-title { font-family: sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #d4a832; margin-bottom: 0.6rem; padding-bottom: 0.4rem; border-bottom: 1px solid rgba(212,168,50,0.2); }

/* Transformation/shapeshifting states box - optional section, key-value rows (e.g. lycanthropy forms) */
.wiki-wolf-box { background: rgba(120,140,160,0.07); border: 1px solid rgba(140,170,190,0.25); border-radius: 6px; padding: 1rem 1.25rem; margin: 0.75rem 0; }
.wiki-wolf-box-title { font-family: sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #9ec4dc; margin-bottom: 0.6rem; padding-bottom: 0.4rem; border-bottom: 1px solid rgba(140,170,190,0.2); }
.wiki-wolf-row { display: flex; gap: 0.75rem; padding: 6px 0; border-bottom: 1px solid rgba(140,170,190,0.12); font-size: 0.84rem; }
.wiki-wolf-row:last-child { border-bottom: none; padding-bottom: 0; }
.wiki-wolf-row-key { font-family: sans-serif; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #7a92a0; width: 110px; flex-shrink: 0; padding-top: 1px; }
.wiki-wolf-row-val { color: #c0b8a8; flex: 1; line-height: 1.6; }
.wiki-lore-row { display: flex; gap: 0.75rem; padding: 6px 0; border-bottom: 1px solid rgba(212,168,50,0.12); font-size: 0.84rem; }
.wiki-lore-row:last-child { border-bottom: none; padding-bottom: 0; }
.wiki-lore-row-key { font-family: sans-serif; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #8a7a50; width: 110px; flex-shrink: 0; padding-top: 1px; }
.wiki-lore-row-val { color: #c0b898; flex: 1; line-height: 1.6; }

/* Bloodline */
.wiki-bloodline { background: rgba(138,43,226,0.08); border: 1px solid rgba(138,43,226,0.25); border-radius: 6px; padding: 1rem 1.25rem; }
.wiki-bloodline-header { display: flex; align-items: center; gap: 8px; margin-bottom: 0.6rem; }
.wiki-bloodline-icon { font-size: 1.1rem; }
.wiki-bloodline-title { font-family: sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #c084fc; }
.wiki-bloodline-name { font-size: 0.95rem; font-weight: 700; color: #d4b8fc; margin-bottom: 0.4rem; }
.wiki-bloodline-text { font-size: 0.875rem; line-height: 1.75; color: #c8bfa0; }
.wiki-bloodline-text p { margin: 0 0 0.75rem; }
.wiki-bloodline-text p:last-child { margin-bottom: 0; }
.wiki-bloodline-locked { font-size: 0.875rem; color: rgba(192,132,252,0.5); font-style: italic; }

/* Warning / access notice */
.wiki-warning { background: rgba(180,120,20,0.08); border: 1px solid rgba(212,168,50,0.3); border-left: 3px solid #d4a832; border-radius: 0 4px 4px 0; padding: 0.875rem 1rem; margin-top: 1rem; font-size: 0.85rem; color: #b8aa80; line-height: 1.65; }
.wiki-warning-title { font-family: sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #d4a832; margin-bottom: 6px; }

/* Gear/equipment list - optional section, only present on pages for characters who own notable items */
.wiki-equip-item { display: flex; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(212,168,50,0.12); }
.wiki-equip-item:last-child { border-bottom: none; padding-bottom: 0; }
.wiki-equip-icon { font-size: 1.4rem; flex-shrink: 0; width: 32px; text-align: center; padding-top: 2px; }
.wiki-equip-body { flex: 1; }
.wiki-equip-name { font-family: sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #d4a832; margin-bottom: 3px; }
.wiki-equip-desc { font-size: 0.84rem; color: #b0a888; line-height: 1.6; }

/* Sidebar - JS handles sticky behaviour */
.wiki-sidebar { min-width: 0; align-self: start; }
.wiki-infobox { background: #141808; border: 1px solid rgba(212,168,50,0.22); border-radius: 6px; overflow: hidden; margin-bottom: 1rem; }
.wiki-infobox-name { background: #0d1007; padding: 8px 12px; text-align: center; font-size: 0.9rem; font-weight: 700; color: #d4a832; border-bottom: 1px solid rgba(212,168,50,0.3); letter-spacing: 0.03em; }
.wiki-infobox-portrait { position: relative; width: 100%; aspect-ratio: 3/4; background: #1a2010; overflow: hidden; }
.wiki-infobox-portrait img, .wiki-infobox-portrait video { width: 100%; height: 100%; object-fit: cover; display: block; }
.wiki-infobox-portrait-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: rgba(212,168,50,0.3); }
.wiki-infobox-portrait-placeholder svg { width: 40px; height: 40px; opacity: 0.3; }
.wiki-infobox-toggle { display: flex; border-bottom: 1px solid rgba(212,168,50,0.18); }
.wiki-infobox-toggle button { flex: 1; padding: 5px; font-family: sans-serif; font-size: 11px; background: transparent; border: none; color: #7a6a40; cursor: pointer; border-right: 1px solid rgba(212,168,50,0.18); transition: background 0.15s, color 0.15s; }
.wiki-infobox-toggle button:last-child { border-right: none; }
.wiki-infobox-toggle button:hover, .wiki-infobox-toggle button.active { background: rgba(212,168,50,0.12); color: #d4a832; font-weight: 600; }
.wiki-infobox-section { padding: 4px 10px; font-family: sans-serif; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #7a6a40; background: rgba(212,168,50,0.07); border-bottom: 1px solid rgba(212,168,50,0.15); border-top: 1px solid rgba(212,168,50,0.15); }
.wiki-infobox-row { display: flex; border-bottom: 1px solid rgba(212,168,50,0.12); }
.wiki-infobox-row:last-of-type { border-bottom: none; }
.wiki-infobox-key { padding: 6px 8px; color: #7a6a40; background: rgba(212,168,50,0.05); width: 80px; flex-shrink: 0; font-family: sans-serif; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.wiki-infobox-val { padding: 6px 8px; color: #c8bfa0; flex: 1; font-family: sans-serif; font-size: 11px; line-height: 1.4; }
.wiki-infobox-val.active { color: #6ab870; font-weight: 600; }
.wiki-infobox-val.deceased, .wiki-infobox-val.dead { color: #c07878; font-weight: 600; }
.wiki-infobox-val.ascended { color: #c084fc; font-weight: 600; }
.wiki-infobox-val.wanted { color: #d4a832; font-weight: 600; }
.wiki-infobox-val.mystery { color: #8a7a50; font-style: italic; }
.wiki-infobox-val.grade-d { color: #e0d4b0; font-weight: 600; }
.wiki-infobox-val a { color: #f0c040; text-decoration: none; }
.wiki-infobox-val a:hover { color: #ffe080; }
.wiki-infobox-links { padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.wiki-infobox-links a { font-family: sans-serif; font-size: 11px; color: #f0c040; text-decoration: none; display: flex; align-items: center; gap: 5px; }
.wiki-infobox-links a:hover { color: #ffe080; }
.wiki-infobox-links a::before { content: '→'; font-size: 11px; }

/* Table of contents */
.wiki-toc { background: #141808; border: 1px solid rgba(212,168,50,0.22); border-radius: 6px; overflow: hidden; }
.wiki-toc-header { background: #0d1007; padding: 7px 12px; font-family: sans-serif; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #d4a832; border-bottom: 1px solid rgba(212,168,50,0.3); }
.wiki-toc-list { list-style: none; margin: 0; padding: 6px 0; }
.wiki-toc-list li a { display: flex; align-items: center; gap: 8px; padding: 5px 12px; font-family: sans-serif; font-size: 12px; color: #f0c040; text-decoration: none; transition: background 0.12s, color 0.12s; }
.wiki-toc-list li a:hover { background: rgba(212,168,50,0.08); color: #ffe080; }
.wiki-toc-list li a .toc-num { font-size: 10px; color: #6a5a30; min-width: 14px; }

@media (max-width: 800px) {
    .wiki-layout { grid-template-columns: 1fr; }
    .wiki-sidebar { order: -1; transform: none !important; }
    .wiki-infobox-portrait { max-height: 300px; }
    .wiki-float, .wiki-float-left { float: none; width: 100%; margin: 0 0 1rem 0; }
}
@media (max-width: 500px) {
    .wiki-hero-name { font-size: 1.8rem; }
    .wiki-stat-grid { grid-template-columns: 1fr; }
    .wiki-trait-cols { grid-template-columns: 1fr; }
    .wiki-pref-cols { grid-template-columns: 1fr; }
}
