// screens-feed.jsx — Reverb's silent-triage surface. Vertical-snap card stream
// with Reverb's editorial voice: bold display + the "for you" italic-serif
// personal note at the bottom of every card.
//
// Three screen states:
//   1. ScreenFeedNews         — default browse (news-bite card)
//   2. ScreenFeedAddSheet     — tapping a topic chip shows the add-to-interests sheet
//   3. ScreenFeedMultiSelect  — multi-select mode → build a custom brief

// ─────────────────────────────────────────────────────────────
// Shared chrome — status bar + right action rail + tab bar
// ─────────────────────────────────────────────────────────────
function FeedChrome({ dark = false, accent = 'var(--accent)', listenDur, save = false, dim = false }) {
  return (
    <>
      <StatusBar time="3:42" dark={!dark}/>

      {/* Right action rail */}
      <div style={{
        position: 'absolute', right: 12, top: '46%', transform: 'translateY(-50%)',
        zIndex: 25, display: 'flex', flexDirection: 'column', gap: 14, alignItems: 'center',
        opacity: dim ? 0.25 : 1, pointerEvents: dim ? 'none' : 'auto',
      }}>
        <RailBtn icon={IcPlay} label={listenDur || 'Listen'} dark={dark} primary accent={accent}/>
        <RailBtn icon={IcBookmark} label={save ? 'Saved' : 'Save'} dark={dark} active={save} accent={accent}/>
        <RailBtn icon={IcShare} label="Share" dark={dark}/>
        <RailBtn icon={IcThumbDn} label="Skip" dark={dark}/>
        <RailBtn icon={IcMore} label="" dark={dark}/>
      </div>

      <TabBar active="feed" onDark={dark}/>
      <HomeIndicator light={dark}/>
    </>
  );
}

