/* IAC shared components: the tokens and building blocks for pages told as one story.

   Loaded on every IAC page at priority 99 (iac-organization.php), so it comes
   before the page modules (100) and organization.css (120). A page module can
   override a component; organization.css keeps the last word. Rules that compete
   with organization.css are scoped with .iac-site .iac-story.

   A page opts in by adding iac-story to its wrapper Group, next to iac-<page>-page.
   Pages without iac-story are untouched apart from the tokens. How to use these
   pieces: sdd/55-iac-page-design-guide.md. */

.iac-site {
  --iac-chapter-space: clamp(4rem, 8vw, 7rem);
  --iac-arc: clamp(1.5rem, 4vw, 3.5rem);
  --iac-bridge: clamp(0rem, 5vw, 4rem);
  --iac-lift: 0 1.5rem 3rem #11111124, 0 .25rem .75rem #11111114;
  --iac-card-radius: .75rem;
  /* From the content's edge to the screen's edge, for photos that run off it. */
  --iac-bleed: calc((100vw - min(100vw - var(--iac-site-gutter) * 2, 1200px)) / 2);
  --iac-airmail: repeating-linear-gradient(-45deg, var(--iac-accent) 0 .9rem, #ffffff .9rem 1.8rem, var(--iac-ink) 1.8rem 2.7rem, #ffffff 2.7rem 3.6rem);
  /* Ticks in a disc, for the principle pills (red) and newsletter topics (white). */
  --iac-tick-on-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23c41230'/%3E%3Cpath d='m7 12.5 3.2 3.2L17 9' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --iac-tick-on-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='white'/%3E%3Cpath d='m7 12.5 3.2 3.2L17 9' fill='none' stroke='%23c41230' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --iac-icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  --iac-icon-book: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4h6a4 4 0 0 1 4 4v13a3 3 0 0 0-3-3H2zM22 4h-6a4 4 0 0 0-4 4v13a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E");
  --iac-icon-compass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m16.24 7.76-2.12 6.36-6.36 2.12 2.12-6.36z'/%3E%3C/svg%3E");
  --iac-icon-people: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
  --iac-icon-ticket: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2ZM13 5v2M13 17v2M13 11v2'/%3E%3C/svg%3E");
  --iac-icon-person: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  --iac-icon-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  --iac-icon-video: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m23 7-7 5 7 5z'/%3E%3Crect x='1' y='5' width='15' height='14' rx='2'/%3E%3C/svg%3E");
  --iac-icon-camera: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E");
  --iac-icon-quote: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 36'%3E%3Cpath d='M0 36V22C0 9.6 6.4 2.3 19.2 0l2 5.1C14.3 7 10.9 11 10.8 17H20v19zm27 0V22c0-12.4 6.4-19.7 19.2-22l1.8 5.1C41.3 7 37.9 11 37.8 17H47v19z'/%3E%3C/svg%3E");
}

.iac-story {
  overflow-x: clip;
  color: var(--iac-ink);
  background: var(--iac-paper);
}

/* ------------------------------------------------------------------------
   Page frame: the wrapper every story page uses, shells and type.
   ------------------------------------------------------------------------ */
/* Full-width chapters own their spacing instead of inheriting Astra Group padding. */
.entry-content > .wp-block-group.iac-story {
  padding: 0;
  margin: 0;
}

.iac-shell {
  position: relative;
  width: calc(100% - var(--iac-site-gutter) * 2);
  max-width: 1200px;
  margin-inline: auto;
}

.iac-story :is(h1, h2, h3, p, figure, ul, ol) {
  margin-block: 0;
  overflow-wrap: anywhere;
}

/* Headings take their chapter's ink, white on the dark and red chapters. */
.iac-site .iac-story :is(h1, h2, h3) {
  color: inherit;
}

/* Native Group flow margins otherwise double the gaps in CSS grids. */
.iac-story :is([class*="-grid"], .iac-feature-cards, .iac-pills) > * {
  margin-block: 0;
}

.iac-story :is(.iac-copy, .iac-chapter-heading, .iac-photo-carousel-heading) > * + * {
  margin-top: 1.25rem;
}

.iac-story .iac-lead {
  max-width: 54ch;
  color: var(--iac-muted);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.65;
}

.iac-site .iac-story h2 {
  font-size: clamp(2.125rem, 4.2vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -.035em;
}

.iac-site .iac-story h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -.015em;
}

/* ------------------------------------------------------------------------
   Chapters: one rhythm, canvas colours and curved tops.
   ------------------------------------------------------------------------ */
.iac-chapter {
  position: relative;
  padding-block: var(--iac-chapter-space);
  scroll-margin-top: 1.5rem;
  background: var(--iac-paper);
}

/* The canvases. White is the default; is-white is only for saying so in the editor. */
.iac-chapter.is-white {
  background: var(--iac-paper);
}

.iac-chapter.is-soft {
  background: var(--iac-paper-soft);
}

.iac-chapter.is-night {
  color: var(--iac-paper);
  background: var(--iac-ink);
}

.iac-chapter.is-red {
  color: var(--iac-paper);
  background: var(--iac-accent);
}

.iac-story .is-night .iac-lead {
  color: #ffffffd9;
}

.iac-site .iac-chapter.is-night .iac-eyebrow {
  color: var(--iac-paper);
}

.iac-chapter.is-red :is(.iac-eyebrow, .iac-lead) {
  color: var(--iac-paper);
}

.iac-site .iac-chapter.is-red .iac-eyebrow {
  border-inline-start-color: var(--iac-paper);
}

/* A shallow dome of the chapter's own colour, rising into the one before. */
.iac-story .has-arc::before {
  content: '';
  position: absolute;
  inset-inline: -6%;
  bottom: calc(100% - 1px);
  height: var(--iac-arc);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: inherit;
  pointer-events: none;
}

/* The last chapter on a page: the footer's black curves up into it. */
.iac-story .has-footer-arc {
  padding-bottom: calc(var(--iac-chapter-space) + var(--iac-arc));
}

.has-footer-arc::after {
  content: '';
  position: absolute;
  inset-inline: -6%;
  bottom: -1px;
  height: var(--iac-arc);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--iac-ink);
  pointer-events: none;
}

