/* RGYS spacing refinement — loaded last on every page.
   Independent surfaces have small elliptical corners; full-bleed backgrounds,
   circular icons and the internal seams of a table keep their intended geometry. */
:root {
  --rgys-radius-surface: 10px / 8px;
  --rgys-radius-control: 8px / 6px;
  --rgys-radius-detail: 6px / 4px;
  --rgys-box-inline: clamp(20px, 2vw, 30px);
  --rgys-box-block: clamp(20px, 2vw, 28px);
}

/* Shared content surfaces, including imported guide and FAQ components. */
body :is(
  .licence-card, .index-card, .price-card, .contact-form, .chapter,
  .search-panel, .faq-search-panel, .faq-library-note, .faq-item, .faq-tag,
  .info-note, .warning-note, .more-types, .journey-card, .knowledge-card,
  .consult-card, .search-result, .empty-state, .advisor-mini, .policy-teaser,
  .source-reading-overview, .source-appendix-navigation, .source-editor-note,
  .source-facts > div, .source-content-portals a, .source-appendix-links a,
  .office-card, .presentation-viewer, .presentation-toc,
  .presentation-download-panel, .presentation-source-note,
  .presentation-static-list img, .case-transparency, .case-promo, .case-intent,
  .case-intent-note, .case-sidebar, .presentation-intro,
  .presentation-static-list, .presentation-empty, .presentation-promo,
  .design-page-toc, .design-compare-mobile-card
) {
  border-radius: var(--rgys-radius-surface);
}

body :is(.info-note, .warning-note, .source-facts > div, .faq-tag) {
  padding: var(--rgys-box-block) var(--rgys-box-inline);
}

body :is(.info-note, .warning-note, .source-facts > div, .faq-tag) > :first-child {
  margin-top: 0;
}

body :is(.info-note, .warning-note, .source-facts > div, .faq-tag) > :last-child {
  margin-bottom: 0;
}

/* Bordered controls: keep round contact/play/close icons recognizably round. */
body :is(
  .btn, .button, .contact-btn, .menu-toggle, .hero-film, .search-clear,
  .copy-link, .search-tags button, .faq-tools button, .faq-search-hints button,
  .faq-category-controls button, .presentation-fullscreen, .presentation-nav,
  .presentation-page-button, .presentation-download, .presentation-open-pdf,
  .presentation-promo > a, .office-actions a, .office-tag, .case-type,
  .masthead-quick-link, .masthead-shortcuts a, .inquiry-submit,
  .inquiry-field input, .inquiry-field select, .inquiry-field textarea,
  .field input, .field select, .field textarea, .search-input,
  .faq-search-panel input, .case-intent-field input,
  .case-intent-field select, .case-intent-field textarea
) {
  border-radius: var(--rgys-radius-control);
}

body .header-editorial .contact-btn,
body .quick-contact .button,
body #quick-inquiry .quick-inquiry-cta {
  border-radius: var(--rgys-radius-control);
}

body .quick-contact .quick-qr button {
  border-radius: var(--rgys-radius-control);
}

body .presentation-stage,
body .presentation-slide img {
  border-top-left-radius: 10px 8px;
  border-top-right-radius: 10px 8px;
}

/* No links or controls live in this definition grid; clipping only rounds its fill. */
body .design-compare-mobile-card {
  overflow: hidden;
}

body :is(
  .field input, .field select, .field textarea, .inquiry-field input,
  .inquiry-field select, .inquiry-field textarea, .case-intent-field input,
  .case-intent-field select, .case-intent-field textarea,
  .search-input, .faq-search-panel input
):not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
  padding: 12px 16px;
  font-size: 16px;
}

body :is(.contact-panel, #quick-inquiry, .modal-box) {
  border-radius: var(--rgys-radius-surface);
}

body :is(.pill, .faq-keywords > span) {
  border-radius: var(--rgys-radius-detail);
}

/* Give the first/last lines room around an accordion's border. */
body :is(.source-editor-note, .faq-item) > summary {
  padding: 16px 20px;
}

body .source-editor-note > p,
body .source-editor-note > .source-keywords-content {
  padding-inline: 20px;
}

body .faq-library .faq-answer {
  padding: 22px 24px;
}

body .source-content-portals a {
  padding: 18px 20px;
}

/* The photographed defect: nine separate links, no text touching the frame. */
body .source-appendix-links,
body .global-atlas-page .source-appendix-links {
  gap: 10px 18px;
}

body .source-appendix-links a,
body .global-atlas-page .source-appendix-links a {
  min-height: 56px;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid #d5ddd3;
  border-radius: var(--rgys-radius-control);
  background: #fffdf9;
  overflow-wrap: anywhere;
}

body .source-appendix-links a > span:last-child {
  flex: 0 0 auto;
}

body .source-appendix-navigation > .source-appendix-links {
  padding-block: 8px;
}

/* Tables keep all columns in a keyboard-scrollable rounded outer viewport.
   Internal cells stay connected: rounding every cell would create visual gaps. */
