:root {
  --pb-ink: #111827;
  --pb-muted: #64748b;
  --pb-border: #e5e7eb;
  --pb-surface: #ffffff;
  --pb-soft: #f8fafc;
  --pb-red: #ef4444;
  --pb-blue: #2563eb;
  --pb-green: #059669;
}

* {
  box-sizing: border-box;
}

body.pb-page {
  margin: 0;
  min-height: 100vh;
  background: #f6f7f9;
  color: var(--pb-ink);
  font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
}

.pb-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.pb-topbar {
  min-height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--pb-surface);
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
}

.pb-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--pb-ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 650;
  white-space: nowrap;
}

.pb-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
}

.pb-topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.pb-topnav a {
  color: #475569;
  text-decoration: none;
}

.pb-topnav a:hover {
  color: var(--pb-ink);
}

.pb-hero,
.pb-section,
.pb-guide,
.pb-template-detail {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.pb-hero {
  padding: 48px 0 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 42px;
  align-items: center;
}

.pb-eyebrow,
.pb-section-kicker,
.pb-template-meta {
  margin: 0;
  color: var(--pb-blue);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 700;
}

.pb-hero h1,
.pb-template-detail h1 {
  margin: 12px 0 0;
  font-size: 42px;
  line-height: 1.16;
  font-weight: 760;
  letter-spacing: 0;
}

.pb-hero-lead {
  max-width: 680px;
  margin: 18px 0 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.85;
}

.pb-chip-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pb-chip,
.pb-tag-row span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  padding: 5px 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  line-height: 1.35;
}

.pb-hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pb-primary-link,
.pb-secondary-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 18px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.pb-primary-link {
  background: var(--pb-red);
  color: #ffffff;
}

.pb-primary-link:hover {
  background: #dc2626;
}

.pb-secondary-link {
  border: 1px solid var(--pb-border);
  background: var(--pb-surface);
  color: #334155;
}

.pb-secondary-link:hover {
  border-color: #cbd5e1;
  color: var(--pb-ink);
}

.pb-hero-media,
.pb-detail-media,
.pb-layout-preview {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #eef2f7;
  border: 1px solid rgba(229, 231, 235, 0.88);
}

.pb-hero-media img,
.pb-detail-media img,
.pb-layout-preview img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.pb-hero-media img {
  aspect-ratio: 4 / 5;
}

.pb-hero-media figcaption,
.pb-layout-preview figcaption {
  padding: 10px 12px;
  color: var(--pb-muted);
  background: var(--pb-surface);
  font-size: 13px;
  line-height: 1.5;
}

.pb-section {
  padding: 28px 0 40px;
}

.pb-section-head {
  max-width: 760px;
  margin-bottom: 22px;
}

.pb-section-head h2,
.pb-guide h2 {
  margin: 8px 0 0;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 720;
}

.pb-section-head p {
  margin: 10px 0 0;
  color: var(--pb-muted);
  line-height: 1.75;
}

.pb-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.pb-template-card {
  background: var(--pb-surface);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  min-height: 260px;
}

.pb-template-media {
  display: block;
  background: #eef2f7;
}

.pb-template-media img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: block;
  object-fit: cover;
}

.pb-template-body {
  padding: 22px;
}

.pb-template-body h2 {
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 1.35;
}

.pb-template-body h2 a {
  color: var(--pb-ink);
  text-decoration: none;
}

.pb-template-body p {
  margin: 10px 0 0;
  color: var(--pb-muted);
  line-height: 1.7;
  font-size: 14px;
}

.pb-tag-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pb-tag-row span {
  min-height: 28px;
  font-size: 12px;
  background: #f0fdf4;
  border-color: rgba(5, 150, 105, 0.18);
  color: #047857;
}

.pb-guide {
  margin-top: 8px;
  margin-bottom: 44px;
  padding: 30px;
  border-radius: 8px;
  background: var(--pb-surface);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.pb-guide-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pb-guide-grid article {
  border-left: 3px solid var(--pb-green);
  padding-left: 14px;
}

.pb-guide-grid h3 {
  margin: 0;
  font-size: 16px;
}

.pb-guide-grid p {
  margin: 8px 0 0;
  color: var(--pb-muted);
  font-size: 14px;
  line-height: 1.7;
}

.pb-breadcrumb {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--pb-muted);
  font-size: 13px;
}

.pb-breadcrumb a {
  color: #475569;
  text-decoration: none;
}

.pb-template-detail {
  padding: 26px 0 36px;
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.pb-detail-media img {
  aspect-ratio: 4 / 5;
}

.pb-detail-list {
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.pb-detail-list div {
  padding: 14px;
  border: 1px solid var(--pb-border);
  border-radius: 8px;
  background: var(--pb-surface);
}

.pb-detail-list dt {
  color: var(--pb-muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.pb-detail-list dd {
  margin: 0;
  color: var(--pb-ink);
  font-size: 14px;
  line-height: 1.55;
}

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

.pb-layout-preview img {
  aspect-ratio: 4 / 5;
}

.pb-footer {
  margin-top: auto;
  padding: 26px 16px 34px;
  color: var(--pb-muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 900px) {
  .pb-hero,
  .pb-template-detail {
    grid-template-columns: 1fr;
  }

  .pb-template-grid,
  .pb-guide-grid,
  .pb-layout-grid,
  .pb-detail-list {
    grid-template-columns: 1fr;
  }

  .pb-template-card {
    grid-template-columns: 1fr;
  }

  .pb-template-media img {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 640px) {
  .pb-topbar {
    min-height: auto;
    padding: 14px 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .pb-topnav {
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .pb-hero,
  .pb-section,
  .pb-guide,
  .pb-template-detail,
  .pb-breadcrumb {
    width: min(100% - 24px, 1120px);
  }

  .pb-hero {
    padding-top: 32px;
    gap: 24px;
  }

  .pb-hero h1,
  .pb-template-detail h1 {
    font-size: 32px;
  }

  .pb-hero-lead {
    font-size: 15px;
  }

  .pb-guide {
    padding: 22px;
  }
}
