/* ============================================================================
   Seller storefront — the public /u/<handle> (Seller profile v2)
   Ported from the design repo's `marketplace/Marketplace - Seller v2.html` at
   103c6c7 (its `sv-page` block), on the clean pattern set: Home v2's hero and
   quiet links (`.hm-hero`, `.hm-actions`, `.hm-alt`), the clean listing card
   (`.hm-card`) and the section eyebrow (`.hm-eb`) are css/sx-home.css's; this
   sheet is the page's own layer. The one other page that links it is the store
   editor (/account/storefront), whose live preview draws this hero through its
   macro (components/sx_seller_hero.html, seller_hero_preview) and frames it under
   `.sfe-prev` in css/sx-storefront-editor.css.

   The page's previous generation, `.sf-*` in css/sx-seller.css, stays the
   follow lists'; this page does not load it, and this sheet styles none of its
   names.

   Inverted from the prototype the usual way: it authors at data-theme="dark"
   on its `.sx` div, and every value here is a token each theme block already
   resolves, so nothing below names a theme. Its `.sx .sv-*` prefixes beat its
   own (0,1,0) resets; this app's `.sx` resets are (0,0,1), so a class alone
   wins and the prefix is dropped. A hex appears only where it is data: a cover
   preset's pair (base.css's `.sx-grad--*`) and a type's dot (`--sx-lt-*`).
   ========================================================================== */

/* ---- hero ----
   The wayfinder's offset is the hero's top padding, as on every page that
   leads with one (css/sx-eyebrow.css; the prototype writes 40px). The title
   steps down from 44px to 34px under 720px, and Home v2's `margin-top: 28px`
   on it is zeroed: the cover sits between the two. */
.sv-hero-in { position: relative; }
.hm-hero.sv-hero h1 {
  margin: 0; max-width: none;
  font-size: 44px; line-height: 1.08; letter-spacing: -0.03em;
  /* The name falls back to the handle, which has nowhere to break
     (tests/test_long_handles_wrap.py). */
  overflow-wrap: anywhere;
}
/* The tagline is the seller's own words: a run with no space in it (a link, a
   hashtag) breaks anywhere (tests/test_storefront_hero_long_values_wrap.py). */
.hm-hero.sv-hero .lede { margin-top: 14px; max-width: 60ch; font-size: 18px; overflow-wrap: anywhere; }

/* The cover: the banner or the preset the owner set in Account › Storefront,
   else a neutral band. The preset reads its pair from the `.sx-grad--*` class
   it carries (base.css), the cover stops as they are. */
.sv-cover {
  position: relative; display: block; margin-top: 20px; height: 220px;
  border-radius: var(--sx-r-lg); overflow: hidden;
  background: var(--sx-bg-2); box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.sv-cover-img,
.sv-cover-g { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.sv-cover-g { background: linear-gradient(135deg, var(--sx-grad-a) 0%, var(--sx-grad-b) 100%); }
/* The leading badge on the cover: Home v2's dark glass (`.hm-owned`, white on
   72% ink, which reads on any photo), in sentence case. */
.sv-cover-b {
  position: absolute; left: 16px; top: 16px; z-index: 1;
  height: 24px; padding: 0 10px;
  font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none;
}

/* The identity: the avatar over the cover's edge, then the text column. */
.sv-id { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0 28px; padding: 0 8px; }
/* A neutral tile: the page makes up no seller colour. The ring is the page's
   ground, so the tile reads as cut out of the cover. */
.sv-av {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 96px; height: 96px; margin-top: -40px; border-radius: 24px;
  background: var(--sx-surface-2);
  box-shadow: 0 0 0 1px var(--sx-line-2) inset, 0 0 0 4px var(--sx-bg);
  font-size: 28px; font-weight: 600; letter-spacing: 0.02em; color: var(--sx-text);
}
.sv-av img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.sv-tick {
  position: absolute; right: -6px; bottom: -6px;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sx-surface);
  box-shadow: 0 0 0 1px var(--sx-line-2) inset, 0 0 0 3px var(--sx-bg);
  color: var(--sx-text);
}
.sv-info { min-width: 0; padding-top: 24px; }
.sv-name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.sv-bdgs { display: flex; flex-wrap: wrap; gap: 6px; }
/* A badge is an outline chip that explains itself on hover, focus or a tap
   (seller_badge_tips.js marks it `aria-expanded` while its line is up). */
.sv-bdg {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: 999px;
  box-shadow: 0 0 0 1px var(--sx-line-2) inset;
  font: 500 13px var(--sx-font-body); color: var(--sx-text-2); white-space: nowrap;
  transition: color 120ms, box-shadow 120ms, background 120ms;
}
.sv-bdg:hover { color: var(--sx-text); box-shadow: 0 0 0 1px var(--sx-text-2) inset; }
.sv-bdg[aria-expanded="true"] { background: var(--sx-surface-2); color: var(--sx-text); box-shadow: 0 0 0 1px var(--sx-text-2) inset; }
.sv-bdg svg { flex: none; }
.sv-handle { margin-top: 14px; font-family: var(--sx-font-mono); font-size: 13px; color: var(--sx-text-2); overflow-wrap: anywhere; }
.sv-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; font-size: 13.5px; color: var(--sx-text-2); }
/* An item is an inline-flex box in a wrapping row, so its minimum is its whole
   unbroken run unless it may shrink; the icon sits beside the first line of a
   value that wraps (the `lh` form, and 3px where it is not understood). */
