/* ==========================================================================
   山止川行 · SHAN ZHI CHUAN XING
   A warm, paper-and-ink editorial theme. Hand-built, no framework.
   ========================================================================== */

:root {
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", "JetBrains Mono", "Consolas", monospace;

  --paper: #f6f1e7;
  --paper-deep: #eee6d7;
  --surface: #fbf7ef;
  --surface-raised: #fffdf8;
  --ink: #20211c;
  --ink-soft: #4f4d43;
  --muted: #7d7667;
  --faint: #a59c8b;
  --line: rgba(32, 33, 28, 0.14);
  --line-soft: rgba(32, 33, 28, 0.08);
  --line-strong: rgba(32, 33, 28, 0.26);
  --accent: #b3472c;
  --accent-deep: #8d331e;
  --accent-soft: rgba(179, 71, 44, 0.1);
  --forest: #23352c;
  --forest-soft: #2e463a;
  --jade: #5e7d6c;
  --gold: #ad8951;
  --shadow: 0 22px 60px -32px rgba(50, 38, 22, 0.35);
  --shadow-soft: 0 12px 34px -24px rgba(50, 38, 22, 0.3);
  --header-h: 78px;
  --maxw: 1240px;
  --radius: 3px;
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #15140f;
  --paper-deep: #1b1913;
  --surface: #1d1b15;
  --surface-raised: #232019;
  --ink: #ece4d4;
  --ink-soft: #c3baaa;
  --muted: #968c7a;
  --faint: #746b5b;
  --line: rgba(236, 228, 212, 0.14);
  --line-soft: rgba(236, 228, 212, 0.07);
  --line-strong: rgba(236, 228, 212, 0.28);
  --accent: #e07c58;
  --accent-deep: #ed9475;
  --accent-soft: rgba(224, 124, 88, 0.13);
  --forest: #1c2c24;
  --forest-soft: #294135;
  --jade: #89a795;
  --gold: #c6a268;
  --shadow: 0 26px 70px -36px rgba(0, 0, 0, 0.8);
  --shadow-soft: 0 14px 38px -26px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% -8%, rgba(179, 71, 44, 0.085), transparent 42%),
    radial-gradient(circle at 94% 4%, rgba(46, 70, 58, 0.075), transparent 38%);
  background-attachment: fixed;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[data-theme="dark"] body {
  background-image:
    radial-gradient(circle at 8% -8%, rgba(224, 124, 88, 0.09), transparent 42%),
    radial-gradient(circle at 94% 4%, rgba(137, 167, 149, 0.07), transparent 40%);
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.012em;
  color: var(--ink);
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure, dl, dd { margin: 0; }
table { border-collapse: collapse; width: 100%; }
svg { display: block; }

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

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

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  top: -60px;
  left: 18px;
  z-index: 400;
  padding: 10px 18px;
  color: #fff9ee;
  background: var(--ink);
  border-radius: var(--radius);
  font-size: 13px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

.icon { flex: none; }

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

.container-narrow {
  width: min(800px, calc(100% - 96px));
  margin-inline: auto;
}

.container-tight {
  width: min(980px, calc(100% - 96px));
  margin-inline: auto;
}

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

.eyebrow-dot {
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.meta-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  background: var(--faint);
  border-radius: 50%;
  vertical-align: middle;
}

/* ==========================================================================
   Buttons & links
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 24px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.button:hover {
  color: #fff9ef;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.button:active { transform: translateY(0); }
[data-theme="dark"] .button:hover,
[data-theme="dark"] .header-desk-link:hover,
[data-theme="dark"] .featured-card:hover .featured-arrow {
  color: #fff9ef;
  background: #b84f30;
  border-color: #b84f30;
}
.button svg { transition: transform 0.2s ease; }
.button:hover svg { transform: translateX(3px); }
.button-small { min-height: 38px; padding: 9px 16px; font-size: 12.5px; }
.button-full { width: 100%; }
.button-ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}
.button-ghost:hover {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--accent);
}
.button.is-busy { opacity: 0.55; pointer-events: none; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.015em;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.text-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.text-link svg { transition: transform 0.2s ease; }
.text-link:hover svg { transform: translateX(2px); }
.text-link.muted { color: var(--muted); font-weight: 500; }
.text-link.muted:hover { color: var(--accent); }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.icon-button:hover {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}
.icon-button.danger:hover { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 231, 0.88);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

[data-theme="dark"] .site-header { background: rgba(21, 20, 15, 0.88); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  width: min(var(--maxw), calc(100% - 96px));
  height: var(--header-h);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.brand-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #f8f1e3;
  background: var(--accent);
  border-radius: 2px;
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 249, 239, 0.28);
  transform: rotate(-1.5deg);
}
.brand-words { display: flex; flex-direction: column; gap: 2px; }
.brand-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.2;
}
.brand-roman {
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.17em;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
}
.site-nav a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.25s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after,
.site-nav a.is-active::after { right: 0; }
.site-nav a.is-active { color: var(--accent); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-desk-link {
  margin-right: 8px;
  padding: 7px 13px;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background 0.2s ease, color 0.2s ease;
}
.header-desk-link:hover { color: #fff9ef; background: var(--accent); }

.theme-icon { align-items: center; justify-content: center; }
.theme-sun { display: none; }
.theme-moon { display: inline-flex; }
[data-theme="dark"] .theme-sun { display: inline-flex; }
[data-theme="dark"] .theme-moon { display: none; }

.nav-menu-button { display: none; }
.nav-menu-button .menu-close { display: none; }
.site-header.nav-open .nav-menu-button .menu-open { display: none; }
.site-header.nav-open .nav-menu-button .menu-close { display: inline-flex; }

.mobile-nav { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "山";
  position: absolute;
  top: -80px;
  right: -30px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 420px;
  line-height: 1;
  opacity: 0.028;
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: 72px;
  width: min(var(--maxw), calc(100% - 96px));
  margin-inline: auto;
  padding: 82px 0 78px;
}
.hero-copy h1 {
  max-width: 640px;
  margin: 0 0 24px;
  font-size: clamp(44px, 4.5vw, 66px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero-copy h1 em {
  color: var(--accent);
  font-style: normal;
  background-image: linear-gradient(transparent 76%, var(--accent-soft) 76%);
}
.hero-lede {
  max-width: 500px;
  margin-bottom: 32px;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.9;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 44px;
}
.hero-stats {
  display: flex;
  gap: 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero-stats > div {
  min-width: 104px;
  padding-right: 28px;
  margin-right: 28px;
  border-right: 1px solid var(--line-soft);
}
.hero-stats > div:last-child { margin-right: 0; padding-right: 0; border-right: 0; }
.hero-stats dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.hero-stats dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.1;
}

.featured-card {
  display: block;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.featured-card:hover {
  transform: translateY(-5px) rotate(-0.25deg);
  border-color: var(--line-strong);
  box-shadow: 0 32px 70px -34px rgba(50, 38, 22, 0.48);
}
.featured-art {
  position: relative;
  aspect-ratio: 16 / 10.4;
  overflow: hidden;
  background: var(--paper-deep);
}
.featured-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(20, 17, 12, 0.22));
  pointer-events: none;
}
.featured-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.featured-card:hover .featured-art img { transform: scale(1.035); }
.featured-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  padding: 6px 12px;
  color: #fff9ed;
  background: rgba(25, 24, 20, 0.82);
  border: 1px solid rgba(255, 249, 237, 0.24);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  backdrop-filter: blur(6px);
}
.featured-ornament {
  position: absolute;
  right: 15px;
  bottom: 15px;
  z-index: 2;
  color: rgba(255, 249, 237, 0.72);
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: 0.5em;
  writing-mode: vertical-rl;
}
.featured-info { padding: 24px 26px 22px; }
.featured-info .tag-list { margin-bottom: 12px; }
.featured-info h2 {
  margin-bottom: 10px;
  font-size: 27px;
  line-height: 1.32;
  transition: color 0.2s ease;
}
.featured-card:hover .featured-info h2 { color: var(--accent); }
.featured-info > p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.75;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.featured-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 15px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  letter-spacing: 0.03em;
}
.featured-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.featured-card:hover .featured-arrow {
  color: #fff9ef;
  background: var(--accent);
  transform: rotate(45deg);
}

/* ==========================================================================
   Home content
   ========================================================================== */

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 76px;
  padding: 76px 0 20px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--ink);
}
.section-head .eyebrow { margin-bottom: 8px; }
.section-head h2 { font-size: 33px; }

