/* ═══════════════════════════════════════════
   CricBun Homepage — extracted from prototype
   ═══════════════════════════════════════════ */

:root {
  --bg: oklch(96% .007 230);
  --paper: oklch(99.5% .004 230);
  --ink: oklch(22% .025 236);
  --muted: oklch(52% .018 236);
  --soft: oklch(72% .012 236);
  --line: oklch(89% .01 236);
  --cyan: oklch(63% .13 221);
  --cyan-dark: oklch(47% .115 221);
  --cyan-pale: oklch(94% .035 221);
  --red: oklch(60% .2 27);
  --green: oklch(57% .13 150);
  --navy: oklch(28% .045 238);
  --shadow: 0 5px 18px oklch(24% .02 235/.07);
  --ease: cubic-bezier(.16,1,.3,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.45 Inter, system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.wrap { width: min(1180px, calc(100% - 28px)); margin: auto; }
.nums { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
  color: var(--cyan-dark);
}
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.6s infinite;
}

/* ── Top Bar ── */
.top {
  background: var(--navy);
  color: oklch(95% .01 230);
  font-size: .7rem;
}
.top .wrap {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.toplinks {
  display: flex;
  gap: 18px;
  color: oklch(79% .015 230);
}

/* ── Masthead / Navigation ── */
.mast {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cyan);
  color: oklch(99% .003 230);
  box-shadow: 0 2px 9px oklch(30% .05 221/.18);
}
.mast .wrap {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 25px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -.06em;
}
.ball {
  width: 27px;
  height: 27px;
  border: 3px solid currentColor;
  border-radius: 50%;
  position: relative;
}
.ball:after {
  content: "";
  position: absolute;
  width: 16px;
  border-top: 2px dashed currentColor;
  transform: rotate(48deg);
  top: 10px;
  left: 2px;
}
.nav {
  display: flex;
  gap: 19px;
  font-size: .78rem;
  font-weight: 700;
  height: 100%;
}
.nav a {
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
}
.nav a:hover,
.nav a.active { border-color: currentColor; }
.actions { margin-left: auto; display: flex; gap: 7px; }
.ib {
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: oklch(99% .003 230/.14);
  color: inherit;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .7rem;
}
.ib.icon { width: 40px; padding: 0; justify-content: center; }

/* ── Live Scores Ticker ── */
.scores { background: var(--paper); border-bottom: 1px solid var(--line); }
.scoretrack {
  display: flex;
  overflow: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.score {
  flex: 0 0 280px;
  padding: 12px 15px;
  border-right: 1px solid var(--line);
  scroll-snap-align: start;
  position: relative;
}
.score.active:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--red);
}
.meta, .line { display: flex; justify-content: space-between; }
.meta {
  font-size: .59rem;
  color: var(--muted);
  text-transform: uppercase;
}
.meta .live { color: var(--red); font-weight: 800; }
.line { font-size: .75rem; font-weight: 700; margin-top: 6px; }
.status { font-size: .61rem; color: var(--muted); margin-top: 5px; }

/* ── Series Chips ── */
.chips { background: var(--paper); border-bottom: 1px solid var(--line); }
.chiptrack {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 9px 0;
  scrollbar-width: none;
}
.chip {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .64rem;
  color: var(--muted);
}
.chip.active {
  background: var(--cyan-pale);
  color: var(--cyan-dark);
  border-color: oklch(84% .06 221);
}

/* ── Main Layout ── */
main { padding: 20px 0 64px; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 17px;
}
.stack { display: grid; gap: 17px; }

