/* SynthArt, a part of sylin.org: its one dusk ground, hairlines, grey reading text and white names, and one
   accent, amber (local/reports/sylin-native/REVIEW.md). The colour belongs to the pictures, so the interface
   stays dusk and grey. Amber marks only where you are or what is yours: the view you chose, a filter you set,
   Copy, your own words in a prompt, focus, and the Art in SynthArt's name. System fonts only, as sylin.org: no webfonts, no trackers. */

:root {
  color-scheme: dark;
  /* ground: sylin.org's own */
  --bg: #0f0e12;
  --bg-2: #0d0c10;
  --code-bg: #0a090c;                  /* the prompt box */
  /* two raised steps: Frontier's */
  --panel: #131217;                    /* the filter sheet, toasts */
  --panel-2: #17161c;                  /* fields */
  --glass: rgba(15, 14, 18, 0.92);     /* the header and the Copy bar */
  --veil: rgba(15, 14, 18, 0.72);      /* buttons and labels on an image */
  /* lines */
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.1);
  --line-3: rgba(255, 255, 255, 0.18);
  --line-focus: #6b6a75;
  /* ink */
  --ink: #f4f4f5;                      /* titles, names, what you typed */
  --ink-2: #c9c9d1;                    /* reading text, the prompt */
  --ink-3: #a1a1aa;                    /* credits, tags, quiet controls */
  --muted: #8b8b95;                    /* hints, placeholders: 5.7:1 on the ground */
  /* the one accent */
  --amber: #fbbf24;
  --amber-2: #fcd34d;
  --on-amber: #18181b;
  --amber-wash: rgba(251, 191, 36, 0.08);
  --amber-line: rgba(251, 191, 36, 0.3);
  --danger: #fb7185;                   /* a failed action, and the status chip when something needs attention */
  /* type */
  --sans: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Cascadia Code', 'JetBrains Mono', ui-monospace, Consolas, monospace;
  /* corners */
  --r-press: 8px; --r-image: 8px; --r-frame: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink-2); font: 400 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink-2); text-decoration-color: var(--line-3); text-underline-offset: 3px; }