/* ------------------------------------------------------------------------
   Buttons and text links.
   ------------------------------------------------------------------------ */
.iac-actions {
  gap: .75rem 1rem;
}

.iac-story .iac-actions a,
.iac-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 48px;
  padding: .85rem 1.4rem;
  border: 2px solid var(--iac-accent);
  border-radius: .25rem;
  color: var(--iac-paper);
  background: var(--iac-accent);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

/* An arrow on primary actions, drawn as a mask so it never joins the link's name. */
.iac-story .iac-actions .wp-block-button:not(.is-style-outline) a::after,
.iac-button::after {
  content: '';
  width: 1.1em;
  height: 1.1em;
  background: currentColor;
  -webkit-mask: var(--iac-icon-arrow) center / contain no-repeat;
  mask: var(--iac-icon-arrow) center / contain no-repeat;
}

.iac-story .iac-actions a:hover,
.iac-button:hover {
  border-color: var(--iac-accent-hover);
  color: var(--iac-paper);
  background: var(--iac-accent-hover);
}

.iac-site .iac-story .iac-actions .is-style-outline a.wp-element-button {
  border-color: currentColor;
  color: var(--iac-accent-hover);
  background: transparent;
}

.iac-site .iac-story .iac-actions .is-style-outline a.wp-element-button:hover {
  border-color: var(--iac-ink);
  color: var(--iac-paper);
  background: var(--iac-ink);
}

.iac-story :is(.is-night, .is-red) .iac-text-link a,
.iac-story :is(.is-night, .is-red) .iac-text-link a:hover {
  color: var(--iac-paper);
}

.iac-text-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--iac-accent-hover);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .3em;
}

/* The arrow is decoration: its empty alternative keeps it out of the link's
   name ("View your cart", not "View your cart →"). The first line is the
   fallback for browsers without alternative text in content. */
.iac-text-link a::after {
  content: '→';
  content: '→' / '';
  margin-left: .5em;
}

@media (prefers-reduced-motion: no-preference) {
  .iac-text-link a::after,
  .iac-story .iac-actions a::after,
  .iac-button::after {
    transition: translate 180ms ease;
  }

  .iac-text-link a:hover::after,
  .iac-story .iac-actions a:hover::after,
  .iac-button:hover::after {
    translate: .25em 0;
  }
}

/* Light buttons on night and red chapters. */
.iac-story :is(.is-night, .is-red) .iac-actions a {
  border-color: var(--iac-paper);
  color: var(--iac-ink);
  background: var(--iac-paper);
}

.iac-story :is(.is-night, .is-red) .iac-actions a:hover {
  border-color: var(--iac-accent);
  color: var(--iac-paper);
  background: var(--iac-accent);
}

.iac-story .is-red .iac-actions a:hover {
  border-color: var(--iac-ink);
  background: var(--iac-ink);
}

.iac-site .iac-story :is(.is-night, .is-red) .iac-actions .is-style-outline a.wp-element-button {
  border-color: #ffffffcc;
  color: var(--iac-paper);
  background: transparent;
}

.iac-site .iac-story :is(.is-night, .is-red) .iac-actions .is-style-outline a.wp-element-button:hover {
  color: var(--iac-ink);
  background: var(--iac-paper);
}

.iac-text-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
}

.iac-text-links > * {
  margin: 0;
}

/* ------------------------------------------------------------------------
   Chapter headings, feature cards.
   ------------------------------------------------------------------------ */
.iac-chapter-heading {
  max-width: 46rem;
}

/* Title on the left, the lead beside it on wide screens. */
.iac-story .iac-chapter-heading.is-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: end;
  column-gap: clamp(2rem, 5vw, 5rem);
  max-width: none;
}

.iac-chapter-heading.is-split > :not(.iac-lead) {
  grid-column: 1;
}

.iac-story .iac-chapter-heading.is-split > .iac-lead {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  margin: 0;
}

