/*
  Four looks for the family's site, each a set of custom properties on <html>
  chosen by data-look. The page and the Cut the Cake events list read the same
  properties, so they change together. The list is styled only through the
  snippet contract's class names (ctc-events, ctc-event__*), never through
  its element structure beyond ul > li > a, which the contract also fixes.
  The framed invitation and its overlay keep the party's own design.
*/

/* ---------- The looks ---------- */

:root,
:root[data-look="letterpress"] {
  --jm-paper: #fdfaf5;
  --jm-paper-sunk: #f5efe6;
  --jm-card: #ffffff;
  --jm-ink: #1f1720;
  --jm-ink-soft: #574a56;
  --jm-rule: #e6dccf;
  --jm-accent: #a8324e;
  --jm-accent-ink: #ffffff;
  --jm-accent-wash: #fbeef1;
  --jm-highlight: #c08a2e;
  --jm-display: "Fraunces", Georgia, "Times New Roman", serif;
  --jm-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --jm-text-size: 1rem;
  --jm-display-weight: 500;
  --jm-display-tracking: -0.01em;
  --jm-lede-weight: 400;
  --jm-lede-style: normal;
  --jm-header-rule: 3px double var(--jm-rule);
  --jm-radius: 14px;
  --jm-shadow: 0 1px 2px rgba(31, 23, 32, 0.04), 0 10px 28px -14px rgba(31, 23, 32, 0.22);
  --jm-date-bg: #fbf3e3;
  --jm-date-ink: var(--jm-ink);
  --jm-date-month: var(--jm-accent);
  --jm-date-border: 1px solid #eedfc4;
  --jm-date-radius: 10px;
  --jm-eyebrow: var(--jm-accent);
  --jm-picture-rule: var(--jm-rule);
  --jm-picture-radius: calc(var(--jm-radius) * 0.6);
  color-scheme: light;
}

:root[data-look="modern"] {
  --jm-paper: #ffffff;
  --jm-paper-sunk: #f4f4f5;
  --jm-card: #ffffff;
  --jm-ink: #0b0b0c;
  --jm-ink-soft: #55565c;
  --jm-rule: #e4e4e7;
  --jm-accent: #2f3cff;
  --jm-accent-ink: #ffffff;
  --jm-accent-wash: #eef0ff;
  --jm-highlight: #2f3cff;
  --jm-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --jm-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --jm-text-size: 1rem;
  --jm-display-weight: 700;
  --jm-display-tracking: -0.035em;
  --jm-lede-weight: 700;
  --jm-lede-style: normal;
  --jm-header-rule: 1px solid var(--jm-ink);
  --jm-radius: 6px;
  --jm-shadow: 0 0 0 1px var(--jm-ink);
  --jm-date-bg: var(--jm-accent);
  --jm-date-ink: #ffffff;
  --jm-date-month: rgba(255, 255, 255, 0.86);
  --jm-date-border: 0;
  --jm-date-radius: 4px;
  --jm-eyebrow: var(--jm-ink);
  --jm-picture-rule: var(--jm-rule);
  --jm-picture-radius: calc(var(--jm-radius) * 0.6);
  color-scheme: light;
}

:root[data-look="garden"] {
  --jm-paper: #f6f2e6;
  --jm-paper-sunk: #ebebdb;
  --jm-card: #fbf9f1;
  --jm-ink: #24372c;
  --jm-ink-soft: #536558;
  --jm-rule: #d6dbc4;
  --jm-accent: #4a6b4f;
  --jm-accent-ink: #fbf9f1;
  --jm-accent-wash: #e2e9d6;
  --jm-highlight: #9bb08f;
  --jm-display: "Cormorant Garamond", "Cormorant", Garamond, Georgia, serif;
  --jm-text: "Cormorant Garamond", "Cormorant", Garamond, Georgia, serif;
  --jm-text-size: 1.2rem;
  --jm-display-weight: 600;
  --jm-display-tracking: 0;
  --jm-lede-weight: 500;
  --jm-lede-style: italic;
  --jm-header-rule: 1px solid var(--jm-rule);
  --jm-radius: 22px;
  --jm-shadow: 0 14px 32px -18px rgba(36, 55, 44, 0.35);
  --jm-date-bg: #e2e9d6;
  --jm-date-ink: var(--jm-ink);
  --jm-date-month: var(--jm-accent);
  --jm-date-border: 1px solid #cbd6bd;
  --jm-date-radius: 999px;
  --jm-eyebrow: var(--jm-accent);
  --jm-picture-rule: var(--jm-rule);
  --jm-picture-radius: 14px;
  color-scheme: light;
}

