/*
  Learn pages (Resources, Community, Showcase), event detail pages and the
  extra Events-page pieces (status tags, past events list).
  Builds on events.css and uses the shared DES27 palette.
*/


/* ---------- Shared bits ---------- */

.ed-section {
  position: relative;
  isolation: isolate;
  padding-block: clamp(3rem, 6.5vw, 6rem);
  background: var(--des-white);
}

.ed-section--cream {
  background: linear-gradient(180deg, #fbfaf8 0%, var(--des-cream) 100%);
}

.ed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.75rem);
}

.ed-head .ev-heading {
  margin: 0;
}

.ed-head__text {
  margin: 0;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  font-weight: 500;
  line-height: 1.3;
  text-align: right;
}

/* status / badge tags */
.ed-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.4em 0.85em;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1.5px solid transparent;
  border-radius: 999px;
}

.ed-pill::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  background: currentColor;
  border-radius: 50%;
}

.ed-pill--open { color: var(--des-ink); background: var(--des-lime); }
.ed-pill--open::before { animation: pulse 1.6s ease-in-out infinite; }
.ed-pill--coming-soon { color: var(--des-blue); background: var(--des-white); border-color: var(--des-blue); }
.ed-pill--closed { color: #5f5f6b; background: #e6e6ea; }
.ed-pill--asked { color: var(--des-lime); background: var(--des-ink); }
.ed-pill--staff { color: var(--des-ink); background: var(--des-lime); }
.ed-pill--peer { color: var(--des-blue); background: var(--des-white); border-color: var(--des-blue); }
.ed-pill--award { color: var(--des-ink); background: var(--des-lime); }
.ed-pill--asked::before,
.ed-pill--staff::before,
.ed-pill--peer::before,
.ed-pill--award::before { display: none; }

@keyframes pulse {
  50% { opacity: 0.25; }
}

.ev-card__status {
  position: absolute;
  z-index: 1;
  top: 0.8rem;
  left: 0.8rem;
}

.ed-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.ed-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ed-chips li {
  padding: 0.3em 0.75em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--des-blue);
  background: rgba(43, 75, 196, 0.07);
  border-radius: 999px;
}

/* solid blue button (light backgrounds) */
.des-btn--solid {
  color: var(--des-white);
  background: var(--des-blue);
}

.des-btn--solid::before {
  background: var(--des-ink);
}

/* lime button (blue backgrounds) */
.ed-btn--lime {
  color: var(--des-ink);
  background: var(--des-lime);
  border-color: var(--des-lime);
}

.ed-btn--lime:hover,
.ed-btn--lime:focus-visible {
  border-color: var(--des-white);
}

.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.ed-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--des-blue);
  text-underline-offset: 0.25em;
}

/* blue band, same as the Events featured section */
.ed-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(3rem, 6.5vw, 6rem);
  color: var(--des-on-blue);
  background: var(--des-blue-surface);
  background-blend-mode: soft-light, normal;
}

.ed-band .ev-heading__script { color: var(--des-lime); }

.ed-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.ed-band__inner .ev-heading { margin: 0; }

.ed-band__inner p {
  margin: 0;
  font-weight: 500;
  line-height: 1.35;
}


/* ---------- Learn sub-navigation ---------- */

.ed-subnav {
  position: relative;
  z-index: 5;
  background: var(--des-cream);
  border-block: 2px solid var(--des-blue);
}

.ed-subnav ul {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ed-subnav a {
  position: relative;
  display: block;
  padding: 0.9rem 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.2rem, 1.9vw, 1.7rem);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--des-ink);
  transition: color 0.3s;
}

.ed-subnav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.55rem;
  height: 3px;
  background: var(--des-lime);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}

.ed-subnav a:hover { color: var(--des-blue); }

.ed-subnav a[aria-current="page"] { color: var(--des-blue); }

.ed-subnav a:hover::after,
.ed-subnav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}


