/* ==========================================================================
   Sandbox: the project cards on the list page and the pieces of a project's
   devlog page. Loaded after site.css by source/sandbox.blade.php and the
   pages in source/_sandbox. Everything here builds on the classes and custom
   properties in site.css.
   ========================================================================== */

/* Project cards on the list page: the facts run the full width of the card,
   under the text and the thumbnail. */
.projects .card__body { flex-wrap: wrap; row-gap: 0; }
.projects .card__text { flex: 1; }
.projects .card__foot { flex-basis: 100%; }

/* The log: dated entries under one sec-title heading, each an <article> inside .prose */
.log > :first-child { margin-top: 0; }
.entry + .entry { margin-top: var(--s7); }
.entry > * + * { margin-top: 1.25em; }
.entry h3 { margin-top: 0; }

/* A long file path in a code bar wraps onto a second line, so the bar needs line spacing */
.log .code__bar { align-items: baseline; line-height: 1.5; }

/* Contents list of entries: room for a date like "Nov 17" in the first column */
.toc--dates li a { grid-template-columns: 4rem 1fr; }

/* A .next list whose labels are longer than one short word */
.next--wide li { grid-template-columns: 8rem minmax(0, 1fr); }

/* A mock-up of a screen, drawn as a card: the strip is the address bar
   (the address wraps on a phone instead of being cut short), the chosen
   option carries a copper rule, and the button is not a link. */
.screen .card__strip code { white-space: normal; }
.screen .card__text { flex: 1; }
.screen .is-picked { border-top-color: var(--copper); }
.screen .btn { pointer-events: none; }

/* A real screenshot uses the same frame: the image fills the card under the strip. */
.screen img { width: 100%; }

/* A diagram: rows of plain boxes joined by arrows. An arrow stays with the
   box after it when a row wraps. */
.flow { display: grid; gap: var(--s5); }
.flow__row, .flow__next { display: flex; align-items: center; gap: var(--s2) var(--s3); }
.flow__row { flex-wrap: wrap; }
.flow__row .label { flex-basis: 100%; margin: 0; }
.flow__node { padding: var(--s2) var(--s3); border: 1px solid var(--line); background: var(--white); color: var(--ink); font: 400 var(--fs-meta)/1.4 var(--font-mono); }
.flow__node span { display: block; color: var(--muted); font: 300 var(--fs-meta)/1.4 var(--font-sans); }
.flow__node--hub { border-color: var(--strip); background: var(--strip); color: var(--white); }
.flow__node--hub span { color: var(--white); }