.post-list { border-top: 1px solid var(--line); }
.post-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 36px;
  align-items: start;
  gap: 10px;
  padding: 30px 0 28px;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease;
}
.post-row:hover { background: linear-gradient(90deg, transparent, var(--accent-soft), transparent); }
.post-row-number {
  padding-top: 3px;
  color: var(--faint);
  font-family: var(--font-serif);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.post-row-body { min-width: 0; }
.post-row-main { display: block; }
.post-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.035em;
}
.post-row h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.38;
  transition: color 0.2s ease;
}
.post-row:hover h3 { color: var(--accent); }
.post-row p {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 13px;
  color: var(--ink-soft);
  font-size: 13.8px;
  line-height: 1.8;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.post-row-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-top: 16px;
  color: var(--faint);
  border: 1px solid transparent;
  border-radius: 50%;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.post-row:hover .post-row-arrow {
  color: var(--accent);
  border-color: var(--line);
  transform: translate(2px, -2px);
}

.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.tag:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.read-all {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}
.read-all-line {
  flex: 1;
  height: 1px;
  background: var(--line);
  transition: background 0.2s ease;
}
.read-all:hover { color: var(--accent); }
.read-all:hover .read-all-line { background: var(--accent); }

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 8px;
}

.author-card {
  padding: 26px;
  color: #efe9dc;
  background: var(--forest);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.author-head { display: flex; align-items: center; gap: 14px; }
.author-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  color: var(--forest);
  background: #efe9dc;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 22px;
}
.author-avatar.large { width: 66px; height: 66px; font-size: 30px; }
.author-head h3 { color: #f4eee1; font-size: 20px; }
.author-head p { margin-top: 3px; color: rgba(239, 233, 220, 0.6); font-size: 11px; letter-spacing: 0.08em; }
.author-bio {
  margin: 20px 0;
  padding-bottom: 20px;
  color: rgba(239, 233, 220, 0.72);
  border-bottom: 1px solid rgba(239, 233, 220, 0.14);
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.9;
}
.author-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.author-card .text-link { color: #efe9dc; }
.author-card .text-link:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.5); }
.author-card .text-link.muted { color: rgba(239, 233, 220, 0.6); }

