/* ============================================================
   VIGIL CWRP — shared stylesheet
   Every page links to this one file. Change a colour here and
   it changes everywhere.
   ============================================================ */

/* ---------- Aurebesh (SilvinoR, SIL Open Font License) ---------- */
@font-face{
  font-family: "Aurebesh";
  src: url("aurebesh.ttf") format("truetype");
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root{
  /* From your original file */
  --void:    #010a14;
  --void-2:  #041c30;
  --deep:    #063354;
  --field:   #0d7ec2;
  --glow:    #4fd3ff;
  --glow-2:  #bff1ff;

  /* Added for readable body pages */
  --hull:     #071726;   /* panel background */
  --ink:      #cfe4f2;   /* body text */
  --ink-dim:  #7ea6c2;   /* secondary text */
  --line:     rgba(79, 211, 255, 0.22);
  --signal:   #ffb03a;   /* one warm accent, used sparingly */

  --display: "Arial Black", "Arial Bold", "Helvetica Neue", Helvetica, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --measure: 66ch;       /* comfortable reading width */
  --bar: 62px;           /* nav bar height */
}

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

html{ scroll-behavior: smooth; }

body{
  min-height: 100%;
  background: var(--void);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* The landing page fills the viewport and must not scroll.
   Content pages must, so this is scoped to .home only. */
body.home{ height:100vh; height:100dvh; overflow:hidden; }

img{ max-width:100%; display:block; }

a{ color: var(--glow); }

:focus-visible{
  outline: 2px solid var(--glow-2);
  outline-offset: 3px;
}

.skip-link{
  position:absolute; left:-9999px;
  background: var(--glow-2); color: var(--void);
  padding: 10px 16px; z-index: 100; font-weight:700;
}
.skip-link:focus{ left: 12px; top: 12px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.topbar{
  position: fixed;
  top:0; left:0; right:0;
  z-index: 20;
  min-height: var(--bar);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(1, 10, 20, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand{
  display:flex;
  align-items:baseline;
  gap: 10px;
  text-decoration:none;
  padding: 12px 0;
}
.brand-mark{
  font-family: "Aurebesh", sans-serif;
  font-size: 20px;
  color: var(--glow);
  text-shadow: 0 0 12px rgba(79,211,255,0.7);
}
.brand-name{
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--glow-2);
}

.topbar nav ul{
  list-style: none;
  display:flex;
  flex-wrap: wrap;
  gap: clamp(14px, 3vw, 34px);
}
.topbar nav a{
  display:block;
  padding: 20px 0;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 1.6px;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.topbar nav a:hover{
  color: var(--glow-2);
  border-bottom-color: var(--glow);
}
/* Marks the page you are currently on */
.topbar nav a[aria-current="page"]{
  color: var(--glow-2);
  border-bottom-color: var(--glow);
}

/* ============================================================
   BACKDROPS
   Full animated warp on the landing page only.
   Content pages get a quiet static starfield so text stays legible.
   ============================================================ */
.stage{
  position:relative;
  width:100%; height:100vh; height:100dvh;
  background: var(--void);
  display:flex;
  align-items:center;
  justify-content:center;
}

svg.warp-defs{ position:absolute; width:0; height:0; }

.warp-field{
  position:absolute; inset:-25%;
  background:
    radial-gradient(circle at 35% 30%, rgba(191,241,255,0.22), transparent 34%),
    radial-gradient(circle at 68% 65%, rgba(79,211,255,0.28), transparent 40%),
    radial-gradient(ellipse at 50% 50%, var(--field) 0%, var(--deep) 45%, var(--void-2) 72%, var(--void) 100%);
  filter: url(#warpDistort);
  animation: fieldSpin 40s linear infinite, fieldPulse 9s ease-in-out infinite;
}
@keyframes fieldSpin{
  0%{ transform: rotate(0deg) scale(1.05); }
  100%{ transform: rotate(360deg) scale(1.05); }
}
@keyframes fieldPulse{
  0%,100%{ filter: url(#warpDistort) brightness(1); }
  50%{ filter: url(#warpDistort) brightness(1.1); }
}

.hyperspace{ position:absolute; inset:0; z-index:2; overflow:hidden; }
.beam{
  position:absolute;
  left:-25%;
  height:1px;
  width:35%;
  background: linear-gradient(90deg, transparent, var(--glow-2), transparent);
  animation: beamAcross linear infinite;
}
@keyframes beamAcross{
  0%{ transform: translateX(0); opacity:0; }
  8%{ opacity:0.6; }
  50%{ opacity:0.4; }
  92%{ opacity:0; }
  100%{ transform: translateX(150vw); opacity:0; }
}

.vignette{
  position:absolute; inset:0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,6,12,0.8) 100%);
  z-index:4;
  pointer-events:none;
}

/* Quiet backdrop for content pages.
   Built in three layers so the stars can twinkle:
     body.doc          the deep-space glow + stars that never blink
     body.doc::before  slow twinkle group
     body.doc::after   faster twinkle group
   Real starfields only shimmer here and there, so most of the stars
   below are deliberately left steady. */
body.doc{
  background:
    radial-gradient(1px 1px at 20% 30%,  rgba(191,241,255,.75), transparent),
    radial-gradient(1px 1px at 70% 12%,  rgba(191,241,255,.55), transparent),
    radial-gradient(1px 1px at 41% 78%,  rgba(191,241,255,.65), transparent),
    radial-gradient(1px 1px at 88% 61%,  rgba(191,241,255,.45), transparent),
    radial-gradient(1px 1px at 12% 85%,  rgba(191,241,255,.55), transparent),
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(13,126,194,.30), transparent 70%),
    var(--void);
  background-size: 340px 340px, 340px 340px, 340px 340px, 340px 340px, 340px 340px, 100% 100%, auto;
  background-attachment: fixed;
}

/* ---------- Twinkling star layers ----------
   Both layers sit behind the page content and ignore the mouse.
   Change the 7s / 4.6s below to make the blinking slower or faster. */
body.doc::before,
body.doc::after{
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-repeat: repeat;
}

/* Slow group */
body.doc::before{
  background-image:
    radial-gradient(1.4px 1.4px at 33% 18%, rgba(191,241,255,.95), transparent),
    radial-gradient(1px   1px   at 62% 44%, rgba(191,241,255,.70), transparent),
    radial-gradient(1px   1px   at 15% 62%, rgba(191,241,255,.80), transparent),
    radial-gradient(1.4px 1.4px at 82% 27%, rgba(191,241,255,.85), transparent),
    radial-gradient(1px   1px   at 50% 88%, rgba(191,241,255,.65), transparent);
  background-size: 420px 420px;
  animation: twinkle 7s ease-in-out infinite;
}

/* Fast group. The negative delay starts it mid-cycle so the two
   layers are never in step with each other. */
body.doc::after{
  background-image:
    radial-gradient(1px   1px   at 24% 40%, rgba(191,241,255,.85), transparent),
    radial-gradient(1.6px 1.6px at 71% 71%, rgba(191,241,255,.95), transparent),
    radial-gradient(1px   1px   at 92% 15%, rgba(191,241,255,.60), transparent),
    radial-gradient(1px   1px   at 8%  22%, rgba(191,241,255,.75), transparent);
  background-size: 300px 300px;
  animation: twinkle 4.6s ease-in-out infinite -2.3s;
}

@keyframes twinkle{
  0%, 100%{ opacity: 0.25; }
  50%     { opacity: 1; }
}

/* ============================================================
   LANDING PAGE TITLE
   ============================================================ */
.title-wrap{
  position:relative;
  z-index:5;
  transform: rotate(-7deg);
  text-align:center;
  padding: 0 20px;
}
.title-main{
  font-family: var(--display);
  font-weight:900;
  font-size: clamp(52px, 10vw, 140px);
  letter-spacing: 6px;
  color: var(--glow-2);
  text-shadow:
    0 0 6px var(--glow),
    0 0 26px var(--glow),
    0 0 70px rgba(79,211,255,0.6);
  line-height:1;
  animation: flicker 4.5s ease-in-out infinite;
  white-space: nowrap;
}
.title-aurebesh{
  font-family: "Aurebesh", sans-serif;
  font-size: clamp(20px, 3.2vw, 40px);
  letter-spacing: 8px;
  color: rgba(191, 241, 255, 0.8);
  margin-top: 16px;
}
.title-tagline{
  font-family: var(--body);
  font-size: clamp(13px, 1.6vw, 18px);
  letter-spacing: 5px;
  color: rgba(155, 220, 255, 0.55);
  margin-top: 14px;
}
@keyframes flicker{
  0%,100%{ opacity:1; }
  92%{ opacity:1; }
  93%{ opacity:0.7; }
  94%{ opacity:1; }
  97%{ opacity:0.85; }
  98%{ opacity:1; }
}

/* ============================================================
   CONTENT PAGES
   ============================================================ */
.page{
  max-width: 900px;
  margin: 0 auto;
  padding: calc(var(--bar) + 64px) clamp(20px, 5vw, 40px) 100px;
}

.page-title{
  font-family: var(--display);
  font-size: clamp(34px, 6vw, 62px);
  letter-spacing: 3px;
  line-height: 1.05;
  color: var(--glow-2);
  text-shadow: 0 0 24px rgba(79,211,255,0.45);
}
.page-sub{
  font-family: "Aurebesh", sans-serif;
  font-size: 18px;
  letter-spacing: 6px;
  color: rgba(155, 220, 255, 0.5);
  margin-top: 12px;
}
.page-intro{
  max-width: var(--measure);
  margin-top: 26px;
  font-size: 19px;
  color: var(--ink);
}

.section{
  margin-top: 64px;
}
.section h2{
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--glow-2);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.section p,
.section ul{
  max-width: var(--measure);
  margin-top: 18px;
  color: var(--ink);
}
.section ul{ padding-left: 22px; }
.section li{ margin-top: 8px; }
.section li::marker{ color: var(--glow); }

/* Two-column facts list, e.g. ops times */
.facts{
  margin-top: 22px;
  display:grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 28px;
  max-width: var(--measure);
}
.facts dt{
  color: var(--ink-dim);
  font-size: 14px;
  letter-spacing: 1.4px;
  padding-top: 2px;
}
.facts dd{ color: var(--ink); }

/* Numbered list — only used where the content really is a sequence */
.steps{
  counter-reset: step;
  list-style: none;
  max-width: var(--measure);
  margin-top: 22px;
  padding-left: 0;
}
.steps li{
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  margin-top: 20px;
}
.steps li::before{
  content: counter(step);
  position:absolute; left:0; top:1px;
  width: 28px; height: 28px;
  display:grid; place-items:center;
  font-size: 13px; font-weight:700;
  color: var(--glow-2);
  border: 1px solid var(--line);
  background: rgba(6, 51, 84, 0.5);
}

/* ---------- Panels (clipped hull plates, not rounded cards) ---------- */
.plates{
  margin-top: 28px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.plate{
  background: var(--line);
  padding: 1px;               /* acts as a border that follows the clip */
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.plate-inner{
  background: var(--hull);
  height: 100%;
  padding: 24px 22px 26px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.plate h3{
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 1.6px;
  color: var(--glow-2);
}
.plate .amount{
  font-family: var(--display);
  font-size: 32px;
  color: var(--glow);
  margin-top: 6px;
  letter-spacing: 1px;
}
.plate p{ margin-top: 12px; font-size: 15px; color: var(--ink-dim); }
.plate ul{ margin-top: 14px; padding-left: 20px; font-size: 15px; }
.plate li{ margin-top: 7px; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-block;
  margin-top: 22px;
  padding: 13px 26px;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 2px;
  text-decoration:none;
  color: var(--glow-2);
  background: rgba(6, 51, 84, 0.55);
  border: 1px solid var(--glow);
  transition: background .18s ease, box-shadow .18s ease;
}
.btn:hover{
  background: rgba(13, 126, 194, 0.4);
  box-shadow: 0 0 22px rgba(79, 211, 255, 0.45);
}
.btn-signal{
  color: var(--void);
  background: var(--signal);
  border-color: var(--signal);
}
.btn-signal:hover{
  background: #ffc76d;
  box-shadow: 0 0 22px rgba(255, 176, 58, 0.45);
}

/* ---------- Callout ---------- */
.note{
  max-width: var(--measure);
  margin-top: 28px;
  padding: 18px 20px;
  background: rgba(6, 51, 84, 0.35);
  border-left: 3px solid var(--glow);
  font-size: 15px;
  color: var(--ink-dim);
}

/* ============================================================
   FORUMS
   ============================================================ */
/* Hides text visually but keeps it for screen readers */
.visually-hidden{
  position:absolute; width:1px; height:1px;
  overflow:hidden; clip: rect(0 0 0 0); white-space:nowrap;
}

.forum-bar{
  margin-top: 36px;
  display:flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items:center;
  justify-content:space-between;
}
.forum-bar .btn{ margin-top: 0; }
.forum-search{ flex: 1 1 260px; max-width: 420px; }
.forum-search input{
  width:100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--hull);
  border: 1px solid var(--line);
  transition: border-color .18s ease;
}
.forum-search input::placeholder{ color: var(--ink-dim); }
.forum-search input:focus{ border-color: var(--glow); }

.forum-empty{
  margin-top: 28px;
  color: var(--ink-dim);
}

.forum-group{ margin-top: 48px; }

/* ".section .board-list" so these win over the general .section ul / p / li rules */
.section .board-list{
  list-style: none;
  max-width: none;
  padding-left: 0;
  margin-top: 0;
  background: rgba(7, 23, 38, 0.7);
  border: 1px solid var(--line);
  border-top: 0;
}
/* The whole row is clickable via the board name link */
.board{
  position: relative;
  display:grid;
  grid-template-columns: 1fr 72px 72px 150px;
  gap: 8px 20px;
  align-items:center;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  transition: background .18s ease;
}
.section .board{ margin-top: 0; }
.section .board p{ max-width: none; margin-top: 0; }
.board:first-child{ border-top: 0; }
.board[hidden]{ display: none; }
.board:hover{ background: rgba(13, 126, 194, 0.14); }
.board:hover .board-name a{ color: var(--glow); }

.board-name{
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 1.4px;
  font-weight: normal;
}
.board-name a{
  color: var(--glow-2);
  text-decoration: none;
  transition: color .18s ease;
}
.board-name a::after{
  content: "";
  position: absolute;
  inset: 0;
}
.board-tag{
  display:inline-block;
  margin-left: 10px;
  padding: 1px 7px;
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  vertical-align: 2px;
  color: var(--signal);
  border: 1px solid rgba(255, 176, 58, 0.55);
}
.section .board-desc{
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink-dim);
}
.board-stat{
  text-align:center;
  line-height: 1.2;
}
.board-stat .num{
  display:block;
  font-family: var(--display);
  font-size: 18px;
  color: var(--glow);
}
.board-stat .lbl{
  display:block;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.board-latest{
  font-size: 13px;
  color: var(--ink-dim);
}

/* Latest-post link sits above the row-wide link so both can be clicked */
.latest-link{
  position: relative;
  z-index: 1;
  display: block;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.latest-link:hover{ color: var(--glow-2); text-decoration: underline; }

/* Thread rows on a board page: title, replies, last post */
.thread-row{ grid-template-columns: 1fr 72px 170px; }

.forum-loading{ margin-top: 40px; color: var(--ink-dim); }

/* Tag colour variants */
.tag-staff{
  color: var(--glow);
  border-color: rgba(79, 211, 255, 0.55);
}

/* Warning version of the .note callout */
.note-warn{ border-left-color: var(--signal); color: var(--ink); }

/* Breadcrumb above board and thread titles */
.crumbs{
  margin-bottom: 14px;
  font-size: 14px;
  letter-spacing: 1.4px;
  color: var(--ink-dim);
}
.crumbs a{ color: var(--ink-dim); text-decoration: none; }
.crumbs a:hover{ color: var(--glow-2); text-decoration: underline; }

/* Thread titles can be long, so they're a step smaller than page titles */
.thread-title{ font-size: clamp(28px, 4.4vw, 44px); overflow-wrap: anywhere; }
.thread-tags{ margin-top: 14px; }
.thread-tags .board-tag:first-child{ margin-left: 0; }

/* ---------- Buttons used as <button> ---------- */
button.btn{ cursor: pointer; }
button.btn:disabled{ opacity: .6; cursor: progress; }
.btn-small{ margin-top: 0; padding: 8px 16px; font-size: 12px; }
.btn-quiet{ border-color: var(--line); color: var(--ink-dim); background: transparent; }
.btn-quiet:hover{ color: var(--glow-2); }
.btn-danger{ border-color: rgba(255, 120, 100, 0.7); color: #ffb8ad; }
.btn-danger:hover{ background: rgba(160, 40, 30, 0.35); box-shadow: 0 0 22px rgba(255, 120, 100, 0.35); }
.btn-steam{ margin-top: 0; }

/* ---------- Avatars ---------- */
.avatar{
  flex: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  object-fit: cover;
}
.avatar-blank{
  display: grid; place-items: center;
  font-family: var(--display);
  color: var(--glow-2);
  background: var(--deep);
}

/* "Signed in as" chip on the forums page */
.account-chip{
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--ink-dim);
}
.account-chip .avatar{ width: 28px; height: 28px; font-size: 13px; }
.account-chip strong{ color: var(--glow-2); font-weight: 600; }

/* Account card on the sign-in page */
.account-card{ max-width: 520px; }
.account-card .plate-inner{ display: flex; align-items: center; gap: 18px; }
.account-card .avatar{ width: 64px; height: 64px; font-size: 26px; }
.account-card .plate-inner p{ margin-top: 4px; }
.account-card code{ color: var(--ink); font-size: 14px; }

/* ---------- Forms ---------- */
.compose{ margin-top: 24px; }
.compose h3{ margin-bottom: 4px; }
.field{ display: block; margin-top: 18px; }
.field > span{
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.field input,
.field textarea{
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--void);
  border: 1px solid var(--line);
  transition: border-color .18s ease;
}
.field textarea{ resize: vertical; min-height: 140px; line-height: 1.55; }
.field input:focus,
.field textarea:focus{ border-color: var(--glow); }
.field-hint{ margin-top: 10px; font-size: 14px; color: var(--ink-dim); }
.form-error{ margin-top: 14px; color: #ffb8ad; font-size: 15px; }

/* ---------- Posts in a thread ---------- */
.staff-tools{
  margin-top: 22px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
}
.staff-tools-label{
  font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--glow); margin-right: 6px;
}

.posts{ margin-top: 32px; display: grid; gap: 18px; }

/* Each post is a hull plate: author panel on the left, message on the right */
.post{
  display: grid;
  grid-template-columns: 190px 1fr;
  background: var(--line);
  padding: 1px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.post > *{ background: rgba(7, 23, 38, 0.96); }
.post:first-child{ background: rgba(79, 211, 255, 0.55); }
.post:target{ background: var(--glow); }

.post-author-panel{
  padding: 22px 16px 20px;
  text-align: center;
  border-right: 1px solid var(--line);
  background: rgba(4, 28, 48, 0.92);
}
.post-author{
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 1.2px;
  color: var(--glow-2);
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.post-avatar{
  width: 112px; height: 112px;
  margin: 14px auto 0;
  padding: 2px;
  background: var(--line);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.post-avatar .avatar{
  width: 100%; height: 100%;
  border: 0;
  clip-path: inherit;
  font-size: 44px;
}
.role-chip{
  display: inline-block;
  margin-top: 14px;
  padding: 2px 12px;
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--line);
}
.role-staff{
  color: var(--glow);
  border-color: rgba(79, 211, 255, 0.6);
  box-shadow: 0 0 12px rgba(79, 211, 255, 0.25);
}
.post-stats{
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  font-size: 13px;
  text-align: left;
  border: 1px solid var(--line);
}
.post-stats dt,
.post-stats dd{
  padding: 5px 8px;
  border-top: 1px solid var(--line);
}
.post-stats dt:first-of-type,
.post-stats dd:first-of-type{ border-top: 0; }
.post-stats dt{ color: var(--ink-dim); }
.post-stats dd{ color: var(--ink); text-align: right; }

.post-main{
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.post-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px 0;
}
.post-meta{
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--ink-dim);
}
.post-clock{
  width: 13px; height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  position: relative;
}
.post-clock::after{
  content: "";
  position: absolute; left: 4.5px; top: 2px;
  width: 3px; height: 4px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}
.post-number{
  font-size: 13px;
  color: var(--ink-dim);
  text-decoration: none;
  letter-spacing: 1px;
}
.post-number:hover{ color: var(--glow-2); }

.post-body{
  flex: 1;
  padding: 16px 22px 26px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.post-foot{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  background: rgba(4, 28, 48, 0.5);
}
.like-btn{
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px;
  font: inherit; font-size: 14px;
  color: var(--ink-dim);
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.like-btn:hover:not(:disabled){ color: var(--glow); border-color: var(--line); }
.like-btn:disabled{ cursor: default; opacity: .75; }
.like-heart{ font-size: 17px; line-height: 1; }
.like-btn.is-liked{ color: var(--glow); }
.like-btn.is-liked .like-heart{ color: var(--glow); text-shadow: 0 0 10px rgba(79, 211, 255, 0.6); }

.post-edited{ font-style: italic; }
.post-foot[hidden]{ display: none; }
.post-action{
  padding: 4px 10px;
  font: inherit; font-size: 12px; letter-spacing: 1.2px;
  color: var(--ink-dim);
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
}
.post-action:hover{ color: var(--glow-2); border-color: var(--glow); }
.post-edit{ flex: 1; padding: 6px 22px 22px; }
.post-edit .field:first-child{ margin-top: 10px; }
.post-edit-actions{ display: flex; gap: 10px; margin-top: 16px; }

.post-delete{
  margin-left: auto;
  padding: 4px 10px;
  font: inherit; font-size: 12px; letter-spacing: 1.2px;
  color: var(--ink-dim);
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
}
.post-delete:hover{ color: #ffb8ad; border-color: rgba(255, 120, 100, 0.7); }

/* ---------- Formatting inside posts ---------- */
.fmt-u{ text-decoration: underline; }
.fmt-center{ display: block; text-align: center; }
.fmt-size-small{ font-size: 0.85em; }
.fmt-size-normal{ font-size: 1rem; }
.fmt-size-large{ font-size: 1.35em; line-height: 1.4; }
.fmt-size-huge{ font-size: 1.85em; line-height: 1.25; }
.fmt-font-default{ font-family: var(--body); }
.fmt-font-display{ font-family: var(--display); letter-spacing: 1px; }
.fmt-font-serif{ font-family: Georgia, "Times New Roman", serif; }
.fmt-font-mono{ font-family: "Courier New", ui-monospace, monospace; }
.fmt-font-aurebesh{ font-family: "Aurebesh", sans-serif; letter-spacing: 2px; }
.post-img{
  display: inline-block;
  max-width: 100%;
  margin: 6px 0;
  vertical-align: top;
  border: 1px solid var(--line);
}
.post-img img{ max-height: 480px; width: auto; }
.post-img:hover{ border-color: var(--glow); }

/* ---------- Post editor ---------- */
.field > label{ display: block; }
.field > label > span{
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.editor{ border: 1px solid var(--line); background: var(--void); }
.editor:focus-within{ border-color: rgba(79, 211, 255, 0.6); }
.editor textarea{ display: block; border: 0; }
.editor textarea[hidden], .ed-preview[hidden]{ display: none; }
.editor textarea.is-drop{ outline: 2px dashed var(--glow); outline-offset: -8px; }
.ed-toolbar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 51, 84, 0.35);
}
.ed-group{ display: flex; align-items: center; gap: 4px; }
.ed-btn,
.ed-select{
  height: 32px;
  min-width: 32px;
  padding: 0 9px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--hull);
  border: 1px solid var(--line);
  cursor: pointer;
}
.ed-btn:hover,
.ed-select:hover{ border-color: var(--glow); color: var(--glow-2); }
.ed-select{ padding-right: 4px; }
.ed-select option{ background: var(--hull); color: var(--ink); }
.ed-img-btn{ color: var(--glow-2); }
.ed-preview-btn{ margin-left: auto; letter-spacing: 1px; }
.ed-preview-btn.is-on{ border-color: var(--glow); color: var(--glow-2); }
.ed-color-wrap{ position: relative; }
.ed-color-icon{
  font-weight: 700;
  border-bottom: 3px solid;
  border-image: linear-gradient(90deg, #ff5a4f, #ffe65c, #5be37d, #4fd3ff, #b98cff) 1;
  padding: 0 2px;
}
.ed-colors{
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  width: 196px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 10px;
  background: var(--hull);
  border: 1px solid var(--glow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.ed-colors[hidden]{ display: none; }
.ed-swatch{
  width: 24px; height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
}
.ed-swatch:hover{ outline: 2px solid var(--glow-2); outline-offset: 1px; }
.ed-custom{
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px;
  font-size: 13px; color: var(--ink-dim);
}
.ed-custom input{ width: 44px; height: 26px; padding: 0; background: none; border: 1px solid var(--line); cursor: pointer; }
.ed-preview{
  min-height: 140px;
  background: rgba(7, 23, 38, 0.96);
}
.ed-preview .post-body{ padding: 14px; }
.ed-empty{ padding: 14px; color: var(--ink-dim); }
.ed-status{ color: var(--glow-2); }

/* Page numbers on a board */
.pager{
  margin-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pager-info{ font-size: 14px; color: var(--ink-dim); }

@media (max-width: 700px){
  .thread-row{ grid-template-columns: auto 1fr; }
  /* Author panel becomes a compact strip above the message */
  .post{ grid-template-columns: 1fr; }
  .post-author-panel{
    display: grid;
    grid-template-columns: 56px 1fr;
    grid-template-areas: "avatar name" "avatar role" "stats stats";
    align-items: center;
    gap: 2px 12px;
    padding: 14px 16px;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .post-author{ grid-area: name; }
  .post-avatar{ grid-area: avatar; width: 56px; height: 56px; margin: 0; }
  .post-avatar .avatar{ font-size: 22px; }
  .role-chip{ grid-area: role; justify-self: start; margin-top: 2px; }
  .post-stats{ grid-area: stats; margin-top: 10px; grid-template-columns: repeat(3, auto 1fr); }
  .post-stats dt, .post-stats dd{ border-top: 0; }
  .post-head, .post-body, .post-foot, .post-edit{ padding-left: 16px; padding-right: 16px; }
  .ed-preview-btn{ margin-left: 0; }
  .board{
    grid-template-columns: auto auto 1fr;
    gap: 12px 22px;
  }
  .board-main{ grid-column: 1 / -1; }
  .board-stat{ text-align:left; }
  .board-latest{ text-align:right; }
}

/* ---------- Footer ---------- */
.site-foot{
  border-top: 1px solid var(--line);
  padding: 28px clamp(20px, 5vw, 40px);
  text-align:center;
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 1px;
}

/* ============================================================
   RESPONSIVE + MOTION
   ============================================================ */
@media (max-width: 620px){
  .topbar{ justify-content:center; }
  .topbar nav a{ padding: 12px 0; }
  .page{ padding-top: calc(var(--bar) + 90px); }
  /* On phones the menu wraps onto several rows, so on content pages the bar
     scrolls in place above the content instead of floating over the title */
  body.doc .topbar{ position: sticky; }
  body.doc .page{ padding-top: 40px; }
  .title-main{ letter-spacing: 3px; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .warp-field, .beam, .title-main{ animation: none !important; }
  /* Freeze the stars at full brightness instead of blinking */
  body.doc::before, body.doc::after{
    animation: none !important;
    opacity: 0.8;
  }
}