/*
  ═══════════════════════════════════════════════════════════════════════════
  OPERATIONS LOG STYLES
  ───────────────────────────────────────────────────────────────────────────
  Shared by /files/index.html and every /files/[slug]/index.html entry.
  Matches the Meridian design system established in / and /cell.
  ═══════════════════════════════════════════════════════════════════════════
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #02050a;
  --bg-2:         #050914;
  --bg-card:      rgba(8, 14, 26, 0.9);
  --text:         #f8f9fa;
  --text-muted:   #b4c5d6;
  --text-dim:     #7a8d9e;
  --text-faint:   #687c91;
  --accent:       #00c9a7;
  --accent-dim:   rgba(0, 201, 167, 0.12);
  --accent-glow:  rgba(0, 201, 167, 0.5);
  --accent-bright:#00ffe8;
  --border:       rgba(255,255,255,0.1);
  --border-accent:rgba(0, 201, 167, 0.5);
  --font-display: 'Oswald', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9990;
}

/* ─── NAV ─────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(2, 5, 10, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-left {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text);
  text-transform: uppercase;
}
.nav-left a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-left a:hover { color: var(--accent-bright); }
.nav-right {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ─── PAGE LAYOUT ─────────────────────────────────────── */
main {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
  flex: 1;
}

/* ─── CLASSIFICATION BANNER ───────────────────────────── */
.doc-header {
  border-top: 1px solid var(--border-accent);
  border-bottom: 1px solid var(--border-accent);
  padding: 1.5rem 0;
  margin-bottom: 4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
  line-height: 1.9;
}
.doc-header .accent { color: var(--accent); text-shadow: 0 0 1px rgba(248, 249, 250, 0.35); }
.doc-header .key { color: var(--text-muted); }

/* ─── SECTION LABELS ──────────────────────────────────── */
.label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--accent-bright);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 6px var(--accent-glow), 0 0 1px rgba(248, 249, 250, 0.35);
}

/* ─── HEADLINE ────────────────────────────────────────── */
.headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 2rem;
}
.headline .line { display: block; }
.headline .line-2 { color: var(--text-muted); }
.headline .line-3 { color: var(--accent); }

/* ─── LEDE ────────────────────────────────────────────── */
.op-lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
  max-width: 660px;
  font-weight: 300;
}
.op-lede em { color: var(--text); font-style: italic; }

/* ─── DIVIDER ─────────────────────────────────────────── */
.div {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-accent), transparent);
  margin: 4rem 0;
}

/* ─── ARTICLE BODY ────────────────────────────────────── */
.op-body { }

.op-section {
  margin-bottom: 3.5rem;
}

.op-section p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.4rem;
}

.op-section p strong {
  color: var(--text);
  font-weight: 600;
}

.op-section p em {
  color: var(--text);
  font-style: italic;
}

/* H2: section labels */
.op-section-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--accent-bright);
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 6px var(--accent-glow), 0 0 1px rgba(248, 249, 250, 0.35);
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

/* H3: subsections */
.op-subsection-label {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* ─── CITATIONS / EXTERNAL LINKS ──────────────────────── */
.op-citation,
.op-section p a {
  color: var(--accent-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--border-accent);
  transition: border-color 0.2s, color 0.2s;
}
.op-citation:hover,
.op-section p a:hover {
  color: var(--text);
  border-bottom-color: var(--accent-bright);
}
.op-arrow {
  font-size: 0.85em;
  margin-left: 0.15em;
  opacity: 0.7;
}

/* ─── CALLOUT / PRIMARY SOURCE QUOTE ──────────────────── */
.op-callout {
  border-left: 2px solid var(--accent);
  background: var(--accent-dim);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  color: var(--text);
  font-style: italic;
  font-family: var(--font-body);
  line-height: 1.7;
}

/* ─── INLINE CROSS-REFERENCE BOX ──────────────────────── */
.op-crossref {
  display: inline-block;
  padding: 0.6rem 1rem;
  border: 1px dashed var(--accent);
  background: var(--accent-dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 1.5rem 0;
  line-height: 1.6;
}
.op-crossref a {
  color: var(--accent-bright);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.op-crossref a:hover {
  border-bottom-color: var(--accent-bright);
}

/* ─── MID-PAGE SUPPLEMENT CTA ─────────────────────────── */
.op-supplement {
  border: 1px solid var(--border-accent);
  background: var(--bg-card);
  padding: 2rem 2.25rem;
  margin: 4rem 0;
  position: relative;
}
.op-supplement::before, .op-supplement::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--accent-bright);
  border-style: solid;
}
.op-supplement::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.op-supplement::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.op-supplement-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--accent-bright);
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-shadow: 0 0 6px var(--accent-glow), 0 0 1px rgba(248, 249, 250, 0.35);
}
.op-supplement-body {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}
.op-supplement-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
  text-decoration: none;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--border-accent);
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.op-supplement-link:hover {
  border-color: var(--accent-bright);
  background: var(--accent-dim);
}
.op-supplement-link .arrow { transition: transform 0.25s; }
.op-supplement-link:hover .arrow { transform: translateX(4px); }

