/* Later Years — lateryears.egazer.com
   A calm, high-contrast resource site for adult children caring for aging parents.
   Warm blue + cream palette, large type, generous spacing. */

:root {
  --cream: #FBF6EC;
  --cream-deep: #F2E9D4;
  --paper: #FFFFFF;
  --ink: #1C2B30;
  --ink-soft: #3C4F56;
  --blue-deep: #1A4A5E;
  --blue: #2D6E86;
  --blue-mid: #3F8BA3;
  --blue-pale: #E3EFF2;
  --blue-pale-2: #D5E7EC;
  --gold: #B9812F;
  --gold-pale: #F6E9D2;
  --border: #D8CFAF;
  --border-blue: #BFD9DF;
  --focus: #0B5A73;
  --ok: #3E6B3D;
  --max: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(26, 74, 94, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  color: var(--blue-deep);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.7rem; margin-top: 2.1em; padding-top: 0.2em; border-top: 1px solid var(--border-blue); }
h2:first-of-type { border-top: none; margin-top: 0.8em; padding-top: 0; }
h3 { font-size: 1.28rem; }

p { margin: 0 0 1.2em; }

a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; border-radius: var(--radius-sm); }

ul, ol { padding-left: 1.4em; margin: 0 0 1.2em; }
li { margin-bottom: 0.5em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue-deep);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Top bar ---------- */
.top-bar {
  background: var(--blue-deep);
  color: #EFEAD9;
  font-size: 0.88rem;
  padding: 7px 0;
}
.top-bar .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.top-bar a { color: #EFEAD9; }

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 3px solid var(--blue-deep);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 20px;
  flex-wrap: wrap;
}
.site-logo {
  font-family: Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--blue-deep);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.site-logo .mark {
  display: inline-block;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gold-pale);
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 1rem;
  line-height: 30px;
  text-align: center;
}
.site-logo span { color: var(--gold); }
.site-tagline { font-size: 0.95rem; color: var(--ink-soft); margin-left: 10px; display: inline-block; }

.site-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
}
.site-nav a:hover, .site-nav a.current { background: var(--blue-pale); color: var(--blue-deep); }

/* ---------- Home hero ---------- */
.home-hero {
  background: linear-gradient(180deg, var(--blue-pale) 0%, var(--cream) 100%);
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}
.home-hero .hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.home-hero h1 { font-size: 2.6rem; margin-bottom: 0.4em; }
.home-hero .lede { font-size: 1.25rem; color: var(--ink-soft); max-width: 46ch; }
.home-hero img { border-radius: var(--radius); box-shadow: var(--shadow); }
.home-hero .hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.home-hero .hero-stats div { font-size: 0.92rem; color: var(--ink-soft); }
.home-hero .hero-stats strong { display: block; font-size: 1.5rem; color: var(--blue-deep); font-family: Georgia, serif; }

