@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/ibm-plex-mono-400.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;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/ibm-plex-mono-500.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;
}

@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../assets/fonts/outfit.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 {
  --bg: #ffffff;
  --bg-deep: #ffffff;
  --text: #1c1916;
  --muted: #5c564e;
  --faint: #6e675f;
  --line: rgba(28, 25, 22, 0.14);
  --brass: #7a5a2b;
  --brass-2: #9a7340;
  --danger: #9c4034;
  --header: rgba(255, 255, 255, 0.9);
  --header-solid: #ffffff;
  --frame: #efeae3;
  --prose: #2c2823;
  --button-border: rgba(28, 25, 22, 0.28);
  --control: rgba(255, 255, 255, 0.9);
  --control-hover: #ffffff;
  --control-border: rgba(28, 25, 22, 0.16);
  --glow: transparent;
  --selection: #ffffff;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  --pad: clamp(18px, 4vw, 64px);
  --max: 1520px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #100e0c;
  --bg-deep: #0c0b0a;
  --text: #f3efe8;
  --muted: #a39a90;
  --faint: #908779;
  --line: rgba(243, 239, 232, 0.14);
  --brass: #c6a36a;
  --brass-2: #e4c991;
  --danger: #e0a090;
  --header: rgba(16, 14, 12, 0.78);
  --header-solid: #100e0c;
  --frame: #1b1815;
  --prose: #e8e2d8;
  --button-border: rgba(243, 239, 232, 0.28);
  --control: rgba(12, 11, 10, 0.45);
  --control-hover: rgba(12, 11, 10, 0.72);
  --control-border: transparent;
  --glow: rgba(198, 163, 106, 0.07);
  --selection: #1a140c;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 8% -10%, var(--glow), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--brass);
  color: var(--selection);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 1px solid var(--brass);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: var(--pad);
  top: 0;
  transform: translateY(-120%);
  z-index: 40;
  background: var(--text);
  color: var(--bg);
  padding: 0.55rem 0.8rem;
  text-decoration: none;
  font-size: 0.85rem;
}

.skip:focus {
  transform: none;
  top: 12px;
}

.shell {
  width: min(var(--max), 100%);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  background: var(--header-solid);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 28px;
  flex-wrap: wrap;
  padding-block: 18px 16px;
}

