/*
Theme Name: Evidence Health
Theme URI: https://todaypress.net/
Author: Evidence Health Editorial
Description: Accessible editorial theme for an evidence-led health information portal.
Version: 1.1.1
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
Text Domain: evidence-health
*/

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("assets/fonts/atkinson-next-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("assets/fonts/atkinson-next-semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("assets/fonts/atkinson-next-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --eh-ink: #172b35;
  --eh-navy: #123b4c;
  --eh-navy-deep: #0b3040;
  --eh-teal: #087f74;
  --eh-teal-dark: #06675f;
  --eh-aqua: #dcefeb;
  --eh-ivory: #f8f5ed;
  --eh-white: #ffffff;
  --eh-sand: #f2efe7;
  --eh-gold: #c28b2c;
  --eh-red: #b42318;
  --eh-red-soft: #fff0ed;
  --eh-muted: #5d6f79;
  --eh-line: #d5dedf;
  --eh-shadow: 0 18px 48px rgba(17, 57, 77, .10);
  --eh-radius: 18px;
  --eh-content: 1180px;
  --eh-reading: 740px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--eh-ink);
  background: var(--eh-ivory);
  font-family: "Atkinson Hyperlegible Next", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--eh-teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--eh-navy); }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid rgba(194, 139, 44, .78); outline-offset: 3px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus, .skip-link:focus {
  position: fixed !important; top: 16px; left: 16px; z-index: 9999; width: auto; height: auto;
  clip: auto; margin: 0; padding: 10px 16px; color: #fff; background: var(--eh-navy); border-radius: 8px;
}
.eh-container { width: min(calc(100% - 40px), var(--eh-content)); margin-inline: auto; }
.eh-reading { width: min(calc(100% - 40px), var(--eh-reading)); margin-inline: auto; }
.eh-serif, h1, h2, h3, h4 { font-family: "Newsreader", Georgia, serif; letter-spacing: -.032em; font-optical-sizing: auto; }
h1, h2, h3, h4 { color: var(--eh-navy-deep); line-height: 1.14; }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); margin: 0 0 .35em; }
h2 { font-size: clamp(1.85rem, 3.5vw, 3rem); margin: 1.5em 0 .55em; }
h3 { font-size: 1.45rem; margin: 1.4em 0 .5em; }
h4 { font-size: 1.12rem; }
p { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.35em; }
li { margin-block: .32em; }
blockquote {
  margin: 1.5em 0; padding: 1.25em 1.5em; border-left: 5px solid var(--eh-gold);
  background: var(--eh-sand); color: var(--eh-navy); font-family: "Newsreader", Georgia, serif; font-size: 1.08em;
}
table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .92rem; }
th, td { padding: .8em; border: 1px solid var(--eh-line); text-align: left; vertical-align: top; }
th { color: #fff; background: var(--eh-navy); }

.eh-utility { padding: 6px 0; color: var(--eh-navy); background: var(--eh-aqua); font-size: .78rem; }
.eh-utility .eh-container { display: flex; justify-content: flex-end; gap: 22px; }
.eh-site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--eh-line); background: rgba(255,255,255,.98); }
.eh-header-inner { min-height: 82px; display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; }
.eh-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--eh-navy); text-decoration: none; }
.eh-brand-mark { display: block; width: 44px; height: 44px; flex: 0 0 44px; }
.eh-brand-name { font: 680 1.38rem/1 "Newsreader", Georgia, serif; letter-spacing: -.035em; }
.eh-primary-nav ul { display: flex; justify-content: center; gap: 25px; margin: 0; padding: 0; list-style: none; }
.eh-primary-nav a { color: var(--eh-navy); text-decoration: none; font-size: .9rem; font-weight: 700; }
.eh-primary-nav a:hover, .eh-primary-nav .current-menu-item > a { color: var(--eh-teal); }
.eh-search-toggle { display: grid; place-items: center; min-width: 44px; min-height: 44px; border: 1px solid var(--eh-line); border-radius: 50%; background: var(--eh-ivory); color: var(--eh-navy); text-decoration: none; font-weight: 800; }

