:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #171a20;
  --ink-soft: #2f333b;
  --muted: #6f7480;
  --line: #e7e2d8;
  --accent: #4f46e5;
  --accent-deep: #3730a3;
  --accent-soft: #eef2ff;
  --gold: #b45309;
  --gold-soft: #fef3c7;
  --green: #047857;
  --green-soft: #ecfdf5;
  --red: #b91c1c;
  --red-soft: #fef2f2;
  --header-bg: rgba(246, 244, 239, 0.85);
  --header-line: rgba(231, 226, 216, 0.9);
  --body-background: radial-gradient(1100px 500px at 85% -10%, rgba(79, 70, 229, 0.08), transparent 60%), radial-gradient(900px 460px at -10% 10%, rgba(180, 83, 9, 0.06), transparent 55%), var(--bg);
  --container-width: 1180px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -36px rgba(23, 26, 32, 0.42);
  --shadow-soft: 0 14px 40px -30px rgba(23, 26, 32, 0.35);
  --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--body-background);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.container {
  width: min(var(--container-width), calc(100% - 48px));
  margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px -12px rgba(79, 70, 229, 0.8);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 12px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 1.13rem;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.7rem;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  flex: 1;
  min-width: 0;
}

.main-nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--ink);
}

.main-nav a.is-active {
  color: var(--ink);
  font-weight: 600;
}

.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 6px 5px 16px;
  width: 210px;
  flex-shrink: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form:focus-within {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.search-form input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-size: 0.88rem;
}

.search-form button {
  border: 0;
  background: var(--ink);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-form button:hover {
  background: var(--accent);
}

.search-form svg {
  width: 15px;
  height: 15px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  flex-shrink: 0;
}

.lang-switch a {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch a:hover {
  color: var(--ink);
  background: rgba(79, 70, 229, 0.07);
}

.lang-switch a.is-active {
  color: #fff;
  background: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 26px;
}

.hero-slider {
  position: relative;
  height: clamp(360px, 42vw, 470px);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #101322;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 6s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 13, 23, 0.82) 0%, rgba(11, 13, 23, 0.45) 48%, rgba(11, 13, 23, 0.1) 100%),
    linear-gradient(0deg, rgba(11, 13, 23, 0.35), transparent 40%);
}

.hero-copy {
  position: absolute;
  left: clamp(26px, 5vw, 64px);
  bottom: clamp(34px, 6vw, 72px);
  right: 26px;
  max-width: 620px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.hero-kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
}

.hero-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.4vw, 2.9rem);
  line-height: 1.22;
  margin: 0;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #16181d;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-slide:hover .hero-cta {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.6);
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  padding: 16px 0 0;
}

.hero-dots button {
  width: 26px;
  height: 4px;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
  background: rgba(23, 26, 32, 0.18);
  transition: background 0.25s ease, width 0.25s ease;
}

.hero-dots button.is-active {
  width: 40px;
  background: var(--accent);
}

.hero-fallback {
  padding: clamp(56px, 8vw, 96px) 0;
  background:
    linear-gradient(120deg, rgba(79, 70, 229, 0.92), rgba(14, 165, 233, 0.85)),
    #4f46e5;
  color: #fff;
  margin-bottom: 10px;
}

.hero-fallback .hero-copy {
  position: static;
  max-width: 760px;
  padding: 0;
}

.hero-fallback p {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- Stats ---------- */
.stat-band {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 22px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.stat-band > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stat-band strong {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  letter-spacing: -0.01em;
}

.stat-band span {
  color: var(--muted);
  font-size: 0.85rem;
}

.stat-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(44px, 6vw, 72px) 0 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  margin: 4px 0 0;
  letter-spacing: 0.01em;
}

.eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-link {
  color: var(--muted);
  font-size: 0.86rem;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.section-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.feature-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9.6;
  overflow: hidden;
  background: #e9e5dc;
}

.feature-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.feature-card:hover .feature-cover img {
  transform: scale(1.05);
}

.cover-chip {
  position: absolute;
  left: 14px;
  top: 14px;
  background: rgba(17, 19, 24, 0.72);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 999px;
}

.feature-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.feature-body h3 {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  line-height: 1.45;
  margin: 0;
}

.feature-body h3 a:hover {
  color: var(--accent);
}

.feature-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: auto;
}

.meta-line span {
  position: relative;
}

.meta-line span + span::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.badge-top {
  background: var(--gold-soft);
  color: var(--gold) !important;
  font-size: 0.68rem;
  padding: 1px 8px;
  border-radius: 999px;
}

