/* Character dossier — "classified file" UI. Palette matches the Atlas
   (dark #0f1220 / #1a1d2b, border #2a2f42, gold #c9a14a, light #f4f4f7). */

.dossier-page { --d-gold: #c9a14a; --d-line: #2a2f42; --d-ink: #f4f4f7; --d-mut: #b9bdc9; }

/* --- book filter (Bootstrap outline buttons, matching the Atlas) --- */
.ks-dossier-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ks-dossier-filter .btn.active { box-shadow: inset 0 0 0 2px currentColor; }

/* --- affiliation groups --- */
.ks-dossier-affil {
    display: flex; align-items: center;
    font: 700 .9rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .12em; text-transform: uppercase; color: var(--d-gold);
    padding-bottom: .4rem; margin-bottom: 1rem; border-bottom: 1px solid var(--d-line);
}
.ks-flag {
    height: 1.05em; width: auto; margin-right: .55rem;
    border: 1px solid var(--d-line); border-radius: 2px; vertical-align: middle;
}

.ks-dossier-grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* --- a single file --- */
.ks-dfile {
    background: #1a1d2b; color: var(--d-ink);
    border: 1px solid var(--d-line); border-left: 3px solid var(--aff, #6b7280);
    border-radius: 8px; overflow: hidden;
}
.ks-dfile-head {
    display: flex; gap: .9rem; width: 100%; text-align: left;
    padding: .9rem; background: none; border: 0; color: inherit; cursor: pointer;
    align-items: flex-start;
}
.ks-dfile-head:disabled { cursor: default; }
.ks-dfile-head:not(:disabled):hover { background: rgba(201, 161, 74, .06); }
.ks-dfile-head:focus-visible { outline: 2px solid var(--d-gold); outline-offset: -2px; }

/* photo / silhouette */
.ks-dfile-photo {
    position: relative; flex: 0 0 76px; width: 76px; height: 92px;
    border: 1px solid var(--d-line); border-radius: 4px; overflow: hidden;
    background: radial-gradient(120% 80% at 50% 30%, #2a3046 0%, #14182a 70%);
    display: flex; align-items: center; justify-content: center;
}
.ks-dfile-photo img { width: 100%; height: 100%; object-fit: cover; }
.ks-dfile-silhouette {
    font: 700 1.5rem/1 Georgia, "Times New Roman", serif; color: rgba(244, 244, 247, .35);
    letter-spacing: .04em;
}
.ks-dfile-stamp {
    position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%) rotate(-7deg);
    font: 700 .52rem/1.05 ui-monospace, Menlo, Consolas, monospace; text-align: center;
    letter-spacing: .08em; color: #e06a5a;
    border: 1px solid #e06a5a; border-radius: 2px; padding: 1px 4px; opacity: .85;
}

/* identity block */
.ks-dfile-id { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ks-dfile-name { font: 700 1.05rem/1.25 Georgia, "Times New Roman", serif; color: var(--d-gold); }
.ks-dfile-role { font-size: .8rem; color: var(--d-mut); }
.ks-dfile-teaser { font-style: italic; font-size: .85rem; color: var(--d-ink); margin-top: .15rem; }
.ks-dfile-cue {
    margin-top: .35rem; font: 600 .72rem/1 ui-monospace, Menlo, Consolas, monospace;
    letter-spacing: .06em; text-transform: uppercase; color: var(--d-gold);
}
.ks-dfile-cue-close { display: none; }
.ks-dfile.is-open .ks-dfile-cue-open { display: none; }
.ks-dfile.is-open .ks-dfile-cue-close { display: inline; }

/* expanded body */
.ks-dfile-body { padding: 0 .9rem 1rem; border-top: 1px dashed var(--d-line); }
.ks-dfile-label {
    font: 700 .68rem/1 ui-monospace, Menlo, Consolas, monospace;
    letter-spacing: .12em; text-transform: uppercase; color: var(--d-gold);
    margin: 1rem 0 .35rem;
}
.ks-dfile-body p { margin: 0 0 .5rem; font-size: .92rem; line-height: 1.55; color: #e7e8ee; }

/* affiliation accent colours (fallback handled by --aff default above) */
.ks-dfile.aff-united-states { --aff: #5b8def; }
.ks-dfile.aff-russia        { --aff: #d9534f; }
.ks-dfile.aff-china         { --aff: #c9a14a; }
