/* /projects/ (tools/build.py build_projects; owner, 20 Oct 2026). The page sits in the header's column (brainlag.css
   .wrap: var(--wrap) and a 24px gutter, 16px on a phone), a track and size filter over two sections that share one
   card. Tokens only, so light and dark follow site.css. No rules or hairlines, no pills; every target is 44px. */
.pjx { --pjx-gut: max(24px, calc((100% - var(--wrap, 1200px)) / 2 + 24px)); padding: clamp(28px, 3vw, 56px) var(--pjx-gut) clamp(56px, 5vw, 96px); }
@media (max-width: 640px) { .pjx { --pjx-gut: 16px; } }

.pjx-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 48px; align-items: end; }
@media (min-width: 900px) { .pjx-head { grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); } }
.pjx-head h1 { font-size: clamp(34px, 1.8vw + 20px, 60px); line-height: 1.02; font-weight: 700; letter-spacing: -.035em; }
.pjx-sub { margin-top: 14px; max-width: 60ch; font-size: clamp(17px, .3vw + 15px, 19px); line-height: 1.55; color: var(--ink-2); }
.pjx-coach .coach-perch { --coach-w: clamp(80px, 3vw + 52px, 124px); }
.pjx-coach .coach-say { margin-bottom: calc(var(--coach-w) * .42); }

/* sections */
.pjx-sec { padding-top: clamp(36px, 3.6vw, 64px); }
.pjx-sh { margin-bottom: 20px; }
.pjx-sh h2 { font-size: clamp(26px, .7vw + 19px, 34px); line-height: 1.1; font-weight: 700; letter-spacing: -.025em; }
.pjx-sp { margin-top: 6px; max-width: 64ch; font-size: 16.5px; line-height: 1.5; color: var(--ink-2); }

/* the grid: one, two, then three across; code-ia.js fills a short last row */
.pjx-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .pjx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1024px) { .pjx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }

/* the card */
.pjx-c { display: flex; flex-direction: column; min-width: 0; padding: 22px 22px 18px; border-radius: 16px; background: var(--paper-0); box-shadow: 0 1px 2px rgba(9, 24, 44, .06), 0 6px 18px rgba(9, 24, 44, .06); scroll-margin-top: 140px; }
[data-theme="dark"] .pjx-c { box-shadow: none; }
.pjx-top { flex: 1 1 auto; min-width: 0; }
.pjx-trk { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 650; color: var(--tc-text); }
/* the project's own state (assets/js/code-projects.js): words, on the track's line, so nothing moves when it is painted */
.pjx-st { margin-left: auto; color: var(--ink-3); font-weight: 600; }
.pjx-st[data-state="started"]::before { content: "In progress"; }
.pjx-st[data-state="done"]::before { content: "Done"; color: var(--teal-text); }
.pjx-t { margin-top: 12px; font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; }
.pjx-d { margin-top: 8px; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.pjx-meta { margin-top: 12px; font-size: 14.5px; line-height: 1.45; color: var(--ink-3); }
.pjx-ms { margin-top: 6px; }
.pjx-ms > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; list-style: none; font-size: 14.5px; font-weight: 650; color: var(--teal-text); }
.pjx-ms > summary::-webkit-details-marker { display: none; }
.pjx-ms .t2-chev { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.pjx-ms[open] > summary .t2-chev { transform: rotate(180deg); }
.pjx-ms .ms { margin-top: 4px; }
.pjx-ms .ms-t, .pjx-ms .ms code { overflow-wrap: anywhere; min-width: 0; }   /* a long path in a milestone wraps inside the card (320px) */
/* what it means for this viewer, then the one action: stacked, so every card in a row ends the same way */
.pjx-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 16px; }
.pjx-acc { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 650; color: var(--teal-text); }
.pjx-prem .pjx-acc { color: var(--prem-text); }
.pjx-acc .icon { width: 14px; height: 14px; }
.pjx-go { height: 46px; }
.pjx-buy { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; color: var(--prem-text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.pjx-prem .pjx-acc.pjx-inc { color: var(--teal-text); }

/* a card that fills a short last row: its words on the left, the action on the right */
.pjx-c.is-wide { flex-direction: row; align-items: flex-end; gap: 32px; }
.pjx-c.is-wide .pjx-top { max-width: 72ch; }
.pjx-c.is-wide .pjx-foot { flex: none; flex-direction: column; align-items: flex-end; margin: 0 0 0 auto; }
@media (max-width: 760px) { .pjx-c.is-wide { flex-direction: column; align-items: stretch; } .pjx-c.is-wide .pjx-foot { align-items: flex-start; margin: 16px 0 0; } }

@media (prefers-reduced-motion: reduce) { .pjx-ms .t2-chev { transition: none; } }
