/*
  The directory's pages that the server makes, after /site.css: only what
  they have and the site's other pages do not.

  A shared model's page, /m/<id> (api/share.js): the picture first and
  large, with a strip of its other pictures under it; beside it on a
  laptop, in a column that stays on screen as the page scrolls, what it is,
  who made it, Build it and the action bar; under it on a phone, so the
  picture, the name, the designer and the action bar are the first screen.
  Then tabs that stay on screen, About, Comments, Builds, Remixes and
  Versions, each a part of the page; and at the end more by its designer
  and similar models, or the gallery's. It is as wide as the gallery
  (.wrap.wide): from 1200 px the column is 420 px and the picture takes
  the rest, 60% of a 1920 window.
*/
.model-page { padding: var(--s-5) 0 72px; }
.crumbs { font-size: var(--t-small); color: var(--ink-faint); margin: 0 0 14px; }
.crumbs a { color: var(--ink-soft); }
.model-page .top {
	display: grid; gap: 22px 40px; align-items: start;
	grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
	grid-template-areas: "picture side" "rest side";
}
.model-page .media { grid-area: picture; min-width: 0; }
.model-page .side { grid-area: side; position: sticky; top: calc(var(--head-h) + var(--s-4)); min-width: 0; }
/* On a laptop the column is a panel of its own beside the picture, as a
   product's page has its buying box: the name, who made it, the ways in,
   the action bar and its facts, apart from the page under it. */
@media (width >= 900px) {
	.model-page .side {
		padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius);
		background: var(--panel); box-shadow: var(--highlight), var(--shadow-2);
	}
	.model-page .side .facts { padding-top: var(--s-4); border-top: 1px solid var(--line); }
}
/* From 1200 px the panel's words have the room the action bar needs in one row. */
@media (width >= 1200px) { .model-page .side { padding: var(--s-5); } }
.model-page .rest { grid-area: rest; min-width: 0; }
@media (width >= 1200px) { .model-page .top { grid-template-columns: minmax(0, 1fr) 480px; } }
@media (width < 900px) {
	.model-page { padding-top: 12px; }
	.model-page .crumbs { margin-bottom: 10px; }
	.model-page .top { grid-template-columns: minmax(0, 1fr); grid-template-areas: "picture" "side" "rest"; gap: 16px; }
	.model-page .side { position: static; }
}

/* The picture is the shape it was published at, 1200 x 630, so the page
   holds its space before it arrives; on the theme's own ground, which a
   picture with nothing behind the model shows (site.css --picture-ground). */
