/* Comedy landing page (/comedy/). Loads after small.css and medium.css and only styles body.comedy. */

.comedy {
  --c-stage: #17191b;
  --c-stage-2: #22262a;
  --c-on-dark: #f6f3ee;
  --c-on-dark-muted: #bfc3c7;    /* 9.6:1 on --c-stage */
  --c-paper: #faf6f0;
  --color-link: #007a78;          /* 4.8:1 on --c-paper (small.css's #008482 is 4.2:1 there) */
  --c-coral: #fc5f6b;            /* text on dark: 6.2:1 on --c-stage */
  --c-coral-ink: #c42f3b;        /* coral text on light: 5.2:1 on white */
  --c-teal: #00bcb8;
  --c-pink: #ffb3b9;
  --c-blue: #c1d4ee;
  --c-wrap: 1180px;
  --c-gutter: 24px;

  background: var(--color-surface);

  @media (width >= 40em) {
    --c-gutter: 32px;
  }
}

/* main is a plain block here: sections go full-bleed and .c-wrap handles the gutter */
.comedy main {
  padding: 0;
  background: none;
}

.comedy .c-wrap {
  max-width: calc(var(--c-wrap) + 2 * var(--c-gutter));
  margin-inline: auto;
  padding-inline: var(--c-gutter);
}

/** type **/
.comedy :is(h1, h2, h3) {
  text-align: left;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

.comedy h1 {
  font-size: clamp(2.75rem, 1.6rem + 4.6vw, 5rem);
  font-weight: 800;
  line-height: 1.02;
}

.comedy h2 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
}

.comedy h3 {
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Rich text bold (the reset in small.css sets b and strong to the normal weight) */
.comedy :is(b, strong) {
  font-weight: 700;
}

/* zero class specificity, so a component can opt out (e.g. the package badge) */
:where(.comedy) p {
  text-wrap: pretty;
}

.c-lead {
  font-size: calc(1.05rem + 0.3vw);
  line-height: 1.6;
  max-width: 38em;
  margin-bottom: 2em;
}

.c-lead--narrow {
  max-width: 34em;
}

/* Fills the content area, like the screenshots and grids below it */
.c-lead--wide {
  max-width: none;
}

/** surfaces **/
.c-section {
  padding-block: clamp(4rem, 3rem + 5vw, 7rem);
}

.c-paper {
  background: var(--c-paper);
}

/* cream cards would vanish on a cream section: make them white, outlined like .c-card */
.c-paper :is(.c-work__item, .c-step) {
  background: #fff;
  box-shadow: 0 0 0 1px rgb(53 57 60 / 0.1), 0 20px 40px -28px rgb(0 0 0 / 0.35);
}

.c-dark {
  background: var(--c-stage);
  color: var(--c-on-dark);

  & :is(h1, h2, h3) {
    color: var(--c-on-dark);
  }

  & a:not(.btn) {
    color: var(--c-teal);
  }

  & :is(a, button, input, select, textarea, summary):focus-visible {
    outline-color: var(--c-on-dark);
  }
}

/* light tints, mostly for the light design (light.css): cards on them turn white */
.c-tint--blue {
  background: #f4f8fd;
}

.c-tint--pink {
  background: #fff7f7;
}

.c-tint :is(.c-work__item, .c-step) {
  background: #fff;
  box-shadow: 0 0 0 1px rgb(53 57 60 / 0.08), 0 20px 40px -28px rgb(0 0 0 / 0.35);
}

/** skip link **/
.c-skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.5em 1em;
  background: var(--c-on-dark);
  color: var(--c-stage);
  font-weight: 700;
  border-radius: 4px;

  &:focus-visible {
    top: 1rem;
  }
}

/** header **/
.comedy .c-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.c-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.comedy .c-logo {
  margin-right: auto;
  display: flex;
}

.c-header .logo__text {
  fill: #fff;
  opacity: 0.9;
}

.c-nav {
  display: none;
  gap: 1.75rem;

  @media (width >= 56em) {
    display: flex;
  }
}

.c-dark a.c-nav__link {
  color: var(--c-on-dark-muted);
  font-size: 1rem;
  font-weight: 700;
  transition: color var(--ease);

  &:hover {
    color: var(--c-on-dark);
  }
}

