/* Shared legibility improvements for the FITH preview. */
.fith-polish-scope {
  --fith-readable-label: .9375rem;
  --fith-readable-caption: .875rem;
  --fith-readable-muted: #4d5b74;
  --fith-readable-field-border: #74839c;
  --fith-readable-focus: #123bc6;
  --fith-readable-error: #a41b30;
}

/* Keep supporting copy readable while preserving each page's type hierarchy. */
.fith-polish-scope .full-rich {
  font-size: 1.0625rem;
}
.fith-polish-scope :is(
  .about-breadcrumb, .contact-breadcrumb, .faq-page-breadcrumb, .full-breadcrumb,
  .lessons-breadcrumb, .pricing-breadcrumb, .programme-breadcrumb,
  .teachers-breadcrumb, .testimonials-breadcrumb, .tp-breadcrumb
) {
  flex-wrap: wrap;
  font-size: var(--fith-readable-caption);
  line-height: 1.6;
  color: var(--fith-readable-muted);
}
.fith-polish-scope :is(.guide-index__hint, .guide-index__links > a) {
  font-size: var(--fith-readable-caption);
  color: var(--fith-readable-muted);
}
.fith-polish-scope :is(
  .about-story-photo, .fith-photo-refresh-figure,
  .full-photo, .full-rich, .tp-host-life, .tp-house-detail-content,
  .tp-teacher-feature
) figcaption,
.fith-polish-scope .full-hero > .full-photo figcaption,
.fith-polish-scope :is(.tp-photo-caption, .tp-small-label, .photo-note) {
  font-size: var(--fith-readable-caption);
  line-height: 1.55;
  color: var(--fith-readable-muted);
}
.fith-polish-scope .tp-photo-caption {
  flex-wrap: wrap;
  gap: 6px 18px;
}
.fith-polish-scope .tp-photo-caption a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--fith-readable-caption);
  white-space: normal;
}
.fith-polish-scope .tp-teacher-feature figcaption span {
  font-size: inherit;
}
.fith-polish-scope .tp-small-label {
  max-width: 18ch;
}
.fith-polish-scope :is(
  .experience-body figcaption, .fith-life-film figcaption,
  .programme-photo figcaption, .about-portrait figcaption span,
  .hero-small-photo figcaption, .tp-house-detail-content p
) {
  font-size: var(--fith-readable-caption);
  line-height: 1.55;
}
.fith-polish-scope :is(.tp-mosaic-label, .tp-region-photos figcaption) {
  width: fit-content;
  max-width: calc(100% - 25px);
  padding: 4px 7px;
  border-radius: 6px;
  background: #101c43;
  font-size: var(--fith-readable-caption);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.fith-polish-scope .tp-house-details summary {
  font-size: var(--fith-readable-label);
}

/* Give navigation links room to wrap and reliable targets. */
.fith-polish-scope .fith-shared-header :is(
  .desktop-nav > a, .desktop-nav > .fith-global-nav > summary,
  .mobile-nav > a, .mobile-nav > .fith-global-nav > summary,
  .fith-region > summary
) {
  font-size: var(--fith-readable-caption);
  min-height: 44px;
}
.fith-polish-scope .fith-shared-header > .menu-toggle {
  width: 44px;
  height: 44px;
  min-width: 44px;
}
.fith-polish-scope .fith-shared-header .fith-global-panel a {
  /* Match the existing navigation type override. */
  font-size: var(--fith-readable-caption) !important;
  min-height: 44px;
}
.fith-polish-scope .fith-shared-header .fith-nav-label {
  font-size: .8125rem !important;
}
.fith-polish-scope .fith-public-footer-column ul {
  gap: 4px;
}
.fith-polish-scope .fith-public-footer-column li,
.fith-polish-scope .fith-public-footer-bottom {
  font-size: var(--fith-readable-label);
}
.fith-polish-scope :is(
  .fith-public-footer-column a, .fith-public-footer-bottom a
) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.fith-polish-scope .fith-public-footer-column a {
  width: 100%;
  overflow-wrap: anywhere;
}
.fith-polish-scope .fith-public-footer-bottom {
  flex-wrap: wrap;
}
.fith-polish-scope .fith-public-footer-bottom > nav {
  gap: 4px 20px;
}

/* Keep field labels, input boundaries and error states visible at rest. */
.fith-polish-scope :is(
  .enquiry form, .contact-form, .tp-form, .full-rich form, .full-booking,
  .full-filter, .account-form
) label {
  font-size: var(--fith-readable-label);
  line-height: 1.55;
}
.fith-polish-scope :is(
  .enquiry form, .contact-form, .tp-form, .full-rich form, .full-booking,
  .full-filter, .account-form
) :is(
  input:not([type]), input[type="text"], input[type="email"], input[type="tel"],
  input[type="date"], input[type="number"], input[type="password"], input[type="search"],
  select, textarea
) {
  font-size: 1rem;
  border-color: var(--fith-readable-field-border);
}
.fith-polish-scope :is(
  .enquiry form, .contact-form, .tp-form, .full-rich form, .full-booking,
  .full-filter, .account-form
) :is(input, textarea)::placeholder {
  font-size: inherit;
  color: var(--fith-readable-muted);
  opacity: 1;
}
.fith-polish-scope :is(
  .enquiry form, .contact-form, .tp-form, .full-rich form, .full-booking,
  .account-form
) label:has(> input:is([type="checkbox"], [type="radio"])) {
  min-height: 44px;
}
.fith-polish-scope :is(
  .form-heading > span, .form-note, .enquiry-copy .enquiry-note,
  .tp-form-preview, .tp-form-fine, .tp-form-helper, .contact-form .contact-required,
  .contact-form .contact-form-note, .contact-form .contact-form-preview,
  .account-help, .account-links, [data-enquiry-preview-note]
) {
  font-size: var(--fith-readable-caption);
  line-height: 1.65;
  color: var(--fith-readable-muted);
}
.fith-polish-scope .full-form-notice {
  font-size: var(--fith-readable-caption) !important;
}
.fith-polish-scope :is(
  .enquiry form .button, .contact-form .fith-action-primary, .tp-form > .tp-button,
  .full-rich form button, .full-rich form input[type="submit"], .full-booking button
) {
  font-size: var(--fith-readable-label);
  white-space: normal;
}
.fith-polish-scope .account-help summary {
  min-height: 44px;
  padding-block: 10px;
  line-height: 1.5;
}
.fith-polish-scope :is(
  .enquiry form, .contact-form, .tp-form, .full-rich form, .full-booking,
  .account-form
) :is(input, select, textarea):is([aria-invalid="true"], :user-invalid) {
  border-color: var(--fith-readable-error);
}
.fith-polish-scope :is(
  .enquiry form, .contact-form, .tp-form, .full-rich form, .full-booking,
  .account-form
) [role="alert"] {
  font-size: var(--fith-readable-label);
  color: var(--fith-readable-error);
}

/* Provide a visible fallback for controls without a page-specific focus style. */
.fith-polish-scope :where(main, .fith-shared-header) :where(
  a[href], button, input, select, textarea, summary
):focus-visible {
  outline: 3px solid var(--fith-readable-focus);
  outline-offset: 3px;
}