.model-page .picture {
	position: relative; display: block; border-radius: var(--radius); overflow: hidden;
	border: 1px solid var(--line); background: var(--picture-ground); aspect-ratio: 1200 / 630;
	box-shadow: var(--highlight), var(--shadow-2); text-decoration: none; color: inherit;
	/* A finger up or down it scrolls the page; across it opens the 3D view. */
	touch-action: pan-y pinch-zoom;
}
.model-page .picture img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform 320ms var(--ease); }
@media (hover: hover) { .model-page a.picture:hover img { transform: scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .model-page .picture img { transition: none; } .model-page a.picture:hover img { transform: none; } }
/* Until its picture is drawn the frame says it is coming, as a card with
   none says so (site.css .model .frame.none), and the picture lands over
   it: the first view right after publishing was a blank grey frame while
   the picture came (walk180 S2). */
.model-page .picture .waiting {
	position: absolute; inset: 0; display: grid; place-items: center;
	color: var(--ink-faint); font-size: var(--t-small);
	background: linear-gradient(180deg, var(--panel-hi), var(--bg-soft));
}
.model-page .picture .waiting[hidden] { display: none; }
.model-page .picture .none { display: grid; place-items: center; height: 100%; color: var(--ink-faint); }


/* The strip of its pictures (api/share.js mediaStrip): the one it was
   published with, its owner's photos, then photos of real builds; the one
   shown in the picture's place edged in the accent. A scroller (site.css).
   A photo shown large is shown whole. */
.media-strip { display: flex; gap: var(--s-2); margin-top: var(--s-3); padding-block: 3px; }
.media-strip[hidden] { display: none; }
.media-strip .thumb {
	flex: none; display: block; width: 96px; height: 72px; padding: 0; overflow: hidden;
	border: 1px solid var(--line); border-radius: var(--r-2); background: var(--picture-ground);
}
.media-strip .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-strip .thumb[aria-current="true"] { outline: 2px solid var(--accent-edge); outline-offset: 1px; }
.media-strip .thumb.add {
	display: inline-grid; place-items: center; border-style: dashed; cursor: pointer; padding: 0 var(--s-1);
	font: inherit; font-size: var(--t-tiny); font-weight: 600; color: var(--ink-soft); line-height: 1.2;
	white-space: normal; text-align: center;
}
.media-strip .thumb.add:hover { color: var(--ink); border-color: var(--ink-faint); }
.media-strip .thumb.add[hidden] { display: none; }
/* With no strip yet, its owner's Add a picture (model-page.js) is over the
   picture's corner, on the panel's ground: a strip shown for it alone
   pushed the page down as it came (site275). */
.model-page .media { position: relative; }
.model-page .media > .on-picture { position: absolute; top: 14px; left: 14px; background: var(--panel); }
.model-page .picture.photo img { object-fit: contain; background: var(--bg-soft); }
/* A set's own picture (api/_sets.js photoOf): Rebrickable's, whole, on the
   white it was photographed on, and credited under it, short. */
.set-page .picture.photo, .set-page .picture.photo img { background: var(--photo-ground); }
.set-page .picture-credit { margin: 6px 2px 0; text-align: right; font-size: var(--t-small); color: var(--ink-faint); }
.set-page .picture-credit a { color: inherit; }
@media (width < 600px) { .media-strip .thumb { width: 80px; height: 60px; } }
/* On a phone the picture is square: at 390 px it is 358 px tall, not 188,
   and web/model-page.js draws the model as large as its width lets it,
   the picture's own ground carried on above and below a wide one. */
@media (width < 600px) { .model-page .picture { aspect-ratio: 1 / 1; } }

/* The page's tabs (api/share.js pageTabs): the kit's .tabs, kept on screen
   under the header as the page scrolls past its parts. */
.model-page .page-tabs { position: sticky; top: var(--head-h); z-index: 5; background: var(--bg); margin-block: var(--s-2); }
.model-page .page-tabs.loose { background: none; }
/* Gone to: clear of the tabs, beyond the header's own scroll-padding
   (site.css html), which every other part of the page has alone: a margin
   of 84 px on every section added to it and landed a part 160 px down. */
.model-page .rest > section { scroll-margin-top: 44px; }

.model-page h1 { font-size: var(--t-h1); margin: 0 0 12px; overflow-wrap: anywhere; line-height: 1.15; }
.model-page .from { margin: 0 0 10px; color: var(--ink-soft); overflow-wrap: anywhere; }
.model-page .from a { color: var(--ink); }
/* What it is based on (api/_bases.js): a line a thing, under its remix
   line; its designer's own line to change them; and their dialog, a box a
   thing, at most three. */
.model-page ul.based-on { list-style: none; padding: 0; }
.model-page ul.based-on li + li { margin-top: 2px; }
dialog.bases-dialog { width: min(480px, calc(100vw - 32px)); }
dialog.bases-dialog .bases-rows { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 12px; }
/* Each row boxed, over the report dialog's bare fieldsets (below); its
   Remove at the row's start, as Add another is under them. */
dialog.report.bases-dialog fieldset { border: 1px solid var(--line); border-radius: var(--r-3); padding: 12px; margin: 0; }
dialog.report.bases-dialog fieldset > button { justify-self: start; }
dialog.bases-dialog form label { margin-bottom: 10px; }
dialog.bases-dialog .actions { margin-top: 16px; }
/* The facts are words, not controls: a long one ("Moves: ...") wraps. */
.model-page .facts { margin: 18px 0 12px; align-items: center; }
.model-page .facts .pill { white-space: normal; max-width: 100%; }
/* The Tested mark, first of them; open, its four results take the row. */
.model-page .facts .tested-mark { margin: 0; }
.model-page .facts li.tested:has(> .tested-mark[open]) { flex-basis: 100%; }
.model-page .side .actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 12px; }
/* Build it across the column, Open in Brickworks and Download under it,
   sharing the row: three in a row fit neither a phone nor the column. */
.model-page .side .actions > .cta { flex: 1 1 auto; }
.model-page .side .actions > .cta:first-child { flex-basis: 100%; }

/* Who made it: their avatar, name and handle, a link to their profile,
   and Follow beside it. */
.model-page .shared-by { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: 0 0 14px; }
.model-page .shared-by .who { display: inline-flex; align-items: center; gap: var(--s-3); min-width: 0; color: var(--ink); text-decoration: none; }
.model-page .shared-by .names { display: grid; min-width: 0; line-height: 1.3; }
.model-page .shared-by .names b { font-weight: 640; overflow-wrap: anywhere; }
.model-page .shared-by .names small { color: var(--ink-soft); font-size: var(--t-small); overflow-wrap: anywhere; }
.model-page .shared-by a.who:hover b { text-decoration: underline; text-decoration-thickness: 1px; }
.model-page .shared-by .said { flex-basis: 100%; }
.model-page .shared-by .said:empty { display: none; }

/* The action bar (web/model-page.js): the kit's icon buttons in a row,
   More at its end; Save's lists open under it and push the page down. */
.action-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); margin: 0; }
.action-bar .more-menu { margin-left: auto; }
/* On a phone, one row across the column, More at its end. */
@media (width < 600px) { .action-bar { gap: var(--s-1); justify-content: space-between; } .action-bar .more-menu { margin-left: 0; } }
.save-panel {
	margin-top: 10px; max-width: 420px; padding: 12px; border-radius: var(--r-3);
	border: 1px solid var(--line); background: var(--panel); display: grid; gap: 8px;
}
.save-panel .save-head { margin: 0; font-size: var(--t-small); font-weight: 600; color: var(--ink-soft); }
.marks-said { margin: 6px 0 0; }
.marks-said:empty { display: none; }

/* What comes next: more by its designer, similar models, a row each. */
.model-page .next { margin-top: var(--section); max-width: none; }
.model-page .next h2 { margin: 0; overflow-wrap: anywhere; }
.model-page .next h2 a { color: inherit; }

