/* ============================================================
   SoloSage — shared design system
   Calm, dignified palette: deep teal + warm ivory (NOT PawsHush purple)
   Fonts: Lora (serif, headings) + Inter (sans, body) — same pairing
   convention as sister sites, generous sizing for a 55+ audience
   ============================================================ */

:root {
  --primary: #0f5257;       /* deep teal */
  --primary-dark: #0a3a3e;
  --accent: #b98a4e;        /* warm brass/gold accent — decorative use only, fails AA for text */
  --accent-text: #8a6534;   /* darkened accent for text use — meets WCAG AA on --bg */
  --bg: #faf6ee;            /* warm ivory */
  --surface: #ffffff;
  --text: #24312f;
  --muted: #5c6b68;
  --border: #e3dbc9;
  --green: #4b7f52;         /* affirming / positive */
  --pill-bg: #e7f0ee;
  --danger-bg: #fbeceb;
  --danger-text: #8a3a32;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 18px;
}
a { text-decoration: none; color: var(--primary); }
a:hover { text-decoration: underline; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; font-size: 16px; }

/* Visible focus states for keyboard/switch-device navigation (WCAG 2.4.7) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
h1, h2, h3 { font-family: 'Lora', serif; color: var(--primary-dark); line-height: 1.3; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; margin-bottom: 0.6em; }
h3 { font-size: 1.25rem; }
p { margin-bottom: 1em; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* HEADER / NAV */
header.site-header {
  background: var(--surface);
  box-shadow: 0 1px 8px rgba(15, 82, 87, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo span { font-family: 'Lora', serif; font-weight: 600; font-size: 22px; color: var(--primary); }
.main-nav ul { display: flex; gap: 22px; }
.main-nav ul li a { font-weight: 500; color: var(--text); font-size: 16px; padding: 10px 2px; display: inline-block; }
.main-nav ul li a.active { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }
.main-nav ul li a:hover { color: var(--primary); }
.hamburger { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: none; cursor: pointer; }
.hamburger span { width: 24px; height: 2px; background: var(--text); }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .main-nav.open { display: block; position: absolute; top: 72px; left: 0; right: 0; background: var(--surface); padding: 16px 24px; box-shadow: 0 8px 16px rgba(0,0,0,0.08); }
  .main-nav.open ul { flex-direction: column; gap: 14px; }
  .hamburger { display: flex; }
}

/* HERO */
.hero {
  background: linear-gradient(160deg, #faf6ee 0%, #e7f0ee 100%);
  padding: 72px 24px;
}
.hero-inner { max-width: 1160px; margin: 0 auto; display: flex; gap: 56px; align-items: center; flex-wrap: wrap; }
.hero-text { flex: 1; min-width: 280px; }
.hero-text h1 { margin-bottom: 0.4em; }
.hero-text p.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.hero-buttons { display: flex; gap: 14px; margin: 24px 0 12px; flex-wrap: wrap; }
.btn-primary, .btn-outline {
  display: inline-block; padding: 14px 26px; border-radius: 10px; font-weight: 600; font-size: 16px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-outline { border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--pill-bg); text-decoration: none; }
.trust-line { font-size: 14px; color: var(--muted); }
.hero-illustration { flex: 1; min-width: 280px; }
.hero-photo-frame { position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 40px rgba(15,82,87,0.15); }
.hero-photo-frame img { border-radius: 20px; }

/* PATHWAYS ROUTER */
.pathways { padding: 64px 24px; text-align: center; }
.pathways-inner { max-width: 1000px; margin: 0 auto; }
.pathways p.sub { color: var(--muted); margin-bottom: 36px; }
.pathway-cards { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.pathway-card {
  display: block; background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px;
  padding: 36px 28px; text-align: center; flex: 1; min-width: 240px; max-width: 320px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.pathway-card:hover { border-color: var(--primary); box-shadow: 0 12px 24px rgba(15,82,87,0.12); transform: translateY(-2px); text-decoration: none; }
.pathway-card .emoji { font-size: 2.2rem; margin-bottom: 12px; }
.pathway-card h3 { margin-bottom: 8px; }
.pathway-card p { color: var(--muted); font-size: 15px; margin-bottom: 0; }

/* SECTION GENERIC */
.section { padding: 56px 24px; }
.section-alt { background: var(--surface); }

/* CATEGORY / ARTICLE GROUPS (hub) */
.art-group { padding: 40px 0; border-top: 1px solid var(--border); }
.group-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.group-emoji { font-size: 1.4rem; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.article-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px;
  transition: box-shadow .2s, transform .2s;
}
.article-card:hover { box-shadow: 0 10px 20px rgba(15,82,87,0.1); transform: translateY(-2px); }
.article-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.article-card h3 a { color: var(--primary-dark); }
.article-card p { font-size: 14px; color: var(--muted); margin-bottom: 0; }
.coming-soon { opacity: 0.55; font-size: 13px; font-style: italic; color: var(--muted); padding: 10px 0; }

/* ARTICLE PAGE */
.article-header { max-width: 720px; margin: 0 auto; padding: 56px 24px 0; text-align: left; }
.category-pill {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  background: var(--pill-bg); color: var(--primary); padding: 5px 14px; border-radius: 20px; margin-bottom: 18px;
}
.article-title { margin-bottom: 10px; }
.article-meta { color: var(--muted); font-size: 14px; }
.article-body { max-width: 720px; margin: 0 auto; padding: 32px 24px 56px; }
.article-body h2 { margin-top: 1.4em; }
.article-body ul, .article-body ol { margin: 0 0 1em 1.4em; list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: .5em; }
.disclaimer-box {
  background: var(--danger-bg); color: var(--danger-text); border-radius: 10px; padding: 16px 20px; font-size: 14.5px; margin: 24px 0;
}
.tip-box { background: var(--pill-bg); border-left: 4px solid var(--primary); border-radius: 8px; padding: 16px 20px; margin: 24px 0; }
.related-section { max-width: 900px; margin: 0 auto; padding: 32px 24px 64px; }
.related-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; margin-top: 16px; }
.related-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }

/* GUIDES */
.guide-wrap { max-width: 760px; margin: 0 auto; padding: 48px 24px 64px; }
.pillar-badge { display: inline-block; background: var(--pill-bg); color: var(--primary); font-size: 13px; font-weight: 600; padding: 5px 14px; border-radius: 20px; margin-bottom: 14px; }
.step { display: flex; gap: 18px; padding: 22px 0; border-top: 1px solid var(--border); }
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.step-tag { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-text); font-weight: 700; margin-bottom: 4px; }
.step-link { font-weight: 600; }

/* TOOL (care team builder etc.) */
.tool-wrap { max-width: 900px; margin: 0 auto; padding: 48px 24px 64px; }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 26px; margin-bottom: 18px; }
.tool-card input[type=text], .tool-card select, .tool-card textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 16px; margin-bottom: 10px;
}
.tool-card label { font-weight: 600; font-size: 16px; display: block; margin-bottom: 4px; }
.btn-small { background: var(--primary); color: #fff; border: none; padding: 9px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn-small.secondary { background: transparent; color: var(--danger-text); }

/* FORMS (contact etc.) */
form.simple-form input, form.simple-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 16px; margin-bottom: 14px;
}
form.simple-form label { font-weight: 600; display: block; margin-bottom: 6px; }

