/* Mobile usability + small-text contrast layer (2026-11).
   Loaded LAST on every page (after page-specific <style> blocks), so it can correct both
   main.css pages and the home page's own inline styles. Desktop look is unchanged except
   for darker small grey/gold text (WCAG AA contrast). */

/* ---------- contrast: all widths ---------- */
:root{--ink3:#67635a;--gold-ink:#8a5f12;--gold-badge:#9a6c16}
.sec-label,.ptag-gold,.li-award,.country-stat,.year-badge,.cc-stat-v,.info-banner strong,.hc-ach,.art-small-cat,.ballon-table .decade-row th,
.decade-nav a:hover,.facts-box .facts-h span{color:var(--gold-ink)}
.sec-label::before{background:var(--gold-ink)}
.pc-pos-badge,.wc-badge{background:var(--gold-badge)}
.li-num{color:rgba(26,24,20,.28)}
[id]{scroll-margin-top:80px}
.table-scroll>.career-table{margin-bottom:0}

/* ---------- mobile menu (button is hidden on desktop) ---------- */
.nav-toggle{display:none}

@media(max-width:700px){
  .wrap{padding:0 16px}

  /* header: logo | all-players button | burger, every control 44px high */
  .hdr-inner{height:60px;gap:8px;position:static}
  .logo{min-height:44px;margin-right:auto;font-size:18px;gap:8px}
  .hdr-btn{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;font-size:14px}
  .nav-toggle{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;
    width:44px;height:44px;flex-shrink:0;border:1px solid var(--border);border-radius:8px;background:var(--white);color:var(--ink);cursor:pointer}
  .nav-toggle span{display:block;width:18px;height:2px;border-radius:1px;background:currentColor;transition:transform .2s,opacity .2s}
  .nav-open .nav-toggle span:nth-child(1){transform:translateY(6px) rotate(45deg)}
  .nav-open .nav-toggle span:nth-child(2){opacity:0}
  .nav-open .nav-toggle span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
  .header.nav-open .nav{display:flex;flex-direction:column;gap:0;position:absolute;left:0;right:0;top:100%;
    background:var(--white);padding:6px 16px 14px;border-bottom:1px solid var(--border);box-shadow:var(--shadow2);
    max-height:calc(100vh - 60px);overflow-y:auto}
  .header.nav-open .nav a{display:flex;align-items:center;min-height:48px;padding:0 8px;font-size:16px;border-radius:0;box-shadow:none;border-bottom:1px solid var(--bg3)}
  .header.nav-open .nav a.active,.header.nav-open .nav .nav-active{border-radius:8px}
  .header.nav-open .nav a:last-child{border-bottom:none}

  /* breadcrumbs: taller row, 44px tap height for links */
  .breadcrumb{height:auto;min-height:44px;font-size:13px;row-gap:0}
  .breadcrumb a{display:inline-flex;align-items:center;min-height:44px}
  .bc-schema{display:none}

  /* vertical rhythm: less dead space between sections */
  .sec{padding:40px 0}
  .sec-head{margin-bottom:22px;flex-wrap:wrap}
  .sec-link{min-height:44px}
  .page-hero,.cat-hero{padding:32px 0}
  h2.content-h{margin-top:28px;padding-top:28px}

  /* readable sizes: running text >= 14-15px, micro labels >= 11px */
  .sec-label{font-size:11px}
  .content-ul li{font-size:15px}
  .faq-q{font-size:15px;min-height:52px}
  .faq-a{font-size:15px;line-height:1.65}
  .ach-text{font-size:14px}.ach-sub{font-size:12px}
  .ptag{font-size:13px}
  .stat-cell-k,.pc-stat-k,.tc-sk,.cc-stat-k{font-size:11px;letter-spacing:.02em}
  .pc-era,.pc-pos-badge{font-size:11px}
  .pc-country,.cc-meta,.country-sub,.tl-club,.li-sub,.li-award{font-size:13px}
  .tc-champ{font-size:12px}
  .pos-desc{font-size:14px}
  .rel-card-name{font-size:14px}.rel-card-sub{font-size:12px}
  .career-table th,.ballon-table th{font-size:12px}
  .facts-grid dt{font-size:12px}
  .footer-desc{font-size:14px;max-width:none}
  .footer-col-title{font-size:11px}
  .footer-col a{font-size:15px;padding:10px 0;color:rgba(255,255,255,.7)}
  .footer-bottom{font-size:13px;color:rgba(255,255,255,.55)}
  .footer-bottom a{display:inline-flex;align-items:center;min-height:44px;color:rgba(255,255,255,.6)}
  .photo-credit{font-size:12px}
  .footer-col-title{color:rgba(255,255,255,.6)}
  .footer-logo-link{display:flex;align-items:center;min-height:44px}
  .footer-bottom>*{min-width:0;max-width:100%}
  .footer-bottom>div:last-child{display:flex!important;flex-wrap:wrap;align-items:center;column-gap:10px!important;row-gap:0!important}

  /* tap targets */
  .pc-btn{padding:12px 8px;font-size:14px}
  .pc-name a{display:flex;align-items:center;min-height:44px}
  .aw-name a{display:inline-flex;align-items:center;min-height:44px;margin:-12px 0}
  .btn-primary,.btn-secondary,.btn-gold,.wc-btn{min-height:44px}
  .decade-nav{gap:8px}
  .decade-nav a{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;font-size:14px}
  .page-num{width:44px;height:44px}

  /* tables: never wider than the screen */
  .table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-left:-16px;margin-right:-16px;padding:0 16px}
  .career-table th,.career-table td{padding:9px 8px}
  .career-table td{font-size:14px}
  .ballon-table td,.ballon-table th{font-size:14px}

  /* related players: two compact columns instead of one tall stack */
  .related-grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .rel-card{padding:12px 8px;min-height:44px}

  /* ranking lists: award moves under the name instead of squeezing it */
  .list-item{display:grid;grid-template-columns:30px 52px minmax(0,1fr);column-gap:12px;row-gap:2px;align-items:center;position:relative}
  .li-num{width:auto;font-size:24px;grid-row:1 / span 2}
  .li-img{grid-row:1 / span 2}
  .li-award{grid-column:3}
  .li-name a{display:block}
  .li-name a::after{content:"";position:absolute;inset:0}

  /* world cup banner: the inline 2-column grid stacks */
  .wc-banner .wrap>div[style*="grid-template-columns"]{grid-template-columns:1fr!important;gap:24px!important}
  .wc-title{font-size:32px}
  .wc-team-name{font-size:12px}

  /* ---------- home page (own inline styles) ---------- */
  .search-box{flex-wrap:wrap}
  .search-icon-wrap{width:44px}
  .search-box input{flex:1 1 calc(100% - 44px);min-height:52px;padding:14px 8px}
  .search-filters{display:contents}
  .search-filters select{flex:1 1 50%;min-width:0;min-height:48px;font-size:16px;padding:0 10px;
    border:none;border-top:1px solid var(--border);border-right:1px solid var(--border)}
  .search-filters select:nth-child(2){border-right:none}
  .search-submit{flex:1 1 50%;min-height:48px;font-size:16px;padding:0 12px}
  .search-hints{gap:8px}
  .sh-tag{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;font-size:14px}
  .eras-tabs{overflow-x:auto;flex-wrap:nowrap;max-width:100%;width:auto;-webkit-overflow-scrolling:touch}
  .era-tab{white-space:nowrap;flex-shrink:0;min-height:44px;padding:0 16px;font-size:14px}
  .links-col a{font-size:15px;padding:10px 0}
  .links-col-title{font-size:11px}
  .cat-desc{font-size:14px}
  .cat-cnt,.hc-ach,.era-player-sub,.hero-num-lbl{font-size:12px}
  .aw-club{font-size:13px}
  .art-small-cat{font-size:11px}
  .hc-link{min-height:44px}
  .news-ticker .ticker-inner{height:44px}
  .ticker-item{font-size:13px}
  .ticker-item a{display:inline-flex;align-items:center;min-height:44px}
  .hero-numbers{display:grid!important;grid-template-columns:1fr 1fr;gap:14px 16px!important}
  .hero-num-sep{display:none}

  /* live blocks (live.css) */
  .live-date,.live-comp{font-size:12px}
  .live-time,.live-score{font-size:14px}
}

