/* Rifnote Live Feeds — Tailwind-like utility subset + component polish */
.rlf-root {
  --primary: var(--rlf-accent, #da2010);
  color: #111827;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/* Utilities used in the template */
.min-h-screen { min-height: 100vh; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: .5rem; }
.gap-2 { gap: .5rem; }
.gap-4 { gap: 1rem; }
.flex { display: flex; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.relative { position: relative; }
.w-7 { width: 1.75rem; }
.h-7 { height: 1.75rem; }
.w-12 { width: 3rem; }
.rounded { border-radius: .25rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; font-weight: 800; }
.text-sm { font-size: .875rem; line-height: 1.25rem; }
.text-gray-600 { color: #4b5563; }
.text-red-600 { color: var(--primary); }
.font-bold { font-weight: 700; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.bg-primary { background: var(--primary); }
.text-primary { color: var(--primary); }

.animate-pulse { animation: rlfPulse 1.6s ease-in-out infinite; }
@keyframes rlfPulse { 0%,100%{opacity:1} 50%{opacity:.55} }

/* Grid */
.grid { display: grid; }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.col-span-12 { grid-column: span 12 / span 12; }
@media (min-width: 1024px) {
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
}
@media (min-width: 768px) { .md\:gap-8 { gap: 2rem; } }

/* Media */
.rlf-thumbLink{ display:block; width:100%; margin: .35rem 0 .6rem; text-decoration:none; }
.rlf-media{
  width: 100%;
  max-height: 260px;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(17,24,39,.10);
  box-shadow: 0 10px 22px rgba(17,24,39,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17,24,39,.04);
}
.rlf-mediaPinned{ max-height: 360px; }

.rlf-media::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--rlf-img);
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.12);
  opacity: .9;
}

.rlf-media::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.18));
  opacity: .35;
}

.rlf-img{
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}

.rlf-mediaPinned .rlf-img{ max-height: 360px; }

@media (max-width: 520px){
  .rlf-media{ max-height: 220px; }
  .rlf-mediaPinned{ max-height: 280px; }
  .rlf-img{ max-height: 220px; }
  .rlf-mediaPinned .rlf-img{ max-height: 280px; }
}

/* Feed articles */

.rlf-articles article { border-bottom: 1px solid rgba(17,24,39,.08); padding-bottom: 1.25rem; }
.rlf-articles article:last-child { border-bottom: 0; padding-bottom: 0; }

.rlf-line{
  position: absolute;
  left: 0.6rem;
  top: 2.1rem;
  width: 2px;
  height: calc(100% - 2.1rem);
  background: rgba(17,24,39,.12);
  border-radius: 2px;
}

.rlf-headline{
  display: inline-block;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.35rem;
  color: #111827;
  text-decoration: none;
}
.rlf-headline:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

.rlf-excerpt{
  margin: .4rem 0 0;
  color: #374151;
  font-size: .95rem;
  line-height: 1.45rem;
}

.rlf-actions{
  display: flex;
  gap: .5rem;
  margin-top: .6rem;
  flex-wrap: wrap;
}
.rlf-action{
  border: 1px solid rgba(17,24,39,.14);
  background: #fff;
  padding: .35rem .6rem;
  border-radius: .6rem;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.rlf-ico{ display:inline-flex; color: rgba(17,24,39,.78); }
.rlf-action:hover{ transform: translateY(-1px); box-shadow: 0 8px 18px rgba(17,24,39,.10); }
.rlf-action:active{ transform: translateY(0); }

.rlf-status{
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #374151;
  font-size: .9rem;
}
.rlf-dot{
  width: .55rem;
  height: .55rem;
  background: var(--primary);
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(218,32,16,.12);
  animation: rlfDot 1.4s ease-in-out infinite;
}
@keyframes rlfDot { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(.85);opacity:.7} }