/* ---------- Main layout ---------- */
main { display: block; }
.layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}
.layout.single-col { grid-template-columns: 1fr; max-width: 820px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.breadcrumbs a { color: var(--blue); }
.breadcrumbs .sep { margin: 0 6px; color: var(--border); }

/* ---------- Article / resource ---------- */
article.resource { max-width: 760px; }
.resource-header .kicker {
  display: inline-block;
  background: var(--blue-pale-2);
  color: var(--blue-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.resource-header .dek {
  font-size: 1.22rem;
  color: var(--ink-soft);
  margin-top: 0.3em;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin: 20px 0 6px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.byline strong { color: var(--ink); }
.byline .reviewed-by {
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 0.87rem;
}
.byline .reviewed-by strong { color: var(--blue-deep); }

figure.hero-figure { margin: 24px 0 8px; }
figure.hero-figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
figure.inline-figure { margin: 28px 0; }
figure.inline-figure img { width: 100%; object-fit: cover; }
figcaption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 8px;
  padding-left: 4px;
  border-left: 3px solid var(--border-blue);
  padding-left: 10px;
}

.gh-content h2 { scroll-margin-top: 20px; }
.gh-content h2:first-child { margin-top: 0.6em; }

/* ---------- At a glance ---------- */
.at-a-glance {
  background: var(--blue-pale);
  border: 1px solid var(--border-blue);
  border-left: 6px solid var(--blue);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 26px 0 32px;
}
.at-a-glance h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.at-a-glance ul { margin: 0; padding-left: 1.2em; }
.at-a-glance li { margin-bottom: 8px; }
.at-a-glance li:last-child { margin-bottom: 0; }

/* ---------- Glossary ---------- */
.glossary-box {
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 28px 0;
}
.glossary-box h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: "Segoe UI", sans-serif;
  font-weight: 700;
}
.glossary-box dl { margin: 0; }
.glossary-box dt { font-weight: 700; color: var(--blue-deep); font-family: Georgia, serif; margin-top: 10px; }
.glossary-box dt:first-child { margin-top: 0; }
.glossary-box dd { margin: 2px 0 0; color: var(--ink-soft); }

/* ---------- Cost table ---------- */
.cost-table-wrap { overflow-x: auto; margin: 26px 0; border-radius: var(--radius); border: 1px solid var(--border-blue); }
table.cost-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; background: var(--paper); }
table.cost-table caption {
  text-align: left;
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding: 12px 16px 0;
  caption-side: top;
}
table.cost-table th, table.cost-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-blue);
}
table.cost-table thead th {
  background: var(--blue-deep);
  color: #fff;
  font-family: Georgia, serif;
  font-weight: 700;
}
table.cost-table tbody tr:nth-child(even) { background: var(--blue-pale); }
table.cost-table tbody tr:last-child td { border-bottom: none; }
table.cost-table td.num, table.cost-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Questions to ask ---------- */
.questions-box {
  background: var(--paper);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 28px 0;
}
.questions-box h3 { margin-top: 0; color: var(--blue-deep); }
.questions-box ul.checklist { list-style: none; padding-left: 0; margin: 14px 0 0; }
.questions-box ul.checklist li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
}
.questions-box ul.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 20px; height: 20px;
  border: 2px solid var(--blue);
  border-radius: 5px;
  background: var(--blue-pale);
}

