/* Human-Centered AI for Health @ ICLR 2027: site-specific overrides on top of the template styles. */

/* ICLR wordmark in the header (the SVG is dark gray; the template's dark-theme rule inverts it). */
.site-navbar-logo {
  display: block;
  width: auto;
  height: 56px;
}

.site-navbar-title {
  font-size: 1.35rem;
}

@media (min-width: 992px) and (max-width: 1199px) {
  .site-navbar-logo {
    height: 44px;
  }

  .site-navbar-title {
    font-size: 1.1rem;
  }
}



/* Phones: let the long title wrap to two lines and stop short of the theme switcher. */
@media (max-width: 767px) {
  .navbar-title-group {
    max-width: calc(100% - 112px);
  }

  .site-navbar-logo {
    height: 36px;
  }

  .site-navbar-title {
    font-size: 0.98rem;
    line-height: 1.15;
    white-space: normal;
  }
}

/* Hero background: Unsplash photo OIEwRhozdq8 by Jose Antonio Rodriguez Davia (Unsplash License),
   darkened; tune the template's green accents to the photo's deep teal. */
.health-hero,
html[data-theme="dark"] .health-hero {
  background: #020c10;
  border-bottom-color: rgba(120, 220, 230, 0.28);
}

.health-hero-art {
  background-color: #020c10;
}

.health-hero .display-text-palatino,
.health-hero .hero-workshop-text,
html[data-theme="dark"] .health-hero .display-text-palatino,
html[data-theme="dark"] .health-hero .hero-workshop-text {
  color: #f0fbfc;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.9);
}

.health-wave-line {
  stroke: #8fe3ea;
}

/* The photo already carries neuron structure; keep the template's line art but quieter. */
.health-network,
.health-brain,
.health-clinical-panel,
.health-projection,
.health-data-streams {
  opacity: 0.5;
}

/* FAQ */
.site-faq {
  margin: var(--space-4) 0 var(--space-6);
  border-top: 1px solid var(--border);
}

.site-faq details {
  border-bottom: 1px solid var(--border);
}

.site-faq summary {
  cursor: pointer;
  padding: 0.85rem 0;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.site-faq summary::-webkit-details-marker {
  display: none;
}

.site-faq summary::before {
  content: "+";
  flex: 0 0 auto;
  width: 1.1rem;
  color: var(--accent);
  font-weight: 600;
}

.site-faq details[open] summary::before {
  content: "\2013";
}

.site-faq summary:hover {
  color: var(--accent);
}

.site-faq details p {
  margin: 0 0 1rem 1.7rem;
}

/* Organizers: flex instead of grid so a trailing partial row centers (7 people -> 3/3/1 with the last one centered). */
#organizers .genai-people-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* Keynote speakers grouped by thematic area. */
.site-speaker-group {
  margin: var(--space-6) 0 var(--space-4);
  text-align: center;
}

#speakers .genai-people-grid + .site-speaker-group {
  margin-top: var(--space-7);
}

/* Panel descriptions under the agenda timeline. */
.site-panels {
  margin-top: var(--space-6);
}

.site-panels h3 {
  margin-bottom: var(--space-3);
}

/* Avoid dangling single words on wrapped lines (progressive enhancement; ignored by older browsers). */
.hero-title-top,
.hero-title-main,
.hero-title-subtitle,
.hero-workshop-text,
.section-header-title,
.genai-subsection-title,
.genai-agenda-heading,
.bento-title,
.organizer-org,
.organizer-name {
  text-wrap: balance;
}

.genai-section-copy p,
.genai-section-copy li,
.bento-desc,
.schedule-entry-session,
.genai-track-panel p,
.site-faq p,
.footer-text {
  text-wrap: pretty;
}

/* Hero subtitle: keep key phrases intact and break after "Self-Evolving Agents," on wide screens. */
.hero-title-subtitle {
  text-wrap: wrap;
}

.site-nowrap {
  white-space: nowrap;
}

@media (max-width: 767px) {
  .site-hero-break {
    display: none;
  }
}

/* Call for Papers: at-a-glance strip, compact format cards, subheads. */
.site-glance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  margin: var(--space-5) 0 var(--space-6);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.site-glance-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.site-glance-tile {
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--accent);
}

.site-glance-label {
  display: block;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-glance-tile strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--text);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