:root[data-look="night"] {
  --jm-paper: #0d1628;
  --jm-paper-sunk: #0a1120;
  --jm-card: #13203a;
  --jm-ink: #f3ecdc;
  --jm-ink-soft: #b9b3a4;
  --jm-rule: #26365a;
  --jm-accent: #d4af5a;
  --jm-accent-ink: #0d1628;
  --jm-accent-wash: #2a3047;
  --jm-highlight: #d4af5a;
  --jm-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --jm-text: "Jost", "Futura", system-ui, sans-serif;
  --jm-text-size: 1.0625rem;
  --jm-display-weight: 700;
  --jm-display-tracking: 0;
  --jm-lede-weight: 600;
  --jm-lede-style: normal;
  --jm-header-rule: 1px solid #3a4666;
  --jm-radius: 2px;
  --jm-shadow: 0 0 0 1px var(--jm-accent), 0 18px 40px -20px rgba(0, 0, 0, 0.8);
  --jm-date-bg: transparent;
  --jm-date-ink: var(--jm-ink);
  --jm-date-month: var(--jm-accent);
  --jm-date-border: 1px solid var(--jm-accent);
  --jm-date-radius: 2px;
  --jm-eyebrow: var(--jm-accent);
  --jm-picture-rule: #3a4666;
  --jm-picture-radius: calc(var(--jm-radius) * 0.6);
  color-scheme: dark;
}

/* Twenty Twenty-Five's own presets follow the look, so every block the
   editor offers (and the 404 page) wears it too. */
:root[data-look] {
  --wp--preset--color--base: var(--jm-paper);
  --wp--preset--color--contrast: var(--jm-ink);
  --wp--preset--color--accent-4: var(--jm-ink-soft);
  --wp--preset--color--accent-6: var(--jm-rule);
  --wp--preset--font-family--manrope: var(--jm-text);
}

/* ---------- The page ---------- */

body {
  background: var(--jm-paper);
  color: var(--jm-ink);
  font-family: var(--jm-text);
  font-size: var(--jm-text-size);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s ease, color 0.35s ease;
}

::selection {
  background: var(--jm-accent-wash);
  color: var(--jm-ink);
}

:where(.wp-site-blocks) > * {
  margin-block-start: 0;
}

