/* The Saved page (saved.js). Colours come from the host site's own tokens, the same way
   card-actions.css takes them, so the page looks like the site it's on rather than like a widget
   dropped into it. Canonical copy: Viv-Resource-Library packages/card-actions/. */
.vsav, .vsav-dlg, .vsav__menu, .vsav__toast {
  --vsav-panel: var(--panel, var(--surface, #fff)); --vsav-bg: var(--bg, #f7f7f5); --vsav-ink: var(--ink, #1d2327);
  --vsav-muted: var(--muted, #5f6b73); --vsav-line: var(--line, #e3e0d8); --vsav-accent: var(--brand, var(--accent, #0f6e6a));
  --vsav-soft: var(--brand-soft, var(--accent-soft, #e2f1ef)); --vsav-on: var(--brand-ink, #fff); --vsav-bad: #b42318;
  color: var(--vsav-ink);
}
.vsav { display: grid; grid-template-columns: minmax(190px, 240px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.vsav * { box-sizing: border-box; }
/* The page is built from <aside>, <nav> and <header>, and every host site styles those by element
   — the demo's own sticky site header was enough to turn this one into a flex row. Say what these
   are rather than inheriting whatever the site says about the tag. */
.vsav__side, .vsav__side nav, .vsav__main, .vsav__head { display: block; background: none; box-shadow: none; position: static; inset: auto; padding: 0; margin: 0; border: 0; font: inherit; }

/* ---- the collections, down the side ---- */
.vsav__side { position: sticky; top: 1rem; display: grid; gap: .5rem; }
.vsav__side h2 { margin: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--vsav-muted); }
.vsav__side nav { display: grid; gap: .15rem; }
.vsav__coll { display: flex; align-items: center; gap: .45rem; width: 100%; font: inherit; font-size: .9rem; text-align: left; color: var(--vsav-ink); background: none; border: 0; border-radius: 9px; padding: .45rem .55rem; cursor: pointer; }
.vsav__coll:hover { background: var(--vsav-bg); }
.vsav__coll[aria-current="true"] { background: var(--vsav-soft); color: var(--vsav-accent); font-weight: 650; }
.vsav__coll:focus-visible, .vsav__more:focus-visible, .vsav__q:focus-visible { outline: 2px solid var(--vsav-accent); outline-offset: 2px; }
.vsav__ico { flex: none; width: 1.3em; text-align: center; }
.vsav__cname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vsav__coll small { flex: none; color: var(--vsav-muted); font-variant-numeric: tabular-nums; font-size: .78rem; }
.vsav__newc { display: flex; gap: .3rem; margin-top: .2rem; }
.vsav__newc input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: .35rem .5rem; border: 1px solid var(--vsav-line); border-radius: 8px; background: var(--vsav-panel); color: inherit; }
.vsav__newc button { font: inherit; font-size: .82rem; font-weight: 600; padding: 0 .6rem; border: 1px solid var(--vsav-line); border-radius: 8px; background: var(--vsav-panel); color: var(--vsav-muted); cursor: pointer; }
.vsav__newc button:hover { color: var(--vsav-ink); border-color: var(--vsav-muted); }
.vsav__hint { margin: .4rem 0 0; font-size: .8rem; line-height: 1.45; color: var(--vsav-muted); }
.vsav__hint button { font: inherit; font-weight: 700; color: var(--vsav-accent); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* ---- Following (health-culture.org#365) ---- */
.vsav__side h2 + nav { margin-top: -.1rem; }
.vsav__unfollow { flex: none; align-self: center; font: inherit; font-size: .82rem; font-weight: 650; padding: .35rem .8rem; border: 1px solid var(--vsav-line); border-radius: 999px; background: var(--vsav-panel); color: var(--vsav-ink); cursor: pointer; }
.vsav__unfollow:hover { border-color: var(--vsav-bad); color: var(--vsav-bad); }
.vsav__unfollow:focus-visible { outline: 2px solid var(--vsav-accent); outline-offset: 2px; }
/* A followed topic's weekly email (#373): a small select beside Unfollow. */
.vsav__email { flex: none; align-self: center; display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--vsav-muted); }
.vsav__email select { font: inherit; font-size: .82rem; padding: .3rem .4rem; border: 1px solid var(--vsav-line); border-radius: 8px; background: var(--vsav-panel); color: var(--vsav-ink); }
.vsav__note { margin: 0 0 .6rem; padding: .5rem .75rem; border-radius: 8px; background: color-mix(in srgb, var(--vsav-accent) 10%, transparent); font-size: .85rem; }

/* ---- signed out: the page asks them to register (health-culture.org#361) ---- */
.vsav--out { display: block; }
.vsav__join { max-width: 34rem; margin: 2rem auto; padding: 1.6rem 1.5rem; text-align: center; border: 1px solid var(--vsav-line); border-radius: 14px; background: var(--vsav-panel); }
.vsav__join-ico { margin: 0; font-size: 2rem; line-height: 1; }
.vsav__join h2 { margin: .6rem 0 .4rem; font-size: 1.3rem; text-transform: none; letter-spacing: 0; color: var(--vsav-ink); }
.vsav__join p { margin: 0; color: var(--vsav-muted); line-height: 1.5; }
.vsav__join-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem 1rem; margin-top: 1.1rem !important; font-size: .88rem; }
.vsav__go { font: inherit; font-weight: 650; font-size: .95rem; padding: .55rem 1.3rem; border: 1px solid var(--vsav-accent); border-radius: 10px; background: var(--vsav-accent); color: var(--vsav-on); cursor: pointer; }
.vsav__go:hover { filter: brightness(1.08); }
.vsav__inline { font: inherit; font-weight: 700; color: var(--vsav-accent); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.vsav__go:focus-visible, .vsav__inline:focus-visible { outline: 2px solid var(--vsav-accent); outline-offset: 2px; }

/* ---- the collection on screen ---- */
.vsav__main { min-width: 0; }
.vsav__head { position: relative; border-bottom: 1px solid var(--vsav-line); padding-bottom: .7rem; margin-bottom: .2rem; }
.vsav__title { display: flex; align-items: center; gap: .4rem; }
.vsav__title h3 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.vsav__meta { margin: .2rem 0 0; font-size: .82rem; color: var(--vsav-muted); }
.vsav__desc { margin: .35rem 0 0; font-size: .92rem; color: var(--vsav-muted); }
.vsav__q { width: min(320px, 100%); margin-top: .6rem; font: inherit; font-size: 16px; padding: .4rem .6rem; border: 1px solid var(--vsav-line); border-radius: 9px; background: var(--vsav-panel); color: inherit; }
.vsav__more { flex: none; width: 30px; height: 30px; font: inherit; font-size: 1.1rem; line-height: 1; color: var(--vsav-muted); background: none; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.vsav__more:hover { color: var(--vsav-ink); background: var(--vsav-bg); border-color: var(--vsav-line); }

/* ---- the rows ---- */
.vsav__list { list-style: none; margin: 0; padding: 0; }
.vsav__row { position: relative; display: flex; align-items: flex-start; gap: .5rem; padding: .7rem .2rem; border-bottom: 1px solid var(--vsav-line); }
.vsav__row:hover { background: color-mix(in srgb, var(--vsav-bg) 60%, transparent); }
.vsav__grip { flex: none; margin-top: .9rem; color: var(--vsav-line); cursor: grab; font-size: .9rem; line-height: 1; }
.vsav__row:hover .vsav__grip { color: var(--vsav-muted); }
.vsav__body { flex: 1; min-width: 0; }
.vsav__tags { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: 0 0 .15rem; font-size: .7rem; }
.vsav__kind { text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--vsav-accent); }
.vsav__site, .vsav__in, .vsav__when { color: var(--vsav-muted); }
.vsav__site::before, .vsav__in::before, .vsav__when::before { content: "·"; margin-right: .3rem; }
.vsav__in { background: var(--vsav-soft); color: var(--vsav-accent); border-radius: 999px; padding: .05rem .4rem; font-weight: 600; }
.vsav__in::before { content: none; }
.vsav__t { display: block; font-size: .98rem; font-weight: 600; line-height: 1.35; color: inherit; text-decoration: none; }
a.vsav__t:hover { color: var(--vsav-accent); text-decoration: underline; }
.vsav__note { margin: .2rem 0 0; font-size: .86rem; font-style: italic; color: var(--vsav-muted); }
.vsav__gone { margin: .2rem 0 0; font-size: .8rem; color: var(--vsav-bad); }
.vsav--dead .vsav__t { color: var(--vsav-muted); font-family: ui-monospace, monospace; font-size: .85rem; }
.vsav--drag { opacity: .4; }
.vsav--over { box-shadow: inset 0 2px 0 var(--vsav-accent); }
.vsav__empty { padding: 1.6rem .2rem; color: var(--vsav-muted); font-size: .92rem; line-height: 1.5; border-bottom: 0; }

/* ---- menus and toasts ---- */
.vsav__menu { position: fixed; z-index: 90; min-width: 220px; display: grid; background: var(--vsav-panel); border: 1px solid var(--vsav-line); border-radius: 11px; box-shadow: 0 12px 30px rgba(0, 0, 0, .16); padding: .3rem; }
.vsav__menu button { font: inherit; font-size: .86rem; text-align: left; color: var(--vsav-ink); background: none; border: 0; border-radius: 7px; padding: .45rem .55rem; cursor: pointer; }
.vsav__menu button:hover { background: var(--vsav-bg); }
.vsav__menu button[aria-pressed="true"]::after { content: "✓"; float: right; color: var(--vsav-accent); font-weight: 700; }
.vsav__menu button.vsav--danger { color: var(--vsav-bad); }
.vsav__menu hr { border: 0; border-top: 1px solid var(--vsav-line); margin: .25rem .2rem; }
.vsav__toast { position: fixed; left: 50%; bottom: 1.2rem; z-index: 60; transform: translateX(-50%); max-width: min(420px, calc(100vw - 2rem)); background: var(--vsav-ink); color: var(--vsav-panel); font-size: .85rem; line-height: 1.4; padding: .6rem .85rem; border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); }
.vsav__toast button { font: inherit; font-weight: 700; color: #fff; background: none; border: 0; padding: 0 .15rem; text-decoration: underline; cursor: pointer; }

/* ---- the prompt dialog ---- */
.vsav-dlg { width: min(420px, calc(100vw - 32px)); border: 1px solid var(--vsav-line); border-radius: 14px; background: var(--vsav-panel); padding: 1.1rem 1.2rem 1.2rem; }
.vsav-dlg::backdrop { background: rgba(10, 15, 20, .45); }
.vsav-dlg h2 { margin: 0 0 .7rem; font-size: 1.1rem; }
.vsav-dlg label { display: grid; gap: .3rem; font-size: .82rem; color: var(--vsav-muted); }
.vsav-dlg input { font: inherit; font-size: 16px; color: var(--vsav-ink); padding: .45rem .6rem; border: 1px solid var(--vsav-line); border-radius: 9px; background: var(--vsav-bg); }
.vsav-dlg__row { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.vsav-btn { font: inherit; font-size: .88rem; font-weight: 650; color: var(--vsav-on); background: var(--vsav-accent); border: 1px solid var(--vsav-accent); border-radius: 9px; padding: .45rem .85rem; cursor: pointer; }
.vsav-btn--ghost { color: var(--vsav-muted); background: none; border-color: var(--vsav-line); }
.vsav-btn--danger { background: var(--vsav-bad); border-color: var(--vsav-bad); color: #fff; }

/* ---- the header link ---- */
.vsav-link--some [data-count] { display: inline-block; min-width: 1.3em; margin-left: .3rem; padding: 0 .3em; border-radius: 999px; background: var(--brand, var(--accent, #0f6e6a)); color: var(--brand-ink, #fff); font-size: .7rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }

/* ---- phone: the collections become a row across the top ---- */
@media (max-width: 720px) {
  .vsav { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .vsav__side { position: static; }
  .vsav__side nav { display: flex; gap: .3rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: thin; }
  .vsav__coll { width: auto; flex: none; border: 1px solid var(--vsav-line); }
  .vsav__cname { max-width: 10rem; }
}
@media print {
  .vsav__side, .vsav__more, .vsav__q, .vsav__grip, .vsav__toast { display: none; }
  .vsav { display: block; }
}

/* Changed since you saved it (#550): a quiet box above the list, a dot on lists that have one. */
.vsav__changes { margin: .75rem 0 .25rem; padding: .6rem .85rem; border-left: 3px solid #b45309; border-radius: 6px; background: color-mix(in srgb, #b45309 8%, transparent); font-size: .92rem; }
.vsav__changes h4 { margin: 0 0 .35rem; font-size: .95rem; }
.vsav__changes ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.vsav__changes li a { font-weight: 600; }
.vsav__changes li span { display: block; }
.vsav__changes-more { margin: .4rem 0 0; font-size: .85rem; color: var(--vsav-muted); }
.vsav__coll--changed .vsav__cname::after { content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .35em; border-radius: 50%; background: #b45309; vertical-align: middle; }
