/* Base Reset & Academic Typography Setup */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body {
  background: #fdfdfd; /* Brighter, crisp paper background */
  font-family: 'Lora', serif; /* Shift primary body text to serif for academic feel */
  color: #111111;
  font-size: 14px;
  line-height: 1.6;
}

/* Journal Navigation Bar (Kept modern/minimal as a web wrapper) */
.journal-bar {
  background: #1a1a16;
  padding: 9px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Source Sans 3', sans-serif;
}

.journal-bar-left {
  font-size: 11px;
  color: #888;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.journal-bar-right {
  display: flex;
  gap: 20px;
}

.journal-bar-right a {
  font-size: 11px;
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}

.journal-bar-right a:hover { 
  color: white; 
}

/* Academic Paper Container */
.paper {
  max-width: 850px; /* Slightly wider to accommodate clean dual columns */
  margin: 0 auto;
  padding: 40px 48px;
}

/* Header Sections (Always Full-Width / Single Column) */
.paper-header {
  padding: 20px 0 30px;
  border-bottom: 1px solid #111;
  text-align: center; /* Center align title elements like standard preprints */
}

.paper-category {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #555;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Removed the heavy left accent bar for a cleaner manuscript look */
.paper-category::before {
  display: none;
}

.paper-title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  color: #111;
  margin-bottom: 16px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.paper-subtitle {
  font-size: 14px;
  color: #444;
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.paper-authors {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #111;
  margin-bottom: 24px;
}

.paper-keywords {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  color: #444;
  text-align: left;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px dashed #ccc;
}

.paper-keywords strong {
  color: #111;
  font-weight: 600;
}

/* Dashboard Findings Strip (Styled as a formal metadata box) */
.findings-strip {
  display: flex;
  border: 1px solid #111;
  background: #f9f9f9;
  margin: 24px 0 0;
  font-family: 'Source Sans 3', sans-serif;
}

.finding {
  flex: 1;
  padding: 12px 14px;
  border-right: 1px solid #111;
  text-align: left;
}

.finding:last-child { 
  border-right: none; 
}

.finding-val {
  font-family: 'Source Code Pro', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #111;
  margin-bottom: 3px;
}

.finding-label {
  font-size: 11px;
  color: #555;
  line-height: 1.3;
}

/* Two-Column Layout Strategy for Sections */
.paper-section {
  padding: 30px 0;
  border-bottom: none; /* Removed the web-style dividers */
  
  /* Traditional journal multi-column setup */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* Section elements that need to span across both columns (Headers, Tables, Figures) */
.section-num,
.section-heading,
.paper-table,
.figure,
.highlight-box,
.abstract,
.references {
  grid-column: span 2;
}

.section-num {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #111;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: -16px; /* Pulls heading closer */
}

.section-heading {
  font-size: 18px;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
  margin-bottom: 8px;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}

/* Justified, traditional paragraph formatting */
.section-text {
  font-size: 13.5px;
  color: #111;
  line-height: 1.6;
  text-align: justify; /* Authentic paper layout */
  text-justify: inter-word;
  margin-bottom: 0;
}

/* Formal indents for subsequent paragraphs (Standard Academic Style) */
.section-text + .section-text {
  text-indent: 24px;
}

/* Abstract Formatting (Centered block layout) */
.abstract {
  max-width: 650px;
  margin: 0 auto;
  border-left: none; /* Removed structural web accents */
  padding-left: 0;
  text-align: justify;
}

.abstract-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 8px;
}

.abstract-text {
  font-size: 13px;
  color: #222;
  line-height: 1.55;
}

/* Academic Figures */
.figure {
  margin: 24px auto;
  border: none;
  background: transparent;
  max-width: 600px;
}

.figure img {
  width: 100%;
  display: block;
  border: 1px solid #ddd;
}

.figure-caption {
  padding: 12px 0;
  border-top: none;
  font-size: 11.5px;
  color: #333;
  line-height: 1.5;
  text-align: justify;
}

.figure-caption strong {
  font-style: normal;
  font-weight: 600;
  color: #111;
}

/* Clean, Strict Table Design (Three-line table notation / APA style) */
.paper-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 12.5px;
  font-family: 'Source Sans 3', sans-serif;
  border-top: 1.5px solid #111; /* Top rule */
  border-bottom: 1.5px solid #111; /* Bottom rule */
}

.paper-table caption {
  font-family: 'Lora', serif;
  font-size: 12px;
  color: #111;
  text-align: left;
  padding-bottom: 8px;
  padding-top: 6px;
  caption-side: top; /* Descriptions go on top for formal tables */
}

.paper-table th {
  font-size: 11px;
  font-weight: 600;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-bottom: 1px solid #111; /* Middle rule under headers */
  text-align: left;
}

.paper-table td {
  padding: 7px 12px;
  border-bottom: none; /* No vertical or inner lines for genuine paper style */
  color: #222;
}

/* Small divider line between sections if multiple metrics are inside one table */
.paper-table tr:last-child td { 
  border-bottom: none; 
}

.paper-table td.mono {
  font-family: 'Source Code Pro', monospace;
  font-size: 11.5px;
}

/* Subtle non-colored accents for best performance highlights */
.paper-table tr.highlight td,
.paper-table tr.best td { 
  background: #f4f4f4; 
  font-weight: 600;
}

/* Inline Quote Block (Styling as an extraction block rather than UI box) */
.highlight-box {
  background: transparent;
  border-left: none;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 14px 24px;
  margin: 20px auto;
  max-width: 600px;
  font-size: 13px;
  color: #333;
  line-height: 1.6;
  text-align: center;
}

/* References Section */
.references {
  margin-top: 20px;
  border-top: 1px solid #111;
  padding-top: 24px;
}

.reference {
  font-size: 12px;
  color: #222;
  line-height: 1.6;
  padding: 4px 0;
  border-bottom: none;
  padding-left: 36px;
  text-indent: -36px; /* Hanging indent style */
  text-align: justify;
}

.reference a { 
  color: #111; 
  text-decoration: underline; 
}

/* Institutional Footer Layout */
.paper-footer {
  grid-column: span 2;
  padding: 32px 0 0;
  font-size: 11px;
  color: #666;
  line-height: 1.6;
  border-top: 1px solid #111;
  margin-top: 40px;
  font-family: 'Source Sans 3', sans-serif;
}

.footer-subtext {
  margin-top: 4px;
}

/* Responsive Fallbacks */
@media (max-width: 720px) {
  .paper {
    padding: 24px 16px;
  }
  .paper-section {
    grid-template-columns: 1fr; /* Drop back to 1 column on small viewports */
    gap: 16px;
  }
  .section-num,
  .section-heading,
  .paper-table,
  .figure,
  .highlight-box,
  .abstract,
  .references {
    grid-column: span 1;
  }
  .paper-title { 
    font-size: 22px; 
  }
  .findings-strip { 
    flex-direction: column; 
  }
  .finding { 
    border-right: none; 
    border-bottom: 1px solid #111; 
  }
  .finding:last-child { 
    border-bottom: none; 
  }
}