a:hover { color: var(--amber-2); text-decoration-color: currentColor; }
h1, h2 { margin: 0; line-height: 1.25; font-weight: 500; color: var(--ink); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1rem; }
p { margin: 0; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.offscreen { position: absolute; left: -9999px; top: 0; }

/* Controls: compact, hairline-edged, grey until chosen */
input, select, textarea, button, .button { font: inherit; color: inherit; }
input[type="search"], input:not([type]), select, textarea { padding: 8px 10px; border: 1px solid var(--line-2);
  border-radius: var(--r-press); background: var(--panel-2); color: var(--ink); min-width: 0; }
textarea { width: 100%; resize: vertical; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: var(--r-press); border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.024); cursor: pointer;
  text-decoration: none; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
button:hover, .button:hover { border-color: var(--line-focus); color: var(--ink); }
button:disabled { opacity: 0.55; cursor: default; }
/* The one action on a page: Copy. */
.primary { height: 44px; padding: 0 22px; border-color: var(--amber); background: var(--amber); color: var(--on-amber);
  font-size: 14px; font-weight: 500; }
.primary:hover { border-color: var(--amber-2); background: var(--amber-2); color: var(--on-amber); }
.quiet { border-color: transparent; background: none; color: var(--ink-3); font-weight: 500; }
.quiet:hover { border-color: transparent; color: var(--amber); }
/* A value you chose (a filter in effect): a wash, never solid, since several can be on at once. */
.toggle[aria-pressed="true"], .filters-button.on { border-color: var(--amber-line); background: var(--amber-wash); color: var(--ink); font-weight: 500; }
/* A pair that says where you are (Cards / Panes): one frame, the chosen half underlined. */
.segmented { display: inline-flex; flex-wrap: nowrap; border: 1px solid var(--line-2); border-radius: var(--r-press); overflow: hidden; }
.segmented button { border: 0; border-radius: 0; background: none; color: var(--ink-3); }
.segmented button + button { border-left: 1px solid var(--line); }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { color: var(--ink); font-weight: 500; background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 -2px 0 var(--amber); }
/* A star: an outline when off, filled amber when on. */
.star { width: 34px; height: 34px; padding: 0; font-size: 16px; line-height: 1; color: transparent;
  -webkit-text-stroke: 1.3px var(--ink-3); }
.tools .star { color: transparent; -webkit-text-stroke-color: var(--ink); }
.star:hover, .tools .star:hover { color: transparent; -webkit-text-stroke-color: var(--amber-2); }
.star[aria-pressed="true"], .tools .star[aria-pressed="true"] { color: var(--amber); -webkit-text-stroke-color: var(--amber); }

/* Sylin's top bar. The markup and these rules are sylin.org's own (website: src/_includes/base.njk and the nav block
   of src/assets/site.css), with its values written out, as frontier.sylin.org repeats them too. Change it on
   sylin.org first, then in Frontier and here, so the three bars stay one bar. */
.nav { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(255, 255, 255, 0.06); background: rgba(15, 14, 18, 0.92); backdrop-filter: blur(6px);
  font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif; font-size: 16px; line-height: 1.7; }
.nav .wrap { max-width: 1360px; margin: 0 auto; padding: 18px 32px; display: flex; align-items: center; justify-content: space-between; }
.nav a { color: #a1a1aa; text-decoration: none; transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.nav a:hover { color: #fbbf24; text-decoration: none; }
.nav a:focus-visible { outline: 2px solid #fbbf24; outline-offset: 3px; border-radius: 2px; }
.nav .brand { font-weight: 600; font-size: 15px; letter-spacing: 0.34em; color: #f4f4f5; }
.nav .links { display: flex; gap: 28px; font-size: 14px; }
.nav .links a.here { color: #fbbf24; }
.nav .links a.gh { color: #fbbf24; }
@media (max-width: 780px) {
  .nav .wrap { flex-wrap: wrap; gap: 8px; padding-top: 12px; padding-bottom: 10px; }
  .nav .brand { width: 100%; text-align: center; }
  .nav .links { width: 100%; flex-wrap: wrap; justify-content: center; gap: 0 18px; font-size: 12px; }
  .nav .links a { display: inline-flex; align-items: center; min-height: 32px; }
}
@media (max-width: 480px) {
  .nav .wrap { padding-left: 20px; padding-right: 20px; }
  .nav .links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 8px; }
  .nav .links a { justify-content: center; }
}
/* SynthArt's search, in the bar's open middle (Frontier's box, holding a real field). */
.nav .nav-search { flex: 1; max-width: 380px; margin: -3px 32px; height: 30px; display: flex; align-items: center; gap: 9px; padding: 0 8px 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; background: rgba(255, 255, 255, 0.03); color: #8b8b95; cursor: text; }
.nav-search:hover, .nav-search:focus-within { border-color: rgba(251, 191, 36, 0.45); }
.nav-search svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink);
  font: 400 13.5px var(--sans); }
.nav-search input:focus { outline: none; }
.nav-search input::placeholder { color: #8b8b95; }

/* SynthArt's own row under the bar: its filters on the left, its views on the right, and its search where the bar
   has no room for it. The glass sits on a layer behind the row: a blur on the row itself would become the box the
   filter sheet and its scrim (fixed, inside the row) are placed in, instead of the screen. */
/* The hero: a slim band on the library only. SynthArt's name, an amber rule, and what it is, read as one unit
   from the left; the name is the bar's SYLIN writ large. A low amber bloom sits behind the name. The band has no
   line of its own: it and the ribbon below read as one header. It is part of the page, so it scrolls away and
   leaves the ribbon under the bar. */
.hero { display: none; background: radial-gradient(520px 260px at 0% 0%, rgba(251, 191, 36, 0.07), transparent 70%), var(--bg); }
body[data-section="library"] .hero { display: block; }
.hero .wrap { max-width: 1360px; margin: 0 auto; padding: 34px 32px 26px; display: flex; align-items: center; justify-content: flex-start; gap: 24px 44px; }
/* The right margin takes back the last letter's tracking, so the space to the rule is true. */
.hero h1 { flex: none; margin-right: -0.26em; font-size: clamp(28px, 3.1vw, 40px); font-weight: 300; line-height: 1; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--ink); }
/* The Art in the name is the one amber here, the same as SynthArt lit in the bar above; the rule stays grey. */
.hero h1 span { color: var(--amber); }
.hero .about { max-width: 620px; padding-left: 44px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.hero .lead { color: var(--ink); font-size: 17px; font-weight: 500; line-height: 1.35; text-wrap: balance; }
.hero .about p + p { margin-top: 6px; color: var(--ink-3); font-size: 14px; line-height: 1.55; text-wrap: pretty; }
@media (max-width: 980px) {
  .hero .wrap { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero .about { padding-left: 16px; }
}
@media (max-width: 520px) {
  .hero .wrap { padding: 18px 12px 16px; gap: 10px; }
  .hero h1 { font-size: 24px; letter-spacing: 0.24em; }
  .hero .about { padding-left: 0; border-left: 0; }
  .hero .lead { font-size: 15px; }
  .hero .about p + p { font-size: 13.5px; }
}
/* The library is always at least a screen tall, so the page can rest with the hero scrolled away while results load. */
#library { min-height: 100vh; }
.ribbon { display: none; position: sticky; top: 63px; z-index: 39; border-bottom: 1px solid var(--line); }
.ribbon::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--glass); backdrop-filter: blur(6px); }
.ribbon.sheet-open { z-index: 41; }   /* over the bar while the filter sheet is open, so its scrim dims the bar too */
.ribbon .wrap { max-width: 1360px; margin: 0 auto; padding: 10px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body[data-section="library"] .ribbon { display: block; }
.ribbon .toolbar { flex: 0 1 auto; min-width: 0; }
.ribbon .segmented { flex: none; margin-left: auto; }
.search-slot { display: flex; flex: 1 1 260px; min-width: 0; }
.search-slot:empty { display: none; }
.ribbon .nav-search, .hero .nav-search { flex: 1; max-width: none; margin: 0; height: 34px; display: flex; align-items: center; gap: 9px; padding: 0 8px 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; background: rgba(255, 255, 255, 0.03); color: #8b8b95; cursor: text; }

/* Library */
main { max-width: 1360px; margin: 0 auto; padding: 20px 32px 60px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* A filter is as wide as the option chosen, not its longest, so the ribbon stays one row. */
.toolbar select { field-sizing: content; max-width: 200px; height: 32px; padding: 0 8px 0 12px; font-size: 13px;
  color: var(--ink-2); background: rgba(255, 255, 255, 0.024); cursor: pointer; }
.toolbar select:hover { border-color: var(--line-focus); }
/* A filter set to anything but its "All …" option is a value you chose. */
/* The picture mode: five icons in one frame, the chosen one lit. */
.toolbar .segmented { flex: none; margin-left: 0; }
.toolbar .scope button { padding: 0 11px; }
/* A word before the picture icons says what they choose between. */
.picture-slot { display: contents; }
.examples { margin: 0 -2px 0 6px; color: var(--muted); font-size: 12px; }
/* The keys are shown only in the wide rail. */
.examples .keys, .pictures kbd { display: none; }
.keys { display: inline-flex; gap: 3px; }
/* Each picture icon; the chosen one also says its name. */
.pictures button { min-width: 34px; padding: 0 8px; gap: 6px; }
.pictures button span { display: none; font-size: 13px; }
.pictures button[aria-pressed="true"] span { display: inline; }
.pictures svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.pictures button[aria-pressed="true"] { color: var(--amber-2); }
/* The rail: on a wide screen the picture icons stand in the empty margin left of the grid, outside it, so the
   grid keeps its whole width. They stay in reach while the grid scrolls. Plain rows as Frontier's side tabs: no
   frame and no fill, the chosen one in white with an amber bar at its left. Where the margin is too narrow for a
   rail, the icons are in the toolbar. */
.rail { display: none; }
@media (min-width: 1400px) {
  .rail { position: sticky; top: 134px; float: left; width: 40px; margin-left: -50px; display: flex; flex-direction: column; gap: 10px; }
  .rail .examples { display: none; margin: 0; padding-left: 12px; color: var(--muted); font: 600 10px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
  .rail .pictures { flex-direction: column; gap: 2px; border: 0; border-radius: 0; overflow: visible; }
  .rail .pictures button { justify-content: flex-start; height: 36px; padding: 0 0 0 11px; gap: 10px; border: 0; background: none; color: var(--ink-3); font-size: 14px; }
  .rail .pictures button + button { border: 0; }
  .rail .pictures button:hover { color: var(--ink); }
  .rail .pictures button span, .rail .pictures button[aria-pressed="true"] span { display: none; font-size: 14px; }
  .rail .pictures button[aria-pressed="true"] { color: var(--ink); font-weight: 500; background: none; box-shadow: inset 2px 0 var(--amber); }
  .rail .pictures svg { width: 18px; height: 18px; flex: none; }
}
/* With more margin, each icon has its name beside it. */
@media (min-width: 1620px) {
  .rail { width: 136px; margin-left: -152px; }
  /* The heading carries a keycap, M, which steps through the rows; each row carries its own number, plain. */
  .rail .examples { display: flex; align-items: center; justify-content: space-between; padding-right: 8px; }
  .rail .examples .keys { display: inline-flex; }
  .rail .examples kbd { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16); border-bottom-color: rgba(255, 255, 255, 0.26); border-radius: 4px; background: rgba(255, 255, 255, 0.03);
    color: var(--ink-3); font: 500 10px/1 var(--mono); letter-spacing: 0; text-transform: none; }
  .rail .pictures button { padding-right: 8px; }
  /* Each number stands in a box as wide as the keycap above, so the five are centred on one line down the rail. */
  .rail .pictures kbd { display: inline-flex; justify-content: center; flex: none; width: 17px; margin-left: auto; color: var(--muted); font: 400 11px/1 var(--mono); }
  .rail .pictures button:hover kbd, .rail .pictures button[aria-pressed="true"] kbd { color: var(--ink-2); }
  .rail .pictures button span, .rail .pictures button[aria-pressed="true"] span { display: inline; }
}
}
.toolbar select:not(#f-sort):not(:has(option[value=""]:checked)) { border-color: var(--amber-line); background-color: var(--amber-wash);
  color: var(--ink); font-weight: 500; }
.toolbar option, .toolbar optgroup { background: var(--panel); color: var(--ink-2); }
.sheet, .sheet.few { display: contents; }
.filters-button, .sheet-head { display: none; }
.scrim { position: fixed; inset: 0; z-index: 1; background: rgba(6, 6, 8, 0.62); backdrop-filter: blur(3px); }
/* The library's first line: SynthArt and its count as a Frontier kicker. */
.kicker-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 4px 0 14px; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font: 600 11px var(--sans); letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--amber); }
.kicker .dim { color: var(--muted); font-weight: 500; letter-spacing: 0.1em; }
/* The grid: lanes that each card joins at the shortest (library.js). The image leads, whole, at its own shape. */
.grid { --lane: 230px; --gap: 16px; display: flex; gap: var(--gap); align-items: flex-start; }
.grid[data-view="panes"] { --lane: 180px; --gap: 10px; }
.lane { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.card { position: relative; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.media { position: relative; order: -1; }   /* the picture is shown above the title, which comes first in the page */
.cover { position: relative; display: block; overflow: hidden; border-radius: var(--r-image); background: var(--panel-2); }
/* The frame has the shape of the card's usual picture (library.js sets it), and each picture is put inside it. */
/* A picture fades in when it has come. */
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.cover img.in { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .cover img { transition: opacity 0.25s ease; } }
/* A hairline over every image, so a dark photo keeps its edge on the dark ground. */
.cover::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line-2);
  pointer-events: none; }
.card-body { display: flex; flex-direction: column; gap: 1px; padding: 0 2px; min-width: 0; }
.card h2 { font-size: 14px; font-weight: 500; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card:hover h2 a { color: var(--amber-2); }
.meta { color: var(--ink-3); font-size: 13px; overflow-wrap: anywhere; }
.card .meta { font-size: 12.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.excerpt { margin-top: 3px; min-height: 2.9em; color: var(--ink-3); font-size: 13px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
/* Words a search matched, inside a result's excerpt. */
.excerpt mark { background: none; color: var(--ink); font-weight: 500; }
/* The tools on the image: dark glass, shown on hover or focus, always on a touch screen. */
.tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; }
.card:hover .tools, .card:focus-within .tools { opacity: 1; }
@media (hover: none), (pointer: coarse) { .tools { opacity: 1; } }
.tools button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-3); border-radius: var(--r-press);
  background: var(--veil); backdrop-filter: blur(6px); color: var(--ink); }
.tools button:hover { border-color: var(--amber-line); color: var(--amber-2); }
.tools svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
/* Labels on the image: sentence-case pills on the same glass. */
.flags { position: absolute; left: 8px; bottom: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.flags span { padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 11px; font-weight: 500;
  line-height: 1.4; color: var(--ink-2); background: var(--veil); backdrop-filter: blur(6px); }
/* Panes: the same lanes, narrower, with the title and credit over the image on hover. */
.grid[data-view="panes"] .card { gap: 0; }
.grid[data-view="panes"] .cover { border-radius: 6px; }
.grid[data-view="panes"] .card-body { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 30px 10px 8px;
  border-radius: 0 0 6px 6px; background: linear-gradient(transparent, rgba(15, 14, 18, 0.88)); opacity: 0; pointer-events: none; }
.grid[data-view="panes"] .card-body h2 a { color: var(--ink); }
.grid[data-view="panes"] .card-body .meta { color: var(--ink-2); }
.grid[data-view="panes"] .card:hover .card-body, .grid[data-view="panes"] .card:focus-within .card-body { opacity: 1; }
.grid[data-view="panes"] .flags, .grid[data-view="panes"] .excerpt { display: none; }
.grid[data-view="panes"] .tools button { width: 30px; height: 30px; }
@media (prefers-reduced-motion: no-preference) {
  .tools, .grid[data-view="panes"] .card-body { transition: opacity 0.12s ease; }
  .card h2 a, a, button { transition: color 0.12s ease, border-color 0.12s ease, background-color 0.12s ease; }
}
/* Tags are plain words; a status ("Tested", "Passed") is a small grey pill. */
.badges { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.badges:empty { display: none; }
.badge { font-size: 13px; color: var(--ink-3); text-decoration: none; }
a.badge:hover { color: var(--amber-2); }
.badge.good, .trial .badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border: 1px solid var(--line-3);
  border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.actions .star { margin-left: auto; }
.empty { padding: 48px 0; text-align: center; color: var(--ink-3); }
#sentinel { height: 1px; }

/* Idea */
.back { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; font-size: 14px; }
.beside { display: flex; gap: 20px; }
.beside a { display: inline-flex; align-items: center; gap: 8px; }
.back a { color: var(--ink-3); text-decoration: none; }
.back a:hover { color: var(--amber-2); }
.idea { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; }
.gallery { position: sticky; top: calc(63px + 24px); }
/* Help: a quiet word after the lead's last line, and the small pane it opens over a dimmed library. */
.hero .help-open { height: auto; padding: 0 0 0 4px; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
dialog.help { width: min(460px, calc(100vw - 32px)); padding: 22px 24px 18px; border: 1px solid var(--line-2); border-radius: var(--r-frame);
  background: var(--panel); color: var(--ink-2); }
dialog.help::backdrop { background: rgba(10, 9, 12, 0.6); }
.help h2 { margin-bottom: 12px; color: var(--ink); font-size: 17px; font-weight: 500; }
.help p { font-size: 14px; line-height: 1.6; text-wrap: pretty; }
.help p + p { margin-top: 10px; }
.help form { display: flex; justify-content: flex-end; margin-top: 18px; }
/* The picture is a way in to a larger view: a zoom cursor, and a small button at its corner. */
.gallery .frame { position: relative; display: flex; justify-content: center; }
.gallery .frame > a { position: relative; display: block; cursor: zoom-in; }
.gallery .expand { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-3);
  border-radius: var(--r-press); background: var(--veil); color: var(--ink); opacity: 0; }
.gallery .frame:hover .expand, .gallery .frame:focus-within .expand { opacity: 1; }
.gallery .expand svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: none), (pointer: coarse) { .gallery .expand { opacity: 1; } }
/* The larger view: over the whole window on the dusk ground. A bar above says what the picture is and holds
   Download and Close; the picture is shown whole, never beyond its own size; a bar below chooses between the
   pictures. A click on the picture shows it at its own size, to pan; another fits it again. */
dialog.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--code-bg); color: var(--ink-2); }
dialog.lightbox[open] { display: flex; flex-direction: column; }
dialog.lightbox::backdrop { background: none; }
.lightbox .bar { flex: none; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; }
.lightbox .bar p { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox .bar a.button { text-decoration: none; color: var(--ink-2); }
.lightbox .bar .quiet { width: 32px; padding: 0; font-size: 20px; line-height: 1; }
.lightbox .choices { justify-content: center; min-height: 56px; }
.lightbox .choices kbd { margin-left: 6px; color: var(--muted); font: 400 11px/1 var(--mono); }
.lightbox .view { flex: 1; min-height: 0; display: flex; overflow: auto; padding: 0 24px; }
.lightbox .view img { margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 8px; box-shadow: 0 0 0 1px var(--line-2); cursor: zoom-in; }
.lightbox.actual .view img { max-width: none; max-height: none; cursor: zoom-out; }
@media (prefers-reduced-motion: no-preference) {
  dialog.lightbox[open] { animation: lightbox-in 0.12s ease-out; }
  dialog.lightbox[open] .view img { animation: lightbox-picture 0.15s ease-out; }
}
@keyframes lightbox-in { from { opacity: 0; } }
@keyframes lightbox-picture { from { transform: scale(0.98); } }
@media (hover: none), (pointer: coarse), (max-width: 860px) { .lightbox .choices kbd { display: none; } .lightbox .view { padding: 0 8px; } }
/* The image at its own shape, never boxed: it shrinks to fit the height, not the other way round. */
.gallery .main { width: auto; height: auto; max-width: 100%; max-height: 74vh; margin: 0 auto; border-radius: var(--r-frame);
  box-shadow: 0 0 0 1px var(--line-2); }
.caption { margin-top: 10px; }
.caption:empty { display: none; }
.caption p { margin: 0 0 2px; font-size: 13px; }
.strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
/* Above an idea's pictures, as on the library's rail: a heading with the key that steps through them. Each picture
   has its number after its name. Shown where there is a keyboard to press. */
.strip-head { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted); font: 600 10px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.strip-head kbd, .beside kbd { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom-color: rgba(255, 255, 255, 0.26); border-radius: 4px; background: rgba(255, 255, 255, 0.03); color: var(--ink-3); font: 500 10px/1 var(--mono); letter-spacing: 0; }
.strip-head + .strip { margin-top: 8px; }
.thumb span { display: inline-flex; align-items: baseline; gap: 5px; }
.thumb kbd { color: var(--muted); font: 400 10px/1 var(--mono); }
.thumb[aria-pressed="true"] kbd { color: var(--ink-2); }
@media (hover: none), (pointer: coarse), (max-width: 860px) { .strip-head, .thumb kbd, .beside kbd { display: none; } }
.strip:empty { display: none; }
/* A small picture with its name under it. */
.thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; height: auto; padding: 0; border: 0; background: none;
  color: var(--ink-3); font-size: 11px; white-space: nowrap; }
.thumb:hover img { opacity: 1; }
.thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--panel); opacity: 0.7; }
.thumb[aria-pressed="true"] { color: var(--ink); }
.thumb[aria-pressed="true"] img { opacity: 1; box-shadow: 0 0 0 1.5px var(--ink); }
.detail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.title-row { display: flex; align-items: flex-start; gap: 12px; }
.title-row h1 { flex: 1; overflow-wrap: anywhere; font-size: clamp(28px, 2.4vw, 34px); font-weight: 300; line-height: 1.15;
  letter-spacing: -0.02em; }
.title-row .star { margin-top: 4px; }
/* Credit: quiet links with a dotted underline. */
.detail .meta a { color: var(--ink-3); text-decoration: underline dotted var(--muted); text-underline-offset: 4px; }
.detail .meta a:hover { color: var(--amber-2); text-decoration-color: currentColor; }
.panel { display: flex; flex-direction: column; gap: 14px; }
/* Copy leads the prompt where the screen is wide; on a phone it stays fixed at the bottom. */
.panel.recipe .copy-bar { order: -1; }
.options { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.options:empty, .fields:empty { display: none; }
.check { display: inline-flex; align-items: center; gap: 8px; }
.segmented.mode button { height: 36px; padding: 0 16px; font-size: 14px; }
/* "Use my own photo": a switch. */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.switch input { appearance: none; position: relative; flex: none; width: 36px; height: 20px; margin: 0; border: 1px solid var(--line-focus);
  border-radius: 999px; background: transparent; cursor: pointer; }
.switch input::before { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted); }
.switch input:checked { border-color: var(--amber); background: var(--amber); }
.switch input:checked::before { transform: translateX(16px); background: var(--on-amber); }
@media (prefers-reduced-motion: no-preference) { .switch input, .switch input::before { transition: 0.15s ease; } }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.fields .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-weight: 500; font-size: 13px; color: var(--ink-2); }
/* A field grows with its words, and its default shows whole, in muted italics, until it is typed over. */
.field textarea { field-sizing: content; min-height: 0; resize: none; padding: 8px 10px; font-size: 14px; line-height: 1.45; }
.field textarea::placeholder { color: var(--muted); font-style: italic; opacity: 1; }
.field textarea:focus { border-color: var(--amber); outline: none; }
.hint { color: var(--muted); font-size: 13px; }
/* The prompt: sylin.org's quote, on the deepest ground with a soft amber rule. */
.prompt { position: relative; margin: 0; padding: 16px 18px; max-height: 52vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 400 15px/1.65 var(--sans); color: var(--ink-2); background: var(--code-bg); border: 1px solid var(--line-2);
  border-left: 2px solid rgba(251, 191, 36, 0.5); border-radius: 0 8px 8px 0; }
