/* ==========================================================================
   Jem CMS — default public theme
   A warm editorial theme built for calm, long-form reading.
   ========================================================================== */

:root {
  --bg: #f5f1e8;
  --bg-soft: #efe9dd;
  --surface: #fffdf7;
  --surface-2: #f8f3e9;
  --ink: #19231f;
  --ink-soft: #4e5a54;
  --muted: #849089;
  --faint: #a9b0aa;
  --line: rgba(25, 35, 31, .13);
  --line-strong: rgba(25, 35, 31, .24);
  --accent: #cf5638;
  --accent-deep: #aa4027;
  --accent-soft: #f1ddd3;
  --sage: #5d7668;
  --sage-soft: #e1e8e1;
  --gold: #b58b4a;
  --dark: #17211f;
  --cream: #f5f1e8;
  --shadow-sm: 0 2px 10px rgba(30, 38, 33, .04);
  --shadow-md: 0 18px 48px rgba(30, 38, 33, .09);
  --shadow-lg: 0 32px 80px rgba(30, 38, 33, .13);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --container: 1210px;
  --reading: 760px;
  --font-sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

[data-theme="dark"] {
  --bg: #111816;
  --bg-soft: #151e1b;
  --surface: #18211e;
  --surface-2: #1c2723;
  --ink: #ece7da;
  --ink-soft: #bbc3bb;
  --muted: #8d9991;
  --faint: #6b7770;
  --line: rgba(236, 231, 218, .12);
  --line-strong: rgba(236, 231, 218, .22);
  --accent: #e07858;
  --accent-deep: #ef8b6c;
  --accent-soft: rgba(224, 120, 88, .13);
  --sage: #8da99a;
  --sage-soft: rgba(141, 169, 154, .1);
  --gold: #c9a263;
  --dark: #0b1110;
  --cream: #f2ecdf;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .16);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, .3);
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, .38);
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .35s ease, color .35s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .027;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.search-open,
body.nav-open { overflow: hidden; }

::selection { color: #fff; background: var(--accent); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.22; letter-spacing: -.012em; }
figure { margin: 0; }
svg { display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 16px;
  color: #fff;
  background: var(--dark);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

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

.site-wrap { position: relative; overflow: clip; }
.site-main { min-height: 52vh; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .22s var(--ease), background .22s ease, color .22s ease, box-shadow .22s ease;
}
.button svg { transition: transform .22s var(--ease); }
.button:hover svg { transform: translateX(3px); }
.button-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 26px rgba(207, 86, 56, .22);
}
.button-primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(207, 86, 56, .28); }
.button-ghost {
  color: var(--ink);
  border-color: var(--line-strong);
  background: transparent;
}
.button-ghost:hover { background: var(--surface-2); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.text-link span { color: var(--accent); transition: transform .2s; }
.text-link:hover { color: var(--accent); border-color: var(--accent); }
.text-link:hover span { transform: translate(2px, -2px); }

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink-soft);
  background: transparent;
  transition: color .2s, background .2s, border-color .2s;
}
.icon-btn:hover { color: var(--ink); background: var(--surface-2); border-color: var(--line); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
@supports (backdrop-filter: blur(18px)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(18px) saturate(1.15);
  }
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 84px;
}
.brand {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -.03em;
}
.brand-name em { color: var(--accent); font-style: normal; }
.brand-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.primary-nav a {
  position: relative;
  padding: 8px 13px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: translateX(-50%) scale(.4);
  transition: opacity .2s, transform .2s;
}
.primary-nav a:hover { color: var(--ink); background: var(--surface-2); }
.primary-nav a.is-active { color: var(--ink); font-weight: 600; }
.primary-nav a.is-active::after { opacity: 1; transform: translateX(-50%) scale(1); }
.header-actions { display: flex; align-items: center; gap: 2px; }

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.menu-toggle { display: none; }
.menu-lines { width: 18px; display: grid; gap: 5px; }
.menu-lines i { display: block; height: 1.5px; background: currentColor; transition: transform .25s var(--ease), opacity .2s; }
body.nav-open .menu-lines i:first-child { transform: translateY(3.25px) rotate(45deg); }
body.nav-open .menu-lines i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(10, 16, 13, .4);
  backdrop-filter: blur(3px);
}

/* Search overlay */
.search-overlay { position: fixed; inset: 0; z-index: 120; }
.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 17, 14, .52);
  backdrop-filter: blur(7px);
  animation: fade-in .2s ease both;
}
.search-panel {
  position: relative;
  width: min(720px, calc(100% - 32px));
  margin: 12vh auto 0;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: panel-in .4s var(--ease) both;
}
@keyframes panel-in { from { opacity: 0; transform: translateY(-14px) scale(.985); } }
@keyframes fade-in { from { opacity: 0; } }
.search-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.search-panel-head .eyebrow { margin: 0; }
.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
}
.search-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-form-icon { color: var(--muted); flex: none; }
.search-form input {
  flex: 1;
  min-width: 0;
  height: 58px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 17px;
}
.search-form input::placeholder { color: var(--faint); }
.search-submit {
  flex: none;
  padding: 10px 18px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.search-suggestions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
}
.search-suggestions span { margin-right: 4px; letter-spacing: .08em; }
.search-suggestions a {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  transition: border-color .2s, color .2s;
}
.search-suggestions a:hover { color: var(--accent); border-color: var(--accent); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.home-hero {
  position: relative;
  padding: 58px 0 46px;
  overflow: hidden;
}
.home-hero::before {
  content: "J";
  position: absolute;
  right: -2vw;
  top: -9vw;
  color: var(--ink);
  opacity: .028;
  font-family: var(--font-serif);
  font-size: 44vw;
  font-style: italic;
  line-height: 1;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  align-items: center;
  gap: clamp(36px, 6vw, 86px);
}
.hero-copy { min-width: 0; padding: 26px 0 18px; }
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .22em;
}
.kicker-line { width: 34px; height: 1px; background: currentColor; }
.hero-copy h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(48px, 5.7vw, 78px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.hero-text {
  max-width: 460px;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.95;
}
.hero-actions { display: flex; align-items: center; gap: 26px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  max-width: 450px;
}
.hero-stats div { display: flex; align-items: baseline; gap: 7px; }
.hero-stats strong { font-family: var(--font-serif); font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.hero-stats span { color: var(--muted); font-size: 11px; }

.hero-visual { position: relative; padding: 0 12px 22px 0; }
.hero-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px 60px 8px 8px;
  box-shadow: var(--shadow-lg);
  background: var(--dark);
}
.hero-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  border-radius: inherit;
  pointer-events: none;
}
.hero-image-wrap img { width: 100%; height: 100%; aspect-ratio: .97; object-fit: cover; }
.hero-visual::before {
  content: "";
  position: absolute;
  top: -16px;
  right: -4px;
  width: 74%;
  height: 78%;
  border: 1px solid var(--line-strong);
  border-radius: 8px 60px 8px 8px;
  z-index: -1;
}
.hero-issue {
  position: absolute;
  left: -20px;
  bottom: 54px;
  padding: 12px 16px;
  color: var(--cream);
  background: var(--accent);
  font-size: 9px;
  letter-spacing: .18em;
  line-height: 1.5;
  box-shadow: var(--shadow-md);
}
.hero-issue strong { font-family: var(--font-serif); font-size: 22px; font-weight: 500; letter-spacing: .02em; }
.hero-caption {
  position: absolute;
  right: 24px;
  bottom: 2px;
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: .16em;
  line-height: 1.7;
  text-align: right;
}

