/* ===== Kickwise: news page (news.html), article pages (news/<sport>/<slug>/) and editorial.html =====
   Uses the tokens of assets/styles.css. Shapes: pills for buttons and chips, 14px cards (--radius),
   9px for small covers (--radius-sm). */

/* ---------- Our cover: competition, main names in display type, centre-circle lines (no photos) ---------- */
.poster {
  --pitch: color-mix(in srgb, var(--accent) 26%, transparent);
  position: relative; display: block; width: 100%; aspect-ratio: 21 / 9; overflow: hidden; isolation: isolate;
  container-type: size; border-radius: var(--radius); border: 1px solid var(--line); color: var(--chalk);
  background: radial-gradient(120% 140% at 0% 0%, var(--surface-2), var(--bg-2) 62%);
}
.poster-pitch { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at calc(100% - 15cqw) 50%, var(--pitch) 0 1.8cqh, transparent calc(1.8cqh + 1px)); }
.poster-pitch::before { content: ""; position: absolute; top: 50%; right: 15cqw; width: 88cqh; aspect-ratio: 1;
  transform: translate(50%, -50%); border: max(1px, .55cqh) solid var(--pitch); border-radius: 50%; }
.poster-pitch::after { content: ""; position: absolute; top: 0; bottom: 0; right: 15cqw; width: max(1px, .55cqh);
  transform: translateX(50%); background: var(--pitch); }
.poster-label { position: absolute; left: 5.5cqw; top: 9cqh; display: flex; align-items: center; gap: .5em; max-width: 78cqw;
  font: 700 clamp(10px, 4.8cqh, 20px)/1.1 var(--body); color: var(--accent); white-space: nowrap; }
.poster-label svg { width: 1.5em; height: 1.5em; flex: none; }
.poster-label span { overflow: hidden; text-overflow: ellipsis; }
.poster-names { position: absolute; left: 5.5cqw; right: 5.5cqw; bottom: 9cqh; display: flex; flex-direction: column;
  font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .9; letter-spacing: .01em;
  font-size: min(calc(160cqw / var(--len, 8)), calc(58cqh / var(--lines, 1)), 150px); }
.poster-names span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-bottom: .02em; }
.poster-names span:nth-child(2) { color: var(--accent); }
.poster-names span:nth-child(3) { color: var(--muted); }
/* Small covers (cards on phones): only the sport's icon */
@container (max-width: 110px) {
  .poster-names, .poster-label span { display: none; }
  .poster-label { inset: 0; max-width: none; justify-content: center; color: color-mix(in srgb, var(--accent) 70%, var(--muted)); }
  .poster-label svg { width: 38cqw; height: 38cqw; }
}

/* ---------- News page ---------- */
.news-hero { padding-bottom: 28px; }
.news-hero h1 { margin: 0 0 10px; }
.news-hero .lead { margin: 0; }
.updated { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg-2); font-size: 14px; color: var(--muted); white-space: nowrap; }
.updated b { color: var(--text); font-weight: 600; }
/* A real freshness signal: green while the feed is fresh, amber when nothing new for 6 hours */
.updated .state { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.updated.stale .state { background: var(--warn); }

.tabs-bar { position: sticky; top: 64px; z-index: 15; background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 40px; padding: 0 16px 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s; }
.tab svg { width: 20px; height: 20px; flex: none; }
.tab:hover { color: var(--text); border-color: var(--muted); }
.tab[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "main side"; gap: 28px;
  align-items: start; padding-top: 32px; padding-bottom: 96px; }
.news-side { grid-area: side; position: sticky; top: 140px; }
.news-main { grid-area: main; min-width: 0; }
.news-side .panel h2 { margin: 24px 0 12px; }

.search { position: relative; display: block; }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 44px; padding: 0 16px 0 40px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 15px; transition: border-color .15s; }
.search input:hover { border-color: var(--muted); }
.search input:focus { border-color: var(--accent); outline: none; }
.search input::placeholder { color: var(--muted); }

.comp-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -10px; }
.comp { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-size: 14px; font-weight: 500;
  text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.comp:hover { color: var(--text); background: var(--bg-2); }
.comp small { font-size: 12px; font-variant-numeric: tabular-nums; }
.comp[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.comp[aria-pressed="true"] small { opacity: .7; }
.comp:disabled { opacity: .4; cursor: default; background: transparent; color: var(--muted); }
.side-note { margin: 14px 4px 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.side-note a { color: var(--text); text-underline-offset: 3px; }

.feed-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; margin-bottom: 14px; }
.feed-head p { margin: 0; font-size: 14px; color: var(--muted); }
.feed { display: flex; flex-direction: column; gap: 12px; }
.fresh { position: sticky; top: 136px; z-index: 5; display: flex; margin: 0 auto 12px; box-shadow: 0 10px 30px -8px rgba(0,0,0,.6); }

.story { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 24px; padding: 18px 18px 18px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, background .15s; }
.story:hover { border-color: var(--line-strong); background: color-mix(in srgb, var(--surface) 70%, var(--surface-2)); }
.story:focus-within { border-color: var(--accent); }
.story .kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 8px; min-height: 18px;
  font-size: 13px; font-weight: 600; color: var(--accent); }
.story .kicker svg { width: 17px; height: 17px; margin-right: -3px; }
.story .kicker .sport { color: var(--text); }
.story h3 { margin: 0 0 6px; font-size: 19.5px; font-weight: 600; line-height: 1.3; text-wrap: pretty; overflow-wrap: anywhere; }
.story h3 a { text-decoration: none; transition: color .15s; }
.story h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }   /* the whole card is the link */
.story h3 a:focus-visible { outline: none; }
.story:hover h3 a { color: var(--accent); }
.story .dek { margin: 0 0 12px; color: var(--muted); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; font-size: 13px; color: var(--muted); }
.story .meta time { position: relative; z-index: 1; cursor: help; }   /* above the card link: the exact time shows on hover */
.story .test { color: var(--warn); font-weight: 700; }
.story .thumb { align-self: start; }
.story .thumb .poster { aspect-ratio: 3 / 2; border-radius: var(--radius-sm); }