.badge-top::before {
  display: none !important;
}

/* ---------- Layout with sidebar ---------- */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 42px;
  align-items: start;
}

.post-list {
  display: flex;
  flex-direction: column;
}

.post-row {
  display: flex;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.post-row:first-child {
  padding-top: 0;
}

.post-thumb {
  flex-shrink: 0;
  width: 208px;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #e9e5dc;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-row:hover .post-thumb img {
  transform: scale(1.06);
}

.post-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.post-tags a {
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 500;
}

.post-tags a:hover {
  background: #e0e7ff;
}

.post-body h3 {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  line-height: 1.45;
  margin: 0;
}

.post-body h3 a {
  transition: color 0.2s ease;
}

.post-body h3 a:hover {
  color: var(--accent);
}

.post-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-body .meta-line {
  margin-top: 4px;
}

.cover-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #c7d2fe, #a5b4fc 45%, #67e8f9);
}

/* ---------- Sidebar ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 96px;
}

.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.side-title {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
}

.side-about {
  background: linear-gradient(150deg, #1e1b4b, #312e81 60%, #4338ca);
  border: 0;
  color: #fff;
}

.side-about-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.side-about-head strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.side-about-head small {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.7rem;
  margin-top: 2px;
}

.side-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: #fde68a;
  flex-shrink: 0;
}

.side-about p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.83rem;
  line-height: 1.75;
  margin: 16px 0 14px;
}

.side-more {
  font-size: 0.8rem;
  color: #fde68a;
}

.side-more:hover {
  text-decoration: underline;
}

.hot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hot-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.hot-index {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  color: var(--accent);
  font-weight: 600;
  width: 18px;
  flex-shrink: 0;
  line-height: 1.5;
}

.hot-list li:nth-child(1) .hot-index {
  color: #dc2626;
}

.hot-list li:nth-child(2) .hot-index {
  color: #ea580c;
}

.hot-list li:nth-child(3) .hot-index {
  color: #ca8a04;
}

.hot-list a {
  display: block;
  font-size: 0.86rem;
  line-height: 1.55;
  font-weight: 500;
}

.hot-list a:hover {
  color: var(--accent);
}

.hot-list small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 3px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a {
  font-size: 0.76rem;
  color: var(--ink-soft);
  background: #f3f0e9;
  border-radius: 999px;
  padding: 5px 11px;
  transition: background 0.2s ease, color 0.2s ease;
}

.tag-cloud a:hover {
  background: var(--accent);
  color: #fff;
}

.side-subscribe p {
  color: var(--muted);
  font-size: 0.83rem;
  margin: 0 0 14px;
}

/* ---------- Buttons / page hero ---------- */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -16px rgba(79, 70, 229, 0.9);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-hero {
  padding: clamp(44px, 6vw, 76px) 0 clamp(30px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(760px 260px at 85% 0%, rgba(79, 70, 229, 0.09), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent);
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin: 8px 0 6px;
  letter-spacing: 0.01em;
}

.page-hero p {
  color: var(--muted);
  margin: 0;
  max-width: 620px;
}

.page-hero.simple {
  padding-bottom: 42px;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 32px;
}

.page-btn,
.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.84rem;
  color: var(--ink-soft);
  transition: all 0.2s ease;
}

.page-num {
  padding: 0;
}

.page-btn:hover,
.page-num:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-num.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- Empty / not found ---------- */
.empty-state,
.notfound {
  text-align: center;
  padding: 70px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.empty-state .empty-icon {
  font-size: 2.4rem;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.empty-state h3,
.notfound h1 {
  font-family: var(--font-serif);
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.empty-state p,
.notfound p {
  color: var(--muted);
  margin: 0 0 22px;
}

.notfound {
  margin-top: 60px;
  margin-bottom: 60px;
}

.nf-code {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 12vw, 6.4rem);
  line-height: 1;
  color: var(--accent);
  opacity: 0.22;
  display: block;
  font-weight: 700;
}

.nf-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Article ---------- */
.article-page {
  max-width: 820px;
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 26px;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.crumb-current {
  display: inline-block;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.3;
  margin: 12px 0 16px;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.chip {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}

.article-lead {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
  margin: 0 0 22px;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.avatar-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 600;
}

.dot-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.55;
}

.article-cover {
  margin: 30px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 8.6;
  object-fit: cover;
}

.article-content {
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--ink-soft);
  padding-top: 20px;
}

.article-content > p:first-child {
  font-size: 1.06rem;
}

.article-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--ink);
  margin: 2.2em 0 0.8em;
  padding-left: 14px;
  position: relative;
  line-height: 1.4;
}

