/* Nixi's blog (tools/blog.py): posts on a glass panel over the still world, sources under each post, cards for the
   lists — the index, "more from the blog" and the home page's latest. The site's tokens (site.css) do the theming. */

.blog { padding-top: clamp(18px, 3vw, 32px); }
.blog__wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--section-gap); max-width: 900px; }

/* ---------- Breadcrumbs ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; font-size: .9rem; color: var(--text-soft); }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.crumbs li + li::before { content: "›"; opacity: .7; }
.crumbs a { color: inherit; font-weight: 600; }
.crumbs span[aria-current] { overflow: hidden; max-width: 46ch; white-space: nowrap; text-overflow: ellipsis; }
.crumbs ol, .crumbs a { text-shadow: 0 1px 2px rgba(255, 255, 255, .35); }
:root[data-theme="dark"] .crumbs ol, :root[data-theme="dark"] .crumbs a { text-shadow: none; }

/* ---------- The post ---------- */
.post__head { max-width: 68ch; }
.post__title {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: .005em;
  color: var(--heading);
  text-wrap: balance;
}
.post__lede { margin-top: 14px; font-size: clamp(1.08rem, 2vw, 1.22rem); color: var(--text-soft); }
.post__meta { margin-top: 14px; font-size: .92rem; color: var(--text-soft); }
.post__meta a { font-weight: 600; }

.toc {
  margin-top: 26px;
  padding: 16px 20px;
  max-width: 68ch;
  border: 1px solid var(--inner-edge);
  border-radius: var(--radius);
  background: var(--inner);
}
.toc__title { font-family: var(--font-label); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.toc ol { margin-top: 8px; padding-left: 1.3em; display: grid; gap: 4px; }
.toc a { font-weight: 600; text-decoration-thickness: 1px; }

/* ---------- Prose ---------- */
.prose { margin-top: 28px; max-width: 68ch; font-size: 1.08rem; line-height: 1.72; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  margin-top: 2.1em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 3.4vw, 2rem);
  line-height: 1.15;
  color: var(--heading);
  text-wrap: balance;
}
.prose h3 { margin-top: 1.7em; font-size: 1.22rem; font-weight: 700; line-height: 1.3; color: var(--heading); }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { text-decoration-color: var(--rose); text-decoration-thickness: 2px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: .4em; }
.prose li > ul, .prose li > ol { margin-top: .4em; }
.prose strong { color: var(--heading); }
.prose code { white-space: normal; font-weight: 600; }
.prose pre {
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  color: var(--code-fg);
  font-size: .92rem;
  line-height: 1.5;
}
.prose pre code { padding: 0; background: none; white-space: pre; font-weight: 500; }
.prose blockquote {
  padding: 4px 0 4px 18px;
  border-left: 4px solid var(--pink);
  color: var(--text-soft);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--inner-edge); border-radius: var(--radius-sm); background: var(--inner); }
.prose table { width: 100%; border-collapse: collapse; font-size: .96rem; line-height: 1.45; }
.prose th, .prose td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 700; color: var(--heading); background: var(--soft-bg); }
.prose tr:last-child td { border-bottom: 0; }

/* the vault's callouts */
.callout {
  padding: 14px 18px;
  border: 1px solid var(--inner-edge);
  border-left: 5px solid var(--pink);
  border-radius: var(--radius-sm);
  background: var(--inner);
}
.callout > * + * { margin-top: .6em; }
.callout__title { font-weight: 700; color: var(--heading); }
.callout--warning, .callout--danger { border-left-color: var(--red); }
.callout--note, .callout--info, .callout--abstract, .callout--summary { border-left-color: var(--teal); }

/* citations: small numbers that jump to the sources */
.cite { font-size: .76em; line-height: 0; margin-left: 1px; white-space: nowrap; color: var(--text-soft); }
.cite a { font-weight: 700; text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 2px;
  text-underline-offset: 2px; color: var(--heading); padding: 0 1px; }
.cite a:hover { text-decoration-color: currentColor; }

/* ---------- Sources and the note on how it is made ---------- */
.post__sources { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 68ch; }
.post__sources h2 { font-family: var(--font-display); font-size: 1.6rem; color: var(--heading); }
.refs { margin-top: 14px; padding-left: 1.6em; display: grid; gap: 10px; font-size: .95rem; line-height: 1.5; }
.refs li { padding: 4px 6px; border-radius: 8px; scroll-margin-top: 96px; }
.refs li:target { background: var(--soft-bg); outline: 2px solid var(--pink); }
.ref__credit { font-weight: 600; }
.ref__title { font-style: italic; }
.ref__link { overflow-wrap: anywhere; text-decoration-thickness: 1px; }
.ref__accessed, .ref__where { color: var(--text-soft); }
.ref__back { text-decoration: none; color: var(--heading); font-weight: 700; }

.post__note {
  margin-top: 34px;
  max-width: 68ch;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--soft-bg);
  font-size: .92rem;
  color: var(--text-soft);
}
.post__note strong { color: var(--heading); }

/* ---------- Cards: the index, related posts, the home page's latest ---------- */
.post-list { list-style: none; display: grid; gap: 16px; }
@media (min-width: 720px) { .post-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.post-card { display: flex; flex-direction: column; gap: 8px; transition: transform .15s ease, background-color .15s ease; }
.post-card:hover { transform: translateY(-2px); background: var(--surface-2); }
.post-card__title { font-size: 1.2rem; line-height: 1.3; font-weight: 700; color: var(--heading); }
.post-card__title a { text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post-card__title a:focus-visible { outline: none; }
.post-card:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.post-card__desc { color: var(--text-soft); font-size: .98rem; }
.post-card__meta { margin-top: auto; font-size: .86rem; color: var(--text-soft); }
.post-card .eyebrow { font-size: .7rem; }

.blog-index .section-head { margin-bottom: 26px; }
.blog-index__feed { margin-top: 22px; font-size: .92rem; color: var(--text-soft); }
.related__title { font-family: var(--font-display); font-size: 1.6rem; color: var(--heading); margin-bottom: 16px; }
.glass--dark .post-card__title, .glass--dark .post-card__desc, .glass--dark .post-card__meta { color: #fff; }

.home-blog__more { margin-top: 22px; }

@media (prefers-reduced-motion: reduce) {
  .post-card { transition: none; }
  .post-card:hover { transform: none; }
}
@media print {
  .site-header, .site-footer, .crumbs, .related, .toc, .nixi-roam, .world-still { display: none !important; }
  .glass { background: none; box-shadow: none; border: 0; backdrop-filter: none; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .85em; }
}