/* The newest story, when no filter is on: bigger, cover first */
.story.featured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 0; overflow: hidden; gap: 0; }
.story.featured .thumb { order: -1; align-self: stretch; }
.story.featured .thumb .poster { aspect-ratio: auto; height: 100%; min-height: 260px; border: 0; border-radius: 0; }
.story.featured .story-text { padding: 26px 28px; align-self: center; }
.story.featured h3 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 2.8vw, 38px); line-height: 1.02; margin-bottom: 12px; }
.story.featured .dek { -webkit-line-clamp: 4; font-size: 16px; }

.story.sk { pointer-events: none; }
.story.sk .ln { height: 12px; border-radius: 6px; background: var(--line); margin-top: 10px; }
.story.sk .ln.t { height: 18px; margin-top: 0; }
.story.sk .ph { aspect-ratio: 3 / 2; border-radius: var(--radius-sm); background: var(--bg-2); }
.notice { text-align: center; padding: 44px 24px; }
.notice b { display: block; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; margin-bottom: 10px; }
.notice p { margin: 0 auto 18px; max-width: 46ch; color: var(--muted); }
.notice .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.more { display: flex; margin: 20px auto 0; }

@media (max-width: 920px) {
  .news-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "main"; gap: 8px; padding-top: 18px; }
  .news-side { position: static; }
  .news-side .panel { background: transparent; border: 0; padding: 0; }
  .news-side .panel h2 { display: none; }
  .search { margin-bottom: 10px; }
  .comp-list { flex-direction: row; gap: 8px; overflow-x: auto; margin: 0 -24px 10px; padding: 0 24px 2px; scrollbar-width: none; }
  .comp-list::-webkit-scrollbar { display: none; }
  .comp { width: auto; flex: none; height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; white-space: nowrap; font-size: 13.5px; }
  .comp[aria-pressed="true"] { border-color: var(--accent); }
  .comp:disabled { display: none; }
  .side-note { display: none; }
  .fresh { top: 130px; }
  .story.featured { grid-template-columns: minmax(0, 1fr); }
  .story.featured .thumb .poster { aspect-ratio: 16 / 9; height: auto; min-height: 0; }
  .story.featured .story-text { padding: 18px 20px 20px; }
}
@media (max-width: 640px) {
  .tab { height: 36px; padding: 0 14px 0 10px; font-size: 13.5px; }
}
@media (max-width: 600px) {
  .comp-list { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .story { grid-template-columns: minmax(0, 1fr) 92px; gap: 14px; padding: 14px; }
  .story h3 { font-size: 16.5px; }
  .story .dek { font-size: 14px; margin-bottom: 10px; }
  .story .thumb .poster { aspect-ratio: 1; }
  .story.featured { padding: 0; }
  .story.featured h3 { font-size: 27px; }
  .game-hero .meta-pills { width: 100%; }
  .news-hero .lead { font-size: 16px; }
}

/* ---------- Article page ---------- */
.art { padding-top: 30px; }
.test-flag { margin: 0 0 22px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14.5px; color: var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0 0 24px; padding: 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--line-strong); }
.crumbs a { text-decoration: none; transition: color .15s; }
.crumbs a:hover { color: var(--text); }
.art-head { max-width: 920px; }
.art-title { margin: 0 0 18px; font-family: var(--display); font-weight: 800; font-size: clamp(38px, 5.2vw, 66px);
  line-height: 1; letter-spacing: .004em; text-wrap: balance; overflow-wrap: anywhere; }
