<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:sm="http://www.sitemaps.org/schemas/sitemap/0.9">

  <xsl:output method="html" indent="yes" doctype-system="about:legacy-compat"/>

  <xsl:template match="/">
    <html lang="en">
      <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1"/>
        <meta name="referrer" content="no-referrer"/>
        <title>Agent-discovery sitemap — dare.co.uk</title>
        <style>
          :root {
            --ink: #0a0a0a;
            --muted: rgba(10,10,10,0.55);
            --accent: rgb(200,54,76);
            --rule: rgba(10,10,10,0.12);
          }
          * { box-sizing: border-box; }
          body {
            font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
            color: var(--ink);
            margin: 0;
            padding: 0;
            background: #fff;
          }
          .wrap {
            max-width: 760px;
            margin: 0 auto;
            padding: 3rem 1.5rem 6rem;
          }
          .kicker {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--muted);
            margin: 0 0 0.5rem;
          }
          h1 {
            font-family: "Newsreader", Georgia, serif;
            font-style: italic;
            font-weight: 500;
            font-size: 2.2rem;
            line-height: 1.15;
            margin: 0 0 1.5rem;
          }
          .lede {
            font-size: 17px;
            line-height: 1.55;
            color: rgba(10,10,10,0.78);
            margin: 0 0 2.5rem;
            max-width: 56ch;
          }
          h2 {
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--muted);
            margin: 2.5rem 0 1rem;
            font-weight: 600;
          }
          table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14px;
          }
          th, td {
            text-align: left;
            padding: 0.75rem 0.5rem;
            border-bottom: 1px solid var(--rule);
            vertical-align: top;
          }
          th {
            font-weight: 600;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--muted);
          }
          a {
            color: var(--accent);
            text-decoration: none;
            border-bottom: 1px solid currentColor;
            padding-bottom: 1px;
          }
          a:hover { color: var(--ink); }
          .meta {
            color: var(--muted);
            font-size: 13px;
          }
          .footer {
            margin-top: 4rem;
            padding-top: 1.5rem;
            border-top: 1px solid var(--rule);
            font-size: 13px;
            color: var(--muted);
            line-height: 1.55;
          }
          .footer a { color: var(--muted); }
          code {
            font: 13px/1 ui-monospace, "SF Mono", Menlo, monospace;
            background: rgba(10,10,10,0.04);
            padding: 0.15rem 0.4rem;
            border-radius: 3px;
          }
        </style>
      </head>
      <body>
        <div class="wrap">
          <p class="kicker">DARE · agent-discovery</p>
          <h1>Resources for AI agents and crawlers</h1>
          <p class="lede">
            This sitemap lists the files an AI agent (Claude, ChatGPT, Perplexity, Googlebot)
            should read to understand what dare.co.uk is, how to cite it, and how to interact
            with it. Browser-readable; the underlying XML is also machine-parseable.
          </p>

          <h2>Resources</h2>
          <table>
            <thead>
              <tr>
                <th>Resource</th>
                <th>Type</th>
                <th>Updated</th>
              </tr>
            </thead>
            <tbody>
              <xsl:for-each select="sm:urlset/sm:url">
                <tr>
                  <td>
                    <a href="{sm:loc}">
                      <xsl:value-of select="sm:loc"/>
                    </a>
                  </td>
                  <td class="meta">
                    <xsl:choose>
                      <xsl:when test="contains(sm:loc, 'llms-full.txt')">extended brand bio</xsl:when>
                      <xsl:when test="contains(sm:loc, 'llms.txt')">short bio + index</xsl:when>
                      <xsl:when test="contains(sm:loc, 'agents.md')">integration instructions</xsl:when>
                      <xsl:when test="contains(sm:loc, 'agent.json')">agent profile (JSON)</xsl:when>
                      <xsl:otherwise>resource</xsl:otherwise>
                    </xsl:choose>
                  </td>
                  <td class="meta">
                    <xsl:value-of select="sm:changefreq"/>
                  </td>
                </tr>
              </xsl:for-each>
            </tbody>
          </table>

          <div class="footer">
            <p>
              dare.co.uk is the editorial archive of <a href="https://www.dare.co.uk/about/">Daniel Dare</a> —
              two decades of business-design observation, recently rebuilt as a static agent-friendly site.
              Citation and quotation with attribution are welcomed. Republication is not.
            </p>
            <p>
              Full sitemap: <a href="/sitemap.xml">/sitemap.xml</a> ·
              Contact: <a href="/contact/">/contact/</a> ·
              <code>hello@dare.co.uk</code>
            </p>
          </div>
        </div>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>
