:root {
  --paper: #f4f0ea;
  --surface: #fbf8f3;
  --surface-2: #f7f2ec;
  --ink: #171513;
  --muted: #675f58;
  --line: #c7bcb0;
  --accent: #d74f2a;
  --accent-soft: #efe1d7;
  --accent-dark: #7c311f;
  --shadow: 0 18px 44px rgba(39, 31, 22, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.65 system-ui, "PingFang SC", sans-serif;
  background-image:
    linear-gradient(rgba(23, 21, 19, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 21, 19, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(244, 240, 234, 0.92);
  border-bottom: 1px solid rgba(199, 188, 176, 0.9);
}

.topbar-inner,
.page {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  font: 700 16px/1 Georgia, serif;
  letter-spacing: 0.06em;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 11px 15px;
  text-decoration: none;
  color: #5e574f;
  border: 1px solid transparent;
  transition: 0.22s ease;
}

.nav a:hover,
.nav a:focus-visible {
  border-color: var(--line);
  outline: none;
}

.nav .active {
  background: #2b4553;
  border-color: #2b4553;
  color: #fff;
}

.page {
  padding: 64px 0 96px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font:
    11px/1 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: 36px;
  align-items: end;
}

.hero h1 {
  margin: 16px 0 18px;
  font:
    700 clamp(52px, 6vw, 92px) / 0.95 Georgia,
    "Songti SC",
    serif;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero p {
  margin: 0;
  max-width: 58ch;
  color: #564f48;
  font-size: 17px;
  line-height: 1.8;
}

.hero-panel {
  padding: 28px;
  background: linear-gradient(180deg, #f9f5ef, #f1ebe4);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  margin: 0 0 14px;
  font:
    700 24px/1.12 Georgia,
    "Songti SC",
    serif;
}

.hero-panel p {
  font-size: 14px;
  line-height: 1.75;
  color: #5f5750;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.stat {
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stat b {
  display: block;
  font:
    700 34px/1 Georgia,
    serif;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section {
  margin-top: 74px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 14px 0 0;
  font:
    700 clamp(34px, 4vw, 58px) / 1.02 Georgia,
    "Songti SC",
    serif;
  letter-spacing: -0.045em;
}

.section-head p {
  margin: 0;
  color: #5f5750;
}

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

.issue-card {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 0;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.issue-card:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 0 #d7cf21;
}

.issue-card:focus-visible {
  outline: 3px solid #d7cf21;
  outline-offset: 3px;
}

.issue-cover {
  min-height: 320px;
  background: #ece3da;
}

.issue-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.issue-body {
  padding: 24px;
}

.issue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: #625a53;
  font:
    10px/1 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pill.active {
  background: #2b4553;
  border-color: #2b4553;
  color: #fff;
}

.issue-body h3 {
  margin: 0 0 12px;
  font:
    700 30px/1.08 Georgia,
    "Songti SC",
    serif;
}

.issue-body p {
  margin: 0;
  color: #5f5750;
  font-size: 14px;
  line-height: 1.8;
}

.issue-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.issue-tags span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  color: #645c55;
  font-size: 12px;
}

.issue-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(199, 188, 176, 0.8);
  font-weight: 700;
}

.issue-foot small {
  color: #746b63;
  font-size: 12px;
}

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

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

.method-card h3 {
  margin: 0 0 12px;
  font:
    700 24px/1.14 Georgia,
    "Songti SC",
    serif;
}

.method-card p {
  margin: 0;
  color: #5f5750;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.detail-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.detail-header h1 {
  margin: 16px 0 18px;
  font:
    700 clamp(46px, 5vw, 76px) / 0.96 Georgia,
    "Songti SC",
    serif;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.detail-header p {
  max-width: 64ch;
  margin: 0;
  color: #59514a;
  font-size: 17px;
  line-height: 1.85;
}

.detail-side {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 16px;
}

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

.side-card h2 {
  margin: 0 0 12px;
  font:
    700 22px/1.15 Georgia,
    "Songti SC",
    serif;
}

.side-list,
.source-list,
.section-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-list li,
.source-list li {
  padding: 10px 0;
  border-top: 1px solid rgba(199, 188, 176, 0.65);
}

.side-list li:first-child,
.source-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.source-list a {
  text-decoration: none;
  color: #284e6b;
}

.source-list a:hover {
  text-decoration: underline;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.gallery button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.gallery figure {
  margin: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery figcaption {
  margin-top: 12px;
  color: #5d554e;
  font-size: 13px;
}

.detail-sections {
  display: grid;
  gap: 22px;
  margin-top: 30px;
}

.detail-section {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-section h2 {
  margin: 14px 0 14px;
  font:
    700 32px/1.08 Georgia,
    "Songti SC",
    serif;
}

.detail-section p {
  margin: 0;
  color: #59514a;
  line-height: 1.85;
}

.detail-section ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: #4e4640;
}

.detail-section li + li {
  margin-top: 10px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #5e574f;
  text-decoration: none;
  font-weight: 700;
}

.back-link:hover {
  color: var(--accent-dark);
}

.note {
  margin-top: 30px;
  padding-top: 18px;
  color: #71695f;
  border-top: 1px solid #b7afa4;
  font-size: 12px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(13, 12, 11, 0.84);
}

.lightbox.open {
  display: grid;
}

.lightbox-dialog {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100dvh - 48px);
  padding: 20px;
  background: #131212;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.lightbox-dialog img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 132px);
  object-fit: contain;
  background: #1d1d1d;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(19, 18, 18, 0.92);
  color: #fff;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .hero,
  .section-head,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

  .issues-grid,
  .method-grid,
  .gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar-inner,
  .page {
    width: calc(100% - 32px);
  }

  .topbar-inner {
    min-height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .brand {
    display: none;
  }

  .nav {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  .page {
    padding: 52px 0 74px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

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

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