body :is(.table-wrap, .source-table-scroll) {
  margin-block: 24px 30px;
  border: 1px solid #d4dcd2;
  border-radius: var(--rgys-radius-surface);
  overflow-x: auto;
  background: #fff;
}

body :is(.data-table, .chapter-content table, .faq-rich table, .extras-content table) {
  border-collapse: separate;
  border-spacing: 0;
}

body :is(.data-table th, .data-table td),
body .chapter-content :is(th, td),
body .faq-rich :is(th, td),
body .extras-content :is(th, td) {
  padding: 16px 20px;
  line-height: 1.8;
  vertical-align: top;
}

body .chapter-content :is(th, td),
body .faq-rich :is(th, td),
body .extras-content :is(th, td) {
  border: 0;
  border-right: 1px solid #dbe2d0;
  border-bottom: 1px solid #dbe2d0;
}

body :is(.chapter-content, .faq-rich, .extras-content) tr > :last-child {
  border-right: 0;
}

body :is(.chapter-content, .faq-rich, .extras-content) tr:last-child > * {
  border-bottom: 0;
}

/* Global atlas: preserve the composition, soften independently bordered groups. */
body .global-atlas-page :is(
  .global-atlas-hero, .global-directory-metrics, .global-region-nav,
  .global-service-region, .global-source-disclosure, .global-extra,
  .global-extra-disclosure, .about-identity, .about-editorial-card,
  .global-editorial-card, .global-process-step
) {
  border-radius: var(--rgys-radius-surface);
}

body .global-atlas-page :is(
  .global-service-search-row input, .global-service-search-row button,
  .global-results-toolbar button, .global-search-presets button,
  .global-service-actions button, .global-atlas-links a, .global-region-link,
  .global-region-toggle, .global-process-step > div:first-child
) {
  border-radius: var(--rgys-radius-control);
}

body .global-atlas-page .global-directory-metrics {
  margin-top: 12px;
  border: 1px solid #d8ddd4;
  overflow: hidden;
}

body .global-atlas-page .global-region-nav {
  padding: 18px 10px;
}

body .global-atlas-page .global-region-nav-label {
  margin-inline: 10px;
}

body .global-atlas-page .global-region-link {
  padding-inline: 12px;
}

body .global-atlas-page .global-service-region {
  margin-top: 14px;
  border: 1px solid #d0d9d1;
  background: #fffdf9;
}

body .global-atlas-page .global-service-region > summary {
  padding: 16px 18px;
}

body .global-atlas-page .cv-grid {
  padding: 0 12px 12px;
}

body .global-atlas-page .cv-country-card.global-service-card {
  padding: 16px 12px;
  border-radius: var(--rgys-radius-detail);
}

body .global-atlas-page :is(.global-source-disclosure, .global-extra-disclosure) {
  border: 1px solid #d0d9d1;
}

body .global-atlas-page :is(.global-source-disclosure, .global-extra-disclosure) > summary {
  gap: 16px;
  padding: 16px 20px;
}

body .global-atlas-page .global-source-disclosure > :not(summary),
body .global-atlas-page .global-extra-disclosure > .global-extra-body {
  padding: 8px 20px 24px;
}

body .global-atlas-page :is(.about-editorial-grid, .global-editorial-grid) {
  gap: 18px;
  border: 0;
}

body .global-atlas-page :is(.about-editorial-card, .global-editorial-card) {
  padding: 28px;
  border: 1px solid #d0d9d1;
  background: #fffdf9;
}

body .global-atlas-page .global-process-steps {
  gap: 12px;
  border: 0;
}

body .global-atlas-page .global-process-step {
  border: 1px solid #d0d9d1;
}

body .global-atlas-page .global-extra .extras-content :is(th, td) {
  padding: 16px 20px;
}

@media (max-width: 960px) {
  body .global-atlas-page .global-region-nav {
    padding: 16px 10px 12px;
  }
}

@media (max-width: 760px) {
  body :is(.source-appendix-links a, .global-atlas-page .source-appendix-links a) {
    padding: 14px 16px;
  }

  body .faq-library .faq-answer {
    padding: 20px 18px;
  }

  body :is(.data-table th, .data-table td),
  body .chapter-content :is(th, td),
  body .faq-rich :is(th, td),
  body .extras-content :is(th, td),
  body .global-atlas-page .global-extra .extras-content :is(th, td) {
    padding: 14px 16px;
  }

  body .global-atlas-page :is(.about-editorial-card, .global-editorial-card) {
    padding: 22px 20px;
  }

  body .global-atlas-page .global-service-region > summary {
    padding: 16px;
  }

  body .global-atlas-page .cv-grid {
    padding: 0 8px 8px;
  }

  body .global-atlas-page .cv-country-card.global-service-card {
    padding: 16px 10px;
  }
}

@media print {
  body :is(.table-wrap, .source-table-scroll) {
    overflow: visible;
    border-radius: 0;
  }
}