.iac-feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.iac-site .iac-story .iac-feature-card {
  --iac-feature-bg: var(--iac-ink);
  --iac-feature-ink: var(--iac-paper);
  --iac-feature-muted: #ffffffd1;
  --iac-feature-disc: var(--iac-accent);
  --iac-feature-icon: var(--iac-paper);
  --iac-feature-arrow-bg: var(--iac-accent);
  --iac-feature-arrow-ink: var(--iac-paper);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 23rem;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  overflow: hidden;
  border: 0;
  border-radius: var(--iac-card-radius);
  color: var(--iac-feature-ink);
  background: var(--iac-feature-emblem) right -3.5rem top -3rem / 11rem no-repeat, var(--iac-feature-bg);
  --iac-feature-emblem: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4h6a4 4 0 0 1 4 4v13a3 3 0 0 0-3-3H2zM22 4h-6a4 4 0 0 0-4 4v13a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E");
}

.iac-site .iac-story .iac-feature-card:nth-child(2) {
  --iac-feature-bg: var(--iac-paper-soft);
  --iac-feature-ink: var(--iac-ink);
  --iac-feature-muted: var(--iac-muted);
  --iac-feature-disc: var(--iac-paper);
  --iac-feature-icon: var(--iac-accent);
  --iac-feature-arrow-bg: var(--iac-ink);
  --iac-feature-emblem: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-opacity='.06' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m16.24 7.76-2.12 6.36-6.36 2.12 2.12-6.36z'/%3E%3C/svg%3E");
}

.iac-site .iac-story .iac-feature-card:nth-child(3) {
  --iac-feature-bg: var(--iac-accent);
  --iac-feature-muted: #ffffffe6;
  --iac-feature-disc: var(--iac-paper);
  --iac-feature-icon: var(--iac-accent);
  --iac-feature-arrow-bg: var(--iac-paper);
  --iac-feature-arrow-ink: var(--iac-accent-hover);
  --iac-feature-emblem: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='.13' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.iac-feature-card > * {
  position: relative;
  margin: 0;
}

/* The icon: a solid disc with the card's symbol. */
.iac-feature-card::before,
.iac-feature-card::after {
  content: '';
  order: -1;
  width: 3.5rem;
  height: 3.5rem;
}

.iac-feature-card::before {
  border-radius: 50%;
  background: var(--iac-feature-disc);
}

.iac-feature-card::after {
  position: absolute;
  top: clamp(1.75rem, 3vw, 2.5rem);
  inset-inline-start: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--iac-feature-icon);
  -webkit-mask: var(--iac-icon-book) center / 1.7rem no-repeat;
  mask: var(--iac-icon-book) center / 1.7rem no-repeat;
}

.iac-feature-card:nth-child(2)::after {
  -webkit-mask-image: var(--iac-icon-compass);
  mask-image: var(--iac-icon-compass);
}

.iac-feature-card:nth-child(3)::after {
  -webkit-mask-image: var(--iac-icon-people);
  mask-image: var(--iac-icon-people);
}

.iac-site .iac-story .iac-feature-card .iac-eyebrow {
  margin-top: .5rem;
  padding: 0;
  border: 0;
  color: var(--iac-feature-muted);
}

.iac-site .iac-story .iac-feature-card h3 {
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  line-height: 1.12;
  letter-spacing: -.03em;
}

.iac-story .iac-feature-card > p:not([class]) {
  color: var(--iac-feature-muted);
}

.iac-feature-card > .iac-text-link {
  margin-top: auto;
  padding-top: .5rem;
}

.iac-story .iac-feature-card .iac-text-link a {
  display: inline-block;
  color: var(--iac-feature-ink);
  line-height: 2.5rem;
  text-decoration-color: currentColor;
}

/* The arrow (part of the link's text) sits in a round button. */
.iac-story .iac-feature-card .iac-text-link a::after {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-inline-start: .85rem;
  border-radius: 50%;
  color: var(--iac-feature-arrow-ink);
  line-height: 1;
  vertical-align: middle;
  background: var(--iac-feature-arrow-bg);
  font-size: 1.125rem;
  text-decoration: none;
}

/* The card's link covers the card, so the whole card can be clicked. */
.iac-feature-card .iac-text-link a::before {
  content: '';
  position: absolute;
  inset: -100vmax;
}

.iac-feature-card:has(a:focus-visible) {
  outline: 3px solid var(--iac-accent);
  outline-offset: 4px;
}

.iac-feature-card a:focus-visible {
  outline: none;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .iac-site .iac-story .iac-feature-card {
    transition: translate 220ms ease, box-shadow 220ms ease;
  }

  .iac-site .iac-story .iac-feature-card:hover {
    translate: 0 -.35rem;
    box-shadow: 0 1.5rem 3rem #11111129;
  }

  .iac-story .iac-feature-card:hover .iac-text-link a::after {
    translate: .25rem 0;
  }
}

/* ------------------------------------------------------------------------
   List rows: upcoming items, routes, milestones. Date tiles sit inside them.
   ------------------------------------------------------------------------ */
/* A calendar date tile: decorative, so always write the full date beside it. */
.iac-date-tile {
  display: inline-grid;
  justify-items: center;
  min-width: 5.25rem;
  padding-bottom: .55rem;
  overflow: hidden;
  border-radius: .375rem;
  color: var(--iac-ink);
  background: var(--iac-paper);
  box-shadow: 0 .75rem 1.75rem #00000040;
  line-height: 1.1;
  text-align: center;
}