.model-page section { margin-top: var(--s-7); max-width: 72ch; }
.model-page .rest > section + section { padding-top: var(--s-6); border-top: 1px solid var(--line); }
.model-page .rest > section:first-of-type { margin-top: 12px; }
.model-page section h2 { margin: 0 0 var(--s-2); }
.model-page section h3 { margin: var(--s-4) 0 var(--s-2); }
.model-page .tags { margin: 18px 0 0; }
.model-page .description { margin: 0; white-space: pre-line; overflow-wrap: anywhere; color: var(--ink); }
.model-page .licence h3 { margin-top: 18px; }
.model-page .licence p { margin: 0; color: var(--ink-soft); }
.model-page .licence b { color: var(--ink); }


/* Versions (api/share.js versionsSection): what changed in the one shown,
   its owner's words, and the others; an older one marked as older. */
.model-page .old-version {
	margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r-2); border: 1px solid var(--accent-edge);
	background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); overflow-wrap: anywhere;
}
.model-page .old-version a { color: var(--ink); font-weight: 600; }
.model-page .versions .changed { margin: 0 0 8px; color: var(--ink); }
.model-page .versions .when { color: var(--ink-faint); font-size: var(--t-small); margin-left: 4px; }
.model-page .version-note {
	margin: 0 0 10px; padding: 2px 0 2px 14px; border-left: 3px solid var(--line);
	color: var(--ink-soft); white-space: pre-line; overflow-wrap: anywhere;
}
.model-page .version-note p { margin: 0; }
.model-page .versions .kept { margin: 0 0 10px; color: var(--ink-soft); }
.model-page .versions .lots ul { margin: 6px 0 0; padding-left: 22px; color: var(--ink-soft); }
.model-page .earlier { margin: 0; padding-left: 22px; color: var(--ink-soft); }
.model-page .earlier li { margin: 4px 0; overflow-wrap: anywhere; }
.model-page .earlier a { color: var(--ink); }
/* Its parts (api/share.js partsSection, web/model-page.js startParts): how
   many in how many lots, Colour or Kind and the two shops' lists, then a
   row a colour (or a kind) and under it a row a lot: its picture, its name,
   its number and colour, and how many. Every row is LOT_ROW (api/share.js)
   tall and a name too long for its row ends in an ellipsis, so the space the
   list takes is kept for it before it comes and nothing under it moves. */
.model-page .parts .note { margin: 0 0 var(--s-3); color: var(--ink-soft); }
.parts-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); }
.parts-bar .segmented { margin-right: auto; }
.lot-list { list-style: none; margin: 0 0 var(--s-3); padding: 0; }
.lot-list li {
	display: flex; align-items: center; gap: var(--s-3); height: 60px; min-width: 0;
	border-bottom: 1px solid var(--line); box-sizing: border-box;
}
.lot-list li:first-child { border-top: 1px solid var(--line); }
.lot-list .group { gap: var(--s-2); font-weight: 640; }
.lot-list .group .n, .lot-list .qty { margin-left: auto; flex: none; font-variant-numeric: tabular-nums; }
.lot-list .group .n { color: var(--ink-soft); font-weight: 500; font-size: var(--t-small); }
.lot-list .pic {
	flex: none; display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden;
	border-radius: var(--r-1); background: var(--picture-ground);
}
.lot-list .pic canvas { width: 100%; height: 100%; }
.lot-list .what { flex: 1; display: grid; min-width: 0; line-height: 1.35; }
.lot-list .name, .lot-list .meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lot-list .meta { display: flex; align-items: center; gap: 6px; font-size: var(--t-small); color: var(--ink-soft); }
.lot-list .qty { font-weight: 640; }
.lot-list .swatch { flex: none; width: 14px; height: 14px; }
.model-page .tree, .model-page .in-lists { max-width: none; }
.model-page .line { margin: 0; padding-left: 22px; color: var(--ink-soft); }
.model-page .line li { margin: 3px 0; overflow-wrap: anywhere; }
.model-page .line a { color: var(--ink); }

.gone { padding: clamp(56px, 10vw, 110px) 0; }

/* Save's lists (model-page.js): Favourites first, then each collection,
   and a new one's name. */
.collect-list { display: grid; gap: 4px; max-height: 240px; overflow: auto; }
.collect-list label { display: flex; gap: 8px; align-items: center; font-size: var(--t-small); min-height: 34px; cursor: pointer; }
.collect-list label span { flex: 1; overflow-wrap: anywhere; }
.collect-list small { color: var(--ink-faint); }
.collect-new { display: flex; gap: 6px; }
/* A name box beside its buttons: room for ten letters, then whatever is left;
   it never pushes its row past a phone's edge. */
.collect-new > input, .list-top > input { flex: 1 1 10em; width: 10em; }

/* A model's card is site.css's .model; here only what a card on these
   pages adds: a button under it on your account (.kept). */
.kept { display: grid; gap: 8px; align-content: start; }

/* /challenge between months (docs/SOCIAL.md U12): the next one's theme in
   a .card, and each challenge that ran, its name, its days and its winners'
   cards, a section's space apart. */
.challenge .next-one h3, .challenge .past-one h3 { margin: 0 0 var(--s-1); }
.challenge .next-one > :last-child { margin-bottom: 0; }
.challenge .past-one { margin: 0 0 var(--s-6); }
.challenge .past-one .models { margin-top: var(--s-3); }
/* The challenge's name, days and brief, a panel lit from above. */
.challenge-hero {
	margin: 0 0 var(--s-2); padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); border-radius: var(--r-4);
	background-color: var(--panel); box-shadow: var(--highlight), var(--shadow-1);
}
.challenge-hero > :last-child { margin-bottom: 0; }
.challenge-hero .share-line { margin: var(--s-3) 0 0; }
/* The rules and how to enter, each a panel; side by side from 900 px,
   under the brief, with everything else across the page. */
