/* Resources (#resources, assets/js/tools/resources.js): Pathways' Resources
   page, ported as-is for EMS US (Tyler 11-08: "the same exact design, but for
   whatever EMS resources we have"). Blocks, the first three copied from the
   Pathways final build (ADO Apps/mpma-pathways origin/main efa8e39):
     .lib  the tabs            (assets/css/library.css)
     .tb   a tool's thumbnail  (shared by the tool pages and My Library)
     .rg   Programs & guides   (assets/css/tools.css, Resources → Guides)
     .ml   Saved = My Library  (assets/js/tools/library.js)
   The Tools tab's catalog is ems-alltools.css.
   Pathways' variable names are kept and pointed at EMS tokens on .lib, so the
   copied rules stay byte-for-byte comparable with the source. */
.lib {
  --mp-navy: var(--ems-navy-700, #1e296c); --mp-blue: var(--ems-navy-500, #2A3890); --mp-navy-deep: var(--ems-navy-900, #0e1547);
  --mp-display: var(--ems-font-display, "Montserrat", sans-serif); --mp-ui: var(--ems-font-ui, "Poppins", sans-serif);
  --mp-ink: var(--ems-ink, #131a2c); --muted: var(--ems-mute, #4a5468); --primary-tint: var(--ems-navy-50, #eef0fa); --mp-gray: var(--ems-soft, #f2f4f9);
}

.lib { --lib-navy: var(--mp-navy); --lib-blue: var(--mp-blue); --lib-line: #e1e7ee; --lib-muted: #5b6b7b; --lib-ease: cubic-bezier(.22, 1, .36, 1); }

.lib-tabs {
  position: relative; display: flex; gap: 4px; margin: 0 0 22px;
  border-bottom: 1px solid var(--lib-line); overflow-x: auto; scrollbar-width: none;
}
.lib-tabs::-webkit-scrollbar { display: none; }
.lib-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 16px 13px; border: 0; background: none; cursor: pointer;
  font: 600 15px/1 var(--mp-font, inherit); color: var(--lib-muted);
  border-radius: 10px 10px 0 0; transition: color .2s var(--lib-ease), background .2s var(--lib-ease);
}
.lib-tab svg { opacity: .75; }
.lib-tab:hover { color: var(--lib-navy); background: rgba(0, 62, 107, .04); }
.lib-tab.is-on { color: var(--lib-navy); }
.lib-tab.is-on svg { opacity: 1; color: var(--lib-blue); }
.lib-tab:focus-visible { outline: 2px solid var(--lib-blue); outline-offset: -2px; }
.lib-tab-ink {
  position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; border-radius: 3px 3px 0 0;
  background: var(--lib-blue); transition: transform .32s var(--lib-ease), width .32s var(--lib-ease);
}

.lib-pane { animation: lib-in .28s var(--lib-ease) backwards; }
@keyframes lib-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .lib-pane { animation: none; } .lib-tab-ink { transition: none; } }

/* The embedded tools bring their own explanation paragraph; the tab already
   says what this is, so it would only repeat it. */
.lib-pane .card.intro { display: none; }


.lib-foot { justify-content: flex-end; margin-top: 28px; }

@media (max-width: 640px) {
  .lib-tab { padding: 11px 12px 12px; font-size: 14px; }
  .lib-tab svg { display: none; }
}


/* ── .tb: one tool's thumbnail ─────────────────────────────────────────────
   Every tool has its own two-stop gradient and its own surface pattern, both
   computed in tool-index.js (ToolIndex.thumb) from the category colour and the
   tool's place in it — so no two tools in a category look alike and all of them
   still look like that category. Drawn in CSS: nothing is fetched. */
.tb {
  position: relative; flex: none; isolation: isolate;
  width: var(--tb-s, 56px); height: var(--tb-s, 56px);
  border-radius: calc(var(--tb-s, 56px) * .29);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  background-image: var(--tb-pat, none), linear-gradient(142deg, var(--tb-1, #0074B8) 0%, var(--tb-2, #003E6B) 100%);
  background-size: var(--tb-pat-size, auto), auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px -12px var(--tb-2, #003E6B);
}
.tb > svg { filter: drop-shadow(0 1px 1.5px rgba(0, 20, 40, .3)); }
.tb[data-pat="0"] { --tb-pat: radial-gradient(rgba(255, 255, 255, .38) 1.1px, transparent 1.2px); --tb-pat-size: 7px 7px; }
.tb[data-pat="1"] { --tb-pat: repeating-linear-gradient(45deg, rgba(255, 255, 255, .17) 0 3px, transparent 3px 9px); }
.tb[data-pat="2"] { --tb-pat: repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 1.5px, transparent 1.5px 9px); }
.tb[data-pat="3"] { --tb-pat: repeating-radial-gradient(circle at 18% 112%, transparent 0 9px, rgba(255, 255, 255, .17) 9px 10.5px); }
.tb[data-pat="4"] { --tb-pat: repeating-linear-gradient(0deg, rgba(255, 255, 255, .15) 0 1.5px, transparent 1.5px 8px); }
.tb[data-pat="5"] { --tb-pat: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .17) 0 4px, transparent 4px 12px); }
/* ── Resources → Programs & guides (.rg-, assets/js/tools/resources.js) ────
   Ryan, 1 Oct: the grid of little boxes was too much to look through. Now one
   category at a time (the .rg-cats tabs) and each link is a full-width row
   with a real picture of the site it opens. In-app links are gone from here
   altogether — they are tools, on the Tools tab. */
.rg { --rg-line: #e3e8ee; --c: #0074B8; width: 100%; }
.rg *, .rg *::before, .rg *::after { box-sizing: border-box; }

.rg-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0 0 22px; border-bottom: 1px solid var(--rg-line); }
.rg-cat {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--rg-line); background: #fff; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--mp-navy-deep, #002A49);
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s;
}
.rg-cat svg { color: var(--cc); flex: none; }
.rg-cat b {
  min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: 12px; text-align: center;
  background: color-mix(in srgb, var(--cc) 12%, #fff); color: var(--cc);
}
.rg-cat:hover { border-color: color-mix(in srgb, var(--cc) 45%, #e3e8ee); background: color-mix(in srgb, var(--cc) 5%, #fff); }
.rg-cat:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc) 30%, transparent); }
.rg-cat.is-on { background: var(--cc); border-color: var(--cc); color: #fff; }
.rg-cat.is-on svg { color: #fff; }
.rg-cat.is-on b { background: rgba(255, 255, 255, .22); color: #fff; }

.rg-sec { animation: at-card-in .35s var(--at-ease-soft, cubic-bezier(.2, .8, .2, 1)) backwards; }
/* The category's own header band, so the list reads as a section under the
   chips, not more of them (Tyler 11-09: "some type of actual separation, like
   a header"). */
.rg-head {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; margin: 0 0 18px; padding: 20px 22px;
  border-radius: 18px; color: #fff;
  background: radial-gradient(80% 140% at 100% 0%, rgba(255, 255, 255, .16) 0%, transparent 60%),
    linear-gradient(135deg, var(--c) 0%, color-mix(in srgb, var(--c) 72%, #0e1547) 100%);
  box-shadow: 0 18px 36px -26px color-mix(in srgb, var(--c) 90%, #000);
}
.rg-head > div { flex: 1; min-width: 0; }
.rg-head-ic {
  flex: none; width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .34);
}
:is(#view, #tsBody) .rg-head-t, .rg-head-t {
  margin: 0; font-family: var(--mp-display, sans-serif);
  font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; color: #fff;
}
.rg-head-b { margin: 3px 0 0; font-size: 14.5px; line-height: 1.45; color: rgba(255, 255, 255, .86); }
.rg-head-n { flex: none; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); }

.rg-rows { display: flex; flex-direction: column; gap: 14px; }
.rg-row {
  display: grid; grid-template-columns: 260px minmax(0, 1fr) auto; align-items: center; gap: 22px;
  padding: 14px 22px 14px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--rg-line);
  border-left: 5px solid var(--c); text-decoration: none; color: inherit;
  animation: at-card-in .35s calc(var(--d, 0) * 45ms) var(--at-ease-soft, cubic-bezier(.2, .8, .2, 1)) backwards;
  transition: transform .2s var(--at-ease-pop, cubic-bezier(.18, .9, .2, 1)), border-color .2s, box-shadow .2s;
}
.rg-row:hover, .rg-row:focus-visible {
  outline: none; transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--c) 40%, #e3e8ee); border-left-color: var(--c);
  box-shadow: 0 16px 34px -24px color-mix(in srgb, var(--c) 80%, transparent);
}
.rg-row:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.rg-shot {
  display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  background: #f1f4f7; border: 1px solid var(--rg-line);
}
.rg-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .35s ease; }
.rg-row:hover .rg-shot img { transform: scale(1.04); }
.rg-shot.is-blank {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 18px;
  background: radial-gradient(90% 120% at 0% 100%, rgba(255, 255, 255, .14) 0%, transparent 60%),
    linear-gradient(135deg, var(--c) 0%, color-mix(in srgb, var(--c) 68%, #0e1547) 100%);
  border-color: transparent; color: #fff;
}
/* A quiet grid, as on the tool cards, so it reads as a picture, not a gap. */
.rg-shot.is-blank::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background-image: linear-gradient(rgba(255, 255, 255, .7) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .7) 1px, transparent 1px);
  background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 100%); mask-image: linear-gradient(90deg, transparent 20%, #000 100%); }
.rg-shot-name { position: relative; font-family: var(--mp-display, sans-serif); font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
.rg-shot-host { position: relative; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .8; overflow-wrap: anywhere; }
.rg-row-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rg-row-t { font-family: var(--mp-display, sans-serif); font-size: 18px; font-weight: 750; line-height: 1.3; color: var(--mp-navy-deep, #002A49); }
.rg-row-d { font-size: 14.5px; line-height: 1.55; color: var(--muted, #5b6875); }
.rg-row-host { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 80%, #333); }
.rg-row-go {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 25%, #fff); transition: background .18s, color .18s;
}
.rg-row:hover .rg-row-go { background: var(--c); color: #fff; }

@media (max-width: 900px) {
  .rg-row { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding-right: 16px; }
  .rg-row-go { display: none; }
}
@media (max-width: 600px) {
  .rg-cats { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 18px; padding: 0 16px 14px; scrollbar-width: none; }
  .rg-head { padding: 16px; gap: 12px; }
  .rg-head-n { display: none; }
  .rg-cat { flex: none; }
  .rg-row { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 12px; }
  .rg-head-ic { width: 40px; height: 40px; border-radius: 12px; }
  :is(#view, #tsBody) .rg-head-t, .rg-head-t { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .rg-sec, .rg-row, .rg-shot img, .rg-cat { animation: none; transition: none; }
  .rg-row:hover, .rg-row:hover .rg-shot img { transform: none; }
}

/* ── EMS: what Pathways' page has that the copied rules do not cover ─────── */
/* Guides: EMS keeps Save to My Library on every row, so a row is not one big
   link. The title is the link and stretches over the whole row (::after), as
   the journey cards do; Open site and Save sit above it. */
.rg-row { position: relative; }
.rg-row-t { text-decoration: none; }
.rg-row-t::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.rg-row-t:focus-visible { outline: none; }
.rg-row:has(.rg-row-t:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.rg-row:hover .rg-row-t { color: var(--c); }
.rg-row-acts { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.rg-row-go { text-decoration: none; justify-content: center; }
:is(#view) .rg-save {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  min-height: 0; padding: 9px 16px; border-radius: 999px; cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: 0;
  font: 600 13.5px/1.2 var(--mp-ui); color: var(--mp-navy); background: #fff; border: 1px solid var(--rg-line);
  transition: background .18s, border-color .18s, color .18s;
}
:is(#view) .rg-save:hover:not(:disabled) { border-color: var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 6%, #fff); }
:is(#view) .rg-save:disabled { cursor: default; opacity: 1; color: var(--ems-good, #1f7a4d); background: var(--ems-good-50, #e8f5ee); border-color: transparent; }
.rg-manage {
  display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 14px; margin-left: auto;
  border-radius: 999px; border: 1px dashed var(--ems-line-2, #d0d6e6); background: #fff; text-decoration: none;
  font-size: 14px; font-weight: 700; color: var(--mp-navy);
}
.rg-manage:hover { border-style: solid; border-color: var(--mp-blue); }
@media (max-width: 900px) {
  .rg-row-acts { grid-column: 2; flex-direction: row; justify-content: flex-start; }
}
@media (max-width: 600px) {
  .rg-row-acts { grid-column: 1; }
  .rg-manage { margin-left: 0; }
}

/* ── 11-15 the board: search first, then every link (resources.js board()) ─
   Tyler: "it should just show all the resources ... a search bar ... really
   make it good-looking". Box on top (Manage / nothing beside it), topics as
   quiet optional chips under it (All lit by default), then each topic as a
   light section header over its rows. The admin's Settings › Resource library
   draws the same board (ems-admin.css adds the Live / Manual tags). */
.rg-top { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.rg-find {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 0 8px 0 18px; min-height: 54px; border-radius: 16px; cursor: text;
  background: #fff; border: 1.5px solid var(--rg-line); color: var(--ems-mute, #5b6875);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px -22px rgba(30, 41, 108, .45);
  transition: border-color .18s, box-shadow .18s;
}
.rg-find > svg { flex: none; color: var(--ems-navy-500, #2A3890); }
.rg-find:focus-within { border-color: var(--ems-navy-500, #2A3890); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ems-navy-500, #2A3890) 14%, transparent), 0 10px 28px -22px rgba(30, 41, 108, .45); }
/* :not(#_) = id weight: ems-design.css styles every input through five :not()s. */
.rg .rg-find input:not(#_), .rg .rg-find input:not(#_):focus, .rg .rg-find input:not(#_):hover {
  flex: 1; min-width: 0; width: auto; margin: 0; padding: 14px 0; border: 0; border-radius: 0; background: none; outline: none; box-shadow: none;
  font: 500 16px/1.3 var(--ems-font-ui, var(--mp-ui, sans-serif)); color: var(--mp-navy-deep, #002A49);
}
.rg .rg-find input::placeholder { color: var(--ems-faint, #8a94a6); }
.rg .rg-find input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.rg-find-x {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 10px; background: #f1f4f8; color: var(--ems-mute, #5b6875); cursor: pointer;
}
.rg-find-x:hover { background: #e6eaf2; color: var(--mp-navy-deep, #002A49); }
.rg-find-x[hidden] { display: none; }
.rg-top .rg-manage { margin-left: 0; min-height: 54px; padding: 8px 18px; border-radius: 16px; flex: none; }

/* the topics: quiet chips, a filter you can ignore */
.rg-cats.is-quiet { gap: 6px; margin: 0 0 22px; padding: 0 0 18px; }
.rg-cats.is-quiet .rg-cat { min-height: 34px; padding: 5px 12px; font-size: 13px; font-weight: 650; background: transparent; border-color: transparent; color: var(--ems-mute, #5b6875); }
.rg-cats.is-quiet .rg-cat:hover { background: color-mix(in srgb, var(--cc) 7%, #fff); border-color: color-mix(in srgb, var(--cc) 25%, #fff); color: var(--mp-navy-deep, #002A49); }
.rg-cats.is-quiet .rg-cat b { font-size: 11.5px; padding: 0 6px; min-width: 20px; }
.rg-cats.is-quiet .rg-cat.is-on { background: var(--cc); border-color: var(--cc); color: #fff; }

/* every topic, one after another */
.rg-list { display: flex; flex-direction: column; gap: 30px; }
.rg-grp { animation: at-card-in .35s var(--at-ease-soft, cubic-bezier(.2, .8, .2, 1)) backwards; }
.rg-grp-h { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 0 0 10px; border-bottom: 2px solid color-mix(in srgb, var(--c) 22%, #fff); }
.rg-grp-h > div { flex: 1; min-width: 0; }
.rg-grp-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px; color: #fff;
  background: linear-gradient(135deg, var(--c) 0%, color-mix(in srgb, var(--c) 72%, #0e1547) 100%); box-shadow: 0 8px 18px -12px var(--c); }
:is(#view, #tsBody, .modal) .rg-grp-t, .rg-grp-t { margin: 0; font: 800 18px/1.25 var(--mp-display, sans-serif); letter-spacing: -.01em; color: var(--mp-navy-deep, #002A49); }
.rg-grp-b { margin: 2px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--ems-mute, #5b6875); }
.rg-grp-n { flex: none; min-width: 28px; padding: 3px 9px; border-radius: 999px; text-align: center; font: 700 12.5px/1.3 var(--ems-font-ui, sans-serif);
  background: color-mix(in srgb, var(--c) 10%, #fff); color: var(--c); }
.rg-list .rg-rows { gap: 10px; }
.rg-list .rg-row { grid-template-columns: 188px minmax(0, 1fr) auto; gap: 20px; padding: 12px 18px 12px 12px; border-left-width: 4px; }
.rg-list .rg-row-t { font-size: 17px; }
.rg-list .rg-row-d { font-size: 14px; }
.rg-list .rg-shot-name { font-size: 17px; }
.rg-row-cat { font-style: normal; margin-left: 8px; padding: 2px 8px; border-radius: 999px; letter-spacing: 0; text-transform: none; font-weight: 700;
  background: color-mix(in srgb, var(--c) 10%, #fff); color: var(--c); }
.rg-row mark { background: #fff1b8; color: inherit; border-radius: 3px; padding: 0 1px; box-shadow: 0 0 0 1px #fde68a; }

/* searching */
.rg-count { margin: -6px 0 12px; font: 500 13.5px/1.4 var(--ems-font-ui, sans-serif); color: var(--ems-mute, #5b6875); }
.rg-count b { color: var(--mp-navy-deep, #002A49); }
.rg-none { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 20px; text-align: center;
  border: 1.5px dashed var(--rg-line); border-radius: 18px; background: #fbfcfe; color: var(--ems-mute, #5b6875); }
.rg-none > svg { color: var(--ems-faint, #8a94a6); }
.rg-none b { font: 750 16px/1.35 var(--mp-display, sans-serif); color: var(--mp-navy-deep, #002A49); }
.rg-none span { font-size: 14px; }
.rg-none .rg-save { margin-top: 6px; display: inline-flex; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--rg-line); background: #fff; cursor: pointer; font: 600 13.5px/1.2 var(--ems-font-ui, sans-serif); color: var(--mp-navy, #1e296c); }

@media (max-width: 900px) {
  .rg-list .rg-row { grid-template-columns: 150px minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .rg-top { flex-wrap: wrap; }
  .rg-top .rg-manage { min-height: 42px; }
  .rg-find { min-height: 48px; padding-left: 14px; }
  .rg .rg-find input:not(#_) { font-size: 16px; }
  .rg-cats.is-quiet { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 12px; scrollbar-width: none; }
  .rg-cats.is-quiet .rg-cat { flex: none; }
  .rg-list .rg-row { grid-template-columns: minmax(0, 1fr); }
  .rg-grp-b { display: none; }
}
@media (prefers-reduced-motion: reduce) { .rg-grp { animation: none; } }

/* ── Saved = My Library (.ml-, assets/js/tools/library.js) ────────────────
   Tyler 11-08: organised by the tools that made it, and really kept. The
   sync line says where (your account, or this browser in the demo); doors to
   what lives inside its own tool; journey chips + search; then each journey,
   each tool with its saves under it. */
.ml { --c: #1e296c; }
.ml-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 16px; }
.ml-sync { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 600 13px/1.3 var(--ems-font-ui); color: var(--ems-mute); }
.ml-sync > i { width: 9px; height: 9px; border-radius: 50%; background: var(--ems-faint); flex: none; }
.ml-sync.is-saved > i { background: var(--ems-good); box-shadow: 0 0 0 4px var(--ems-good-50); }
.ml-sync.is-saving > i { background: var(--ems-navy-400); animation: ml-pulse 1s ease-in-out infinite; }
.ml-sync.is-retry { color: var(--ems-warn); }
.ml-sync.is-retry > i { background: var(--ems-warn); box-shadow: 0 0 0 4px var(--ems-warn-50); }
@keyframes ml-pulse { 50% { opacity: .35; } }
.ml-q { flex: 0 1 320px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 12px; background: #fff; border: 1px solid var(--ems-line); color: var(--ems-mute); }
.ml-q:focus-within { border-color: var(--ems-navy-500); box-shadow: var(--ems-focus); }
/* :not(#_) = id weight: ems-design.css styles every input through five :not()s. */
.ml .ml-q input:not(#_), .ml .ml-q input:not(#_):focus, .ml .ml-q input:not(#_):hover {
  flex: 1; min-width: 0; width: auto; margin: 0; border: 0; border-radius: 0; background: none; padding: 10px 0; font: 500 14.5px/1.3 var(--ems-font-ui); outline: none; box-shadow: none; }

.ml-doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; margin: 0 0 22px; }
.ml-door { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ems-line); background: #fff;
  text-align: left; cursor: pointer; font: inherit; transition: border-color var(--ems-dur) var(--ems-ease), box-shadow var(--ems-dur) var(--ems-ease), transform var(--ems-dur) var(--ems-ease); }
.ml-door:hover { border-color: var(--ems-navy-200); box-shadow: var(--ems-lift); transform: translateY(-1px); }
.ml-door:focus-visible { outline: none; box-shadow: var(--ems-focus); }
.ml-door-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--ems-navy-50); color: var(--ems-navy-500); }
.ml-door-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ml-door-t b { font: 700 14.5px/1.25 var(--ems-font-ui); color: var(--ems-navy-800); }
.ml-door-t small { font: 400 12.5px/1.35 var(--ems-font-body); color: var(--ems-mute); }
.ml-door-go { color: var(--ems-navy-500); transition: transform var(--ems-dur) var(--ems-ease); }
.ml-door:hover .ml-door-go { transform: translateX(3px); }

.ml-chips { display: flex; gap: 8px; margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.ml-chips::-webkit-scrollbar { display: none; }
.ml-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--ems-line); background: #fff; font: 600 13px/1 var(--ems-font-ui); color: var(--ems-ink-2);
  transition: background-color var(--ems-dur) var(--ems-ease), color var(--ems-dur) var(--ems-ease), border-color var(--ems-dur) var(--ems-ease); }
.ml-chip b { font-size: 11.5px; padding: 2px 7px; border-radius: 999px; background: var(--ems-soft); color: var(--ems-mute); }
.ml-chip:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--ems-line)); color: var(--c); }
.ml-chip.is-on { background: var(--c); border-color: var(--c); color: #fff; }
.ml-chip.is-on b { background: rgba(255, 255, 255, .22); color: #fff; }
.ml-chip:focus-visible { outline: none; box-shadow: var(--ems-focus); }

.ml-j { margin: 0 0 26px; }
.ml-j[hidden], .ml-tool[hidden], .ml-item[hidden], .ml-link[hidden] { display: none; }
.ml-j-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 800 13px/1.2 var(--ems-font-ui); letter-spacing: .07em; text-transform: uppercase; color: var(--c); }
.ml-j-h small { font: 700 11.5px/1 var(--ems-font-ui); letter-spacing: 0; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 10%, #fff); }
.ml-j-ic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--c); }

.ml-tool { margin: 0 0 12px; border-radius: 16px; background: #fff; border: 1px solid var(--ems-line); box-shadow: 0 1px 2px rgba(14, 21, 71, .04); overflow: hidden; }
.ml-tool-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--ems-line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 6%, #fff), #fff 60%); }
.ml-tool-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--ems-soft); color: var(--ems-mute); }
.ml-tool-n { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ml-tool-n b { font: 700 15.5px/1.25 var(--ems-font-display); color: var(--ems-navy-800); }
.ml-tool-n small { font: 500 12.5px/1.3 var(--ems-font-ui); color: var(--ems-mute); }
.ml-tool-go { flex: none; font: 700 13px/1 var(--ems-font-ui); color: var(--c); text-decoration: none; padding: 8px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 8%, #fff); transition: background-color var(--ems-dur) var(--ems-ease), color var(--ems-dur) var(--ems-ease); }
.ml-tool-go:hover { background: var(--c); color: #fff; }

.ml-items, .ml-links { list-style: none; margin: 0; padding: 0; }
.ml-item { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 6px; }
.ml-item + .ml-item { border-top: 1px solid var(--ems-soft-2); }
.ml-item-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; font: inherit;
  transition: background-color var(--ems-dur) var(--ems-ease); }
.ml-item-open:hover { background: var(--ems-soft); }
.ml-item-open:focus-visible { outline: none; box-shadow: var(--ems-focus); }
.ml-item-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); }
.ml-item-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ml-item-t b { font: 600 14.5px/1.3 var(--ems-font-ui); color: var(--ems-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-item-t small { font: 400 12.5px/1.3 var(--ems-font-body); color: var(--ems-mute); }
.ml-badge { flex: none; font: 700 11.5px/1 var(--ems-font-ui); padding: 4px 8px; border-radius: 999px; background: var(--ems-good-50); color: var(--ems-good); }
.ml-item-acts { flex: none; display: flex; gap: 4px; }
.ml-act { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--ems-line); background: #fff; cursor: pointer;
  font: 600 12.5px/1 var(--ems-font-ui); color: var(--ems-navy-600); transition: background-color var(--ems-dur) var(--ems-ease), border-color var(--ems-dur) var(--ems-ease), color var(--ems-dur) var(--ems-ease); }
.ml-act:hover { background: var(--ems-navy-50); border-color: var(--ems-navy-200); }
.ml-act:focus-visible { outline: none; box-shadow: var(--ems-focus); }
.ml-act.ml-del { padding: 0 8px; color: var(--ems-mute); }
.ml-act.ml-del:hover { background: var(--ems-red-50); border-color: var(--ems-red-200); color: var(--ems-red-600); }
.ml-act[disabled] { opacity: .55; cursor: wait; }

.ml-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.ml-link { position: relative; display: flex; border-radius: 14px; background: #fff; border: 1px solid var(--ems-line); overflow: hidden;
  transition: box-shadow var(--ems-dur) var(--ems-ease), transform var(--ems-dur) var(--ems-ease); }
.ml-link:hover { box-shadow: var(--ems-lift); transform: translateY(-1px); }
.ml-link-open { flex: 1; min-width: 0; display: flex; gap: 12px; padding: 10px 44px 10px 10px; color: inherit; text-decoration: none; }
.ml-link-shot { flex: none; width: 104px; aspect-ratio: 1.6; border-radius: 9px; overflow: hidden; background: var(--ems-soft); border: 1px solid var(--ems-line);
  display: grid; place-items: center; font: 600 11px/1.2 var(--ems-font-ui); color: var(--ems-mute); text-align: center; padding: 4px; }
.ml-link-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.ml-link-shot:not(.is-blank) { padding: 0; }
.ml-link-t { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ml-link-t b { font: 700 14px/1.3 var(--ems-font-ui); color: var(--ems-navy-800); }
.ml-link-t small { font: 400 12.5px/1.4 var(--ems-font-body); color: var(--ems-mute); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ml-link-t i { font: 600 11.5px/1.3 var(--ems-font-ui); font-style: normal; color: var(--ems-navy-500); display: inline-flex; align-items: center; gap: 4px; }
.ml-link .ml-del { position: absolute; top: 8px; right: 8px; }
.ml-none { margin: 10px 0; color: var(--ems-mute); }

.ml-empty { text-align: center; padding: 40px 20px; border-radius: 18px; background: #fff; border: 1px dashed var(--ems-line-2); }
.ml-empty-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--ems-navy-50); color: var(--ems-navy-500); }
.ml-empty h2 { margin: 12px 0 6px; font: 800 19px/1.2 var(--ems-font-display); color: var(--ems-navy-800); }
.ml-empty p { margin: 0 auto 16px; max-width: 52ch; color: var(--ems-mute); }
.ml-empty-go { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ml-doc { font: 400 15px/1.6 var(--ems-font-body); color: var(--ems-ink); }
.ml-doc h2 { font: 700 16px/1.3 var(--ems-font-display); color: var(--ems-navy-800); margin: 16px 0 6px; }

@media (max-width: 640px) {
  .ml-item { flex-wrap: wrap; padding: 6px 10px; }
  .ml-item-open { flex-basis: 100%; padding: 8px 4px; }
  .ml-item-acts { margin-left: 50px; }
  .ml-q { flex-basis: 100%; }
  .ml-tool-go { padding: 7px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ml-sync.is-saving > i { animation: none; }
  .ml-door, .ml-link, .ml-door-go { transition: none; }
  .ml-door:hover, .ml-link:hover { transform: none; }
}

/* ── Send to your mentees (resources.js sendTo) ─────────────────────────── */
.rg-snd-res { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 14px; border-radius: 12px; background: var(--set-tint, #f4f6fb); }
.rg-snd-res img { flex: none; width: 96px; height: 60px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--set-line, #e6e9f2); }
.rg-snd-res span { display: grid; gap: 2px; min-width: 0; }
.rg-snd-res b { font: 700 14px/1.35 var(--ems-font-ui); color: var(--set-ink, #1c2333); }
.rg-snd-res small { font: 700 11px/1.3 var(--ems-font-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--ems-mute-2, #64748b); }
.rg-snd-bar { display: flex; align-items: center; justify-content: space-between; }
.rg-snd-bar .set-kicker, .rg-snd-k { margin: 0 0 6px; }
.rg-snd-all { border: 0; background: none; padding: 0 2px; cursor: pointer; font: 700 12.5px var(--ems-font-ui); color: var(--ems-navy-500); }
.rg-snd-all:hover { text-decoration: underline; }
.rg-snd .sv-who { margin: 0 0 14px; }
.rg-snd textarea { font: 400 14px/1.5 var(--ems-font-body); resize: vertical; }
.rg-snd-hint, .rg-snd-none { margin: 6px 0 0; font: 400 12.5px/1.45 var(--ems-font-body); color: var(--ems-mute-2, #64748b); }
.rg-snd-none { font-size: 14px; color: var(--set-ink, #1c2333); }

/* ── 11-16 every topic a panel, chips that look like buttons ────────────────
   Tyler: every section should have a background like All tools' "Recommended
   for you", and Resources and All tools should match. So each topic is its
   own tinted panel in its colour (as ems-alltools.css .ems-cat-g), and the
   topic chips wear their colour the way All tools' journey chips do: tinted,
   solid when picked. A member's row says what they did with it (.rg-use). */
.rg-list { gap: 22px; }
.rg-grp { padding: 20px 20px 22px; border-radius: 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 8%, #fff), #fff 72%);
  border: 1px solid color-mix(in srgb, var(--c) 16%, #e3e8ee); }
.rg-grp-h { border-bottom: 0; padding: 0; margin: 0 0 14px; }
.rg-grp-ic { width: 40px; height: 40px; border-radius: 12px; }
.rg-grp-n { background: #fff; border: 1px solid color-mix(in srgb, var(--c) 20%, #e3e8ee); color: var(--ems-mute, #5b6875); font-weight: 600; padding: 4px 11px; }
.rg-grp-n.is-some { color: var(--c); }
.rg-grp-n b { font-weight: 800; }
.rg-cats.is-quiet { gap: 8px; }
.rg-cats.is-quiet .rg-cat { min-height: 36px; padding: 7px 13px; font-weight: 700; color: var(--cc);
  background: color-mix(in srgb, var(--cc) 7%, #fff); border-color: color-mix(in srgb, var(--cc) 28%, #e3e8ee); }
.rg-cats.is-quiet .rg-cat b { background: color-mix(in srgb, var(--cc) 14%, #fff); }
.rg-cats.is-quiet .rg-cat:hover { background: var(--cc); border-color: var(--cc); color: #fff; }
.rg-cats.is-quiet .rg-cat:hover svg { color: #fff; }
.rg-cats.is-quiet .rg-cat:hover b, .rg-cats.is-quiet .rg-cat.is-on b { background: rgba(255, 255, 255, .22); color: #fff; }
.rg-row-host .rg-use { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px; border-radius: 999px; vertical-align: 1px;
  font-weight: 600; letter-spacing: 0; text-transform: none; background: var(--ems-navy-50, #eef0fa); color: var(--ems-navy-700, #1e296c); }
.rg-row-host .rg-use.is-new { background: none; padding: 0; color: var(--ems-faint, #8a94a6); }
@media (max-width: 760px) { .rg-grp { padding: 16px 14px 18px; border-radius: 18px; } }
@media (max-width: 600px) { .rg-grp-n { display: none; } }