.iac-date-tile-month {
  justify-self: stretch;
  padding: .35rem .75rem;
  color: var(--iac-paper);
  background: var(--iac-accent);
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.iac-date-tile-day {
  padding-top: .3rem;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -.04em;
}

.iac-date-tile-weekday {
  color: var(--iac-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.iac-story .iac-list-rows {
  display: grid;
  gap: 1rem;
  margin: 2.5rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.iac-list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem clamp(1.25rem, 3vw, 2.5rem);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid var(--iac-line);
  border-radius: var(--iac-card-radius);
  background: var(--iac-paper);
}

@media (hover: hover) and (pointer: fine) {
  .iac-list-row:hover {
    box-shadow: var(--iac-lift);
  }
}

.iac-list-rows .iac-date-tile {
  border: 1px solid var(--iac-line);
  box-shadow: none;
}

.iac-date-tile.is-range {
  min-width: 6.25rem;
}

.iac-date-tile.is-range .iac-date-tile-day {
  font-size: 1.875rem;
}

.iac-story .iac-list-row-tag {
  margin-bottom: .25rem;
  color: var(--iac-accent-hover);
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.iac-list-row-copy h3 a {
  color: var(--iac-ink);
  text-decoration: none;
}

.iac-list-row-copy h3 a:hover {
  color: var(--iac-accent-hover);
  text-decoration: underline;
  text-underline-offset: .15em;
}

.iac-list-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem 1.5rem;
  margin-top: .5rem !important;
  color: var(--iac-muted);
}

.iac-list-row-person {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--iac-ink);
  font-weight: 700;
}

.iac-list-row-person img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}

.iac-list-row-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem 1.25rem;
}

.iac-site .iac-story .iac-list-rows .iac-workshop-price {
  color: var(--iac-accent-hover);
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.2;
}

.iac-list-rows .iac-workshop-price > span:not(.woocommerce-Price-amount) {
  font: 600 .9375rem/1.5 var(--iac-site-font);
}

.iac-list-rows .iac-workshop-card-buy {
  margin: 0;
}

/* A highlighted row in night black, for the one item that matters most. */
.iac-list-row.is-night {
  border-color: var(--iac-ink);
  color: var(--iac-paper);
  background:
    radial-gradient(28rem 14rem at 100% 0, #c4123059, transparent 70%),
    var(--iac-ink);
}

.iac-story .iac-list-row.is-night .iac-list-row-tag {
  color: var(--iac-paper);
}

.iac-list-row.is-night .iac-list-row-copy h3 a,
.iac-list-row.is-night .iac-list-row-copy h3 a:hover {
  color: var(--iac-paper);
}

.iac-list-row.is-night .iac-list-row-meta {
  color: #ffffffd9;
}

.iac-site .iac-story .iac-list-row.is-night .iac-workshop-price {
  color: var(--iac-paper);
}

.iac-list-row.is-night .iac-date-tile {
  border-color: var(--iac-paper);
}

:where(.iac-list-row).is-night .iac-marketplace-button {
  border-color: var(--iac-paper);
  color: var(--iac-ink);
  background: var(--iac-paper);
  font-weight: 700;
}

:where(.iac-list-row).is-night .iac-marketplace-button:hover {
  border-color: var(--iac-accent);
  color: var(--iac-paper);
  background: var(--iac-accent);
}

.iac-list-row.is-night a:focus-visible {
  outline-color: var(--iac-paper);
}

.iac-story .iac-list-rows-empty {
  margin-top: 2rem;
  padding: 1.5rem;
  border-inline-start: 4px solid var(--iac-accent);
  background: var(--iac-paper-soft);
  font-size: 1.125rem;
}

.iac-list-rows-empty a {
  color: var(--iac-accent-hover);
  font-weight: 700;
}

/* ------------------------------------------------------------------------
   Photographs: frames, fills and captions.
   ------------------------------------------------------------------------ */
.iac-photo img {
  display: block;
  width: 100%;
  height: auto;
}

/* Captions sit on the photograph as a small label (see "Photo captions"), so
   frames and overlapping cards can follow the photograph's own edges. */
.iac-story .iac-photo {
  position: relative;
  isolation: isolate;
}

/* A red block offset behind the photograph. */
.iac-photo.is-offset-block::before {
  content: '';
  position: absolute;
  inset: -1.25rem -1.25rem 1.25rem 1.25rem;
  z-index: -1;
  background: var(--iac-accent);
}

.iac-photo.is-outline-frame::before {
  content: '';
  position: absolute;
  inset: 1.25rem 1.25rem -1.25rem -1.25rem;
  z-index: -1;
  border: 3px solid var(--iac-accent);
}

/* A full-bleed photograph behind a chapter's copy, under a dark gradient. */
.iac-story .iac-photo-fill {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
}

.iac-story .iac-photo-fill img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% 40%;
}

.iac-photo-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #111111f5 0%, #111111db 34%, #1111117a 66%, #11111126 100%),
    linear-gradient(0deg, #111111e6 0%, #11111100 42%);
}

/* Photo captions: a small label with a camera in the photo's corner. On
   screens with a mouse it appears while the photo is hovered; touch screens,
   which cannot hover, always show it. Gallery photos without a caption get
   one from their description (rotations.js, hidden from screen readers,
   which already read the photo's alt text). */