.wordmark {
  font-family: var(--mono);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(0.92rem, 2.2vw, 1.05rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 759px) {
  .wordmark {
    display: none;
  }
}

.nav {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(8px, 2.4vw, 28px);
  row-gap: 10px;
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  padding-bottom: 3px;
}

.nav a:hover,
.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle {
  appearance: none;
  display: grid;
  place-items: center;
  align-self: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.theme-toggle .theme-toggle__moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .theme-toggle__sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .theme-toggle__moon {
  display: block;
}

.nav a[aria-current="page"],
.nav-drop__btn[aria-current="page"] {
  color: var(--text);
  box-shadow: 0 1px 0 var(--brass);
}

.nav-drop {
  position: relative;
}

.nav-drop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 16px;
}

.nav-drop__btn {
  appearance: none;
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0 15px 3px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-drop__btn svg {
  position: absolute;
  right: 0;
  top: 0.05em;
  width: 9px;
  height: 9px;
  display: block;
}

@media (max-width: 759px) {
  .header__inner {
    flex-wrap: nowrap;
    align-items: center;
  }

  .nav {
    flex-wrap: nowrap;
    align-items: center;
  }

  .nav a,
  .nav-drop__btn {
    white-space: nowrap;
  }

  .nav-drop,
  .theme-toggle {
    flex: none;
  }

  /* The wrapper inherits the body line box, which is taller than the
     label. Centering that box drops Collections below the other items. */
  .nav-drop {
    display: flex;
  }
}

@media (max-width: 420px) {
  .nav {
    justify-content: space-between;
    width: 100%;
    column-gap: 4px;
    row-gap: 0;
    margin-left: 0;
  }
}

@media (max-width: 389px) {
  .nav a,
  .nav-drop__btn {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
  }

  .nav-drop__btn {
    padding-right: 13px;
  }
}

@media (max-width: 349px) {
  .nav a,
  .nav-drop__btn {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
  }
}

.nav-drop.is-open .nav-drop__btn,
.nav-drop:hover .nav-drop__btn {
  color: var(--text);
}

.nav-drop.is-open .nav-drop__btn svg {
  transform: rotate(180deg);
}

.nav-drop__menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  min-width: 12.5rem;
  max-width: calc(100vw - 24px);
  max-height: calc(100svh - 76px);
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: var(--header-solid);
  border: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-drop.is-open .nav-drop__menu,
.nav-drop:focus-within .nav-drop__menu {
  display: flex;
  flex-direction: column;
}

@media (hover: hover) and (pointer: fine) {
  .nav-drop:hover .nav-drop__menu {
    display: flex;
    flex-direction: column;
  }

  .nav-drop:hover .nav-drop__btn svg {
    transform: rotate(180deg);
  }
}

.nav-drop__group {
  min-width: 12.5rem;
  margin: 0;
  padding: 0;
}

.nav-drop__group + .nav-drop__group {
  border-top: 1px solid var(--line);
}

.nav-drop__year {
  margin: 0;
  padding: 10px 16px 2px;
  color: var(--brass);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.2;
}

.nav-drop__group ul {
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
}

@media (min-width: 760px) {
  .nav-drop.is-open .nav-drop__menu,
  .nav-drop:focus-within .nav-drop__menu,
  .nav-drop:hover .nav-drop__menu {
    flex-direction: row;
    align-items: stretch;
  }

  .nav-drop__group + .nav-drop__group {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

.nav-drop__menu a {
  display: block;
  padding: 9px 16px;
  white-space: nowrap;
  box-shadow: none;
}

.nav-drop__menu a[aria-current="page"] {
  color: var(--text);
  box-shadow: none;
}

.page {
  padding-top: 18px;
  padding-bottom: 28px;
}

.intro {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.intro h1,
.about h1,
.contact h2,
.list h2,
.lb__title,
.card__title,
.contact__email {
  font-family: var(--mono);
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0;
}

.intro h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.15;
}

.intro__lead {
  display: flex;
  align-items: baseline;
  flex: none;
  gap: 14px;
  max-width: 100%;
}

.intro .intro__count {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.intro__count svg {
  width: 1em;
  height: 1em;
  max-width: 1em;
  max-height: 1em;
  flex: none;
  display: inline-block;
  vertical-align: -0.12em;
  margin-right: 0.4em;
}

.intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.intro:has(.intro__bio) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 32px;
  row-gap: 12px;
}

.intro:has(.intro__bio) .intro__aside {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  text-align: right;
}

.intro__aside {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: flex-end;
  column-gap: 16px;
  row-gap: 8px;
  max-width: 100%;
}

.shuffle {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brass);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
}

.intro__when + .shuffle {
  margin-left: 2px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

@media (max-width: 759px) {
  .intro__when + .shuffle {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}

.shuffle:hover,
.shuffle:focus-visible {
  color: var(--text);
}

.sort {
  display: flex;
  align-items: baseline;
}

.sort__btn {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
}

.sort__btn + .sort__btn {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.sort__btn.is-active {
  color: var(--text);
  cursor: default;
}

.sort__btn:hover,
.sort__btn:focus-visible {
  color: var(--text);
}

.intro__bio {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: 40em;
}

.intro__bio p {
  margin: 0 0 0.75rem;
  color: var(--prose);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0;
}

.intro__bio p:last-child {
  margin-bottom: 0;
}

.intro__bio a {
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 0 var(--brass);
  padding-bottom: 1px;
  overflow-wrap: anywhere;
}

.intro__bio a:hover {
  color: var(--brass);
}

/* Date sort on the home page. One masonry per year, with a label between them. */
#collections.collections--dated {
  display: flex;
  flex-direction: column;
}

#collections.collections--dated > .year-label {
  margin: 28px 0 16px;
}

.year-label {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 759px) {
  .intro:has(.intro__bio) {
    grid-template-columns: 1fr;
  }

  .intro:has(.intro__bio) .intro__aside {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    text-align: left;
    justify-content: flex-start;
  }

  .intro__bio {
    grid-row: 2;
  }
}

.atlas {
  width: min(100%, 1080px);
  margin-inline: auto;
}

.atlas + .atlas {
  margin-top: 56px;
}

.atlas__title {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.atlas__viewport {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.atlas.is-zoomed .atlas__viewport {
  cursor: grab;
}

.atlas.is-panning .atlas__viewport {
  cursor: grabbing;
}

.atlas__stage {
  position: relative;
  transform-origin: 0 0;
}

.atlas__pins {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.atlas__pins .atlas__pin {
  pointer-events: auto;
}

.atlas.is-fitting .atlas__stage {
  transition: transform 0.35s ease;
}

.atlas__svg {
  display: block;
  width: 100%;
  height: auto;
}

.atlas__land path {
  fill: var(--frame);
  stroke: var(--text);
  stroke-opacity: 0.22;
  stroke-width: 1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.atlas__detail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.atlas.is-detailed .atlas__detail {
  opacity: 0.75;
}

.atlas__detail .land {
  fill: var(--frame);
}

.atlas__detail .water {
  fill: var(--bg);
}

.atlas__detail .park {
  fill: var(--text);
  fill-opacity: 0.06;
}

.atlas__detail .river {
  fill: none;
  stroke: var(--bg);
  stroke-linejoin: round;
  stroke-linecap: round;
}

.atlas__detail .boundary,
.atlas__detail .road {
  fill: none;
  stroke: var(--text);
  stroke-linejoin: round;
  stroke-linecap: round;
}

.atlas__detail .boundary {
  stroke-opacity: 0.22;
}

.atlas__credit {
  position: absolute;
  z-index: 2;
  left: 10px;
  bottom: 8px;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

.atlas__credit a {
  color: inherit;
}

.atlas__tools,
.globe__tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.atlas__tools button,
.globe__tools button {
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.atlas__tools button[data-zoom="reset"],
.globe__tools button[data-zoom="reset"] {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.atlas__tools button:hover,
.atlas__tools button:focus-visible,
.globe__tools button:hover,
.globe__tools button:focus-visible {
  color: var(--brass);
  border-color: var(--brass);
}

.atlas__tools button:disabled,
.globe__tools button:disabled {
  opacity: 0.35;
  cursor: default;
}

.atlas__pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  color: var(--text);
  text-decoration: none;
}

button.atlas__area {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
}

.atlas__pin.is-fanned {
  z-index: 2;
}

.atlas__count {
  margin-left: 0.4em;
  color: var(--muted);
}

.atlas__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 4px var(--frame);
  transform: translate(-50%, -50%);
}

.atlas__name {
  position: absolute;
  left: calc(100% - 12px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
}

.atlas__pin:not(.atlas__area) .atlas__name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.atlas__pin.is-west:not(.atlas__area) .atlas__name {
  align-items: flex-end;
}

.atlas__place,
.atlas__when {
  color: var(--muted);
}

.atlas__pin.is-west .atlas__name {
  left: auto;
  right: calc(100% - 12px);
}

.atlas__pin:hover .atlas__dot,
.atlas__pin:focus-visible .atlas__dot {
  background: var(--brass);
}

.atlas__pin:hover .atlas__name,
.atlas__pin:focus-visible .atlas__name {
  box-shadow: 0 1px 0 var(--brass);
}

.atlas__away {
  width: min(100%, 1080px);
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.atlas__away span {
  margin-right: 0.7em;
}

.atlas__away a {
  color: var(--text);
  letter-spacing: 0.08em;
  text-decoration: none;
}

.atlas__away a:hover,
.atlas__away a:focus-visible {
  box-shadow: 0 1px 0 var(--brass);
}

.globe {
  width: min(100%, 980px);
  margin-inline: auto;
}

.globe__viewport {
  position: relative;
  width: min(100%, 76vh);
  margin-inline: auto;
  aspect-ratio: 1;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.globe.is-panning .globe__viewport {
  cursor: grabbing;
}

.globe__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.globe__pins {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.globe__pin {
  --pin: var(--brass);
  position: absolute;
  width: 15px;
  height: 20px;
  transform: translate(0, -100%);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}

.globe__flag {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 14px;
  height: 18px;
  background:
    linear-gradient(var(--pin), var(--pin)) left bottom / 1.5px 18px no-repeat,
    linear-gradient(color-mix(in srgb, var(--pin) 72%, white), var(--pin)) 1.5px 1px / 11px 7px no-repeat;
}

.globe__name {
  position: absolute;
  left: 16px;
  top: 1px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
}

.globe__pin.is-west {
  transform: translate(-100%, -100%);
}

.globe__pin.is-west .globe__flag {
  left: auto;
  right: 0;
  transform: scaleX(-1);
}

.globe__pin.is-west .globe__name {
  left: auto;
  right: 16px;
}

.globe__pin:hover .globe__flag,
.globe__pin:focus-visible .globe__flag {
  filter: brightness(1.18);
}

.globe__pin:hover .globe__name,
.globe__pin:focus-visible .globe__name {
  box-shadow: 0 1px 0 var(--brass);
}

button.globe__area {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
}

.globe__pin.globe__area,
.globe__pin.globe__area.is-west {
  transform: translate(-50%, -50%);
}

.globe__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 4px var(--frame);
  transform: translate(-50%, -50%);
}

.globe__area .globe__name {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.globe__pin.globe__area.is-west .globe__name {
  left: auto;
  right: 14px;
}

.globe__count {
  margin-left: 0.35em;
  color: var(--muted);
  font-weight: 400;
}

.globe__area:hover .globe__dot,
.globe__area:focus-visible .globe__dot {
  background: var(--brass);
}

.globe__pin.is-fanned {
  z-index: 2;
}

figure {
  margin: 0;
}

.masonry {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.masonry__col {
  display: contents;
}

.card {
  order: var(--order);
  min-width: 0;
}

.card__btn,
.card__link {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  text-decoration: none;
}

.card__btn {
  cursor: zoom-in;
}

.card__link {
  cursor: pointer;
}

.card__frame {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--frame);
  line-height: 0;
}

.card__frame img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.012);
  transition: transform 0.9s var(--ease);
}

.card__frame.is-reeling > img {
  visibility: hidden;
}

.card__reel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.card__reel-strip {
  position: absolute;
  inset: -40px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 101.2% 101.2%;
  will-change: filter, background-position;
}

.card__frame.is-reeling + .card__meta {
  animation: shuffle-caption 220ms var(--ease) both;
  animation-delay: calc(var(--shuffle-delay, 0ms) + 240ms);
}

@keyframes shuffle-caption {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-top: 12px;
  position: relative;
}

.card__meta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 1px;
  background: var(--brass);
  transition: width 0.45s var(--ease);
}

.card__lead {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  min-width: 0;
}

.card__title {
  font-size: clamp(0.95rem, 1.5vw, 1.12rem);
  line-height: 1.3;
  min-width: 0;
}

.card__aside {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin-left: auto;
  flex: none;
}

/* Collection cards put "place, date" in the aside. Keep it on the right,
   and let a long place drop under the name instead of overflowing. */
.card__link .card__meta {
  flex-wrap: wrap;
  row-gap: 4px;
}

.card__link .card__aside {
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: min(100%, max-content);
  max-width: 100%;
}

.card__link .card__aside .card__place {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  line-height: 1.45;
  text-align: right;
}

.card__place,
.card__recipe {
  flex: none;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card__settings {
  display: inline-flex;
  flex: none;
  gap: 0.75rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.card__btn:hover .card__meta::after,
.card__btn:focus-visible .card__meta::after,
.card__link:hover .card__meta::after,
.card__link:focus-visible .card__meta::after {
  width: 2.4rem;
}

/* Timeline cards name the collection and the month, so the line wraps
   instead of running past the frame. */
#timeline .card__meta,
#timeline .card__lead,
#timeline .card__aside {
  flex-wrap: wrap;
  row-gap: 4px;
}

#timeline .card__aside {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: min(100%, max-content);
  max-width: 100%;
}

.more {
  margin-top: 72px;
  min-width: 0;
  max-width: 100%;
}

.more__title {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.more__row {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.more__col {
  display: contents;
}

.more__row .card,
.more__row .card__frame,
.more__row .card__frame img {
  min-width: 0;
  max-width: 100%;
}

.footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding-block: 20px 32px;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text);
}

.footer__inner p {
  margin: 0;
}

.about h1,
.list h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1.2;
}

.about__grid {
  display: grid;
  gap: 28px;
}

.prose .about__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.6rem;
  margin: 1.7rem 0 0;
}

.about__links a {
  color: var(--text);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 1px 0 var(--brass);
  padding-bottom: 2px;
}

.about__links a:hover {
  color: var(--brass);
}

.about__photo {
  margin: 0;
}

.about__photo img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--frame);
}

.about__photo figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.prose p {
  margin: 0 0 1.05rem;
  max-width: 42em;
  color: var(--prose);
}

.prose p:last-child {
  margin-bottom: 0;
}

.list {
  margin-top: 2.4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.prose .list__intro {
  margin: 0 0 1.35rem;
  color: var(--muted);
}

.list .button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.contact {
  display: grid;
  gap: 32px;
  margin-top: 88px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 84px;
}

.contact h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.2;
}

.contact__intro p {
  margin: 0 0 22px;
  max-width: 36em;
  color: var(--muted);
}

.contact__email {
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 1px solid var(--brass);
}

.form {
  display: grid;
  gap: 22px;
  align-content: start;
}

.field {
  display: grid;
  gap: 4px;
}

.field span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  margin: 0;
  padding: 0.65rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
  line-height: 1.55;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--brass);
}

.field input:user-invalid,
.field textarea:user-invalid {
  border-bottom-color: var(--danger);
}

.form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.button {
  appearance: none;
  border: 1px solid var(--button-border);
  background: transparent;
  color: var(--text);
  padding: 0.9rem 1.35rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.button:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg-deep);
}

.form__note,
.form__status {
  margin: 0;
  color: var(--faint);
  font-size: 0.85rem;
}

.form__status:empty {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#lightbox {
  padding: 0;
  border: 0;
  background: var(--bg-deep);
  color: var(--text);
}

#lightbox[open] {
  position: fixed;
  inset: 0;
  display: flex;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: none;
  margin: 0;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.28s ease;
}

@starting-style {
  #lightbox[open] {
    opacity: 0;
  }
}

#lightbox::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.lb {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.lb__stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  min-height: 0;
  min-width: 0;
  padding: calc(64px + env(safe-area-inset-top)) 72px 12px;
  overflow: hidden;
}

