/* Sunny Path Family Care — theme.css
   Warm family-care service: cream ground, navy serif display, coral CTA,
   golden sun mark, sage/olive footer, soft pastel accents. */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,500;1,600&family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,600;0,6..12,700;0,6..12,800;1,6..12,400&display=swap');

/* ---------- Tokens ---------- */

:root {
  --brand-name: "Sunny Path Family Care";
  --brand-name-1: "Sunny Path";
  --brand-name-2: "Family Care";

  --color-bg: #fbf7ee;
  --color-surface: #ffffff;
  --color-surface-alt: #f4eee0;
  --color-ink: #27395c;
  --color-ink-muted: #6d7385;
  --color-brand: #ec6f52;
  --color-brand-deep: #d95c40;
  --color-on-brand: #ffffff;
  --color-accent: #7d8c55;
  --color-accent-deep: #5f6c40;
  --color-border: #efe8da;
  --color-link: #d95c40;

  /* Sunny extras (used by both theme + landing) */
  --color-sun: #eda829;
  --color-navy: #27395c;
  --color-sage-bg: #e9ecdc;
  --pastel-pink: #fbe3de;
  --pastel-blue: #dfe9f6;
  --pastel-gold: #fbf0d2;
  --pastel-lilac: #ece4f4;
  --pastel-green: #e2eddc;

  /* Traced brand mark (12-ray sun); masked so it recolors per surface */
  --brand-mark-sun: url("../../assets/img/sunny-path/brand-mark-sun.svg");

  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-accent: "Lora", Georgia, serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  /* Buttons in this theme are rounded rectangles, not pills (see mockup). */
  --radius-btn: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(39, 57, 92, 0.04);
  --shadow-md: 0 8px 22px rgba(39, 57, 92, 0.07);

  --container-max: 1140px;
  --section-pad: 5rem;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.22;
  color: var(--color-navy);
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }

a { color: var(--color-link); }

img { max-width: 100%; }

:focus-visible {
  outline: 3px solid rgba(236, 111, 82, 0.55);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 10;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

/* Sun glyph: the traced brand mark, painted through a mask so one asset
   serves the light header and the dark footer band */
.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
  background-color: var(--color-sun);
  -webkit-mask: var(--brand-mark-sun) center / contain no-repeat;
  mask: var(--brand-mark-sun) center / contain no-repeat;
}

/* Two-part lockup: "Sunny Path" over "FAMILY CARE" */
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.1;
  color: var(--color-navy);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-name::before {
  content: var(--brand-name-1);
  display: block;
}

.brand-name::after {
  content: var(--brand-name-2);
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.53em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-brand);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.nav-link {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-navy);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav-link:hover { color: var(--color-brand); }

.nav-link.is-active {
  color: var(--color-brand-deep);
  border-bottom-color: var(--color-brand);
}

/* Hamburger: hidden until the inline nav runs out of room (see the 960px
   block in Responsive). */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--color-navy);
  cursor: pointer;
}

.nav-toggle:hover { color: var(--color-brand); }

.nav-toggle-icon {
  width: 1.6rem;
  height: 1.6rem;
  display: block;
}

.nav-toggle-bar {
  transform-origin: center;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle.is-open .nav-toggle-bar--top { transform: translateY(5px) rotate(45deg); }

.nav-toggle.is-open .nav-toggle-bar--mid { opacity: 0; }

.nav-toggle.is-open .nav-toggle-bar--bottom { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.2;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--color-brand);
  color: var(--color-on-brand);
  box-shadow: 0 2px 6px rgba(236, 111, 82, 0.20);
}

.btn-primary:hover { background: var(--color-brand-deep); }

.btn-secondary {
  background: #ffffff;
  color: var(--color-navy);
  border-width: 1.5px;
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-navy);
  color: var(--color-navy);
}

.btn-small {
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
}

/* ---------- Sections ---------- */

.section { padding: var(--section-pad) 0; }

.section-alt { background: var(--color-surface-alt); }