.c-dark a.c-header__cta {
  color: var(--c-on-dark);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.55em 1.1em 0.4em;
  border: 2px solid var(--c-coral);
  border-radius: 3em;
  transition: background-color var(--ease);

  &:hover {
    background: rgb(252 95 107 / 0.18);
  }
}

/** buttons **/
.comedy .btn {
  margin: 0;
  display: inline-block;
  padding: 0.85em 1.75em 0.65em;
  border-radius: 3em;
  max-width: none;
}

.comedy .btn-ghost {
  color: var(--c-on-dark);
  background: transparent;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.55);

  &:is(:hover, :focus-visible) {
    background: rgb(255 255 255 / 0.1);
    box-shadow: inset 0 0 0 2px #fff;
  }
}

.comedy .btn-outline {
  color: var(--c-coral-ink);
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--c-coral-ink);

  &:is(:hover, :focus-visible) {
    color: #fff;
    background: var(--c-coral-ink);
    box-shadow: inset 0 0 0 2px var(--c-coral-ink);
  }
}

.c-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;

  & .btn {
    flex: 1 1 auto;

    @media (width >= 40em) {
      flex: 0 0 auto;
    }
  }
}

/** hero **/
.c-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 2rem + 5vw, 6rem);
  background:
    radial-gradient(ellipse 60% 70% at 85% 10%, rgb(0 188 184 / 0.14), transparent 70%),
    radial-gradient(ellipse 70% 60% at 10% 110%, rgb(252 95 107 / 0.14), transparent 70%),
    var(--c-stage);
}

.c-hero__inner {
  display: grid;
  gap: 3rem;
  align-items: center;

  @media (width >= 56em) {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 4rem;
  }
}

.c-hero__lead {
  color: var(--c-on-dark-muted);
  font-size: calc(1.05rem + 0.35vw);
  line-height: 1.6;
  max-width: 32em;
  margin-bottom: 2rem;
}

.c-dark .c-hero__proof {
  margin-top: 2rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--c-on-dark-muted);
}

/* screenshot of a client site in a browser frame, with a WordPress "Edit show" card */
.c-shot {
  margin: 0;
}

.c-shot__stage {
  position: relative;

  @media (width >= 40em) {
    padding-bottom: 7rem;
  }
}

.c-browser {
  border-radius: 10px;
  overflow: hidden;
  background: #2a2e31;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 40px 80px -30px rgb(0 0 0 / 0.8);

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

.c-browser__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.8rem;
}

.c-browser__dots {
  display: flex;
  gap: 0.35rem;

  & i {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: #5b6166;
  }
}

.c-browser__url {
  flex: 0 1 18rem;
  margin-inline: auto;
  padding: 0.2rem 0.75rem 0.1rem;
  border-radius: 6px;
  background: #1d2023;
  color: var(--c-on-dark-muted);
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
}

/* an optional phone screenshot in front of the bottom left corner of the browser frame, where a page's text column
   usually is, so its pictures stay visible. It hangs below the frame by the stage's bottom padding, so on phones
   the hero only grows by that much. */
.c-shot__stage--phone {
  padding-bottom: 2.5rem;

  @media (width >= 40em) {
    padding-bottom: 3.5rem;
  }
}

.c-phone {
  position: absolute;
  left: -0.5rem;
  bottom: 0;
  width: 6.5rem;
  padding: 0.3rem;
  border-radius: 1.2rem;
  background: #1d2023;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 30px 60px -20px rgb(0 0 0 / 0.6);

  & img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.9rem;
  }

  @media (width >= 40em) {
    left: -1.5rem;
    width: 10rem;
    padding: 0.35rem;
    border-radius: 1.35rem;

    & img {
      border-radius: 1rem;
    }
  }

  @media (width >= 56em) {
    left: -2rem;
  }
}

/* plain system type, like the WordPress dashboard */
.c-admin {
  position: relative;
  width: min(100% - 1.5rem, 15.5rem);
  margin: -2.5rem 0 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  color: #1d2327;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 30px 60px -20px rgb(0 0 0 / 0.75);

  @media (width >= 40em) {
    position: absolute;
    bottom: 0;
    left: -1.5rem;
    margin: 0;
  }

  @media (width >= 56em) {
    left: -3rem;
  }
}

