/* =========================================
   GLOBAL VARIABLES & DESIGN TOKENS
   Theme: Editorial Print Archive / Judicial
   ========================================= */
:root {
  /* Colors */
  --color-primary: #0a101a; /* Deep Navy/Charcoal */
  --color-secondary: #f4f2eb; /* Off-White / Ivory */
  --color-accent: #c4a77d; /* Subtle Gold */
  --color-text-main: #1d1d1f; 
  --color-text-muted: #5e5e60;
  --color-border: rgba(10, 16, 26, 0.15);
  
  /* Typography */
  --font-heading: 'Playfair Display', 'Merriweather', serif;
  --font-body: 'Inter', '-apple-system', 'Segoe UI', sans-serif;
  
  /* Layout constraints */
  --max-width: 1280px;
  --section-padding: 6rem 0;
  
  /* UI Elements */
  --divider-thickness: 1px;
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-secondary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.7;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================================
   GATEWAY PAGE (INDEX)
   ========================================= */
.gateway-wrapper {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.gateway-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gateway-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.gateway-input {
  background: transparent;
  border: none;
  border-bottom: var(--divider-thickness) solid var(--color-border);
  padding: 0.75rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  text-align: center;
  width: 250px;
  color: var(--color-text-main);
  outline: none;
  transition: border-color 0.3s ease;
}

.gateway-input:focus {
  border-color: var(--color-primary);
}

.gateway-btn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.gateway-btn:hover {
  background: var(--color-accent);
}

.gateway-error {
  color: #a00;
  font-size: 0.85rem;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* =========================================
   NAVIGATION (TOP ONLY)
   ========================================= */
.site-header {
  border-bottom: var(--divider-thickness) solid var(--color-border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  background-color: rgba(244, 242, 235, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links li a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* =========================================
   LAYOUT BLOCKS (STRICT HORIZONTAL)
   ========================================= */
.section {
  padding: var(--section-padding);
  border-bottom: var(--divider-thickness) solid var(--color-border);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

/* Row-based structured content */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}

.col-half {
  flex: 1 1 calc(50% - 1.5rem);
  min-width: 300px;
}

.col-sidebar {
  flex: 0 0 300px;
}

.col-main {
  flex: 1;
}

.data-row {
  display: flex;
  border-top: var(--divider-thickness) solid var(--color-border);
  padding: 1.5rem 0;
}

.data-label {
  flex: 0 0 250px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.data-value {
  flex: 1;
}

/* Expandable content */
details {
  border-bottom: var(--divider-thickness) solid var(--color-border);
  padding: 1rem 0;
}

summary {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--color-accent);
}

details[open] summary::after {
  content: '-';
}

.details-content {
  padding-top: 1rem;
  color: var(--color-text-muted);
}

/* Media Lists */
.media-list {
  list-style: none;
}

.media-list-item {
  border-bottom: var(--divider-thickness) solid var(--color-border);
  padding: 1.5rem 0;
}

.media-date {
  font-size: 0.85rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.media-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background-color: var(--color-primary);
  color: var(--color-secondary);
  padding: 4rem 0 2rem;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: var(--color-accent);
  margin-bottom: 1rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
}

.footer-col p, .footer-col a {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
  color: var(--color-accent);
}

/* =========================================
   ENHANCED STRUCTURAL LEDGER UTILITIES
   ========================================= */
.ledger-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  border: var(--divider-thickness) solid var(--color-border);
}

.ledger-table th, .ledger-table td {
  padding: 1.5rem;
  border-bottom: var(--divider-thickness) solid var(--color-border);
  border-right: var(--divider-thickness) solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.ledger-table th:last-child, .ledger-table td:last-child {
  border-right: none;
}

.ledger-table th {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-primary);
  background-color: rgba(10, 16, 26, 0.03);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.structured-block {
  border: var(--divider-thickness) solid var(--color-border);
  background-color: #fff;
}

.structured-block-header {
  padding: 1.5rem 2rem;
  border-bottom: var(--divider-thickness) solid var(--color-border);
  background-color: rgba(10, 16, 26, 0.02);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.25rem;
}

.structured-block-body {
  padding: 2rem;
}

.split-ledger {
  display: flex;
  border: var(--divider-thickness) solid var(--color-border);
}

.split-ledger > div {
  flex: 1;
  padding: 2.5rem;
}

.split-ledger > div:first-child {
  border-right: var(--divider-thickness) solid var(--color-border);
  background-color: rgba(10, 16, 26, 0.01);
}