/* ---------- Event detail page ---------- */

.ed-back {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--des-white);
  text-decoration: none;
  opacity: 0.85;
}

.ed-back svg {
  width: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s var(--ease-out);
}

.ed-back:hover { opacity: 1; }
.ed-back:hover svg { transform: translateX(-4px); }

.ed-event-hero .ev-featured__inner {
  min-height: clamp(30rem, 44vw, 40rem);
}

.ed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Add to calendar menu */
.ed-cal {
  position: relative;
}

.ed-cal summary {
  list-style: none;
  cursor: pointer;
}

.ed-cal summary::-webkit-details-marker { display: none; }

.ed-cal[open] summary .ev-arrow { transform: rotate(180deg); }

.ed-cal__menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 100%;
  padding: 0.4rem;
  background: var(--des-white);
  border-radius: 10px;
  box-shadow: 0 20px 40px -18px rgba(13, 13, 40, 0.45);
  animation: menu-in 0.35s var(--ease-out);
}

.ed-cal__menu a {
  display: block;
  padding: 0.7rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--des-ink);
  text-decoration: none;
  border-radius: 6px;
}

.ed-cal__menu a:hover { color: var(--des-blue); background: var(--des-cream); }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
}

.ed-event-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}

.ed-prose p {
  max-width: 38em;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.65;
}

.ed-block {
  margin-top: clamp(2rem, 3.5vw, 3rem);
}

.ed-block h3 {
  margin-bottom: 0.9rem;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
  text-transform: uppercase;
}

.ed-block p { max-width: 38em; line-height: 1.65; }

.ed-block-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0 3rem;
}

.ed-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ed-list li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.6rem;
  border-bottom: 1px solid rgba(43, 75, 196, 0.18);
}

.ed-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--des-blue);
  border-radius: 50%;
}

/* key dates timeline */
.ed-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 1.6rem 0 0;
  list-style: none;
}

.ed-timeline::before {
  content: "";
  position: absolute;
  top: 0.45rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--des-blue);
  transform-origin: left;
  transition: transform 1.4s var(--ease-in-out);
}

.js .ed-block:not(.is-visible) .ed-timeline::before { transform: scaleX(0); }

.ed-timeline li {
  position: relative;
  display: grid;
  gap: 0.25rem;
}

.ed-timeline li::before {
  content: "";
  position: absolute;
  top: -1.55rem;
  left: 0;
  width: 0.9rem;
  height: 0.9rem;
  background: var(--des-lime);
  border: 2px solid var(--des-blue);
  border-radius: 50%;
}

.ed-timeline time {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.6rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--des-blue);
}

.ed-timeline time .script {
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: normal;
}

.ed-timeline span { font-size: 0.9rem; font-weight: 500; }

/* details card */
.ed-info {
  position: sticky;
  top: 6rem;
  padding: clamp(1.25rem, 2vw, 1.75rem);
  background: var(--des-white);
  border: 2px solid var(--des-blue);
  border-radius: 12px;
  box-shadow: 0 24px 50px -36px rgba(43, 75, 196, 0.6);
}

.ed-info__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.8rem;
  text-transform: uppercase;
}

.ed-info dl { margin: 0 0 1.25rem; }

.ed-info dl > div {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(43, 75, 196, 0.18);
}

.ed-info dt {
  margin-bottom: 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b6b78;
}

.ed-info dd {
  margin: 0;
  font-weight: 600;
}

/* photo gallery */
.ed-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ed-gallery__item {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 2px solid var(--des-blue);
  border-radius: 10px;
}

.ed-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

.ed-gallery__item:hover img { transform: scale(1.06); }

/* enlarged image viewer (learn.js) */
.ed-lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  color: var(--des-white);
  background: rgba(10, 12, 40, 0.94);
  border: 0;
}

.ed-lightbox[open] {
  display: grid;
  place-items: center;
  animation: fade-in 0.35s var(--ease-out);
}

