/* DESIGN_AUDIT_FIXES_ON: Design's Nov 19 audit (a)1/2/3/5/6/7/8.
   Loaded last only on audited public pages. Off pages retain every original asset token.
   Text and content edits live in the switched Python renderer; these are display overrides. */

/* One scale for each job: 12 labels, 14 secondary text, 16 card titles, 20 prices,
   22/27 section headings and 29/34 page titles. The home hero and product's main price stay as they are. */
html.design-audit-on main :is(small,.photo-tag,.list-certs-label,.snapshot-note,.price-prefix,.price-sub,.breadcrumb,.text-link,.aff,.pm-test){font-size:12px}
html.design-audit-on main .product-card :is(.check,.photo-tag){font-size:12px}
html.design-audit-on main :is(.quick-specs small,.detail-specs small,.document-archive small,.document-provenance small){font-size:12px}
html.design-audit-on main :is(.product-card .price-sub,.product-card .price-sub span){font-size:12px}
html.design-audit-on main h2{font-size:22px;line-height:1.25}
html.design-audit-on main h3{font-size:17px;line-height:1.3}
html.design-audit-on main :is(.product-title,.d3-name,.home-deal-text h3,.hv-compact .home-deal-text h3){font-size:16px;line-height:1.35}
@media (min-width:900px){
  html.design-audit-on main h2{font-size:27px}
  html.design-audit-on main .detail-copy h1{font-size:34px}
}

/* Card prices only: no .detail-price/.buy-box selector, so the product's main price keeps its scale. */
html.design-audit-on main .product-card .price-line .price,
html.design-audit-on main .d3 .d3-p>b,
html.design-audit-on main .d3 .dv-unit>b,
html.design-audit-on main .home-deal-price>strong,
html.design-audit-on main .hv-unit>b,
html.design-audit-on main .cx-card .pm-sgo>b{font-size:20px;font-weight:800;letter-spacing:0}
html.design-audit-on main .d3 .dv-p>b.dv-price,
html.design-audit-on main .hv-total{font-size:16px;font-weight:700;letter-spacing:0}

/* Yellow belongs to store buttons. Both light and dark modes use the existing tokens. */
html.design-audit-on .hero-turn h1::after{background:var(--brand-green)}
html.design-audit-on main .tag.warn{font-size:12px;background:transparent;color:var(--ink);border:1px solid var(--line);border-radius:4px}

/* The /deals category links remain one row, with a horizontal scroll area on narrow screens. */
html.design-audit-on main .dv-jump{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:20px;max-width:100%;padding-bottom:2px;overscroll-behavior-inline:contain}
html.design-audit-on main .dv-jump>a{flex:0 0 auto;white-space:nowrap;min-height:44px}

/* Brand cards: retain one complete rating label, and use the home card's category icon
   when a product has no photo. The parent renderer supplies da-photo-placeholder. */
html.design-audit-on main .bp-cat .card-rating{flex-wrap:nowrap;gap:4px;max-width:100%}
html.design-audit-on main .bp-cat .card-rating>span:not(.rating-stars){font-size:12px;white-space:nowrap}
html.design-audit-on main .bp-cat .card-rating .rating-stars{flex:none;gap:0}
html.design-audit-on main .bp-cat .product-photo:has(.da-photo-placeholder){height:80px;min-height:80px;display:flex;align-items:center;justify-content:center;background:var(--surface)}
html.design-audit-on main .bp-cat .da-photo-placeholder{display:flex;align-items:center;justify-content:center;width:48px;height:48px;color:var(--muted)}
html.design-audit-on main .bp-cat .da-photo-placeholder svg{display:block;width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.5}
@media (max-width:380px){
  html.design-audit-on main .bp-cat .card-rating .rating-stars>svg{width:10px;height:10px}
}

html.design-audit-on .hv-deals a.da-home-store{display:flex;padding:0;min-height:44px;gap:0;text-align:left;white-space:normal}
html.design-audit-on .hv-deals .da-home-store .pm-sl{flex:1;padding:10px 12px}
html.design-audit-on .hv-deals .da-home-store .pm-sgo{padding:10px 12px;min-height:44px;display:flex;align-items:center;gap:6px}
html.design-audit-on .da-seller-button{min-height:44px;width:100%;box-sizing:border-box}

/* Directory letter headings previously pinned a separate 15px important rule. */
html.design-audit-on main h2.dl-letter{font-size:22px!important}
@media(min-width:900px){html.design-audit-on main h2.dl-letter{font-size:27px!important}}

/* Owner-approved home Deals redo v2: one card design for both rows.
   The switched renderer decides eligibility and whether a row exists; this file only lays it out. */
