/* Web-guidance fixes (2026-11-18). Loaded last, only when the gate cbd_v8_wg is on.
   Nothing here changes what a visitor sees. Record: releases/20261118-web-guidance/RELEASE.md */

/* Images that received width/height attributes from the pass keep the exact size they had before:
   zero specificity, so every existing size rule still wins. The attributes only reserve the space. */
:where(img[data-wg]){width:auto;height:auto}

/* Phone bottom bar (58px, fixed): a focused or jumped-to element stops above it, not behind it. */
@media (max-width:860px){
  html{scroll-padding-bottom:calc(58px + env(safe-area-inset-bottom,0px))}
}

/* Tap targets (WCAG 2.5.8: 24px minimum). Hit area only; text, lines and spacing do not move.
   Tested 2026-11-18 on all 33 Vegas routes at 390px and 1440px (wg_check.py): no element changes position or size.
   Inline text links: vertical padding on an inline box never changes line layout.
   Table links: only links with no class (plain text). Classed table links are block links (tour and venue
   comparison rows) and padding made them 5px taller. */
.crumbs a,
.byline a,
.table-scroll th a,
.lf-row b a,
.footer-bottom span a,
figure.show-photo figcaption a,
figure.venue-photo figcaption a,
figure.report-figure figcaption a,
main td > a:not([class]),
details > div.a a,
.report-scope a,
.show-headliner-body > a{padding-block:5px}

/* Photo-credit badges (a logo inside a 24px badge): the whole badge is the link, not only the 14px logo.
   The badge is already positioned, so the invisible layer fills it exactly. */
span.photo-credit > a::after,
span.lr-cred > a::after,
span.vdeat__cred > a::after{content:"";position:absolute;inset:0}

/* Links 17 to 23px tall that sit in flex or block rows: an invisible extension above and below.
   (Padding would move these: on the desktop guides index it shifted "All guides" links by 5px.) */
.gtours > a,
.footer-bottom > a,
.ranking-provenance > a,
.ranking-method > a,
.popular-guides > a,
.template-toc > a,
.shead a.more,
.page-top50 .index-jump,
.show-choice-actions > a,
.plain-links > a,
.nmeta > a,
a.contact-route,
.stat a,
a.report-yelp{position:relative}
.gtours > a::after,
.footer-bottom > a::after,
.ranking-provenance > a::after,
.ranking-method > a::after,
.popular-guides > a::after,
.template-toc > a::after,
.shead a.more::after,
.page-top50 .index-jump::after,
.show-choice-actions > a::after,
.plain-links > a::after,
.nmeta > a::after,
a.contact-route::after,
.stat a::after,
a.report-yelp::after,
a.lr-cred::after,
a.photo-credit::after{content:"";position:absolute;inset:-5px 0}

/* Top 50 deferred rendering (content-visibility:auto on ranked entries) was built, tested and REMOVED 2026-11-18.
   It cut layout work at page load from 67 ms to 31 ms, but when a phone visitor flings the page, an entry renders
   at its real height while on screen and the ad block after it jumps (layout shift 0.42 to 0.82 in three runs,
   against 0.01 to 0.05 without it). Do not add it back without fixing that. Record: RELEASE.md, finding 10. */