.sv-meta span { display: inline-flex; align-items: flex-start; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.sv-meta svg { flex: none; margin-top: 3px; margin-top: calc((1lh - 13px) / 2); }

/* The actions: Follow, the one primary button, then Message and Share as the
   clean set's quiet text buttons. Follow draws both its icons and its pressed
   state shows one. */
.hm-actions.sv-actions { margin-top: 26px; gap: 12px 24px; }
.sv-follow svg { margin-right: 2px; }
.sv-follow[aria-pressed="true"] .sv-follow-add,
.sv-follow[aria-pressed="false"] .sv-follow-on { display: none; }
.sv-act { display: inline-flex; align-items: center; gap: 7px; border-radius: var(--sx-r-sm); }
.sv-act-ico { display: inline-flex; }
.sv-act:focus-visible,
.sv-bdg:focus-visible,
.sv-tick:focus-visible { outline: 2px solid var(--sx-brand-3); outline-offset: 2px; }

/* ---- the figures: one hairline strip ---- */
.sv-stats { display: flex; flex-wrap: wrap; margin: 44px 0 0; border-top: 1px solid var(--sx-line); border-bottom: 1px solid var(--sx-line); }
.sv-stats > div {
  position: relative; flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column-reverse; gap: 6px;
  padding: 18px 20px; border-left: 1px solid var(--sx-line);
}
.sv-stats > div:first-child { padding-left: 8px; border-left: 0; }
.sv-stats dt { font-size: 12.5px; color: var(--sx-text-2); }
.sv-stats dd {
  margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1;
  color: var(--sx-text); font-variant-numeric: tabular-nums;
}
.sv-stats dd small { margin-left: 4px; font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--sx-text-2); }
/* Followers links the follower list. The figure is the link's words, and its
   ::after stretches it over the whole cell (the cell is its containing block),
   so the label under it is the target too, as the tile it was before Seller
   profile v2: the figure alone measured 12 by 26px on a phone. The ring is
   drawn on that box, round what a tap or Enter opens. */
.sv-stat-link { color: inherit; text-decoration: underline; text-decoration-color: var(--sx-line-2); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.sv-stat-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--sx-r-sm); }
.sv-stat-link:hover { text-decoration-color: currentColor; }
.sv-stat-link:focus-visible { outline: 0; }
.sv-stat-link:focus-visible::after { outline: 2px solid var(--sx-brand-3); outline-offset: -2px; }

