body.site-shell:not(:has(.home-shell)) {
  --page-gap: 24px;
  --page-inset: 24px;
  --page-gutter: 34px;
}
body.site-shell:not(:has(.home-shell)) > .site-header .site-header__inner {
  width: min(100% - 2 * var(--page-gutter), var(--container));
}
body.site-shell:not(:has(.home-shell)) #main-content > :is(.container, .page-hero, .inner-hero, .prototype-page__hero) {
  width: min(100% - 2 * var(--page-gutter), var(--container));
  margin-inline-start: max(var(--page-gutter), (100vw - var(--container)) / 2) !important;
  margin-inline-end: auto !important;
}
body.site-shell:not(:has(.home-shell)) #main-content :is(.page-hero, .inner-hero, .prototype-page__hero) .breadcrumb {
  margin-inline: 0;
  inline-size: 100%;
}
body.site-shell:not(:has(.home-shell)) #main-content :is(.prototype-page__layout, .services-shell, .service-detail-shell,
.contacts-page-shell, .leadership-shell, .structure-shell,
.history-shell, .video-shell) {
  gap: var(--page-gap);
  margin-block: 0 var(--page-gap);
  min-width: 0;
}
body.site-shell:not(:has(.home-shell)) #main-content :is(.prototype-page__layout, .services-shell, .service-detail-shell,
.contacts-page-shell, .leadership-shell, .structure-shell,
.history-shell, .video-shell) > * {
  min-width: 0;
}
body.site-shell:not(:has(.home-shell)) #main-content .prototype-page__layout {
  align-items: stretch;
}
body.site-shell:not(:has(.home-shell)) #main-content .prototype-page__layout > :is(.prototype-page__content, .prototype-page__aside) {
  align-self: stretch;
  min-height: 0;
}
body.site-shell:not(:has(.home-shell)) #main-content .prototype-page__layout > .prototype-page__aside {
  align-self: start;
}
body.site-shell:not(:has(.home-shell)) #main-content .prototype-page__layout > .prototype-page__content {
  display: flex;
  flex-direction: column;
}
body.site-shell:not(:has(.home-shell)) #main-content .prototype-page__layout > .prototype-page__content > .prototype-grid {
  flex: 1 0 auto;
  align-items: stretch;
  margin-block: var(--page-gap);
}
body.site-shell:not(:has(.home-shell)) #main-content .prototype-page__layout > .prototype-page__content > :has(+ .prototype-grid) {
  margin-bottom: 0;
}
body.site-shell:not(:has(.home-shell)) #main-content :is(.prototype-page__content, .prototype-page__aside, .sidebar-panel,
.content-panel, .services-intro, .services-panel, .services-contact,
.contacts-panel, .contacts-location, .contacts-hours, .contacts-related,
.structure-intro, .structure-panel, .history-intro, .history-panel,
.person-featured, .related-links, .faq-list, .faq-aside > section,
.popular-faq, .quiz-card, .quiz-result-card, .quiz-sidebar > section,
.charter-section, .charter-toc, .charter-empty, .account-panel,
.quiz-overview > section, .qr-panel, .grading-card,
.how-it-works, .quiz-callout, .search-state) {
  padding: var(--page-inset);
  min-width: 0;
}
body.site-shell:not(:has(.home-shell)) #main-content :is(.prototype-page__content, .prototype-page__aside, .sidebar-panel,
.content-panel, .services-intro, .services-panel, .services-contact,
.contacts-panel, .contacts-location, .contacts-hours, .contacts-related,
.structure-intro, .structure-panel, .history-intro, .history-panel,
.person-featured, .related-links, .faq-list, .faq-aside > section,
.popular-faq, .quiz-card, .quiz-result-card, .quiz-sidebar > section,
.charter-section, .charter-toc, .charter-empty, .account-panel,
.quiz-overview > section, .qr-panel, .grading-card,
.how-it-works, .quiz-callout, .search-state) > :last-child {
  margin-bottom: 0;
}
body.site-shell:not(:has(.home-shell)) #main-content .prototype-page__content > .content-panel {
  padding: 0;
}
body.site-shell:not(:has(.home-shell)) #main-content :is(.prototype-page__aside, .sidebar-panel) h2 {
  font-size: 24px;
}
body.site-shell:not(:has(.home-shell)) #main-content :is(.services-main, .contacts-page-main, .service-detail-main,
.leadership-main, .structure-main, .history-main, .video-main) {
  gap: var(--page-gap);
}
body.site-shell:not(:has(.home-shell)) #main-content :is(.services-sidebar, .contacts-page-sidebar, .service-detail-sidebar,
.leadership-sidebar, .structure-sidebar, .history-sidebar, .video-sidebar,
.faq-aside, .quiz-sidebar) {
  gap: var(--page-gap);
}
body.site-shell:not(:has(.home-shell)) #main-content :is(.prototype-grid, .person-grid, .structure-grid, .contact-grid) {
  gap: 16px;
}
body.site-shell:not(:has(.home-shell)) #main-content .prototype-card {
  padding: 16px;
  min-width: 0;
}
body.site-shell:not(:has(.home-shell)) #main-content .service-catalogue__card {
  grid-row: span 3;
  grid-template-rows: subgrid;
  min-height: 0;
  row-gap: 12px;
}
body.site-shell:not(:has(.home-shell)) #main-content .service-catalogue__icon {
  grid-row: 1/span 3;
  align-self: start;
}
body.site-shell:not(:has(.home-shell)) #main-content .service-catalogue__body {
  grid-row: 1/span 3;
  grid-template-rows: subgrid;
  align-content: stretch;
  row-gap: 12px;
}
body.site-shell:not(:has(.home-shell)) #main-content .service-catalogue__link {
  align-self: start;
  align-items: flex-start;
  padding-block: 8px;
}
body.site-shell:not(:has(.home-shell)) #main-content .service-catalogue__link .icon {
  margin-top: 4px;
  flex-shrink: 0;
}
body.site-shell:not(:has(.home-shell)) #main-content .contact-card-grid .contact-card {
  grid-row: span 3;
  grid-template-rows: subgrid;
  min-height: 0;
  row-gap: 12px;
}
body.site-shell:not(:has(.home-shell)) #main-content .contact-card-grid .contact-card > .contact-card__icon {
  grid-row: 1/span 3;
  align-self: start;
}
body.site-shell:not(:has(.home-shell)) #main-content .contact-card-grid .contact-card > div {
  display: grid;
  grid-row: 1/span 3;
  grid-template-rows: subgrid;
  row-gap: 12px;
  min-width: 0;
}
body.site-shell:not(:has(.home-shell)) #main-content .contact-card-grid .contact-card > div > * {
  margin-block: 0;
  align-self: start;
}
body.site-shell:not(:has(.home-shell)) #main-content .contact-card-grid .contact-card > div > :nth-child(2) {
  min-height: 44px;
  align-items: flex-start;
}
body.site-shell:not(:has(.home-shell)) #main-content .prototype-card:has(> :is(a, .document-preview-control):last-child) {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.site-shell:not(:has(.home-shell)) #main-content .prototype-card:has(> :is(a, .document-preview-control):last-child) > :is(a, .document-preview-control):last-child {
  margin-top: auto;
}
body.site-shell:not(:has(.home-shell)) #main-content :is(.faq-layout, .quiz-session__grid) {
  gap: var(--page-gap);
}
body.site-shell:not(:has(.home-shell)) #main-content :is(.section-header, .portal-section-heading) {
  margin-bottom: 16px;
}
body.site-shell:not(:has(.home-shell)) #main-content :is(.prototype-page__hero, .page-hero, .inner-hero) {
  margin-block: var(--page-gap) !important;
  padding-block: var(--page-inset);
  padding-inline: 0;
}
body.site-shell:not(:has(.home-shell)) #main-content .container :is(.prototype-page__hero, .page-hero, .inner-hero, .page-heading, .document-page__heading) {
  width: 100%;
  margin-inline: 0;
  padding-inline: 0;
}
body.site-shell:not(:has(.home-shell)) #main-content .prototype-page__aside > .button {
  margin-top: 16px;
  margin-bottom: 0;
}
@media (max-width: 767px) {
  body.site-shell:not(:has(.home-shell)) {
    --page-gap: 16px;
    --page-inset: 16px;
    --page-gutter: 16px;
  }
  body.site-shell:not(:has(.home-shell)) #main-content :is(.prototype-page__hero--illustrated, .page-hero--image, .inner-hero) {
    padding-bottom: calc(var(--page-inset) + 210px);
  }
}