.iac-story :is(.iac-photo figcaption, .iac-photo-fill figcaption, .iac-photo-caption) {
  position: absolute;
  z-index: 4;
  top: .75rem;
  inset-inline-end: .75rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: min(24rem, calc(100% - 1.5rem));
  margin: 0;
  padding: .3rem .8rem .3rem .55rem;
  border-radius: 999px;
  color: var(--iac-paper);
  background: #111111e0;
  font-size: .875rem;
  line-height: 1.4;
  text-align: start;
}

.iac-story .iac-photo-fill figcaption {
  top: 1.25rem;
  inset-inline-end: var(--iac-site-gutter);
}

.iac-story :is(.iac-photo figcaption, .iac-photo-fill figcaption, .iac-photo-caption)::before {
  content: '';
  flex: none;
  width: 1rem;
  height: 1rem;
  background: currentColor;
  -webkit-mask: var(--iac-icon-camera) center / contain no-repeat;
  mask: var(--iac-icon-camera) center / contain no-repeat;
}

@media (hover: hover) {
  .iac-story :is(.iac-photo figcaption, .iac-photo-fill figcaption, .iac-photo-caption) {
    opacity: 0;
  }

  .iac-story :is(.iac-photo:hover figcaption, .iac-photo-carousel:hover .is-active .iac-photo-caption) {
    opacity: 1;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .iac-story :is(.iac-photo figcaption, .iac-photo-fill figcaption, .iac-photo-caption) {
    translate: 0 -.25rem;
    transition: opacity 220ms ease, translate 220ms ease;
  }

  .iac-story :is(.iac-photo:hover figcaption, .iac-photo-carousel:hover .is-active .iac-photo-caption) {
    translate: none;
  }
}

/* ------------------------------------------------------------------------
   Small pieces: note card, pills, ticket stub, letter.
   ------------------------------------------------------------------------ */
.iac-note-card {
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: min(20rem, 72%);
  padding: 1.25rem 1.5rem;
  border-top: 4px solid var(--iac-accent);
  background: var(--iac-paper);
  box-shadow: var(--iac-lift);
  rotate: -2deg;
}

.iac-note-card > * + * {
  margin-top: .5rem;
}

.iac-story .iac-note-card-title {
  color: var(--iac-ink);
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.iac-story .iac-note-card > p:not([class]) {
  color: var(--iac-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.iac-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.iac-story .iac-pills > p {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 1.1rem .5rem .6rem;
  border: 1px solid var(--iac-line);
  border-radius: 999px;
  background: var(--iac-paper);
  font-size: .9375rem;
  font-weight: 700;
}

.iac-pills > p::before {
  content: '';
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--iac-tick-on-red) center / contain no-repeat;
}

/* The date as a ticket: notched sides, a perforation and a stub. */
.iac-story .iac-ticket-stub {
  position: relative;
  max-width: 27rem;
  padding: 1.25rem 5rem 1.25rem 1.75rem;
  border-radius: var(--iac-card-radius);
  color: var(--iac-muted);
  background: var(--iac-paper);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-mask:
    radial-gradient(circle at 0 50%, #0000 .7rem, #000 .75rem) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 50%, #0000 .7rem, #000 .75rem) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle at 0 50%, #0000 .7rem, #000 .75rem) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 50%, #0000 .7rem, #000 .75rem) right / 51% 100% no-repeat;
}

.iac-ticket-stub strong {
  display: inline-block;
  margin-bottom: .15rem;
  color: var(--iac-accent);
  font-size: clamp(1.625rem, 2.6vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -.03em;
}

.iac-ticket-stub::before {
  content: '';
  position: absolute;
  inset-block: .9rem;
  inset-inline-end: 3.75rem;
  border-inline-start: 2px dashed var(--iac-line);
}

.iac-ticket-stub::after {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-end: 1.15rem;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--iac-accent);
  translate: 0 -50%;
  rotate: -12deg;
  -webkit-mask: var(--iac-icon-ticket) center / contain no-repeat;
  mask: var(--iac-icon-ticket) center / contain no-repeat;
}

.iac-letter {
  position: relative;
  width: min(100%, 27rem);
  padding: 2.5rem clamp(1.5rem, 3vw, 2.25rem) 2rem;
  color: var(--iac-ink);
  background: var(--iac-paper);
  box-shadow: 0 2rem 3.5rem #00000052;
  font-size: 1.0625rem;
  line-height: 1.7;
  rotate: 2.5deg;
}

.iac-letter::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: .55rem;
  background: var(--iac-airmail);
}

/* A stamp: a red square with a white book, perforated by a dotted outline. */
.iac-letter::after {
  content: '';
  position: absolute;
  top: 1.5rem;
  inset-inline-end: 1.5rem;
  width: 3rem;
  height: 3.5rem;
  outline: 3px dotted var(--iac-paper);
  outline-offset: -6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 56'%3E%3Crect width='48' height='56' fill='%23c41230'/%3E%3Cpath d='M12 18h6a4 4 0 0 1 4 4v13a3 3 0 0 0-3-3h-7zM36 18h-6a4 4 0 0 0-4 4v13a3 3 0 0 1 3-3h7z' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / cover no-repeat;
  rotate: 6deg;
}

.iac-letter > * + * {
  margin-top: 1rem;
}

.iac-story .iac-letter-greeting {
  padding-inline-end: 4rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.iac-story .iac-letter-signoff {
  color: var(--iac-muted);
}

.iac-letter-signoff strong {
  color: var(--iac-ink);
  font-size: 1.125rem;
}

/* ------------------------------------------------------------------------
   Night notebook and workshop chips: Home's workshop slide and the workshop
   pages (single-iac-workshop.php). Home's slide keeps its own class, since its
   markup is page content.
   ------------------------------------------------------------------------ */
/* A night-time notebook page: ruled lines, a red glow and a red margin. */
.iac-site :is(.iac-notebook-night, .iac-home-slide-workshop) {
  background:
    radial-gradient(48rem 34rem at 82% 40%, #c4123047, transparent 62%),
    repeating-linear-gradient(180deg, transparent 0 2.5rem, #ffffff0f 2.5rem calc(2.5rem + 1px)),
    var(--iac-ink);
}

.iac-site :is(.iac-notebook-night, .iac-home-slide-workshop)::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: max(1rem, calc((100% - 1200px) / 2 - 2.5rem));
  width: 2px;
  background: #c41230a6;
}

/* Presenter, date and time, and format as chips; their labels are for screen readers. */
.iac-site .iac-workshop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
  margin-inline: 0;
  padding: 0;
  list-style: none;
}

.iac-site .iac-workshop-chips li {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  padding: .4rem .95rem .4rem .75rem;
  border: 1px solid #ffffff33;
  border-radius: 999px;
  color: var(--iac-paper);
  background: #ffffff12;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.iac-workshop-chips li::before {
  content: '';
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  background: var(--iac-accent);
  -webkit-mask: var(--iac-icon-person) center / contain no-repeat;
  mask: var(--iac-icon-person) center / contain no-repeat;
}

.iac-workshop-chips .is-when::before {
  -webkit-mask-image: var(--iac-icon-calendar);
  mask-image: var(--iac-icon-calendar);
}

.iac-workshop-chips .is-platform::before {
  -webkit-mask-image: var(--iac-icon-video);
  mask-image: var(--iac-icon-video);
}

/* ------------------------------------------------------------------------
   Opening heading: one size, one red phrase with a brush underline.
   ------------------------------------------------------------------------ */
.iac-site .iac-story .iac-chapter h1 {
  font-size: clamp(2.75rem, 5.4vw, 4.875rem);
  line-height: 1;
  letter-spacing: -.05em;
}

/* One phrase of the opening heading (<em>) in red, with a brush stroke under it. */
.iac-story h1 em {
  padding-bottom: .12em;
  color: var(--iac-accent);
  font-style: normal;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24' preserveAspectRatio='none'%3E%3Cpath d='M4 17C92 7 226 4 396 11' fill='none' stroke='%23111111' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 100% .22em no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ------------------------------------------------------------------------
   Bridging card: hangs past its chapter's lower edge into the next one, once per page.
   ------------------------------------------------------------------------ */
/* The card drops past its chapter's edge into the next chapter, which leaves
   room for it (has-bridge-above). Contact's form is one; an inline
   newsletter signup is one by default (Home keeps its own inside). */
.iac-story :is(.iac-bridge-card, .iac-newsletter-inline) {
  position: relative;
  z-index: 2;
  align-self: end;
  translate: 0 calc(var(--iac-chapter-space) + var(--iac-bridge));
  padding: calc(clamp(1.5rem, 3vw, 2.5rem) + .55rem) clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2.5rem);
  color: var(--iac-ink);
  background: var(--iac-paper-raised);
  box-shadow: 0 2rem 4rem #11111138, 0 .5rem 1rem #1111111f;
}

.iac-story :is(.iac-bridge-card, .iac-newsletter-inline)::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: .55rem;
  background: var(--iac-airmail);
}

/* Room for the bridging card that overlaps this chapter's top edge. */
.iac-chapter.has-bridge-above {
  padding-top: calc(var(--iac-chapter-space) + var(--iac-bridge));
}

/* ------------------------------------------------------------------------
   Photo carousel with dots (rotations.js); the bleed version runs to the screen's edge.
   ------------------------------------------------------------------------ */
/* rotations.js shows one photo at a time with dots. Colours suit a night chapter. Without
   JavaScript the gallery keeps its horizontal scroll (style.css .iac-carousel). */
.iac-photo-carousel {
  --iac-rotation-tab-ink: #ffffffd9;
  --iac-rotation-tab-active: var(--iac-paper);
  --iac-rotation-track: #ffffff73;
  --iac-rotation-track-hover: #ffffffb3;
  position: relative;
  min-width: 0;
}

.iac-site .iac-story .iac-photo-carousel .iac-eyebrow {
  padding: 0;
  border: 0;
  color: #ffffffd9;
}

.iac-photo-carousel-heading > * + * {
  margin-top: .4rem;
}

.iac-story .iac-photo-carousel-heading > p:not([class]) {
  color: #ffffffd9;
}

.iac-photo-carousel .iac-carousel {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.iac-story .iac-gallery--carousel .iac-carousel {
  display: grid;
  gap: 0;
  overflow: visible;
  padding: 0;
  scroll-snap-type: none;
}

.iac-gallery--carousel .iac-gallery-slide {
  grid-area: 1 / 1;
  min-width: 0;
  visibility: hidden;
  pointer-events: none;
}

.iac-gallery--carousel .iac-gallery-slide.is-active {
  visibility: visible;
  pointer-events: auto;
}

/* Core gallery rules size each image as a third of the row. */
.iac-story .iac-gallery--carousel .iac-carousel .wp-block-image {
  position: relative;
  width: 100% !important;
  margin: 0 !important;
}

.iac-story .iac-gallery--carousel .iac-carousel .wp-block-image img {
  width: 100%;
  height: auto !important;
  border-radius: var(--iac-card-radius) !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.iac-photo-carousel .iac-rotation-controls--dots {
  justify-content: center;
  margin-top: .75rem;
}

@keyframes iac-gallery-arrive {
  from { opacity: .2; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .iac-gallery-slide.is-active {
    animation: iac-gallery-arrive 800ms ease-in-out;
  }
}

/* Wide screens: the photo runs to the screen's edge, its title on the photo. */
@media (min-width: 901px) {
  .iac-photo-carousel.is-bleed.iac-gallery--carousel {
    margin-inline-end: calc(-1 * var(--iac-bleed));
  }

  .iac-story .iac-photo-carousel.is-bleed.iac-gallery--carousel .iac-carousel .wp-block-image img {
    border-radius: var(--iac-card-radius) 0 0 var(--iac-card-radius) !important;
  }

  .iac-photo-carousel.is-bleed.iac-gallery--carousel .iac-carousel {
    margin-top: 0;
  }

  .iac-photo-carousel.is-bleed.iac-gallery--carousel .iac-photo-carousel-heading {
    position: absolute;
    z-index: 2;
    inset-inline-start: clamp(1.25rem, 3vw, 2.5rem);
    bottom: calc(clamp(1.25rem, 3vw, 2.25rem) + 24px + 1rem);
    max-width: min(30rem, 70%);
    pointer-events: none;
  }

  .iac-photo-carousel.is-bleed.iac-gallery--carousel::after {
    content: '';
    position: absolute;
    z-index: 1;
    inset: 45% 0 calc(24px + 1rem);
    border-radius: 0 0 0 var(--iac-card-radius);
    background: linear-gradient(0deg, #111111f0 0%, #11111199 45%, #11111100 100%);
    pointer-events: none;
  }

  .iac-photo-carousel.is-bleed .iac-rotation-controls--dots {
    justify-content: flex-start;
    margin-top: 1rem;
  }

  /* The photo runs past the content's edge; its caption stays inside it. */
  .iac-story .iac-photo-carousel.is-bleed .iac-photo-caption {
    inset-inline-end: calc(var(--iac-bleed) + .75rem);
  }
}

/* ------------------------------------------------------------------------
   Quote cards: the shared quote pattern (1542) as cards. As many fit as the
   width allows; rotations.js fades one card at a time to another quote. A
   mouse over the cards holds them; focus or a tap stops them.
   ------------------------------------------------------------------------ */
.iac-story .iac-testimonials-slot {
  position: relative;
  margin: 0;
  padding: var(--iac-chapter-space) var(--iac-site-gutter);
  background: var(--iac-paper-soft);
}

.iac-story .iac-testimonials {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: end;
  column-gap: clamp(2rem, 5vw, 5rem);
  max-width: 1200px;
}

.iac-story .iac-testimonials > :is(.iac-testimonials-eyebrow, h2) {
  grid-column: 1;
}

.iac-story .iac-testimonials > .iac-testimonials-intro {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  color: var(--iac-muted);
}

.iac-site .iac-story .iac-testimonials .iac-testimonials-eyebrow {
  justify-self: start;
  padding-inline-start: .75rem;
  border-inline-start: 3px solid var(--iac-accent);
  color: var(--iac-accent-hover);
  font: 800 .875rem/1.65 var(--iac-site-font);
  letter-spacing: .09em;
}

.iac-site .iac-story .iac-testimonials h2 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.06;
  letter-spacing: -.035em;
}

.iac-story .iac-testimonials .iac-testimonials-grid {
  grid-column: 1 / -1;
  grid-template-columns: repeat(var(--iac-card-slots, 3), minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: clamp(2rem, 4vw, 2.75rem) !important;
}

.iac-story .iac-testimonials-grid > .iac-testimonial {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0 !important;
  padding: 4rem clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.25rem, 2.5vw, 1.75rem);
  border: 1px solid var(--iac-line);
  border-radius: var(--iac-card-radius);
  background: var(--iac-paper);
  box-shadow: 0 .75rem 2rem #1111110f;
}

.iac-story .iac-testimonial::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  inset-inline-start: clamp(1.25rem, 2.5vw, 1.75rem);
  width: 2.25rem;
  height: 1.75rem;
  background: var(--iac-accent);
  -webkit-mask: var(--iac-icon-quote) center / contain no-repeat;
  mask: var(--iac-icon-quote) center / contain no-repeat;
}

/* Cards share the tallest quote's height; a shorter quote sits in the middle. */
.iac-site .iac-story .iac-testimonials-grid .iac-testimonial > p {
  margin: auto 0;
  padding-bottom: 1.5rem;
  color: var(--iac-ink);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.55;
}

.iac-site .iac-story .iac-testimonial cite {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: auto;
  color: var(--iac-muted);
  font: 700 .875rem/1.5 var(--iac-site-font);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.iac-story .iac-testimonial cite::before {
  content: '';
  width: 1.5rem;
  height: 2px;
  background: var(--iac-accent);
}

/* Before the script arranges them, show only the first row's worth. */
.iac-js .iac-story .iac-testimonials:not(.iac-testimonials--cards) .iac-testimonials-grid > .iac-testimonial:nth-child(n+4) {
  display: none;
}

/* Cards: every quote in a slot shares one grid cell, so the row keeps the
   tallest card's height while quotes fade in and out. */
.iac-story .iac-testimonials--cards .iac-testimonials-grid > .iac-testimonial {
  grid-row: 1;
  opacity: 0;
  pointer-events: none;
}

.iac-story .iac-testimonials--cards .iac-testimonials-grid > .iac-testimonial.is-shown {
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .iac-story .iac-testimonials--cards .iac-testimonials-grid > .iac-testimonial {
    transition: opacity 1s ease;
  }
}

.iac-story .iac-testimonials-grid:focus-visible {
  outline: 3px solid var(--iac-accent);
  outline-offset: 6px;
  border-radius: var(--iac-card-radius);
}

@media print {
  .iac-story .iac-testimonials--cards .iac-testimonials-grid > .iac-testimonial {
    grid-row: auto;
    opacity: 1;
  }
}

/* ------------------------------------------------------------------------
   Focus: red on light chapters, white on night and red ones.
   ------------------------------------------------------------------------ */
.iac-story :is(a, summary):focus-visible {
  outline: 3px solid var(--iac-accent);
  outline-offset: 4px;
}

.iac-story :is(.is-night, .is-red) a:focus-visible {
  outline-color: var(--iac-paper);
}

/* White cards sitting on a dark chapter keep the light-chapter colour. */
.iac-story :is(.is-night, .is-red) :is(.iac-bridge-card, .iac-newsletter-inline) a:focus-visible {
  outline-color: var(--iac-accent);
}

/* ------------------------------------------------------------------------
   The shared newsletter box after a story page: it curves up into the last
   chapter, and the footer's black curves up into it. Home has no box.
   ------------------------------------------------------------------------ */
.iac-site:has(.iac-story) .iac-before-footer {
  position: relative;
  overflow-x: clip;
  padding-bottom: var(--iac-arc);
  border-top: 0;
}

.iac-site:has(.iac-story) .iac-before-footer::before,
.iac-site:has(.iac-story) .iac-before-footer::after {
  content: '';
  position: absolute;
  inset-inline: -6%;
  height: var(--iac-arc);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  pointer-events: none;
}

.iac-site:has(.iac-story) .iac-before-footer::before {
  bottom: calc(100% - 1px);
  background: var(--iac-paper);
}

.iac-site:has(.iac-story) .iac-before-footer::after {
  bottom: -1px;
  background: var(--iac-ink);
}

/* ------------------------------------------------------------------------
   Narrower screens.
   ------------------------------------------------------------------------ */
@media (max-width: 900px) {
  /* The notebook's margin rule would cross the copy once the gutter is narrow. */
  .iac-site .iac-notebook-night::before {
    display: none;
  }

  .iac-story .iac-chapter-heading.is-split,
  .iac-story .iac-testimonials {
    grid-template-columns: minmax(0, 1fr);
  }

  .iac-story .iac-chapter-heading.is-split > .iac-lead,
  .iac-story .iac-testimonials > .iac-testimonials-intro {
    grid-column: 1;
    grid-row: auto;
    margin-top: 1.25rem;
  }

  .iac-letter {
    width: min(100%, 24rem);
    padding: 2rem 1.25rem 1.5rem;
    font-size: 1rem;
    rotate: 1.5deg;
  }

  .iac-photo-fill::after {
    background: linear-gradient(0deg, #111111f2 0%, #111111d9 55%, #11111180 100%);
  }

  .iac-story :is(.iac-bridge-card, .iac-newsletter-inline) {
    translate: none;
  }

  .iac-chapter.has-bridge-above {
    padding-top: var(--iac-chapter-space);
  }

  .iac-list-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .iac-list-row-action {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .iac-site {
    --iac-chapter-space: 3.5rem;
  }

  .iac-site .iac-story .iac-chapter h1 {
    font-size: clamp(2.5rem, 12vw, 3.25rem);
  }

  .iac-list-row {
    align-items: start;
  }

  .iac-photo.is-offset-block::before {
    inset: -.75rem -.75rem .75rem .75rem;
  }

  .iac-note-card {
    position: relative;
    width: auto;
    margin: -1.5rem 1rem 0 0;
    rotate: -1deg;
  }

  .iac-site .iac-story .iac-feature-card {
    min-height: 0;
  }

  .iac-photo.is-outline-frame::before {
    inset: .75rem .75rem -.75rem -.75rem;
  }
}

@media print {
  .iac-gallery--carousel .iac-gallery-slide {
    grid-area: auto;
    visibility: visible !important;
  }
}