.wp-site-blocks {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.jm-main {
  flex: 1 0 auto;
  padding: clamp(24px, 4vw, 44px) 16px clamp(56px, 9vw, 112px);
}

.jm-main > .wp-block-post-content > * + * {
  margin-block-start: 0;
}

.jm-header {
  border-bottom: var(--jm-header-rule);
  background: var(--jm-paper);
  transition: background-color 0.35s ease;
}

.jm-header__inner {
  box-sizing: border-box;
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  flex-wrap: wrap;
}

.jm-header .jm-header__title {
  margin: 0;
  font-family: var(--jm-display);
  font-weight: var(--jm-display-weight);
  font-size: clamp(1.375rem, 3vw, 1.625rem);
  line-height: 1.2;
  letter-spacing: var(--jm-display-tracking);
}

:root[data-look="garden"] .jm-header .jm-header__title {
  font-size: clamp(1.625rem, 3.4vw, 1.875rem);
}

.jm-header .jm-header__title a {
  color: inherit;
  text-decoration: none;
}

/* The switcher. Without JS it does nothing, so it is not drawn. */

.jm-looks {
  display: none;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.jm-js .jm-looks {
  display: flex;
}

/* Floated, so it is laid out as part of the fieldset's content. */
.jm-looks__legend {
  float: left;
  padding: 0;
  font: 600 0.6875rem/1 "Inter", system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jm-ink-soft);
}

.jm-looks__options {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--jm-rule);
  border-radius: 999px;
  background: var(--jm-paper-sunk);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.jm-looks__option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px 7px 9px;
  border-radius: 999px;
  color: var(--jm-ink-soft);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* Each name is set in its own look's face: the switch is its own preview. */
.jm-looks__name {
  line-height: 1.25;
}
[data-look-option="letterpress"] .jm-looks__name {
  font: 500 0.875rem/1.25 "Fraunces", Georgia, serif;
}
[data-look-option="modern"] .jm-looks__name {
  font: 700 0.8125rem/1.25 "Inter", system-ui, sans-serif;
  letter-spacing: -0.02em;
}
[data-look-option="garden"] .jm-looks__name {
  font: italic 600 1rem/1.25 "Cormorant Garamond", Georgia, serif;
}
[data-look-option="night"] .jm-looks__name {
  font: 700 0.875rem/1.25 "Bodoni Moda", Georgia, serif;
}

.jm-looks__option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.jm-looks__option:hover {
  color: var(--jm-ink);
}

.jm-looks__option:has(input:checked) {
  background: var(--jm-card);
  color: var(--jm-ink);
  box-shadow: 0 0 0 1px var(--jm-rule), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.jm-looks__option:has(input:focus-visible) {
  outline: 2px solid var(--jm-accent);
  outline-offset: 2px;
}

.jm-looks__swatch {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
[data-look-option="letterpress"] .jm-looks__swatch {
  background: linear-gradient(135deg, #fdfaf5 50%, #a8324e 50%);
}
[data-look-option="modern"] .jm-looks__swatch {
  background: linear-gradient(135deg, #ffffff 50%, #2f3cff 50%);
}
[data-look-option="garden"] .jm-looks__swatch {
  background: linear-gradient(135deg, #f6f2e6 50%, #4a6b4f 50%);
}
[data-look-option="night"] .jm-looks__swatch {
  background: linear-gradient(135deg, #0d1628 50%, #d4af5a 50%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* The welcome and the section heading. */

.jm-lede {
  margin: 0 0 clamp(44px, 8vw, 80px);
  font-family: var(--jm-display);
  font-size: clamp(1.75rem, 5.2vw, 2.875rem);
  font-weight: var(--jm-lede-weight);
  font-style: var(--jm-lede-style);
  line-height: 1.16;
  letter-spacing: var(--jm-display-tracking);
  text-wrap: balance;
}

:root[data-look="letterpress"] .jm-lede {
  font-variation-settings: "opsz" 96;
}

:root[data-look="garden"] .jm-lede {
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
}

:root[data-look="modern"] .jm-lede {
  line-height: 1.08;
}

.jm-main .jm-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  font: 600 0.75rem/1.3 var(--jm-text);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jm-eyebrow);
}

:root[data-look="garden"] .jm-main .jm-section-title {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

.jm-main .jm-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--jm-rule);
}

.jm-footer {
  padding: 36px 24px 44px;
  border-top: 1px solid var(--jm-rule);
  text-align: center;
}

.jm-footer .jm-footer__title {
  margin: 0;
  font-family: var(--jm-display);
  font-weight: var(--jm-display-weight);
  font-size: 1rem;
  color: var(--jm-ink-soft);
}

.jm-footer .jm-footer__title a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Next up: the soonest party ---------- */

/* Cut the Cake's next-event snippet, pasted into the page (contract class
   names only). A party anyone can find is the framed invitation: the inside
   keeps the party's own design, only the box around it wears the look. A
   guest-list party is its list item, styled as the list's. With nothing
   coming, the snippet and the heading above it are hidden. */
.ctc-next {
  --jm-featured-reserve: 780px;
  margin: 0 0 clamp(56px, 9vw, 96px);
}

.jm-section-title:has(+ .ctc-next--empty),
.ctc-next--empty {
  display: none;
}

/* Room for an invitation (about what a party's measures) while the list is
   asked and the frame draws, so the events below do not jump down when it
   arrives. The frame then sets its own height. */
.jm-js .ctc-next:not(.ctc-next--ready),
.ctc-next .ctc-invitation:not(.ctc-invitation--ready) {
  min-height: var(--jm-featured-reserve);
}

.ctc-next .ctc-invitation,
.jm-js .ctc-next:not(.ctc-next--ready),
.jm-feature {
  box-sizing: border-box;
  border: 1px solid var(--jm-rule);
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow);
  transition: border-color 0.35s ease, background-color 0.35s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ctc-next .ctc-invitation,
.jm-js .ctc-next:not(.ctc-next--ready) {
  overflow: hidden;
  background: var(--jm-paper-sunk);
}

:root[data-look="night"] .ctc-next .ctc-invitation,
:root[data-look="night"] .jm-feature {
  border-color: var(--jm-accent);
}

/* Before the frame says it is drawn, or if it never does: the link in. */
.jm-js .ctc-next:not(.ctc-next--ready),
.ctc-next .ctc-invitation:not(.ctc-invitation--ready) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 20px;
  text-align: center;
}

.ctc-next .ctc-invitation:not(.ctc-invitation--ready) > a {
  color: var(--jm-accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

.ctc-next .ctc-invitation__frame {
  flex: none;
}

/* The guest-list party's card: its cover as a framed print, then its day,
   its label, the note and the way in. The whole card is the link. */
.jm-feature {
  --jm-feature-picture: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(22px, 4vw, 32px);
  padding: clamp(20px, 5vw, 44px) clamp(18px, 5vw, 48px) clamp(28px, 5vw, 48px);
  background: var(--jm-card);
  color: var(--jm-ink);
  text-align: center;
  text-decoration: none;
}

.jm-feature:hover {
  border-color: var(--jm-accent);
  transform: translateY(-1px);
}

:root[data-look="modern"] .jm-feature:hover {
  border-color: var(--jm-ink);
}

.jm-feature:focus-visible {
  outline: 2px solid var(--jm-accent);
  outline-offset: 3px;
}

/* The slot fits the picture, at most --jm-feature-picture tall: one card,
   nothing to line up with, so a wide cover gets no empty bands. */
.jm-feature__picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.jm-feature__picture--none {
  display: none;
}

.jm-feature__print {
  position: relative;
  display: block;
  max-width: 100%;
  line-height: 0;
}

.jm-feature__image {
  display: block;
  max-width: 100%;
  max-height: var(--jm-feature-picture);
}

.jm-feature__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.jm-feature__when {
  font: 600 0.75rem/1.3 var(--jm-text);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jm-eyebrow);
}

:root[data-look="garden"] .jm-feature__when {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

.jm-main .jm-feature .jm-feature__title {
  margin: 0;
  font-family: var(--jm-display);
  font-weight: var(--jm-display-weight);
  font-size: clamp(1.75rem, 4.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: var(--jm-display-tracking);
  text-wrap: balance;
  color: var(--jm-ink);
}

:root[data-look="garden"] .jm-main .jm-feature .jm-feature__title {
  font-size: clamp(2rem, 5.4vw, 2.875rem);
  line-height: 1.08;
}

.jm-feature__note {
  padding: 3px 10px;
  border: 1px solid var(--jm-picture-rule);
  border-radius: 999px;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--jm-ink-soft);
}

.jm-feature__open {
  margin-top: 6px;
  color: var(--jm-accent);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

.jm-feature__open::after {
  content: "\2192";
  content: "\2192" / "";
  display: inline-block;
  margin-left: 0.4em;
  transition: transform 0.2s ease;
}

.jm-feature:hover .jm-feature__open::after {
  transform: translateX(3px);
}

/* ---------- Pictures as framed prints ---------- */

/* A cover sits in its slot at its own shape, never cropped (Cut the Cake
   shows the host's whole frame), with a thin rule on the picture's own
   edges; the slot itself is clear, so the card shows through around it.

   A round cover's JPEG is its circle on a square of the party's paper, the
   photograph stopping about 1% inside the square's edge (4 of 400 pixels),
   so it is clipped 3px inside its box. Its ring cannot be the picture's own
   border (outside the clip, or with paper between rule and photograph) nor
   its outline (Chrome clips an outline away under clip-path), so it is an
   inset shadow on a box laid over the picture: inside a 3px transparent
   border, so its outer edge is the clip's edge. */
.ctc-event__image,
.jm-feature__image {
  box-sizing: border-box;
  margin: 0;
  width: auto;
  height: auto;
  border: 1px solid var(--jm-picture-rule);
  border-radius: var(--jm-picture-radius);
  background: transparent;
  object-fit: contain;
}

.ctc-event__image.ctc-event__image--round,
.jm-feature__image.jm-feature__image--round {
  border: 0;
  border-radius: 50%;
  clip-path: circle(calc(50% - 3px));
}

/* An arched cover's JPEG is a half circle as wide as the picture over
   straight sides, on the party's paper, the photograph reaching every edge.
   Rounding the top corners to half the width clips the paper away, and the
   picture's own 1px rule then follows the arch rather than boxing it. */
.ctc-event__image.ctc-event__image--arch {
  border-radius: 9999px 9999px 0 0;
}

.jm-feature__print--round::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--jm-picture-rule);
  pointer-events: none;
}

/* ---------- The Cut the Cake events list (contract class names only) ---------- */

.ctc-events {
  margin: 0;
}

/* Before the script draws the list, or if it never does: a plain link. */
.ctc-events:not(.ctc-events--ready) > a,
.ctc-next:not(.ctc-next--ready) > a,
.ctc-events__more a {
  color: var(--jm-accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

.ctc-events__list,
.ctc-next__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.ctc-event {
  margin: 0;
  padding: 0;
}

.ctc-event__link {
  --jm-picture: 10rem;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) var(--jm-picture);
  grid-template-rows: auto auto auto 1fr;
  grid-template-areas:
    "date title image"
    "date when image"
    "date place image"
    "date status image";
  column-gap: 20px;
  align-items: start;
  padding: 18px 20px;
  background: var(--jm-card);
  border: 1px solid var(--jm-rule);
  border-radius: var(--jm-radius);
  color: var(--jm-ink);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.35s ease;
}

.ctc-event__link:hover {
  border-color: var(--jm-accent);
  box-shadow: var(--jm-shadow);
  transform: translateY(-1px);
}

:root[data-look="modern"] .ctc-event__link:hover {
  border-color: var(--jm-ink);
}

.ctc-event__link:focus-visible {
  outline: 2px solid var(--jm-accent);
  outline-offset: 3px;
}

/* Every card has the same picture slot, so the cards line up at one height
   whatever shape the host gave the cover. The slot is the link's ::before;
   the picture lies over it in the same grid area, centred, at most the
   slot's size. A card with no picture keeps the slot, empty and quiet. */
.ctc-event__link::before,
.ctc-event__image {
  grid-area: image;
  align-self: center;
}

.ctc-event__link::before {
  content: "";
  box-sizing: border-box;
  width: var(--jm-picture);
  height: var(--jm-picture);
  border-radius: var(--jm-picture-radius);
}

.ctc-event__link:not(:has(.ctc-event__image))::before {
  background: var(--jm-paper-sunk);
  opacity: 0.6;
}

/* With a round cover the slot is also its ring, laid over the picture: the
   cover fills the slot's height (every baked medallion is larger than it),
   so the two circles are one. See "Pictures as framed prints". */
.ctc-event__link:has(.ctc-event__image--round)::before {
  z-index: 1;
  justify-self: center;
  width: var(--jm-picture);
  border: 3px solid transparent;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--jm-picture-rule);
  pointer-events: none;
}

.ctc-event__image {
  justify-self: center;
  display: block;
  max-width: 100%;
  max-height: var(--jm-picture);
}

.ctc-event__date {
  grid-area: date;
  box-sizing: border-box;
  width: 4.5rem;
  height: 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: var(--jm-date-bg);
  color: var(--jm-date-ink);
  border: var(--jm-date-border);
  border-radius: var(--jm-date-radius);
}

.ctc-event__month {
  font: 600 0.6875rem/1.2 var(--jm-text);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jm-date-month);
}

:root[data-look="garden"] .ctc-event__month {
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  font-style: italic;
  text-transform: none;
}

.ctc-event__day {
  font-family: var(--jm-display);
  font-weight: var(--jm-display-weight);
  font-size: 1.875rem;
  line-height: 1.05;
  letter-spacing: var(--jm-display-tracking);
}

:root[data-look="garden"] .ctc-event__day {
  font-size: 2.125rem;
  line-height: 0.95;
}

.ctc-events .ctc-event__title {
  grid-area: title;
  margin: 2px 0 0;
  font-family: var(--jm-display);
  font-weight: var(--jm-display-weight);
  font-size: clamp(1.1875rem, 2.6vw, 1.4375rem);
  line-height: 1.25;
  letter-spacing: var(--jm-display-tracking);
  color: var(--jm-ink);
}

:root[data-look="garden"] .ctc-events .ctc-event__title {
  font-size: clamp(1.4375rem, 3vw, 1.75rem);
  line-height: 1.15;
}

.ctc-event__link:hover .ctc-event__title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--jm-accent);
}

.ctc-event__when,
.ctc-event__place {
  margin-top: 4px;
  font-size: 0.9375em;
  line-height: 1.45;
  color: var(--jm-ink-soft);
}

.ctc-event__when {
  grid-area: when;
}

.ctc-event__place {
  grid-area: place;
}

.ctc-event__status {
  grid-area: status;
  justify-self: start;
  margin-top: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--jm-accent-wash);
  color: var(--jm-ink);
  font-size: 0.8125em;
  font-weight: 600;
}

.ctc-event--full .ctc-event__status {
  background: var(--jm-paper-sunk);
  color: var(--jm-ink-soft);
}

/* A night listed by its date: the link opens its sign-in. The note is the
   venue page's own words for it. */
.ctc-event--private .ctc-event__link::after {
  content: "Invitation only";
  grid-area: place;
  justify-self: start;
  margin-top: 10px;
  padding: 3px 10px;
  border: 1px solid var(--jm-rule);
  border-radius: 999px;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--jm-ink-soft);
}