.section-head {
  max-width: 640px;
  margin: 0 auto 2.75rem;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--color-ink-muted);
  font-size: 1.05rem;
}

/* ---------- Cards & media ---------- */

/* Cards stay airy: hairline border, no resting shadow. */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  box-shadow: var(--shadow-sm);
  border-color: #e4d9c2;
}

.card-media { display: block; }

.card-body {
  padding: 1.2rem 1.3rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.card-title {
  font-size: 1.15rem;
  margin: 0;
}

.card-text {
  color: var(--color-ink-muted);
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
}

.card-link {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--color-brand-deep);
  text-decoration: none;
  margin-top: 0.4rem;
}

.card-link::after { content: " \2192"; }

.card-link:hover { text-decoration: underline; }

/* CSS-painted imagery: warm golden-hour interior mood */
.media-ph {
  border-radius: 0;
  background:
    radial-gradient(120% 90% at 82% 20%, rgba(251, 240, 210, 0.9) 0%, transparent 55%),
    radial-gradient(90% 90% at 18% 85%, rgba(125, 140, 85, 0.35) 0%, transparent 60%),
    radial-gradient(70% 60% at 60% 65%, rgba(237, 168, 41, 0.28) 0%, transparent 65%),
    linear-gradient(155deg, #f2e4c8 0%, #e6d1ac 45%, #cfc39a 100%);
}

.media-ph--wide { aspect-ratio: 16 / 9; }
.media-ph--square { aspect-ratio: 1 / 1; }
.media-ph--tall { aspect-ratio: 3 / 4; }

/* Standalone media placeholders get soft rounding */
.post-hero .media-ph,
.prose .media-ph { border-radius: var(--radius-lg); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-accent-deep);
  color: #eef0e4;
  margin-top: var(--section-pad);
}

/* One balanced row: brand block is just the widest column, so no band of the
   footer sits empty. */
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.7fr 1.25fr 1.2fr;
  gap: 2.5rem;
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
}

.footer-col { display: flex; flex-direction: column; gap: 0.55rem; }

.footer-about { align-items: flex-start; }

.footer-about .brand { margin-bottom: 0.35rem; }

.site-footer .brand-name { color: #ffffff; }

/* Coral second line is unreadable on the olive footer; warm cream keeps the
   lockup's two-tone feel at 4.99:1. */
.site-footer .brand-name::after { color: var(--pastel-gold); }

.site-footer .brand-mark { background-color: #f6c65b; }

.footer-tagline {
  color: #cdd4b8;
  font-size: 0.95rem;
  margin: 0;
  max-width: 34ch;
}

.footer-heading {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f6c65b;
  margin: 0 0 0.35rem;
}

.footer-link {
  color: #e2e6d2;
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-link:hover { color: #ffffff; text-decoration: underline; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #c3cbaa;
  font-size: 0.88rem;
}

/* ---------- Dashboard ---------- */

.dash-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 2.5rem;
  padding-top: 2.5rem;
  align-items: start;
}

.dash-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  position: sticky;
  top: 1.5rem;
}

.dash-nav { display: flex; flex-direction: column; gap: 0.25rem; }

.dash-nav-link {
  display: block;
  padding: 0.6rem 0.95rem;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-ink-muted);
  text-decoration: none;
}

.dash-nav-link:hover {
  background: var(--pastel-gold);
  color: var(--color-navy);
}

.dash-nav-link.is-active {
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.dash-main { display: flex; flex-direction: column; gap: 1.75rem; }

.dash-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.25rem;
}

.page-sub {
  color: var(--color-ink-muted);
  margin: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--color-navy);
}

