/* Ranking density: trim repeated padding, never truncate content. */
:is(.browse-row-body,.f-review-board) .category-ranking-block{padding-block:0;margin-top:8px}
:is(.browse-row-body,.f-review-board) .global-heading{margin-bottom:10px;gap:10px}
:is(.browse-row-body,.f-review-board) .global-heading h2{font-size:1rem;line-height:1.3;margin-block:0 4px}
:is(.browse-row-body,.f-review-board) .global-heading p{margin-block:4px;font-size:.75rem;line-height:1.4}
:is(.browse-row-body,.f-review-board) .global-heading .eyebrow{font-size:.6rem;margin-bottom:4px}
:is(.browse-row-body,.f-review-board) .global-source-stamp{padding:6px 8px}
:is(.browse-row-body,.f-review-board) .global-source-stamp b{font-size:1.2rem}
:is(.browse-row-body,.f-review-board) .global-source-note{margin-block:8px;font-size:.7rem;line-height:1.4}
:is(.browse-row-body,.f-review-board) .rank-card-row{gap:8px;padding:12px;margin-bottom:6px}
:is(.browse-row-body,.f-review-board) .rank-card-metrics{padding:0;background:transparent;gap:5px}
:is(.browse-row-body,.f-review-board) .rank-card-copy>span,
:is(.browse-row-body,.f-review-board) .rank-card-copy>div>span{display:inline;font-size:.68rem;line-height:1.4;margin:0 4px 0 0}
:is(.browse-row-body,.f-review-board) .rank-card-copy>div>strong{display:block}
:is(.browse-row-body,.f-review-board) .rank-card-copy .rank-movement{margin-left:0}
:is(.browse-row-body,.f-review-board) .f-review-board{display:block}
@media(min-width:850px){
 :is(.browse-row-body,.f-review-board) .rank-card-row{grid-template-columns:44px minmax(180px,1fr) minmax(200px,32%)}
 :is(.browse-row-body,.f-review-board) .rank-card-metrics{grid-column:3!important;grid-row:1!important}
}
@media(max-width:600px){
 :is(.browse-row-body,.f-review-board) .rank-card-row{gap:6px;padding:10px;grid-template-columns:30px minmax(0,1fr)}
 :is(.browse-row-body,.f-review-board) .rank-card-brand{gap:6px}
 :is(.browse-row-body,.f-review-board) .rank-card-brand>.brand-token{flex-basis:28px;width:28px;height:28px}
 :is(.browse-row-body,.f-review-board) .rank-card-copy>strong,
 :is(.browse-row-body,.f-review-board) .rank-card-copy>div>strong{font-size:.88rem;line-height:1.35}
 :is(.browse-row-body,.f-review-board) .rank-card-total{min-height:44px;flex-basis:86px}
 :is(.browse-row-body,.f-review-board) .rank-card-context{min-height:44px;padding:5px 8px}
}

