:root {
  --bg: #0c0f14;
  --bg-soft: rgba(20, 27, 35, 0.88);
  --panel: rgba(11, 16, 23, 0.82);
  --panel-strong: rgba(15, 20, 29, 0.96);
  --line: rgba(145, 255, 212, 0.18);
  --text: #eef3f7;
  --muted: #9ca8b5;
  --teal: #68f5d8;
  --acid: #d3ff64;
  --ember: #ff8f4a;
  --magenta: #ff5ea8;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Barlow", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(104, 245, 216, 0.08), transparent 18%),
    radial-gradient(circle at 82% 18%, rgba(255, 94, 168, 0.08), transparent 16%),
    radial-gradient(circle at 50% 120%, rgba(255, 143, 74, 0.08), transparent 24%),
    linear-gradient(180deg, #02050a 0%, #070b12 20%, #0a1018 55%, #03060b 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.22;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.04), transparent 35%),
    linear-gradient(180deg, rgba(5, 8, 14, 0) 0%, rgba(5, 8, 14, 0.14) 100%);
  mix-blend-mode: screen;
  opacity: 0.18;
  pointer-events: none;
}

.background-scene,
.background-grid,
.background-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.background-scene {
  overflow: hidden;
  z-index: -3;
}

.background-scene > div,
.background-orbits,
.background-stars-dynamic,
.background-scrapfield {
  position: absolute;
  inset: -12%;
}

.background-nebula {
  filter: blur(30px);
  opacity: 0.3;
  mix-blend-mode: screen;
}

.nebula-a {
  background:
    radial-gradient(circle at 16% 18%, rgba(80, 255, 220, 0.18), transparent 22%),
    radial-gradient(circle at 62% 14%, rgba(115, 206, 255, 0.16), transparent 16%),
    radial-gradient(circle at 38% 54%, rgba(22, 88, 130, 0.24), transparent 24%);
}

.nebula-b {
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 94, 168, 0.13), transparent 18%),
    radial-gradient(circle at 82% 64%, rgba(255, 143, 74, 0.13), transparent 20%),
    radial-gradient(circle at 56% 78%, rgba(145, 255, 212, 0.08), transparent 18%);
  opacity: 0.28;
}

.nebula-c {
  background:
    radial-gradient(circle at 52% 42%, rgba(211, 255, 100, 0.06), transparent 16%),
    radial-gradient(circle at 18% 78%, rgba(255, 143, 74, 0.1), transparent 20%),
    radial-gradient(circle at 72% 88%, rgba(255, 255, 255, 0.05), transparent 12%);
  opacity: 0.24;
}

.background-starfield {
  opacity: 0.38;
  background-repeat: repeat;
}

.stars-far {
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.85) 0 0.8px, transparent 1.4px),
    radial-gradient(circle at 72% 34%, rgba(104, 245, 216, 0.75) 0 1px, transparent 1.8px),
    radial-gradient(circle at 42% 74%, rgba(255, 255, 255, 0.75) 0 0.8px, transparent 1.6px),
    radial-gradient(circle at 88% 82%, rgba(255, 143, 74, 0.62) 0 1px, transparent 1.8px);
  background-size: 420px 420px, 520px 520px, 610px 610px, 690px 690px;
}

.stars-mid {
  background-image:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.95) 0 1.2px, transparent 2px),
    radial-gradient(circle at 58% 46%, rgba(104, 245, 216, 0.85) 0 1.2px, transparent 2.1px),
    radial-gradient(circle at 84% 22%, rgba(255, 94, 168, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 34% 80%, rgba(255, 243, 191, 0.72) 0 1.1px, transparent 2px);
  background-size: 320px 320px, 420px 420px, 470px 470px, 560px 560px;
  opacity: 0.22;
}

.background-drift {
  background:
    radial-gradient(circle at 24% 32%, rgba(255, 255, 255, 0.025), transparent 10%),
    radial-gradient(circle at 74% 18%, rgba(104, 245, 216, 0.04), transparent 12%),
    radial-gradient(circle at 68% 78%, rgba(255, 143, 74, 0.035), transparent 10%);
  filter: blur(18px);
  opacity: 0.42;
}

