/* /clan search, results, saved profiles, WarPickr and insights (V4b). Everything is scoped to .pg-cs. */

/* ---------- Page band: the homepage dusk hero, shorter, hills hand over to the navy page ---------- */
.pg-cs .band{padding:18px 0 88px}
.pg-cs .band::after{height:72px;opacity:1;background:
  radial-gradient(58% 120% at 16% 100%,#25365f 60%,transparent 61%),
  radial-gradient(54% 104% at 84% 100%,#1c2c55 60%,transparent 61%),
  linear-gradient(transparent 64%,var(--menu-1) 64%)}
.pg-cs .band-grid{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-items:center}
.pg-cs .band-copy{min-width:0}
.pg-cs .band h1{margin:12px 0 8px;max-width:640px}
.pg-cs .band .lede{max-width:600px;margin:0 0 12px;color:#e7e9ff;font-size:15.5px}
.pg-cs .band-art{display:none}
.pg-cs .badge-fan{position:relative;width:340px;height:260px}
.pg-cs .badge-fan img{position:absolute;object-fit:contain;filter:drop-shadow(0 14px 22px rgba(8,12,30,.45))}
.pg-cs .badge-fan img:nth-child(1){left:6px;top:64px;width:140px;height:140px;transform:rotate(-12deg);opacity:.92}
.pg-cs .badge-fan img:nth-child(2){right:6px;top:64px;width:140px;height:140px;transform:rotate(12deg);opacity:.92}
.pg-cs .badge-fan img:nth-child(3){left:50%;top:20px;width:190px;height:190px;transform:translateX(-50%)}
@media (min-width:900px){
  .pg-cs .band-grid{grid-template-columns:minmax(0,1fr) 360px}
  .pg-cs .band-art{display:grid;place-items:center}
}
@media (min-width:1024px){.pg-cs .band{padding:48px 0 120px}}

/* Search panel (homepage component), clan tab first */
.pg-cs .search-panel{margin-top:6px;max-width:520px}
.pg-cs .sp-body[data-mode="player"] .clan-only{display:none}
.pg-cs .sp-help a,.pg-cs .sp-help button{min-height:44px;display:inline-flex;align-items:center}

/* ---------- Body ---------- */
.pg-cs .pg-body{padding:0 0 56px}
.pg-cs .lift{position:relative;z-index:2;margin-top:-64px}
@media (min-width:1024px){.pg-cs .lift{margin-top:-84px}.pg-cs .pg-body{padding-bottom:84px}}
.pg-cs .card{background:var(--card);border-radius:20px;box-shadow:var(--soft);padding:14px;color:var(--stone-ink)}
@media (min-width:768px){.pg-cs .card{padding:18px}}
.pg-cs .eyb{display:block;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--stone-mute)}
.pg-cs .muted{color:var(--stone-mute)}
.pg-cs .btn-line{--c1:#fff;--c2:#fff;color:var(--stone-ink);text-shadow:none;box-shadow:inset 0 0 0 1.5px var(--card-line),0 1px 2px rgba(8,12,30,.08)}
.pg-cs .btn-soft{--c1:var(--card-2);--c2:var(--card-2);color:var(--stone-ink);text-shadow:none;box-shadow:none}
.pg-cs .btn-soft:hover{filter:brightness(.97)}
.pg-cs .btn.wide{width:100%}

/* Results board */
.pg-cs .board{padding:14px}
@media (min-width:1024px){.pg-cs .board{padding:20px}}
.pg-cs .res-top{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:8px 16px;margin:2px 2px 14px}
.pg-cs .res-top h2{margin:2px 0 0;font:800 22px/1.2 "Nunito",sans-serif;color:var(--stone-ink)}
.pg-cs .res-top p{margin:2px 0 0;font-size:14px}
.pg-cs .res-top .snapshot{padding:5px 10px;border-radius:999px;background:var(--card-2);font-size:12.5px;font-weight:800;color:var(--stone-mute)}
.pg-cs .res-top .snapshot time{font-variant-numeric:tabular-nums}

/* Clan tiles: rank order runs across each desktop row. */
.pg-cs .cs-rows{display:grid;grid-template-columns:minmax(0,1fr);gap:4px}
.pg-cs .cs-rows > li{min-width:0;margin:0;padding-right:4px;gap:0;border-radius:12px;background:#fff}
.pg-cs .cs-rows > li:has(> .row.top1){background:linear-gradient(90deg,#fff4cc,#fff 65%);box-shadow:inset 0 0 0 1px #f0d77a}
.pg-cs .cs-rows > li:hover{box-shadow:inset 0 0 0 1.5px var(--blue-2)}
.pg-cs .cs-rows .row,.pg-cs .cs-rows .row.top1{background:none;box-shadow:none}
.pg-cs .cs-rows > li.is-more{display:none}
.pg-cs .cs-rows > li[hidden]{display:none}
@media (min-width:1024px){.pg-cs .cs-rows{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:10px}}
.pg-cs .row:focus-visible{outline:3px solid var(--blue-2);outline-offset:2px}
.pg-cs .row.norank{grid-template-columns:44px minmax(0,1fr) auto}
.pg-cs .row .who{min-width:0}
.pg-cs .row .who .n,.pg-cs .row .who .s{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pg-cs .row .who .n{unicode-bidi:plaintext}
.pg-cs .chg.new{color:var(--blue-2)}
@media (max-width:599px){
  .pg-cs .row{grid-template-columns:30px 40px minmax(0,1fr) auto;gap:8px;padding:8px 10px 8px 4px}
  .pg-cs .row.norank{grid-template-columns:40px minmax(0,1fr) auto;padding-left:10px}
  .pg-cs .row .badge{width:40px;height:40px}
  .pg-cs .row .rk{width:30px;height:30px}
  .pg-cs .row .stat{flex-direction:column;align-items:flex-end;gap:1px}
  .pg-cs .row .xtra{display:none}
  .pg-cs .row .chg{min-width:0;font-size:11.5px;line-height:1.1}
  .pg-cs .row .pts{font-size:15px}
  .pg-cs .row .pts img{width:17px;height:17px}
}
@media (min-width:600px){.pg-cs .row .pts{min-width:100px;justify-content:flex-end}.pg-cs .row .xtra .mem{min-width:48px}}
.pg-cs .board-foot small{font-weight:700;color:var(--stone-mute)}
.pg-cs .rk-acts{display:flex;flex-wrap:wrap;gap:8px}
.pg-cs .rk-acts .btn[hidden]{display:none}

/* Optional table filters (table(rows,{filters:true})) */
.pg-cs .table-filters{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin:0 0 12px;align-items:end}
@media (min-width:700px){.pg-cs .table-filters{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto}}
.pg-cs .fld{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0}
.pg-cs .fld > span:first-child{font-size:13px;font-weight:800;color:var(--stone-mute)}
.pg-cs .inp{display:flex;align-items:center;min-height:48px;padding:0 6px 0 12px;background:#fff;border:1.5px solid #cfc8b8;border-radius:12px}
.pg-cs .inp:focus-within{border-color:var(--blue-2);box-shadow:0 0 0 3px rgba(42,139,224,.2)}
.pg-cs .inp input,.pg-cs .inp select{flex:1 1 auto;min-width:0;width:100%;height:45px;border:0;outline:0;background:transparent;font:800 16px "Nunito",sans-serif;color:var(--stone-ink)}

/* States: empty, error, saved empty */
.pg-cs .state{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:28px 18px 26px;border-radius:16px;background:#fff;border:1.5px dashed var(--stone-3);color:var(--stone-ink)}
.pg-cs .state[hidden]{display:none}
.pg-cs .state > img{width:64px;height:64px;object-fit:contain}
.pg-cs .state h3{margin:4px 0 0;font:800 18px/1.3 "Nunito",sans-serif;color:var(--stone-ink)}
.pg-cs .state p{margin:0;max-width:460px;color:var(--stone-mute);font-size:15px}
.pg-cs .state .data-notice{margin:0;color:#5a3d00}
.pg-cs .state .acts{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:8px}
.pg-cs .state.warn{border-color:#ecd9a4;background:#fffaf0}
.pg-cs .tips{margin:6px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:4px;font-size:14px;color:var(--stone-mute)}
.pg-cs .board > .data-notice,.pg-cs .cs-ranking > .data-notice{margin:0 0 12px}

/* Saved profiles (cards rendered by app.js: a.saved-card > .eyebrow + h3 + p) */
.pg-cs .cs-saved{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.pg-cs .cs-saved:empty{display:none}
.pg-cs .cs-saved .saved-card{position:relative;display:flex;flex-direction:column;justify-content:center;gap:2px;width:100%;min-height:72px;padding:12px 44px 12px 14px;border-radius:14px;border:0;background:#fff;box-shadow:none;text-decoration:none;color:var(--stone-ink)}
.pg-cs .cs-saved .saved-card::after{content:"";position:absolute;right:16px;top:50%;width:9px;height:9px;border-right:2.5px solid var(--stone-3);border-top:2.5px solid var(--stone-3);transform:translateY(-50%) rotate(45deg)}
.pg-cs .cs-saved .saved-card:hover{box-shadow:inset 0 0 0 1.5px var(--blue-2)}
.pg-cs .cs-saved .saved-card .eyebrow{display:block;padding:0;border:0;border-radius:0;background:none;color:var(--stone-mute);font-size:11.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.pg-cs .cs-saved .saved-card h3{margin:0;font:800 17px/1.2 "Nunito",sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;unicode-bidi:plaintext}
.pg-cs .cs-saved .saved-card p{margin:0;font-size:13px;font-weight:800;color:var(--stone-mute);letter-spacing:.03em}
@media (min-width:700px){.pg-cs .cs-saved{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1024px){.pg-cs .cs-saved{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* ---------- Sections on the navy page ---------- */
.pg-cs .pg-sec{padding:8px 0 56px}
@media (min-width:1024px){.pg-cs .pg-sec{padding:16px 0 84px}}
.pg-cs .pg-sec .sec-head{margin-bottom:20px}
.pg-cs .pg-sec .sec-head p{max-width:680px;margin-left:auto;margin-right:auto}

/* ---------- WarPickr (3-step card from the clan page design) ---------- */
.pg-cs .wp{padding:0;overflow:hidden}
.pg-cs .wp-head{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;padding:16px;background:linear-gradient(160deg,#2c4382,#1b2a58);color:#fff}
.pg-cs .wp-head .plate{flex:0 0 56px;width:56px;height:56px;background:linear-gradient(#b48cff,#6b3fc8)}
.pg-cs .wp-head .plate img{width:40px;height:40px}
.pg-cs .wp-head h3{margin:0;font:800 20px/1.15 "Nunito",sans-serif}
.pg-cs .wp-head p{margin:2px 0 0;font-size:14px;color:#c9d3ee}
.pg-cs .wp-head p,.pg-cs .wp-head .saved-note{grid-column:1 / -1}
.pg-cs .wp-head .saved-note{justify-self:start;display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.1);font-size:12px;font-weight:800;color:#dfe6fb;white-space:nowrap}
.pg-cs .wp-head > div{min-width:0}
.pg-cs .wp-steps{display:grid;grid-template-columns:minmax(0,1fr)}
.pg-cs .step{padding:16px;border-top:1px solid var(--card-line);min-width:0}
.pg-cs .step:first-child{border-top:0}
.pg-cs .step-h{display:flex;align-items:center;gap:10px;margin:0 0 10px;font:800 16.5px/1.2 "Nunito",sans-serif;color:var(--stone-ink)}
.pg-cs .step-h .num{flex:0 0 30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--gold-2);color:#2a1a00;font-size:15px}
.pg-cs .step-h small{margin-left:auto;font-size:12px;color:var(--stone-mute);font-weight:800}
.pg-cs .c-note{margin:10px 0 0;font-size:12.5px;color:var(--stone-mute)}
.pg-cs .field{display:flex;flex-direction:column;gap:5px;margin-bottom:10px}
.pg-cs .field label{font-size:13px;font-weight:800;color:var(--stone-mute)}
.pg-cs .field > input,.pg-cs .field textarea{width:100%;min-height:46px;padding:10px 12px;border-radius:12px;border:1.5px solid #cfc8b8;background:#fff;font:800 16px "Nunito",sans-serif;color:var(--stone-ink)}
.pg-cs .field textarea{font:600 13px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;resize:vertical;min-height:96px}
.pg-cs .field > input:focus,.pg-cs .field textarea:focus{outline:0;border-color:var(--blue-2);box-shadow:0 0 0 3px rgba(42,139,224,.2)}
.pg-cs .btn-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.pg-cs .btn-row .btn{flex:1 1 auto}
.pg-cs details.acc{border-radius:14px;background:#fff;margin-top:12px}
.pg-cs details.acc > summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:56px;padding:8px 12px;cursor:pointer;font-weight:800;color:var(--stone-ink)}
.pg-cs details.acc > summary::-webkit-details-marker{display:none}
.pg-cs details.acc > summary .t{min-width:0}
.pg-cs details.acc > summary .t b{display:block;font-size:14.5px}
.pg-cs details.acc > summary .t small{display:block;font-size:12px;color:var(--stone-mute)}
.pg-cs details.acc > summary .pm{flex:0 0 28px;height:28px;margin-left:auto;border-radius:9px;background:var(--card-2);display:grid;place-items:center;transition:transform .2s}
.pg-cs details.acc > summary .pm svg{width:11px;height:11px}
.pg-cs details.acc[open] > summary .pm{transform:rotate(45deg)}
.pg-cs details.acc > .in{padding:0 12px 12px}
.pg-cs .wp-status{margin:10px 0 0;padding:9px 12px;border-radius:12px;background:#fff;font-size:13.5px;font-weight:800;color:var(--stone-ink)}
.pg-cs .wp-status.err{background:#fff0ec;color:var(--red-dk)}
.pg-cs .wp-status.ok{background:#eef8e4;color:#2a6a0c}
.pg-cs .wars-in{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.pg-cs .wars-in:empty{display:none}
.pg-cs .wars-in span{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:#fff;font-size:12px;font-weight:800;color:var(--stone-ink);box-shadow:inset 0 0 0 1px var(--card-line)}
.pg-cs .wars-in em{font-style:normal;color:var(--stone-mute)}
.pg-cs .stepper{display:inline-flex;align-items:center;align-self:flex-start;border-radius:14px;background:#fff;box-shadow:inset 0 0 0 1.5px #cfc8b8;overflow:hidden}
.pg-cs .stepper button{width:48px;min-height:52px;border:0;background:transparent;font:800 22px/1 "Nunito",sans-serif;color:var(--stone-ink);cursor:pointer}
.pg-cs .stepper button[hidden]{display:none}
.pg-cs .stepper button:hover{background:var(--card-2)}
.pg-cs .stepper input{width:64px;min-height:52px;border:0;border-left:1px solid var(--card-line);border-right:1px solid var(--card-line);text-align:center;font:800 22px "Nunito",sans-serif;color:var(--stone-ink);background:transparent;-moz-appearance:textfield;appearance:textfield}
.pg-cs .stepper input::-webkit-outer-spin-button,.pg-cs .stepper input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.pg-cs .copy-q{margin:0 0 10px;padding:10px 12px;border-left:3px solid var(--gold-2);border-radius:0 12px 12px 0;background:#fff;font-size:14px;color:var(--stone-ink)}
.pg-cs .c-state{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:26px 16px;border-radius:16px;background:#fff;border:1px dashed var(--card-line);color:var(--stone-ink)}
.pg-cs .c-state[hidden],.pg-cs .wp-table[hidden]{display:none}
.pg-cs .c-state img{width:52px;height:52px;object-fit:contain;opacity:.9}
.pg-cs .c-state h4{margin:4px 0 0;font:800 17px/1.25 "Nunito",sans-serif}
.pg-cs .c-state p{margin:0;max-width:440px;font-size:14px;color:var(--stone-mute)}


@media (min-width:900px){
  .pg-cs .wp-head{display:flex;padding:20px 24px}
  .pg-cs .wp-head .saved-note{margin-left:auto;align-self:center}
  .pg-cs .wp-steps{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)}
  .pg-cs .step{padding:20px 24px}
  .pg-cs .step.s2{border-top:0;border-left:1px solid var(--card-line)}
  .pg-cs .step.s3{grid-column:1 / -1}
}

/* ---------- Editorial feature cards ---------- */
.pg-cs .feat-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;max-width:1100px;margin:0 auto}
.pg-cs .feat{display:flex;gap:14px;align-items:flex-start;padding:16px;border-radius:18px;background:var(--card);box-shadow:var(--soft)}
.pg-cs .feat .plate{flex:0 0 52px;width:52px;height:52px;border-radius:14px}
.pg-cs .feat .plate img{width:36px;height:36px}
.pg-cs .feat h3{margin:2px 0 4px;font:800 17px/1.25 "Nunito",sans-serif;color:var(--stone-ink)}
.pg-cs .feat p{margin:0;font-size:14.5px;color:var(--stone-mute)}
.pg-cs .plate.p-blue{background:linear-gradient(#86d4ff,#2a8be0)}
.pg-cs .plate.p-green{background:linear-gradient(#b3ee62,#4caf1f)}
@media (min-width:700px){.pg-cs .feat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pg-cs .feat{flex-direction:column}}
@media (min-width:1000px){.pg-cs .feat-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.pg-cs .feat{grid-column:span 2}.pg-cs .feat:nth-child(4),.pg-cs .feat:nth-child(5){grid-column:span 3}}

@media (prefers-reduced-motion:reduce){.pg-cs details.acc > summary .pm{transition:none}}

/* Hero: copy left, badge fan right, the site search (public/css/lookup.css) spans the row underneath */
.pg-cs .band-grid > .lookup{grid-column:1 / -1;margin-top:4px}
@media (min-width:768px){
  .pg-cs .band-grid{grid-template-columns:minmax(0,1fr) 260px;row-gap:24px;align-items:end}
  .pg-cs .band-art{display:grid;place-items:end center}
  .pg-cs .badge-fan{transform:scale(.72);transform-origin:50% 100%;margin:-60px 0 -40px}
  .pg-cs .band .lede{max-width:680px;margin-bottom:0}
}
@media (min-width:1024px){.pg-cs .band-grid{grid-template-columns:minmax(0,1fr) 300px}.pg-cs .badge-fan{transform:scale(.8)}}

/* WarPickr pointer card (the tool lives on /warpickr) */
.pg-cs .wp-teaser{display:grid;grid-template-columns:56px minmax(0,1fr);gap:12px 14px;align-items:center;max-width:1100px;margin:0 auto;padding:16px;border-radius:20px;text-decoration:none;color:var(--stone-ink)}
.pg-cs .wp-teaser .plate{width:56px;height:56px;border-radius:16px;background:linear-gradient(#b48cff,#6b3fc8);display:grid;place-items:center}
.pg-cs .wp-teaser .plate img{width:40px;height:40px}
.pg-cs .wp-teaser .eyb{display:block;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--stone-mute)}
.pg-cs .wp-teaser h2{margin:2px 0 4px;font:800 19px/1.2 "Nunito",sans-serif}
.pg-cs .wp-teaser .wpt-text{display:block;font-size:14.5px;color:var(--stone-mute)}
.pg-cs .wp-teaser .wpt-go{grid-column:1 / -1;justify-content:center}
.pg-cs .wp-teaser .wpt-go svg{width:13px;height:13px}
.pg-cs .wp-teaser:hover h2{color:var(--blue-dk)}
@media (min-width:768px){.pg-cs .wp-teaser{grid-template-columns:56px minmax(0,1fr) auto;padding:20px 24px}.pg-cs .wp-teaser .wpt-go{grid-column:auto}}

/* Sky fades straight into the navy page, same as /player: no hill silhouettes with hard edges */
.pg-cs .band::after{height:160px;background:linear-gradient(180deg,rgba(19,34,71,0) 0%,rgba(19,34,71,.55) 45%,var(--menu-1) 100%)}
.pg-cs .band + .menu-bg{background:linear-gradient(180deg,var(--menu-1),var(--menu-2) 900px)}
