:root {
  --bg: #050505;
  --bg-2: #0b0b0d;
  --panel: #111114;
  --panel-2: #171719;
  --paper: #e8e2d5;
  --paper-dim: #b7b0a3;
  --text: #f4f1e8;
  --muted: #aaa39a;
  --line: rgba(245, 178, 27, 0.35);
  --line-soft: rgba(255, 255, 255, 0.11);
  --yellow: #f5b21b;
  --yellow-2: #ffcc27;
  --blue: #0b2e75;
  --blue-bright: #2f6dff;
  --white: #ffffff;
  --red: #9e1c24;
  --red-bright: #d33a31;
  --gold: #d7a93b;
  --black: #050505;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 20px;
  --mono: "Rajdhani", "Arial Narrow", "Segoe UI", sans-serif;
  --body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background:
    radial-gradient(circle at 16% 12%, rgba(11,46,117,0.45), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(245,178,27,0.08), transparent 32%),
    linear-gradient(180deg, #030303 0%, #0b0b0d 40%, #050505 100%);
  line-height: 1.65;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 75%, transparent 100%);
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }
::selection { background: var(--yellow); color: #000; }

.wrap {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(5,5,5,0.82);
  backdrop-filter: blur(16px);
}
.nav {
  height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand-mark {
  width: 42px;
  height: 42px;
  background:
    linear-gradient(135deg, transparent 0 28%, var(--yellow) 28% 42%, transparent 42% 58%, var(--yellow) 58% 72%, transparent 72%),
    #101010;
  border: 1px solid var(--yellow);
  box-shadow: 0 0 0 4px rgba(245,178,27,0.08);
}
.brand small {
  display: block;
  color: var(--yellow);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}
.navlinks {
  display: flex;
  align-items: center;
  gap: 6px;
}
.navlinks a {
  text-decoration: none;
  color: var(--paper-dim);
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.navlinks a:hover,
.navlinks a.active {
  color: var(--yellow);
  border-color: var(--line);
  background: rgba(245,178,27,0.08);
}
.nav-toggle { display: none; }

.hero {
  position: relative;
  padding: 96px 0 60px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 46vw;
  height: 46vw;
  max-width: 760px;
  max-height: 760px;
  min-width: 360px;
  min-height: 360px;
  background: radial-gradient(circle, rgba(245,178,27,0.13), transparent 68%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(320px, 0.86fr);
  gap: 36px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--yellow);
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.86rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 10px;
  background: repeating-linear-gradient(135deg, var(--yellow) 0 6px, transparent 6px 12px);
}
h1, h2, h3, h4 {
  font-family: var(--mono);
  line-height: 1.05;
  margin: 0;
  text-transform: uppercase;
}
h1 {
  font-size: clamp(3.3rem, 9vw, 8.5rem);
  letter-spacing: -0.045em;
  margin: 20px 0 20px;
}
h1 span { color: var(--yellow); }
.lead {
  max-width: 760px;
  font-size: clamp(1.06rem, 2vw, 1.28rem);
  color: var(--paper-dim);
  margin: 0 0 28px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 0;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  text-decoration: none;
  border-radius: 0;
  border: 1px solid var(--line);
  color: var(--paper);
  background: #0a0a0a;
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--yellow); color: #050505; border-color: var(--yellow); }
.btn.red { background: var(--red); color: white; border-color: var(--red-bright); }
.btn.blue { background: var(--blue); color: white; border-color: var(--blue-bright); }
.btn.ghost { background: transparent; }

.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(23,23,25,.96), rgba(10,10,10,.96));
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
  padding: 26px;
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}
.panel::before {
  content: attr(data-label);
  display: block;
  color: var(--yellow);
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 18px;
}
.panel-lines {
  display: grid;
  gap: 14px;
}
.line-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.line-row:last-child { border-bottom: 0; padding-bottom: 0; }
.line-row strong {
  font-family: var(--mono);
  text-transform: uppercase;
  color: var(--paper);
  letter-spacing: .08em;
}
.line-row span {
  color: var(--muted);
  text-align: right;
}
.copy-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(245,178,27,0.08);
  color: var(--yellow);
  padding: 6px 9px;
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: .04em;
}
.copy-chip.copied { color: #000; background: var(--yellow); }

.section { padding: 72px 0; }
.section.tight { padding: 48px 0; }
.section-head {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
}
.section-number {
  color: #060606;
  background: var(--yellow);
  width: max-content;
  min-width: 96px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 900;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%);
}
.section h2 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  letter-spacing: -0.035em;
}
.section-intro {
  max-width: 850px;
  color: var(--paper-dim);
  margin: 14px 0 0;
  font-size: 1.06rem;
}
.section-intro p { margin: 0; }
.section-intro p + p { margin-top: 10px; }
.starmap-intro { max-width: 940px; }
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.card {
  background: rgba(17,17,20,.88);
  border: 1px solid var(--line-soft);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: var(--yellow);
  opacity: .75;
}
.card h3 { font-size: 1.45rem; color: var(--yellow); margin-bottom: 10px; }
.card p { color: var(--paper-dim); margin: 0; }
.card .meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .82rem;
}

