/* ---------- Design tokens ---------- */
:root {
  --accent: #3457d5;
  --accent-dark: #22399c;
  --accent-soft: #eef1fd;
  --bg: #fdfcfa;
  --bg-alt: #f5f3ee;
  --text: #1b1f27;
  --text-muted: #5b6472;
  --border: #e1ddd2;
  --card-shadow: 0 1px 2px rgba(20, 25, 40, 0.05), 0 4px 14px rgba(20, 25, 40, 0.06);
  --card-shadow-hover: 0 4px 10px rgba(20, 25, 40, 0.08), 0 10px 24px rgba(20, 25, 40, 0.10);
  /* Sitewide rule: nothing gets a soft/partial corner radius. A shape is
     either sharp (0, the default for cards, panels, tables, photos, the
     nav, menus, badges, tags...) or fully rounded into a pill/circle
     (999px / 50% -- search for those literally). --radius and
     --radius-doc both stay at 0 so every card-like container (search
     panel, nav cards, section cards) and every document-style element
     (tables, photos, the video/lightbox frames) reads as flat paper,
     not a soft UI card. */
  --radius: 0;
  --radius-doc: 0;
  --max-width: 1080px;
  --stamp: #a3372c;
  --stamp-soft: #fbeeec;
  --font-doc: "Special Elite", "Courier New", ui-monospace, monospace;
  --grain: rgba(150, 130, 90, 0.16);
  --tag-main: #2a6ba8;
  --tag-main-soft: #e8f1f9;
  --tag-side: #a3372c;
  --tag-side-soft: #fbeeec;
  --tag-lore: #4f7a3d;
  --tag-lore-soft: #eef4ea;
  --archive: #8a6d2f;
  --archive-soft: #f6efdf;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
html::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Edge */
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--grain) 0.6px, transparent 0.6px);
  background-size: 22px 22px;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none; /* Firefox */
}
body::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Edge */
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(253, 252, 250, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.site-brand:hover { text-decoration: none; color: var(--accent); }
.site-brand-icon { font-size: 1.2rem; }

.site-nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.45rem 0.8rem;
  border-radius: 0;
}

.site-nav a:hover { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; }
.site-nav a.active { background: var(--accent); color: #fff; }

/* Compact community-link icons (Discord, Google Doc, YouTube) in the header */
.site-links {
  display: flex;
  gap: 0.15rem;
  padding-left: 0.5rem;
  border-left: 1px solid var(--border);
}
.site-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0;
  font-size: 1.05rem;
  line-height: 1;
}
.site-links a:hover { background: var(--accent-soft); text-decoration: none; }

.search-trigger, .theme-toggle, .random-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0;
  font-size: 1.05rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}
.search-trigger:hover, .theme-toggle:hover, .random-trigger:hover { background: var(--accent-soft); }

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 18, 26, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 1.2rem 2rem;
}
.search-overlay[hidden] { display: none; }
body.search-open { overflow: hidden; }

.search-panel {
  width: 100%;
  max-width: 620px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow-hover);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.search-input-icon { font-size: 1.1rem; opacity: 0.7; }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  color: var(--text);
  font-size: 1.05rem;
  font-family: inherit;
}
.search-input::placeholder { color: var(--text-muted); }
.search-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.3rem;
  border-radius: 0;
  line-height: 1;
}
.search-close:hover { background: var(--accent-soft); color: var(--text); }

.search-results {
  overflow-y: auto;
  padding: 0.5rem;
}
.search-hint {
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 0.9rem 0.7rem;
  margin: 0;
}
.search-result-list { list-style: none; margin: 0; padding: 0; }