.orbit-ring {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-right-color: transparent;
  border-bottom-color: transparent;
  filter: blur(0.2px);
  opacity: 0.18;
}

.orbit-ring-a {
  top: 8%;
  right: -8%;
  width: 36rem;
  height: 36rem;
  border-color: rgba(104, 245, 216, 0.14);
}

.orbit-ring-b {
  top: 48%;
  left: -10%;
  width: 30rem;
  height: 30rem;
  border-color: rgba(255, 143, 74, 0.12);
}

.orbit-ring-c {
  top: 58%;
  right: 12%;
  width: 18rem;
  height: 18rem;
  border-color: rgba(255, 255, 255, 0.09);
  opacity: 0.12;
}

.background-grid {
  background-image:
    linear-gradient(rgba(104, 245, 216, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 245, 216, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0, transparent 32%);
  background-size: 96px 96px, 96px 96px, 100% 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 82%);
  opacity: 0.18;
  z-index: -2;
}

.background-glow {
  filter: blur(110px);
  opacity: 0.24;
  z-index: -1;
}

.glow-left {
  background: radial-gradient(circle at 18% 18%, rgba(211, 255, 100, 0.12), transparent 26%);
}

.glow-right {
  background: radial-gradient(circle at 86% 22%, rgba(255, 143, 74, 0.14), transparent 24%);
}

.background-stars-dynamic .star {
  position: absolute;
  width: var(--size);
  height: var(--size);
  left: var(--x);
  top: var(--y);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0.18) 55%, transparent 100%);
  opacity: calc(var(--alpha) * 0.82);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.15);
  animation: twinkleSoft var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
  will-change: opacity;
}

.background-stars-dynamic .star.teal {
  background:
    radial-gradient(circle, rgba(104, 245, 216, 0.9) 0, rgba(104, 245, 216, 0.14) 55%, transparent 100%);
  box-shadow: 0 0 16px rgba(104, 245, 216, 0.16);
}

.background-stars-dynamic .star.ember {
  background:
    radial-gradient(circle, rgba(255, 143, 74, 0.88) 0, rgba(255, 143, 74, 0.15) 55%, transparent 100%);
  box-shadow: 0 0 16px rgba(255, 143, 74, 0.15);
}

.background-scrapfield {
  filter: blur(0.2px);
}

.scrap-bit {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  opacity: var(--alpha);
  transform: rotate(var(--rotate));
}

.scrap-bit::before,
.scrap-bit::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.05);
  clip-path: polygon(0 46%, 14% 28%, 42% 30%, 58% 0, 100% 18%, 82% 60%, 58% 100%, 20% 80%);
}

.scrap-bit::after {
  inset: 18% 20%;
  border-color: rgba(104, 245, 216, 0.08);
  background: linear-gradient(135deg, rgba(104, 245, 216, 0.08), rgba(255, 143, 74, 0.03));
  clip-path: polygon(0 50%, 18% 6%, 100% 0, 78% 70%, 24% 100%);
}

.scrap-bit.cinematic {
  opacity: calc(var(--alpha) + 0.04);
}

.scrap-bit.cinematic::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 143, 74, 0.02)),
    radial-gradient(circle at 20% 40%, rgba(104, 245, 216, 0.05), transparent 45%);
}

.scrap-bit.cinematic::after {
  inset: 14% 16%;
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: 4.5rem 0 3rem;
  align-items: center;
}

.eyebrow,
.dashboard-label,
.panel-label,
.profile-badge,
.timeline-handle {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--teal);
}

h1,
h2,
h3 {
  font-family: "Audiowide", sans-serif;
  margin: 0;
}

h1 {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: 0.95;
  margin-top: 0.6rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.lede,
.profile-card p,
.dashboard-card p,
.timeline-card p,
.newsletter-card p,
.roadmap-card p,
.intel-card p,
.character-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 1.4rem;
  color: var(--muted);
}

