:root {
  --bg: #f7f3eb;
  --paper: #fffdf8;
  --ink: #1e2b32;
  --muted: #687780;
  --line: #e5ddd0;
  --primary: #1d5b5f;
  --primary-dark: #123b42;
  --accent: #c68b56;
  --soft: #edf5f3;
  --shadow: 0 24px 70px -48px rgba(29, 91, 95, .45);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(255, 253, 248, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--primary-dark);
  font-weight: 800;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--primary);
}

main {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.hero,
.catalog-hero,
.article-header {
  padding: clamp(42px, 7vw, 76px) 0 24px;
}

.hero,
.catalog-hero {
  max-width: 820px;
}

.eyebrow,
.meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--primary-dark);
  line-height: 1.13;
  letter-spacing: 0;
}

h1 {
  margin: 16px 0;
  max-width: 900px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}

h2 {
  margin: 2.1em 0 .65em;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

h3 {
  margin: 1.8em 0 .55em;
  font-size: 1.25rem;
}

.hero p,
.catalog-hero p,
.article-header > p:not(.meta) {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.latest-grid,
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 30px 0 64px;
}

.post-card {
  display: block;
  min-height: 100%;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.post-card .meta {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
}

.post-card h2,
.post-card h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

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

.catalog-panel {
  margin-bottom: 60px;
}

.catalog-controls {
  display: grid;
  grid-template-columns: 1fr minmax(190px, 260px);
  gap: 12px;
  margin-bottom: 24px;
}

.catalog-controls input,
.catalog-controls select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.article {
  max-width: 940px;
  margin: 0 auto 72px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--primary);
  font-weight: 700;
}

.article-header h1 {
  margin-top: 14px;
}

.tags,
.clinical-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tags span,
.clinical-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 650;
}

.clinical-meta span {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.article-cover {
  overflow: hidden;
  aspect-ratio: 21 / 9;
  margin: 8px 0 34px;
  border-radius: 12px;
  background: var(--soft);
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notice-box,
.ad-slot {
  max-width: 760px;
  margin: 26px auto;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--muted);
}

.ad-slot {
  text-align: center;
}

.ad-slot span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ad-slot strong {
  display: block;
  margin-top: 4px;
  color: var(--primary-dark);
}

.article-body {
  max-width: 760px;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.13rem;
}

.article-body p,
.article-body li {
  margin-bottom: 1.05em;
}

.article-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body blockquote {
  margin: 1.7em 0;
  padding: 18px 22px;
  border-left: 4px solid var(--accent);
  background: var(--paper);
  color: var(--primary-dark);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .site-header,
  .site-footer,
  .catalog-controls {
    display: block;
  }

  .site-nav {
    margin-top: 10px;
    gap: 14px;
  }

  main {
    width: min(100% - 28px, 1120px);
  }

  .hero,
  .catalog-hero,
  .article-header {
    padding-top: 32px;
  }

  .article-cover {
    aspect-ratio: 16 / 9;
  }

  .catalog-controls input,
  .catalog-controls select {
    width: 100%;
    margin-bottom: 10px;
  }
}
