/* share.thatmike1.dev: one stylesheet for the shelf and every shared item */

@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-latin-ext.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  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: "Newsreader";
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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: "Newsreader";
  src: url("fonts/newsreader-latin-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f3f0e9;
  --paper-deep: #e8e3d8;
  --ink: #1c1b18;
  --ink-soft: #4f4b43;
  --ink-faint: #827b6f;
  --rule: #d8d1c3;
  --before: #9c4f2c;
  --after: #1e5b48;
  --focus: #2b5fd9;

  --sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(18px, 4vw, 56px);
  --wide: 1760px;
  --text: 1400px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01";
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* top bar, shared by every page */

.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}
.bar a {
  text-decoration: none;
}
.bar a:hover {
  text-decoration: underline;
}
.brand {
  color: var(--ink);
  font-weight: 500;
}
.brand span {
  color: var(--ink-faint);
  font-weight: 400;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

/* shelf (root index) */

.shelf-head {
  padding-top: clamp(48px, 9vw, 120px);
  padding-bottom: clamp(32px, 5vw, 64px);
  display: grid;
  gap: 18px 64px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 960px) {
  .shelf-head {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: end;
  }
}
.shelf-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  font-variation-settings: "opsz" 72;
}
.shelf-head h1 em {
  font-style: italic;
  color: var(--ink-soft);
}
.shelf-head p {
  margin: 0;
  max-width: 46ch;
  font-size: 19px;
  color: var(--ink-soft);
}

.items {
  list-style: none;
  margin: 0;
  padding: 0 0 clamp(64px, 10vw, 140px);
  border-top: 1px solid var(--ink);
}
.item {
  border-bottom: 1px solid var(--rule);
}
.item a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px 40px;
  padding: 26px 0 30px;
  text-decoration: none;
}
@media (min-width: 820px) {
  .item a {
    grid-template-columns: 150px minmax(0, 1.1fr) minmax(0, 1fr) auto;
    align-items: baseline;
  }
}
.item time {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-faint);
}
.item h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 450;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 48;
}
.item p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 52ch;
}
.item .go {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-faint);
  white-space: nowrap;
}
.item a:hover h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}
.item a:hover .go {
  color: var(--ink);
}

/* item page: header */

.lede {
  padding-top: clamp(32px, 5vw, 72px);
  padding-bottom: clamp(32px, 4vw, 56px);
  display: grid;
  gap: 24px 72px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1040px) {
  .lede {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: end;
  }
}
.lede h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 5.6vw, 84px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
}
.lede h1 em {
  font-style: italic;
}
.lede-text p {
  margin: 0 0 14px;
  font-size: 18.5px;
  max-width: 54ch;
  color: var(--ink-soft);
}
.lede-text p:first-child {
  color: var(--ink);
}

.toc {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.toc a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 14px 8px;
  border-radius: 999px;
  background: var(--paper-deep);
  text-decoration: none;
  font-size: 15px;
}
.toc a:hover {
  background: var(--ink);
  color: var(--paper);
}
.toc span {
  font-family: var(--mono);
  font-size: 12px;
  opacity: 0.7;
}

/* legend for the before/after marks */

.key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.key > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  padding: 6px 9px 6px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.tag.before {
  color: var(--before);
  background: color-mix(in srgb, var(--before) 11%, transparent);
}
.tag.after {
  color: var(--after);
  background: color-mix(in srgb, var(--after) 12%, transparent);
}

/* one app per section */

.app {
  border-top: 1px solid var(--ink);
  padding-top: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(56px, 8vw, 112px);
  scroll-margin-top: 16px;
}

.app-head {
  display: grid;
  gap: 10px 64px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: clamp(24px, 3.4vw, 40px);
}
@media (min-width: 1040px) {
  .app-head {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
  }
}
.app-head h2 {
  margin: 8px 0 6px;
  font-family: var(--serif);
  font-weight: 450;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 60;
}
.app-head .what {
  margin: 0;
  color: var(--ink-soft);
  max-width: 44ch;
}
.app-head .takeaway {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.32;
  font-variation-settings: "opsz" 24;
  max-width: 40ch;
  text-wrap: pretty;
}
.app-head .note {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--ink-faint);
  max-width: 62ch;
}
@media (min-width: 1040px) {
  .app-head .right {
    padding-top: 30px;
  }
}

/* the before/after pair */

.pair {
  display: grid;
  gap: clamp(28px, 3vw, 40px) clamp(20px, 2.2vw, 36px);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1000px) {
  .pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.shot {
  margin: 0;
  min-width: 0;
}
.shot-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--ink-faint);
}
.shot-label .meta {
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
}

.zoom {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: zoom-in;
  border-radius: 7px;
  text-decoration: none;
}
.zoom img {
  width: 100%;
  border-radius: 7px;
  background: var(--paper-deep);
  box-shadow:
    0 0 0 1px rgba(28, 27, 24, 0.14),
    0 1px 2px rgba(28, 27, 24, 0.06),
    0 10px 30px -12px rgba(28, 27, 24, 0.28);
}
.zoom .hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px 7px;
  border-radius: 5px;
  background: rgba(20, 19, 17, 0.82);
  color: #f3f0e9;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.zoom:hover .hint,
