:root {
  --bg: #FAF8F3;
  --panel: #F2EEE5;
  --ink: #1C1C1A;
  --muted: #5C5850;
  --line: #E3DDD1;
  --green: #12b25a;
  --green-ink: #0B7A3E;
  --green-soft: #E3F2E8;
  --display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --text: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --wrap: 1140px;
  --read: 740px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--ink); color: var(--bg); padding: 8px 14px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 78px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; }
.logo-mark { width: 14px; height: 14px; background: var(--green); border-radius: 2px; flex: none; }
.main-nav { display: flex; gap: 28px; font-size: 1rem; }
.main-nav a { color: var(--muted); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--green); }

/* Shared bits */
.cat { color: var(--green-ink); font-size: 0.92rem; text-decoration: none; }
.cat:hover { text-decoration: underline; text-underline-offset: 3px; }
.meta { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; font-size: 0.9rem; color: var(--muted); }
.hero-media, .card-media { text-decoration: none; }
.placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; font-family: var(--display); font-size: 1.7rem; color: var(--green-ink); }

/* Home: featured big rectangle */
.hero { padding: 44px 0 52px; border-bottom: 1px solid var(--line); }
.hero-media { display: block; aspect-ratio: 21 / 9; overflow: hidden; border-radius: 3px; background: var(--green-soft); border-bottom: 6px solid var(--green); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-text { max-width: 860px; margin-top: 28px; }
.hero-title { font-family: var(--display); font-weight: 400; font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.1; letter-spacing: -0.018em; margin: 6px 0 16px; }
.hero-title a, .card-title a { text-decoration: none; }
.hero-title a:hover, .card-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.14em; }
.hero-excerpt { font-size: 1.18rem; color: var(--muted); max-width: 680px; margin: 0 0 16px; }

/* Card grid */
.section-head { padding: 44px 0 0; }
.section-head h2 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 44px; padding: 28px 0 64px; }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 3px; background: var(--green-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding-top: 18px; }
.card-title { font-family: var(--display); font-weight: 400; font-size: 1.7rem; line-height: 1.2; letter-spacing: -0.01em; margin: 4px 0 10px; }
.card-excerpt { color: var(--muted); font-size: 1.02rem; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Section, keyword and search pages */
.page-head { padding: 56px 0 30px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.3rem, 5vw, 3.7rem); line-height: 1.08; letter-spacing: -0.018em; margin: 0 0 10px; }
.page-head p { color: var(--muted); font-size: 1.12rem; max-width: 620px; margin: 0; }
.page-head .page-kicker { color: var(--green-ink); font-size: 0.95rem; margin-bottom: 4px; }
.search-form { display: flex; gap: 10px; max-width: 620px; margin-top: 18px; }
.search-form input { flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); }
.search-form button, .copy-link { font: inherit; font-size: 1rem; padding: 12px 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); border-radius: 3px; cursor: pointer; }
.result-count { color: var(--muted); padding-top: 28px; margin: 0; }
.empty { padding: 80px 0; max-width: 620px; }
.empty h1 { font-family: var(--display); font-weight: 400; font-size: 2.4rem; line-height: 1.15; margin: 0 0 12px; }
.empty p { color: var(--muted); }
.empty a { color: var(--green-ink); }

/* Pagination */
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0 72px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.pagination a { color: var(--ink); }

/* Article */
.preview-bar { margin: 0; padding: 10px 24px; background: var(--green-soft); color: var(--green-ink); text-align: center; font-size: 0.95rem; }
.article-head { max-width: var(--read); margin: 0 auto; padding: 60px 24px 34px; }
.article-title { font-family: var(--display); font-weight: 400; font-size: clamp(2.3rem, 5.2vw, 3.7rem); line-height: 1.08; letter-spacing: -0.02em; margin: 8px 0 18px; }
.standfirst { font-size: 1.28rem; line-height: 1.55; color: var(--muted); margin: 0 0 20px; }
.article-cover { max-width: var(--wrap); margin: 0 auto 48px; padding: 0 24px; }
.article-cover img { width: 100%; border-radius: 3px; }
.prose { max-width: var(--read); margin: 0 auto; padding: 0 24px; font-size: 1.16rem; line-height: 1.8; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.3em; }
.prose h2 { font-family: var(--display); font-weight: 500; font-size: 1.85rem; line-height: 1.22; letter-spacing: -0.01em; margin: 2.1em 0 0.6em; }
.prose h3 { font-family: var(--display); font-weight: 500; font-size: 1.4rem; line-height: 1.3; margin: 1.8em 0 0.5em; }
.prose a { color: var(--green-ink); text-underline-offset: 3px; }
.prose strong { font-weight: 600; }
.prose blockquote { margin: 2em 0; padding: 2px 0 2px 24px; border-left: 3px solid var(--green); font-family: var(--display); font-size: 1.4rem; line-height: 1.45; }
.prose img { border-radius: 3px; margin: 2em 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose pre { background: var(--panel); padding: 16px; overflow-x: auto; border-radius: 3px; font-size: 0.9rem; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; margin: 1.5em 0; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-justify { text-align: justify; }

.article-foot { max-width: var(--read); margin: 56px auto 0; padding: 0 24px 64px; }
.article-foot h2 { font-family: var(--display); font-weight: 500; font-size: 1.1rem; margin: 0 0 12px; }
.keywords, .share { border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: 28px; }
.keywords p, .share p { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.tag { display: inline-block; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; color: var(--muted); text-decoration: none; background: #fff; }
.tag:hover { border-color: var(--green); color: var(--green-ink); }
.share a { font-size: 0.98rem; color: var(--ink); margin-right: 10px; }
.copy-link { padding: 6px 14px; font-size: 0.92rem; background: transparent; color: var(--ink); }
.related { background: var(--panel); border-top: 1px solid var(--line); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 28px; color: var(--muted); font-size: 0.96rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-about { max-width: 440px; }
.footer-about p { margin: 0 0 6px; }
.footer-name { font-family: var(--display); font-size: 1.3rem; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; align-content: flex-start; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 32px; font-size: 0.88rem; }
.footer-bottom p { margin: 0; }

@media (max-width: 800px) {
  body { font-size: 17px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 16px; min-height: 0; }
  .main-nav { width: 100%; gap: 22px; overflow-x: auto; white-space: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .hero { padding-top: 28px; }
  .hero-media { aspect-ratio: 16 / 10; }
  .grid { grid-template-columns: 1fr; gap: 44px; }
  .card-title { font-size: 1.5rem; }
  .prose { font-size: 1.08rem; }
}
