/* Hide sections before first paint.
 *
 * offline-shim.js also hides these, but JavaScript only runs after the browser
 * has painted, so the announcement bar flashed on every load. A real stylesheet
 * link in the served HTML applies before the first frame, so nothing appears.
 *
 * Only unambiguous selectors live here. Rules that need to walk up from an
 * image to its container stay in the shim, where the climb can be bounded --
 * :has() would match every ancestor and could blank half a page.
 */

/* the thin full-width announcement strip at the top */
[class*="bg-brand-ink"][class*="h-8"][class*="w-full"] {
  display: none !important;
}

/* routes with nothing behind them */
a[href="/love"],
a[href="/love.html"],
a[href="/experts"],
a[href="/experts.html"],
a[href="/workshops"],
a[href="/workshops.html"],
a[href^="/workshops/"],
a[href="/photos"],
a[href="/photos.html"],
a[href="/docs"],
a[href="/docs.html"],
a[href="/webinars"],
a[href="/webinars.html"],
a[href^="/webinars/"] {
  display: none !important;
}

/* The list item wrapping them is collapsed by offline-shim.js, NOT here.
 * An empty <li> is not free -- a flex column with gap-2 still pays its 8px, and
 * three of them stacked up as 24px of dead space in the footer's Resources
 * column -- but the obvious CSS fix, li:has(> a[href="/docs"]), is wrong:
 * 19 list items on this site put that link INSIDE a sentence, and the rule
 * would take the whole sentence with it. CSS cannot ask whether the link is the
 * item's entire content; the shim compares the two text runs and can. The cost
 * is one frame of phantom gap before the shim runs, below the fold.
 */

/* Never hide one of those links inside a sentence. The same routes are
 * also linked from prose
 * -- "Cohorva uses credits, meaning you only pay for actual usage" hangs its
 * first three words on a /docs link -- and the rule above would delete those
 * words before the page even painted, leaving a paragraph that opens with a
 * comma. A descendant selector outranks the bare one, so the words stay put;
 * offline-shim.js then strips the href, which is what finally stops the link
 * working (and stops the rule above matching it at all). */
p a[href="/love"], p a[href="/love.html"],
p a[href="/experts"], p a[href="/experts.html"],
p a[href^="/workshops"],
p a[href^="/webinars"],
p a[href="/photos"], p a[href="/photos.html"],
p a[href="/docs"], p a[href="/docs.html"] {
  display: inline !important;
}

/* Posts announcing funding rounds Cohorva never raised, and the real venture
 * firms shown as its investors. The shim climbs to the surrounding card; these
 * stop the link itself flashing before it gets there. */
a[href^="/blog/series-b"],
a[href^="/blog/cohorvas-17m-series-a"],
a[data-offsite*="nexusvp.com"],
a[data-offsite*="firstround.com"],
a[data-offsite*="benchmark.com"],
a[data-offsite*="shopify.vc"],
a[data-offsite*="ycombinator.com"] {
  display: none !important;
}

/* Make the logo awkward to lift.
 *
 * This is deterrence, not protection: the browser has to fetch the file to
 * draw it, so it is always reachable from the network panel or by typing the
 * URL. What this removes is the easy route -- "Save image as" and dragging the
 * mark to the desktop.
 *
 * pointer-events:none is what kills the image context menu: the right-click
 * then targets whatever sits behind the mark. The nav logo sits inside a link
 * to "/", and that link keeps working, because the click passes through to it. */
img[src*="cohorva-logo"],
img[src*="cohorva-icon"],
img[src*="cohorva_logo"] {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