.zone-card { min-height: 285px; }
.zone-card.safe::after { background: var(--yellow); }
.zone-card.limited::after { background: #ce8b24; }
.zone-card.deep::after { background: #8d8d8d; }
.zone-facts {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 8px;
}
.zone-facts li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 8px;
  color: var(--paper-dim);
}
.zone-facts b { color: var(--paper); font-family: var(--mono); text-transform: uppercase; }

.faction-card {
  display: grid;
  min-height: 410px;
  padding: 0;
  background: #101010;
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.faction-card .stripe {
  height: 13px;
  background: var(--yellow);
}
.faction-card .body { padding: 24px; }
.faction-card h3 { font-size: 2rem; }
.faction-card .role {
  margin: 8px 0 18px;
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.faction-card p { color: var(--paper-dim); }
.faction-card .quote {
  margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,.13);
  padding-top: 16px;
  font-family: var(--mono);
  font-weight: 900;
  color: var(--paper);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.faction-card.titan { background: linear-gradient(160deg, #050505, #151515); }
.faction-card.titan .stripe { background: repeating-linear-gradient(135deg, var(--yellow) 0 12px, #050505 12px 24px); }
.faction-card.vachar { background: linear-gradient(160deg, #071735, #0b2e75); border-color: rgba(215,233,255,.25); }
.faction-card.vachar .stripe { background: linear-gradient(90deg, #fff, #d7a93b, #fff); }
.faction-card.vachar h3 { color: #fff; }
.faction-card.noricum { background: linear-gradient(160deg, #160606, #9e1c24); border-color: rgba(215,169,59,.35); }
.faction-card.noricum .stripe { background: linear-gradient(90deg, #d7a93b, #050505, #d7a93b); }
.faction-card.noricum h3 { color: #f1c667; }
.faction-image {
  height: 175px;
  object-fit: cover;
  width: 100%;
  opacity: .72;
  filter: contrast(1.05) saturate(.9);
}

.manual {
  background:
    linear-gradient(90deg, #050505 0 56px, transparent 56px),
    linear-gradient(180deg, rgba(232,226,213,.96), rgba(232,226,213,.9));
  color: #090909;
  border: 1px solid rgba(245,178,27,.45);
  padding: 28px 28px 28px 86px;
  position: relative;
  box-shadow: var(--shadow);
}
.manual::before {
  content: "// SERVER BRIEFING";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  color: #fff;
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: .12em;
  white-space: nowrap;
}
.manual::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 98px;
  background: repeating-linear-gradient(135deg, var(--yellow) 0 12px, #050505 12px 24px);
}
.manual h3 { color: #050505; font-size: 1.9rem; margin-bottom: 12px; }
.manual p { color: #252525; margin: 0; }
.manual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.manual-field {
  border-top: 2px solid #111;
  padding-top: 10px;
  font-family: var(--mono);
  text-transform: uppercase;
  font-weight: 900;
  color: #111;
}
.manual-field span { display: block; color: #555; font-size: .82rem; letter-spacing: .08em; }

.rule-list {
  display: grid;
  gap: 14px;
  counter-reset: rule;
}
.rule {
  counter-increment: rule;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 18px;
  padding: 20px;
  background: rgba(17,17,20,.88);
  border: 1px solid var(--line-soft);
}
.rule::before {
  content: counter(rule, decimal-leading-zero);
  color: #050505;
  background: var(--yellow);
  height: 52px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 900;
}
.rule h3 { color: var(--paper); margin-bottom: 6px; font-size: 1.25rem; }
.rule p { color: var(--paper-dim); margin: 0; }

.map-frame-wrap {
  border: 1px solid var(--line);
  background: #050505;
  box-shadow: var(--shadow);
  padding: 10px;
}
.map-frame {
  width: 100%;
  height: min(78vh, 820px);
  min-height: 560px;
  border: 0;
  display: block;
  background: #000;
}
.map-page .map-frame { height: calc(100vh - 230px); min-height: 620px; }

.cta {
  padding: 72px 54px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 70% 20%, rgba(245,178,27,.18), transparent 38%),
    linear-gradient(135deg, #111114, #050505);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before,
.cta::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 16px;
  background: repeating-linear-gradient(135deg, rgba(245,178,27,.82) 0 12px, rgba(5,5,5,.88) 12px 24px);
  opacity: .78;
  pointer-events: none;
}
.cta::before { top: 0; }
.cta::after { bottom: 0; }
.cta > * { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(2rem, 5vw, 4rem); }
.cta p { color: var(--paper-dim); max-width: 750px; margin: 14px auto 0; }

.subpage-hero {
  padding: 74px 0 36px;
  border-bottom: 1px solid var(--line-soft);
}
.subpage-hero h1 { font-size: clamp(3rem, 8vw, 6.5rem); }
.breadcrumb {
  color: var(--yellow);
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.footer {
  border-top: 1px solid var(--line-soft);
  padding: 42px 0;
  color: var(--muted);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.footer .brand-mark { width: 32px; height: 32px; }
.footer a { color: var(--yellow); text-decoration: none; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 960px) {
  .hero-grid, .grid-3, .grid-2, .section-head, .manual-grid { grid-template-columns: 1fr; }
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--yellow);
  }
  .navlinks {
    position: fixed;
    left: 18px;
    right: 18px;
    top: 84px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: rgba(5,5,5,.96);
    border: 1px solid var(--line);
    padding: 12px;
    box-shadow: var(--shadow);
  }
  .navlinks.open { display: flex; }
  .navlinks a { border-radius: 0; }
  .hero { padding-top: 62px; }
  .panel { clip-path: none; }
  .manual { padding-left: 78px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .wrap { width: min(100% - 24px, 1180px); }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
  .hero-grid { gap: 24px; }
  .hero { padding: 50px 0 40px; }
  .section { padding: 54px 0; }
  .manual { padding: 24px; }
  .manual::before, .manual::after { display: none; }
  .rule { grid-template-columns: 1fr; }
  .cta { padding: 54px 18px; }
}


/* --- Faction emblems and Story Board additions --- */
.faction-emblem {
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 22px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  position: relative;
  overflow: hidden;
}
.faction-emblem::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.13) 1px, transparent 1px);
  background-size: 28px 28px;
}
.faction-emblem img {
  position: relative;
  z-index: 1;
  width: 158px;
  height: 158px;
  object-fit: contain;
  filter: drop-shadow(0 20px 36px rgba(0,0,0,.48));
}
.faction-card.vachar .faction-emblem { background: #1b00ff; }
.faction-card.titan .faction-emblem { background: #000; }
.faction-card.noricum .faction-emblem { background: #bd1a20; }
.faction-card.titan .faction-emblem img { width: 170px; height: 170px; }
.faction-card .body p + p { margin-top: 12px; }

.story-feed {
  display: grid;
  gap: 24px;
}
.story-entry {
  display: grid;
  grid-template-columns: 70px minmax(220px, 320px) minmax(0, 1fr);
  min-height: 280px;
  background:
    linear-gradient(90deg, #050505 0 70px, transparent 70px),
    linear-gradient(180deg, rgba(232,226,213,.97), rgba(232,226,213,.9));
  color: #080808;
  border: 1px solid rgba(245,178,27,.48);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.story-entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 70px;
  height: 110px;
  background: repeating-linear-gradient(135deg, var(--yellow) 0 12px, #050505 12px 24px);
}
.story-rail {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  z-index: 1;
  padding: 20px 0;
}
.story-visual {
  display: grid;
  place-items: center;
  padding: 28px;
  border-right: 2px solid #111;
  background:
    radial-gradient(circle at 50% 50%, rgba(245,178,27,.16), transparent 58%),
    rgba(0,0,0,.88);
}
.story-visual img {
  max-width: 230px;
  max-height: 230px;
  width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.5));
}
.story-copy {
  padding: 26px 30px 30px;
}
.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.story-meta span,
.story-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  background: #050505;
  color: var(--yellow);
  font-family: var(--mono);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
}
.story-copy h2 {
  color: #050505;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  margin-bottom: 12px;
  border-bottom: 3px solid #111;
  padding-bottom: 10px;
}
.story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}
.story-tags span {
  background: rgba(0,0,0,.08);
  color: #222;
  border: 1px solid rgba(0,0,0,.18);
}
.story-copy p {
  color: #242424;
  margin: 0 0 14px;
}
.story-copy p:last-child { margin-bottom: 0; }
code {
  color: var(--yellow);
  background: rgba(245,178,27,.08);
  border: 1px solid rgba(245,178,27,.28);
  padding: 2px 6px;
}
@media (max-width: 900px) {
  .story-entry { grid-template-columns: 1fr; }
  .story-entry::before { width: 110px; height: 38px; }
  .story-rail { writing-mode: horizontal-tb; transform: none; justify-content: flex-start; padding: 10px 18px; background: #050505; }
  .story-visual { border-right: 0; border-bottom: 2px solid #111; }
}


/* --- V3 layout fixes: vertical manual labels + complete clipped button borders --- */
.manual {
  background:
    linear-gradient(90deg, #050505 0 72px, transparent 72px),
    linear-gradient(180deg, rgba(232,226,213,.96), rgba(232,226,213,.9));
  padding-left: 108px;
  overflow: hidden;
}
.manual::before {
  content: attr(data-manual-label);
  position: absolute;
  left: 0;
  top: 112px;
  bottom: 0;
  width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  color: #fff;
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: none;
  z-index: 2;
  overflow: hidden;
}
.manual:not([data-manual-label])::before {
  content: "// SERVER BRIEFING";
}
.manual::after {
  left: 0;
  top: 0;
  width: 72px;
  height: 112px;
  z-index: 1;
}

.story-entry {
  grid-template-columns: 86px minmax(220px, 320px) minmax(0, 1fr);
  background:
    linear-gradient(90deg, #050505 0 86px, transparent 86px),
    linear-gradient(180deg, rgba(232,226,213,.97), rgba(232,226,213,.9));
}
.story-entry::before {
  width: 86px;
}
.story-rail {
  width: 86px;
  min-width: 86px;
  align-self: stretch;
  justify-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 0;
  overflow: hidden;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: none;
  line-height: 1;
  text-align: center;
}

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  background: transparent;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.btn::before,
.btn::after {
  content: "";
  position: absolute;
  clip-path: inherit;
  pointer-events: none;
}
.btn::before {
  inset: 0;
  z-index: -2;
  background: var(--yellow);
}
.btn::after {
  inset: 1px;
  z-index: -1;
  background: #0a0a0a;
}
.btn.primary::after { background: var(--yellow); }
.btn.red::before { background: var(--red-bright); }
.btn.red::after { background: var(--red); }
.btn.blue::before { background: var(--blue-bright); }
.btn.blue::after { background: var(--blue); }
.btn.ghost::after { background: rgba(5,5,5,.72); }
.btn.primary { color: #050505; }
.btn.red,
.btn.blue,
.btn.ghost,
.btn:not(.primary) { color: var(--paper); }

@media (max-width: 960px) {
  .manual {
    padding-left: 108px;
  }
}

@media (max-width: 900px) {
  .story-entry {
    grid-template-columns: 1fr;
    background: linear-gradient(180deg, rgba(232,226,213,.97), rgba(232,226,213,.9));
  }
  .story-entry::before {
    width: 112px;
    height: 42px;
  }
  .story-rail {
    width: auto;
    min-width: 0;
    min-height: 46px;
    padding: 10px 18px;
    justify-content: flex-start;
    background: #050505;
    writing-mode: horizontal-tb;
    transform: none;
  }
}

@media (max-width: 560px) {
  .manual {
    padding-left: 24px;
  }
  .manual::before,
  .manual::after {
    display: none;
  }
}

/* --- V4 server intel: live status, registration link, player slots, launch countdown --- */
.server-intel-panel {
  min-height: auto;
}
.server-intel-panel .panel-lines {
  gap: 0;
}
.server-intel-panel .line-row {
  padding-top: 11px;
  padding-bottom: 11px;
}
.server-intel-panel .line-row:first-child {
  padding-top: 0;
}
.server-intel-panel .line-row.compact {
  padding-top: 8px;
  padding-bottom: 8px;
}
.server-intel-panel .line-row-heading {
  align-items: center;
  margin: 12px 0 4px;
  padding: 9px 10px;
  border: 1px solid rgba(245,178,27,.42);
  background: rgba(245,178,27,.08);
}
.server-intel-panel .line-row-heading strong,
.server-intel-panel .line-row-heading span {
  color: var(--yellow);
}
.intel-link {
  color: var(--yellow);
  text-decoration: none;
  border-bottom: 1px solid rgba(245,178,27,.55);
  padding-bottom: 2px;
}
.intel-link:hover {
  color: var(--yellow-2);
  border-bottom-color: var(--yellow-2);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: rgba(245,178,27,.08);
  color: var(--yellow);
  font-family: var(--mono);
  font-size: .84rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}
.status-pill.online {
  color: #63ff8d;
  border-color: rgba(99,255,141,.45);
  background: rgba(99,255,141,.08);
}
.status-pill.offline {
  color: #ff6b62;
  border-color: rgba(255,107,98,.45);
  background: rgba(255,107,98,.08);
}
.status-pill.unavailable,
.status-pill.pending {
  color: var(--yellow);
}
.countdown-row {
  align-items: flex-start;
}
.countdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 280px;
}
.countdown-unit {
  min-width: 52px;
  padding: 5px 7px;
  border: 1px solid rgba(245,178,27,.42);
  background: rgba(245,178,27,.08);
  color: var(--yellow);
  text-align: center;
  font-family: var(--mono);
  line-height: 1;
}
.countdown-unit b {
  display: block;
  font-size: 1.05rem;
  line-height: 1.05;
}
.countdown-unit small {
  display: block;
  margin-top: 4px;
  color: var(--paper-dim);
  font-size: .62rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.countdown-ended {
  color: var(--yellow);
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
@media (max-width: 560px) {
  .server-intel-panel .line-row,
  .server-intel-panel .line-row.compact,
  .countdown-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .line-row span,
  .countdown {
    text-align: left;
    justify-content: flex-start;
  }
}

/* --- V5 index fixes: canonical status, compact player roster, launch countdown banner --- */
.hero {
  padding-bottom: 34px;
}

.server-intel-panel .intel-link,
.server-intel-panel .line-row span .intel-link {
  color: var(--yellow) !important;
  text-decoration: none;
  border-bottom: 1px solid rgba(245,178,27,.78);
  padding-bottom: 2px;
}
.server-intel-panel .intel-link:hover,
.server-intel-panel .line-row span .intel-link:hover {
  color: var(--yellow-2) !important;
  border-bottom-color: var(--yellow-2);
}

.server-intel-panel .line-row-heading {
  margin: 10px 0 2px;
  padding: 10px 0 4px;
  border: 0;
  background: transparent;
}
.server-intel-panel .line-row-heading strong {
  color: var(--paper);
}
.server-intel-panel .line-row-heading span {
  color: var(--muted);
}
.server-intel-panel .line-row.player-slot {
  border-bottom: 0;
  padding-top: 4px;
  padding-bottom: 4px;
  line-height: 1.35;
}
.server-intel-panel .line-row.player-slot + .line-row.player-slot {
  margin-top: 0;
}
.server-intel-panel .line-row.player-slot strong,
.server-intel-panel .line-row.player-slot span {
  line-height: 1.25;
}

.launch-countdown-section {
  position: relative;
  z-index: 2;
  padding: 0 0 54px;
}
.launch-countdown-block {
  text-align: center;
  color: var(--yellow);
  font-family: var(--mono);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .08em;
  text-shadow: 0 0 22px rgba(245,178,27,.16);
}
.launch-title {
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.05;
  margin-bottom: 8px;
}
.launch-time {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: clamp(1.4rem, 3.15vw, 2.65rem);
  line-height: 1.1;
  color: var(--yellow);
}
.launch-unit {
  display: inline-flex;
  align-items: baseline;
  gap: .32em;
  white-space: nowrap;
}
.launch-unit b {
  font-size: 1em;
  font-weight: 900;
}
.launch-unit span {
  font-size: .9em;
  font-weight: 900;
}
.launch-separator {
  color: var(--yellow);
  opacity: .95;
}
.launch-ended {
  font-size: clamp(1.6rem, 3.3vw, 2.8rem);
  color: var(--yellow);
}

@media (max-width: 760px) {
  .launch-countdown-section {
    padding-bottom: 36px;
  }
  .launch-time {
    gap: 6px 8px;
  }
  .launch-separator {
    display: none;
  }
}


/* --- V6 launch countdown spacing and typography polish --- */
.launch-countdown-section {
  padding: 18px 0 78px;
}
.launch-countdown-block {
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 0 10px;
}
.launch-title {
  font-size: clamp(2.45rem, 4.9vw, 4.25rem);
  line-height: 1.16;
  margin-bottom: 16px;
  letter-spacing: .095em;
}
.launch-time {
  font-size: clamp(1.55rem, 3.35vw, 2.95rem);
  line-height: 1.26;
  gap: 8px 13px;
}
.launch-unit,
.launch-unit b,
.launch-unit span,
.launch-separator {
  line-height: 1.18;
}
.launch-separator {
  transform: translateY(-.03em);
}
@media (max-width: 760px) {
  .launch-countdown-section {
    padding: 8px 0 54px;
  }
  .launch-countdown-block {
    padding: 14px 0 4px;
  }
  .launch-title {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 14px;
  }
  .launch-time {
    font-size: clamp(1.35rem, 6vw, 2.2rem);
    line-height: 1.28;
    gap: 8px 12px;
  }
}


/* --- V7 launch timer balance and color correction --- */
.launch-countdown-section {
  padding: clamp(66px, 7vw, 92px) 0;
}
.launch-countdown-block {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0;
}
.launch-title {
  color: var(--paper);
  font-size: clamp(2.65rem, 5.2vw, 4.85rem);
  line-height: 0.98;
  margin: 0 0 clamp(18px, 2.2vw, 28px);
  letter-spacing: .085em;
  text-shadow: 0 0 22px rgba(232,226,213,.08);
}
.launch-time {
  color: var(--yellow);
  font-size: clamp(1.55rem, 3.15vw, 3rem);
  line-height: 1;
  gap: 0.34em;
}
.launch-unit,
.launch-unit b,
.launch-unit span,
.launch-separator {
  line-height: 1;
}
.launch-separator {
  color: var(--yellow);
  opacity: .95;
  transform: translateY(-.02em);
}
@media (max-width: 760px) {
  .launch-countdown-section {
    padding: 54px 0 62px;
  }
  .launch-title {
    font-size: clamp(2.05rem, 8vw, 3.15rem);
    line-height: 1.02;
    margin-bottom: 18px;
  }
  .launch-time {
    font-size: clamp(1.28rem, 5.7vw, 2.15rem);
    line-height: 1.08;
    gap: 8px 12px;
  }
}

/* --- V12 world zone update: new zone copy, images and header label --- */
.zone-grid {
  align-items: stretch;
}
.zone-card {
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.zone-card::after {
  height: 4px;
  z-index: 2;
}
.zone-copy {
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.zone-copy p {
  min-height: 112px;
}
.zone-image {
  position: relative;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.11);
  background: #050505;
  overflow: hidden;
}
.zone-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.28)),
    linear-gradient(90deg, rgba(245,178,27,.16), transparent 38%, rgba(0,0,0,.22));
  mix-blend-mode: normal;
}
.zone-image img {
  width: 100%;
  height: 235px;
  object-fit: cover;
  opacity: .9;
  filter: contrast(1.04) saturate(.94);
}
.zone-card.safe .zone-image img {
  object-position: 50% 50%;
}
.zone-card.limited .zone-image img {
  object-position: 50% 48%;
}
.zone-card.deep .zone-image img {
  object-position: 50% 50%;
}
@media (max-width: 980px) {
  .zone-copy p {
    min-height: 0;
  }
  .zone-image img {
    height: clamp(210px, 34vw, 300px);
  }
}


/* --- V13 faction card polish: equalized emblems, no top offset bars --- */
.faction-card {
  grid-template-rows: auto 1fr;
}

.faction-card .stripe {
  display: none;
}

.faction-emblem {
  height: 220px;
  min-height: 220px;
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.faction-emblem img {
  width: 172px;
  height: 172px;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0,0,0,.55));
}

.faction-card.titan .faction-emblem img {
  width: 172px;
  height: 172px;
}

.faction-card.noricum .faction-emblem img {
  width: 172px;
  height: 172px;
}

.faction-card.vachar .faction-emblem {
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.12), transparent 42%),
    linear-gradient(160deg, #061330, #123986);
}

.faction-card.titan .faction-emblem {
  background:
    radial-gradient(circle at 50% 45%, rgba(245,178,27,.13), transparent 46%),
    #050505;
}

.faction-card.noricum .faction-emblem {
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.08), transparent 42%),
    linear-gradient(160deg, #8f1219, #c91b23);
}

.faction-card .role {
  min-height: 2.9em;
}

@media (max-width: 960px) {
  .faction-emblem {
    height: 200px;
    min-height: 200px;
  }
  .faction-emblem img,
  .faction-card.titan .faction-emblem img,
  .faction-card.noricum .faction-emblem img {
    width: 160px;
    height: 160px;
  }
}

/* --- V14 faction card symmetry: align quote separators across cards --- */
.faction-card .body {
  display: flex;
  flex-direction: column;
}

.faction-card .quote {
  margin-top: auto;
  min-height: 3.6em;
}


/* --- V16 narrow dossier/manual rails: keep hazard identity, remove vertical label text --- */
@media (max-width: 820px) {
  .manual {
    background:
      linear-gradient(90deg, #050505 0 42px, transparent 42px),
      linear-gradient(180deg, rgba(232,226,213,.97), rgba(232,226,213,.91)) !important;
    padding: 24px 20px 24px 62px !important;
    overflow: hidden;
  }
  .manual::before {
    display: none !important;
    content: "" !important;
  }
  .manual::after {
    display: block !important;
    left: 0 !important;
    top: 0 !important;
    width: 42px !important;
    height: 72px !important;
    z-index: 1 !important;
    background: repeating-linear-gradient(135deg, var(--yellow) 0 9px, #050505 9px 18px) !important;
  }
  .manual h3 {
    font-size: clamp(1.55rem, 7vw, 2.15rem);
    line-height: 1.08;
    margin-bottom: 14px;
  }
  .manual p {
    line-height: 1.62;
  }
  .manual-grid {
    gap: 12px;
  }
  .manual-field {
    padding-top: 10px;
  }

  .story-entry {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    background:
      linear-gradient(90deg, #050505 0 42px, transparent 42px),
      linear-gradient(180deg, rgba(232,226,213,.97), rgba(232,226,213,.91)) !important;
    min-height: 0;
  }
  .story-entry::before {
    display: block !important;
    width: 42px !important;
    height: 72px !important;
    background: repeating-linear-gradient(135deg, var(--yellow) 0 9px, #050505 9px 18px) !important;
  }
  .story-rail {
    display: none !important;
  }
  .story-visual,
  .story-copy {
    grid-column: 2;
    min-width: 0;
  }
  .story-visual {
    border-right: 0;
    border-bottom: 2px solid #111;
    padding: 22px 18px;
  }
  .story-copy {
    padding: 22px 18px 24px;
  }
}

@media (max-width: 560px) {
  .manual {
    background:
      linear-gradient(90deg, #050505 0 34px, transparent 34px),
      linear-gradient(180deg, rgba(232,226,213,.97), rgba(232,226,213,.91)) !important;
    padding: 22px 16px 22px 50px !important;
  }
  .manual::after {
    display: block !important;
    width: 34px !important;
    height: 62px !important;
    background: repeating-linear-gradient(135deg, var(--yellow) 0 8px, #050505 8px 16px) !important;
  }
  .story-entry {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    background:
      linear-gradient(90deg, #050505 0 34px, transparent 34px),
      linear-gradient(180deg, rgba(232,226,213,.97), rgba(232,226,213,.91)) !important;
  }
  .story-entry::before {
    width: 34px !important;
    height: 62px !important;
    background: repeating-linear-gradient(135deg, var(--yellow) 0 8px, #050505 8px 16px) !important;
  }
  .story-copy h2 {
    font-size: clamp(1.55rem, 9vw, 2.15rem);
  }
}


/* --- V17 server connect + starmap text swap --- */
.steam-connect-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(245,178,27,.78);
  background: rgba(245,178,27,.10);
  color: var(--yellow) !important;
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.05;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.steam-connect-chip:hover {
  background: var(--yellow);
  color: #050505 !important;
}
.server-intel-panel .server-connect-row {
  padding-top: 8px;
  padding-bottom: 11px;
}
.starmap-long {
  max-width: 980px;
}
.starmap-long p {
  margin: 0 0 14px;
}
.starmap-long p:last-child {
  margin-bottom: 0;
}
@media (max-width: 560px) {
  .steam-connect-chip {
    width: 100%;
  }
}

/* --- V18 button polish + updated Discord link support --- */
/* Keep the three hero action buttons visually aligned on desktop. */
.hero .actions .btn {
  width: 178px;
  padding-left: 14px;
  padding-right: 14px;
}

/* Make the Server Intel direct-connect button use the same squared industrial button language. */
.steam-connect-chip {
  min-width: 208px;
  min-height: 42px;
  padding: 0 18px;
  clip-path: none;
  border: 1px solid rgba(245,178,27,.86);
  background: rgba(245,178,27,.10);
  box-shadow: inset 0 0 0 1px rgba(245,178,27,.08);
}
.steam-connect-chip:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #050505 !important;
}

/* Align the active/intel action chips so the right column feels intentional. */
.server-intel-panel .copy-chip,
.server-intel-panel .steam-connect-chip {
  width: 208px;
  justify-content: center;
  text-align: center;
}

@media (max-width: 760px) {
  .hero .actions .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .server-intel-panel .copy-chip,
  .server-intel-panel .steam-connect-chip {
    width: 100%;
  }
}

/* --- V19: restore starter buttons + clean Server Intel registration --- */
/* Restore the original flexible hero/start button layout from before V18. */
.hero .actions .btn {
  width: auto !important;
  min-width: 0;
  padding-left: 20px;
  padding-right: 20px;
}

/* Keep only the Steam direct-connect control as a square/rectangular industrial button. */
.server-intel-panel .steam-connect-chip {
  min-width: 208px;
  min-height: 42px;
  padding: 0 18px;
  clip-path: none !important;
  border-radius: 0;
  border: 1px solid rgba(245,178,27,.86);
  background: rgba(245,178,27,.10);
  box-shadow: inset 0 0 0 1px rgba(245,178,27,.08);
}
.server-intel-panel .steam-connect-chip:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #050505 !important;
}

/* Registration remains a simple text link, not a chip/button. */
.server-intel-panel .intel-link {
  display: inline;
  width: auto;
  min-width: 0;
  background: transparent;
  border-left: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 1px solid rgba(245,178,27,.78);
  box-shadow: none;
  padding: 0 0 2px;
  clip-path: none;
  color: var(--yellow) !important;
}

@media (max-width: 760px) {
  .hero .actions .btn { width: auto !important; }
}

@media (max-width: 595px) {
  .hero .actions .btn { width: 100% !important; }
}

@media (max-width: 560px) {
  .server-intel-panel .steam-connect-chip {
    width: 100%;
    min-width: 0;
  }
}

/* --- V22: protected faction starmap access --- */
.map-access-grid {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 28px;
  align-items: stretch;
}

.map-access-brief .manual-content {
  min-height: 100%;
}

.map-access-panel {
  border: 1px solid var(--line-soft);
  background: linear-gradient(145deg, rgba(23,23,25,.98), rgba(8,8,9,.98));
  padding: 34px;
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, calc(100% - 42px) 0, 100% 42px, 100% 100%, 0 100%);
}

.map-access-panel h2 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: clamp(1.8rem, 4vw, 3rem);
  text-transform: uppercase;
  line-height: .95;
}

.terminal-copy {
  margin: 0 0 24px;
  color: var(--paper-dim);
}

.access-form {
  display: grid;
  gap: 12px;
}

.field-label {
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--yellow);
  font-size: .88rem;
  margin-top: 8px;
}

.access-form select,
.access-form input {
  width: 100%;
  border: 1px solid rgba(245,178,27,.38);
  background: rgba(5,5,5,.78);
  color: var(--paper);
  padding: 15px 16px;
  border-radius: 0;
  outline: none;
}

.access-form select:focus,
.access-form input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245,178,27,.12);
}

.access-submit {
  width: 100%;
  margin-top: 14px;
  justify-content: center;
}

.form-message {
  border: 1px solid rgba(255, 80, 80, .55);
  background: rgba(120, 0, 0, .16);
  color: #ffb6ad;
  padding: 12px 14px;
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .86rem;
}

.form-message.ok {
  border-color: rgba(80, 255, 140, .45);
  background: rgba(0, 120, 50, .13);
  color: #6effa0;
}

.map-view-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
}

.map-session-actions {
  justify-content: flex-end;
  align-items: center;
  margin: 0;
}

.secure-map-frame {
  border-color: rgba(245,178,27,.5);
}

.map-view-section {
  padding-top: 0;
}

@media (max-width: 980px) {
  .map-access-grid,
  .map-view-head {
    grid-template-columns: 1fr;
  }
  .map-session-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .map-access-panel {
    padding: 24px;
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
  }
  .map-session-actions .btn {
    width: 100% !important;
  }
}
