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

body {
  background: #0a0a12;
  color: #c8c8d8;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

a {
  color: #88aaff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.header {
  text-align: center;
  padding: 60px 20px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header h1 {
  font-size: 38px;
  font-weight: 200;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 8px;
}

.header .subtitle {
  color: #667;
  font-size: 15px;
  letter-spacing: 2px;
  max-width: 600px;
  margin: 0 auto;
}

.header .back-link {
  margin-top: 16px;
  font-size: 13px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* Update entry */
.update-entry {
  position: relative;
  padding: 28px 0 28px 28px;
  border-left: 2px solid rgba(255, 255, 255, 0.06);
  margin-left: 12px;
}

.update-entry:last-child {
  border-left-color: transparent;
}

.update-entry::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 34px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dot-color, #556);
  border: 2px solid #0a0a12;
}

.update-date {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #556;
  margin-bottom: 8px;
}

.update-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 700;
}

.badge-feature {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-improvement {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-fix {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-ui {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.update-body {
  color: #889;
  font-size: 14px;
}

.update-body ul {
  list-style: none;
  padding: 0;
}

.update-body li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.update-body li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #445;
}

.update-body li strong {
  color: #bbc;
}

.update-body p {
  margin-bottom: 8px;
}

/* ─── Audit metadata (v10.3+) ─── */
.update-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: #445;
  margin-bottom: 14px;
  flex-wrap: wrap;
  font-family: 'Consolas', 'Courier New', monospace;
}

.update-meta .meta-time {
  color: #556;
}

.update-meta .meta-commit a {
  color: #6366f1;
  text-decoration: none;
  padding: 1px 6px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 3px;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.update-meta .meta-commit a:hover {
  background: rgba(99, 102, 241, 0.2);
}

.update-meta .meta-live a {
  color: #22c55e;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.entry-reason {
  background: rgba(99, 102, 241, 0.04);
  border-left: 2px solid #444466;
  padding: 8px 14px;
  margin: 10px 0 12px;
  font-size: 12px;
  color: #778;
  line-height: 1.6;
}

.entry-reason strong {
  color: #aab;
}

.entry-links {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
}

.entry-links a {
  color: #8888cc;
  text-decoration: none;
}

.entry-links a:hover {
  color: #aaaaff;
  text-decoration: underline;
}

.entry-links .link-live {
  color: #22c55e;
  font-weight: 600;
}

.entry-links .link-commit {
  font-family: monospace;
  font-size: 11px;
  color: #6366f1;
}

.entry-links .link-audit {
  color: #8888aa;
}

.update-body code {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 12px;
  color: #aab;
}

.app-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #778;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.section-year {
  font-size: 14px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #334;
  margin: 40px 0 10px 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: #334;
  font-size: 12px;
  letter-spacing: 2px;
}

.footer a {
  color: #556;
}

/* ─── Filter Bar ─── */
.filter-bar {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.filter-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #445;
  min-width: 50px;
}

.filter-pill {
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #778;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.filter-pill:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #aab;
}

.filter-pill.active {
  background: rgba(136, 170, 255, 0.12);
  border-color: rgba(136, 170, 255, 0.3);
  color: #88aaff;
}

.filter-count {
  font-size: 11px;
  color: #445;
  margin-left: 4px;
  padding: 0 4px;
}

.quick-links {
  max-width: 800px;
  margin: 10px auto 0;
  padding: 0 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-links a {
  font-size: 12px;
  color: #9eb6ff;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(110, 150, 255, 0.35);
  border-radius: 14px;
  background: rgba(35, 45, 85, 0.4);
}

.quick-links a:hover {
  color: #c8d7ff;
  border-color: rgba(140, 180, 255, 0.6);
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #445;
  font-size: 14px;
  display: none;
}

/* Responsive */
@media (max-width: 600px) {
  .header h1 {
    font-size: 26px;
    letter-spacing: 4px;
  }

  .update-title {
    font-size: 17px;
  }

  .container {
    padding: 24px 16px 60px;
  }

  .filter-bar {
    padding: 16px 16px 0;
  }

  .filter-pill {
    font-size: 11px;
    padding: 3px 10px;
  }
}

/* Side Panel — Dashboard Drawer */
.dash-trigger {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  background: linear-gradient(180deg, #a855f7, #6c5ce7);
  color: #fff;
  border: none;
  padding: 18px 10px;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  z-index: 1001;
  box-shadow: -2px 0 12px rgba(168, 85, 247, 0.3);
  transition: background 0.2s, padding 0.2s;
}

.dash-trigger:hover {
  background: linear-gradient(180deg, #c084fc, #818cf8);
  padding: 20px 12px;
}

.dash-trigger.open {
  right: 420px;
}

.dash-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1002;
}

.dash-overlay.open {
  display: block;
}

.dash-panel {
  position: fixed;
  top: 0;
  right: -440px;
  width: 420px;
  height: 100vh;
  background: #0e0e1a;
  border-left: 1px solid rgba(168, 85, 247, 0.3);
  z-index: 1003;
  overflow-y: auto;
  transition: right 0.3s ease;
  padding: 24px 20px;
}

.dash-panel.open {
  right: 0;
}

.dash-panel h3 {
  color: #a855f7;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.dash-panel .dash-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.dash-card:hover {
  border-color: rgba(168, 85, 247, 0.4);
}

.dash-card h4 {
  font-size: 14px;
  margin-bottom: 6px;
}

.dash-card p {
  font-size: 12px;
  color: #889;
  margin-bottom: 10px;
  line-height: 1.5;
}

.dash-card a.dash-btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.dash-card a.dash-btn:hover {
  opacity: 0.85;
}

.dash-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #667;
  font-size: 22px;
  cursor: pointer;
}

.dash-close:hover {
  color: #fff;
}

@media (max-width: 600px) {
  .dash-panel {
    width: 100vw;
    right: -100vw;
  }

  .dash-trigger.open {
    right: calc(100vw);
  }
}

/* Investigation Summary Styles */
.investigation-summary { margin: 24px 0; padding: 20px; background: rgba(15, 17, 26, 0.6); border-radius: 8px; }
.investigation-summary h3 { margin: 0 0 16px; color: #fff; font-size: 1.5rem; }
.investigation-summary h4 { margin: 16px 0 8px; color: #ddd; font-size: 1.2rem; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0; }
.summary-item { background: rgba(255, 255, 255, 0.05); padding: 12px; border-radius: 6px; border-left: 3px solid #22c55e; }
.summary-item .label { font-size: 0.9rem; color: #9ca3af; display: block; }
.summary-item .value { font-size: 1.1rem; color: #fff; font-weight: 500; }
.summary-item .metric { font-size: 1rem; color: #22c55e; }
.methodology-comparison { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 16px 0; }
.methodology-item { background: rgba(255, 255, 255, 0.05); padding: 12px; border-radius: 6px; border-left: 3px solid #f59e0b; }
.methodology-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.methodology-name { font-weight: 500; color: #fff; }
.methodology-pnl { font-weight: 600; color: #22c55e; }
.methodology-details { font-size: 0.9rem; color: #9ca3af; display: flex; gap: 12px; }
.methodology-details span { display: flex; align-items: center; gap: 4px; }
.audit-stats { display: flex; gap: 16px; font-size: 0.9rem; color: #9ca3af; margin-top: 12px; }
.investigation-summary ul { margin: 16px 0; padding-left: 20px; }
.investigation-summary li { color: #c8c8d8; margin: 8px 0; }