.site-glance-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.site-glance-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--button);
  border-radius: 4px;
  background: var(--button);
  color: var(--accent-contrast);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  opacity: 0.75;
  cursor: default;
  white-space: nowrap;
}

.site-glance-button em {
  font-style: normal;
  font-weight: 400;
  opacity: 0.85;
}

.site-glance-note {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  white-space: nowrap;
}

.site-format-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin: var(--space-4) 0 var(--space-5);
}

.site-format-card {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.site-format-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: var(--space-3);
}

.site-format-card h4 {
  margin: 0;
  color: var(--color-primary);
  font-size: var(--font-size-md);
}

.genai-section-copy .site-format-card p {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: 1.55;
}

.genai-section-copy .site-subhead {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--font-size-md);
}

@media (max-width: 991px) {
  .site-glance {
    grid-template-columns: 1fr;
  }

  .site-glance-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-glance-action {
    align-items: flex-start;
  }

  .site-format-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .site-glance-tiles {
    grid-template-columns: 1fr;
  }

  .site-glance-button,
  .site-glance-note {
    white-space: normal;
  }
}

/* Phones: ragged-right body text instead of justified, which leaves wide gaps at narrow widths. */
@media (max-width: 767px) {
  .genai-section-copy p,
  .genai-section-copy li,
  .bento-desc,
  .site-format-card p {
    text-align: left;
  }
}

/* Call for Papers polish: unified type in topic cards, tag pills, format icons, two-column how-to. */
.bento-desc {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: var(--text-muted);
  text-align: left;
}

.site-format-grid {
  align-items: stretch;
}

.site-format-card {
  display: flex;
  flex-direction: column;
}

.site-format-card h4 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.site-format-card h4 i {
  font-size: 1.15em;
  color: var(--accent);
}

.site-howto {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-5);
  margin: var(--space-4) 0 var(--space-5);
}

.site-howto-item {
  padding: var(--space-3) 0 var(--space-3) var(--space-3);
  border-left: 3px solid var(--accent-soft);
}

.site-howto-label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.genai-section-copy .site-howto-item p {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: 1.55;
  text-align: left;
}

@media (max-width: 767px) {
  .site-howto {
    grid-template-columns: 1fr;
  }
}

/* Ragged-right format cards on all widths. */

.genai-section-copy .site-format-card p {
  text-align: left;
}

/* Topic sub-points: a soft inset panel with a small-caps label and two aligned columns. */
.bento-topic .site-topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem var(--space-5);
  margin: var(--space-4) 0 0;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-md);
  background: var(--surface-muted);
  list-style: none;
}

.bento-topic .site-topic-list::before {
  content: "Topics include, but are not limited to";
  grid-column: 1 / -1;
  margin-bottom: 0.35rem;
  color: var(--text-subtle);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bento-topic .site-topic-list li {
  position: relative;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--font-size-sm);
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
}

.bento-topic .site-topic-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.55rem;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0.7;
}

html[data-theme="dark"] .bento-topic .site-topic-list {
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 767px) {
  .bento-topic .site-topic-list {
    grid-template-columns: 1fr;
    padding: var(--space-3) var(--space-4);
  }
}

/* Call for Papers: calmer text setting. Ragged-right, comfortable measure, cards instead of stacked bullets. */
#call-for-papers .genai-section-copy > p,
#call-for-papers .genai-section-copy > ul.genai-list {
  max-width: 92ch;
  text-align: left;
}

.site-criteria {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin: var(--space-3) 0 var(--space-4);
}

.site-criterion {
  padding-top: var(--space-3);
  border-top: 2px solid var(--accent-soft);
}

.site-criterion strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-primary);
  font-size: var(--font-size-sm);
}

.genai-section-copy .site-criterion p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  text-align: left;
}

.genai-section-copy .site-note {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: var(--space-4) 0 var(--space-6);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.site-note i {
  flex: 0 0 auto;
  margin-top: 0.15rem;
  color: var(--accent);
}

@media (max-width: 767px) {
  .site-aims,
  .site-criteria {
    grid-template-columns: 1fr;
  }
}

#call-for-papers .genai-section-copy > p.site-wide {
  max-width: none;
}

/* About: thesis on the left, aims as a quiet numbered list on the right. */
.site-about {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--space-6) var(--space-7);
  align-items: start;
  margin: var(--space-3) 0 var(--space-6);
}