/* ─── ENDNOTES ────────────────────────────────────────── */
.op-endnotes-list {
  list-style: decimal inside;
  padding-left: 0;
}
.op-endnotes-list li {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  padding: 0.4rem 0;
  letter-spacing: 0.04em;
}
.op-endnotes-list li a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.op-endnotes-list li a:hover {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
}

/* ─── CROSS-REFERENCES LIST ───────────────────────────── */
.op-crossref-list {
  list-style: none;
  padding-left: 0;
}
.op-crossref-list li {
  padding: 0.6rem 0 0.6rem 1.5rem;
  position: relative;
  color: var(--text-muted);
  line-height: 1.6;
}
.op-crossref-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.op-crossref-list li a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border-accent);
  transition: color 0.2s, border-color 0.2s;
}
.op-crossref-list li a:hover {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
}

/* ─── END-OF-PAGE CONVERSION CTA ──────────────────────── */
.op-conversion {
  margin-top: 6rem;
  padding: 3.5rem 0 3rem;
  border-top: 1px solid var(--border-accent);
  border-bottom: 1px solid var(--border-accent);
  text-align: center;
}
.op-conversion-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--accent-bright);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 6px var(--accent-glow), 0 0 1px rgba(248, 249, 250, 0.35);
}
.op-conversion-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.op-conversion-title .line { display: block; }
.op-conversion-title .line-2 { color: var(--text-muted); }
.op-conversion-body {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 auto 2rem;
  max-width: 560px;
  font-size: 1rem;
}
.op-conversion-note {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  margin-top: 1.5rem;
  text-transform: uppercase;
}

.anchor-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--border-accent);
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.anchor-link:hover {
  border-color: var(--accent-bright);
  background: var(--accent-dim);
}
.anchor-link .arrow { transition: transform 0.25s; }
.anchor-link:hover .arrow { transform: translateX(4px); }

/* ─── CLOSING CLASSIFICATION FOOTER ───────────────────── */
.closing {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.closing-line {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 2rem;
  line-height: 1.6;
}
.closing-foot {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ─── INDEX-PAGE SPECIFIC ─────────────────────────────── */
.op-index-list {
  list-style: none;
  padding-left: 0;
  margin-top: 2rem;
}
.op-index-list li {
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}
.op-index-list li:first-child {
  border-top: 1px solid var(--border);
}
.op-index-entry {
  display: grid;
  grid-template-columns: minmax(140px, auto) 1fr;
  gap: 1.5rem 2rem;
  align-items: start;
}
.op-index-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
  line-height: 1.7;
}
.op-index-meta .accent { color: var(--accent); display: block; }
.op-index-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.op-index-body h2 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.op-index-body h2 a:hover {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
}
.op-index-body p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.op-index-empty {
  border: 1px dashed var(--border-accent);
  padding: 3rem 2rem;
  text-align: center;
  margin: 3rem 0;
  background: var(--bg-card);
}
.op-index-empty-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--accent-bright);
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-shadow: 0 0 6px var(--accent-glow), 0 0 1px rgba(248, 249, 250, 0.35);
}
.op-index-empty-body {
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto;
  font-size: 1rem;
}

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 640px) {
  nav { padding: 1rem 1.25rem; }
  .nav-right { display: none; }
  main { padding: 6rem 1.25rem 3rem; }
  body { font-size: 17px; }
  .doc-header { margin-bottom: 3rem; font-size: 0.72rem; padding: 1.25rem 0; }
  .headline { font-size: 1.9rem; }
  .op-supplement { padding: 1.5rem 1.25rem; margin: 3rem 0; }
  .op-supplement::before, .op-supplement::after { width: 10px; height: 10px; }
  .div { margin: 3rem 0; }
  .op-conversion { padding: 2.5rem 0 2rem; }
  .op-index-entry { grid-template-columns: 1fr; gap: 0.75rem; }
}
