#contact .festival-contact-form {
  display: block;
  width: min(100%, 1060px);
  margin: 32px auto 0;
  text-align: center;
}

.festival-contact-form [data-fillout-id] {
  width: 100%;
  min-height: 500px;
}

#festival-form-dialog {
  width: min(760px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 1px solid #dbb66e;
  border-radius: 12px;
  color: #102923;
  background: #f6eedc;
}

#festival-form-dialog::backdrop {
  background: rgb(8 23 19 / 82%);
}

html:has(#festival-form-dialog[open]) {
  overflow: hidden;
}

.festival-form-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: #fff9ed;
  background: #102923;
}

#festival-form-title {
  font: 600 1.125rem/1.25 Georgia, serif;
}

.festival-form-bar button {
  padding: 8px 12px;
  border-radius: 4px;
  color: #102923;
  background: #dbb66e;
  cursor: pointer;
}

#festival-form-dialog iframe {
  display: block;
  width: 100%;
  height: min(680px, max(180px, calc(100dvh - 126px)));
  border: 0;
}

[data-form-popup] {
  cursor: pointer;
}

.fine [data-form-popup] {
  text-decoration: underline;
}

/* Fillout positions its desktop badge relative to the iframe viewport. */
@media (min-width: 1024px) {
  .festival-contact-form [data-fillout-id],
  .festival-contact-form iframe {
    min-height: 690px;
  }
}

/* Shared finish for the site's gold action buttons. */
.button,
.festival-form-bar button {
  border-radius: 8px;
  background-image: linear-gradient(180deg, rgb(255 255 255 / 18%), transparent 58%, rgb(91 53 7 / 10%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 40%), 0 2px 0 #9a7437, 0 6px 14px rgb(0 0 0 / 24%);
}

.button:focus-visible,
.festival-form-bar button:focus-visible {
  outline: 2px solid #fff9ed;
  outline-offset: 4px;
}

.button:active,
.festival-form-bar button:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 28%), 0 1px 0 #9a7437, 0 2px 6px rgb(0 0 0 / 24%);
}

/* Gold treatment for navigation, text links, and linked cards. */
main :is(a[href]:not(.brand, .skip, .button, p a, li a, footer a:not([href="#"]:last-child), header nav a, .hero-actions a), button[data-form-popup]:not(.button, p button)) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  max-width: 100%;
  padding: .55em .9em;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #e9c983, #dbb66e 60%, #d1a761);
  color: #102923;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 40%), 0 2px 0 #9a7437, 0 6px 14px rgb(0 0 0 / 24%);
}
main :is(a[href]:not(.brand, .skip, .button, p a, li a, footer a:not([href="#"]:last-child), header nav a, .hero-actions a), button[data-form-popup]:not(.button, p button)):hover {
  background: #f0ce8b;
  color: #102923;
  text-decoration: none;
}
main :is(a[href]:not(.brand, .skip, .button, p a, li a, footer a:not([href="#"]:last-child), header nav a, .hero-actions a), button[data-form-popup]:not(.button, p button)):focus-visible {
  outline: 2px solid #fff9ed;
  outline-offset: 4px;
}
main :is(a[href]:not(.brand, .skip, .button, p a, li a, footer a:not([href="#"]:last-child), header nav a, .hero-actions a), button[data-form-popup]:not(.button, p button)):active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #9a7437, 0 2px 6px rgb(0 0 0 / 24%);
}
main :is(.benefactors, .journal) > a[href]:not(.brand, .skip, .button) {
  display: grid;
  justify-items: center;
}
main .journal > a[href]:not(.brand, .skip, .button) :is(span, h3) {
  color: inherit;
}
main .hero-bottom a[href]:not(.brand, .skip, .button) {
  border-radius: 50%;
}

/* Keep reading text and secondary labels comfortable at every width. */
main :is(p, li, dt, dd, small, summary, .eyebrow, .fine, .sponsor-note, .footer-bottom, .event-date),
main :is(.button, .text-link, nav a, .benefactors small) {
  font-size: max(1rem, 16px);
  line-height: 1.5;
}
main :is(.sponsor-tiers, .faq) summary {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
}
main :is(.brand small, .hero-bottom, .hero-bottom span, .intro-bottom) {
  font-size: max(.9375rem, 15px);
}
#festival-form-dialog {
  background: #dbb66e;
}

.community .event-list,
.community .fine {
  width: min(100%, 58rem);
  margin-inline: auto;
}
.community .event-list article > span {
  font-size: max(1rem, 16px);
  line-height: 1.5;
  text-wrap: pretty;
}
.community .fine {
  font-weight: 700;
}
.community .fine [data-form-popup] {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #dbb66e;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .18em;
  vertical-align: baseline;
}

/* Header navigation and hero actions use text links. */
main header nav a[href],
main .hero-actions a[href] {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #fff9ed;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  transform: none;
}
main .hero-actions a[href] {
  padding-block: .6em;
  border-bottom: 1px solid rgb(255 249 237 / 30%);
}
main header nav a[href]:hover,
main .hero-actions a[href]:hover {
  color: #dbb66e;
  background: none;
  box-shadow: none;
  transform: none;
}

/* Keep the two journal links aligned as a pair. */
main .journal > a[href]:not(.brand, .skip, .button) {
  display: grid;
  grid-template-rows: auto 1fr;
  align-self: stretch;
  align-content: center;
  justify-content: stretch;
  justify-items: stretch;
  gap: .5rem;
  min-height: 7.5rem;
  padding: 1rem 1.25rem;
  text-align: left;
}
main .journal > a > span {
  font-size: 1rem;
}
main .journal > a > h3 {
  margin: 0;
}
main .journal > a > h3 svg {
  flex: none;
}

#faq a[href="/faq/"] {
  margin-top: 10px;
}

/* Text links remain distinct from surrounding copy. */
main :is(
  a[href]:not(.brand, .skip, .button):is(header nav a, .hero-actions a, p a, li a, footer a:not([href="#"]:last-child)),
  .hero-actions a[href],
  p button[data-form-popup]:not(.button)
),
main .migration-copy :is(p, li) a[href]:not(.button) {
  color: #dbb66e;
  font-weight: 700;
}

/* A deeper gold keeps inline links readable on the light visit panel. */
main #visit p a[href]:not(.button) {
  color: #775118;
  text-decoration: underline;
  text-underline-offset: .16em;
}
