:root {
  color-scheme: light;
  --ink: #151515;
  --muted: #505050;
  --yellow: #ffdc47;
  --line: #dedede;
  --surface: #f7f7f7;
  --section-tint: #f2f2f0;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 1rem/1.6 system-ui, sans-serif;
}

.shell {
  width: min(100% - 2.5rem, 67.5rem);
  margin-inline: auto;
}

.site-header { border-bottom: 1px solid var(--line); }

.header-inner, .identity {
  display: flex;
  align-items: center;
}

.header-inner {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding-block: 0.5rem;
}

.identity {
  gap: 0.5rem;
  font-weight: 750;
}

.identity img {
  display: block;
  width: 3rem;
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.header-inner a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.875rem;
}

a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px var(--yellow);
}

.hero {
  display: grid;
  gap: 1.75rem;
  padding-block: clamp(2rem, 6vw, 4.5rem);
}

.hero-copy {
  align-self: center;
  border-top: 0.35rem solid var(--yellow);
  padding-top: 1rem;
}

h1, h2, h3, h4 {
  line-height: 1.18;
  margin-block: 0 0.75rem;
}

h1 {
  max-width: 15ch;
  font-size: clamp(2.25rem, 6.3vw, 4.25rem);
  letter-spacing: -0.045em;
}

h2 { font-size: clamp(1.6rem, 4vw, 2.15rem); }
p { margin-block: 0 1rem; }
.lead { font-size: 1.125rem; }

.rules-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  border-radius: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: var(--yellow);
  font-weight: 700;
}

.hero-art { margin: 0; }

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-art figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.details {
  padding-block: clamp(2.125rem, 6.5vw, 3.875rem);
  padding-inline: clamp(1rem, 3vw, 2rem);
}

.details[aria-labelledby="entry-title"],
.details[aria-labelledby="charity-title"] {
  background: var(--section-tint);
}

.entry-steps, .dates {
  display: grid;
  gap: 1rem;
}

.entry-steps {
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.entry-steps li, .dates > div {
  border-top: 3px solid var(--yellow);
  padding: 1rem;
  background: var(--surface);
}

.entry-steps li { background: #fff; }

.entry-steps li + li { margin-top: 0; }

.step-number {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 2.75rem;
  font-weight: 750;
  line-height: 1;
}

.rules-text ul {
  margin-block: 0 1rem;
  padding-inline-start: 1.4rem;
}

li + li { margin-top: 0.5rem; }

.entry-placeholder {
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.5rem 0.85rem;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
}

.entry-placeholder[href] {
  display: inline-flex;
  align-items: center;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
}

html {
  scroll-padding-bottom: var(--entry-cta-clearance, 0px);
}

body {
  padding-bottom: var(--entry-cta-clearance, 0px);
}

.persistent-entry {
  position: fixed;
  z-index: 1;
  inset: auto 0 0;
  padding: 0.5rem max(1rem, env(safe-area-inset-right)) calc(0.75rem + 16px + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: #fff;
  box-shadow: 0 -2px 12px rgb(0 0 0 / 10%);
  text-align: center;
}

.persistent-entry-deadline {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
}

.persistent-entry .persistent-entry-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border-color: transparent;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.persistent-entry-button:disabled { opacity: 0.75; }
.persistent-entry-button img { flex-shrink: 0; }

@media (min-width: 48rem) {
  .persistent-entry {
    inset: auto 1.5rem 1.5rem auto;
    max-width: calc(100% - 3rem);
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .persistent-entry-deadline { display: none; }
}

.dates { margin: 1.25rem 0 0; }

.dates dt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dates dt img { flex-shrink: 0; }

.dates dt { font-weight: 700; }
.dates dd { margin: 0.35rem 0 0; }

.charity-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.charity-list > li {
  display: grid;
  grid-template-columns: clamp(84px, 23vw, 120px) minmax(0, 1fr);
  align-items: center;
  gap: 0.875rem;
  margin: 0;
  padding: 0.75rem 0;
}

.charity-list > li + li { border-top: 1px solid var(--line); }

.charity-list img {
  display: block;
  width: 100%;
  height: 60px;
  padding: 0.375rem;
  object-fit: contain;
}

.charity-logo--helen-woodward {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  height: 60px;
  overflow: hidden;
  background: #0066cc;
  border-radius: 5px;
}

.charity-logo--helen-woodward img {
  width: 80px;
  height: 80px;
  padding: 0;
  /* Center the artwork within the PNG's uneven transparent margins. */
  transform: translate(-0.25px, 2px);
}

.charity-list p { margin: 0.35rem 0 0; }

@media (max-width: 600px) {
  .charity-list > li {
    grid-template-columns: clamp(92.4px, 25.3vw, 132px) minmax(0, 1fr);
    gap: 1rem;
    padding-block: 1rem;
  }

  .charity-list > li > img,
  .charity-logo--helen-woodward { height: 66px; }
}

.rules-region {
  margin-block-start: 24px;
  padding: clamp(1.25rem, 5vw, 3.5rem) clamp(0.75rem, 4vw, 2.5rem);
  background: var(--surface);
  scroll-margin-top: 1rem;
}

.rules {
  max-width: 50rem;
  margin-inline: auto;
  padding: clamp(1rem, 4vw, 2rem);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 2px 12px rgb(0 0 0 / 6%);
}

.rules-text h3 {
  margin-top: 1.75rem;
  font-size: 1.125rem;
}

.rules-text h4 {
  margin-top: 1.25rem;
  font-size: 1rem;
}

@media (min-width: 48rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    gap: clamp(2rem, 6vw, 5rem);
  }

  .entry-steps, .dates { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .charity-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.25rem;
  }

  .charity-list > li:nth-child(2) { border-top: 0; }

  .rules-region { margin-block-start: 40px; }
}
