:root {
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  color: #21352a;
  background: #f4f3eb;
  line-height: 1.55;
  color-scheme: light;
  --green: #203e2e;
  --muted: #526356;
  --line: #d9e0d5;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
body { font-size: var(--form-fontSize, 16px); }
form section { border-radius: var(--form-radius, 16px); }
form .grid { gap: var(--form-gap, 18px); }
form h2 { font-size: var(--form-headingSize, 25px); }
.event h1 { font-size: var(--form-titleSize, 32px); }
button.primary { background: var(--form-accent, #98491f); }
.form-preview [data-form-field] { position: relative; cursor: pointer; outline-offset: 5px; }
.form-preview [data-form-field]:hover { outline: 2px dashed #c58f65; }
.form-preview [data-selected="true"] { outline: 3px solid #98491f; border-radius: 7px; }
.form-preview .editor-hidden-field { opacity: .45; }
.form-preview .editor-drop-target { outline: 3px dashed #98491f; }
.form-preview input, .form-preview textarea, .form-preview select { pointer-events: none; }
.form-preview .field-drag-handle { position: absolute; right: 2px; top: -9px; z-index: 2; cursor: grab; touch-action: none; min-height: 28px; padding: 0 8px; background: #f7eadb; color: #713b1f; border: 1px solid #d6b99e; }
[hidden] { display: none !important; }
.shell { width: min(100% - 2rem, 48rem); margin: 0 auto; }
.hero {
  background: #f8f0e5;
  padding: clamp(1rem, 4vw, 3rem) 0 clamp(1.45rem, 4vw, 2.7rem);
  border-bottom-left-radius: 35% 1.2rem;
  border-bottom-right-radius: 65% 1.55rem;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  grid-template-areas: "brand photo" "event photo";
  align-items: center;
  gap: .5rem 2rem;
}
.brand {
  grid-area: brand;
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3.72;
  mix-blend-mode: darken;
}
.brand img {
  /* Frame the wordmark and keep the original artwork at its natural proportions. */
  position: absolute;
  top: 50%;
  left: 46%;
  width: 125%;
  height: auto;
  transform: translate(-50%, -50%);
}
.event {
  grid-area: event;
  padding-left: 4%;
}
.event-organizer {
  margin: 0 0 .24rem;
  color: #915021;
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .035em;
}
.hero-photo {
  grid-area: photo;
  position: relative;
  margin: .6rem .8rem .4rem .65rem;
  isolation: isolate;
}
.hero-photo::before {
  position: absolute;
  inset: 2% -2% -5% 2%;
  z-index: -1;
  background: #eacdb3;
  border-radius: 22% 19% 23% 15% / 32% 30% 20% 31%;
  transform: rotate(4deg);
  content: "";
}
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.72;
  object-fit: cover;
  object-position: 50% 39%;
  border-radius: 20% 17% 21% 15% / 32% 31% 24% 28%;
  transform: rotate(-5deg);
}
h1, h2 { margin: 0; line-height: 1.1; }
h1 {
  color: #342a23;
  font-size: clamp(1.33rem, 4.25vw, 2rem);
  font-weight: 760;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.event-facts {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .95rem;
  margin: .53rem 0 0;
  color: #644e3f;
  font-size: clamp(.8rem, 3.4vw, .94rem);
}
.intro { margin: 1.5rem 0; max-width: 59ch; }
section { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 4vw, 2rem); margin-bottom: 1rem; }
h2 { color: var(--green); font-size: clamp(1.45rem, 4vw, 1.9rem); margin-bottom: 1.1rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
label, legend { font-weight: 650; }
input:not([type=checkbox]), select {
  display: block;
  width: 100%;
  min-height: 2.85rem;
  margin-top: .3rem;
  border: 1px solid #8c9a8d;
  border-radius: .45rem;
  background: #fff;
  color: inherit;
  padding: .5rem .65rem;
  font: inherit;
}
.muted, .filename { color: var(--muted); font-size: .92rem; font-weight: 400; }
.check { display: flex; align-items: flex-start; gap: .7rem; margin: 1rem 0; font-weight: 500; }
.check input { flex: none; margin: .18rem 0 0; width: 1.25rem; height: 1.25rem; accent-color: var(--green); }
.nested { background: #f0f4ed; border-radius: .65rem; padding: 1rem; margin-top: 1rem; }
.nested p { margin-bottom: 0; }
fieldset { min-width: 0; margin: 0; }
.upload { border: 1px solid var(--line); border-radius: .65rem; padding: .55rem .8rem; }
.upload legend { padding: 0 .3rem; }
.upload-actions, .links { display: flex; flex-wrap: wrap; gap: .55rem; }
.links { gap: .5rem 1.2rem; }
.filename { margin: .55rem 0 .25rem; overflow-wrap: anywhere; }
button {
  min-height: 2.75rem;
  border: 1px solid #aebcad;
  border-radius: .5rem;
  background: #f0f4ed;
  color: var(--green);
  padding: .45rem .8rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:hover { background: #e2ebde; }
button:disabled { opacity: .65; cursor: wait; }
.primary { background: var(--green); border-color: var(--green); color: white; padding: .7rem 1.2rem; }
.primary:hover { background: #315943; }
.submit { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1rem; }
.submit p { margin: 0 0 .8rem; }
a { color: #225738; text-underline-offset: .18em; }
details { background: #f4f6f0; padding: .7rem .9rem; border-radius: .5rem; }
summary { cursor: pointer; font-weight: 650; }
details ul { margin: .5rem 0 0; padding-left: 1.4rem; }
details li + li { margin-top: .32rem; }
.error { padding: .7rem .9rem; background: #fcf0ea; color: #8e2919; border-radius: .4rem; }
#registration-id { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid #896006; outline-offset: 3px; }
footer { padding: .4rem 0 1.8rem; font-size: .9rem; }
@media (max-width: 38rem) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "photo" "event";
    justify-items: center;
    text-align: center;
    row-gap: .46rem;
  }
  .brand { width: min(100%, 24rem); }
  .hero-photo { width: min(75%, 20rem); margin: .38rem 0 .8rem; }
  .hero-photo img { aspect-ratio: 2.05; }
  .event { padding: 0; }
  h1 { font-size: clamp(1.33rem, 6.2vw, 1.8rem); }
  .event-facts { justify-content: center; }
  .grid { grid-template-columns: 1fr; }
  .primary { width: 100%; }
}

/* Saved form design is applied after the base responsive rules. */
#registration { font-size: var(--form-fontSize, 16px); }
#registration section { border-radius: var(--form-radius, 16px); }
#registration .grid { gap: var(--form-gap, 18px); }
#registration h2 { font-size: var(--form-headingSize, 25px); }
.event h1 { font-size: var(--form-titleSize, 32px); }
#registration button.primary { background: var(--form-accent, #98491f); }
.form-preview .check input { order: -1; }