.search-result {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.65rem 0.7rem;
  border-radius: 0;
  color: var(--text);
}
.search-result:hover, .search-result.is-active {
  background: var(--accent-soft);
  text-decoration: none;
}
.search-result-icon { font-size: 1.25rem; line-height: 1.3; }
.search-result-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1; }
.search-result-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}
.search-result-title { font-weight: 700; font-size: 0.98rem; }
.search-result-section {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.search-result-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result mark {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 0;
  padding: 0 0.1em;
}

@media (max-width: 640px) {
  .search-overlay { padding: 4vh 0.7rem 1.5rem; }
  .search-panel { max-height: 82vh; }
}

/* ---------- Layout ---------- */
.site-main { min-height: 60vh; }

.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.2rem 1.5rem 3.5rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.6rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer-inner p { margin: 0.25rem 0; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-bottom: 0.9rem;
}
.footer-links a { color: var(--text); font-weight: 600; }
.footer-links a:hover { color: var(--accent); }
.site-stats { margin-top: 0.6rem !important; opacity: 0.85; }
.site-stats img { display: block; vertical-align: middle; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-family: var(--font-doc);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.crumb-sep { opacity: 0.5; }

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5 { line-height: 1.25; font-weight: 700; }
.page-title { font-size: 2rem; margin: 0 0 0.4rem; }
.page-tagline { color: var(--text-muted); font-size: 1.08rem; margin-top: 0; }

.entry-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}
.entry-icon { font-size: 2rem; line-height: 1; }
.entry-icon img {
  display: block;
  width: 3.2rem;
  height: 3.2rem;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-doc);
}
.entry-header .page-title { margin: 0; }
.entry-views { margin: -0.2rem 0 0.9rem; opacity: 0.85; }
.entry-views img { display: block; vertical-align: middle; }
.copy-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  margin-left: auto;
  flex-shrink: 0;
  border-radius: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.copy-link-btn:hover { background: var(--accent-soft); color: var(--text); }
.copy-link-btn.is-copied { color: var(--accent-dark); }
@media (max-width: 640px) {
  .copy-link-btn { margin-left: 0; }
}

.entry-content h2 {
  font-size: 1.35rem;
  margin-top: 2.2rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}
.entry-content h2:first-child { border-top: none; margin-top: 0.5rem; }
.entry-content h3 { font-size: 1.12rem; margin-top: 1.6rem; }
.entry-content h4 { font-size: 1rem; color: var(--text-muted); margin-top: 1.2rem; }

/* ---------- Hub quick-jump nav ---------- */
.hub-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.2rem 0 1.6rem;
}
.hub-jump-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.hub-jump-nav a:hover {
  text-decoration: none;
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

/* ---------- Card grid (hub pages) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.section-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.section-card:hover {
  text-decoration: none;
  background: var(--bg-alt);
  border-color: var(--accent);
}
.section-card-icon { font-size: 1.6rem; }
.section-card-icon img {
  display: block;
  width: 2.6rem;
  height: 2.6rem;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-doc);
}
.section-card-title { font-weight: 700; font-size: 1.02rem; color: var(--text); }
.section-card-excerpt {
  font-size: 0.86rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-group {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 1rem;
}
.section-card-parent {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.section-group-children {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border);
}
.section-card-child {
  padding: 0.8rem 1rem;
  box-shadow: none;
}
.section-card-child .section-card-icon { font-size: 1.3rem; }
.section-card-child .section-card-icon img { width: 2.2rem; height: 2.2rem; }
.section-card-child .section-card-title { font-size: 0.92rem; }

/* Standalone categories with no subcategories, still shown at full width
   so they carry the same visual weight as the grouped clusters. */
.section-card-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.3rem;
}
.section-card-wide .section-card-icon { font-size: 1.9rem; flex-shrink: 0; }
.section-card-wide .section-card-icon img { width: 3rem; height: 3rem; flex-shrink: 0; }
.section-card-wide .section-card-title {
  flex-shrink: 0;
  min-width: 11rem;
  font-size: 1.08rem;
}
.section-card-wide .section-card-excerpt {
  -webkit-line-clamp: 1;
  margin: 0;
}
@media (max-width: 640px) {
  .section-card-wide { flex-direction: column; align-items: flex-start; }
  .section-card-wide .section-card-title { min-width: 0; }
}

