.te-public-shell,
.te-create-shell {
  width: min(82rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) 0 5rem;
}

.te-public-shell *,
.te-create-shell * {
  box-sizing: border-box;
}

.te-public-shell h1,
.te-public-shell h2,
.te-public-shell h3,
.te-public-shell p,
.te-create-shell h1,
.te-create-shell h2,
.te-create-shell p {
  margin: 0;
}

.te-eyebrow {
  color: var(--wa-color-brand);
  font-size: .72rem;
  font-weight: 780;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.te-discovery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 2.5rem;
  align-items: end;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 1px solid var(--wa-color-neutral-border-normal);
  border-left: .3rem solid var(--wa-color-brand);
  border-radius: .65rem;
  background: var(--wa-color-surface-raised);
}

.te-discovery-hero > div:first-child {
  min-width: 0;
}

.te-discovery-hero h1,
.te-create-header h1 {
  max-width: 48rem;
  margin-top: .45rem;
  color: var(--wa-color-text-normal);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.te-discovery-hero p,
.te-create-header > p {
  max-width: 48rem;
  margin-top: .85rem;
  color: var(--wa-color-text-quiet);
  line-height: 1.65;
}

.te-discovery-summary {
  min-width: 9.5rem;
  padding-left: 1.4rem;
  border-left: 1px solid var(--wa-color-neutral-border-normal);
}

.te-discovery-summary strong,
.te-discovery-summary span {
  display: block;
}

.te-discovery-summary strong {
  color: var(--wa-color-text-normal);
  font-size: 2rem;
  line-height: 1;
}

.te-discovery-summary span {
  margin-top: .4rem;
  color: var(--wa-color-text-quiet);
  font-size: .78rem;
}

.te-public-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.te-button {
  min-height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .58rem .95rem;
  border: 1px solid var(--wa-color-neutral-border-normal);
  border-radius: .4rem;
  color: var(--wa-color-text-normal);
  background: var(--wa-color-neutral-fill-quiet);
  font: inherit;
  font-weight: 720;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.te-button:hover {
  border-color: var(--wa-color-brand-border-normal);
  color: var(--wa-color-brand);
}

.te-button-primary {
  border-color: var(--wa-color-brand-fill-loud);
  color: var(--wa-color-brand-on-loud);
  background: var(--wa-color-brand-fill-loud);
}

.te-button-primary:hover {
  color: var(--wa-color-brand-on-loud);
  filter: brightness(1.08);
}

.te-recommendation-section,
.te-directory-section {
  margin-top: clamp(2.5rem, 6vw, 4.75rem);
}

.te-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.15rem;
}

.te-section-heading h2 {
  margin-top: .35rem;
  color: var(--wa-color-text-normal);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: -.025em;
}

.te-section-heading p {
  max-width: 48rem;
  margin-top: .45rem;
  color: var(--wa-color-text-quiet);
  line-height: 1.55;
}

.te-history-note,
.te-directory-count {
  flex: 0 0 auto;
  padding: .55rem .7rem;
  border: 1px solid var(--wa-color-neutral-border-normal);
  border-radius: .35rem;
  color: var(--wa-color-text-quiet);
  background: var(--wa-color-surface-raised);
  font-size: .76rem;
}

.te-recommendation-grid,
.te-event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.te-recommendation-empty {
  min-height: 8.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem;
  border: 1px solid var(--wa-color-brand-border-normal);
  border-left: .25rem solid var(--wa-color-brand);
  border-radius: .55rem;
  background: var(--wa-color-brand-fill-quiet);
}

.te-recommendation-empty strong {
  color: var(--wa-color-text-normal);
}

.te-recommendation-empty p {
  max-width: 52rem;
  margin-top: .35rem;
  color: var(--wa-color-text-quiet);
  line-height: 1.5;
}

.te-event-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--wa-color-neutral-border-normal);
  border-radius: .55rem;
  background: var(--wa-color-surface-raised);
}

.te-event-card.is-recommended {
  border-color: var(--wa-color-brand-border-normal);
}

.te-event-media {
  min-height: 11rem;
  display: block;
  overflow: hidden;
  border-bottom: 1px solid var(--wa-color-neutral-border-normal);
  color: inherit;
  text-decoration: none;
}

