/* The Scoop Library. A working shop for scoop owners: sticky header with tabs on desktop, a bottom tab bar on
   phones; filter rail beside the shelves on desktop, one Filters button and a sheet on phones; an ad opens as a
   dialog on desktop and a full page on phones with the price and buy button pinned to the bottom. */
:root {
  --bg: #F2F5F1; --surface: #FFFFFF; --sunk: #E7EDE6; --ink: #15231A; --muted: #56675B; --line: #D5DED4;
  --accent: #1E7438; --accent-ink: #FFFFFF; --accent-soft: #DCEFDF;
  --tag: #F2C230; --tag-ink: #2A2200;
  --teal: #1D6E73; --teal-soft: #D6EDEE; --amber: #A4561C; --amber-soft: #F6E3D3;
  --scrim: rgba(12, 20, 14, .62); --shadow: 0 10px 30px rgba(20, 40, 25, .14);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --bar-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
/* Light is the only theme for now (Cameron, Nov 7): the dark tokens below apply only under data-theme="dark", which nothing sets.
   To bring dark mode back with the system setting, wrap a copy of them in @media (prefers-color-scheme: dark). */
:root { color-scheme: light; }
:root[data-theme="dark"] {
  --bg: #0E1611; --surface: #16211A; --sunk: #1C2A21; --ink: #E4EDE5; --muted: #98A99D; --line: #29392F;
  --accent: #4DB86B; --accent-ink: #08130B; --accent-soft: #1D3A26;
  --tag: #E2B52C; --tag-ink: #1C1600;
  --teal: #5EC1C6; --teal-soft: #173638; --amber: #E39A5F; --amber-soft: #3A2718;
  --scrim: rgba(0, 0, 0, .7); --shadow: 0 10px 30px rgba(0, 0, 0, .45); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html.locked, html.locked body { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-text-size-adjust: 100%; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; text-wrap: balance; margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.meta { font-size: 12.5px; color: var(--muted); }
.opt { font-weight: 400; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.narrow { max-width: 520px; }

/* test strip + header */
.test-strip { background: var(--tag); color: var(--tag-ink); font-size: 13px; font-weight: 600; }
.test-strip .wrap { padding-block: 6px; display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.test-strip label { display: flex; gap: 8px; align-items: center; min-width: 0; }
.test-strip select { background: var(--tag); color: var(--tag-ink); border: 1px solid var(--tag-ink); border-radius: 6px; padding: 2px 6px; font-weight: 600; max-width: 100%; }
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 20px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
/* the mark: SL in the display face with the yellow line, drawn as paths (logo C, Cameron Nov 8) */
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; overflow: hidden; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand b .the { font-weight: 600; color: var(--muted); }
.brand b { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.01em; white-space: nowrap; }
nav.tabs { display: flex; gap: 4px; }
nav.tabs a { text-decoration: none; color: var(--muted); font-weight: 600; padding: 7px 12px; border-radius: 8px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
nav.tabs a:hover { color: var(--ink); background: var(--sunk); }
nav.tabs a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
.count { font-size: 12px; background: var(--sunk); border-radius: 999px; padding: 0 7px; color: var(--ink); }
.acct-area { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.credits { background: var(--accent-soft); color: var(--ink); border-radius: 999px; padding: 5px 11px; font-weight: 600; font-size: 13px; white-space: nowrap; text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cl-short { display: none; }
header.top .brand { min-width: 0; }
header.top .brand b { overflow: hidden; text-overflow: ellipsis; }
.acct { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--muted); font-size: 13px; border-radius: 10px; padding: 3px 4px 3px 8px; min-width: 0; }
.acct:hover, .acct[aria-current="page"] { background: var(--sunk); }
.acct .who { text-align: right; line-height: 1.25; min-width: 0; }
.acct .who strong { color: var(--ink); display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--sunk); display: grid; place-items: center; color: var(--ink); flex: none; }
.avatar svg { width: 20px; height: 20px; }

main { padding-block: 24px 56px; }
.view-head { margin-bottom: 18px; }
.view-head h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.015em; }
.view-head p { margin: 6px 0 0; color: var(--muted); max-width: 64ch; }

/* library layout */
.lib { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); }
.sheet-body { display: grid; gap: 20px; }
.sheet-head, .sheet-foot, .filterbtn { display: none; }
.fgroup h3 { font-family: var(--body); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink); }
.chip.static { cursor: default; }
.chip:hover:not(:disabled):not(.static) { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.chip .ct { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 5px; }
.chip[aria-pressed="true"] .ct { color: inherit; opacity: .7; }
/* inside the filter drawer the chips are a touch bigger, and a pressed one goes green with a check */
.rail .fgroup { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.rail .fgroup:last-of-type { border-bottom: 0; }
.rail .chips { gap: 8px; }
.rail .chip { padding: 8px 14px; font-size: 14px; background: var(--bg); border-color: transparent; }
.rail .chip:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--sunk); border-color: transparent; }
.rail .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.rail .chip[aria-pressed="true"]::before { content: "✓"; font-size: 12px; margin-right: 6px; }
/* "All" is the resting state, so it sits quiet; only a real filter goes green */
.rail .chip[data-val="all"][aria-pressed="true"] { background: var(--sunk); color: var(--ink); border-color: transparent; font-weight: 600; }
.rail .chip[data-val="all"][aria-pressed="true"]::before { content: none; }
.rail .chip .ct { font-size: 12px; }
.rail .toggle { padding: 2px 0 6px; }
.sheet-sub { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.sheet-head .x { width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--sunk); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.sheet-head .x:hover { background: var(--line); }
.toggle { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.toggle input { margin-top: 3px; accent-color: var(--accent); flex: none; width: 16px; height: 16px; }
.proof { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 13px; color: var(--muted); }
.proof strong { color: var(--ink); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.toolbar select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.applied { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.applied .chip { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.linkbtn { background: none; border: 0; color: var(--accent); font-weight: 700; cursor: pointer; padding: 4px 6px; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
.linkbtn.small { font-size: 12.5px; padding: 0; justify-self: start; text-align: left; }

.shelf, .group { display: grid; gap: 12px; margin-bottom: 30px; }
.shelf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.shelf-head h2 { font-size: 21px; font-weight: 800; }
.shelf-head p { margin: 0; color: var(--muted); font-size: 13px; }
#allHead { margin-bottom: 10px; }
.group-head { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.group-head h2 { font-size: 22px; font-weight: 800; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.group-head h2 .ct { font-family: var(--mono); font-size: 14px; color: var(--muted); font-weight: 500; }
.group-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 72ch; }
.row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }

/* cards */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card .shot { position: relative; display: block; background: var(--sunk); }
.card .body { padding: 12px 14px 14px; display: grid; gap: 8px; flex: 1; grid-template-rows: auto auto 1fr auto; }
.minelist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); gap: 16px; }
.card.mine { display: grid; grid-template-columns: 210px minmax(0, 1fr); grid-template-areas: "shot body" "shot foot"; align-items: start; }
.card.mine .shot { grid-area: shot; }
.card.mine .body { grid-area: body; grid-template-rows: none; align-content: start; padding-bottom: 6px; }
.card.mine .foot { grid-area: foot; display: grid; gap: 10px; padding: 0 14px 14px; align-content: start; }
.card h3 { font-size: 17px; font-weight: 600; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.stat { font-size: 12.5px; display: flex; gap: 12px; flex-wrap: wrap; }
.stat b { font-family: var(--mono); font-weight: 500; font-size: 13.5px; color: var(--ink); }
.stat span { color: var(--muted); }
.kindbox { display: grid; gap: 4px; align-content: start; }
.kind { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; width: fit-content; color: var(--ink); }
.kind::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.k-ready { background: var(--accent-soft); }
.k-ready::before { background: var(--accent); }
.k-details { background: var(--teal-soft); }
.k-details::before { background: var(--teal); }
.kind-note { font-size: 12.5px; color: var(--muted); }
.buyrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 4px; flex-wrap: wrap; }
.buyrow .btn { white-space: nowrap; }
.buyrow .btn:disabled { white-space: normal; text-align: center; }
.price { font-family: var(--mono); font-size: 15px; white-space: nowrap; }
.price s { color: var(--muted); font-size: 12px; margin-left: 4px; }
.btn { border: 0; border-radius: 9px; padding: 9px 14px; font-weight: 700; cursor: pointer; background: var(--accent); color: var(--accent-ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.3; }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn:disabled { background: var(--sunk); color: var(--muted); cursor: not-allowed; filter: none; border-color: transparent; }
.owned { font-size: 12.5px; font-weight: 700; color: var(--accent); }
.notice { background: var(--amber-soft); color: var(--ink); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; display: grid; gap: 4px; align-content: start; }
.notice .linkbtn { justify-self: start; padding: 0; }
.notice.gate { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; padding: 12px 14px; margin-bottom: 16px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; grid-column: 1 / -1; }

/* badges and the heart sit on the picture */
.badges { position: absolute; top: 10px; left: 10px; display: grid; gap: 4px; justify-items: start; z-index: 1; }
.badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: 4px 8px; border-radius: 6px; }
.b-proven { background: var(--accent); color: var(--accent-ink); }
.b-promising { background: var(--teal); color: var(--surface); }
.b-testing { background: var(--tag); color: var(--tag-ink); }
.b-new { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.b-seasonal { background: var(--amber); color: var(--surface); }
/* the save button is a white disc in both themes so it reads on any photo */
.heart { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.28); }
.heart svg { width: 18px; height: 18px; fill: none; stroke: #15231A; stroke-width: 2; }
.heart[aria-pressed="true"] svg { fill: #D6455D; stroke: #D6455D; }

/* the ad picture (previewAd) */
.pv { position: relative; aspect-ratio: 4 / 5; width: 100%; background: var(--sunk); container-type: inline-size; overflow: hidden; }
.pv img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* owner details painted over the ad's own text: colors come from each ad, so they stay literal in both themes */
.pv-zone { position: absolute; display: flex; align-items: center; overflow: hidden; white-space: nowrap; border-radius: .6cqw; pointer-events: none; }
.pv-wm { position: absolute; inset: 0; overflow: hidden; pointer-events: none; display: grid; align-content: center; justify-items: center; gap: 46px; }
.pv-wm span { transform: rotate(-28deg); font: 800 15px/1 var(--display); letter-spacing: .14em; color: rgba(255,255,255,.62); text-shadow: 0 0 3px rgba(0,0,0,.45); white-space: nowrap; }

/* ad view: a dialog on desktop */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.adview { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); width: min(980px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; position: relative; }
.adtop { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.adtop-title { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; visibility: hidden; }
.topbtn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; border-radius: 8px; padding: 7px 10px; font-weight: 600; cursor: pointer; color: var(--ink); white-space: nowrap; }
.topbtn:hover { background: var(--sunk); }
.topbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.topbtn.save[aria-pressed="true"] svg { fill: #D6455D; stroke: #D6455D; }
.detail { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); align-items: start; }
.detail .shot { position: sticky; top: 53px; background: var(--sunk); }
.detail .info { padding: 18px 24px 0; display: grid; gap: 16px; align-content: start; min-width: 0; }
.titlebox { display: grid; gap: 8px; }
.detail h2 { font-size: 26px; font-weight: 800; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin: 0; }
.kv div { background: var(--sunk); border-radius: 10px; padding: 10px 12px; }
.kv dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kv dd { margin: 2px 0 0; font-family: var(--mono); font-size: 18px; }
.result-src { margin: 8px 0 0; }
#dBody { display: grid; gap: 16px; }
.swaps { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.swaps li { position: relative; padding-left: 15px; }
.swaps li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.sample { margin-top: 8px; font-size: 14px; }
.sample summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.sample p { margin: 6px 0 0; }
/* buyArea has no box of its own, so the pinned bar inside it sticks for the whole info column, not just the last few lines */
#buyArea { display: contents; }
.kit, #buyArea > .step:last-child, #buyArea > p:last-child { padding-bottom: 18px; }
.step, .dform, .confirm { display: grid; gap: 12px; min-width: 0; }
.step-title { font-size: 19px; }
.backlink { justify-self: start; background: none; border: 0; padding: 2px 0; color: var(--accent); font-weight: 700; cursor: pointer; }
.confirm .line, .step .line { display: flex; justify-content: space-between; gap: 4px 10px; font-size: 14px; flex-wrap: wrap; }
.err { color: var(--amber); font-size: 13px; margin: 0; font-weight: 600; }
.warnbox { background: var(--amber-soft); border-radius: 8px; padding: 8px 10px; font-size: 13px; margin: 0; }
.progress { height: 8px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.progress span { display: block; height: 100%; width: 4%; background: var(--accent); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.x { background: var(--sunk); border: 0; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; }
.coderow { display: flex; gap: 8px; flex-wrap: wrap; }
.coderow input { flex: 1 1 160px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.upsells { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.ups { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.ups:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.ups input { margin-top: 3px; accent-color: var(--accent); flex: none; width: 16px; height: 16px; }
.ups strong { color: var(--ink); }
.totals { border-top: 1px dashed var(--line); padding-top: 10px; display: grid; gap: 4px; }

/* the pinned price and buy button: sticks to the bottom of the ad while the rest scrolls */
.pin { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border-top: 1px solid var(--line); margin: 4px -24px 0; padding: 12px 24px calc(12px + var(--safe-b)); }
.pin .btn { flex: none; padding: 11px 18px; }
.pin-price { display: grid; gap: 1px; min-width: 0; }
.pin-price .amt { font-family: var(--mono); font-size: 22px; line-height: 1.1; }
.pin-price .amt s { color: var(--muted); font-size: 14px; margin-left: 6px; }
.pin-price .meta { line-height: 1.3; }
.dform .pin, .step .pin { justify-content: flex-end; }
.step .pin .pin-price { margin-right: auto; }

/* launch kit */
.kit { display: grid; gap: 14px; }
.kit-head { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; }
.ok-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 2px; position: relative; }
.ok-dot::after { content: ""; position: absolute; left: 7px; top: 4px; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.kit-dl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kit-block { display: grid; gap: 8px; }
.kit-block .label { margin: 0; }
.copybox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.copy-label { grid-column: 1; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.copy-text { grid-column: 1; margin: 0; font-size: 14px; }
.copybox .btn { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-width: 74px; }
.checklist { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: c; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 7px 4px; font-size: 14px; cursor: pointer; border-radius: 8px; }
.checklist label:hover { background: var(--bg); }
.checklist input { margin-top: 3px; accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }
.coach-offer { display: grid; gap: 6px; background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; }
.coach-offer .btn { justify-self: start; }

/* my ads */
.perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.perk { display: grid; gap: 10px; align-content: start; }
.perk h3 { font-size: 19px; font-weight: 700; }
.perk p { margin: 0; }
.share { display: grid; gap: 12px; }
.form3 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.code { font-family: var(--mono); font-size: 18px; background: var(--sunk); padding: 6px 12px; border-radius: 8px; user-select: all; }
.live { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; background: var(--bg); }
.live.ok { border-color: var(--accent); background: var(--accent-soft); }
.live.warnbg { background: var(--amber-soft); border-color: transparent; }
.live .linkbtn { justify-self: start; padding: 0; font-size: 13px; }
.live-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.live textarea, .typo textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; width: 100%; resize: vertical; }
.typo { font-size: 12.5px; color: var(--muted); }
.typo summary { cursor: pointer; }
.typo form { display: grid; gap: 6px; margin-top: 6px; }
.typo form .btn { justify-self: start; }

/* forms */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label, .field legend { font-weight: 600; font-size: 14px; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field input[type=text], .field input[type=email], .field input[type=tel], .field textarea, .field select { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; width: 100%; }
.panel .field input[type=text], .panel .field input[type=email], .panel .field input[type=tel], .panel .field textarea, .panel .field select, .panel .coderow input, #buyArea .field input, #buyArea .field select { background: var(--bg); }
.field textarea { min-height: 90px; resize: vertical; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label { font-weight: 500; display: flex; gap: 7px; align-items: center; }
.checks input { accent-color: var(--accent); width: 16px; height: 16px; }
.two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.side-note { display: grid; gap: 14px; }
.signin { display: grid; gap: 12px; }

/* how it works + grow */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 6px; align-content: start; }
.steps li::before { content: counter(s); font: 800 28px/1 var(--display); color: var(--accent); }
.steps h3 { font-size: 17px; font-weight: 600; }
.steps p { margin: 0; font-size: 14px; color: var(--muted); }
section.block { display: grid; gap: 14px; margin-top: 30px; scroll-margin-top: 90px; }
section.block > h2 { font-size: 22px; font-weight: 800; }
.lead { margin: 0; color: var(--muted); max-width: 62ch; font-size: 16px; }
.kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 8px; align-content: start; }
.plan.main { border: 2px solid var(--accent); }
.plan .big { font-size: 40px; line-height: 1; letter-spacing: -.02em; }
.plan p { margin: 0; color: var(--muted); font-size: 14px; }
.price-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.price-table th, .price-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.tbl { overflow-x: auto; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.rung { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 8px; align-content: start; }
.rung.main { border: 2px solid var(--accent); }
.rung .big { font-size: 30px; line-height: 1; letter-spacing: -.02em; }
.rung .big small, .plan .big small { font-size: 15px; color: var(--muted); margin-left: 2px; }
.rung p { margin: 0; font-size: 14px; color: var(--muted); }
.rung .btn { justify-self: start; margin-top: 4px; }
.coach-card h3 { font-size: 19px; font-weight: 700; margin: 2px 0 8px; }
.coach-card p { margin: 0 0 8px; }
.lessons { list-style: none; margin: 0; padding: 0; display: grid; }
.lessons li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lessons li:last-child { border-bottom: 0; }
.tag { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.tag.free { background: var(--accent-soft); color: var(--ink); }
.news { display: grid; gap: 12px; margin-top: 24px; }
.news h3 { font-size: 19px; font-weight: 700; margin-top: 2px; }
.news p { margin: 4px 0 0; }

.toast { position: fixed; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); z-index: 60; font-size: 14px; width: max-content; max-width: min(560px, calc(100% - 32px)); }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer .wrap { padding-block: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footlinks { display: flex; gap: 16px; flex-wrap: wrap; }
.footlinks a { color: var(--muted); }
.bottombar { display: none; }

@media (max-width: 1080px) {
  .row4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row4 > :nth-child(4) { display: none; }
  .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ladder .rung:first-child { grid-column: 1 / -1; }
  nav.tabs a { padding: 7px 9px; }
  .acct .who { display: none; }
}
@media (max-width: 900px) {
  .lib { grid-template-columns: minmax(0, 1fr); }
  .detail { grid-template-columns: minmax(0, 1fr); }
  .detail .shot { position: relative; top: 0; max-width: 380px; width: 100%; justify-self: center; }
  .two, .perks, .plans, .kinds { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* The filter rail turns into a sheet once there's no room beside the shelves. */
@media (max-width: 900px) {
  .rail { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; top: auto; max-height: 82vh; max-height: 82dvh; display: flex; flex-direction: column; background: var(--surface); border-radius: 16px 16px 0 0; box-shadow: var(--shadow); transform: translateY(105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
  .rail.open { transform: none; visibility: visible; transition: transform .22s ease; }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
  .sheet-head h2 { font-size: 20px; }
  .sheet-body { overflow: auto; padding: 4px 16px 16px; gap: 18px; }
  .sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); }
  .sheet-foot .btn { padding: 11px 20px; }
  .sheet-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 44; }
  .desk-only { display: none; }
  .filterbtn { display: inline-flex; }
  .filterbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
  .chip { padding: 7px 12px; font-size: 14px; }
}

/* Phones: bottom tab bar, ad as a full page with the buy bar pinned, compact header. */
@media (max-width: 760px) {
  body { padding-bottom: calc(var(--bar-h) + var(--safe-b)); }
  input, select, textarea { font-size: 16px !important; } /* iPhones zoom into boxes under 16px */
  nav.tabs { display: none; }
  header.top .wrap { gap: 10px; padding-block: 10px; }
  .brand b { font-size: 18px; }
  .brand-mark { width: 30px; height: 30px; }
  .acct-area { gap: 8px; }
  .credits { font-size: 12.5px; padding: 5px 10px; }
  .cl-long { display: none; }
  .cl-short { display: inline; }
  .acct { padding: 0; }
  .bottombar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); height: calc(var(--bar-h) + var(--safe-b)); }
  .bottombar a { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600; }
  .bottombar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .bottombar a[aria-current="page"] { color: var(--accent); }
  .bottombar a[aria-current="page"] svg { stroke-width: 2.3; }
  .bottombar .dot { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; line-height: 17px; text-align: center; padding: 0 4px; font-weight: 500; }
  .toast { bottom: calc(var(--bar-h) + 12px + var(--safe-b)); }
  html.locked .toast { bottom: auto; top: calc(60px + env(safe-area-inset-top, 0px)); }
  .sheet-foot { padding-bottom: calc(12px + var(--safe-b)); }
  .rail { z-index: 46; }
  main { padding-block: 18px 32px; }
  .view-head p { font-size: 14px; }
  .form, .form2 { grid-template-columns: minmax(0, 1fr); }
  .steps, .ladder { grid-template-columns: minmax(0, 1fr); }
  .grid, .row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .row4 > :nth-child(3) { display: none; }
  .row4 > :nth-child(4) { display: none; }
  .card h3 { font-size: 15px; }
  .card .body { padding: 10px; gap: 6px; }
  .card .kind-note { display: none; }
  .buyrow { flex-direction: column; align-items: stretch; }
  .buyrow .price { text-align: left; }
  .buyrow .btn { width: 100%; }
  .heart { width: 34px; height: 34px; }
  .toolbar { gap: 8px; }
  .count-line { order: 3; width: 100%; font-size: 13px; }
  .sortlabel span { display: none; }
  .panel { padding: 16px; }
  footer .wrap { padding-bottom: 18px; }

  /* the ad is its own page */
  .scrim { padding: 0; place-items: stretch; background: var(--surface); }
  .adview { border-radius: 0; width: 100%; height: 100%; max-height: none; box-shadow: none; }
  .adtop { padding: 6px 6px calc(6px); padding-top: calc(6px + env(safe-area-inset-top, 0px)); }
  .adtop-title { visibility: visible; font-size: 15px; }
  .topbtn { padding: 8px; }
  .topbtn span { display: none; }
  .topbtn:first-child span { display: inline; }
  .detail .shot { max-width: none; }
  .detail .info { padding: 16px 16px 0; }
  .detail h2 { font-size: 23px; }
  .pin { margin: 4px -16px 0; padding: 10px 16px calc(10px + var(--safe-b)); box-shadow: 0 -6px 16px rgba(0,0,0,.06); }
  .pin .btn { padding: 12px 16px; }
  .pin-price .amt { font-size: 20px; }
  .pin-price .meta { font-size: 11.5px; }
  /* in checkout the picture shrinks so the form is right there; while typing details it stays in view */
  .adview[data-mode="checkout"] .detail .shot,
  .adview[data-mode="editing"] .detail .shot,
  .adview[data-mode="done"] .detail .shot { width: 46%; margin: 12px auto 0; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
  .adview[data-mode="editing"] .detail .shot { position: sticky; top: 56px; z-index: 3; width: 40%; }
  .adview:not([data-mode="view"]) .badges { display: none; }
  .copybox { grid-template-columns: minmax(0, 1fr); }
  .copybox .btn { grid-column: 1; grid-row: auto; justify-self: start; }
  .form3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perks { gap: 12px; }
  .card.mine { grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "shot body" "foot foot"; }
  .card.mine .shot { margin: 10px 0 0 10px; border-radius: 8px; overflow: hidden; }
  .card.mine .foot { padding: 0 10px 12px; }
  .card.mine .body .actions .btn { flex: 1 1 auto; }
}
@media (max-width: 380px) {
  .brand b { font-size: 16px; }
  .credits { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform .15s ease, box-shadow .15s ease; }
  .card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
  .progress span { transition: width 3.2s ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  .rail, .rail.open { transition: none; }
}
.perks-head { font-size: 21px; font-weight: 800; margin: 28px 0 12px; }

/* wave 2: the real renderer's preview */
.pv.pv-wait img { filter: blur(9px); transform: scale(1.06); }
.pv img { transition: filter .25s ease; }
.b-ai { background: #3B3F8F; color: #FFFFFF; }
.ai-note { margin: 0; font-size: 13.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.exact-note { margin: 6px 0 0; }
.kv.ranged dd { font-size: 15px; }
.field.warn input, .field.warn select { border-color: var(--amber) !important; }
.fit-msg { font-size: 12.5px; color: var(--amber); font-weight: 600; }
.ok-dot.wait { background: var(--tag); }
.ok-dot.wait::after { display: none; }

/* consent and terms boxes */
.consent { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.toggle.req span::after { content: " (required)"; color: var(--muted); font-size: 12px; }
.pending h3 { font-size: 19px; }
.radios { display: grid; gap: 6px; }
.radios label { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 14px; }
.radios input { accent-color: var(--accent); margin-top: 3px; flex: none; }
.field input[type=url], .field input[type=number] { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; width: 100%; }
.field input[type=file] { max-width: 100%; font-size: 13px; }

/* founding testers */
.founding-head h1 { max-width: 22ch; }
.founding-proof { align-items: start; }
.proof-copy p { margin: 0 0 10px; }
.proof-pic { max-width: 360px; width: 100%; justify-self: center; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.apply { display: grid; gap: 16px; }
.result.ok { border-color: var(--accent); background: var(--accent-soft); }
.result.notfit { background: var(--amber-soft); border-color: transparent; }
.result .code { font-size: 15px; padding: 2px 8px; }

/* footer */
footer .wrap { display: grid; gap: 8px; }
.foot-main { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; align-items: baseline; }
.foot-legal { overflow-wrap: anywhere; }
.foot-help { color: var(--muted); white-space: nowrap; }
.foot-help .foot-phone { color: var(--ink); font-weight: 600; }
.pixel-note { margin: 0; font-size: 12.5px; }
.pixel-note a { color: var(--muted); }

/* generated legal pages */
.legal-banner { background: var(--tag); color: var(--tag-ink); font-weight: 700; font-size: 14px; }
.legal-banner .wrap { padding-block: 8px; }
.legal-doc { max-width: 780px; }
.legal-doc h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; margin-bottom: 10px; }
.legal-doc h2 { font-size: 20px; font-weight: 800; margin: 26px 0 8px; scroll-margin-top: 80px; }
.legal-doc h3 { font-size: 16px; margin: 18px 0 6px; }
.legal-doc p, .legal-doc li { font-size: 15px; line-height: 1.6; }
.legal-doc ul, .legal-doc ol { padding-left: 22px; }
.legal-doc blockquote { margin: 12px 0; padding: 10px 14px; background: var(--surface); border-left: 3px solid var(--accent); border-radius: 6px; }
.legal-doc .tbl { overflow-x: auto; }
.legal-doc table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.legal-doc th, .legal-doc td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-doc code { font-family: var(--mono); font-size: 13px; }
.legal-doc a { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .legal-page main { padding-bottom: 24px; }
  .proof-pic { max-width: 300px; }
}

/* My ads: a question from the person checking the ad (needs_input) */
.ask { display: grid; gap: 6px; background: var(--amber-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.ask-q { margin: 0; padding-left: 10px; border-left: 3px solid var(--amber); white-space: pre-wrap; overflow-wrap: anywhere; }

/* =====================================================================================================
   Marketplace look (Cameron, Nov 7): a light, clean shopping page. White page, near-black text, soft grey
   surfaces, hairline borders and one green accent. Our own design: our logo, our green, our fonts.
   ===================================================================================================== */
:root {
  --bg: #FFFFFF; --surface: #FFFFFF; --sunk: #F4F4F1; --ink: #1B1E1C; --muted: #5E6561; --line: #E3E4DF;
  --accent: #1E7438; --accent-ink: #FFFFFF; --accent-soft: #E6F2E9;
  --shadow: 0 10px 30px rgba(20, 30, 25, .12);
}
:root[data-theme="dark"] {
  --bg: #121513; --surface: #171B18; --sunk: #20251F; --ink: #ECEFEC; --muted: #A0A8A2; --line: #2B312C;
  --accent: #4DB86B; --accent-ink: #08130B; --accent-soft: #1D3A26; }

/* header: logo, a big rounded search, then Saved, My ads and the account; the category row under it */
header.top .top-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand search acct"; gap: 24px; align-items: center; padding-block: 14px 8px; }
header.top .brand { grid-area: brand; }
.search { grid-area: search; position: relative; display: flex; align-items: center; width: 100%; max-width: 760px; justify-self: center; margin: 0; }
.search input { width: 100%; height: 48px; border: 2px solid var(--ink); border-radius: 999px; padding: 0 58px 0 22px; background: var(--surface); color: var(--ink); font-size: 15px; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input::-webkit-search-cancel-button { display: none; }
.search-go { position: absolute; right: 6px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; }
.search-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.acct-area { grid-area: acct; margin-left: 0; }
nav.tabs { gap: 2px; align-items: center; }
nav.tabs a[aria-current="page"] { background: var(--sunk); color: var(--ink); }
nav.tabs .count { font-size: 11px; background: var(--accent); color: var(--accent-ink); padding: 0 6px; }
.credits { background: var(--sunk); }
.cats { display: flex; gap: 2px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; }
.cats::-webkit-scrollbar, .pills::-webkit-scrollbar { display: none; }
.cat { flex: none; background: none; border: 0; padding: 7px 12px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--ink); white-space: nowrap; cursor: pointer; }
.cat:hover { background: var(--sunk); }
.cat[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* the pill row: Show filters, quick filters, and Sort on the right */
.lib-head { margin-bottom: 14px; }
.lib-head h1 { font-size: clamp(24px, 3vw, 32px); }
.pillbar { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.pills { display: flex; gap: 8px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; padding: 2px; }
.quick { display: flex; gap: 8px; align-items: center; padding-left: 10px; border-left: 1px solid var(--line); }
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 15px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.pill:hover { border-color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill-filters { background: var(--sunk); border-color: transparent; }
.pill-filters[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); border-color: var(--accent); }
.pill-filters svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pill-filters .num { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.sortlabel { flex: none; display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.sortlabel select { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: var(--surface); color: var(--ink); font-weight: 600; }
.all-head { margin: 8px 0 6px; align-items: baseline; }
.all-head .count-line { font-size: 13px; color: var(--muted); }
.applied .chip { background: var(--sunk); }

/* the filter sheet: a drawer from the left on wide screens (the phone sheet below 900px stays) */
.rail .sheet-head, .rail .sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (min-width: 901px) {
  .rail { position: fixed; z-index: 45; top: 0; bottom: 0; left: 0; width: min(380px, 92vw); display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow); transform: translateX(-105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
  .rail.open { transform: none; visibility: visible; transition: transform .22s ease; }
  .rail .sheet-head { padding: 20px 20px 14px; align-items: flex-start; border-bottom: 1px solid var(--line); }
  .rail .sheet-head h2 { font-size: 22px; }
  .rail .sheet-body { overflow: auto; padding: 18px 20px 20px; flex: 1; align-content: start; }
  .rail .sheet-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface); }
  .rail .sheet-foot .btn { flex: 1; padding: 12px 20px; }
  .sheet-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 44; }
}

/* cards: big pictures with rounded corners, the heart on the image, small pills top-left */
.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.row4 { gap: 28px 20px; }
.shelf-head h2, .group-head h2 { font-size: 20px; font-weight: 800; }
.group-head { border-bottom: 0; padding-bottom: 2px; gap: 2px; }
.group-head h2 .ct { font-size: 13px; }
.card { background: transparent; border: 0; border-radius: 0; overflow: visible; }
.card .shot { border-radius: 14px; overflow: hidden; background: var(--sunk); }
.card .body { padding: 10px 2px 0; gap: 3px; grid-template-rows: none; align-content: start; }
.card-title { font-family: var(--body); font-size: 15px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-sub { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-price { min-height: 24px; }
.card-price .price { font-family: var(--body); font-weight: 700; font-size: 16px; }
.price s { font-weight: 400; }
.buyrow { justify-content: flex-start; gap: 12px; padding-top: 6px; }
.btn { border-radius: 999px; }
.btn.outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.outline:hover { background: var(--ink); color: var(--bg); filter: none; }
.btn.outline:disabled { background: transparent; border-color: var(--line); color: var(--muted); }
.more { font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }
.heart { top: 10px; right: 10px; }
.badges { top: 10px; left: 10px; }
.badge { border-radius: 999px; text-transform: none; letter-spacing: 0; font-size: 12px; padding: 4px 10px; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.b-new { background: #FFFFFF; color: #1B1E1C; border: 0; }
.b-soon { background: #1B1E1C; color: #FFFFFF; }
.b-seasonal { background: #A4561C; color: #FFFFFF; }
.card.mine { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card.mine .shot { border-radius: 0; }
.card.mine .body { padding: 12px 14px 6px; }
@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: none; box-shadow: none; }
  .card .shot img { transition: transform .25s ease, filter .25s ease; }
  .card:hover .shot img { transform: scale(1.025); }
}

/* the ad page: a two-column listing, the picture and its preview switch left, the details right */
.adview { width: min(1120px, 100%); }
.detail { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.detail .shot { position: relative; top: auto; border-radius: 14px; overflow: hidden; }
.gallery { position: sticky; top: 53px; padding: 22px 12px 22px 22px; display: grid; gap: 12px; align-content: start; }
.pv-switch .chips { justify-content: center; }
.pv-switch .label { text-align: center; }
.detail .info { padding: 24px 28px 0 16px; }
.titlebox { gap: 6px; }
.titlebox h2 { font-size: 28px; font-weight: 800; }
.kind-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.kind-help { margin: 0; color: var(--muted); font-size: 14px; }
.pin-price .amt { font-family: var(--body); font-weight: 800; }
.pin-actions { display: flex; gap: 8px; flex: none; align-items: center; }
.pin-save svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.pin-save[aria-pressed="true"] svg { fill: #D6455D; stroke: #D6455D; }
.made-by { margin: 0; font-size: 14px; }
@media (min-width: 761px) {
  /* in view mode the price and buttons sit right under the title, like a listing */
  .adview[data-mode="view"] #dBody { order: 2; }
  .adview[data-mode="view"] .info > .pin { position: static; margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; flex-wrap: wrap; }
}

/* wide screens to phones */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  header.top .top-row { gap: 16px; }
}
@media (max-width: 900px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .gallery { position: relative; top: 0; max-width: 460px; width: 100%; justify-self: center; padding: 16px 16px 0; }
  .detail .info { padding: 18px 20px 0; }
}
@media (max-width: 760px) {
  header.top .top-row { grid-template-areas: "brand acct" "search search"; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding-block: 10px 6px; }
  .search { max-width: none; }
  .search input { height: 44px; font-size: 16px; }
  .grid, .row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  /* phones: Show filters and Sort on the first row, the three quick pills on their own row under them */
  .pillbar { gap: 8px; align-items: flex-start; }
  .pills { flex-wrap: wrap; overflow: visible; row-gap: 10px; }
  .quick { flex-basis: 100%; border-left: 0; padding-left: 0; }
  .sortlabel span { display: none; }
  .sortlabel select { padding: 8px 10px; max-width: 132px; }
  .card .body { padding: 8px 0 0; }
  .card-title { font-size: 14px; }
  .buyrow { flex-direction: column; align-items: stretch; gap: 6px; }
  .buyrow .btn { width: 100%; }
  .more { text-align: center; }
  .card.mine .body { padding: 10px; }
  .gallery { max-width: none; padding: 0; }
  .detail .info { padding: 16px 16px 0; }
  .titlebox h2 { font-size: 23px; }
  .adview[data-mode="checkout"] .gallery, .adview[data-mode="done"] .gallery { padding-top: 12px; }
  .adview[data-mode="editing"] .gallery { position: sticky; top: 56px; z-index: 3; pointer-events: none; padding-top: 8px; }
  .adview[data-mode="editing"] .detail .shot { position: relative; top: auto; pointer-events: auto; }
  .pin-actions { flex: 1 1 auto; justify-content: flex-end; }
  .pin-save span { display: none; }
}

/* Pricing and how it works (#pricing): four price cards (every ad, the 3-pack and 5-pack since Nov 8, the free first ad; the
   $25 custom design went on Nov 8), compact add-on rows, a four-step flow, five questions. The cards go 2 x 2 under 900px. */
.price-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 10px; align-content: start; grid-template-rows: auto auto 1fr auto; }
.pcard.main { border: 2px solid var(--accent); }
.pcard .label { margin: 0; }
.pc-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pc-price .big { font: 800 40px/1 var(--display); letter-spacing: -.02em; color: var(--ink); }
.pc-price .per { color: var(--muted); font-size: 14px; }
.pcard p { margin: 0; color: var(--muted); font-size: 14px; }
.pcard .btn { justify-self: start; }
.pc-note { margin: 12px 0 0; }
/* Ad packs (Nov 8): the panel that opens under the price cards, and the "Using your 3-ad pack: 2 left" banner */
.pack-panel { margin-top: 16px; }
.pack-box { max-width: 680px; }
.pack-box .pin { position: static; margin: 0; padding: 0; border-top: 0; background: transparent; }
.pack-banner { display: flex; justify-content: space-between; align-items: center; gap: 8px 14px; flex-wrap: wrap; background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: 9px 14px; font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
.pack-banner .linkbtn { padding: 0; font-size: 13px; }
.adview .pack-slot:not(:empty) { padding: 10px 10px 0; }
.adview .pack-slot .pack-banner { margin: 0; }
.pack-page .progress { max-width: 420px; }
.addons { display: grid; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.addon { padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.addon:first-child { border-top: 0; }
.addon-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 18px; align-items: center; }
.addon-name { display: grid; gap: 2px; min-width: 0; }
.addon-name strong { font-size: 16px; }
.addon-price { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.addon-price .num { font-family: var(--body); font-weight: 800; font-size: 18px; }
.addon-price .per { color: var(--muted); font-size: 13px; }
.addon .btn { white-space: nowrap; }
.included { margin-top: 6px; font-size: 13.5px; }
.included summary { cursor: pointer; color: var(--accent); font-weight: 600; width: fit-content; }
.included p { margin: 6px 0 2px; color: var(--muted); max-width: 70ch; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; position: relative; }
.flow-step { position: relative; display: grid; gap: 6px; align-content: start; justify-items: start; }
.flow-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.flow-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flow-n { font: 700 12px/1 var(--body); color: var(--muted); letter-spacing: .08em; }
.flow-n::before { content: "STEP "; }
.flow-step h3 { font-size: 17px; font-weight: 700; font-family: var(--body); }
.flow-step p { margin: 0; color: var(--muted); font-size: 14px; }
/* the arrows between steps (left to right on wide screens) */
.flow-step:not(:last-child)::after { content: ""; position: absolute; top: 25px; left: 64px; right: -22px; height: 2px; background: var(--line); }
.flow-step:not(:last-child)::before { content: ""; position: absolute; top: 20px; right: -24px; width: 10px; height: 10px; border-top: 2px solid var(--line); border-right: 2px solid var(--line); transform: rotate(45deg); }
.kind-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.kind-item { display: flex; gap: 14px; align-items: center; background: var(--sunk); border-radius: 14px; padding: 12px; }
.kind-item p { margin: 0; font-size: 14px; }
.kind-thumb { flex: none; width: 72px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--line); }
.kind-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) {
  .price-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pcard { padding: 16px; }
  .pc-price .big { font-size: 32px; }
  .kind-pair { grid-template-columns: minmax(0, 1fr); }
  /* the flow runs top to bottom, joined by a line */
  .flow { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .flow-step { grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; }
  .flow-icon { grid-row: 1 / span 3; }
  .flow-step:not(:last-child)::after { top: 56px; bottom: -16px; left: 25px; right: auto; width: 2px; height: auto; }
  .flow-step:not(:last-child)::before { display: none; }
}
@media (max-width: 760px) {
  .addon-row { grid-template-columns: minmax(0, 1fr) auto; }
  .addon-row .btn { grid-column: 1 / -1; justify-self: start; }
}

/* the sticky header is two rows now: keep jumped-to headings below it */
section.block, .all-head, #allHead { scroll-margin-top: 150px; }
@media (max-width: 760px) { section.block, .all-head, #allHead { scroll-margin-top: 170px; } }

/* card pills: Our pick, Trending, New, Seasonal (at most two) */
.b-pick { background: var(--accent); color: var(--accent-ink); }
.b-trend { background: #1B1E1C; color: #FFFFFF; }
.na { font-size: 13px; font-weight: 600; color: var(--muted); }
.ai-line { margin: 6px 0 0; }
/* an ad that isn't available yet: the plain page hides the picture and details */
.adview.na-view .gallery, .adview.na-view .titlebox, .adview.na-view #dBody, .adview.na-view .adtop .save, .adview.na-view #dShare { display: none; }
.adview.na-view .detail { grid-template-columns: minmax(0, 1fr); }
.na-page { padding: 32px 4px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 64px); align-items: flex-start; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .3em; width: 12px; height: 7px; border: solid var(--accent); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }

/* Pricing: How it works first */
.flow-first { margin-top: 6px; }
.block-h { font-size: 22px; font-weight: 800; margin: 30px 0 14px; scroll-margin-top: 150px; }
.addon-name .meta + .meta { margin-top: 2px; }
.included .ticks { margin-top: 8px; font-size: 13.5px; color: var(--muted); }

.addon .included { margin-top: 10px; }
.addon .included .label { margin-bottom: 4px; }

/* One tab row under the logo and search, left-aligned; the open one underlined (Cameron, Nov 7). Phones use the
   bottom bar with the same five. */
header.top .wrap.tabs-row { display: block; padding-block: 0; }
nav.tabs { display: flex; gap: 26px; align-items: stretch; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs a { padding: 6px 0 11px; border-radius: 0; background: none; color: var(--muted); font-size: 14.5px; font-weight: 600; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
nav.tabs a:hover { background: none; color: var(--ink); }
nav.tabs a[aria-current="page"] { background: none; color: var(--ink); border-bottom-color: var(--ink); }
nav.tabs .count { font-size: 11px; background: var(--sunk); color: var(--ink); padding: 0 7px; }
header.top .top-row { padding-block: 14px 10px; }
/* the audience categories live on the Ad library page, as chips under the title */
.lib-cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; overflow: visible; }
.lib-cats .cat { border: 1px solid var(--line); background: var(--surface); padding: 6px 13px; font-size: 13.5px; }
.lib-cats .cat:hover { border-color: var(--ink); background: var(--surface); }
.lib-cats .cat[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 760px) {
  header.top .wrap.tabs-row, nav.tabs { display: none; }
  header.top .top-row { padding-block: 10px 10px; }
  .lib-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .lib-cats::-webkit-scrollbar { display: none; }
}

/* Pricing: the line above the two kinds of ad (Nov 8) */
.kind-intro { margin: 18px 0 10px; color: var(--muted, #5f6858); max-width: 70ch; }
