:root {
  --bg: #0b1016;
  --bg-deep: #070b10;
  --bg-soft: rgba(16, 23, 31, 0.82);
  --panel: rgba(17, 24, 34, 0.8);
  --panel-strong: rgba(19, 27, 38, 0.92);
  --panel-muted: rgba(14, 20, 29, 0.72);
  --line: rgba(204, 178, 136, 0.16);
  --line-strong: rgba(204, 178, 136, 0.28);
  --text: #ece3d3;
  --text-soft: #d9cfbf;
  --text-muted: #ab9f91;
  --accent: #dfb36f;
  --accent-strong: #f2ca8e;
  --accent-soft: rgba(223, 179, 111, 0.14);
  --success: #94b891;
  --shadow-soft: 0 20px 52px rgba(0, 0, 0, 0.24);
  --shadow-card: 0 16px 36px rgba(0, 0, 0, 0.2);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --space-1: 0.4rem;
  --space-2: 0.7rem;
  --space-3: 1rem;
  --space-4: 1.4rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --font-body: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", "Consolas", monospace;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(70vw 52vw at 14% -8%, rgba(54, 76, 102, 0.38) 0%, transparent 62%),
    radial-gradient(44vw 34vw at 100% 0%, rgba(103, 64, 34, 0.26) 0%, transparent 64%),
    linear-gradient(180deg, #0b1016 0%, #090d13 42%, #070b10 100%);
  line-height: 1.78;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::selection,
body *::selection {
  background: rgba(223, 179, 111, 0.22);
  color: #fff7ea;
}

.site-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.atmosphere-orb {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.7;
}

.atmosphere-orb-left {
  width: 26rem;
  height: 26rem;
  top: 3rem;
  left: -8rem;
  background: radial-gradient(circle, rgba(78, 105, 138, 0.2) 0%, transparent 70%);
}

.atmosphere-orb-right {
  width: 24rem;
  height: 24rem;
  top: 8rem;
  right: -7rem;
  background: radial-gradient(circle, rgba(141, 92, 48, 0.18) 0%, transparent 72%);
}

.atmosphere-grid {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 110px 110px;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 86%);
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.16em;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(204, 178, 136, 0.12);
  background: linear-gradient(180deg, rgba(7, 11, 16, 0.9), rgba(7, 11, 16, 0.76));
  backdrop-filter: blur(16px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.22rem;
  text-decoration: none;
}

.brand-mark {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-title {
  color: #f8f1e3;
  font-family: var(--font-display);
  font-size: 1.28rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.brand:hover .brand-title {
  color: #fff8ec;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  padding: 0.4rem 0.78rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  border-color: rgba(204, 178, 136, 0.18);
  background: rgba(223, 179, 111, 0.07);
}

.main-nav a:hover {
  transform: translateY(-1px);
}

.content {
  padding: 2.6rem 0 4.2rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.8rem;
  color: #f6efe2;
  font-family: var(--font-display);
  line-height: 1.18;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

h3 {
  font-size: clamp(1.18rem, 2vw, 1.5rem);
}

p,
li {
  color: var(--text-soft);
}

strong {
  color: #fff4df;
  font-weight: 650;
}

code,
pre {
  font-family: var(--font-mono);
}

.section-kicker {
  margin: 0 0 0.9rem;
  color: var(--accent-strong);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-panel,
.home-panel,
.post,
.tags-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(18, 25, 35, 0.94), rgba(12, 18, 26, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 26%);
  box-shadow: var(--shadow-soft);
}

.page-panel::before,
.home-panel::before,
.post::before,
.tags-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 236, 207, 0.18), transparent);
}

.home-panel,
.page-panel,
.tags-panel {
  padding: clamp(1.35rem, 2.5vw, 2rem);
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.72rem 1.1rem;
  border: 1px solid rgba(223, 179, 111, 0.2);
  border-radius: 999px;
  background: rgba(223, 179, 111, 0.08);
  color: #fbe9cb;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.action-link:hover {
  transform: translateY(-1px);
  border-color: rgba(223, 179, 111, 0.34);
  background: rgba(223, 179, 111, 0.14);
}

.action-link-muted {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.92fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: stretch;
}

.home-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.home-hero-title {
  max-width: 10.8em;
  margin-bottom: 1rem;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
}

.home-hero-intro {
  max-width: 40rem;
  margin: 0;
  color: #ded4c5;
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  line-height: 1.88;
}

.home-hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.home-hero-aside {
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(204, 178, 136, 0.12);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(20, 27, 38, 0.82), rgba(14, 20, 28, 0.6));
}

.issue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.issue-list li {
  display: grid;
  gap: 0.26rem;
  padding-bottom: 0.94rem;
  border-bottom: 1px solid rgba(204, 178, 136, 0.08);
}

.issue-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.issue-list strong {
  display: block;
  font-size: 0.98rem;
}

.issue-list span {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.7;
}

.home-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(290px, 0.9fr);
  gap: clamp(1.2rem, 2.8vw, 2rem);
  margin-top: 1.6rem;
}

