/* The reveal animation three rules below rely on. It was never
   defined — so every element carrying `opacity: 0` + cardReveal
   stayed invisible forever (including the v4 FILES photo cards,
   which inherit the unscoped .file-card rule). */
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Subject List Styling - use exact IFB structure */
.dossiers-list-container {
  max-width: 900px;
  width: 90vw;
  margin: 2rem auto;
  background: #EBE6D8;
  border: 1px solid #8E7F7F;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: cardReveal 0.5s ease-out forwards;
  margin-bottom: 3rem;
  z-index: 1000;
}

.subjects-list {
  padding: 2rem;
}

.subject-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: #EBE6D8;
  border: 1px solid #8E7F7F;
  cursor: pointer;
  transition: all 0.3s ease;
}

.subject-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.subject-basic-info {
  flex: 1;
}

.subject-name {
  color: #3A3238;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.subject-details {
  color: #5F5449;
  font-size: 0.8rem;
}

.subject-status {
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.subject-status.available {
  background: #4a5d4a;
  color: #EBE6D8;
}

.subject-status.locked {
  background: #8B0000;
  color: #EBE6D8;
}

.subject-status.contacted {
  background: #8E7F7F;
  color: #EBE6D8;
}

/* Media Files Styling */
.media-files {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.media-file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: #EBE6D8;
  border: 1px solid #8E7F7F;
}

.media-file.locked {
  opacity: 0.6;
}

.media-icon {
  font-size: 1.2rem;
}

/* IFB Dossier Layout - Exact Match */
.dossier-sections {
  padding: 0;
}

/* Profile Section - IFB Style */
.info-layout {
  padding: 2rem;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 2rem;
  border-bottom: 1px dashed #8E7F7F;
}

.subject-photo-section {
  width: 150px;
}

.profile-photo {
  width: 150px;
  height: 200px;
  background: #D4C8BE;
  border: 1px solid #8E7F7F;
  position: relative;
  overflow: hidden;
  box-shadow: 3px 3px 6px rgba(0,0,0,0.1);
}

.subject-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%) sepia(20%);
  transition: transform 0.3s ease;
}

.profile-photo:hover .subject-photo-img {
  transform: scale(1.05);
}

.subject-info-section {
  flex: 1;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3A3238;
  margin-bottom: 0.5rem;
}

.profile-alias {
  color: #8E7F7F;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.status-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.status-item {
  display: flex;
  gap: 1rem;
}

.status-label {
  font-weight: bold;
  color: #5F5449;
  min-width: 80px;
}

/* Metrics Section - IFB Style */
.metrics-section {
  padding: 2rem;
  background: rgba(58, 50, 56, 0.03);
  border-bottom: 1px dashed #8E7F7F;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.metric-bar {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #8E7F7F;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.9rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #3A3238;
}

.metric-values {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0;
}

.metric-values span {
  font-size: 0.8rem;
  color: #5F5449;
}

.metric-progress {
  height: 15px;
  background: rgba(142, 127, 127, 0.2);
  border: 1px solid #8E7F7F;
  position: relative;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  width: 0;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-extremes {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #8E7F7F;
  margin-top: 0.25rem;
}

/* Metric Fill Patterns - IFB Style */
.metric-sanity .metric-fill {
  background: repeating-linear-gradient(
    45deg,
    #4a5d4a,
    #4a5d4a 10px,
    #3f4f3f 10px,
    #3f4f3f 20px
  );
}

.metric-home .metric-fill {
  background: repeating-linear-gradient(
    45deg,
    #5d4a4a,
    #5d4a4a 10px,
    #4f3f3f 10px,
    #4f3f3f 20px
  );
}

.metric-morality .metric-fill {
  background: repeating-linear-gradient(
    45deg,
    #4a4a5d,
    #4a4a5d 10px,
    #3f3f4f 10px,
    #3f3f4f 20px
  );
}

.metric-sobriety .metric-fill {
  background: repeating-linear-gradient(
    45deg,
    #5d5d4a,
    #5d5d4a 10px,
    #4f4f3f 10px,
    #4f4f3f 20px
  );
}

/* Personal Profile Section - IFB Style */
.personal-profile-section {
  padding: 2rem;
  border-top: 1px dashed #8E7F7F;
  background: rgba(212,200,190,0.1);
}

.preferences-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.preferences-category {
  background: #EBE6D8;
  border: 1px solid #8E7F7F;
  padding: 1.5rem;
  position: relative;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.preferences-title {
  font-size: 1rem;
  font-weight: bold;
  color: #3A3238;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #8E7F7F;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-icon {
  width: 24px;
  height: 24px;
  background: #8E7F7F;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #EBE6D8;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.preferences-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.preference-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(142, 127, 127, 0.2);
  transition: all 0.3s ease;
}

.preference-item:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(5px);
}

.preference-label {
  font-weight: bold;
  color: #5F5449;
  font-size: 0.9rem;
  min-width: 120px;
}

.preference-value {
  flex: 1;
  font-size: 0.9rem;
  color: #3A3238;
}

/* Biography Section - IFB Style */
.biography-section {
  padding: 2rem;
  position: relative;
}

.bio-content {
  background: rgba(212,200,190,0.2);
  border: 1px solid #8E7F7F;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.bio-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #3A3238;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #8E7F7F;
}

.bio-paragraph {
  margin-bottom: 1.5rem;
  line-height: 1.6;
  color: #3A3238;
}

/* Schedule Section - IFB Style */
.schedule-section {
  padding: 2rem;
  border-top: 1px dashed #8E7F7F;
}

.schedule-content {
  background: rgba(212,200,190,0.2);
  border: 1px solid #8E7F7F;
  padding: 1.5rem;
}

/* Intelligence Assessment Section - IFB Style */
.intelligence-section {
  padding: 2rem;
  border-top: 1px dashed #8E7F7F;
  background: rgba(58, 50, 56, 0.03);
}

.intel-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #3A3238;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  font-family: 'Courier New', monospace;
}

