/* Theme UI fixes: header search, search page, calendar list, footer and archive notices. */
.site-search{position:relative;display:flex;align-items:center;flex:1 1 auto;max-width:470px;min-width:190px;margin:0 auto;padding:4px 4px 4px 6px;background:#f1f5f7;border:1px solid #d9e3e9;border-radius:999px;gap:4px}
.site-search-scope{position:relative;flex:0 0 auto;display:flex;align-items:center}
.site-search-scope::after{content:'';position:absolute;right:2px;top:50%;width:6px;height:6px;margin-top:-5px;border-right:1.6px solid #6b8092;border-bottom:1.6px solid #6b8092;transform:rotate(45deg);pointer-events:none}
.site-search-filter{appearance:none;-webkit-appearance:none;flex:0 0 auto;max-width:118px;padding:7px 20px 7px 10px;border:0;border-right:1px solid #d9e3e9;background:transparent;font:inherit;font-size:.78rem;font-weight:700;color:#2f4a5c;outline:none;cursor:pointer;text-overflow:ellipsis}
.site-search-filter:hover{color:#14303f}
.site-search-field{flex:1 1 auto;min-width:0;display:flex}
.site-search input{flex:1 1 auto;min-width:0;padding:7px 4px;border:0;background:transparent;font:inherit;font-size:.84rem;color:#14303f;outline:none}
.site-search input::placeholder{color:#7c8f9d}
.site-search input::-webkit-search-cancel-button{display:none}
.site-search button{display:grid;place-items:center;width:32px;height:32px;flex:0 0 auto;border:0;border-radius:999px;background:#14303f;color:#fff;cursor:pointer;line-height:0}
.site-search button svg{display:block;stroke:#fff}
.site-search button:hover{background:#1d465c}
.site-search-suggestions{position:absolute;top:calc(100% + 10px);left:0;right:0;min-width:360px;z-index:60;display:flex;flex-direction:column;padding:6px;background:#fff;border:1px solid #dbe5eb;border-radius:14px;box-shadow:0 20px 44px rgba(11,39,54,.18);max-height:360px;overflow-y:auto}
.site-search-suggestions[hidden]{display:none}
.site-search-suggestions a{display:flex;align-items:flex-start;gap:10px;padding:9px 10px;border-radius:9px;color:#14303f;text-decoration:none;font-size:.86rem;line-height:1.35}
.site-search-suggestions a:hover,.site-search-suggestions a:focus{background:#f1f5f7}
.site-search-suggestions small{flex:0 0 58px;margin-top:2px;padding:2px 0;border-radius:4px;background:#eef3f6;text-align:center;font-size:.62rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#5a7183}
.site-search-suggestions span{flex:1 1 auto;min-width:0;white-space:normal;overflow-wrap:anywhere}
/* Search results page */
.search-form{max-width:760px;margin:26px 0 8px}
.search-form-field{display:flex;gap:10px;align-items:center}
.search-form-field input{flex:1 1 auto;min-width:0;padding:13px 16px;border:1px solid #d9e3e9;border-radius:12px;background:#fff;font:inherit;font-size:.95rem;color:#14303f;outline:none}
.search-form-field input:focus{border-color:#14303f;box-shadow:0 0 0 3px rgba(20,48,63,.09)}
.search-form-field button{padding:13px 24px;border:0;border-radius:12px;background:#14303f;color:#fff;font:inherit;font-size:.9rem;font-weight:700;cursor:pointer}
.search-form-filters{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.search-chip{display:inline-flex;align-items:center;padding:7px 14px;border:1px solid #d9e3e9;border-radius:999px;background:#fff;font-size:.82rem;font-weight:600;color:#41586b;cursor:pointer}
.search-chip:hover{background:#f1f5f7}
.search-chip input{position:absolute;opacity:0;width:0;height:0}
.search-chip.is-active{background:#14303f;border-color:#14303f;color:#fff}
/* Event cards */
.event-date-range{display:block;margin:3px 0 2px;font-size:.78rem;font-weight:800;color:#456173}
/* Player ranking history: two columns now that points and change are gone. */
.ranking-history-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
/* Calendar list keeps the live layout; only the range is new. */
.calendar-event .calendar-event-range{display:inline;margin-left:4px;font-size:.66rem;font-weight:900;letter-spacing:.09em;color:#456173;white-space:nowrap}
@media(max-width:1024px){.site-search{max-width:320px}}
@media(max-width:760px){.site-header-inner{flex-wrap:wrap}.site-search{order:9;flex:1 1 100%;max-width:none;margin:8px 0 10px}.site-search-filter{max-width:96px;font-size:.74rem;padding-right:18px}.site-search-suggestions{min-width:0}.search-form-field{flex-wrap:wrap}.search-form-field button{width:100%}}

/* Homepage leading players: three-letter country code beside the flag. */
.home-country-code{margin-right:6px;font-size:.68rem;font-weight:800;letter-spacing:.04em;color:#64748b;vertical-align:1px}
.home-ranking small{white-space:nowrap}

/* Players A-Z filter. */
.alphabet-filter{display:flex;flex-wrap:wrap;gap:5px;margin:14px 0 22px}
.alphabet-filter a{min-width:34px;padding:5px 8px;border:1px solid #d4dee5;border-radius:7px;background:#fff;color:#41576b;font-size:.8rem;font-weight:700;text-align:center;text-decoration:none}
.alphabet-filter a:hover{background:#edf1f4;text-decoration:none}
.alphabet-filter a.active{background:#405c73;border-color:#405c73;color:#fff}

/* Homepage subscriber information strip. */
.subscriber-strip{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-top:44px;padding:26px 30px;border-radius:18px;background:linear-gradient(120deg,#14303f,#24566b);color:#fff}
.subscriber-strip .eyebrow{margin:0 0 6px;color:#bdd6e2}
.subscriber-strip strong{display:block;font-size:1.18rem;line-height:1.3}
.subscriber-strip span{display:block;margin-top:5px;color:#cfe0e8;font-size:.9rem}
.subscriber-strip .button-primary{flex:0 0 auto;background:#fff;color:#14303f;text-decoration:none}
.subscriber-strip .button-primary:hover{background:#e7f0f4}

/* Subscriber-only screen. */
.subscriber-gate{max-width:760px;margin:48px auto;padding:clamp(26px,5vw,48px);border:1px solid #d9e1e7;border-radius:22px;background:#fff;box-shadow:0 18px 42px #10213d12}
.subscriber-gate .eyebrow{margin:0;color:#405c73}
.subscriber-gate h1{margin:8px 0 14px;font-size:clamp(2rem,4.5vw,3.1rem);line-height:1.03;letter-spacing:-.05em}
.subscriber-gate .intro{max-width:600px;color:#5b7081}
.subscriber-gate-actions{display:flex;flex-wrap:wrap;gap:12px;margin:24px 0 8px}
.subscriber-gate-benefits{margin:22px 0 0;padding:18px 0 0 20px;border-top:1px solid #e7eef2;color:#41576b;font-size:.92rem}
.subscriber-gate-benefits li{margin:6px 0}

/* Historic ranking date filter. */
.ranking-history-filter{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:18px 0 10px;padding:13px 16px;border:1px solid #d9e1e7;border-radius:12px;background:#fff}
.ranking-history-copy strong{display:block;font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;color:#64748b}
.ranking-history-copy span{font-size:.9rem;color:#27394a}
.ranking-history-filter form{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ranking-history-filter select,.ranking-history-filter button{height:36px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:0 10px;font:inherit;font-size:.86rem;color:#38526d}
.ranking-history-filter button{background:#405c73;border-color:#405c73;color:#fff;font-weight:700;cursor:pointer}
.ranking-history-lock{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid #d4dee5;border-radius:999px;background:#f4f7f9;color:#41576b;font-size:.82rem;font-weight:700;text-decoration:none}
.ranking-history-lock span{font-size:.64rem;letter-spacing:.1em;color:#07866a}
.ranking-history-lock:hover{background:#eaf0f4;text-decoration:none}

/* Site footer: light logo strip plus a full-width image, matching the original site. */
.site-footer{background:#f4f6f7;border-top:1px solid #cfd8de;color:#5d6b78;padding:26px clamp(20px,5vw,60px) 22px;font-size:.86rem}
.site-footer-main{display:flex;align-items:center;justify-content:space-between;gap:32px;max-width:1280px;margin:0 auto 18px}
.site-footer-brand{display:grid;gap:5px;line-height:1.45;min-width:230px}
.site-footer-brand strong{font-size:1.2rem;letter-spacing:-.02em;color:#14303f}
.site-footer-brand span{color:#647684}
.site-footer-brand nav{display:flex;gap:14px;margin-top:2px}
.site-footer-brand a{color:#405c73;font-weight:650;text-decoration:none}
.site-footer-brand a:hover{text-decoration:underline}
.site-footer-brand small{color:#82929e;font-size:.78rem}
.site-footer-logos{display:flex;align-items:center;justify-content:flex-end;gap:34px;flex-wrap:wrap;flex:1}
.site-footer-logo{display:block;line-height:0}
.site-footer-logo img{display:block;height:auto;width:auto;max-height:100px;max-width:100%;object-fit:contain}
.site-footer-wide{display:block;max-width:1280px;margin:0 auto;line-height:0;border-radius:8px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
.site-footer-wide + .site-footer-wide{margin-top:10px}
.site-footer-wide img{display:block;width:100%;height:auto}
.site-footer-wide-hint{display:none;max-width:1280px;margin:6px auto 0;color:#82929e;font-size:.75rem}
@media(max-width:860px){.site-footer-main{align-items:flex-start;flex-direction:column;gap:20px}.site-footer-logos{justify-content:flex-start;gap:22px}.site-footer-logo img{max-height:80px}}
@media(max-width:520px){.site-footer-logos{gap:16px}.site-footer-logo img{max-height:80px}}
@media(max-width:860px){
 .site-footer-wide img{width:auto;height:80px;max-width:none}
 .site-footer-wide-hint{display:block}
}

/* Open-archive notice on the results and completed-event lists. */
.archive-notice{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:20px 0 0;padding:12px 16px;border:1px solid #d9e1e7;border-left:3px solid #405c73;border-radius:8px;background:#f6f9fa;color:#41576b;font-size:.88rem}
.archive-notice a{font-weight:700;color:#405c73;text-decoration:none}
.archive-notice a:hover{text-decoration:underline}

/* Player profile without biography/highlights should not leave an empty column. */
.player-detail-single{grid-template-columns:1fr!important}
.player-detail-single aside{max-width:620px}

@media(max-width:720px){
 .subscriber-strip{align-items:flex-start;flex-direction:column;padding:22px}
 .ranking-history-filter{align-items:flex-start;flex-direction:column}
}
