/* ===========================================================
   Project pages (Selected Work > a drawer > one project).
   A normal scrolling page: it loads styles.css for the brand
   tokens and the top bar, but not the elevator (no main.js).
   =========================================================== */

/* ---------- Scroll bar: a brass drawer pull on a paper track ---------- */
/* Chrome, Edge and Safari draw the shapes; Firefox gets the colours only. */
html { scrollbar-color: #a8783c #e9e2d4; }
@supports selector(::-webkit-scrollbar) {
  html { scrollbar-color: auto; }
}
html::-webkit-scrollbar { width: 18px; }
html::-webkit-scrollbar-track {
  background: linear-gradient(to right, transparent 7.5px, rgba(168, 120, 60, 0.55) 7.5px 9.5px, transparent 9.5px), #e9e2d4;
  border-left: 1px solid #d6cbb4;
}
html::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 9px;
  background:
    radial-gradient(circle, #f6e2b8 0 0.8px, #a4773e 1.3px, #5e3d17 2.2px, transparent 2.7px) center top 4px / 6px 6px no-repeat padding-box,
    radial-gradient(circle, #f6e2b8 0 0.8px, #a4773e 1.3px, #5e3d17 2.2px, transparent 2.7px) center bottom 4px / 6px 6px no-repeat padding-box,
    linear-gradient(#5b3b15 0 1px, #f3dcae 1px 2px, transparent 2px 4px, #5b3b15 4px 5px, #f3dcae 5px 6px, transparent 6px 8px, #5b3b15 8px 9px, #f3dcae 9px 10px, transparent 10px) center / 7px 10px no-repeat padding-box,
    linear-gradient(to right, #6e4a20, #c99a5c 22%, #f2d6a0 42%, #c69353 62%, #7a5225) padding-box;
  box-shadow: inset 0 0 0 1px rgba(70, 44, 12, 0.55), inset 0 1px 1px rgba(255, 236, 200, 0.7), inset 0 -1px 1px rgba(60, 36, 8, 0.5);
}
html::-webkit-scrollbar-thumb:hover {
  background:
    radial-gradient(circle, #f6e2b8 0 0.8px, #a4773e 1.3px, #5e3d17 2.2px, transparent 2.7px) center top 4px / 6px 6px no-repeat padding-box,
    radial-gradient(circle, #f6e2b8 0 0.8px, #a4773e 1.3px, #5e3d17 2.2px, transparent 2.7px) center bottom 4px / 6px 6px no-repeat padding-box,
    linear-gradient(#5b3b15 0 1px, #f3dcae 1px 2px, transparent 2px 4px, #5b3b15 4px 5px, #f3dcae 5px 6px, transparent 6px 8px, #5b3b15 8px 9px, #f3dcae 9px 10px, transparent 10px) center / 7px 10px no-repeat padding-box,
    linear-gradient(to right, #7a5326, #d9ab6c 22%, #f8e0b0 42%, #d29e5f 62%, #86592a) padding-box;
}

/* ---------- Page frame ---------- */
.project-page { background: var(--color-bg); }
/* The page fades in, finishing the drawer opening on the floor */
.project-page main { animation: project-in 0.4s ease both; }
@keyframes project-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .project-page main { animation: none; } }
.project-page .site-header { position: sticky; top: 0; z-index: 5; height: var(--transom); }
.project-page .site-header .indicator { flex-shrink: 0; }

.project {
  --page-max: var(--max-width);
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 18px 28px 72px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 15px var(--font-sans);
  color: var(--color-navy);
  text-decoration: none;
  border: 1.5px solid var(--color-navy);
  border-radius: 999px;
  padding: 6px 16px 6px 12px;
  transition: background 0.2s ease, color 0.2s ease;
}
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.back:hover { background: var(--color-navy); color: #fff; }
.back:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.back--end { margin-top: 40px; }

/* ---------- Top: label, title, story | screenshots ---------- */
.project-top {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 20px 40px;
  align-items: start;
}
.project-intro { grid-column: 1; }
.project-shots { grid-column: 2; grid-row: 1 / span 2; margin-top: 28px; margin-inline-end: 14px; position: relative; }
/* Centre the screenshots in the space right of the text: move them half the
   difference between the page's side margin and the gap after the text. */
@media (min-width: 1024px) and (min-height: 501px) {
  .project-shots { inset-inline-start: calc(((100vw - 18px - min(100vw - 18px, var(--page-max))) / 2 + 28px - 40px) / 2 - var(--shots-nudge, 6px)); }
}

/* The label, like the drawer's brass label holder: a thin frame, with the
   project's line drawing inside it. */
.project-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 3px 12px 3px 8px;
  background: #fbf6ea;
  border: 1.5px solid var(--color-brown);
  border-radius: 3px;
  font: 600 14px var(--font-serif);
  color: var(--color-navy);
}
.project-mark { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--color-brown); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.project-mark-dot { fill: var(--color-accent); stroke: none; }
.project h1 { margin: 14px 0 4px; font: 700 40px/1.1 var(--font-serif); letter-spacing: -0.01em; color: var(--color-navy); }
.project-lede { margin: 6px 0 0; font: 400 20px/1.45 var(--font-serif); color: var(--color-text-muted); }

/* The origin story and who built it: under the title on computers,
   under the screenshots on phones. */
.project-story { grid-column: 1; grid-row: 2; max-width: 640px; font: 400 18px/1.6 var(--font-sans); color: var(--color-navy); }
.project-story p { margin: 0 0 12px; }
.project-story p:last-child { margin-bottom: 0; }

/* Screenshots: a computer frame, with the phone over its corner */
.shots-pair { position: relative; }
.shot { margin: 0; overflow: hidden; background: var(--color-surface-alt); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.shot-desk { aspect-ratio: 16 / 10; border: 1px solid var(--color-border); border-top: 22px solid #d8ccb4; border-radius: 8px; }
.shot-phone {
  position: absolute;
  inset-inline-end: -14px;
  bottom: -22px;
  width: 24%;
  aspect-ratio: 1080 / 1840;
  border: 6px solid var(--color-navy);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 33, 56, 0.25);
}
.shot-phone img { border-radius: 11px; }

/* A click on a screenshot opens the gallery */
.shot-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; position: relative; }
.shot-open:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.shot-desk .shot-open::after {
  content: "";
  position: absolute;
  inset-inline-start: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15, 33, 56, 0.78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / 18px no-repeat;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.shot-desk .shot-open:hover::after, .shot-desk .shot-open:focus-visible::after { opacity: 1; transform: scale(1.08); }

/* "See all N screenshots": tells visitors there is more than the two pictures */
.shots-all {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 40px auto 0;
  padding: 6px 16px 6px 12px;
  font: 600 15px var(--font-sans);
  color: var(--color-navy);
  background: transparent;
  border: 1.5px solid var(--color-brown);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.shots-all svg { width: 18px; height: 18px; fill: none; stroke: var(--color-brown); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; transition: stroke 0.2s ease; }
.shots-all:hover { background: var(--color-navy); border-color: var(--color-navy); color: #fff; }
.shots-all:hover svg { stroke: #fff; }
.shots-all:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* ---------- Gallery window ---------- */
.gallery { border: 0; padding: 0; background: transparent; width: 100%; height: 100%; max-width: none; max-height: none; display: none; place-items: center; }
.gallery[open] { display: grid; }
.gallery::backdrop { background: rgba(10, 22, 38, 0.88); }
.gallery-box { position: relative; width: min(1180px, calc(100vw - 32px)); display: grid; gap: 10px; }
.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 56px; }
.gallery-count { margin: 0; color: #c9d2de; font: 500 14px var(--font-sans); }
.gallery-close { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px 7px 12px; font: 700 15px var(--font-sans); color: var(--color-navy); background: #f1ece1; border: 0; border-radius: 999px; cursor: pointer; }
.gallery-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.gallery-close:focus-visible, .gallery-nav:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.gallery-figure { margin: 0 56px; display: grid; justify-items: center; gap: 10px; }
.gallery-figure img { display: block; max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); background: #fff; }
.gallery-figure figcaption { color: #e5e9ef; font: 400 15px var(--font-sans); text-align: center; }
.gallery-nav { position: absolute; top: 50%; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; color: var(--color-navy); background: #f1ece1; border: 0; border-radius: 50%; cursor: pointer; transform: translateY(-50%); transition: background 0.2s ease, color 0.2s ease; }
.gallery-nav:hover { background: var(--color-accent); color: #fff; }
/* One screenshot from a chapter: no arrows */
.gallery.is-single .gallery-nav { display: none; }
.gallery-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.gallery-prev { inset-inline-start: 0; }
.gallery-next { inset-inline-end: 0; }
@media (max-width: 700px) {
  .gallery-head { padding: 0; }
  .gallery-figure { margin: 0; }
  .gallery-figure img { max-height: calc(100dvh - 190px); }
  .gallery-nav { top: auto; bottom: -56px; transform: none; }
  .gallery-box { margin-bottom: 56px; }
  .gallery-prev { inset-inline-start: calc(50% - 56px); }
  .gallery-next { inset-inline-end: calc(50% - 56px); }
}
@media (max-height: 500px) and (orientation: landscape) {
  .gallery-figure img { max-height: calc(100dvh - 90px); }
  .gallery-figure figcaption { display: none; }
  .gallery-box { gap: 6px; }
}

/* ---------- The story: chapters, then the lists ---------- */
.project h2 { margin: 64px 0 8px; font: 700 30px/1.2 var(--font-serif); color: var(--color-navy); }
.project h3 { margin: 0 0 4px; font: 700 18px/1.3 var(--font-sans); color: var(--color-navy); }
.project ul { margin: 0; padding-inline-start: 20px; }
.project ul li { margin: 0 0 8px; }

/* A chapter: a small mono number, a serif heading, a thin brass line. */
.chapter { margin-top: 64px; padding-top: 18px; border-top: 1px solid rgba(168, 120, 60, 0.55); }
.chapter-num { margin: 0; font: 500 14px var(--font-mono); letter-spacing: 0.08em; color: var(--color-brown); }
.chapter h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.chapter-text, .chapter-lead { max-width: 720px; }
.chapter-text p, .chapter-lead { margin: 0 0 12px; }
.chapter-split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px; align-items: start; }
.chapter-figure { margin: 4px 0 0; }
.chapter-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--color-border); border-radius: 8px; }
.chapter-figure figcaption { margin-top: 8px; font-size: 14px; color: var(--color-text-muted); }

/* What else: a title for each topic; "+" opens the full text. Two columns
   that move on their own, so an open topic leaves no gap beside it. Several
   can be open at once (closing one when another opens makes the page jump). */
.topics { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; align-items: start; margin-top: 18px; }
.topics-col { display: flex; flex-direction: column; }
.topic { border-top: 1px solid var(--color-border); }
.topics-col > .topic:last-child { border-bottom: 1px solid var(--color-border); }
.topic summary {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 16px;
  padding: 14px 4px 14px 0;
  list-style: none;
  cursor: pointer;
}
.topic summary::-webkit-details-marker { display: none; }
.topic summary:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }
.topic-title { grid-column: 1; margin: 0; transition: color 0.2s ease; }
/* A thin "+" (no circle); it turns into "−" when open. */
.topic-plus { grid-column: 2; align-self: center; position: relative; width: 22px; height: 22px; }
.topic-plus::before, .topic-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; border-radius: 1px; background: var(--color-brown); transform: translate(-50%, -50%); transition: transform 0.25s ease, background 0.2s ease; }
.topic-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.topic summary:hover .topic-plus::before, .topic summary:hover .topic-plus::after { background: var(--color-accent); }
.topic summary:hover .topic-title { color: var(--color-accent); }
.topic[open] .topic-plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.topic-more { padding: 0 40px 16px 0; color: var(--color-text-muted); font-size: 0.95em; }
.topic-more p { margin: 0; }
/* Opening slides down where the browser can (Chrome, Edge); elsewhere it opens at once. */
@supports (interpolate-size: allow-keywords) {
  .topic { interpolate-size: allow-keywords; }
  .topic::details-content { height: 0; overflow: clip; transition: height 0.28s ease, content-visibility 0.28s allow-discrete; }
  .topic[open]::details-content { height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .topic::details-content, .topic-plus::before, .topic-plus::after { transition: none; }
}

/* Trade-offs: the closing statement, with more room */
.tradeoffs { margin-top: 24px; }
.tradeoffs h2 { margin-top: 72px; }
.project .tradeoffs-list { max-width: 760px; margin-top: 18px; padding: 0; list-style: none; font-size: 18px; }
.project .tradeoffs-list li { position: relative; margin: 0 0 18px; padding-inline-start: 24px; }
.tradeoffs-list li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.6em; width: 9px; height: 9px; background: var(--color-accent); border-radius: 2px; transform: rotate(45deg); }

/* What's next: the same text size as Trade-offs */
.next h2 { margin-top: 48px; }
.next-list { max-width: 760px; font-size: 18px; }
.project .next-list li { margin-bottom: 6px; }
.next-list strong { color: var(--color-text); }

/* End of the page: all screenshots, and the technical details */
.project-end { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 56px; }
.project-end .shots-all { margin: 0; color: #fff; background: var(--color-navy); border-color: var(--color-navy); }
.project-end .shots-all svg { stroke: #fff; }
.project-end .shots-all:hover { background: var(--color-navy-2); border-color: var(--color-navy-2); }
.tech-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 16px;
  font: 600 15px var(--font-sans);
  color: var(--color-navy);
  background: transparent;
  border: 1.5px solid var(--color-brown);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.tech-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.tech-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.tech-toggle:hover { background: var(--color-navy); border-color: var(--color-navy); color: #fff; }
.tech-toggle:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tech-toggle svg { transition: none; } }
.tech { max-width: 760px; margin-top: 28px; padding: 20px 24px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; }
.tech h2 { margin: 0 0 12px; font-size: 24px; }
.tech h3 { margin: 22px 0 8px; }
.tech-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.tech-table th, .tech-table td { padding: 8px 0; text-align: start; vertical-align: top; border-top: 1px solid var(--color-border); }
.tech-table th { width: 170px; padding-inline-end: 16px; font-weight: 600; color: var(--color-navy); }

/* The proof item: a working search over made-up activities */
.proof {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  scroll-margin-top: calc(var(--transom) + 16px);
  padding: 18px 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-inline-start: 4px solid var(--color-accent);
  border-radius: 8px;
}
.proof .try { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto 1fr; gap: 8px 32px; align-items: start; }
.proof .try > label, .proof .try > .box, .proof .try > .ex { grid-column: 1; }
.proof .try > .count { grid-column: 2; grid-row: 1; margin: 0; }
.proof .try > .res, .proof .try > .none { grid-column: 2; grid-row: 2 / span 2; }
/* Tells a skimmer the card works, in the same orange as "Try it" */
.demo-tag { display: inline-block; padding: 1px 9px; font: 700 12px/1.6 var(--font-sans); letter-spacing: 0.02em; color: #fff; background: var(--color-accent); border-radius: 999px; }
.proof label { font-size: 15px; font-weight: 600; color: var(--color-text); }
/* The hint is English, so it reads left to right; typed Hebrew still goes right to left */
.proof .box::placeholder { color: #8a8070; font: 400 15px var(--font-sans); }
.proof .box:placeholder-shown { direction: ltr; text-align: left; }
.proof .box {
  width: 100%;
  padding: 8px 12px;
  font: 500 18px var(--font-sans);
  color: var(--color-text);
  background: #fff;
  border: 1.5px solid var(--color-navy-2);
  border-radius: 6px;
  outline: none;
}
.proof .box:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 1px; }
.proof .ex { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 13px; color: var(--color-text-muted); }
.proof .ex span { width: 100%; }
.proof .ex button {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  padding: 4px 12px;
  font: 600 15px var(--font-sans);
  color: var(--color-navy);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
}
.proof .ex button small { font: 400 12px var(--font-sans); color: var(--color-text-muted); }
.proof .ex button:hover { border-color: var(--color-brown); }
.proof .ex button:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 1px; }
.proof .count { margin: 2px 0 0; font-size: 13px; color: var(--color-text-muted); }
.proof .res { max-height: 228px; overflow: auto; margin: 0; padding: 0; list-style: none; scrollbar-width: thin; scrollbar-color: #b8925d transparent; }
@supports selector(::-webkit-scrollbar) { .proof .res { scrollbar-width: auto; scrollbar-color: auto; } }
.proof .res::-webkit-scrollbar { width: 6px; }
.proof .res::-webkit-scrollbar-track { background: transparent; }
.proof .res::-webkit-scrollbar-thumb { background: linear-gradient(to right, #8c6331, #d2a86d 50%, #a87b43); border-radius: 3px; }
.proof .res li { padding: 7px 12px; border-bottom: 1px solid var(--color-surface-alt); font-size: 17px; }
.proof .res mark { padding: 0 2px; color: inherit; background: #fde3cf; }
.proof .none { margin: 4px 0 0; font-size: 15px; }

/* ---------- Phones and upright tablets: one column ---------- */
/* Order: label, title, line, screenshots, story. */
@media (max-width: 700px), (max-width: 1023px) and (orientation: portrait) {
  .project-top { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .project-intro { display: contents; }
  .project-label { order: 1; align-self: flex-start; }
  .project-title { order: 2; }
  .project-lede { order: 3; }
  .project-shots { order: 4; margin: 22px 14px 34px 0; }
  .project-story { order: 5; }
  .chapter-split { grid-template-columns: 1fr; gap: 16px; }
}
@media (min-width: 701px) and (max-width: 1023px) and (orientation: portrait) {
  .project-shots { margin: 28px 22px 44px 0; }
}

/* ---------- Phone on its side: short screen, smaller type ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .project { padding: 10px 20px 40px; }
  .back { font-size: 14px; padding: 4px 14px 4px 10px; }
  .project-label { margin-top: 12px; }
  .project-label { font-size: 12px; padding: 2px 10px 2px 6px; }
  .project h1 { font-size: 28px; }
  .project h1 { margin: 8px 0 2px; }
  .project-lede { font-size: 16px; }
  .project-story { font-size: 16px; }
  .project-top { gap: 16px 28px; }
}

/* ---------- Phones ---------- */
@media (max-width: 700px) {
  .project { padding: 14px 16px 48px; font-size: 16px; }
  .project h1 { font-size: 31px; }
  .project-lede { font-size: 18px; }
  .shot-phone { width: 30%; }
  .project h2 { margin-top: 48px; font-size: 26px; }
  .project-story { font-size: 17px; }
  .chapter { margin-top: 48px; }
  /* one list: the left column, then the right one (the original order) */
  .topics { display: flex; flex-direction: column; align-items: stretch; }
  .topics-col { display: contents; }
  .topics-col > .topic:last-child { border-bottom: 0; }
  .topics > .topics-col:last-child > .topic:last-child { border-bottom: 1px solid var(--color-border); }
  .topic-more { padding-right: 0; }
  .project .tradeoffs-list, .next-list { font-size: 17px; }
  .tradeoffs h2 { margin-top: 56px; }
  .project-end { flex-direction: column; align-items: flex-start; }
  .tech { padding: 16px; }
  .tech-table th { width: 120px; }
  .proof { padding: 16px; }
  .proof .box::placeholder { font-size: 14px; }
  .proof .try { grid-template-columns: 1fr; grid-template-rows: none; }
  .proof .try > .count, .proof .try > .res, .proof .try > .none { grid-column: 1; grid-row: auto; }
}

/* Large and 4K screens: the text grows with the top bar. */
@media (min-width: 2200px) {
  .project { --page-max: 1500px; --shots-nudge: 16px; font-size: 21px; }
  .project h1 { font-size: 54px; }
  .project h2 { font-size: 40px; }
  .project h3 { font-size: 22px; }
  .project-lede { font-size: 26px; }
  .project-story { font-size: 23px; }
  .project .tradeoffs-list { font-size: 22px; }
  .next-list { font-size: 22px; }
  .chapter-num { font-size: 17px; }
  .chapter-figure figcaption { font-size: 17px; }
  .project-end .shots-all, .tech-toggle { font-size: 19px; }
  .tech-table { font-size: 19px; }
  .back { font-size: 19px; padding: 8px 20px 8px 16px; }
  .back svg { width: 20px; height: 20px; }
  .project-label { font-size: 18px; padding: 4px 16px 4px 10px; }
  .project-mark { width: 26px; height: 26px; }
  .proof label, .proof .count, .proof .ex { font-size: 17px; }
  .proof .ex button { font-size: 19px; }
  .proof .ex button small { font-size: 15px; }
  .proof .box, .proof .res li { font-size: 21px; }
}

/* ---------- A desktop app (Snapnel): its own window, no browser frame or phone ---------- */
.shot-app { border: 1px solid var(--color-border); border-radius: 8px; box-shadow: 0 10px 28px rgba(15, 33, 56, 0.18); }
.shot-app img { height: auto; object-fit: initial; }
.shot-app .shot-open::after {
  content: "";
  position: absolute;
  inset-inline-start: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15, 33, 56, 0.78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / 18px no-repeat;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.shot-app .shot-open:hover::after, .shot-app .shot-open:focus-visible::after { opacity: 1; transform: scale(1.08); }

/* The link to the app's store page, under the origin story */
.store-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 8px; padding: 10px 22px 10px 12px; font: 700 16px var(--font-sans); color: #fff; background: var(--color-navy); border-radius: 999px; text-decoration: none; transition: background 0.2s ease; }
.store-link i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--color-accent); }
.store-link svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.store-link:hover { background: var(--color-navy-2); }
.store-link:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.store-note { margin: 8px 0 0 !important; font-size: 14px; color: var(--color-text-muted); }

/* Two screenshots side by side (light and dark), one under the other on phones */
.figure-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 18px 0 0; }
.figure-pair .chapter-figure { margin: 0; }
/* Light / Dark: the caption names the picture, so it sits above it */
.figure-pair .chapter-figure figcaption { margin: 0 0 8px; }
@media (max-width: 700px) {
  .figure-pair { grid-template-columns: 1fr; gap: 32px; }   /* room above "Dark", so it reads as the next picture's caption */
  .store-link { font-size: 15px; padding: 8px 18px 8px 10px; }
  .store-link i { width: 26px; height: 26px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .store-link { font-size: 14px; padding: 7px 16px 7px 8px; }
  .store-link i { width: 24px; height: 24px; }
}
@media (min-width: 2200px) {
  .store-link { font-size: 20px; }
  .store-note { font-size: 17px; }
}
