/* ===== MOBILE-FIRST BENGALI FORENSIC PORTAL ===== */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --gold: #f5c842;
  --gold-dark: #c9960a;
  --gold-light: #fde68a;
  --bg-base: #0d0f14;
  --bg-card: #161a24;
  --bg-nav: #0f1219;
  --bg-sidebar: #12151f;
  --text-primary: #e8eaf0;
  --text-secondary: #9ba3b8;
  --text-muted: #5a6280;
  --border: #232840;
  --border-gold: #f5c84260;
  --red: #e53e3e;
  --red-light: #fc8181;
  --green: #38a169;
  --green-light: #68d391;
  --blue: #3182ce;
  --blue-light: #63b3ed;
  --amber: #d69e2e;
  --font-bn: 'Hind Siliguri', sans-serif;
  --font-en: 'Inter', sans-serif;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-gold: 0 0 20px rgba(245,200,66,0.15);
  --nav-h: 56px;
  --transition: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-bn);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== PASSWORD PAGE ===== */
#password-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}

#password-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(245,200,66,0.05) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(49,130,206,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.pw-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow), 0 0 60px rgba(245,200,66,0.06);
}

.pw-lock {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(245,200,66,0.4));
}

.pw-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.pw-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pw-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pw-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-base);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1.2rem;
  font-family: var(--font-en);
  letter-spacing: 0.2em;
  text-align: center;
  outline: none;
  transition: var(--transition);
  margin-bottom: 16px;
}

.pw-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,200,66,0.15);
}

.pw-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  border-radius: var(--radius);
  color: #0d0f14;
  font-family: var(--font-bn);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.pw-btn:hover, .pw-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,200,66,0.35);
}

.pw-error {
  color: var(--red-light);
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 12px;
  min-height: 20px;
  display: none;
}

.pw-error.visible { display: block; }

.pw-warning {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(229,62,62,0.06);
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.shake { animation: shake 0.4s ease; }

/* ===== MAIN APP ===== */
#app { display: none; min-height: 100vh; }
#app.active { display: block; }

/* ===== TOP NAV (MOBILE FIRST) ===== */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 1000;
  gap: 8px;
}

.nav-brand {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  flex: 1;
}

.nav-brand span {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font-bn);
  font-size: 0.75rem;
  padding: 6px 10px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-btn:hover { border-color: var(--gold); color: var(--gold); }

.hamburger {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  padding: 7px 10px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* Desktop nav links (hidden on mobile) */
.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-bn);
  font-size: 0.8rem;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  background: rgba(245,200,66,0.1);
  color: var(--gold);
}

/* ===== MOBILE MENU OVERLAY ===== */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  display: none;
  flex-direction: column;
  padding: 12px 14px 16px;
  gap: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.mobile-menu.open { display: flex; }

.mob-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-bn);
  font-size: 0.95rem;
  padding: 12px 14px;
  cursor: pointer;
  border-radius: 8px;
  text-align: left;
  transition: var(--transition);
  border: 1px solid transparent;
}

.mob-link:hover, .mob-link.active {
  background: rgba(245,200,66,0.08);
  border-color: var(--border-gold);
  color: var(--gold);
}

.mob-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* ===== PAGE CONTAINER ===== */
.page {
  display: none;
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.page.active { display: block; }

/* ===== HOME PAGE ===== */
.hero {
  padding: 28px 16px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(245,200,66,0.04) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229,62,62,0.15);
  border: 1px solid rgba(229,62,62,0.4);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.72rem;
  color: var(--red-light);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.35;
  margin-bottom: 10px;
}

.hero-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 20px;
}

/* CDR Buttons */
.cdr-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px;
  margin: 20px 0;
}

.cdr-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(245,200,66,0.12), rgba(245,200,66,0.06));
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  font-family: var(--font-bn);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 16px rgba(245,200,66,0.1);
}

.cdr-btn:hover, .cdr-btn:active {
  background: linear-gradient(135deg, rgba(245,200,66,0.22), rgba(245,200,66,0.12));
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(245,200,66,0.3);
}

/* Stats Grid */
.stats-section {
  padding: 20px 16px;
}

.section-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}

.stat-card:hover { border-color: var(--border-gold); }

.stat-icon { font-size: 1.4rem; margin-bottom: 6px; }

.stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-bn);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Questions */
.questions-section { padding: 20px 16px; }

.q-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 12px;
  border-left: 3px solid var(--gold);
}

.q-num {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.q-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.q-body {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.q-result {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.q-result.negative { background: rgba(229,62,62,0.15); color: var(--red-light); border: 1px solid rgba(229,62,62,0.3); }
.q-result.positive { background: rgba(56,161,105,0.15); color: var(--green-light); border: 1px solid rgba(56,161,105,0.3); }
.q-result.strong { background: rgba(245,200,66,0.12); color: var(--gold); border: 1px solid rgba(245,200,66,0.3); }

/* ===== REPORT PAGE ===== */
.report-page { max-width: 100%; }

.report-header {
  background: linear-gradient(135deg, rgba(245,200,66,0.08), rgba(245,200,66,0.03));
  border-bottom: 1px solid var(--border);
  padding: 24px 16px 20px;
}

.report-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
  line-height: 1.4;
}

.report-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.meta-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meta-badge.confidential { background: rgba(229,62,62,0.2); color: var(--red-light); border: 1px solid rgba(229,62,62,0.3); }
.meta-badge.forensic { background: rgba(49,130,206,0.15); color: var(--blue-light); border: 1px solid rgba(49,130,206,0.3); }
.meta-badge.cdr { background: rgba(245,200,66,0.12); color: var(--gold); border: 1px solid rgba(245,200,66,0.3); }

/* Report Sections */
.report-body { padding: 0; }

.r-section {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.r-section:last-child { border-bottom: none; }

.r-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: #0d0f14;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.r-section-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.r-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.4;
  flex: 1;
}

.r-text {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 10px;
}

.r-highlight {
  background: rgba(245,200,66,0.07);
  border: 1px solid var(--border-gold);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 14px;
  margin: 12px 0;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.75;
}

.r-highlight.red {
  background: rgba(229,62,62,0.07);
  border-color: rgba(229,62,62,0.4);
  border-left-color: var(--red);
  color: var(--text-secondary);
}

.r-highlight.green {
  background: rgba(56,161,105,0.07);
  border-color: rgba(56,161,105,0.4);
  border-left-color: var(--green);
}

.r-highlight.blue {
  background: rgba(49,130,206,0.07);
  border-color: rgba(49,130,206,0.4);
  border-left-color: var(--blue);
}

.r-list {
  list-style: none;
  margin: 10px 0;
}

.r-list li {
  padding: 6px 0 6px 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
}

.r-list li::before {
  content: '▸';
  color: var(--gold);
  position: absolute;
  left: 0;
  font-size: 0.75rem;
}

/* Event Table */
.event-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 14px 0;
}

.event-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.event-table th {
  background: rgba(245,200,66,0.1);
  color: var(--gold);
  font-weight: 600;
  padding: 10px 10px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.event-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(35,40,64,0.5);
  color: var(--text-secondary);
  vertical-align: top;
  line-height: 1.5;
}

.event-table tr:last-child td { border-bottom: none; }
.event-table tr:hover td { background: rgba(245,200,66,0.03); }

.strength-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.strength-vstrong { background: rgba(56,161,105,0.2); color: var(--green-light); border: 1px solid rgba(56,161,105,0.4); }
.strength-strong { background: rgba(245,200,66,0.15); color: var(--gold); border: 1px solid rgba(245,200,66,0.3); }
.strength-medium { background: rgba(49,130,206,0.15); color: var(--blue-light); border: 1px solid rgba(49,130,206,0.3); }
.strength-weak { background: rgba(229,62,62,0.12); color: var(--red-light); border: 1px solid rgba(229,62,62,0.3); }
.strength-anchor { background: rgba(245,200,66,0.25); color: var(--gold); border: 2px solid var(--gold); }

.doc-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(49,130,206,0.12);
  border: 1px solid rgba(49,130,206,0.3);
  border-radius: 4px;
  color: var(--blue-light);
  font-size: 0.7rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.doc-link-btn:hover { background: rgba(49,130,206,0.25); }

/* Evidence Matrix */
.matrix-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.matrix-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
}

.matrix-label {
  flex: 1;
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.matrix-val {
  font-size: 0.85rem;
  white-space: nowrap;
}

.matrix-strength {
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 70px;
  text-align: right;
}

/* ===== TIMELINE PAGE ===== */
.tl-page { padding: 0; }

.tl-header-bar {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(245,200,66,0.05), transparent);
}

