/* Chart pages only (/charts...). Loaded after landing.css and uses its
   colours and fonts; landing.css itself stays the app's file, unchanged.
   Sizes, colours and spacing follow Kay's approved mock-up (job 4760):
   phone first, then the desktop rows and the number 1 feature card. */
.ch{padding:28px 0 40px}
.ch-in{display:flex;flex-direction:column;gap:26px}
.ch-in>*{min-width:0}
.ch-hero{display:flex;flex-direction:column;gap:14px}
.ch-kicker{margin:0;font:700 13px/1.3 var(--sans);letter-spacing:.08em;text-transform:uppercase;color:var(--purple)}
.ch h1{margin:0;font:400 36px/1.14 var(--display);letter-spacing:.01em;text-transform:uppercase;color:var(--fg);overflow-wrap:anywhere}
.ch-hi{color:var(--purple)}
.ch-week{margin:0;font:600 15px/1.4 var(--sans);color:var(--fg)}
.ch-copy{margin:0;font-size:16px;line-height:1.6;color:#3D3550;max-width:760px}
.ch-h2{margin:0;font:400 28px/1.1 var(--display);letter-spacing:.01em;text-transform:uppercase;color:var(--fg)}

/* sport chips: one row that scrolls sideways on a phone */
.ch-chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -20px;padding:0 20px;-webkit-overflow-scrolling:touch}
.ch-chips::-webkit-scrollbar{display:none}
.ch-chiprow{display:flex;flex-wrap:wrap;gap:8px}
.ch-chip{flex:none;font:600 14px/1.2 var(--sans);text-decoration:none;padding:9px 14px;border-radius:999px;white-space:nowrap;
  background:var(--panel);color:var(--purple);border:1px solid var(--field)}
