:root {
  --bg-canvas: #160f2e;
  --bg-surface: #231845;
  --bg-surface-hover: #2d1f56;
  --text-primary: #ffffff;
  --text-muted: #b8a9cf;
  --accent-primary: #e0409b;
  --accent-hover: #ff52b4;
  --accent-secondary: #f43f5e;
  --border-magenta: 1px solid #e0409b;
  --border-subtle: 1px solid rgba(224, 64, 155, 0.35);
  --font-mono: Consolas, "Liberation Mono", Menlo, Courier, ui-monospace, monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  border-left: 2px double rgba(224, 64, 155, 0.5);
  border-right: 2px double rgba(224, 64, 155, 0.5);
  margin: 0 auto;
  overflow-wrap: anywhere;
  hyphens: auto;
}

h1, h2, h3, h4, .mono-code, .stat-badge, .nav-link, .timestamp {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.8rem, 3.8vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  color: #fff;
  border-left: 3px solid var(--accent-primary);
  padding-left: 0.75rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: #e5def0;
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease-kinetic);
}

a:hover, a:focus {
  color: var(--accent-hover);
}

/* SITE HEADER */
.site-header {
  position: static;
  background-color: #120b26;
  border-bottom: var(--border-magenta);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-wrapper {
  text-align: left;
}

.brand-title {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-title span {
  color: var(--accent-primary);
}

.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-desktop {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-desktop a {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.nav-desktop a:hover, .nav-desktop a.active {
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  background-color: rgba(224, 64, 155, 0.08);
}

.nav-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  font-size: 1.4rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  line-height: 1;
}

.mobile-nav-drawer {
  display: none;
  background-color: #1c133a;
  border-bottom: 2px solid var(--accent-primary);
  padding: 1rem;
}

.mobile-nav-drawer.open {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-drawer a {
  color: #fff;
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  text-decoration: none;
  border-bottom: 1px solid rgba(224, 64, 155, 0.2);
}

/* RIBBON & STATUS BAR */
.status-ribbon {
  background-color: #0e091f;
  border-bottom: 1px solid rgba(224, 64, 155, 0.3);
  padding: 0.4rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.status-ribbon strong {
  color: var(--accent-primary);
}

/* LAYOUT CONTAINER */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.reading-width {
  max-width: 72ch;
  margin: 0 auto;
}

/* HERO */
.hero-splash {
  background: linear-gradient(180deg, rgba(35, 24, 69, 0.9) 0%, rgba(22, 15, 46, 1) 100%);
  border: var(--border-magenta);
  padding: 2.5rem 2rem;
  margin-bottom: 2.5rem;
}

.hero-meta {
  font-family: var(--font-mono);
  color: var(--accent-primary);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.hero-lead {
  font-size: 1.15rem;
  max-width: 70ch;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.btn-primary {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border: 1px solid #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
}

/* PANELS & CARDS */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.panel-card {
  background-color: var(--bg-surface);
  border: var(--border-magenta);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.panel-card:hover {
  background-color: var(--bg-surface-hover);
}

.panel-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.panel-title {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.thread-row {
  background-color: var(--bg-surface);
  border: var(--border-subtle);
  border-left: 3px solid var(--accent-primary);
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1rem;
  align-items: center;
}

.thread-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-primary);
}

.thread-link {
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
}

.thread-link:hover {
  text-decoration: underline;
  color: var(--accent-primary);
}

/* TABLES */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: var(--border-magenta);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
  background-color: var(--bg-surface);
}

th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(224, 64, 155, 0.25);
}

th {
  background-color: #1a1236;
  font-family: var(--font-mono);
  color: var(--accent-primary);
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* ACCORDIONS / DEBATE DRAWERS */
.debate-drawer {
  border: var(--border-subtle);
  margin-bottom: 0.75rem;
  background-color: var(--bg-surface);
}

.debate-header {
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background-color: rgba(224, 64, 155, 0.05);
}

.debate-header:hover {
  background-color: rgba(224, 64, 155, 0.15);
}

.debate-icon {
  color: var(--accent-primary);
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.debate-body {
  display: none;
  padding: 1.2rem;
  border-top: 1px solid rgba(224, 64, 155, 0.2);
  background-color: #1f143d;
}

.debate-drawer.active .debate-body {
  display: block;
}

.debate-drawer.active .debate-icon {
  transform: rotate(45deg);
}

/* FORM STYLING */
.dispatch-form {
  background-color: var(--bg-surface);
  border: var(--border-magenta);
  padding: 1.5rem;
  margin-top: 1rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.75rem;
  background-color: #120b26;
  border: 1px solid rgba(224, 64, 155, 0.5);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: 2px solid var(--accent-primary);
  background-color: #180f33;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.feedback-msg {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--accent-primary);
  background-color: rgba(224, 64, 155, 0.1);
  display: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* IMAGES */
.media-frame {
  border: var(--border-magenta);
  margin: 1.5rem 0;
  overflow: hidden;
  background-color: #0b0718;
}

.media-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: contrast(105%) brightness(95%);
}

.media-caption {
  padding: 0.4rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: var(--border-subtle);
  background-color: #180f33;
}

/* FOOTER */
.site-footer {
  background-color: #0c071b;
  border-top: var(--border-magenta);
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-brand span {
  color: var(--accent-primary);
}

.footer-col h4 {
  font-family: var(--font-mono);
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.4rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(224, 64, 155, 0.2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .nav-toggle-btn {
    display: block;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .thread-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .site-header {
    padding: 0.85rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