.ed-lightbox figure {
  display: grid;
  gap: 0.8rem;
  justify-items: center;
  margin: 0;
}

.ed-lightbox img {
  max-width: min(90vw, 1400px);
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  animation: zoom-in 0.45s var(--ease-out);
}

.ed-lightbox figcaption { font-size: 0.9rem; opacity: 0.8; }

.ed-lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  padding: 0;
  font-size: 1.4rem;
  color: var(--des-white);
  background: transparent;
  border: 2px solid var(--des-white);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.ed-lightbox button:hover { color: var(--des-ink); background: var(--des-lime); border-color: var(--des-lime); }
.ed-lightbox [data-close] { top: 1.5rem; right: 1.5rem; }
.ed-lightbox [data-prev] { left: 1.5rem; top: 50%; translate: 0 -50%; }
.ed-lightbox [data-next] { right: 1.5rem; top: 50%; translate: 0 -50%; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes zoom-in { from { opacity: 0; transform: scale(0.94); } }


/* ---------- Events page: past events list ---------- */

.ed-past-list {
  max-width: 52rem;
  margin: clamp(2rem, 4vw, 3.5rem) auto 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--des-blue);
}

.ed-past-list a {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 0.5rem;
  color: var(--des-ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(43, 75, 196, 0.25);
  transition: background-color 0.4s, padding 0.5s var(--ease-out);
}

.ed-past-list time, .ed-past-list .ev-when { font-size: 0.875rem; font-weight: 600; color: var(--des-blue); }

.ed-past-list__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  text-transform: uppercase;
}

.ed-past-list__meta { font-size: 0.8rem; font-weight: 600; color: #6b6b78; }

.ed-past-list .ev-arrow { font-size: 1.3rem; color: var(--des-blue); }

.ed-past-list a:hover {
  padding-inline: 1.25rem;
  background: var(--des-cream);
}

.ed-past-list a:hover .ev-arrow { transform: translate(3px, -3px); }

.ev-card__title a {
  color: inherit;
  text-decoration: none;
}


/* ---------- Resources ---------- */

.ed-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.ed-search,
.ed-select select {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--des-ink);
  background-color: var(--des-white);
  border: 2px solid var(--des-blue);
  border-radius: 6px;
}

.ed-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 14rem;
  padding: 0 0.9rem;
}

.ed-search svg {
  flex: none;
  width: 1.1rem;
  fill: none;
  stroke: var(--des-blue);
  stroke-width: 2;
  stroke-linecap: round;
}

.ed-search input {
  width: 100%;
  padding: 0.75rem 0;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  outline: none;
}

.ed-search:focus-within { box-shadow: 0 0 0 3px rgba(43, 75, 196, 0.25); }

.ed-select select {
  appearance: none;
  padding: 0.75rem 2.4rem 0.75rem 0.9rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%233a4fe0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 1rem;
}

.ed-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.ed-toggle input {
  appearance: none;
  position: relative;
  width: 2.6rem;
  height: 1.5rem;
  margin: 0;
  background: #d5d8ea;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.ed-toggle input::after {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  background: var(--des-white);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: translate 0.35s var(--ease-out);
}

.ed-toggle input:checked { background: var(--des-blue); }
.ed-toggle input:checked::after { translate: 1.1rem 0; }

/* Phone-only parts of the filters (see the small-screen rules below) */
.ed-filters__open,
.ed-filters__scrim,
.ed-filters__sheet-head {
  display: none;
}

.ed-filters__sheet {
  display: contents;
}

.ed-filters__count {
  margin: 0 0 0 auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b6b78;
}

.ed-res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ed-res {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}

.ed-res[hidden] { display: none; }

.ed-res.is-shown { animation: card-in 0.6s var(--ease-out) both; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
}

.ed-res:hover {
  transform: translateY(-6px);
}

/* same photo box as the event cards: grey with a blue border */
.ed-res__preview {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--des-grey);
  border: 2px solid var(--des-blue);
  border-radius: 10px;
}