.intel-subtitle {
  font-size: 0.9rem;
  color: #8E7F7F;
  margin-bottom: 2rem;
  font-style: italic;
}

.intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.intel-category {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #8E7F7F;
  padding: 1.5rem;
}

.intel-header {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #8E7F7F;
}

.intel-label {
  font-size: 0.9rem;
  font-weight: bold;
  color: #3A3238;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Courier New', monospace;
}

.intel-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.intel-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.intel-field {
  font-size: 0.8rem;
  color: #8E7F7F;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.intel-value {
  color: #3A3238;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.3rem 0;
}

/* Files Section - IFB Style */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

/* Media Tabs */
.media-tabs {
  display: flex;
  margin-bottom: 2rem;
  border-bottom: 2px solid #8E7F7F;
  background: rgba(142, 127, 127, 0.1);
}

.media-tab {
  background: #D4C8BE;
  border: 1px solid #8E7F7F;
  border-bottom: none;
  padding: 1rem 2rem;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #3A3238;
  transition: all 0.3s ease;
  position: relative;
  top: 2px;
  font-size: 0.9rem;
}

.media-tab:hover {
  background: #EBE6D8;
}

.media-tab.active {
  background: #EBE6D8;
  border-bottom: 2px solid #EBE6D8;
  z-index: 2;
}

.media-content {
  min-height: 400px;
}

.media-tab-content {
  display: none;
}