/* Aside */
.rlf-aside .rlf-card{
  border: 1px solid rgba(17,24,39,.10);
  background: #fff;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(17,24,39,.06);
}
.rlf-card-title{ margin: 0 0 .4rem; font-size: 1rem; font-weight: 900; }
.rlf-card-desc{ margin: 0; color: #4b5563; font-size: .9rem; line-height: 1.35rem; }

/* Pinned */
.rlf-pinned{
  border: 1px solid rgba(17,24,39,.12);
  background: rgba(255,255,255,.9);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 26px rgba(17,24,39,.08);
}
.rlf-roof{ display:flex; align-items:center; gap:.6rem; margin-bottom:.6rem; }
.rlf-roofTitle{
  display:inline-flex; align-items:center; padding:.15rem .5rem; border-radius:999px;
  font-weight:900; font-size:.75rem; letter-spacing:.06em; color:#fff; background:var(--primary);
}
.rlf-roofTime{ font-weight:800; font-size:.85rem; color:rgba(17,24,39,.72); }
.rlf-pinnedHeadline{
  display:inline-block; font-weight:950; font-size:1.2rem; line-height:1.45rem; color:#111827; text-decoration:none;
}
.rlf-pinnedHeadline:hover{ text-decoration: underline; text-underline-offset: 3px; }
.rlf-pinnedExcerpt{ margin:.45rem 0 0; color:#374151; font-size:.95rem; line-height:1.45rem; }

/* New item highlight */
.rlf-newFlash{ animation: rlfFlash 1.2s ease-out 1; position: relative; }
@keyframes rlfFlash{
  0%{ box-shadow:0 0 0 0 rgba(218,32,16,0); background:rgba(218,32,16,.10); }
  25%{ box-shadow:0 0 0 10px rgba(218,32,16,.10); background:rgba(218,32,16,.06); }
  60%{ box-shadow:0 0 0 18px rgba(218,32,16,.06); background:rgba(218,32,16,.03); }
  100%{ box-shadow:0 0 0 0 rgba(218,32,16,0); background:transparent; }
}

/* Jump to latest */
.rlf-jumpWrap{
  position: sticky;
  top: .75rem;
  z-index: 20;
  display: flex;
  justify-content: center;
  margin: .25rem 0 1rem;
  pointer-events: none;
}
.rlf-jumpBtn{
  pointer-events: auto;
  border: 1px solid rgba(17,24,39,.14);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: .55rem .9rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: .9rem;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(17,24,39,.12);
  transform: translateY(-6px);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
}
.rlf-jumpBtn[data-open="1"]{ opacity: 1; transform: translateY(0); }
.rlf-jumpCount{
  display: inline-flex; align-items:center; justify-content:center;
  min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem;
  border-radius: 999px; background: var(--primary); color: #fff;
  font-size: .78rem; margin-left: .35rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .rlf-newFlash, .animate-pulse, .rlf-dot{ animation: none; }
  .rlf-jumpBtn{ transition: none; }
}


/* Live Feed Button Shortcode */
.rlf-liveBtn{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 950;
  letter-spacing: .02em;
  border: 1px solid rgba(17,24,39,.14);
  background: rgba(255,255,255,.92);
  color: #111827;
  box-shadow: 0 12px 30px rgba(17,24,39,.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .12s ease, box-shadow .12s ease;
}
.rlf-liveBtn:hover{ transform: translateY(-1px); box-shadow: 0 18px 38px rgba(17,24,39,.14); }
.rlf-liveBtn:active{ transform: translateY(0); }

.rlf-liveDot{
  width: .7rem;
  height: .7rem;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(218,32,16,.0);
  animation: rlfBlink 1.2s ease-in-out infinite;
}
@keyframes rlfBlink{
  0%{ transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(218,32,16,.0); }
  50%{ transform: scale(.85); opacity: .55; box-shadow: 0 0 0 10px rgba(218,32,16,.12); }
  100%{ transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(218,32,16,.0); }
}
@media (prefers-reduced-motion: reduce){
  .rlf-liveDot{ animation: none; }
}


/* Infinite scroll loader */
.rlf-loadMore{
  margin: 1rem 0 0;
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #374151;
  font-weight: 800;
  font-size: .9rem;
}
.rlf-loadSpinner{
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 2px solid rgba(17,24,39,.18);
  border-top-color: var(--primary);
  animation: rlfSpin .9s linear infinite;
}
@keyframes rlfSpin{ to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){
  .rlf-loadSpinner{ animation: none; }
}