.article-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), #0ea5e9);
}

.article-content h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink);
  margin: 1.8em 0 0.6em;
}

.article-content p {
  margin: 1.1em 0;
}

.article-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(79, 70, 229, 0.3);
}

.article-content ul,
.article-content ol {
  padding-left: 1.5em;
  margin: 1.1em 0;
}

.article-content li {
  margin: 0.4em 0;
}

.article-content li::marker {
  color: var(--accent);
}

.article-content blockquote {
  margin: 1.6em 0;
  padding: 16px 22px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  color: #3730a3;
  font-size: 0.98rem;
}

.article-content blockquote p {
  margin: 0;
}

.article-content code {
  background: #f1eee7;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 0.88em;
  font-family: "JetBrains Mono", Consolas, Menlo, monospace;
  color: #b91c1c;
}

.article-content pre {
  background: #111827;
  color: #e5e7eb;
  padding: 20px 22px;
  border-radius: 14px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: 0.86rem;
  line-height: 1.75;
}

.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.article-content img {
  border-radius: 14px;
  margin: 1.4em 0;
}

.article-content strong {
  color: var(--ink);
}

.article-content hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 2.4em 0;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  margin-top: 34px;
}

.article-tags a {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.article-tags a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 10px 0 44px;
}

.article-nav a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.article-nav a:hover {
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.article-nav a small {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.article-nav a span {
  font-family: var(--font-serif);
  font-size: 0.94rem;
  line-height: 1.5;
}

.article-nav a.next {
  text-align: right;
}

/* ---------- Comments ---------- */
.comments {
  border-top: 1px solid var(--line);
  padding-top: 40px;
}

.comments-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.comments-head h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin: 0;
}

.comment-count {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--font-sans);
  font-weight: 400;
  margin-left: 4px;
}

.comments-hint {
  color: var(--muted);
  font-size: 0.78rem;
}

.notice {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.86rem;
  margin-bottom: 18px;
}

.notice.ok {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid #a7f3d0;
}

.notice.err {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid #fecaca;
}

.notice.slow {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid #fde68a;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-bottom: 40px;
}

.comment {
  display: flex;
  gap: 14px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0e7ff, #a5f3fc);
  color: #3730a3;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.comment-head strong {
  font-size: 0.9rem;
}

.comment-head time {
  color: var(--muted);
  font-size: 0.72rem;
}

.comment-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.8;
  white-space: pre-line;
}

.comment-reply {
  margin-left: 54px;
  margin-top: -6px;
}

.comment-reply .comment-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.78rem;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.reply-box {
  margin-top: 8px;
}

.reply-box summary {
  font-size: 0.76rem;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: inline-block;
  padding: 2px 0;
}

.reply-box summary:hover {
  color: var(--accent);
}

.reply-box summary::-webkit-details-marker {
  display: none;
}

.comment-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-soft);
}

.comment-form h3 {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  margin: 0 0 16px;
}

.comment-form.is-compact {
  margin-top: 12px;
  padding: 16px;
  box-shadow: none;
  background: #fbfaf7;
}

.comment-form.is-compact h3 {
  display: none;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  outline: 0;
  background: #fdfcf9;
  font-size: 0.88rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
  background: #fff;
}

.comment-form textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-form .form-row + textarea {
  margin-bottom: 14px;
}

.comment-form textarea {
  margin-bottom: 14px;
}

.comment-form.is-compact button {
  margin-top: 4px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-hint {
  color: var(--muted);
  font-size: 0.75rem;
}

.comments-empty {
  padding: 26px;
  background: #fbfaf7;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
  margin-bottom: 28px;
}

.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Single page ---------- */
.single-page {
  max-width: 800px;
  padding-top: 46px;
  padding-bottom: 30px;
}

/* ---------- Public contact card ---------- */
.contact-card {
  margin-top: 46px;
  padding: 30px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.contact-card-head h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--ink);
  margin: 8px 0 6px;
}

.contact-card-head p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 22px;
}

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