/* Price remains an Excel-like comparison table with the existing filters. */
.value-category-body{padding:0 12px 12px}
.value-size-group+.value-size-group{margin-top:16px}
.value-country .rank-table{margin-top:0}
.value-country .rank-table th{padding-block:9px}
.value-country .rank-table td{padding-block:10px}
@media(max-width:700px){
 .value-country .rank-table td{padding-block:7px}
 .value-country .rank-table tr{padding-block:2px;margin-bottom:8px}
 .value-country .rank-table td:first-child{font-size:1rem}
}
/* Product prose must not become several squeezed flex columns on phones. */
@media(max-width:700px){
 .value-country .rank-table td[data-label="Brand & product"]{display:block;overflow-wrap:anywhere;white-space:normal}
 .value-country .rank-table td[data-label="Brand & product"]::before{display:block;margin-bottom:4px}
 .value-country .rank-table td[data-label="Brand & product"] .value-note{margin-top:4px}
}
.f-beauty-page .f-review-board{gap:0}
/* Keep the J/F landing and category rows on the same vertical rhythm as K/US. */
:is(.j-beauty-page,.f-beauty-page) :is(.compact-rank-board,.f-review-board) .rank-card-row{
 padding:8px 12px;
 margin-bottom:6px;
 gap:8px;
}
.f-beauty-page .f-review-board{display:block;gap:0}
:is(.j-beauty-page,.f-beauty-page) :is(.compact-rank-board,.f-review-board) .rank-card-metrics{
 padding:0;
 background:transparent;
 gap:5px;
}
:is(.j-beauty-page,.f-beauty-page) :is(.compact-rank-board,.f-review-board) .rank-card-total,
:is(.j-beauty-page,.f-beauty-page) :is(.compact-rank-board,.f-review-board) .rank-card-context{min-height:52px}
.j-beauty-page .compact-rank-board .rank-card-copy>div>span{display:block;margin:3px 0 0}
.j-beauty-page .compact-rank-board .rank-card-copy>div{display:block}
.j-beauty-page .compact-rank-board .rank-card-copy .rank-movement.neutral{display:none}
@media(max-width:600px){
 :is(.j-beauty-page,.f-beauty-page) :is(.compact-rank-board,.f-review-board) .rank-card-row{padding:10px;gap:6px}
 :is(.j-beauty-page,.f-beauty-page) :is(.compact-rank-board,.f-review-board) .rank-card-total,
 :is(.j-beauty-page,.f-beauty-page) :is(.compact-rank-board,.f-review-board) .rank-card-context{min-height:44px}
 .j-beauty-page .compact-rank-board .rank-card-row{position:relative;grid-template-columns:30px minmax(0,1fr)}
 .j-beauty-page .compact-rank-board .rank-card-position{font-size:1.08rem!important;align-self:start}
 .j-beauty-page .compact-rank-board .rank-card-brand{min-height:52px}
 .j-beauty-page .compact-rank-board .rank-card-copy .rank-movement:not(.neutral){position:absolute;left:10px;top:40px;margin:0;padding:2px 4px;font-size:.54rem}
}
/* Long QUESTION 28/29 navigation labels wrap instead of overflowing phones. */
.text-link[href="#question-28"],.text-link[href="#question-29"],
:is(#question-28,#question-29) .text-link{white-space:normal;overflow-wrap:anywhere;max-width:100%}

/* Every mobile ranking uses the lead brand card's four compact score tiles. */
@media(max-width:700px){
 body[data-core-country-layout] main .core-country-section :is(.attention-row,.rank-card-row){
  grid-template-columns:37px minmax(0,1fr);gap:8px;padding:10px;min-height:0;
 }
 body[data-core-country-layout] main .core-country-section :is(.attention-brand,.rank-card-brand){
  grid-column:2/-1;grid-row:1;gap:8px;min-width:0;
 }
 body[data-core-country-layout] main .core-country-section :is(.attention-signals,.rank-card-metrics-four){
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  grid-column:2/-1!important;grid-row:2!important;gap:5px;width:100%;min-width:0;
  padding:0;background:transparent;align-items:start;align-self:start;
 }
 body[data-core-country-layout] main .core-country-section :is(.attention-signals,.rank-card-metrics-four)>span:not(.rank-card-editorial){
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  box-sizing:border-box;flex:initial;width:100%;min-width:0;height:44px;min-height:44px;
  padding:5px 2px;border-radius:8px;font-size:.65rem!important;line-height:1.2;
 }
 body[data-core-country-layout] main .core-country-section :is(.attention-signals,.rank-card-metrics-four)>span>b{
  font-size:.83rem!important;line-height:1.25;white-space:nowrap;
 }
 body[data-core-country-layout] main .core-country-section .rank-card-metrics-four small{
  margin:0;font-size:.65rem;line-height:1.2;white-space:nowrap;
 }
 body[data-core-country-layout] main .core-country-section .rank-card-brand>.brand-token{
  flex-basis:34px;width:34px;height:34px;
 }
 body[data-core-country-layout] main .core-country-section :is(.attention-brand strong,.rank-card-copy>strong,.rank-card-copy>div>strong){
  font-size:.92rem;line-height:1.35;overflow-wrap:anywhere;
 }
 /* Give nested boards the same four tile widths as the lead brand board.
    Its score track excludes two borders, two 10px insets, the 37px rank and 8px gap. */
 body[data-core-country-layout] main>.core-country-section>.container{
  container-type:inline-size;
  --ranking-score-width:calc(100cqi - 2px - 20px - 37px - 8px);
 }
 body[data-core-country-layout] main .core-country-section .browse-row-body .container{
  padding-inline:0;
 }
 body[data-core-country-layout] main .browse-row-body :is(.attention-signals,.rank-card-metrics-four){
  grid-column:1/-1!important;justify-self:end;width:min(100%,var(--ranking-score-width));
 }

 /* Keep each pair close even on country pages with an extra product wrapper. */
 body[data-core-country-layout] #main>.core-country-section{padding-bottom:8px}
 body[data-core-country-layout] #main>.core-country-section+.core-country-section{
  margin-top:0;padding-top:0;
 }
 body[data-core-country-layout] #main>.core-country-section+.core-country-section>.container>.product-category-block{
  margin-top:0;padding-block:0;
 }
 body[data-core-country-layout] #main>.core-country-section+.core-country-section .product-index-heading{
  padding-top:0;border-top:0;
 }
 body[data-core-country-layout] main>.core-country-section .product-index-heading{padding-top:10px;margin-top:0!important;margin-bottom:10px}
 body[data-core-country-layout] main>.core-country-section .compact-ranking-evidence{margin-bottom:0}
 body[data-core-country-layout] main>.gbrl-section-ad[data-ranking-ad]:has(ins[data-ad-status="filled"]){margin-block:8px}
 body[data-core-country-layout] main>.gbrl-section-ad[data-ranking-ad]:has(ins[data-ad-status="unfilled"]){display:none}
}