/* 5-column career tables (seasons/club/matches/goals/trophies): on phones the trophies cell drops to its own line, so no sideways scroll is needed */
@media (max-width:560px){
  .career-table:has(thead th:nth-child(5):last-child) tr{display:grid;grid-template-columns:4.6em 1fr 3.4em 3.4em;align-items:start}
  .career-table:has(thead th:nth-child(5):last-child) thead th:nth-child(5){display:none}
  .career-table:has(thead th:nth-child(5):last-child) td{border-bottom:0}
  .career-table:has(thead th:nth-child(5):last-child) td:nth-child(5){grid-column:1/-1;padding-top:0;color:var(--ink2,#4a4740);font-size:13.5px;border-bottom:1px solid var(--border)}
  .career-table:has(thead th:nth-child(5):last-child) td:nth-child(3),.career-table:has(thead th:nth-child(5):last-child) td:nth-child(4),.career-table:has(thead th:nth-child(5):last-child) th:nth-child(3),.career-table:has(thead th:nth-child(5):last-child) th:nth-child(4){text-align:right}
}

/* player tags never split inside ("2022 — сейчас") */
.ptag{white-space:nowrap}
.ptag{display:inline-block;margin-bottom:6px}

/* ranking lists with reasons: number/avatar stay on top, award under the name */
@media(max-width:700px){
  .list-rows .list-item{align-items:start}
  .list-rows .li-num{padding-top:12px;grid-row:1 / span 2}
  .list-rows .li-img{grid-row:1 / span 2}
  .list-rows .li-info{grid-column:3;grid-row:1}
  .list-rows .li-award{grid-column:3;grid-row:2;max-width:none;text-align:left;padding-top:2px}
  .li-why{font-size:14px}
  .list-method{padding:14px 16px}
  .list-facts th{white-space:normal;width:38%}
}
@media(max-width:700px){.li-ach{font-size:13px}}
