.community-top {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.community-content {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto 5rem;
}

.community-content h1,
.community-content h2 {
  max-width: none;
  text-align: left;
  text-wrap: pretty;
  letter-spacing: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.community-content h1 {
  margin: 0.4rem 0 1rem;
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 500;
  line-height: 1.12;
}

.community-content h2 {
  margin: 2.6rem 0 0.7rem;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 500;
  line-height: 1.25;
}

.community-content p,
.community-content li {
  font-size: 1.04rem;
  line-height: 1.8;
}

.community-content p {
  margin: 0 0 1rem;
}

.community-content ul,
.community-steps {
  padding-left: 1.35rem;
}

.community-content li {
  padding-left: 0.2rem;
  margin: 0.45rem 0;
}

.community-step-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.community-eyebrow,
.community-guide-label {
  color: var(--brand-text);
  font-size: 0.75rem !important;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4 !important;
}

.community-lead {
  max-width: 46rem;
  margin: 0 0 2.3rem !important;
  color: var(--muted);
  font-size: 1.18rem !important;
  line-height: 1.65 !important;
}

.community-content code {
  padding: 0.1em 0.3em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: color-mix(in srgb, var(--text) 5%, var(--bg));
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.community-codeblock {
  position: relative;
  margin: 1rem 0 1.25rem;
}

.community-codeblock pre {
  overflow-x: auto;
  margin: 0;
  padding: 3.25rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f5f4;
  color: #17201e;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.community-codeblock pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.community-copy {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.community-copy:hover {
  border-color: var(--brand);
  color: var(--brand-text);
}

.community-copy:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.community-warning {
  margin-top: 2rem;
  padding: 0.1rem 1.25rem 1.25rem;
  border-left: 3px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, var(--bg));
}

.community-warning h2 {
  margin-top: 1.2rem;
}

.community-policy-note {
  margin: 1.25rem 0 1rem;
}

.community-policy-note h2 {
  margin-top: 1rem;
}

.community-back {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.community-guide-card {
  position: relative;
  display: grid;
  gap: 0.45rem;
  margin-top: 2.5rem;
  padding: 1.45rem 3.5rem 1.45rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}

.community-guide-card:hover {
  border-color: var(--brand);
  color: var(--text);
  transform: translateY(-2px);
}

.community-guide-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.3;
}

.community-guide-summary {
  color: var(--muted);
  line-height: 1.6;
}

.community-guide-arrow {
  position: absolute;
  top: 50%;
  right: 1.4rem;
  color: var(--brand-text);
  font-size: 1.5rem;
  transform: translateY(-50%);
}

:root[data-theme="dark"] .community-codeblock pre {
  background: #1b201f;
  color: #e7e9e7;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .community-codeblock pre {
    background: #1b201f;
    color: #e7e9e7;
  }
}

@media (max-width: 640px) {
  .community-top {
    margin-bottom: 1.5rem;
  }

  .community-content {
    margin-bottom: 3rem;
  }

  .community-guide-card {
    padding-left: 1rem;
  }
}
