/* Discover, search and saving (parity chunk 2): search box, filters, saved views, boards, board links, the ad page.
   Built on app.css's tokens, so light and dark both work. */

/* search */
.dsearch { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 12px; border: 1.5px solid var(--field); background: var(--surface); }
.dsearch:focus-within { border-color: var(--ink); }
.dsearch-ic svg { width: 18px; height: 18px; display: block; color: var(--muted); }
.dsearch input { flex: 1; min-width: 0; min-height: 40px; border: 0; background: transparent; outline: none; }
.dsearch input::-webkit-search-cancel-button { cursor: pointer; }
.dsearch .btn { min-height: 40px; padding: 8px 16px; }
.dcount { margin: 0; }
/* the category Explore and Swipe read */
/* one row, on a phone too; on Swipe it sits in the side column, so the card keeps the height it's sized for */
/* min-width 0 and a zero basis: a long category name never widens the column it's in (Swipe's is the card's width) */
.dcat { display: flex; align-items: center; gap: 8px 10px; min-width: 0; margin: 0 0 12px; }
.swipe-side .dcat { margin: 0; }
.dcat label { flex: none; font-size: var(--fs-sm); font-weight: 600; }
.dcat select { flex: 1 1 0; width: 0; min-width: 0; max-width: 340px; min-height: 42px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--field); background: var(--surface); }
.dcat .btn { min-height: 42px; padding: 8px 14px; }
.dtools { justify-content: space-between; }
.dtools-note { margin: -6px 0 0; }

/* more filters */
.fmore { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.fmore > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; font-weight: 600; }
.fmore > summary::-webkit-details-marker { display: none; }
.fmore > summary svg { width: 16px; height: 16px; margin-left: auto; transition: transform .15s ease-out; }
.fmore[open] > summary svg { transform: rotate(180deg); }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; padding: 4px 14px 14px; }
.fgrid .field select { min-height: 42px; padding: 8px 10px; }
.fgrid-act { grid-column: 1 / -1; }
.fnote { margin: 0; padding: 0 14px 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px 6px 12px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; }
.pill svg { width: 14px; height: 14px; }
.pill:hover { filter: brightness(1.15); }

/* saved views */
.views { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.vchip { display: inline-flex; align-items: center; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); }
.vchip a { min-height: 36px; display: inline-flex; align-items: center; padding: 6px 4px 6px 12px; color: inherit; text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.vchip.on { border-color: var(--ink); }
.vchip form { margin: 0; }
.vchip button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 999px; }
.vchip button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.vchip button svg { width: 14px; height: 14px; }
.vsave > summary { list-style: none; width: fit-content; }
.vsave > summary::-webkit-details-marker { display: none; }
.vsave[open] > summary { display: none; }
.vsave input { min-height: 36px; padding: 6px 10px; border-radius: 8px; border: 1.5px solid var(--field); background: var(--surface); min-width: 0; flex: 1 1 200px; }
.btn.small, .btn.small.ghost { min-height: 36px; padding: 6px 12px; font-size: var(--fs-sm); }
.btn.small.ghost { padding-inline: 10px; }

