/* ============================================================================
 * /entitymap.html — the EntityMap's HTML companion. THE ONLY STYLING IT MAY
 * HAVE: the enforced policy is `style-src 'self'` with no `'unsafe-inline'`
 * (serve.ts CSP_BASE), so a <style> block or a style="" attribute in the
 * generated document cannot apply in any browser. This external, same-origin
 * stylesheet is the whole of the page's presentation.
 *
 * The tokens are the site's own (src/styles/app.css @theme): same paper, same
 * ink, same teal link, and the AA-measured muted/body greys the design review
 * chose over the mockup's lighter ones. Nothing here invents a palette.
 *
 * Served as a static file from dist/client by serve.ts (public/entitymap.css),
 * so it needs no route, no build step and no client runtime.
 * ========================================================================== */
:root {
  --paper: #fbf7f3;
  --surface: #ffffff;
  --ink: #2b2a28;
  --body: #57534e;
  --muted: #6b6660;
  --line: #e7e1d9;
  --link: #0f766e;
  --link-hover: #115e59;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.hd {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.brand {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.25;
  color: var(--ink);
}

h2 {
  margin: 2rem 0 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 1.25rem;
  color: var(--ink);
}

h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--ink);
}

.lede {
  max-width: 44rem;
  margin: 0.5rem 0;
}

.toc {
  margin-top: 1rem;
  font-size: 0.9375rem;
}

.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* TAP TARGETS (design review 2026-10-26, finding 6). The site's own pattern
 * (the footer link's `min-h-6` in src/routes/__root.tsx): an anchor in a list is
 * a target, not a word in a sentence, so it gets the site's 24px minimum height
 * and its content centred on that line. The TOC anchors and the relation anchors
 * are the two lists on this page. */
.toc a,
.r a {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
}

/* DELIBERATELY NOT APPLIED TO `cite` (recorded so it is not read as an
 * oversight): the citation's link sits INSIDE a block-level `cite` — inline text
 * in a sentence-shaped line, not a standalone target in a list — so the WCAG
 * 2.2 AA target-size rule's inline exemption applies and the anchor is left as
 * inline text. Its own line box is already taller than 24px. */

.e {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  margin: 0.75rem 0;
}

.id {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.id code {
  font-size: 0.8125rem;
}

.d {
  margin: 0 0 0.5rem;
}

.r {
  margin: 0 0 0.5rem;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
}

blockquote {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0 0.5rem 0.875rem;
  border-left: 3px solid var(--line);
  font-size: 0.9375rem;
}

blockquote p {
  margin: 0 0 0.25rem;
}

cite {
  display: block;
  font-size: 0.8125rem;
  font-style: normal;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.ft {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 44rem;
}