body.site-shell #main-content [data-portal-sidebar] {
  align-self: start;
}

body.site-shell #main-content [data-portal-sidebar] :is(a[href], button) {
  scroll-margin-block: var(--sidebar-top, 16px) 16px;
}

body.site-shell #main-content [data-sidebar-state=flow] {
  position: static;
}

body.site-shell #main-content [data-sidebar-state=sticky] {
  position: sticky;
  top: var(--sidebar-top, 16px);
}

@media print {
  body.site-shell #main-content [data-sidebar-state=sticky] {
    position: static;
  }
}
body.system-state-page {
  --page-gap: 24px;
  --page-inset: 24px;
}
body.system-state-page .system-state {
  margin-block: var(--page-gap);
  padding: var(--page-inset);
}
@media (max-width: 767px) {
  body.system-state-page {
    --page-gap: 16px;
    --page-inset: 16px;
  }
}

.documents-layout .documents-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.documents-layout .documents-sections [aria-current=page] {
  outline: 3px solid var(--button-focus);
  outline-offset: 3px;
}
.documents-layout .document-filters {
  --button-align-self: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 0.7fr) auto;
  gap: 16px;
  align-items: end;
}
.documents-layout .document-filters > div {
  min-width: 0;
}
.documents-layout .document-filters label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.documents-layout .document-filters :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.documents-layout .document-results {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block: 20px;
}
.documents-layout .document-results p {
  margin: 0;
}
.documents-layout .document-catalogue {
  display: grid;
  gap: 16px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.documents-layout .document-catalogue__card, .documents-layout .document-catalogue__empty {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}
.documents-layout .document-catalogue__heading {
  display: grid;
  grid-template-columns: var(--document-mark-column, 28px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.documents-layout .document-catalogue__heading > .icon {
  width: 28px;
  height: 28px;
  margin-top: 4px;
}
.documents-layout .document-catalogue__heading h2 {
  margin: 4px 0 0;
  color: var(--link);
}
.documents-layout .document-catalogue__category {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
}
.documents-layout .document-catalogue__meta {
  margin-block: 16px;
  color: var(--text-muted);
  font-size: 16px;
}
.documents-layout .document-catalogue__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

body.site-shell #main-content .documents-support {
  display: grid;
  align-content: start;
  align-self: start;
  gap: 16px;
  min-width: 0;
}
body.site-shell #main-content .documents-support .documents-support__card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
}
body.site-shell #main-content .documents-support .documents-support__card > :last-child {
  margin-bottom: 0;
}
body.site-shell #main-content .documents-support .documents-support__card--charter {
  background: var(--surface-soft);
  color: var(--text);
}
body.site-shell #main-content .documents-support .documents-support__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
body.site-shell #main-content .documents-support .documents-support__heading h2 {
  flex: 1 1 12ch;
  min-width: 0;
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  color: var(--text-heading);
  overflow-wrap: normal;
}
body.site-shell #main-content .documents-support .documents-support__icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--icon-color);
}
body.site-shell #main-content .documents-support .documents-support__icon .icon {
  width: 24px;
  height: 24px;
  color: inherit;
}
body.site-shell #main-content .documents-support p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.55;
}
body.site-shell #main-content .documents-support .documents-support__actions {
  display: grid;
  gap: 12px;
}
body.site-shell #main-content .documents-support .documents-support__actions > :is(.button, .action-link), body.site-shell #main-content .documents-support .documents-support__help {
  width: 100%;
}
body.site-shell #main-content .documents-support .documents-support__date {
  font-size: 16px;
  margin-bottom: 8px;
}
body.site-shell #main-content .documents-support .documents-support__laws {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.site-shell #main-content .documents-support .documents-support__laws > li + li {
  border-top: 1px solid var(--border);
}
body.site-shell #main-content .documents-support .documents-support__law {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: start;
  gap: 12px;
  padding: 16px 0;
  color: var(--link);
  text-decoration: none;
  border-radius: 8px;
}
body.site-shell #main-content .documents-support .documents-support__law > span {
  min-width: 0;
}
body.site-shell #main-content .documents-support .documents-support__law strong {
  display: block;
  font-size: 17px;
  line-height: 1.4;
  color: inherit;
}
body.site-shell #main-content .documents-support .documents-support__law > .icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: inherit;
}
body.site-shell #main-content .documents-support .documents-support__law:hover {
  background: var(--surface-soft);
}
body.site-shell #main-content .documents-support .documents-support__law:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.site-shell #main-content .documents-support .documents-support__law-note, body.site-shell #main-content .documents-support .documents-support__law-number {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.5;
}
body.site-shell #main-content .documents-support .documents-support__law-number {
  color: var(--link);
}
body.site-shell #main-content .documents-support .documents-support__source {
  font-size: 16px;
  margin: 8px 0 0;
}