.topics-card,
.rss-card,
.reading-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.topics-card h3,
.rss-card h3,
.reading-card h3 {
  margin-bottom: 16px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.topic-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-cloud.large { gap: 10px; }
.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.topic-chip sup {
  color: var(--faint);
  font-size: 9px;
  line-height: 1;
  transform: translateY(-1px);
}
.topic-chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.topic-cloud.large .topic-chip { padding: 9px 15px; font-size: 13px; }

.rss-card { background: var(--surface-raised); }
.rss-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
}
.rss-card h3 { margin-bottom: 8px; color: var(--ink); font-family: var(--font-serif); font-size: 19px; font-weight: 600; letter-spacing: 0; }
.rss-card > p { color: var(--muted); font-size: 12.5px; line-height: 1.75; }
.rss-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.reading-card h3 { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.reading-rule { flex: 1; height: 1px; background: var(--line); }
.reading-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.reading-list li { display: flex; align-items: flex-start; gap: 12px; }
.book-spine { width: 4px; height: 34px; margin-top: 2px; border-radius: 1px; }
.spine-red { background: #a94b3a; }
.spine-green { background: #5a7a64; }
.spine-blue { background: #536b85; }
.reading-list strong { display: block; font-family: var(--font-serif); font-size: 13.5px; font-weight: 600; }
.reading-list small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }

.home-note {
  margin-top: 74px;
  margin-bottom: 86px;
  padding: 58px 40px;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.home-note-quote {
  max-width: 760px;
  margin: 0 auto 16px;
  font-family: var(--font-serif);
  font-size: clamp(21px, 2.5vw, 30px);
  line-height: 1.7;
}
.home-note-by { color: var(--muted); font-size: 11px; letter-spacing: 0.12em; }

/* ==========================================================================
   Page header / archive / search
   ========================================================================== */

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: 78px 0 40px;
}
.page-header-copy { max-width: 780px; }
.page-header h1 {
  margin-bottom: 16px;
  font-size: clamp(40px, 4.4vw, 62px);
  line-height: 1.18;
}
.page-lede {
  max-width: 620px;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 15.5px;
  line-height: 1.9;
}
.page-header-mark {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  padding-bottom: 6px;
}
.page-header-mark strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 58px;
  font-weight: 500;
  line-height: 1;
  opacity: 0.18;
}
.page-header-mark span { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: 0.15em; }

.filter-bar {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
}
.filter-label { flex: none; padding-top: 7px; color: var(--muted); font-size: 10.5px; letter-spacing: 0.12em; }
.filter-list { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.filter-chip sup { color: var(--faint); font-size: 9px; }
.filter-chip:hover { color: var(--accent); border-color: var(--accent); }
.filter-chip.is-active { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.filter-chip.is-active sup { color: var(--paper); opacity: 0.58; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 30px;
  padding-bottom: 70px;
}
.archive-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.archive-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}
.archive-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9.4;
  overflow: hidden;
  background: var(--paper-deep);
}
.archive-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.archive-card:hover .archive-cover img { transform: scale(1.04); }
.archive-index {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 8px;
  color: #fff9ed;
  background: rgba(22, 20, 16, 0.66);
  border-radius: 2px;
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(4px);
}
.archive-body { flex: 1; padding: 24px 26px 26px; }
.archive-body h2 { margin-bottom: 10px; font-size: 25px; line-height: 1.36; }
.archive-body h2 a { transition: color 0.2s ease; }
.archive-body h2 a:hover { color: var(--accent); }
.archive-body > p {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 16px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.8;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-wrap { padding-bottom: 70px; }
.search-form {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding: 10px 12px 10px 22px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.search-icon { color: var(--muted); }
.search-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--font-serif);
  font-size: 17px;
}
.search-form input::placeholder { color: var(--faint); }
.search-form .button { flex: none; min-height: 42px; padding-inline: 24px; }
.search-summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 20px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.search-summary strong { color: var(--accent); font-weight: 600; }
.search-suggest { padding: 54px 0 30px; }
.search-suggest .eyebrow { margin-bottom: 20px; }
.search-results { padding-top: 0; }

.empty-state {
  padding: 70px 30px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  margin-bottom: 60px;
}
.empty-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 20px;
}
.empty-state h2 { margin-bottom: 9px; font-size: 23px; }
.empty-state p { color: var(--muted); font-size: 13.5px; }
.empty-state a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }

/* ==========================================================================
   Article
   ========================================================================== */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 130;
  height: 2px;
  background: transparent;
  pointer-events: none;
}
.reading-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.post-header { padding-top: 58px; padding-bottom: 38px; text-align: center; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}
.breadcrumb a { transition: color 0.2s ease; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span:last-child { color: var(--ink-soft); }

.post-tags { justify-content: center; margin-bottom: 20px; }
.post-header h1 {
  max-width: 860px;
  margin: 0 auto 20px;
  font-size: clamp(34px, 4.7vw, 56px);
  line-height: 1.28;
  letter-spacing: -0.026em;
}
.post-deck {
  max-width: 660px;
  margin: 0 auto 26px;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 15.5px;
  line-height: 1.85;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11.5px;
}
.meta-author { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.meta-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #f2ebde;
  background: var(--forest);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 11px;
}

.post-cover { margin-bottom: 54px; }
.post-cover img {
  width: 100%;
  max-height: 560px;
  aspect-ratio: 2.08 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}
.post-cover figcaption {
  margin-top: 12px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-align: right;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  gap: 68px;
  align-items: start;
  justify-content: center;
  max-width: 1080px;
}
.prose {
  min-width: 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17.5px;
  line-height: 2;
  letter-spacing: 0.005em;
}
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.35em; }
.prose > p:first-of-type::first-letter {
  float: left;
  margin: 0.1em 0.12em 0 0;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 3.2em;
  line-height: 0.84;
}
.prose h2,
.prose h3,
.prose h4 {
  position: relative;
  margin: 2.1em 0 0.7em;
  scroll-margin-top: 110px;
  line-height: 1.35;
}
.prose h2 { padding-left: 18px; font-size: 27px; }
.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 3px;
  height: 1.05em;
  background: var(--accent);
  border-radius: 2px;
}
.prose h3 { font-size: 21px; }
.prose h4 { font-size: 18px; }
.prose a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.prose a:hover { border-bottom-color: var(--accent); background: var(--accent-soft); }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose ul,
.prose ol { margin: 0 0 1.45em; padding-left: 1.35em; }
.prose ul { list-style: none; }
.prose ol { list-style: decimal; }
.prose ul li { position: relative; margin-bottom: 0.45em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: -1.05em;
  top: 0.85em;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}
