/* Wave 3 (wave3.py), linked last in every page's head. Existing tokens only; corners 6 px; no pills. */

/* 1. The header is one row from 320 px: on a phone the menu, the wordmark, Search and Login; Search opens the header form as a row under them.
   Only where script runs (data-js from mode.js / units.js) and with the launch header (data-ux2); otherwise the form shows as before. */
.ms-tog{display:none}
@media (max-width:700px){
  html[data-js] body[data-ux2] .masthead{flex-wrap:wrap;height:auto;min-height:0;column-gap:4px;row-gap:10px;padding-top:10px;padding-bottom:10px}
  html[data-js] body[data-ux2] .masthead>.brand{flex:1 1 0;min-width:0;margin-right:auto}
  html[data-js] body[data-ux2] .masthead>.brand .brand-name{white-space:nowrap;overflow:hidden;text-overflow:clip;max-width:none}
  html[data-js] body[data-ux2] .masthead>.search{display:none;order:9;flex:1 1 100%;margin:0}
  html[data-js] body[data-ux2] .masthead.ms-open>.search{display:flex}
  html[data-js] body[data-ux2] .masthead>.search input{font-size:16px}  /* 16 px: iOS doesn't zoom the page when the field takes focus */
  html[data-js] body[data-ux2] .masthead>.ms-tog{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;margin:0;padding:0;background:none;border:0;border-radius:6px;color:var(--header-ink);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
  html[data-js] body[data-ux2] .masthead>.ms-tog svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2}
  html[data-js] body[data-ux2] .masthead>.ms-tog .ms-x,html[data-js] body[data-ux2] .masthead.ms-open>.ms-tog .ms-s{display:none}
  html[data-js] body[data-ux2] .masthead.ms-open>.ms-tog .ms-x{display:block}
  html[data-js] body[data-ux2] .masthead>.ms-tog:focus-visible{outline:2px solid var(--header-ink);outline-offset:-2px}
  html[data-js] body[data-ux2] .masthead>.header-action.acct{flex:none;margin-right:-10px}
}
@media (max-width:379px){  /* 320 px: the row fits with the wordmark's mark at 28 px */
  html[data-js] body[data-ux2] .masthead>.un-menu{margin-right:-4px}
  html[data-js] body[data-ux2] .masthead>.brand{gap:6px}
  html[data-js] body[data-ux2] .masthead>.brand img{width:28px;height:29px}
  html[data-js] body[data-ux2] .masthead>.ms-tog{margin-right:-4px}
}
/* from 701 px: Saved, Compare and Login are 44 px targets (their icons were 23 px boxes) */
@media (min-width:701px){.masthead>.header-action{min-width:44px;min-height:44px;justify-content:center;box-sizing:border-box}}
/* 701 to 760 px: styles.css put the search on a row of its own; it stays in the row, as on a desktop */
@media (min-width:701px) and (max-width:760px){
  .masthead{flex-wrap:nowrap;min-height:0}
  .masthead>.search{order:0;flex:1 1 auto;min-width:0}
}

/* 2. /categories: rows that fill. Each tile carries its row's size (--c3, --c4, --c5: wave3.balanced) and takes that share of the row. */
.ux-category-directory.w3-bal{display:flex;flex-wrap:wrap;gap:16px}
.ux-category-directory.w3-bal>a{flex:1 1 100%;min-width:0;box-sizing:border-box;justify-content:flex-start}
.ux-category-directory.w3-bal>a>span{margin-left:0}
.ux-category-directory.w3-bal>a>span:last-child{margin-left:auto;flex:none}
.ux-category-directory.w3-bal .cat-txt{display:flex;flex-direction:column;gap:2px;min-width:0;overflow-wrap:anywhere}
.ux-category-directory.w3-bal .cat-txt strong{font-size:16px;line-height:1.3}
.ux-category-directory.w3-bal .cat-txt small{font-size:14px}
@media (min-width:600px){  /* 600 to 1,099: three to a row */
  .ux-category-directory.w3-bal{gap:12px}
  .ux-category-directory.w3-bal>a{flex-basis:calc((100% - (var(--c3) - 1) * 12px) / var(--c3) - 1px);padding:16px;gap:12px}
}
@media (min-width:1100px){
  .ux-category-directory.w3-bal{gap:16px}
  .ux-category-directory.w3-bal>a{flex-basis:calc((100% - (var(--c4) - 1) * 16px) / var(--c4) - 1px);padding:20px 24px;gap:16px}
}
@media (min-width:1700px){.ux-category-directory.w3-bal>a{flex-basis:calc((100% - (var(--c5) - 1) * 16px) / var(--c5) - 1px)}}