.art-dek { margin: 0 0 22px; max-width: 60ch; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.byline { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0 0 30px; font-size: 14px; color: var(--muted); }
.byline b { color: var(--text); font-weight: 600; }
.art-cover { margin: 0 0 44px; }

.art-grid { display: grid; grid-template-columns: minmax(0, 680px) minmax(260px, 320px); justify-content: space-between;
  grid-template-areas: "body side" "foot side"; gap: 8px 64px; align-items: start; }
.art-body { grid-area: body; font-size: 18.5px; line-height: 1.72; color: color-mix(in srgb, var(--text) 90%, var(--muted)); }
.art-body p { margin: 0 0 1.15em; text-wrap: pretty; overflow-wrap: break-word; }
.art-body p:first-child { color: var(--text); font-size: 1.07em; }
.art-side { grid-area: side; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.art-foot { grid-area: foot; padding-top: 22px; border-top: 1px solid var(--line); }

.facts, .game-cta { border-radius: var(--radius); padding: 22px; }
.facts { background: var(--surface); border: 1px solid var(--line); padding-bottom: 8px; }
.facts h2, .game-cta h2, .more-news h2, .sources h2 { margin: 0 0 14px; font-family: var(--display); font-weight: 800;
  font-size: 26px; line-height: 1; letter-spacing: .01em; }
.facts ul { list-style: none; margin: 0; padding: 0; }
.facts li { position: relative; padding: 0 0 14px 20px; font-size: 15.5px; line-height: 1.5; }
.facts li::before { content: ""; position: absolute; left: 0; top: .7em; width: 9px; height: 2px; background: var(--accent); }
.game-cta { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.game-cta p { margin: 0 0 16px; font-size: 14.5px; color: var(--muted); }

.made-by { margin: 0 0 26px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.made-by a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.made-by a:hover { text-decoration-color: currentColor; }
.sources h2 { font-size: 20px; color: var(--muted); }
.sources ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.sources li { break-inside: avoid; padding: 0 0 8px; font-size: 14px; color: var(--muted); }
.sources a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.sources a:hover { text-decoration-color: currentColor; }
.sources time { display: block; font-size: 12.5px; }

.more-news { margin-top: 56px; padding-bottom: 88px; }
.more-news > h2 { padding-top: 44px; border-top: 1px solid var(--line); }
.more-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 36px; }
.more-item a { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px 0; text-decoration: none; }
.more-thumb .poster { aspect-ratio: 3 / 2; border-radius: var(--radius-sm); }
.more-text b { display: block; margin-bottom: 4px; font-size: 16px; font-weight: 600; line-height: 1.35; transition: color .15s;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more-text time { font-size: 13px; color: var(--muted); }
.more-item a:hover b { color: var(--accent); }

@media (max-width: 920px) {
  .art-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; gap: 0; }
  .art-side { display: contents; }               /* key facts before the text, the game after the sources */
  .art-body, .art-foot, .facts, .game-cta { grid-area: auto; }
  .facts { order: 1; margin-bottom: 30px; }
  .art-body { order: 2; }
  .art-foot { order: 3; }
  .game-cta { order: 4; margin-top: 28px; }
  .art-cover { margin-bottom: 28px; }
  .art-cover .poster { aspect-ratio: 16 / 9; }
  .more-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .art { padding-top: 20px; }
  .art-title { font-size: clamp(34px, 9.4vw, 44px); }
  .art-dek { font-size: 17.5px; }
  .art-body { font-size: 17.5px; line-height: 1.68; }
  .sources ul { columns: 1; }
  .more-item a { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; }
  .more-thumb .poster { aspect-ratio: 1; }
}

/* ---------- Editorial page ---------- */
.ed { padding-top: 48px; padding-bottom: 96px; }
.ed-head { max-width: 860px; margin-bottom: 48px; }
.ed-head h1 { font-size: clamp(48px, 7vw, 88px); margin: 0 0 18px; }
.ed-head .lead { margin: 0; }
.ed-grid { display: grid; grid-template-columns: minmax(0, 680px) minmax(240px, 320px); justify-content: space-between; gap: 48px 64px; align-items: start; }
.ed-text section + section { margin-top: 44px; }
.ed-text h2 { margin: 0 0 12px; font-family: var(--display); font-weight: 800; font-size: clamp(28px, 3vw, 36px); line-height: 1; }
.ed-text p, .ed-text li { font-size: 17.5px; line-height: 1.7; color: color-mix(in srgb, var(--text) 90%, var(--muted)); }
.ed-text p { margin: 0 0 1em; }
.ed-text ul { margin: 0 0 1em; padding-left: 20px; }
.ed-text li + li { margin-top: 6px; }
.ed-text li::marker { color: var(--accent); }
.ed-numbers { position: sticky; top: 88px; margin: 0; padding: 8px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ed-numbers div { padding: 16px 0; }
.ed-numbers div + div { border-top: 1px solid var(--line); }
.ed-numbers dt { font-size: 14px; color: var(--muted); }
.ed-numbers dd { margin: 2px 0 0; font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.05; }
.ed-numbers dd small { font-family: var(--body); font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 6px; }
@media (max-width: 920px) {
  .ed-grid { grid-template-columns: minmax(0, 1fr); }
  .ed-numbers { position: static; order: -1; display: grid; grid-template-columns: 1fr 1fr; padding: 4px 18px; }
  .ed-numbers div:nth-child(2) { border-top: 0; }
  .ed-numbers dd { font-size: 28px; }
}
@media (max-width: 600px) { .ed { padding-top: 32px; } .ed-text p, .ed-text li { font-size: 16.5px; } }

/* Share button under an article byline */
.art-share { margin: 12px 0 0; }
.art-share .kw-ico { width: 16px; height: 16px; }
