---
const faqs = [
  {
    q: 'What exactly is TokenBar?',
    a: 'A free, open-source macOS menu-bar app that reads your local AI coding session logs and shows what you’re spending — across a contribution graph, per-model and per-agent breakdowns, daily and hourly views, and live throughput. No CLI to run, no account.',
  },
  {
    q: 'Which AI coding tools does it track?',
    a: '25+ agents from their local logs — Claude Code, Codex CLI, Cursor, OpenCode, Gemini CLI, Copilot CLI, Amp, Droid, Hermes, Goose, Kilo/KiloCode, Roo Code, Qwen, Kimi, Crush, Zed, Kiro, Trae, Warp and more. Parsing is handled by the vendored tokscale-core, so coverage tracks tokscale.',
  },
  {
    q: 'Does it cost anything?',
    a: 'No. TokenBar is MIT-licensed and free — no subscription, no paid tier, no telemetry.',
  },
  {
    q: 'What is the native beta?',
    a: 'A ground-up Swift rewrite of TokenBar — SwiftUI shell, Liquid Glass on macOS 26, SceneKit 3D, Sparkle updates — around the same Rust parsing core. It installs as a separate “TokenBar Beta” app, so you can run it alongside stable. It becomes TokenBar v1.0.0 once the beta settles.',
  },
  {
    q: 'Where does my data go?',
    a: 'Nowhere. Usage history is read locally from disk. Network requests are limited to the signed updater manifest, public model-pricing data, and optional Codex/Claude quota lookups using the OAuth credentials already on your machine.',
  },
  {
    q: 'Intel Mac or Windows?',
    a: 'TokenBar targets Apple Silicon (arm64). Stable runs on macOS 11+, the native beta on macOS 14+ (Liquid Glass needs macOS 26). There’s no Intel, Windows, or Linux build.',
  },
  {
    q: 'How do I uninstall it?',
    a: 'brew uninstall --cask tokenbar.',
  },
]
---

<section class="section faq">
  <div class="container faq-grid">
    <div class="section-head faq-head">
      <p class="eyebrow">Questions</p>
      <h2>Good to know.</h2>
      <p>The short answers most people want before installing.</p>
    </div>
    <div class="faq-list">
      {faqs.map((f, i) => (
        <details open={i === 0}>
          <summary>
            <span>{f.q}</span>
            <span class="chev" aria-hidden="true"></span>
          </summary>
          <p>{f.a}</p>
        </details>
      ))}
    </div>
  </div>
</section>

<style>
  .faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
  .faq-head { position: sticky; top: 28px; margin-bottom: 0; }
  .faq-list { display: grid; gap: 12px; }
  details {
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: color-mix(in oklab, var(--panel) 55%, transparent);
    padding: 4px 20px; transition: border-color .18s;
  }
  details[open] { border-color: var(--line-strong); }
  summary {
    list-style: none; cursor: pointer; padding: 16px 0;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
  }
  summary::-webkit-details-marker { display: none; }
  .chev { width: 12px; height: 12px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s; flex: 0 0 auto; }
  details[open] .chev { transform: rotate(-135deg); }
  details p { color: var(--muted); font-size: 15px; padding: 0 0 18px; max-width: 62ch; }

  @media (max-width: 820px) {
    .faq-grid { grid-template-columns: 1fr; }
    .faq-head { position: static; }
  }
</style>
