:root {
  --ink: #17211b;
  --muted: #607067;
  --paper: #f7f5ef;
  --surface: #fffdf8;
  --line: #d9ded8;
  --accent: #e5582e;
  --accent-dark: #b33a1c;
  --sage: #dce8dc;
  --shadow: 0 24px 70px rgba(25, 39, 29, .1);
  --radius: 22px;
  --container: 1180px;
  --content: 760px;
}

[data-theme="dark"] {
  --ink: #edf3ee;
  --muted: #aebcb3;
  --paper: #121713;
  --surface: #19201b;
  --line: #344038;
  --accent: #ff805a;
  --accent-dark: #ff9d80;
  --sage: #233127;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

html { scroll-behavior: smooth; }
body.airlight-insight { background: var(--paper); color: var(--ink); font-family: "Mona Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body, button, input, textarea, select { color: var(--ink); }
a { color: var(--accent-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
img { border-radius: 14px; }
.container, .container-wide { box-sizing: border-box; margin-inline: auto; max-width: var(--container); padding-inline: 24px; width: 100%; }
.container-wide { max-width: 1320px; }
.content-width { box-sizing: border-box; margin-inline: auto; max-width: calc(var(--content) + 48px); padding-inline: 24px; width: 100%; }

.site-header { backdrop-filter: blur(18px); background: color-mix(in srgb, var(--paper) 90%, transparent); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header-inner { align-items: center; display: flex; gap: 28px; margin: auto; max-width: var(--container); min-height: 78px; padding: 10px 24px; }
.site-branding { margin-right: auto; }
.site-title { display: block; font-size: 1rem; line-height: 1; margin: 0; }
.site-title a { color: var(--ink); text-decoration: none; }
.site-title-text { display: inline-block; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.35rem, 3vw, 1.85rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }
.site-description { color: var(--muted); font-size: .78rem; margin: 1px 0 0; }
.custom-logo { border-radius: 0; max-height: 48px; width: auto; }
.nav-primary a { color: var(--ink); font-size: .94rem; font-weight: 650; text-decoration: none; }
.theme-toggle { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; color: var(--ink); display: inline-flex; height: 42px; justify-content: center; padding: 0; width: 42px; }

.hero-shell { padding-block: clamp(72px, 12vw, 150px); }
.hero-copy { max-width: 910px; }
.hero-copy h1, .article-header h1, .page-header h1, .archive-header h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 8.5vw, 7.2rem); letter-spacing: -.065em; line-height: .96; margin: 14px 0 24px; text-wrap: balance; }
.hero-intro, .article-deck { color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.25rem, 2.6vw, 1.8rem); line-height: 1.45; max-width: 760px; }
.eyebrow { color: var(--accent-dark); display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .13em; margin: 0; text-decoration: none; text-transform: uppercase; }
.button, .wp-element-button { background: var(--ink); border: 0; border-radius: 999px; color: var(--paper); display: inline-flex; font-weight: 750; padding: 14px 22px; text-decoration: none; }
.button:hover, .wp-element-button:hover { background: var(--accent); color: #fff; }

.section-shell { padding-bottom: 100px; }
.section-heading { align-items: end; border-top: 1px solid var(--line); display: flex; justify-content: space-between; margin-bottom: 34px; padding-top: 30px; }
.section-heading h2, .topic-strip h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 5vw, 3.8rem); letter-spacing: -.045em; margin: 8px 0 0; }
.post-grid { display: grid; gap: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(20, 30, 24, .03); display: flex; flex-direction: column; margin: 0; min-width: 0; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.post-card-media { aspect-ratio: 16 / 10; background: var(--sage); display: block; overflow: hidden; }
.post-card-media img { border-radius: 0; height: 100%; object-fit: cover; transition: transform .35s ease; width: 100%; }
.post-card:hover .post-card-media img { transform: scale(1.025); }
.post-card-placeholder { background: radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 38%), linear-gradient(135deg, var(--sage), var(--surface)); display: block; height: 100%; }
.post-card-content { display: flex; flex: 1; flex-direction: column; padding: 26px; }
.post-card-title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.45rem, 2.6vw, 2rem); letter-spacing: -.035em; line-height: 1.1; margin: 12px 0; }
.post-card-title a { color: var(--ink); text-decoration: none; }
.post-card-content > p { color: var(--muted); line-height: 1.65; }
.post-card-meta, .entry-meta { color: var(--muted); display: flex; flex-wrap: wrap; font-size: .82rem; gap: 10px; margin-top: auto; }