.ed-res__preview img { width: 100%; height: 100%; object-fit: cover; }

.ed-res__badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
}

.ed-res__body {
  background: var(--des-white);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(13, 13, 13, 0.04), 0 8px 24px -16px rgba(13, 13, 13, 0.18);
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem 1.35rem 1.4rem;
}

.ed-res__type {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--des-blue);
}

.ed-res__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  line-height: 1.05;
}

.ed-res__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ed-res__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.6rem;
}

.ed-res__actions .des-btn { padding: 0.65em 1.1em; font-size: 0.85rem; }

.ed-res__soon { font-size: 0.75rem; font-weight: 600; color: #6b6b78; }

/* YouTube thumbnail with a play button, when a resource has no preview image */
.ed-res__video {
  display: block;
  width: 100%;
  height: 100%;
}

.ed-res__video img { transition: transform 0.8s var(--ease-out); }
.ed-res:hover .ed-res__video img { transform: scale(1.05); }

.ed-res__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  translate: -50% -50%;
  color: var(--des-on-blue);
  background: var(--des-blue);
  border-radius: 50%;
  box-shadow: 0 8px 20px -8px rgba(13, 13, 40, 0.6);
  transition: scale 0.4s var(--ease-out);
}

.ed-res:hover .ed-res__play { scale: 1.1; }

.ed-res__play svg { width: 1.3rem; height: 1.3rem; margin-left: 0.15rem; fill: currentColor; }

/* the card's YouTube tutorials */
.ed-res__videos {
  display: grid;
  gap: 0.35rem;
  margin: 0.2rem 0 0;
  padding: 0.7rem 0 0;
  list-style: none;
  border-top: 1px solid rgba(43, 75, 196, 0.15);
}

.ed-res__videos a {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.3rem 0.35rem;
  margin: 0 -0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--des-ink);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s, color 0.3s;
}

.ed-res__videos a:hover { color: var(--des-blue); background: rgba(43, 75, 196, 0.07); }

.ed-res__videos svg {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0.2rem;
  margin-top: 0.05rem;
  fill: var(--des-on-blue);
  background: var(--des-blue);
  border-radius: 50%;
}

.ed-res__videos small {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: #6b6b78;
}

.ed-empty {
  padding: 2rem;
  text-align: center;
  font-weight: 500;
  border: 2px dashed rgba(43, 75, 196, 0.35);
  border-radius: 12px;
}


/* ---------- Community ---------- */

.ed-team,
.ed-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ed-person { display: flex; flex-direction: column; }

.ed-team__dots { display: none; }

.ed-person__photo { aspect-ratio: 1 / 1.08; }

/* initials until there is a photo */
.ed-person__initials {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(3rem, 6vw, 5rem);
  color: var(--des-on-blue);
  background: var(--des-blue-surface);
  background-blend-mode: soft-light, normal;
}

.ed-person__body { display: flex; flex: 1; flex-direction: column; }

.ed-person__name { max-width: none; margin-bottom: 0.1rem; }

.ed-person__role {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--des-blue);
}

.ed-person__meta {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b6b78;
}

.ed-person__bio {
  margin: 0 0 0.8rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ed-person__ask {
  align-self: flex-start;
  margin-top: 1rem;
  padding: 0.6em 1em;
  font-size: 0.82rem;
}

.ed-person .ed-chips { margin-top: auto; }

.ed-band .ev-featured__curve { height: 85%; }

.ed-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.ed-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  backdrop-filter: blur(6px);
}

.ed-panel p { margin: 0; line-height: 1.5; }

.ed-panel__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--des-lime);
}

