:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --paper: #fffdf8;
  --ink: #1c2421;
  --muted: #66716b;
  --line: #ded7ca;
  --accent: #12685f;
  --accent-strong: #0d4d47;
  --gold: #a76f1b;
  --blue: #315c9c;
  --shadow: 0 18px 50px rgba(37, 32, 25, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(247, 244, 239, 0.96)),
    repeating-linear-gradient(90deg, rgba(18, 104, 95, 0.05) 0 1px, transparent 1px 92px);
  color: var(--ink);
  font-family: "Inter", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
.site-footer,
main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.top-nav {
  display: flex;
  gap: 8px;
}

.top-nav a {
  border: 1px solid transparent;
  color: var(--muted);
  padding: 8px 12px;
}

.top-nav a:hover {
  border-color: var(--line);
  color: var(--accent-strong);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 42px;
  min-height: 430px;
  align-items: center;
  padding: 54px 0 42px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  font-weight: 700;
}

.hero p:not(.eyebrow) {
  max-width: 690px;
  color: var(--muted);
  font-size: 18px;
  margin: 24px 0 0;
}

.signal-panel {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
  padding: 12px;
}

.signal-panel div {
  border-bottom: 1px solid var(--line);
  padding: 18px 16px;
}

.signal-panel div:last-child {
  border-bottom: 0;
}

.signal-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.signal-panel strong {
  font-size: 18px;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 46px 0 18px;
}

.toolbar h2,
.about-band h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 34px;
  line-height: 1.15;
}

.search-box {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  min-width: min(320px, 100%);
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 104, 95, 0.12);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.tag-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  min-height: 36px;
  padding: 7px 12px;
}

.tag-button:hover,
.tag-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 56px;
}

.post-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 22px;
}

.post-card:hover {
  border-color: rgba(18, 104, 95, 0.45);
  box-shadow: var(--shadow);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}

.post-card h3 {
  margin: 18px 0 12px;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 24px;
  line-height: 1.22;
}

.post-card h3 a:hover,
.read-link:hover,
.back-link:hover {
  color: var(--accent-strong);
}

.post-card p {
  color: var(--muted);
  margin: 0;
}

.card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 22px;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-tags span {
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  padding: 3px 8px;
}

.read-link,
.back-link {
  color: var(--accent);
  font-weight: 700;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  margin: 0;
  padding: 28px;
}

.about-band {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  border-top: 1px solid var(--line);
  padding: 44px 0 58px;
}

.about-band p:last-child {
  color: var(--muted);
  font-size: 17px;
  margin: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding: 24px 0 32px;
}

.article-shell {
  max-width: 880px;
  padding-top: 24px;
}

.back-link {
  display: inline-block;
  margin-bottom: 28px;
}

.article {
  border-top: 1px solid var(--line);
  padding: 36px 0 64px;
}

.article-header {
  margin-bottom: 34px;
}

.article-header h1 {
  margin: 14px 0 16px;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(34px, 7vw, 58px);
  line-height: 1.12;
}

.article-header p {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 18px;
}

.article-body {
  max-width: 760px;
  font-size: 18px;
}

.article-body h2 {
  margin: 34px 0 10px;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 28px;
  line-height: 1.2;
}

.article-body p {
  margin: 16px 0;
}

.article-body code {
  background: #ece6da;
  color: #21413d;
  font-size: 0.92em;
  padding: 2px 5px;
}

.article-body pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #262b28;
  color: #f7f4ef;
  padding: 16px;
}

.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-body blockquote {
  margin: 22px 0;
  border-left: 3px solid var(--accent);
  background: rgba(18, 104, 95, 0.07);
  color: #29443f;
  padding: 14px 18px;
}

@media (max-width: 860px) {
  .hero,
  .about-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    gap: 28px;
    padding: 40px 0;
  }

  .signal-panel {
    max-width: 520px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .post-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header,
  .site-footer,
  main {
    width: min(100% - 24px, 1120px);
  }

  .top-nav {
    width: 100%;
  }

  .top-nav a {
    padding-left: 0;
  }

  .hero h1 {
    font-size: 40px;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .post-card {
    min-height: 0;
  }
}
