/* ═══════════════════════════════════════════
   CricBun Live Scores — 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-d:oklch(47% .115 221);
  --cyan-p:oklch(94% .035 221);
  --red:oklch(60% .2 27);
  --red-p:oklch(96% .025 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}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font:500 16px/1.45 Inter,system-ui,sans-serif;
}
a{
  text-decoration:none;
  color:inherit;
}
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);
}
.dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--red);
  display:inline-block;
  animation:pulse 1.6s infinite;
}
.mast{
  position:sticky;
  top:0;
  z-index:30;
  background:var(--cyan);
  color:oklch(99% .003 230);
  box-shadow:0 2px 9px oklch(30% .05 221/.18);
}
.navrow{
  height:58px;
  display:flex;
  align-items:center;
  gap:26px;
}
.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;
  height:100%;
  font-size:.78rem;
  font-weight:700;
}
.nav a{
  display:flex;
  align-items:center;
  border-bottom:3px solid transparent;
}
.nav a.active,
.nav a:hover{
  border-color:currentColor;
}
.actions{
  margin-left:auto;
  display:flex;
  gap:7px;
}
.iconbtn{
  height:40px;
  min-width:40px;
  border:0;
  border-radius:9px;
  background:oklch(99% .003 230/.14);
  color:inherit;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 11px;
  font-size:.7rem;
}
.ribbon{
  background:var(--paper);
  border-bottom:1px solid var(--line);
}
.ribbon-track{
  display:flex;
  overflow:auto;
  scrollbar-width:none;
  scroll-snap-type:x proximity;
}
.mini{
  flex:0 0 280px;
  padding:12px 15px;
  border-right:1px solid var(--line);
  scroll-snap-align:start;
  position:relative;
}
.mini.active:before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:3px;
  background:var(--red);
}
.meta,
.teamline{
  display:flex;
  justify-content:space-between;
}
.meta{
  font-size:.59rem;
  text-transform:uppercase;
  color:var(--muted);
}
.meta .live{
  color:var(--red);
  font-weight:800;
}
.teamline{
  margin-top:6px;
  font-size:.75rem;
  font-weight:700;
}
.mini p{
  font-size:.61rem;
  color:var(--muted);
  margin-top:5px;
}
main{
  padding:26px 0 80px;
}
.pagehead{
  display:flex;
  justify-content:space-between;
  align-items:end;
  margin-bottom:18px;
}
.pagehead h1{
  font-size:clamp(1.75rem,4vw,2.65rem);
  letter-spacing:-.055em;
}
.pagehead p{
  font-size:.75rem;
  color:var(--muted);
  margin-top:5px;
}
.updated{
  display:flex;
  align-items:center;
  gap:7px;
  font-size:.65rem;
  color:var(--muted);
}
.tabs{
  display:flex;
  gap:4px;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:12px;
  padding:4px;
  width:max-content;
  margin-bottom:14px;
}
.tab{
  border:0;
  background:transparent;
  padding:9px 16px;
  border-radius:8px;
  font-size:.7rem;
  font-weight:700;
  color:var(--muted);
}
.tab.active{
  background:var(--cyan-d);
  color:var(--paper);
}
.filters{
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:20px;
  overflow:auto;
  scrollbar-width:none;
}
.filter{
  height:38px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--paper);
  padding:0 11px;
  color:var(--muted);
  font-size:.65rem;
  white-space:nowrap;
  display:flex;
  align-items:center;
  gap:7px;
}
.filter.active{
  background:var(--cyan-p);
  color:var(--cyan-d);
  border-color:oklch(84% .06 221);
}
.date{
  margin-left:auto;
}
.layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:17px;
}
.stack{
  display:grid;
  gap:17px;
}
.series{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:13px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.serieshead{
  min-height:52px;
  padding:0 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
}
.seriesid{
  display:flex;
  align-items:center;
  gap:10px;
}
.serieslogo{
  width:32px;
  height:32px;
  border-radius:9px;
  background:var(--cyan-p);
  color:var(--cyan-d);
  display:grid;
  place-items:center;
  font-size:.6rem;
  font-weight:800;
}
.serieshead h2{
  font-size:.82rem;
}
.serieshead p{
  font-size:.57rem;
  color:var(--muted);
  margin-top:2px;
}
.serieshead a{
  font-size:.62rem;
  color:var(--cyan-d);
  font-weight:700;
}
.match{
  padding:16px;
  border-bottom:1px solid var(--line);
  transition:background .15s;
}
.match:last-child{
  border:0;
}
.match:hover{
  background:oklch(98% .008 230);
}
.match[data-href]{
  cursor:pointer;
}
.matchtop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:.6rem;
  color:var(--muted);
}
.state{
  display:flex;
  gap:6px;
  align-items:center;
  color:var(--red);
  font-weight:800;
  text-transform:uppercase;
}
.scoregrid{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:18px;
  align-items:center;
  margin-top:16px;
}
.side-team{
  display:flex;
  align-items:center;
  gap:10px;
}
.side-team.right{
  justify-content:flex-end;
  text-align:right;
}
.flag{
  width:38px;
  height:30px;
  border-radius:6px;
  background:var(--cyan-p);
  color:var(--cyan-d);
  display:grid;
  place-items:center;
  font-size:.58rem;
  font-weight:800;
}
.teamname{
  font-size:.75rem;
  font-weight:700;
}
.scoretxt{
  font-size:1.15rem;
  font-weight:800;
  letter-spacing:-.03em;
}
.overs{
  display:block;
  font-size:.58rem;
  color:var(--muted);
  font-weight:500;
  margin-top:2px;
}
.versus{
  color:var(--soft);
  font-size:.58rem;
  font-weight:800;
  text-align:center;
}
.context{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:15px;
  padding-top:12px;
  border-top:1px solid var(--line);
}
.context p{
  font-size:.65rem;
  color:var(--red);
  font-weight:700;
}
.links{
  display:flex;
  gap:10px;
}
.links a{
  font-size:.59rem;
  color:var(--cyan-d);
  font-weight:700;
}
.strip{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  margin-top:13px;
  background:oklch(97.5% .008 230);
  border-radius:8px;
}
.metric{
  padding:9px;
  text-align:center;
}
.metric b{
  display:block;
  font-size:.68rem;
}
.metric span{
  font-size:.53rem;
  color:var(--muted);
  text-transform:uppercase;
}
.sidepanel{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:13px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.sidehead{
  min-height:47px;
  padding:0 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
}
.sidehead h2{
  font-size:.8rem;
}
.sidehead a{
  font-size:.59rem;
  color:var(--cyan-d);
}
.timeline{
  padding:0 14px;
}
.event{
  display:grid;
  grid-template-columns:38px 1fr;
  gap:9px;
  padding:12px 0;
  border-bottom:1px solid var(--line);
}
.event:last-child{
  border:0;
}
.over{
  font-size:.63rem;
  font-weight:800;
  color:var(--cyan-d);
}
.event h3{
  font-size:.66rem;
}
.event p{
  font-size:.57rem;
  color:var(--muted);
  margin-top:3px;
}
.ai{
  padding:15px;
  background:var(--navy);
  color:var(--paper);
}
.ai h3{
  font-size:.8rem;
}
.ai p{
  font-size:.62rem;
  color:oklch(77% .015 230);
  margin-top:7px;
}
.meter{
  height:7px;
  background:oklch(38% .04 238);
  border-radius:9px;
  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:.61rem;
}
.upcoming{
  padding:0 14px;
}
.fixture{
  padding:12px 0;
  border-bottom:1px solid var(--line);
}
.fixture:last-child{
  border:0;
}
.fixturemeta{
  display:flex;
  justify-content:space-between;
  font-size:.56rem;
  color:var(--muted);
}
.fixtureline{
  display:flex;
  justify-content:space-between;
  font-size:.65rem;
  font-weight:700;
  margin-top:7px;
}
.empty,
.error,
.loading{
  display:none;
  padding:34px 16px;
  text-align:center;
}
.empty h3,
.error h3{
  font-size:.85rem;
}
.empty p,
.error p{
  font-size:.64rem;
  color:var(--muted);
  margin-top:6px;
}
.retry{
  border:0;
  background:var(--cyan-d);
  color:var(--paper);
  border-radius:8px;
  padding:9px 13px;
  font-size:.63rem;
  margin-top:12px;
}
.skeleton{
  height:12px;
  border-radius:6px;
  background:linear-gradient(90deg,var(--line),oklch(95% .01 230),var(--line));
  background-size:200% 100%;
  animation:shimmer 1.4s infinite;
  margin:11px;
}
@keyframes pulse{
  70%{
    box-shadow:0 0 0 7px oklch(60% .2 27/0);
  }
}
@keyframes shimmer{
  to{
    background-position:-200% 0;
  }
}
@media(max-width:960px){
  .nav{
    display:none;
  }
  .layout{
    grid-template-columns:1fr;
  }
  .sidebar{
    grid-template-columns:1fr 1fr;
  }
  .date{
    margin-left:0;
  }
}
@media(max-width:700px){
  .wrap{
    width:min(100% - 16px,1180px);
  }
  .navrow{
    height:52px;
  }
  .brand{
    font-size:1.1rem;
  }
  .iconbtn span{
    display:none;
  }
  .mini{
    flex-basis:86vw;
  }
  .pagehead{
    align-items:start;
  }
  .updated{
    display:none;
  }
  main{
    padding-top:18px;
  }
  .tabs{
    width:100%;
  }
  .tab{
    flex:1;
    padding-inline:8px;
  }
  .scoregrid{
    grid-template-columns:1fr auto 1fr;
    gap:7px;
  }
  .side-team{
    display:grid;
    justify-items:start;
    gap:6px;
  }
  .side-team.right{
    justify-items:end;
  }
  .scoretxt{
    font-size:.92rem;
  }
  .teamname{
    font-size:.64rem;
  }
  .flag{
    width:32px;
    height:25px;
  }
  .strip{
    grid-template-columns:1fr 1fr;
  }
  .context{
    align-items:start;
    gap:9px;
  }
  .links{
    display:grid;
    gap:4px;
    text-align:right;
  }
  .sidebar{
    grid-template-columns:1fr;
  }
  .series,
  .sidepanel{
    border-radius:10px;
  }
}
@media(max-width:390px){
  .filter{
    height:36px;
  }
  .match{
    padding:13px;
  }
  .scoregrid{
    gap:4px;
  }
  .context p{
    font-size:.59rem;
  }
  .links a{
    font-size:.55rem;
  }
}
@media(prefers-reduced-motion:reduce){
  *{
    animation:none!important;
    transition:none!important;
  }
}