/* Public service forms and article enquiry modules share their secondary controls. */
#contenuto, #contenuto :where(.cp-form-card, .quote-card, .cr-request, .ec-card, .cp-feature) {
  --action-ink: #193b56;
  --action-surface: #fff;
  --action-edge: #8c9faf;
  --action-hover: #e8eff4;
  --action-fill: #193b56;
  --action-on-fill: #fff;
  --action-fill-hover: #284f70;
}
#contenuto :where(.cp-service-hero, .cp-contact-hero, .cp-guide-hero, .cp-catalog-hero,
  .profile-opening, .cp-closing, .cp-budget-map, .cp-national-hero, .cp-vigevano-hero) {
  --action-ink: #f4f8fd;
  --action-surface: #193652;
  --action-edge: #92a8bc;
  --action-hover: #294a65;
  --action-fill: #ecd3a1;
  --action-on-fill: #11283d;
  --action-fill-hover: #ffe5b4;
}

/* Navigation uses anchors; the same treatment is used for form actions and disclosures. */
#contenuto :is(
  a.cp-text-link, button.cp-text-link, .cp-button, .booking-direct,
  .cp-contact-shortcuts a, .cp-direct-links a, .cp-contact-copy .credass-public-profiles a,
  .cr-request-submit, .cr-request-uncertain button, .cr-request-uncertain a, .cr-request-fallback a,
  .cm-card-secondary, .cm-card-primary, .cm-card-variants a, .ci-profile-links a,
  .ci-profile-shortcuts a, .ci-search-summary > a, .ci-reading-list a,
  .profile-sources a, .cp-feature h3 a, .cp-document-list h3 a, .cp-tools li a,
  .cp-feature li a, .ci-profile-body li a, .cp-section .cp-wrap > ul > li > a,
  .quote-support a, .quote-sources a, .quote-disclosure a, .cg-link, .cg-quotes a,
  .cp-vigevano-service a, .cp-vigevano-direct a
) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  padding: .57rem .95rem;
  border: 1px solid var(--action-edge);
  border-radius: .5rem;
  background: var(--action-surface);
  color: var(--action-ink);
  font: 650 .95rem/1.3 var(--ci-sans, system-ui, sans-serif);
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  white-space: normal;
  cursor: pointer;
}
#contenuto :is(.cp-button:not(.cp-button-secondary, .cp-vigevano-whatsapp), .cr-request-submit, .cm-card-primary) {
  border-color: var(--action-fill);
  background: var(--action-fill);
  color: var(--action-on-fill);
}
#contenuto :where(.cp-breadcrumb, .booking-crumb, .cg-breadcrumb) a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: .22rem .65rem;
  border: 1px solid var(--action-edge);
  border-radius: .45rem;
  background: var(--action-surface);
  color: var(--action-ink);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

/* Inline references keep their place in the sentence and can wrap across lines. */
#contenuto :where(.cp-wrap p, .cp-source, .ci-reading-copy p, .cr-request-consent,
  .cp-consent, .cb-consent, .ec-privacy) a:not([class]),
#contenuto .cp-wrap p > a.cp-text-link:not(:only-child) {
  display: inline;
  margin: 0;
  padding: .08em .32em;
  border: 1px solid var(--action-edge);
  border-radius: .32em;
  background: var(--action-surface);
  color: var(--action-ink);
  font-weight: 600;
  text-decoration: none;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  overflow-wrap: anywhere;
}
#contenuto :is(.quote-support, .quote-sources) a:not([class]),
#contenuto .cp-form-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem .85rem;
}
#contenuto :is(.cp-actions, .cp-service-links, .cp-contact-shortcuts, .booking-actions,
  .booking-manual-actions, .cm-product-actions, .ci-profile-links, .profile-sources,
  .quote-actions, .cg-actions, .cp-direct-links) { gap: .5rem; }