/* Hero card: the single most important entry on a hub page (e.g. Overview) */
.hero-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-top: 1.6rem;
  padding: 1.5rem 1.7rem;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  color: var(--text);
  transition: border-color 0.15s ease;
}
.hero-card:hover {
  text-decoration: none;
  border-color: var(--accent-dark);
}
.hero-card, .section-group, .section-card { scroll-margin-top: 5.5rem; }
.hero-card-icon { font-size: 2.6rem; line-height: 1; flex-shrink: 0; }
.hero-card-icon img {
  display: block;
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-doc);
}
.hero-card-body { display: flex; flex-direction: column; gap: 0.3rem; }
.hero-card-title { font-weight: 800; font-size: 1.3rem; color: var(--text); }
.hero-card-excerpt { font-size: 0.98rem; color: var(--text-muted); }
@media (max-width: 640px) {
  .hero-card { flex-direction: column; align-items: flex-start; text-align: left; }
  .hero-card-icon { font-size: 2.1rem; }
  .hero-card-icon img { width: 3.2rem; height: 3.2rem; }
}

/* Big top-level nav cards used on the homepage */
.nav-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin: 1.6rem 0 2.4rem;
}
.nav-card {
  display: block;
  padding: 1.4rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  background: var(--bg);
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.nav-card:hover {
  text-decoration: none;
  background: var(--bg-alt);
  border-color: var(--accent);
}
.nav-card-icon { font-size: 1.8rem; display: block; margin-bottom: 0.5rem; }
.nav-card-title { font-weight: 700; font-size: 1.12rem; display: block; margin-bottom: 0.3rem; }
.nav-card-desc { color: var(--text-muted); font-size: 0.92rem; }

/* Pill-style link row (homepage community links) */
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1rem 0 2rem;
}
.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 600;
  font-size: 0.94rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.link-chip:hover {
  text-decoration: none;
  background: var(--accent-soft);
  border-color: var(--accent);
}
.link-chip-icon { font-size: 1.05rem; }

/* ---------- Child-entry grid (e.g. the characters within Captains) ---------- */
.child-entries {
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
.child-entries-title {
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
}
.backlinks-more {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Entry pager ---------- */
.entry-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1.4rem 0;
  padding: 0.6rem 0;
  flex-wrap: wrap;
}
.entry-pager-top { border-bottom: 1px solid var(--border); }
.entry-pager-bottom { border-top: 1px solid var(--border); margin-top: 2.4rem; }
.pager-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.4rem 0.7rem;
  border-radius: 0;
}
.pager-link:hover { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; }
.pager-up { color: var(--accent); }
.section-chronicles .pager-up { color: var(--archive); }

/* ---------- Tables as document cards (character/entry files) ----------
   These are meant to read as paper case files, not floating SaaS cards:
   sharp corners, a flat border, no drop shadow. */
.entry-content table,
.page-wrap > table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.1rem 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-doc);
  overflow: hidden;
}

/* Tables belonging to the same entry (a file-header bar plus its
   content/"(Cont.)" tables) stay snug so they read as one card... */
.entry-content table + table:not(.file-header),
.page-wrap > table + table:not(.file-header) {
  margin-top: -0.15rem;
}
/* ...but a new file-header table always marks the start of a brand new
   entry, so give it real breathing room from whatever came before it. */
.entry-content table + table.file-header,
.page-wrap > table + table.file-header {
  margin-top: 2.6rem;
}

/* File-header bars are the "which entry is this" marker -- tint them so
   they read as a clear section divider instead of blending into the
   regular content tables stacked beneath them, and stamp every one like
   a real case-file cover sheet. */