.documents-support-jump {
  display: none;
}

@media (max-width: 900px) {
  .documents-layout .documents-support-jump {
    display: block;
  }
  body.site-shell #main-content .documents-support {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .documents-support__card:last-of-type {
    grid-column: 1/-1;
  }
}
@media (max-width: 600px) {
  body.site-shell #main-content .documents-support {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 768px) {
  body.site-shell #main-content .documents-layout :is(#documents-charter-title, #document-catalogue) {
    scroll-margin-top: max(20px, var(--site-header-height, 116px) - 116px + 20px);
  }
}
body.site-shell #main-content :is(.document-title-link, :is(h1, h2, h3) > a[data-document-original]) {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
  text-decoration: none;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  text-decoration-skip-ink: auto;
}
@media (hover: hover) and (pointer: fine) {
  body.site-shell #main-content :is(.document-title-link, :is(h1, h2, h3) > a[data-document-original]):hover {
    text-decoration-line: underline;
  }
}

.document-detail {
  margin-block: 24px;
}

.document-detail__panel {
  max-width: 1120px;
  margin-inline: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}

.document-detail__panel h1 {
  margin: 0 0 24px;
  color: var(--link);
}

.document-detail__meta {
  display: grid;
  grid-template-columns: minmax(160px, 0.4fr) minmax(0, 1fr);
  gap: 12px 24px;
  margin-block: 0 24px;
}

.document-detail__meta dt {
  color: var(--text-muted);
}

.document-detail__meta dd {
  margin: 0;
}

.document-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.document-detail__versions {
  margin-block: 28px;
}

.document-detail__versions h2 {
  margin-block: 0 12px;
}

@media (max-width: 1100px) {
  .documents-layout .document-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .document-detail__panel {
    padding: 16px;
  }
  .document-detail__meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .document-detail__meta dd {
    margin-bottom: 12px;
  }
  .document-detail__actions > a {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .documents-layout .document-catalogue__card {
    padding: 16px;
  }
  .documents-layout .document-catalogue__heading > div {
    display: contents;
  }
  .documents-layout .document-catalogue__heading h2 {
    grid-column: 1/-1;
  }
  .documents-layout .document-catalogue__actions > a {
    width: 100%;
    justify-content: center;
  }
}