.prose ol li { margin-bottom: 0.45em; padding-left: 0.2em; }
.prose ol li::marker { color: var(--accent); font-family: var(--font-sans); font-size: 0.78em; }
.prose blockquote {
  position: relative;
  margin: 2em 0;
  padding: 24px 28px 24px 34px;
  color: var(--ink-soft);
  background: var(--surface);
  border-left: 3px solid var(--accent);
}
.prose blockquote p { margin: 0; font-size: 1.02em; line-height: 1.9; }
.prose blockquote p + p { margin-top: 0.8em; }
.prose hr { margin: 2.8em auto; width: 64px; border: 0; border-top: 1px solid var(--line-strong); }
.prose img { margin: 2em 0; border-radius: var(--radius); }
.prose code {
  padding: 2px 6px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.82em;
}
.prose pre {
  overflow-x: auto;
  margin: 0;
  padding: 22px 24px;
  color: #e9e1d2;
  background: #1d241f;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  tab-size: 2;
}
.prose pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
}
.code-card {
  overflow: hidden;
  margin: 2em 0;
  background: #1d241f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 14px 9px 20px;
  color: rgba(233, 225, 210, 0.46);
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.code-copy {
  padding: 3px 9px;
  color: rgba(233, 225, 210, 0.6);
  background: transparent;
  border: 1px solid rgba(233, 225, 210, 0.16);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 10px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.code-copy:hover { color: #f5eee0; border-color: rgba(233, 225, 210, 0.45); }

.article-aside {
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 4px;
}
.toc-card {
  padding: 20px 0 20px 20px;
  border-left: 1px solid var(--line);
}
.toc-card h3,
.share-card h3 {
  margin-bottom: 12px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.toc-list { display: flex; flex-direction: column; gap: 8px; }
.toc-item a {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
  transition: color 0.2s ease;
}
.toc-item.toc-level-h3 { padding-left: 12px; }
.toc-item a:hover,
.toc-item a.is-active { color: var(--accent); }
.toc-item a.is-active { font-weight: 600; }
.share-card { padding: 18px 0 0 20px; border-left: 1px solid var(--line); }
.share-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.share-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10.5px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.share-button:hover { color: var(--accent); border-color: var(--accent); }
.aside-rss-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-left: 20px;
  color: var(--faint);
  font-size: 10.5px;
  transition: color 0.2s ease;
}
.aside-rss-link:hover { color: var(--accent); }

.post-footer { margin-top: 74px; }
.post-author-box {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 30px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.post-author-copy { flex: 1; min-width: 0; }
.post-author-copy .eyebrow { margin-bottom: 5px; font-size: 9px; }
.post-author-copy h2 { margin-bottom: 5px; font-size: 21px; }
.post-author-copy > p:last-child { color: var(--muted); font-size: 12.5px; line-height: 1.7; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 24px 26px 24px 0;
  transition: background 0.2s ease;
}
.post-nav-item.next { align-items: flex-end; padding: 24px 0 24px 26px; text-align: right; border-left: 1px solid var(--line); }
.post-nav-item:hover { background: var(--accent-soft); }
.post-nav-label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; letter-spacing: 0.08em; }
.post-nav-item strong { font-family: var(--font-serif); font-size: 15.5px; font-weight: 600; line-height: 1.5; transition: color 0.2s ease; }
.post-nav-item:hover strong { color: var(--accent); }

.related-section { margin-top: 72px; padding-bottom: 80px; }
.related-section .section-head { margin-bottom: 26px; }
.related-grid { padding-bottom: 0; }

/* ==========================================================================
   About
   ========================================================================== */

.about-hero {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 72px;
  padding: 86px 0 74px;
}
.about-portrait {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1.08;
  max-width: 380px;
  margin-inline: auto;
  background: var(--forest);
  border-radius: 50% 50% 46% 54% / 48% 44% 56% 52%;
  box-shadow: var(--shadow);
}
.portrait-ring {
  position: absolute;
  border: 1px solid rgba(239, 233, 220, 0.24);
  border-radius: 50%;
}
.ring-one { inset: 11%; }
.ring-two { inset: 23%; border-style: dashed; opacity: 0.55; }
.portrait-seal {
  color: #f3ecdf;
  font-family: var(--font-serif);
  font-size: 76px;
  line-height: 1.08;
  letter-spacing: 0.12em;
  text-align: center;
  text-indent: 0.12em;
}
.portrait-caption {
  position: absolute;
  bottom: 13%;
  color: rgba(239, 233, 220, 0.46);
  font-size: 8px;
  letter-spacing: 0.24em;
}
.about-hero-copy h1 { margin-bottom: 24px; font-size: clamp(46px, 5vw, 70px); line-height: 1.18; }
.about-lede { max-width: 620px; color: var(--ink-soft); font-family: var(--font-serif); font-size: 16.5px; line-height: 1.95; }
.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 28px;
  padding-top: 22px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11.5px;
}
.about-meta span { display: inline-flex; align-items: center; gap: 7px; }

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 80px;
  align-items: start;
  padding-bottom: 90px;
}
.about-prose { font-size: 17px; }
.about-prose > p:first-of-type::first-letter { float: none; font-size: inherit; color: inherit; margin: 0; }
.about-aside { display: flex; flex-direction: column; gap: 20px; }
.timeline-card,
.about-facts {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.timeline-card h3,
.about-facts h3 {
  margin-bottom: 18px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.14em;
}
.timeline { display: flex; flex-direction: column; }
.timeline li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline li:last-child { padding-bottom: 0; }
.timeline time { color: var(--accent); font-family: var(--font-serif); font-size: 14px; }
.timeline p { color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.about-facts dl { display: flex; flex-direction: column; gap: 9px; }
.about-facts dl div { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.about-facts dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.about-facts dt { color: var(--muted); font-size: 11px; }
.about-facts dd { font-size: 11.5px; text-align: right; }

/* ==========================================================================
   Login
   ========================================================================== */

.page-login { background: var(--paper); }
.auth-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0 40px;
}
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 28px 0;
}
.auth-main {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px 0 46px;
}
.auth-card {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  width: min(1000px, 100%);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 40px 100px -50px rgba(35, 27, 18, 0.55);
}
.auth-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 540px;
  padding: 38px;
  overflow: hidden;
  color: #efe8db;
  background: var(--forest);
}
.auth-art::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -80px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(239, 232, 219, 0.13);
  border-radius: 50%;
}
.auth-art::after {
  content: "";
  position: absolute;
  bottom: -130px;
  left: -100px;
  width: 340px;
  height: 340px;
  background: rgba(179, 71, 44, 0.18);
  border-radius: 50%;
  filter: blur(4px);
}
.auth-art-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(239, 232, 219, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 232, 219, 0.055) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, black, transparent 74%);
}
.auth-art-seal {
  position: absolute;
  top: 38px;
  left: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: #f5eee0;
  border: 1px solid rgba(245, 238, 224, 0.4);
  font-family: var(--font-serif);
  font-size: 26px;
}
.auth-quote {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1.5;
}
.auth-art-note {
  position: relative;
  z-index: 1;
  margin-top: 15px;
  color: rgba(239, 232, 219, 0.52);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}