.tl-page-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}

.tl-page-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.timeline-wrap {
  padding: 20px 16px;
  position: relative;
}

.timeline-wrap::before {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 30px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(245,200,66,0.2));
}

.tl-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
}

.tl-dot-wrap {
  flex-shrink: 0;
  width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bg-base);
  flex-shrink: 0;
  z-index: 1;
}

.tl-dot.anchor { background: var(--gold); box-shadow: 0 0 12px rgba(245,200,66,0.6); width: 16px; height: 16px; }
.tl-dot.vstrong { background: var(--green); box-shadow: 0 0 8px rgba(56,161,105,0.5); }
.tl-dot.strong { background: var(--amber); box-shadow: 0 0 6px rgba(214,158,46,0.4); }
.tl-dot.medium { background: var(--blue); }
.tl-dot.weak { background: var(--red); }

.tl-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: var(--transition);
  cursor: pointer;
}

.tl-card:hover { border-color: var(--border-gold); }
.tl-card.anchor-card { border-color: rgba(245,200,66,0.4); background: rgba(245,200,66,0.04); }

.tl-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tl-date {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tl-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.tl-badge.anchor { background: rgba(245,200,66,0.2); color: var(--gold); border: 1px solid var(--gold); }
.tl-badge.vstrong { background: rgba(56,161,105,0.15); color: var(--green-light); border: 1px solid rgba(56,161,105,0.4); }
.tl-badge.strong { background: rgba(245,200,66,0.12); color: var(--gold); border: 1px solid rgba(245,200,66,0.3); }
.tl-badge.medium { background: rgba(49,130,206,0.12); color: var(--blue-light); border: 1px solid rgba(49,130,206,0.3); }
.tl-badge.weak { background: rgba(229,62,62,0.1); color: var(--red-light); border: 1px solid rgba(229,62,62,0.3); }

.tl-location {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 5px;
}

.tl-body {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.tl-tech {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-en);
  margin-bottom: 8px;
}

.tl-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ===== COMMUNICATION PAGE ===== */
.comm-page { padding: 0; }

.network-section {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.network-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 14px;
}

.network-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.net-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.net-node {
  background: rgba(245,200,66,0.1);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 10px 16px;
  text-align: center;
  min-width: 100px;
}

.net-node.primary { border-color: var(--red); background: rgba(229,62,62,0.1); }
.net-node.broker { border-color: var(--gold); background: rgba(245,200,66,0.15); box-shadow: 0 0 16px rgba(245,200,66,0.2); }

.net-node-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.net-node-num {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-en);
  letter-spacing: 0.04em;
}

.net-arrow {
  font-size: 1.2rem;
  color: var(--gold);
  flex-shrink: 0;
}

.net-stats {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2px;
}

/* Charts */
.charts-section {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.chart-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.chart-container {
  height: 200px;
  position: relative;
}

/* Intermediary Table */
.inter-section {
  padding: 20px 16px;
}

.inter-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.inter-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.inter-table th {
  background: rgba(245,200,66,0.1);
  color: var(--gold);
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.inter-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(35,40,64,0.5);
  color: var(--text-secondary);
  font-family: var(--font-en);
}

.inter-table tr:last-child td { border-bottom: none; }
.inter-table .primary-row td { color: var(--gold); font-weight: 600; background: rgba(245,200,66,0.04); }

/* ===== DOCUMENTS PAGE ===== */
.docs-page { padding: 0; }

.docs-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.docs-page-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}

.docs-page-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.docs-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
  cursor: pointer;
}

.doc-card:hover { border-color: var(--border-gold); transform: translateY(-1px); }

.doc-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.doc-num {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-en);
  font-weight: 600;
}

.doc-badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.doc-badge.timeline { background: rgba(49,130,206,0.15); color: var(--blue-light); border: 1px solid rgba(49,130,206,0.3); }
.doc-badge.key { background: rgba(245,200,66,0.15); color: var(--gold); border: 1px solid rgba(245,200,66,0.3); }
.doc-badge.critical { background: rgba(229,62,62,0.15); color: var(--red-light); border: 1px solid rgba(229,62,62,0.3); }
.doc-badge.anchor { background: rgba(245,200,66,0.25); color: var(--gold); border: 2px solid var(--gold); }
.doc-badge.analysis { background: rgba(56,161,105,0.15); color: var(--green-light); border: 1px solid rgba(56,161,105,0.3); }
.doc-badge.court { background: rgba(214,158,46,0.15); color: var(--amber); border: 1px solid rgba(214,158,46,0.4); }