function RailBtn({ icon: Icon, label, dark, primary, active, accent = 'var(--accent)' }) {
  const baseBg = primary
    ? accent
    : dark ? 'rgba(255,255,255,0.10)' : 'rgba(24,30,50,0.06)';
  const baseStroke = primary
    ? '#fff'
    : active ? accent
    : dark ? '#fff' : 'var(--text)';
  return (
    <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 4 }}>
      <div style={{
        width: primary ? 52 : 44, height: primary ? 52 : 44,
        borderRadius: primary ? 16 : 13,
        background: baseBg,
        backdropFilter: !primary ? 'blur(12px)' : 'none',
        WebkitBackdropFilter: !primary ? 'blur(12px)' : 'none',
        border: !primary && dark ? '0.5px solid rgba(255,255,255,0.18)'
              : !primary ? '0.5px solid rgba(24,30,50,0.10)'
              : 'none',
        boxShadow: primary
          ? '0 8px 22px rgba(61,143,224,0.45), 0 2px 0 rgba(24,30,50,0.20)'
          : 'none',
        display: 'flex', alignItems: 'center', justifyContent: 'center',
        color: baseStroke,
      }}>
        <Icon s={primary ? 22 : 19} w={primary ? 2.2 : 1.8}
          stroke={baseStroke}
          fill={Icon === IcBookmark && active ? 'currentColor' : undefined}
        />
      </div>
      {label && (
        <span style={{
          fontSize: 10, fontWeight: 700, letterSpacing: '-0.01em',
          color: dark ? 'rgba(255,255,255,0.75)' : 'var(--text-2)',
        }}>{label}</span>
      )}
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// FeedSourceRow — top-of-card source + interest + time
// ─────────────────────────────────────────────────────────────
function FeedSourceRow({ src, host, time, interest, interestBg = 'var(--accent)', dark }) {
  return (
    <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 10 }}>
      <div style={{
        display: 'inline-flex', alignItems: 'center', gap: 7,
        padding: '5px 11px 5px 6px', borderRadius: 999,
        background: dark ? 'rgba(255,255,255,0.12)' : 'var(--bg-1)',
        border: dark ? '0.5px solid rgba(255,255,255,0.16)' : '0.5px solid var(--line-strong)',
        backdropFilter: dark ? 'blur(10px)' : 'none',
        WebkitBackdropFilter: dark ? 'blur(10px)' : 'none',
      }}>
        <Favicon src={src} size={16}/>
        <span style={{ fontSize: 11.5, fontWeight: 600, color: dark ? '#fff' : 'var(--text)', letterSpacing: '-0.01em' }}>{host}</span>
        <span style={{ width: 3, height: 3, background: dark ? 'rgba(255,255,255,0.4)' : 'var(--text-4)', borderRadius: '50%' }}/>
        <span style={{ fontSize: 11, color: dark ? 'rgba(255,255,255,0.6)' : 'var(--text-3)', fontWeight: 500 }}>{time}</span>
      </div>

      {interest && (
        <span style={{
          padding: '5px 10px', borderRadius: 999,
          background: interestBg, color: '#fff',
          fontSize: 10, fontWeight: 800, letterSpacing: '0.08em', textTransform: 'uppercase',
          boxShadow: '0 2px 0 rgba(24,30,50,0.18)',
        }}>{interest}</span>
      )}
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// ForYouNote — Reverb's italic-serif "what this means to you" callout
// Never drop this. It's the editorial voice.
// ─────────────────────────────────────────────────────────────
function ForYouNote({ children, dark, kicker = 'WHY THIS MATTERS TO YOU', accent }) {
  return (
    <div style={{
      borderLeft: `2px solid ${accent || 'var(--accent)'}`,
      paddingLeft: 12, marginTop: 14,
    }}>
      <div style={{
        fontSize: 9.5, fontWeight: 800,
        letterSpacing: '0.14em', textTransform: 'uppercase',
        color: dark ? 'rgba(255,255,255,0.55)' : 'var(--text-3)',
        marginBottom: 5,
      }}>{kicker}</div>
      <div style={{
        fontFamily: 'var(--serif)', fontStyle: 'italic',
        fontSize: 15.5, lineHeight: 1.36, letterSpacing: '-0.01em',
        color: dark ? 'rgba(255,255,255,0.92)' : 'var(--text)',
        textWrap: 'balance',
      }}>{children}</div>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// CardNewsBite — the default Feed card.
// Shared between all three feed screen states.
// ─────────────────────────────────────────────────────────────
function CardNewsBite() {
  return (
    <div style={{
      position: 'absolute', inset: 0,
      background: 'var(--text)', color: '#fff',
      padding: '76px 70px 116px 22px',
      display: 'flex', flexDirection: 'column',
      overflow: 'hidden',
    }}>
      <div style={{ position: 'absolute', right: -28, bottom: 240, opacity: 0.85 }}>
        <BigGlyph size={180} kind="chip" bg="var(--magenta)" fg="#fff" rotate={-12}/>
      </div>

      <FeedSourceRow src="bloomberg" host="bloomberg.com" time="2h ago"
        interest="HBM SUPPLY" interestBg="var(--accent)" dark/>

      <div style={{ flex: 1, display: 'flex', flexDirection: 'column', justifyContent: 'center', position: 'relative' }}>
        <div className="rv-overline" style={{ color: 'rgba(255,255,255,0.55)', marginBottom: 12 }}>↗ HEADLINE</div>
        <h1 className="rv-display" style={{ margin: 0, fontSize: 38, color: '#fff', textWrap: 'balance' }}>
          SK Hynix just ate 40% of next year's HBM3E supply — at <span style={{ color: 'var(--yellow)' }}>2× last quarter's price</span>.
        </h1>
        <p style={{ marginTop: 14, fontSize: 14.5, lineHeight: 1.5, color: 'rgba(255,255,255,0.75)', maxWidth: 280 }}>
          NVIDIA locked a multi-year deal; Micron's allocation just got noticeably tighter. The cost is moving onto someone's bill.
        </p>

        <ForYouNote dark accent="var(--accent)">
          You hold the AMD-via-MI300 thesis. This pricing pressure shows up in their next gross-margin guide — watch the May call.
        </ForYouNote>
      </div>

      <div style={{ display: 'flex', alignItems: 'center', gap: 8, fontSize: 11, color: 'rgba(255,255,255,0.55)' }}>
        <span>3 of today's 14</span>
        <span style={{ width: 3, height: 3, background: 'rgba(255,255,255,0.4)', borderRadius: '50%' }}/>
        <span>Updated 7:24</span>
        <span style={{ width: 3, height: 3, background: 'rgba(255,255,255,0.4)', borderRadius: '50%' }}/>
        <SourceDotRow srcs={['bloomberg','semianalysis','ft']} size={11}/>
        <span>3 sources</span>
      </div>

      <FeedPeek title="Anthropic's coding-agent post, decoded" host="stratechery" dark/>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// FeedPeek — bottom-of-card peek showing the next card sliver
// ─────────────────────────────────────────────────────────────
function FeedPeek({ title, host, dark }) {
  return (
    <div style={{
      position: 'absolute', left: 0, right: 0, bottom: 78,
      height: 38,
      background: dark ? 'rgba(255,255,255,0.04)' : 'rgba(24,30,50,0.04)',
      borderTop: dark ? '0.5px solid rgba(255,255,255,0.10)' : '0.5px solid var(--line)',
      display: 'flex', alignItems: 'center', justifyContent: 'space-between',
      padding: '0 22px 0 22px',
      pointerEvents: 'none',
    }}>
      <div style={{ display: 'flex', alignItems: 'center', gap: 8, minWidth: 0 }}>
        <span style={{
          fontSize: 9, fontWeight: 800, letterSpacing: '0.12em',
          color: dark ? 'rgba(255,255,255,0.5)' : 'var(--text-3)',
        }}>NEXT</span>
        <span style={{
          fontSize: 12, fontWeight: 600, letterSpacing: '-0.01em',
          color: dark ? 'rgba(255,255,255,0.75)' : 'var(--text-2)',
          overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap',
          maxWidth: 220,
        }}>{title}</span>
      </div>
      <Favicon src={host} size={14}/>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// State 1 — Feed (default)
// ─────────────────────────────────────────────────────────────
function ScreenFeedNews() {
  return (
    <div className="rv-screen rv" style={{ background: 'var(--text)' }}>
      <CardNewsBite/>
      <FeedChrome dark listenDur="1:24"/>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// State 2 — Feed + Add-to-interest sheet
// User tapped the interest tag → sheet to add this topic to interests
// ─────────────────────────────────────────────────────────────
function ScreenFeedAddSheet() {
  return (
    <div className="rv-screen rv" style={{ background: 'var(--text)' }}>
      <CardNewsBite/>

      {/* Dimming scrim */}
      <div style={{
        position: 'absolute', inset: 0, background: 'rgba(0,0,0,0.55)',
        zIndex: 22,
      }}/>

      {/* Sheet */}
      <div style={{
        position: 'absolute', left: 0, right: 0, bottom: 0,
        background: 'var(--bg)',
        borderTopLeftRadius: 28, borderTopRightRadius: 28,
        padding: '12px 18px 100px',
        zIndex: 30,
        boxShadow: '0 -24px 60px rgba(0,0,0,0.50)',
        maxHeight: '76%', overflow: 'hidden',
      }}>
        {/* Grabber */}
        <div style={{ display: 'flex', justifyContent: 'center', marginBottom: 14 }}>
          <div style={{ width: 38, height: 4, background: 'var(--text-4)', borderRadius: 999 }}/>
        </div>

        {/* Header */}
        <div style={{ display: 'flex', alignItems: 'flex-start', gap: 14, marginBottom: 14 }}>
          <ColorChip size={48} kind="bolt" bg="var(--accent)" fg="#fff" radius={12}/>
          <div style={{ flex: 1 }}>
            <div className="rv-overline" style={{ fontSize: 9.5, marginBottom: 4 }}>↗ KEEP TRACK OF</div>
            <div style={{ fontFamily: 'var(--display)', fontWeight: 800, fontSize: 20, color: 'var(--text)', letterSpacing: '-0.035em', lineHeight: 1.1 }}>
              HBM &amp; AI accelerator supply
            </div>
          </div>
        </div>

        {/* Reverb's read */}
        <div style={{
          borderLeft: '2px solid var(--magenta)',
          paddingLeft: 12, marginBottom: 16,
        }}>
          <div style={{ fontSize: 9.5, fontWeight: 800, letterSpacing: '0.14em', textTransform: 'uppercase', color: 'var(--text-3)', marginBottom: 4 }}>
            REVERB'S READ
          </div>
          <div style={{ fontFamily: 'var(--serif)', fontStyle: 'italic', fontSize: 14, lineHeight: 1.42, color: 'var(--text)' }}>
            You've thumbed-up 5 cards on this topic in 2 weeks. Want it as a tracked interest?
          </div>
        </div>

        {/* What you'll get */}
        <div style={{ marginBottom: 14 }}>
          <div className="rv-overline" style={{ fontSize: 10, marginBottom: 8 }}>YOU'LL GET</div>
          <div style={{
            background: 'var(--bg-1)', border: '0.5px solid var(--line)',
            borderRadius: 12, padding: '12px 14px',
          }}>
            <BenefitRow icon="✓" label="In your morning brief" sub="A 30-90s segment when something moves"/>
            <BenefitRow icon="✓" label="4 starter sources"  sub="Bloomberg, SemiAnalysis, FT, Reuters"/>
            <BenefitRow icon="✓" label="3-item starting dossier"  sub="Background pieces Reverb's read already"/>
          </div>
        </div>

        {/* Add to existing? */}
        <div className="rv-overline" style={{ fontSize: 10, marginBottom: 8 }}>OR ADD TO AN EXISTING ONE</div>
        <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap', marginBottom: 16 }}>
          <ExistingInterestChip name="Semiconductors & HBM" tint="var(--text)" suggested/>
          <ExistingInterestChip name="AI policy & geopolitics" tint="var(--magenta)"/>
        </div>

        {/* CTAs */}
        <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
          <button style={{
            width: '100%', height: 52, borderRadius: 14, border: 0,
            background: 'var(--accent)', color: '#fff',
            fontFamily: 'var(--display)', fontWeight: 700, fontSize: 15, letterSpacing: '-0.01em',
            display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 8,
            boxShadow: '0 2px 0 rgba(24,30,50,0.18), 0 10px 22px rgba(61,143,224,0.30)',
          }}>
            <IcPlus s={16} w={2.4}/> Track as new interest
          </button>
          <button style={{
            width: '100%', height: 48, borderRadius: 14, border: '0.5px solid var(--line-strong)',
            background: 'var(--bg-1)', color: 'var(--text-2)',
            fontFamily: 'var(--sans)', fontWeight: 600, fontSize: 13.5,
          }}>
            Just save this card
          </button>
        </div>
      </div>

      <FeedChrome dark dim listenDur="1:24"/>
    </div>
  );
}

function BenefitRow({ icon, label, sub }) {
  return (
    <div style={{ display: 'flex', alignItems: 'flex-start', gap: 10, padding: '6px 0' }}>
      <div style={{
        width: 18, height: 18, borderRadius: 999, flexShrink: 0,
        background: 'var(--accent)', color: '#fff',
        display: 'flex', alignItems: 'center', justifyContent: 'center',
        fontSize: 11, fontWeight: 800,
      }}>
        <IcCheck s={11} w={2.6}/>
      </div>
      <div style={{ flex: 1 }}>
        <div style={{ fontSize: 13, fontWeight: 600, color: 'var(--text)', letterSpacing: '-0.01em' }}>{label}</div>
        <div style={{ fontSize: 11.5, color: 'var(--text-3)', marginTop: 1 }}>{sub}</div>
      </div>
    </div>
  );
}

function ExistingInterestChip({ name, tint, suggested }) {
  return (
    <span style={{
      display: 'inline-flex', alignItems: 'center', gap: 7,
      padding: '7px 12px 7px 6px', borderRadius: 999,
      background: suggested ? 'var(--accent-tint)' : 'var(--bg-1)',
      border: suggested ? '1px solid var(--accent)' : '0.5px solid var(--line)',
      fontSize: 12.5, fontWeight: 600, color: 'var(--text)', letterSpacing: '-0.01em',
    }}>
      <span style={{ width: 14, height: 14, borderRadius: 4, background: tint, flexShrink: 0 }}/>
      {name}
      {suggested && <span style={{ fontSize: 9, fontWeight: 800, color: 'var(--accent)', letterSpacing: '0.08em' }}>· BEST MATCH</span>}
    </span>
  );
}

// ─────────────────────────────────────────────────────────────
// State 3 — Feed multi-select → custom brief
// User entered selection mode. Cards collapse to a compact list,
// each with a checkbox. Floating CTA at bottom builds a custom brief.
// ─────────────────────────────────────────────────────────────
function ScreenFeedMultiSelect() {
  return (
    <div className="rv-screen rv">
      <StatusBar time="3:48"/>

      {/* Top bar */}
      <div style={{ position: 'absolute', top: 56, left: 0, right: 0, padding: '6px 18px',
        display: 'flex', justifyContent: 'space-between', alignItems: 'center', zIndex: 5 }}>
        <button style={{
          padding: '6px 12px', borderRadius: 999, border: '0.5px solid var(--line-strong)',
          background: 'var(--bg-1)', color: 'var(--text-2)',
          fontSize: 12.5, fontWeight: 600,
        }}>Cancel</button>
        <div style={{ textAlign: 'center' }}>
          <div style={{ fontFamily: 'var(--display)', fontWeight: 800, fontSize: 16, letterSpacing: '-0.03em', color: 'var(--text)' }}>
            Pick what to brief
          </div>
          <div style={{ fontSize: 11, color: 'var(--text-3)', marginTop: 1 }}>3 picked &middot; from today's 14</div>
        </div>
        <button style={{
          padding: '6px 12px', borderRadius: 999, border: 0,
          background: 'var(--text)', color: '#fff',
          fontSize: 12, fontWeight: 700, letterSpacing: '0.04em',
        }}>ALL</button>
      </div>

      <div style={{ position: 'absolute', top: 110, left: 0, right: 0, bottom: 130, overflow: 'auto', padding: '6px 14px 30px' }}>
        {/* Group: HBM */}
        <GroupHeader tint="var(--accent)" label="HBM SUPPLY" count={4} picked={2}/>
        <PickRow
          picked tint="var(--accent)"
          src="bloomberg" host="bloomberg.com" time="2h"
          title="SK Hynix locks 40% of next year's HBM3E supply"
          dur="1:24"
        />
        <PickRow
          picked tint="var(--accent)"
          src="semianalysis" host="semianalysis.com" time="5h"
          title="Why Micron's allocation just shrank — the math"
          dur="1:08"
        />
        <PickRow
          tint="var(--accent)"
          src="ft" host="ft.com" time="9h"
          title="TSMC's CoWoS capacity is the real bottleneck"
          dur="0:54"
        />

        {/* Group: AI coding agents */}
        <GroupHeader tint="var(--magenta)" label="AI CODING AGENTS" count={3} picked={1}/>
        <PickRow
          picked tint="var(--magenta)"
          src="stratechery" host="stratechery.com" time="4h"
          title="Agents, scaffolds &amp; the coming bottleneck"
          dur="2:08"
          quote="The bottleneck isn't model capability — it's loop quality."
        />
        <PickRow
          tint="var(--magenta)"
          src="theverge" host="theverge.com" time="1d"
          title="Inside Anthropic's developer push"
          dur="1:18"
        />

        {/* Group: India */}
        <GroupHeader tint="var(--yellow)" label="INDIAN EQUITIES" count={3} picked={0}/>
        <PickRow
          tint="var(--yellow)"
          src="livemint" host="livemint.com" time="just now"
          title="FPI inflows hit ₹2.4L cr — highest March on record"
          dur="0:54"
        />
        <PickRow
          tint="var(--yellow)"
          src="economist" host="economist.com" time="1d"
          title="The mid-cap unwind risk, plainly"
          dur="1:32"
        />
      </div>

      {/* Sticky bottom CTA */}
      <div style={{
        position: 'absolute', left: 0, right: 0, bottom: 30,
        padding: '12px 18px 8px',
        background: 'linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--bg) 32%)',
        zIndex: 10,
      }}>
        <div style={{
          background: 'var(--text)', color: '#fff',
          padding: '14px 14px 14px 16px', borderRadius: 16,
          display: 'flex', alignItems: 'center', gap: 12,
          boxShadow: '0 2px 0 rgba(24,30,50,0.18), 0 12px 28px rgba(24,30,50,0.20)',
        }}>
          {/* Stack of 3 favicon thumbnails */}
          <div style={{ display: 'flex' }}>
            {['bloomberg','semianalysis','stratechery'].map((s, i) => (
              <span key={i} style={{ marginLeft: i ? -6 : 0, border: '2px solid var(--text)', borderRadius: 6, lineHeight: 0 }}>
                <Favicon src={s} size={22} radius={4}/>
              </span>
            ))}
          </div>
          <div style={{ flex: 1, minWidth: 0 }}>
            <div style={{ fontFamily: 'var(--display)', fontWeight: 700, fontSize: 14.5, letterSpacing: '-0.025em' }}>
              Build a brief from these 3
            </div>
            <div style={{ fontSize: 11.5, color: 'rgba(255,255,255,0.6)', marginTop: 1 }}>
              Quick brief &middot; <span className="rv-mono">~4 min</span> &middot; NPR style
            </div>
          </div>
          <button style={{
            padding: '10px 14px', borderRadius: 12, border: 0,
            background: 'var(--accent)', color: '#fff',
            fontFamily: 'var(--display)', fontSize: 13, fontWeight: 700,
            display: 'flex', alignItems: 'center', gap: 6,
            boxShadow: '0 2px 0 rgba(0,0,0,0.20)',
          }}>
            Build <IcChevR s={14} w={2.6}/>
          </button>
        </div>
        <div style={{ marginTop: 8, textAlign: 'center', fontSize: 11, color: 'var(--text-3)' }}>
          or <span style={{ color: 'var(--accent)', fontWeight: 600 }}>paste URLs</span> to add &middot; tap style to change
        </div>
      </div>

      <HomeIndicator/>
    </div>
  );
}

function GroupHeader({ label, tint, count, picked }) {
  return (
    <div style={{ display: 'flex', alignItems: 'center', gap: 8, padding: '12px 4px 8px' }}>
      <span style={{ width: 12, height: 12, borderRadius: 3, background: tint, flexShrink: 0 }}/>
      <span style={{
        fontFamily: 'var(--display)', fontWeight: 800,
        fontSize: 11, letterSpacing: '0.12em', textTransform: 'uppercase',
        color: 'var(--text)',
      }}>{label}</span>
      <span style={{ fontSize: 11, color: 'var(--text-3)', fontWeight: 500 }}>· {picked}/{count}</span>
      <div style={{ flex: 1 }}/>
      <span style={{ fontSize: 11, fontWeight: 600, color: 'var(--accent)' }}>Pick all</span>
    </div>
  );
}

function PickRow({ picked, tint, src, host, time, title, dur, quote }) {
  return (
    <div style={{
      display: 'flex', gap: 12, padding: 12,
      background: picked ? 'var(--accent-tint)' : 'var(--bg-1)',
      border: picked ? '1px solid var(--accent)' : '0.5px solid var(--line)',
      borderRadius: 14, marginBottom: 8,
      boxShadow: picked ? '0 0 0 3px rgba(61,143,224,0.10)' : 'none',
    }}>
      {/* Checkbox */}
      <div style={{
        width: 22, height: 22, borderRadius: 7, flexShrink: 0, marginTop: 2,
        background: picked ? 'var(--accent)' : 'var(--bg-2)',
        border: picked ? 'none' : '0.5px solid var(--line-strong)',
        color: '#fff',
        display: 'flex', alignItems: 'center', justifyContent: 'center',
      }}>
        {picked && <IcCheck s={12} w={2.8}/>}
      </div>

      <div style={{ flex: 1, minWidth: 0 }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 7, marginBottom: 5 }}>
          <Favicon src={src} size={14} radius={4}/>
          <span style={{ fontSize: 11, fontWeight: 600, color: 'var(--text-2)' }}>{host}</span>
          <span style={{ width: 3, height: 3, background: 'var(--text-4)', borderRadius: '50%' }}/>
          <span style={{ fontSize: 11, color: 'var(--text-3)' }}>{time}</span>
          <div style={{ flex: 1 }}/>
          <span style={{ fontSize: 10.5, fontWeight: 700, color: 'var(--text-3)', letterSpacing: '0.04em', fontFamily: 'var(--mono)' }}>{dur}</span>
        </div>
        <div style={{ fontSize: 14, fontWeight: 600, color: 'var(--text)', lineHeight: 1.3, letterSpacing: '-0.015em' }}
          dangerouslySetInnerHTML={{ __html: title }}/>
        {quote && (
          <div style={{
            marginTop: 6, padding: '6px 0',
            borderLeft: `2px solid ${tint}`, paddingLeft: 8,
            fontFamily: 'var(--serif)', fontStyle: 'italic',
            fontSize: 12.5, lineHeight: 1.35, color: 'var(--text-2)',
          }}>{quote}</div>
        )}
      </div>
    </div>
  );
}

Object.assign(window, {
  ScreenFeedNews, ScreenFeedAddSheet, ScreenFeedMultiSelect,
  FeedSourceRow, ForYouNote, FeedPeek,
});
