/* Discover Ratings extends the existing ArticleTrackingMonitor design system. */
.ratings-hero{padding:96px 0 80px;background:var(--bg)}
/* колонки выровнены по верху: первая строка текста справа стоит вровень с заголовком слева */
.ratings-hero__grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:72px;align-items:start}
.ratings-hero h1{font-size:var(--fs-h1);max-width:820px}
.ratings-kicker{color:var(--accent);font-size:.82rem;font-weight:750;margin:0 0 20px}
.ratings-hero__copy{font-size:var(--fs-lead);color:var(--text-dim);padding-top:calc(.82rem * 1.6 + 20px)}
.ratings-hero__copy p:first-child{margin-top:0}
.ratings-demo-note{font-size:.87rem;margin-top:24px;padding:18px 20px;background:var(--surface-2);border-radius:var(--radius)}
.ratings-demo-note strong{color:var(--text)}
.ratings-directory{padding:84px 0 112px;background:var(--bg-alt)}
.ratings-section-head{display:flex;justify-content:space-between;align-items:end;gap:32px;margin-bottom:42px}
.ratings-section-head h2,.ratings-method-preview h2{font-size:var(--fs-h2)}
.ratings-section-head p{max-width:480px;margin:0;color:var(--text-dim)}
/* «Choose a country»: текст справа начинается вровень с заголовком, как в первом блоке */
.ratings-directory .ratings-section-head{align-items:start}
.ratings-directory .ratings-section-head p{padding-top:6px}
.ratings-markets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.ratings-market{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:18px;min-height:142px;padding:26px 28px;background:var(--surface);border-radius:var(--radius-lg);transition:transform .2s ease,background-color .2s ease;color:var(--text)}
.ratings-market:hover{transform:translateY(-4px);background:color-mix(in srgb,var(--surface) 92%,var(--accent))}
.ratings-market__flag{display:block;width:36px;height:27px;object-fit:cover;border-radius:4px;box-shadow:0 0 0 1px color-mix(in srgb,var(--text) 12%,transparent)}
.ratings-market strong{display:block;font-size:clamp(1.2rem,2vw,1.7rem);line-height:1.2}
.ratings-market small{display:block;margin-top:8px;color:var(--text-mute)}
.ratings-market__arrow{font-size:1.65rem}
.ratings-market--inactive{min-height:112px;background:color-mix(in srgb,var(--surface) 72%,var(--bg-alt));color:var(--text-dim);box-shadow:inset 0 0 0 1px var(--line);cursor:default}
.ratings-market--inactive:hover{transform:none;background:color-mix(in srgb,var(--surface) 72%,var(--bg-alt))}
.ratings-market--inactive .ratings-market__flag{filter:grayscale(.45);opacity:.62}
.ratings-market--inactive small{color:var(--text-mute)}
.ratings-market__status{padding:7px 10px;background:var(--surface-2);border-radius:999px;color:var(--text-mute);font-size:.72rem;font-weight:750;white-space:nowrap}
/* Компактный каталог стран (2026-11-12): доступные - по три в ряд и ниже, будущие - мелким списком */
.ratings-markets{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.ratings-markets .ratings-market{gap:14px;min-height:0;padding:18px 20px}
.ratings-markets .ratings-market strong{font-size:1.12rem;line-height:1.25}
.ratings-markets .ratings-market small{margin-top:2px;font-size:.84rem}
.ratings-markets .ratings-market__arrow{font-size:1.2rem;color:var(--accent)}
.ratings-soon{margin-top:40px}
.ratings-soon__head{display:flex;align-items:baseline;gap:12px;margin-bottom:14px}
.ratings-soon__head h3{margin:0;font-size:1.05rem}
.ratings-soon__head span{color:var(--text-mute);font-size:.88rem}
.ratings-soon__list{display:grid;grid-template-columns:repeat(auto-fill,minmax(176px,1fr));gap:8px;margin:0;padding:0;list-style:none}
.ratings-soon__list .ratings-market{display:flex;align-items:center;gap:10px;min-height:40px;padding:8px 12px;border-radius:var(--radius-sm)}
.ratings-soon__list .ratings-market__flag{width:24px;height:18px;border-radius:3px}
.ratings-soon__list strong{font-size:.9rem;font-weight:600;line-height:1.3}
@media (max-width:900px){.ratings-markets{grid-template-columns:1fr}}
@media (max-width:720px){.ratings-markets .ratings-market{min-height:0;padding:16px 18px}.ratings-soon__list{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ratings-method-preview{padding:112px 0;background:var(--bg);color:var(--text)}
.ratings-method-preview__grid{display:grid;grid-template-columns:1fr 1fr;gap:72px;align-items:start}
.ratings-method-preview p{max-width:530px;color:var(--text-dim);font-size:var(--fs-lead)}
.ratings-method-preview .btn{margin-top:18px;background:var(--accent);color:#fff}

@media (max-width:900px){
  .ratings-hero__grid,.ratings-method-preview__grid{grid-template-columns:1fr;gap:30px}
  .ratings-hero{padding:72px 0 64px}
  .ratings-hero__copy{padding-top:0}
}
@media (max-width:720px){
  .ratings-directory{padding:64px 0 80px}
  .ratings-section-head{display:block}.ratings-section-head p{margin-top:14px}
  .ratings-markets{grid-template-columns:1fr}
  .ratings-market{padding:22px;min-height:126px}
  .ratings-market--inactive{grid-template-columns:auto minmax(0,1fr)}
  .ratings-market--inactive .ratings-market__status{grid-column:2;justify-self:start}
  .ratings-method-preview{padding:80px 0}
}

/* Country ranking pages */
.ranking-hero{padding:78px 0 54px}
.ranking-hero__grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:64px;align-items:end}
.ranking-hero h1{font-size:clamp(2.35rem,4.7vw,4rem);max-width:850px}
.ranking-hero__intro{max-width:720px;margin:22px 0 0;color:var(--text-dim);font-size:var(--fs-lead)}
.ranking-source{margin:24px 0 0;color:var(--text-mute);font-size:.82rem}
.ranking-switcher{padding:26px;background:var(--surface-2);border-radius:var(--radius-lg)}
.ranking-switcher__label{display:block;font-weight:700;margin-bottom:10px}
/* Выбор страны с флагами (assets/js/country-picker.js): кнопка и выпадающий список */
.country-picker{position:relative}
.country-picker__btn{position:relative;display:flex;align-items:center;width:100%;min-height:50px;padding:0 44px 0 14px;background:var(--surface);border:1px solid transparent;border-radius:var(--radius-sm);font-weight:650;text-align:left;cursor:pointer;transition:border-color .15s ease}
.country-picker__btn:hover,.country-picker__btn[aria-expanded="true"]{border-color:color-mix(in srgb,var(--accent) 45%,transparent)}
.country-picker__btn::after{content:"";position:absolute;right:16px;top:50%;width:14px;height:14px;margin-top:-7px;background-color:var(--text-mute);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5L6 7.5 9 4.5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5L6 7.5 9 4.5'/%3E%3C/svg%3E") center/contain no-repeat;transition:transform .2s ease}
.country-picker__btn[aria-expanded="true"]::after{transform:rotate(180deg)}
.country-picker__value{display:flex;align-items:center;gap:12px;min-width:0}
.country-picker__value span,.country-picker__list span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.country-picker__flag{display:block;flex:none;width:24px;height:18px;object-fit:cover;border-radius:3px;box-shadow:0 0 0 1px color-mix(in srgb,var(--text) 12%,transparent)}
/* панель списка: поле поиска сверху, под ним страны, при пустом результате - строка «No countries found» */
.country-picker__pop{position:absolute;z-index:30;left:0;right:0;top:calc(100% + 6px);padding:8px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);box-shadow:var(--shadow)}
.country-picker__pop[hidden]{display:none}
.country-picker__search{display:block;width:100%;height:42px;margin:0 0 6px;padding:0 12px 0 38px;background:var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 12px center/16px;border:1px solid transparent;border-radius:8px;font-size:1rem;color:var(--text)}
.country-picker__search::placeholder{color:var(--text-mute)}
.country-picker__search:focus{outline:none;border-color:var(--accent);background-color:var(--surface)}
.country-picker__search::-webkit-search-cancel-button{cursor:pointer}
.country-picker__list{max-height:264px;margin:0;padding:0;overflow-y:auto;list-style:none}
.country-picker__list li[hidden]{display:none}
.country-picker__empty{margin:0;padding:10px 12px;color:var(--text-mute);font-size:.9rem}
.country-picker__empty[hidden]{display:none}
.country-picker__list li{display:flex;align-items:center;gap:12px;min-height:44px;padding:0 12px;border-radius:8px;font-weight:600;color:var(--text);cursor:pointer}
.country-picker__list li.is-active{background:var(--accent-soft)}
.country-picker__list li[aria-selected="true"]{color:var(--accent)}
.country-picker__list li[aria-selected="true"]::after{content:"";flex:none;width:14px;height:14px;margin-left:auto;background-color:var(--accent);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5'/%3E%3C/svg%3E") center/contain no-repeat}
.ranking-switcher p{font-size:.84rem;color:var(--text-mute);margin:14px 0 5px}
.ranking-switcher a{font-size:.84rem;color:var(--accent);font-weight:700}
.ranking-overview{padding:0 0 78px}
.ranking-overview__grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:18px}
.ranking-overview__grid>div{padding:32px;background:var(--bg-alt);border-radius:var(--radius-lg)}
.ranking-overview h2{font-size:clamp(1.55rem,2.6vw,2.15rem)}
.ranking-overview p:last-child{margin:14px 0 0;color:var(--text-dim)}
.ranking-overview .ratings-demo-note{margin:0;display:flex;flex-direction:column;justify-content:center}
.ranking-section{padding:70px 0}
.ranking-section:nth-of-type(odd){background:var(--bg-alt)}
.ranking-section .ratings-section-head{align-items:end;margin-bottom:26px}
.ranking-section .ratings-section-head p{margin:10px 0 0;color:var(--text-dim)}
.ranking-section .ratings-section-head>span{font-size:.84rem;color:var(--text-mute)}
/* короткий вывод в колонке текста шапки: надпись Key takeaway и предложение (ratings.js, insights) */
.ranking-section .ratings-section-head .ratings-insight{max-width:760px;margin-top:18px;padding:2px 0 2px 16px;border-left:2px solid var(--accent)}
.ranking-section .ratings-section-head .ratings-insight__label{margin:0 0 4px;font-size:.72rem;font-weight:750;letter-spacing:.08em;text-transform:uppercase;color:var(--accent)}
.ranking-section .ratings-section-head .ratings-insight [data-insight]{margin:0;color:var(--text);font-size:1rem;line-height:1.6}
.ratings-insight strong{font-weight:650}
/* строка над таблицей издателей: сколько показано и за какой месяц данные */
.ratings-tools__meta{display:grid;gap:4px;justify-items:end;text-align:right}
@media (max-width:720px){.ratings-tools__meta{justify-items:start;text-align:left;margin-top:12px}.ratings-tools .ratings-tools__meta p{margin-top:0}}
.ratings-panel{background:var(--surface);border-radius:var(--radius-lg);overflow:hidden}
.ratings-panel h3{padding:22px 24px 8px;font-size:1.25rem}
.ratings-tools{display:flex;justify-content:space-between;align-items:end;gap:20px;padding:20px 24px;background:var(--surface-2)}
.ratings-tools p{margin:0;color:var(--text-mute);font-size:.84rem}
.ratings-search{display:grid;gap:7px;font-size:.8rem;font-weight:700;width:min(360px,100%)}
.ratings-search input{min-height:44px;padding:0 14px;border:0;border-radius:var(--radius-sm);background:var(--surface)}
.ratings-table-scroll{overflow-x:auto;overscroll-behavior-inline:contain}
.ratings-panel table{min-width:720px}
.ratings-panel th{padding:15px 18px;text-align:left;background:var(--surface-2);font-size:.76rem;color:var(--text-mute);white-space:nowrap}
/* на сером фоне секции (winners & losers, категории) шапка #F2F2F8 сливалась с фоном #F5F5FA:
   там шапка с оттенком акцента и тонкая рамка у карточки. На белом фоне всё как было */
.ranking-section:nth-of-type(odd) .ratings-panel{box-shadow:0 0 0 1px var(--line)}
.ranking-section:nth-of-type(odd) .ratings-panel th{background:color-mix(in srgb,var(--accent) 7%,var(--surface-2));color:var(--text-dim)}
.ratings-panel td{padding:15px 18px;border-top:1px solid var(--line);font-size:.88rem;color:var(--text-dim)}
.ratings-panel tbody tr:hover{background:var(--accent-soft)}
.ratings-rank{font-variant-numeric:tabular-nums;font-weight:750;color:var(--text-mute)}
.ratings-domain{display:flex;align-items:center;gap:11px;color:var(--text);white-space:nowrap}
.ratings-domain>span{display:grid;place-items:center;width:32px;height:32px;background:var(--accent-soft);color:var(--accent);border-radius:50%;font-size:.68rem;font-weight:800}
/* рейтинг издателей и категории (Free Resources и страницы стран) - строки ниже, чем в других таблицах:
   эти таблицы длинные (50 и 20 строк) */
#publisherRows td,#categoryRows td{padding-top:10px;padding-bottom:10px}
#publisherRows .ratings-domain>span{width:28px;height:28px}
.ratings-score{display:flex;align-items:center;gap:12px;min-width:155px}
.ratings-score__track{width:100px;height:8px;background:var(--surface-2);border-radius:999px;overflow:hidden}
.ratings-score__track i{display:block;height:100%;background:var(--accent);border-radius:inherit}
.ratings-score strong{min-width:36px;color:var(--text);font-variant-numeric:tabular-nums}
.ratings-delta{font-size:.8rem;font-weight:700;white-space:nowrap}.ratings-delta--up{color:var(--live)}.ratings-delta--down{color:var(--down)}.ratings-delta--flat{color:var(--text-mute)}
.ratings-pagination{display:flex;justify-content:flex-end;gap:7px;padding:17px 20px;background:var(--surface-2)}
.ratings-pagination button{min-width:38px;height:38px;border:0;border-radius:50%;background:var(--surface);font-weight:700}
.ratings-pagination button:hover:not(:disabled),.ratings-pagination .is-active{background:var(--accent);color:#fff}
.ratings-pagination button:disabled{opacity:.35;cursor:not-allowed}
.ratings-empty{text-align:center;padding:42px!important;color:var(--text-mute)!important}
.ratings-movers{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.ratings-movers table{min-width:520px}
#trendRows small{display:block;margin-top:5px;color:var(--text-mute);white-space:nowrap}
.ranking-method{padding:100px 0;background:var(--bg-alt);color:var(--text)}
.ranking-method__grid{display:grid;grid-template-columns:1fr 1fr;gap:72px}
.ranking-method h2{font-size:var(--fs-h2)}
.ranking-method p{color:var(--text-dim)}
.ranking-method .btn{margin-top:16px}

@media (max-width:900px){
  .ranking-hero__grid,.ranking-overview__grid,.ranking-method__grid{grid-template-columns:1fr;gap:24px}
  .ranking-hero{padding-top:62px}
  .ratings-movers{grid-template-columns:1fr}
}
@media (max-width:720px){
  .ranking-hero{padding:48px 0 42px}
  .ranking-overview{padding-bottom:48px}
  .ranking-overview__grid>div,.ranking-switcher{padding:22px}
  .ranking-section{padding:56px 0}
  .ratings-tools{display:block;padding:18px}.ratings-tools p{margin-top:12px}
  .ratings-panel th,.ratings-panel td{padding:13px 14px}
  .ratings-pagination{justify-content:flex-start;overflow-x:auto}
  .ranking-method{padding:72px 0}
}
