/* =============================================================================
   Truth Archive — Enhanced Experience Styles
   Loading screen, rabbit hole tracker, ambient sound, search modal,
   share interstitial, visitor counter, text decode, connection map.
   ============================================================================= */

/* ============================================================
   LOADING SCREEN
   ============================================================ */

#ta-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #020202;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  padding: 2rem;
  transition: opacity 0.6s ease;
}

#ta-loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-logo {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: 900;
  color: #c9a227;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  text-shadow: 0 0 20px rgba(201, 162, 39, 0.6);
  animation: pulse-gold 2s ease-in-out infinite;
}

@keyframes pulse-gold {
  0%, 100% { text-shadow: 0 0 20px rgba(201, 162, 39, 0.6); }
  50%       { text-shadow: 0 0 40px rgba(201, 162, 39, 1), 0 0 80px rgba(201, 162, 39, 0.3); }
}

.loading-bar-wrap {
  width: min(480px, 90vw);
  height: 3px;
  background: #111;
  border: 1px solid #2a2a2a;
  margin-bottom: 2rem;
  position: relative;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #8b1414, #c9a227);
  transition: width 0.4s ease;
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.5);
}

.loading-log {
  width: min(480px, 90vw);
  max-height: 200px;
  overflow: hidden;
  color: #4a7a4a;
  font-size: 0.8rem;
  line-height: 1.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.loading-line {
  opacity: 0;
  animation: line-appear 0.2s ease forwards;
}

.loading-line.access-granted {
  color: #c9a227;
  font-size: 1rem;
  letter-spacing: 0.2em;
  margin-top: 0.5rem;
}

@keyframes line-appear {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   RABBIT HOLE WIDGET
   ============================================================ */

.rabbit-hole-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: auto;
  z-index: 1100;
  background: rgba(4, 4, 4, 0.95);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 6px;
  padding: 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  min-width: 210px;
  max-width: 240px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  overflow: hidden;
}

.rabbit-hole-widget.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Collapse toggle button */
.rh-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(201, 162, 39, 0.06);
  border: none;
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
  color: #c9a227;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  text-align: left;
}
.rh-collapse-btn:hover { background: rgba(201, 162, 39, 0.1); }
.rh-collapse-arrow {
  font-size: 0.55rem;
  transition: transform 0.25s ease;
  color: rgba(201, 162, 39, 0.6);
}
.rabbit-hole-widget.rh-collapsed .rh-collapse-arrow { transform: rotate(180deg); }

/* Body shown/hidden on collapse */
.rh-body {
  padding: 0.75rem 1.1rem 0.85rem;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  max-height: 200px;
  overflow: hidden;
}
.rabbit-hole-widget.rh-collapsed .rh-body {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.rh-header {
  color: #4a4a4a;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.rh-count {
  color: #c9a227;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.rh-unit {
  font-size: 0.65rem;
  color: #4a4a4a;
}

.rh-tier {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c9a227;
  text-shadow: 0 0 8px rgba(201, 162, 39, 0.6);
  margin-bottom: 0.25rem;
}

.rh-tier-next {
  margin-top: 0.5rem;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4a4a4a;
  border-top: 1px solid rgba(201, 162, 39, 0.12);
  padding-top: 0.4rem;
}

.rh-label {
  color: #7a7a7a;
  font-size: 0.65rem;
  line-height: 1.4;
  max-width: 180px;
  font-style: italic;
}

/* ============================================================
   AMBIENT SOUND TOGGLE
   ============================================================ */

.ambient-toggle {
  position: fixed;
  top: 8px;
  right: 1rem;
  bottom: auto;
  z-index: 1050;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(4, 4, 4, 0.0);
  border: 1px solid rgba(201, 162, 39, 0.25);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  color: inherit;
  line-height: 1;
}

.ambient-toggle:hover {
  border-color: rgba(201, 162, 39, 0.6);
}

.ambient-toggle.active {
  border-color: #c9a227;
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.4);
  animation: radio-pulse 2s ease-in-out infinite;
}