/* FOOTER */
footer { background: var(--primary-dark); color: #dce9e8; padding: 56px 24px 24px; margin-top: 48px; }
.footer-grid { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 32px; }
.footer-col h4 { color: #fff; font-family: 'Lora', serif; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #b9d3d0; font-size: 14px; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { max-width: 1160px; margin: 32px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 13px; color: #93b3b0; text-align: center; }

@media (max-width: 700px) {
  h1 { font-size: 1.9rem; }
  .hero { padding: 48px 20px; }
}

/* ============================================================
   v1.01 additions — nav density, hub jump-nav, print (additive)
   ============================================================ */

/* Slightly denser nav between 861-1020px so 5 items + language switcher fit */
@media (min-width: 861px) and (max-width: 1020px) {
  .main-nav ul { gap: 14px; }
  .main-nav ul li a { font-size: 15px; }
}

/* Consistent card hover for related-article cards (matches .article-card) */
.related-card { transition: box-shadow .2s, transform .2s; }
.related-card:hover { box-shadow: 0 10px 20px rgba(15,82,87,0.1); transform: translateY(-2px); }

/* Sticky category jump-nav on the article hubs */
.cat-jump-nav { position: sticky; top: 72px; z-index: 90; background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 24px; }
.cat-jump-nav ul { display: flex; gap: 10px; max-width: 1160px; margin: 0 auto; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cat-jump-nav a { display: inline-block; white-space: nowrap; font-size: 14px; font-weight: 600; background: var(--pill-bg); color: var(--primary); padding: 6px 14px; border-radius: 20px; }
.cat-jump-nav a:hover { background: var(--primary); color: #fff; text-decoration: none; }

/* Anchored category sections land below sticky header + jump-nav */
.art-group { scroll-margin-top: 140px; }

/* HOMEPAGE "WHAT YOU'LL FIND HERE" OVERVIEW GRID (v1.02 addition) */
.overview-section { padding: 0 24px 56px; }
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1160px;
  margin: 0 auto;
}
.overview-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 20px;
  text-align: center;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.overview-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(15,82,87,0.1);
  transform: translateY(-2px);
  text-decoration: none;
}
.overview-icon { font-size: 1.9rem; margin-bottom: 10px; }
.overview-card h3 { font-size: 1.05rem; margin-bottom: 6px; color: var(--primary-dark); }
.overview-card p { color: var(--muted); font-size: 14px; margin-bottom: 0; }

@media (max-width: 1020px) {
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .overview-grid { grid-template-columns: 1fr; }
  .overview-section { padding: 0 20px 40px; }
}

/* ARTICLE / TOOL BANNER IMAGE (v1.02 addition) */
.article-banner {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

/* Print: checklists and articles print clean, without site chrome */
@media print {
  header.site-header, footer, .hamburger, .cat-jump-nav, .hero-buttons, .btn-primary, .btn-outline, .btn-small { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { background: none; padding: 24px 0; }
  a { color: #000; }
}

/* ============================================================
   v1.02 additions — numbered article cards, subtopic filter pills,
   checklist-generator callout (additive; article-card layout untouched)
   ============================================================ */

.article-card { position: relative; }
.card-num {
  position: absolute; top: -12px; left: -12px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 82, 87, 0.25);
}

.subtopic-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.subtopic-filters button {
  background: var(--pill-bg); color: var(--primary); border: none; border-radius: 20px;
  padding: 7px 15px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.subtopic-filters button:hover { background: var(--border); }
.subtopic-filters button.active { background: var(--primary); color: #fff; }

.checklist-callout {
  background: var(--pill-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 20px; margin: 20px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.checklist-callout p { margin: 0; }

@media print {
  .subtopic-filters, .checklist-callout, .card-num { display: none !important; }
}
