/**
 * Long-form prose: everything inside `.content`, the column that
 * _default/single.html renders `.Content` into.
 *
 * Two rules govern this file.
 *
 * 1. Nothing here styles a bare element selector. A global `ul, ol { margin:
 *    3rem 0 }` used to reach the navigation menu and the footer link lists,
 *    which is what pushed the site header to 193px tall on every page. Prose
 *    rules stay inside `.content`.
 *
 * 2. Every component is the one declared in main.css, reused. The code block,
 *    the table, the callout and the card each have a single implementation.
 *    Markdown cannot add a class, so the job here is to make the plain tags
 *    markdown emits render as those components.
 */

/* ==========================================================================
   The column
   ========================================================================== */

.content {
  font-size: var(--ax-t-body);
  line-height: 1.75;
  color: var(--ax-text-body);
}

/* Measure. On an 800px column, unconstrained text runs past 100 characters a
   line; 38rem holds it near 76. Tables, code and images stay full width. */
.content > p,
.content > ul,
.content > ol,
.content > blockquote {
  max-width: 38rem;
}

.content > * + * { margin-top: var(--ax-s-4); }

/* ==========================================================================
   Headings. Differentiated by size and family, never by colour: the accent
   budget reserves cyan for the eyebrow, the primary button, the accent rule,
   the one human-action emphasis per section, and mono technical tokens.
   ========================================================================== */

.content h2 {
  margin-top: var(--ax-s-9);
  font-family: var(--ax-font-display);
  font-size: var(--ax-t-h2);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ax-text);
}

.content h3 {
  margin-top: var(--ax-s-7);
  font-family: var(--ax-font-display);
  font-size: var(--ax-t-h3);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.3;
  color: var(--ax-text);
}

.content h4 {
  margin-top: var(--ax-s-6);
  font-family: var(--ax-font-sans);
  font-size: var(--ax-t-h4);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  color: var(--ax-text);
}

.content h5,
.content h6 {
  margin-top: var(--ax-s-5);
  font-family: var(--ax-font-mono);
  font-size: var(--ax-t-microlabel);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ax-text-dim);
}

.content h2 + p,
.content h3 + p,
.content h4 + p,
.content h2 + ul,
.content h3 + ul,
.content h4 + ul {
  margin-top: var(--ax-s-3);
}

/* ==========================================================================
   Body copy, lists, links
   ========================================================================== */

.content li {
  margin-top: var(--ax-s-2);
  line-height: 1.7;
}

.content ul,
.content ol {
  padding-left: 1.25rem;
}

.content ul { list-style: none; padding-left: 1.1rem; }

.content ul > li { position: relative; }

.content ul > li::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 0.7em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ax-text-faint);
}

.content li > ul,
.content li > ol { margin-top: var(--ax-s-2); }

.content a {
  color: var(--ax-text);
  text-decoration: underline;
  text-decoration-color: var(--ax-accent-line);
  text-underline-offset: 3px;
  transition: color var(--ax-dur-1) var(--ax-ease),
    text-decoration-color var(--ax-dur-1) var(--ax-ease);
}

.content a:hover {
  color: var(--ax-accent);
  text-decoration-color: var(--ax-accent);
}

.content strong { font-weight: 700; color: var(--ax-text); }

.content hr {
  margin: var(--ax-s-9) 0;
  border: 0;
  border-top: 1px solid var(--ax-hairline);
  max-width: none;
}

/* ==========================================================================
   Code. The same component main.css declares as `.ax-codeblock`, applied to
   the bare `pre` markdown produces. Inline code is the accent's mono role.
   ========================================================================== */

/* Inline code is declared once, in sections.css, for both scopes. */

/* Every fenced block goes through _markup/render-codeblock.html and comes out
   as `.ax-codeblock`, which brings its own frame. A bare `pre` only appears
   from raw HTML in a page body, and still needs one. */
.content .ax-codeblock { margin-top: var(--ax-s-5); }
.content .ax-codeblock pre {
  margin-top: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

.content pre {
  margin-top: var(--ax-s-5);
  padding: 1.125rem 1.25rem;
  overflow-x: auto;
  background: var(--ax-bg-console);
  border: 1px solid var(--ax-border);
  border-radius: var(--ax-r-md);
  scrollbar-width: thin;
}

.content pre code {
  display: block;
  padding: 0;
  background: none;
  border-radius: 0;
  font-family: var(--ax-font-mono);
  font-size: var(--ax-t-code);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ax-text-body);
}

/* ==========================================================================
   Tables. One implementation, shared with `.ax-table` in main.css. A clipped
   table needs to read as clipped, so the wrapper scrolls and is focusable.
   ========================================================================== */

.content .table-scroll {
  margin-top: var(--ax-s-6);
  overflow-x: auto;
  scrollbar-width: thin;
}

.content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--ax-border);
  border-radius: var(--ax-r-lg);
  overflow: hidden;
  font-size: var(--ax-t-sm);
}

/* A table that is not inside a scroll wrapper still needs its own margin. */
.content > table { margin-top: var(--ax-s-6); }

.content thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  background: var(--ax-bg-2);
  border-bottom: 1px solid var(--ax-border);
  font-family: var(--ax-font-mono);
  font-size: var(--ax-t-microlabel);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ax-text-dim);
  white-space: nowrap;
}

.content tbody td {
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--ax-hairline);
  color: var(--ax-text-body);
  line-height: 1.55;
  vertical-align: top;
}

.content tbody tr:first-child td { border-top: 0; }

.content tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.content tbody td:first-child {
  font-weight: 600;
  color: var(--ax-text);
}

.content table code { white-space: nowrap; }

/* ==========================================================================
   Blockquote as the callout. Markdown's `>` is the only callout syntax an
   author has, so it renders as the accent-edge block used everywhere else.
   ========================================================================== */

.content blockquote {
  position: relative;
  margin-top: var(--ax-s-6);
  padding: 1.25rem 1.5rem;
  padding-left: 1.5rem;
  background: var(--ax-accent-soft);
  border: 1px solid var(--ax-accent-line);
  border-left: var(--ax-bw-accent) solid var(--ax-accent);
  border-radius: var(--ax-r-lg);
  color: var(--ax-text-body);
}

.content blockquote > * + * { margin-top: var(--ax-s-3); }
.content blockquote > ul { padding-left: 1.1rem; }
.content blockquote p:first-child { margin-top: 0; }

/* ==========================================================================
   Narrow viewports
   ========================================================================== */

@media (max-width: 768px) {
  .content > p,
  .content > ul,
  .content > ol,
  .content > blockquote { max-width: none; }

  .content h2 { margin-top: var(--ax-s-7); }
  .content pre { padding: 1rem; }
  .content thead th,
  .content tbody td { padding: 0.625rem 0.75rem; }
}

/* ==========================================================================
   Prose inside a section band. The wrap is 78rem, which is a layout width and
   not a reading width, so the column narrows and stays left-aligned.
   ========================================================================== */

.ax-prose {
  max-width: 52rem;
}

.ax-prose > :first-child { margin-top: 0; }