@keyframes radio-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(201, 162, 39, 0.4); }
  50%       { box-shadow: 0 0 24px rgba(201, 162, 39, 0.7); }
}

/* ============================================================
   LIVE VISITOR COUNTER
   ============================================================ */

.live-counter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: #7a7a7a;
  letter-spacing: 0.05em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4a7a4a;
  animation: live-blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes live-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.live-visitor-count {
  color: #c9a227;
  font-weight: 700;
}

/* ============================================================
   SEARCH MODAL
   ============================================================ */

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 2, 2, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.search-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal-inner {
  width: min(640px, 92vw);
  background: #080808;
  border: 1px solid rgba(201, 162, 39, 0.3);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(201, 162, 39, 0.1);
}

.search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid #1a1a1a;
}

.search-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: #4a4a4a;
}

.search-close {
  background: none;
  border: none;
  color: #4a4a4a;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
  transition: color 0.2s;
}
.search-close:hover { color: #c9a227; }

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #111;
}

.search-prompt {
  font-family: 'Share Tech Mono', monospace;
  color: #c9a227;
  font-size: 1rem;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #d8d8d8;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.03em;
  caret-color: #c9a227;
}

.search-input::placeholder { color: #333; }

.search-results {
  max-height: 380px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid #0f0f0f;
  text-decoration: none;
  transition: background 0.15s ease;
  animation: result-in 0.2s ease backwards;
}

.search-result-item:hover { background: #111; }

@keyframes result-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: none; }
}

.sr-icon {
  color: #c9a227;
  font-size: 0.6rem;
  flex-shrink: 0;
}

.sr-title {
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  color: #d8d8d8;
  letter-spacing: 0.03em;
  flex: 1;
}

.sr-title mark {
  background: none;
  color: #c9a227;
  font-weight: 700;
}

.sr-url {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: #3a3a3a;
  flex-shrink: 0;
}

.search-no-result {
  padding: 1.5rem 1.2rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: #4a4a4a;
  letter-spacing: 0.05em;
}

.search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.2rem;
  border-top: 1px solid #111;
}

.search-count {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: #4a7a4a;
  letter-spacing: 0.1em;
}

.search-hint {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: #2a2a2a;
}

kbd {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  padding: 0 4px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
}

/* ============================================================
   SHARE CLASSIFIED BUTTON
   ============================================================ */

.share-classified-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.55rem 1.2rem;
  background: transparent;
  border: 1px solid rgba(201, 162, 39, 0.4);
  color: #c9a227;
  font-family: 'Oswald', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.share-classified-btn::before {
  content: '🔒';
  font-size: 0.75rem;
}

.share-classified-btn:hover {
  background: rgba(201, 162, 39, 0.08);
  border-color: #c9a227;
}

/* ============================================================
   ACCESS INTERSTITIAL — "You Were Sent Here"
   ============================================================ */

.access-interstitial {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(2, 2, 2, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: interstitial-in 0.4s ease;
}

.access-interstitial.fade-out {
  animation: interstitial-out 0.5s ease forwards;
}

@keyframes interstitial-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes interstitial-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.access-inner {
  text-align: center;
  max-width: 520px;
}

.access-icon {
  font-size: 3rem;
  color: #c9a227;
  margin-bottom: 1rem;
  animation: pulse-gold 2s ease-in-out infinite;
}

.access-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: #cc2222;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.access-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: #c9a227;
  font-weight: 900;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 30px rgba(201, 162, 39, 0.5);
}

