/* Grief Resources — frontend.
   Colors come from CSS vars set per scheme. Mobile-first responsive. */
.gr-library{font-family:inherit;color:var(--gr-text);-webkit-text-size-adjust:100%;width:100%;max-width:none}
.gr-empty{color:#6b7280;text-align:center;padding:30px 0}

/* Long pages: let the browser skip offscreen section rendering (CPU saver) */
.gr-section{content-visibility:auto;contain-intrinsic-size:auto 480px}

/* ---------- Filter pills: wrap on desktop, swipeable strip on mobile ---------- */
.gr-filters{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-bottom:clamp(24px,5vw,44px)}
.gr-pill{
  background:#3C85AE !important;
  color:#fff;border:2px solid transparent;border-radius:999px;
  padding:11px 22px;min-height:44px;font-weight:800;font-size:12px;letter-spacing:1.2px;
  text-transform:uppercase;cursor:pointer;box-shadow:0 3px 8px rgba(0,0,0,.18);
  transition:transform .2s,box-shadow .2s,background-color .2s;white-space:nowrap;flex-shrink:0;
}
.gr-pill:hover{transform:translateY(-2px);box-shadow:0 6px 14px rgba(0,0,0,.22)}
.gr-pill.gr-active{
  background:var(--gr-pill-active,#f5b955);
  color:var(--gr-pill-active-text,#5a3e00);border-color:rgba(0,0,0,.12);
}
@media(max-width:640px){
  .gr-filters{
    flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;
    padding:4px 2px 10px;margin-left:-4px;margin-right:-4px;
    -webkit-overflow-scrolling:touch;scrollbar-width:none;scroll-snap-type:x proximity;
  }
  .gr-filters::-webkit-scrollbar{display:none}
  .gr-pill{scroll-snap-align:start}
}

/* ---------- Chapter Tabs variant: premium segmented-control tab bar ---------- */
.gr-tabs{
  justify-content:flex-start;gap:4px;flex-wrap:nowrap;overflow-x:auto;
  background:#fff;border:1px solid rgba(0,0,0,.06);border-radius:16px;padding:6px;
  box-shadow:0 2px 12px rgba(16,24,40,.07);margin-bottom:clamp(24px,5vw,40px);
  -webkit-overflow-scrolling:touch;scrollbar-width:none;max-width:100%;
}
.gr-tabs::-webkit-scrollbar{display:none}
.gr-tabs .gr-pill{
  background:transparent;color:var(--gr-muted);border:none;border-radius:999px;box-shadow:none;
  padding:12px 22px;scroll-snap-align:start;
}
.gr-tabs .gr-pill:hover{transform:none;box-shadow:none;color:var(--gr-title);background:rgba(0,0,0,.03)}
.gr-tabs .gr-pill.gr-active{
  background:#3C85AE !important;
  color:#fff;box-shadow:0 4px 12px rgba(0,0,0,.18);
}
@media(max-width:640px){
  .gr-tabs{border-radius:14px}
}

/* ---------- Sections ---------- */
.gr-section{margin-bottom:clamp(36px,6vw,56px)}
.gr-section-head{display:flex;align-items:center;gap:12px;margin-bottom:clamp(16px,3vw,24px);flex-wrap:wrap}
.gr-chip{background:#fff;color:#374151;border-radius:999px;padding:8px 18px;font-weight:700;font-size:13px;box-shadow:0 2px 8px rgba(0,0,0,.08);flex-shrink:0}
.gr-section-title{font-size:clamp(17px,2.6vw,22px);font-weight:800;color:#3C85AE !important;margin:0;line-height:1.25}
.gr-hidden{display:none !important}

/* Accordion */
.gr-acc{margin-bottom:16px}
.gr-acc .gr-section-head{cursor:pointer;background:#fff;border-radius:14px;padding:12px 16px;box-shadow:0 2px 10px rgba(0,0,0,.06);flex-wrap:nowrap;min-height:44px}
.gr-acc .gr-section-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
.gr-count{margin-left:auto;color:var(--gr-muted);font-size:12px;font-weight:600;flex-shrink:0}
.gr-chev{color:var(--gr-muted);font-size:12px;transition:transform .2s;flex-shrink:0}
.gr-acc .gr-grid,.gr-acc .gr-rows{margin-top:16px}
.gr-collapsed .gr-grid,.gr-collapsed .gr-rows{display:none}
.gr-collapsed .gr-chev{transform:rotate(-90deg)}

/* ---------- Library category accordion ("All Resources") ---------- */
.gr-cats{display:flex;flex-direction:column;gap:14px}
.gr-cat{margin-bottom:0}
.gr-cat .gr-section-head{gap:14px;padding:14px 18px;align-items:center}
.gr-cat-icon{
  flex-shrink:0;display:flex;align-items:center;justify-content:center;
  width:42px;height:42px;border-radius:50%;
  background:var(--gr-cat-bg,#EAF3F8);color:var(--gr-cat-fg,#3C85AE);font-size:17px;
}
.gr-cat-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.gr-cat-heading{font-size:clamp(15px,2.4vw,19px);font-weight:800;color:#3C85AE;line-height:1.3}
.gr-cat-sub{font-size:12px;font-weight:600;color:var(--gr-muted)}

/* Per-category accents, mirroring the site's acc-* classes. */
.gr-cat.acc-books{--gr-cat-bg:#EAF3F8;--gr-cat-fg:#3C85AE}
.gr-cat.acc-podcast{--gr-cat-bg:#F3EDFA;--gr-cat-fg:#7C5BA8}
.gr-cat.acc-heart{--gr-cat-bg:#FBECEF;--gr-cat-fg:#C4667E}
.gr-cat.acc-group{--gr-cat-bg:#EAF6EF;--gr-cat-fg:#3F8C63}
.gr-cat.acc-star{--gr-cat-bg:#FDF3E3;--gr-cat-fg:#C08A2E}
.gr-cat.acc-wind{--gr-cat-bg:#E9F5F6;--gr-cat-fg:#3E8F98}

@media(max-width:640px){
  .gr-cat-icon{width:36px;height:36px;font-size:15px}
}

/* ---------- Empty chapter placeholder (Tabs show every chapter) ---------- */
.gr-chapter-empty{
  display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;
  padding:clamp(36px,6vw,64px) 24px;
  background:linear-gradient(160deg,var(--gr-btn-soft,#b8d3de) 0%,#fff 70%);
  border:1px dashed rgba(0,0,0,.12);border-radius:16px;
}
.gr-chapter-empty-ico{font-size:40px;line-height:1;opacity:.9}
.gr-chapter-empty-title{margin:4px 0 0;font-size:clamp(16px,2.4vw,19px);font-weight:800;color:var(--gr-title,#374151)}
.gr-chapter-empty-sub{margin:0;max-width:420px;color:var(--gr-muted);font-size:14px;line-height:1.55}

/* ---------- Cards grid: uniform cards, fluid columns ---------- */
.gr-grid{display:grid;grid-template-columns:repeat(var(--gr-cols,3),1fr);gap:clamp(16px,2.6vw,26px)}
@media(max-width:980px){.gr-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.gr-grid{grid-template-columns:1fr}}
.gr-card{
  position:relative;background:#fff;border-radius:18px;overflow:hidden;
  box-shadow:0 4px 16px rgba(16,24,40,.08);
  display:flex;flex-direction:column;transition:transform .25s,box-shadow .25s;
}
.gr-card::before{
  content:"";position:absolute;top:0;left:0;right:0;height:4px;z-index:1;
  background:#3C85AE !important;
}
@media(hover:hover){
  .gr-card:hover{transform:translateY(-6px);box-shadow:0 16px 32px rgba(16,24,40,.16)}
}
.gr-cover{position:relative;aspect-ratio:16/9;overflow:hidden;flex-shrink:0;background:linear-gradient(160deg,var(--gr-btn-soft,#b8d3de),#fff)}
.gr-cover img{width:100%;height:100%;object-fit:cover;display:block}
.gr-cover-fallback{
  width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:clamp(34px,6vw,44px);
  background:linear-gradient(150deg,var(--gr-btn-soft,#b8d3de) 0%,#fff 100%);
}
.gr-ch-tag{position:absolute;left:12px;bottom:12px;background:#fff;color:#374151;border-radius:999px;padding:5px 12px;font-size:12px;font-weight:700;box-shadow:0 2px 6px rgba(0,0,0,.15)}
.gr-lock{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:rgba(255,255,255,.3)}
.gr-lock-ico{font-size:24px}
.gr-lock-label{background:rgba(70,80,95,.82);color:#fff;border-radius:999px;padding:6px 14px;font-size:11px;font-weight:800;letter-spacing:1.2px;text-transform:uppercase}
.gr-body{padding:clamp(16px,2.4vw,22px);display:flex;flex-direction:column;flex:1;gap:10px}
.gr-badge{align-self:flex-start;background:linear-gradient(135deg,var(--gr-badge-bg,#ede9fe),#fff);color:var(--gr-badge,#7c3aed);border-radius:8px;padding:5px 11px;font-size:11px;font-weight:800;letter-spacing:1px;text-transform:uppercase}
.gr-badge-gray{background:var(--gr-footer);color:var(--gr-muted)}
.gr-title{color:#3C85AE !important;font-size:clamp(15px,2vw,18px);font-weight:800;line-height:1.3;margin:0;overflow-wrap:break-word}
.gr-desc{color:var(--gr-text);font-size:14px;line-height:1.55;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.gr-btn{
  margin-top:auto;padding:13px 16px;min-height:48px;border-radius:999px;border:none;
  background:#3C85AE !important;
  color:#fff;font-size:13px;font-weight:800;letter-spacing:1.6px;
  text-transform:uppercase;cursor:pointer;text-align:center;text-decoration:none;
  display:flex;align-items:center;justify-content:center;gap:8px;
  transition:filter .15s,box-shadow .15s,transform .15s,background-color .15s;
  touch-action:manipulation;box-shadow:0 4px 12px rgba(16,24,40,.16);
}
.gr-btn:hover{filter:brightness(1.08);box-shadow:0 6px 16px rgba(16,24,40,.22);transform:translateY(-1px)}
.gr-btn:focus-visible{outline:3px solid var(--gr-pill-active,#f5b955);outline-offset:2px}
.gr-btn[disabled]{background:var(--gr-btn-soft,#b8d3de);color:rgba(255,255,255,.9);border:2px dashed rgba(0,0,0,.12);cursor:not-allowed;box-shadow:none;transform:none}
.gr-foot{background:var(--gr-footer);padding:13px 20px;color:var(--gr-muted);font-size:13px;border-top:1px solid rgba(0,0,0,.04)}

/* ---------- List rows ---------- */
.gr-rows{display:flex;flex-direction:column;gap:12px}
.gr-row{display:flex;align-items:center;gap:16px;background:#fff;border-radius:14px;padding:13px 16px;box-shadow:0 3px 12px rgba(0,0,0,.07)}
.gr-row-cover{width:120px;height:68px;border-radius:10px;overflow:hidden;flex-shrink:0;background:var(--gr-btn-soft)}
.gr-row-cover img{width:100%;height:100%;object-fit:cover}
.gr-row-cover .gr-cover-fallback{font-size:24px}
.gr-row-body{flex:1;min-width:0}
.gr-row-meta{display:flex;gap:8px;margin-bottom:6px;flex-wrap:wrap}
.gr-row .gr-title{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gr-row .gr-desc{-webkit-line-clamp:1;font-size:13px}
.gr-row .gr-btn{margin-top:0;flex-shrink:0;padding:11px 16px;min-height:44px;font-size:11px;width:180px}
@media(max-width:640px){
  .gr-row{flex-wrap:wrap;gap:12px}
  .gr-row-cover{width:88px;height:52px}
  .gr-row-body{flex:1 1 calc(100% - 104px)}
  .gr-row .gr-btn{width:100%}
}

/* ---------- Popup: centered on desktop, bottom sheet on mobile ---------- */
.gr-overlay{position:fixed;inset:0;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;padding:20px;z-index:99999}
.gr-overlay[hidden]{display:none}
.gr-m-pdf[hidden],.gr-m-audio[hidden],.gr-m-exercise[hidden]{display:none}
.gr-modal{background:#fff;border-radius:20px;width:100%;max-width:720px;max-height:88vh;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 24px 64px rgba(0,0,0,.35)}
.gr-m-head{display:flex;align-items:center;gap:14px;padding:16px 20px;border-bottom:1px solid rgba(0,0,0,.06)}
.gr-m-titles{flex:1;min-width:0}
.gr-m-head h3{font-size:17px;font-weight:800;color:#3C85AE !important;margin:0;line-height:1.3}
.gr-m-sub{font-size:12px;color:#9ca3af;font-weight:700;text-transform:uppercase;letter-spacing:1px;margin-top:2px}
.gr-m-close{
  width:40px !important;height:40px !important;min-width:40px;max-width:40px;
  padding:0 !important;margin:0;border-radius:50% !important;border:none !important;
  background:#f3f4f6 !important;color:#4b5563 !important;font-size:16px;line-height:1;
  display:inline-flex !important;align-items:center;justify-content:center;
  cursor:pointer;flex-shrink:0;touch-action:manipulation;box-shadow:none !important;
}
.gr-m-body{padding:20px;overflow-y:auto;flex:1;-webkit-overflow-scrolling:touch}
.gr-m-desc{color:#6b7280;font-size:14px;line-height:1.6;margin:0 0 16px}
.gr-m-pdf{width:100%;height:420px;border:none;border-radius:12px;background:#f1f3f6}
.gr-m-pdf.gr-m-pdf-audio{height:180px;background:transparent}
.gr-m-audio{background:#f8f9fb;border-radius:14px;padding:24px 20px;display:flex;flex-direction:column;align-items:center;gap:16px}
.gr-m-art{width:96px;height:96px;border-radius:50%;background:var(--gr-pill-active,#f5b955);display:flex;align-items:center;justify-content:center;font-size:38px;box-shadow:0 8px 20px rgba(0,0,0,.15)}
.gr-m-audio audio{width:100%}
.gr-m-exercise{background:#f8f9fb;border-radius:14px;padding:24px 20px;text-align:center;color:#6b7280;font-size:14px}
.gr-m-foot{padding:12px 20px;display:flex;gap:10px;justify-content:flex-end;border-top:1px solid rgba(0,0,0,.06);padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
.gr-m-btn{padding:12px 22px;min-height:46px;border-radius:12px;border:none;cursor:pointer;font-size:13px;font-weight:800;letter-spacing:1.4px;text-transform:uppercase;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;touch-action:manipulation}
.gr-m-primary{background:#3C85AE !important;color:#fff !important}
.gr-m-ghost{background:#f3f4f6 !important;color:#4b5563 !important}
@media(max-width:640px){
  .gr-overlay{padding:0;align-items:flex-end}
  .gr-modal{max-width:100%;max-height:92dvh;border-radius:20px 20px 0 0}
  .gr-m-pdf{height:58vh}
  .gr-m-pdf.gr-m-pdf-audio{height:180px}
  .gr-m-foot{flex-direction:column-reverse}
  .gr-m-btn{width:100%}
}

/* ---------- Collections ---------- */
/* Sections are short here; skip the tall intrinsic-size reservation. */
.gr-collections .gr-section{content-visibility:visible;contain-intrinsic-size:auto}
.gr-collection{margin-bottom:16px}
.gr-collection .gr-section-head{
  cursor:pointer;background:#fff;border-radius:14px;padding:14px 18px;
  box-shadow:0 2px 10px rgba(0,0,0,.06);display:flex;align-items:center;gap:14px;
  flex-wrap:nowrap;min-height:56px;
}
.gr-col-ico{
  width:44px;height:44px;flex-shrink:0;display:flex;align-items:center;justify-content:center;
  font-size:22px;background:#fff;border:1px solid rgba(0,0,0,.06);border-radius:12px;
  box-shadow:0 1px 4px rgba(0,0,0,.06);line-height:1;
}
.gr-col-heading{display:flex;flex-direction:column;gap:2px;min-width:0;margin-right:auto}
.gr-collection .gr-section-title{
  white-space:normal;flex:none;overflow:visible;text-overflow:clip;margin:0;line-height:1.25;
  font-size:clamp(16px,2.4vw,19px);font-weight:800;color:var(--gr-title,#1c2333) !important;
}
.gr-col-sub{font-size:13px;color:var(--gr-muted);font-weight:600}
.gr-collection .gr-chev{margin-left:8px}
.gr-col-body{margin-top:16px}
.gr-collapsed .gr-col-body{display:none}

/* Citation list */
.gr-col-list .gr-col-body{
  background:#fff;border:1px solid rgba(0,0,0,.06);border-radius:16px;
  padding:clamp(18px,3vw,26px) clamp(20px,3.4vw,30px);box-shadow:0 2px 10px rgba(0,0,0,.05);
}
.gr-cite-list{list-style:disc;margin:0;padding:2px 0 2px 22px;display:flex;flex-direction:column;gap:12px}
.gr-cite{color:var(--gr-title,#1c2333);font-size:15px;line-height:1.5}
.gr-cite-author{font-weight:400}
.gr-cite-title{font-style:italic}
a.gr-cite-title{color:var(--gr-btn,#3C85AE);text-decoration:none}
a.gr-cite-title:hover{text-decoration:underline}
.gr-cite-note{color:var(--gr-muted);font-size:13px}

/* Cards grid */
.gr-col-grid{margin-top:0}
.gr-collection-card{
  background:var(--gr-col-accent,#fff);border-radius:16px;overflow:hidden;
  box-shadow:0 4px 16px rgba(16,24,40,.08);display:flex;flex-direction:column;
  align-items:center;text-align:center;padding:24px 22px;gap:12px;
  transition:transform .25s,box-shadow .25s;
}
@media(hover:hover){
  .gr-collection-card:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(16,24,40,.16)}
}
.gr-cc-cover{width:100%;height:150px;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}
.gr-cc-cover img{max-width:100%;max-height:100%;object-fit:contain;display:block}
.gr-cc-fallback{font-size:40px;opacity:.55}
.gr-cc-title{margin:0;line-height:1.3;font-size:clamp(17px,2.2vw,20px);font-weight:800;color:var(--gr-btn,#3C85AE);text-decoration:none}
a.gr-cc-title:hover{text-decoration:underline}
.gr-cc-sub{margin:0;font-size:13px;font-weight:700;color:var(--gr-muted)}
.gr-cc-desc{margin:0;font-size:14px;line-height:1.55;color:var(--gr-title,#33404a)}
.gr-cc-btn{
  margin-top:auto;align-self:center;padding:12px 26px;min-height:44px;border-radius:999px;
  background:var(--gr-btn,#3C85AE);color:#fff;font-size:12px;font-weight:800;letter-spacing:1.4px;
  text-transform:uppercase;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;
  box-shadow:0 4px 12px rgba(16,24,40,.16);transition:filter .15s,transform .15s;
}
.gr-cc-btn:hover{filter:brightness(1.08);transform:translateY(-1px)}
.gr-cc-btn:focus-visible{outline:3px solid var(--gr-pill-active,#f5b955);outline-offset:2px}

/* ---------- Accessibility / motion ---------- */
@media(prefers-reduced-motion:reduce){
  .gr-card,.gr-pill,.gr-chev,.gr-btn,.gr-collection-card,.gr-cc-btn{transition:none}
  .gr-card:hover,.gr-pill:hover,.gr-collection-card:hover{transform:none}
}

/* ---------- "All Resources" intro tab ---------- */
/* The panel is a plain wrapper: no card chrome, so the Collection accordions
   inside keep the exact look they have on their own shortcode. */
.gr-intro-tab{content-visibility:visible;contain-intrinsic-size:auto}
.gr-intro{max-width:760px;margin:0 auto clamp(20px,4vw,34px);text-align:center}
.gr-intro-title{
  margin:0 0 12px;font-size:clamp(26px,4vw,38px);line-height:1.15;
  color:var(--gr-heading,#2f6f8f);font-weight:700;
}
.gr-intro-copy{font-size:15px;line-height:1.7;color:var(--gr-text,#4b5563)}
.gr-intro-copy p{margin:0 0 12px}
.gr-intro-copy p:last-child{margin-bottom:0}
.gr-intro-copy a{color:var(--gr-accent,#3C85AE);font-weight:600}
.gr-intro-collections{display:flex;flex-direction:column;gap:14px}

/* ---------- General Resources handed over to Collections ---------- */
/* Wrapper only: each collection inside renders its own accordion section,
   reusing the Collections styles so nothing is duplicated here. */
.gr-general-collections{display:flex;flex-direction:column;gap:14px;margin-bottom:clamp(36px,6vw,56px)}

/* ---------- Collection style: Profiles ---------- */
/* Portrait + name, no card chrome and no button — the whole tile is the link.
   Built for people (practitioners, mediums, facilitators) where the photo is
   what you recognise and a button would only add noise. */
.gr-profiles{align-items:end}
.gr-profile{
  display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;
  text-decoration:none;color:inherit;background:none;box-shadow:none;border:0;padding:0;
  transition:transform .2s;
}
a.gr-profile:hover,a.gr-profile:focus-visible{transform:translateY(-4px)}
a.gr-profile:focus-visible{outline:2px solid var(--gr-accent,#3C85AE);outline-offset:6px;border-radius:12px}

/* Cut-out portraits sit on the page background rather than in a box, so the
   image keeps its own transparency and simply bottom-aligns with its row. */
.gr-profile-photo{
  width:100%;display:flex;align-items:flex-end;justify-content:center;min-height:180px;
}
.gr-profile-img{
  max-width:100%;height:auto;display:block;object-fit:contain;
}
.gr-profile-initials{
  display:flex;align-items:center;justify-content:center;
  width:120px;height:120px;border-radius:50%;
  background:var(--gr-cat-bg,#EAF3F8);color:var(--gr-cat-fg,#3C85AE);
  font-size:34px;font-weight:700;letter-spacing:1px;
}
.gr-profile-name{
  font-size:clamp(20px,3vw,30px);line-height:1.15;font-weight:400;
  color:var(--gr-accent,#3C85AE);
}
a.gr-profile:hover .gr-profile-name{text-decoration:underline}
.gr-profile-sub{font-size:13px;color:var(--gr-muted);line-height:1.4}

@media(max-width:980px){
  .gr-profile-photo{min-height:150px}
  .gr-profile-initials{width:96px;height:96px;font-size:28px}
}
@media(max-width:600px){
  .gr-profiles{grid-template-columns:repeat(2,1fr)}
  .gr-profile-photo{min-height:120px}
}

/* ---------- Collection title typography ---------- */
/* Item titles in Collections use the site's display face (Very Vogue), with
   serif fallbacks for when the theme hasn't loaded it. Overridable via the
   --gr-display-font variable. */
:root{--gr-display-font:"Very Vogue Display","Very Vogue","very-vogue",Georgia,serif}
.gr-profile-name,
.gr-cc-title{font-family:var(--gr-display-font)}
.gr-cc-title{font-weight:400}