/* What a person can steer, above the prompt: a row for each aspect, with where it comes from and a field for
   their own words. The field shows, in grey, what the prompt has now. */
.steering { display: flex; flex-direction: column; gap: 8px; }
.steer { display: grid; grid-template-columns: 84px auto minmax(0, 1fr); align-items: center; gap: 10px; }
.steer-name { color: var(--ink-2); font-size: 14px; }
.steer input { height: 32px; font-size: 14px; }
.steer input::placeholder { color: var(--muted); }
.steer > .steer-name + input { grid-column: 2 / -1; }
.found { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink-3); }
/* The whole prompt is on the page: nothing scrolls inside it. */
.panel.recipe > .prompt { max-height: none; overflow: visible; }
.prompt.quiet { max-height: 34vh; border-left: 1px solid var(--line-2); border-radius: 8px; }
details summary { cursor: pointer; color: var(--ink-3); font-size: 14px; }
details summary:hover { color: var(--ink); }
details > :not(summary) { margin-top: 10px; }
.tests { margin-top: 48px; display: flex; flex-direction: column; }
.tests h2 { font-size: 22px; font-weight: 300; letter-spacing: -0.015em; margin-bottom: 8px; }
/* Each test is a ruled item, not a box. */
.trial { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 16px 0; border-top: 1px solid var(--line-2); }
.trial img { border-radius: 6px; box-shadow: 0 0 0 1px var(--line-2); }
.trial > div { display: flex; flex-direction: column; gap: 8px; }

