/* Fuji Vault X100VI. White page, black ink, hairlines, olive numbering, square corners. */
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("/fonts/hanken-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("/fonts/hanken-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #111111;
  --grey: #78726e;
  --olive: #8c8f80;
  --line: #d6d3d0;
  --hair: #bdb9b5;
  --soft: #f6f5f4;
  --bad: #9c2f22;
  /* the favourite star: one warm hue that sits with the olive and the ink */
  --star: #e39a2d;
  --star-soft: rgba(227, 154, 45, 0.35);
  /* motion: quick out, soft landing; every effect answers an action */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --rail: 260px;
  --bar: 58px;
  color-scheme: light;
}

* { box-sizing: border-box; border-radius: 0; }
html, body { margin: 0; height: 100%; background: #fff; color: var(--ink); }
body {
  font-family: "Hanken Grotesk", -apple-system, "Helvetica Neue", sans-serif; font-weight: 400; font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
}
#app { display: flex; min-height: 100%; }
b, strong { font-weight: 500; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; cursor: pointer; transition: text-decoration-color 140ms ease; }
a:hover { text-decoration-color: var(--ink); }
p { margin: 0 0 10px; }
.muted { color: var(--grey); }
.small { font-size: 13px; line-height: 1.5; }
.bad { color: var(--bad); }
.verbatim { white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- rail (wide) ---------- */
#rail {
  width: var(--rail); flex: 0 0 var(--rail); border-right: 1px solid var(--line); padding: 30px 0 22px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; background: #fff;
}
.brand { margin: 18px 26px 26px; display: flex; align-items: baseline; gap: 10px; }
.brand .name { font-weight: 300; font-size: 30px; line-height: 1; letter-spacing: -0.01em; }
.brand .body { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); }
#steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
#steps a {
  display: flex; align-items: baseline; gap: 10px; padding: 10px 26px; border-bottom: 1px solid var(--line);
  color: var(--grey); text-decoration: none; transition: color 140ms ease, background-color 140ms ease, box-shadow 200ms var(--ease);
}
#steps .n, #steps .t { transition: color 140ms ease, transform 200ms var(--ease); }
#steps .n { color: var(--olive); width: 34px; flex: 0 0 34px; font-size: 14px; }
#steps .t { flex: 1; }
#steps .s { font-size: 11px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink); }
/* hover: the row tints, a hairline bar comes in from the edge, the label steps right a touch */
#steps a:hover { color: var(--ink); background: var(--soft); box-shadow: inset 3px 0 0 var(--hair); }
#steps a:hover .n { color: var(--ink); }
#steps a:hover .t { transform: translateX(3px); }
#steps a:active { background: var(--line); }
#steps a.on { color: var(--ink); font-weight: 500; box-shadow: inset 3px 0 0 var(--ink); }
#steps a.on:hover { box-shadow: inset 3px 0 0 var(--ink); }
#steps a.on:hover .t { transform: none; }
#chosen a .name { transition: color 140ms ease; }
#chosen a:hover .name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
#chosen { margin-top: auto; padding: 18px 26px 0; }
.lbl { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); margin-bottom: 4px; }
#chosen .name { font-weight: 500; font-size: 17px; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.25; overflow-wrap: anywhere; }
#chosen .meta { color: var(--grey); font-size: 13px; }
#chosen a { text-decoration: none; display: block; }

/* ---------- bottom bar (phone) ---------- */
#bar { display: none; }