.access-body {
  font-family: 'Special Elite', cursive;
  color: #7a7a7a;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

.access-enter-btn {
  background: transparent;
  border: 1px solid #c9a227;
  color: #c9a227;
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 0.9rem 2.5rem;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.access-enter-btn:hover {
  background: rgba(201, 162, 39, 0.1);
  box-shadow: 0 0 20px rgba(201, 162, 39, 0.3);
}

/* ============================================================
   CONNECTION MAP PAGE (map.html)
   ============================================================ */

.map-page-wrap {
  padding-top: 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.map-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.5rem;
  background: rgba(4, 4, 4, 0.95);
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
  flex-wrap: wrap;
}

.map-filter-btn {
  background: transparent;
  border: 1px solid #1c1c1c;
  color: #7a7a7a;
  font-family: 'Oswald', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-filter-btn:hover,
.map-filter-btn.active {
  border-color: #c9a227;
  color: #c9a227;
  background: rgba(201, 162, 39, 0.05);
}

#conspiracy-map {
  flex: 1;
  width: 100%;
  min-height: calc(100vh - 140px);
  background: #020204;
  display: block;
}

/* Node tooltip */
.map-tooltip {
  position: absolute;
  background: rgba(4, 4, 4, 0.97);
  border: 1px solid rgba(201, 162, 39, 0.4);
  padding: 0.6rem 1rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: #d8d8d8;
  pointer-events: none;
  z-index: 9000;
  max-width: 220px;
  line-height: 1.5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.map-tooltip-title {
  color: #c9a227;
  font-weight: 700;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
}

.map-tooltip-cat {
  color: #4a4a4a;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   DECODE ON SCROLL (text scramble)
   ============================================================ */

.decode-on-scroll {
  display: inline-block;
  font-family: 'Share Tech Mono', monospace;
}

/* ============================================================
   SEARCH TRIGGER IN NAV
   ============================================================ */

.search-trigger {
  opacity: 0.6;
  transition: opacity 0.2s ease;
  font-size: 0.85rem !important;
}

.search-trigger:hover {
  opacity: 1;
}

/* ============================================================
   Mobile adjustments
   ============================================================ */

@media (max-width: 640px) {
  .rabbit-hole-widget {
    bottom: 4rem;
    right: 0.8rem;
    left: auto;
    font-size: 0.65rem;
    min-width: 160px;
  }

  .ambient-toggle {
    top: 8px;
    right: 0.75rem;
    bottom: auto;
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .search-modal {
    padding-top: 6vh;
    align-items: flex-start;
  }
}

/* ============================================================
   FEATURE 1 — REDACTED REVEALS
   ============================================================ */

.redacted {
  display: inline;
  background: #111;
  color: transparent;
  border-radius: 2px;
  cursor: default;
  user-select: none;
  transition: background 0.3s ease, color 0.3s ease;
  padding: 0 0.15em;
}

.redacted-revealed {
  background: transparent;
  color: var(--gold-light);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* ============================================================
   FEATURE 2 — ACCESS TICKER
   ============================================================ */

.access-ticker {
  width: 100%;
  background: rgba(4,4,4,0.92);
  border-bottom: 1px solid rgba(204,34,34,0.25);
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 998;
}

.access-ticker-inner {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: ticker-scroll 55s linear infinite;
}

.ticker-item {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--red-bright);
  padding: 0 2.5rem;
  text-transform: uppercase;
}

.ticker-item::before {
  content: '▶';
  margin-right: 0.6rem;
  color: rgba(204,34,34,0.5);
  font-size: 0.55rem;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   FEATURE 3 — LOCKED CHAPTER 13
   ============================================================ */

.chapter-locked {
  position: relative;
  border-color: rgba(204,34,34,0.35) !important;
  background: rgba(8,4,4,0.95) !important;
  cursor: pointer;
}

.chapter-locked:hover {
  border-color: var(--red-bright) !important;
  box-shadow: 0 12px 40px rgba(204,34,34,0.2), 0 0 0 1px rgba(204,34,34,0.3) !important;
}

.locked-body {
  position: relative;
}

.locked-stamp {
  display: inline-block;
  border: 2px solid var(--red-bright);
  color: var(--red-bright);
  font-family: 'Oswald', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  transform: rotate(-4deg);
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  opacity: 0.85;
  box-shadow: 0 0 8px rgba(204,34,34,0.4);
}

.locked-icon {
  filter: grayscale(1) opacity(0.5);
}

.locked-title {
  color: var(--red-bright) !important;
  text-shadow: 0 0 8px rgba(204,34,34,0.5) !important;
}

.locked-desc {
  color: var(--text-secondary);
}

.locked-blur-preview {
  display: grid;
  gap: 0.4rem;
  margin-top: 1rem;
}

.locked-blur-preview span {
  display: block;
  height: 8px;
  border-radius: 2px;
  background: rgba(204,34,34,0.15);
  filter: blur(2px);
}

.locked-blur-preview span:nth-child(1) { width: 90%; }
.locked-blur-preview span:nth-child(2) { width: 75%; }
.locked-blur-preview span:nth-child(3) { width: 85%; }
.locked-blur-preview span:nth-child(4) { width: 60%; }

.locked-cta {
  color: var(--red-bright) !important;
}

/* ============================================================
   FEATURE 4 — CONSTELLATION CANVAS (no extra CSS needed, inline)
   ============================================================ */

/* ============================================================
   FEATURE 5 — CIPHER DECODE (no extra CSS — uses heading styles)
   ============================================================ */

/* ============================================================
   FEATURE 6 — CORKBOARD
   ============================================================ */

.corkboard-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
}

.corkboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 1.5rem;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 40%, rgba(139,20,20,0.08), transparent 45%),
    radial-gradient(ellipse at 75% 60%, rgba(201,162,39,0.06), transparent 40%),
    repeating-linear-gradient(0deg, rgba(201,162,39,0.015) 0px, rgba(201,162,39,0.015) 1px, transparent 1px, transparent 32px),
    repeating-linear-gradient(90deg, rgba(201,162,39,0.015) 0px, rgba(201,162,39,0.015) 1px, transparent 1px, transparent 32px);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.cork-pin {
  position: relative;
}

.cork-pin::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e6c84a, #8b1414);
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  margin: 0 auto 0.5rem;
}

/* Grid positions no longer needed — removed */
.pin-a, .pin-b, .pin-c, .pin-d, .pin-e, .pin-f, .pin-g {}

.cork-photo {
  width: 100%;
  min-height: 120px;
  background: rgba(30,22,10,0.95);
  border: 1px solid var(--border-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  box-shadow: 4px 4px 14px rgba(0,0,0,0.55);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold-light);
  letter-spacing: 0.12em;
  text-align: center;
  transform: rotate(-1deg);
}

.cork-photo:nth-child(even) { transform: rotate(1deg); }

.photo-label {
  margin-top: 0.5rem;
  font-size: 0.65rem;
  color: var(--gold);
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.cork-note {
  width: 100%;
  min-height: 100px;
  padding: 1rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.65;
  box-shadow: 3px 3px 12px rgba(0,0,0,0.4);
  transform: rotate(1deg);
}

.note-red   { background: rgba(139,20,20,0.35); border: 1px solid var(--border-red);  color: var(--text-primary); }
.note-gold  { background: rgba(201,162,39,0.15); border: 1px solid var(--border-gold); color: var(--text-primary); font-style: italic; }
.note-white { background: rgba(30,30,30,0.95);   border: 1px solid var(--border);      color: var(--text-secondary); }

/* Threads hidden in grid mode */
.cork-thread { display: none; }

/* SVG thread overlay */
.cork-threads-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}
.ct {
  stroke-width: 1.5px;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 5 3;
  opacity: 0.7;
}
.ct-red   { stroke: rgba(204, 34, 34, 0.85); }
.ct-gold  { stroke: rgba(201,162, 39, 0.8); }
.ct-white { stroke: rgba(200,190,160, 0.55); }

@media (max-width: 900px) {
  .corkboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .corkboard {
    grid-template-columns: 1fr;
  }
  .cork-photo, .cork-note { transform: none !important; }
}

/* ============================================================
   FEATURE 7 — ARCHIVE PROGRESS BAR
   ============================================================ */

.archive-progress-wrap {
  margin-top: 1.5rem;
}

.ap-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.ap-label em {
  color: var(--gold);
  font-style: normal;
}

.ap-track {
  height: 3px;
  background: rgba(201,162,39,0.1);
  border: 1px solid rgba(201,162,39,0.15);
  border-radius: 2px;
  overflow: hidden;
}

.ap-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red-bright), var(--gold));
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 8px rgba(201,162,39,0.4);
}

