/* Speaker surfaces extend the site's existing typography and brand tokens. */
.speaker-page #page-heading { font-size: 2.25rem; }
.speaker-page > section[aria-labelledby="page-heading"] > div {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
@media (min-width: 640px) {
  .speaker-page #page-heading { font-size: 3.375rem; }
  .speaker-page > section[aria-labelledby="page-heading"] > div {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
}
@media (max-width: 1023px) {
  .speaker-grid .speaker-portrait { width: 75%; }
}
.speaker-portrait {
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
}

.speaker-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: var(--color-base-200);
  color: var(--color-primary);
  border: 1px solid var(--color-base-300);
}

.speaker-placeholder-initials {
  display: grid;
  place-items: center;
  width: 5.25rem;
  height: 5.25rem;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2.25rem;
  line-height: 1;
}

.speaker-placeholder-compact .speaker-placeholder-initials {
  width: auto;
  height: auto;
  border: 0;
  font-size: 1.75rem;
}

.speaker-bio-sources { margin-top: 1rem; padding-left: 1.25rem; list-style: disc; }
.speaker-programme-trigger {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: fit-content;
  min-height: 44px;
  margin-top: .5rem;
  padding: .5rem 0;
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .25em;
}
.speaker-programme-list { margin-top: 1rem; }
.speaker-programme-list li + li { margin-top: 1rem; }
.speaker-programme-list a { display: block; min-height: 44px; padding: .5rem 0; }
.speaker-programme-title { color: var(--color-primary); text-decoration: underline; text-underline-offset: .25em; }
.speaker-programme-time { display: block; margin-top: .5rem; font-size: .875rem; line-height: 1.6; }
.agenda-programme-target { scroll-margin-top: 9rem; }
.agenda-programme-target:target { outline: 2px solid var(--color-secondary); outline-offset: 6px; }
.speaker-bio-sources a {
  display: inline-block;
  padding: .5rem 0;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: .25em;
}

.speaker-bio-trigger {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-height: 44px;
  padding: .5rem 0;
  color: var(--color-primary);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
  text-underline-offset: .25em;
}

.speaker-bio-trigger::-webkit-details-marker { display: none; }
.speaker-bio-trigger:active { opacity: .7; }
@media (hover: hover) and (pointer: fine) {
  .speaker-bio-trigger:hover { text-decoration: underline; }
}

.speaker-disclosure > .speaker-bio { padding-top: 1.5rem; }
.speaker-disclosure .speaker-bio-intro { display: none; }

/* DaisyUI controls placement and dismissal; these rules shape its reading surface. */
.speaker-modal .speaker-modal-box {
  width: 100%;
  max-width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  padding: 0;
  border-radius: 1rem 1rem 0 0;
  background: var(--color-base-100);
  color: var(--color-base-content);
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--color-secondary) var(--color-base-100);
}

.speaker-modal::backdrop { background: rgb(21 19 28 / .65); }
html:has(.speaker-modal[open]) { overflow: hidden; }

.speaker-modal-toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  padding: .75rem 1rem .5rem;
  background: var(--color-base-100);
  border-bottom: 1px solid var(--color-base-300);
}

.speaker-modal .speaker-bio {
  padding: 1.5rem 1.5rem calc(2rem + env(safe-area-inset-bottom));
  overflow-wrap: anywhere;
}

.speaker-bio-intro {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem;
}

.speaker-bio-portrait {
  width: 60px;
  height: 75px;
  object-fit: cover;
  border-radius: .5rem;
}

.speaker-bio-name { font-size: 2rem; line-height: 1.1; }
.speaker-bio-name:focus { outline: none; }
.speaker-bio-heading { margin-top: 2rem; font-size: 1.5rem; line-height: 1.25; }
.speaker-bio-paragraph { margin-top: 1rem; line-height: 1.8; }
.speaker-website { margin-top: 2rem; min-height: 44px; }

@media (min-width: 768px) {
  .speaker-modal .speaker-modal-box {
    width: calc(100% - 4rem);
    max-width: 860px;
    max-height: 86vh;
    max-height: 86dvh;
    border-radius: 1rem;
  }
  .speaker-modal .speaker-bio { padding: 2rem 3rem 3rem; }
  .speaker-modal-toolbar { padding-right: 1.5rem; }
  .speaker-bio-intro { grid-template-columns: 90px minmax(0, 1fr); gap: 2rem; }
  .speaker-bio-portrait { width: 90px; height: 112.5px; }
  .speaker-bio-name { font-size: 2.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .speaker-modal, .speaker-modal .modal-box {
    transition: none;
    animation: none;
  }
}
