:root {
  color-scheme: light;
  --bg: #f5f1e8;
  --paper: rgba(255, 252, 246, 0.92);
  --paper-strong: #fffdf8;
  --text: #1e1b16;
  --muted: #6f675d;
  --line: rgba(30, 27, 22, 0.12);
  --accent: #184f42;
  --accent-soft: rgba(24, 79, 66, 0.08);
  --shadow: 0 20px 60px rgba(60, 45, 20, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(24, 79, 66, 0.1), transparent 26%),
    linear-gradient(180deg, #f7f4ec 0%, var(--bg) 100%);
  color: var(--text);
}

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

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.brand-mark {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.topnav {
  display: flex;
  gap: 18px;
  color: var(--muted);
}

.hero-card,
.post-card,
.sidebar-card,
.featured-card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-card {
  padding: 48px;
  border-radius: 28px;
  margin-bottom: 28px;
}

.eyebrow,
.article-kicker,
.placeholder-badge,
.sidebar-title,
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  color: var(--accent);
}

.hero-card h1,
.article-view h2,
.post-placeholder h2,
.section-head h2,
.featured-card h3 {
  font-family: 'Noto Serif SC', serif;
  line-height: 1.2;
}

.hero-card h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  margin: 12px 0 18px;
  max-width: 11em;
}

.hero-copy,
.section-copy {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 52rem;
  font-size: 1.05rem;
}

.search-panel {
  display: grid;
  gap: 12px;
}

.search-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-input-wrap input {
  width: 100%;
  border: 1px solid transparent;
  background: var(--paper-strong);
  border-radius: 18px;
  padding: 20px 22px;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(24, 79, 66, 0.08);
}

.search-input-wrap input:focus {
  border-color: rgba(24, 79, 66, 0.3);
}

.search-input-wrap button,
.ghost-button {
  border: 0;
  border-radius: 18px;
  padding: 0 24px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
}

.search-input-wrap button {
  background: var(--accent);
  color: white;
}

.search-input-wrap button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.search-hint {
  margin: 0;
  color: var(--muted);
}

.featured-block {
  margin-bottom: 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.section-copy {
  margin: 0;
  max-width: 30rem;
}

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

.featured-card {
  display: grid;
  gap: 12px;
  padding: 26px;
  border-radius: 24px;
  transition: transform 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.featured-card:hover {
  transform: translateY(-3px);
  border-color: rgba(24, 79, 66, 0.22);
}

.featured-meta,
.featured-card p,
.post-placeholder p,
.article-excerpt,
.article-sections p,
.sidebar-card p,
.sidebar-card li {
  color: var(--muted);
  line-height: 1.9;
}

.featured-meta {
  margin: 0;
  font-size: 0.88rem;
}

.featured-card h3 {
  margin: 0;
  font-size: 1.5rem;
}

.featured-card p {
  margin: 0;
}

.featured-card a {
  color: var(--accent);
  font-weight: 600;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.post-card {
  border-radius: 28px;
  overflow: hidden;
}

.post-placeholder,
.article-view {
  padding: 42px;
}

.post-placeholder h2 {
  font-size: clamp(1.9rem, 3vw, 3rem);
  margin: 16px 0;
}

.hidden {
  display: none;
}

.article-view h2 {
  font-size: clamp(2.1rem, 3vw, 3.3rem);
  margin: 12px 0 16px;
}

.article-excerpt {
  font-size: 1.1rem;
  margin: 0 0 24px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.article-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 24px 0 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.92rem;
}

.ghost-button {
  min-height: 44px;
  background: var(--paper-strong);
  color: var(--accent);
  border: 1px solid var(--line);
}

.article-sections {
  display: grid;
  gap: 30px;
  margin-top: 26px;
}

.article-sections h3,
.related-block h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.5rem;
  margin: 0 0 12px;
}

.article-sections p {
  margin: 0;
  font-size: 1.04rem;
}

.related-block {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.related-links {
  display: grid;
  gap: 12px;
}

.related-links a {
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.related-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(24, 79, 66, 0.22);
}

.sidebar {
  display: grid;
  gap: 18px;
}

.sidebar-card {
  border-radius: 24px;
  padding: 28px;
}

.sidebar-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

@media (max-width: 920px) {
  .content-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .search-input-wrap,
  .section-head,
  .article-toolbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 1200px);
  }

  .hero-card,
  .post-placeholder,
  .article-view,
  .sidebar-card,
  .featured-card {
    padding: 24px;
  }
}