/* ---------- Find care CTA ---------- */
.find-care-cta {
  background: var(--blue-deep);
  color: #F3EFE1;
  border-radius: var(--radius);
  padding: 30px 32px;
  margin: 32px 0;
  background-image: radial-gradient(circle at 90% 10%, rgba(255,255,255,0.08), transparent 60%);
}
.find-care-cta h3 { color: #fff; margin-bottom: 6px; font-size: 1.35rem; }
.find-care-cta p { color: #D7E6EA; margin-bottom: 18px; }
.find-care-cta form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.find-care-cta input[type="text"] {
  font-size: 1.05rem;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: none;
  width: 200px;
  max-width: 100%;
}
.find-care-cta button {
  background: var(--gold);
  color: #241a06;
  border: none;
  font-weight: 700;
  font-size: 1.02rem;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.find-care-cta button:hover { background: #CA9544; }
.find-care-cta .fine-print { font-size: 0.8rem; color: #AFC6CC; margin: 12px 0 0; }

/* ---------- FAQ ---------- */
.faq-section { margin: 30px 0; }
.faq-item {
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: var(--paper);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--blue-deep);
  padding: 15px 18px;
  font-family: Georgia, serif;
  font-size: 1.05rem;
}
.faq-item p { padding: 0 18px 16px; margin: 0; color: var(--ink-soft); }

/* ---------- Callouts ---------- */
.callout {
  border-left: 5px solid var(--gold);
  background: var(--gold-pale);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
}
.callout p:last-child { margin-bottom: 0; }

.disclosure-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--cream-deep);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 18px 0 28px;
}

/* ---------- Ad regions ---------- */
.ad-region {
  display: block;
  background: repeating-linear-gradient(135deg, #EDE4CC, #EDE4CC 10px, #E7DCBF 10px, #E7DCBF 20px);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-align: center;
  position: relative;
}
.ad-region::after {
  content: "Advertisement";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ad-region[data-ad="rail"] { min-height: 600px; margin-bottom: 28px; }
.ad-region[data-ad="inline"] { min-height: 120px; margin: 30px 0; }

/* ---------- Author / reviewer card ---------- */
.contributor-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 36px 0;
}
.contributor-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.contributor-card .role {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 4px;
}
.contributor-card h4 { margin: 0 0 4px; font-size: 1.05rem; }
.contributor-card p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Related ---------- */
.related-posts { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 28px; }
.related-posts h3 { margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-card { text-decoration: none; color: var(--ink); display: block; }
.related-card img { aspect-ratio: 16/10; object-fit: cover; margin-bottom: 8px; }
.related-card .tag { font-size: 0.75rem; color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.related-card span.title { display: block; font-weight: 600; margin-top: 4px; color: var(--ink); font-size: 0.98rem; }

/* ---------- Sidebar ---------- */
aside.rail { position: sticky; top: 24px; }
.rail-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.rail-card h4 {
  margin: 0 0 14px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--blue-deep);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold-pale);
}
.rail-card ul { list-style: none; padding: 0; margin: 0; }
.rail-card li { margin-bottom: 0; border-bottom: 1px solid var(--cream-deep); }
.rail-card li:last-child { border-bottom: none; }
.rail-card a {
  display: block;
  padding: 10px 2px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
}
.rail-card a:hover { color: var(--blue-deep); }
.rail-card .topic-group { margin-bottom: 6px; }
.rail-card .topic-group h5 {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin: 14px 0 4px;
}
.rail-card .topic-group:first-child h5 { margin-top: 0; }

.newsletter-rail {
  background: var(--blue-deep);
  color: #EFEAD9;
  border-radius: var(--radius);
  padding: 20px;
}
.newsletter-rail h4 { color: #fff; border-bottom-color: rgba(255,255,255,0.2); }
.newsletter-rail p { font-size: 0.9rem; color: #D7E6EA; margin-bottom: 14px; }
.newsletter-rail form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-rail input { padding: 10px 12px; border-radius: var(--radius-sm); border: none; }
.newsletter-rail button {
  background: var(--gold); color: #241a06; border: none; font-weight: 700;
  padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer;
}

/* ---------- Home listing ---------- */
.post-list-section { padding: 10px 0 0; }
.post-list-section h2.section-title {
  border: none; padding: 0; margin: 0 0 6px;
  font-size: 1.5rem;
}
.section-sub { color: var(--ink-soft); margin-bottom: 28px; }
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.post-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.post-card img { border-radius: 0; aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.post-card .post-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.post-card .tag {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--blue);
  margin-bottom: 8px;
}
.post-card h3 { margin: 0 0 8px; font-size: 1.22rem; }
.post-card h3 a { color: var(--blue-deep); text-decoration: none; }
.post-card h3 a:hover { color: var(--blue); }
.post-card p.excerpt { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 14px; flex: 1; }
.post-card .post-meta { font-size: 0.82rem; color: var(--ink-soft); border-top: 1px solid var(--cream-deep); padding-top: 10px; }

/* ---------- Trust strip (home) ---------- */
.trust-strip { background: var(--cream-deep); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 28px 0; margin: 48px 0; }
.trust-strip .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.trust-strip .item h4 { margin: 0 0 6px; font-size: 1.05rem; }
.trust-strip .item p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- About page ---------- */
.about-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-bottom: 20px; }
.about-hero img { border-radius: var(--radius); box-shadow: var(--shadow); }
.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 24px 0 36px; }
.value-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.value-card h4 { margin-top: 0; color: var(--blue-deep); }
.value-card p { margin-bottom: 0; color: var(--ink-soft); font-size: 0.96rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-deep); color: #D7E6EA; margin-top: 50px; padding: 48px 0 24px; }
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-cols h4 { color: #fff; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 14px; font-family: "Segoe UI", sans-serif; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 9px; }
.footer-cols a { color: #C7DEE4; text-decoration: none; font-size: 0.92rem; }
.footer-cols a:hover { color: #fff; text-decoration: underline; }
.footer-cols p { color: #B7D0D7; font-size: 0.92rem; }
.site-footer .site-logo { color: #fff; }
.site-footer .site-logo span { color: var(--gold); }
.footer-fine {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  font-size: 0.82rem;
  color: #9FBAC1;
}
.footer-fine a { color: #C7DEE4; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
  aside.rail { position: static; }
  .home-hero .hero-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .values-grid, .contributor-cards { grid-template-columns: 1fr; }
  .about-hero { grid-template-columns: 1fr; }
  h1 { font-size: 2.1rem; }
  body { font-size: 18px; }
}

@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; }
  .find-care-cta input[type="text"] { width: 100%; }
}