.topic-strip { background: var(--ink); color: var(--paper); padding: 80px 0; }
.topic-strip h2 { color: inherit; margin-bottom: 30px; }
.topic-list { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.topic-list a { align-items: center; border-bottom: 1px solid color-mix(in srgb, var(--paper) 20%, transparent); color: var(--paper); display: flex; font-size: 1.1rem; justify-content: space-between; padding: 16px 0; text-decoration: none; }
.topic-list span { border: 1px solid currentColor; border-radius: 99px; font-size: .72rem; min-width: 28px; padding: 3px 8px; text-align: center; }

.archive-shell { padding-block: 72px 110px; }
.archive-header { border-bottom: 1px solid var(--line); margin-bottom: 44px; max-width: 900px; padding-bottom: 36px; }
.archive-header h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); }
.archive-description, .archive-header > p:not(.eyebrow) { color: var(--muted); font-size: 1.15rem; line-height: 1.7; max-width: 680px; }
.search-header .search-form { display: flex; gap: 8px; margin-top: 28px; max-width: 600px; }
.search-field { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; min-width: 0; padding: 13px 18px; width: 100%; }
.search-submit { border-radius: 999px; padding-inline: 20px; }
.empty-state { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 48px; }

.article-shell, .page-shell { padding-block: 54px 100px; }
.article-header { max-width: 1060px; }
.article-header h1, .page-header h1 { font-size: clamp(2.8rem, 7vw, 6rem); max-width: 1040px; }
.breadcrumbs { color: var(--muted); display: flex; flex-wrap: wrap; font-size: .76rem; gap: 8px; margin-bottom: 34px; }
.breadcrumbs a { color: inherit; }
.article-header .entry-meta { margin-top: 24px; }
.article-hero { margin-block: 54px 70px; }
.article-hero img { aspect-ratio: 16 / 8.8; box-shadow: var(--shadow); height: auto; object-fit: cover; width: 100%; }
.article-hero figcaption { color: var(--muted); font-size: .8rem; margin-top: 10px; }
.article-layout { display: grid; gap: 50px; grid-template-columns: minmax(180px, 240px) minmax(0, var(--content)) 1fr; justify-content: center; }
.article-aside { min-width: 0; }
.article-toc { border-left: 2px solid var(--line); position: sticky; top: 110px; }
.article-toc strong { display: block; font-size: .78rem; letter-spacing: .08em; padding-left: 18px; text-transform: uppercase; }
.article-toc ol { list-style: none; margin: 12px 0 0; padding: 0 0 0 18px; }
.article-toc li { margin: 9px 0; }
.article-toc a { color: var(--muted); font-size: .82rem; line-height: 1.35; text-decoration: none; }
.article-toc a:hover { color: var(--accent); }
.entry-content { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.08rem, 2vw, 1.22rem); line-height: 1.82; padding-inline: 0; }
.entry-content > * { margin-block: 0 1.45em; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--ink); font-family: "Mona Sans", Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.035em; line-height: 1.18; margin-block: 2.2em .75em; scroll-margin-top: 120px; text-wrap: balance; }
.entry-content h2 { font-size: clamp(1.75rem, 4vw, 2.7rem); }
.entry-content h3 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
.entry-content a { overflow-wrap: anywhere; }
.entry-content table { border-collapse: collapse; display: block; font-family: "Mona Sans", Inter, sans-serif; font-size: .92rem; max-width: 100%; overflow-x: auto; width: max-content; }
.entry-content th, .entry-content td { border: 1px solid var(--line); min-width: 150px; padding: 12px 14px; text-align: left; vertical-align: top; }
.entry-content th { background: var(--sage); }
.entry-content pre { background: #101612; border-radius: 14px; color: #edf3ee; overflow-x: auto; padding: 20px; }
.entry-content blockquote { border-left: 4px solid var(--accent); color: var(--muted); font-size: 1.22em; margin-inline: 0; padding: 8px 0 8px 24px; }
.is-style-direct-answer { background: var(--sage); border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); border-radius: var(--radius); font-family: "Mona Sans", Inter, sans-serif; margin-block: 2.2em; padding: clamp(24px, 5vw, 42px); }
.is-style-direct-answer > :last-child { margin-bottom: 0; }
.is-style-direct-answer h2 { margin-top: 0; }
.is-style-key-takeaway { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: 0 16px 16px 0; padding: 20px 24px; }
.reading-progress { background: transparent; height: 3px; left: 0; position: fixed; right: 0; top: 0; z-index: 100; }
.reading-progress span { background: var(--accent); display: block; height: 100%; transform: scaleX(0); transform-origin: left; width: 100%; }
.article-footer { margin-top: 54px; }
.tag-list { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; padding-top: 24px; }
.tag-list span { color: var(--muted); margin-right: 8px; }
.tag-list a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; text-decoration: none; }
.author-box { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; gap: 22px; margin-block: 44px; padding: 28px; }
.author-box img { border-radius: 50%; }
.author-box h2, .author-box p { margin: 3px 0; }
.post-navigation .nav-links { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.post-navigation a { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; padding: 20px; text-decoration: none; }
.post-navigation span { color: var(--muted); font-size: .75rem; text-transform: uppercase; }

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 64px 34px; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1.4fr 1fr; }
.footer-title { font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; }
.site-footer p { color: var(--muted); }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--ink); }
.site-info { border-top: 1px solid var(--line); grid-column: 1 / -1; margin: 20px 0 0; padding-top: 22px; }