.genai-section-copy .site-about-text p {
  text-align: left;
  line-height: 1.7;
}

.genai-section-copy .site-about-text p:first-child {
  color: var(--text);
  font-size: var(--font-size-md);
}

.site-about-aims {
  padding-left: var(--space-5);
  border-left: 1px solid var(--border);
}

.genai-section-copy .site-about-aims .site-subhead {
  margin-top: 0.15rem;
}

.site-aims {
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: aim;
}

.site-aims li {
  position: relative;
  padding-left: 2rem;
  counter-increment: aim;
}

.site-aims li + li {
  margin-top: var(--space-3);
}

.site-aims li::before {
  content: counter(aim, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15rem;
  color: var(--accent);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.04em;
}

.site-aims strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--text);
  font-size: var(--font-size-sm);
}

.genai-section-copy .site-aims p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.55;
  text-align: left;
}

@media (max-width: 991px) {
  .site-about {
    grid-template-columns: 1fr;
  }

  .site-about-aims {
    padding-left: 0;
    border-left: 0;
  }
}

/* Format cards: title on one line, page-limit pill beneath, the same on all three. */
.site-format-card header {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

/* Short aim descriptions: balance line lengths so no line ends on a stray word or two. */
.genai-section-copy .site-aims p,
.genai-section-copy .site-about-text p {
  text-wrap: balance;
}

/* Keynote speakers: six per row, unified photo tone, equal card heights, softer cards. */
.site-section-note {
  margin: var(--space-3) 0 var(--space-5);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

#speakers .genai-people-grid {
  --speaker-col: calc((100% - 5 * var(--space-3)) / 6);
  gap: var(--space-4) var(--space-3);
}

#speakers .genai-speaker-card {
  flex: 0 0 var(--speaker-col);
  border: 0;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
}

#speakers .genai-speaker-card:hover {
  box-shadow: var(--shadow-lg);
}

#speakers .genai-speaker-card .organizer-photo {
  filter: saturate(0.82);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  transition: filter var(--transition-normal), transform var(--transition-normal);
}

#speakers .genai-speaker-card:hover .organizer-photo {
  filter: saturate(1);
}

#speakers .genai-speaker-card .organizer-info {
  min-height: 4.9rem;
  padding: var(--space-3) var(--space-2);
}

#speakers .organizer-name {
  font-size: var(--font-size-sm);
  line-height: 1.25;
}

#speakers .organizer-org {
  font-size: var(--font-size-xs);
  line-height: 1.3;
}

@media (max-width: 991px) {
  #speakers .genai-people-grid {
    --speaker-col: calc((100% - 2 * var(--space-3)) / 3);
  }
}

@media (max-width: 575px) {
  #speakers .genai-people-grid {
    --speaker-col: calc((100% - var(--space-3)) / 2);
  }
}

/* Agenda: morning and afternoon side by side, time and session on one line, quiet event typing. */
.site-agenda {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-6);
  align-items: start;
}

.site-agenda .genai-agenda-heading {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding-top: var(--space-2);
}

.site-agenda .genai-agenda-heading span {
  color: var(--text-subtle);
  font-size: var(--font-size-sm);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.site-agenda .schedule-timeline-row {
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 0.75rem;
  min-height: 0;
}

.site-agenda .schedule-duration {
  display: none;
}

.site-agenda .schedule-entry {
  flex-direction: row;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0 0.62rem;
}

.site-agenda .schedule-entry-time {
  flex: 0 0 6.6rem;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.site-agenda .schedule-entry-session {
  color: var(--text);
  font-size: var(--font-size-sm);
  font-weight: 400;
  line-height: 1.4;
}

.site-agenda .schedule-rail span {
  top: 13px;
}

.site-agenda .site-row-keynote .schedule-rail span {
  background: var(--accent);
  border-color: var(--surface-muted);
}

.site-agenda .site-row-keynote .schedule-entry-session {
  font-weight: 500;
}

.site-agenda .site-row-panel .schedule-rail span {
  background: var(--surface);
  border-color: var(--accent);
}

.site-agenda .site-row-panel .schedule-entry-session {
  font-weight: 500;
}

.site-agenda .site-row-break .schedule-rail span {
  background: var(--surface);
  border-color: var(--border);
}

.site-agenda .site-row-break .schedule-entry-session {
  color: var(--text-subtle);
}

.site-agenda .site-agenda-col > .schedule-timeline-row:last-child .schedule-entry {
  border-bottom: 0;
}

.site-panels {
  margin-top: var(--space-5);
}

.site-panels h3 {
  margin-bottom: var(--space-2);
}

.site-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin: var(--space-2) 0 var(--space-4);
}

.site-panel-card {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.site-panel-kicker {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--accent);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-panel-card h4 {
  margin: 0 0 0.4rem;
  color: var(--text);
  font-size: var(--font-size-md);
}

.genai-section-copy .site-panel-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.55;
  text-align: left;
  text-wrap: pretty;
}

@media (max-width: 991px) {
  .site-agenda,
  .site-panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .site-agenda .schedule-entry {
    flex-direction: column;
    gap: 0.15rem;
  }

  .site-agenda .schedule-entry-time {
    flex-basis: auto;
  }
}

/* Agenda: the closing note should not add to the standard section gap. */
#schedule .site-note {
  margin-bottom: 0;
}

