:root {
  --community-bg: #f5f7fb;
  --community-card: #fff;
  --community-text: #172033;
  --community-muted: #657086;
  --community-line: #e4e9f2;
  --community-brand: #3457e5;
  --community-brand-dark: #243fb7;
  --community-soft: #eef2ff;
  --community-radius: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--community-bg); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--community-bg);
  color: var(--community-text);
  font: 15px/1.68 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  text-rendering: optimizeLegibility;
}
a { color: var(--community-brand); text-decoration: none; }
a:hover { color: var(--community-brand-dark); text-decoration: underline; }
a:focus-visible { outline: 3px solid rgba(52, 87, 229, .35); outline-offset: 3px; border-radius: 4px; }
.community-shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.community-skip { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: #111827; color: #fff; }
.community-skip:focus { top: 12px; }

.community-header { background: #fff; border-bottom: 1px solid var(--community-line); }
.community-header__inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.community-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--community-text); }
.community-brand:hover { text-decoration: none; }
.community-brand__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #5575ff, #2e49c7); color: #fff; font-weight: 800; }
.community-brand strong, .community-brand small { display: block; }
.community-brand strong { font-size: 17px; line-height: 1.25; }
.community-brand small { margin-top: 2px; color: var(--community-muted); font-size: 12px; }
.community-header__links { display: flex; align-items: center; gap: 22px; white-space: nowrap; }
.community-header__links a { color: #475169; font-weight: 600; }
.community-channel-nav { border-top: 1px solid #f0f2f7; overflow-x: auto; scrollbar-width: thin; }
.community-channel-nav__inner { display: flex; min-width: max-content; }
.community-channel-nav a { position: relative; padding: 13px 20px; color: #59637a; font-weight: 600; }
.community-channel-nav a:first-child { padding-left: 0; }
.community-channel-nav a.is-active { color: var(--community-brand); }
.community-channel-nav a.is-active::after { content: ""; position: absolute; right: 20px; bottom: 0; left: 20px; height: 3px; border-radius: 3px 3px 0 0; background: var(--community-brand); }
.community-channel-nav a:first-child.is-active::after { left: 0; }

.community-breadcrumbs { padding: 18px 0 4px; color: var(--community-muted); font-size: 13px; }
.community-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.community-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 7px; color: #a5adbc; }
.community-breadcrumbs a { color: inherit; }
.community-notice { margin-top: 12px; padding: 12px 15px; border: 1px solid #f0d995; border-radius: 10px; background: #fff9e8; color: #74550b; }

.community-main { padding-block: 26px 64px; }
.community-hero { padding: 42px 46px; border-radius: 22px; background: linear-gradient(135deg, #233a9f, #4e70ef 65%, #7691ff); color: #fff; box-shadow: 0 16px 38px rgba(41, 61, 145, .19); }
.community-eyebrow { margin: 0 0 9px; letter-spacing: .11em; color: var(--community-brand); font-size: 12px; font-weight: 800; }
.community-hero .community-eyebrow { color: #dbe3ff; }
.community-hero h1, .community-page-heading h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.2; }
.community-hero__description { max-width: 720px; margin: 14px 0 0; color: #edf1ff; font-size: 17px; }
.community-hero__actions { display: flex; gap: 12px; margin-top: 22px; }

.community-board-grid { display: grid; gap: 20px; margin-top: 24px; }
.community-board-card, .community-list-panel, .community-thread, .community-replies { border: 1px solid var(--community-line); border-radius: var(--community-radius); background: var(--community-card); box-shadow: 0 8px 26px rgba(24, 37, 72, .045); }
.community-board-card { padding: 24px 26px 8px; }
.community-board-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 16px; }
.community-board-card h2 { margin: 0; font-size: 21px; line-height: 1.35; }
.community-board-card h2 a { color: var(--community-text); }
.community-board-card__header p { margin: 7px 0 0; color: var(--community-muted); }
.community-more { flex: 0 0 auto; padding: 7px 11px; border-radius: 8px; background: var(--community-soft); font-size: 13px; font-weight: 700; }

.community-page-heading { padding: 18px 2px 25px; }
.community-page-heading > p:last-child { max-width: 760px; margin: 12px 0 0; color: var(--community-muted); font-size: 16px; }
.community-page-heading--with-action { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.community-page-heading--with-action > div > p:last-child { max-width: 760px; margin: 12px 0 0; color: var(--community-muted); font-size: 16px; }
.community-list-panel { overflow: hidden; }
.community-topic-list { margin: 0; padding: 0; list-style: none; }
.community-topic-list > li { padding: 22px 26px; border-top: 1px solid var(--community-line); }
.community-topic-list > li:first-child { border-top: 0; }
.community-topic-list h2, .community-topic-list h3 { margin: 0; line-height: 1.42; }
.community-topic-list h2 { font-size: 19px; }
.community-topic-list h3 { font-size: 16px; }
.community-topic-list h2 a, .community-topic-list h3 a { color: var(--community-text); }
.community-topic-list__body > p { margin: 7px 0; color: var(--community-muted); }
.community-topic-list--compact > li { padding-inline: 0; }
.community-topic-meta { display: flex; flex-wrap: wrap; gap: 6px 17px; margin-top: 10px; color: #7b8497; font-size: 13px; }
.community-empty { margin: 0; padding: 22px 0; color: var(--community-muted); }
.community-empty--large { padding: 54px 24px; text-align: center; }
.community-empty--large h2 { margin: 0 0 6px; color: var(--community-text); }

.community-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 24px; }
.community-pagination a, .community-pagination span { padding: 9px 14px; border: 1px solid var(--community-line); border-radius: 9px; background: #fff; }
.community-pagination span { color: var(--community-muted); }

.community-thread { overflow: hidden; }
.community-thread__header { padding: 28px 30px 22px; border-bottom: 1px solid var(--community-line); }
.community-thread__header h1 { margin: 0; font-size: clamp(25px, 4vw, 36px); line-height: 1.32; overflow-wrap: anywhere; }
.community-post-body { padding: 30px; font-size: 16px; line-height: 1.86; overflow-wrap: anywhere; white-space: normal; }
.community-replies { margin-top: 22px; overflow: hidden; }
.community-replies__header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 20px 26px; border-bottom: 1px solid var(--community-line); }
.community-replies__header h2 { margin: 0; font-size: 20px; }
.community-replies__header span { color: var(--community-muted); font-size: 13px; }
.community-replies__header > div { display: flex; align-items: baseline; gap: 14px; }
.community-thread-closed { padding: 7px 10px; border-radius: 8px; background: #f1f3f7; }
.community-reply-list { margin: 0; padding: 0; list-style: none; }
.community-reply-list > li { padding: 22px 26px; border-top: 1px solid var(--community-line); }
.community-reply-list > li:first-child { border-top: 0; }
.community-reply-list header { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--community-muted); font-size: 13px; }
.community-reply-list header strong { color: var(--community-text); font-size: 14px; }
.community-post-body--reply { padding: 14px 0 0; font-size: 15px; }
.community-replies > .community-pagination { margin: 0; padding: 20px; border-top: 1px solid var(--community-line); }

.community-error { padding: 72px 24px; border: 1px solid var(--community-line); border-radius: var(--community-radius); background: #fff; text-align: center; }
.community-error__status { margin: 0; color: #ccd2de; font-size: 72px; font-weight: 900; line-height: 1; }
.community-error h1 { margin: 16px 0 4px; }
.community-error > p:not(.community-error__status) { color: var(--community-muted); }
.community-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; margin-top: 14px; padding: 9px 17px; border: 1px solid transparent; border-radius: 9px; background: var(--community-brand); color: #fff; font: inherit; font-weight: 700; line-height: 1.3; cursor: pointer; }
.community-button:hover { background: var(--community-brand-dark); color: #fff; text-decoration: none; }
.community-button:focus-visible, .community-form input:focus-visible, .community-form textarea:focus-visible { outline: 3px solid rgba(52, 87, 229, .35); outline-offset: 2px; }
.community-button--light { margin-top: 0; background: #fff; color: #243fb7; }
.community-button--light:hover { background: #edf1ff; color: #1f369d; }
.community-button--secondary { border-color: var(--community-line); background: #fff; color: #38445c; }
.community-button--secondary:hover { border-color: #c8d0df; background: #f6f8fb; color: var(--community-text); }
.community-button--compact { min-height: 36px; margin-top: 0; padding: 7px 12px; font-size: 13px; }

.community-composer { max-width: 820px; margin-inline: auto; overflow: hidden; border: 1px solid var(--community-line); border-radius: var(--community-radius); background: #fff; box-shadow: 0 8px 26px rgba(24, 37, 72, .05); }
.community-composer__header { padding: 28px 30px 22px; border-bottom: 1px solid var(--community-line); }
.community-composer__header h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); line-height: 1.3; overflow-wrap: anywhere; }
.community-composer__header > p:last-child { margin: 10px 0 0; color: var(--community-muted); }
.community-form { padding: 26px 30px 30px; }
.community-form__identity { margin: 0 0 18px; padding: 10px 13px; border-radius: 9px; background: var(--community-soft); color: #39445d; }
.community-account { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 18px; }
.community-account .community-form__identity, .community-account form { margin: 0; }
.community-field + .community-field { margin-top: 21px; }
.community-field label { display: block; margin-bottom: 7px; font-weight: 700; }
.community-field input, .community-field textarea { display: block; width: 100%; border: 1px solid #cfd6e3; border-radius: 9px; background: #fff; color: var(--community-text); font: inherit; }
.community-field input { min-height: 44px; padding: 9px 12px; }
.community-field textarea { min-height: 220px; padding: 11px 12px; line-height: 1.7; resize: vertical; }
.community-field input:hover, .community-field textarea:hover { border-color: #aeb8ca; }
.community-field input:focus, .community-field textarea:focus { border-color: var(--community-brand); outline: none; }
.community-field > p { margin: 6px 0 0; color: var(--community-muted); font-size: 13px; }
.community-field--compact { max-width: 360px; }
.community-composer__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 25px; }
.community-composer__actions .community-button { margin-top: 0; }
.community-composer__state { padding: 30px; }
.community-composer__state h2 { margin: 0 0 7px; }
.community-composer__state p { margin: 0 0 7px; color: var(--community-muted); }
.community-form-message { margin: 22px 30px 0; padding: 12px 14px; border: 1px solid; border-radius: 9px; }
.community-form-message--error { border-color: #f0b7b7; background: #fff2f2; color: #8b2323; }
.community-form-message--success { border-color: #a8d7b4; background: #effbf2; color: #246437; }

.community-footer { border-top: 1px solid var(--community-line); background: #fff; color: var(--community-muted); font-size: 13px; }
.community-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 86px; }
.community-footer p { margin: 0; }

@media (max-width: 700px) {
  .community-shell { width: min(100% - 22px, 1120px); }
  .community-header__inner { min-height: 64px; }
  .community-header__links { gap: 13px; font-size: 13px; }
  .community-channel-nav a { padding-inline: 14px; }
  .community-channel-nav a:first-child { padding-left: 0; }
  .community-channel-nav a.is-active::after { right: 14px; left: 14px; }
  .community-hero { padding: 29px 24px; border-radius: 16px; }
  .community-hero__description { font-size: 15px; }
  .community-page-heading--with-action { align-items: flex-start; flex-direction: column; gap: 4px; }
  .community-page-heading--with-action > .community-button { width: 100%; }
  .community-board-card { padding: 20px 18px 5px; }
  .community-board-card__header { gap: 12px; }
  .community-more { display: none; }
  .community-topic-list > li { padding: 19px 18px; }
  .community-thread__header, .community-post-body { padding: 22px 19px; }
  .community-replies__header, .community-reply-list > li { padding-inline: 19px; }
  .community-replies__header { align-items: flex-start; }
  .community-replies__header > div { display: block; }
  .community-replies__header .community-button { flex: 0 0 auto; }
  .community-composer__header, .community-form, .community-composer__state { padding: 22px 19px; }
  .community-form-message { margin: 18px 19px 0; }
  .community-composer__actions { align-items: stretch; flex-direction: column; }
  .community-composer__actions .community-button { width: 100%; }
  .community-footer__inner { display: block; padding-block: 20px; }
  .community-footer p + p { margin-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