/* Chinese typography keeps headings legible without Latin-style compression. */
html[lang^="zh"] body.airlight-insight,
html[lang^="zh"] .entry-content,
html[lang^="zh"] .entry-content h2,
html[lang^="zh"] .entry-content h3,
html[lang^="zh"] .entry-content h4,
html[lang^="zh"] .is-style-direct-answer {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
}
html[lang^="zh"] .site-title-text,
html[lang^="zh"] .footer-title,
html[lang^="zh"] .hero-copy h1,
html[lang^="zh"] .article-header h1,
html[lang^="zh"] .page-header h1,
html[lang^="zh"] .archive-header h1,
html[lang^="zh"] .section-heading h2,
html[lang^="zh"] .topic-strip h2,
html[lang^="zh"] .post-card-title,
html[lang^="zh"] .hero-intro,
html[lang^="zh"] .article-deck {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  letter-spacing: -.025em;
}
html[lang^="zh"] .hero-copy h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); line-height: 1.16; }
html[lang^="zh"] .article-header h1,
html[lang^="zh"] .page-header h1,
html[lang^="zh"] .archive-header h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); line-height: 1.2; }
html[lang^="zh"] .section-heading h2,
html[lang^="zh"] .topic-strip h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
html[lang^="zh"] .post-card-title { font-size: clamp(1.35rem, 2.3vw, 1.8rem); line-height: 1.4; }
html[lang^="zh"] .hero-intro,
html[lang^="zh"] .article-deck { line-height: 1.65; }
html[lang^="zh"] .entry-content { line-height: 1.95; }
html[lang^="zh"] .eyebrow,
html[lang^="zh"] .article-toc strong { letter-spacing: .08em; text-transform: none; }

@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { display: block; }
  .article-aside { margin: 0 auto 32px; max-width: var(--content); }
  .article-toc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; position: static; }
  .article-toc strong, .article-toc ol { padding-left: 0; }
}

@media (max-width: 640px) {
  .container, .container-wide, .content-width { padding-inline: 18px; }
  .site-header-inner { gap: 12px; min-height: 66px; padding-inline: 18px; }
  .site-description { display: none; }
  .theme-toggle { height: 38px; width: 38px; }
  .hero-shell { padding-block: 62px 78px; }
  .post-grid, .topic-list, .footer-grid, .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-card-title { font-size: 1.65rem; }
  .article-shell, .page-shell, .archive-shell { padding-block: 36px 76px; }
  .article-hero { margin-block: 32px 46px; padding-inline: 0; }
  .article-hero img { border-radius: 0; box-shadow: none; }
  .entry-content { font-size: 1.05rem; padding-inline: 18px; }
  .author-box { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .article-aside, .reading-progress, .top { display: none !important; }
  body.airlight-insight { background: #fff; color: #000; }
  .article-layout { display: block; }
  .entry-content { max-width: none; }
}