/* Topics intro: one short lead line, the qualifiers in smaller muted text. */
#call-for-papers .genai-section-copy > p.site-topics-lead {
  margin-bottom: var(--space-2);
  color: var(--text);
}

#call-for-papers .genai-section-copy > p.site-topics-aside {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.55;
}

/* FAQ accordion polish: chevron, hover tint, accent rule on the answer. */
.site-faq summary {
  padding: 0.85rem 0.5rem;
  margin: 0 -0.5rem;
  border-radius: 6px;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.site-faq summary:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.site-faq summary::before {
  content: "\F282";
  font-family: "bootstrap-icons";
  font-weight: 400;
  font-size: 0.85em;
  width: 1.1rem;
  color: var(--accent);
  transition: transform var(--transition-fast);
}

.site-faq details[open] summary::before {
  content: "\F282";
  transform: rotate(180deg);
}

.site-faq details p {
  margin: 0.15rem 0 1rem 1.7rem;
  padding: 0.1rem 0 0.1rem 0.9rem;
  border-left: 2px solid var(--accent-soft);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  text-align: left;
}

.genai-section-copy .site-faq-contact {
  margin: var(--space-4) 0 0;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}


/* Publication policy: a quiet callout with an accent rule. */
#call-for-papers .genai-section-copy > p.site-policy {
  max-width: none;
  margin: var(--space-3) 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

#call-for-papers .site-policy strong {
  color: var(--text);
}

html[data-theme="dark"] #call-for-papers .genai-section-copy > p.site-policy {
  background: rgba(255, 255, 255, 0.04);
}

/* Organizers: four per row, speaker-style cards, advisory committee tucked beneath. */
#organizers .genai-people-grid {
  display: grid;
  grid-template-columns: repeat(4, 200px);
  gap: var(--space-4);
  max-width: none;
  justify-content: center;
}

#organizers .genai-people-grid .organizer-card {
  border: 0;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
}

#organizers .genai-people-grid .organizer-card:hover {
  box-shadow: var(--shadow-lg);
}

#organizers .genai-people-grid .organizer-photo {
  filter: saturate(0.82);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  transition: filter var(--transition-normal), transform var(--transition-normal);
}

#organizers .genai-people-grid .organizer-card:hover .organizer-photo {
  filter: saturate(1);
}

#organizers .genai-people-grid .organizer-info {
  min-height: 4.9rem;
  padding: var(--space-3) var(--space-2);
}

#organizers .organizer-name {
  font-size: var(--font-size-sm);
  line-height: 1.25;
}

#organizers .organizer-org {
  font-size: var(--font-size-xs);
  line-height: 1.3;
}

.site-advisory {
  margin-top: var(--space-6);
}

.site-advisory-title {
  margin: 0 0 var(--space-4);
  color: var(--text-subtle);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

#organizers .site-advisory-grid {
  grid-template-columns: repeat(2, 200px);
}

@media (max-width: 991px) {
  #organizers .genai-people-grid {
    grid-template-columns: repeat(auto-fit, 200px);
  }
}

@media (max-width: 480px) {
  #organizers .genai-people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #organizers .genai-people-grid .organizer-card,
  #organizers .genai-people-grid .organizer-photo {
    width: 100%;
  }

  #organizers .genai-people-grid .organizer-photo,
  #organizers .genai-profile-overlay {
    height: auto;
    aspect-ratio: 5 / 6;
  }
}