.c-admin__bar {
  padding: 0.55rem 0.85rem;
  background: #1d2327;
  color: #fff;
  font-weight: 600;
}

.c-admin__body {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
}

.c-admin__label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 11px;
  font-weight: 600;
  color: #50575e;
}

.c-admin__input {
  display: block;
  padding: 0.3rem 0.5rem;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c-admin__input--muted {
  color: #50575e;
}

.c-admin__cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0.5rem;
}

.c-admin__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;

  & span {
    padding: 0.1rem 0.45rem;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    background: #f0f0f1;
    font-size: 11px;
  }

  & .c-admin__add {
    border-style: dashed;
    background: none;
    color: #2271b1;
  }
}

.c-admin__input--select {
  position: relative;
  padding-right: 1.4rem;

  &::after {
    content: "▾";
    position: absolute;
    right: 0.5rem;
    color: #50575e;
  }
}

.c-admin__input--area {
  min-height: 3.4em;
  white-space: normal;
}

.c-admin__stars {
  display: block;
  padding-top: 0.1rem;
  font-size: 16px;
  letter-spacing: 0.05em;
  color: #dba617;

  & span {
    color: #c3c4c7;
  }
}

.c-admin__button {
  justify-self: end;
  padding: 0.3rem 0.9rem;
  border-radius: 3px;
  background: #2271b1;
  color: #fff;
  font-weight: 600;
}

.c-dark .c-shot__caption {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--c-on-dark-muted);

  @media (width >= 40em) {
    text-align: right;
  }
}

/** audience cards **/
.c-cards {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;

  @media (width >= 48em) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.c-card {
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(53 57 60 / 0.1), 0 20px 40px -28px rgb(0 0 0 / 0.35);
  border-top: 6px solid var(--card-accent, var(--c-teal));
}

.c-card--pink { --card-accent: var(--c-pink); }
.c-card--teal { --card-accent: var(--c-teal); }
.c-card--blue { --card-accent: var(--c-blue); }

/** why **/
.c-why {
  display: grid;
  gap: 2rem;
  margin-top: 2.5rem;

  @media (width >= 48em) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

.c-why__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;  /* small.css and medium.css cap images in main */
  margin-bottom: 1.5rem;
  border-radius: 14px;
}

.c-why__item .arrow-right,
.c-card__link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}

/** fringe **/
.c-fringe {
  background:
    radial-gradient(ellipse 60% 60% at 90% 30%, rgb(0 188 184 / 0.16), transparent 70%),
    var(--c-stage);
}

.c-fringe__inner {
  display: grid;
  gap: 3rem;
  align-items: start;

  @media (width >= 56em) {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 4rem;
  }
}

.c-fringe .c-lead {
  color: var(--c-on-dark-muted);
}

.c-timeline {
  display: grid;
  gap: 0;
  border-left: 2px solid rgb(255 255 255 / 0.18);
  margin-left: 0.4rem;

  & li {
    position: relative;
    display: grid;
    gap: 0.15rem;
    padding: 0 0 1.5rem 1.5rem;

    &::before {
      content: '';
      position: absolute;
      left: -0.45rem;
      top: 0.35rem;
      width: 0.8rem;
      height: 0.8rem;
      border-radius: 50%;
      background: var(--c-coral);
      box-shadow: 0 0 0 4px var(--c-stage);
    }

    &:last-child {
      padding-bottom: 0;
    }
  }
}

.c-timeline__when {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-teal);
  line-height: 1.6;
}

.c-timeline__what {
  color: var(--c-on-dark-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

/* a paper flyer taped to the wall */
.c-flyer {
  position: relative;
  background: var(--c-paper);
  color: var(--color-text);
  padding: 2.5rem 1.5rem 1.75rem;
  border-radius: 4px;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.6);

  @media (width >= 40em) {
    padding: 2.75rem 2.25rem 2rem;
  }

  @media (width >= 56em) {
    transform: rotate(1.5deg);
    margin-top: 1rem;
  }

  &::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    width: 110px;
    height: 28px;
    translate: -50% 0;
    rotate: -3deg;
    background: rgb(255 179 185 / 0.85);
  }

  & h3 {
    color: var(--color-text);
    font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
    line-height: 1.05;
    margin-bottom: 0.8em;
  }

  & .btn {
    display: block;
    margin-top: 1.5rem;
  }
}