.hero-meta p {
  margin: 0.2rem 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  text-decoration: none;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #081015;
  background: linear-gradient(135deg, var(--teal), var(--acid));
  box-shadow: 0 14px 28px rgba(104, 245, 216, 0.22);
}

.button-secondary {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.button-chat {
  border: 1px solid rgba(255, 143, 74, 0.3);
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 143, 74, 0.2), rgba(255, 94, 168, 0.18));
  box-shadow: 0 14px 28px rgba(255, 94, 168, 0.12);
}

.hero-card,
.dashboard-card,
.profile-card,
.timeline-card,
.intel-card,
.newsletter-card,
.roadmap-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%), var(--panel);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 1.2rem;
}

.status-strip,
.signal-footer,
.profile-topline,
.timeline-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-strip,
.signal-footer {
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-characters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.character-panel {
  min-height: 220px;
  border-radius: 18px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.character-panel::before {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  opacity: 0.18;
}

.character-panel.socket {
  background: linear-gradient(180deg, rgba(255, 143, 74, 0.18), rgba(10, 16, 24, 0.85));
}

.character-panel.socket::before {
  background: var(--ember);
}

.character-panel.bolts {
  background: linear-gradient(180deg, rgba(255, 94, 168, 0.18), rgba(10, 16, 24, 0.85));
}

.character-panel.bolts::before {
  background: var(--magenta);
}

.dashboard,
.profiles,
.split-panel,
.roadmap,
.archive-layout {
  display: grid;
  gap: 1rem;
}

.dashboard {
  grid-template-columns: repeat(3, 1fr);
  margin: 1rem 0 3.5rem;
}

.dashboard-card,
.profile-card,
.intel-card,
.newsletter-card,
.roadmap-card {
  padding: 1.35rem;
}

.profile-card {
  overflow: hidden;
}

.section-heading {
  margin: 3.5rem 0 1.25rem;
}

.profiles {
  grid-template-columns: repeat(2, 1fr);
}

.trait-list,
.dispatch-list {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--text);
}

.trait-list li,
.dispatch-list li {
  margin-bottom: 0.55rem;
}

.profile-portrait {
  position: relative;
  width: min(100%, 340px);
  margin: 0 auto 1.1rem;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 50%),
    linear-gradient(180deg, rgba(8, 15, 24, 0.2), rgba(8, 15, 24, 0.82));
}

.profile-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 32%, rgba(6, 10, 18, 0.68) 100%);
  pointer-events: none;
}

.profile-portrait.socket {
  background-color: rgba(255, 143, 74, 0.12);
}

.profile-portrait.bolts {
  background-color: rgba(255, 94, 168, 0.12);
}

.profile-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 24%;
}

.controls {
  margin-bottom: 1rem;
}

.filter-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.8rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 180ms ease;
}

.filter.active,
.filter:hover {
  border-color: rgba(104, 245, 216, 0.45);
  color: #091015;
  background: linear-gradient(135deg, var(--teal), rgba(211, 255, 100, 0.8));
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.timeline-card {
  padding: 1.2rem;
  position: relative;
  overflow: hidden;
}

.timeline-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
}

.timeline-card.socket::after {
  background: var(--ember);
}

.timeline-card.bolts::after {
  background: var(--magenta);
}

.timeline-card.joint::after {
  background: linear-gradient(180deg, var(--teal), var(--acid));
}

.timeline-card.report::after {
  background: #7fa7ff;
}

.timeline-author {
  margin: 0;
  font-weight: 700;
}

.timeline-time {
  color: var(--muted);
  font-size: 0.9rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-row span {
  font-size: 0.85rem;
  color: var(--teal);
  background: rgba(104, 245, 216, 0.08);
  border: 1px solid rgba(104, 245, 216, 0.14);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}

.split-panel {
  grid-template-columns: 1.05fr 0.95fr;
  margin-top: 2rem;
}

.chat-shell {
  display: grid;
  grid-template-columns: 0.42fr 0.58fr;
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}

.chat-intro,
.chat-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%), var(--panel);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.chat-intro {
  padding: 1.35rem;
  align-self: start;
}