.lb__photo,
.lb__error {
  grid-area: 1 / 1;
}

.lb__photo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  opacity: 1;
  transition: opacity 0.28s ease;
  background: transparent;
}

.lb__photo.is-loading {
  opacity: 0;
}

.lb__error {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.lb__error[hidden],
.lb__prev[hidden],
.lb__next[hidden],
.lb__count[hidden] {
  display: none;
}

.lb__bar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 6px 28px calc(18px + env(safe-area-inset-bottom));
}

.lb__title {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.3;
}

.lb__place:empty,
.lb__recipe:empty,
.lb__title:empty {
  display: none;
}

.lb__place,
.lb__recipe,
.lb__count {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lb__settings {
  margin: 6px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.lb__settings:empty {
  display: none;
}

.lb__count {
  margin: 0 0 4px;
  flex: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
}

.lb__close,
.lb__prev,
.lb__next {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--control-border);
  border-radius: 50%;
  background: var(--control);
  color: var(--text);
  cursor: pointer;
}

.lb__close {
  top: calc(14px + env(safe-area-inset-top));
  right: calc(14px + env(safe-area-inset-right));
}

.lb__prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lb__next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lb__close:hover,
.lb__prev:hover,
.lb__next:hover,
.lb__close:focus-visible,
.lb__prev:focus-visible,
.lb__next:focus-visible {
  border-color: var(--brass);
  background: var(--control-hover);
}

.lb__close svg,
.lb__prev svg,
.lb__next svg {
  width: 18px;
  height: 18px;
  display: block;
}

@media (min-width: 760px) {
  .more__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }

  .more__col {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
  }

  .masonry {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
  }

  .masonry__col {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
  }

  .card {
    order: 0;
  }
}