.c-fringe__local {
  margin-top: 3rem;
  color: var(--c-on-dark-muted);
  font-size: 1rem;
}

/** checklists (override the site's arrow bullets) **/
/* The tick is a symmetric SVG, so its visual centre is its box centre. It is centred on the first
   line using lh (half the line height), nudged up 0.1em to sit between the x-height and cap height
   of Khula, so it stays aligned whatever the font size or line height. */
.comedy .c-checks li {
  --tick: 0.85em;
  padding-left: 1.75em;
  margin-bottom: 0.55em;
  line-height: 1.45;

  &::before {
    content: '';
    top: calc(0.5lh - 0.1em - var(--tick) / 2);
    left: 0.15em;
    width: var(--tick);
    height: var(--tick);
    border: 0;
    background: var(--c-teal);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8.5l4 4 8-9' fill='none' stroke='%23000' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}

/** process **/
.c-steps {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem; /* the same space as other card grids when there's no lead paragraph */
  counter-reset: none;

  @media (width >= 48em) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  @media (width >= 72em) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Registered so it computes to px on the h3, using the heading's own lh and em, and the smaller
   number circle inherits that length rather than re-resolving it against its own font size. */
@property --c-cap-centre {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}

.c-step {
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--c-paper);

  & h3 {
    /* Khula's cap height is centred 0.145em above the middle of its line box */
    --c-cap-centre: calc(0.5lh - 0.145em);
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
  }
}

.c-step__nr {
  --size: 2.1rem;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size);
  height: var(--size);
  /* centre the circle on the first line of the heading, however many lines it wraps to */
  margin-top: calc(var(--c-cap-centre) - var(--size) / 2);
  /* line-height 1 puts the digit's cap centre 0.145em above the box centre; this padding evens it out */
  padding-top: 0.29em;
  border-radius: 50%;
  background: var(--c-stage);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
}

/* a step outside the core process, set apart with a dashed outline */
.c-step-extra {
  margin-top: 1.25rem;
  padding: 1.5rem;
  border: 2px dashed rgb(53 57 60 / 0.22);
  border-radius: 12px;

  & h3 {
    margin-bottom: 0.4em;
  }

  & p:last-child {
    margin-bottom: 0;
  }
}

.c-step-extra__label {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/** packages **/
.c-packages {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  align-items: stretch;

  @media (width >= 60em) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
  }
}

.c-package {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem 1.75rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(53 57 60 / 0.1);

  @media (width >= 40em) {
    padding: 2.25rem 2rem 2rem;
  }

  & h3 {
    font-size: 1.75rem;
    margin-bottom: 0.1em;
  }

  & .c-checks {
    margin: 1.5rem 0 2rem;
    flex: 1;
  }

  & .btn {
    display: block;
    text-align: center;
  }
}

.c-package--featured {
  position: relative;
  background: var(--c-stage);
  box-shadow: 0 0 0 3px var(--c-coral), 0 30px 60px -25px rgb(0 0 0 / 0.5);

  @media (width >= 60em) {
    padding-block: 3rem 2.5rem;
  }

  & .c-package__for,
  & .c-package__time,
  & .c-checks li {
    color: var(--c-on-dark-muted);
  }
}

.c-package__badge {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% -50%;
  padding: 0.45em 1em 0.3em;
  border-radius: 3em;
  background: var(--c-coral);
  color: #1a1a1a;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-wrap: nowrap;
}

.c-package__for {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.c-package__price {
  margin-top: 1.25rem;
  font-size: 1rem;
  color: inherit;
}

.c-package__amount {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-right: 0.15em;
}

.c-package__from {
  font-weight: 700;
}

/* Its own line under every price, so cards line up whatever the price's length */
.c-package__approx {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.c-package__time {
  margin-top: 0.4rem;
  font-size: 1rem;
  font-weight: 700;
}

.c-fineprint {
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 44em;
  margin-inline: auto;
}

/** work **/
.c-work {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;

  @media (width >= 48em) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* two case studies share the row instead of leaving a gap for a third */
.c-work--2 {
  @media (width >= 48em) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.c-work__item {
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 12px;
  background: var(--c-paper);
  border-top: 6px solid var(--card-accent);

  & h3 {
    margin-bottom: 0.25em;
  }
}

/* a smaller browser frame for screenshots in work cards, on a light background */
.c-browser--card {
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgb(53 57 60 / 0.12), 0 16px 32px -20px rgb(0 0 0 / 0.45);

  & .c-browser__bar {
    padding: 0.4rem 0.6rem;
  }

  & .c-browser__dots i {
    width: 0.45rem;
    height: 0.45rem;
  }
}

.c-work__footnote {
  margin-top: 2rem;
  text-align: center;
}

.c-work__meta {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--color-text-muted);
  margin-bottom: 0.9rem;
}

.c-quote-card {
  margin-top: 3rem;
  text-align: center;

  & blockquote p {
    font-size: calc(1.2rem + 0.6vw);
    font-weight: 700;
    line-height: 1.45;
    max-width: 34em;
    margin-inline: auto;
  }

  & figcaption {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 1.5rem;
    text-align: left;
  }

  & img {
    flex: none;
    width: 56px; /* the logo renditions are 2x */
    height: 56px;
  }
}

.c-quote-card__name {
  display: block;
  font-weight: 800;
  font-size: 1rem;
}

.c-quote-card__role {
  display: block;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/** faq **/
.c-faq {
  display: grid;
  gap: 2rem;

  @media (width >= 56em) {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 4rem;
  }
}

.c-faq__list details {
  border-bottom: 1px solid rgb(53 57 60 / 0.15);

  &:first-child {
    border-top: 1px solid rgb(53 57 60 / 0.15);
  }

  & summary {
    position: relative;
    list-style: none;
    cursor: pointer;
    padding: 1.15rem 2.5rem 1rem 0;
    font-size: calc(1.05rem + 0.25vw);
    font-weight: 700;
    line-height: 1.35;

    &::-webkit-details-marker {
      display: none;
    }

    &::after {
      content: '+';
      position: absolute;
      right: 0.25rem;
      top: 50%;
      translate: 0 -50%;
      font-size: 1.75rem;
      font-weight: 400;
      color: var(--c-coral-ink);
      transition: rotate var(--ease);
    }
  }

  &[open] summary::after {
    rotate: 45deg;
  }

  & p {
    padding: 0 0 1.25rem;
    max-width: 40em;

    &:not(:last-child) {
      padding-bottom: 0.75em;
    }
  }
}

/* links inside running text are underlined, not told apart by colour alone (WCAG 1.4.1) */
:is(.c-prose, .c-lead, .c-icon-item__body) a:not(.btn) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/** text sections: free rich text (paragraphs, h3, lists) **/
.c-prose {

  & > * + * {
    margin-top: 1em;
  }

  & > h3 {
    margin-top: 2em;
  }

  & > h3:first-child {
    margin-top: 0;
  }

  & > h3 + * {
    margin-top: 0.5em;
  }

  & li + li {
    margin-top: 0.5em;
  }

  & ol {
    padding-left: 1.25em;
    list-style: decimal;
  }
}

/** text section with a photo beside it **/
.c-text-photo {
  display: grid;
  gap: 2.5rem;
  align-items: center;

  @media (width >= 56em) {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(2.5rem, 1rem + 4vw, 5rem);
  }
}

.c-text-photo__image {
  margin: 0;

  & img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;  /* small.css and medium.css cap images in main at 260/360px, which squashes this one */
  }
}

/** icon grid: an icon, a title and text per item **/
.c-icon-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2.5rem;

  @media (width >= 40em) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 2rem;
  }
}

.c-icon-grid--3 {
  @media (width >= 60em) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.c-icon-grid--2 {
  @media (width >= 60em) {
    gap: 3rem 4rem;
  }
}

.c-icon-grid .c-icon-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding-left: 0;

  &::before {
    content: none;
  }

  & h3 {
    margin-bottom: 0.35em;
  }

  & p + p {
    margin-top: 0.6em;
  }
}

.c-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  color: var(--c-stage);
  background: var(--c-pink);

  .c-icon-item:nth-child(3n + 2) & {
    background: color-mix(in srgb, var(--c-teal) 45%, white);
  }

  .c-icon-item:nth-child(3n) & {
    background: var(--c-blue);
  }
}

.c-icon-grid__footnote {
  margin-top: 2.5rem;
}

/** packages: optional introduction; a single package sits beside it **/
.c-packages__lead {
  margin-top: 1rem;
}

.c-package-single {
  display: grid;
  gap: 2rem;
  align-items: center;

  @media (width >= 56em) {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(2.5rem, 1rem + 4vw, 5rem);
  }

  & .c-packages {
    margin-top: 0;
  }
}

.c-packages.c-packages--single {
  grid-template-columns: minmax(0, 1fr);
}

/** points with screenshots: text beside a browser-framed screenshot, alternating sides on wide screens **/
.c-points {
  display: grid;
  gap: clamp(3rem, 2rem + 4vw, 5.5rem);
  margin-top: 2.5rem;
}

.c-point {
  display: grid;
  gap: 1.5rem;
  align-items: center;

  @media (width >= 48em) {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 1rem + 3vw, 4rem);

    &:nth-child(even) {
      grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);

      & .c-point__copy {
        order: 2;
      }
    }
  }

  & p {
    max-width: 34em;
  }

  & p + p {
    margin-top: 0.75em;
  }
}