html.design-audit-on main .hd .hd-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 20px}
html.design-audit-on main .hd .hd-head h2{margin:0;font-size:22px}
html.design-audit-on main .hd .hd-sub-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 14px;margin:0 0 12px}
html.design-audit-on main .hd .hd-sub-head h3{margin:0;font-size:20px;font-weight:800}
html.design-audit-on main .hd .hd-sub-head p,
html.design-audit-on main .hd .hd-how{margin:0;font-size:14px;color:var(--muted)}
html.design-audit-on main .hd .hd-how{color:var(--green);text-decoration:underline;text-underline-offset:3px}
html.design-audit-on main .hd .hd-grid{list-style:none;margin:0 0 32px;padding:0;display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
html.design-audit-on main .hd .hd-card{display:grid;grid-template-columns:96px minmax(0,1fr);gap:12px;padding:12px;border:1px solid var(--line);border-radius:6px;background:var(--surface);min-width:0}
html.design-audit-on main .hd .hd-media{position:relative;width:96px;height:96px;border-radius:4px;background:var(--image-surface);display:grid;place-items:center;overflow:hidden}
html.design-audit-on main .hd .hd-media img{position:absolute;inset:0;margin:auto;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;aspect-ratio:auto;mix-blend-mode:var(--photo-blend)}
html.design-audit-on main .hd .hd-media svg{width:32px;height:32px;color:var(--muted)}
html.design-audit-on main .hd :is(.hd-cat,.hd-off){position:absolute;z-index:1;left:4px;top:4px;max-width:calc(100% - 8px);box-sizing:border-box;font-size:12px;line-height:1.2;padding:4px 6px;border-radius:4px;background:var(--surface);border:1px solid var(--line);color:var(--ink);overflow-wrap:anywhere}
html.design-audit-on main .hd .hd-off{background:var(--deal-red);color:var(--on-deal-red);border-color:transparent;font-weight:700}
html.design-audit-on main .hd .hd-body{display:flex;flex-direction:column;min-width:0}
html.design-audit-on main .hd .hd-body h4{margin:0;font:700 16px/1.3 var(--font-display);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html.design-audit-on main .hd .hd-body h4 a{color:var(--ink);text-decoration:none}
html.design-audit-on main .hd .hd-seller{margin:2px 0 8px;font-size:14px;color:var(--muted)}
html.design-audit-on main .hd .hd-price{margin:0;font-size:14px;color:var(--muted)}
html.design-audit-on main .hd .hd-price b{font:800 20px/1.2 var(--font-display);color:var(--ink)}
html.design-audit-on main .hd .hd-price s{margin-left:6px}
html.design-audit-on main .hd .hd-sub{margin:2px 0 0;font-size:14px;color:var(--muted)}
html.design-audit-on main .hd .hd-go{margin-top:auto;padding-top:12px}
html.design-audit-on main .hd .hd-go :is(.button,.btn,.home-deal-button){display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;min-height:44px;font-size:16px;text-align:center;text-decoration:none}
html.design-audit-on main .hd .hd-go .home-deal-button{background:var(--store-yellow);color:var(--on-store-yellow);border:1px solid var(--store-yellow-edge);border-radius:6px;font-weight:600}
html.design-audit-on main .hd .hd-go .home-deal-button:active{background:var(--store-yellow-hover)}
html.design-audit-on main .hd .hd-go .home-deal-button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
html.design-audit-on main .hd .hd-meta{margin:6px 0 0;font-size:12px;color:var(--muted)}
html.design-audit-on main .hd .view-all-deals{font-size:14px}
@media (hover:hover) and (pointer:fine){html.design-audit-on main .hd .hd-go .home-deal-button:hover{background:var(--store-yellow-hover)}}
@media (min-width:900px){
  html.design-audit-on main .hd .hd-head h2{font-size:27px}
  html.design-audit-on main .hd .hd-grid{grid-template-columns:repeat(var(--hd-columns,3),minmax(0,1fr));gap:16px}
  html.design-audit-on main .hd .hd-card{grid-template-columns:minmax(0,1fr);grid-template-rows:160px 1fr;padding:16px}
  html.design-audit-on main .hd .hd-media{width:100%;height:160px}
}

/* Brand tags move clear of the Save button and wrap in the photo's full width.
   They retain their complete recorded category text: no one-line ellipsis. */
html.design-audit-on main .bp-cat .product-card .product-photo .photo-tag{top:auto;bottom:8px;left:8px;right:8px;max-width:none;width:auto;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25;overflow-wrap:anywhere}

html.design-audit-on main .bp-cat .product-photo:has(.da-photo-placeholder){align-items:flex-start}
html.design-audit-on main .bp-cat .da-photo-placeholder{height:40px}

html.design-audit-on main .hd details.hd-how{text-decoration:none;max-width:100%}
html.design-audit-on main .hd .hd-how summary{cursor:pointer;text-decoration:underline;min-height:44px;display:flex;align-items:center}
html.design-audit-on main .hd .hd-how p{font-size:14px;color:var(--muted);max-width:60ch}

/* Design 03:57Z: home-only controls and count alignment; no sticky or review-row rules. */
html.design-audit-on main .hd .view-all-deals{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border:1px solid var(--green);border-radius:6px;background:var(--green);color:var(--surface);font-size:14px;font-weight:650;text-decoration:none}
html.design-audit-on main .hd .hd-sub-head>p>a{color:var(--green);font-size:14px;text-decoration:underline;text-underline-offset:3px}
html.design-audit-on main .hd .hd-media .dt-tag{position:absolute;left:4px;top:4px;padding:3px 7px;border-radius:4px;background:var(--deal-red);color:var(--on-deal-red);font-size:12px;font-weight:700;line-height:1.2}
html.design-audit-on main .hd .hd-votes{display:flex;align-items:center;gap:4px;font-size:14px;line-height:1.3}
html.design-audit-on main .hd .hd-votes svg{width:18px;height:18px;vertical-align:middle;flex:none}
html.design-audit-on main .cmp-lede{font-size:14px}

html.design-audit-on main .hd .hd-votes .hs-v{display:inline-flex;align-items:center;gap:3px;font-size:14px;line-height:1.3}