/* ============================================================
   FEATURE 8 — NAV EYE BLINK
   ============================================================ */

.eye-blink {
  display: inline-block;
  animation: eye-blink-anim 7s ease-in-out infinite;
}

@keyframes eye-blink-anim {
  0%, 92%, 96%, 100% { transform: scaleY(1); }
  94%                { transform: scaleY(0.05); }
}

/* ============================================================
   ORACLE WIDGET
   ============================================================ */
.oracle-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}
.oracle-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(4,4,4,0.95);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(201,162,39,0.25);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  animation: eye-blink-anim 7s ease-in-out infinite;
}
.oracle-toggle:hover { box-shadow: 0 0 28px rgba(201,162,39,0.5); transform: scale(1.08); }
.oracle-panel {
  display: none;
  flex-direction: column;
  width: 320px;
  background: rgba(4,4,4,0.97);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.oracle-widget.open .oracle-panel { display: flex; }
.oracle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-gold);
  background: rgba(201,162,39,0.06);
}
.oracle-title {
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.oracle-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  line-height: 1;
}
.oracle-close:hover { color: var(--gold); }
.oracle-messages {
  flex: 1;
  max-height: 260px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.oracle-msg {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.65;
  padding: 0.7rem 0.9rem;
  border-radius: 4px;
  max-width: 90%;
}
.oracle-msg-in {
  background: rgba(201,162,39,0.08);
  border: 1px solid var(--border-gold);
  color: var(--text-primary);
  align-self: flex-start;
}
.oracle-msg-out {
  background: rgba(139,20,20,0.15);
  border: 1px solid var(--border-red);
  color: var(--text-secondary);
  align-self: flex-end;
  text-align: right;
}
.oracle-input-row {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
}
.oracle-input {
  flex: 1;
  background: rgba(10,10,10,0.9);
  border: none;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  outline: none;
}
.oracle-input::placeholder { color: var(--text-muted); }
.oracle-send {
  background: rgba(201,162,39,0.1);
  border: none;
  border-left: 1px solid var(--border);
  color: var(--gold);
  padding: 0 1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.oracle-send:hover { background: rgba(201,162,39,0.2); }

/* ============================================================
   COUNTDOWN TIMER
   ============================================================ */
.doc-drop-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.5rem;
  border: 1px solid var(--border-red);
  border-radius: 6px;
  background: rgba(139,20,20,0.08);
  margin-bottom: 1.5rem;
}
.doc-drop-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex: 1;
}
.doc-drop-label strong {
  display: block;
  color: var(--red-bright);
  margin-bottom: 0.2rem;
}
.doc-drop-countdown {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--red-bright);
  text-shadow: 0 0 12px rgba(204,34,34,0.5);
  letter-spacing: 0.08em;
  min-width: 8ch;
  text-align: right;
}