:root[data-look="night"] .ctc-event--private .ctc-event__link::after {
  border-color: #3a4666;
}

.ctc-events__empty {
  margin: 0;
  padding: 28px 20px;
  border: 1px dashed var(--jm-rule);
  border-radius: var(--jm-radius);
  text-align: center;
  color: var(--jm-ink-soft);
}

.ctc-events__empty a {
  color: inherit;
}

.ctc-events__more {
  margin: 26px 0 0;
}

.ctc-events__more a::after {
  content: "\2192";
  content: "\2192" / "";
  display: inline-block;
  margin-left: 0.4em;
  transition: transform 0.2s ease;
}

.ctc-events__more a:hover::after {
  transform: translateX(3px);
}

.ctc-events__credit,
.ctc-next__credit {
  margin: 40px 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

:root[data-look="garden"] .ctc-events__credit,
:root[data-look="garden"] .ctc-next__credit {
  font-size: 0.9375rem;
}

.ctc-events__credit a,
.ctc-next__credit a {
  color: var(--jm-ink-soft);
  text-decoration: none;
}

.ctc-events__credit a:hover,
.ctc-next__credit a:hover {
  color: var(--jm-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ---------- Phones ---------- */

@media (max-width: 600px) {
  .ctc-next {
    --jm-featured-reserve: 620px;
  }

  .jm-header__inner {
    padding: 14px 16px 12px;
  }

  .jm-looks {
    width: 100%;
  }

  /* Still read by a screen reader; the row speaks for itself on sight. */
  .jm-looks__legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .jm-looks__options {
    flex: 1;
  }

  .jm-looks__option {
    flex: 1 1 auto;
    gap: 5px;
    padding: 8px 6px;
  }

  .jm-looks__swatch {
    width: 11px;
    height: 11px;
  }

  [data-look-option="letterpress"] .jm-looks__name,
  [data-look-option="night"] .jm-looks__name {
    font-size: 0.8125rem;
  }
  [data-look-option="modern"] .jm-looks__name {
    font-size: 0.75rem;
  }
  [data-look-option="garden"] .jm-looks__name {
    font-size: 0.9375rem;
  }

  .ctc-event__link {
    grid-template-columns: 3.75rem minmax(0, 1fr);
    grid-template-rows: auto auto auto auto 1fr;
    grid-template-areas:
      "image image"
      "date title"
      "date when"
      "date place"
      "date status";
    column-gap: 16px;
    padding: 16px;
  }

  .ctc-event__link {
    --jm-picture: 8.5rem;
  }

  /* The picture's margin matches the slot's, so it stays centred in it. */
  .ctc-event__link::before {
    width: 100%;
  }

  .ctc-event__link::before,
  .ctc-event__image {
    margin-bottom: 16px;
  }

  .jm-feature {
    --jm-feature-picture: 220px;
  }

  .ctc-event__date {
    width: 3.75rem;
    height: 3.75rem;
  }

  .ctc-event__day {
    font-size: 1.5rem;
  }

  :root[data-look="garden"] .ctc-event__day {
    font-size: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .ctc-next .ctc-invitation,
  .jm-feature,
  .jm-feature__open::after,
  .jm-header,
  .jm-looks__options,
  .jm-looks__option,
  .ctc-event__link,
  .ctc-events__more a::after {
    transition: none;
  }

  .ctc-event__link:hover,
  .jm-feature:hover,
  .jm-feature:hover .jm-feature__open::after {
    transform: none;
  }
}
