/* Wowplus News mobile reader. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #080b12;
  --surface: #0d111b;
  --subtle: #171d2a;
  --glass: rgba(13, 17, 27, .96);
  --text: #f6f3ec;
  --body: #d8dbe3;
  --muted: #a9b2c3;
  --edge: #3a3b42;
  --gold: #e3b36b;
  --accent: #e3b36b;
  --on-gold: #1a1304;
  --live: #b92140;
  --focus: #e3b36b;
  --serif: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --gutter: var(--space-4);
  --radius: 16px;
}

[data-theme="light"] {
  color-scheme: light;
  --page: #f5f1e8;
  --surface: #fffcf6;
  --subtle: #f0e8d9;
  --glass: rgba(255, 252, 246, .96);
  --text: #151a28;
  --body: #30374a;
  --muted: #554d41;
  --edge: #d9cbb7;
  --gold: #e3b36b;
  --accent: #64430d;
  --on-gold: #1a1304;
  --focus: #805714;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-block-end: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 400 16px/1.5 var(--sans); }
[hidden] { display: none !important; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a:focus-visible, button:focus-visible, select:focus-visible, [tabindex="0"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
img { display: block; max-inline-size: 100%; block-size: auto; }
.icon { flex: 0 0 auto; }
.frame {
  inline-size: min(100%, 1120px);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.sr-only, .skip:not(:focus) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.skip:focus {
  position: fixed;
  z-index: 5;
  inset: var(--space-2) auto auto var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--gold);
  color: var(--on-gold);
  border-radius: var(--space-2);
}

.app-header { padding-block-start: env(safe-area-inset-top); }
.app-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-block-size: 66px;
}
.app-header__actions { display: flex; align-items: center; gap: var(--space-2); }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); }
.brand img { flex: 0 0 auto; border-radius: 10px; }
.brand__wordmark { display: grid; gap: 4px; text-align: left; }
.brand__wordmark span:first-child { font: 770 24px/1 var(--serif); letter-spacing: -.028em; }
.brand__wordmark span:last-child { color: var(--accent); font: 800 10px/1 var(--sans); letter-spacing: .17em; }

.control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-block-size: 44px;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.2;
  text-align: center;
}
.control--icon { min-inline-size: 44px; padding: 0; }
.control--gold { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.control:hover { border-color: var(--accent); }
.install-control { color: var(--accent); }
.text-link { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--accent); font-weight: 550; }
.text-link:hover, .news-item__title a:hover, .ranked-card:hover h3, .app-footer a:hover { text-decoration: underline; text-underline-offset: .2em; }
.text-link--hit { min-block-size: 44px; }

.reader-content { margin-block-start: var(--space-2); }
.reader-content:focus { outline: none; }
.reader-content > .notice { margin-block-end: var(--space-3); }
.app-footer {
  margin-block-start: var(--space-7);
  padding-block-end: calc(92px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 13px;
}
.app-footer a { color: var(--text); }
.app-nav {
  position: fixed;
  z-index: 4;
  inset-inline: max(var(--space-3), env(safe-area-inset-left)) max(var(--space-3), env(safe-area-inset-right));
  inset-block-end: max(var(--space-3), env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-inline-size: 508px;
  margin-inline: auto;
  padding: var(--space-1);
  border-radius: 20px;
  border: 1px solid var(--edge);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.app-nav a {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: var(--space-1);
  min-block-size: 52px;
  border-radius: 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}
.app-nav a:hover, .app-nav a[aria-current] { background: var(--subtle); color: var(--accent); }
.app-nav a[aria-current] { font-weight: 600; }

.screen { display: grid; gap: var(--space-5); }
.screen--narrow { max-inline-size: 750px; margin-inline: auto; }
.screen-title { font: 600 clamp(36px, 6vw, 57px)/.98 var(--serif); letter-spacing: -.025em; overflow-wrap: anywhere; }
.section-title { font: 600 clamp(28px, 5vw, 38px)/1.1 var(--serif); letter-spacing: -.02em; }
.section-head { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; column-gap: var(--space-4); }
.section-head .text-link { align-self: center; font-size: 14px; }
.stack { display: grid; gap: var(--space-3); }
.meta { color: var(--muted); font-size: 13px; line-height: 1.35; }
.meta strong { color: var(--text); font-weight: 550; }
.story-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; }
.story-tag::before { content: ""; inline-size: 7px; block-size: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--dot, var(--accent)); }
.story-tag[data-section="politics"] { --dot: #d95c32; }
.story-tag[data-section="football"] { --dot: #26995c; }
.story-tag[data-section="business"] { --dot: #248d62; }
.story-tag[data-section="world"] { --dot: #238fa6; }
.story-tag[data-section="tech"] { --dot: #8068d6; }
.story-tag[data-section="entertainment"] { --dot: #c84585; }

.home-grid { display: grid; gap: var(--space-5); }
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: end;
  overflow: hidden;
  align-self: start;
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: var(--surface);
}
.hero--image { min-block-size: clamp(280px, 79vw, 386px); color: #f6f3ec; background: #151c29; }
.hero--image::after, .hero__photo { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; }
.hero__photo { object-fit: cover; z-index: -2; }
.hero--image::after { content: ""; z-index: -1; background: linear-gradient(180deg, rgba(8, 11, 18, .09) 0%, rgba(8, 11, 18, .76) 52%, rgba(8, 11, 18, .97) 100%); }
.hero__copy { display: grid; justify-items: start; gap: var(--space-2); max-inline-size: 620px; }
.hero h1 { font: 600 clamp(34px, 9vw, 57px)/.99 var(--serif); letter-spacing: -.025em; overflow-wrap: anywhere; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); color: var(--accent); font-size: 13px; font-weight: 550; }
.hero--image .hero__meta { color: #f5cd91; }
.hero__copy > p { color: var(--body); font-size: 15px; max-inline-size: 54ch; }
.hero--image .hero__copy > p { color: #e4e7ee; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block-start: var(--space-1); }
.hero--image .hero__actions .control:not(.control--gold) { color: #f6f3ec; border-color: #afbac5; background: rgba(13, 17, 27, .64); }
.hero--image a:focus-visible { outline-color: #f5cd91; }

.ranked__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(148px, 43%);
  gap: var(--space-2);
  overflow-x: auto;
  padding: 3px 3px var(--space-2);
  margin-inline: -3px;
  scrollbar-width: thin;
  scroll-snap-type: inline proximity;
  scroll-padding-inline: 3px;
  overscroll-behavior-inline: contain;
}
.ranked-card { display: grid; align-content: start; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--edge); border-radius: 14px; background: var(--surface); }
.ranked-card img { inline-size: 100%; aspect-ratio: 17 / 9; object-fit: cover; }
.ranked-card__copy { display: grid; gap: var(--space-1); padding: var(--space-3); }
.ranked-card__meta { display: flex; align-items: center; gap: var(--space-2); }
.rank { color: var(--accent); font: 600 28px/.95 var(--serif); font-variant-numeric: lining-nums; }
.ranked-card h3 { font: 550 15px/1.28 var(--sans); overflow-wrap: anywhere; }

.news-list { display: grid; gap: var(--space-4); padding: 0; list-style: none; }
.news-item { display: flex; align-items: flex-start; gap: var(--space-3); }
.news-item__copy { flex: 1; min-inline-size: 0; display: grid; gap: var(--space-1); }
.news-item__title { font: 550 18px/1.22 var(--sans); overflow-wrap: anywhere; }
.news-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.news-item__thumb { flex: 0 0 76px; inline-size: 76px; aspect-ratio: 1; border-radius: 12px; object-fit: cover; }
.news-item__standfirst { color: var(--body); font-size: 15px; }
.news-item__remove { align-self: center; color: var(--accent); }
.list-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }

.match-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  align-self: start;
  gap: var(--space-3);
  min-block-size: 60px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: var(--surface);
}
.match-strip:hover { border-color: var(--accent); }
.match-strip > .icon { color: var(--accent); }
.match-strip__text { display: grid; gap: 2px; overflow-wrap: anywhere; }
.match-strip__text strong { font-weight: 600; }

.article { max-inline-size: 760px; margin-inline: auto; display: grid; gap: var(--space-4); }
.article__nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.article__actions { display: flex; gap: var(--space-2); }
.article__actions [aria-pressed="true"] { color: var(--accent); background: var(--subtle); }
.article__actions [aria-pressed="true"] .icon { fill: var(--accent); stroke: var(--accent); }
.article__cover { display: grid; gap: var(--space-1); }
.article__cover img { inline-size: 100%; max-block-size: 390px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.article__head { display: grid; gap: var(--space-3); }
.article__section { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.article__rank { margin-inline-start: auto; color: var(--accent); }
.article__deck { color: var(--body); font-size: clamp(17px, 2.4vw, 20px); line-height: 1.45; }
.reading-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1); padding: var(--space-1); border: 1px solid var(--edge); border-radius: 999px; background: var(--subtle); }
.reading-mode .control { background: transparent; border-color: transparent; }
.reading-mode .control[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }
.reading-panel { display: grid; gap: var(--space-3); padding: var(--space-4); background: var(--surface); border-radius: var(--radius); border: 1px solid var(--edge); }
.reading-panel h2 { font: 600 25px/1.1 var(--serif); }
.reading-panel ul { display: grid; gap: var(--space-2); padding-inline-start: 22px; color: var(--body); }
.reading-panel li::marker { color: var(--accent); }
.article__prose { max-inline-size: 70ch; display: grid; gap: var(--space-4); color: var(--body); font-size: clamp(17px, 2vw, 19px); line-height: 1.65; overflow-wrap: anywhere; }
.article__prose h2, .article__prose h3 { color: var(--text); font: 600 32px/1.12 var(--serif); margin-block-start: var(--space-2); }
.article__prose h3 { font-size: 26px; }
.article__prose ul, .article__prose ol { padding-inline-start: var(--space-5); }
.article__prose a { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.article__prose blockquote { margin: 0; padding: var(--space-3) var(--space-4); border-radius: 12px; background: var(--surface); }

.score-screen { max-inline-size: 940px; margin-inline: auto; }
.date-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); }
.date-picker a {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--space-1);
  min-block-size: 60px;
  padding: var(--space-1);
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: var(--surface);
  line-height: 1.15;
  text-align: center;
}
.date-picker .meta { font-size: 12px; }
.date-picker strong { font-weight: 600; }
.date-picker a:hover, .date-picker a[aria-current] { border-color: var(--accent); }
.date-picker a[aria-current] { color: var(--accent); background: var(--subtle); }
.score-filter { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-2) var(--space-3); }
.score-filter label { display: grid; gap: var(--space-1); color: var(--muted); font-size: 13px; }
.score-filter select { max-inline-size: min(68vw, 285px); min-block-size: 44px; padding: 0 var(--space-3); border: 1px solid var(--edge); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 15px; }
.score-notes { display: grid; gap: var(--space-2); }
.fixtures { display: grid; gap: var(--space-3); padding: 0; list-style: none; }
.fixture { block-size: 100%; display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); }
.fixture--live { border-color: var(--accent); }
.fixture__head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-2); }
.fixture__live { background: var(--live); color: #fff; padding: var(--space-1) var(--space-2); border-radius: 8px; font-size: 13px; font-weight: 600; }
.fixture__teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--space-2); font-size: 16px; }
.fixture__team { font-weight: 550; line-height: 1.2; overflow-wrap: anywhere; }
.fixture__team:last-child { text-align: end; }
.fixture__result { color: var(--accent); font: 600 clamp(34px, 8vw, 46px)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.fixture__details { display: grid; justify-items: start; gap: var(--space-1); }
.fixture__details .text-link { font-size: 14px; min-block-size: 44px; }

.state { display: grid; justify-items: start; gap: var(--space-2); padding-block: var(--space-4); color: var(--body); }
.state > p { max-inline-size: 55ch; }
.state h2 { font: 600 29px/1.12 var(--serif); color: var(--text); }
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); border-radius: 12px; background: var(--subtle); color: var(--body); font-size: 14px; }
.notice .control { margin-inline-start: auto; }

@media (max-width: 350px) {
  .brand img { inline-size: 36px; block-size: 36px; }
  .brand__wordmark span:first-child { font-size: 16px; }
  .install-control .icon { display: none; }
  .install-control { padding-inline: var(--space-2); }
}

@media (min-width: 620px) {
  :root { --gutter: var(--space-5); }
  .app-header__row { min-block-size: 78px; }
  .hero { padding: var(--space-5); }
  .ranked__track { grid-auto-columns: minmax(156px, 29%); gap: var(--space-3); }
  .fixtures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 850px) {
  :root { --gutter: var(--space-6); }
  .home-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); grid-template-areas: "hero latest" "ranking latest" "matches latest"; gap: var(--space-5) var(--space-6); }
  .hero { grid-area: hero; }
  .home-ranking { grid-area: ranking; }
  .home-latest { grid-area: latest; align-content: start; }
  .match-strip { grid-area: matches; }
  .home-grid--unranked { grid-template-areas: "hero latest" "matches latest"; }
  .home-grid--single { grid-template-columns: minmax(0, 750px); grid-template-areas: none; justify-content: center; }
  .home-grid--single > * { grid-area: auto; }
  .hero--image { min-block-size: 365px; }
  .hero h1 { font-size: clamp(40px, 4.4vw, 57px); }
  .news-item__thumb { inline-size: 84px; flex-basis: 84px; }
}