.stat-label {
  color: var(--color-ink-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.stat-delta {
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: 0.35rem;
}

.stat-delta.is-up { color: #4e7a3a; }
.stat-delta.is-down { color: var(--color-brand-deep); }
.stat-delta.is-info { color: #3f6398; }

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: #fdfbf5;
}

.panel-title { font-size: 1.15rem; margin: 0; }

.panel-body { padding: 1.5rem; }

/* Table */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th {
  text-align: left;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  padding: 0.6rem 0.9rem;
  border-bottom: 2px solid var(--color-border);
}

.table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr:hover { background: #fdf8ec; }

/* Badges */

.badge {
  display: inline-block;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-alt);
  color: var(--color-ink-muted);
}

.badge.is-success { background: var(--pastel-green); color: #40632e; }
.badge.is-warning { background: var(--pastel-gold); color: #8a5a10; }
.badge.is-info { background: var(--pastel-blue); color: #34568a; }

/* Activity */

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.activity-item:last-child { border-bottom: none; }

.activity-time {
  margin-left: auto;
  flex: none;
  color: var(--color-ink-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.avatar {
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--color-navy);
  background: linear-gradient(140deg, var(--pastel-gold), #f3d98d);
}

/* Forms */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.form-label {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--color-navy);
}

.form-input,
.form-select {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--color-ink);
  background: #ffffff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  max-width: 26rem;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(236, 111, 82, 0.18);
}

.form-actions {
  margin-top: 0.25rem;
  align-items: flex-start;
}

/* ---------- Blog post ---------- */

.post {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 3rem;
}

.post-header { text-align: center; margin-bottom: 2rem; }

.tag-list {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.tag {
  display: inline-block;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-accent-deep);
  background: var(--pastel-green);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
}

.tag:hover { background: #d4e3c9; }

.post-title {
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  margin-bottom: 0.5rem;
}

.post-excerpt {
  font-size: 1.15rem;
  color: var(--color-ink-muted);
  max-width: 56ch;
  margin: 0 auto 1.25rem;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: var(--color-ink-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.post-meta .avatar { width: 2.2rem; height: 2.2rem; font-size: 0.75rem; }

.post-meta-author { color: var(--color-navy); font-weight: 800; }

.post-hero { margin: 0 0 2.5rem; }

/* Prose */

.prose {
  font-size: 1.06rem;
  line-height: 1.75;
}

.prose h2 {
  font-size: 1.55rem;
  margin: 2.2em 0 0.6em;
}

.prose h3 {
  font-size: 1.2rem;
  margin: 1.8em 0 0.5em;
}

.prose p { margin: 0 0 1.15em; }

.prose a {
  color: var(--color-link);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(217, 92, 64, 0.4);
  text-underline-offset: 3px;
}

.prose a:hover { text-decoration-color: var(--color-link); }

.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.4em; }

.prose li { margin-bottom: 0.4em; }

.prose li::marker { color: var(--color-brand); font-weight: 800; }

.prose blockquote {
  margin: 1.75em 0;
  padding: 1.25rem 1.5rem;
  background: var(--pastel-gold);
  border-left: 5px solid var(--color-sun);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.prose blockquote p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--color-navy);
}

.prose figure { margin: 2em 0; }

.prose figcaption {
  text-align: center;
  color: var(--color-ink-muted);
  font-size: 0.88rem;
  margin-top: 0.7rem;
}

.prose code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.12em 0.4em;
  color: var(--color-brand-deep);
}

.prose pre {
  background: var(--color-navy);
  color: #f4f0e4;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.75em 0;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75em 0;
  font-size: 0.95rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.prose th {
  text-align: left;
  background: var(--pastel-green);
  color: var(--color-accent-deep);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.7rem 1rem;
}

.prose td {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--color-border);
}

.prose tbody tr:nth-child(even) { background: #fdfaf2; }

.prose hr {
  border: none;
  height: 4px;
  margin: 2.5em auto;
  width: 120px;
  border-radius: 999px;
  background:
    radial-gradient(circle, var(--color-sun) 0 3px, transparent 3.5px) 0 50% / 24px 100% repeat-x;
}

/* Author card */

.author-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  margin: 3rem 0 0;
}

.author-card .avatar { width: 3.4rem; height: 3.4rem; font-size: 1rem; }

.author-card-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--color-navy);
  margin-bottom: 0.25rem;
}

.author-card-bio {
  color: var(--color-ink-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Related posts */

.related-posts .section-head { text-align: left; margin-left: 0; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ---------- Blog photo imagery ----------
   Real photos layered over the painted gradients (which remain as fallback),
   graded gently warm so they sit in the sunny cream/sage palette. */

.post-hero .media-ph,
.prose figure .media-ph,
.related-grid .card:nth-child(1) .media-ph,
.related-grid .card:nth-child(2) .media-ph,
.related-grid .card:nth-child(3) .media-ph {
  background-size: cover;
  background-position: center;
  filter: sepia(0.12) saturate(1.08) brightness(1.02);
}

.post-hero .media-ph {
  background-image:
    url(../../assets/img/pack/blog-hero.webp),
    linear-gradient(155deg, #f2e4c8 0%, #e6d1ac 45%, #cfc39a 100%);
}

.prose figure .media-ph {
  background-image:
    url(../../assets/img/pack/blog-figure.webp),
    linear-gradient(155deg, #f2e4c8 0%, #e6d1ac 45%, #cfc39a 100%);
}

.related-grid .card:nth-child(1) .media-ph {
  background-image:
    url(../../assets/img/pack/blog-rel-1.webp),
    linear-gradient(155deg, #f2e4c8 0%, #e6d1ac 45%, #cfc39a 100%);
}

.related-grid .card:nth-child(2) .media-ph {
  background-image:
    url(../../assets/img/pack/blog-rel-2.webp),
    linear-gradient(155deg, #f2e4c8 0%, #e6d1ac 45%, #cfc39a 100%);
}

.related-grid .card:nth-child(3) .media-ph {
  background-image:
    url(../../assets/img/pack/blog-rel-3.webp),
    linear-gradient(155deg, #f2e4c8 0%, #e6d1ac 45%, #cfc39a 100%);
}

/* ---------- Responsive ---------- */

/* Below this width the six inline nav links plus the CTA wrap onto a second
   row, so the nav becomes a drawer that overlays the page from under the
   header instead of pushing the hero down. */
@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }

  .site-header-inner {
    flex-wrap: nowrap;
    gap: 1rem;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem 1.5rem 1.25rem;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 16px 30px rgba(39, 57, 92, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.75rem);
    transition: transform 0.22s ease, opacity 0.22s ease,
                visibility 0s linear 0.22s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: transform 0.22s ease, opacity 0.22s ease, visibility 0s;
  }

  .nav-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
  }

  .nav-cta {
    margin-top: 1.1rem;
    width: 100%;
    padding: 0.85rem 1.2rem;
    font-size: 0.98rem;
  }

  /* Sections tighten and the wide multi-column layouts halve or stack once the
     page loses the desktop gutters. */
  :root { --section-pad: 3.5rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }

  .dash-layout { grid-template-columns: 1fr; gap: 1.5rem; }

  .dash-sidebar { position: static; }

  .dash-nav { flex-direction: row; flex-wrap: wrap; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
  .site-nav,
  .site-nav.is-open,
  .nav-toggle-bar { transition: none; }
}

@media (max-width: 640px) {
  /* Text links become full-height rows so every footer/card action clears the
     44px tap-target minimum. */
  .card-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }

  .footer-link {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
  }

  /* The two legal links in the bottom bar sit either side of an inline
     "middot" separator, so blocking them out would strand the separator on a
     line of its own. They stay in the text flow and earn their tap height from
     padding instead. */
  .footer-bottom .footer-link {
    display: inline-block;
    min-height: 0;
    padding: 0.6rem 0;
  }

  .footer-col { gap: 0.15rem; }

  .footer-about { gap: 0.55rem; }

  .footer-grid { grid-template-columns: 1fr; row-gap: 2.5rem; }

  .stat-grid { grid-template-columns: 1fr; }

  .dash-header { align-items: flex-start; flex-direction: column; }

  .panel-body { padding: 1.1rem; }

  .panel-body .table { display: block; overflow-x: auto; }

  .activity-item { flex-wrap: wrap; }

  .activity-time { margin-left: 3.5rem; }
}
