:root{
  --paper:#ffffff; --ink:#1a1d21; --muted:#6b7681; --line:#e6e9ec;
  --live:#d1301f; --pin-bg:#fff8e6; --pin-line:#e8c96a; --new-bg:#fdf0ee;
  --rail:2px;
  font-size:16px;
  --bct-dark-blue: #094672; 
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--paper);color:var(--ink);
  font:400 1rem/1.6 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;
  display:flex;flex-direction:column}

/* header */
.masthead{flex:0 0 auto;padding:14px 18px 12px;border-bottom:1px solid var(--line);
  display:flex;align-items:center;gap:12px}
.status{display:inline-flex;align-items:center;gap:6px;font-size:.72rem;font-weight:800;
  letter-spacing:.12em;text-transform:uppercase;color:var(--live);white-space:nowrap}
.status .dot{width:8px;height:8px;border-radius:50%;background:var(--live);
  animation:pulse 1.6s ease-in-out infinite}
.status.archived{color:var(--muted)}
.status.archived .dot{background:var(--muted);animation:none}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.8)}}
@media (prefers-reduced-motion: reduce){.status .dot{animation:none}}
.masthead h1{color:var(--bct-dark-blue);margin:0;font-size:1.02rem;font-weight:700;letter-spacing:-.01em;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.masthead .desc{display:none}

/* feed */
.feed{flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;
  padding:18px 18px 32px;scroll-behavior:smooth}
.feed__intro{color:var(--muted);font-size:.9rem;margin:0 0 18px;max-width:60ch}
.entry{display:flex;gap:14px;position:relative}
.entry__rail{flex:0 0 14px;display:flex;justify-content:center;position:relative}
.entry__rail::before{content:"";position:absolute;top:8px;bottom:-8px;width:var(--rail);
  background:var(--line)}
.entry:last-child .entry__rail::before{bottom:auto;height:calc(100% - 8px)}
.entry__dot{width:10px;height:10px;border-radius:50%;background:var(--paper);
  border:2px solid var(--muted);position:relative;top:6px;z-index:1}
.entry__main{flex:1;min-width:0;padding-bottom:26px}
.entry__head{display:flex;align-items:baseline;gap:10px;margin-bottom:4px}
.entry__time{font-size:.78rem;font-weight:700;color:var(--muted);
  font-variant-numeric:tabular-nums;letter-spacing:.04em}
.entry__pin{font-size:.68rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;
  color:#8a6d1d;background:var(--pin-bg);border:1px solid var(--pin-line);
  padding:2px 8px;border-radius:99px}
.entry--pinned .entry__dot{border-color:var(--pin-line);background:var(--pin-bg)}
.entry--pinned .entry__main{background:var(--pin-bg);border:1px solid var(--pin-line);
  border-radius:8px;padding:12px 14px 14px;margin-bottom:22px}
.entry--new .entry__main{animation:flash 2.4s ease-out}
@keyframes flash{0%{background:var(--new-bg)}100%{background:transparent}}
@media (prefers-reduced-motion: reduce){.entry--new .entry__main{animation:none}}

/* entry content */
.entry__body{overflow-wrap:break-word}
.entry__body>:first-child{margin-top:0}
.entry__body>:last-child{margin-bottom:0}
.entry__body p{margin:.45em 0}
.entry__body h2,.entry__body h3,.entry__body h4{margin:.6em 0 .3em;line-height:1.3}
.entry__body h2{font-size:1.15rem}.entry__body h3{font-size:1.05rem}.entry__body h4{font-size:1rem}
.entry__body ul,.entry__body ol{margin:.45em 0;padding-left:1.4em}
.entry__body a{color:var(--bct-dark-blue);text-decoration-thickness:1px;text-underline-offset:2px}
.entry__body img{max-width:100%;height:auto;border-radius:6px;display:block}
.entry__body figure{margin:.7em 0}
.entry__body figcaption{font-size:.8rem;color:var(--muted);margin-top:4px}
.lb-image--border img{border:1px solid var(--line)}
.lb-image--bg{background:#f2f4f6;padding:12px;border-radius:8px}
.lb-embed__frame{position:relative;padding-top:56.25%;border-radius:6px;overflow:hidden;background:#000}
.lb-embed__frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.lb-video video{max-width:100%;max-height:70vh;border-radius:6px;display:block;background:#000}
.lb-gallery__grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.lb-gallery__item{display:block;aspect-ratio:1;border-radius:6px;overflow:hidden;background:#f2f4f6}
.lb-gallery__item img{width:100%;height:100%;object-fit:cover;display:block;border-radius:0;
  transition:transform .15s ease}
.lb-gallery__item:hover img{transform:scale(1.04)}
@media (prefers-reduced-motion: reduce){.lb-gallery__item img{transition:none}}

/* lightbox overlay */
.lightbox{position:fixed;inset:0;z-index:50;background:rgba(10,12,14,.92);
  display:none;align-items:center;justify-content:center}
.lightbox.open{display:flex}
.lightbox img{max-width:92vw;max-height:92vh;border-radius:4px;
  box-shadow:0 10px 40px rgba(0,0,0,.6)}
.lightbox button{position:absolute;background:#00A7DD;border:0;color:#fff;cursor:pointer;
  padding:0;
  height: 40px;
  width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.lightbox button:hover{opacity:1}
.lightbox .lightbox__close{top:8px;right:12px}
.lightbox .lightbox__prev{left:6px;top:50%;transform:translateY(-50%)}
.lightbox .lightbox__next{right:6px;top:50%;transform:translateY(-50%)}
.lightbox .lightbox__count{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);
  color:#cfd6dc;font-size:.8rem;letter-spacing:.05em}
hr.lb-delimiter{border:0;border-top:1px solid var(--line);margin:1em 0}

/* tables: same design as the admin preview, light variant.
   Bold header on a tinted band, clearly zebra-striped body rows, uniform cell borders. */
.lb-table{overflow-x:auto;margin:.7em 0;border-radius:6px;border:1px solid #dfe4e9}
.lb-table table{width:100%;border-collapse:collapse;font-size:.85rem;line-height:1.45}
.lb-table thead th {
  padding:7px 9px;
  text-align:left;
  vertical-align:top;
}
.lb-table tbody td, .lb-table tbody th{
  padding:7px 9px;
  text-align:left;
  vertical-align:top;
  border:1px solid #dfe4e9
}
.lb-table tr>:first-child{border-left:0}
.lb-table tr>:last-child{border-right:0}
.lb-table thead tr>*{border-top:0}
.lb-table tbody tr:last-child>*{border-bottom:0}
.lb-table thead th{ 
  font-weight:700;
  border-bottom: 2px solid #00A7DD;
  background: #fff;
  color:var(--bct-dark-blue)
}
.lb-table tbody tr:nth-child(odd){background:rgba(16,20,24,.045)}
.lb-table tbody tr:nth-child(even){background:var(--paper)}
.feed__empty{color:var(--muted);font-size:.92rem}

/* new-updates chip */
.newchip{position:absolute;left:50%;transform:translateX(-50%);top:64px;z-index:5;
  background:var(--ink);color:#fff;font:700 .8rem/1 inherit;letter-spacing:.03em;
  border:0;border-radius:99px;padding:9px 16px;cursor:pointer;
  box-shadow:0 4px 14px rgba(0,0,0,.25);display:none}
.newchip.show{display:block}

@media(min-width:560px){
  .masthead{padding:16px 24px 14px}
  .masthead h1{font-size:1.15rem}
  .feed{padding:22px 24px 40px}
}

/* ---- jersey winners: title blue, rider orange, team grey (site palette) ---- */
.lb-jerseys{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:20px 14px;margin:.8em 0;text-align:center}
.lb-jersey img{width:100%;max-width:190px;height:auto;margin:0 auto;display:block;
  border-radius:0}
.lb-jersey__title{color:#29ABE2;font-weight:700;font-size:.82rem;margin-top:10px;
  letter-spacing:.01em}
.lb-jersey__rider{color:#F7941D;font-weight:700;font-size:.98rem;margin-top:2px}
.lb-jersey__team{color:#9B9B9B;font-weight:600;font-size:.82rem;margin-top:2px}

/* back arrow shown in PWA app mode */
.back{flex:0 0 auto;color:var(--ink);text-decoration:none;font-size:1.7rem;line-height:1;
  padding:0 4px;margin-left:-6px;border-radius:8px}
.back:active{background:#f0f2f5}
body{padding-top:env(safe-area-inset-top)}
