:root {
  --bg: #fbfaf7;
  --paper: #ffffff;
  --ink: #1e1e1c;
  --muted: #666761;
  --line: #e4e0d7;
  --soft: #f2efe8;
  --accent: #a6452c;
  --accent-dark: #7f321f;
  --blue: #2f5f73;
  --green: #5e6d48;
  --shadow: 0 18px 45px rgba(31, 30, 28, 0.08);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.container { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }
.narrow { max-width: 760px; }
.skip-link, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip-link:focus {
  width: auto;
  height: auto;
  clip: auto;
  z-index: 20;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 247, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 230px;
}
.brand img { width: 180px; height: auto; }
.brand span { display: none; }
.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.1;
}
.brand em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px 15px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.site-nav a {
  padding: 8px 0;
  color: #30302d;
  border-bottom: 2px solid transparent;
}
.site-nav a[aria-current="page"], .site-nav a.is-active {
  color: var(--accent);
  border-color: var(--accent);
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 6px;
}
.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}
.hero { padding: 42px 0 30px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
  gap: 28px;
}
.hero-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.hero-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}
.hero h1 {
  max-width: 880px;
  margin: 8px 0 12px;
  font-family: var(--serif);
  font-size: clamp(2.45rem, 5vw, 5.3rem);
  line-height: 0.98;
  letter-spacing: 0;
}
.hero-main p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
}
.hero-featured {
  display: grid;
  gap: 16px;
}
.magazine-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  padding: 28px 0 56px;
  align-items: start;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.08;
}
.section-heading > a {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}
.home-section, .browse-panel { margin-bottom: 44px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.article-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(31, 30, 28, 0.04);
}
.article-card .card-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--soft);
}
.card-body { padding: 16px; }
.card-body h3 {
  margin: 6px 0 8px;
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.18;
}
.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.hero-featured .article-card {
  display: grid;
  grid-template-columns: 116px 1fr;
}
.hero-featured .card-image img {
  height: 100%;
  aspect-ratio: auto;
}
.hero-featured .card-body { padding: 12px 14px; }
.hero-featured .card-body h3 { font-size: 1.05rem; }
.hero-featured .card-body p { font-size: 0.86rem; }
.sidebar {
  position: sticky;
  top: 106px;
  display: grid;
  gap: 18px;
}
.side-block {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.side-block h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1.35rem;
}
.supporter-list { display: grid; gap: 12px; }
.supporter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.supporter-grid.large {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: 64px;
}
.supporter-card {
  display: grid;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-height: 100%;
}
.supporter-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--soft);
}
.supporter-card span { padding: 0 15px 16px; }
.supporter-card strong { display: block; font-family: var(--serif); font-size: 1.15rem; line-height: 1.15; }
.supporter-card em { display: block; margin-top: 5px; color: var(--muted); font-size: 0.92rem; font-style: normal; line-height: 1.45; }
.supporter-card.compact {
  grid-template-columns: 76px 1fr;
  gap: 0;
  min-height: 76px;
}
.supporter-card.compact img { height: 100%; aspect-ratio: auto; }
.supporter-card.compact span { padding: 10px; }
.supporter-card.compact strong { font-size: 0.98rem; }
.supporter-card.compact em { font-size: 0.78rem; }
.supporters-band {
  padding: 46px 0 64px;
  background: var(--soft);
  border-top: 1px solid var(--line);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: white;
  background: var(--accent);
  font-weight: 700;
}
.button:hover { color: white; background: var(--accent-dark); }
.button-light {
  color: var(--accent);
  background: transparent;
}
.button-light:hover { color: white; }
.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.filter-btn {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.filter-btn.is-active {
  color: white;
  border-color: var(--blue);
  background: var(--blue);
}
.page-hero {
  padding: 58px 0 36px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.page-hero h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1;
}
.page-hero p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.12rem;
}
.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: 44px;
  align-items: start;
  padding: 48px 0 70px;
}
.article-content {
  min-width: 0;
}
.article-header h1 {
  margin: 10px 0 14px;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 6vw, 4.7rem);
  line-height: 1;
}
.article-header > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.18rem;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 22px;
}
.tag-row span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}
.featured-image img, .article-body figure img {
  width: 100%;
  border-radius: 8px;
  background: var(--soft);
}
.featured-image {
  margin: 0 0 28px;
}
.article-body {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.76;
}
.article-body p { margin: 0 0 1.25em; }
.article-body figure {
  margin: 30px 0;
}
figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.86rem;
  line-height: 1.45;
}
.resource-block {
  margin: 26px 0;
  padding: 18px;
  border: 1px solid #d9c5bb;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff8f4;
  font-family: var(--sans);
}
.resource-block p { margin: 8px 0; color: var(--muted); }
.resource-block a { color: var(--accent); font-weight: 700; }
.more-section {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.small-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.readable-page {
  max-width: 780px;
  padding: 42px 0 64px;
}
.readable-page h2 {
  margin: 30px 0 10px;
  font-family: var(--serif);
  font-size: 2rem;
}
.donate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 36px;
  align-items: start;
}
.qr-card {
  margin: 42px 0 0;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.site-footer {
  padding: 42px 0 22px;
  color: #f3efe7;
  background: #20201f;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.8fr 1fr;
  gap: 28px;
}
.footer-logo { width: 190px; padding: 8px; background: white; border-radius: 6px; }
.site-footer p, .site-footer a { color: #d6d0c5; }
.site-footer a:hover { color: white; }
.site-footer h2 {
  margin: 0 0 10px;
  color: white;
  font-family: var(--serif);
  font-size: 1.2rem;
}
.site-footer nav a {
  display: block;
  margin: 5px 0;
}
.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.14);
  font-size: 0.85rem;
}
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: none;
  min-width: 48px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.back-to-top.is-visible { display: block; }

@media (max-width: 1020px) {
  .header-inner { align-items: flex-start; padding: 16px 0; min-height: 74px; }
  .nav-toggle { display: block; flex: 0 0 auto; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 12px 20px 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid, .magazine-layout, .article-shell, .donate-layout {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supporter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 16px; line-height: 1.62; }
  .container { width: min(100% - 28px, var(--container)); }
  .brand img { width: 155px; }
  .site-nav.is-open { grid-template-columns: 1fr; }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: clamp(2.1rem, 12vw, 3.7rem); }
  .hero-featured .article-card { grid-template-columns: 96px 1fr; }
  .card-grid, .small-grid, .supporter-grid.large { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .supporter-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .article-body { font-size: 1.05rem; line-height: 1.72; }
  .footer-grid { grid-template-columns: 1fr; }
}