.doc-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.doc-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.doc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  border-radius: 6px;
  color: #0d0f14;
  font-family: var(--font-bn);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.doc-open-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,200,66,0.3); }

.doc-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: rgba(49,130,206,0.12);
  border: 1px solid rgba(49,130,206,0.3);
  border-radius: 6px;
  color: var(--blue-light);
  font-family: var(--font-bn);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.doc-view-btn:hover { background: rgba(49,130,206,0.22); }

/* ===== DISCLAIMER PAGE ===== */
.disclaimer-page { padding: 20px 16px; max-width: 720px; margin: 0 auto; }

.disclaimer-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
}

.disclaimer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}

.disclaimer-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.disclaimer-card p, .disclaimer-card li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.disclaimer-card ul { list-style: none; }
.disclaimer-card ul li { padding-left: 16px; position: relative; margin-bottom: 4px; }
.disclaimer-card ul li::before { content: '•'; color: var(--gold); position: absolute; left: 0; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  padding: 20px 16px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.site-footer strong { color: var(--text-secondary); }

/* ===== PRINT BTN ===== */
.print-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font-bn);
  font-size: 0.75rem;
  padding: 6px 10px;
  cursor: pointer;
  transition: var(--transition);
}

.print-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: var(--gold);
  color: #0d0f14;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
  box-shadow: 0 4px 14px rgba(245,200,66,0.4);
  transition: var(--transition);
}

.scroll-top.visible { display: flex; }
.scroll-top:hover { transform: scale(1.1); }

/* ===== TABLET (≥ 640px) ===== */
@media (min-width: 640px) {
  .nav-brand span { display: inline; }

  .cdr-btns { flex-direction: row; }

  .stats-grid { grid-template-columns: repeat(4, 1fr); }

  .docs-grid { grid-template-columns: 1fr 1fr; }

  .timeline-wrap::before { left: 36px; }
}

/* ===== DESKTOP (≥ 900px) ===== */
@media (min-width: 900px) {
  .hamburger { display: none; }
  .mobile-menu { display: none !important; }
  .nav-links { display: flex; }

  .nav-brand { flex: none; }

  .top-nav { padding: 0 24px; gap: 16px; }

  .hero { padding: 48px 40px 36px; }
  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: 0.95rem; }

  .cdr-btns { padding: 0 40px; }

  .stats-section,
  .questions-section { padding: 28px 40px; }

  .docs-grid {
    padding: 20px 40px;
    grid-template-columns: repeat(3, 1fr);
  }

  .r-section { padding: 28px 40px; }

  .timeline-wrap { padding: 28px 40px; }
  .timeline-wrap::before { left: 54px; }
  .tl-dot-wrap { width: 36px; }

  .report-header { padding: 32px 40px 28px; }
  .report-title { font-size: 1.5rem; }

  .network-section { padding: 28px 40px; }
  .network-diagram { flex-direction: row; padding: 28px 24px; }
  .charts-section { padding: 28px 40px; }

  .chart-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .inter-section { padding: 28px 40px; }

  .disclaimer-page { padding: 32px 40px; }

  .tl-header-bar,
  .docs-header { padding: 28px 40px; }
}

/* ===== LARGE DESKTOP (≥ 1200px) ===== */
@media (min-width: 1200px) {
  .docs-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== PRINT ===== */
@media print {
  #password-page, .top-nav, .mobile-menu, .scroll-top, .nav-actions { display: none !important; }
  #app { display: block !important; }
  .page { display: block !important; padding-top: 0 !important; }
  body { background: white; color: black; }
  .r-text, .tl-body, .doc-desc { color: #333; }
  .r-section, .tl-card, .doc-card { break-inside: avoid; }
}

/* ===== UTILITY ===== */
.hidden { display: none !important; }
.text-gold { color: var(--gold); }
.text-red { color: var(--red-light); }
.text-green { color: var(--green-light); }
.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.gap-8 { gap: 8px; }

/* Smooth loading */
.page-enter {
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