/* the card's extra lines and board picker */
.ad-anchor { display: block; height: 0; scroll-margin-top: 90px; }
.cad-stopped { padding: 0 2px; margin-top: -4px; color: var(--tired); font-weight: 600; }
.svmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 2px; }
.svmeta .chip { text-decoration: none; color: inherit; font-weight: 600; }
.svnote { color: var(--muted); flex-basis: 100%; overflow-wrap: anywhere; }
.svlink { padding: 0 2px; color: inherit; font-weight: 600; }
.stars { display: inline-flex; gap: 2px; }
.stars i { width: 12px; height: 12px; display: block; background: var(--tile); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.stars i.on { background: var(--mark); }
.bpick > summary { list-style: none; cursor: pointer; font-size: var(--fs-sm); font-weight: 600; min-height: 32px; display: flex; align-items: center; padding: 0 2px; color: var(--muted); }
.bpick > summary::-webkit-details-marker { display: none; }
.bpick > summary::after { content: "+"; margin-left: 6px; font-weight: 700; }
.bpick[open] > summary::after { content: "–"; }
.bpick-f { display: grid; gap: 6px; padding: 8px; margin-top: 4px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.bpick-f .check { align-items: center; gap: 8px; min-height: 32px; }
.bpick-f .check input { margin: 0; width: 18px; height: 18px; }
.bpick-f .sub, .bchecks .sub { padding-left: 22px; }
.bpick-f input[name=new_board] { min-height: 38px; padding: 6px 10px; border-radius: 8px; border: 1.5px solid var(--field); background: var(--surface); min-width: 0; }
.bpick-f .row { justify-content: space-between; }
.bpick-f a { color: inherit; font-weight: 600; }

/* Saved: boards beside the ads */
.svlayout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.svmain { display: grid; gap: 14px; min-width: 0; }
.svboards { position: sticky; top: 76px; gap: 10px; padding: 16px; }
.blist { display: grid; gap: 2px; }
.blist a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 40px; padding: 6px 10px; border-radius: 10px; color: inherit; text-decoration: none; font-weight: 600; font-size: var(--fs-md); }
.blist a span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blist a.sub { padding-left: 26px; font-weight: 500; }
.blist a:hover { background: var(--bg); }
.blist a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.blist a[aria-current="page"] .count { color: inherit; }
.bnew > summary, .bedit > summary, .share-d > summary { list-style: none; cursor: pointer; }
.bnew > summary::-webkit-details-marker, .bedit > summary::-webkit-details-marker, .share-d > summary::-webkit-details-marker { display: none; }
.bnew > summary { width: fit-content; }
.bnew[open] > summary { display: none; }
.bnew-f { display: grid; gap: 10px; }
.bnew-f > .btn { margin-top: 10px; }   /* 20px from the field above */
.btools { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.bedit > summary, .share-d > summary { display: flex; align-items: center; gap: 10px; min-height: 28px; font-weight: 700; }
.bedit > summary svg, .share-d > summary svg { width: 16px; height: 16px; margin-left: auto; transition: transform .15s ease-out; }
.bedit[open] > summary svg, .share-d[open] > summary svg { transform: rotate(180deg); }
.bedit form, .share-d form { margin: 0; }
.share-d[open] { grid-column: 1 / -1; }
.btools details.panel:not([open]) { gap: 0; padding-block: 14px; }   /* the panel's gap would space out hidden content */
.lform { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.lform > .check, .lform > .row, .lform > p { grid-column: 1 / -1; }
.copy-in { flex: 1; min-width: 0; min-height: 40px; padding: 8px 10px; border-radius: 8px; border: 1.5px solid var(--field); background: var(--surface); font-size: var(--fs-sm); }
.llist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.llist li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.llist li > div:first-child { display: grid; gap: 2px; min-width: 0; }
.llist form { margin: 0; }
.llist select.sm { min-height: 36px; padding: 4px 8px; border-radius: 8px; border: 1.5px solid var(--field); background: var(--surface); }

/* Inspiration (23 Oct): a card's picture opens the ad's page, and an ad liked in Swipe says so */
.cad-open { display: block; border-radius: 10px; color: inherit; text-decoration: none; }
.cad-open img, .cad-open .cad-noimg { transition: filter .15s ease-out; }
.cad-open:hover img, .cad-open:hover .cad-noimg { filter: brightness(.94); }
.cad-open:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.chip-liked { gap: 5px; background: color-mix(in srgb, var(--mark) 35%, var(--surface)); border-color: transparent; color: var(--ink); }
.chip-liked svg, .blist-ic svg { width: 13px; height: 13px; flex: none; }
.blist-ic { display: inline-flex; align-items: center; gap: 7px; }

/* the ad page: Make my version leads, as the page's one primary action. Beside the picture on a computer; first on a
   phone, so it's on the first screen there too */
.adpage { display: grid; grid-template-columns: minmax(220px, 360px) minmax(0, 1fr); grid-template-areas: "img make" "img info";
  grid-template-rows: auto 1fr; gap: 14px 20px; align-items: start; }
.adpage-img { grid-area: img; }
.adpage-info { grid-area: info; }
.adpage-make { grid-area: make; display: grid; gap: 10px; justify-items: start; }
.adpage-make > * { margin: 0; }
.adpage-make > p:not(.small) { max-width: 60ch; }
.adpage-make .stop-ctl { justify-self: stretch; }
.adpage-make .btn.primary { min-height: 48px; padding-inline: 22px; font-size: var(--fs-md); gap: 8px; }
.adpage-make .btn.primary svg { width: 19px; height: 19px; }
.adpage-img img, .adpage-img .cad-noimg { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 14px; display: block; }
.adpage-info { display: grid; gap: 14px; min-width: 0; }
.adbody { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: var(--fs-md); }
.adwords-h { margin: 4px 0 0; font: 700 var(--fs-sm)/1.3 var(--ui); color: var(--ink); }
.adwords-h small { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }
.tx { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-md); }
.tx li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 8px; overflow-wrap: anywhere; }
.tx-at { color: var(--muted); font-size: var(--fs-xs); padding-top: 2px; font-variant-numeric: tabular-nums lining-nums; }
.fs { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.fs legend { font-size: var(--fs-sm); font-weight: 600; padding: 0; margin-bottom: 6px; }
.bchecks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; }
.bchecks .check { align-items: center; min-height: 36px; }
.bchecks .check input { margin: 0; }
.rate { display: flex; flex-wrap: wrap; gap: 6px; }
.rate label { position: relative; cursor: pointer; }
.rate input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rate span[aria-hidden], .rate .rate-0 span { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.rate input:checked + span { background: var(--mark); border-color: var(--mark); color: var(--on-mark); }
.rate input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Suggested */
.sg-thumbs { display: flex; gap: 6px; }
.sg-thumbs img { width: 56px; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; background: var(--tile); }
ol.steps { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }   /* the how-to list on Suggested; div.steps is onboarding's progress bar (app.css) */

/* a board link's page */
.pb-sec { display: grid; gap: 10px; }
.pb-body { margin: 0; overflow-wrap: anywhere; }
.onb-card .cads { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

@media (max-width: 760px) {
  /* long chip rows scroll sideways on a phone instead of stacking a screen tall */
  .fchips, .dtools .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .fchips::-webkit-scrollbar, .dtools .filters::-webkit-scrollbar { display: none; }
  .fchips a, .dtools .filters a { flex: none; }
  .dtools { flex-wrap: wrap; }
  .svlayout, .adpage { grid-template-columns: minmax(0, 1fr); }
  .adpage { grid-template-areas: "make" "img" "info"; grid-template-rows: none; }
  .svboards { position: static; }
  .blist { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .blist::-webkit-scrollbar { display: none; }
  .blist a { border: 1.5px solid var(--line); border-radius: 999px; }
  .blist a.sub { padding-left: 10px; }
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adpage-img { max-width: 320px; }
  .dsearch .btn { padding: 8px 12px; }
  .onb-card .cads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rate { gap: 5px; }
  .rate span[aria-hidden], .rate .rate-0 span { min-width: 40px; padding: 0 8px; }
}

/* Swipe's ways in (swipe.py, 23 Oct): Explore's button, and Home's quick win, a fan of the first few ads to swipe */
.head-acts .btn svg { width: 18px; height: 18px; flex: none; }
.home .swipe-strip { grid-template-columns: auto minmax(0, 1fr) auto; background: var(--surface); border-color: var(--line); }
.swipe-fan { display: flex; align-items: center; padding: 4px 6px 4px 14px; }
.swipe-fan img { width: 44px; height: 55px; margin-left: -14px; border-radius: 7px; object-fit: cover; border: 2px solid var(--surface);
  background: var(--tile); box-shadow: 0 4px 10px -5px rgb(20 22 27 / .5); }
.swipe-fan img:nth-child(1) { transform: rotate(-7deg); }
.swipe-fan img:nth-child(3) { transform: rotate(7deg); }
.swipe-fan-ic { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -14px; border-radius: 12px; background: var(--tile); color: var(--slate); }
.swipe-fan-ic svg { width: 22px; height: 22px; }
@media (max-width: 760px) { .home .swipe-strip { grid-template-columns: auto minmax(0, 1fr); } }