.challenge #rules-part, .challenge #how {
	padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
	box-shadow: var(--highlight);
}
.challenge #rules-part h2, .challenge #how h2 { margin-top: 0; }
.challenge #rules-part > :last-child, .challenge #how > :last-child { margin-bottom: 0; }
@media (width >= 900px) {
	.challenge { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s-5); align-items: start; }
	.challenge > * { grid-column: 1 / -1; }
	.challenge > #rules-part, .challenge > #how { grid-column: auto; align-self: stretch; }
}

/* A person, a collection, and your own page. */
.person { padding: var(--page-top) 0 var(--section); }
.person h1 { margin-bottom: 6px; overflow-wrap: anywhere; }
.person .handle { color: var(--ink-soft); margin: 0 0 12px; overflow-wrap: anywhere; }
.person .handle a { color: var(--ink); }
.person .bio { max-width: 64ch; white-space: pre-line; overflow-wrap: anywhere; margin: 0 0 14px; }
.person .counts { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink-soft); margin: 0 0 26px; }
.person section { margin-top: 30px; }
.person section h2 { margin-bottom: 10px; }
.person .lists { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.person .lists a { color: var(--ink); font-weight: 600; }
.person .lists span { color: var(--ink-faint); font-size: var(--t-small); margin-left: 6px; }
.profile-form { display: grid; gap: 12px; max-width: 560px; margin: 8px 0 0; }
.profile-form h2 { margin: 0; }
.profile-form .hint { font-size: var(--t-tiny); color: var(--ink-faint); }
.profile-form .hint b { color: var(--ink-soft); }
.said { color: var(--ink-soft); font-size: var(--t-small); min-height: 1em; margin: 6px 0 0; }
.lists-mine { display: grid; gap: 12px; margin-top: 12px; }
.list-mine { border: 1px solid var(--line); border-radius: var(--r-3); padding: 12px; background: var(--bg-soft); }
.list-top { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.list-top small { color: var(--ink-faint); }
.list-mine details { margin-top: 8px; }
.list-mine .models { margin-top: 10px; }

/* Report it, on a model's, a profile's and a collection's page
   (report.js), and the dialog it opens; the takedown page's form. */
.report-line { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.report-line a { color: var(--ink-soft); }
dialog.report fieldset { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 2px; }
dialog.report legend { font-size: var(--t-small); color: var(--ink-soft); margin-bottom: 6px; }
.takedown section { max-width: 72ch; }
.takedown section p { color: var(--ink-soft); }

/* The Tested mark (api/_tested.js): small and green, the four results on
   hover (its title) and on a tap (the page's opens; a card's title). A
   failing one is only ever its owner's note (.tested-note). */
.tested-mark { margin: 0 0 10px; }
.tested-mark .tested-says { margin-top: 8px; font-size: var(--t-small); color: var(--ink-soft); }
.tested-mark .tested-says ul { margin: 0 0 6px; padding-left: 20px; }
.tested-note { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-2); border: 1px dashed var(--ink-faint);
	color: var(--ink-soft); font-size: var(--t-small); overflow-wrap: anywhere; }
.tested-note b { color: var(--ink); }

/* Built by people (api/share.js buildsSection, supabase/builds.sql): how many
   built it, a strip of photos of real builds (a scroller, site.css), and
   the form to add one. On a profile, what they built. */
.model-page .builds { max-width: none; }
.model-page .built-line { margin: 0 0 12px; color: var(--ink-soft); }
.build-strip { display: flex; gap: 12px; padding-block: 2px 10px; }
.build-strip .build {
	width: min(260px, 72vw); margin: 0;
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden;
}
.build-strip .build img { display: block; width: 100%; height: 190px; object-fit: cover; background: var(--line); }
.build-strip figcaption { padding: 8px 10px 10px; font-size: var(--t-small); color: var(--ink-soft); overflow-wrap: anywhere; }
.build-strip figcaption q { display: block; color: var(--ink); margin-bottom: 4px; }
.build-strip figcaption a { color: var(--ink); }
.add-build { margin-top: 10px; }
.add-build .build-form { display: grid; gap: 10px; max-width: 520px; margin-top: 4px; }
.add-build .said { margin: 6px 0 0; color: var(--ink-soft); }
.hidden-builds { margin-top: 10px; }

/* Comments on a model and on its steps (web/model-page.js), as threads
   (docs/SOCIAL.md U8): each comment a card with its writer's avatar beside
   it, its replies under it on a line of their own, a reply's avatar the
   small one. A stranger's text kept as typed. */
.model-page .comments { max-width: 72ch; }
/* The comments' place while they are asked (api/share.js commentsSection),
   as tall as the section drawn with none yet and the box (site275). */
.model-page .comments-hold { display: flex; flex-direction: column; gap: 8px; margin-top: var(--s-7); padding-bottom: 40px; max-width: 72ch; }
/* Under its line as the section it holds the place of will be. */
.model-page .rest > section + .comments-hold { padding-top: var(--s-6); border-top: 1px solid var(--line); }
.model-page .comments-hold .bone { margin: 0; }
.model-page .comments-hold .title { width: 8em; height: 1.3em; font-size: var(--t-h3); }
.model-page .comments-hold .box { width: 100%; height: calc(3lh + 22px); border-radius: var(--control-radius); }
.model-page .comment-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.model-page .comment {
	display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start;
	border: 1px solid var(--line); border-radius: var(--r-2); padding: 12px 14px; background: var(--panel);
}
.model-page .comment.by-owner:not(.reply) { border-color: color-mix(in srgb, var(--accent-edge) 45%, var(--line)); }
.model-page .comment.hidden-one { opacity: 0.7; border-style: dashed; }
.model-page .comment.asked { outline: 2px solid var(--accent-edge); outline-offset: 2px; }
.model-page .comment-main { min-width: 0; }
.model-page .comment-head {
	margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
	font-size: var(--t-small); color: var(--ink-soft); overflow-wrap: anywhere;
}
.model-page .comment-head a:not(.pill), .model-page .comment-head b { color: var(--ink); font-weight: 600; }
.model-page .comment-head .where { color: var(--ink-soft); }
.model-page .comment-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
/* An @handle its writer named (docs/SOCIAL.md section 7, item 6): a link
   to them, in the words' own size. */
.model-page .comment-body a.mention { font-weight: 600; }
/* @ in a box: the people on the page to name, under the box, a menu's
   panel (site.css .menu-list), the one marked as a hovered row. */
.model-page .mention-pick {
	list-style: none; margin: 0; padding: 6px; display: grid; max-width: 360px;
	border-radius: var(--r-3); background: var(--panel); border: 1px solid var(--line-strong);
	box-shadow: var(--highlight), var(--shadow);
}
.model-page .mention-pick[hidden] { display: none; }
.model-page .mention-pick li {
	padding: 8px 10px; border-radius: var(--r-1); cursor: pointer; color: var(--ink-soft);
	overflow-wrap: anywhere; min-height: 24px;
}
.model-page .mention-pick li b { color: var(--ink); font-weight: 600; }
.model-page .mention-pick li[aria-selected="true"], .model-page .mention-pick li:hover { background: var(--panel-hi); color: var(--ink); }
.model-page .comment .note { margin: 6px 0 0; }
.model-page .comment-acts { margin: 6px 0 0; display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--t-small); }
.model-page .comment-acts:empty { display: none; }
/* Replies: under their comment, a line down their left, no card of their own. */
.model-page .replies {
	list-style: none; margin: 10px 0 0; padding: 0 0 0 12px; display: grid; gap: 12px;
	border-left: 2px solid var(--line);
}
.model-page .comment.reply { border: 0; border-radius: 0; padding: 0; background: none; gap: 8px; }
.model-page .comment.reply.hidden-one { border: 0; }
.model-page .reply-new { margin-top: 10px; display: grid; gap: 8px; }
.model-page .reply-new textarea { width: 100%; }
.model-page .reply-new .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.model-page .comment-list .none { padding: 0; }
.model-page .comment-new { margin-top: 14px; display: grid; gap: 8px; }
.model-page .comment-on { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.model-page .comment-new textarea { width: 100%; }
.model-page .comment-new .actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.model-page .comment-new .note, .model-page .comment-why .note { margin: 0; }
.model-page .comment-why { margin-top: 14px; display: grid; gap: 8px; justify-items: start; }
@media (width < 600px) {
	.model-page .comment { gap: 10px; padding: 10px 12px; }
	.model-page .replies { padding-left: 10px; }
}

/* Follow (web/follow.js): on a profile, under its counts, and beside a
   model's designer. */
.person .counts { margin-bottom: 12px; }
.follow-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 26px; min-height: 1em; }
.follow-line .said, .shared-by .said { margin: 0; font-size: var(--t-small); }
button.follow[aria-pressed="true"] { color: var(--ink-soft); }

/* Your feed (/feed, web/feed.js, docs/SOCIAL.md U9): a column of posts,
   each who did what (their avatar, the words, when) over the thing itself,
   the gallery's card or the photo of a build. Designers to follow beside
   it on a laptop and under it on a phone; with nothing of its own, Latest
   on Brickworks after them, the gallery's cards. */
.feed-layout { display: grid; gap: var(--s-6); grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "rail" "latest"; }
.feed-main { grid-area: main; display: grid; gap: var(--s-4); align-content: start; min-width: 0; }
.feed-main .said:empty, .feed-list:empty { display: none; }
.feed-main .actions { margin: 0; }
.feed-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-4); }
.feed-ask p { margin: 0; flex: 1 1 260px; }
.feed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6); max-width: 600px; }
.feed-row { display: grid; gap: var(--s-3); min-width: 0; }
.feed-row .post-head { display: flex; align-items: flex-start; gap: var(--s-3); }
.feed-row .face { flex: none; text-decoration: none; }
.feed-row .words { min-width: 0; padding-top: 1px; }
.feed-row .what { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.feed-row .what b { font-weight: 650; }
.feed-row .what a { color: var(--ink); text-decoration: none; }
.feed-row .what .go { font-weight: 650; }
.feed-row .what a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.feed-row .what .pill { margin-left: 2px; vertical-align: 1px; }
.feed-row time { display: block; margin-top: 2px; color: var(--ink-faint); font-size: var(--t-tiny); }
.feed-row > q { display: block; margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.feed-photo {
	margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.feed-photo img { display: block; width: 100%; height: auto; max-height: 640px; object-fit: cover; background: var(--bg-soft); }
.feed-photo figcaption { padding: 10px 12px 12px; color: var(--ink-soft); font-size: var(--t-small); overflow-wrap: anywhere; }
.feed-photo figcaption a { color: var(--ink); font-weight: 650; }
.feed-rail {
	grid-area: rail; min-width: 0; align-self: start; padding: var(--s-4) var(--s-4) var(--s-2);
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.feed-rail h2 { margin: 0 0 var(--s-2); }
.feed-page .latest { grid-area: latest; min-width: 0; margin: 0; }
.feed-page .latest h3 { margin: var(--s-6) 0 var(--s-3); font-size: var(--t-h3); }
.feed-page .latest .build-grid { columns: 2 150px; }
@media (width >= 600px) { .feed-page .latest .build-grid { columns: 3 180px; } }
@media (width >= 1200px) {
	.feed-layout.with-rail {
		grid-template-columns: minmax(0, 1fr) 320px; column-gap: var(--s-7);
		grid-template-areas: "main rail" "latest rail";
	}
	/* Posts are a column of their own width: the rail stays beside them. */
	.feed-layout.with-rail.posts { max-width: 1000px; }
	.feed-layout.with-rail .feed-rail { position: sticky; top: 84px; }
	.feed-layout.with-rail .latest .models { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (width >= 1600px) { .feed-layout.with-rail .latest .models { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Notifications (/notifications, web/notifications.js, docs/SOCIAL.md U7):
   one group a model, its picture and name, then each thing that happened
   to it, newest first, with who did it (their avatar) or what it is (an
   icon: likes, a challenge's end). A group not opened yet is edged and
   dotted in the accent's edge. */
.notices-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.notices-head h1 { margin: 0; }
.notices { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); max-width: 760px; }
.notice {
	display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s-4); align-items: start;
	padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.notice.unread { border-color: var(--accent-edge); }
.notice .pic { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-2); background: var(--picture-ground); }
.notice .pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.notice h2 { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-2); }
.notice h2 a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.notice h2 a:hover { text-decoration: underline; }
.notice .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-edge); }
.notice .lines { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.notice .lines a { display: flex; align-items: flex-start; gap: var(--s-2); color: var(--ink); text-decoration: none; }
.notice .lines a:hover .what { text-decoration: underline; text-decoration-color: var(--ink-faint); }
.notice .lines .avatar.small, .notice .lines .icon { margin-top: 1px; }
.notice .lines .icon { width: 24px; color: var(--ink-soft); }
.notice .what { min-width: 0; font-size: var(--t-small); line-height: 1.45; overflow-wrap: anywhere; }
.notice .what b { font-weight: 650; }
.notice .what .pill { margin-left: 2px; }
.notice .what q { display: block; margin-top: 2px; color: var(--ink-soft); }
.notice .what time { display: block; margin-top: 2px; color: var(--ink-faint); font-size: var(--t-tiny); }
/* The levels you reached (supabase/achievements.sql), and a challenge
   (supabase/challenge_notices.sql): the award, or the brick, where a
   model's picture is. */
.notice .pic.award, .notice .pic.challenge { display: grid; place-items: center; color: var(--ink-soft); }
.notice .pic.award .icon, .notice .pic.challenge .icon { width: 40%; height: auto; aspect-ratio: 1; stroke-width: 1.4; }
@media (width < 600px) {
	.notice { grid-template-columns: 76px minmax(0, 1fr); gap: var(--s-3); }
}


/* A designer's page (api/people.js earnedHtml, supabase/designers.sql): what
   their models earned, builds finished and remixes leading, as tiles; the
   model to start with; photos other people posted of their builds. And the
   designer's own numbers (web/designs.js), on their profile and on Account,
   marked as theirs alone by a dashed edge. */
.earned {
	list-style: none; padding: 0; margin: 4px 0 12px; max-width: 920px;
	display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 138px), 1fr));
}
.earned li {
	display: grid; align-content: start; gap: 0; padding: 11px 14px 12px; border-radius: var(--r-3);
	background: var(--panel); border: 1px solid var(--line);
}
.earned li.lead { border-top: 3px solid var(--accent-edge); padding-top: 9px; }
.earned b { font-size: var(--t-h2); line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.earned li.lead b { font-size: var(--t-h2); }
.earned span { color: var(--ink-soft); font-size: var(--t-small); line-height: 1.35; }
.earned small { color: var(--ink-faint); font-size: var(--t-micro); font-variant-numeric: tabular-nums; }
/* Your achievements (/profile?tab=achievements, web/profile.js): a tile a
   track, its level's name with the award, how far it is to the next as a
   bar and in words, and the way there; a track not begun dashed. */
.achievements-list {
	list-style: none; padding: 0; margin: 0; max-width: 920px;
	display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.achievements-list li {
	display: grid; align-content: start; gap: var(--s-2); padding: var(--s-3) var(--s-4) var(--s-4);
	border: 1px solid var(--line); border-radius: var(--r-3); background: var(--panel);
}
.achievements-list li[data-level="0"] { border-style: dashed; background: transparent; }
.achievements-list h3 { display: flex; align-items: center; gap: var(--s-2); margin: 0; font-size: var(--t-h3); }
.achievements-list h3 .icon { width: 18px; height: 18px; color: var(--ink-soft); }
.achievements-list p { margin: 0; font-size: var(--t-small); line-height: 1.45; color: var(--ink-soft); }
.achievements-list .level { color: var(--ink-faint); font-size: var(--t-tiny); font-variant-numeric: tabular-nums; }
.achievements-list .reach { height: 6px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.achievements-list .reach span { display: block; height: 100%; border-radius: inherit; background: var(--accent-edge); }
.achievements-list .to-next { color: var(--ink); }
.person.designer .counts { font-size: var(--t-small); }
.start-with { margin: -8px 0 24px; color: var(--ink-soft); line-height: 2.1; }
.start-with a:not(.cta) { color: var(--ink); font-weight: 600; }
.start-with .cta { margin-left: 8px; vertical-align: middle; }
.person.designer .models { margin-top: 12px; }
.build-strip figcaption > a + a { font-weight: 600; }

.designs {
	margin: 0 0 30px; padding: 16px 18px 18px; border: 1px dashed var(--ink-faint); border-radius: var(--radius);
	background: var(--bg-soft); max-width: 100%; min-width: 0;
}
.designs h2 { margin: 0 0 4px; }
.designs .private { margin: 0 0 12px; font-size: var(--t-small); color: var(--ink-soft); max-width: 72ch; }
.designs .note { margin-top: 4px; }
.designs .mine-totals { margin-bottom: 4px; }
.design-rows { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.design-row {
	display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 14px; align-items: start; min-width: 0;
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-3); padding: 12px;
}
.design-row .pic { display: block; border-radius: var(--r-1); overflow: hidden; background: var(--picture-ground); aspect-ratio: 1200 / 630; }
.design-row .pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.design-row .pic.none { display: grid; place-items: center; color: var(--ink-faint); font-size: var(--t-tiny); }
.design-main { min-width: 0; }
.design-main h3 { margin: 0; overflow-wrap: anywhere; }
.design-main h3 a { color: var(--ink); padding-block: 6px; }
.design-meta { margin: 2px 0 0; font-size: var(--t-tiny); color: var(--ink-faint); }
.design-numbers { margin: 10px 0 0; display: grid; gap: 8px 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.design-numbers dt { font-size: var(--t-tiny); color: var(--ink-faint); }
.design-numbers dd { margin: 0; display: grid; }
.design-numbers dd b { font-size: var(--t-h3); font-variant-numeric: tabular-nums; line-height: 1.2; }
.design-numbers dd small { font-size: var(--t-micro); color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.design-builders { margin-top: 10px; min-width: 0; }
.design-builders p { margin: 0 0 6px; font-size: var(--t-small); color: var(--ink-soft); }
.design-builders .build-strip .build { width: min(200px, 60vw); }
.design-builders .build-strip .build img { height: 140px; }
.design-builders figcaption a { font-weight: 600; }
@media (width < 600px) {
	.design-row { grid-template-columns: minmax(0, 1fr); }
	.design-row .pic { max-width: 220px; }
	.design-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.earned b { font-size: var(--t-h3); }
	.earned li.lead b { font-size: var(--t-h2); }
}

/* A person's page, /u/<handle> (api/people.js profilePage, docs/SOCIAL.md
   U5): one of their models' pictures across the top if they chose one,
   then their avatar, name and handle with Follow, Share and More; their
   words, links and one row of numbers; the models they pinned; then the
   tabs, Models · Builds · Collections, each a page of its own. */
.person.profile { padding-top: var(--s-6); }
/* Its model's cut-out on the theme's own ground (site.css --picture-ground),
   as a card's picture is: a picture carrying its own light ground was a
   light box across a page in the dark theme. */
.profile .banner {
	aspect-ratio: 3 / 1; margin: 0 0 var(--s-3); border-radius: var(--radius); overflow: hidden;
	border: 1px solid var(--line); background: var(--picture-ground);
}
.profile .banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
/* As wide as the gallery from 1200 px (.wrap.wide): a lower band, not a wall. */
@media (width >= 1200px) { .profile .banner { aspect-ratio: 4 / 1; } }
.profile-head {
	display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3) var(--s-5);
	margin: 0 0 var(--s-4);
}
/* Under a banner the avatar sits over its foot, ringed in the page's colour. */
.bannered .profile-head { align-items: end; padding-left: var(--s-5); }
.bannered .profile-head .avatar { margin-top: -64px; box-shadow: 0 0 0 4px var(--bg); }
.profile-head h1 { margin: 0 0 2px; overflow-wrap: anywhere; }
.profile-head .handle { margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.profile-head .acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s-2); }
.profile-head .follow-line { margin: 0; min-height: 0; justify-content: flex-end; }
.profile-head .follow-line .said:empty { display: none; }
.profile .bio { margin: 0 0 var(--s-3); }
.profile .links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin: 0 0 var(--s-3); padding: 0; list-style: none; }
.profile .links a { color: var(--ink-soft); font-size: var(--t-small); overflow-wrap: anywhere; }
.profile .links a:hover { color: var(--ink); }
/* One row of numbers, one kind of number: each said once there is one. */
.numbers { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); margin: 0 0 var(--s-4); padding: 0; list-style: none; }
.numbers b { color: var(--ink); font-size: var(--t-h3); font-weight: 700; font-variant-numeric: tabular-nums; }
.numbers span { color: var(--ink-soft); font-size: var(--t-small); }
/* Their numbers and what they earned (docs/SOCIAL.md U13), one row that
   wraps: the achievements beside the numbers when there is room, under
   them when not, so a page is no taller for them on a laptop. */
.profile .standing { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5); margin: 0 0 var(--s-4); }
.profile .standing .numbers, .profile .standing .awards { margin: 0; }
.profile .pinned { margin-top: var(--s-6); }
.profile .pinned h2, .profile .follows h2, .profile .tab-panel h2 { margin: 0 0 var(--s-3); }
.profile .work { margin-top: var(--s-6); }
.profile .tab-panel > section:first-child { margin-top: 0; }
.profile .paging { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin: var(--s-5) 0 0; }
.profile .paging a:not(.cta) { color: var(--ink-soft); }
.profile .follows { margin-top: var(--s-7); }
/* A designer's own numbers on their page, under the work (api/people.js). */
.profile #designs-mine { margin: var(--s-7) 0 0; }
.profile .follows .pill .avatar { margin-left: -6px; }
/* More like them (api/_alike.js, web/follow.js): up to six people to follow,
   a row each (site.css .person-row), side by side where two or three fit,
   each under a rule so the columns read alike. */
.profile .alike { margin-top: var(--s-7); }
.profile .alike h2 { margin: 0 0 var(--s-1); }
.profile .alike .note { margin: 0 0 var(--s-3); }
.profile .alike .people-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); column-gap: var(--s-6); }
.profile .alike .person-row { border-top: 1px solid var(--line); }
@media (width < 600px) {
	.profile .banner { aspect-ratio: 2 / 1; }
	.profile-head { grid-template-columns: auto minmax(0, 1fr); }
	.profile-head .avatar.huge { width: 80px; height: 80px; font-size: var(--t-h2); }
	.bannered .profile-head { padding-left: var(--s-3); }
	.bannered .profile-head .avatar { margin-top: -48px; }
	.profile-head .acts { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Photos of real builds in a tab of their own: any shape, so in columns. */
.build-grid { columns: 3 220px; column-gap: 12px; }
.build-grid .build {
	display: inline-block; width: 100%; margin: 0 0 12px; break-inside: avoid;
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden;
}
.build-grid .build img { display: block; width: 100%; height: auto; background: var(--line); }
.build-grid figcaption { padding: 8px 10px 10px; font-size: var(--t-small); color: var(--ink-soft); overflow-wrap: anywhere; }
.build-grid figcaption q { display: block; color: var(--ink); margin-bottom: 4px; }
.build-grid figcaption a { color: var(--ink); }

/* A public collection as a card: its cover, up to four of its pictures,
   and its name. */
.list-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.list-card {
	display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: inherit;
	border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel);
	box-shadow: var(--highlight), var(--shadow-1);
}
/* Lit and lifted under a mouse as a model's card is (site.css .model). */
.list-card:hover { border-color: var(--line-strong); box-shadow: var(--highlight), var(--shadow-2); }
.list-card:hover b { text-decoration: underline; text-decoration-thickness: 1px; }
.list-card .words { display: grid; gap: 2px; padding: 12px 16px 14px; }
.list-card b { font-weight: 640; overflow-wrap: anywhere; }
.list-card span { color: var(--ink-soft); font-size: var(--t-small); }

/* A collection's page, /c/<id> (api/people.js listPage, docs/SOCIAL.md
   U11), headed as a playlist's or a board's: its cover beside its name,
   whose it is, its words and numbers, Follow, Share and More; on a phone
   the cover across the top, kept short. Then its models. */
.list-head {
	display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: end; gap: var(--s-5);
	margin: 0 0 var(--s-6);
}
.list-head .cover { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list-head .eyebrow { margin-bottom: var(--s-1); }
.list-head h1 { margin: 0 0 var(--s-1); overflow-wrap: anywhere; }
.list-head .numbers { margin-bottom: var(--s-3); }
.list-head .acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.list-head .follow-line { margin: 0; }
.list-head .follow-line .said:empty { display: none; }
@media (width < 600px) {
	.list-head { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
	.list-head .mosaic { aspect-ratio: 2 / 1; }
}

/* Share's sheet on a model's page (api/share.js shareSheet, docs/SOCIAL.md
   U14): the site's dialog, wide enough for the embed code; each field with
   its Copy beside it, under it on a phone. */
dialog.share-sheet { width: min(520px, calc(100vw - 32px)); }
.share-sheet .copy-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-2) var(--s-3); margin: 0 0 var(--s-4); }
.share-sheet .copy-row label { flex: 1 1 16em; margin: 0; }
.share-sheet .actions { margin-top: var(--s-4); }
.share-sheet .share-to { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-4); }
.share-sheet .share-to p { flex-basis: 100%; margin: 0; color: var(--ink-soft); font-size: var(--t-small); }

/* The directory of collections as wide as the gallery it is a tab of, its
   title and a line about it over the tabs. */
.collections .page-head { margin-bottom: var(--s-4); }
.collections .page-head h1 { margin: 0; letter-spacing: -0.03em; }
.collections .page-head .lede { margin-top: var(--s-2); color: var(--ink-soft); }