/* 3. Product pages (batch 933e7b). Room between the sections (3), Owner reviews open under Sellers is closed_sections' (OWNER_EDITS_ON) */
@media (min-width:768px){html.g-closed-sections #main section.detail-section{margin-top:24px}}
@media (max-width:767px){html.g-closed-sections #main section.detail-section{margin-top:20px}}
/* (7) one count style beside every heading, on one baseline; the Documents chevron at the right like every other section's */
#main .detail-section>details>summary.section-head{align-items:baseline;padding-top:12px;box-sizing:border-box}  /* over owner-edits.css 5's center: the heading where every other section's sits (12 px down a 52 px row) */
#main .detail-section>details>summary.section-head::after{margin-left:auto;align-self:center}
.detail-section>details>summary .section-meta,.detail-section>details>summary h2>.small.muted{font:500 14px/1.4 var(--font-body);letter-spacing:0;color:var(--muted)}
/* (4) the score stays beside "Evidence score" on a phone; the documented share may take the next line */
@media (max-width:767px){#score>details>summary .card-head{column-gap:8px}#score>details>summary .battery-score{white-space:nowrap}}
@media (max-width:379px){#score>details>summary .battery-score>svg{display:none}}
/* (8) the Sellers store column: 380 px from 1,280 (owner-edits.css), 460 px from 1,600 */
@media (min-width:1600px){#sellers .pm-st th:last-child,#sellers .pm-st td:last-child{width:460px;min-width:460px}}

/* 4. Member profile (M-359, M-358): review cards and the equipment rows */
.acct-cols.mp>div>.section-head h2 .small{font:500 14px/1.4 var(--font-body);letter-spacing:0;color:var(--muted);margin-left:8px}
.mp-rev{margin:0 0 12px}
.mp-rlink{display:grid;grid-template-columns:88px minmax(0,1fr);gap:16px;padding:16px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);text-decoration:none;touch-action:manipulation}
.mp-rth{width:88px;height:88px;display:grid;place-items:center;background:#fff;border:1px solid var(--line);border-radius:6px;overflow:hidden;box-sizing:border-box}
.mp-rth img{max-width:80px;max-height:80px;width:auto;height:auto;object-fit:contain}
.mp-rbody{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
.mp-rprod{font-size:16px;font-weight:700;line-height:1.35;overflow-wrap:anywhere}
.mp-rmeta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;font-size:12px;color:var(--muted)}
.mp-rmeta .rating{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:12px;color:var(--ink)}
.mp-rtitle{font-size:16px;font-weight:600;line-height:1.35;margin-top:4px;overflow-wrap:anywhere}
.mp-rtext{font-size:14px;line-height:1.5;color:var(--muted);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
.mp-rph{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}
.mp-rph img{width:64px;height:48px;object-fit:cover;border:1px solid var(--line);border-radius:6px;background:#fff}
.mp-rmore{font-size:12px;font-weight:600;color:var(--muted)}
@media (hover:hover) and (pointer:fine){.mp-rlink:hover{border-color:var(--ink)}.mp-rlink:hover .mp-rtitle,.mp-rlink:hover .mp-rprod{text-decoration:underline;text-underline-offset:3px}}
.mp-rlink:focus-visible{outline:2px solid var(--green);outline-offset:2px}
@media (max-width:479px){.mp-rlink{grid-template-columns:64px minmax(0,1fr);gap:12px;padding:12px}.mp-rth{width:64px;height:64px}.mp-rth img{max-width:56px;max-height:56px}}
.mp-sys{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.mp-sys li{display:flex;align-items:center;gap:12px;min-height:56px;margin:0;padding:4px 0}
.mp-sth{flex:none;width:48px;height:48px;display:grid;place-items:center;background:#fff;border:1px solid var(--line);border-radius:6px;overflow:hidden;box-sizing:border-box}
.mp-sth img{max-width:42px;max-height:42px;width:auto;height:auto;object-fit:contain}
.mp-sname{display:flex;flex-direction:column;min-width:0;font-size:14px;line-height:1.4}
.mp-sname a,.mp-sname b{color:var(--ink);font-weight:600;text-decoration:none;overflow-wrap:anywhere}
.mp-sname a{display:inline-block;padding:2px 0}
.mp-sname a:hover,.mp-sname a:focus-visible{text-decoration:underline;text-underline-offset:3px}
.mp-sname small{font-size:12px;color:var(--muted)}

/* 5. Brand pages (batches 9d99d8, 7d0efd): room under the products, a one-line empty Reviews section, no box */
.bp-cat{margin-bottom:32px}
.bp-cat .product-grid{margin-bottom:0}
.bp-cat+.bp-cat{margin-top:0}
.bp-revtop.bp-revempty{background:none;border:0;box-shadow:none;padding:0;margin:28px 0 8px}
.bp-revtop.bp-revempty h2{margin:0 0 4px}
.bp-revtop.bp-revempty .rating{margin:0;font-size:14px;color:var(--muted)}