/* --------------------------------------------------------------------------
   Home content, section heads
   -------------------------------------------------------------------------- */
.home-content { padding: 22px 0 96px; }
.featured-section { margin-bottom: 66px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.section-head .eyebrow { margin-bottom: 10px; }
.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 500;
  letter-spacing: -.025em;
}
.section-head.compact { align-items: center; margin-bottom: 22px; padding-bottom: 14px; }
.section-head.compact h2 { font-size: 26px; }
.section-head.compact .eyebrow { margin-bottom: 6px; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding-bottom: 3px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  transition: color .2s, border-color .2s;
}
.section-link:hover { color: var(--accent); border-color: var(--accent); }
.section-count { color: var(--muted); font-size: 11px; letter-spacing: .08em; }

.featured-card {
  display: grid;
  grid-template-columns: 1.18fr .82fr;
  min-height: 448px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .35s ease, transform .35s var(--ease);
}
.featured-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.featured-media { position: relative; overflow: hidden; min-height: 380px; background: var(--bg-soft); }
.featured-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.featured-card:hover .featured-media img { transform: scale(1.035); }
.featured-generated {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .88);
  font-family: var(--font-serif);
  font-size: 140px;
  font-style: italic;
}
.featured-badge {
  position: absolute;
  left: 20px;
  top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  color: var(--dark);
  background: var(--cream);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
}
.featured-content {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.4vw, 46px);
}
.featured-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .02em;
}
.featured-meta a { color: var(--accent); font-weight: 600; letter-spacing: .06em; }
.featured-content h3 {
  margin: 20px 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 39px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.featured-content h3 a { background-image: linear-gradient(var(--ink), var(--ink)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .35s; }
.featured-content h3 a:hover { background-size: 100% 1px; }
.featured-content > p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.9; }
.featured-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 24px; }
.featured-author { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.featured-author small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 400; }
.mini-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 14px;
}
.circle-link {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.circle-link:hover { color: #fff; background: var(--accent); border-color: var(--accent); transform: rotate(-35deg); }

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 308px;
  gap: clamp(36px, 4.5vw, 64px);
  align-items: start;
}
.home-main { min-width: 0; }
.latest-head { margin-top: 4px; }

.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .35s var(--ease), box-shadow .35s ease, border-color .35s;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1.52;
  background: var(--bg-soft);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.post-card:hover .card-media img { transform: scale(1.045); }
.card-generated {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(255, 255, 255, .9);
}
.generated-letter { font-family: var(--font-serif); font-size: 72px; font-style: italic; line-height: 1; }
.generated-label { font-size: 8px; letter-spacing: .22em; opacity: .7; }
.card-category {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 5px 10px;
  color: var(--dark);
  background: var(--cream);
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .05em;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}
.card-body { display: flex; flex: 1; flex-direction: column; padding: 20px 21px 17px; }
.card-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10.5px; }
.card-meta a { color: var(--accent); font-weight: 600; }
.card-title {
  margin: 11px 0 9px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.018em;
}
.card-title a { transition: color .2s; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { margin: 0; color: var(--ink-soft); font-size: 12.5px; line-height: 1.8; }
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .02em;
}
.card-read-time { display: inline-flex; align-items: center; gap: 5px; }
.card-arrow { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); transition: color .2s, background .2s, transform .2s; }
.post-card:hover .card-arrow { color: #fff; background: var(--accent); transform: translateX(2px); }

/* List cards (archive) */
.post-list { display: grid; gap: 18px; }
.post-card-list { display: grid; grid-template-columns: 245px minmax(0, 1fr); min-height: 194px; }
.post-card-list .card-media { aspect-ratio: auto; height: 100%; min-height: 194px; }
.post-card-list .card-body { padding: 24px 26px 20px; }
.post-card-list .card-title { font-size: 25px; margin-top: 9px; }
.post-card-list .card-excerpt { max-width: 560px; }
.post-card-list .card-generated .generated-letter { font-size: 66px; }

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.sidebar { min-width: 0; position: sticky; top: 104px; display: grid; gap: 20px; }
.sidebar-block {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.about-block { position: relative; overflow: hidden; padding: 26px 22px 22px; background: var(--dark); color: var(--cream); border-color: transparent; }
.about-block::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -60px;
  top: -70px;
  border: 1px solid rgba(245, 241, 232, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(245, 241, 232, .03);
}
.about-mark {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--cream);
  border: 1px solid rgba(245, 241, 232, .25);
  border-radius: 12px;
  font-family: var(--font-serif);
  font-size: 23px;
  font-style: italic;
}
.about-mark span { color: #e38a6d; }
.about-kicker { margin: 0 0 8px; color: #d38a71; font-size: 8.5px; letter-spacing: .22em; }
.about-block h3 { margin-bottom: 10px; font-family: var(--font-serif); font-size: 23px; font-weight: 500; }
.about-block p { color: rgba(245, 241, 232, .62); font-size: 12px; line-height: 1.8; }
.about-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.about-links a {
  padding: 4px 9px;
  border: 1px solid rgba(245, 241, 232, .18);
  border-radius: 999px;
  color: rgba(245, 241, 232, .72);
  font-size: 9.5px;
  letter-spacing: .06em;
  transition: background .2s, color .2s;
}
.about-links a:hover { color: var(--dark); background: var(--cream); }

.sidebar-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.sidebar-heading h3 { font-family: var(--font-serif); font-size: 18px; font-weight: 600; }
.sidebar-heading > span { color: var(--faint); font-size: 7.5px; letter-spacing: .18em; }

.rank-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 13px; }
.rank-list li { display: flex; gap: 12px; align-items: flex-start; }
.rank-number { color: var(--accent); font-family: var(--font-serif); font-size: 12px; font-style: italic; line-height: 1.5; opacity: .8; }
.rank-title { display: block; color: var(--ink); font-size: 12.5px; font-weight: 500; line-height: 1.55; transition: color .2s; }
.rank-list a:hover .rank-title { color: var(--accent); }
.rank-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; }

.category-list { margin: 0; padding: 0; list-style: none; }
.category-list li + li { border-top: 1px solid var(--line); }
.category-list a { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; color: var(--ink-soft); font-size: 12.5px; transition: color .2s, padding .2s; }
.category-list a:hover { color: var(--accent); padding-left: 3px; }
.category-list em { color: var(--faint); font-size: 9.5px; font-style: normal; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud a {
  padding: 5px 9px;
  color: var(--ink-soft);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 10.5px;
  transition: color .2s, border-color .2s, background .2s;
}
.tag-cloud a:hover { color: var(--accent); border-color: var(--accent); background: transparent; }
.tag-cloud sup { margin-left: 2px; color: var(--faint); font-size: 7px; vertical-align: super; }

.archive-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; color: var(--ink-soft); font-size: 11.5px; transition: color .2s; }
.archive-row + .archive-row { border-top: 1px solid var(--line); }
.archive-row:hover { color: var(--accent); }
.archive-row em { color: var(--faint); font-style: normal; font-size: 9.5px; }

.sidebar-comments { display: grid; gap: 13px; }
.sidebar-comments a { display: block; padding-left: 11px; border-left: 2px solid var(--accent-soft); transition: border-color .2s; }
.sidebar-comments a:hover { border-color: var(--accent); }
.sidebar-comment-author { display: block; color: var(--accent); font-size: 10px; font-weight: 600; }
.sidebar-comment-text { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }

.subscribe-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  color: var(--cream);
  background: var(--accent);
  border-radius: var(--radius);
  transition: background .25s, transform .25s var(--ease);
}
.subscribe-card:hover { background: var(--accent-deep); transform: translateY(-2px); }
.subscribe-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; }
.subscribe-card strong { display: block; font-size: 12.5px; line-height: 1.4; }
.subscribe-card small { display: block; color: rgba(255, 255, 255, .68); font-size: 9.5px; }
.subscribe-card > svg { margin-left: auto; opacity: .75; }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line); }
.page-numbers { display: flex; align-items: center; gap: 5px; }
.page-number, .page-arrow {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 12px;
  transition: color .2s, background .2s, border-color .2s;
}
.page-number:hover, .page-arrow:hover { color: var(--ink); border-color: var(--line-strong); }
.page-number.is-current { color: #fff; background: var(--ink); }
.page-arrow.is-disabled { opacity: .25; pointer-events: none; }
.page-ellipsis { color: var(--faint); padding: 0 4px; font-size: 12px; }

/* --------------------------------------------------------------------------
   Archive
   -------------------------------------------------------------------------- */
.archive-hero {
  position: relative;
  overflow: hidden;
  padding: 46px 0 42px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.archive-hero::before {
  content: "";
  position: absolute;
  right: -90px;
  top: -190px;
  width: 430px;
  height: 430px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: 0 0 0 56px color-mix(in srgb, var(--ink) 2%, transparent), 0 0 0 112px color-mix(in srgb, var(--ink) 1.5%, transparent);
}
.archive-hero .container { position: relative; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 24px; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { color: var(--faint); }
.breadcrumbs span[aria-current] { color: var(--ink-soft); max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-heading { max-width: 780px; }
.archive-heading h1 { margin: 0 0 16px; font-family: var(--font-serif); font-size: clamp(42px, 5.4vw, 68px); font-weight: 500; letter-spacing: -.035em; line-height: 1.1; }
.archive-description { max-width: 600px; margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.9; }
.archive-meta { display: flex; align-items: center; gap: 18px; margin-top: 24px; color: var(--muted); font-size: 10.5px; letter-spacing: .03em; }
.archive-meta span { display: inline-flex; align-items: center; gap: 6px; }
.archive-meta a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.archive-search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 620px;
  margin-top: 30px;
  padding: 0 8px 0 17px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
.archive-search svg { color: var(--muted); flex: none; }
.archive-search input { flex: 1; min-width: 0; height: 50px; border: 0; outline: 0; background: transparent; font-size: 14px; }
.archive-search button { padding: 8px 15px; border: 0; border-radius: 8px; color: #fff; background: var(--accent); font-size: 12px; font-weight: 600; }
.archive-layout { display: grid; grid-template-columns: minmax(0, 1fr) 308px; gap: clamp(36px, 4.5vw, 64px); padding-top: 46px; padding-bottom: 96px; align-items: start; }
.archive-main { min-width: 0; }

.empty-state {
  padding: 64px 30px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: var(--cream);
  background: var(--dark);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 25px;
  font-style: italic;
}
.empty-state h3 { margin-bottom: 8px; font-family: var(--font-serif); font-size: 24px; font-weight: 500; }
.empty-state p { max-width: 400px; margin: 0 auto 20px; color: var(--muted); font-size: 12.5px; }
.empty-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.empty-tags a { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font-size: 11px; }
.empty-tags a:hover { color: var(--accent); border-color: var(--accent); }

/* --------------------------------------------------------------------------
   Single article
   -------------------------------------------------------------------------- */
.single-article { padding-top: 36px; }
.article-header { padding-bottom: 42px; }
.article-header .breadcrumbs { margin-bottom: 30px; }
.article-header-inner { max-width: 910px; margin: 0 auto; text-align: center; }
.article-category {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  margin-bottom: 22px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
}
.article-header h1 {
  margin: 0 auto;
  max-width: 900px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 5.4vw, 65px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.035em;
}
.article-deck {
  max-width: 700px;
  margin: 24px auto 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.9;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 10.5px;
}
.article-author { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-weight: 600; }
.avatar { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; object-fit: cover; font-family: var(--font-serif); font-size: 12px; }
.article-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.article-meta-item svg { opacity: .7; }

.article-cover {
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
  border-radius: var(--radius);
  background: var(--bg-soft);
  box-shadow: var(--shadow-md);
}
.article-cover img { width: 100%; max-height: 680px; object-fit: cover; }
.cover-corner {
  position: absolute;
  right: 18px;
  bottom: 16px;
  padding: 5px 9px;
  color: rgba(255, 255, 255, .82);
  background: rgba(10, 15, 12, .35);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 4px;
  backdrop-filter: blur(8px);
  font-size: 8px;
  letter-spacing: .18em;
}

.article-layout {
  display: grid;
  grid-template-columns: 44px minmax(0, var(--reading)) 218px;
  gap: clamp(26px, 4vw, 52px);
  justify-content: center;
  padding-top: 58px;
}
.share-rail {
  position: sticky;
  top: 118px;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.share-label { margin-bottom: 5px; color: var(--faint); font-size: 7.5px; letter-spacing: .18em; writing-mode: vertical-rl; }
.share-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 11px;
  transition: color .2s, background .2s, border-color .2s, transform .2s;
}
.share-btn:hover { color: #fff; background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.share-weibo { font-family: var(--font-serif); font-size: 14px; }

.article-body { min-width: 0; }
.toc-mobile { display: none; }

.article-toc { position: sticky; top: 118px; align-self: start; }
.toc-inner { padding-left: 18px; border-left: 1px solid var(--line); }
.toc-label { margin: 0 0 13px; color: var(--faint); font-size: 7.5px; font-weight: 600; letter-spacing: .2em; }
.article-toc nav { display: grid; gap: 9px; }
.article-toc nav a {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
  transition: color .2s, transform .2s;
}
.article-toc nav a:hover, .article-toc nav a.is-active { color: var(--ink); transform: translateX(2px); }
.article-toc nav a.is-active { color: var(--accent); font-weight: 600; }
.article-toc .toc-level-3 { padding-left: 10px; font-size: 10px; }
.toc-footer { display: flex; justify-content: space-between; margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--faint); font-size: 9px; }
.toc-footer strong { color: var(--accent); font-weight: 600; }

/* Prose */
.prose {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 2.02;
  letter-spacing: .005em;
  overflow-wrap: break-word;
}
.prose > *:first-child { margin-top: 0 !important; }
.prose > p:first-of-type::first-letter {
  float: left;
  margin: .12em .14em 0 0;
  color: var(--accent);
  font-size: 4.2em;
  line-height: .78;
  font-weight: 500;
}
.prose p { margin: 0 0 1.55em; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  position: relative;
  scroll-margin-top: 105px;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -.02em;
}
.prose h1 { margin: 2.2em 0 .7em; font-size: 34px; }
.prose h2 { margin: 2.25em 0 .8em; padding-top: .4em; font-size: 28px; }
.prose h2::before {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin-bottom: 16px;
  background: var(--accent);
}
.prose h3 { margin: 1.9em 0 .65em; font-size: 22px; }
.prose h4 { margin: 1.6em 0 .5em; font-size: 18px; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-soft); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose del { color: var(--muted); }
.prose blockquote {
  position: relative;
  margin: 2em 0;
  padding: 1.2em 1.4em 1.2em 2em;
  color: var(--ink-soft);
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 17px;
  font-style: italic;
  line-height: 1.9;
}
.prose blockquote::before {
  content: "“";
  position: absolute;
  left: .5em;
  top: .1em;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 3em;
  line-height: 1;
  opacity: .25;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 1.6em; padding-left: 1.4em; }
.prose li { margin: .45em 0; padding-left: .25em; }
.prose li::marker { color: var(--accent); font-family: var(--font-sans); font-size: .85em; }
.prose hr { width: 64px; height: 1px; margin: 3em auto; border: 0; background: var(--line-strong); }
.prose img { border-radius: 10px; }
.prose .md-figure { margin: 2.2em 0; }
.prose .md-figure img { width: 100%; border-radius: 10px; box-shadow: var(--shadow-sm); }
.prose .md-figure figcaption { margin-top: 10px; color: var(--muted); font-family: var(--font-sans); font-size: 10.5px; line-height: 1.7; text-align: center; }
.prose code {
  padding: .18em .4em;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .82em;
}
.prose pre {
  position: relative;
  margin: 2em 0;
  padding: 22px 22px;
  overflow-x: auto;
  color: #dce4dd;
  background: #17211f;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.75;
  tab-size: 2;
}
.prose pre code { padding: 0; color: inherit; background: none; font-size: inherit; }
.code-copy {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 9px;
  color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 5px;
  font-family: var(--font-sans);
  font-size: 9px;
  opacity: 0;
  transition: opacity .2s, color .2s, background .2s;
}
.prose pre:hover .code-copy { opacity: 1; }
.code-copy:hover { color: #fff; background: rgba(255, 255, 255, .13); }
.prose .table-wrap { margin: 2em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 12.5px; }
.prose th, .prose td { padding: 10px 13px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { color: var(--ink); background: var(--surface-2); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
.heading-anchor {
  margin-left: 8px;
  color: var(--accent);
  font-size: .55em;
  font-weight: 400;
  opacity: 0;
  text-decoration: none !important;
  transition: opacity .2s;
}
.prose h1:hover .heading-anchor,
.prose h2:hover .heading-anchor,
.prose h3:hover .heading-anchor,
.prose h4:hover .heading-anchor { opacity: .7; }

.article-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
.article-tags > span { margin-right: 4px; color: var(--faint); font-family: var(--font-sans); font-size: 9px; letter-spacing: .16em; }
.article-tags a {
  padding: 5px 10px;
  color: var(--ink-soft);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 5px;
  font-family: var(--font-sans);
  font-size: 10px;
  transition: color .2s, border-color .2s;
}
.article-tags a:hover { color: var(--accent); border-color: var(--accent); }
.article-license { display: flex; align-items: flex-start; gap: 7px; margin-top: 18px; color: var(--faint); font-family: var(--font-sans); font-size: 10px; line-height: 1.7; }
.article-license svg { flex: none; margin-top: 2px; }

.article-after { max-width: 900px; padding-top: 64px; }
.author-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 30px 34px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.author-card-avatar { width: 68px; height: 68px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; object-fit: cover; font-family: var(--font-serif); font-size: 26px; }
.author-card-content { position: relative; z-index: 1; }
.author-card-content .eyebrow { margin-bottom: 6px; font-size: 8px; }
.author-card-content h3 { margin-bottom: 6px; font-family: var(--font-serif); font-size: 23px; font-weight: 500; }
.author-card-content p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.author-card-mark { position: absolute; right: 22px; bottom: -34px; color: var(--ink); opacity: .035; font-family: var(--font-serif); font-size: 160px; font-style: italic; line-height: 1; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.post-nav-item { display: flex; flex-direction: column; gap: 8px; min-height: 96px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .2s, transform .2s, box-shadow .2s; }
.post-nav-item:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.post-nav-item > span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9.5px; letter-spacing: .06em; }
.post-nav-item strong { font-family: var(--font-serif); font-size: 15px; font-weight: 500; line-height: 1.45; }
.post-nav-next { text-align: right; align-items: flex-end; }
.post-nav-next > span { justify-content: flex-end; }
.post-nav-item.is-empty { visibility: hidden; }

.related-section { margin-top: 64px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.related-grid .card-title { font-size: 18px; }
.related-grid .card-body { padding: 16px; }
.related-grid .card-meta, .related-grid .card-excerpt, .related-grid .card-read-time { display: none; }
.related-grid .card-foot { padding-top: 6px; }
.related-grid .card-category { font-size: 8px; padding: 4px 8px; left: 10px; top: 10px; }

.article-comments { max-width: 900px; padding-top: 72px; padding-bottom: 100px; }

/* --------------------------------------------------------------------------
   Comments
   -------------------------------------------------------------------------- */
.comments-section { scroll-margin-top: 110px; }
.comments-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.comments-head .eyebrow { margin-bottom: 6px; }
.comments-head h2 { font-family: var(--font-serif); font-size: 31px; font-weight: 500; }
.comments-head h2 span { margin-left: 5px; color: var(--accent); font-size: 16px; vertical-align: super; }
.comments-head > p { max-width: 240px; margin: 0; color: var(--muted); font-size: 10.5px; text-align: right; line-height: 1.7; }
.comment-alert { display: flex; align-items: flex-start; gap: 9px; margin-top: 18px; padding: 12px 15px; border-radius: 9px; font-size: 12px; }
.comment-alert svg { flex: none; margin-top: 2px; }
.comment-alert.is-success { color: #2c6f54; background: rgba(44, 111, 84, .09); border: 1px solid rgba(44, 111, 84, .18); }
.comment-alert.is-error { color: #a23e2c; background: rgba(162, 62, 44, .07); border: 1px solid rgba(162, 62, 44, .16); }
.comment-form { margin-top: 24px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.comment-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.comment-fields label, .comment-textarea { display: flex; flex-direction: column; gap: 7px; }
.comment-fields label > span, .comment-textarea > span { color: var(--ink-soft); font-size: 10.5px; font-weight: 600; }
.comment-fields em, .comment-textarea em { color: var(--accent); font-style: normal; }
.comment-fields i { margin-left: 4px; color: var(--faint); font-style: normal; font-weight: 400; }
.comment-fields input {
  height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  font-size: 12.5px;
  transition: border-color .2s, box-shadow .2s;
}
.comment-textarea { margin-top: 14px; }
.comment-textarea textarea {
  width: 100%;
  min-height: 128px;
  padding: 12px;
  resize: vertical;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.8;
  transition: border-color .2s, box-shadow .2s;
}
.comment-fields input:focus, .comment-textarea textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.comment-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.comment-note { display: inline-flex; align-items: center; gap: 5px; color: var(--faint); font-size: 9.5px; }
.comment-form .button { min-height: 40px; padding: 0 18px; font-size: 12px; }
.reply-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 8px 12px; color: var(--accent); background: var(--accent-soft); border-radius: 7px; font-size: 11px; }
.reply-state button { padding: 0; border: 0; color: var(--ink-soft); background: none; font-size: 10px; text-decoration: underline; }

.comment-list-wrap { margin-top: 40px; }
.comment-list-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.comment-list-head h3 { font-family: var(--font-serif); font-size: 20px; font-weight: 500; }
.comment-list-head span { color: var(--faint); font-size: 7.5px; letter-spacing: .16em; }
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-item { position: relative; display: flex; flex-wrap: wrap; gap: 13px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.comment-avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; font-family: var(--font-serif); font-size: 16px; }
.comment-content { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.comment-author { color: var(--ink); font-size: 12.5px; font-weight: 600; }
.comment-badge { padding: 2px 6px; color: var(--accent); background: var(--accent-soft); border-radius: 3px; font-size: 8px; font-weight: 600; letter-spacing: .04em; }
.comment-head time { color: var(--faint); font-size: 9.5px; }
.comment-reply-btn { margin-left: auto; padding: 2px 0; border: 0; color: var(--muted); background: none; font-size: 9.5px; transition: color .2s; }
.comment-reply-btn:hover { color: var(--accent); }
.comment-text { margin-top: 8px; color: var(--ink-soft); font-size: 12.5px; line-height: 1.9; overflow-wrap: break-word; }
.comment-children { flex: 0 0 100%; width: calc(100% - 53px); margin: 4px 0 0 53px; padding: 0 0 0 16px; list-style: none; border-left: 1px solid var(--line); }
.comment-children .comment-item { padding: 16px 0 0; border-bottom: 0; }
.comment-children .comment-avatar { width: 30px; height: 30px; font-size: 12px; }
.comment-children .comment-text { font-size: 12px; }
.comment-empty { padding: 48px 0 16px; text-align: center; }
.comment-empty > span { display: block; color: var(--accent); font-family: var(--font-serif); font-size: 56px; line-height: .6; opacity: .3; }
.comment-empty p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.comment-closed { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding: 18px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); font-size: 12px; }

/* --------------------------------------------------------------------------
   Static page & 404
   -------------------------------------------------------------------------- */
.static-page { padding-top: 36px; }
.page-header { padding-bottom: 36px; }
.page-header .breadcrumbs { margin-bottom: 30px; }
.page-header-inner { max-width: 860px; margin: 0 auto; text-align: center; }
.page-header h1 { font-family: var(--font-serif); font-size: clamp(40px, 5.6vw, 66px); font-weight: 500; letter-spacing: -.035em; line-height: 1.15; }
.page-meta { margin-top: 22px; color: var(--faint); font-size: 10px; letter-spacing: .08em; }
.page-layout { display: grid; grid-template-columns: minmax(0, var(--reading)) 218px; gap: 52px; justify-content: center; padding-top: 52px; }
.page-body { min-width: 0; }
.page-toc { position: sticky; top: 118px; align-self: start; padding-left: 18px; border-left: 1px solid var(--line); }
.page-toc nav { display: grid; gap: 8px; }
.page-toc a { color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.page-toc a:hover { color: var(--accent); }
.page-toc .toc-level-3 { padding-left: 10px; font-size: 10px; }
.page-footer { display: flex; align-items: center; justify-content: space-between; max-width: 900px; margin-top: 64px; padding-top: 20px; padding-bottom: 100px; border-top: 1px solid var(--line); color: var(--faint); font-size: 9.5px; letter-spacing: .04em; }
.back-home { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-weight: 600; transition: color .2s; }
.back-home:hover { color: var(--accent); }

.error-section { padding: 72px 0 110px; }
.error-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; }
.error-copy h1 { margin: 0 0 16px; font-family: var(--font-serif); font-size: clamp(48px, 6vw, 78px); font-weight: 500; letter-spacing: -.04em; }
.error-copy > p { max-width: 420px; color: var(--ink-soft); font-size: 14px; line-height: 1.9; }
.error-actions { display: flex; align-items: center; gap: 22px; margin-top: 28px; flex-wrap: wrap; }
.error-search { display: flex; align-items: center; gap: 10px; max-width: 420px; margin-top: 38px; padding: 0 7px 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.error-search svg { color: var(--muted); flex: none; }
.error-search input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; font-size: 12px; }
.error-search button { padding: 6px 12px; border: 0; border-radius: 6px; color: #fff; background: var(--accent); font-size: 10.5px; font-weight: 600; }
.error-art { position: relative; display: grid; place-items: center; aspect-ratio: 1.1; background: var(--dark); border-radius: 8px 70px 8px 8px; overflow: hidden; }
.error-number { position: relative; z-index: 1; color: var(--cream); font-family: var(--font-serif); font-size: clamp(120px, 18vw, 240px); font-style: italic; line-height: 1; opacity: .95; }
.error-ring { position: absolute; width: 56%; aspect-ratio: 1; border: 1px solid rgba(245, 241, 232, .22); border-radius: 50%; box-shadow: 0 0 0 50px rgba(245, 241, 232, .03); }
.error-caption { position: absolute; left: 24px; bottom: 22px; color: rgba(245, 241, 232, .5); font-size: 8px; letter-spacing: .16em; line-height: 1.7; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { position: relative; padding: 76px 0 0; color: var(--cream); background: var(--dark); }
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(var(--container), calc(100% - 64px));
  height: 1px;
  background: rgba(245, 241, 232, .13);
  transform: translateX(-50%);
}
.footer-top { display: grid; grid-template-columns: 1.05fr 1.3fr; gap: 80px; padding-bottom: 58px; }
.footer-brand { max-width: 370px; }
.footer-logo { display: inline-block; margin-bottom: 18px; font-family: var(--font-serif); font-size: 40px; font-weight: 500; letter-spacing: -.035em; }
.footer-logo em { color: #e28a6c; font-style: normal; }
.footer-brand > p { margin-bottom: 10px; color: rgba(245, 241, 232, .72); font-size: 13px; line-height: 1.9; }
.footer-brand .footer-about { color: rgba(245, 241, 232, .42); font-size: 11px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.footer-social a { padding: 5px 11px; border: 1px solid rgba(245, 241, 232, .16); border-radius: 999px; color: rgba(245, 241, 232, .62); font-size: 9px; letter-spacing: .06em; transition: color .2s, background .2s; }
.footer-social a:hover { color: var(--dark); background: var(--cream); }
.footer-columns { display: grid; grid-template-columns: .7fr .8fr 1.3fr; gap: 34px; }
.footer-col h4 { margin: 3px 0 20px; color: rgba(245, 241, 232, .38); font-size: 8.5px; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; }
.footer-col > a { display: block; width: fit-content; margin-bottom: 10px; color: rgba(245, 241, 232, .68); font-size: 11.5px; transition: color .2s, transform .2s; }
.footer-col > a:hover { color: #fff; transform: translateX(2px); }
.footer-col-note p { color: rgba(245, 241, 232, .46); font-size: 10.5px; line-height: 1.9; }
.footer-mail { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: #e49a7d; font-size: 10.5px; font-weight: 600; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0 24px; border-top: 1px solid rgba(245, 241, 232, .1); color: rgba(245, 241, 232, .34); font-size: 9px; letter-spacing: .03em; }
.footer-meta { display: flex; align-items: center; gap: 18px; }
.footer-meta strong { color: rgba(245, 241, 232, .6); font-weight: 600; }
.footer-meta a:hover { color: var(--cream); }

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s, visibility .25s, transform .25s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); }

.reading-progress { position: fixed; left: 0; top: 0; z-index: 150; width: 100%; height: 2px; background: transparent; opacity: 0; pointer-events: none; transition: opacity .2s; }
.reading-progress.is-visible { opacity: 1; }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--accent); }
body:not(.single) .reading-progress { display: none; }

.site-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 200;
  padding: 10px 18px;
  color: var(--cream);
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .25s, transform .25s;
}
.site-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.reveal-item { opacity: 0; transform: translateY(16px); transition: opacity .65s var(--ease), transform .65s var(--ease), box-shadow .35s ease, border-color .35s; }
.reveal-item.is-revealed { opacity: 1; transform: none; }
.reveal-item.post-card:hover { transform: translateY(-5px); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .article-layout { grid-template-columns: 40px minmax(0, 720px); }
  .article-toc { display: none; }
  .toc-mobile {
    display: block;
    margin: 0 0 30px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: var(--font-sans);
  }
  .toc-mobile summary { display: flex; justify-content: space-between; cursor: pointer; color: var(--ink-soft); font-size: 11px; font-weight: 600; list-style: none; }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary span { color: var(--faint); font-weight: 400; }
  .toc-mobile nav { display: grid; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
  .toc-mobile a { color: var(--muted); font-size: 11px; }
  .toc-mobile .toc-level-3 { padding-left: 12px; }
  .page-layout { grid-template-columns: minmax(0, 720px); }
  .page-toc { display: none; }
}

@media (max-width: 1040px) {
  .home-layout, .archive-layout { grid-template-columns: minmax(0, 1fr) 278px; gap: 36px; }
  .featured-card { grid-template-columns: 1fr 1fr; }
  .featured-content { padding: 32px; }
  .featured-content h3 { font-size: 31px; }
  .post-card-list { grid-template-columns: 205px minmax(0, 1fr); }
  .footer-top { gap: 50px; }
  .footer-columns { gap: 24px; }
}

@media (max-width: 960px) {
  .container { width: min(var(--container), calc(100% - 44px)); }
  .header-inner { height: 72px; gap: 16px; }
  .brand-name { font-size: 26px; }
  .primary-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .site-header { backdrop-filter: none !important; background: var(--bg); }
  .header-inner { position: relative; z-index: 3; }
  .brand, .header-actions { position: relative; z-index: 4; }
  body.nav-open .primary-nav {
    position: fixed;
    z-index: 2;
    top: 72px;
    right: 0;
    bottom: 0;
    width: min(370px, 88vw);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 22px 26px 32px;
    overflow-y: auto;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: -20px 0 60px rgba(0, 0, 0, .18);
    animation: nav-in .35s var(--ease) both;
  }
  @keyframes nav-in { from { transform: translateX(30px); opacity: .4; } }
  body.nav-open .primary-nav a { padding: 16px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-family: var(--font-serif); font-size: 24px; font-weight: 500; }
  body.nav-open .primary-nav a:first-child { border-top: 1px solid var(--line); }
  body.nav-open .primary-nav a::after { display: none; }
  body.nav-open .primary-nav a.is-active { color: var(--accent); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero-copy { max-width: 690px; width: 100%; min-width: 0; padding-bottom: 0; }
  .hero-copy h1 { font-size: clamp(48px, 8vw, 70px); }
  .hero-visual { width: min(560px, 100%); margin-left: auto; }
  .hero-image-wrap img { aspect-ratio: 1.16; }
  .home-hero { padding-top: 38px; }
  .home-layout, .archive-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
  .about-block { grid-column: span 2; }
  .subscribe-card { grid-column: span 2; }
  .archive-hero { padding-top: 34px; }
  .footer-top { grid-template-columns: 1fr; gap: 42px; }
  .footer-brand { max-width: 520px; }
  .footer-columns { grid-template-columns: repeat(3, 1fr); }
  .article-header h1 { max-width: 760px; }
  .single-article { padding-top: 22px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); padding-top: 42px; }
  .share-rail { display: none; }
  .article-after { padding-top: 48px; }
  .error-grid { grid-template-columns: 1fr; gap: 40px; }
  .error-art { order: -1; max-width: 480px; }
}

@media (max-width: 760px) {
  body { font-size: 14px; }
  .container { width: calc(100% - 36px); }
  .section-head { align-items: flex-start; }
  .section-head h2 { font-size: 29px; }
  .featured-card { grid-template-columns: 1fr; min-height: 0; }
  .featured-media { min-height: 300px; aspect-ratio: 1.55; }
  .featured-content { padding: 26px; }
  .featured-content h3 { margin-top: 15px; font-size: 29px; }
  .featured-footer { padding-top: 18px; }
  .post-grid { grid-template-columns: 1fr; gap: 18px; }
  .card-media { aspect-ratio: 1.65; }
  .post-card-list { grid-template-columns: 180px minmax(0, 1fr); }
  .post-card-list .card-body { padding: 18px; }
  .post-card-list .card-title { font-size: 20px; }
  .post-card-list .card-excerpt { display: none; }
  .post-card-list .card-read-time { font-size: 9px; }
  .post-card-list .card-foot { padding-top: 10px; }
  .sidebar { grid-template-columns: 1fr; }
  .about-block, .subscribe-card { grid-column: auto; }
  .archive-heading h1 { font-size: 42px; }
  .archive-layout { padding-top: 30px; padding-bottom: 70px; }
  .archive-hero { padding-bottom: 32px; }
  .article-header { padding-bottom: 30px; }
  .article-header h1 { font-size: clamp(34px, 8.5vw, 46px); }
  .article-deck { font-size: 14px; }
  .article-meta { gap: 9px 14px; }
  .article-cover { width: calc(100% - 24px); }
  .article-cover img { max-height: 460px; }
  .prose { font-size: 17px; line-height: 1.95; }
  .prose p:first-of-type::first-letter { font-size: 3.7em; }
  .prose h2 { font-size: 25px; }
  .prose h3 { font-size: 20px; }
  .article-after { padding-top: 42px; }
  .author-card { padding: 24px; align-items: flex-start; }
  .author-card-avatar { width: 54px; height: 54px; font-size: 21px; }
  .author-card-mark { display: none; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .comments-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .comments-head > p { max-width: none; text-align: left; }
  .comment-fields { grid-template-columns: 1fr; gap: 10px; }
  .comment-form { padding: 20px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-item.is-empty { display: none; }
  .post-nav-next { text-align: left; align-items: flex-start; }
  .post-nav-next > span { justify-content: flex-start; }
  .related-grid .post-card:nth-child(3) { display: none; }
  .footer-columns { grid-template-columns: 1fr 1fr; }
  .footer-col-note { grid-column: span 2; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-header h1 { font-size: 42px; }
  .page-layout { padding-top: 36px; }
  .page-footer { flex-direction: column; align-items: flex-start; gap: 10px; padding-bottom: 70px; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 30px); }
  .header-inner { height: 66px; }
  body.nav-open .primary-nav { top: 66px; }
  .header-actions { gap: 0; }
  .icon-btn { width: 36px; height: 36px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 25px; }
  .home-hero { padding: 28px 0 34px; }
  .hero-copy h1 { font-size: clamp(39px, 12vw, 54px); line-height: 1.12; }
  .hero-kicker { margin-bottom: 19px; font-size: 9px; }
  .hero-text { max-width: 100%; margin-top: 20px; font-size: 13px; overflow-wrap: anywhere; }
  .hero-actions { gap: 18px; margin-top: 26px; }
  .hero-stats { gap: 22px; margin-top: 34px; padding-top: 18px; }
  .hero-stats strong { font-size: 22px; }
  .hero-issue { left: -8px; bottom: 36px; }
  .hero-caption { display: none; }
  .home-content { padding-top: 14px; padding-bottom: 64px; }
  .featured-section { margin-bottom: 42px; }
  .featured-media { min-height: 240px; }
  .featured-content { padding: 22px 20px; }
  .featured-content h3 { font-size: 26px; }
  .featured-content > p { font-size: 12.5px; }
  .post-card-list { grid-template-columns: 1fr; }
  .post-card-list .card-media { aspect-ratio: 1.7; min-height: 0; }
  .post-card-list .card-body { padding: 18px; }
  .post-card-list .card-excerpt { display: block; }
  .post-card-list .card-title { font-size: 22px; }
  .section-head.compact h2 { font-size: 24px; }
  .section-link { font-size: 10.5px; }
  .pagination { margin-top: 30px; }
  .page-number, .page-arrow { width: 34px; height: 34px; font-size: 11px; }
  .archive-heading h1 { font-size: 36px; }
  .archive-description { font-size: 12.5px; }
  .archive-meta { margin-top: 18px; }
  .archive-search { margin-top: 22px; }
  .article-category { margin-bottom: 16px; }
  .article-header .breadcrumbs { margin-bottom: 22px; }
  .article-cover { width: calc(100% - 12px); border-radius: 12px; }
  .article-layout { padding-top: 30px; }
  .article-body .prose { font-size: 16.5px; }
  .article-tags { margin-top: 32px; }
  .related-grid { grid-template-columns: 1fr; }
  .related-grid .post-card:nth-child(2) { display: none; }
  .related-grid .card-media { aspect-ratio: 1.8; }
  .article-comments { padding-top: 54px; padding-bottom: 70px; }
  .comments-head h2 { font-size: 27px; }
  .comment-form-foot { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .comment-form-foot .button { width: 100%; }
  .comment-note { justify-content: center; }
  .comment-item { gap: 10px; }
  .comment-children { width: calc(100% - 40px); margin-left: 40px; padding-left: 10px; }
  .error-section { padding: 40px 0 70px; }
  .error-copy h1 { font-size: 48px; }
  .error-art { aspect-ratio: 1.3; }
  .footer-top { padding-bottom: 36px; }
  .footer-columns { grid-template-columns: 1fr 1fr; gap: 24px 18px; }
  .footer-col-note { grid-column: span 2; }
  .site-footer { padding-top: 54px; }
  .footer-logo { font-size: 34px; }
  .footer-meta { flex-direction: column; align-items: flex-start; gap: 5px; }
  .back-to-top { right: 14px; bottom: 14px; }
  .search-panel { margin-top: 7vh; padding: 20px; border-radius: 18px; }
  .search-form { padding-left: 12px; }
  .search-form input { height: 52px; font-size: 14px; }
  .search-submit { padding: 8px 12px; }
  .search-suggestions { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal-item { opacity: 1; transform: none; }
}
