/*
Theme Name: Health Reader
Theme URI: https://github.com/lausmph-investing/healthhot-theme
Author: lausmph-investing
Description: A calm reading theme for short health briefs. Lists show the title, summary, and category. Articles keep original images and the link to the source.
Version: 1.2.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: healthhot
*/

:root {
  --bg: #f3efe6;
  --paper: #fffdf8;
  --ink: #1b1916;
  --muted: #3d3832;
  --line: #ddd4c4;
  --accent: #1b5e45;
  --accent-deep: #144833;
  --accent-soft: #e4f2ea;
  --measure: 42rem;
  --wide: 72rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at top, #fbf7ef 0, var(--bg) 28rem);
  color: var(--ink);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: 1.25rem;
  line-height: 1.75;
}

a { color: var(--accent-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.55rem 0.9rem;
  z-index: 2;
}
.skip:focus { top: 0.6rem; }

.site-header {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.6rem 1.4rem 0.4rem;
}

.site-name {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--ink);
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0.2rem 0 0.4rem;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  min-height: 2.75rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current-cat > a {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.site-main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.4rem 1.4rem 3.5rem;
}

.site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.4rem 1.4rem 2.4rem;
  color: var(--muted);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
}

.section-head,
.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.4rem 0 0.9rem;
  padding-bottom: 0.35rem;
  border-bottom: 3px solid var(--accent);
}

.section-head h2,
.page-head h1 {
  margin: 0;
  font-size: 1.85rem;
  line-height: 1.25;
}

.section-head h2 a { color: var(--ink); text-decoration: none; }
.section-head h2 a:hover { color: var(--accent-deep); }

.section-head > a {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
}

.page-head p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(27, 25, 22, 0.04);
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--ink);
  text-decoration: none;
}

.card-link img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--accent-soft);
}

.post-card h3 {
  margin: 0;
  padding: 0.95rem 1.1rem 1.1rem;
  font-size: 1.35rem;
  line-height: 1.35;
}

.card-link:hover h3 { color: var(--accent-deep); }

.card-meta,
.entry-meta {
  color: var(--muted);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
}

.card-meta a,
.entry-meta a {
  color: var(--accent-deep);
  font-weight: 650;
  text-decoration: none;
}

.excerpt {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.entry {
  max-width: var(--measure);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.7rem 1.5rem 2rem;
}

.entry h1 {
  margin: 0.35rem 0 0.85rem;
  font-size: 2.15rem;
  line-height: 1.28;
}

.entry-content p { margin: 1rem 0; }
.entry-content a { font-weight: 650; }
.entry-content figure { margin: 1.3rem 0; }
.entry-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.6rem;
}

.empty {
  color: var(--ink);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 1rem;
  padding: 1.3rem 1.2rem;
  font-size: 1.15rem;
}

.paging { margin-top: 1.6rem; }
.paging .nav-links {
  display: flex;
  gap: 1.25rem;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
}

@media (max-width: 40rem) {
  body { font-size: 1.15rem; }
  .entry h1 { font-size: 1.75rem; }
  .post-card h3 { font-size: 1.28rem; }
}