.te-event-media img {
  width: 100%;
  height: 100%;
  min-height: 11rem;
  max-height: 14rem;
  display: block;
  object-fit: cover;
}

.te-event-media.has-no-cover {
  min-height: 11rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem;
  background: var(--wa-color-surface-lowered);
}

.te-event-media .te-event-type {
  align-self: flex-start;
  color: var(--wa-color-brand);
  font-size: .7rem;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.te-event-media time {
  text-align: right;
}

.te-event-media time strong,
.te-event-media time span {
  display: block;
}

.te-event-media time strong {
  color: var(--wa-color-text-normal);
  font-size: 3.3rem;
  line-height: .9;
}

.te-event-media time span {
  margin-top: .4rem;
  color: var(--wa-color-text-quiet);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.te-event-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.15rem;
}

.te-event-meta {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  color: var(--wa-color-text-quiet);
  font-size: .7rem;
}

.te-event-meta > span {
  color: var(--wa-color-brand);
  font-weight: 750;
}

.te-event-meta time {
  text-align: right;
}

.te-event-card h3 {
  color: var(--wa-color-text-normal);
  font-size: 1.2rem;
  line-height: 1.25;
}

.te-event-card h3 a {
  color: inherit;
  text-decoration: none;
}

.te-event-card h3 a:hover {
  color: var(--wa-color-brand);
}

.te-event-location,
.te-event-reason {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  color: var(--wa-color-text-quiet);
  font-size: .8rem;
  line-height: 1.45;
}

.te-event-location wa-icon,
.te-event-reason wa-icon {
  flex: 0 0 auto;
  margin-top: .13rem;
}

.te-event-reason {
  padding: .65rem .7rem;
  border-left: .18rem solid var(--wa-color-brand);
  color: var(--wa-color-brand-on-quiet);
  background: var(--wa-color-brand-fill-quiet);
}

.te-event-description {
  color: var(--wa-color-text-quiet);
  font-size: .88rem;
  line-height: 1.55;
}

.te-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: auto;
  padding-top: .35rem;
}

.te-directory-filters {
  display: grid;
  grid-template-columns: minmax(14rem, 1.35fr) repeat(3, minmax(10rem, 1fr)) auto;
  gap: .8rem;
  align-items: end;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--wa-color-neutral-border-normal);
  border-radius: .55rem;
  background: var(--wa-color-surface-raised);
}

.te-filter-field {
  min-width: 0;
}

.te-filter-field label {
  display: block;
  margin-bottom: .4rem;
  color: var(--wa-color-text-quiet);
  font-size: .72rem;
  font-weight: 720;
}

.te-filter-field input,
.te-filter-field select {
  width: 100%;
  min-height: 2.65rem;
  padding: 0 .75rem;
  border: 1px solid var(--wa-color-neutral-border-normal);
  border-radius: .38rem;
  color: var(--wa-color-text-normal);
  background: var(--wa-color-surface-lowered);
  font: inherit;
}

.te-filter-field input:focus,
.te-filter-field select:focus {
  border-color: var(--wa-color-brand-border-normal);
  outline: .13rem solid color-mix(in srgb, var(--wa-color-brand) 25%, transparent);
  outline-offset: 0;
}

.te-filter-actions {
  display: flex;
  gap: .45rem;
}

.te-filter-error {
  margin: 0 0 1rem;
  padding: .75rem 1rem;
  border-left: .2rem solid var(--wa-color-danger-border-normal);
  color: var(--wa-color-danger-on-quiet);
  background: var(--wa-color-danger-fill-quiet);
}

.te-pagination {
  margin-top: 2rem;
}

.te-public-empty {
  grid-column: 1 / -1;
  min-height: 18rem;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .75rem;
  padding: 2rem;
  border: 1px dashed var(--wa-color-neutral-border-normal);
  border-radius: .55rem;
  color: var(--wa-color-text-quiet);
  text-align: center;
}

.te-public-empty > wa-icon {
  color: var(--wa-color-brand);
  font-size: 2.3rem;
}

.te-public-empty h2 {
  color: var(--wa-color-text-normal);
}

.te-public-empty p {
  max-width: 38rem;
  line-height: 1.55;
}

/* Event creation */
.te-create-header {
  max-width: 58rem;
  margin-bottom: 1.75rem;
}