/* Organizers: use the same container width as every other section. */
#organizers .container {
  max-width: var(--container-max-width);
}

/* Hero: rebalanced type scale, eyebrow date line, primary + ghost buttons, scroll cue. */
#home .display-text-palatino .hero-title-top {
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  opacity: 0.92;
}

#home .display-text-palatino .hero-title-main {
  font-size: clamp(2.6rem, 6vw, 4.75rem);
}

#home .display-text-palatino .hero-title-subtitle {
  font-size: clamp(1.05rem, 1.75vw, 1.5rem);
  font-weight: 400;
  line-height: 1.35;
  opacity: 0.94;
}

#home .site-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: clamp(1.2rem, 2.6vh, 1.9rem);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(0.78rem, 1vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.86;
}

#home .site-hero-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.site-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: clamp(1.4rem, 3vh, 2.2rem);
}

#home .site-hero-actions .hero-social-link {
  margin-top: 0;
}

#home .site-hero-actions .site-hero-primary {
  border-color: #f0fbfc;
  background: #f0fbfc;
  color: #06202a;
}

#home .site-hero-actions .site-hero-primary:hover {
  border-color: #ffffff;
  background: #ffffff;
  color: #06202a;
}

.site-hero-scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(1.1rem, 3vh, 2rem);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  transform: translateX(-50%);
  color: #f0fbfc;
  opacity: 0.55;
  text-decoration: none;
  animation: site-hero-bob 2.4s ease-in-out infinite;
  transition: opacity var(--transition-fast);
}

.site-hero-scroll:hover {
  color: #ffffff;
  opacity: 0.95;
  text-decoration: none;
}

.site-hero-scroll i {
  font-size: 1.25rem;
}

@keyframes site-hero-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

@media (prefers-reduced-motion: reduce) {
  .site-hero-scroll {
    animation: none;
  }
}

@media (max-width: 767px) {
  #home .site-hero-eyebrow {
    flex-direction: column;
    gap: 0.35rem;
    letter-spacing: 0.1em;
  }

  #home .site-hero-sep {
    display: none;
  }

  .site-hero-scroll {
    display: none;
  }
}

/* Navigation bar: flat translucent bar, underline for the active link, switcher inline, phone menu. */
#header {
  padding: 0.55rem 1rem;
  background: var(--glass-bg-strong);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.navbar-container {
  flex-wrap: nowrap;
  gap: 0.75rem;
}

#navbar {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  gap: 0.25rem;
  justify-content: flex-end;
  align-items: center;
}

.nav-link,
.nav-link.active,
.nav-link:active,
.nav-link:hover,
html[data-theme="dark"] .nav-link.active,
html[data-theme="dark"] .nav-link:active,
html[data-theme="dark"] .nav-link:hover {
  position: relative;
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.005em;
}

.nav-link {
  color: var(--text-muted) !important;
}

.nav-link:hover,
.nav-link.active,
.nav-link:active {
  color: var(--text) !important;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0.6);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.theme-switcher,
html[data-theme="dark"] .theme-switcher {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  flex-direction: row;
  gap: 2px;
  margin-left: 0.75rem;
  padding: 3px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.theme-option {
  width: 30px;
  min-height: 30px;
  font-size: 0.85rem;
}

.theme-option:hover {
  background: var(--surface);
  border-color: transparent;
  box-shadow: none;
}

.theme-option[aria-pressed="true"],
html[data-theme="dark"] .theme-option[aria-pressed="true"] {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  transform: none;
}

.mobile-nav-toggle {
  display: none;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

@media (min-width: 992px) and (max-width: 1199px) {
  .site-navbar-logo {
    height: 42px;
  }

  .site-navbar-title {
    font-size: 1.02rem;
  }

  .nav-link,
  .nav-link.active,
  .nav-link:active,
  .nav-link:hover {
    padding: 0.4rem 0.5rem;
    font-size: 0.88rem;
  }

  .nav-link::after {
    left: 0.5rem;
    right: 0.5rem;
  }
}

@media (max-width: 991px) {
  .navbar-container {
    flex-wrap: nowrap;
    gap: 0.6rem;
  }

  .navbar-title-group {
    flex: 1 1 auto !important;
    min-width: 0;
    max-width: none;
  }

  #navbar {
    display: none;
    margin-left: 0;
  }

  #navbar.navbar-mobile {
    display: flex;
    gap: 0;
    padding: 0.5rem 1.25rem 0.75rem;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #navbar.navbar-mobile .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }

  #navbar.navbar-mobile .nav-link:last-child {
    border-bottom: 0;
  }

  #navbar.navbar-mobile .nav-link::after {
    display: none;
  }

  .theme-switcher,
  html[data-theme="dark"] .theme-switcher {
    margin-left: 0;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .site-navbar-logo {
    height: 34px;
  }

  .site-navbar-title {
    font-size: 0.95rem;
  }
}

