:root {
  --sky: #8ecae6;
  --bluegreen: #219ebc;
  --space: #023047;
  --space-dark: #011927;
  --space-darker: #010f19;
  --amber: #ffb703;
  --orange: #fb8500;
  --white: #f7fbff;
  --muted: rgba(247,251,255,.72);
  --faint: rgba(142,202,230,.10);
  --line: rgba(142,202,230,.23);
  --line-strong: rgba(142,202,230,.38);
  --panel: rgba(3, 54, 78, .78);
  --panel-dark: rgba(1, 31, 48, .80);
  --shadow: 0 22px 70px rgba(0,0,0,.42);
  --radius: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 72% 0%, rgba(33,158,188,.22), transparent 32%),
    radial-gradient(circle at 10% 0%, rgba(255,183,3,.07), transparent 25%),
    linear-gradient(180deg, #012237 0%, var(--space) 48%, #011522 100%);
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(142,202,230,.18);
  background: rgba(1, 18, 29, .72);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  width: min(320px, 44vw);
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.nav a {
  position: relative;
  text-decoration: none;
  color: rgba(247,251,255,.68);
  font-weight: 650;
  font-size: 14px;
  padding: 6px 0 14px;
  border-radius: 0;
  transition: color .15s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background .15s ease, box-shadow .15s ease;
}

.nav a:hover {
  color: var(--sky);
}

.nav a.active {
  color: #56dfff;
}

.nav a.active::after {
  background: #12d7ee;
  box-shadow: 0 0 14px rgba(18,215,238,.45);
}

.nav a.playtesters {
  color: rgba(247,251,255,.68);
  background: transparent;
  box-shadow: none;
}

.nav a.playtesters:hover {
  color: var(--amber);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 405px;
  border-bottom: 1px solid rgba(142,202,230,.14);
  background:
    linear-gradient(90deg, rgba(1,18,29,.98) 0%, rgba(1,29,45,.92) 35%, rgba(2,48,71,.26) 68%, rgba(2,48,71,.12) 100%),
    url("/assets/herobg.png") center center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .95;
  background:
    radial-gradient(circle at 8% 20%, rgba(142,202,230,.65) 0 1px, transparent 2px),
    radial-gradient(circle at 19% 48%, rgba(142,202,230,.45) 0 1px, transparent 2px),
    radial-gradient(circle at 34% 17%, rgba(142,202,230,.55) 0 1px, transparent 2px),
    radial-gradient(circle at 48% 34%, rgba(142,202,230,.65) 0 1px, transparent 2px),
    radial-gradient(circle at 63% 18%, rgba(142,202,230,.80) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 12%, rgba(142,202,230,.55) 0 1px, transparent 2px),
    radial-gradient(circle at 90% 36%, rgba(142,202,230,.75) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 24%, rgba(33,158,188,.32), transparent 18%),
    radial-gradient(circle at 0% 68%, rgba(142,202,230,.10), transparent 14%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 66px 22px 74px;
}

.eyebrow {
  color: var(--sky);
  text-transform: uppercase;
  letter-spacing: .17em;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 16px;
}

h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: .95;
  letter-spacing: -.06em;
}

.lead {
  max-width: 620px;
  color: var(--sky);
  font-size: 18px;
  line-height: 1.56;
  margin: 20px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 10px 15px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(142,202,230,.08);
  color: var(--white);
  text-decoration: none;
  font-weight: 820;
  font-size: 14px;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(142,202,230,.62);
  background: rgba(142,202,230,.13);
}

.btn.primary {
  border: 1px solid rgba(255,183,3,.35);
  color: #071721;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 24px rgba(251,133,0,.22);
}

.btn.teal {
  border: 1px solid rgba(142,202,230,.18);
  color: #f4fbff;
  background: linear-gradient(135deg, var(--bluegreen), #137e9b);
  box-shadow: 0 10px 24px rgba(33,158,188,.20);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

.section {
  padding: 34px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.section-head p {
  margin: 7px 0 0;
  color: var(--muted);
}

.small-link {
  color: var(--sky);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(33,158,188,.38);
  background:
    linear-gradient(180deg, rgba(14,74,103,.26), rgba(2,36,55,.94)),
    #052d43;
  box-shadow: 0 14px 40px rgba(0,0,0,.24);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(142,202,230,.64);
  box-shadow: 0 18px 48px rgba(0,0,0,.30);
}

.project-card:hover .thumb img {
  transform: scale(1.05);
}

.thumb {
  display: block;
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(142,202,230,.18);
  background: #051e2e;
  text-decoration: none;
}

.thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 196 / 79;
  object-fit: cover;
  transform: scale(1.01);
}

/* Emoji placeholder thumb for projects without a cover image */
.thumb.ph {
  display: grid;
  place-items: center;
  aspect-ratio: 196 / 79;
  font-size: 42px;
  background:
    radial-gradient(circle at 55% 38%, rgba(255,183,3,.20), transparent 55%),
    linear-gradient(135deg, #0a3b50, #041e2e);
}

.project-body {
  padding: 12px 14px 14px;
}

.project-body h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: rgba(247,251,255,.76);
  font-size: 13px;
  margin-bottom: 12px;
}

.version {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(33,158,188,.98), rgba(21,125,154,.95));
  color: #f7fbff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}

.tag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.platform {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(247,251,255,.82);
  font-size: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(33,158,188,.86), rgba(24,107,151,.86));
  color: #f7fbff;
  font-size: 12px;
  font-weight: 820;
  line-height: 1;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.news-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  overflow: hidden;
  min-height: 125px;
  border-radius: var(--radius);
  border: 1px solid rgba(33,158,188,.32);
  background:
    linear-gradient(180deg, rgba(14,74,103,.23), rgba(2,36,55,.88)),
    #052d43;
  box-shadow: 0 14px 40px rgba(0,0,0,.20);
}

.news-thumb {
  display: grid;
  place-items: center;
  font-size: 32px;
  border-right: 1px solid rgba(142,202,230,.18);
  background:
    radial-gradient(circle at 55% 40%, rgba(255,183,3,.32), transparent 24%),
    linear-gradient(135deg, #0a3b50, #041e2e);
}

.news-body {
  padding: 13px 14px;
}

.news-date {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(247,251,255,.60);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.news-label {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 6px;
  color: #071721;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.news-body h3 {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.25;
}

.news-body p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

/* Standalone news page: a feed of full articles, newspaper / social style */
.news-feed {
  display: grid;
  gap: 22px;
}

.post {
  border-radius: var(--radius);
  border: 1px solid rgba(33,158,188,.32);
  background: transparent;
  padding: 22px 24px 18px;
  scroll-margin-top: 96px; /* anchored jumps clear the sticky topbar */
}

.post-head {
  margin-bottom: 14px;
}

.post-byline {
  display: flex;
  align-items: center;
  gap: 11px;
}

.post-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 11px;
  font-size: 21px;
  border: 1px solid rgba(142,202,230,.18);
  background:
    radial-gradient(circle at 55% 40%, rgba(255,183,3,.30), transparent 60%),
    linear-gradient(135deg, #0a3b50, #041e2e);
}

.post-byline .news-date {
  margin-bottom: 0;
}

.post-title {
  margin: 12px 0 0;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -.03em;
}

.post-title a {
  text-decoration: none;
  color: inherit;
  transition: color .15s ease;
}

.post-title a:hover {
  color: var(--sky);
}

.post-body {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.post-body p {
  margin: 0 0 13px;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(142,202,230,.14);
}

.post-link {
  color: var(--sky);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: color .15s ease;
}

.post-link:hover {
  color: var(--amber);
}

.footer {
  margin-top: 34px;
  border-top: 1px solid rgba(142,202,230,.16);
  background: rgba(1,18,29,.46);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.project-page {
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #01162b;
}

/* Decorative banner: full image in the bottom layer, fades into page color */
.project-bg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* Content layer sits on top of the banner and flows naturally from the top */
.project-overlay {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

.project-hero {
  padding: 72px 0 28px;
}

.project-panel-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.meta-item {
  min-width: 140px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(1,25,39,.42);
  border: 1px solid rgba(142,202,230,.18);
  backdrop-filter: blur(10px);
}

.meta-label {
  display: block;
  color: rgba(247,251,255,.64);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.meta-value {
  display: block;
  font-size: 16px;
  font-weight: 800;
}

.project-panel-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.detail-body {
  padding: 8px 0 48px;
  display: grid;
  gap: 18px;
}

.project-section {
  padding: 18px 0;
  border-bottom: 1px solid rgba(142,202,230,.14);
}

.project-section:last-child {
  border-bottom: 0;
}

.project-section h2 {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -.03em;
}

.project-section p {
  margin: 0;
  max-width: 72ch;
  color: var(--muted);
  line-height: 1.65;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.download-card {
  display: grid;
  gap: 6px;
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(33,158,188,.30);
  background:
    linear-gradient(180deg, rgba(14,74,103,.24), rgba(2,36,55,.90)),
    #052d43;
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.download-card:hover {
  transform: translateY(-3px);
  border-color: rgba(142,202,230,.62);
  box-shadow: 0 18px 48px rgba(0,0,0,.30);
}

.download-platform {
  font-size: 18px;
  font-weight: 900;
}

.download-version,
.download-date {
  color: var(--muted);
  font-size: 13px;
}

.release-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.playtester-note {
  margin: 0;
  padding: 0.75rem 1rem;
  background: rgba(255,183,3,.08);
  border-left: 3px solid var(--amber);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.95rem;
}
.playtester-note a { color: var(--amber); }
.playtester-note a:hover { text-decoration: underline; }
/* Inside hero panel the note sits below the meta row */
.project-panel-actions .playtester-note {
  background: rgba(255,183,3,.12);
  color: #fff;
  margin-top: 0.5rem;
}
.project-panel-actions .playtester-note a { color: var(--amber); }

@media (max-width: 920px) {
  .project-grid,
  .news-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .download-card {
    max-width: 520px;
  }
}

@media (max-width: 680px) {
  .topbar-inner,
  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero-content {
    padding-top: 48px;
  }

  .news-card {
    grid-template-columns: 1fr;
  }

  .news-thumb {
    min-height: 82px;
    border-right: 0;
    border-bottom: 1px solid rgba(142,202,230,.18);
  }

  .project-hero {
    padding-top: 56px;
  }
}

/* ---------- Playtester login page ---------- */
.playtester-title {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: none;
}

.title-badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  font-size: 38px;
  border: 1px solid rgba(142,202,230,.30);
  background: linear-gradient(135deg, rgba(33,158,188,.45), rgba(2,48,71,.55));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.pt-sub {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.playtester-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 22px;
  align-items: start;
}

.pt-card {
  border-radius: var(--radius);
  border: 1px solid rgba(33,158,188,.32);
  background: rgba(2,36,55,.42);
  padding: 24px 26px 26px;
}

.pt-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-size: 22px;
  letter-spacing: -.02em;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  padding: 13px 42px 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(1,18,29,.60);
  color: var(--white);
  font-size: 14px;
  font-family: inherit;
}

.input-wrap input::placeholder {
  color: rgba(247,251,255,.40);
}

.input-wrap input:focus {
  outline: none;
  border-color: rgba(142,202,230,.60);
  box-shadow: 0 0 0 3px rgba(33,158,188,.18);
}

.field textarea {
  width: 100%;
  min-height: 130px;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(1,18,29,.60);
  color: var(--white);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
}

.field textarea::placeholder {
  color: rgba(247,251,255,.40);
}

.field textarea:focus {
  outline: none;
  border-color: rgba(142,202,230,.60);
  box-shadow: 0 0 0 3px rgba(33,158,188,.18);
}

.input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  opacity: .55;
  pointer-events: none;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 20px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--bluegreen);
}

.forgot {
  color: var(--sky);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
}

.forgot:hover {
  color: var(--amber);
}

.btn.block {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

.btn-ico {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.form-error {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,99,99,.45);
  background: rgba(255,80,80,.12);
  color: #ffc9c9;
  font-size: 14px;
  font-weight: 700;
}

.pt-fineprint {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.pt-fineprint a {
  color: var(--sky);
  font-weight: 700;
}

.pt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.pt-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
}

.pt-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 20px;
  border: 1px solid rgba(142,202,230,.28);
  background: rgba(33,158,188,.16);
}

.pt-ico.warn {
  border-color: rgba(255,183,3,.50);
  background: rgba(251,133,0,.14);
}

.pt-list h3 {
  margin: 2px 0 4px;
  font-size: 16px;
  letter-spacing: -.01em;
}

.pt-list h3.warn {
  color: var(--amber);
}

.pt-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.access-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
}

.access-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.access-text h3 {
  margin: 0 0 3px;
  font-size: 17px;
}

.access-text p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 920px) {
  .playtester-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .access-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Playtester inside (builds) ---------- */
.pt-account {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pt-account a {
  color: var(--sky);
  font-weight: 700;
  text-decoration: none;
}

.pt-account a:hover {
  color: var(--amber);
}

.notice {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,183,3,.32);
  background: rgba(251,133,0,.08);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.notice strong {
  color: var(--white);
}

.build-list {
  display: grid;
  gap: 18px;
}

.build-card {
  border-radius: var(--radius);
  border: 1px solid rgba(33,158,188,.32);
  background: rgba(2,36,55,.42);
  padding: 22px 24px;
}

.build-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.build-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.build-ico {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 22px;
  border: 1px solid rgba(142,202,230,.18);
  background:
    radial-gradient(circle at 55% 40%, rgba(255,183,3,.26), transparent 60%),
    linear-gradient(135deg, #0a3b50, #041e2e);
}

.build-title h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.build-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1;
}

.status.beta {
  color: var(--sky);
  border-color: rgba(142,202,230,.42);
  background: rgba(33,158,188,.16);
}

.status.alpha {
  color: var(--amber);
  border-color: rgba(255,183,3,.50);
  background: rgba(251,133,0,.12);
}

.status.internal {
  color: #ff9d9d;
  border-color: rgba(255,120,120,.42);
  background: rgba(255,80,80,.10);
}

.build-desc {
  margin: 14px 0 0;
  max-width: 78ch;
  color: var(--muted);
  line-height: 1.62;
}

.build-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

@media (max-width: 680px) {
  .build-head {
    flex-direction: column;
  }

  .build-actions .btn {
    width: 100%;
  }
}

/* ---------- Screenshot carousel ---------- */
.carousel {
  position: relative;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: var(--radius);
  border: 1px solid rgba(33,158,188,.32);
  background: #021320;
  scrollbar-width: none;          /* Firefox */
}

.carousel-track::-webkit-scrollbar {
  display: none;                   /* WebKit */
}

.carousel-slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: center;
  position: relative;
}

.carousel-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.carousel-slide figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 18px 12px;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(180deg, transparent, rgba(1,15,25,.78));
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(142,202,230,.32);
  background: rgba(1,18,29,.62);
  backdrop-filter: blur(6px);
  color: var(--white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.carousel-btn:hover {
  background: rgba(2,48,71,.85);
  border-color: rgba(142,202,230,.6);
}

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.carousel-dots .dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(247,251,255,.40);
  cursor: pointer;
  pointer-events: auto;
  transition: background .15s ease, transform .15s ease;
}

.carousel-dots .dot.active {
  background: var(--amber);
  transform: scale(1.25);
}

@media (max-width: 680px) {
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}

/* ---------- Admin panel ---------- */
.admin-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(142,202,230,.18);
  background: rgba(1,18,29,.86);
  backdrop-filter: blur(14px);
}

.admin-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.admin-brand {
  font-weight: 900;
  font-size: 16px;
  text-decoration: none;
  letter-spacing: -.02em;
  color: var(--white);
}
.admin-brand span { color: var(--amber); }

.admin-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.admin-nav a {
  color: rgba(247,251,255,.68);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 0;
}
.admin-nav a:hover { color: var(--sky); }
.admin-nav a.active { color: #56dfff; }

.admin-bar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.admin-bar-right > a { color: var(--sky); text-decoration: none; font-weight: 700; }
.admin-user { color: var(--muted); }

.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 22px 60px;
}
.admin-wrap h1 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 20px; }

.admin-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-head-row h1 { margin: 0; }

.flash {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
}
.flash-ok  { border: 1px solid rgba(33,158,188,.45); background: rgba(33,158,188,.14); color: #bfe9f5; }
.flash-err { border: 1px solid rgba(255,99,99,.45); background: rgba(255,80,80,.12); color: #ffc9c9; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.admin-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(33,158,188,.32);
  background: rgba(2,36,55,.42);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.admin-stat .num { font-size: 34px; font-weight: 900; color: var(--white); letter-spacing: -.03em; }
.admin-stat:hover { border-color: rgba(142,202,230,.55); }

.admin-actions-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(33,158,188,.28);
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(142,202,230,.12);
  font-size: 14px;
}
.admin-table th {
  background: rgba(2,36,55,.6);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.admin-table tbody tr:hover { background: rgba(142,202,230,.05); }
.admin-table td a { color: var(--sky); text-decoration: none; font-weight: 700; }
.admin-table .nowrap { white-space: nowrap; }
.admin-table.compact th, .admin-table.compact td { padding: 9px 12px; }

.admin-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.admin-row-actions form { margin: 0; }

.pill {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  border: 1px solid rgba(142,202,230,.3);
  color: var(--muted);
}
.pill.pub   { color: var(--sky);   border-color: rgba(142,202,230,.4); background: rgba(33,158,188,.14); }
.pill.priv  { color: #ffc9a3;      border-color: rgba(255,183,3,.4);   background: rgba(251,133,0,.12); }
.pill.admin { color: var(--amber); border-color: rgba(255,183,3,.5);   background: rgba(251,133,0,.14); }

.btn.small { min-height: 32px; padding: 6px 11px; font-size: 13px; }
.btn.danger { border-color: rgba(255,99,99,.4); color: #ffc9c9; background: rgba(255,80,80,.10); }
.btn.danger:hover { border-color: rgba(255,99,99,.7); background: rgba(255,80,80,.18); }

.admin-form { margin: 4px 0 26px; }
.admin-form.pt-card { padding: 22px 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.hint { color: rgba(247,251,255,.45); font-weight: 500; font-size: 12px; }

.admin-form select,
.admin-subform select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(1,18,29,.60);
  color: var(--white);
  font-size: 14px;
  font-family: inherit;
}
.admin-form input[type="file"],
.admin-subform input[type="file"] {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px dashed rgba(142,202,230,.35);
  background: rgba(1,18,29,.4);
  color: var(--muted);
  font-size: 13px;
}

.admin-section { margin-top: 20px; }
.admin-subform {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(142,202,230,.14);
}

.admin-shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.admin-shot {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(33,158,188,.3);
  background: #021320;
}
.admin-shot img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.admin-shot figcaption { padding: 8px 10px; font-size: 13px; color: var(--muted); }
.admin-shot form { padding: 0 10px 10px; }

.admin-empty { color: var(--muted); padding: 14px 0; }

@media (max-width: 760px) {
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Admin shortcut button in the public nav (admins only) */
.nav a.nav-admin {
  padding: 7px 13px;
  border-radius: 8px;
  font-weight: 800;
  color: #071721;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border: 1px solid rgba(255,183,3,.40);
  box-shadow: 0 6px 16px rgba(251,133,0,.22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.nav a.nav-admin::after { display: none; }
.nav a.nav-admin:hover {
  color: #071721;
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(251,133,0,.32);
}

/* ===================== Markdown body (project page) ===================== */
.md-body { line-height: 1.75; }
.md-body h2 { font-size: 1.4rem; margin: 2rem 0 0.6rem; color: var(--sky); }
.md-body h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; color: #d0e8f5; }
.md-body h4 { font-size: 1rem; margin: 1.2rem 0 0.4rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.md-body p  { margin: 0 0 1rem; }
.md-body ul { margin: 0 0 1rem 1.4rem; }
.md-body li { margin-bottom: .3rem; }
.md-body strong { color: #fff; }
.md-body a { color: var(--sky); }
.md-body a:hover { text-decoration: underline; }
.md-body hr { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 1.8rem 0; }
.md-body code { background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 3px; font-size: .9em; }
.md-img { max-width: 100%; border-radius: 8px; margin: 0.5rem 0; display: block; }

/* ===================== Markdown editor (admin) ===================== */
.md-editor { border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.md-editor-tabs { display: flex; background: #f5f5f5; border-bottom: 1px solid #ddd; }
.md-tab { padding: 8px 18px; background: none; border: none; cursor: pointer; font-size: .9rem; color: #555; border-bottom: 2px solid transparent; }
.md-tab.active { color: #023047; border-bottom-color: #219ebc; font-weight: 600; }
.md-editor .md-pane textarea { width: 100%; box-sizing: border-box; border: none; padding: 12px; font-family: 'Courier New', monospace; font-size: .9rem; min-height: 320px; resize: vertical; display: block; outline: none; }
.md-preview-pane { min-height: 320px; padding: 16px; line-height: 1.7; font-size: .95rem; }
.md-preview-pane h2 { font-size: 1.3rem; margin: 1.5rem 0 .5rem; }
.md-preview-pane h3 { font-size: 1.1rem; margin: 1.2rem 0 .4rem; }
.md-preview-pane ul { margin-left: 1.4rem; }
.md-preview-pane img { max-width: 100%; border-radius: 6px; }

/* ===================== Project title logo ===================== */
.project-logo {
  max-width: 420px;
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 12px;
  /* Drop-shadow so it reads on any banner colour */
  filter: drop-shadow(0 2px 12px rgba(0,0,0,.55));
}

/* Admin logo preview */
.logo-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 10px;
  padding: 10px;
  background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
  border-radius: 6px;
  border: 1px solid #ddd;
}
.logo-preview img {
  max-width: 300px;
  max-height: 120px;
  width: auto;
  height: auto;
  display: block;
}

/* Admin thumbnail preview */
.thumb-preview {
  display: inline-block;
  margin-bottom: 8px;
  padding: 6px;
  background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
  border-radius: 6px;
  border: 1px solid #ddd;
}
.thumb-preview img {
  display: block;
  max-width: 200px;
  height: auto;
  border-radius: 3px;
}

/* Image asset row (thumbnail / logo section) */
.img-asset-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

/* ===================== Tickets page ===================== */
.ticket-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}
.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.45);
  margin-right: 2px;
}
.filter-btn {
  padding: 5px 13px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.15);
  transition: background .15s, color .15s, border-color .15s;
  text-decoration: none;
}
.filter-btn:hover  { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.3); }
.filter-btn.active { background: var(--bluegreen); color: #fff; border-color: var(--bluegreen); }

.ticket-list { display: flex; flex-direction: column; gap: 12px; }

.ticket-card {
  background: rgba(1,22,43,.55);
  border: 1px solid rgba(142,202,230,.12);
  border-radius: 12px;
  padding: 16px 20px;
  transition: border-color .15s;
}
.ticket-card:hover { border-color: rgba(142,202,230,.28); }

.ticket-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: .8rem;
}
.ticket-project { color: rgba(255,255,255,.45); }
.ticket-date    { color: rgba(255,255,255,.3); margin-left: auto; }

.ticket-type {
  padding: 2px 9px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.ticket-type--bug      { background: rgba(251,133,0,.18); color: var(--orange); }
.ticket-type--feedback { background: rgba(33,158,188,.18); color: var(--bluegreen); }
.ticket-type--crash    { background: rgba(200,40,40,.20); color: #f87171; }

.ticket-status {
  padding: 2px 9px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .75rem;
}
.ticket-status--open        { background: rgba(142,202,230,.15); color: var(--sky); }
.ticket-status--in-progress { background: rgba(255,183,3,.15);   color: var(--amber); }
.ticket-status--fixed       { background: rgba(34,197,94,.15);   color: #4ade80; }
.ticket-status--closed      { background: rgba(255,255,255,.08); color: rgba(255,255,255,.4); }

.ticket-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}
.ticket-desc {
  font-size: .9rem;
  color: rgba(255,255,255,.6);
  margin: 0 0 10px;
  line-height: 1.55;
}
.ticket-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ticket-tag {
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.45);
}

/* ===================== Ticket detail view ===================== */
.ticket-view-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}
.ticket-view-header { padding-bottom: 4px; }
.ticket-view-type {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.ticket-view-title { font-size: 1.3rem; margin: 0 0 10px; }
.ticket-view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.ticket-view-desc {
  font-size: .95rem;
  color: #444;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}
.ticket-view-current-status {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 14px;
}

/* Entry log */
.entry-list { display: flex; flex-direction: column; gap: 0; }
.entry {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.entry:last-child { border-bottom: none; }
.entry-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: .85rem;
}
.entry-icon { font-size: 1rem; }
.entry-label { font-weight: 600; color: #333; }
.entry-date  { color: #999; font-size: .8rem; }
.entry--status_change .entry-label { color: #555; }
.entry-body {
  font-size: .9rem;
  color: #444;
  line-height: 1.55;
  margin: 0;
  padding-left: 26px;
  white-space: pre-wrap;
}

@media (max-width: 860px) {
  .ticket-view-grid { grid-template-columns: 1fr; }
  .ticket-view-side { order: -1; }
}

/* ===================== Public ticket activity log ===================== */
.ticket-title a { color: inherit; text-decoration: none; }
.ticket-title a:hover { color: var(--sky); }

.public-entry-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid rgba(142,202,230,.2);
  margin-left: 8px;
  padding-left: 20px;
}
.public-entry {
  position: relative;
  padding-bottom: 20px;
}
.public-entry:last-child { padding-bottom: 0; }
.public-entry-marker {
  position: absolute;
  left: -27px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bluegreen);
  border: 2px solid var(--space);
}
.public-entry-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.public-entry-date { font-size: .8rem; color: rgba(255,255,255,.35); }
.public-entry-body {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  line-height: 1.6;
  margin: 0;
}