.c-point__shot {
  margin: 0;

  & .c-browser--card {
    margin-bottom: 0;
  }
}

/** enquiry **/
.c-enquiry .c-wrap {
  display: grid;
  gap: 2.5rem;

  @media (width >= 60em) {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 4rem;
    align-items: start;
  }
}

.c-dark.c-enquiry .c-lead {
  color: var(--c-on-dark-muted);
}

.c-form {
  background: #fff;
  color: var(--color-text);

  /* the form card is white inside a .c-dark section: undo the light heading and link colours */
  .c-dark & :is(h1, h2, h3) {
    color: var(--color-text);
  }

  .c-dark & a:not(.btn) {
    color: var(--color-link);
  }

  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 30px 60px -25px rgb(0 0 0 / 0.6);

  @media (width >= 40em) {
    padding: 2.25rem;
  }

  & :is(a, button, input, select, textarea, summary):focus-visible {
    outline-color: var(--color-text);
  }

  & form > label,
  & .c-form__row > label {
    display: block;
    font-weight: 700;
    margin-bottom: 1.25rem;
  }

  & :is(input[type="text"], input[type="email"], select, textarea) {
    margin-top: 0.4rem;
    font-weight: 400;
  }

  & select {
    display: block;
    width: 100%;
    padding: 0.9em 2.5em 0.9em 1em;
    font: inherit;
    font-size: calc(0.875rem + 0.25vw);
    color: var(--color-text);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2335393c' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 1em center;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    appearance: none;
  }

  & .btn {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
  }
}

