:root {
  --ely-bg: #050b14;
  --ely-panel: rgba(11, 24, 38, .92);
  --ely-panel-2: rgba(16, 34, 52, .86);
  --ely-line: rgba(57, 204, 255, .26);
  --ely-cyan: #32d3ff;
  --ely-blue: #69b9ff;
  --ely-gold: #d5a43b;
  --ely-green: #4ee18c;
  --ely-text: #edf7ff;
  --ely-muted: #92a8ba;
  --ely-shadow: 0 18px 60px rgba(0,0,0,.34);
}

html, body { background: var(--ely-bg) !important; color: var(--ely-text); }
body {
  background-image:
    radial-gradient(circle at 18% -10%, rgba(35, 113, 171, .22), transparent 34rem),
    radial-gradient(circle at 88% 0%, rgba(98, 55, 145, .16), transparent 30rem),
    linear-gradient(180deg, #06101d 0, #050b14 42rem, #040912 100%);
  background-attachment: fixed;
}
body, input, textarea, select, button { font-family: "Be Vietnam Pro", system-ui, sans-serif; }
a { color: var(--ely-cyan); }
a:hover { color: #fff; }

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 10, 18, .90) !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ely-line);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
header .wrapper { max-width: 1500px; width: calc(100% - 44px); min-height: 78px; display: flex; align-items: center; gap: 22px; }
header .logo { width: auto !important; min-width: 250px; display: flex; align-items: center; }
header .logo img { max-height: 54px; width: auto; }
header .nav-main { flex: 1; }
header .nav-main ul { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
header .nav-main li a { color: #cbdbe7 !important; font-size: .82rem; letter-spacing: .045em; text-transform: uppercase; padding: 12px 14px !important; border-radius: 6px; }
header .nav-main li a:hover, header .nav-main .active a { color: white !important; background: rgba(50,211,255,.10); box-shadow: inset 0 -2px 0 var(--ely-cyan); }
.signin { border: 1px solid rgba(213,164,59,.55) !important; color: #f3c662 !important; background: rgba(213,164,59,.06) !important; }

body > .wrapper { max-width: 1500px !important; width: calc(100% - 44px) !important; }
main { background: transparent !important; box-shadow: none !important; }
.nav-sub { margin: 18px 0 0; border: 1px solid var(--ely-line); border-radius: 8px; background: rgba(7,18,30,.82); overflow: hidden; }
.nav-sub ul { display: flex; flex-wrap: wrap; gap: 0; }
.nav-sub li a { color: #b8cad9 !important; padding: 10px 15px !important; display: block; }
.nav-sub li a:hover { color: white !important; background: rgba(50,211,255,.08); }
.content { background: transparent !important; padding: 22px 0 0 !important; }
.content > h1.page-head { color: var(--ely-text) !important; }

/* Homepage */
.ely-home { margin-top: -6px; }
.ely-hero {
  min-height: 470px;
  border: 1px solid var(--ely-line);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  background: #07111e url('../images/hero-elysium.jpg') center right/cover no-repeat;
  box-shadow: var(--ely-shadow);
}
.ely-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(3,8,16,.98) 0%, rgba(3,8,16,.82) 33%, rgba(3,8,16,.22) 64%, rgba(3,8,16,.08) 100%), linear-gradient(0deg, rgba(3,8,16,.72), transparent 48%);
}
.ely-hero-copy { position: relative; z-index: 2; padding: 54px; max-width: 690px; }
.ely-kicker { color: var(--ely-cyan); font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; }
.ely-hero h1 { margin: 8px 0 0; color: #fff !important; font-size: clamp(3rem, 7vw, 6.4rem); line-height: .9; letter-spacing: -.045em; font-weight: 700; text-shadow: 0 8px 35px rgba(0,0,0,.5); }
.ely-registry { color: var(--ely-gold); margin-top: 10px; font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: .06em; }
.ely-quote { margin: 28px 0 0; color: #dbeaf5; font-size: 1rem; font-style: italic; }
.ely-quote span { color: var(--ely-cyan); font-style: normal; }

.ely-status { margin: 14px 0 22px; overflow: hidden; border: 1px solid rgba(50,211,255,.35); background: rgba(6,18,31,.94); clip-path: polygon(1.2% 0, 98.8% 0, 100% 50%, 98.8% 100%, 1.2% 100%, 0 50%); }
.ely-status-track { display: flex; width: max-content; padding: 12px 0; animation: elyTicker 34s linear infinite; }
.ely-status:hover .ely-status-track { animation-play-state: paused; }
.ely-status-item { padding: 0 28px; white-space: nowrap; color: #c7dfec; text-transform: uppercase; font-size: .76rem; letter-spacing: .10em; border-right: 1px solid rgba(50,211,255,.22); }
.ely-status-item strong { color: var(--ely-cyan); }
.ely-status-item.operational strong { color: var(--ely-green); }
.ely-status-item.mission strong { color: var(--ely-gold); }
@keyframes elyTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.ely-grid { display: grid; grid-template-columns: 1.08fr 1.92fr; gap: 18px; }
.ely-panel { background: linear-gradient(180deg, rgba(13,29,46,.95), rgba(8,19,31,.95)); border: 1px solid var(--ely-line); border-radius: 10px; box-shadow: 0 10px 35px rgba(0,0,0,.20); overflow: hidden; }
.ely-panel-head { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; color: var(--ely-cyan); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; border-bottom: 1px solid var(--ely-line); background: rgba(10,31,50,.78); }
.ely-panel-head a { font-size: .68rem; letter-spacing: .08em; }
.ely-panel-body { padding: 18px; }

.ely-mission-card { min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; background: radial-gradient(circle at 76% 20%, rgba(213,164,59,.15), transparent 38%), linear-gradient(150deg, #0c2436 0%, #102a36 42%, #07131e 100%); }
.ely-mission-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4,10,17,.96), rgba(4,10,17,.28) 64%); }
.ely-mission-copy { position: relative; z-index: 2; padding: 28px; }
.ely-mission-copy h2 { color: var(--ely-gold) !important; font-size: clamp(2rem,4vw,3.3rem); line-height: .96; text-transform: uppercase; margin: 0 0 16px; }
.ely-mission-copy p { max-width: 590px; color: #d7e7f1; }
.ely-button { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 14px; border-radius: 6px; border: 1px solid rgba(50,211,255,.5); background: rgba(50,211,255,.08); color: #aeeeff !important; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; }
.ely-button:hover { background: rgba(50,211,255,.16); color: white !important; }

.ely-spotlight-controls { display: flex; gap: 6px; padding: 12px 16px 0; }
.ely-spotlight-tab { cursor: pointer; border: 1px solid var(--ely-line); border-radius: 999px; padding: 7px 11px; color: #abc0cf; background: rgba(8,20,33,.8); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.ely-spotlight-tab.is-active { color: #fff; border-color: rgba(50,211,255,.6); background: rgba(50,211,255,.12); }
.ely-carousel-shell { position: relative; padding: 12px 46px 18px; }
.ely-carousel { display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.ely-carousel::-webkit-scrollbar { display: none; }
.ely-char-card { flex: 0 0 190px; min-height: 300px; border: 1px solid rgba(50,211,255,.18); border-radius: 8px; background: #08141f; overflow: hidden; transition: transform .18s ease, border-color .18s ease; }
.ely-char-card:hover { transform: translateY(-4px); border-color: rgba(50,211,255,.65); }
.ely-char-card img { width: 100%; height: 190px; object-fit: cover; display: block; background: #0a1824; }
.ely-char-card-copy { padding: 12px; }
.ely-char-name { color: #fff; font-size: .86rem; font-weight: 700; line-height: 1.2; text-transform: uppercase; }
.ely-char-role { margin-top: 5px; color: var(--ely-cyan); font-size: .65rem; line-height: 1.35; text-transform: uppercase; }
.ely-char-meta { margin-top: 7px; color: var(--ely-muted); font-size: .65rem; }
.ely-carousel-btn { position: absolute; z-index: 4; top: 45%; width: 32px; height: 52px; border: 0; background: rgba(4,11,19,.88); color: #bdefff; font-size: 1.8rem; cursor: pointer; }
.ely-carousel-btn.prev { left: 8px; }
.ely-carousel-btn.next { right: 8px; }
.ely-loading { padding: 28px; color: var(--ely-muted); }

.ely-lower { display: grid; grid-template-columns: 1fr 1fr .95fr; gap: 18px; margin-top: 18px; }
.ely-feed { list-style: none; margin: 0; padding: 0; }
.ely-feed li { padding: 12px 0; border-bottom: 1px solid rgba(50,211,255,.12); }
.ely-feed li:last-child { border-bottom: 0; }
.ely-feed-title { display: block; color: #edf8ff !important; font-weight: 600; }
.ely-feed-meta { margin-top: 5px; color: var(--ely-muted); font-size: .68rem; }
.ely-feed-preview { margin-top: 6px; color: #b8cad8; font-size: .75rem; line-height: 1.5; }
.ely-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ely-quick a { min-height: 92px; display: grid; place-items: center; text-align: center; border: 1px solid var(--ely-line); border-radius: 8px; color: #d5e9f5 !important; background: rgba(7,20,33,.72); text-transform: uppercase; font-size: .70rem; letter-spacing: .08em; }
.ely-quick a:hover { background: rgba(50,211,255,.08); border-color: rgba(50,211,255,.55); }

/* General NOVA interior pages */
.content > :not(.ely-home) { max-width: 1180px; }
h1.page-head, h2.page-subhead, h3, h4 { color: #edf7ff; }
h1.page-head { border-bottom: 1px solid var(--ely-line); padding-bottom: 12px; }
table { color: #dbe8f1; }
.table100, .zebra { background: rgba(8,19,31,.62); border: 1px solid rgba(50,211,255,.12); border-radius: 8px; overflow: hidden; }
.zebra tr:nth-child(even), .manifest_table tr:nth-child(even) { background: rgba(50,211,255,.035); }
input, textarea, select { background: #081520 !important; color: #edf7ff !important; border: 1px solid rgba(50,211,255,.22) !important; }
.ui-tabs .ui-tabs-nav { background: rgba(7,18,30,.8) !important; border-color: var(--ely-line) !important; }

footer { margin-top: 34px !important; border-top: 1px solid var(--ely-line) !important; color: #7690a2 !important; }

@media (max-width: 1050px) {
  header .wrapper { width: calc(100% - 24px); }
  header .logo { min-width: 190px; }
  .ely-grid, .ely-lower { grid-template-columns: 1fr; }
  .ely-hero { min-height: 420px; background-position: 62% center; }
  .ely-hero-copy { padding: 38px; }
}
@media (max-width: 760px) {
  header { position: relative; }
  header .wrapper { display: block; padding: 14px 0; }
  header .logo { margin-bottom: 10px; }
  header .nav-main ul { gap: 2px; }
  header .nav-main li a { padding: 8px 9px !important; font-size: .70rem; }
  body > .wrapper { width: calc(100% - 20px) !important; }
  .ely-hero { min-height: 390px; background-position: 67% center; }
  .ely-hero::after { background: linear-gradient(90deg, rgba(3,8,16,.98), rgba(3,8,16,.58)), linear-gradient(0deg, rgba(3,8,16,.75), transparent); }
  .ely-hero-copy { padding: 24px; }
  .ely-char-card { flex-basis: 160px; }
  .ely-char-card img { height: 165px; }
  .ely-carousel-shell { padding-left: 38px; padding-right: 38px; }
  .ely-quick { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ely-status-track { animation: none; }
  * { scroll-behavior: auto !important; }
}


/* Elysium 2400 v2 live-site refinements */
header { padding: 0 !important; }
header > .wrapper { padding-top: 10px !important; padding-bottom: 10px !important; }
body > .wrapper { max-width: 1540px !important; }
main { margin-top: 18px !important; margin-bottom: 3rem; overflow: visible !important; }

/* The homepage replaces NOVA's secondary side navigation with its own quick access. */
main:has(.ely-home) .nav-sub { display: none !important; }
main:has(.ely-home) .content { margin-right: 0 !important; border: 0 !important; padding: 0 !important; }
main:has(.ely-home) { overflow: visible !important; }

.ely-home { width: 100%; margin: 0; }
.ely-hero { min-height: 520px; border-radius: 10px; }
.ely-hero-copy { padding: 58px 64px; }
.ely-status { margin-top: 16px; }

.ely-grid { grid-template-columns: minmax(390px,.9fr) minmax(0,2.1fr); gap: 20px; }
.ely-mission-card { min-height: 430px; }
.ely-mission-copy { padding: 34px; }
.ely-mission-copy p { font-size: .95rem; line-height: 1.65; }

.ely-spotlight-controls { padding: 16px 20px 2px; }
.ely-spotlight-tab { padding: 8px 14px; font-size: .72rem; }
.ely-carousel-shell { padding: 16px 52px 24px; }
.ely-carousel { gap: 16px; }
.ely-char-card { flex: 0 0 235px; min-height: 385px; }
.ely-char-card img { height: 245px; }
.ely-char-card-copy { padding: 14px; }
.ely-char-name { font-size: .94rem; line-height: 1.25; }
.ely-char-role { font-size: .70rem; line-height: 1.45; }
.ely-char-meta { font-size: .68rem; margin-top: 10px; }
.ely-carousel-btn { width: 36px; height: 62px; border: 1px solid rgba(50,211,255,.18); border-radius: 6px; }

.ely-lower { grid-template-columns: 1.15fr 1.15fr .8fr; gap: 20px; margin-top: 20px; }
.ely-panel-head { height: 48px; padding: 0 18px; font-size: .82rem; }
.ely-panel-body { padding: 20px; }
.ely-feed-title { font-size: .9rem; }
.ely-feed-meta { font-size: .72rem; }
.ely-feed-preview { font-size: .80rem; }
.ely-quick a { min-height: 105px; }

@media (max-width: 1200px) {
  .ely-grid { grid-template-columns: 1fr; }
  .ely-mission-card { min-height: 330px; }
  .ely-lower { grid-template-columns: 1fr 1fr; }
  .ely-lower > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  main { margin-top: 8px !important; }
  .ely-hero { min-height: 410px; }
  .ely-hero-copy { padding: 28px; }
  .ely-char-card { flex-basis: 210px; min-height: 350px; }
  .ely-char-card img { height: 220px; }
  .ely-lower { grid-template-columns: 1fr; }
  .ely-lower > :last-child { grid-column: auto; }
}


/* Elysium 2400 v4 — inner-page grid, mission source, and recruitment CTA */
/* All public inner pages now share the same left edge and sidebar geometry. */
main:not(:has(.ely-home)) {
  padding-top: 18px !important;
}
main:not(:has(.ely-home)) .nav-sub {
  float: right !important;
  width: 220px !important;
  margin: 0 0 24px 28px !important;
}
main:not(:has(.ely-home)) .content {
  margin-right: 248px !important;
  padding: 0 !important;
  border: 0 !important;
  min-height: 420px;
}
main:not(:has(.ely-home)) .content > :not(.clear_both) {
  max-width: none !important;
}
main:not(:has(.ely-home)) h1.page-head {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
main:not(:has(.ely-home)) .content img {
  max-width: 100%;
  height: auto;
}

/* NOVA mission tabs and other jQuery UI panels must stay in the Elysium palette. */
#tabs, .ui-tabs, .ui-widget-content {
  background: rgba(8, 21, 32, .94) !important;
  color: var(--ely-text) !important;
  border-color: var(--ely-line) !important;
}
#tabs > ul, .ui-tabs .ui-tabs-nav, .ui-widget-header {
  background: #0b2031 !important;
  border-color: var(--ely-line) !important;
}
#tabs > div, .ui-tabs .ui-tabs-panel {
  background: #0b1a29 !important;
  color: #dceaf2 !important;
  border-color: var(--ely-line) !important;
}
#tabs h3, #tabs h3 a { color: var(--ely-cyan) !important; }
#tabs .gray, #tabs .fontSmall { color: #91a9b8 !important; }

/* Keep prose readable and visually aligned on Sim / Wiki-style content pages. */
.content p { line-height: 1.58; }
.content .center, .content [align="center"] { margin-left: auto; margin-right: auto; }

/* Recruitment call-to-action: full width under the 2-column Quick Access grid. */
.ely-quick .ely-join {
  grid-column: 1 / -1;
  min-height: 74px;
  color: #f3c55e !important;
  border-color: rgba(216,161,38,.72) !important;
  background: linear-gradient(90deg, rgba(216,161,38,.08), rgba(216,161,38,.16), rgba(216,161,38,.08));
  font-size: .82rem;
  font-weight: 700;
}
.ely-quick .ely-join:hover {
  color: #fff3ce !important;
  border-color: var(--ely-gold) !important;
  background: rgba(216,161,38,.20);
}

@media (max-width: 980px) {
  main:not(:has(.ely-home)) .nav-sub {
    float: none !important;
    width: 100% !important;
    margin: 0 0 18px !important;
  }
  main:not(:has(.ely-home)) .content { margin-right: 0 !important; }
}
@media (max-width: 760px) {
  .ely-quick .ely-join { grid-column: auto; }
}

/* Elysium 2400 v5 — stable inner-page grid and alignment */
body > .wrapper { width: min(1540px, calc(100% - 42px)) !important; margin-left:auto !important; margin-right:auto !important; }
main:not(:has(.ely-home)) {
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) 230px !important;
  grid-template-areas:"content sidebar" "footer footer" !important;
  gap:28px !important;
  align-items:start !important;
  padding-top:28px !important;
  overflow:visible !important;
}
main:not(:has(.ely-home)) > .content {
  grid-area:content !important;
  width:auto !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  float:none !important;
  overflow:visible !important;
}
main:not(:has(.ely-home)) > .nav-sub {
  grid-area:sidebar !important;
  position:relative !important;
  width:230px !important;
  min-width:0 !important;
  margin:0 !important;
  float:none !important;
  box-sizing:border-box !important;
}
main:not(:has(.ely-home)) > footer { grid-area:footer !important; width:100% !important; }
main:not(:has(.ely-home)) .page-head,
main:not(:has(.ely-home)) h1:first-child {
  margin-top:0 !important;
  padding-top:0 !important;
  line-height:1.15 !important;
}
main:not(:has(.ely-home)) .content > img,
main:not(:has(.ely-home)) .content p img,
main:not(:has(.ely-home)) .content div img { max-width:100% !important; height:auto !important; }
/* Legacy centred SIM images should centre inside the content column, not the old NOVA canvas. */
main:not(:has(.ely-home)) .content img[style*="display: block"],
main:not(:has(.ely-home)) .content .center img { margin-left:auto !important; margin-right:auto !important; }
/* Quick Access recruitment CTA */
.ely-quick > a.ely-join { grid-column:1 / -1 !important; width:100% !important; box-sizing:border-box !important; }

@media (max-width:980px) {
  main:not(:has(.ely-home)) {
    grid-template-columns:1fr !important;
    grid-template-areas:"content" "sidebar" "footer" !important;
    gap:18px !important;
  }
  main:not(:has(.ely-home)) > .nav-sub { width:100% !important; }
}


/* Elysium 2400 v6 — combined random Character Spotlight */
.ely-spotlight-note {
  padding: 14px 20px 0;
  color: #8da5b5;
  font-size: .78rem;
  letter-spacing: .025em;
}
.ely-char-source {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 7px;
  border: 1px solid rgba(216,161,38,.45);
  border-radius: 999px;
  color: #e4bd5f;
  background: rgba(216,161,38,.08);
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
