The design language that makes your AI harness better at design.
JavaScript
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Edge-flush cards fixture (browser-only)</title>
<style>
body { font-family: system-ui, sans-serif; margin: 0; color: #1a1a1a; background: #f2f2f4; }
h2 { padding: 16px 24px 0; font-size: 16px; }
.scroller { width: 600px; margin: 8px 24px 24px; overflow-x: auto; display: flex; scroll-snap-type: x mandatory; background: #e4e4e8; }
.panel { flex: 0 0 auto; scroll-snap-align: start; }
.card { background: #fff; border-radius: 10px; height: 90px; padding: 12px; box-sizing: border-box; margin-bottom: 12px; }
.plain { height: 90px; padding: 12px; box-sizing: border-box; }
/* FLAG: first panel is wider than the scroller's clip box, so its cards
keep a 16px left gutter but end 4px past the right clip edge. */
.flag-pager .panel-wide { width: 620px; }
.flag-pager .panel-wide .card { margin-left: 16px; width: 588px; }
.flag-pager .panel-ok { width: 600px; }
.flag-pager .panel-ok .card { margin-left: 16px; width: 568px; }
/* PASS: every panel keeps a symmetric inset. */
.pass-even .panel { width: 600px; }
.pass-even .card { margin-left: 16px; width: 568px; }
/* PASS: deliberate peek carousel; the third card is cut mid-card, far
past the clip edge, which reads as an affordance rather than a bug. */
.pass-peek { gap: 12px; padding: 12px 0 12px 16px; }
.pass-peek .card { flex: 0 0 auto; width: 260px; margin: 0; }
/* PASS: flush children without card styling are plain content, not cards. */
.pass-plain .panel { width: 620px; }
.pass-plain .plain { margin-left: 16px; width: 588px; }
/* PASS: one box past the clip edge is not a row of cards. */
.pass-lone .panel-wide { width: 620px; }
.pass-lone .card { margin-left: 16px; width: 588px; }
/* PASS: a wrapper that hides x overflow scrolls only on y (the shorthand
computes to `hidden auto`). */
.pass-x-hidden { overflow-x: hidden; overflow-y: auto; }
.pass-x-hidden .panel-wide { width: 620px; }
.pass-x-hidden .panel-wide .card { margin-left: 16px; width: 588px; }
.pass-x-hidden .panel-ok { width: 600px; }
.pass-x-hidden .panel-ok .card { margin-left: 16px; width: 568px; }
</style>
</head>
<body>
<h2>Flag: first panel wider than its clip box</h2>
<div class="scroller flag-pager">
<div class="panel panel-wide">
<div class="card">Card cut off at the right clip edge while keeping its left gutter.</div>
<div class="card">Second card in the oversized panel, also flush against the edge.</div>
</div>
<div class="panel panel-ok">
<div class="card">Sibling panel card with the intended inset on both sides.</div>
</div>
</div>
<h2>Pass: symmetric insets</h2>
<div class="scroller pass-even">
<div class="panel"><div class="card">Card with an even gutter on both sides of the clip box.</div></div>
<div class="panel"><div class="card">Second panel card, also properly inset.</div></div>
</div>
<h2>Pass: deliberate peek</h2>
<div class="scroller pass-peek">
<div class="card">First peek card fully visible.</div>
<div class="card">Second peek card fully visible.</div>
<div class="card">Third card cut mid-card as a scroll affordance.</div>
<div class="card">Fourth card entirely off-screen.</div>
</div>
<h2>Pass: plain content, not cards</h2>
<div class="scroller pass-plain">
<div class="panel"><div class="plain">Unstyled text block flush against the edge is not a card.</div></div>
<div class="panel"><div class="plain">Second plain block.</div></div>
</div>
<h2>Pass: one box past the clip edge, no row</h2>
<div class="scroller pass-lone">
<div class="panel panel-wide">
<div class="card">A lone box keeping its left gutter while it runs past the right edge.</div>
</div>
</div>
<h2>Pass: a wrapper that hides x overflow</h2>
<div class="scroller pass-x-hidden">
<div class="panel panel-wide">
<div class="card">Card in a wrapper that hides sideways overflow and scrolls on y only.</div>
</div>
<div class="panel panel-ok">
<div class="card">Sibling panel card in the same wrapper.</div>
</div>
</div>
</body>
</html>