/* Keep the bar on one line between 992 and 1320px; the template stacks it there. */
@media (min-width: 992px) and (max-width: 1320px) {
  .navbar-title-group {
    justify-content: flex-start;
    width: auto !important;
  }

  #navbar {
    flex: 0 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end !important;
    height: 100%;
    gap: 0.25rem;
  }
}

/* Phone menu: natural height, links from the top. */
@media (max-width: 991px) {
  #navbar.navbar-mobile {
    height: auto;
    justify-content: flex-start;
    align-items: stretch;
  }
}

/* Footer: separated from the page, three balanced columns, aligned dates, quiet bottom line. */
.site-footer {
  padding: var(--space-7) 0 var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #141416;
}

html[data-theme="dark"] .site-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: #0b0b0c;
}

.site-footer .container {
  max-width: var(--container-max-width);
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: var(--space-6);
}

.site-footer-brand img {
  display: block;
  width: 104px;
  height: auto;
  margin-bottom: var(--space-3);
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.site-footer-brand strong {
  display: block;
  color: var(--footer-text);
  font-family: 'Palatino', 'Palatino Linotype', serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.site-footer-brand > span {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
  color: var(--footer-muted);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.site-footer-col strong {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--footer-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
}

.site-footer-col a,
.site-footer-col .site-footer-note {
  display: block;
  margin-top: 0.45rem;
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.site-footer-col a {
  color: #d8dadf;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-footer-col a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-col .site-footer-note {
  margin-top: var(--space-3);
  color: var(--footer-muted);
  font-size: var(--font-size-xs);
  text-wrap: pretty;
}

.site-footer-dates {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 0.9rem;
  margin: 0.45rem 0 0;
}

.site-footer-dates dt {
  color: var(--footer-muted);
  font-size: var(--font-size-sm);
}

.site-footer-dates dd {
  margin: 0;
  color: #d8dadf;
  font-size: var(--font-size-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.site-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem var(--space-5);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--footer-muted);
  font-size: var(--font-size-xs);
}

.site-footer-bottom a {
  color: var(--footer-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-bottom a:hover {
  color: #ffffff;
}

@media (max-width: 991px) {
  .site-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575px) {
  .site-footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .site-footer-bottom {
    flex-direction: column;
  }
}

/* Footer wrap fixes: date labels on one line, brand title balanced, date line stacked. */
.site-footer-dates dt {
  white-space: nowrap;
}

.site-footer-brand strong {
  text-wrap: balance;
}

.site-footer-brand > span {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.site-footer-dot {
  display: none;
}

.site-footer-brand .site-footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.site-footer-brand .site-footer-meta span {
  display: block;
}

/* Topic sub-points: flowing columns instead of a row-aligned grid, so no holes beside long items. */
.bento-topic .site-topic-list {
  display: block;
  columns: 2;
  column-gap: var(--space-5);
}

.bento-topic .site-topic-list::before {
  display: block;
  column-span: all;
  margin-bottom: 0.6rem;
}

.bento-topic .site-topic-list li {
  break-inside: avoid;
  margin-bottom: 0.5rem;
}

.bento-topic .site-topic-list li:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .bento-topic .site-topic-list {
    columns: 1;
  }
}

/* Slightly tighter rhythm between sections (template: 3.75rem top and bottom). */
section:not(.hero) {
  padding: 3rem 0;
}

/* Pin the hero artwork to the hero itself, not the viewport. */
#home.health-hero {
  position: relative;
  overflow: hidden;
}

/* "Tentative" as a small tag beside a section title. */
.section-header-title .site-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.6rem;
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.68rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transform: translateY(-0.15em);
}

/* Keyboard focus rings on the interactive elements this site adds. */
.nav-link:focus-visible,
.site-hero-actions a:focus-visible,
.site-hero-scroll:focus-visible,
.mobile-nav-toggle:focus-visible,
.site-faq summary:focus-visible,
.site-footer a:focus-visible,
.organizer-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Respect reduced-motion: stop the hero's drifting line art and waves. */
@media (prefers-reduced-motion: reduce) {
  .health-hero-art *,
  .health-wave-overlay * {
    animation: none !important;
  }

  .fade-in {
    transition: none;
  }
}

/* Navbar lockup: themed logo (no filter), neutral title with a hairline divider, slightly smaller mark. */
.navbar-logo img,
html[data-theme="dark"] .navbar-logo img {
  filter: none !important;
}

.site-navbar-logo {
  height: 46px;
}

.site-logo-dark {
  display: none;
}

html[data-theme="dark"] .site-logo-light {
  display: none;
}

html[data-theme="dark"] .site-logo-dark {
  display: block;
}

.navbar-title.site-navbar-title {
  gap: 0;
  color: var(--text) !important;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.navbar-title.site-navbar-title::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.5rem;
  margin-right: 1rem;
  background: var(--border);
}

.navbar-title.site-navbar-title:hover {
  color: var(--text) !important;
  opacity: 0.8;
}

.navbar-title-group {
  gap: 0.75rem;
}

@media (min-width: 992px) and (max-width: 1199px) {
  .site-navbar-logo {
    height: 38px;
  }

  .navbar-title.site-navbar-title {
    font-size: 1rem;
  }
}

@media (max-width: 767px) {
  .site-navbar-logo {
    height: 30px;
  }

  .navbar-title.site-navbar-title {
    font-size: 0.92rem;
  }

  .navbar-title.site-navbar-title::before {
    height: 1.9rem;
    margin-right: 0.7rem;
  }
}

/* Phone lockup: two clean lines for the title. */
@media (max-width: 767px) {
  .site-navbar-logo {
    height: 28px;
  }

  .navbar-title.site-navbar-title {
    font-size: 0.88rem;
    line-height: 1.2;
    text-wrap: balance;
  }
}

/* Accent: a muted teal in place of the template's brown, so the whole page shares the hero's palette. */
:root {
  --accent: #0f6e74;
  --accent-hover: #0b565b;
  --accent-soft: rgba(15, 110, 116, 0.13);
  --accent-contrast: #ffffff;
  --button: #0f6e74;
  --button-hover: #0b565b;
  --focus-ring: rgba(15, 110, 116, 0.25);
  --color-primary: #0f6e74;
  --color-primary-light: #3f9aa0;
  --color-primary-dark: #0b565b;
  --color-secondary: #2f7f85;
  --color-secondary-light: #5fb0b5;
  --color-secondary-dark: #0b565b;
  --color-accent: #0f6e74;
  --color-accent-light: #3f9aa0;
  --color-accent-dark: #0b565b;
}

html[data-theme="dark"] {
  --accent: #7fd6dc;
  --accent-hover: #a6e6ea;
  --accent-soft: rgba(127, 214, 220, 0.16);
  --accent-contrast: #06202a;
  --button: #7fd6dc;
  --button-hover: #a6e6ea;
  --focus-ring: rgba(127, 214, 220, 0.3);
  --color-primary: #8fdce1;
  --color-primary-light: #b9ecef;
  --color-primary-dark: #5fc3c9;
  --color-secondary: #7fd6dc;
  --color-secondary-light: #b9ecef;
  --color-secondary-dark: #5fc3c9;
  --color-accent: #7fd6dc;
  --color-accent-light: #b9ecef;
  --color-accent-dark: #5fc3c9;
}

/* The template's leftover lime: title underline bar and list bullets. */
.section-header-component::after,
.section-header-row::after,
.section-header-component .section-header-row::after {
  background: var(--accent);
}

main ul li::marker,
footer ul li::marker {
  color: var(--accent);
}

/* Hero buttons keep their own light styling on the dark image. */
#home .site-hero-actions .hero-social-link:hover {
  border-color: rgba(240, 251, 252, 0.7);
}

.section-header-component::before {
  background: var(--accent);
}
