/* --- GLOBAL STYLES & SETUP --- */
:root {
    --bg-color: #f4f1e9;
    --text-color: #282c34;
    --heading-color: #000000;
    --accent-red: #b22222;
    --accent-grey: #6c757d;
    --folder-tab-color: #d2b48c;
    --folder-tab-active-color: #c1a37c;

    --font-heading: 'Special Elite', monospace;
    --font-body: 'Merriweather', serif;
    --font-handwriting: 'Caveat', cursive;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    /* Replace with your own texture file for a better effect */
    background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    color: var(--text-color);
    line-height: 1.7;
    margin: 0;
    padding: 20px;
}

.site-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid #ccc;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- HEADER --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #e8e4d8;
    border-bottom: 2px solid #ccc;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--heading-color);
    margin: 0;
}

.classified-stamp {
    font-family: var(--font-heading);
    color: var(--accent-red);
    border: 3px double var(--accent-red);
    padding: 5px 10px;
    font-size: 1.2rem;
    transform: rotate(-5deg);
}

/* --- BOOK NAVIGATION --- */
.book-navigation {
    padding: 20px 40px;
    border-bottom: 1px solid #ddd;
    background: #fdfaf2;
}
.book-navigation h3 {
    font-family: var(--font-heading);
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}
.book-navigation a {
    display: inline-block;
    margin-right: 15px;
    padding: 8px 15px;
    text-decoration: none;
    font-weight: bold;
    color: var(--text-color);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease-in-out;
}
.book-navigation a:hover {
    color: var(--accent-red);
    border-bottom: 2px solid var(--accent-red);
}
.book-navigation a.active {
    background-color: rgba(0,0,0,0.05);
    border-bottom: 2px solid var(--heading-color);
}


/* --- MAIN CONTENT AREA --- */
.content-area {
    padding: 40px;
}
.placeholder-text {
    text-align: center;
    color: var(--accent-grey);
}
.placeholder-text h2 {
    font-family: var(--font-heading);
}

/* --- CHARACTER TABS ("Manila Folders") --- */
.character-tabs {
    display: flex;
    flex-wrap: wrap; /* <<< FIX: Allow tabs to wrap to the next line */
    gap: 5px; /* <<< FIX: Add spacing between wrapped tabs */
    margin-bottom: -1px; /* Overlap with dossier border */
    position: relative;
    z-index: 1;
}

.character-tabs button {
    font-family: var(--font-heading);
    background-color: var(--folder-tab-color);
    border: 1px solid #a1887f;
    border-bottom: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 8px 8px 0 0;
    transition: background-color 0.2s;
    position: relative;
    top: 0;
}

.character-tabs button:hover {
    background-color: var(--folder-tab-active-color);
}

.character-tabs button.active {
    background-color: var(--bg-color);
    font-weight: bold;
    top: 1px;
    border-bottom: 1px solid var(--bg-color); /* Hides the dossier border underneath */
}


/* --- DOSSIER LAYOUT --- */
.dossier-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    border: 1px solid #a1887f;
    padding: 30px;
    background-color: var(--bg-color);
    position: relative;
    z-index: 0;
}
.dossier-grid h3 {
    font-family: var(--font-heading);
    border-bottom: 1px solid var(--accent-grey);
    padding-bottom: 8px;
    margin-top: 0;
}

/* Left Column: Evidence Board */
.dossier-evidence {
    border-right: 1px dashed var(--accent-grey);
    padding-right: 40px;
}

.dossier-evidence .mugshot {
    width: 100%;
    border: 10px solid white;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.3);
    transform: rotate(-3deg);
    margin-bottom: 30px;
    filter: grayscale(1) contrast(1.1) brightness(0.9);
}

.stats-list {
    list-style: none;
    padding: 0;
    font-size: 0.9rem;
}
.stats-list li {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}
.stats-list strong {
    margin-right: 10px;
}

/* Right Column: Profiler's Report */
.dossier-report h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-top: 0;
}

.dossier-report p {
    margin-bottom: 1.5em;
}

/* --- SPECIAL TEXT STYLES --- */
.redacted {
    background-color: black;
    color: black;
    user-select: none; /* Prevents text selection */
    transition: all 0.1s linear;
    padding: 0 3px;
    cursor: pointer;
}

.redacted:hover {
    background-color: transparent;
    color: var(--accent-red);
}

.handwritten-note {
    font-family: var(--font-handwriting);
    font-size: 1.5rem;
    color: #3a506b; /* Dark blue ink */
    display: block;
    margin: 2em 0;
    padding-left: 20px;
    border-left: 3px solid var(--accent-red);
    transform: rotate(-1deg);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
    .dossier-grid {
        grid-template-columns: 1fr;
    }
    .dossier-evidence {
        border-right: none;
        border-bottom: 1px dashed var(--accent-grey);
        padding-right: 0;
        padding-bottom: 30px;
        margin-bottom: 30px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }
    .site-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    .book-navigation {
        padding: 20px;
    }
    .content-area {
        padding: 20px;
    }
}