.ch-chip:hover{border-color:var(--purple)}
.ch-chip-on,.ch-chip-on:hover{background:var(--purple);color:#FFFFFF;border-color:var(--purple)}

/* tabs */
.ch-tabs{display:flex;gap:4px;background:var(--panel);border:1px solid var(--field);border-radius:14px;padding:4px}
.ch-tab{flex:1 1 0;min-width:0;display:flex;align-items:center;justify-content:center;text-align:center;
  font:700 13px/1.2 var(--sans);text-decoration:none;padding:11px 6px;border-radius:10px;color:var(--purple);white-space:nowrap}
@media (max-width:480px){.ch-tabs{gap:2px;padding:3px}.ch-tab{font-size:12px;padding:10px 3px;letter-spacing:-.01em}}
.ch-tab-on,.ch-tab-on:hover{background:var(--purple);color:#FFFFFF;box-shadow:0 2px 6px rgba(74,29,128,.25)}

/* week bar */
.ch-weekbar{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--panel);
  border:1px solid var(--line-2);border-radius:14px;padding:10px 12px;font:600 13px/1.3 var(--sans)}
.ch-weekbar a{text-decoration:none}
.ch-here{font-weight:700;color:var(--fg);text-align:center}
.ch-off{color:#A99BBF}
/* the week just closed, shown on the main page early in a week */
.ch-final{display:inline-block;vertical-align:middle;margin-left:6px;padding:3px 7px;border-radius:999px;
  background:var(--purple);color:#FFFFFF;font:700 11px/1 var(--sans);letter-spacing:.08em;text-transform:uppercase}
.ch-soon{margin:0;font:600 15px/1.4 var(--sans);color:var(--fg)}
.ch-hweek{margin:0;font:600 13px/1.3 var(--sans);color:var(--dim)}
.ch-wide{display:none}

.ch-meta{display:flex;align-items:center;justify-content:space-between;gap:8px 12px;flex-wrap:wrap;font:500 13px/1.4 var(--sans);color:var(--dim)}
.ch-meta a{font-weight:600}
.ch-empty{margin:0;font-size:17px;line-height:1.55;color:var(--fg)}

/* cards: phone */
.ch-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:12px}
.ch-card{display:grid;grid-template-columns:32px 96px minmax(0,1fr) auto;column-gap:12px;align-items:start;
  grid-template-areas:"rank pic info info" "tags tags tags tags" "buy buy buy go" "day day day day";
  background:var(--panel);border:1px solid var(--line-2);border-radius:18px;padding:14px;min-width:0}
.ch-card.ch-nopic{grid-template-columns:32px minmax(0,1fr) auto;
  grid-template-areas:"rank info info" "tags tags tags" "buy buy go" "day day day"}
.ch-top{border:2px solid var(--gold)}
.ch-rank{grid-area:rank;font:400 34px/1 var(--display);color:var(--fg)}
.ch-top .ch-rank{color:var(--purple)}
.ch-pic{grid-area:pic;width:96px;height:128px;object-fit:contain;border-radius:10px;background:#EFEAF6}
.ch-info{grid-area:info;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.ch-pill{display:none;background:var(--gold);color:var(--gold-ink);font:700 12px/1 var(--sans);letter-spacing:.06em;
  text-transform:uppercase;padding:6px 10px;border-radius:999px}
.ch-new{display:inline-block;background:#DDF3E4;color:#17603A;font:700 11px/1 var(--sans);letter-spacing:.08em;
  text-transform:uppercase;padding:5px 8px;border-radius:999px}
.ch-name{margin:0;font:700 18px/1.2 var(--sans);color:var(--fg);overflow-wrap:anywhere;max-width:100%}
.ch-name a{color:inherit;text-decoration:none}
.ch-name a:hover{color:var(--purple)}
.ch-title{margin:0;font:400 14px/1.4 var(--sans);color:#3D3550;overflow-wrap:anywhere;max-width:100%}
.ch-title-main{font:700 16px/1.3 var(--sans);color:var(--fg)}
.ch-who{margin:0;display:block;font:500 14px/1.4 var(--sans);color:var(--purple);overflow-wrap:anywhere;max-width:100%}
.ch-who span+span::before{content:" \00B7\00A0";color:var(--dim)}
.ch-day-in{color:var(--dim)}
.ch-who a{text-decoration:none}
.ch-who a:hover{text-decoration:underline}
.ch-tags{grid-area:tags;margin:12px 0 0;padding:0;list-style:none;display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.ch-tags li::first-letter{text-transform:uppercase}
.ch-tags li{font:600 12px/1.2 var(--sans);padding:4px 9px;border-radius:999px;background:#E9DDF7;color:var(--purple);overflow-wrap:anywhere}
.ch-buy{grid-area:buy;margin-top:12px;min-width:0;align-self:end}
.ch-price{margin:0;display:flex;flex-direction:column;gap:2px}
.ch-price-l{font:700 11px/1.2 var(--sans);letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}
.ch-price b{font:700 26px/1.1 var(--sans);color:var(--purple);overflow-wrap:anywhere}
.ch-where{margin:2px 0 0;font:500 13px/1.4 var(--sans);color:var(--dim);overflow-wrap:anywhere}
.ch-go{grid-area:go;align-self:end;justify-self:end;margin-top:12px;display:inline-flex;align-items:center;justify-content:center;
  height:44px;padding:0 18px;border-radius:12px;background:var(--purple);color:#FFFFFF;font:700 15px/1 var(--sans);
  text-decoration:none;white-space:nowrap}
.ch-go:hover{background:var(--purple-dk);color:#FFFFFF}
.ch-day{grid-area:day;margin:12px 0 0;font:400 13px/1.3 var(--sans);color:var(--dim)}

/* numbers 21 on: real pictures only, blurred, with the sign-up box over */
.ch-more{display:flex;flex-direction:column;gap:14px}
.ch-more-n{margin:-6px 0 0;font-size:15px;line-height:1.5;color:var(--dim)}
.ch-more-in{position:relative;min-height:560px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;
  padding:16px;border-radius:18px;overflow:hidden;border:1px solid var(--line-2);background:var(--panel)}
.ch-lock{position:absolute;inset:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:14px;padding:14px;
  filter:blur(9px);transform:scale(1.06);opacity:.85;user-select:none;-webkit-user-select:none;pointer-events:none}
.ch-more-in::after{content:"";position:absolute;inset:0;background:rgba(246,242,251,.55);pointer-events:none}
.ch-ghost{display:flex;flex-direction:column;gap:8px;padding:8px;border:1px solid var(--line-2);border-radius:12px;background:var(--panel)}
.ch-ghost img,.ch-ghost-pic{display:block;width:100%;height:auto;aspect-ratio:3/4;object-fit:cover;border-radius:8px;background:#E9E3F2}
.ch-ghost i{display:block;height:10px;width:80%;border-radius:5px;background:#E2DAEE}
.ch-ghost i+i{width:60%}
.ch-ghost i+i+i{width:40%;background:#D9CCEC}
.ch-ghost .ch-ghost-pic{width:100%;height:auto;border-radius:8px}
.ch-more-box{position:relative;z-index:1;width:100%;max-width:440px}
.ch-more-box .lp-box{gap:16px;padding:22px}
.ch-more-box .lp-box-title{font-size:30px}
.ch-more-box .lp-box-text{margin:0;font-size:15px;line-height:1.5;color:#3D3550}

.ch-share:empty{display:none}
.ch-mk{background:var(--panel);border:1px solid var(--field);border-radius:22px;padding:22px 16px;display:flex;flex-direction:column;gap:20px}
.ch-mk-in{display:flex;flex-direction:column;gap:12px;align-items:flex-start;min-width:0}
.ch-mk-pill{background:#E3B51B;color:#1B1524;font:700 12px/1 var(--sans);letter-spacing:.06em;padding:5px 10px;border-radius:999px}
.ch-mk-h{margin:0;font:400 28px/1.1 var(--display);letter-spacing:.01em;text-transform:uppercase;color:var(--fg)}
.ch-mk-p{margin:0;font:400 16px/1.55 var(--sans);color:#3D3550}
.ch-mk-btns{display:flex;flex-wrap:wrap;gap:10px;width:100%}
.ch-mk-btn{display:inline-flex;align-items:center;justify-content:center;height:46px;padding:0 16px;border-radius:12px;
  background:#FFFFFF;color:var(--purple);border:1.5px solid var(--purple);font:700 15px/1 var(--sans);text-decoration:none;text-align:center}
.ch-mk-btn:hover{background:#F6F1FC}
.ch-mk-pic{display:block;width:100%;max-width:340px;height:auto;border-radius:14px;border:1px solid var(--field);
  box-shadow:0 10px 24px rgba(74,29,128,.14);align-self:center}
@media (min-width:900px){.ch-mk{flex-direction:row;align-items:center;gap:36px;padding:28px 32px}
  .ch-mk-in{flex:1 1 0}.ch-mk-h{font-size:34px}.ch-mk-pic{flex:none;width:250px}}
.ch-morecharts{display:flex;flex-direction:column;gap:12px}

.ch-weeks{display:flex;flex-direction:column;gap:12px}
.ch-weeks ul{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;gap:8px}
.ch-weeks a{display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border-radius:999px;
  background:var(--panel);border:1px solid var(--field);font:600 14px/1 var(--sans);text-decoration:none}
.ch-weeks a:hover{border-color:var(--purple)}

/* /charts: one card per sport, the number 1 card's picture beside it */
.ch-home{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:1fr;gap:12px}
.ch-hcard{display:grid;grid-template-columns:96px minmax(0,1fr);column-gap:14px;row-gap:12px;align-items:start;
  grid-template-areas:"h h" "pic info" "links links";
  padding:16px;background:var(--panel);border:1px solid var(--line-2);border-radius:18px;
  box-shadow:0 6px 18px rgba(75,31,128,.08);min-width:0}
.ch-hcard.ch-nopic{grid-template-columns:minmax(0,1fr);grid-template-areas:"h" "info" "links"}
.ch-entry-h{grid-area:h;margin:0;font:400 24px/1.1 var(--display);text-transform:uppercase;letter-spacing:.01em}
.ch-entry{color:var(--purple);text-decoration:none}
.ch-entry:hover{text-decoration:underline}
.ch-hpic{grid-area:pic;width:96px;height:128px;object-fit:contain;border-radius:10px;background:#EFEAF6}
.ch-hinfo{grid-area:info;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.ch-hinfo .ch-pill{display:inline-block;font-size:11px;padding:5px 8px}
.ch-hname{margin:0;font:700 17px/1.2 var(--sans);color:var(--fg);overflow-wrap:anywhere;max-width:100%}
.ch-htitle{margin:0;font:400 14px/1.4 var(--sans);color:#3D3550;overflow-wrap:anywhere;max-width:100%}
.ch-hinfo .ch-price{margin-top:6px}
.ch-hinfo .ch-price b{font-size:22px}
.ch-hlinks{grid-area:links;display:flex;flex-wrap:wrap;gap:8px}
.ch-hlinks .ch-chip{font-size:13px;padding:8px 12px}
.ch-credit{border-top:1px solid var(--line-2);padding-top:16px;font-size:14px;line-height:1.5;color:var(--dim)}
.ch-credit p{margin:0 0 4px;overflow-wrap:anywhere}

@media (min-width:900px){
  .ch{padding:44px 0 56px}
  .ch-in{gap:28px}
  .ch h1{font-size:56px;line-height:1.06}
  .ch-copy{font-size:18px;line-height:1.55}
  .ch-chips{flex-wrap:wrap;overflow:visible;margin:0;padding:0}
  .ch-tabs{align-self:flex-start;min-width:520px}
  .ch-tab{font-size:15px;padding:12px 22px;white-space:nowrap}
  .ch-weekbar{padding:12px 18px;font-size:15px}
  .ch-meta{font-size:14px}
  .ch-wide{display:inline}

  /* numbers 2 to 20: one row each */
  .ch-list{gap:14px}
  .ch-card{grid-template-columns:41px 90px minmax(0,1fr) 210px auto;column-gap:22px;padding:16px 22px;
    grid-template-rows:1fr auto auto auto 1fr;
    grid-template-areas:"rank pic . buy go" "rank pic info buy go" "rank pic day buy go" "rank pic tags buy go" "rank pic . buy go"}
  .ch-card.ch-nopic{grid-template-columns:41px minmax(0,1fr) 210px auto;
    grid-template-areas:"rank . buy go" "rank info buy go" "rank day buy go" "rank tags buy go" "rank . buy go"}
  .ch-rank{align-self:center;font-size:44px}
  .ch-pic{align-self:center;width:90px;height:120px}
  .ch-info{gap:5px}
  .ch-name{font-size:20px}
  .ch-title{font-size:15px}
  .ch-day{margin-top:4px;font-size:14px}
  .ch-tags{margin-top:6px}
  .ch-buy{align-self:center;margin:0}
  .ch-price b{font-size:30px}
  .ch-go{align-self:center;margin:0}

  /* number 1: the large feature card */
  .ch-card.ch-top{grid-template-columns:220px auto minmax(0,1fr);column-gap:30px;padding:26px;border-radius:22px;
    box-shadow:0 12px 30px rgba(74,29,128,.10);grid-template-rows:1fr auto auto auto auto 1fr;
    grid-template-areas:"pic . ." "pic info info" "pic day day" "pic tags tags" "pic buy go" "pic . ."}
  .ch-card.ch-top.ch-nopic{grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto;
    grid-template-areas:"info info" "day day" "tags tags" "buy go"}
  .ch-top .ch-rank{display:none}
  .ch-top .ch-pic{width:220px;height:292px;border-radius:14px}
  .ch-top .ch-info{gap:10px}
  .ch-top .ch-pill{display:inline-block}
  .ch-top .ch-name{font:400 44px/1.05 var(--display);text-transform:uppercase;letter-spacing:.01em}
  .ch-top .ch-title{font-size:17px;line-height:1.45}
  .ch-top .ch-who{font-size:15px}
  .ch-top .ch-day{font-size:15px;color:var(--purple)}
  .ch-top .ch-tags{margin-top:10px}
  .ch-top .ch-buy{margin-top:18px;align-self:end}
  .ch-top .ch-price b{font-size:44px}
  .ch-top .ch-go{justify-self:start;align-self:end;margin:0 0 4px}

  .ch-more-in{min-height:600px}
  .ch-lock{grid-template-columns:repeat(4,minmax(0,1fr))}
  .ch-home{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
  .ch-hcard{grid-template-columns:120px minmax(0,1fr);padding:20px;column-gap:18px}
  .ch-hpic{width:120px;height:160px}
}

/* Desktop (1024px and up): chart pages use the full width of the window, with the
   same side margin for the header bar, the content and the footer. Scoped to
   body.ch-body so no other page moves. Phone and tablet are not touched. */
@media (min-width:1024px){
  .ch-body{--ch-m:clamp(40px,3vw,72px);--ch-pw:clamp(90px,6.5vw,150px);--ch-tw:clamp(220px,17vw,360px)}
  .ch-body .lp-wrap,.ch-body .lf-in{max-width:none;padding-left:var(--ch-m);padding-right:var(--ch-m)}
  .ch-copy{max-width:70ch}
  .ch-tabs{align-self:stretch;min-width:0}

  /* numbers 2 to 20: one long list, picture and text grow a little, price and button at the right end */
  .ch-card{grid-template-columns:48px var(--ch-pw) minmax(0,1fr) clamp(210px,15vw,280px) auto;column-gap:clamp(22px,2vw,40px);padding:18px clamp(22px,2vw,36px)}
  .ch-card.ch-nopic{grid-template-columns:48px minmax(0,1fr) clamp(210px,15vw,280px) auto}
  .ch-pic{width:var(--ch-pw);height:auto;aspect-ratio:3/4}
  .ch-buy{justify-self:end;text-align:right;width:100%}
  .ch-price{align-items:flex-end}
  .ch-name{font-size:clamp(20px,1.5vw,26px)}
  .ch-title{font-size:clamp(15px,1.1vw,17px)}

  /* number 1: full width gold card, price and button at the right end */
  .ch-card.ch-top:not(.ch-nopic){grid-template-columns:var(--ch-tw) minmax(0,1fr) clamp(210px,15vw,300px) auto;column-gap:clamp(30px,3vw,56px);
    grid-template-rows:1fr auto auto auto 1fr;
    grid-template-areas:"pic . buy go" "pic info buy go" "pic day buy go" "pic tags buy go" "pic . buy go"}
  .ch-card.ch-top.ch-nopic{grid-template-columns:minmax(0,1fr) clamp(210px,15vw,300px) auto;
    grid-template-areas:"info buy go" "day buy go" "tags buy go"}
  .ch-top .ch-pic{width:var(--ch-tw);height:auto;aspect-ratio:3/4}
  .ch-top .ch-buy{margin:0;align-self:center}
  .ch-top .ch-go{justify-self:end;align-self:center;margin:0}
  .ch-top .ch-name{font-size:clamp(44px,3.4vw,64px)}

  .ch-more-in{min-height:640px}
  .ch-more-box{max-width:480px}
  .ch-lock{grid-template-columns:repeat(6,minmax(0,1fr))}
  .ch-mk{padding:32px clamp(32px,3vw,56px);gap:clamp(36px,4vw,80px)}
  .ch-mk-p{max-width:70ch}
  .ch-mk-pic{width:clamp(250px,18vw,340px)}
  .ch-home{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ch-hcard{grid-template-columns:clamp(120px,9vw,160px) minmax(0,1fr)}
  .ch-hpic{width:clamp(120px,9vw,160px);height:auto;aspect-ratio:3/4}
}
@media (min-width:1500px){
  .ch-home{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* one tab only: a small pill at its natural width, left aligned, never a stretched bar */
.ch-tabs.ch-tabs-one{align-self:flex-start;min-width:0;width:auto;display:inline-flex;padding:3px;border-radius:999px}
.ch-tabs-one .ch-tab{flex:none;border-radius:999px;padding:9px 18px;font-size:14px;white-space:nowrap}
/* a card picture that fails to load: the frame goes, the row looks like the no-picture row (see charts.js) */
.ch-pic-failed{display:none}