/* Where the list ends. */
.end { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 40px; color: var(--muted); font-size: 13px; }
/* More prompts under one, as small pictures with their titles. */
.alike { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.alike h2 { margin-bottom: 14px; font-size: 14px; font-weight: 500; color: var(--ink-3); }
.alike-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.alike-row a { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--ink-2); text-decoration: none; font-size: 13px; }
.alike-row a:hover { color: var(--amber-2); }
.alike-row img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--panel-2); }
.alike-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The foot of every page: what this is, quietly. */
.foot { max-width: 1360px; margin: 0 auto; padding: 28px 32px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot a { color: var(--ink-3); }
/* The Tab key's first stop: past the bar, to the page's own content. Seen only when it has the focus. */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; padding: 8px 12px; border: 1px solid var(--line-3); border-radius: 8px; background: var(--panel); color: var(--ink); }
/* The search at the foot of the band, on a phone's library. */
#band-search { padding: 0 12px 14px; }
#band-search:empty { display: none; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 20; padding: 10px 16px; max-width: calc(100vw - 32px);
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--ink); font-size: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
.toast.failed { border-left: 2px solid var(--danger); }

/* Where the filters no longer fit one row of the ribbon: Sort and a Filters button, and the other filters open
   in a sheet from the bottom of the screen. */