#contenuto .cp-service-links { margin-top: .8rem; }
#contenuto .cp-contact-shortcuts { margin-top: 1.1rem; }
#contenuto .cp-direct-links a { flex-direction: column; align-items: flex-start; gap: .12rem; text-align: start; }
#contenuto .cp-direct-links a :is(span, strong) { color: inherit; }
#contenuto .cp-direct-links a:hover strong { text-decoration: none; }
#contenuto :is(.ci-reading-list, .cm-card-variants ul, .cp-tools ul, .cp-feature ul):has(> li > a) {
  display: grid;
  gap: .4rem;
  list-style: none;
  padding-inline-start: 0;
}
#contenuto :is(.ci-reading-list, .cm-card-variants ul, .cp-tools ul, .cp-feature ul) li > a {
  justify-content: flex-start;
  text-align: start;
}
#contenuto :is(.cp-document-list, .cp-feature) h3 a { justify-content: flex-start; text-align: start; }
#contenuto .ci-profile-links { justify-content: flex-start; }
#contenuto :is(.cp-faq, .cp-form-card, .cm-card-variants, .cr-request-options, .quote-goal) summary {
  box-sizing: border-box;
  min-height: 44px;
  padding: .62rem .9rem;
  border: 1px solid var(--action-edge);
  border-radius: .5rem;
  background: var(--action-surface);
  color: var(--action-ink);
  font-weight: 650;
  cursor: pointer;
}
#contenuto .cp-faq details { margin-top: .5rem; border: 0; }
#contenuto .cp-faq details > p { padding: .75rem .9rem 1rem; }
#contenuto :is(.cm-card-variants, .cr-request-options, .quote-goal) { border-top: 0; }
#contenuto :is(.cm-card-variants, .cr-request-options, .quote-goal)[open] > summary { margin-bottom: .6rem; }
#contenuto :is(a, button, summary):focus-visible {
  outline: 3px solid #996813;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff;
}
#contenuto :is(.cp-actions, .cp-service-links, .cp-contact-shortcuts, .cp-direct-links, .booking-actions,
  .booking-manual-actions, .cm-product-actions, .ci-profile-links, .profile-sources, .cg-actions,
  .cr-request-uncertain, .cp-breadcrumb, .booking-crumb, .cg-breadcrumb, .cp-faq)
  :is(a, button:enabled, summary):hover,
#contenuto :is(a.cp-text-link, button.cp-text-link:enabled, .cp-button-secondary, .ci-reading-list a):hover {
  background: var(--action-hover);
  color: var(--action-ink);
  text-decoration: none;
}
#contenuto :is(a.cp-button:not(.cp-button-secondary, .cp-vigevano-whatsapp),
  button.cp-button:enabled:not(.cp-button-secondary), .cr-request-submit:enabled, .cm-card-primary):hover {
  border-color: var(--action-fill-hover);
  background: var(--action-fill-hover);
  color: var(--action-on-fill);
  text-decoration: none;
}
#contenuto :is(.cp-button, .cr-request-submit):disabled { cursor: default; opacity: .65; }
@media (max-width: 38rem) {
  #contenuto :is(.cp-service-hero-grid, .cp-contact-copy, .profile-opening) .cp-actions,
  #contenuto :is(.cp-service-links, .booking-actions, .booking-manual-actions, .quote-actions) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-items: stretch;
  }
  #contenuto :is(.cp-actions, .cp-contact-shortcuts, .booking-manual-actions, .cm-product-actions) > :is(a, button),
  #contenuto .cr-request-submit { width: 100%; justify-content: center; }
  #contenuto .cp-contact-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
}

/* The document intake has its own shell and a native, multi-file upload control. */
body:has(#document-intake) :is(header nav > a:not(:has(img)), footer a, .receipt a,
  #chosen-files button, .privacy-note summary) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: .5rem .85rem;
  border: 1px solid #8c9faf;
  border-radius: .5rem;
  background: #fff;
  color: #193b56;
  font-weight: 650;
  text-decoration: none;
  overflow-wrap: anywhere;
}
#document-intake .privacy-note summary { display: list-item; width: fit-content; }
#document-intake input::file-selector-button { min-height: 44px; border-radius: .5rem; }
#document-intake .send { background: #193b56; color: #fff; border-radius: .5rem; }
#document-intake .send:enabled:hover { background: #284f70; }
#document-intake :is(.privacy-note, .consent, noscript) a {
  padding: .08em .32em;
  border: 1px solid #8c9faf;
  border-radius: .32em;
  background: #fff;
  color: #193b56;
  text-decoration: none;
  font-weight: 600;
  overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