.ed-panel__title {
  padding: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.ed-panel__note { font-size: 0.8rem; opacity: 0.75; }

.ed-poll fieldset {
  display: grid;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.ed-poll legend { margin-bottom: 0.75rem; }

.ed-poll__option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  font-weight: 600;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.ed-poll__option input {
  appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.ed-poll__option:hover { background: rgba(255, 255, 255, 0.12); }

.ed-poll__option:has(input:checked) {
  color: var(--des-ink);
  background: var(--des-lime);
  border-color: var(--des-lime);
}

.ed-poll__option input:checked {
  background: var(--des-ink);
  box-shadow: inset 0 0 0 2px var(--des-lime);
}

.ed-panel .ed-pill { vertical-align: middle; }

/* FAQ */
.ed-faq-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 5rem);
}

.ed-faq { border-top: 2px solid var(--des-blue); }

.ed-faq details { border-bottom: 1px solid rgba(43, 75, 196, 0.25); }

.ed-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  transition: color 0.3s;
}

.ed-faq summary::-webkit-details-marker { display: none; }
.ed-faq summary:hover { color: var(--des-blue); }

.ed-faq__icon {
  position: relative;
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
}

.ed-faq__icon::before,
.ed-faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--des-blue);
  transition: transform 0.45s var(--ease-out);
}

.ed-faq__icon::after { transform: rotate(90deg); }
.ed-faq details[open] .ed-faq__icon::after { transform: rotate(0deg); }
.ed-faq details[open] .ed-faq__icon::before { transform: rotate(180deg); }

.ed-faq details p {
  margin: 0 0 1.25rem;
  max-width: 40em;
  line-height: 1.6;
  animation: menu-in 0.45s var(--ease-out);
}

/* chat links */
.ed-chat {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
}

.ed-chat__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  background: var(--des-white);
  border: 2px solid var(--des-blue);
  border-radius: 14px;
}

.ed-chat__card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2rem, 3.5vw, 3rem);
  text-transform: uppercase;
  color: var(--des-blue);
}

.ed-chat__card p { margin: 0 0 0.5rem; }


/* ---------- Showcase ---------- */

.ed-byline {
  margin: -0.5rem 0 1rem;
  font-weight: 600;
  color: var(--des-lime);
}

.ed-projects .ev-card__media a { display: block; height: 100%; }

.ed-note {
  margin: clamp(2rem, 3vw, 2.5rem) 0 0;
  font-size: 0.85rem;
  text-align: center;
  color: #6b6b78;
}

.ed-note a { color: var(--des-blue); }


/* ---------- Small screens ---------- */

