/* ==========================================================================
   ogcz — Archive, piece and Contact pages
   Quiet, editorial layouts. The motion lives on Home.
   ========================================================================== */

.page {
  min-height: 100vh;
  padding: calc(var(--nav-h) + clamp(40px, 8vh, 88px)) var(--gutter) clamp(72px, 12vh, 120px);
}
.page__wrap { max-width: 960px; margin: 0 auto; }
.page__wrap--narrow { max-width: 820px; }
.page__wrap--wide { max-width: 1040px; }
.page__wrap--form { max-width: 560px; }

/* staggered fade-up on load */
.enter {
  opacity: 0;
  transform: translateY(18px);
  animation: enter 0.9s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes enter { to { opacity: 1; transform: none; } }

.page__title {
  font-family: var(--f-mark);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
}
.page__lede {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.4);
}

.label {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.pill {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  padding: 0.14rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}
/* category colours (same as the category's cards on Home; set in js/site.js, CATEGORY_TONE) */
.pill--gold { color: #cbbb2c; border-color: rgba(203, 187, 44, 0.55); }
.pill--ember { color: #d9804f; border-color: rgba(217, 128, 79, 0.55); }
.pill--sand { color: #a8906a; border-color: rgba(168, 144, 106, 0.55); }
.pill--bone { color: #a8906a; border-color: rgba(168, 144, 106, 0.55); } /* was #e2d8c2, too close to white */
.pill--ink { color: #7486a0; border-color: rgba(116, 134, 160, 0.55); } /* was #aeb0bb, too close to white */
.pill--olive { color: #a4aa5f; border-color: rgba(164, 170, 95, 0.55); }
/* dark pentadic set, see base.css */
.pill--indigo { color: hsl(234 38% 70%); border-color: hsla(234, 38%, 70%, 0.5); }
.pill--teal { color: hsl(162 38% 70%); border-color: hsla(162, 38%, 70%, 0.5); }
.pill--plum { color: hsl(306 38% 70%); border-color: hsla(306, 38%, 70%, 0.5); }
.pill--rust { color: hsl(18 38% 70%); border-color: hsla(18, 38%, 70%, 0.5); }
.pill--moss { color: hsl(90 38% 70%); border-color: hsla(90, 38%, 70%, 0.5); }
.pill--s1 { color: color-mix(in srgb, var(--gold) 22%, #fff); border-color: color-mix(in srgb, var(--gold) 22%, #fff); }
.pill--s2 { color: color-mix(in srgb, var(--gold) 45%, #fff); border-color: color-mix(in srgb, var(--gold) 45%, #fff); }
.pill--s3 { color: var(--gold-hi); border-color: var(--gold-hi); }
.pill--s4 { color: color-mix(in srgb, var(--gold) 88%, #000); border-color: color-mix(in srgb, var(--gold) 88%, #000); }
.pill--green { color: #52c285; border-color: #52c285; }
.pill--red { color: #f0675c; border-color: #f0675c; }
.pill--orange { color: #f39a4a; border-color: #f39a4a; }
.pill--violet { color: #a88bf5; border-color: #a88bf5; }
.pill--pink { color: #ec7ab7; border-color: #ec7ab7; }
.pill--teal { color: #43c9c1; border-color: #43c9c1; }
.pill--blue { color: #6aa4f2; border-color: #6aa4f2; }
.pill--gray { color: #cfcfcf; border-color: #cfcfcf; }
.pill--s5 { color: color-mix(in srgb, var(--gold) 70%, #000); border-color: color-mix(in srgb, var(--gold) 70%, #000); }

.btn--solid { background: var(--gold); color: var(--on-accent); }
.btn--solid:hover { background: var(--gold-hi); }

/* ==========================================================================
   ARCHIVE
   ========================================================================== */
.work-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; }
.work-head > div:first-child { min-width: 0; }
@media (min-width: 821px) {
  /* the category buttons stay on the title's line; the line under the title wraps instead */
  .work-head { flex-wrap: nowrap; }
  .filters { flex-wrap: nowrap; flex-shrink: 0; }
}
.filter {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.45);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.filter:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.filter.is-active { background: var(--gold); border-color: var(--gold); color: var(--on-accent); }

/* Archives: search + sort */
.archive-tools { display: flex; gap: 0.6rem; align-items: center; margin: -0.5rem 0 1.25rem; }
.archive-search {
  flex: 1;
  height: 2.75rem;
  line-height: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.archive-search::placeholder { color: rgba(255, 255, 255, 0.35); }
.archive-search:focus { border-color: var(--gold); background: rgba(255, 255, 255, 0.05); }
.archive-sort { position: relative; display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.archive-sort__label { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.archive-sort__btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 8.5rem;
  height: 2.75rem;
  font-size: 0.92rem;
  line-height: 1;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.68rem 1rem 0.68rem 1.15rem;
  transition: border-color 0.2s, background 0.2s;
}
.archive-sort__btn:hover,
.archive-sort__btn[aria-expanded="true"] { border-color: var(--gold); }
.archive-sort__btn svg { color: rgba(255, 255, 255, 0.5); transition: transform 0.25s var(--ease); }
.archive-sort__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.archive-sort__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.9);
}
.archive-sort__menu[hidden] { display: none; }
.archive-sort__menu button {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.55rem 0.8rem;
  border-radius: 9px;
}
.archive-sort__menu button:hover,
.archive-sort__menu button:focus-visible { background: rgba(255, 255, 255, 0.06); color: #fff; outline: none; }
.archive-sort__menu button[aria-selected="true"] { color: var(--gold-hi); }
@media (max-width: 520px) { .archive-sort__label { display: none; } .archive-sort__btn { min-width: 0; } }

.rows { display: flex; flex-direction: column; }
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  margin: 0 -1rem;
  padding: 1.6rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.25s;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: rgba(255, 255, 255, 0.02); }
.row.is-hidden { display: none; }
.row__top { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.row__title {
  font-size: 1.05rem;
  font-weight: 500;
  color: #fff;
  transition: color 0.25s;
}
.row:hover .row__title { color: var(--gold); }
.row__tagline { font-size: 0.85rem; font-weight: 300; line-height: 1.6; color: rgba(255, 255, 255, 0.4); }
.row__meta { display: grid; justify-items: end; gap: 0.3rem; font-size: 0.72rem; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.28); }
.row__view { transition: color 0.25s, transform 0.3s var(--ease); }
.row:hover .row__view { color: var(--gold); transform: translateX(3px); }
/* Design / Video rows with a picture (see row() in pages.js)
   computer: a small 16:10 thumbnail at the start of an otherwise normal row
   phone (≤600px): a card: the whole picture on top, then year | category, title, tagline, View → */
.row--pic { grid-template-columns: 128px 1fr auto; gap: 1.5rem; }
.row__pic { width: 128px; aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); background: #0b0b0b; }
.row__pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transition: transform 0.6s var(--ease); }
.row--pic:hover .row__pic img { transform: scale(1.06); }
.row__tile { display: flex; align-items: flex-end; width: 100%; height: 100%; padding: 8px 9px; font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.65); }
.row__line, .row__go { display: none; }
.row__toppill { display: contents; }
@media (max-width: 600px) {
  .row--pic { display: block; padding-block: 1.6rem 1.8rem; }
  .row--pic .row__pic { width: 100%; aspect-ratio: auto; border-radius: 12px; margin-bottom: 1rem; }
  .row--pic .row__pic img { height: auto; object-fit: initial; } /* the whole picture, never cropped */
  .row--pic .row__tile { aspect-ratio: 16 / 10; height: auto; font-size: 10px; padding: 12px 14px; }
  .row--pic .row__line { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.5rem; font-size: 0.72rem; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.45); }
  .row--pic .row__bar { width: 1px; height: 1.1em; background: rgba(255, 255, 255, 0.3); }
  .row--pic .row__toppill, .row--pic .row__meta { display: none; }
  .row--pic .row__title { font-size: 1.15rem; }
  .row--pic .row__tagline { margin-top: 0.3rem; }
  .row--pic .row__go { display: inline-block; margin-top: 0.75rem; font-size: 0.75rem; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.6); border-bottom: 1px solid currentColor; padding-bottom: 2px; }
}
/* The Archives page (owner, 2026-10-13: "big, like Basic Apple Guy"): big picture cards,
   two per row on a computer, one per row on a phone. Picture, then year + category, title, tagline. */
.rows--cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem 2.25rem; }
.rows--cards .row--pic { display: block; margin: 0; padding: 0; border: 0; background: none; }
.rows--cards .row.is-hidden { display: none; }
.rows--cards .row__pic { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; margin-bottom: 1.4rem; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 18px 40px rgba(0, 0, 0, 0.45); }
.rows--cards .row__pic img { height: 100%; object-fit: cover; object-position: 50% 50%; }
.rows--cards .row--pic:hover .row__pic img { transform: scale(1.03); }
.rows--cards .row__tile { aspect-ratio: auto; height: 100%; padding: 16px 18px; font-size: 11px; }
.rows--cards .row__line { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.7rem; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.14em; color: var(--gold); }
.rows--cards .row__bar, .rows--cards .row__toppill, .rows--cards .row__meta, .rows--cards .row__go { display: none; }
.rows--cards .row__top { margin-bottom: 0.4rem; }
.rows--cards .row__title { font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 500; line-height: 1.25; letter-spacing: -0.005em; }
.rows--cards .row__tagline { font-size: 0.92rem; line-height: 1.6; color: rgba(255, 255, 255, 0.55); }
@media (max-width: 760px) {
  .rows--cards { grid-template-columns: 1fr; gap: 2.75rem; }
  .rows--cards .row__pic { border-radius: 12px; margin-bottom: 1.1rem; }
  .rows--cards .row__title { font-size: 1.3rem; }
  .rows--cards .row__tagline { font-size: 0.92rem; }
}
.empty { padding: 3rem 0; color: var(--muted); font-size: 0.9rem; }
.empty[hidden] { display: none; }

/* ==========================================================================
   ONE PIECE
   ========================================================================== */
.back {
  display: inline-flex;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 3rem;
  transition: color 0.2s;
}
.back:hover { color: var(--gold); }
.proj__meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; font-size: 0.72rem; color: rgba(255, 255, 255, 0.3); letter-spacing: 0.06em; }
.proj__tagline { margin-top: 0.75rem; font-size: 1rem; font-weight: 300; line-height: 1.6; color: rgba(255, 255, 255, 0.5); }
/* space under the title area; the content (README or text) starts at a thin line, its top edge */
.proj__head { padding-bottom: 2.25rem; }
.proj__head ~ .case { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 1.5rem; }
.case > :first-child { margin-top: 0; } /* the content starts right at the line */
/* with the cover on, the line sits under the title and the cover follows it */
.proj__head--cover { border-bottom: 1px solid rgba(255, 255, 255, 0.1); margin-bottom: 1.5rem; }
.proj__cover ~ .case { border-top: 0; padding-top: 0; }
.proj__cover {
  margin: 0 0 3rem;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.proj__cover .ph { border-radius: 14px; }
.metrics {
  display: flex;
  margin-bottom: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  overflow: hidden;
}
.metric { flex: 1; padding: 1.5rem 1rem; text-align: center; }
.metric + .metric { border-left: 1px solid rgba(255, 255, 255, 0.07); }
.metric b { display: block; font-family: var(--f-mark); font-weight: 300; font-size: 1.75rem; color: var(--gold); margin-bottom: 0.2rem; }
.metric span { font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.3); }
.block { margin-bottom: 2.75rem; }
.prose { font-size: 0.97rem; font-weight: 300; line-height: 1.85; color: rgba(255, 255, 255, 0.65); }
.bullets { display: grid; gap: 0.75rem; }
.bullets li { display: flex; align-items: baseline; gap: 0.75rem; font-size: 0.92rem; font-weight: 300; line-height: 1.7; color: rgba(255, 255, 255, 0.6); }
.bullets li::before {
  content: "";
  flex: none;
  width: 0.36em;
  height: 0.36em;
  border-radius: 50%;
  background: currentColor; /* same color as the text */
  transform: translateY(-0.12em);
}
.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.55);
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 4rem; }
.others { border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 3rem; }
.others .row { padding-block: 1.1rem; }

/* ---------- a piece's README, rendered as a case study ---------- */
.case { margin-bottom: 4rem; font-size: 0.97rem; font-weight: 300; line-height: 1.85; color: rgba(255, 255, 255, 0.7); }
.case > * + * { margin-top: 1.1rem; }
.case h1,
.case h2,
.case h3 { font-family: var(--f-mark); font-weight: 400; line-height: 1.15; color: #fff; }
.case h1 { font-size: 2rem; }
.case h2 { font-size: 1.6rem; margin-top: 3rem; }
.case h3 { font-size: 1.2rem; margin-top: 2rem; }
.case strong { font-weight: 600; color: #fff; }
.case a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.case a:hover { color: var(--gold-hi); }
.case ul,
.case ol { padding-left: 0; display: grid; gap: 0.4rem; }
.case ol { padding-left: 1.2rem; list-style: decimal; }
.case ul > li { position: relative; padding-left: 1.1rem; }
.case ul > li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.78em;
  width: 0.36em;
  height: 0.36em;
  border-radius: 50%;
  background: currentColor;
}
.case li > ul,
.case li > ol,
.case li > pre { margin-top: 0.5rem; }
.case li > ul > li::before { background: none; box-shadow: inset 0 0 0 1px currentColor; } /* nested: hollow dot */
.case blockquote {
  margin: 2.5rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--gold);
  font-family: var(--f-mark);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.45;
  color: #fff;
}
.case code { font-size: 0.88em; padding: 0.1em 0.35em; border-radius: 4px; background: #111; color: #fff; }
.case pre { padding: 1rem 1.2rem; border-radius: 10px; background: #0b0b0b; overflow-x: auto; }
.case pre code { padding: 0; background: none; }
.case hr { border: 0; height: 1px; background: rgba(255, 255, 255, 0.08); margin: 3rem 0; }
.case table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.case th, .case td { padding: 0.6rem 0.9rem; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.case th { font-weight: 500; color: #fff; border-bottom-color: var(--line); }
.case tr:hover td { background: rgba(255, 255, 255, 0.02); }
.case__media { margin: 2.5rem 0; }
.case__media img[style*="max-width"] { margin-inline: auto; }
.case__loading { color: rgba(255, 255, 255, 0.4); }
.case__notice {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--gold-hi);
  font-size: 0.85rem;
}
.case__missing {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 1rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  text-align: center;
}
.case__media img,
.case__media video,
.case__media iframe {
  display: block;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07);
  background: #000;
}
.case__gallery { display: grid; gap: 12px; }
.case__gallery--2 { grid-template-columns: repeat(2, 1fr); }
.case__gallery--3 { grid-template-columns: repeat(3, 1fr); }
.case__gallery img,
.case__gallery video { height: 100%; object-fit: cover; }
.case__embed iframe { aspect-ratio: 16 / 9; height: auto; border: 0; }
.case figcaption { grid-column: 1 / -1; margin-top: 0.7rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.4); text-align: center; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.page--center { display: flex; align-items: center; }
.page--center > .page__wrap { width: 100%; }
.cform { display: grid; gap: 0.75rem; margin-top: 3rem; }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.field {
  width: 100%;
  display: block;
  font: inherit;
  font-size: 0.92rem;
  color: #fff;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.field::placeholder { color: rgba(255, 255, 255, 0.3); }
.field:focus { border-color: rgba(var(--accent-rgb), 0.5); }
textarea.field { resize: none; min-height: 150px; }
.cform__submit {
  margin-top: 0.25rem;
  padding: 0.95rem;
  border-radius: 8px;
  background: var(--gold);
  color: var(--on-accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.cform__submit:hover { background: var(--gold-hi); }
.cform__note { font-size: 0.75rem; color: rgba(255, 255, 255, 0.3); }
/* Contact: the form's status line, the spam trap, and the email address underneath */
.cform__trap { display: none; }
.cform__submit:disabled { opacity: 0.6; cursor: default; }
.cform__status { min-height: 1.2em; font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); }
.cform__status.is-ok { color: var(--gold-hi); }
.cform__status.is-error { color: #e0a17a; }
.cdirect { margin-top: 1.6rem; font-size: 0.9rem; color: rgba(255, 255, 255, 0.45); }
.cdirect__address { color: var(--gold-hi); overflow-wrap: anywhere; }
.cdirect__address:hover { color: var(--gold); }
.cdirect__copy { margin-left: 0.4rem; font-size: 0.75rem; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.6); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 0.25rem 0.7rem; }
.cdirect__copy:hover { border-color: var(--gold); color: var(--gold-hi); }
.clinks {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.clinks a {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.2s;
}
.clinks a:hover { color: var(--gold); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; gap: 0.75rem; }
  .row__meta { grid-auto-flow: column; justify-content: space-between; justify-items: start; }
  .metrics { flex-direction: column; }
  .metric + .metric { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.07); }
  .cform__row { grid-template-columns: 1fr; }
  .case__gallery--2,
  .case__gallery--3 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .enter { animation: none; opacity: 1; transform: none; }
}

/* ==========================================================================
   A GitHub README, laid out the way GitHub shows it (its dark theme)
   ========================================================================== */
.case.case--gh {
  font-family: var(--f-body); /* the site's fonts; the layout below is GitHub's */
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #e6edf3;
  word-wrap: break-word;
}
.case--gh > * + * { margin-top: 0; }
.case--gh > *:first-child { margin-top: 0 !important; }
.case--gh p, .case--gh blockquote, .case--gh ul, .case--gh ol, .case--gh pre, .case--gh table { margin: 0 0 16px; }
.case--gh h1, .case--gh h2, .case--gh h3, .case--gh h4, .case--gh h5, .case--gh h6 {
  margin: 24px 0 16px;
  font-family: var(--f-mark);
  font-weight: 400;
  line-height: 1.25;
  color: #fff;
}
.case--gh h1 { font-size: 2em; padding-bottom: 0.3em; border-bottom: 1px solid #3d444db3; }
.case--gh h2 { font-size: 1.5em; padding-bottom: 0.3em; border-bottom: 1px solid #3d444db3; }
.case--gh h3 { font-size: 1.25em; }
.case--gh h4 { font-size: 1em; }
.case--gh strong { font-weight: 600; color: inherit; }
.case--gh a { color: var(--gold); text-decoration: none; }
.case--gh a:hover { color: var(--gold-hi); text-decoration: underline; }
.case--gh ul, .case--gh ol { display: block; padding-left: 2em; }
.case--gh ul { list-style: disc; }
.case--gh ol { list-style: decimal; }
.case--gh ul ul, .case--gh ol ul { list-style: circle; }
.case--gh ul ul, .case--gh ul ol, .case--gh ol ol, .case--gh ol ul { margin: 0; }
.case--gh li { display: list-item; padding: 0; }
.case--gh ul > li::before { content: none; }
.case--gh li + li { margin-top: 0.25em; }
.case--gh li > p { margin-top: 16px; }
.case--gh blockquote {
  margin-left: 0;
  padding: 0 1em;
  border-left: 0.25em solid #3d444d;
  color: #9198a1;
  font-family: inherit;
  font-size: 1em;
  font-style: normal;
  background: none;
  border-radius: 0;
}
.case--gh blockquote > :last-child { margin-bottom: 0; }
.case--gh code { padding: 0.2em 0.4em; font-size: 85%; border-radius: 6px; background: #656c7633; color: inherit; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }
.case--gh pre { padding: 16px; font-size: 85%; line-height: 1.45; border-radius: 6px; background: #151b23; overflow: auto; }
.case--gh pre code { padding: 0; font-size: 100%; background: none; }
.case--gh hr { height: 0.25em; margin: 24px 0; padding: 0; border: 0; background: #3d444d; }
.case--gh img { max-width: 100%; height: auto; box-sizing: content-box; border-radius: 0; box-shadow: none; display: inline; }
.case--gh [align="center"] { text-align: center; }
.case--gh [align="right"] { text-align: right; }
.case--gh table { display: block; width: max-content; max-width: 100%; overflow: auto; border-collapse: collapse; }
.case--gh th, .case--gh td { padding: 6px 13px; border: 1px solid #3d444d; }
.case--gh tr:nth-child(2n) { background: #151b23; }
.case--gh .case__missing { display: inline-grid; width: 100%; }

/* math formulas (KaTeX): a block formula is centred and scrolls sideways on a narrow phone */
.math--block { display: block; margin: 1.4em 0; overflow-x: auto; overflow-y: hidden; padding: 4px 0; text-align: center; }
.math .katex { font-size: 1.08em; }
