:root {
  --bg: #050607;
  --panel: #151619;
  --panel-soft: #1e2024;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f6f6f7;
  --muted: #b9bbc2;
  --gold: #f5a400;
  --blue: #5865f2;
  --green: #52c878;
  --danger: #ff6b6b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-bottom: 94px;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.site-header {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(1030px, calc(100% - 24px));
  min-height: 68px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(24, 25, 25, 0.88);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.site-header.compact {
  position: sticky;
  transform: none;
  margin: 12px auto 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  font-size: clamp(1.05rem, 1.7vw, 1.55rem);
}

.brand-mark,
.large-mark {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 1000;
  text-shadow: 2px 2px 0 #111;
  background: linear-gradient(135deg, #20242b, #111 45%, var(--gold) 46%, #ffcf35);
  clip-path: polygon(50% 0, 92% 22%, 92% 76%, 50% 100%, 8% 76%, 8% 22%);
}

.brand-mark {
  width: 46px;
  height: 46px;
  font-size: 0.98rem;
}

.brand-mark.has-image,
.large-mark.has-image {
  background-position: center;
  background-size: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-right: auto;
  color: #e4e4e7;
}

.nav-links a {
  font-weight: 650;
}

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

.ip-pill,
.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 950;
  text-transform: uppercase;
}

.ip-pill,
.primary-btn {
  background: linear-gradient(180deg, #ffb21c, #e79200);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22);
}

.ip-pill {
  padding: 0 18px;
  white-space: nowrap;
}

.ip-pill small,
.primary-btn small {
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 690px;
  overflow: hidden;
}

.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg {
  object-fit: cover;
}

.hero-shade {
  background:
    radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.65) 58%, #050607 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.3), #050607 96%);
}

.hero-content {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(760px, calc(100% - 32px));
  padding-top: 72px;
  text-align: center;
}

.large-mark {
  width: 154px;
  height: 154px;
  margin-bottom: 22px;
  font-size: 3.1rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2.9rem, 8vw, 5.6rem);
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.38);
  letter-spacing: 0;
}

.hero p,
.page-heading p {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.primary-btn,
.secondary-btn {
  min-width: 180px;
  padding: 0 22px;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.25);
}

.content-grid,
.subpage {
  width: min(1030px, calc(100% - 24px));
  margin-inline: auto;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 24px;
  padding: 34px 0 36px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(19, 20, 24, 0.92);
}

.news-panel,
.connected-panel,
.role-panel {
  padding: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.section-title h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
}

.icon {
  color: var(--gold);
  font-size: 1.45rem;
}

.news-list {
  display: grid;
  gap: 20px;
}

.news-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #1e1f23;
}

.news-card h3 {
  margin-bottom: 10px;
  color: #f2f3f5;
  font-size: 1.05rem;
  line-height: 1.35;
}

.message-body {
  color: #d7d8dd;
  line-height: 1.5;
  white-space: normal;
}

.message-avatar img,
.message-avatar span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.message-avatar img {
  object-fit: cover;
}

.message-avatar span {
  display: grid;
  place-items: center;
  background: #30333a;
  color: #fff;
  font-weight: 900;
}