@media (max-width: 47.99em) {
  .ed-event-grid,
  .ed-faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .ed-info { position: static; }
  .ed-head__text { text-align: left; }
  .ed-filters__count { margin-left: 0; }
  .ed-past-list a { grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 1rem; }
  .ed-past-list time, .ed-past-list .ev-when { grid-column: 1 / -1; }
  .ed-past-list__meta { display: none; }

  /* Filters: search stays on the page, the rest slides up in a panel */
  .ed-filters { gap: 0.6rem; }
  .ed-search { flex: 1 1 0; }

  .ed-filters__open {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--des-blue);
    background: var(--des-white);
    border: 2px solid var(--des-blue);
    border-radius: 6px;
    align-self: stretch;
  }

  .ed-filters__open svg {
    width: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
  }

  .ed-filters__active {
    display: inline-grid;
    place-items: center;
    min-width: 1.35rem;
    height: 1.35rem;
    font-size: 0.7rem;
    color: var(--des-on-blue);
    background: var(--des-blue);
    border-radius: 999px;
  }

  .ed-filters__active[hidden] { display: none; }
  .ed-filters__count { flex-basis: 100%; margin: 0.2rem 0 0; }

  .ed-filters__scrim {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: block;
    background: rgba(13, 13, 40, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
  }

  .ed-filters__sheet {
    position: fixed;
    z-index: 121;
    left: 0.75rem;
    right: 0.75rem;
    bottom: var(--dock-gap, 0.75rem);
    display: grid;
    gap: 0.75rem;
    padding: 1.1rem 1.1rem 1.4rem;
    background: var(--des-cream);
    border-radius: 1.4rem;
    box-shadow: 0 -10px 40px -16px rgba(13, 13, 40, 0.45);
    translate: 0 calc(100% + 2rem);
    visibility: hidden;
    transition: translate 0.45s var(--ease-in-out), visibility 0s 0.45s;
  }

  .is-sheet-open .ed-filters__sheet {
    translate: none;
    visibility: visible;
    transition: translate 0.6s var(--ease-out);
  }

  .is-sheet-open .ed-filters__scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .ed-filters__sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .ed-filters__sheet-head p {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: var(--display-weight);
    text-transform: uppercase;
  }

  .ed-filters__sheet-head .ed-link {
    padding: 0.5rem 0;
    font: inherit;
    font-weight: 600;
    background: none;
    border: 0;
  }

  .ed-select select { width: 100%; }

  /* Resource cards: picture on the left, details on the right, so a list of
     them doesn't turn into a very long scroll */
  .ed-res-grid { gap: 0.75rem; }

  .ed-res {
    flex-direction: row;
    gap: 0;
    overflow: hidden;
    background: var(--des-white);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(13, 13, 13, 0.04), 0 8px 24px -16px rgba(13, 13, 13, 0.18);
  }

  .ed-res:hover { transform: none; }

  .ed-res__preview {
    flex: 0 0 32%;
    aspect-ratio: auto;
    border-radius: 10px 0 0 10px;
  }

  .ed-res__badge {
    top: 0.45rem;
    left: 0.45rem;
    max-width: calc(100% - 0.9rem);
    font-size: 0.55rem;
    white-space: normal;
  }

  .ed-res__body {
    gap: 0.4rem;
    padding: 0.9rem 1rem 1rem;
    border-radius: 0;
    box-shadow: none;
  }

  .ed-res__title { font-size: 1.3rem; }

  .ed-res__text {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .ed-chips li:nth-child(n + 4) { display: none; }

  /* Team: a swipe row, one person in the middle (events.js sets the focus) */
  .ed-team {
    display: flex;
    gap: 0.9rem;
    margin: 0 calc(-1 * var(--des-gutter));
    padding: 0.5rem 12vw 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .ed-team::-webkit-scrollbar { display: none; }

  .ed-team > li {
    flex: 0 0 76vw;
    scroll-snap-align: center;
  }

  .ed-person__photo { aspect-ratio: 1 / 0.85; }

  .ed-team__dots {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
  }

  /* Showcase: two smaller columns, details on the project's photo tap */
  .ed-projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .ed-projects .ev-card__media { aspect-ratio: 1; }
  .ed-projects .ev-card__body { padding: 0.75rem 0.8rem 0.9rem; }
  .ed-projects .ev-card__title { margin-bottom: 0.3rem; font-size: 1.2rem; max-width: none; }
  .ed-projects .ed-person__meta { margin: 0; font-size: 0.68rem; }
  .ed-projects .ed-person__bio { display: none; }
  .ed-projects .ev-card__status { top: 0.5rem; left: 0.5rem; font-size: 0.55rem; }
  .ed-res__actions { padding-top: 0.3rem; }
  .ed-res__actions .des-btn { font-size: 0.78rem; }
  /* compact phone cards: the Watch button opens the first video */
  .ed-res__videos, .ed-res__soon { display: none; }
  .ed-res__play { width: 2.2rem; height: 2.2rem; }
  .ed-res__play svg { width: 0.95rem; height: 0.95rem; }
}

/* the tab bar and header step aside while the filter panel is open */
.sheet-open {
  overflow: hidden;
}

.sheet-open .des-dock {
  translate: -50% calc(100% + 2rem);
}

.sheet-open .des-header {
  translate: 0 -100%;
}


.ed-timeline__when {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.35rem;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--des-blue);
}

.ed-info__note {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b6b78;
}