/* ============================================================
   SUBSCRIBER COUNTER
   ============================================================ */
.sub-counter-wrap {
  text-align: center;
  padding: 2rem 1rem;
}
.sub-counter-number {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--gold);
  text-shadow: var(--glow-text-gold);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.sub-counter-label {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ============================================================
   NEWSPAPER CLIPPINGS
   ============================================================ */
.clippings-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.clippings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1.5rem;
  align-items: start;
}
.clipping {
  position: relative;
}
.clipping-rotate-l  { transform: rotate(-1.2deg); }
.clipping-rotate-r  { transform: rotate(1.5deg);  }
.clipping-rotate-l2 { transform: rotate(-0.8deg); }
.clipping-inner {
  position: relative;
  background: #f5f0e0;
  border: 1px solid #d4c89a;
  padding: 1.5rem;
  box-shadow: 3px 4px 16px rgba(0,0,0,0.5);
  overflow: hidden;
}
.clipping-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(0,0,0,0.06) 27px, rgba(0,0,0,0.06) 28px);
  pointer-events: none;
}
.clipping-dateline {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a6a3a;
  border-bottom: 2px solid #9a8a5a;
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
  font-family: 'Georgia', serif;
}
.clipping-headline {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1005;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  text-shadow: none;
  letter-spacing: 0.01em;
}
.clipping-body {
  font-family: 'Georgia', serif;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #2a2010;
  max-width: 100%;
  margin: 0;
  text-shadow: none;
}
.clipping-stamp {
  position: absolute;
  top: 1rem;
  right: -0.5rem;
  background: transparent;
  border: 3px solid rgba(180,20,20,0.75);
  color: rgba(180,20,20,0.75);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  padding: 0.3rem 0.6rem;
  transform: rotate(15deg);
  text-shadow: none;
  box-shadow: 0 0 0 1px rgba(180,20,20,0.3);
}
.clipping-stamp-gold {
  border-color: rgba(130,100,20,0.75);
  color: rgba(130,100,20,0.75);
  box-shadow: 0 0 0 1px rgba(130,100,20,0.3);
}
@media (max-width:900px) {
  .clippings-grid { grid-template-columns: 1fr; }
  .clipping { transform: none !important; }
}

