/* Shared public-page controls: compact groups with comfortable touch targets. */
body.readable-site {
  --control-font-size: 15px;
  --control-gap: 8px;
}
body.readable-site [hidden] { display: none !important; }

body.readable-site :is(
  .btn, .button, button.primary, .proposal-button, .section-share-button,
  .irida-launch, .irida-send, .irida-share-button, .ellada-opinion-toggle,
  .ellada-send, .gold-button, .outline-button, .contact-channel, .city-change,
  .city-submit, .survey-retry, .priority-proposal-link, .priority-family-link,
  .news-btn, .news-archive-btn, .bf-home__button, .family-navigation a,
  .submit, button[type="submit"], input[type="submit"], form button:not([type]),
  .survey-visible-link, .municipality-survey-link, .bio-read-link, .health-14-link,
  .io-live-read, .hw-channel, .hw-action, .hw-close, .hw-copy,
  .irida-question-ideas > button,
  .family-share button, .bronco-invitation__sharing a,
  .bronco-invitation__sharing button, .ellada-meeting-actions a
) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  justify-self: start;
  flex: 0 1 auto;
  gap: 6px;
  width: auto;
  min-width: 44px;
  max-width: 100%;
  min-height: 44px;
  margin-inline: 0;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: var(--control-font-size) !important;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  text-decoration: none;
  touch-action: manipulation;
}

body.readable-site :is(
  .hero-actions, .proposal-actions, .family-contact-links, .family-navigation,
  .section-share-tools, .irida-share-tools, .share-actions, .ellada-meeting-actions,
  .contact-channels, .bronco-invitation__actions, .bronco-invitation__sharing,
  .eventcard .actions, .bf-home__links, .hw-choices
) {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--control-gap);
}
body.readable-site.readable-topic :is(.proposal-actions, .family-navigation) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Topic pages previously stretched every action to a separate full-width row. */
body.readable-site.readable-topic .proposal-actions > :is(a, button),
body.readable-site.readable-topic .irida-launch,
body.readable-site :is(.cost-hero, .women-hero, .housing-hero, .care-hero) .proposal-button,
body.readable-site .family-contact-links a,
body.readable-site .invitation-copy > .gold-button,
body.readable-site .poster-registration .gold-button,
body.readable-site .share-actions button,
body.readable-site .eventcard .actions :is(a, button),
body.readable-site .ellada-meeting-actions a {
  width: auto;
  max-width: 100%;
  flex: 0 1 auto;
}

body.readable-site .irida-actions {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
body.readable-site .irida-actions-note { flex: 1 1 220px; text-align: left; }
body.readable-site :is(.irida-launch, .irida-send) svg { flex: none; }
body.readable-site .site-header .nav .nav-cta {
  align-self: flex-start;
  width: auto;
  min-height: 44px;
  padding: 9px 14px;
}

body.readable-site .section-share-tools { gap: 8px; margin-top: 14px; }
body.readable-site .section-share-tools .section-share-button,
body.readable-site .bf-home__controls .section-share-button {
  font-size: 14px !important;
  padding: 8px 12px;
}
body.readable-site .section-share-feedback:empty { display: none; }

body.readable-site .bronco-invitation.bronco-invitation--compact :is(
  .bronco-invitation__actions, .bronco-invitation__sharing
) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}
body.readable-site .bronco-invitation.bronco-invitation--compact :is(
  .bronco-invitation__register, .bronco-invitation__share
) {
  width: auto;
  flex: 0 1 auto;
  min-height: 44px;
  padding: 9px 14px;
  font-size: 15px !important;
  line-height: 1.35 !important;
}
body.readable-site .bronco-invitation.bronco-invitation--compact .bronco-invitation__sharing :is(a, button) {
  font-size: 14px !important;
}

/* Municipality choices remain grouped instead of occupying fourteen large rows. */
body.readable-site.home-page #dimoi .municipality-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.readable-site.home-page #dimoi .municipality-item {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  gap: 8px;
  border-radius: 12px;
  font-size: 14px !important;
  line-height: 1.35;
}
body.readable-site.home-page #dimoi .municipality-item > span:first-child { min-width: 0; }

/* Four related surprise actions, in source and keyboard order. */
body.readable-site .bf-home__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
}
body.readable-site .bf-home__controls :is(.bf-home__button, .section-share-button) {
  flex: 0 1 auto;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px !important;
  line-height: 1.35;
}
body.readable-site .bf-home__button--open { width: auto; }
body.readable-site .bf-home__button--open span { flex: none; }
body.readable-site .bf-home__controls .section-share-button { box-shadow: none; }

@media (max-width: 640px) {
  body.readable-site .bf-home__controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 420px;
    margin-inline: auto;
    padding: 12px;
  }
  body.readable-site .bf-home__controls > :is(a, button) {
    align-self: stretch;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
  }
  body.readable-site .bf-home__options { margin-top: 0; }
  body.readable-site .bf-home__links a { padding: 8px 12px; font-size: 14px; }
}

@media (max-width: 360px) {
  body.readable-site { --control-font-size: 14px; }
  body.readable-site .bf-home__controls :is(a, button) { font-size: 13px !important; }
}