.c-form__row {
  @media (width >= 40em) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
  }
}

.c-form__group {
  margin-bottom: 1.25rem;
  text-align: left;

  & legend {
    font-weight: 700;
    font-size: calc(0.875rem + 0.25vw);
    line-height: 1.5;
    margin-bottom: 0.5rem;
  }

  &.invalid .c-radio {
    box-shadow: inset 0 0 0 1px var(--color-error);
  }
}

.c-radios {
  display: grid;
  gap: 0.5rem;

  @media (width >= 30em) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.c-radio {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem 0.6rem;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--color-border);
  cursor: pointer;
  transition: box-shadow var(--ease), background-color var(--ease);

  &:has(:checked) {
    background: rgb(0 188 184 / 0.08);
    box-shadow: inset 0 0 0 2px #008482;
    font-weight: 700;
  }

  & input {
    flex: none;
    width: 1.1em;
    height: 1.1em;
    margin: 0 0 0.15em;
    padding: 0;
    accent-color: #008482;
  }
}

.c-form__error {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-error);
  margin-bottom: 1rem;

  &:empty {
    display: none;
  }
}

.c-form__thanks {
  padding: 2rem 0;
  text-align: center;

  & h3 {
    text-align: center;
    font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  }
}

/* honeypot: hidden from people, visible to naive bots */
.c-hidden-field {
  position: absolute;
  left: -9999px;
}