.chat-notes {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.chat-notes span,
.chat-status {
  color: var(--muted);
}

.chat-notes span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-panel {
  padding: 1rem;
}

.chat-header,
.chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chat-close {
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

.chat-log {
  display: grid;
  gap: 0.9rem;
  min-height: 320px;
  max-height: 520px;
  overflow-y: auto;
  margin: 1rem 0;
  padding-right: 0.2rem;
}

.chat-bubble {
  max-width: 90%;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.chat-bubble h4 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.chat-bubble p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}

.chat-bubble.user {
  justify-self: end;
  background: rgba(104, 245, 216, 0.09);
  border-color: rgba(104, 245, 216, 0.18);
}

.chat-bubble.socket {
  background: rgba(255, 143, 74, 0.1);
  border-color: rgba(255, 143, 74, 0.2);
}

.chat-bubble.bolts {
  background: rgba(255, 94, 168, 0.1);
  border-color: rgba(255, 94, 168, 0.2);
}

.chat-bubble.system {
  max-width: 100%;
  background: rgba(127, 167, 255, 0.08);
  border-color: rgba(127, 167, 255, 0.18);
}

.chat-form {
  display: grid;
  gap: 0.8rem;
}

.chat-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--teal);
}

.chat-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 88px;
  border-radius: 18px;
  padding: 1rem;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
}

.chat-form input,
.chat-form select {
  width: 100%;
  border-radius: 18px;
  padding: 1rem;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
}

.logbook-shell {
  padding: 3rem 0 4rem;
}

.logbook-title {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
}

.logbook-auth {
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%), var(--panel);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

.logbook-auth-row {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.logbook-auth input {
  flex: 1 1 280px;
  border-radius: 18px;
  padding: 1rem;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
}

.logbook-layout {
  display: grid;
  grid-template-columns: 0.42fr 0.58fr;
  gap: 1rem;
}

.logbook-transcript {
  min-height: 360px;
}

.archive-layout {
  grid-template-columns: 0.78fr 1.22fr;
  align-items: start;
  margin-top: 1.5rem;
}

.archive-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%), var(--panel);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

.archive-sidebar .archive-panel {
  display: flex;
  flex-direction: column;
  max-height: min(78vh, 50rem);
  overflow: hidden;
}

.archive-detail .archive-panel {
  max-height: min(78vh, 50rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(104, 245, 216, 0.42) rgba(255, 255, 255, 0.04);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.archive-toolbar {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.archive-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--teal);
}

.archive-select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.9rem 1rem;
}

.archive-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 0.75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.35rem;
  scrollbar-color: rgba(104, 245, 216, 0.42) rgba(255, 255, 255, 0.04);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.archive-list::-webkit-scrollbar,
.archive-detail .archive-panel::-webkit-scrollbar {
  width: 8px;
}

.archive-list::-webkit-scrollbar-track,
.archive-detail .archive-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.archive-list::-webkit-scrollbar-thumb,
.archive-detail .archive-panel::-webkit-scrollbar-thumb {
  background: rgba(104, 245, 216, 0.34);
  border-radius: 999px;
}

.archive-list::-webkit-scrollbar-thumb:hover,
.archive-detail .archive-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(104, 245, 216, 0.52);
}

.archive-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 18px;
  padding: 1rem;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.archive-item:hover,
.archive-item.active {
  transform: translateY(-1px);
  border-color: rgba(104, 245, 216, 0.36);
  background: rgba(104, 245, 216, 0.06);
}

.archive-item p,
.archive-summary,
.archive-meta,
.archive-newsletter-copy {
  color: var(--muted);
  line-height: 1.6;
}

