/* =============================================================
   Ashley Williams — Prose & content elements
   prose.css  (depends on colors_and_type.css)
   The long-form toolkit for blog posts + book essays.
   Wrap content in <article class="aw-prose"> (or any .aw-prose).
   Calm, readable, warm. Honors light + dark themes.
   ============================================================= */

/* ---------- Reading column ---------- */
.aw-prose { max-width: var(--measure); color: var(--fg); }
.aw-prose > * + * { margin-top: 1.1em; }

/* ---------- Headings within prose ---------- */
.aw-prose h1, .aw-prose h2, .aw-prose h3,
.aw-prose h4, .aw-prose h5, .aw-prose h6 {
  font-family: var(--font-serif);
  color: var(--fg-heading);
  font-weight: var(--fw-semibold);
  line-height: 1.25;
  text-wrap: balance;
  margin-top: 1.6em;
}
.aw-prose h1 { font-size: var(--fs-h1); letter-spacing: var(--ls-h1); }
.aw-prose h2 { font-size: var(--fs-h2); letter-spacing: var(--ls-h2); }
.aw-prose h3 { font-size: var(--fs-h3); }
.aw-prose h4 { font-size: var(--fs-h4); }
.aw-prose h5 { font-size: 16px; font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 0.1em; color: var(--aw-mid-purple); }
.aw-prose h6 { font-size: 14px; font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-muted); }

/* ---------- Body copy ---------- */
.aw-prose p { font-size: var(--fs-body-lg); line-height: var(--lh-body-lg); text-wrap: pretty; }
.aw-prose a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.aw-prose a:hover { color: var(--link-hover); }
.aw-prose strong { font-weight: var(--fw-semibold); color: var(--fg-heading); }
.aw-prose em { font-style: italic; }

/* lede / dropcap helpers (opt-in) */
.aw-prose .lede { font-size: var(--fs-lede); line-height: var(--lh-lede); color: var(--fg-heading); }
.aw-prose .dropcap::first-letter {
  font-size: 64px; line-height: 0.8; float: left; padding: 6px 12px 0 0;
  color: var(--aw-pink); font-weight: var(--fw-semibold);
}

/* ---------- Lists ---------- */
.aw-prose ul, .aw-prose ol { padding-left: 1.4em; font-size: var(--fs-body-lg); line-height: var(--lh-body-lg); }
.aw-prose li + li { margin-top: 0.5em; }
.aw-prose ul > li::marker { color: var(--aw-pink); }
.aw-prose ol > li::marker { color: var(--aw-mid-purple); font-variant-numeric: tabular-nums; }

/* ---------- Horizontal rule ---------- */
.aw-prose hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }

/* ---------- Blockquotes ---------- */
/* Default — large serif pull quote, centered, with a raspberry mark */
.aw-prose blockquote {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.4;
  color: var(--fg-heading);
  text-align: center;
  max-width: 30ch;
  margin: 2em auto;
  padding: 0 8px;
}
.aw-prose blockquote::before { content: "\201C"; color: var(--aw-pink); font-size: 1.2em; line-height: 0; vertical-align: -0.18em; margin-right: 0.04em; }
.aw-prose blockquote cite { display: block; margin-top: 0.7em; font-family: var(--font-sans); font-size: 15px; font-style: normal; color: var(--fg-muted); }

/* Left-accent variant — quieter, inline with the text flow */
.aw-prose blockquote.q-left {
  text-align: left;
  max-width: none;
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--aw-pink);
  font-size: 21px;
  color: var(--fg);
}
.aw-prose blockquote.q-left::before { content: none; }

/* ---------- Tables ---------- */
.aw-prose table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 15px; }
.aw-prose thead th {
  text-align: left; font-weight: var(--fw-semibold); color: var(--fg-heading);
  background: var(--aw-lav-wash); padding: 12px 16px; border-bottom: 1px solid var(--border-strong);
}
.aw-prose thead th:first-child { border-top-left-radius: var(--radius-md); }
.aw-prose thead th:last-child { border-top-right-radius: var(--radius-md); }
.aw-prose tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--fg); }
.aw-prose tbody tr:nth-child(even) { background: color-mix(in srgb, var(--aw-lav-wash) 45%, transparent); }

/* ---------- Code ---------- */
.aw-prose code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: var(--aw-mid-purple-soft); color: var(--aw-deep-purple);
  padding: 0.12em 0.4em; border-radius: 6px;
}
.aw-prose pre {
  font-family: var(--font-mono); font-size: 14.5px; line-height: 1.6;
  background: var(--bg-raised); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px 22px; overflow-x: auto;
}
.aw-prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

/* ---------- Figures / images / gallery ---------- */
.aw-prose figure { margin: 2em 0; }
.aw-prose figure img, .aw-prose > img { width: 100%; height: auto; border-radius: var(--radius-lg); display: block; }
.aw-prose figcaption { margin-top: 10px; font-family: var(--font-sans); font-size: 14px; color: var(--fg-muted); text-align: center; }
.aw-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.aw-gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); aspect-ratio: 4 / 3; }

/* embeds */
.aw-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.aw-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* =============================================================
   CALLOUTS — note / tip / important / warning / caution
   Soft tinted panel + icon (not a bare left-border). Each type
   carries its own hue token so dark mode can flip the surface.
   ============================================================= */
.aw-callout {
  --c-accent: var(--aw-mid-purple);
  --c-surface: var(--aw-lav-wash);
  display: grid; grid-template-columns: auto 1fr; gap: 14px;
  align-items: start;
  background: var(--c-surface);
  border: 1px solid color-mix(in srgb, var(--c-accent) 26%, transparent);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 1.6em 0;
}
.aw-callout__icon {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c-accent) 16%, transparent);
  color: var(--c-accent);
}
.aw-callout__icon svg { width: 18px; height: 18px; stroke: var(--c-accent); }
.aw-callout__body { font-size: 16px; line-height: 1.6; color: var(--fg); }
.aw-callout__body :first-child { margin-top: 0; }
.aw-callout__title { font-family: var(--font-sans); font-weight: var(--fw-semibold); color: var(--fg-heading); display: block; margin-bottom: 3px; }

.aw-callout--note     { --c-accent: #8e24aa; --c-surface: var(--aw-lav-wash); }
.aw-callout--tip      { --c-accent: oklch(0.55 0.11 155); --c-surface: oklch(0.96 0.03 155); }
.aw-callout--important { --c-accent: #d81b60; --c-surface: var(--aw-pink-wash); }
.aw-callout--warning  { --c-accent: #b34d00; --c-surface: oklch(0.96 0.045 75); }
.aw-callout--caution  { --c-accent: oklch(0.55 0.16 22); --c-surface: oklch(0.95 0.035 22); }

/* dark-mode surfaces: deep tints, brightened accents */
html[data-theme="dark"] .aw-callout--note     { --c-accent: #cf9ae6; --c-surface: #211733; }
html[data-theme="dark"] .aw-callout--tip      { --c-accent: oklch(0.78 0.12 155); --c-surface: oklch(0.26 0.04 155); }
html[data-theme="dark"] .aw-callout--important { --c-accent: #f4699b; --c-surface: #2a1626; }
html[data-theme="dark"] .aw-callout--warning  { --c-accent: #ffb673; --c-surface: oklch(0.28 0.05 75); }
html[data-theme="dark"] .aw-callout--caution  { --c-accent: oklch(0.74 0.15 22); --c-surface: oklch(0.27 0.06 22); }
