/* A post's body: one reading column; the contents beside it from 1100 px (sticky), above it below as a card. */

.art { padding-block: 0 var(--section); }
.art-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1100px) { .art-grid { grid-template-columns: minmax(200px, 260px) minmax(0, 46rem); justify-content: center; gap: clamp(40px, 5vw, 96px); } }

.art-toc { display: grid; gap: 12px; padding: 18px 20px; border-radius: var(--radius-tile); background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow-card); }
@media (min-width: 1100px) { .art-toc { position: sticky; top: calc(var(--header-h) + 24px); order: 0; } }
.art-toc b { color: var(--fg-faint); font-size: var(--text-caption); font-weight: 800; }
.art-toc ol { display: grid; gap: 4px; counter-reset: art; }
.art-toc li { counter-increment: art; }
.art-toc a { display: flex; gap: 10px; padding: 6px 8px; border-radius: var(--radius-badge); color: var(--fg); font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; text-decoration: none; transition: background var(--d-default) ease, color var(--d-default) ease; }
.art-toc a::before { content: counter(art); min-width: 1.2em; color: var(--accent-ink); font-weight: 800; }
@media (hover: hover) and (pointer: fine) { .art-toc a:hover { background: var(--accent-soft); color: var(--accent-ink); } }

.art-body { display: grid; gap: 18px; min-width: 0; }
.art-cover { overflow: hidden; margin-bottom: 10px; aspect-ratio: 16 / 9; border-radius: var(--radius-card); box-shadow: var(--shadow-raised); }
.art-cover img { width: 100%; height: 100%; object-fit: cover; }
.art-p { font-size: var(--text-paragraph); line-height: 2; text-wrap: pretty; }
.art-h { margin-top: 18px; font-size: var(--text-headline); line-height: 1.4; font-weight: 800; scroll-margin-top: calc(var(--header-h) + 24px); }
.art-list { display: grid; gap: 10px; padding-inline-start: 1.4em; font-size: var(--text-paragraph); line-height: 1.9; list-style: disc; }
.art-ol { list-style: decimal; }
.art-list li::marker { color: var(--accent-ink); font-weight: 800; }
/* the editor's rich text (lib/content/rich.ts): a heading 3, a list inside an item, a link, a quote, a picture */
.art-h3 { margin-top: 8px; font-size: var(--text-callout); }
.art-list .art-list { margin-top: 10px; }
.art-list li > p + p { margin-top: 6px; }
.art-a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
@media (hover: hover) and (pointer: fine) { .art-a:hover { text-decoration-thickness: 2px; } }
.art-a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-badge); }
.art-quote { display: grid; gap: 8px; padding-inline-start: 18px; border-inline-start: 3px solid var(--accent); color: var(--fg-muted); font-size: var(--text-paragraph); line-height: 2; }
.art-fig { display: grid; gap: 10px; }
.art-fig img { width: 100%; height: auto; border-radius: var(--radius-tile); box-shadow: var(--shadow-tile); }
.art-fig figcaption { color: var(--fg-faint); font-size: var(--text-label); line-height: var(--lh-label); text-align: center; }

.art-tip { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; padding: 18px 20px; border-radius: var(--radius-tile);
  background: var(--accent-soft); border: 1px solid var(--edge); }
.art-tip-ic { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-control); color: var(--on-accent); background: var(--accent); font-size: 20px; }
.art-tip b { color: var(--accent-ink); font-size: var(--text-callout); font-weight: 800; }
.art-tip p { font-size: var(--text-callout); line-height: var(--lh-callout); }

.art-go { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius-tile); color: var(--fg); text-decoration: none;
  background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow-tile); transition: translate var(--d-default) var(--ease-out), border-color var(--d-default) ease, box-shadow var(--d-enter) var(--ease-out); }
.art-go:active { scale: 0.99; }
.art-go:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.art-go-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-control); color: var(--accent-ink); background: var(--accent-soft); font-size: 22px; }
.art-go-t { display: grid; gap: 2px; min-width: 0; }
.art-go-t small { color: var(--fg-faint); font-size: var(--text-caption); font-weight: 800; }
.art-go-t b { font-size: var(--text-callout); font-weight: 800; }
.art-go-t span { color: var(--fg-muted); font-size: var(--text-label); line-height: var(--lh-label); }
.art-go-arrow { color: var(--accent-ink); transition: translate var(--d-default) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .art-go:hover { translate: 0 -2px; border-color: var(--edge-strong); box-shadow: var(--shadow-tile-hover); }
  .art-go:hover .art-go-arrow { translate: -3px 0; }
}
