/* TrackBounty public website - the editor profile sheet, /marketplace/<username> (spec v4 section 4.7; map v4.3 amendment A3, WF increment 1).
   Loaded only by marketplace_editor.html. Every colour is a --tb-* token or a semantic literal of components.css; the per-editor
   theme colours (--ed-primary, --ed-secondary, --ed-accent; set inline by the template) are accents only: a 3 px rule and the
   archetype name, never a ground. Hairlines on paper, no gradients, no glow, no shadows. */

.ed-r { --ed-primary: var(--tb-ink); --ed-secondary: var(--tb-ink-2); --ed-accent: var(--tb-bolt); }
.ed-page { padding-top: 32px; padding-bottom: 120px; }
@media (max-width: 767px) { .ed-page { padding-top: 24px; padding-bottom: 140px; } }
.tbp .ed-page h1 { font-size: 46px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; overflow-wrap: anywhere; }
@media (max-width: 1023px) { .tbp .ed-page h1 { font-size: 38px; } }
@media (max-width: 767px) { .tbp .ed-page h1 { font-size: 32px; } }
.tbp .ed-page h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.tbp .ed-page h3 { font-size: 16px; font-weight: 700; }
.tbp .ed-page a.ed-handle, .tbp .ed-page a.ed-sound-row, .tbp .ed-page a.ed-similar-card, .tbp .ed-page a.ed-cover, .tbp .ed-page a.ed-contact-value { color: inherit; text-decoration: none; }

/* --- banner, breadcrumb, claim --------------------------------------------- */
/* The banner box has an explicit height, so the image never shifts the page when it lands; on phones it sits
   after the hero (CSS order) and loads lazily, so the first viewport is text and the name is the LCP element. */
.ed-top { display: grid; grid-template-columns: minmax(0, 1fr); }
.ed-banner-wrap { order: 0; margin-bottom: 24px; }
.ed-banner { display: block; width: 100%; height: 280px; object-fit: cover; border: 1px solid var(--tb-line); border-radius: 12px; background: var(--tb-tint); }
@media (max-width: 767px) { .ed-banner-wrap { order: 2; margin: 24px 0 0; } .ed-banner { height: 200px; } .ed-hero { order: 1; } .ed-crumb, .ed-claim { order: 0; } }
.ed-crumb { margin-bottom: 20px; }
.ed-crumb a { display: inline-block; margin: -5px 0; padding: 5px 0; }
.ed-claim { margin-bottom: 24px; }
.ed-claim .tbp-what { margin: 0; }

/* --- hero ------------------------------------------------------------------ */
.ed-hero { display: grid; gap: 32px; align-items: start; padding-bottom: 36px; border-bottom: 1px solid var(--tb-line); }
@media (min-width: 1024px) { .ed-hero { grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; } }
.ed-hero-left { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 767px) { .ed-hero-left { gap: 14px; } }
.ed-avatar { position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: var(--tb-tint); color: var(--tb-ink-2); border: 3px solid var(--ed-accent); overflow: hidden; }
@media (max-width: 767px) { .ed-avatar { width: 64px; height: 64px; } }
.ed-avatar-initial { font-size: 34px; font-weight: 800; line-height: 1; }
@media (max-width: 767px) { .ed-avatar-initial { font-size: 24px; } }
.ed-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ed-headline { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.ed-handle { display: inline-block; color: var(--tb-ink-2); font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.ed-handle:hover { text-decoration: underline; text-underline-offset: 3px; }
.ed-badges, .ed-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ed-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--tb-line-2); border-radius: 999px; color: var(--tb-ink); font-size: 13px; font-weight: 600; line-height: 1.2; }
.ed-chip--tint { border-color: var(--tb-tint); background: var(--tb-tint); color: var(--tb-ink-2); }
.ed-chip-score { color: var(--tb-ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.ed-bio { max-width: 60ch; color: var(--tb-ink-2); font-size: 17px; line-height: 1.5; }
.ed-hero-right { display: grid; gap: 20px; }
.ed-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; padding-top: 12px; }
.ed-tiles > div { display: grid; gap: 4px; }
.ed-tiles dt { order: 2; color: var(--tb-ink-3); font-size: 12px; }
.ed-tiles dd { margin: 0; }
.tbp-tiles.ed-tiles b { font-size: 26px; }
@media (max-width: 767px) { .ed-hero-cta { display: none; } }

/* --- sections -------------------------------------------------------------- */
.ed-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; justify-items: start; padding: 32px 0; border-bottom: 1px solid var(--tb-line); }
.ed-section > * { min-width: 0; max-width: 100%; }
/* WF increment 5 (map v4.4 A4): sections below the first viewport are laid out when they approach it, so the hero and the
   bio paint without waiting for the whole page; the placeholder height is remembered after the first render. */