.media-tab-content.active {
  display: block;
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.file-card {
  background: #D4C8BE;
  border: 1px solid #8E7F7F;
  position: relative;
  transition: all 0.3s ease;
  opacity: 0;
  animation: cardReveal 0.5s ease forwards;
}

.file-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.file-preview {
  aspect-ratio: 4/3;
  background: linear-gradient(45deg, #5F5449, #3A3238);
  padding: 1rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #EBE6D8;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(142,127,127,0.1) 10px,
    rgba(142,127,127,0.1) 20px
  );
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.file-preview:hover .preview-overlay {
  opacity: 0.5;
}

.file-info {
  padding: 1rem;
}

.file-title {
  font-weight: bold;
  color: #3A3238;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.file-card:hover .file-title {
  color: #000;
}

.file-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #8E7F7F;
}

.file-type {
  font-family: monospace;
  color: #8E7F7F;
  transition: transform 0.3s ease;
}

.file-card:hover .file-type {
  transform: translateX(5px);
}

.file-size {
  background: #3A3238;
  color: #EBE6D8;
  padding: 2px 8px;
  font-size: 0.7rem;
  transition: all 0.3s ease;
}

.file-card:hover .file-size {
  background: #5F5449;
  transform: translateY(-2px);
}

/* Dossier Folder Tabs - IFB Style */
.folder-tabs {
  position: relative;
  margin-bottom: 0;
  padding: 0 2rem;
  z-index: 10;
}

.folder-tab.dossier-tab {
  position: relative;
  display: inline-block;
  background: #D4C8BE;
  padding: 0.5rem 2rem;
  border: 1px solid #8E7F7F;
  border-bottom: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
  top: 0;
}

.folder-tab.dossier-tab:hover {
  background: #C4B8AE;
  transform: translateY(-2px);
}

.folder-tab.dossier-tab.active {
  background: #EBE6D8;
  transform: translateY(-2px);
  border-bottom: 1px solid #EBE6D8;
  z-index: 15;
}

/* Multiple Dossier Tabs */
.dossier-tabs {
  position: absolute;
  top: -2rem;
  left: 3rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.dossier-person-tab {
  background: #D4C8BE;
  padding: 0.5rem 1.5rem;
  border: 1px solid #8E7F7F;
  border-bottom: none;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #3A3238;
  animation: tabWiggle 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
}

.dossier-person-tab:hover {
  background: #C4B8AE;
  transform: translateY(-2px);
}

.dossier-person-tab.active {
  background: #EBE6D8;
  transform: translateY(-2px);
  border-bottom: 1px solid #EBE6D8;
  z-index: 15;
}

.dossier-person-tab.locked {
  background: #8E7F7F;
  color: #EBE6D8;
  cursor: not-allowed;
  opacity: 0.8;
}

.dossier-person-tab.locked:hover {
  background: #8E7F7F;
  transform: none;
}

/* Dossier Tab Content */
.dossier-tab-content {
  display: none;
  background: #EBE6D8;
  border: 1px solid #8E7F7F;
  margin-top: -1px;
  position: relative;
  z-index: 5;
}

.dossier-tab-content.active {
  display: block;
}

/* File Preview Modal - IFB Style */
.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(58, 50, 56, 0.95);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preview-modal.active {
  opacity: 1;
}

.preview-container {
  background: #EBE6D8;
  border: 1px solid #8E7F7F;
  max-width: 90%;
  max-height: 90vh;
  width: 800px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.preview-modal.active .preview-container {
  transform: translateY(0);
}

.preview-header {
  background: #D4C8BE;
  padding: 1rem;
  border-bottom: 1px solid #8E7F7F;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-title {
  font-weight: bold;
  color: #3A3238;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.preview-close {
  background: none;
  border: none;
  color: #8E7F7F;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.preview-close:hover {
  color: #3A3238;
}

.preview-content {
  padding: 2rem;
  overflow-y: auto;
  max-height: calc(90vh - 60px);
}

/* Document Preview Styles */
.document-preview {
  font-family: 'Courier New', monospace;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #3A3238;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid #8E7F7F;
}

.document-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #8E7F7F;
}

.document-meta {
  font-size: 0.8rem;
  color: #5F5449;
  margin-bottom: 0.5rem;
}

/* Image Preview Styles */
.image-preview {
  background: #3A3238;
  padding: 2rem;
  position: relative;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-stamp {
  position: absolute;
  top: 2rem;
  right: 2rem;
  padding: 0.5rem 1rem;
  border: 2px solid #8E7F7F;
  color: #8E7F7F;
  font-weight: bold;
  transform: rotate(15deg);
  z-index: 2;
  background: #EBE6D8;
}

.image-container {
  width: 100%;
  max-width: 800px;
  background: #EBE6D8;
  padding: 1rem;
  border: 1px solid #8E7F7F;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.image-container img {
  width: 100%;
  height: auto;
  border: 1px solid #8E7F7F;
  filter: grayscale(30%) sepia(20%);
}

.image-metadata {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #8E7F7F;
  font-family: 'Courier New', monospace;
  color: #3A3238;
}

.image-meta-item {
  margin: 0.25rem 0;
  font-size: 0.8rem;
  color: #5F5449;
}

.image-preview img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

/* Video Preview Styles */
.video-preview {
  background: #3A3238;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-container {
  aspect-ratio: 16/9;
  width: 100%;
  background: #000;
  position: relative;
}

.video-controls {
  display: flex;
  gap: 1rem;
  padding: 0.5rem;
  background: rgba(142, 127, 127, 0.1);
  border: 1px solid #8E7F7F;
}

.video-button {
  background: #8E7F7F;
  color: #EBE6D8;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.video-button:hover {
  background: #3A3238;
}

/* Locked File Message Styles */
.locked-file-message {
  padding: 2rem;
  text-align: center;
  color: #3A3238;
}

.locked-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.locked-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #8E7F7F;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.locked-filename {
  font-size: 1.2rem;
  color: #5F5449;
  margin-bottom: 1.5rem;
  font-family: 'Courier New', monospace;
}

.locked-description {
  background: rgba(142, 127, 127, 0.1);
  border: 1px solid #8E7F7F;
  padding: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.locked-footer {
  font-size: 0.9rem;
  color: #8E7F7F;
  font-weight: bold;
  letter-spacing: 1px;
}

.video-progress {
  flex: 1;
  height: 10px;
  background: rgba(142, 127, 127, 0.2);
  border: 1px solid #8E7F7F;
  position: relative;
  cursor: pointer;
}

.video-progress-bar {
  height: 100%;
  background: #8E7F7F;
  width: 0%;
  transition: width 0.1s linear;
}

.metrics-vertical {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.metric-item {
  background: rgba(235, 230, 216, 0.5);
  border: 1px solid #8E7F7F;
  padding: 1rem;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.metric-title {
  color: #3A3238;
  font-weight: bold;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.metric-value {
  color: #5F5449;
  font-weight: bold;
  font-size: 1rem;
}

.metric-bar-container {
  margin: 0.5rem 0;
}

.metric-bar {
  width: 100%;
  height: 12px;
  background: #D4C8BE;
  border: 1px solid #8E7F7F;
  position: relative;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: linear-gradient(90deg, #5F5449 0%, #8E7F7F 100%);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.metric-definition {
  color: #5F5449;
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.preferences-list {
  color: #5F5449;
  line-height: 1.6;
}

.preference-item {
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: rgba(212, 200, 190, 0.3);
  border-left: 3px solid #8E7F7F;
}

.background-content {
  color: #5F5449;
  line-height: 1.6;
  padding: 1rem;
  background: rgba(212, 200, 190, 0.3);
  border: 1px dashed #8E7F7F;
}

.media-icon {
  margin-right: 0.5rem;
}

.media-name {
  flex: 1;
  color: #3A3238;
  font-size: 0.9rem;
  font-weight: bold;
}

.media-status {
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.media-status.unlocked {
  background: #4a5d4a;
  color: #EBE6D8;
}

.media-status.locked {
  background: #8B0000;
  color: #EBE6D8;
}

/* EXACT IFB Dossier Structure */
.dossier-document {
  background: #EBE6D8;
  border: 1px solid #8E7F7F;
  position: relative;
  margin: 2rem auto;
  max-width: 900px;
  opacity: 0;
  transform: translateY(20px);
  animation: cardReveal 0.5s ease-out forwards;
  margin-bottom: 3rem;
}

.document-content {
  padding: 2rem;
}

.dossier-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-bottom: 1px dashed #8E7F7F;
}

.section-title {
  color: #3A3238;
  font-size: 1.2rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #8E7F7F;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.info-label {
  font-size: 0.8rem;
  color: #8E7F7F;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
}

.info-value {
  color: #3A3238;
  font-size: 1rem;
  font-weight: bold;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #8E7F7F;
  padding: 1rem;
  text-align: center;
}

.metric-title {
  font-size: 0.8rem;
  color: #8E7F7F;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3A3238;
  margin-bottom: 0.5rem;
}

.metric-bar {
  height: 8px;
  background: rgba(142, 127, 127, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: #8E7F7F;
  transition: width 0.5s ease;
  width: 0%;
}

/* Full metric bar styling like IFBDossier */
.metric-bar.metric-sanity .metric-fill {
  background: linear-gradient(90deg, #5F5449 0%, #8E7F7F 50%, #3A3238 100%);
}

.metric-bar.metric-home .metric-fill {
  background: linear-gradient(90deg, #4a5d4a 0%, #8E7F7F 50%, #5d4a4a 100%);
}

.metric-bar.metric-morality .metric-fill {
  background: linear-gradient(90deg, #4a4a5d 0%, #8E7F7F 50%, #5d4a4a 100%);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-weight: bold;
  color: #3A3238;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.metric-values {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: #5F5449;
  font-style: italic;
}

.metric-progress {
  height: 12px;
  background: rgba(142, 127, 127, 0.2);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.metric-extremes {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #8E7F7F;
}

.schedule-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.schedule-entry {
  display: flex;
  align-items: center;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(142, 127, 127, 0.3);
}

.schedule-time {
  min-width: 80px;
  font-weight: bold;
  color: #5F5449;
}

.schedule-activity {
  flex: 1;
  color: #3A3238;
}

.dossiers-nav {
  background: rgba(93, 74, 74, 0.1);
  border-bottom: 1px solid #8E7F7F;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.nav-section {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  background: #D4C8BE;
  border: 1px solid #8E7F7F;
  padding: 0.5rem 1rem;
  font-family: 'Courier New', monospace;
  color: #3A3238;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.filter-btn:hover {
  background: #C4B8AE;
}

.filter-btn.active {
  background: #5d4a4a;
  color: #EBE6D8;
}

.search-section {
  min-width: 300px;
}

/* Content Area - matching IFB structure */
.content-area {
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* Dossiers Grid - using IFB characteristics structure */
.dossiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Individual Dossier Card - styled like IFB characteristic groups */
.dossier-section {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #8E7F7F;
  padding: 0;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  opacity: 0;
  animation: dossierReveal 0.5s ease forwards;
}

.dossier-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Group Title - like IFB group-title */
.group-title {
  background: #5d4a4a;
  color: #EBE6D8;
  padding: 1rem;
  font-weight: bold;
  letter-spacing: 2px;
  font-size: 0.9rem;
  font-family: 'Courier New', monospace;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clearance-level {
  background: darkred;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 2px;
}

/* Characteristics Section - matching IFB layout */
.characteristics-section {
  padding: 1.5rem;
}

/* Photo Section - like IFB photo styling */
.subject-photo-section {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.subject-photo {
  width: 120px;
  height: 140px;
  background: #D4C8BE;
  border: 2px solid #8E7F7F;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #5F5449;
  text-align: center;
  line-height: 1.3;
  position: relative;
  flex-shrink: 0;
}

.case-number {
  position: absolute;
  top: -12px;
  left: -8px;
  background: #3A3238;
  color: #EBE6D8;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
}

/* Subject Info - using IFB characteristic-item structure */
.subject-info {
  flex: 1;
}

.characteristic-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(142, 127, 127, 0.2);
  margin-bottom: 0.3rem;
}

.characteristic-name {
  font-weight: bold;
  color: #5F5449;
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

.characteristic-value {
  color: #3A3238;
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
}

/* Characteristic Meters - matching IFB progress bars exactly */
.characteristic-group {
  margin-top: 1.5rem;
}

.group-subtitle {
  font-weight: bold;
  color: #3A3238;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  border-bottom: 1px solid #8E7F7F;
  padding-bottom: 0.5rem;
}

.characteristic-meter {
  width: 120px;
  height: 12px;
  background: #D4C8BE;
  border: 1px solid #8E7F7F;
  position: relative;
  overflow: hidden;
}

/* Daily Fill - striped pattern like IFB */
.daily-fill {
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    #5F5449 0px,
    #5F5449 4px,
    #8E7F7F 4px,
    #8E7F7F 8px
  );
  transition: width 0.8s ease;
}

/* Temporary Fill - different pattern */
.temporary-fill {
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    #4a5d4a 0px,
    #4a5d4a 4px,
    #5d4a4a 4px,
    #5d4a4a 8px
  );
  transition: width 0.8s ease;
}

/* Access Status - styled like IFB elements */
.access-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.7rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  border: 1px solid;
  z-index: 2;
}

.access-status.available {
  background: rgba(74, 93, 74, 0.9);
  color: #EBE6D8;
  border-color: #4a5d4a;
}

.access-status.locked {
  background: rgba(139, 0, 0, 0.9);
  color: #EBE6D8;
  border-color: #8B0000;
}

.access-status.contacted {
  background: rgba(142, 127, 127, 0.9);
  color: #EBE6D8;
  border-color: #8E7F7F;
}

@keyframes dossierReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Subjects Archive additions: the GENERAL evidence card and
     the NEW stamps on unseen finds. ── */

/* The unlocked GENERAL FILE — never the classified stripes. Its
   face is the newest collected print (set inline from JS); when
   the file is empty, a red EVIDENCE seal on manila. */
.arch-card-evidence .arch-photo-evidence {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #cfc2a8;
  overflow: hidden;
}

.arch-card-evidence .arch-photo-evidence img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(22%) contrast(1.05) brightness(0.96);
}

.arch-evidence-seal {
  border: 2.5px solid #8B0000;
  color: #8B0000;
  padding: 4px 12px;
  border-radius: 2px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  font-weight: bold;
  letter-spacing: 3px;
  transform: rotate(-8deg);
  opacity: 0.8;
}

/* NEW — solid ink now, fully INSIDE the card: red fill, cream
   text, slight tilt. The outlined version drowned in busy photo
   backings; this one reads from across the desk. Comes off the
   moment the item is actually opened. */
.arch-new {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #8B0000;
  color: #EBE6D8;
  border: 1px solid #5a0000;
  border-radius: 2px;
  padding: 2px 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 2.5px;
  transform: rotate(-6deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  animation: archNewIn 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}

@keyframes archNewIn {
  0%   { opacity: 0; transform: rotate(-6deg) scale(1.8); }
  100% { opacity: 1; transform: rotate(-6deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .arch-new { animation: none; }
}