/* ── Panel ── */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.head {
  min-height: 47px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.head h2 { font-size: .9rem; }
.head a { font-size: .64rem; color: var(--cyan-dark); font-weight: 700; }

/* ── Coverage Tabs ── */
.coverage {
  display: flex;
  gap: 7px;
  padding: 13px 15px 0;
  overflow: auto;
  scrollbar-width: none;
}
.coverage button {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: .63rem;
}
.coverage button.active {
  background: var(--cyan-dark);
  border-color: var(--cyan-dark);
  color: var(--paper);
}
.breaking {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 10px 15px;
  margin-top: 12px;
  background: oklch(97% .025 27);
  font-size: .68rem;
}
.breaking b { color: var(--red); font-size: .59rem; letter-spacing: .08em; }

/* ── Hero ── */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; }
.heroimg {
  min-height: 330px;
  background: linear-gradient(145deg, oklch(35% .08 225), oklch(69% .12 214));
  position: relative;
}
.heroimg:after {
  content: "ENG 257/3";
  position: absolute;
  left: 20px;
  bottom: 17px;
  color: var(--paper);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.05em;
}
.herocopy {
  padding: 25px 23px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tag {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 5px;
  background: oklch(94% .04 27);
  color: var(--red);
  font-size: .58rem;
  font-weight: 800;
  text-transform: uppercase;
}
.herocopy h1 {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -.045em;
  margin-top: 11px;
}
.herocopy > p { font-size: .74rem; color: var(--muted); margin-top: 11px; }
.related {
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 17px;
}
.related a { font-size: .67rem; font-weight: 700; }
.related a:before { content: "•"; color: var(--cyan); margin-right: 7px; }

/* ── Story Cards (3 columns) ── */
.cards3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.story { padding: 14px; border-right: 1px solid var(--line); }
.story:last-child { border: 0; }
.thumb {
  height: 94px;
  border-radius: 8px;
  margin-bottom: 9px;
  background: linear-gradient(145deg, oklch(82% .04 calc(170 + var(--i)*22)), oklch(50% .08 calc(185 + var(--i)*18)));
}
.story h3 { font-size: .73rem; line-height: 1.35; }
.story p { font-size: .59rem; color: var(--muted); margin-top: 6px; }

/* ── Article Grid (Features) ── */
.article-grid { display: grid; grid-template-columns: 1.25fr .75fr; }
.article-lead { padding: 16px; border-right: 1px solid var(--line); }
.feature-img {
  height: 235px;
  border-radius: 9px;
  background: linear-gradient(140deg, oklch(36% .07 270), oklch(72% .09 300));
  position: relative;
}
.feature-img:after {
  content: "THE BIG READ";
  position: absolute;
  left: 16px;
  bottom: 13px;
  color: var(--paper);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .12em;
}
.article-lead h3 { font-size: 1.15rem; line-height: 1.25; margin-top: 13px; }
.article-lead p { font-size: .7rem; color: var(--muted); margin-top: 8px; }
.article-list { padding: 0 15px; }
.article-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.article-row:last-child { border: 0; }
.smallimg {
  height: 60px;
  border-radius: 7px;
  background: oklch(79% .04 calc(200 + var(--i)*17));
}
.article-row h3 { font-size: .68rem; line-height: 1.35; }
.article-row p { font-size: .57rem; color: var(--muted); margin-top: 5px; }

/* ── Opinion / Columnists ── */
.opinion-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.opinion { padding: 16px; border-right: 1px solid var(--line); }
.opinion:last-child { border: 0; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cyan-pale);
  color: var(--cyan-dark);
  font-size: .65rem;
  font-weight: 800;
}
.opinion h3 { font-size: .7rem; line-height: 1.4; margin-top: 12px; }
.opinion p { font-size: .57rem; color: var(--muted); margin-top: 8px; }

/* ── Fixtures ── */
.fixtures { padding: 0 15px; }
.fixture { padding: 12px 0; border-bottom: 1px solid var(--line); }
.fixture:last-child { border: 0; }
.fixturetop,
.fixturemain { display: flex; justify-content: space-between; }
.fixturetop { font-size: .58rem; color: var(--muted); }
.fixturemain { font-size: .68rem; font-weight: 700; margin-top: 7px; }