.ed-section { content-visibility: auto; contain-intrinsic-size: auto 400px; }
.ed-section > h2 { margin-bottom: 2px; }
.ed-sub { color: var(--tb-ink-3); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.ed-section .ed-sub { margin-top: 4px; }
.ed-section .ed-chips + .ed-sub { margin-top: 10px; }
.ed-empty { color: var(--tb-ink-2); font-size: 17px; }
.ed-empty b { color: var(--tb-ink); }
.ed-section .tbp-status { width: 100%; max-width: 640px; }
.ed-section .tbp-status .tbp-what { margin: 0; }

/* --- price ----------------------------------------------------------------- */
.ed-price-grid { display: grid; gap: 0; width: 100%; max-width: 560px; border-top: 1px solid var(--tb-line); }
.ed-price-row { display: grid; grid-template-columns: 72px auto minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--tb-line); }
.ed-price-qty { color: var(--tb-ink-3); font-size: 14px; }
.ed-price-total { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ed-price-per { color: var(--tb-ink-2); font-size: 14px; }
.ed-price-discount { color: #1B7F3B; font-weight: 600; }
.ed-price-big { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.ed-fair { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ed-ok { color: #1B7F3B; font-weight: 600; }

/* --- rich content ---------------------------------------------------------- */
.ed-rich-archetype-name { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--ed-primary); }
.ed-rich-archetype-desc { max-width: 64ch; color: var(--tb-ink-2); font-size: 16px; line-height: 1.5; }
.ed-visual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; width: 100%; max-width: 640px; margin: 0; }
@media (max-width: 559px) { .ed-visual-grid { grid-template-columns: minmax(0, 1fr); } }
.ed-visual-grid > div { display: grid; gap: 3px; padding: 10px 0; border-top: 1px solid var(--tb-line); }
.ed-visual-grid dt { color: var(--tb-ink-3); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.ed-visual-grid dd { margin: 0; font-size: 16px; }

/* --- sounds ---------------------------------------------------------------- */
.ed-sounds-list { display: grid; width: 100%; max-width: 720px; border-top: 1px solid var(--tb-line); }
.ed-sound-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--tb-line); }
a.ed-sound-row:hover .ed-sound-title { text-decoration: underline; text-underline-offset: 3px; }
.ed-sound-thumb { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--tb-tint); color: var(--tb-ink-2); font-size: 16px; font-weight: 800; }
.ed-sound-meta { display: grid; gap: 2px; min-width: 0; }
.ed-sound-title { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-sound-author { color: var(--tb-ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-sound-count { color: var(--tb-ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.ed-sound-link { min-width: 14px; color: var(--tb-ink-3); font-size: 16px; }

/* --- history, similar ------------------------------------------------------ */
.ed-details { display: grid; gap: 14px; justify-items: start; }
.ed-details summary { list-style: none; cursor: pointer; }
.ed-details summary::-webkit-details-marker { display: none; }
.ed-details[open] summary { background: var(--tb-tint); }
.ed-similar-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 12px; width: 100%; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.ed-similar-card { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--tb-line); border-radius: 12px; scroll-snap-align: start; transition: border-color 150ms var(--tb-ease); }
.ed-similar-card:hover { border-color: var(--tb-ink); }
.ed-similar-name { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-similar-handle { color: var(--tb-ink-2); font-size: 14px; }
.ed-similar-meta { color: var(--tb-ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }

/* --- contacts -------------------------------------------------------------- */
.ed-contacts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; width: 100%; }
.ed-contact-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--tb-line); border-radius: 12px; }
.ed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tb-line-2); }
.ed-dot.green { background: #1B7F3B; }
.ed-dot.amber { background: var(--tb-bolt); border: 1px solid var(--tb-ink); box-sizing: border-box; }
.ed-contact-body { display: grid; gap: 2px; min-width: 0; }
.ed-contact-label { color: var(--tb-ink-3); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.ed-contact-value { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ed-contact-value:hover { text-decoration: underline; text-underline-offset: 3px; }
.ed-copy { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* --- gallery --------------------------------------------------------------- */
.ed-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; width: 100%; }
.ed-cover { display: block; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: var(--tb-tint); }
.ed-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* --- CTA, inquiry ---------------------------------------------------------- */
.ed-bounty-cta { gap: 20px; }
.ed-bounty-cta > div { display: grid; gap: 8px; }
.ed-bounty-cta p { max-width: 60ch; color: var(--tb-ink-2); font-size: 17px; }
.ed-inquiry { border-bottom: 0; scroll-margin-top: calc(var(--tb-header-h) + 16px); }
.ed-inquiry-sub { max-width: 60ch; font-size: 18px; }
.ed-form { width: 100%; max-width: 720px; }
.ed-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 767px) { .ed-form-grid { grid-template-columns: minmax(0, 1fr); } }
.ed-form-full { grid-column: 1 / -1; }
.ed-inquiry-status { min-height: 1.4em; color: var(--tb-ink-3); font-size: 15px; }
.ed-inquiry-status--err { color: #B42318; }

/* --- not found ------------------------------------------------------------- */
.ed-not-found { display: grid; gap: 16px; justify-items: start; padding: 40px 0 24px; }

/* --- mobile sticky action -------------------------------------------------- */
.ed-sticky { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 12px var(--tb-gutter) calc(12px + env(safe-area-inset-bottom)); background: var(--tb-paper); border-top: 1px solid var(--tb-line); }
.ed-sticky .tb-btn { width: 100%; }
@media (max-width: 767px) { .ed-sticky { display: block; } }

/* --- motion ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) { .ed-similar-card { transition: none; } }