@media (max-width: 1200px) {
  .toolbar { flex-wrap: nowrap; }
  .filters-button { display: inline-flex; }
  .sheet { display: none; }
  .sheet.open { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 10px;
    max-width: 560px; max-height: 85vh; margin: 0 auto; overflow: auto; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--panel); border-top: 1px solid var(--line-2); border-radius: 16px 16px 0 0; box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.6); }
  .sheet.open .sheet-head { display: flex; align-items: center; justify-content: space-between; }
  .sheet-head h2 { font-size: 16px; font-weight: 500; }
  .sheet.open select, .sheet.open .toggle { width: 100%; max-width: none; height: 44px; font-size: 16px; }
}
@media (max-width: 1100px) {
  .ribbon { display: block; }
  body:not([data-section="library"]) .ribbon :is(.toolbar, .segmented) { display: none; }
}
@media (max-width: 900px) {
  .nav { position: static; }
  .ribbon { top: 0; }
  body:not([data-section="library"]) .ribbon { position: static; }
}
/* Text fields at 16px on a phone or tablet, so the browser does not zoom in when one is focused. */
@media (max-width: 900px) {
  input, select, textarea, .nav-search input { font-size: 16px; }
  .ribbon .nav-search, .hero .nav-search { height: 40px; }
}
@media (max-width: 860px) {
  .ribbon .wrap { padding: 8px 12px; }
  .hero .wrap { padding-left: 12px; padding-right: 12px; }
  main { padding: 12px 12px 48px; }
  .idea { grid-template-columns: 1fr; gap: 16px; }
  .gallery { position: static; }
  /* The image takes at most 40% of the screen, so the title, the prompt and Copy follow on the first screen. */
  .gallery .main { max-height: 40vh; }
  .strip { flex-wrap: nowrap; overflow-x: auto; }
  .thumb { flex: none; width: 52px; }
  .thumb img { width: 52px; height: 52px; }
  .title-row h1 { font-size: 26px; }
  .back { margin-bottom: 8px; }
  .detail { gap: 12px; }
  .panel.recipe .copy-bar { order: 0; }
  .steer { grid-template-columns: 1fr; gap: 6px; }
  .steer > .steer-name + input { grid-column: auto; }
  .copy-bar { position: sticky; bottom: 0; z-index: 3; margin: 0 -12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--glass); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }
  .copy-bar .primary { flex: 1; height: 48px; }
  /* A toast on the idea page sits above the Copy bar. */
  body[data-section="idea"] .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .grid { --gap: 12px; }
  .trial { grid-template-columns: 1fr; }
  .rows li { grid-template-columns: 1fr; gap: 2px; }
}
/* A phone: two lanes of images, each with its title only, and less chrome above them. */
@media (max-width: 520px) {
  .grid { --gap: 10px; }
  .grid[data-view="panes"] { --lane: 100px; --gap: 6px; }
  .card { gap: 5px; }
  .card h2 { font-size: 13px; }
  .grid[data-view="cards"] .card .meta { display: none; }
  .tools { top: 6px; right: 6px; gap: 5px; }
  .tools button, .grid[data-view="panes"] .tools button { width: 32px; height: 32px; }
  .ribbon .segmented button { padding: 0 11px; }
  .kicker-row { margin-bottom: 10px; }
}

/* On a phone the sort, the picture icons, All / Processed and Filters take two rows. */
/* On a phone the toolbar's controls join the ribbon's own rows, so the last filter shares a row with Large / Small. */
@media (max-width: 600px) {
  .ribbon .toolbar { display: contents; }
  .examples { display: none; }
  .toolbar .pictures button, .ribbon select, .ribbon .segmented button { height: 40px; }
  .alike-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot { padding: 22px 12px 96px; }
}