/* ── Stats Numbers ── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 17px; border-right: 1px solid var(--line); }
.stat:last-child { border: 0; }
.stat b { font-size: 1.4rem; letter-spacing: -.05em; }
.stat span { display: block; font-size: .58rem; color: var(--muted); margin-top: 3px; }
.stat em { font-style: normal; font-size: .57rem; color: var(--green); }

/* ── Tables ── */
.tables { display: grid; grid-template-columns: 1fr 1fr; }
.tablebox { padding: 9px 14px 14px; border-right: 1px solid var(--line); }
.tablebox:last-child { border: 0; }
table { width: 100%; border-collapse: collapse; font-size: .64rem; }
th {
  text-align: left;
  color: var(--soft);
  font-size: .54rem;
  text-transform: uppercase;
  padding: 8px 4px;
}
td { padding: 9px 4px; border-top: 1px solid var(--line); }
td:last-child,
th:last-child { text-align: right; }
.rank { font-weight: 800; }

/* ── Video ── */
.video-grid { display: grid; grid-template-columns: 1.2fr .8fr; }
.videohero {
  min-height: 255px;
  padding: 18px;
  display: flex;
  align-items: end;
  background: linear-gradient(145deg, oklch(29% .05 242), oklch(52% .09 215));
  color: var(--paper);
  position: relative;
}
.play {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 43px;
  height: 43px;
  border: 0;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--paper);
}
.videohero h3 { font-size: 1.2rem; }
.videolist { display: grid; }
.videoitem { padding: 14px; border-bottom: 1px solid var(--line); }
.videoitem:last-child { border: 0; }
.videoitem h3 { font-size: .68rem; }
.videoitem p { font-size: .57rem; color: var(--muted); margin-top: 6px; }

/* ── Photo Grid ── */
.photo-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr .7fr;
  gap: 1px;
  background: var(--line);
}
.photo {
  min-height: 190px;
  background: linear-gradient(145deg, oklch(38% .07 calc(200 + var(--i)*30)), oklch(72% .08 calc(215 + var(--i)*24)));
  padding: 15px;
  display: flex;
  align-items: end;
  color: var(--paper);
}
.photo:first-child { min-height: 290px; }
.photo h3 { font-size: .73rem; }
.photo:first-child h3 { font-size: 1.05rem; }

/* ── Match Box (sidebar) ── */
.matchbox { margin: 13px; border: 1px solid var(--line); border-radius: 10px; }
.matchbox .meta { padding: 10px; border-bottom: 1px solid var(--line); }
.teams { padding: 12px; display: grid; gap: 10px; }
.team {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: .7rem;
  font-weight: 700;
}
.flag {
  width: 26px;
  height: 21px;
  border-radius: 4px;
  background: var(--cyan-pale);
  color: var(--cyan-dark);
  display: grid;
  place-items: center;
  font-size: .52rem;
}

/* ── AI Insight ── */
.ai { padding: 16px; background: var(--navy); color: var(--paper); }
.ai p { font-size: .65rem; color: oklch(77% .015 230); margin-top: 7px; }
.meter {
  height: 7px;
  background: oklch(38% .04 238);
  border-radius: 10px;
  margin: 13px 0 7px;
  overflow: hidden;
}
.meter span { display: block; width: 64%; height: 100%; background: var(--cyan); }
.prob { display: flex; justify-content: space-between; font-size: .62rem; }

/* ── Most Read List ── */
.list { padding: 0 15px; counter-reset: n; }
.list a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 6px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: .65rem;
}
.list a:last-child { border: 0; }
.list a:before {
  counter-increment: n;
  content: counter(n);
  font-size: .95rem;
  color: var(--cyan);
  font-weight: 800;
}

/* ── Poll & Newsletter ── */
.poll,
.newsletter { padding: 15px; }
.poll h3,
.newsletter h3 { font-size: .8rem; }
.poll p,
.newsletter p { font-size: .61rem; color: var(--muted); margin-top: 5px; }
.poll button {
  width: 100%;
  height: 35px;
  margin-top: 7px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  padding: 0 10px;
  font-size: .63rem;
}
.newsletter { background: var(--cyan-pale); }
.signup { display: flex; margin-top: 11px; }
.signup input {
  min-width: 0;
  flex: 1;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px 0 0 7px;
  padding: 0 9px;
  font-size: .63rem;
}
.signup button {
  border: 0;
  border-radius: 0 7px 7px 0;
  background: var(--cyan-dark);
  color: var(--paper);
  font-size: .62rem;
  font-weight: 700;
}

