/* Your Mindful Dog Hub — new-look member dashboard (dt-community-hub 3.29.0).
   Tokens and layout from the approved mockup (hub-redesign-spec-pack/index.html).
   Everything is scoped under .m4dh so nothing leaks into the rest of the site. */

body.m4dh-page { background: #f3eefb; }

.m4dh {
  --bg: #f3eefb;
  --bg-soft: #faf7fd;
  --card: #ffffff;
  --purple: #5b3a8c;
  --purple-deep: #4a2d74;
  --purple-mid: #6a4c89;
  --lilac: #a987c2;
  --lilac-label: #7a5aa0;            /* small uppercase labels: --lilac fails AA on white, so a darker lilac */
  --lilac-soft: #efe6f8;
  --lilac-mid: #d8c6ea;
  --border: #e4d7f2;
  --text: #2f243d;
  --text-muted: #6b5b7d;
  --gold-soft: #f8f0d8;
  --radius: 18px;
  --shadow-soft: 0 2px 10px rgba(91, 58, 140, 0.05);
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 0 40px;
  color: var(--text);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  box-sizing: border-box;
}
.m4dh *, .m4dh *::before, .m4dh *::after { box-sizing: border-box; }
.m4dh img { max-width: 100%; display: block; }
.m4dh h1, .m4dh h2, .m4dh h3 { font-family: "Fredoka", "Poppins", system-ui, sans-serif; letter-spacing: -0.01em; }
.m4dh a { color: var(--purple); }
.m4dh :focus-visible { outline: 3px solid #8f6cc0; outline-offset: 2px; border-radius: 8px; }
.m4dh .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* Preview bar (admins / testers only) */
.m4dh-preview { background: #fff8e1; border: 1px solid #ead9a0; color: #5c4510; border-radius: 12px; padding: 8px 14px; font-size: 13px; margin: 0 0 14px; }
.m4dh-preview a { color: #5c4510; font-weight: 600; }

/* Header */
.m4dh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin: 6px 2px 14px; }
.m4dh-head h1 { font-weight: 650; font-size: 32px; color: var(--purple); margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
.m4dh-lede { margin: 4px 0 0; color: var(--text-muted); font-size: 14px; }
.m4dh-head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.m4dh-account { display: flex; align-items: center; gap: 10px; }
.m4dh-account-meta { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.m4dh-account-meta .hello { font-family: "Fredoka", "Poppins", sans-serif; font-weight: 600; font-size: 17px; color: var(--purple); }
.m4dh-account-meta .sub { font-size: 12px; color: var(--text-muted); }
.m4dh-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: linear-gradient(145deg, #7a53b0, #5b3a8c); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(91,58,140,.25); flex-shrink: 0; }
.m4dh-avatar img { width: 100%; height: 100%; object-fit: cover; }
.m4dh-avatar svg { width: 24px; height: 24px; fill: #fff; }
/* 3.29.1: one circle per dog, each a link to that dog */
.m4dh-dogs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
a.m4dh-dog { text-decoration: none; color: #fff; transition: transform .15s, box-shadow .15s; }
a.m4dh-dog:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(91,58,140,.35); }
a.m4dh-dog:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.m4dh-dog-initial { font: 600 18px/1 "Fredoka", "Poppins", sans-serif; color: #fff; }
.m4dh-dog-more { font: 700 13px/1 "Poppins", system-ui, sans-serif; background: var(--lilac-soft); color: var(--purple); box-shadow: none; }
.m4dh-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.m4dh-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--lilac-soft); color: var(--purple); border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; text-decoration: none; }
.m4dh-badge.gold { background: var(--gold-soft); border-color: #ead9a0; color: #7a5a14; }
.m4dh-badge.alert { background: #fdecec; border-color: #f2c4c4; color: #8a2424; }

/* Nav */
.m4dh-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: flex-start; margin: 0 0 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px 14px; box-shadow: var(--shadow-soft); }
.m4dh-nav-group { min-width: 0; }
.m4dh-nav-dog { flex: 1 1 auto; }
.m4dh-nav-help { margin-left: auto; }
.m4dh-nav-label { display: block; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--lilac-label); margin: 0 0 7px 4px; }
.m4dh-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.m4dh-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--lilac-soft); color: var(--purple); border-radius: 999px; padding: 6px 11px; font-size: 12.5px; font-weight: 500; text-decoration: none; white-space: nowrap; line-height: 1.3; }
.m4dh-pill:hover { background: var(--lilac-mid); }
.m4dh-pill .ico { font-size: 14px; line-height: 1; }
.m4dh-pill.help { background: var(--purple); color: #fff; }
.m4dh-pill.help:hover { background: var(--purple-deep); }

/* 3.30.0: the same header + nav on every member page (DTCH_Hub2::shell_header) */
.m4dh.m4dh-shell { padding: 6px 0 0; margin-bottom: 20px; }
.m4dh-shell .m4dh-nav { margin-bottom: 0; }
/* 3.30.2: the hub name on every page looks exactly like the dashboard's <h1> (it is a <p>, as the page has its own heading) */
.m4dh-head .m4dh-title { font-family: "Fredoka", "Poppins", system-ui, sans-serif; font-weight: 650; font-size: 32px; color: var(--purple); margin: 0; padding: 0; line-height: 1.15; letter-spacing: -0.02em; }
.m4dh-head .m4dh-title a { color: inherit; text-decoration: none; }
.m4dh-head .m4dh-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
/* 3.30.3: an obvious way back to the dashboard on every other page */
.m4dh a.m4dh-back { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; background: var(--purple); color: #fff; border-radius: 999px; padding: 8px 16px 8px 12px; font: 600 13.5px/1.2 "Poppins", system-ui, sans-serif; text-decoration: none; box-shadow: 0 2px 8px rgba(91,58,140,.22); transition: background .15s, transform .15s; }
.m4dh a.m4dh-back:hover { background: var(--purple-deep); color: #fff; transform: translateY(-1px); }
.m4dh a.m4dh-back svg { width: 18px; height: 18px; flex-shrink: 0; display: block; }   /* stroke icon from DTCH_Nav, same as the top bar */
.m4dh-pill.is-current { background: var(--purple); color: #fff; }
.m4dh-pill.is-current:hover { background: var(--purple-deep); }

/* Layout */
.m4dh-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.m4dh-stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.m4dh-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 18px 18px 16px; }
.m4dh-card h2 { font-weight: 600; font-size: 18px; color: var(--purple); margin: 0 0 10px; line-height: 1.3; }
.m4dh-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.m4dh-card-head h2 { margin: 0; }
.m4dh-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--lilac-label); }
.m4dh-muted, .m4dh-note { margin: 0; font-size: 13px; color: var(--text-muted); }
.m4dh-error { color: #8a2424; font-size: 13px; margin: 8px 0 0; }

/* Buttons */
.m4dh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; padding: 9px 16px; font: 600 13px/1.2 "Poppins", system-ui, sans-serif; border: 1.5px solid var(--purple); background: var(--purple); color: #fff; white-space: nowrap; text-decoration: none; cursor: pointer; }
.m4dh-btn:hover { background: var(--purple-deep); border-color: var(--purple-deep); color: #fff; }
.m4dh-btn.full { width: 100%; }
.m4dh-btn.ghost { background: #fff; color: var(--purple); }
.m4dh-btn.ghost:hover { background: var(--lilac-soft); color: var(--purple); }
.m4dh-btn.soft { background: var(--lilac-soft); color: var(--purple); border-color: transparent; }
.m4dh-btn.soft:hover { background: var(--lilac-mid); color: var(--purple); }
.m4dh-btn.soft.is-liked { background: var(--purple); color: #fff; }
.m4dh-btn.tick { background: #fff; color: var(--purple); border-color: var(--lilac-mid); }
.m4dh-btn.tick:hover { border-color: var(--purple); }
.m4dh-tickbox { width: 16px; height: 16px; border: 1.5px solid var(--purple); border-radius: 4px; background: #fff; flex-shrink: 0; position: relative; }
.m4dh-btn.tick.is-done { background: var(--lilac-soft); border-color: var(--purple); }
.m4dh-btn.tick.is-done .m4dh-tickbox { background: var(--purple); }
.m4dh-btn.tick.is-done .m4dh-tickbox::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.m4dh-btn.is-done[disabled] { background: var(--lilac-soft); color: var(--purple); border-color: var(--lilac-mid); cursor: default; }
.m4dh-btn[aria-busy="true"] { opacity: .65; }

/* This week */
.m4dh-week { padding: 0; overflow: hidden; }
.m4dh-week-top { display: grid; grid-template-columns: minmax(0, 1fr); }
.m4dh-week.has-img .m4dh-week-top { grid-template-columns: minmax(0, 1fr) 220px; }
.m4dh-week-copy { padding: 20px 22px 8px; }
.m4dh-week-copy h2 { font-size: 20px; }
.m4dh-theme-title { font-family: "Fredoka", "Poppins", sans-serif; font-weight: 600; font-size: 22px; color: var(--purple-deep); margin: 8px 0; line-height: 1.25; }
.m4dh-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.m4dh-step { background: var(--lilac-soft); color: var(--purple); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600; }
.m4dh-week-photo { min-height: 180px; }
.m4dh-week-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
/* 3.29.1: the photo runs down the whole right side, so the tip sits straight under
   the three steps instead of waiting for the bottom of the picture. */
.m4dh-week.has-img { display: grid; grid-template-columns: minmax(0, 1fr) 220px; }
.m4dh-week.has-img .m4dh-week-top { display: contents; }
.m4dh-week.has-img .m4dh-week-copy { grid-column: 1; grid-row: 1; }
.m4dh-week.has-img .m4dh-week-body { grid-column: 1; grid-row: 2; }
.m4dh-week.has-img .m4dh-week-photo { grid-column: 2; grid-row: 1 / span 2; position: relative; min-height: 0; }
.m4dh-week.has-img .m4dh-week-photo img { position: absolute; inset: 0; }
.m4dh-week.has-img .m4dh-steps { margin-bottom: 4px; }
.m4dh-week-body { padding: 4px 22px 18px; }
.m4dh-tip, .m4dh-challenge { margin-top: 12px; }
.m4dh-kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--purple); margin: 0 0 4px; }
.m4dh-tip p, .m4dh-challenge p { margin: 0; font-size: 14px; }
.m4dh-challenge-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.m4dh-challenge-row .m4dh-challenge { flex: 1; min-width: 0; }
.m4dh-challenge-row .m4dh-btn { margin-top: 12px; }

/* Featured: DTCH_Featured's own markup (author row, text, image), re-ordered to
   image / title / text as in the mockup. Flex order does it, so the strip's
   own code is untouched. A tall picture (a book cover) sits whole on a dark mat. */
.m4dh-featured .dtchd-featured { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.m4dh-featured .dtchd-featured-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.m4dh-featured .dtchd-featured-head h3 { font-family: "Fredoka", "Poppins", sans-serif; font-weight: 600; font-size: 18px; color: var(--purple); margin: 0; }
.m4dh-featured .dtchd-featured-head h3::after { content: "From the library"; margin-left: 10px; font: 600 11px/1 "Poppins", system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--lilac-label); }
.m4dh-featured .dtchd-featured-nav button { background: var(--lilac-soft); color: var(--purple); border: 0; border-radius: 999px; width: 30px; height: 30px; font-size: 18px; cursor: pointer; }
/* 3.29.1: a carousel again, as on the current dashboard — the ‹ › arrows are ui.js's own. */
.m4dh-featured .dtchd-featured-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 0 2px; margin: 0; }
.m4dh-featured .dtchd-featured-track::-webkit-scrollbar { display: none; }
.m4dh-featured .dtchd-feat { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: var(--text); text-decoration: none; overflow: hidden; flex: 0 0 46%; min-width: 220px; max-width: 320px; width: auto; scroll-snap-align: start; padding: 0; margin: 0; box-shadow: none; }
.m4dh-featured .dtchd-feat-img { order: 1; display: block; height: 200px; margin: 0; border-radius: 0; background-color: #1e1233; background-size: contain; background-position: center; background-repeat: no-repeat; }
.m4dh-featured .dtchd-feat-text { order: 2; display: block; padding: 12px 14px 4px; color: var(--purple-deep); font: 600 15px/1.35 "Fredoka", "Poppins", sans-serif; }
.m4dh-featured .dtchd-feat-top { order: 3; display: flex; align-items: center; gap: 6px; padding: 0 14px 12px; font-size: 12px; color: var(--text-muted); }
.m4dh-featured .dtchd-feat-av { width: 20px; height: 20px; border-radius: 50%; }
.m4dh-featured .dtchd-feat-name { color: var(--text-muted); font-weight: 500; }
.m4dh-featured .dtchd-feat-date { display: inline; }
.m4dh-featured .dtchd-feat-date::before { content: " · "; }

/* Wins */
.m4dh-wins-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: stretch; }
.m4dh-wins-row.only-share { grid-template-columns: 1fr; }
.m4dh-win { margin: 0; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 12px 12px 11px; }
.m4dh-win blockquote { margin: 0; padding: 0; border: 0; }
.m4dh-win p { margin: 0; font-size: 13px; font-style: italic; line-height: 1.45; color: var(--text); }
.m4dh-win figcaption { margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.m4dh-share-win { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 110px; padding: 12px; border: 1.5px dashed var(--lilac); border-radius: 14px; background: #fcfaff; color: var(--purple); font: 600 13px/1.3 "Poppins", system-ui, sans-serif; text-align: center; cursor: pointer; }
.m4dh-share-win:hover { background: var(--lilac-soft); }
.m4dh-wins-row.only-share .m4dh-share-win { flex-direction: row; min-height: 56px; }
.m4dh-share-win .plus { width: 28px; height: 28px; border-radius: 50%; background: var(--lilac-soft); display: grid; place-items: center; font-size: 18px; line-height: 1; }
.m4dh-wins-more { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }   /* 3.29.1: the rest of the wins, behind "See more wins" */
.m4dh-wins-more[hidden] { display: none; }
.m4dh-wins-toggle { text-align: center; margin: 12px 0 0; }

/* Feed */
.m4dh-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: -4px 0 14px; }
.m4dh-tab { padding: 6px 14px 10px; font-size: 14px; font-weight: 600; color: var(--text-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.m4dh-tab.active, .m4dh-tab:hover { color: var(--purple); border-bottom-color: var(--purple); }
.m4dh .m4dh-post { padding: 0 0 4px; margin: 0; border: 0; background: none; box-shadow: none; }
.m4dh .m4dh-post + .m4dh-post { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.m4dh-post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.m4dh-post-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--lilac-soft); }
.m4dh-post-who { font-weight: 600; font-size: 13.5px; }
.m4dh-post-who > span { display: block; font-weight: 400; color: var(--text-muted); font-size: 12px; }
.m4dh-post h3 { font-weight: 600; font-size: 18px; color: var(--purple-deep); margin: 0 0 8px; line-height: 1.3; }
.m4dh-post h3 a { color: inherit; text-decoration: none; }
.m4dh-post h3 a:hover { text-decoration: underline; }
.m4dh-post .dtc-text { margin: 0 0 10px; font-size: 14px; }
.m4dh-post-media { margin: 4px 0 12px; border-radius: 14px; overflow: hidden; }
.m4dh-post-media { background: var(--lilac-soft); }
.m4dh-post-media img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; }   /* 3.29.1: the whole picture, never cropped */
.m4dh-feed-more { text-align: center; margin: 14px 0 0; }
.m4dh-post-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.m4dh-comments-link { font-size: 13px; font-weight: 600; text-decoration: none; }
.m4dh-report { margin-left: auto; background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 13px; }

/* Streak */
.m4dh-streak-num { font-family: "Fredoka", "Poppins", sans-serif; font-weight: 650; font-size: 28px; color: var(--purple); line-height: 1.1; margin: 2px 0 4px; }
.m4dh-streak-num.small { font-size: 22px; }
.m4dh-streak-num span { font-size: 15px; font-weight: 500; color: var(--text-muted); }
.m4dh-spark { width: 100%; height: 48px; margin: 10px 0 2px; display: block; }
.m4dh-spark .line { fill: none; stroke: #5b3a8c; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m4dh-spark .fill { fill: rgba(91, 58, 140, .12); }
.m4dh-days { display: grid; grid-template-columns: repeat(21, 1fr); gap: 3px; margin: 10px 0 12px; }
.m4dh-day { aspect-ratio: 1; border-radius: 3px; background: var(--lilac-soft); display: block; }
.m4dh-day.on { background: var(--purple); }
.m4dh-day.today { background: #fff; border: 1.5px solid var(--purple); }

/* Quiz */
.m4dh-quiz-intro { font-size: 13.5px; margin: 0 0 10px; }
.m4dh-quiz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m4dh-quiz-opt { position: relative; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 10px; text-align: left; color: var(--purple-deep); font: 600 12.5px/1.3 "Poppins", system-ui, sans-serif; display: flex; flex-direction: column; gap: 5px; min-height: 76px; cursor: pointer; }
.m4dh-quiz-opt:hover { border-color: var(--lilac); background: #fff; }
.m4dh-quiz-opt .qi { font-size: 20px; line-height: 1; }
/* 3.34.0: dog page (modules/dogpage) - the dashboard's "Next step" card */
.m4dd-next-card h2 { margin-bottom: 8px; }
a.m4dd-next { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin-top: 8px; border-radius: 12px; background: var(--lilac-soft); text-decoration: none; color: var(--text); }
a.m4dd-next:hover { background: var(--lilac-mid); }
.m4dd-next .k { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--lilac-label); }
.m4dd-next .v { font: 600 15px/1.3 "Fredoka", "Poppins", sans-serif; color: var(--purple-deep); }
.m4dd-next .go { font-size: 12.5px; font-weight: 600; color: var(--purple); }


/* 3.33.0: weekly check-in on a pathway week, saved into the Dog Journey */
.m4dh-checkin { margin-top: 0; grid-column: 2; }   /* under the lesson, not in the week list's column */
.m4dh-checkin-done { background: #eafaf0; border: 1px solid #bfe6cd; color: #1f5c3a; border-radius: 10px; padding: 7px 12px; font-size: 13px; margin: 0 0 12px; }
.m4dh-checkin-dog { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.m4dh-checkin-name { font-family: "Fredoka", "Poppins", system-ui, sans-serif; font-weight: 600; font-size: 16px; color: var(--purple-deep); margin: 0 0 6px; padding: 0; }
.m4dh-checkin-trend { margin: 0; padding-left: 18px; font-size: 13.5px; }
.m4dh-checkin-again summary { cursor: pointer; color: var(--purple); font-weight: 600; font-size: 13.5px; margin: 4px 0 12px; }
.m4dh-scale { margin: 0 0 12px; }
.m4dh-scale-q { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.m4dh-scale-q .m4dh-muted { font-weight: 400; font-size: 12px; }
.m4dh-scale-row { display: flex; flex-wrap: wrap; gap: 5px; }
.m4dh-scale-row label { position: relative; }
.m4dh-scale-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.m4dh-scale-row span { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border-radius: 999px; background: var(--lilac-soft); color: var(--purple); font-weight: 600; font-size: 13px; cursor: pointer; border: 1.5px solid transparent; }
.m4dh-scale-row label:hover span { background: var(--lilac-mid); }
.m4dh-scale-row input:checked + span { background: var(--purple); color: #fff; }
.m4dh-scale-row input:focus-visible + span { outline: 3px solid #8f6cc0; outline-offset: 2px; }
.m4dh-scale-ends { display: flex; justify-content: space-between; max-width: 420px; margin: 4px 0 0; font-size: 11.5px; color: var(--text-muted); }

/* 3.32.0: "Suggested for Maggie", read from the Dog Journey */
.m4dh-suggest { background: var(--lilac-soft); border: 1px solid var(--lilac-mid); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; }
.m4dh-suggest p { margin: 0; }
.m4dh-suggest-for { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--lilac-label); }
.m4dh-suggest-path { font-family: "Fredoka", "Poppins", system-ui, sans-serif; font-weight: 600; font-size: 18px; color: var(--purple-deep); margin: 2px 0 4px !important; }
.m4dh-suggest-why { font-size: 13px; color: var(--text-muted); margin-bottom: 10px !important; }
.m4dh-suggest-invite, .m4dh-suggest-support { font-size: 13px; color: var(--text); margin-top: 8px !important; }
.m4dh-suggest-support { background: #fff8e1; border: 1px solid #ead9a0; border-radius: 10px; padding: 7px 10px; color: #5c4510; }
.m4dh-suggest-support a { color: #5c4510; font-weight: 600; }
.m4dh-quiz-opt.is-suggested { border-color: var(--purple); }
.m4dh-quiz-in { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 700; color: var(--purple); background: var(--lilac-soft); border-radius: 999px; padding: 1px 7px; }

/* Pathways */
.m4dh-path { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 12px 13px 13px; }
.m4dh-path + .m4dh-path { margin-top: 10px; }
.m4dh-path h3 { margin: 0 0 2px; font-size: 15px; font-weight: 600; color: var(--purple); }
.m4dh-path-week { font-size: 12.5px; color: var(--text-muted); margin: 0 0 8px; }
.m4dh-bar { height: 8px; background: var(--lilac-mid); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.m4dh-bar > i { display: block; height: 100%; min-width: 0; background: linear-gradient(90deg, #6a4c89, #5b3a8c); border-radius: 999px; }
.m4dh-explore { display: block; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--purple-mid); text-decoration: none; }

/* Q&A */
.m4dh-anon { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--lilac-label); margin: -4px 0 8px; }
.m4dh-qa-list { display: flex; flex-direction: column; gap: 10px; }
.m4dh-qa-item { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px 10px; }
.m4dh-qa-item .q { font-weight: 600; font-size: 13px; color: var(--purple-deep); margin: 0 0 4px; }
.m4dh-qa-item .a, .m4dh-qa-item .a p { margin: 0; font-size: 12.5px; }
.m4dh-qa-item .a p + p { margin-top: 6px; }

/* Live */
.m4dh-live-date { display: flex; gap: 12px; align-items: center; margin: 8px 0 10px; }
.m4dh-cal { width: 58px; flex-shrink: 0; background: var(--purple); color: #fff; border-radius: 12px; text-align: center; overflow: hidden; }
.m4dh-cal .mon { background: var(--purple-deep); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 0 3px; }
.m4dh-cal .num { font-family: "Fredoka", "Poppins", sans-serif; font-size: 24px; font-weight: 650; line-height: 1; padding: 6px 0 2px; }
.m4dh-cal .dow { font-size: 10px; padding-bottom: 6px; }
.m4dh-live-when { font-size: 13.5px; }
.m4dh-live-when strong { display: block; color: var(--purple-deep); font-size: 14.5px; }
.m4dh-live-when span { color: var(--text-muted); font-size: 12.5px; }
.m4dh-live-note, .m4dh-live-note p { margin: 0 0 12px; font-size: 13px; }

/* Blog */
.m4dh-blog-list { display: flex; flex-direction: column; }
.m4dh-blog-item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 0; text-decoration: none; color: inherit; }
.m4dh-blog-item + .m4dh-blog-item { border-top: 1px solid var(--border); }
.m4dh-blog-thumb { width: 56px; height: 56px; border-radius: 10px; background: center/cover no-repeat var(--lilac-soft); }
.m4dh-blog-thumb.g { background-image: linear-gradient(145deg, #d7c4f0, #8e6bb5); }
.m4dh-blog-item .t { display: block; font-size: 13px; font-weight: 600; color: var(--purple-deep); line-height: 1.35; }
.m4dh-blog-item:hover .t { text-decoration: underline; }
.m4dh-blog-item .when { font-size: 11px; color: var(--text-muted); }

/* Dialogs */
.m4dh-dlg { border: 0; border-radius: 18px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(47, 36, 61, .3); color: var(--text); font-family: "Poppins", system-ui, sans-serif; }
.m4dh-dlg::backdrop { background: rgba(47, 36, 61, .45); }
.m4dh-dlg-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 4px 8px; z-index: 2; }
.m4dh-dlg-body { padding: 18px; }
.m4dh-form { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.m4dh-form h2 { font-family: "Fredoka", "Poppins", sans-serif; font-weight: 600; font-size: 20px; color: var(--purple); margin: 0; }
.m4dh-form label { font-size: 13px; font-weight: 600; color: var(--purple-deep); }
.m4dh-form textarea { width: 100%; border: 1px solid var(--lilac-mid); border-radius: 12px; padding: 10px 12px; font: 14px/1.5 "Poppins", system-ui, sans-serif; color: var(--text); resize: vertical; }
.m4dh-form .m4dh-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; color: var(--text); }
.m4dh-form .m4dh-check input { margin-top: 3px; accent-color: var(--purple); }
.m4dh-form .m4dh-btn { align-self: flex-start; }
.m4dh-form-done p { margin: 0; padding: 10px 12px; background: var(--lilac-soft); border-radius: 12px; color: var(--purple-deep); font-weight: 600; }

/* Pathway page */
.m4dh-pathway { padding-top: 10px; }
.m4dh-back { font-weight: 600; text-decoration: none; }
.m4dh-pathway > .m4dh-card { margin-bottom: 16px; }
.m4dh-path-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.m4dh-weeks ol { list-style: none; margin: 0; padding: 0; }
.m4dh-weeks li a { display: flex; gap: 8px; align-items: center; padding: 7px 6px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 13.5px; }
.m4dh-weeks li a:hover { background: var(--lilac-soft); }
.m4dh-weeks li.is-here a { background: var(--lilac-soft); color: var(--purple-deep); font-weight: 600; }
.m4dh-weeks .n { width: 24px; height: 24px; border-radius: 50%; background: var(--lilac-soft); color: var(--purple); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.m4dh-weeks li.is-done .n { background: var(--purple); color: #fff; }
.m4dh-week-page h2 { font-size: 24px; color: var(--purple-deep); margin: 4px 0 12px; }
.m4dh-week-content { margin-bottom: 16px; }

/* Responsive — stack at 960, tighter at 720, smaller type at 420 */
@media (max-width: 960px) {
  .m4dh-layout { grid-template-columns: 1fr; }
  .m4dh-week.has-img .m4dh-week-top { grid-template-columns: 1fr; }
  .m4dh-week-photo { height: 180px; min-height: 0; order: 2; }
  .m4dh-week.has-img { grid-template-columns: 1fr; }
  .m4dh-week.has-img .m4dh-week-photo { grid-column: 1; grid-row: 2; height: 180px; }
  .m4dh-week.has-img .m4dh-week-body { grid-row: 3; }
  .m4dh-path-layout { grid-template-columns: 1fr; }
  .m4dh-checkin { grid-column: auto; }
}
@media (max-width: 720px) {
  .m4dh { padding: 4px 0 30px; }
  .m4dh-head { align-items: flex-start; }
  .m4dh-head h1, .m4dh-head .m4dh-title { font-size: 26px; }
  .m4dh-head-side { align-items: flex-start; width: 100%; }
  .m4dh-account { flex-direction: row-reverse; }
  .m4dh-account-meta { text-align: left; }
  .m4dh-badges { justify-content: flex-start; }
  .m4dh-nav { flex-direction: column; gap: 12px; padding: 10px 12px 12px; }
  .m4dh-nav-help { margin-left: 0; }
  .m4dh-wins-row, .m4dh-wins-more { grid-template-columns: 1fr; }
  .m4dh-featured .dtchd-feat { flex-basis: 78%; }
  .m4dh-dogs { justify-content: flex-start; flex-wrap: nowrap; gap: 0; flex-shrink: 0; }
  .m4dh-dogs .m4dh-avatar { width: 40px; height: 40px; border: 2px solid #fff; }
  .m4dh-dogs .m4dh-avatar + .m4dh-avatar { margin-left: -8px; }
  .m4dh-share-win { min-height: 56px; flex-direction: row; }
  .m4dh-challenge-row { display: block; }
  .m4dh-challenge-row .m4dh-btn { width: 100%; }
  .m4dh-card { padding: 16px 14px 14px; }
  .m4dh-week { padding: 0; }
  .m4dh-week-copy { padding: 16px 16px 6px; }
  .m4dh-week-body { padding: 4px 16px 16px; }
}
@media (max-width: 420px) {
  .m4dh-head h1, .m4dh-head .m4dh-title { font-size: 24px; }
  .m4dh-theme-title { font-size: 19px; }
  .m4dh-quiz-opt { min-height: 80px; }
}
@media (prefers-reduced-motion: reduce) { .m4dh * { transition: none !important; animation: none !important; } }

/* "Show more" / "Show less" — the same expanded-class toggle the feed uses */
.m4dh .dtc-post .dtc-post-more { display: none; }
.m4dh .dtc-post.expanded .dtc-post-more { display: block; margin: 0 0 10px; font-size: 14px; }
.m4dh .dtc-post.expanded .dtc-post-body { display: none; }
.m4dh .dtc-readless-wrap { margin: 6px 0 0; }
.m4dh .dtc-comments { display: none; margin-top: 10px; }
.m4dh .dtc-comment-form textarea { width: 100%; border: 1px solid var(--lilac-mid); border-radius: 12px; padding: 8px 10px; font: 14px/1.5 "Poppins", system-ui, sans-serif; }
.m4dh .dtc-comment-form .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