/** hero with a sample report (light): heading and buttons beside a report card **/
.c-hero--report {
  background: var(--color-surface);
  color: var(--color-text);

  & .c-hero__inner {
    @media (width >= 56em) {
      grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    }
  }

  & .c-hero__lead {
    color: var(--color-text);
  }

  & .c-hero__proof {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--color-text-muted);
  }
}

.c-report {
  margin: 0;
  padding: 1.5rem 1.5rem 1.25rem;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgb(23 25 27 / 0.1), 0 30px 60px -36px rgb(0 0 0 / 0.4);
  font-size: 1rem;

  @media (width >= 40em) {
    padding: 2rem 2rem 1.5rem;
  }

  /* a slight tilt, like a sheet of paper on the desk; level on phones, where it would poke out of the gutter */
  @media (width >= 56em) {
    rotate: 1deg;
  }
}

.c-report__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.25rem;
  border-bottom: 2px solid var(--c-stage);
}

.c-report__title {
  font-size: 1.25rem;
  font-weight: 800;
}

.c-report__subtitle {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.comedy .c-report__row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0 0.6rem;
  padding-left: 0;
  border-bottom: 1px solid #ece6dc;
  line-height: 1.4;

  &::before {
    content: none;
  }

  &:last-child {
    border-bottom: 0;
  }
}

.c-report__status {
  flex: none;
  font-weight: 700;
  text-align: right;
}

.c-report__status--ok {
  color: var(--color-link);
}

.c-report__status--warn {
  color: var(--c-coral-ink);
}

.c-report__status--todo {
  color: var(--color-text-muted);
}

.c-report__caption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/** checklist beside a piggy illustration **/
.c-checklist {
  display: grid;
  gap: 2.5rem;
  align-items: center;

  @media (width >= 56em) {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 4rem;
  }
}

.c-checklist__image {
  display: flex;
  justify-content: center;

  & img {
    width: min(100%, 300px);
    height: auto;
    max-height: none;
  }

  /* on phones the heading comes first, then the illustration */
  @media (width < 56em) {
    order: 1;

    & img {
      width: min(60%, 220px);
    }
  }
}

.c-checklist__items {
  margin-top: 1.5rem;
  max-width: 44em;

  & li {
    margin-bottom: 0.9em;
  }

  & b {
    font-weight: 700;
    color: var(--c-stage);
  }
}

/** agent readiness audit form: centred introduction above the form card **/
.c-audit .c-wrap {
  max-width: calc(46rem + 2 * var(--c-gutter));
}

.c-audit__intro {
  margin-bottom: 2rem;
  text-align: center;

  & h2 {
    text-align: center;
  }

  & .c-lead {
    margin-inline: auto;
    margin-bottom: 0;
  }
}

.c-audit .c-form {
  box-shadow: 0 0 0 1px rgb(53 57 60 / 0.1), 0 30px 50px -36px rgb(0 0 0 / 0.4);
}

/* a Form's checkbox or radio options in one column (long labels) */
.c-radios--1 {
  @media (width >= 30em) {
    grid-template-columns: minmax(0, 1fr);
  }
}