.entry-content table.file-header,
.page-wrap table.file-header {
  position: relative;
  overflow: visible;
  background: var(--accent-soft);
  border-color: var(--accent);
}
.entry-content table.file-header th,
.page-wrap table.file-header th {
  background: transparent;
  font-family: var(--font-doc);
}
.entry-content table.file-header th:first-child,
.page-wrap table.file-header th:first-child {
  color: var(--accent-dark);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.entry-content table.file-header::after,
.page-wrap table.file-header::after {
  content: "CLASSIFIED";
  position: absolute;
  top: -0.65rem;
  right: 0.9rem;
  padding: 0.15rem 0.55rem;
  background: var(--stamp-soft);
  color: var(--stamp);
  border: 1.5px solid var(--stamp);
  border-radius: 0;
  font-family: var(--font-doc);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  transform: rotate(-3deg);
  pointer-events: none;
}

/* Chronicles reads as an archive of field reports and historical records
   rather than active classified files -- a distinct stamp and accent
   (amber instead of red) gives the section its own identity while
   staying in the same document-aesthetic family. */
.section-chronicles .entry-content table.file-header::after,
.section-chronicles .page-wrap table.file-header::after {
  content: "ARCHIVED";
  background: var(--archive-soft);
  color: var(--archive);
  border-color: var(--archive);
}

.entry-content th,
.entry-content td,
.page-wrap table th,
.page-wrap table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}

.entry-content tr:last-child th,
.entry-content tr:last-child td,
.page-wrap table tr:last-child th,
.page-wrap table tr:last-child td {
  border-bottom: none;
}

.entry-content th,
.page-wrap table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* "File XX-000: Title" / "Last Updated: ..." header-bar tables only --
   NOT every table's last cell, so image/description cells never
   inherit this (that was clipping multi-image galleries). */
.entry-content table.file-header th:last-child,
.page-wrap table.file-header th:last-child {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

/* Short "Clearance level / Class [...]" style labels that used to float
   as plain text between cards -- folded into the following card as a
   compact label strip so every line of content lives inside a bubble. */
.entry-content tr.meta-row th,
.page-wrap table tr.meta-row th {
  font-family: var(--font-doc);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  line-height: 1.5;
}

/* Content/image rows: the table's default width algorithm let the text
   column dominate and squeezed the image column down to a sliver, which
   forced every image to shrink far below its 280px cap. Break the row
   out of table layout into a real two-column grid so the image side
   gets a guaranteed, generous share of the width instead of whatever
   is left over. Only the actual text+image row is targeted -- the
   meta-row (clearance line) and file-header bars are untouched, and a
   text-only "(Cont.)" row (a single th, no image sibling) just stays a
   normal full-width cell. Rows with a 3rd cell (e.g. a masthead's
   empty spacer columns) are excluded too -- forcing a 2-column grid
   onto 3 cells stranded the 3rd as its own orphan row. */
.entry-content table:not(.file-header) tr:not(.meta-row):has(th:nth-child(2)):not(:has(th:nth-child(3))),
.page-wrap table:not(.file-header) tr:not(.meta-row):has(th:nth-child(2)):not(:has(th:nth-child(3))) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
  align-items: stretch;
}
.entry-content table:not(.file-header) tr:not(.meta-row):not(:has(th:nth-child(3))) th:nth-child(2),
.page-wrap table:not(.file-header) tr:not(.meta-row):not(:has(th:nth-child(3))) th:nth-child(2) {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.7rem;
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
}

/* Image thumbnails packed inline in a cell -> a real gallery. Each image
   keeps its natural aspect ratio (no cropping) but now grows to fill
   its share of the enlarged column: a single image spans the whole
   column, two or more wrap into a proper grid instead of a squeezed
   stack of tiny thumbnails.
   These land in <th> cells (every cell in these tables is a <th>), so
   the selector has to match th, not just td. */
