.community-hero h1 {
  max-width: 820px;
  font-size: clamp(3.2rem, 6vw, 5.65rem);
}

.community-hero h1 em {
  color: #66d6c8;
}

.community-hero .hero-numbers article:first-child {
  background:
    radial-gradient(circle at 76% 28%, rgba(102, 214, 200, 0.16), transparent 12rem),
    var(--surface);
}

.community-hero .hero-numbers strong {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.community-hero .hero-numbers strong i {
  color: var(--meta);
  font-size: 0.42em;
  font-style: normal;
  letter-spacing: -0.03em;
}

.community-snapshot {
  padding-top: 1rem;
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.pulse-card {
  min-width: 0;
  min-height: 410px;
  padding: clamp(1.35rem, 3vw, 2.2rem);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 88% 12%, rgba(102, 214, 200, 0.08), transparent 14rem),
    rgba(var(--surface-rgb), 0.62);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.minecraft-card {
  grid-column: span 2;
  background:
    radial-gradient(circle at 84% 18%, rgba(102, 214, 200, 0.13), transparent 18rem),
    linear-gradient(120deg, rgba(var(--accent-rgb), 0.06), transparent 54%),
    rgba(var(--surface-rgb), 0.72);
}

.discord-card {
  background:
    radial-gradient(circle at 86% 12%, rgba(179, 146, 244, 0.11), transparent 14rem),
    rgba(var(--surface-rgb), 0.62);
}

.portal-card {
  background:
    radial-gradient(circle at 86% 12%, rgba(var(--accent-rgb), 0.11), transparent 14rem),
    rgba(var(--surface-rgb), 0.62);
}

.pulse-card > header {
  margin-bottom: 2.2rem;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.pulse-card header img,
.pulse-symbol {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #66d6c8;
  background: rgba(102, 214, 200, 0.08);
  border: 1px solid rgba(102, 214, 200, 0.25);
  border-radius: 7px;
  font: 1.05rem "DM Mono", monospace;
}

.discord-symbol {
  color: var(--violet);
  background: rgba(179, 146, 244, 0.08);
  border-color: rgba(179, 146, 244, 0.25);
}

.pulse-card header small,
.portal-totals small,
.history-heading small {
  color: var(--meta);
  font: 0.57rem "DM Mono", monospace;
  letter-spacing: 0.12em;
}

.pulse-card header h3 {
  margin: 0.25rem 0 0;
  font-size: 1.15rem;
}

.source-state {
  padding: 0.38rem 0.48rem;
  color: #66d6c8;
  background: rgba(102, 214, 200, 0.08);
  border: 1px solid rgba(102, 214, 200, 0.2);
  border-radius: 4px;
  font: 0.52rem "DM Mono", monospace;
  letter-spacing: 0.08em;
}

.source-state.approximate {
  color: var(--violet);
  background: rgba(179, 146, 244, 0.08);
  border-color: rgba(179, 146, 244, 0.2);
}

.pulse-primary {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.pulse-primary strong {
  color: #66d6c8;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.pulse-primary span,
.discord-totals span,
.portal-totals span {
  color: var(--muted);
  font-size: 0.7rem;
}

.capacity-track {
  width: 100%;
  height: 10px;
  margin: 1.15rem 0 2rem;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.capacity-track i {
  width: 0;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--accent), #66d6c8);
}

.pulse-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.pulse-card dl > div {
  min-width: 0;
  padding: 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pulse-card dt {
  margin-bottom: 0.35rem;
  color: var(--meta);
  font: 0.52rem "DM Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pulse-card dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--copy-strong);
  font-size: 0.76rem;
}

.discord-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.discord-totals > div {
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.discord-totals strong,
.portal-totals strong {
  color: var(--violet);
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.05em;
}

.discord-share {
  margin: 1.4rem 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.discord-share > span {
  color: var(--violet);
  font: 1.25rem "DM Mono", monospace;
}

.discord-share p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.6;
}

.portal-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.portal-totals > div {
  min-height: 120px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.portal-totals > div:last-child {
  grid-column: span 2;
}

.portal-totals strong {
  margin-top: auto;
  color: var(--accent);
}

.community-action {
  width: fit-content;
  margin-top: auto;
  padding-top: 1.2rem;
  color: #66d6c8;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.community-action:hover,
.community-action:focus-visible {
  color: var(--accent-hover);
}

.community-history {
  padding-top: 6rem;
}

.history-shell {
  padding: clamp(1.35rem, 3vw, 2.25rem);
  background:
    radial-gradient(circle at 80% 10%, rgba(var(--accent-rgb), 0.08), transparent 17rem),
    rgba(var(--surface-rgb), 0.62);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.history-heading {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.history-heading h3 {
  margin: 0.35rem 0 0.55rem;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.history-heading p {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.history-legend {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.history-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font: 0.56rem "DM Mono", monospace;
}

.history-legend span::before {
  content: "";
  width: 18px;
  height: 3px;
  background: #66d6c8;
}

.history-legend .discord-legend::before {
  background: var(--violet);
}

.history-empty {
  min-height: 260px;
  padding: 2rem;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    linear-gradient(rgba(var(--accent-rgb), 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.035) 1px, transparent 1px);
  background-size: 30px 30px;
  border: 1px solid var(--line);
}

.history-empty > span {
  color: var(--accent);
  font: 2.6rem "DM Mono", monospace;
}

.history-empty strong {
  margin-top: 0.5rem;
  font-size: 1.2rem;
}

.history-empty p {
  max-width: 520px;
  margin: 0.55rem auto 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

.history-chart {
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.history-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.history-grid-line {
  stroke: rgba(190, 214, 239, 0.1);
  stroke-width: 1;
}

.history-series-minecraft,
.history-series-discord {
  fill: none;
  stroke: #66d6c8;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-series-discord {
  stroke: var(--violet);
}

.history-point-minecraft {
  fill: #66d6c8;
}

.history-point-discord {
  fill: var(--violet);
}

.history-axis-label {
  fill: var(--meta);
  font: 18px "DM Mono", monospace;
}

.history-latest {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.history-latest article {
  min-height: 95px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.history-latest small {
  color: var(--meta);
  font: 0.52rem "DM Mono", monospace;
  letter-spacing: 0.08em;
}

.history-latest strong {
  margin-top: auto;
  color: #66d6c8;
  font-size: 1.05rem;
}

.community-error {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto 4rem;
  padding: 1.25rem;
  display: grid;
  gap: 0.25rem;
  color: var(--coral);
  background: rgba(240, 137, 117, 0.06);
  border: 1px solid rgba(240, 137, 117, 0.22);
  border-radius: 8px;
}

.community-error span {
  color: var(--muted);
  font-size: 0.74rem;
}

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

  .minecraft-card {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .pulse-card > header,
  .history-heading {
    grid-template-columns: 42px 1fr;
  }

  .pulse-card > header {
    display: grid;
  }

  .pulse-card header img,
  .pulse-symbol {
    width: 42px;
    height: 42px;
  }

  .source-state {
    grid-column: 2;
    width: fit-content;
  }

  .pulse-card dl,
  .discord-totals,
  .portal-totals,
  .history-latest {
    grid-template-columns: 1fr;
  }

  .portal-totals > div:last-child {
    grid-column: auto;
  }

  .history-heading {
    display: grid;
  }

  .history-latest article {
    min-height: 80px;
  }
}
