function PlaybooksPage() {
  const playbooks = [
    { slug: 'funding', tag: 'Funding', read: '8 min', date: 'May 2026',
      h: 'The first 90 days play for newly funded Series B leaders.',
      p: 'How to time your outreach to the post funding audit window, and the three messages that consistently get replies from VPs sitting on $30M+ of fresh capital.' },
    { slug: 'new-role', tag: 'New role', read: '6 min', date: 'May 2026',
      h: 'Why a new VP is your best lead, for exactly 11 weeks.',
      p: 'The data on the buyer\'s first 90 days window: when they\'re auditing tools, who they trust, and how to land in the right week without sounding opportunistic.' },
    { slug: 'tech-stack', tag: 'Tech stack', read: '7 min', date: 'Apr 2026',
      h: 'Tech stack signals that actually mean buying intent.',
      p: 'Not every tool a company runs is a signal. Here are the seven stack patterns that correlate with replacement intent, and the ones that don\'t.' },
    { slug: 'hiring', tag: 'Hiring', read: '5 min', date: 'Apr 2026',
      h: 'The hiring manager play: target the boss, not the job description.',
      p: 'When a company posts roles, the hiring manager is the buyer. How to find them, anchor your message to the role they\'re filling, and skip the recruiter.' },
    { slug: 'engagement', tag: 'Engagement', read: '6 min', date: 'Mar 2026',
      h: 'Turning content engagement into a 14% reply rate.',
      p: 'The exact prompt structure for opening a conversation off a LinkedIn comment or share, without sounding like you\'re reading them their own post back to them.' },
    { slug: 'website-visitors', tag: 'Website visitors', read: '4 min', date: 'Mar 2026',
      h: 'Your website visitors are already evaluating you. Talk to them.',
      p: 'Most buyers researching you never fill out a form. AiDA identifies the companies and people visiting your site and turns the best fits into conversations.' },
    { slug: 'competitor', tag: 'Competitor', read: '8 min', date: 'Mar 2026',
      h: 'How to ethically mine your competitor\'s audience.',
      p: 'Three sequences for engaging the people commenting on your competitor\'s posts. What\'s fair game, what\'s not, and the line your team should never cross.' },
  ];

  return (
    <React.Fragment>
      <Nav darkOnLoad={true} />

      <section className="page-head">
        <div className="hero-bg" aria-hidden></div>
        <div className="hero-grid" aria-hidden></div>
        <div className="wrap inner">
          <div className="crumb">
            <a href="/">AiDA SDR</a> <span>/</span> Signal playbooks
          </div>
          <h1>
            How to actually work<br/>
            <span className="accent">each signal.</span>
          </h1>
          <p className="lede">
            Field-tested plays from teams running AiDA, what to say, when to say it,
            and the data behind why it works. One playbook per signal type.
            Read in 5–8 minutes.
          </p>
        </div>
      </section>

      <section className="section">
        <div className="wrap">
          <div style={{display:'grid', gridTemplateColumns:'1fr 220px', gap:48, alignItems:'start'}} className="playbook-grid">
            <div>
              <div style={{display:'grid', gridTemplateColumns:'1fr 1fr', gap:20}} className="playbook-list">
                {playbooks.map((pb, i) => (
                  <a key={i} href={`/playbook/${pb.slug}`} className="article" style={{textDecoration:'none'}}>
                    <div className="tag"><ISparkle size={11}/> {pb.tag}</div>
                    <h3>{pb.h}</h3>
                    <p>{pb.p}</p>
                    <div className="meta">
                      <span>{pb.read} read</span>
                      <span>·</span>
                      <span>{pb.date}</span>
                    </div>
                  </a>
                ))}
              </div>
            </div>

            <div className="rail">
              <h5>Browse by signal</h5>
              <ul>
                <li><a href="/playbooks">All playbooks</a></li>
                <li><a href="/playbook/funding">Funding</a></li>
                <li><a href="/playbook/new-role">New role</a></li>
                <li><a href="/playbook/tech-stack">Tech stack</a></li>
                <li><a href="/playbook/hiring">Hiring</a></li>
                <li><a href="/playbook/engagement">Engagement</a></li>
                <li><a href="/playbook/website-visitors">Website visitors</a></li>
                <li><a href="/playbook/competitor">Competitor</a></li>
              </ul>
              <h5 style={{marginTop:32}}>For agencies</h5>
              <ul>
                <li><a href="/agencies">Run AiDA for clients</a></li>
                <li><a href="/contact">Book an agency demo</a></li>
              </ul>
              <div style={{
                marginTop:36, padding:18, borderRadius:12,
                background:'var(--bg-soft)', border:'1px solid var(--line)'
              }}>
                <div style={{fontFamily:'var(--mono)', fontSize:10.5, letterSpacing:'0.08em', color:'var(--indigo)'}}>GET STARTED</div>
                <div style={{marginTop:8, fontSize:14, fontWeight:500, letterSpacing:'-0.01em'}}>Run a playbook live.</div>
                <p style={{margin:'6px 0 0', color:'var(--ink-mute)', fontSize:13, lineHeight:1.5}}>
                  Every playbook here is a built-in signal. Turn one on in minutes.
                </p>
                <a href="https://app.aidasdr.com/signup" className="btn btn-primary btn-sm" style={{marginTop:12, width:'100%', justifyContent:'center'}}>
                  Start 7-day free trial
                </a>
              </div>
            </div>
          </div>
        </div>
      </section>

      <CTABand />
      <Footer />
    </React.Fragment>
  );
}

function CTABand() {
  return (
    <section style={{padding:'40px 0 20px'}}>
      <div className="wrap">
        <div className="cta-band">
          <div className="grid" aria-hidden></div>
          <div className="inner">
            <div className="eyebrow eyebrow-on-dark">Stop reading</div>
            <h2 style={{color:'#fff', marginTop:14, fontSize:'clamp(34px, 4vw, 56px)'}}>
              Run the plays. <span className="serif-it" style={{color:'#a5b4fc'}}>On autopilot.</span>
            </h2>
            <p>Every playbook on this page is already wired into AiDA as a signal config. Plug in, pick the signal, and let it run.</p>
            <div className="ctas">
              <a href="https://app.aidasdr.com/signup" className="btn btn-indigo">Start your 7-day free trial <span className="arrow">→</span></a>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
}

function init() {
  const els = document.querySelectorAll('.section, .cta-band');
  els.forEach(el => el.classList.add('reveal'));
  const io = new IntersectionObserver((entries) => {
    entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add('in'); io.unobserve(e.target); } });
  }, { rootMargin: '0px 0px -80px 0px', threshold: 0.05 });
  els.forEach(el => io.observe(el));
}

ReactDOM.createRoot(document.getElementById('root')).render(<PlaybooksPage />);
requestAnimationFrame(init);