.message-main {
  min-width: 0;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.message-meta strong {
  color: #fff;
  font-weight: 800;
}

.author-role-pill {
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--author-role-color) 75%, transparent);
  border-radius: 999px;
  color: var(--author-role-color);
  background: color-mix(in srgb, var(--author-role-color) 15%, transparent);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.pinned-pill {
  padding: 2px 7px;
  border: 1px solid rgba(245, 164, 0, 0.7);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(245, 164, 0, 0.14);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.message-meta .pinned-pill {
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 900;
}

.message-meta span {
  color: #8ea1e1;
  font-size: 0.86rem;
  font-weight: 700;
}

.message-meta .author-role-pill {
  color: var(--author-role-color);
  font-size: 0.74rem;
  font-weight: 900;
}

.message-meta time {
  color: #949ba4;
  font-size: 0.86rem;
}

.discord-mention,
.discord-time {
  display: inline-block;
  padding: 0 4px;
  border-radius: 4px;
  color: #c9cdfb;
  background: rgba(88, 101, 242, 0.22);
  font-weight: 650;
}

.discord-line {
  min-height: 1.5em;
}

.discord-heading {
  margin: 10px 0 6px;
  color: #f2f3f5;
  font-weight: 900;
  line-height: 1.2;
}

.discord-heading.level-1 {
  font-size: 1.45rem;
}

.discord-heading.level-2 {
  font-size: 1.25rem;
}

.discord-heading.level-3 {
  font-size: 1.08rem;
}

.discord-quote {
  margin: 6px 0;
  padding: 2px 0 2px 10px;
  border-left: 4px solid #4e5058;
  color: #dbdee1;
}

.discord-list {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  padding-left: 22px;
}

.discord-link {
  color: #00a8fc;
  text-decoration: underline;
}

.message-body code,
.embed-description code,
.embed-field code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #111216;
  color: #f2f3f5;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}

.discord-spoiler {
  padding: 0 3px;
  border-radius: 3px;
  color: transparent;
  background: #111216;
}

.discord-spoiler:hover {
  color: #dbdee1;
}

.discord-emoji {
  width: 1.35em;
  height: 1.35em;
  object-fit: contain;
  vertical-align: -0.28em;
}

.message-images {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.message-images img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border-radius: 8px;
  background: #111216;
}

.embed-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.discord-embed {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  max-width: 720px;
  padding: 12px 14px;
  border-left: 4px solid var(--embed-color);
  border-radius: 4px;
  background: #2b2d31;
}

.embed-content {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.embed-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f2f3f5;
  font-size: 0.88rem;
  font-weight: 800;
}

.embed-author img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.embed-title {
  margin: 0;
  color: #00a8fc;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  text-transform: none;
}

.embed-description {
  color: #dbdee1;
  line-height: 1.45;
}

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

.embed-field {
  display: grid;
  gap: 3px;
  grid-column: 1 / -1;
}

.embed-field.inline {
  grid-column: auto;
}

.embed-field strong {
  color: #f2f3f5;
  font-size: 0.9rem;
}

.embed-field span {
  color: #dbdee1;
  line-height: 1.4;
}

.embed-thumbnail {
  width: 84px;
  max-height: 84px;
  border-radius: 6px;
  object-fit: cover;
}

.embed-image {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  border-radius: 6px;
  background: #111216;
}

.embed-footer {
  color: #949ba4;
  font-size: 0.8rem;
}

.skeleton {
  min-height: 240px;
  background: linear-gradient(90deg, #1c1d21, #24262c, #1c1d21);
}

.side-stack {
  display: grid;
  align-content: start;
  gap: 20px;
}

.social-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.social-row a {
  display: grid;
  min-height: 46px;
  place-items: center;
  border-radius: 8px;
  background: #0d0e12;
  font-weight: 900;
}

.discord-card {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 12px;
  background: linear-gradient(180deg, #6671ff, #4751c5);
  font-weight: 900;
  text-transform: uppercase;
}

.discord-card span {
  font-weight: 800;
  text-transform: none;
}

.subpage {
  min-height: calc(100vh - 102px);
  padding: 58px 0 36px;
}

.page-heading {
  margin: 42px 0 28px;
}

.page-heading h1 {
  font-size: clamp(3rem, 8vw, 5.2rem);
}

.vote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.vote-card {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #1b1d23, #242936);
}

.vote-card.disabled,
a.disabled {
  cursor: default;
  color: var(--muted);
  background: #151619;
}

.vote-card strong {
  font-size: 1.7rem;
  text-transform: uppercase;
}

.vote-card small {
  color: var(--gold);
  font-weight: 850;
}

.team-stack {
  display: grid;
  gap: 22px;
}

.role-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.role-heading h2 {
  margin-bottom: 0;
  color: var(--role-color);
  text-transform: uppercase;
}

.role-heading span,
.empty-note {
  color: var(--muted);
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101115;
}

.member-info {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.member-info strong {
  overflow-wrap: anywhere;
}

.member-role {
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--role-pill-color) 70%, transparent);
  border-radius: 999px;
  color: var(--role-pill-color);
  background: color-mix(in srgb, var(--role-pill-color) 15%, transparent);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.member-card img,
.avatar-fallback {
  width: 46px;
  height: 46px;
  border: 2px solid var(--member-color);
  border-radius: 50%;
}

.member-card img {
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: #262a32;
  font-weight: 1000;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 104px;
  z-index: 30;
  padding: 13px 16px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-weight: 900;
  opacity: 0;
  transform: translateY(10px);
  transition: 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  position: fixed;
  right: 0;
  bottom: 16px;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1030px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(245, 164, 0, 0.16), transparent 34%),
    rgba(19, 20, 24, 0.86);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
  color: var(--muted);
  backdrop-filter: blur(14px);
}

.site-footer p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: 0;
}

.site-footer span {
  color: var(--text);
  font-weight: 950;
  text-transform: uppercase;
}

.site-footer p:last-child {
  color: var(--gold);
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 16px;
    margin-right: 0;
  }

  .hero {
    min-height: 720px;
  }

  .content-grid,
  .vote-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .site-header {
    top: 8px;
    width: calc(100% - 16px);
    padding: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .ip-pill {
    width: 100%;
  }

  .nav-links {
    font-size: 0.92rem;
  }

  .large-mark {
    width: 118px;
    height: 118px;
    font-size: 2.4rem;
  }

  .news-panel,
  .connected-panel,
  .role-panel {
    padding: 16px;
  }

  .news-card {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 14px;
  }

  .message-avatar img,
  .message-avatar span {
    width: 38px;
    height: 38px;
  }

  .discord-embed {
    grid-template-columns: 1fr;
  }

  .embed-fields {
    grid-template-columns: 1fr;
  }

  .embed-field.inline {
    grid-column: 1;
  }

  .embed-thumbnail {
    width: 100%;
    max-height: 220px;
  }
}
