/* the footer maker: the stage at a footer's size on the cobalt, the line of code under it */
.pf { display: grid; gap: var(--gap); min-width: 0; }
.pf-frame { border-radius: var(--r); background: var(--cobalt); overflow: hidden; }
.pf-stage { position: relative; height: clamp(340px, 46vh, 440px); cursor: crosshair; }
.pf-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* the phone view: the footer at a phone's width, as it draws there (fewer trees, a single willow) */
.pf-frame.phone { background: var(--paper-2); padding: 18px 0; } .pf-frame.phone .pf-stage { width: 390px; max-width: 100%; height: 340px; margin: 0 auto; border-radius: 14px; overflow: hidden; background: var(--cobalt); }
.pf-out { display: flex; align-items: center; gap: 12px; border-radius: 14px; background: var(--paper-2); padding: 12px 12px 12px 16px; }
.pf-code { flex: 1; margin: 0; min-width: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.pf-copy { flex: none; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--cobalt); color: var(--white); font-size: 13px; cursor: pointer; }
.pf-copy:hover { background: var(--navy); }
/* on a phone the footer is already at a phone's width, so the view switch goes */
@media (max-width: 900px) { .pf-copy { min-height: 44px; } .pk > .pk-row[data-k="view"] { display: none !important; } }

/* the gallery of composed footers */
.pf-gal { margin-top: clamp(18px, 2.4vw, 30px); display: grid; gap: 12px; }
.pf-gh { font-size: 13px; color: var(--muted); }
.pf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.pf-card { display: grid; gap: 8px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); font: 400 14px/1.3 var(--sans); }
.pf-card img { width: 100%; height: auto; aspect-ratio: 640 / 310; object-fit: cover; border-radius: 12px; background: var(--cobalt); box-shadow: 0 0 0 0 var(--chart); transition: box-shadow .25s var(--ease), translate .35s var(--ease); }
.pf-card:hover img { translate: 0 -3px; } .pf-card:focus-visible { outline: none; } .pf-card:focus-visible img { box-shadow: 0 0 0 3px var(--cobalt); }
.pf-card[aria-pressed="true"] img { box-shadow: 0 0 0 3px var(--chart); } .pf-card[aria-pressed="true"] span { color: var(--cobalt); }
@media (max-width: 1100px) { .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-card { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .pf-card img { transition: none; } }
