/* BilzatWeb · 轻社区 · 性能墙 v2 */
.cw-page { min-height: 100vh; }

.cw-hero {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 400px at 20% 0%, rgba(109, 94, 245, 0.12), transparent 60%),
    linear-gradient(180deg, #faf9ff 0%, #fff 100%);
}
.cw-hero-inner {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .cw-hero-inner { grid-template-columns: 1.2fr 0.8fr; align-items: center; }
}
.cw-hero h1 { margin: 8px 0; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.02em; }
.cw-hero-lead { max-width: 36rem; color: var(--muted); line-height: 1.6; margin: 0; font-size: 15px; }
.cw-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.cw-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 520px) { .cw-stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .cw-stats-grid { grid-template-columns: repeat(5, 1fr); } }
.cw-stat {
  padding: 14px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  text-align: center;
}
.cw-stat b { display: block; font-size: 22px; color: var(--accent); margin-bottom: 4px; }
.cw-stat span { font-size: 11px; color: var(--muted); }

.cw-steps {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  padding: 24px 16px;
}
@media (min-width: 768px) { .cw-steps { grid-template-columns: repeat(4, 1fr); } }

/* 四格深色指标卡 · 官方 + 社区 */
.cw-showcase {
  padding: 20px 16px 8px;
}
.cw-showcase-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .cw-showcase-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .cw-showcase-grid { grid-template-columns: repeat(4, 1fr); }
}
.cw-metric-card {
  position: relative;
  padding: 18px 16px 14px;
  border-radius: 18px;
  background: linear-gradient(165deg, #1a2332 0%, #121820 55%, #0f1419 100%);
  border: 1px solid rgba(79, 209, 197, 0.22);
  box-shadow: 0 12px 32px rgba(15, 20, 25, 0.28);
  color: #e8eef5;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cw-metric-card--official {
  border-color: rgba(79, 209, 197, 0.45);
  box-shadow: 0 14px 36px rgba(79, 209, 197, 0.12), 0 12px 32px rgba(15, 20, 25, 0.28);
}
.cw-metric-card--community {
  border-color: rgba(109, 94, 245, 0.35);
}
.cw-metric-card--placeholder {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.35);
  background: linear-gradient(165deg, #1e2430 0%, #151a22 100%);
  opacity: 0.92;
}
.cw-metric-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #4fd1c5;
  line-height: 1.35;
}
.cw-metric-card--community .cw-metric-tag { color: #a5b4fc; }
.cw-metric-card--placeholder .cw-metric-tag { color: #94a3b8; }
.cw-metric-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.cw-metric-main b {
  display: inline-block;
  font-size: clamp(36px, 5vw, 44px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.cw-metric-main b small {
  font-size: 14px;
  font-weight: 700;
  color: #4fd1c5;
  margin-left: 4px;
}
.cw-metric-card--community .cw-metric-main b small { color: #a5b4fc; }
.cw-metric-card--placeholder .cw-metric-main b { font-size: 28px; color: #94a3b8; }
.cw-metric-sub {
  margin: 6px 0 0;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.72);
}
.cw-metric-peak {
  flex-shrink: 0;
  min-width: 88px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(79, 209, 197, 0.35);
  background: rgba(79, 209, 197, 0.08);
  text-align: right;
}
.cw-metric-card--community .cw-metric-peak {
  border-color: rgba(165, 180, 252, 0.35);
  background: rgba(109, 94, 245, 0.12);
}
.cw-metric-peak span {
  display: block;
  font-size: 10px;
  color: #4fd1c5;
}
.cw-metric-card--community .cw-metric-peak span { color: #a5b4fc; }
.cw-metric-peak b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}
.cw-metric-summary {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(203, 213, 225, 0.85);
}
.cw-metric-summary a {
  color: #4fd1c5;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cw-metric-details {
  margin: auto 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: grid;
  gap: 6px;
}
.cw-metric-detail {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  line-height: 1.35;
}
.cw-metric-detail em {
  font-style: normal;
  color: #4fd1c5;
  flex-shrink: 0;
}
.cw-metric-card--community .cw-metric-detail em { color: #a5b4fc; }
.cw-metric-detail span {
  color: rgba(226, 232, 240, 0.88);
  text-align: right;
}
.cw-metric-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.cw-metric-badges span {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(109, 94, 245, 0.22);
  color: #c7d2fe;
  border: 1px solid rgba(165, 180, 252, 0.25);
}

.cw-step {
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  position: relative;
  padding-left: 52px;
}
.cw-step-num {
  position: absolute; left: 16px; top: 16px;
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.cw-step h3 { margin: 0 0 4px; font-size: 14px; }
.cw-step p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

.cw-section { padding: 28px 16px; }
.cw-section-title { margin: 0 0 6px; font-size: 20px; }
.cw-section-head {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 18px;
}
.cw-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.cw-search {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 13px; min-width: 160px; background: #fff;
}
.cw-filter, .cw-sort {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff;
}
.cw-filter button, .cw-sort button {
  border: 0; background: transparent; padding: 7px 12px; font-size: 12px; cursor: pointer; color: var(--muted);
}
.cw-filter button.on, .cw-sort button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cw-refresh { padding: 7px 12px !important; font-size: 16px; line-height: 1; }

/* Podium Top 3 */
.cw-podium {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .cw-podium { grid-template-columns: 1fr 1.15fr 1fr; align-items: end; }
}
.cw-podium-item {
  padding: 18px 16px; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); text-align: center;
}
.cw-podium-item.gold { border-color: #fbbf24; background: linear-gradient(180deg, #fffbeb, #fff); order: 0; }
.cw-podium-item.silver { border-color: #cbd5e1; }
.cw-podium-item.bronze { border-color: #fdba74; }
@media (min-width: 768px) {
  .cw-podium-item.gold { transform: translateY(-8px); order: 1; }
  .cw-podium-item.silver { order: 0; }
  .cw-podium-item.bronze { order: 2; }
}
.cw-podium-medal { font-size: 28px; line-height: 1; margin-bottom: 6px; }
.cw-podium-item h3 { margin: 0 0 4px; font-size: 14px; }
.cw-podium-tok { font-size: 28px; font-weight: 800; color: var(--accent); }
.cw-podium-tok small { font-size: 12px; font-weight: 600; color: var(--muted); }
.cw-podium-meta { font-size: 11px; color: var(--muted); margin: 6px 0 0; }

/* Wall cards */
.cw-wall-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.cw-wall-card {
  display: flex; flex-direction: column; padding: 0; background: #fff;
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.cw-wall-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(109, 94, 245, 0.12); }
.cw-wall-card.top1 { border-color: #fbbf24; }
.cw-wall-card.top2 { border-color: #94a3b8; }
.cw-wall-card.top3 { border-color: #fdba74; }
.cw-wall-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #faf9ff, #fff);
}
.cw-wall-rank { font-size: 18px; font-weight: 800; color: var(--accent); }
.cw-wall-rank.medal { font-size: 22px; }
.cw-wall-chip-tag {
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  background: #eef2ff; color: #4338ca; font-weight: 600;
}
.cw-wall-body { padding: 12px 14px 14px; flex: 1; }
.cw-wall-body h3 { margin: 0 0 6px; font-size: 15px; line-height: 1.35; }
.cw-wall-meta { margin: 0 0 10px; font-size: 11px; color: var(--muted); }
.cw-wall-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px;
}
.cw-wall-metric {
  padding: 8px 6px; background: #f8f7ff; border-radius: 10px; text-align: center;
}
.cw-wall-metric b { display: block; font-size: 17px; color: var(--ink); }
.cw-wall-metric span { font-size: 10px; color: var(--muted); }
.cw-wall-metric.highlight b { color: var(--accent); }
.cw-wall-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.cw-wall-badge {
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  background: #ecfdf5; color: #047857; font-weight: 600;
}
.cw-wall-badge.club { background: #fef3c7; color: #b45309; }
.cw-wall-note { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.4; }

/* Empty state */
.cw-empty-box {
  grid-column: 1 / -1; padding: 40px 24px; text-align: center;
  background: #fff; border: 1px dashed var(--line); border-radius: 20px;
}
.cw-empty-box h3 { margin: 0 0 8px; font-size: 18px; }
.cw-empty-box p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.cw-empty-box .btn { margin: 0 4px; }

/* Badges catalog */
.cw-badges-section { background: #faf9ff; border-radius: 20px; margin-bottom: 8px; }
.cw-badge-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 14px; }
.cw-badge-item {
  padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
}
.cw-badge-item b { display: block; font-size: 14px; margin-bottom: 4px; }
.cw-badge-item span { font-size: 11px; color: var(--muted); line-height: 1.4; }
.cw-badge-count { float: right; font-size: 11px; color: var(--accent); font-weight: 700; }

/* Recipes */
.cw-recipes-section {
  background: linear-gradient(180deg, #fff, #faf9ff);
  border: 1px solid var(--line); border-radius: 20px; margin-bottom: 8px;
}
.cw-recipe-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.cw-recipe-card {
  padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.cw-recipe-card h4 { margin: 0; font-size: 15px; }
.cw-recipe-meta { margin: 0; font-size: 11px; color: var(--muted); }
.cw-recipe-hint {
  margin: 0; font-size: 12px; color: var(--ink); line-height: 1.45;
  padding: 8px 10px; background: #f8f7ff; border-radius: 8px; font-family: var(--mono); font-size: 11px;
}
.cw-apply-recipe { font-size: 12px; padding: 8px 12px; align-self: flex-start; margin-top: auto; }

/* Bottom grid */
.cw-bottom-grid {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .cw-bottom-grid { grid-template-columns: 1fr 1fr; } }
.cw-feedback-box {
  padding: 20px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); margin-top: 12px;
}
.cw-feedback-box label { display: block; margin-bottom: 10px; font-size: 13px; }
.cw-feedback-box select, .cw-feedback-box input, .cw-feedback-box textarea {
  width: 100%; margin-top: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit;
}
.cw-link-cards { display: grid; gap: 10px; margin-top: 12px; }
.cw-link-card {
  display: block; padding: 14px 16px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; color: inherit; transition: border-color .15s, box-shadow .15s;
}
.cw-link-card:hover { border-color: var(--accent); box-shadow: 0 8px 24px rgba(109, 94, 245, 0.1); }
.cw-link-card b { display: block; font-size: 14px; margin-bottom: 2px; color: var(--ink); }
.cw-link-card span { font-size: 12px; color: var(--muted); }

.cw-muted, .cw-empty { font-size: 13px; color: var(--muted); }
.cw-feedback-msg-ok { color: #047857; }

/* 社区短文 */
.cw-articles-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-bottom: 8px;
}
.cw-article-list { display: grid; gap: 12px; }
.cw-article-card {
  padding: 16px 18px;
  background: #faf9ff;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.cw-article-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(109, 94, 245, 0.08);
}
.cw-article-card h4 { margin: 0 0 6px; font-size: 16px; line-height: 1.35; }
.cw-article-meta { margin: 0 0 8px; font-size: 11px; color: var(--muted); }
.cw-article-excerpt { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.55; }
.cw-article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cw-article-tag {
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  background: #eef2ff; color: #4338ca; font-weight: 600;
}

/* 弹层 */
.cw-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.cw-modal[hidden] { display: none !important; }
.cw-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(26, 26, 46, 0.45);
  backdrop-filter: blur(4px);
}
.cw-modal-panel {
  position: relative; z-index: 1;
  width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
  padding: 22px 20px 20px;
  background: #fff; border-radius: 18px;
  box-shadow: 0 24px 64px rgba(26, 26, 46, 0.18);
}
.cw-modal-panel--read { width: min(680px, 100%); }
.cw-modal-close {
  position: absolute; right: 12px; top: 10px;
  border: 0; background: transparent; font-size: 28px; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 4px 8px;
}
.cw-modal-panel label { display: block; margin-bottom: 12px; font-size: 13px; }
.cw-modal-panel input, .cw-modal-panel textarea {
  width: 100%; margin-top: 4px; padding: 10px;
  border: 1px solid var(--line); border-radius: 10px; font: inherit;
}
.cw-modal-actions { display: flex; gap: 10px; margin-top: 4px; }
.cw-read-title { margin: 0 0 8px; font-size: 22px; line-height: 1.35; }
.cw-read-meta { margin: 0 0 16px; font-size: 12px; color: var(--muted); }
.cw-read-body {
  font-size: 14px; line-height: 1.75; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