/* ── Mobile Nav ── */
.mobile-nav { display: none; }

/* ── Footer ── */
footer {
  background: var(--navy);
  color: oklch(94% .008 230);
  padding: 36px 0 82px;
}
.footergrid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 30px;
}
.footergrid p {
  font-size: .64rem;
  color: oklch(72% .015 230);
  margin-top: 10px;
  max-width: 37ch;
}
.footergrid h3 {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.flinks {
  display: grid;
  gap: 7px;
  margin-top: 11px;
  font-size: .63rem;
  color: oklch(76% .015 230);
}

/* ── Animations ── */
@keyframes pulse {
  70% { box-shadow: 0 0 0 7px oklch(60% .2 27/0); }
}

/* ── Wide Screens (≥1440px) ── */
@media (min-width: 1440px) {
  .wrap { width: min(1320px, calc(100% - 48px)); }
  .layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .heroimg { min-height: 370px; }
}

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
  .nav { display: none; }
  .layout { grid-template-columns: 1fr; }
  .side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heroimg { min-height: 300px; }
  .footergrid { grid-template-columns: 1.3fr repeat(3, 1fr); }
  .footergrid > div:last-child { display: none; }
}

/* ── Mobile (≤760px) ── */
@media (max-width: 760px) {
  .wrap { width: min(100% - 18px, 1180px); }
  .top { display: none; }
  .mast .wrap { height: 52px; }
  .brand { font-size: 1.12rem; }
  .ib span { display: none; }
  .score { flex-basis: 255px; }
  .hero { grid-template-columns: 1fr; }
  .heroimg { min-height: 230px; }
  .herocopy { padding: 18px; }
  .cards3,
  .opinion-grid { display: flex; overflow: auto; scroll-snap-type: x mandatory; }
  .story,
  .opinion { min-width: 72vw; scroll-snap-align: start; }
  .article-grid,
  .video-grid { grid-template-columns: 1fr; }
  .article-lead { border-right: 0; border-bottom: 1px solid var(--line); }
  .feature-img { height: 210px; }
  .videohero { min-height: 220px; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .photo:first-child { grid-column: 1/-1; min-height: 235px; }
  .stats { display: flex; overflow: auto; }
  .stat { min-width: 42vw; }
  .tables { grid-template-columns: 1fr; }
  .tablebox { border-right: 0; border-bottom: 1px solid var(--line); }
  .side { grid-template-columns: 1fr 1fr; }
  .footergrid { grid-template-columns: 1fr 1fr; }
  .footergrid > div:first-child { grid-column: 1/-1; }
  .footergrid > div:nth-child(n+4) { display: none; }
  .mobile-nav {
    position: fixed;
    display: flex;
    z-index: 30;
    left: 8px;
    right: 8px;
    bottom: 8px;
    height: 58px;
    border-radius: 13px;
    background: var(--navy);
    align-items: center;
    justify-content: space-around;
    color: oklch(75% .015 230);
    box-shadow: 0 14px 40px oklch(20% .03 236/.3);
  }
  .mobile-nav a { display: grid; justify-items: center; gap: 2px; font-size: .52rem; }
  .mobile-nav .active { color: var(--cyan); }
}

/* ── Small Mobile (≤520px) ── */
@media (max-width: 520px) {
  .layout,
  .stack { gap: 9px; }
  main { padding-top: 10px; }
  .panel { border-radius: 10px; }
  .head { min-height: 44px; }
  .side { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr; }
  .photo:first-child { grid-column: auto; }
  .photo { min-height: 200px; }
  .article-row { grid-template-columns: 70px 1fr; }
  .herocopy h1 { font-size: 1.38rem; }
  .heroimg:after { font-size: 1.2rem; }
  .score { flex-basis: 88vw; }
  .coverage { padding-top: 10px; }
  .breaking { align-items: flex-start; }
  .toplinks { display: none; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