.zoom:focus-visible .hint {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .zoom .hint {
    opacity: 1;
    transform: none;
  }
}

.shot figcaption {
  margin-top: 14px;
  max-width: 60ch;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.shot figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

/* further-down details, smaller */

.deeper {
  margin-top: clamp(36px, 4.4vw, 56px);
  padding-top: 22px;
  border-top: 1px dashed var(--rule);
}
.deeper > h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}
.deeper > p {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--ink-faint);
  max-width: 70ch;
}
.deeper-grid {
  display: grid;
  gap: 28px clamp(18px, 2vw, 30px);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 680px) {
  .deeper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1240px) {
  .deeper-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.deeper.solo {
  display: grid;
  gap: 4px clamp(20px, 2.2vw, 36px);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1000px) {
  .deeper.solo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .deeper.solo > .shot {
    grid-column: 1;
    grid-row: 1 / span 3;
  }
  .deeper.solo > h3,
  .deeper.solo > p {
    grid-column: 2;
  }
  .deeper.solo > h3 {
    margin-top: 34px;
  }
}
.deeper .shot figcaption {
  font-size: 14.5px;
}

/* provenance */

.how {
  border-top: 1px solid var(--ink);
  padding-top: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(56px, 8vw, 100px);
  display: grid;
  gap: 20px 64px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1040px) {
  .how {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}
.how h2 {
  margin: 8px 0 10px;
  font-family: var(--serif);
  font-weight: 450;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  font-variation-settings: "opsz" 40;
}
.how p.eyebrow {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-faint);
}
.how p {
  margin: 0 0 12px;
  max-width: 54ch;
  color: var(--ink-soft);
  font-size: 16px;
}
.how dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  font-size: 15px;
}
@media (min-width: 640px) {
  .how dl {
    grid-template-columns: 170px minmax(0, 1fr);
  }
}
.how dt,
.how dd {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.how dt {
  font-weight: 600;
  padding-bottom: 0;
}
@media (min-width: 640px) {
  .how dt {
    padding-bottom: 12px;
  }
}
.how dd {
  color: var(--ink-soft);
}
.how code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--paper-deep);
  padding: 1px 5px;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

.foot {
  padding-top: 22px;
  padding-bottom: 40px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* lightbox (assets/lightbox.js) */

.lb {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #121110;
  color: #ece8df;
  font-family: var(--sans);
  overflow: hidden;
}
.lb::backdrop {
  background: #121110;
}
.lb[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.lb-top,
.lb-bottom {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  padding: 10px clamp(12px, 2vw, 22px);
  flex-wrap: wrap;
}
.lb-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.lb-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14.5px;
  color: #bdb6a8;
}
.lb-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 260px;
  font-size: 15px;
}
.lb-title .tag.before {
  color: #f0a27c;
  background: rgba(240, 162, 124, 0.14);
}
.lb-title .tag.after {
  color: #86d3b4;
  background: rgba(134, 211, 180, 0.14);
}
.lb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-count {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #8f887b;
}
.lb-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.lb button,
.lb .lb-orig {
  font: inherit;
  font-size: 14px;
  color: #ece8df;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}
.lb button:hover,
.lb .lb-orig:hover {
  background: rgba(255, 255, 255, 0.14);
}
.lb button[disabled] {
  opacity: 0.35;
  cursor: default;
}
.lb button[aria-pressed="true"] {
  background: #ece8df;
  color: #121110;
}
.lb kbd {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  color: #bdb6a8;
}
.lb-stage {
  position: relative;
  overflow: auto;
  overscroll-behavior: contain;
  --pad: clamp(8px, 2vw, 24px);
}
.lb-stage img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: calc(100% - 2 * var(--pad));
  max-height: calc(100% - 2 * var(--pad));
  width: auto;
  height: auto;
  border-radius: 4px;
  cursor: zoom-in;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.lb.actual .lb-stage img {
  position: static;
  margin: var(--pad) auto;
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}
html.lb-open {
  overflow: hidden;
}
.lb-caption {
  flex: 1 1 420px;
  min-width: 0;
  max-width: 120ch;
}
.lb-hint {
  flex: none;
  margin-left: auto;
  font-size: 13px;
  color: #8f887b;
}
.lb:focus {
  outline: none;
}
@media (max-width: 720px) {
  .lb-hint,
  .lb-wide {
    display: none;
  }
  .lb-top {
    gap: 8px;
    padding: 8px 10px;
  }
  .lb-title {
    flex-basis: 100%;
    font-size: 14px;
  }
  .lb-actions {
    flex: 1 1 100%;
    gap: 5px;
    flex-wrap: nowrap;
  }
  .lb button,
  .lb .lb-orig {
    font-size: 13.5px;
    padding: 7px 11px;
  }
  .lb-actions [data-act="close"] {
    margin-left: auto;
  }
  .lb-bottom {
    font-size: 13.5px;
  }
}