@media (min-width: 860px) {
  .about__grid {
    grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.15fr);
    gap: 64px;
    align-items: start;
  }

  .about__photo {
    grid-column: 1;
    grid-row: 1;
  }

  .about .prose {
    grid-column: 2;
    grid-row: 1;
  }

  .contact {
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
    gap: 72px;
    margin-top: 108px;
  }
}

@media (max-width: 759px) {
  .lb__stage {
    padding: calc(60px + env(safe-area-inset-top)) 8px 8px;
  }

  .lb__prev {
    left: 8px;
  }

  .lb__next {
    right: 8px;
  }

  .lb__bar {
    padding-inline: 16px;
  }

  .form__row .button {
    width: 100%;
  }
}

@media (hover: hover) and (pointer: fine) {
  .card__btn:hover .card__frame img,
  .card__link:hover .card__frame img {
    transform: scale(1.045);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .card__frame img {
    transform: none;
  }
}

.slots {
  width: min(100%, 1040px);
  margin-inline: auto;
  padding: 6px 0 28px;
}

.slots__machine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  grid-template-areas:
    "reels lever"
    "names .";
  column-gap: 10px;
  row-gap: 12px;
  align-items: stretch;
}

.slots__reels {
  grid-area: reels;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  background: var(--frame);
  border: 1px solid var(--line);
}

