/* Envo and the app shell around the marketplace (envo.js). A fixed left sidebar in two modes:
   search (new search, recent searches, a Marketplace button at the foot) on #/plan and #/s/<id>,
   and marketplace (the filters, a Search with Envo button at the foot) everywhere else. The shell
   uses the marketplace's tokens (marketplace.css); Envo's own pages use the lab look below. */

:root { --side: 268px; --side-bg: #f7f7f8; }

/* ---------- shell ---------- */
.ev-side {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--side); z-index: 60;
  display: flex; flex-direction: column; gap: 2px; padding: 16px 12px 14px;
  background: var(--side-bg); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin;
}
body.mkt { padding-left: var(--side); }
body.mkt .nav { left: var(--side); }
body.is-envo-route .nav { display: none; }
body.is-envo-route main.mk { padding-top: 0; }
body.is-envo-route .footer { display: none; }

div.ev-plan-only, div.ev-market-only { display: flex; flex-direction: column; min-height: 0; }
body:not(.is-envo-route) .ev-plan-only, body.is-envo-route .ev-market-only { display: none; }
.ev-new {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; margin-bottom: 10px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; text-decoration: none; box-shadow: var(--shadow-sm);
}
.ev-new:hover, .ev-new.is-on { border-color: var(--ink); }
.ev-h { margin: 14px 8px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ev-sessions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; scrollbar-width: thin; }
.ev-sessions li { display: flex; align-items: center; border-radius: 8px; }
.ev-sessions li a { flex: 1; min-width: 0; padding: 7px 10px; font-size: 14px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-sessions li button { border: 0; background: none; color: var(--muted); font-size: 16px; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; opacity: 0; }
.ev-sessions li:hover, .ev-sessions li.is-on { background: #ececee; }
.ev-sessions li:hover button, .ev-sessions li button:focus-visible { opacity: 1; }
.ev-sessions li button:hover { color: var(--ink); background: #e2e2e5; }
.ev-sessions .ev-none { padding: 6px 10px; font-size: 13px; color: var(--muted); }
.ev-title { margin: 6px 8px 10px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.ev-side .ev-filters { position: static; max-height: none; overflow: visible; padding: 0 6px; }
.ev-side .ev-filters .mk-fside-head h3 { font-size: 15px; }
.ev-foot { position: sticky; bottom: -14px; margin: auto -12px -14px; padding: 10px 12px 14px; border-top: 1px solid var(--line); background: var(--side-bg); }
.ev-switch { flex-direction: row; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }
.ev-switch:hover { background: #ececee; }
.ev-switch svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ev-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Filters sit in the sidebar, so the results take the full width. */
.mk-explore-body { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 901px) { .mk-explore-body .mk-filterbtn { display: none; } }
@media (max-width: 900px) { .ev-side .ev-filters { display: block; } }
.ev-burger, .ev-scrim { display: none; }

@media (max-width: 900px) {
  body.mkt { padding-left: 0; }
  body.mkt .nav { left: 0; }
  .ev-side { transform: translateX(-100%); transition: transform .2s ease; padding-top: max(16px, env(safe-area-inset-top, 0px)); }
  body.ev-side-open .ev-side { transform: none; box-shadow: var(--shadow-lg); }
  body.ev-side-open .ev-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 55; }
  .ev-burger {
    display: grid; place-items: center; position: fixed; z-index: 58; width: 40px; height: 40px; border-radius: 10px;
    top: calc(10px + env(safe-area-inset-top, 0px)); left: max(10px, env(safe-area-inset-left, 0px));
    background: #fff; border: 1px solid var(--line-2); color: var(--ink); cursor: pointer; box-shadow: var(--shadow-sm);
  }
  body.mkt:not(.is-envo-route) .nav-top { padding-left: 62px; }
  body.is-envo-route main.mk { padding-top: 56px; }
}

/* ---------- Envo search (envo.js) ----------
   Matches the site's lab restyle: Geist and Geist Mono, warm paper, white cards, ink type at
   weight 400 with tight tracking, mono eyebrows with a small gold triangle, slow eased reveals. */
body.is-envo-route {
  --evs-bg: #f3f2ee; --evs-card: #ffffff; --evs-grey: #ebe9e3; --evs-ink: #111112; --evs-ink-2: #55534f;
  --evs-muted: #8b8882; --evs-line: #e2dfd8; --evs-taupe: #b6a184; --evs-gold: #f2c230; --evs-green: #1c3328;
  --evs-ease: cubic-bezier(.16, 1, .3, 1); --evs-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --side-bg: #ecebe6;
  background: var(--evs-bg);
}
body.is-envo-route, body.is-envo-route .ev-side { font-family: "Geist", var(--sans); }
body.is-envo-route .ev-side { border-right-color: var(--evs-line); }
body.is-envo-route .ev-new { border-color: var(--evs-line); border-radius: 10px; font-weight: 500; box-shadow: none; }
body.is-envo-route .ev-new:hover, body.is-envo-route .ev-new.is-on { border-color: var(--evs-ink); }
body.is-envo-route .ev-h { font-family: var(--evs-mono); font-weight: 400; letter-spacing: .12em; font-size: 11px; }
body.is-envo-route .ev-sessions li:hover, body.is-envo-route .ev-sessions li.is-on { background: #e1dfd8; }
body.is-envo-route .ev-switch { font-weight: 500; }
body.is-envo-route .ev-switch:hover { background: #e1dfd8; }
body.is-envo-route .ev-foot { border-top-color: var(--evs-line); }

.evs { color: var(--evs-ink); max-width: 1040px; margin: 0 auto; padding: 40px max(24px, env(safe-area-inset-right, 0px)) 72px max(24px, env(safe-area-inset-left, 0px)); }
.evs-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 400 12px/1 var(--evs-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--evs-ink-2); }
.evs-eyebrow::before { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid var(--evs-gold); }
@keyframes evs-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* home */
.evs-home { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; max-width: 880px; padding-top: 9vh; padding-bottom: 9vh; }
.evs-home > * { animation: evs-up 1.1s var(--evs-ease) both; }
.evs-home > :nth-child(2) { animation-delay: .06s; } .evs-home > :nth-child(3) { animation-delay: .12s; }
.evs-home > :nth-child(4) { animation-delay: .18s; } .evs-home > :nth-child(5) { animation-delay: .24s; } .evs-home > :nth-child(n+6) { animation-delay: .3s; }
.evs-home h1 { margin: 0; font-weight: 400; font-size: clamp(36px, 5.2vw, 60px); line-height: 1.02; letter-spacing: -.045em; }
.evs-sub { margin: 18px 0 30px; max-width: 620px; font-size: 18px; line-height: 1.5; color: var(--evs-ink-2); }
.evs-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; }
.evs-try span { font: 400 12px var(--evs-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--evs-muted); margin-right: 4px; }
.evs-try button { border: 1px solid var(--evs-line); background: var(--evs-card); color: var(--evs-ink); border-radius: 999px; padding: 7px 14px; font: 400 14px "Geist", var(--sans); cursor: pointer; transition: border-color .3s var(--evs-ease), transform .3s var(--evs-ease); }
.evs-try button:hover { border-color: var(--evs-ink); transform: translateY(-1px); }
.evs-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 44px; }
.evs-stats section { background: var(--evs-card); border: 1px solid var(--evs-line); border-radius: 16px; padding: 18px 18px 14px; }
.evs-stats h2 { margin: 0 0 12px; font: 400 12px var(--evs-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--evs-ink-2); }
.evs-tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.evs-tiles button { display: inline-flex; align-items: baseline; gap: 7px; border: 0; background: var(--evs-bg); border-radius: 8px; padding: 7px 11px; font: 400 13.5px "Geist", var(--sans); color: var(--evs-ink); cursor: pointer; transition: background .3s var(--evs-ease); }
.evs-tiles button:hover { background: var(--evs-grey); }
.evs-tiles b { font: 500 13px var(--evs-mono); }
.evs-fine { margin: 26px 0 0; font-size: 13px; color: var(--evs-muted); }

/* search box */
.evs-box { display: flex; align-items: center; gap: 12px; background: var(--evs-card); border: 1px solid var(--evs-line); border-radius: 14px; padding: 8px 8px 8px 16px; color: var(--evs-muted); transition: border-color .3s var(--evs-ease), box-shadow .3s var(--evs-ease); }
.evs-box:focus-within { border-color: var(--evs-ink); box-shadow: 0 10px 30px rgba(17, 17, 18, .08); color: var(--evs-ink); }
.evs-box svg { flex: none; }
.evs-box textarea { flex: 1; min-width: 0; min-height: 0; width: auto; border: 0; border-radius: 0; box-shadow: none; outline: none; resize: none; background: transparent; padding: 8px 0; font: 400 16px/1.45 "Geist", var(--sans); color: var(--evs-ink); max-height: 160px; }
.evs-box textarea:focus { border: 0; box-shadow: none; }
.evs-box textarea::placeholder { color: var(--evs-muted); }
.evs-box.is-big { padding: 10px 10px 10px 20px; border-radius: 18px; }
.evs-box.is-big textarea { font-size: 18px; }
.evs-go { flex: none; border: 0; border-radius: 10px; background: var(--evs-ink); color: #fff; font: 500 15px "Geist", var(--sans); padding: 12px 20px; cursor: pointer; transition: background .3s var(--evs-ease); }
.evs-go:hover { background: #2a2a2d; }

/* results */
.evs-results { max-width: 1000px; padding-top: 28px; }
.evs-head { position: sticky; top: 0; z-index: 20; margin: 0 -8px 22px; padding: 12px 8px; background: linear-gradient(var(--evs-bg) 80%, rgba(243, 242, 238, 0)); }
.evs-read { background: var(--evs-green); color: #f3f2ee; border-radius: 18px; padding: 24px 26px 22px; margin-bottom: 18px; animation: evs-up 1.1s var(--evs-ease) both; }
.evs-read .evs-eyebrow { color: rgba(243, 242, 238, .7); }
.evs-summary { margin: 0 0 18px; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.25; letter-spacing: -.03em; font-weight: 400; }
.evs-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; background: rgba(243, 242, 238, .14); border-radius: 12px; overflow: hidden; }
.evs-cells div { background: var(--evs-green); padding: 12px 14px 2px 0; }
.evs-cells div + div { padding-left: 14px; }
.evs-cells dt { font: 400 11px var(--evs-mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(243, 242, 238, .55); margin-bottom: 6px; }
.evs-cells dd { margin: 0 0 10px; font-size: 14.5px; line-height: 1.4; }
.evs-look { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 0 0; }
.evs-look span { font: 400 11px var(--evs-mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(243, 242, 238, .55); margin-right: 4px; }
.evs-look em { font-style: normal; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(242, 194, 48, .16); color: #f6d872; }
.evs-read.is-off { background: var(--evs-card); color: var(--evs-ink); border: 1px solid var(--evs-line); }
.evs-read.is-off .evs-eyebrow { color: var(--evs-ink-2); }
.evs-read.is-off p:last-child { margin: 0; color: var(--evs-ink-2); }
.evs-read.is-loading { background: var(--evs-green); }
.evs-steps { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 4px 0 0; font-size: 17px; letter-spacing: -.02em; }
.evs-steps span { color: rgba(243, 242, 238, .35); transition: color .8s var(--evs-ease); display: inline-flex; align-items: center; gap: 10px; }
.evs-steps span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.evs-steps span.is-on { color: #f3f2ee; }
.evs-steps span.is-on:last-of-type::before, .evs-steps span.is-on + span:not(.is-on)::before { animation: evs-pulse 1.2s ease-in-out infinite; }
@keyframes evs-pulse { 50% { opacity: .3; } }

.evs-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.evs-f { position: relative; }
.evs-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--evs-line); background: var(--evs-card); color: var(--evs-ink); border-radius: 10px; padding: 8px 12px; font: 400 14px "Geist", var(--sans); cursor: pointer; transition: border-color .3s var(--evs-ease); }
.evs-pill:hover { border-color: #c9c5bc; }
.evs-pill.is-set { border-color: var(--evs-ink); background: var(--evs-ink); color: #fff; }
.evs-toggle input { width: 14px; height: 14px; margin: 0; min-height: 0; accent-color: var(--evs-gold); }
.evs-clear, .evs-link { border: 0; background: none; padding: 6px 4px; font: 400 14px "Geist", var(--sans); color: var(--evs-ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.evs-clear:hover, .evs-link:hover { color: var(--evs-ink); }
.evs-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 270px; background: var(--evs-card); border: 1px solid var(--evs-line); border-radius: 14px; box-shadow: 0 18px 40px rgba(17, 17, 18, .12); padding: 8px; animation: evs-up .4s var(--evs-ease) both; }
.evs-find { width: 100%; min-height: 0; border: 1px solid var(--evs-line); border-radius: 9px; padding: 7px 10px; font: 400 14px "Geist", var(--sans); box-shadow: none; margin-bottom: 6px; }
.evs-opts { max-height: 280px; overflow-y: auto; }
.evs-opts label { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 7px 8px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.evs-opts label:hover { background: var(--evs-bg); }
.evs-opts input { width: 15px; height: 15px; margin: 0; min-height: 0; accent-color: var(--evs-ink); }
.evs-opts small { font: 400 12px var(--evs-mono); color: var(--evs-muted); }
.evs-none { margin: 6px 8px; font-size: 13px; color: var(--evs-muted); }

.evs-count { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: 6px 0 12px; }
.evs-count p { margin: 0; font-size: 14px; color: var(--evs-ink-2); }
.evs-count b { font: 500 14px var(--evs-mono); color: var(--evs-ink); }

.evs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.evs-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; background: var(--evs-card); border: 1px solid var(--evs-line); border-radius: 16px; padding: 18px; animation: evs-up 1.1s var(--evs-ease) both; animation-delay: calc(var(--i, 0) * 70ms); transition: border-color .4s var(--evs-ease), box-shadow .4s var(--evs-ease); }
.evs-card:hover { border-color: #cfcbc2; box-shadow: 0 14px 34px rgba(17, 17, 18, .06); }
.evs-card .mk-img.evs-thumb, .evs-card .evs-thumb { width: 112px; height: 112px; border-radius: 12px; overflow: hidden; background: var(--evs-grey); }
.evs-card .mk-img.evs-thumb img { width: 100%; height: 100%; object-fit: cover; }
.evs-main { min-width: 0; }
.evs-top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.evs-kicker { margin: 0 0 6px; font: 400 11.5px var(--evs-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--evs-muted); }
.evs-card h3 { margin: 0; font-size: 20px; font-weight: 500; line-height: 1.25; letter-spacing: -.02em; }
.evs-card h3 a { text-decoration: none; color: var(--evs-ink); }
.evs-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.evs-fit { flex: none; width: 128px; text-align: right; }
.evs-fit b { display: block; font: 500 26px/1 var(--evs-mono); letter-spacing: -.04em; }
.evs-fit span { display: block; margin: 4px 0 7px; font: 400 11px var(--evs-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--evs-ink-2); }
.evs-fit i { display: block; height: 4px; border-radius: 4px; background: var(--evs-grey); position: relative; overflow: hidden; }
.evs-fit i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--evs-gold); border-radius: 4px; transform-origin: left; animation: evs-bar 1.3s var(--evs-ease) both .2s; }
@keyframes evs-bar { from { transform: scaleX(0); } }
.evs-why { margin: 12px 0 0; font-size: 15px; line-height: 1.55; color: #2c2b29; }
.evs-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.evs-tags em { font-style: normal; font-size: 12.5px; padding: 4px 9px; border-radius: 6px; background: #fbf3d6; color: #6b5310; }
.evs-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--evs-line); }
.evs-facts div:nth-child(-n+2) { grid-column: span 2; }
.evs-facts dt { font: 400 10.5px var(--evs-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--evs-muted); margin-bottom: 5px; }
.evs-facts dd { margin: 0; font-size: 13.5px; line-height: 1.4; display: flex; flex-wrap: wrap; gap: 4px; }
.evs-facts dd span { padding: 3px 8px; border-radius: 6px; background: var(--evs-bg); font-size: 12.5px; }
.evs-facts dd em { font-style: normal; font-size: 12.5px; color: var(--evs-muted); padding: 3px 2px; }
.evs-facts .is-ok { font-weight: 500; color: #1d6b3a; }
.evs-acts { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.evs-btn { padding: 10px 16px; font: 500 14px "Geist", var(--sans); border-radius: 10px; text-decoration: none; }
.evs .btn-dark { background: var(--evs-ink); color: #fff; border-radius: 10px; font-family: "Geist", var(--sans); font-weight: 500; }
.evs .btn-line { border-color: var(--evs-line); border-radius: 10px; font-family: "Geist", var(--sans); font-weight: 500; }
.evs .btn-line:hover { border-color: var(--evs-ink); background: var(--evs-card); }
.evs-acts .mk-heart { position: static; margin-left: auto; width: 38px; height: 38px; }
.evs-acts .mk-heart svg { width: 20px; height: 20px; fill: none; stroke: var(--evs-ink-2); stroke-width: 2.4; }
.evs-acts .mk-heart.is-on svg { fill: var(--evs-ink); stroke: var(--evs-ink); }

.evs-card.is-ghost { min-height: 150px; }
.evs-card.is-ghost i { display: block; height: 12px; border-radius: 6px; margin: 4px 0 14px; background: linear-gradient(90deg, var(--evs-grey), #f4f2ec, var(--evs-grey)); background-size: 200% 100%; animation: evs-shim 1.6s linear infinite; }
.evs-card.is-ghost i:nth-child(1) { width: 40%; height: 18px; } .evs-card.is-ghost i:nth-child(2) { width: 85%; } .evs-card.is-ghost i:nth-child(3) { width: 65%; }
.evs-card.is-ghost .evs-thumb { animation: evs-shim 1.6s linear infinite; background: linear-gradient(90deg, var(--evs-grey), #f4f2ec, var(--evs-grey)); background-size: 200% 100%; }
@keyframes evs-shim { to { background-position: -200% 0; } }

.evs-empty { background: var(--evs-card); border: 1px dashed #cfcbc2; border-radius: 16px; padding: 28px; text-align: center; }
.evs-empty p { margin: 0 0 14px; color: var(--evs-ink-2); }
.evs-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 20px 22px; background: var(--evs-grey); border-radius: 16px; }
.evs-end p { margin: 0; max-width: 560px; font-size: 14.5px; color: var(--evs-ink-2); }
.evs-end b { color: var(--evs-ink); font-weight: 500; }
.evs-end-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.evs-end .btn { padding: 11px 18px; font-size: 14.5px; text-decoration: none; }

@media (max-width: 900px) {
  .evs { padding-top: 8px; }
  .evs-stats { grid-template-columns: minmax(0, 1fr); }
  .evs-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evs-cells div:nth-child(3) { padding-left: 0; }
  .evs-head { top: 0; }
}
@media (max-width: 640px) {
  .evs { padding-left: 16px; padding-right: 16px; }
  .evs-card { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 14px; }
  .evs-card .mk-img.evs-thumb, .evs-card .evs-thumb { width: 100%; height: 140px; }
  .evs-top { flex-direction: column; gap: 10px; }
  .evs-fit { width: 100%; text-align: left; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; }
  .evs-fit span { margin: 0; }
  .evs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evs-cells { grid-template-columns: minmax(0, 1fr); }
  .evs-cells div + div { padding-left: 0; }
  .evs-box.is-big textarea { font-size: 16px; }
  .evs-go { padding: 11px 14px; }
  .evs-acts .btn { flex: 1; padding-left: 8px; padding-right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .ev-side, .evs *, .evs-home > * { animation: none !important; transition: none !important; }
}
