/* Document cards (tools/doc-card.mjs): one component, two variants (full = library grid, compact = related-document block). */
.doc-card { display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface-1); box-shadow: var(--elev); overflow: hidden; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.doc-card:hover, .doc-card:focus-within { border-color: var(--border-hover); box-shadow: var(--elev), 0 12px 32px -20px rgba(1, 137, 253, .45); }
.doc-card__img { aspect-ratio: 1000 / 563; background: var(--surface-2, #0b0d14); border-bottom: 1px solid var(--border); overflow: hidden; }
.doc-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.doc-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; padding: 1rem 1.1rem 1.15rem; }
.doc-card__t { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.doc-card__t a { color: inherit; text-decoration: none; }
.doc-card__t a:hover { text-decoration: underline; text-underline-offset: 3px; }
.doc-card__d { margin: 0; color: var(--text-dim); max-width: 60ch; }
.doc-card__m { margin: 0; font-family: var(--font-mono); font-size: .76rem; letter-spacing: .02em; color: var(--text-muted); }
.doc-card__dl { margin-top: .35rem; }
.doc-card__dl:focus-visible, .doc-card__t a:focus-visible, .docs-rel__all a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
/* library */
.docs-row + .docs-row { margin-top: clamp(2rem, 4vw, 3rem); }
.docs-row__l { margin: 0 0 1rem; }
.docs-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.docs-note { margin: clamp(2rem, 4vw, 3rem) 0 0; color: var(--text-muted); font-size: .9rem; }
/* compact: cover thumbnail left, text right, stacked on narrow screens */
.docs-rel { padding-block: clamp(1.5rem, 3vw, 2.5rem); }
.docs-rel__list { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .docs-rel__list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.doc-card--compact { grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .doc-card--compact { grid-template-columns: minmax(9rem, 14rem) 1fr; align-items: start; }
  .doc-card--compact .doc-card__img { margin: 1rem 0 1rem 1rem; border: 1px solid var(--border); border-radius: calc(var(--r-panel) - 4px); }
}
.doc-card--compact .doc-card__t { font-size: 1rem; }
.docs-rel__all { margin: .75rem 0 0; font-size: .9rem; }
.docs-rel__all a { color: var(--text-muted); }
/* home: a discreet link in the hero's own bottom margin (absolutely positioned: no existing element moves, no extra scroll) */
.hero-doc { position: absolute; z-index: 2; left: 50%; bottom: 3.6rem; transform: translateX(-50%); white-space: nowrap; font-family: var(--font-mono); font-size: .76rem; letter-spacing: .02em; color: var(--text-muted); text-decoration: none; padding: .25rem .4rem; }
.hero-doc:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.hero-doc:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (min-width: 900px) { .hero-doc { left: clamp(1rem, 4vw, 2.5rem); bottom: 1.1rem; transform: none; } }
@media (prefers-reduced-motion: reduce) { .doc-card { transition: none; } }

/* the home hero overlaps the next section by design (negative margin); without its own layer the following section paints and hit-tests over the link and the scroll cue */
.c-hero:has(> .hero-doc) { z-index: 1; }