.te-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem);
  gap: 1.25rem;
  align-items: start;
}

.te-event-builder {
  min-width: 0;
  display: grid;
  gap: 1rem;
}

.te-builder-section {
  overflow: hidden;
  border: 1px solid var(--wa-color-neutral-border-normal);
  border-radius: .55rem;
  background: var(--wa-color-surface-raised);
}

.te-builder-section > header {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--wa-color-neutral-border-normal);
  background: var(--wa-color-surface-lowered);
}

.te-builder-section > header > span {
  flex: 0 0 auto;
  color: var(--wa-color-brand);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.te-builder-section h2 {
  color: var(--wa-color-text-normal);
  font-size: 1.05rem;
}

.te-builder-section header p {
  margin-top: .25rem;
  color: var(--wa-color-text-quiet);
  font-size: .78rem;
  line-height: 1.45;
}

.te-builder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.15rem;
}

.te-builder-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.te-builder-grid wa-input,
.te-builder-grid wa-select,
.te-builder-grid wa-textarea {
  width: 100%;
  min-width: 0;
}

.te-field-span-2,
.te-field-errors {
  grid-column: 1 / -1;
}

.te-field-errors:empty {
  display: none;
}

.te-builder-actions {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  padding: 1rem;
  border: 1px solid var(--wa-color-neutral-border-normal);
  border-radius: .55rem;
  background: var(--wa-color-surface-raised);
}

.te-create-guide {
  position: sticky;
  top: 1rem;
  padding: 1.2rem;
  border: 1px solid var(--wa-color-brand-border-normal);
  border-top: .22rem solid var(--wa-color-brand);
  border-radius: .55rem;
  background: var(--wa-color-surface-raised);
}

.te-create-guide h2 {
  margin-top: .45rem;
  color: var(--wa-color-text-normal);
  font-size: 1.25rem;
  line-height: 1.3;
}

.te-create-guide ol {
  display: grid;
  gap: 0;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.te-create-guide li {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  gap: .7rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--wa-color-neutral-border-normal);
}

.te-create-guide li > span {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--wa-color-neutral-border-normal);
  border-radius: 50%;
  color: var(--wa-color-brand);
  font-size: .7rem;
  font-weight: 800;
}

.te-create-guide li strong {
  color: var(--wa-color-text-normal);
  font-size: .85rem;
}

.te-create-guide li p {
  margin-top: .22rem;
  color: var(--wa-color-text-quiet);
  font-size: .75rem;
  line-height: 1.45;
}

.te-create-guide-note {
  display: flex;
  gap: .5rem;
  margin-top: 1rem !important;
  color: var(--wa-color-text-quiet);
  font-size: .75rem;
  line-height: 1.5;
}

.te-create-guide-note wa-icon {
  flex: 0 0 auto;
  margin-top: .12rem;
  color: var(--wa-color-brand);
}

@media (max-width: 68rem) {
  .te-recommendation-grid,
  .te-event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .te-directory-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .te-filter-actions {
    grid-column: 1 / -1;
  }

  .te-create-layout {
    grid-template-columns: 1fr;
  }

  .te-create-guide {
    position: static;
  }
}

@media (max-width: 48rem) {
  .te-discovery-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .te-discovery-summary {
    padding: .9rem 0 0;
    border-top: 1px solid var(--wa-color-neutral-border-normal);
    border-left: 0;
  }

  .te-section-heading,
  .te-recommendation-empty {
    align-items: flex-start;
    flex-direction: column;
  }

  .te-recommendation-grid,
  .te-event-grid,
  .te-directory-filters,
  .te-builder-grid,
  .te-builder-grid-3 {
    grid-template-columns: 1fr;
  }

  .te-field-span-2,
  .te-field-errors,
  .te-filter-actions {
    grid-column: auto;
  }
}

@media (max-width: 36rem) {
  .te-public-shell,
  .te-create-shell {
    width: min(100% - 1rem, 82rem);
  }

  .te-public-actions,
  .te-public-actions .te-button,
  .te-event-actions .te-button,
  .te-filter-actions,
  .te-filter-actions .te-button,
  .te-builder-actions,
  .te-builder-actions .te-button {
    width: 100%;
  }

  .te-builder-actions {
    flex-direction: column-reverse;
  }
}