/* ---------- main ---------- */
#main { flex: 1; min-width: 0; padding: 46px 58px 70px; }
.page { max-width: 940px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
h1 { font-weight: 300; font-size: 40px; line-height: 1.08; margin: 0; letter-spacing: -0.01em; overflow-wrap: anywhere; }
hr.title { border: 0; border-top: 1px solid var(--hair); margin: 16px 0 16px; }
.intro { color: var(--grey); font-size: 17px; line-height: 1.5; margin: 0 0 26px; max-width: 760px; }
h2 {
  font-weight: 500; font-size: 13px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.08em;
  margin: 34px 0 14px; display: flex; align-items: baseline; gap: 10px;
}
h2 .n { color: var(--olive); font-weight: 400; letter-spacing: 0.02em; }
h2 .c { color: var(--grey); font-weight: 400; letter-spacing: 0.02em; text-transform: none; margin-left: auto; font-size: 13px; }
h3 { font-weight: 500; font-size: 16px; margin: 20px 0 6px; }
/* the back control on every detail screen: an outlined square button, "< Recipes" */
.back {
  display: inline-flex; align-items: center; gap: 9px; max-width: 100%; margin-bottom: 18px; padding: 8px 13px 8px 11px;
  border: 1px solid var(--ink); background: #fff; color: var(--ink); text-decoration: none;
  font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.2;
}
.back { transition: background-color 140ms ease; }
.back:hover { background: var(--soft); }
.back .chev { transition: transform 200ms var(--ease); }
.back:hover .chev { transform: translateX(-3px); }
.back:active { background: var(--line); }
.back .chev { flex: 0 0 auto; }
.back .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- controls ---------- */
button {
  font: inherit; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 0; padding: 12px 20px;
  cursor: pointer; white-space: nowrap; touch-action: manipulation;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease, transform 90ms ease;
}
button:hover { background: #333; }
/* press: the button sinks a pixel and darkens; the later, more specific rules keep their own colours */
button:active:not(:disabled) { transform: translateY(1px); background: #000; }
button.ghost:active:not(:disabled) { background: var(--line); }
button.link:active:not(:disabled) { background: none; transform: none; }
button.ghost { background: #fff; color: var(--ink); }
button.ghost:hover { background: var(--soft); }
button.link { background: none; border: 0; padding: 0; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400; text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; }
button.small { padding: 8px 14px; font-size: 12px; }
button:disabled { background: var(--line); border-color: var(--line); color: #fff; cursor: default; }
button.ghost:disabled { background: #fff; color: var(--hair); border-color: var(--line); }
button.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 22px 0 6px; }
.actions .note { color: var(--grey); font-size: 13px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

label.field, .field { display: block; margin: 0 0 16px; }
.field > .fl { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey); margin-bottom: 6px; }
.field > .fl em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--hair); }
.field.missing > .fl { color: var(--bad); }
.field.locked > .fl { color: var(--hair); }
input[type=text], input[type=search], input[type=url], input[type=password], input[type=number], textarea, select {
  font: inherit; font-size: 16px; width: 100%; height: 42px; padding: 8px 11px; border: 1px solid var(--hair);
  border-radius: 0; background: #fff; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none;
}
textarea { height: auto; min-height: 120px; line-height: 1.5; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); }
input.invalid, .field.missing input { border-color: var(--bad); }
.grid2f { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.grid3f { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 22px; }

/* segmented choices: square tiles, the chosen one filled black */
.seg { display: flex; flex-wrap: wrap; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); width: max-content; max-width: 100%; }
.seg button { background: #fff; color: var(--ink); border: 0; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 10px 16px; font-size: 12px; }
.seg button:hover { background: var(--soft); }
.seg button:active:not(:disabled) { background: var(--line); transform: none; }
.seg button.on, .seg button.on:active:not(:disabled) { background: var(--ink); color: #fff; }
.seg.full { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.seg.full button { white-space: normal; text-align: left; line-height: 1.3; min-height: 44px; }
.seg.dim { border-color: var(--line); }
.seg.dim button { color: var(--hair); border-color: var(--line); }
.field.missing .seg { box-shadow: 0 0 0 1px var(--bad); }

.stepper { display: inline-flex; border: 1px solid var(--hair); align-items: stretch; height: 42px; }
.stepper button { background: #fff; color: var(--ink); border: 0; padding: 0 14px; font-size: 18px; letter-spacing: 0; }
.stepper button:hover { background: var(--soft); }
.stepper button:active:not(:disabled) { background: var(--line); transform: none; }
.stepper button:disabled { color: var(--line); background: #fff; }
.stepper .v { min-width: 64px; display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.field.missing .stepper { border-color: var(--bad); }
.stepper.locked { border-color: var(--line); color: var(--hair); }

.checks { display: flex; gap: 22px; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checks input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1px solid var(--ink); margin: 0; border-radius: 0; cursor: pointer; }
.checks input:checked { background: var(--ink); box-shadow: inset 0 0 0 3px #fff; }

.swatch { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--ink); vertical-align: 0; }

/* ---------- tags ---------- */
.tag { font-size: 11px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; line-height: 1.3; }
.tag.box { border: 1px solid var(--ink); padding: 2px 5px; display: inline-block; }
.tag.solid { background: var(--ink); color: #fff; padding: 2px 5px; display: inline-block; }
.tag.no { color: var(--hair); }
.tag.miss { color: var(--bad); }
.tags { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; }

/* ---------- recipe cards (the box picker) ---------- */
/* at most three a row on a wide window, two when narrower, the cover the biggest thing on the card */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { border: 1px solid var(--line); padding: 6px 6px 9px; cursor: pointer; background: #fff; text-decoration: none; color: var(--ink); display: block; min-width: 0; }
.card { transition: border-color 160ms ease; }
.card:hover { border-color: var(--hair); }
.card .pic img { transition: transform 520ms var(--ease); }
.card:hover .pic img { transform: scale(1.04); }
.card.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.card .nm { display: block; font-size: 15px; line-height: 1.3; margin: 9px 0 5px; overflow-wrap: anywhere; }
.card .tags { gap: 4px 8px; }
.card .uses { display: block; margin-top: 5px; font-size: 12px; color: var(--grey); font-variant-numeric: tabular-nums; }
.pic { position: relative; aspect-ratio: 1 / 1; background: var(--soft); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic .ph { color: var(--hair); font-size: 12px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; text-align: center; padding: 8px; }
.pic .slot { position: absolute; top: 6px; left: 6px; }

/* ---------- search and filter sheet ---------- */
.searchrow { display: flex; gap: 10px; align-items: stretch; margin: 0 0 8px; }
.searchrow input { flex: 1; }
.searchrow button { height: 42px; padding: 0 20px; }
.orderrow { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; }
.orderrow .lbl { margin: 0; }
.sheet-back { position: fixed; inset: 0; background: rgba(17, 17, 17, 0.25); z-index: 20; }
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: #fff; z-index: 21;
  border-left: 1px solid var(--ink); overflow-y: auto; padding: 30px 30px 40px;
}
.sheet h1 { font-size: 32px; }
.sheet.wide { width: min(780px, 100%); }
.sheet-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.sheet > section:first-of-type h2, .sheet .vc-compare > section:first-child h2 { margin-top: 8px; }
.sheet .foot { position: sticky; bottom: -40px; background: #fff; padding: 14px 0 20px; border-top: 1px solid var(--line); margin-top: 24px; display: flex; gap: 10px; }

/* ---------- detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.detail > * { min-width: 0; }
.viewer { border: 1px solid var(--line); padding: 8px; }
.viewer .pic { aspect-ratio: 3 / 2; max-height: 74vh; width: 100%; }
.viewer .enlarge { display: block; width: 100%; padding: 0; border: 0; background: #fff; cursor: zoom-in; letter-spacing: 0; text-transform: none; }
.viewer .enlarge:hover { background: #fff; }
.viewer .pic img { object-fit: contain; background: #fff; }
.viewer .under { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; min-height: 34px; }
.viewer .under .tags { flex: 1; }
.viewer .pic { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.viewer .credit { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--grey); overflow-wrap: anywhere; }
.drop { border: 1px dashed var(--hair); padding: 14px 14px 12px; margin-top: 10px; }
.drop.over { border-color: var(--ink); border-style: solid; background: var(--soft); }
.drop .searchrow { margin: 8px 0 10px; }
.filepick { font-size: 14px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; }
.filepick:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; max-width: 760px; }
.shots button { position: relative; padding: 0; border: 1px solid var(--line); background: #fff; display: block; }
.shots button:hover { background: #fff; border-color: var(--hair); }
.shots button.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.shots .mark { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; color: var(--bad); font-size: 10px; letter-spacing: 0.06em; line-height: 1.2; padding: 3px 4px; text-align: left; white-space: normal; }
.picked { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.srcshot { max-width: 220px; border: 1px solid var(--line); }
.statusline { color: var(--grey); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 9px 0; margin: 0 0 8px; }
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
.strip button { padding: 0; border: 1px solid var(--line); background: #fff; }
.strip button.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.strip .pic { aspect-ratio: 1 / 1; }

/* the settings grid: one cell per attribute, its line icon and label on top, the value under it */
.icon { display: block; flex: 0 0 auto; }
.attr { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--grey); }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.spec > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 11px 12px 12px; min-width: 0; }
.spec .v { font-size: 20px; font-weight: 300; line-height: 1.15; margin-top: 8px; overflow-wrap: anywhere; white-space: pre-wrap; font-variant-numeric: tabular-nums; }
.spec .l, .film .l { font-size: 11px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--grey); line-height: 1.35; }
.spec .miss .v, .spec .miss .l, .spec .miss .attr, .film.miss .v, .film.miss .l, .film.miss .attr { color: var(--bad); }
.film { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 8px 12px; padding: 11px 0 12px; border-top: 1px solid var(--ink); }
.film .attr { grid-column: 1 / -1; }
.film .v { font-size: 24px; font-weight: 300; line-height: 1.1; }

/* the audit's filled-in fields: one row, folded; a tap on the summary opens the list */
details.filled summary { cursor: pointer; list-style: none; padding-right: 22px; position: relative; }
details.filled summary::-webkit-details-marker { display: none; }
details.filled summary::after { content: "+"; position: absolute; right: 0; top: 0; color: var(--grey); }
details.filled[open] summary::after { content: "-"; }
details.filled ul { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--line); }
details.filled li { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
details.filled li:last-child { border-bottom: 0; padding-bottom: 0; }
details.filled .f { color: var(--grey); }

/* the recipe page: one column on a phone and a narrow window, in source order so the image comes first */
.rp { display: block; }
.rp-body, .rp-media, .rp-wide { min-width: 0; }
.rp-page .back { margin-bottom: 14px; }
.rp-body > header { margin-top: 26px; }
/* two columns from 1024 px: the sample viewer on the left held in view, the recipe on the right; Similar
   recipes (.rp-wide) follows the grid, so the held viewer lets go before it */
@media (min-width: 1024px) {
  .page.rp-page { max-width: 1400px; }
  .rp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 44px; align-items: start; }
  .rp-media { position: sticky; top: 24px; }
  .rp-media > section > h2 { margin-top: 4px; }
  .rp-media .viewer .pic { max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); }
  .rp-body > header { margin-top: 0; }
  .rp-wide .vc-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* every setting as hairline rows: the label with its icon on the left, the value on the right */
ul.overview { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
ul.overview li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
ul.overview .attr { color: var(--grey); }
ul.overview .v { text-align: right; white-space: pre-wrap; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
ul.overview li.miss .v, ul.overview li.miss .attr { color: var(--bad); }

/* the favourite star, right after the recipe name; the whole 44 px square is the tap target */
button.star {
  flex: 0 0 auto; margin-right: auto; width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--hair); border: 0; letter-spacing: 0;
}
button.star:hover { background: var(--soft); color: var(--ink); }
button.star.on { color: var(--ink); }
.top:has(> button.star) { justify-content: flex-start; align-items: flex-start; flex-wrap: nowrap; gap: 6px; }

/* the seven slots in equal columns, None on its own row */
.slotseg .seg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; }
.slotseg .seg button { padding: 10px 0; text-align: center; min-width: 0; }

/* shot history above Your shots; the collection picker in its sheet */
.histwrap { margin: 0 0 18px; max-width: 760px; }
.colpick { border-top: 1px solid var(--line); margin: 0 0 8px; }
.colrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 52px; }
.colrow .nm { overflow-wrap: anywhere; }

/* send to camera: the slot list, the overwrite confirm and the result, in one outlined panel */
.sendcam-open { margin-top: 14px; }
.sendcam-open p { margin: 8px 0 0; }
.sendcam { border: 1px solid var(--ink); padding: 12px 16px 16px; margin-top: 14px; }
.sendcam-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.sendcam-head .lbl { margin: 0; color: var(--ink); }
.sendcam .working { margin: 6px 0; }
.sendcam .notice { margin: 8px 0 0; }
.sendcam .notice .actions { margin: 12px 0 0; }
.sendcam .notice.bad p { color: var(--ink); }
.sendcam-line { font-size: 16px; line-height: 1.45; margin: 0 0 12px; }
.sendcam-keep { margin: 14px 0 6px; }
.slotpick { border-top: 1px solid var(--line); margin: 6px 0 10px; }
button.slotrow {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 11px 4px;
  background: #fff; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); text-align: left;
  font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; white-space: normal;
}
button.slotrow:hover { background: var(--soft); }
.slotrow .c { font-weight: 500; font-variant-numeric: tabular-nums; }
.slotrow .nm { overflow-wrap: anywhere; }
.slotrow .sim { display: inline-flex; align-items: center; gap: 6px; color: var(--grey); font-size: 13px; }
table.diff { margin-top: 0; }
table.diff td { padding: 8px 10px; }
table.diff td.was { color: var(--grey); }
table.diff td, table.diff th { white-space: pre-wrap; }

/* ---------- the large picture view ---------- */
/* a soft white ground, the picture the only colour on it; ink controls in the page's square grammar */
.lb {
  position: fixed; inset: 0; z-index: 40; background: #faf9f8; color: var(--ink); overscroll-behavior: contain;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  padding-top: calc(14px + env(safe-area-inset-top));
  animation: lb-in 200ms var(--ease) backwards;
}
.lb.out { animation: lb-out 160ms ease-in forwards; }
.lb .lb-stage { animation: lb-grow 260ms var(--ease) backwards; }
.lb.out .lb-stage { animation: lb-shrink 160ms ease-in forwards; }
@keyframes lb-in { from { opacity: 0; } }
@keyframes lb-out { to { opacity: 0; } }
@keyframes lb-grow { from { transform: scale(0.965); } }
@keyframes lb-shrink { to { transform: scale(0.975); } }
.lb-top, .lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.lb-count { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; font-variant-numeric: tabular-nums; color: var(--grey); }
.lb-stage {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 12px 0;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; transition: transform 180ms var(--ease); }
.lb-pic.from-next { animation: lb-from-next 240ms var(--ease) backwards; }
.lb-pic.from-prev { animation: lb-from-prev 240ms var(--ease) backwards; }
@keyframes lb-from-next { from { opacity: 0; transform: translateX(28px); } }
@keyframes lb-from-prev { from { opacity: 0; transform: translateX(-28px); } }
.lb-ph { color: var(--hair); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.lb-credit { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--grey); min-width: 0; overflow-wrap: anywhere; }
.lb-credit a { color: var(--ink); }
/* the cover control for the sample in view (D36): a quiet link, or a small mark on the current cover */
button.link.setcover { font-size: 13px; color: var(--ink); }
.covermark { font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--olive); border: 1px solid var(--olive); padding: 1px 5px; line-height: 1.4; align-self: center; }
.lb-nav { display: flex; gap: 8px; }
button.lb-btn { background: #fff; color: var(--ink); border: 1px solid var(--ink); padding: 9px 16px; font-size: 12px; }
button.lb-btn:hover { background: var(--ink); color: #fff; }
button.lb-btn:disabled { background: transparent; color: var(--hair); border-color: var(--line); }
/* wide window: a tall hit zone either side of the picture, a chevron that answers the pointer */
button.lb-side {
  position: absolute; top: 12px; bottom: 12px; z-index: 1; width: 96px; padding: 0; border: 0; background: none; color: var(--ink);
  display: flex; align-items: center; letter-spacing: 0; opacity: 0.35; transition: opacity 140ms ease, transform 180ms var(--ease);
}
button.lb-side.prev { left: -18px; justify-content: flex-start; padding-left: 22px; }
button.lb-side.next { right: -18px; justify-content: flex-end; padding-right: 22px; }
button.lb-side:hover { background: none; opacity: 1; }
button.lb-side.prev:hover { transform: translateX(-3px); }
button.lb-side.next:hover { transform: translateX(3px); }
button.lb-side:disabled { opacity: 0; background: none; pointer-events: none; }
.lb-side svg { width: 18px; height: 30px; }
button.lb-side.prev:active { transform: translateX(-3px); }
button.lb-side.next:active { transform: translateX(3px); }
@media (min-width: 821px) { .lb-stage { padding: 12px 64px; } }
@media (max-width: 820px) { button.lb-side { display: none; } }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; margin: 4px 0 12px; }
th { background: var(--ink); color: #fff; font-weight: 500; text-align: left; padding: 9px 12px; white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.k { color: var(--grey); }
td.r, th.r { text-align: right; }
tr.pick { cursor: pointer; }
tr.pick:hover td { background: var(--soft); }
tr.current td { background: var(--soft); }
td select { height: 36px; font-size: 14px; }

.kv { display: grid; grid-template-columns: 170px 1fr; border-top: 1px solid var(--line); }
.kv > div { padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.kv > div.k { color: var(--grey); padding-right: 12px; }

/* ---------- notices ---------- */
.notice { border-left: 3px solid var(--ink); padding: 10px 16px; margin: 16px 0; background: var(--soft); }
.notice.bad { border-left-color: var(--bad); }
.notice p:last-child { margin-bottom: 0; }
.notice .h { font-weight: 500; margin-bottom: 4px; }
.notice.bad .h { color: var(--bad); }
pre { font-family: "SF Mono", Menlo, monospace; font-size: 12px; line-height: 1.5; white-space: pre-wrap; background: var(--soft); border: 1px solid var(--line); padding: 12px 14px; margin: 10px 0; max-height: 300px; overflow: auto; }
.working { border: 1px solid var(--line); padding: 18px 20px; margin: 20px 0; }
.working .h { font-weight: 500; margin-bottom: 4px; }
.working .bar { height: 2px; background: var(--line); position: relative; overflow: hidden; margin: 14px 0 10px; }
.working .bar::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; background: var(--ink); animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { 0% { left: -30%; } 100% { left: 100%; } }
.empty { border: 1px dashed var(--hair); padding: 28px 22px; color: var(--grey); }

/* ---------- inbox ---------- */
.item { border-top: 1px solid var(--ink); padding: 16px 0 8px; }
.item .head { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.item .pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 120px)); gap: 6px; margin-bottom: 12px; }
.item .pics .pic { border: 1px solid var(--line); }

/* ---------- lineage ---------- */
.lineage svg { display: block; max-width: 100%; }
.lineage svg text { font-family: inherit; }
.lineage a { text-decoration: none; }

/* ---------- motion ---------- */
/* a screen answers navigation: it fades up into place (opacity and a few pixels, no layout shift) */
.screen { animation: screen-in 240ms var(--ease) backwards; }
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } }
tr.pick td { transition: background-color 120ms ease; }
.shots button, .strip button { transition: border-color 140ms ease; }
.shots button .pic img, .strip button .pic img { transition: transform 420ms var(--ease); }
.shots button:hover .pic img, .strip button:hover .pic img { transform: scale(1.05); }
.viewer .enlarge .pic img { transition: transform 520ms var(--ease); }
.viewer .enlarge:hover .pic img { transform: scale(1.015); }
@media (hover: none) {
  .card:hover .pic img, .shots button:hover .pic img, .strip button:hover .pic img, .viewer .enlarge:hover .pic img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .card:hover .pic img, .shots button:hover .pic img, .strip button:hover .pic img, .viewer .enlarge:hover .pic img, #steps a:hover .t, .back:hover .chev { transform: none; }
  .working .bar::after { animation: none; left: 35%; }
}

/* ---------- phone ---------- */
@media (max-width: 820px) {
  /* the phone bar: one slim row of plain labels */
  :root { --bar: 50px; }
  #app { display: block; }
  #rail { display: none; }
  #main { padding: 22px 16px calc(var(--bar) + 34px + env(safe-area-inset-bottom)); padding-top: calc(22px + env(safe-area-inset-top)); }
  h1 { font-size: 32px; }
  .intro { font-size: 16px; margin-bottom: 20px; }
  h2 { margin: 28px 0 12px; }
  #bar {
    display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    background: #fff; border-top: 1px solid var(--ink); padding-bottom: env(safe-area-inset-bottom);
  }
  #bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: var(--bar); text-decoration: none; color: var(--grey); border-right: 1px solid var(--line); min-width: 0; position: relative; }
  #bar a:last-child { border-right: 0; }
  #bar .t { font-size: 10.5px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.2; }
  #bar .s { position: absolute; top: 5px; right: 5px; font-size: 9px; font-weight: 500; color: var(--ink); }
  #bar a { transition: background-color 120ms ease, color 120ms ease; }
  #bar a:active { background: var(--soft); color: var(--ink); }
  #bar a.on { color: var(--ink); box-shadow: inset 0 3px 0 var(--ink); }
  .brandline { display: flex; align-items: baseline; gap: 8px; margin: 0 0 18px; }
  .brandline .name { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
  .brandline .body { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 5px 5px 8px; }
  .card .nm { font-size: 13px; }
  .shots { grid-template-columns: repeat(4, 1fr); }
  .detail { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .grid2f, .grid3f { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 120px 1fr; }
  .sheet { padding: 22px 16px 30px; border-left: 0; }
  .spec .v { font-size: 18px; }
  /* the sample credit gets its own line above View large, Prev and Next */
  .viewer .under { flex-wrap: wrap; justify-content: flex-start; }
  .viewer .credit { flex: 1 0 100%; }
  .seg.full { grid-template-columns: repeat(2, 1fr); }
  .actions { gap: 8px; }
  .actions button { flex: 1 1 auto; }
  .top { flex-wrap: wrap; }
}
@media (min-width: 821px) { .brandline { display: none; } .phone-only { display: none; } }
@media (min-width: 821px) and (max-width: 1180px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card .nm { font-size: 15px; }
  .lb { padding-left: 10px; padding-right: 10px; }
  .lb-foot { flex-wrap: wrap; }
  /* Prev and Next split the width under the credit, a full thumb target each */
  .lb-nav { flex: 1 0 100%; }
  .lb-nav button.lb-btn { flex: 1 1 0; min-height: 44px; }
}

/* Settings: pair the iPhone */
h3.sub { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin: 28px 0 8px; }
.pair-steps { margin: 0 0 16px; padding-left: 20px; color: var(--grey); }
.pair-steps li { margin: 4px 0; }
.pair-qr { display: flex; align-items: flex-end; gap: 16px; }
.pair-code { width: 220px; height: 220px; border: 1px solid var(--line); background: #fff; }
.pair-code svg { width: 100%; height: 100%; display: block; }