.home-featured-main,
.home-featured-side {
  display: grid;
  gap: 0.9rem;
}

.featured-story {
  position: relative;
  min-height: 100%;
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  border: 1px solid rgba(204, 178, 136, 0.13);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(27, 35, 47, 0.92), rgba(15, 20, 28, 0.84)),
    radial-gradient(circle at top right, rgba(223, 179, 111, 0.12), transparent 34%);
}

.featured-story::after {
  content: "";
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  bottom: 1rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(223, 179, 111, 0.42), transparent);
}

.featured-kicker {
  margin: 0 0 0.5rem;
  color: var(--accent-strong);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

.featured-title {
  margin-bottom: 0.8rem;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.featured-title a {
  color: #fff8ed;
  text-decoration: none;
}

.featured-meta,
.series-meta,
.home-section-desc,
.status-label,
.tags-summary,
.post-related-tip,
.post-meta,
.post-series,
.site-footer small {
  color: var(--text-muted);
}

.featured-meta {
  margin: 0;
  font-size: 0.92rem;
}

.meta-sep {
  margin: 0 0.35rem;
  color: rgba(204, 178, 136, 0.48);
}

.featured-desc {
  max-width: 38rem;
  margin: 1rem 0 0;
  font-size: 1.03rem;
  line-height: 1.86;
}

.featured-tags {
  margin: 1.1rem 0 0;
}

.home-editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.6rem;
  margin-top: 1.6rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.home-section-title,
.home-feed-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
}

.home-section-desc {
  max-width: 18rem;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.72;
  text-align: right;
}

.series-grid {
  display: grid;
  gap: 0.92rem;
}

.series-card {
  padding: 1rem 1.08rem 1.06rem;
  border-top: 1px solid rgba(223, 179, 111, 0.32);
  border-right: 1px solid rgba(204, 178, 136, 0.12);
  border-bottom: 1px solid rgba(204, 178, 136, 0.12);
  border-left: 1px solid rgba(204, 178, 136, 0.12);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(22, 30, 40, 0.78), rgba(14, 19, 26, 0.64));
  transition: transform 180ms ease, border-color 180ms ease;
}

.series-card:hover {
  transform: translateY(-1px);
  border-color: rgba(223, 179, 111, 0.22);
}

