:root {
  --navy: #14253c;
  --red: #a52f33;
  --ivory: #faf7f0;
  --muted: #4b5867;
  --border: #ded8cb;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ivory); color: var(--navy); font: 16px/1.55 system-ui, sans-serif; }
a { color: inherit; }
.wrap, footer nav { width: min(100% - 48px, 1120px); margin-inline: auto; }
header, footer { background: #fffefa; }
nav, .links, .filters, .section-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
nav, .section-head { justify-content: space-between; }
nav { min-height: 70px; }
nav a, .hero-link { font-weight: 700; text-decoration: none; }
nav a:hover, .hero-link:hover { text-decoration: underline; }
.links { gap: 27px; }
.brand { font-size: 21px; letter-spacing: .11em; white-space: nowrap; }
.brand-star { color: var(--red); }
.hero {
  color: white;
  padding: 74px 0 56px;
  background: linear-gradient(90deg, #09192ceb 0%, #09192cbb 52%, #09192c34 100%), url(main-street.webp) center 56% / cover;
}
.eyebrow { color: #f3cbac; font-size: 14px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
h1, h2 { font-family: Georgia, serif; line-height: 1.05; letter-spacing: -.05em; margin: 0 0 16px; }
h1 { margin-top: 12px; font-size: clamp(46px, 6.1vw, 88px); }
h1 span { color: #ffdebc; }
h2 { font-size: clamp(32px, 4.5vw, 51px); }
h3 { margin: 0 0 6px; }
p { margin: 0 0 14px; }
.hero p { max-width: 49ch; font-size: 18px; }
.hero-link { display: inline-block; margin-top: 14px; padding: 10px 0; }
.search {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 22px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffefa;
  color: var(--navy);
  max-width: 790px;
}
#event-filters { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; }
label { min-width: 0; display: grid; gap: 4px; font-size: 14px; font-weight: 700; }
input, select, textarea { width: 100%; min-width: 0; min-height: 44px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 7px; background: white; color: var(--navy); font: 16px/1.35 system-ui, sans-serif; }
input[type=checkbox] { width: 18px; min-height: auto; accent-color: var(--navy); }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--red);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { filter: brightness(.93); }
.chip { background: white; color: var(--navy); border-color: var(--border); }
.chip[aria-pressed=true] { color: white; background: var(--navy); border-color: var(--navy); }
section { padding: 52px 0; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 8px; }
.category-grid button { min-height: 54px; font-size: 14px; }
.result { margin-top: 18px; padding: 16px; border: 1px solid var(--border); border-radius: 11px; background: #fffefa; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.card { padding: 16px; border: 1px solid var(--border); border-radius: 9px; background: white; }
.event { background: #ebeff3; }
.muted, .section-head p, .demo { color: var(--muted); }
.options { margin-top: 12px; }
.options summary { padding: 10px 0; width: fit-content; cursor: pointer; font-weight: 700; }
.options-body { align-items: end; padding: 10px 0; }
.check { display: flex; align-items: center; gap: 6px; min-height: 44px; }
footer { padding: 12px 0; }
dialog { width: min(92vw, 580px); max-height: 88dvh; border: 0; border-radius: 12px; padding: 22px; color: var(--navy); }
dialog::backdrop { background: #071427b5; }
dialog form, #event-fields:not([hidden]) { display: grid; gap: 12px; }
dialog .close { float: right; background: #ebeff3; color: var(--navy); }
:focus-visible { outline: 3px solid #5077ad; outline-offset: 3px; }
@media (max-width: 620px) {
  .wrap, footer nav { width: calc(100% - 32px); }
  .masthead nav { min-height: 62px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .masthead .links { display: none; }
  .brand { font-size: 17px; letter-spacing: .06em; }
  .masthead button { padding-inline: 10px; font-size: 14px; }
  .hero { padding: 25px 0 17px; background-position: center; background-image: linear-gradient(90deg, #09192ce8, #09192c94), url(main-street.webp); }
  .eyebrow { font-size: 12px; letter-spacing: .10em; }
  h1 { font-size: clamp(36px, 8.3vw, 51px); margin-block: 9px 12px; }
  .hero p { font-size: 16px; }
  .search, #event-filters { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 14px; }
  .hero-link { margin-top: 5px; font-size: 14px; }
  section { padding: 28px 0; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { align-items: start; }
}
#detail-actions .button { max-width: 100%; }
.card, #detail-description, #detail-meta { overflow-wrap: anywhere; }
@media (max-width: 620px) {
  #event-filters { grid-template-columns: minmax(0, 1fr) auto; }
  #event-filters label { grid-column: 1 / -1; }
  .options-body > label:first-child { flex: 1 1 100%; }
  dialog { max-height: 88dvh; overflow: auto; }
}
@media (max-width: 360px) {
  .masthead nav { gap: 4px; }
  .brand { font-size: 15px; }
  .category-grid button { padding-inline: 6px; }
}

#draft-status { margin: 0; font-size: 14px; }
#discard-draft[hidden] { display: none; }