.archive-item h3,
.archive-newsletter-title {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.archive-meta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.archive-summary {
  margin-bottom: 1rem;
}

.archive-newsletter-title {
  margin-top: 1rem;
}

.archive-feed {
  margin-top: 1.5rem;
}

.archive-feed-header {
  margin-bottom: 1rem;
}

.archive-feed-header h3 {
  font-size: 1.15rem;
}

.archive-feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.archive-empty {
  color: var(--muted);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.image-card {
  border-radius: 18px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.image-card h3 {
  margin-top: 0.9rem;
  font-size: 1rem;
}

.image-card p {
  margin-bottom: 0;
}

.image-entry-media {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0.2rem;
}

.image-entry-featured,
.image-entry-gallery img,
.image-preview-shell img,
.image-library-card-media img,
.image-attachment-option img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.image-entry-featured {
  border-radius: 18px;
  max-height: 640px;
  border: 1px solid rgba(104, 245, 216, 0.18);
  object-fit: contain;
  background: rgba(5, 9, 14, 0.75);
}

.image-entry-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.image-entry-gallery img {
  border-radius: 14px;
  height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.image-admin-two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.image-preview-shell {
  margin-top: 0.25rem;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(104, 245, 216, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.image-preview-shell img {
  max-height: 420px;
  object-fit: contain;
  background: rgba(5, 9, 14, 0.75);
}

.image-filter-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 1.25rem;
}

.image-admin-library {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.image-library-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  border-radius: 20px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.image-library-card-media img {
  height: 260px;
  min-height: 260px;
  border-radius: 16px;
  object-fit: contain;
  background: rgba(5, 9, 14, 0.75);
}

.image-library-card-body p {
  color: var(--muted);
}

.image-attachment-list {
  display: grid;
  gap: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.image-attachment-option {
  display: grid;
  grid-template-columns: auto 88px 1fr;
  gap: 0.8rem;
  align-items: center;
  border-radius: 18px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.image-attachment-option img {
  height: 96px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(5, 9, 14, 0.75);
}

.image-placeholder {
  height: 170px;
  border-radius: 14px;
  border: 1px solid rgba(104, 245, 216, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 94, 168, 0.18), rgba(104, 245, 216, 0.06)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text);
  font-size: 0.78rem;
}

.image-scan {
  position: absolute;
  inset: -30% 0 auto 0;
  height: 60%;
  background: linear-gradient(180deg, transparent, rgba(104, 245, 216, 0.16), transparent);
  animation: scan 4.5s linear infinite;
}

.backend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.roadmap {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 4rem;
}

.footer {
  padding-bottom: 2rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 120ms;
}

.delay-2 {
  transition-delay: 220ms;
}

@keyframes scan {
  0% {
    transform: translateY(-120%);
  }
  100% {
    transform: translateY(260%);
  }
}

@keyframes twinkleSoft {
  0%,
  100% {
    opacity: calc(var(--alpha) * 0.72);
  }
  50% {
    opacity: calc(var(--alpha) * 0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .background-nebula,
  .background-starfield,
  .background-drift,
  .orbit-ring,
  .background-stars-dynamic .star,
  .scrap-bit,
  .reveal {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

@media (max-width: 980px) {
  .hero,
  .chat-shell,
  .logbook-layout,
  .image-admin-grid,
  .split-panel,
  .dashboard,
  .profiles,
  .timeline,
  .roadmap,
  .image-grid,
  .image-filter-bar,
  .image-admin-library,
  .archive-layout {
    grid-template-columns: 1fr;
  }

  .hero-characters {
    grid-template-columns: 1fr;
  }

  h1 {
    line-height: 1;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 1rem, 100%);
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero-card,
  .dashboard-card,
  .profile-card,
  .timeline-card,
  .intel-card,
  .newsletter-card,
  .roadmap-card,
  .chat-intro,
  .chat-panel {
    border-radius: 18px;
  }

  .chat-header,
  .chat-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .image-library-card,
  .image-admin-two-up,
  .image-attachment-option {
    grid-template-columns: 1fr;
  }
}