.series-kicker {
  margin: 0 0 0.36rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.series-title {
  margin: 0;
  font-size: 1.2rem;
}

.series-title a {
  color: #f7efe2;
  text-decoration: none;
}

.series-meta {
  margin: 0.56rem 0 0;
  font-size: 0.88rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.92rem;
}

.post-item {
  padding: 1rem 1.08rem 1.04rem;
  border: 1px solid rgba(204, 178, 136, 0.12);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(18, 25, 35, 0.84), rgba(12, 18, 26, 0.74));
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.post-item:hover {
  transform: translateY(-1px);
  border-color: rgba(223, 179, 111, 0.22);
  background: linear-gradient(180deg, rgba(20, 28, 39, 0.9), rgba(13, 19, 27, 0.8));
}

.post-kicker {
  margin: 0 0 0.42rem;
  color: var(--accent-strong);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.post-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.post-link {
  color: #f6edde;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.28rem;
  line-height: 1.28;
}

.post-cta {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-times {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.58rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.post-desc {
  margin: 0.72rem 0 0;
  font-size: 0.96rem;
  line-height: 1.78;
}

.post-tags {
  margin: 0.82rem 0 0;
}

.home-hot-list .post-item,
.archive-list .post-item {
  padding-block: 0.92rem;
}

.home-more {
  margin: 1.2rem 0 0;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.status-item {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(204, 178, 136, 0.1);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(20, 27, 37, 0.7), rgba(12, 18, 25, 0.6));
}

.status-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-value {
  display: block;
  margin-top: 0.36rem;
  color: #f8efdf;
  font-size: 1rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  margin: 0 0.42rem 0.42rem 0;
  padding: 0.28rem 0.72rem;
  border: 1px solid rgba(223, 179, 111, 0.18);
  border-radius: 999px;
  background: rgba(223, 179, 111, 0.06);
  color: #ead8be;
  text-decoration: none;
  font-size: 0.84rem;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.tag-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(223, 179, 111, 0.28);
  background: rgba(223, 179, 111, 0.12);
}

.tag-count {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.page-hero {
  margin-bottom: 1.3rem;
}

.page-hero h1 {
  max-width: 11.2em;
  margin-bottom: 0.8rem;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.page-intro {
  max-width: 44rem;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.86;
}

.tag-cloud {
  margin: 0.9rem 0 0;
}

.tag-section {
  margin-top: 1.25rem;
}

.tag-section h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.tag-section h2 small {
  color: var(--text-muted);
  font-size: 0.64em;
}

.tag-section h2::before {
  content: "";
  width: 0.52rem;
  height: 1.2rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(242, 202, 142, 0.92), rgba(164, 117, 64, 0.8));
}

.prose-panel p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.88;
}

.prose-panel p + p {
  margin-top: 1rem;
}

.layout-post .content {
  width: min(1240px, calc(100vw - 36px));
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.reading-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #dba75c, #f4d8ab);
  box-shadow: 0 0 12px rgba(223, 179, 111, 0.4);
}

.post {
  --post-main-width: 720px;
  --post-toc-width: 250px;
  --post-grid-gap: clamp(1.4rem, 2.6vw, 2.4rem);
  padding: clamp(1.35rem, 3vw, 2.2rem);
  border-radius: 32px;
}

.post-grid {
  display: grid;
  gap: 1.2rem;
  justify-content: center;
  grid-template-areas:
    "header"
    "toc"
    "content"
    "related";
}

.post-grid.has-toc {
  grid-template-areas:
    "header"
    "toc"
    "content"
    "related";
}

.post-header,
.post-content,
.post-related,
.post-toc {
  width: min(var(--post-main-width), 100%);
  margin: 0 auto;
}

.post-header {
  grid-area: header;
}

.post-content {
  grid-area: content;
}

.post-related {
  grid-area: related;
}

.post-toc {
  grid-area: toc;
}

.post-header-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.post-cover-kicker,
.post-series {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.post-cover-kicker {
  color: var(--accent-strong);
}

.post-cover {
  position: relative;
  padding: clamp(1.3rem, 2.5vw, 1.9rem);
  border: 1px solid rgba(204, 178, 136, 0.13);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(27, 37, 49, 0.82), rgba(15, 21, 30, 0.72)),
    radial-gradient(circle at top right, rgba(223, 179, 111, 0.14), transparent 34%);
}

.post-cover::after {
  content: "";
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 1.1rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(223, 179, 111, 0.36), transparent 88%);
}

.post-cover h1 {
  max-width: 11em;
  margin-bottom: 0.8rem;
  font-size: clamp(2.3rem, 5vw, 4.3rem);
}

.post-summary {
  max-width: 39rem;
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.88;
}

.post-meta-panel {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.95rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  padding: 0.38rem 0.8rem;
  border: 1px solid rgba(204, 178, 136, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.86rem;
}

.post-meta-tags {
  margin: 0;
}

.post-toc {
  align-self: start;
}

.post-toc-toggle {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(204, 178, 136, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  color: #f6ecda;
  cursor: pointer;
}

.post-toc-toggle::after {
  content: "▾";
  color: var(--accent-strong);
  transition: transform 180ms ease;
}

.post-toc-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.post-toc-shell {
  display: none;
  margin-top: 0.8rem;
  padding: 0.95rem 1rem 1rem;
  border: 1px solid rgba(204, 178, 136, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18, 25, 34, 0.88), rgba(11, 16, 24, 0.84));
}

.post-toc.is-open .post-toc-shell {
  display: block;
}

.post-toc-title {
  margin: 0 0 0.7rem;
  color: var(--accent-strong);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.post-toc-nav {
  display: grid;
  gap: 0.32rem;
}

.post-toc-nav::-webkit-scrollbar {
  width: 8px;
}

.post-toc-nav::-webkit-scrollbar-thumb {
  background: rgba(223, 179, 111, 0.24);
  border-radius: 999px;
}

.toc-link {
  display: block;
  padding: 0.1rem 0 0.1rem 0.7rem;
  border-left: 2px solid transparent;
  color: #cbbfad;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.55;
  transition: color 180ms ease, border-color 180ms ease;
}

.toc-link:hover,
.toc-link.active {
  color: #fff1dc;
  border-left-color: rgba(223, 179, 111, 0.64);
}

.toc-h3 {
  margin-left: 0.9rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.post-content {
  color: #e5dccf;
  font-size: 1.06rem;
  line-height: 1.95;
}

.post-content > :first-child {
  margin-top: 0;
}

.post-content p {
  margin: 1rem 0;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  position: relative;
  scroll-margin-top: 6rem;
}

.post-content h2 {
  margin-top: 2.9rem;
  margin-bottom: 1rem;
  padding-top: 0.2rem;
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
}

.post-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: -0.85rem;
  width: 4.5rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(223, 179, 111, 0.56), transparent);
}

.post-content h3 {
  margin-top: 2.1rem;
  margin-bottom: 0.8rem;
  font-size: clamp(1.24rem, 2vw, 1.66rem);
}

.post-content h4 {
  margin-top: 1.6rem;
  margin-bottom: 0.7rem;
  font-size: 1.12rem;
}

.post-content ul,
.post-content ol {
  margin: 0.9rem 0 1.2rem;
  padding-left: 1.5rem;
}

.post-content li + li {
  margin-top: 0.4rem;
}

.post-content a {
  color: #f1c98c;
}

.post-content img {
  margin: 1.4rem auto;
  border: 1px solid rgba(204, 178, 136, 0.16);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}

.post-content hr {
  height: 1px;
  margin: 2rem 0;
  border: 0;
  background: linear-gradient(90deg, rgba(223, 179, 111, 0.26), transparent 84%);
}

.post-content blockquote {
  margin: 1.3rem 0;
  padding: 1rem 1.15rem 1rem 1.2rem;
  border: 1px solid rgba(223, 179, 111, 0.12);
  border-left: 3px solid rgba(223, 179, 111, 0.56);
  border-radius: 18px;
  background: rgba(223, 179, 111, 0.08);
}

.post-content blockquote > :first-child {
  margin-top: 0;
}

.post-content blockquote > :last-child {
  margin-bottom: 0;
}

.post-content code {
  padding: 0.08rem 0.38rem;
  border-radius: 6px;
  background: rgba(223, 179, 111, 0.12);
  color: #ffe8c5;
  font-size: 0.88em;
}

.post-content pre {
  position: relative;
  overflow-x: auto;
  margin: 1.2rem 0 1.35rem;
  padding: 2rem 1rem 1rem;
  border: 1px solid rgba(223, 179, 111, 0.16);
  border-radius: 20px;
  background: linear-gradient(180deg, #121925, #0d131d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), var(--shadow-card);
}

.post-content pre::before {
  content: "CODE";
  position: absolute;
  top: 0.7rem;
  left: 0.95rem;
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}

.post-content pre code {
  display: block;
  padding: 0;
  background: transparent;
  color: #f2e5d0;
  font-size: 0.9rem;
  line-height: 1.68;
}

.post-content table {
  width: 100%;
  margin: 1.2rem 0;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid rgba(204, 178, 136, 0.12);
  border-radius: 16px;
}

.post-content th,
.post-content td {
  padding: 0.72rem 0.82rem;
  border-bottom: 1px solid rgba(204, 178, 136, 0.1);
  text-align: left;
}

.post-content th {
  color: #fff1db;
  background: rgba(223, 179, 111, 0.08);
}

.post-related {
  padding-top: 1.15rem;
  border-top: 1px solid rgba(204, 178, 136, 0.12);
}

.post-related h2 {
  margin-bottom: 0.46rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.post-related-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.78rem;
}

.post-related-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(204, 178, 136, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.post-related-item a {
  display: inline-block;
  color: #f4ead9;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.post-related-item p {
  margin: 0.36rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.72;
}

.post-related-item span {
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.site-footer {
  border-top: 1px solid rgba(204, 178, 136, 0.12);
}

.site-footer-inner {
  padding: 1.4rem 0 1.9rem;
}

.site-footer-title {
  margin: 0 0 0.4rem;
  color: #f0e5d5;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.site-footer small {
  font-size: 0.88rem;
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-hero,
.home-featured,
.home-editorial-grid,
.page-hero,
.post {
  animation: fade-rise 540ms ease both;
}

@media (min-width: 1080px) {
  .post-grid.has-toc {
    grid-template-columns: minmax(0, var(--post-main-width)) minmax(0, var(--post-toc-width));
    grid-template-areas:
      "header header"
      "content toc"
      "related toc";
    column-gap: var(--post-grid-gap);
    row-gap: 1.45rem;
    align-items: start;
  }

  .post-grid.has-toc .post-header,
  .post-grid.has-toc .post-content,
  .post-grid.has-toc .post-related,
  .post-grid.has-toc .post-toc {
    width: 100%;
    margin: 0;
  }

  .post-grid.has-toc .post-toc {
    position: sticky;
    top: 5.5rem;
  }

  .post-toc-toggle {
    display: none;
  }

  .post-toc-shell {
    display: block;
    margin-top: 0;
  }

  .post-toc-nav {
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
    padding-right: 0.3rem;
  }
}

@media (max-width: 980px) {
  .container,
  .layout-post .content {
    width: min(1160px, calc(100vw - 32px));
  }

  .home-hero,
  .home-featured,
  .home-editorial-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-section-desc {
    max-width: none;
    text-align: left;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    line-height: 1.72;
  }

  .container,
  .layout-post .content {
    width: calc(100vw - 24px);
  }

  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.88rem 0;
  }

  .brand-title {
    font-size: 1.1rem;
  }

  .main-nav a {
    padding: 0.34rem 0.64rem;
    font-size: 0.84rem;
  }

  .content {
    padding: 1.5rem 0 3rem;
  }

  .home-panel,
  .page-panel,
  .tags-panel,
  .post {
    border-radius: 24px;
    padding: 1.1rem;
  }

  .home-hero-title,
  .post-cover h1,
  .page-hero h1 {
    max-width: none;
  }

  .post-heading {
    flex-direction: column;
    gap: 0.45rem;
  }

  .post-link {
    font-size: 1.12rem;
  }

  .post-content {
    font-size: 1rem;
    line-height: 1.88;
  }

  .post-content h2 {
    margin-top: 2.4rem;
  }

  .post-related-item {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .home-hero-actions,
  .page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .action-link {
    justify-content: center;
  }

  .post-header-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-meta {
    gap: 0.5rem;
  }

  .meta-pill {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