.auth-art-index {
  position: absolute;
  right: 32px;
  top: 40px;
  color: rgba(239, 232, 219, 0.36);
  font-size: 9px;
  letter-spacing: 0.22em;
}
.auth-form-panel { padding: 54px 58px 40px; }
.auth-form-panel h1 { margin-bottom: 10px; font-size: 36px; }
.auth-intro { margin-bottom: 26px; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-footnote {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 14px;
  margin-top: 26px;
  padding-top: 18px;
  color: var(--faint);
  border-top: 1px solid var(--line-soft);
  font-size: 10px;
}
.auth-footnote span { display: inline-flex; align-items: center; gap: 5px; }
.auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 18px 0 26px;
  color: var(--faint);
  border-top: 1px solid var(--line-soft);
  font-size: 10px;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.field { display: flex; flex-direction: column; gap: 8px; }
.field-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.field-label small { color: var(--faint); font-size: 9.5px; font-weight: 400; letter-spacing: 0.02em; }
.field-control {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field-control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-control input {
  width: 100%;
  min-width: 0;
  padding: 13px 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
}
.field-control input::placeholder { color: var(--faint); }
.password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
}
.password-toggle:hover { color: var(--accent); background: var(--accent-soft); }

.field > input,
.field > textarea,
.field > select {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: 0;
  font-size: 14px;
  line-height: 1.6;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field > input:focus,
.field > textarea:focus,
.field > select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field > textarea { resize: vertical; min-height: 84px; }
.field > input::placeholder,
.field > textarea::placeholder { color: var(--faint); }

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 20px;
  padding: 11px 14px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid rgba(179, 71, 44, 0.25);
  border-radius: 2px;
  font-size: 12px;
  line-height: 1.6;
}
.form-alert svg { margin-top: 2px; flex: none; }
.form-alert-wide { display: block; padding: 18px 20px; margin-bottom: 22px; }
.form-alert-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; font-size: 13px; }
.form-alert ul { padding-left: 1.2em; list-style: disc; }
.form-alert li { margin: 3px 0; }
.field-error { color: var(--accent); font-size: 11px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: 40px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.7fr;
  gap: 54px;
  width: min(var(--maxw), calc(100% - 96px));
  margin-inline: auto;
  padding: 56px 0 46px;
}
.footer-brand p { max-width: 380px; margin-top: 18px; color: var(--muted); font-family: var(--font-serif); font-size: 13px; line-height: 1.9; }
.footer-column { display: flex; flex-direction: column; gap: 10px; }
.footer-label { margin-bottom: 4px; color: var(--faint); font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; }
.footer-column a { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: 12.5px; transition: color 0.2s ease; }
.footer-column a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(var(--maxw), calc(100% - 96px));
  margin-inline: auto;
  padding: 20px 0 26px;
  color: var(--faint);
  border-top: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.footer-bottom span { display: inline-flex; align-items: center; gap: 5px; }

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 12px 14px 12px 16px;
  color: #f4eee1;
  background: #22271f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.5);
  font-size: 12.5px;
  line-height: 1.5;
  animation: toast-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.toast.is-visible { opacity: 1; }