.eh-hero {
  position: relative; overflow: hidden; padding: clamp(52px, 7.5vw, 92px) 0 clamp(58px, 7vw, 88px);
  background: var(--eh-ivory);
}
.eh-hero::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38%; height: 5px; background: var(--eh-gold); }
.eh-hero-grid { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(360px, .97fr); gap: clamp(38px, 6vw, 86px); align-items: center; }
.eh-hero-copy { position: relative; z-index: 1; max-width: 680px; }
.eh-hero-copy h1 { max-width: 650px; font-size: clamp(3rem, 5.6vw, 5.35rem); line-height: .98; letter-spacing: -.055em; }
.eh-hero-media { position: relative; margin: 0; min-height: 590px; }
.eh-hero-media::before { content: ""; position: absolute; z-index: 0; inset: 32px -24px -24px 38px; border-radius: 34px 12px 34px 12px; background: var(--eh-aqua); }
.eh-hero-media img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% center; border-radius: 12px 34px 12px 34px; filter: saturate(.86) contrast(1.03); box-shadow: var(--eh-shadow); }
.eh-hero-caption { position: absolute; z-index: 2; left: -28px; right: 28px; bottom: 24px; display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 18px 20px; color: #fff; background: rgba(11,48,64,.94); border-radius: 8px 18px 8px 18px; }
.eh-hero-caption strong { max-width: 280px; font: 620 1.08rem/1.2 "Newsreader", Georgia, serif; }
.eh-hero-caption small { max-width: 190px; color: rgba(255,255,255,.68); font-size: .68rem; text-align: right; }
.eh-hero-notes { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 22px; color: var(--eh-muted); font-size: .8rem; }
.eh-hero-notes span { display: inline-flex; align-items: center; gap: 7px; }
.eh-hero-notes span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--eh-gold); }
.eh-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--eh-teal-dark); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eh-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--eh-gold); }
.eh-lede { max-width: 720px; color: #45606d; font-size: 1.18rem; }
.eh-search-form { display: flex; gap: 10px; max-width: 760px; margin-top: 30px; padding: 9px; border: 1px solid rgba(17,57,77,.14); border-radius: 16px; background: #fff; box-shadow: var(--eh-shadow); }
.eh-search-form label { display: flex; flex: 1; min-width: 0; }
.eh-search-form input[type="search"] { min-width: 0; flex: 1; border: 0; padding: 9px 12px; color: var(--eh-navy); background: transparent; }
.eh-button, .eh-search-form input[type="submit"], .eh-search-form button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 19px;
  border: 1px solid transparent; border-radius: 999px; color: #fff; background: var(--eh-teal); text-decoration: none; font-weight: 800; cursor: pointer;
}
.eh-button:hover, .eh-search-form input[type="submit"]:hover, .eh-search-form button:hover { color: #fff; background: var(--eh-teal-dark); }
.eh-button--secondary { color: var(--eh-navy); background: transparent; border-color: rgba(17,57,77,.25); }
.eh-button--secondary:hover { color: var(--eh-navy); background: #fff; }
.eh-mobile-nav { display: none; position: relative; }
.eh-mobile-nav summary { min-width: 44px; min-height: 44px; padding: 11px 14px; border: 1px solid var(--eh-line); border-radius: 999px; color: var(--eh-navy); background: var(--eh-ivory); font-weight: 800; cursor: pointer; list-style: none; }
.eh-mobile-nav summary::-webkit-details-marker { display: none; }
.eh-mobile-nav ul { position: absolute; z-index: 20; right: 0; top: calc(100% + 10px); width: min(82vw, 320px); margin: 0; padding: 14px; border: 1px solid var(--eh-line); border-radius: 14px; background: #fff; box-shadow: var(--eh-shadow); list-style: none; }
.eh-mobile-nav li + li { border-top: 1px solid var(--eh-line); }
.eh-mobile-nav a { display: block; padding: 12px; color: var(--eh-navy); text-decoration: none; font-weight: 700; }

.eh-trust-strip { color: #fff; background: var(--eh-navy); }
.eh-trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.eh-trust-item { padding: 23px 28px; border-right: 1px solid rgba(255,255,255,.14); }
.eh-trust-item:last-child { border: 0; }
.eh-trust-item strong { display: block; font-family: "Newsreader", Georgia, serif; font-size: 1.08rem; }
.eh-trust-item span { color: rgba(255,255,255,.7); font-size: .82rem; }
.eh-section { padding: clamp(68px, 9vw, 110px) 0; }
.eh-section--white { background: #fff; }
.eh-section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 34px; }
.eh-section-head h2 { margin: 0; }
.eh-section-head p { max-width: 560px; color: var(--eh-muted); }
.eh-topic-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.eh-topic-grid--preview { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.eh-topic-card { min-height: 190px; padding: 24px; border: 1px solid var(--eh-line); border-radius: var(--eh-radius); color: var(--eh-navy); background: #fff; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.eh-topic-card:hover { transform: translateY(-4px); box-shadow: var(--eh-shadow); }
.eh-topic-card small { color: var(--eh-gold); font-weight: 800; letter-spacing: .1em; }
.eh-topic-card strong { display: block; margin: 30px 0 9px; font: 680 1.2rem/1.18 "Newsreader", Georgia, serif; }
.eh-topic-card span { color: var(--eh-muted); font-size: .82rem; }
.eh-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.eh-card { padding: 26px; border: 1px solid var(--eh-line); border-radius: var(--eh-radius); background: #fff; }
.eh-card small { color: var(--eh-gold); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.eh-card h3 { margin-top: .3em; }
.eh-card a { font-weight: 800; }
.eh-promise { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: center; padding: 54px; border-radius: 26px; background: var(--eh-aqua); }
.eh-promise h2 { margin-top: 0; }
.eh-promise-list { display: grid; gap: 17px; }
.eh-promise-item { display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.eh-promise-item b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: var(--eh-teal); }

.eh-page-hero { padding: 66px 0 52px; background: linear-gradient(135deg, #fff, var(--eh-aqua)); }
.eh-page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: clamp(38px, 6vw, 76px); align-items: center; }
.eh-page-hero-copy { min-width: 0; }
.eh-page-hero h1 { max-width: 980px; font-size: clamp(2.6rem, 5vw, 4.55rem); }
.eh-page-feature { position: relative; margin: 0; min-height: 360px; }
.eh-page-feature::after { content: ""; position: absolute; z-index: 0; inset: 18px -16px -16px 24px; border-radius: 24px 8px 24px 8px; background: rgba(8,127,116,.14); }
.eh-page-feature img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 8px 24px 8px 24px; filter: saturate(.88); box-shadow: var(--eh-shadow); }
.eh-breadcrumbs { margin-bottom: 26px; color: var(--eh-muted); font-size: .82rem; }
.eh-breadcrumbs a { color: inherit; }
.eh-page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 52px; }
.eh-guide-list { display: grid; gap: 16px; }
.eh-guide-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 25px; border: 1px solid var(--eh-line); border-radius: 16px; background: #fff; }
.eh-guide-card h3 { margin: 0 0 7px; }
.eh-guide-card p { margin: 0; color: var(--eh-muted); font-size: .9rem; }
.eh-guide-card a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--eh-aqua); text-decoration: none; }

.eh-article-header { padding: 58px 0 42px; border-bottom: 1px solid var(--eh-line); background: #fff; }
.eh-article-header h1 { max-width: 980px; font-size: clamp(2.6rem, 5.8vw, 4.75rem); }
.eh-article-dek { max-width: 820px; color: #45606d; font-size: 1.15rem; }
.eh-review-card { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; max-width: 1000px; margin-top: 28px; padding: 18px 20px; border: 1px solid var(--eh-line); border-radius: 14px; background: var(--eh-ivory); font-size: .83rem; }
.eh-review-card span { display: block; color: var(--eh-muted); }
.eh-review-card strong { color: var(--eh-navy); }
.eh-status-pending { color: var(--eh-red) !important; }
.eh-article-layout { display: grid; grid-template-columns: 230px minmax(0, var(--eh-reading)) 230px; justify-content: space-between; gap: 38px; padding: 56px 0 100px; background: #fff; }
.eh-toc { position: sticky; top: 25px; align-self: start; font-size: .85rem; }
.eh-toc strong { color: var(--eh-navy); }
.eh-toc ul { padding-left: 18px; }
.eh-article-body { min-width: 0; font-family: "Newsreader", Georgia, serif; font-size: 1.12rem; line-height: 1.72; }
.eh-article-body h2, .eh-article-body h3, .eh-article-body h4 { scroll-margin-top: 30px; }
.eh-article-body > :first-child { margin-top: 0; }
.eh-article-body a { overflow-wrap: anywhere; }
.eh-summary { padding: 26px; border-left: 5px solid var(--eh-teal); background: var(--eh-aqua); font-family: "Atkinson Hyperlegible Next", sans-serif; }
.eh-urgent { margin: 30px 0; padding: 25px; border: 1px solid #efb7b0; border-radius: 14px; background: var(--eh-red-soft); font-family: "Atkinson Hyperlegible Next", sans-serif; }
.eh-urgent h2, .eh-urgent h3 { margin-top: 0; color: var(--eh-red); }
.eh-evidence-card { align-self: start; padding: 20px; border: 1px solid var(--eh-line); border-radius: 14px; font-size: .82rem; }
.eh-evidence-card strong { display: block; color: var(--eh-navy); }
.eh-update-log { padding: 20px; border-radius: 12px; background: var(--eh-sand); font-family: "Atkinson Hyperlegible Next", sans-serif; font-size: .88rem; }
.eh-pagination { display: flex; justify-content: space-between; gap: 20px; margin-top: 45px; padding-top: 25px; border-top: 1px solid var(--eh-line); }

.eh-search-page, .eh-archive-page { min-height: 65vh; }
.eh-search-results { display: grid; gap: 16px; }
.eh-search-result { padding: 24px; border: 1px solid var(--eh-line); border-radius: 14px; background: #fff; }
.eh-search-result h2 { margin: 0 0 .3em; font-size: 1.5rem; }
.eh-empty { padding: 36px; border: 1px solid var(--eh-line); border-radius: var(--eh-radius); background: #fff; }

.eh-site-footer { padding: 58px 0 26px; color: rgba(255,255,255,.74); background: var(--eh-navy-deep); }
.eh-footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.eh-site-footer .eh-brand { color: #fff; }
.eh-site-footer h2, .eh-site-footer h3 { color: #fff; font-family: "Atkinson Hyperlegible Next", sans-serif; font-size: 1rem; letter-spacing: 0; }
.eh-site-footer ul { margin: 0; padding: 0; list-style: none; }
.eh-site-footer a { display: block; margin: 8px 0; color: rgba(255,255,255,.76); text-decoration: none; font-size: .85rem; }
.eh-footer-legal { margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.13); font-size: .76rem; }
.alignwide { width: min(100%, var(--eh-content)); margin-inline: auto; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }

@media (max-width: 1020px) {
  .eh-primary-nav { display: none; }
  .eh-mobile-nav { display: block; }
  .eh-header-inner { grid-template-columns: 1fr auto auto; }
  .eh-topic-grid { grid-template-columns: repeat(2, 1fr); }
  .eh-topic-grid--preview { grid-template-columns: repeat(2, 1fr); }
  .eh-card-grid { grid-template-columns: repeat(2, 1fr); }
  .eh-promise, .eh-page-layout { grid-template-columns: 1fr; }
  .eh-page-hero-grid { grid-template-columns: 1fr; }
  .eh-page-feature { min-height: 420px; }
  .eh-article-layout { grid-template-columns: minmax(0, 1fr); }
  .eh-hero-grid { grid-template-columns: 1fr; }
  .eh-hero-copy { max-width: 760px; }
  .eh-hero-media { min-height: 520px; }
  .eh-toc { position: static; }
  .eh-evidence-card { max-width: var(--eh-reading); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .eh-container, .eh-reading { width: min(calc(100% - 28px), var(--eh-content)); }
  .eh-utility { display: none; }
  .eh-header-inner { min-height: 68px; }
  .eh-brand-mark { width: 39px; height: 39px; flex-basis: 39px; }
  .eh-brand-name { font-size: 1.22rem; }
  .eh-hero-copy h1 { font-size: clamp(2.75rem, 14vw, 4rem); }
  .eh-hero-media { min-height: 420px; }
  .eh-hero-media::before { inset: 18px -10px -14px 20px; }
  .eh-hero-caption { left: 12px; right: 12px; bottom: 14px; align-items: start; flex-direction: column; }
  .eh-hero-caption small { text-align: left; }
  .eh-search-form { flex-direction: column; }
  .eh-trust-grid, .eh-topic-grid, .eh-card-grid, .eh-footer-grid { grid-template-columns: 1fr; }
  .eh-trust-item { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.14); }
  .eh-section-head { align-items: start; flex-direction: column; }
  .eh-promise { padding: 30px; }
  .eh-page-feature { min-height: 320px; }
  .eh-review-card { align-items: flex-start; flex-direction: column; }
  table { display: block; max-width: 100%; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
