/* ===========================================================
   Global layout & primitives
   =========================================================== */
.container {
  /* live home @1920: 80px side margins, 1760px content */
  width: calc(100% - 160px);
  max-width: 1760px;
  margin: 0 auto;
}
@media (max-width: 1200px) { .container { width: calc(100% - 64px); } }
@media (max-width: 768px) {
  .container { width: calc(100% - 40px); }
}

.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }
main.site-main { flex: 1 0 auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; height: 36px; padding: 0 16px;
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  border-radius: var(--radius-md); white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-outline { border: 1px solid var(--color-border); color: var(--color-text-strong); background: var(--c-panel); }
.btn-outline:hover { border-color: var(--color-text-muted); }
.btn-ghost { color: var(--color-text-muted); }
.btn-ghost:hover { color: var(--color-text); }
.btn-sm { height: 30px; padding: 0 12px; font-size: var(--fs-xs); }
.btn-lg { height: 44px; padding: 0 24px; font-size: var(--fs-base); }

/* ---- Badges / chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: var(--radius-sm);
  font-size: var(--fs-xs); font-weight: var(--fw-medium);
  background: var(--color-surface-2); color: var(--color-text-muted);
}
.chip-primary { background: var(--color-primary-bg); color: var(--color-primary); }
.chip-red-soft { background: rgba(231,75,59,.1); color: var(--color-primary); }

/* ---- Section heading ---- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 32px 0 18px;
}
.section-head h2 {
  font-size: var(--fs-xl); font-weight: var(--fw-semibold); color: var(--color-text);
  display: flex; align-items: baseline; gap: 10px;
}
.section-head h2 .en { font-size: var(--fs-sm); color: var(--color-text-light); font-weight: var(--fw-normal); letter-spacing: .08em; }
.section-head a.more { font-size: var(--fs-sm); color: var(--color-text-muted); }
.section-head a.more:hover { color: var(--color-primary); }

/* ---- Utility ---- */
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-text-muted); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