.slots__window {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--bg);
}

.slots__window::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--line);
}

.slots__open {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
}

.slots__open:disabled {
  cursor: default;
}

.slots__open:focus-visible {
  outline: 1px solid var(--brass);
  outline-offset: -3px;
}

.slots__strip {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
}

.slots__cell {
  display: block;
  height: var(--cell, 100%);
  background: var(--bg);
}

.slots__cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--bg);
}

.slots__names {
  grid-area: names;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-inline: 9px;
  min-height: 2.7em;
}

.slots__cap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.slots__cap.is-dim {
  opacity: 0.35;
}

.slots__title {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slots__where {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slots__cap:hover .slots__title,
.slots__cap:focus-visible .slots__title {
  color: var(--brass);
}

.slots__lever {
  grid-area: lever;
  position: relative;
  width: 76px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  justify-self: center;
}

.slots__lever.is-dragging {
  cursor: grabbing;
}

.slots__lever[aria-disabled="true"] {
  cursor: default;
}

.slots__lever-track {
  position: absolute;
  left: 50%;
  top: 18px;
  bottom: 14px;
  width: 10px;
  margin-left: -5px;
  border-radius: 8px;
  background: var(--frame);
  box-shadow: inset 0 0 0 1px var(--line);
}

.slots__lever-stop {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--frame);
  box-shadow: inset 0 0 0 1px var(--brass);
}

.slots__lever-slide {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 0;
  height: 0;
  z-index: 1;
}

.slots__lever-arm {
  position: absolute;
  left: -3px;
  top: 0;
  width: 6px;
  height: 46px;
  border-radius: 6px;
  transform-origin: 50% 0;
  background: linear-gradient(90deg, #5c431c, var(--brass-2) 46%, #4a3414);
}

.slots__lever-ball {
  position: absolute;
  left: 3px;
  top: 0;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  margin-top: -18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #fff8ee 0%, var(--brass-2) 26%, var(--brass) 58%, #3d2c14 100%);
  box-shadow:
    inset 0 -3px 4px rgba(0, 0, 0, 0.28),
    0 5px 8px rgba(0, 0, 0, 0.16);
}

@media (hover: hover) and (pointer: fine) {
  .slots__lever:hover .slots__lever-ball {
    filter: brightness(1.06);
  }
}

@media (max-width: 640px) {
  .slots__machine {
    grid-template-columns: 1fr;
    grid-template-areas:
      "reels"
      "names"
      "lever";
    row-gap: 14px;
  }

  .slots__reels,
  .slots__names {
    width: 100%;
    gap: 6px;
  }

  .slots__reels {
    padding: 6px;
  }

  .slots__names {
    padding-inline: 7px;
    min-height: 1.4em;
  }

  .slots__where {
    display: none;
  }

  .slots__lever {
    width: 88px;
    height: 148px;
    margin-top: 4px;
  }
}
