/* Shared public type scale and form geometry. Colours and font families stay
   in their existing component styles. Homepage tiles/banners retain their own scale. */
:root {
  --liw-reading-size: 17px;
  --liw-page-heading-size: 36px;
  --liw-section-heading-size: 26px;
  --liw-subheading-size: 22px;
  --liw-topic-heading-size: 20px;
  --liw-related-title-size: 17px;
  --liw-form-radius: 6px;
  --lwd-body-size: var(--liw-reading-size);
  --lwd-section-title-size: var(--liw-section-heading-size);
  --lwd-subheading-size: var(--liw-subheading-size);
}

/* Static prose is no longer dependent on a list of database-specific page IDs. */
body.page:not(.home) #main article.page > .entry-content,
body.page:not(.home) #main .liw-regiolinks,
body.page:not(.home) #main .al-archive,
body #main .liw-forum {
  font-size: var(--liw-reading-size);
  line-height: 1.65;
}
body.page:not(.home) #main article.page > .entry-content > :is(p,ul,ol),
body #main .liw-regiolinks > header p,
body #main .liw-regiolinks-list {
  font-size: var(--liw-reading-size);
  line-height: 1.65;
}
body.page:not(.home) #main :is(article.page > .entry-content > h1, .hero-section h1.page-title,
  .entry-header h1.entry-title, .liw-regiolinks > header h1),
body #main .lwd-results-heading h1,
body #main .liw-forum > h1.liw-forum-page-title {
  font-size: var(--liw-page-heading-size) !important;
  line-height: 1.25 !important;
}
body.page:not(.home) #main article.page > .entry-content > h2,
body #main .liw-regiolinks-group > h2 {
  font-size: var(--liw-section-heading-size) !important;
  line-height: 1.3 !important;
}
body.page:not(.home) #main article.page > .entry-content > h3 {
  font-size: var(--liw-subheading-size) !important;
  line-height: 1.3 !important;
}

/* Forum titles should have a clear hierarchy above the discussion text. */
body #main .liw-forum :is(h2,h3) {
  font-size: var(--liw-topic-heading-size) !important;
  line-height: 1.3 !important;
}
body #main .liw-forum :is(.liw-forum-heading,.liw-forum-topic-header) > h2 {
  font-size: var(--liw-section-heading-size) !important;
}
body.single-post #main .ct-related-posts > .ct-module-title {
  font-size: 22px !important;
  line-height: 1.3 !important;
}
body.single-post #main .ct-related-posts :is(.related-entry-title,.related-entry-title a) {
  font-size: var(--liw-related-title-size) !important;
  line-height: 1.45 !important;
}

/* Same news-list reading size on the homepage and every other route. */
body .lwd-sidebar-latest-posts :is(li a,.lwd-sidebar-post-title) {
  font-size: 16px !important;
  line-height: 1.35 !important;
}
body #main .al-archive { --al-title-size: 16px; }
body #main .al-archive .al-results time { white-space: nowrap; }

/* Geometry only: preserve backgrounds, text colours, button widths and actions.
   Exclude hidden fields, honeypots, checkboxes, radios and icon-only controls. */
body #main form :is(input:not([type]),input[type="text"],input[type="search"],
  input[type="email"],input[type="url"],input[type="tel"],input[type="password"],
  input[type="number"],input[type="date"],textarea,select):not(.lwd-newsletter-honeypot) {
  box-sizing: border-box;
  max-width: 100%;
  border-radius: var(--liw-form-radius);
  font-size: var(--liw-reading-size);
  line-height: 1.4;
}
body #main form :is(input:not([type]),input[type="text"],input[type="search"],
  input[type="email"],input[type="url"],input[type="tel"],input[type="password"],
  input[type="number"],input[type="date"],select):not(.lwd-newsletter-honeypot) {
  min-height: 46px;
  padding: 10px 12px;
}
body #main form :is(button[type="submit"],input[type="submit"],button:not([type])):not(.ct-toggle-close),
body #main :is(.wp-element-button,.wp-block-button__link) {
  border-radius: var(--liw-form-radius);
  font-size: var(--liw-reading-size);
  line-height: 1.3;
}
body #main :is(.al-search button,.lwd-newsletter-form button,.liw-forum-form > button) {
  min-height: 46px;
  padding: 10px 18px;
  border-radius: var(--liw-form-radius);
  font-size: var(--liw-reading-size);
  line-height: 1.3;
}
/* Combined popup keeps its white container and existing coloured icon button. */
@layer liwwadders-keyboard-focus {
  html body #search-modal :is(input.modal-field,.wp-element-button) {
    border-radius: var(--liw-form-radius) !important;
  }
}

@media (max-width: 689.98px) {
  :root {
    --liw-reading-size: 16px;
    --liw-page-heading-size: 28px;
    --liw-section-heading-size: 23px;
    --liw-subheading-size: 21px;
    --liw-topic-heading-size: 18px;
    --liw-related-title-size: 16px;
    --lwd-post-title-size: 32px;
  }
  body.single-post #main .ct-related-posts > .ct-module-title { font-size: 20px !important; }
}
