:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #1c2420;
  --muted: #5a665f;
  --line: #e4dfd4;
  --accent: #166534;
  --accent-soft: #eaf4ee;
  --head-bg: #ffffff;
  --head-ink: #1c2420;
  --foot-bg: #18221d;
  --foot-ink: #f3f5f1;
  --radius: 12px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.68 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1 0 auto;
  min-width: 0;
  padding-bottom: 64px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }
.shell { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--head-bg);
  color: var(--head-ink);
  border-bottom: 1px solid var(--line);
}
.head-row {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: var(--head-ink);
  flex-shrink: 0;
}
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  font-weight: 650;
}
.site-nav a { opacity: 0.88; transition: opacity .15s, color .15s; }
.site-nav a:hover { opacity: 1; color: var(--accent); }
.head-search {
  display: flex;
  align-items: center;
  border: 1px solid rgba(148,163,184,.38);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.head-search input {
  width: 165px;
  border: 0;
  padding: 7px 11px;
  font-size: 0.88rem;
  color: var(--ink);
  background: transparent;
  outline: none;
}
.head-search button {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 7px 13px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.menu-btn {
  display: none;
  border: 1px solid rgba(148,163,184,.4);
  background: transparent;
  color: var(--head-ink);
  border-radius: 6px;
  padding: 6px 11px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 16px 0 14px;
  max-width: 820px;
}
.hero p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 680px;
  margin: 0;
}

.cat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 28px 0 12px;
}
.cat-pill {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color .15s, transform .15s;
}
.cat-pill:hover { border-color: var(--accent); transform: translateY(-1px); }
.cat-pill b { display: block; font-size: 0.98rem; margin-bottom: 4px; color: var(--ink); }
.cat-pill span { display: block; font-size: 0.83rem; color: var(--muted); line-height: 1.45; }

.section-block { padding: 36px 0 12px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 24px;
}
.section-head h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.45rem;
  margin: 0;
}
.section-head a { color: var(--accent); font-size: 0.88rem; font-weight: 700; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--line);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-cat {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}
.card-body h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.12rem;
  line-height: 1.32;
  margin: 0 0 9px;
}
.card-body h3 a:hover { color: var(--accent); }
.card-body p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 14px;
  flex: 1;
}
.card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.page-head { padding: 48px 0 24px; }
.page-head h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  line-height: 1.16;
  margin: 12px 0 10px;
}
.page-head p { color: var(--muted); max-width: 700px; font-size: 1.02rem; margin: 0; }

.article-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 24px;
}
.article-wrap h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.8rem, 3.6vw, 2.55rem);
  line-height: 1.2;
  margin: 12px 0 14px;
}
.article-dek {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 0 18px;
}
.byline-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
  margin-bottom: 24px;
  font-size: 0.86rem;
}
.avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.88rem;
  flex-shrink: 0;
}
.article-hero {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 28px;
  aspect-ratio: 16 / 9;
  background: var(--line);
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-content h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.38rem;
  line-height: 1.3;
  margin: 1.8em 0 0.6em;
  color: var(--ink);
}
.article-content p { margin: 0 0 1.1em; color: var(--ink); }
.article-content ul, .article-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.article-content li { margin: 0.4em 0; }
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0 1.4em;
  font-size: 0.92rem;
  background: var(--surface);
  display: block;
  overflow-x: auto;
}
.article-content th, .article-content td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.article-content th { background: var(--accent-soft); color: var(--ink); font-weight: 700; }

.author-box {
  margin-top: 38px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.author-box h3 { margin: 0 0 2px; font-size: 1rem; }
.author-box .role { color: var(--accent); font-size: 0.82rem; font-weight: 700; margin: 0 0 6px; }
.author-box p { margin: 0; font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.author-box .byline-note { margin-top: 8px; font-size: 0.78rem; opacity: 0.9; }

.prose { max-width: 780px; padding-bottom: 32px; }
.prose h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 1.35rem; margin: 1.7em 0 0.55em; }
.prose h3 { font-size: 1.1rem; margin: 1.3em 0 0.45em; }
.prose p, .prose li { line-height: 1.7; }
.privacy-policy a { color: var(--accent); text-decoration: underline; }
.privacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.privacy-actions button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 9px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}
.privacy-actions button + button {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.privacy-actions p { flex-basis: 100%; margin: 4px 0 0; font-size: 0.84rem; color: var(--muted); }

.search-panel {
  display: flex;
  gap: 8px;
  max-width: 580px;
  margin: 20px 0 28px;
}
.search-panel input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
.search-panel button {
  padding: 11px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

footer {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  background: var(--foot-bg);
  color: var(--foot-ink);
  border-top: 1px solid var(--line);
  padding: 44px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.footer-grid h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 12px;
  opacity: 0.85;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; }
.footer-links a { opacity: 0.8; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
.footer-desc { font-size: 0.9rem; opacity: 0.78; max-width: 420px; margin: 10px 0 0; }
.legal-bar {
  border-top: 1px solid rgba(255,255,255,.14);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 0.8rem;
  opacity: 0.7;
}

@media (max-width: 920px) {
  .cat-strip { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 70px;
    background: var(--head-bg);
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .menu-btn { display: inline-block; }
}
@media (max-width: 620px) {
  .shell { width: calc(100% - 28px); }
  .head-search { display: none; }
  .cat-strip, .card-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 38px 0 28px; }
  .author-box { flex-direction: column; }
}