.toast.is-success .toast-icon { color: #9fc6a9; }
.toast.is-error .toast-icon,
.toast.toast-error .toast-dot { color: #f0a78f; }
.toast-dot { width: 6px; height: 6px; flex: none; background: #9fc6a9; border-radius: 50%; }
.toast-text { flex: 1; }
.toast-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  padding: 0;
  color: rgba(244, 238, 225, 0.55);
  background: transparent;
  border: 0;
  border-radius: 50%;
}
.toast-close:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Admin shell
   ========================================================================== */

.page-admin { background: var(--paper); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  width: 252px;
  color: #e8e1d3;
  background: var(--forest);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.admin-sidebar-head { padding: 28px 24px 22px; border-bottom: 1px solid rgba(239, 233, 220, 0.1); }
.admin-sidebar .brand-name { color: #f2ebde; }
.admin-sidebar .brand-roman { color: rgba(239, 233, 220, 0.38); }
.admin-sidebar .brand-seal { background: var(--accent); }
.admin-edition {
  display: block;
  margin-top: 14px;
  padding-left: 50px;
  color: rgba(239, 233, 220, 0.32);
  font-size: 8px;
  letter-spacing: 0.16em;
}
.admin-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; padding: 22px 14px; }
.admin-nav-label {
  padding: 14px 10px 6px;
  color: rgba(239, 233, 220, 0.3);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.admin-nav-label:first-child { padding-top: 4px; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  color: rgba(239, 233, 220, 0.66);
  border-radius: 2px;
  font-size: 12.5px;
  transition: color 0.2s ease, background 0.2s ease;
}
.admin-nav a:hover { color: #f5eee0; background: rgba(239, 233, 220, 0.07); }
.admin-nav a.is-active { color: #f5eee0; background: rgba(239, 233, 220, 0.11); }
.admin-nav a.is-active svg { color: #d98a68; }
.admin-sidebar-foot { padding: 18px 18px 22px; border-top: 1px solid rgba(239, 233, 220, 0.1); }
.admin-user { display: flex; align-items: center; gap: 10px; }
.admin-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  color: var(--forest);
  background: #efe9dc;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 15px;
}
.admin-user-copy { min-width: 0; flex: 1; }
.admin-user-copy strong { display: block; overflow: hidden; color: #f2ebde; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-copy small { display: block; margin-top: 1px; color: rgba(239, 233, 220, 0.36); font-size: 9px; }
.admin-sidebar .icon-button { color: rgba(239, 233, 220, 0.5); }
.admin-sidebar .icon-button:hover { color: #f2ebde; background: rgba(239, 233, 220, 0.08); border-color: rgba(239, 233, 220, 0.12); }
.admin-sidebar-note { margin-top: 14px; color: rgba(239, 233, 220, 0.28); font-size: 8.5px; letter-spacing: 0.08em; }

.admin-workspace { flex: 1; min-width: 0; margin-left: 252px; }
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 0 42px;
  background: rgba(246, 241, 231, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
[data-theme="dark"] .admin-topbar { background: rgba(21, 20, 15, 0.9); }
.admin-menu-button { display: none; }
.admin-topbar-title { display: flex; flex-direction: column; gap: 1px; }
.admin-topbar-eyebrow { color: var(--faint); font-size: 8.5px; letter-spacing: 0.16em; }
.admin-topbar-title strong { font-family: var(--font-serif); font-size: 16px; font-weight: 600; }
.admin-topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.editor-meta { color: var(--muted); font-size: 10.5px; }

.admin-content { width: min(1240px, calc(100% - 84px)); margin: 0 auto; padding: 46px 0 76px; }
.admin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}
.admin-heading h1 { margin-bottom: 8px; font-size: clamp(30px, 3.2vw, 42px); }
.admin-heading > div > p:last-child { color: var(--muted); font-size: 12.5px; }
.admin-heading .eyebrow { margin-bottom: 8px; }
.editor-heading-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.stat-card {
  padding: 22px 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat-card.accent { background: var(--accent-soft); border-color: rgba(179, 71, 44, 0.18); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; color: var(--muted); font-size: 10.5px; letter-spacing: 0.06em; }
.stat-top svg { color: var(--faint); }
.stat-card strong { display: block; margin-bottom: 6px; font-family: var(--font-serif); font-size: 38px; font-weight: 500; line-height: 1; }
.stat-card strong.stat-small { font-size: 24px; line-height: 1.2; }
.stat-card > p { color: var(--muted); font-size: 10.5px; }

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: start;
}
.admin-side-stack { display: flex; flex-direction: column; gap: 18px; }
.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-head h2 { font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.panel-head .eyebrow { margin-bottom: 4px; font-size: 8.5px; }
.panel-head > div h2 { font-family: var(--font-serif); font-size: 19px; font-weight: 600; letter-spacing: 0; }
.panel-foot { padding: 16px 24px; border-top: 1px solid var(--line-soft); }

.table-wrap { overflow-x: auto; }
.post-table { min-width: 620px; }
.post-table th {
  padding: 11px 20px;
  color: var(--faint);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-align: left;
  white-space: nowrap;
}
.post-table th.num { text-align: right; }
.post-table th.actions-head { text-align: right; }
.post-table td { padding: 14px 20px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 12px; }
.post-table tr:last-child td { border-bottom: 0; }
.post-table tbody tr { transition: background 0.2s ease; }
.post-table tbody tr:hover { background: var(--paper); }
.table-post { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.table-post-cover { width: 52px; height: 36px; flex: none; overflow: hidden; background: var(--paper-deep); border-radius: 2px; }
.table-post-cover img { width: 100%; height: 100%; object-fit: cover; }
.table-post-copy { min-width: 0; }
.table-post-copy a { display: block; overflow: hidden; max-width: 330px; color: var(--ink); font-family: var(--font-serif); font-size: 13.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.table-post-copy a:hover { color: var(--accent); }
.table-post-copy span { display: block; overflow: hidden; margin-top: 2px; color: var(--faint); font-family: var(--font-mono); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.table-date { color: var(--muted); white-space: nowrap; }
.post-table td.num { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.table-actions { text-align: right; white-space: nowrap; }
.table-actions .icon-button { width: 30px; height: 30px; }
.inline-form { display: inline-flex; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 9.5px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.status-badge > span { width: 4px; height: 4px; border-radius: 50%; }
.status-badge.is-published { color: #3f6b4c; background: rgba(63, 107, 76, 0.1); }
.status-badge.is-published > span { background: #4e8a60; }
.status-badge.is-draft { color: var(--muted); background: var(--paper); }
.status-badge.is-draft > span { background: var(--faint); }
.featured-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 5px;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  border-radius: 50%;
  font-size: 8px;
  vertical-align: middle;
}

.desk-note { padding: 24px; background: var(--forest); border-color: transparent; color: #efe9dc; }
.desk-note .eyebrow { color: #d98a68; }
.desk-note blockquote { margin: 8px 0 18px; font-family: var(--font-serif); font-size: 19px; line-height: 1.75; }
.desk-note-note { color: rgba(239, 233, 220, 0.5); font-size: 10.5px; line-height: 1.7; }
.quick-links { display: flex; flex-direction: column; }
.quick-links a { display: flex; align-items: center; gap: 11px; padding: 14px 22px; border-bottom: 1px solid var(--line-soft); transition: background 0.2s ease; }
.quick-links a:last-child { border-bottom: 0; }
.quick-links a:hover { background: var(--paper); }
.quick-links a > svg:first-child { color: var(--accent); }
.quick-links a > svg:last-child { margin-left: auto; color: var(--faint); }
.quick-links span { display: flex; flex-direction: column; gap: 1px; }
.quick-links strong { font-size: 11.5px; font-weight: 600; }
.quick-links small { color: var(--muted); font-size: 9.5px; }
.system-card .panel-head { padding-block: 16px; }
.live-dot { display: inline-flex; align-items: center; gap: 5px; color: #4e8a60; font-size: 9px; }
.live-dot > span { width: 5px; height: 5px; background: #4e8a60; border-radius: 50%; box-shadow: 0 0 0 3px rgba(78, 138, 96, 0.14); }
.system-list { padding: 10px 22px 16px; }
.system-list div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.system-list div:last-child { border-bottom: 0; }
.system-list dt { color: var(--muted); font-size: 10px; }
.system-list dd { font-size: 10px; text-align: right; }

.admin-empty { padding: 60px 30px; text-align: center; }
.admin-empty h2 { margin: 12px 0 6px; font-size: 22px; }
.admin-empty p { margin-bottom: 20px; color: var(--muted); font-size: 12px; }
.admin-posts-panel .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }

/* ==========================================================================
   Editor
   ========================================================================== */

.editor-form { margin-top: 4px; }
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
}
.editor-main { min-width: 0; }
.editor-panel { padding: 28px; }
.editor-panel > .field + .field { margin-top: 22px; }
.field-title input { font-family: var(--font-serif); font-size: 23px; font-weight: 600; padding-block: 10px; }
.slug-control {
  display: flex;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.slug-control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.slug-control > span { padding-left: 13px; color: var(--faint); font-family: var(--font-mono); font-size: 11px; }
.slug-control input { flex: 1; min-width: 0; padding: 11px 13px 11px 2px; background: transparent; border: 0; outline: 0; font-family: var(--font-mono); font-size: 11.5px; }

.editor-body-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.editor-tabs { display: inline-flex; padding: 2px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; }
.editor-tabs button {
  padding: 4px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.6;
}
.editor-tabs button.is-active { color: var(--ink); background: var(--surface-raised); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }

.markdown-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1px;
  padding: 6px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}
.markdown-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.markdown-toolbar button:hover { color: var(--accent); background: var(--accent-soft); }
.markdown-editor {
  display: block;
  width: 100%;
  min-height: 480px;
  padding: 20px 22px;
  color: var(--ink);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 0 0 2px 2px;
  outline: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.85;
  resize: vertical;
  tab-size: 2;
}
.markdown-editor:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.markdown-preview { min-height: 480px; padding: 22px 24px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 0 0 2px 2px; font-size: 14px; }
.markdown-preview-empty { color: var(--faint); font-family: var(--font-sans); font-size: 12px; }
.editor-body-foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 9px; color: var(--faint); font-size: 9.5px; }

.editor-side { display: flex; flex-direction: column; gap: 14px; }
.editor-side .admin-panel { padding: 0 20px 20px; }
.editor-side .panel-head { margin: 0 -20px 16px; padding: 16px 20px; }
.field-compact > input,
.field-compact > select { padding: 9px 10px; font-size: 11.5px; }
.field-compact > .field-label { font-size: 10px; }
.check-field { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; cursor: pointer; }
.check-field input { width: 15px; height: 15px; margin-top: 2px; accent-color: var(--accent); }
.check-field span { display: flex; flex-direction: column; gap: 2px; }
.check-field strong { font-size: 10.5px; font-weight: 600; }
.check-field small { color: var(--muted); font-size: 9px; }
.editor-publish-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.editor-publish-actions .text-link { justify-content: center; font-size: 10.5px; }

.cover-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cover-option { display: block; cursor: pointer; }
.cover-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cover-option-visual { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--paper-deep); border: 1px solid var(--line); border-radius: 2px; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.cover-option-visual img { width: 100%; height: 100%; object-fit: cover; }
.cover-check {
  position: absolute;
  top: 5px;
  right: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cover-option input:checked + .cover-option-visual { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cover-option input:checked + .cover-option-visual .cover-check { opacity: 1; transform: scale(1); }
.cover-option input:focus-visible + .cover-option-visual { outline: 2px solid var(--accent); outline-offset: 2px; }
.cover-option-label { display: block; padding-top: 4px; color: var(--muted); font-size: 8.5px; }
.tag-hints { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tag-hint {
  padding: 3px 8px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9.5px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.tag-hint:hover { color: var(--accent); border-color: var(--accent); }
.editor-help ul { padding-left: 1.1em; list-style: disc; color: var(--muted); font-size: 10px; line-height: 1.8; }
.editor-help h2 { font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.06em; }

.admin-scrim {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(18, 16, 12, 0.5);
  backdrop-filter: blur(2px);
}

/* ==========================================================================
   404 / server error
   ========================================================================== */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 62vh;
  padding: 80px 0;
  text-align: center;
}
.not-found-mark {
  margin-bottom: 18px;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: clamp(80px, 14vw, 160px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.06em;
  opacity: 0.18;
}
.not-found h1 { max-width: 620px; margin-bottom: 14px; font-size: clamp(28px, 3.4vw, 38px); }
.not-found > p:not(.eyebrow) { max-width: 520px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.not-found-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.empty-home { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58vh; text-align: center; }
.empty-home h1 { margin-bottom: 12px; font-size: 40px; }
.empty-home p:not(.eyebrow) { margin-bottom: 22px; color: var(--muted); }

/* ==========================================================================
   Motion
   ========================================================================== */

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal { animation: rise 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.post-row:nth-child(2) { animation-delay: 0.05s; }
.post-row:nth-child(3) { animation-delay: 0.1s; }
.post-row:nth-child(4) { animation-delay: 0.15s; }
.post-row:nth-child(5) { animation-delay: 0.2s; }
.archive-card:nth-child(2) { animation-delay: 0.06s; }
.archive-card:nth-child(3) { animation-delay: 0.12s; }
.archive-card:nth-child(4) { animation-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1120px) {
  .hero-inner { gap: 44px; }
  .content-grid { grid-template-columns: minmax(0, 1fr) 290px; gap: 48px; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 210px; gap: 44px; }
  .about-layout { gap: 52px; }
  .admin-content { width: calc(100% - 64px); }
  .admin-topbar { padding-inline: 32px; }
}

@media (max-width: 960px) {
  .container,
  .container-narrow,
  .container-tight,
  .header-inner,
  .hero-inner,
  .footer-inner,
  .footer-bottom { width: calc(100% - 48px); }

  .site-nav { display: none; }
  .nav-menu-button { display: inline-flex; }
  .header-tools { margin-left: auto; }
  .header-desk-link { display: none; }

  .mobile-nav {
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 24px;
    border-top: 1px solid transparent;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease, border-color 0.3s ease;
  }
  .mobile-nav.is-open {
    max-height: 340px;
    opacity: 1;
    padding: 12px 24px 20px;
    border-top-color: var(--line);
    pointer-events: auto;
  }
  .mobile-nav a {
    padding: 11px 4px;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line-soft);
    font-family: var(--font-serif);
    font-size: 16px;
  }
  .mobile-nav a:last-child { border-bottom: 0; }
  .mobile-nav a.is-active { color: var(--accent); }

  .hero-inner { grid-template-columns: 1fr; padding: 58px 0 54px; }
  .hero-copy h1 { max-width: 700px; }
  .featured-card { max-width: 680px; }
  .featured-art { aspect-ratio: 16 / 8.6; }

  .content-grid { grid-template-columns: 1fr; padding-top: 56px; gap: 48px; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 0; }
  .author-card { grid-column: 1 / -1; }
  .reading-card { grid-column: 2; }
  .topics-card { grid-column: 1; grid-row: 2 / span 2; }
  .rss-card { grid-column: 2; grid-row: 3; }

  .archive-grid { gap: 24px; }
  .about-hero { grid-template-columns: 1fr; gap: 44px; padding-top: 58px; text-align: center; }
  .about-portrait { max-width: 280px; }
  .about-hero-copy h1 { font-size: 48px; }
  .about-lede { margin-inline: auto; }
  .about-meta { justify-content: center; }
  .about-layout { grid-template-columns: 1fr; gap: 44px; }

  .article-layout { display: block; max-width: 760px; }
  .article-aside { display: none; }
  .post-footer { width: calc(100% - 48px); }

  .admin-sidebar {
    width: 268px;
    transform: translateX(-102%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.25);
  }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-workspace { margin-left: 0; }
  .admin-menu-button { display: inline-flex; }
  .admin-topbar { padding-inline: 20px; }
  .admin-content { width: calc(100% - 40px); padding-top: 32px; }
  .admin-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
  .admin-side-stack { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .system-card { grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .editor-help { grid-column: 1 / -1; }
  .post-cover { width: calc(100% - 48px); }
  .related-section { width: calc(100% - 48px); }
}

@media (max-width: 720px) {
  .container,
  .container-narrow,
  .container-tight,
  .header-inner,
  .hero-inner,
  .footer-inner,
  .footer-bottom,
  .post-footer,
  .post-cover,
  .related-section { width: calc(100% - 40px); }

  :root { --header-h: 68px; }
  .brand-seal { width: 34px; height: 34px; font-size: 18px; }
  .brand-name { font-size: 17px; }
  .brand-roman { font-size: 7px; }

  .hero-inner { padding: 44px 0 46px; }
  .hero-copy h1 { font-size: 42px; margin-bottom: 20px; }
  .hero-lede { font-size: 15.5px; }
  .hero-actions { margin-bottom: 34px; }
  .hero-stats > div { min-width: 0; flex: 1; padding-right: 14px; margin-right: 14px; }
  .hero-stats dd { font-size: 25px; }
  .featured-info { padding: 20px; }
  .featured-info h2 { font-size: 23px; }

  .content-grid { padding-top: 44px; }
  .section-head { align-items: flex-start; }
  .section-head h2 { font-size: 27px; }
  .section-head > .text-link { display: none; }
  .post-row { grid-template-columns: 34px minmax(0, 1fr); gap: 4px; padding: 24px 0; }
  .post-row-arrow { display: none; }
  .post-row h3 { font-size: 21px; }
  .post-row p { font-size: 13px; }

  .sidebar { grid-template-columns: 1fr; }
  .author-card,
  .topics-card,
  .rss-card,
  .reading-card { grid-column: auto; grid-row: auto; }
  .home-note { margin: 52px 0 60px; padding: 40px 24px; }

  .page-header { padding: 48px 0 28px; }
  .page-header h1 { font-size: 36px; }
  .page-header-mark { display: none; }
  .filter-bar { flex-direction: column; gap: 10px; }
  .filter-label { padding-top: 0; }
  .archive-grid { grid-template-columns: 1fr; }
  .archive-body { padding: 20px; }
  .archive-body h2 { font-size: 22px; }

  .search-form { padding-left: 16px; gap: 10px; border-radius: 14px; }
  .search-form input { font-size: 15px; }
  .search-form .button { min-height: 38px; padding-inline: 16px; font-size: 12px; }

  .post-header { padding-top: 40px; padding-bottom: 28px; }
  .post-header h1 { font-size: 33px; }
  .post-deck { font-size: 14.5px; }
  .post-cover { margin-bottom: 38px; }
  .post-cover img { aspect-ratio: 16 / 10; max-height: none; }
  .prose { font-size: 16.5px; line-height: 1.95; }
  .prose h2 { font-size: 23px; }
  .prose > p:first-of-type::first-letter { font-size: 2.7em; }
  .post-author-box { flex-wrap: wrap; padding: 24px; }
  .post-author-box .button { margin-left: 88px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-item.next { align-items: flex-start; padding: 20px 0; border-left: 0; border-top: 1px solid var(--line); text-align: left; }
  .post-nav-item { padding: 20px 0; }
  .related-section { margin-top: 52px; padding-bottom: 56px; }

  .about-hero { padding-top: 44px; gap: 34px; }
  .about-portrait { max-width: 230px; }
  .portrait-seal { font-size: 58px; }
  .about-hero-copy h1 { font-size: 38px; }
  .about-lede { font-size: 15px; }
  .about-meta { flex-direction: column; align-items: center; gap: 8px; }
  .about-layout { padding-bottom: 60px; }
  .about-prose { font-size: 16px; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 34px; padding: 40px 0 34px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 8px; }

  .auth-shell { padding: 0 20px; }
  .auth-top { padding: 20px 0; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-art { min-height: 230px; padding: 26px; }
  .auth-art-seal { top: 24px; left: 24px; width: 42px; height: 42px; font-size: 21px; }
  .auth-quote { font-size: 25px; }
  .auth-art-note { display: none; }
  .auth-form-panel { padding: 32px 26px 28px; }
  .auth-form-panel h1 { font-size: 28px; }
  .auth-footer { flex-direction: column; gap: 6px; }

  .toast { right: 16px; bottom: 16px; left: 16px; max-width: none; }

  .admin-topbar { min-height: 62px; }
  .admin-topbar-actions .editor-meta,
  .admin-view-site { display: none; }
  .admin-content { width: calc(100% - 32px); padding-bottom: 54px; }
  .admin-heading h1 { font-size: 29px; }
  .admin-side-stack { grid-template-columns: 1fr; }
  .system-card { grid-column: auto; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 17px; }
  .stat-card strong { font-size: 30px; }
  .stat-top { margin-bottom: 16px; }
  .admin-panel .panel-head { padding: 16px 18px; }
  .post-table th, .post-table td { padding-inline: 14px; }
  .editor-panel { padding: 18px; }
  .editor-side { grid-template-columns: 1fr; }
  .field-title input { font-size: 20px; }
  .markdown-editor { min-height: 380px; padding: 16px; }
  .markdown-preview { min-height: 380px; padding: 18px; }
  .editor-heading-actions { width: 100%; }
  .editor-heading-actions .button { flex: 1; }
}

@media (max-width: 440px) {
  .hero-copy h1 { font-size: 36px; }
  .featured-meta { flex-wrap: wrap; }
  .featured-arrow { margin-left: 0; }
  .hero-actions .button { padding-inline: 18px; }
  .post-header h1 { font-size: 29px; }
  .post-meta { gap: 7px; }
  .post-author-box .button { margin-left: 0; width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .cover-picker { grid-template-columns: 1fr 1fr; }
  .admin-topbar-title strong { font-size: 14px; }
  .admin-heading-actions { width: 100%; }
  .auth-form-panel { padding-inline: 20px; }
}

@media print {
  .site-header, .site-footer, .reading-progress, .article-aside, .post-nav, .related-section, .post-footer, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .container, .container-narrow { width: 100%; }
  .article-layout { display: block; }
  .prose { font-size: 11pt; }
  .post-cover img { max-height: 320px; }
}
