/*
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. Large type, warm paper, and clear topic buttons for older readers.
Version: 1.5.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: healthhot
*/

:root {
  --bg: #efe6d6;
  --paper: #fffdf8;
  --ink: #1c1712;
  --muted: #4a433c;
  --line: #d9cbb6;
  --accent: #1b5e45;
  --accent-deep: #0f3d2c;
  --accent-soft: #e5f3ea;
  --shadow: 0 10px 28px rgba(60, 42, 22, 0.08);
  --measure: 42rem;
  --wide: 76rem;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(#1b5e45, #1b5e45) top / 100% 0.45rem no-repeat,
    radial-gradient(circle at 50% 0, #fffaf2 0, var(--bg) 34rem);
  color: var(--ink);
  font-family: var(--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 {
  width: min(var(--wide), calc(100% - 1.6rem));
  margin: 1.1rem auto 0;
  padding: 1.15rem 1.3rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.masthead { margin-bottom: 0.85rem; }

.site-name {
  display: inline-block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-tagline {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1.08rem;
  line-height: 1.45;
}

.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-flex;
  align-items: center;
  min-height: 3rem;
  color: var(--ink);
  background: #f7f1e6;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 1.05rem;
  font-family: var(--sans);
  font-size: 1.08rem;
  line-height: 1.3;
  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 {
  width: min(var(--wide), calc(100% - 1.6rem));
  margin: 0 auto;
  padding: 0.2rem 0 3rem;
}

.site-footer {
  width: min(var(--wide), calc(100% - 1.6rem));
  margin: 0 auto 1.4rem;
  padding: 0;
}

.site-footer p {
  margin: 0;
  padding: 0.95rem 0 0.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--sans);
  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: var(--sans);
  font-size: 1.05rem;
  font-weight: 650;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

.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: 1.15rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.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);
  border-bottom: 0.28rem solid var(--accent);
}

.post-card h3 {
  margin: 0;
  padding: 1rem 1.15rem 1.2rem;
  font-size: 1.4rem;
  line-height: 1.35;
}

.card-link:hover h3 { color: var(--accent-deep); }
.card-link:hover img { filter: saturate(1.05); }

.card-meta,
.entry-meta {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1.05rem;
}

.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);
  margin-top: 1.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.8rem 1.6rem 2.1rem;
  box-shadow: var(--shadow);
}

.entry h1 {
  margin: 0.35rem 0 0.85rem;
  font-size: 2.15rem;
  line-height: 1.28;
}

.entry-meta a {
  display: inline-block;
  margin: 0.15rem 0.3rem 0.15rem 0;
  padding: 0.15rem 0.7rem;
  background: var(--accent-soft);
  border-radius: 999px;
}

.entry-content p { margin: 1rem 0; }
.entry-content a { font-weight: 650; }
.entry-content figure {
  margin: 1.3rem 0;
  padding: 0.35rem;
  background: #f7f1e6;
  border-radius: 0.9rem;
}
.entry-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.6rem;
}
.entry-content p:last-child {
  margin-top: 1.5rem;
  padding: 0.9rem 1rem;
  background: var(--accent-soft);
  border-radius: 0.9rem;
  font-family: var(--sans);
  font-size: 1.08rem;
}
.entry-content p:last-child a {
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

.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;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 1.08rem;
}
.paging .page-numbers {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.35rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
}
.paging .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (max-width: 40rem) {
  body { font-size: 1.15rem; }
  .site-header { width: min(var(--wide), calc(100% - 1rem)); padding: 1rem 0.9rem 0.75rem; }
  .site-name { font-size: 1.75rem; }
  .entry { padding: 1.25rem 1.05rem 1.5rem; }
  .entry h1 { font-size: 1.75rem; }
  .post-card h3 { font-size: 1.28rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-link:hover img { filter: none; }
}