/* The owner's announcement, under the figures. */
.sv-ann {
  display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 0; padding: 12px 16px;
  border-radius: var(--sx-r-md); background: var(--sx-surface); box-shadow: 0 0 0 1px var(--sx-line) inset;
  font-size: 14px; line-height: 1.5; color: var(--sx-text);
}
.sv-ann svg { flex: none; margin-top: 2px; color: var(--sx-text-2); }
.sv-ann span { min-width: 0; overflow-wrap: anywhere; }

/* ---- the type tabs: a sticky bar (Type hub v2's), Popular / Newest on its right ----
   Full-bleed through `.sx-bleed`, its content on the column, under the top bar
   (z-index 5) and over the cards. A tab is a link to `?type=`, the selected
   one `aria-selected` (the WAI-ARIA tabs pattern seller_storefront.js keys);
   a sort button a link to `?sort=`, the picked one `aria-pressed`. */
.sv-bar {
  position: sticky; top: 60px; z-index: 4; margin-top: 64px;
  background: color-mix(in srgb, var(--sx-bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(120%); backdrop-filter: blur(14px) saturate(120%);
  border-top: 1px solid var(--sx-line); border-bottom: 1px solid var(--sx-line);
}
.sv-bar-in { display: flex; align-items: center; gap: 16px; min-height: 56px; }
/* The tabs scroll sideways, and a scroller clips at its padding box, so a
   pill's focus ring (2px at a 2px offset, 4px out) needs 4px of padding on
   every side; the -2px margin keeps the row where the prototype's 2px put it. */
.sv-tabs {
  display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0;
  padding: 4px; margin: -2px; overflow-x: auto; scrollbar-width: none;
}
.sv-tabs::-webkit-scrollbar { display: none; }
.sv-pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px; border-radius: 999px;
  box-shadow: 0 0 0 1px var(--sx-line) inset;
  font: 500 13px var(--sx-font-body); color: var(--sx-text-2); white-space: nowrap;
  transition: color 120ms, box-shadow 120ms, background 120ms;
}
.sv-pill:hover { color: var(--sx-text); box-shadow: 0 0 0 1px var(--sx-line-2) inset; }
.sv-pill[aria-selected="true"] { background: var(--sx-surface-2); color: var(--sx-text); box-shadow: 0 0 0 1px var(--sx-line-2) inset; }
.sv-pill .d { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.sv-pill .n { font: 500 12px var(--sx-font-mono); color: var(--sx-text-2); font-variant-numeric: tabular-nums; }
/* A type's dot, from the one palette (tests/test_listing_type_colors.py). */
.sv-tabs .dot--prompt     { background: var(--sx-lt-prompt, #5B7CFF); }
.sv-tabs .dot--persona    { background: var(--sx-lt-persona, #F5B454); }
.sv-tabs .dot--skill      { background: var(--sx-lt-skill, #56C2F0); }
.sv-tabs .dot--assistant  { background: var(--sx-lt-assistant, #B48CFF); }
.sv-tabs .dot--agent      { background: var(--sx-lt-agent, #F47B7B); }
.sv-tabs .dot--crew       { background: var(--sx-lt-crew, #9B8CFF); }
.sv-tabs .dot--product    { background: var(--sx-lt-product, #EC6AB8); }
.sv-tabs .dot--mcp_server { background: var(--sx-lt-mcp_server, #4F46E5); }
.sv-tabs .dot--system     { background: var(--sx-lt-system, #EA580C); }
.sv-seg {
  flex: none; display: flex; gap: 2px; padding: 3px;
  border-radius: var(--sx-r-md); background: var(--sx-surface); box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.sv-seg-btn {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 7px;
  font: 500 13px var(--sx-font-body); color: var(--sx-text-2);
  transition: color 120ms, background 120ms;
}
.sv-seg-btn:hover { color: var(--sx-text); }
.sv-seg-btn[aria-pressed="true"] { background: var(--sx-surface-2); color: var(--sx-text); box-shadow: 0 0 0 1px var(--sx-line-2) inset; }
.sv-pill:focus-visible,
.sv-seg-btn:focus-visible { outline: 2px solid var(--sx-brand-3); outline-offset: 2px; }

/* ---- the body: the cards, and the About / FAQ / signals rail ---- */
.sv-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; margin-top: 32px; }
.sv-main { min-width: 0; }
.sv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
/* The clean card's title takes two lines at most and keeps two, so a row of
   cards lines up whatever their titles (the prototype's `hm-card-v2`). */
.sv-grid .hm-card-t {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(1.35em * 2);
}
/* A pinned listing says "Featured" at its cover's foot, clear of the type
   chip above and the quick-add to its right (components/sx_listing_card.html). */
.sv-feat { position: absolute; left: 12px; bottom: 12px; z-index: 1; }
.sv-empty {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 32px 0; border-top: 1px solid var(--sx-line); border-bottom: 1px solid var(--sx-line);
  font-size: 14px; line-height: 1.6; color: var(--sx-text-2);
}
.sv-empty p { max-width: 62ch; text-wrap: pretty; overflow-wrap: anywhere; }
.sv-empty b { font-weight: 600; color: var(--sx-text); }
.sv-empty .sx-btn { margin-top: 6px; }

.sv-rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sv-card { padding: 20px; border-radius: var(--sx-r-lg); background: var(--sx-surface); box-shadow: 0 0 0 1px var(--sx-line) inset; }
/* An <h2> worn as the clean set's eyebrow, in the body face and the secondary ink. */
.sv-rh { display: block; font-family: var(--sx-font-body); letter-spacing: 0.14em; line-height: 1.5; color: var(--sx-text-2); }
.sv-card-s { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--sx-line); }
.sv-bio { margin-top: 12px; font-size: 14px; line-height: 1.65; color: var(--sx-text-2); text-wrap: pretty; overflow-wrap: anywhere; }
.sv-links { list-style: none; margin: 14px 0 0; padding: 0; }
.sv-links li + li { border-top: 1px solid var(--sx-line); }
.sv-links a {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  font-family: var(--sx-font-mono); font-size: 12.5px; color: var(--sx-text-2);
  transition: color 120ms;
}
.sv-links a:hover { color: var(--sx-text); }
.sv-links a span { min-width: 0; overflow-wrap: anywhere; }
.sv-links svg { flex: none; }
.sv-k { display: block; font-size: 12.5px; font-weight: 500; color: var(--sx-text); }
.sv-v { margin-top: 6px; font-size: 13.5px; line-height: 1.6; color: var(--sx-text-2); text-wrap: pretty; overflow-wrap: anywhere; }
.sv-policy { font-size: 12.5px; line-height: 1.55; color: var(--sx-text-2); }
.sv-policy a { color: var(--sx-text); text-decoration: underline; text-decoration-color: var(--sx-line-2); text-underline-offset: 3px; }

/* The FAQ: Sell v2's folded hairline rows, sized for the rail. Each row is a
   <details>, so it opens with no script; the chevron turns while it is open. */
.sv-faq { margin-top: 10px; border-top: 1px solid var(--sx-line); }
.sv-faq-i { border-bottom: 1px solid var(--sx-line); }
.sv-faq-i:last-child { border-bottom: 0; }
.sv-faq-q {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 0;
  list-style: none; cursor: pointer;
  font: 500 14px var(--sx-font-body); line-height: 1.45; color: var(--sx-text);
  transition: color 120ms;
}
.sv-faq-q::-webkit-details-marker { display: none; }
.sv-faq-q:hover { color: var(--sx-brand); }
[data-theme="dark"] .sv-faq-q:hover { color: var(--sx-brand-3); }
.sv-faq-q:focus-visible { outline: 2px solid var(--sx-brand-3); outline-offset: 2px; border-radius: 2px; }
.sv-faq-q .q { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sv-faq-chev { flex: none; margin-top: 2px; color: var(--sx-text-2); transition: transform 260ms cubic-bezier(.16, 1, .3, 1); }
.sv-faq-i[open] .sv-faq-chev { transform: rotate(180deg); color: var(--sx-text); }
.sv-faq-a { padding: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: var(--sx-text-2); text-wrap: pretty; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .sv-faq-chev { transition: none; } }

/* Seller signals: hairline rows, the figure on the right, the note under. */
.sv-sig { margin: 10px 0 0; }
.sv-sig > div {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 3px 12px;
  padding: 11px 0; border-top: 1px solid var(--sx-line);
}
.sv-sig > div:first-child { border-top: 0; }
.sv-sig dt { font-size: 13.5px; color: var(--sx-text-2); }
.sv-sig dd { margin: 0; }
.sv-sig .v { font-family: var(--sx-font-mono); font-size: 13.5px; font-weight: 500; color: var(--sx-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sv-sig .nt { grid-column: 1 / -1; font-size: 12px; color: var(--sx-text-2); }

/* ---- Message: the live dialog, on clean fields ----
   Its words are the live page's (seller_message.js writes the status). */
.sv-dlg {
  width: min(520px, calc(100vw - 32px)); padding: 0; border: 0;
  border-radius: var(--sx-r-lg); background: var(--sx-surface); color: var(--sx-text);
  box-shadow: 0 0 0 1px var(--sx-line-2) inset, 0 24px 64px rgba(0, 0, 0, 0.45);
}
.sv-dlg::backdrop { background: rgba(11, 13, 18, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sv-dlg-form { display: grid; gap: 14px; padding: 24px; }
.sv-dlg h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; overflow-wrap: anywhere; }
.sv-dlg-sub { font-size: 13.5px; line-height: 1.55; color: var(--sx-text-2); }
.sv-lbl { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--sx-text); }
.sv-lbl .o { margin-left: 4px; font-weight: 400; color: var(--sx-text-2); }
.sv-dlg-form .sv-in {
  display: block; width: 100%; height: 40px; margin: 0; padding: 0 12px;
  border: 0; border-radius: var(--sx-r-md);
  background: var(--sx-bg); box-shadow: 0 0 0 1px var(--sx-line) inset;
  color: var(--sx-text); font: inherit; font-size: 14px;
}
.sv-dlg-form .sv-ta { height: auto; min-height: 120px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.sv-in::placeholder { color: var(--sx-text-2); }
.sv-dlg-form .sv-in:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--sx-line-2) inset, 0 0 0 3px color-mix(in oklab, var(--sx-brand-3) 32%, transparent);
}
.sv-dlg-st { min-height: 1.5em; font-size: 13px; line-height: 1.55; color: var(--sx-text-2); text-wrap: pretty; }
.sv-dlg-st a {
  font-weight: 500; color: var(--sx-text); white-space: nowrap;
  text-decoration: underline; text-decoration-color: var(--sx-line-2); text-underline-offset: 3px;
}
.sv-dlg-st a:hover { text-decoration-color: currentColor; }
.sv-dlg-act { display: flex; justify-content: flex-end; gap: 10px; }

/* ---- narrower windows ----
   Every one-column track is `minmax(0, 1fr)`, so a run with no break in it
   cannot widen the column. */
@media (max-width: 1180px) { .sv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1040px) {
  .sv-body { grid-template-columns: minmax(0, 1fr); }
  .sv-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 720px) {
  .sv-cover { height: 140px; }
  .sv-id { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .sv-av { width: 76px; height: 76px; margin-top: -38px; margin-left: 12px; border-radius: 20px; font-size: 22px; }
  .sv-info { padding-top: 16px; }
  .hm-hero.sv-hero h1 { font-size: 34px; }
  .hm-hero.sv-hero .lede { font-size: 16px; }
  .sv-stats > div { flex: 1 1 30%; padding: 14px 12px; }
  .sv-stats > div:nth-child(3n+1) { padding-left: 0; border-left: 0; }
  .sv-stats > div:nth-child(n+4) { border-top: 1px solid var(--sx-line); }
  .sv-stats dd { font-size: 20px; }
  .sv-bar { margin-top: 48px; }
  .sv-rail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .sv-grid { grid-template-columns: minmax(0, 1fr); }
  .sv-grid .hm-card-t { min-height: 0; }
  .sv-bar-in { flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .sv-tabs { flex: 1 1 100%; }
}