.entry-content th img,
.entry-content td img,
.page-wrap table th img,
.page-wrap table td img {
  display: block;
  flex: 1 1 220px;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 0;
  margin: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: var(--card-shadow);
}
@media (max-width: 720px) {
  .entry-content table:not(.file-header) tr:not(.meta-row):has(th:nth-child(2)):not(:has(th:nth-child(3))),
  .page-wrap table:not(.file-header) tr:not(.meta-row):has(th:nth-child(2)):not(:has(th:nth-child(3))) {
    grid-template-columns: 1fr;
  }
  .entry-content table:not(.file-header) tr:not(.meta-row):not(:has(th:nth-child(3))) th:nth-child(2),
  .page-wrap table:not(.file-header) tr:not(.meta-row):not(:has(th:nth-child(3))) th:nth-child(2) {
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .entry-content th img,
  .entry-content td img,
  .page-wrap table th img,
  .page-wrap table td img {
    max-height: 320px;
  }
}

/* ---------- Redactions ----------
   Source docs used "DATDAD" and runs of "XXX" as literal stand-ins for a
   black marker bar over redacted text. Render them as one instead of
   spelling the placeholder out -- a subtle diagonal hatch instead of flat
   black so it reads as a marker stroke, not a solid UI chip. */
.redacted {
  display: inline-block;
  color: transparent;
  background: repeating-linear-gradient(115deg, #0a0a0a 0px, #0a0a0a 3px, #000 3px, #000 6px);
  border-radius: 0;
  user-select: none;
  text-shadow: none;
  vertical-align: baseline;
}
.redacted::selection { background: transparent; color: transparent; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Misc content polish ---------- */
.entry-content p, .page-wrap > p { margin: 0.9rem 0; }
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

.placeholder-note {
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Timeline ---------- */
.timeline-intro { color: var(--text-muted); font-size: 1.02rem; max-width: 66ch; }

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin: 1.3rem 0 2.2rem;
  padding: 0.7rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-doc);
  font-family: var(--font-doc);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.timeline-legend-item { display: inline-flex; align-items: center; gap: 0.45rem; }
.timeline-legend-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: var(--bg);
  flex-shrink: 0;
}
.timeline-legend-item.type-main { color: var(--tag-main); }
.timeline-legend-item.type-side { color: var(--tag-side); }
.timeline-legend-item.type-lore { color: var(--tag-lore); }

.timeline-rail {
  position: relative;
  margin: 0 0 1.5rem;
  padding-left: 1.9rem;
  border-left: 2px solid var(--border);
}

.timeline-entry { position: relative; padding-bottom: 2.4rem; }
.timeline-entry:last-child { padding-bottom: 0; }
.timeline-entry::before {
  content: "";
  position: absolute;
  left: -2.03rem;
  top: 0.35rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
}
.timeline-entry.type-main::before { border-color: var(--tag-main); }
.timeline-entry.type-side::before { border-color: var(--tag-side); }
.timeline-entry.type-lore::before { border-color: var(--tag-lore); }

.timeline-entry-header {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}
.timeline-entry-date {
  font-family: var(--font-doc);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}
.timeline-entry-tag {
  font-family: var(--font-doc);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: 0;
  border: 1px solid currentColor;
}
.timeline-entry-tag.type-main { color: var(--tag-main); background: var(--tag-main-soft); }
.timeline-entry-tag.type-side { color: var(--tag-side); background: var(--tag-side-soft); }
.timeline-entry-tag.type-lore { color: var(--tag-lore); background: var(--tag-lore-soft); }

.timeline-entry-title {
  font-weight: 700;
  font-size: 1.12rem;
  margin: 0 0 0.55rem;
  color: var(--text);
}
.timeline-entry-body p { margin: 0.55rem 0; }
.timeline-entry-body p:first-child { margin-top: 0; }

.timeline-entry-image {
  margin-top: 0.9rem;
  border-radius: var(--radius-doc);
  overflow: hidden;
  border: 1px solid var(--border);
}
.timeline-entry-image img { display: block; width: 100%; }
.timeline-entry-caption {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.timeline-watch-link {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  margin-left: auto;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-doc);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.timeline-watch-link:hover {
  text-decoration: none;
  background: var(--accent-soft);
  border-color: var(--accent);
}

.timeline-entry-video { margin-top: 0.9rem; }
.video-embed {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--radius-doc);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.timeline-gap {
  margin-top: 0.75rem;
  font-family: var(--font-doc);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.timeline-end {
  display: inline-block;
  margin-left: -0.05rem;
  padding: 0.35rem 0.85rem;
  background: var(--stamp-soft);
  color: var(--stamp);
  border: 1.5px solid var(--stamp);
  border-radius: 0;
  font-family: var(--font-doc);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  transform: rotate(-2deg);
}

.timeline-source-note {
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .timeline-rail { padding-left: 1.4rem; }
  .timeline-entry::before { left: -1.53rem; }
}

/* ---------- Lightbox ---------- */
img.lightbox-trigger { cursor: zoom-in; }
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 3.5rem 1.5rem 2rem;
  z-index: 200;
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-image {
  max-width: min(92vw, 1400px);
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-doc);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  color: #f2f2f2;
  font-size: 0.9rem;
  max-width: 70ch;
  text-align: center;
  margin: 0;
}
.lightbox-caption[hidden] { display: none; }
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
body.lightbox-open { overflow: hidden; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  z-index: 90;
}
.back-to-top:hover { background: var(--accent-soft); color: var(--accent-dark); }
.back-to-top[hidden] { display: none; }

/* ---------- 404 page ---------- */
.notfound { text-align: center; padding: 2.5rem 0 1rem; }
.notfound-stamp {
  display: inline-block;
  padding: 0.5rem 1.4rem;
  background: var(--stamp-soft);
  color: var(--stamp);
  border: 2px solid var(--stamp);
  border-radius: 0;
  font-family: var(--font-doc);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  transform: rotate(-4deg);
  margin-bottom: 1.6rem;
}
.notfound .page-title { font-size: 1.5rem; }
.notfound-text {
  max-width: 56ch;
  margin: 0.8rem auto 0;
  color: var(--text-muted);
}
.notfound .nav-card-grid { margin-top: 2.2rem; text-align: left; }

.terminal-widget {
  max-width: 30rem;
  margin: 1.8rem auto 0;
  padding: 1rem 1.2rem;
  text-align: left;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-family: var(--font-doc);
}
.terminal-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.terminal-row { display: flex; gap: 0.5rem; }
.terminal-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.terminal-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.terminal-input.shake { animation: terminal-shake 0.4s ease; }
.terminal-submit {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.terminal-submit:hover { background: var(--accent-soft); border-color: var(--accent); }
.terminal-output {
  min-height: 1.2rem;
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.terminal-output.is-granted { color: #2f7d4f; }
.terminal-output.is-denied { color: var(--stamp); }
@keyframes terminal-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
:root:not([data-theme="light"]) .terminal-output.is-granted { color: #5fbf83; }
:root[data-theme="dark"] .terminal-output.is-granted { color: #5fbf83; }

/* ---------- Homepage stats strip ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-doc);
  overflow: hidden;
  margin: 1.4rem 0 1.8rem;
}
.stat-tile { background: var(--bg-alt); padding: 1rem 1.1rem; text-align: center; }
.stat-number {
  display: block;
  font-family: var(--font-doc);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent-dark);
}
.stat-label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
@media (max-width: 640px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .entry-pager, .back-to-top,
  .search-overlay, .breadcrumb, .child-entries.related-files,
  .hub-jump-nav, .terminal-widget, .copy-link-btn,
  .child-entries.backlinks-section { display: none !important; }
  body { background: #fff; color: #000; }
  .page-wrap { max-width: 100%; padding: 0; }
  a { color: #000; text-decoration: underline; }
  .redacted { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .page-wrap { padding: 1.4rem 1.1rem 2.5rem; }
  .site-header-inner { padding: 0.75rem 1.1rem; }
  .page-title { font-size: 1.6rem; }
  .entry-content th, .entry-content td { padding: 0.7rem 0.85rem; }
  .card-grid, .nav-card-grid { grid-template-columns: 1fr; }
}

/* ---------- Dark mode ----------
   Applies automatically when the OS prefers dark (unless the visitor has
   explicitly chosen "light" via the theme toggle), and always when the
   visitor has explicitly chosen "dark" -- regardless of OS preference. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #7c9bff;
    --accent-dark: #a9bfff;
    --accent-soft: #1c2340;
    --bg: #12141a;
    --bg-alt: #181b23;
    --text: #e7e9ee;
    --text-muted: #9aa2b1;
    --border: #262b36;
    --card-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 4px 14px rgba(0,0,0,0.28);
    --card-shadow-hover: 0 4px 10px rgba(0,0,0,0.34), 0 10px 24px rgba(0,0,0,0.36);
    --stamp: #e0685a;
    --stamp-soft: #2c1a19;
    --grain: rgba(255, 255, 255, 0.045);
    --tag-main: #7cb2e0;
    --tag-main-soft: #182531;
    --tag-side: #e0685a;
    --tag-side-soft: #2c1a19;
    --tag-lore: #8fc478;
    --tag-lore-soft: #1c2618;
    --archive: #d9a86c;
    --archive-soft: #2a2117;
  }
  :root:not([data-theme="light"]) .site-header { background: rgba(18, 20, 26, 0.9); }
  :root:not([data-theme="light"]) .site-nav a.active { color: #0d0f14; }
}

:root[data-theme="dark"] {
  --accent: #7c9bff;
  --accent-dark: #a9bfff;
  --accent-soft: #1c2340;
  --bg: #12141a;
  --bg-alt: #181b23;
  --text: #e7e9ee;
  --text-muted: #9aa2b1;
  --border: #262b36;
  --card-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 4px 14px rgba(0,0,0,0.28);
  --card-shadow-hover: 0 4px 10px rgba(0,0,0,0.34), 0 10px 24px rgba(0,0,0,0.36);
  --stamp: #e0685a;
  --stamp-soft: #2c1a19;
  --grain: rgba(255, 255, 255, 0.045);
  --tag-main: #7cb2e0;
  --tag-main-soft: #182531;
  --tag-side: #e0685a;
  --tag-side-soft: #2c1a19;
  --tag-lore: #8fc478;
  --tag-lore-soft: #1c2618;
  --archive: #d9a86c;
  --archive-soft: #2a2117;
}
:root[data-theme="dark"] .site-header { background: rgba(18, 20, 26, 0.9); }
:root[data-theme="dark"] .site-nav a.active { color: #0d0f14; }

/* ---------- Secret: Declassify game ---------- */
.game-declassify { text-align: center; padding: 1rem 0 1rem; }
.game-top-stamp { font-size: 1rem; padding: 0.4rem 1rem; margin-bottom: 1.2rem; }
.game-intro {
  max-width: 56ch;
  margin: 0.6rem auto 2rem;
  color: var(--text-muted);
}
.game-board {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 26rem);
  gap: 1.6rem;
  justify-content: center;
  text-align: left;
  max-width: 46rem;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .game-board { grid-template-columns: 1fr; }
}
.game-image-wrap {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.game-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.4s ease;
}
.game-image.blur-4 { filter: blur(34px) saturate(0.6); }
.game-image.blur-3 { filter: blur(22px) saturate(0.75); }
.game-image.blur-2 { filter: blur(13px) saturate(0.85); }
.game-image.blur-1 { filter: blur(6px); }
.game-image.blur-0 { filter: blur(0); }
.game-image-stamp {
  position: absolute;
  top: 0.8rem;
  right: -1.6rem;
  padding: 0.2rem 2.2rem;
  background: var(--stamp);
  color: #fff;
  font-family: var(--font-doc);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  transform: rotate(30deg);
  pointer-events: none;
}
.game-panel { display: flex; flex-direction: column; }
.game-excerpt {
  font-family: var(--font-doc);
  font-size: 0.92rem;
  color: var(--text-muted);
  min-height: 3.6em;
  margin: 0 0 1rem;
}
.game-input-row { display: flex; gap: 0.5rem; }
.game-input-row input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.game-input-row input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.game-input-row input.shake { animation: terminal-shake 0.4s ease; }
.game-input-row button {
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.game-input-row button:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); }
.game-input-row button:disabled, .game-input-row input:disabled { opacity: 0.6; cursor: not-allowed; }
.game-feedback {
  min-height: 1.4rem;
  margin: 0.8rem 0 0;
  font-size: 0.86rem;
}
.game-feedback.is-granted { color: #2f7d4f; }
.game-feedback.is-denied { color: var(--stamp); }
.game-feedback a { font-weight: 600; }
.game-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-top: 1.1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.game-stats strong { color: var(--text); }
.game-next {
  align-self: flex-start;
  margin-top: 1.1rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.game-next:hover { background: var(--accent); color: #fff; }
:root:not([data-theme="light"]) .game-feedback.is-granted { color: #5fbf83; }
:root[data-theme="dark"] .game-feedback.is-granted { color: #5fbf83; }

/* ---------- Secret: Konami code toast ---------- */
@keyframes konami-flash-kf {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}
.konami-flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  animation: konami-flash-kf 0.6s ease;
}
.konami-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.1rem;
  background: var(--bg);
  border: 1px solid var(--accent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.88rem;
  max-width: 90vw;
}
.konami-toast a { font-weight: 700; }
.konami-toast-close {
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.1rem 0.3rem;
}
.konami-toast-close:hover { color: var(--text); }
@media (max-width: 640px) {
  .konami-toast { flex-wrap: wrap; text-align: center; justify-content: center; }
}

/* ---------- Secret: Transmission (mystery countdown) ---------- */
/* Deliberately ignores the light/dark toggle -- this page is its own
   isolated, always-dark "signal" rather than part of the normal site. */
.section-transmission .site-header,
.section-transmission .site-footer,
.section-transmission .back-to-top { display: none !important; }
.section-transmission .site-main { min-height: 100vh; }
.section-transmission .page-wrap { max-width: none; padding: 0; margin: 0; }

.transmission {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 2rem 1.2rem;
  background: #05060a;
  color: #c7d0e0;
  font-family: "Special Elite", "Courier New", ui-monospace, monospace;
  overflow: hidden;
  text-align: center;
}
.transmission-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035) 0px,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: transmission-scan 9s linear infinite;
  opacity: 0.6;
}
@keyframes transmission-scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(120px); }
}
.transmission-glyph {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22rem;
  height: 22rem;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(87, 130, 200, 0.25);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  animation: transmission-pulse 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes transmission-pulse {
  0%, 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(0.96); }
  50% { opacity: 0.4; transform: translate(-50%, -50%) scale(1.02); }
}
.transmission-label {
  position: relative;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5f7396;
  margin: 0;
}
.transmission-clock {
  position: relative;
  font-size: clamp(2.4rem, 9vw, 4.2rem);
  letter-spacing: 0.05em;
  color: #9fd1ff;
  text-shadow: 0 0 18px rgba(120, 180, 255, 0.35);
}
.transmission-colon { opacity: 0.5; margin: 0 0.1em; }
.transmission-clock.is-glitching {
  color: #ff6b6b;
  text-shadow: 0 0 22px rgba(255, 90, 90, 0.55);
  animation: transmission-shake 0.15s linear infinite;
}
.transmission-clock.is-lost {
  color: #444d5e;
  text-shadow: none;
  animation: none;
}
@keyframes transmission-shake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(1px, 1px); }
}
.transmission-status {
  position: relative;
  font-size: 0.92rem;
  color: #7f93b8;
  min-height: 1.4em;
  margin: 0;
}
.transmission-status.is-lost {
  color: #ff6b6b;
  letter-spacing: 0.1em;
}
.transmission-return {
  position: relative;
  margin-top: 1.4rem;
  font-size: 0.8rem;
  color: #5f7396;
  text-decoration: none;
  border-bottom: 1px solid rgba(95, 115, 150, 0.4);
  padding-bottom: 0.1rem;
}
.transmission-return:hover { color: #9fd1ff; border-color: #9fd1ff; text-decoration: none; }
.transmission-flash { animation: transmission-flash-kf 0.35s ease; }
@keyframes transmission-flash-kf {
  0% { background: #05060a; }
  40% { background: #1a0505; }
  100% { background: #05060a; }
}
@media (max-width: 640px) {
  .transmission-glyph { width: 16rem; height: 16rem; }
}