.contact-card-item {
  padding: 16px 18px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.contact-card-item span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-card-item strong {
  display: block;
  margin-top: 7px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
  word-break: break-word;
}

.contact-card-item a {
  color: var(--accent);
}

.contact-card-item a:hover {
  text-decoration: underline;
}

.contact-card-map {
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eef1f4;
}

.contact-card-map iframe,
.contact-map-canvas {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
}

.contact-map-canvas {
  position: relative;
  background: #eef1f4;
  z-index: 0;
}

.contact-map-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: var(--text);
}

.contact-map-caption span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-map-caption a {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 600;
}

.contact-map-caption a:hover {
  text-decoration: underline;
}

.cms-map-pin {
  background: none;
  border: 0;
}

.cms-map-pin::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #2f6fed;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.28);
  transform: rotate(-45deg);
}

.cms-map-pin span {
  position: absolute;
  left: 11px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

@media (max-width: 760px) {
  .contact-card {
    padding: 24px 20px;
  }

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

  .contact-card-map iframe,
  .contact-map-canvas {
    height: 240px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 80px;
  background: #121419;
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 48px;
  padding: 58px 0 40px;
}

.brand-dark .brand-text strong {
  color: #fff;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  line-height: 1.85;
  margin: 18px 0 14px;
  max-width: 340px;
}

.footer-github {
  font-size: 0.8rem;
  color: #c7d2fe;
}

.footer-github:hover {
  color: #fff;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 6px;
  font-weight: 600;
}

.footer-col a,
.footer-dim {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.84rem;
}

.footer-address {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.84rem;
  line-height: 1.7;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a:hover {
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .brand-text small {
    display: none;
  }

  .search-form {
    width: 170px;
  }

  .stat-band {
    gap: 28px;
    flex-wrap: wrap;
  }

  .stat-note {
    width: 100%;
    margin-left: 0;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 34px;
  }
}

@media (max-width: 760px) {
  .container {
    width: calc(100% - 32px);
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
    gap: 18px;
  }

  .search-form {
    margin-left: auto;
    width: 150px;
  }

  .lang-switch {
    order: 2;
  }

  .hero-slider {
    height: 340px;
    border-radius: 20px;
  }

  .hero-copy {
    left: 22px;
    bottom: 26px;
  }

  .hero-copy h1 {
    font-size: 1.6rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .post-row {
    gap: 14px;
  }

  .post-thumb {
    width: 118px;
    aspect-ratio: 1 / 1;
  }

  .post-body h3 {
    font-size: 1.05rem;
  }

  .post-body p {
    display: none;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .stat-band {
    gap: 18px 30px;
    padding: 18px 22px;
  }

  .stat-band strong {
    font-size: 1.4rem;
  }

  .article-page {
    padding-top: 22px;
  }

  .article-cover {
    margin-top: 22px;
  }

  .article-content {
    font-size: 0.98rem;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav a.next {
    text-align: left;
  }

  .comment {
    gap: 10px;
  }

  .comment-reply {
    margin-left: 34px;
  }

  .comment-form {
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* ---------- Products ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.product-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9.6;
  overflow: hidden;
  background: #e9e5dc;
}

.product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .product-cover img {
  transform: scale(1.05);
}

.product-price {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(17, 19, 24, 0.78);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: 999px;
}

.product-price.is-static {
  position: static;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(180, 83, 9, 0.2);
  padding: 7px 15px;
  font-size: 0.86rem;
}

.product-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.product-body h3 {
  font-family: var(--font-serif);
  font-size: 1.16rem;
  line-height: 1.45;
  margin: 0;
}

.product-body h3 a:hover {
  color: var(--accent);
}

.product-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-more {
  margin-top: auto;
  padding-top: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.product-more:hover {
  color: var(--accent-deep);
}

.product-page {
  max-width: 1000px;
  padding-top: 34px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: center;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.product-detail h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.3;
  margin: 10px 0 14px;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.product-lead {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.85;
  margin: 0 0 22px;
}

.product-detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.product-detail-cover {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: #e9e5dc;
}

.product-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-content {
  max-width: none;
}

.product-cta {
  margin: 44px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1e1b4b, #312e81 60%, #4338ca);
  color: #fff;
  box-shadow: var(--shadow);
}

.product-cta h3 {
  font-family: var(--font-serif);
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.product-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.7;
}

.product-cta .btn-primary {
  background: #fff;
  color: var(--ink);
  flex-shrink: 0;
}

.product-cta .btn-primary:hover {
  background: var(--gold-soft);
  color: var(--gold);
}

@media (max-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-page {
    padding-top: 22px;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .product-detail-cover {
    order: -1;
  }

  .product-cta {
    padding: 22px;
  }
}