/* ============================================================
   THE PATTERN QUIZ
   ============================================================ */
.quiz-section {
  background: var(--bg-primary);
}
.quiz-shell {
  max-width: 680px;
  margin: 0 auto;
}
.quiz-step, .quiz-result { transition: opacity 0.25s ease; }
.hidden { display: none !important; }
.quiz-q {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem,2.5vw,1.5rem);
  color: var(--gold);
  text-align: center;
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
  text-shadow: var(--glow-text-gold);
}
.quiz-opts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 0.85rem;
}
.quiz-opt {
  background: rgba(10,10,10,0.9);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 1rem 1.2rem;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
  line-height: 1.5;
}
.quiz-opt:hover {
  border-color: var(--border-gold);
  background: rgba(201,162,39,0.08);
  color: var(--gold-light);
}
.quiz-opt.selected {
  border-color: var(--gold);
  background: rgba(201,162,39,0.15);
  color: var(--gold-light);
}
.quiz-result-inner {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(201,162,39,0.07), rgba(139,20,20,0.1));
}
.quiz-result-tier {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-shadow: var(--glow-text-gold);
  margin-bottom: 0.5rem;
}
.quiz-result-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--gold-light);
}
.quiz-result-desc {
  max-width: 48ch;
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
}
.quiz-result-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width:600px) {
  .quiz-opts { grid-template-columns: 1fr; }
}

/* ============================================================
   NAV ACCORDION — Chapters group
   ============================================================ */

.nav-group {
  width: 220px;
  flex-shrink: 0;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  width: 220px;
  padding: 0.65rem 0;
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: none;
  border-left: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.nav-group-toggle:hover,
.nav-group.open .nav-group-toggle {
  color: var(--gold);
  background: rgba(201,162,39,0.05);
  text-shadow: var(--glow-text-gold);
  border-left-color: var(--border-gold);
}

/* Chevron rotation on open */
.nav-group.open .nav-group-toggle .nav-rail-label::after {
  content: ' ▴';
}
.nav-group-toggle .nav-rail-label::after {
  content: ' ▾';
}

.nav-sub {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: rgba(0,0,0,0.25);
}
.nav-group.open .nav-sub {
  max-height: 900px;
}

.nav-sub li {
  width: 220px;
  flex-shrink: 0;
}

.nav-sub a {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.75rem 0.4rem 52px;
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  width: 220px;
}
.nav-sub a:hover,
.nav-sub a.active {
  color: var(--gold);
  border-left-color: var(--border-gold);
  background: rgba(201,162,39,0.04);
}
.nav-sub a.active {
  border-left-color: var(--red-bright);
  color: var(--gold);
}

@media (max-width: 900px) {
  .nav-group,
  .nav-group-toggle,
  .nav-sub li,
  .nav-sub a { width: 270px; }
  .nav-sub a  { padding-left: 52px; }
}