.c-radios--3 {
  @media (width >= 20em) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  @media (width >= 40em) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.c-form .optional {
  font-weight: 400;
  color: var(--color-text-muted);
}

/** footer: dark, like the header and the quote section above it **/
.comedy .site-footer {
  margin-top: 0;
  padding-inline: var(--c-gutter);
  background: var(--c-stage);
  border-top: 1px solid rgb(255 255 255 / 0.08);
  color: var(--c-on-dark);

  & .logo__text {
    fill: #fff;
    opacity: 0.9;
  }

  & .footer__about,
  & .footer__bottom p {
    color: var(--c-on-dark-muted);
  }

  & .footer__heading {
    color: var(--c-on-dark);
  }

  & .footer__column a {
    color: var(--c-on-dark-muted);

    &:is(:hover, :focus-visible),
    &[aria-current="page"] {
      color: var(--c-teal);
    }
  }

  & .footer__bottom {
    border-top-color: rgb(255 255 255 / 0.1);
  }
}

/** medium.css sets a desktop font size on every h3; keep this page's scale **/
@media (width >= 64em) {
  .comedy h3 {
    font-size: 1.6rem;
  }

  .comedy .c-package h3 {
    font-size: 1.85rem;
  }

  .comedy .c-flyer h3 {
    font-size: 2.2rem;
  }

  .comedy .btn {
    padding: 0.85em 2em 0.65em;
  }
}

/** hero with an illustration beside the heading (e.g. the home page's moped piggy) **/
.c-hero__art {
  display: flex;
  justify-content: center;

  & img,
  & .moped {
    position: static;      /* small.css and medium.css place the old home page's moped absolutely */
    transform: none;
    width: min(100%, 520px);
    height: auto;
    max-height: none;
  }

  & img {
    width: min(80%, 340px);
  }
}

/* the moped piggy riding a revenue chart: the chart is a card, and the piggy rides up its coral line from just outside
   the card's lower left corner (templates/includes/revenue_chart.html) */
.c-hero__art--chart {
  display: block;
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 507 / 400;
  margin-inline: auto;

  & .moped {
    position: absolute;
    z-index: 1;
    left: -6%;
    top: 40%;
    width: 64%;
    transform: rotate(-16deg);
    transform-origin: 50% 60%;

    /* phones: keep the exhaust puff inside the screen's margin */
    @media (width < 40em) {
      left: -2%;
    }
  }
}

.c-chart {
  position: absolute;
  inset: 0 0 12% 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1rem 1.2rem 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(23 25 27 / 0.07), 0 30px 60px -30px rgb(0 0 0 / 0.35);

  & svg {
    display: block;
    flex: 1;
    width: 100%;
    height: auto;
  }
}

/* .c-chart__label: more specific than the hero's paragraph styles */
.c-chart .c-chart__label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

@media (prefers-reduced-motion: no-preference) {
  .c-hero__art .moped :is(.wheel-1, .wheel-2) {
    transform-box: fill-box;
    transform-origin: center;
    animation: spin 2s linear infinite;
  }
}

/** text section: centred heading and text (e.g. the home page's introductions) **/
.c-text--centre {
  text-align: center;

  /* .comedy :is(h1, h2, h3) sets headings to the left */
  .comedy & h2 {
    margin-inline: auto;
    text-align: center;
  }

  & .c-prose {
    max-width: 40em;
    margin-inline: auto;
  }

  & .c-actions {
    justify-content: center;
  }
}

.c-prose + .c-actions,
.c-checklist__items + .c-actions {
  margin-top: 2rem;
}

/** columns shown as coloured cards: pictures sit inside the card **/
.c-card .c-why__image {
  border-radius: 8px;
}

/** checklist with the illustration on the right on wide screens **/
.c-checklist--right {
  @media (width >= 56em) {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);

    & .c-checklist__image {
      order: 1;
    }
  }
}

/** testimonials: quote cards side by side; on phones a row to swipe through **/
.c-testimonials {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(16rem, 85%);
  gap: 1.25rem;
  margin-top: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* the row runs to the screen edges, so cards aren't cut off at the page margin, and has room around the cards for
     their shadows (a scrolling row clips anything outside it) */
  margin-inline: calc(-1 * var(--c-gutter));
  padding: 1rem var(--c-gutter) 2.5rem;
  scroll-padding-inline: var(--c-gutter);

  @media (width >= 56em) {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }

  & .c-quote-card {
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-top: 0;
    padding: 2rem 1.75rem 1.75rem;
    border-radius: 20px;
    background: #fff;
    text-align: left;
    box-shadow: 0 0 0 1px rgb(53 57 60 / 0.08), 0 20px 40px -30px rgb(0 0 0 / 0.35);
  }

  & blockquote p {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: none;
  }

  @media (width >= 56em) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.c-dark .c-testimonials .c-quote-card {
  color: var(--color-text);
}

/* medium.css enlarges extra bold words in the old home page's h1; in a section page's headings they keep the size */
.comedy :is(h1, h2) .text-extrabold {
  font-size: inherit;
}

/** sections next to each other with the same background read as one section (e.g. a heading section and the
    sections under it): the later ones drop their top padding, so the background runs on without a double gap **/
:is(.c-paper + .c-paper, .c-tint--blue + .c-tint--blue, .c-tint--pink + .c-tint--pink, .c-dark + .c-dark) {
  padding-top: 0;
}
