/* Final responsive shell overrides. Loaded after all legacy portal styles. */
@media (max-width: 1023px) {
  .app-header { min-width: 0; overflow: visible; }
  .header-actions { min-width: 0; flex-wrap: nowrap; }
  .header-control.rig-control { display: inline-flex !important; min-width: 44px; }
  #quickActionsShell { display: block !important; }
}

/* Final enterprise application header system. */
:root {
  --app-header-height: 68px;
  --app-header-control-height: 44px;
  --app-header-gap: 8px;
  --app-header-control-radius: 10px;
  --app-header-card-radius: 12px;
}

.app-header {
  min-height: var(--app-header-height);
  height: var(--app-header-height);
  padding: 0 20px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  background: var(--e-surface, var(--panel));
  border-bottom: 1px solid var(--e-line, var(--line));
  box-shadow: 0 1px 3px rgba(17, 41, 48, .05);
}

.app-header .brand-lockup {
  grid-column: 1;
  min-width: 0;
  gap: 10px;
}

.app-header .brand-lockup h1 {
  font-size: 18px;
  line-height: 1.15;
}

.app-header .brand-lockup .eyebrow {
  margin-bottom: 2px;
  font-size: 10px;
  line-height: 1.1;
}

.app-header .global-search-shell {
  grid-column: 2;
  width: min(100%, 520px);
  justify-self: start;
}

.app-header .header-actions {
  grid-column: 3;
  min-width: 0;
  height: var(--app-header-control-height);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--app-header-gap);
}

.app-header .header-help,
.app-header .header-icon-button,
.app-header .header-notification,
.app-header .header-control,
.app-header .company-identity {
  height: var(--app-header-control-height);
  min-height: var(--app-header-control-height);
  margin: 0;
  box-sizing: border-box;
  border: 1px solid var(--e-line, var(--line));
  border-radius: var(--app-header-control-radius);
  background: color-mix(in srgb, var(--e-surface, var(--panel)) 92%, var(--e-surface-2, var(--surface-soft)) 8%);
  box-shadow: none;
}

.app-header .header-help,
.app-header .header-icon-button,
.app-header .header-notification,
.app-header .header-control {
  color: var(--e-text, var(--ink));
}

.app-header .header-help:hover,
.app-header .header-icon-button:hover,
.app-header .header-notification:hover,
.app-header .header-control:hover:not(:disabled) {
  color: var(--e-teal, var(--primary));
  background: var(--e-surface-2, var(--surface-soft));
  border-color: color-mix(in srgb, var(--e-teal, var(--primary)) 32%, var(--e-line, var(--line)));
  transform: none;
}

.app-header button:focus-visible {
  outline: 2px solid var(--e-teal, var(--primary));
  outline-offset: 2px;
  box-shadow: none;
}

.app-header button:focus:not(:focus-visible) {
  outline: 0;
}

.app-header .rig-control {
  width: 140px;
  padding: 0 10px;
  gap: 8px;
  justify-content: flex-start;
}

.app-header .rig-control > .ui-icon:first-child {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.app-header .header-control-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 1px;
  text-align: left;
  line-height: 1.05;
}

.app-header .header-control-copy small {
  color: var(--e-text-3, var(--muted));
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0;
}

.app-header .header-control-copy strong {
  min-width: 0;
  overflow: hidden;
  color: var(--e-text, var(--ink));
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header .header-control-chevron,
.app-header .user-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.app-header .header-help {
  width: 84px;
  padding: 0 12px;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}

.app-header .header-help span {
  display: inline;
}

.app-header .header-help .ui-icon,
.app-header .header-icon-button .ui-icon,
.app-header .header-notification .ui-icon {
  width: 19px;
  height: 19px;
}

.app-header .header-icon-button,
.app-header .header-notification {
  width: 44px;
  min-width: 44px;
  padding: 0;
  justify-content: center;
}

.app-header #companyDisplay.company-identity {
  width: 230px;
  min-width: 230px;
  max-width: 230px;
  height: var(--app-header-control-height) !important;
  min-height: var(--app-header-control-height) !important;
  padding: 4px 12px 4px 6px;
  display: flex !important;
  align-items: center;
  gap: 14px;
  border-radius: var(--app-header-card-radius);
}

.app-header #companyDisplay .company-logo-compact {
  width: 70px;
  height: 36px;
  flex: 0 0 70px;
  padding: 3px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--e-line, var(--line)) 80%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--e-surface-2, var(--surface-soft)) 70%, transparent);
  box-shadow: none;
}

.app-header #companyDisplay .company-logo-compact img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.app-header #companyDisplay .company-logo-compact > span {
  font-size: 14px;
  font-weight: 750;
}

.app-header #companyDisplay .company-identity-copy {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.app-header #companyDisplay .company-identity-copy strong {
  display: block;
  overflow: hidden;
  color: var(--e-text, var(--ink));
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header .user-control {
  width: 220px;
  max-width: 220px;
  padding: 0 10px;
  gap: 9px;
  justify-content: flex-start;
  border-radius: var(--app-header-card-radius);
}

.app-header .user-control .avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 13px;
}

.app-header .user-identity {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 1px;
  text-align: left;
}

.app-header .user-identity > span:first-child {
  overflow: hidden;
  color: var(--e-text, var(--ink));
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header .user-level {
  overflow: hidden;
  color: var(--e-text-3, var(--muted));
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header .user-level::before {
  display: none !important;
  content: none !important;
}

.header-mobile-context {
  display: none;
}

.header-user-menu {
  top: calc(var(--app-header-height) + 8px);
}

.header-mobile-company,
.header-mobile-context button {
  min-width: 0;
}

@media (min-width: 1023.5px) and (max-width: 1399px) {
  :root {
    --app-header-height: 64px;
  }

  .app-header {
    padding-inline: 16px;
    gap: 14px;
  }

  .app-header .rig-control { display: flex !important; width: 132px; }
  .app-header .header-help { width: 80px; }
  .app-header #companyDisplay.company-identity { width: 210px; min-width: 210px; max-width: 210px; gap: 12px; }
  .app-header #companyDisplay .company-logo-compact { width: 64px; flex-basis: 64px; }
  .app-header .user-control { width: 200px; max-width: 200px; }
}

@media (min-width: 1023.5px) and (max-width: 1199px) {
  .app-header { gap: 10px; }
  .app-header .brand-lockup h1 { font-size: 17px; }
  .app-header .rig-control { width: 124px; }
  .app-header .header-help { width: 44px; min-width: 44px; padding: 0; }
  .app-header .header-help span { display: none; }
  .app-header #companyDisplay.company-identity { width: 180px; min-width: 180px; max-width: 180px; gap: 10px; }
  .app-header #companyDisplay .company-logo-compact { width: 56px; flex-basis: 56px; }
  .app-header #companyDisplay .company-identity-copy strong { font-size: 14px; }
  .app-header .user-control { width: 176px; max-width: 176px; }
}

@media (min-width: 768px) and (max-width: 1023.49px) {
  :root {
    --app-header-height: 64px;
  }

  .app-header {
    padding-inline: 12px;
    gap: 8px;
  }

  .app-header .brand-lockup h1 { font-size: 16px; }
  .app-header .brand-lockup > div { margin-left: 52px; }
  .app-header .brand-lockup .eyebrow { display: none; }
  .app-header .header-actions { gap: 6px; }
  .app-header .rig-control { width: 112px; padding-inline: 8px; }
  .app-header .rig-control > .ui-icon:first-child { display: none; }
  .app-header .header-help { width: 44px; min-width: 44px; padding: 0; }
  .app-header .header-help span { display: none; }
  .app-header #companyDisplay.company-identity { width: 82px; min-width: 82px; max-width: 82px; padding: 4px 6px; justify-content: center; }
  .app-header #companyDisplay .company-logo-compact { width: 68px; flex-basis: 68px; }
  .app-header #companyDisplay .company-identity-copy { display: none; }
  .app-header .user-control { width: 44px; min-width: 44px; max-width: 44px; padding: 0; justify-content: center; }
  .app-header .user-identity,
  .app-header .user-chevron { display: none; }
  .header-mobile-context { display: grid; gap: 4px; }
}

@media (max-width: 767px) {
  :root {
    --app-header-height: 60px;
  }

  .app-header {
    padding-inline: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .app-header .brand-lockup { grid-column: 1; }
  .app-header .brand-lockup h1 { font-size: 15px; }
  .app-header .brand-lockup > div { margin-left: 52px; }
  .app-header .brand-lockup .eyebrow { display: none; }
  .app-header .menu-button { width: 40px; height: 40px; min-height: 40px; }
  .app-header .header-actions { grid-column: 2; gap: 6px; }
  .app-header .rig-control,
  .app-header .header-help,
  .app-header .header-notification,
  .app-header #quickActionsShell { display: none !important; }
  .app-header #companyDisplay.company-identity { display: none !important; }
  .app-header .header-icon-button { width: 42px; min-width: 42px; height: 42px; min-height: 42px; }
  .app-header .user-control { width: 42px; min-width: 42px; max-width: 42px; height: 42px; min-height: 42px; padding: 0; justify-content: center; }
  .app-header .user-control .avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .app-header .user-identity,
  .app-header .user-chevron { display: none; }
  .header-user-menu {
    position: fixed;
    inset: calc(var(--app-header-height) + 8px) 10px auto auto;
    width: min(320px, calc(100vw - 20px));
    max-height: calc(100vh - var(--app-header-height) - 20px);
    overflow-y: auto;
  }
  .header-mobile-context { display: grid; gap: 4px; }
  .header-mobile-company {
    min-height: 48px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--e-text, var(--ink));
  }
  .header-mobile-company .ui-icon { width: 18px; height: 18px; }
  .header-mobile-company > span,
  .header-mobile-context button > span { min-width: 0; display: grid; gap: 1px; }
  .header-mobile-company small,
  .header-mobile-context button small { color: var(--e-text-3, var(--muted)); font-size: 10px; }
  .header-mobile-company strong,
  .header-mobile-context button strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
}

/* Destructive TEST reset is intentionally visually distinct from routine lifecycle actions. */
.test-company-reset-dialog {
  width: min(760px, calc(100vw - 32px));
}

.test-reset-preview {
  display: grid;
  gap: 16px;
}

.test-reset-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.test-reset-counts > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--e-line, var(--line));
  border-radius: 8px;
  background: var(--e-surface-2, var(--surface-soft));
}

.test-reset-counts small,
.test-reset-preserved,
.test-reset-backup-note p {
  color: var(--e-text-2, var(--muted));
}

.test-reset-counts strong {
  color: var(--e-text, var(--ink));
  font-size: 20px;
}

.test-reset-preserved,
.test-reset-backup-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--e-line, var(--line)));
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 7%, var(--e-surface, var(--panel)));
}

.test-reset-backup-note strong,
.test-reset-backup-note p {
  display: block;
  margin: 0;
}

.test-reset-backup-note p {
  margin-top: 4px;
  line-height: 1.5;
}

.test-reset-loading {
  min-height: 96px;
  display: grid;
  place-items: center;
  color: var(--e-text-2, var(--muted));
}

@media (max-width: 600px) {
  .test-reset-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .header-help { display: none !important; }
  .header-control.rig-control { width: 44px; padding-inline: 0; justify-content: center; }
  .header-control.rig-control .header-control-copy,
  .header-control.rig-control .header-control-chevron { display: none; }
  #companyDisplay.company-identity { display: none !important; }
  #quickActionsShell { display: block !important; }
}

/* Knowledge Center owns its viewport geometry. The generic dialog layer in
   premium-ui.css must not cap this documentation workspace at 760px. */
dialog.help-center-dialog,
dialog.help-center-dialog * {
  box-sizing: border-box;
}

dialog.help-center-dialog {
  width: min(95vw, 1700px);
  max-width: none;
  height: min(94dvh, 1100px);
  max-height: 94dvh;
  padding: 0;
  overflow: hidden;
}

.help-center-shell {
  min-width: 0;
  min-height: 0;
  grid-template-rows: 64px 44px minmax(0, 1fr);
  overflow: hidden;
}

.help-center-head {
  grid-template-columns: minmax(220px, auto) minmax(320px, 1fr) auto;
  min-width: 0;
}

.help-center-head > *,
.help-center-search,
.help-center-head-actions,
.help-quick-section,
.help-quick-links,
.help-center-body,
.help-article-list,
.help-article-detail,
.help-on-page {
  min-width: 0;
}

.help-center-search {
  position: static;
  width: 100%;
  max-width: none;
}

.help-center-head-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.help-quick-section { overflow: hidden; }
.help-quick-links { max-width: 100%; }

.help-center-body {
  grid-template-columns: 300px minmax(0, 1fr) 220px;
  width: 100%;
  overflow: hidden;
}

.help-article-list {
  width: auto;
  max-width: 320px;
  overflow-x: hidden;
  overflow-y: auto;
}

.help-article-detail {
  width: auto;
  max-width: none;
  overflow-x: hidden;
  overflow-y: auto;
}

.help-article-detail > header,
.help-article-purpose,
.help-article-section,
.help-article-subheading,
.help-article-detail ol,
.help-related-articles {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
}

.help-on-page {
  width: auto;
  max-width: 220px;
  overflow: hidden;
}

@media (min-width: 1400px) {
  .help-center-body { grid-template-columns: 300px minmax(0, 1fr) 220px; }
  .help-on-page { display: block; }
}

@media (min-width: 1024px) and (max-width: 1399px) {
  dialog.help-center-dialog { width: min(96vw, 1500px); }
  .help-center-body { grid-template-columns: 260px minmax(0, 1fr); }
  .help-article-list { max-width: 280px; }
  .help-on-page { display: none; }
}

@media (max-width: 1023px), (max-width: 1025px) and (orientation: portrait) {
  dialog.help-center-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .help-center-shell { grid-template-rows: auto 44px minmax(0, 1fr); }
  .help-center-head { grid-template-columns: minmax(150px, .8fr) minmax(180px, 1fr) auto; gap: 12px; }
  .help-center-head-actions .help-toolbar-button { width: 34px; padding: 0; justify-content: center; font-size: 0; }
  .help-center-head-actions .help-toolbar-button span { display: none; }
  .help-mobile-nav { display: inline-flex; }
  .help-center-body { position: relative; display: block; }
  .help-on-page { display: none; }
  .help-article-list {
    display: none;
    position: absolute;
    z-index: 3;
    inset: 0 auto 0 0;
    width: min(340px, 84vw);
    max-width: none;
    height: 100%;
  }
  .help-mobile-nav-open .help-article-list { display: block; overflow-y: auto; }
  .help-article-detail { width: 100%; height: 100%; max-width: none; }
}

@media (max-width: 767px) {
  .help-center-shell { grid-template-rows: auto minmax(0, 1fr); }
  .help-center-head {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 8px;
    padding: 8px 12px;
  }
  .help-center-head > div:first-child { grid-column: 1; grid-row: 1; }
  .help-center-head > div:first-child > :not(h2) { display: none; }
  .help-center-search { grid-column: 1 / -1; grid-row: 2; }
  .help-center-head-actions { grid-column: 2; grid-row: 1; gap: 4px; }
  .help-center-head-actions .icon-button,
  .help-center-head-actions .help-toolbar-button { width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; }
  .help-quick-section { display: none; }
  .help-article-detail { padding: 24px 18px 44px; }
}

.legacy-company-code-dialog { width: min(620px, calc(100vw - 32px)); }
.legacy-company-code-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.legacy-company-code-summary > span {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 12px;
  background: var(--e-surface-2, var(--surface));
  border: 1px solid var(--e-line, var(--line));
  border-radius: 8px;
}
.legacy-company-code-summary small { color: var(--e-text-2, var(--muted)); }
.legacy-company-code-summary strong { overflow-wrap: anywhere; }
.company-code-guidance { display: block; max-width: 320px; margin-top: 6px; line-height: 1.45; }

@media (max-width: 620px) {
  .legacy-company-code-summary { grid-template-columns: 1fr; }
}

/* Knowledge Center typography system. Geometry remains owned by the rules above. */
dialog.help-center-dialog {
  --kc-type-display: 40px;
  --kc-type-h1: 34px;
  --kc-type-h2: 28px;
  --kc-type-h3: 22px;
  --kc-type-h4: 18px;
  --kc-type-body: 16px;
  --kc-type-secondary: 14px;
  --kc-type-caption: 12px;
  --kc-type-overline: 11px;
  --kc-space-1: 4px;
  --kc-space-2: 8px;
  --kc-space-3: 12px;
  --kc-space-4: 16px;
  --kc-space-5: 24px;
  --kc-space-6: 32px;
  --kc-space-7: 48px;
  font-size: var(--kc-type-body);
  line-height: 1.65;
}

dialog.help-center-dialog,
dialog.help-center-dialog * {
  letter-spacing: 0;
}

.help-center-head {
  gap: var(--kc-space-4);
  padding: var(--kc-space-2) var(--kc-space-4);
}

.help-center-head > div:first-child {
  overflow: hidden;
}

.help-center-head .eyebrow,
.help-category-title,
.help-article-detail > header .eyebrow,
.help-on-page > strong {
  font-size: var(--kc-type-overline);
  font-weight: 750;
  line-height: 1.35;
}

.help-center-head h2 {
  margin: var(--kc-space-1) 0 0;
  font-size: var(--kc-type-h3);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
}

.help-center-head #helpCenterRole {
  overflow: hidden;
  margin: var(--kc-space-1) 0 0;
  color: var(--e-text-2, var(--muted));
  font-size: var(--kc-type-secondary);
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-center-search {
  width: min(100%, 440px);
  min-height: 36px;
  justify-self: center;
  gap: var(--kc-space-2);
  padding-inline: var(--kc-space-3);
}

.help-center-search input {
  min-height: 34px;
  font-size: var(--kc-type-secondary);
  line-height: 1.4;
}

.help-center-search .text-button {
  min-height: 28px;
  padding: var(--kc-space-1) var(--kc-space-2);
  font-size: var(--kc-type-caption);
  font-weight: 650;
}

.help-center-head-actions {
  gap: var(--kc-space-2);
}

.help-toolbar-button,
.help-center-head-actions .icon-button {
  min-height: 34px;
  height: 34px;
  gap: var(--kc-space-2);
  padding: 0 var(--kc-space-3);
  font-size: var(--kc-type-caption);
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.help-quick-section {
  gap: var(--kc-space-3);
  padding: var(--kc-space-1) var(--kc-space-4);
}

.help-section-heading {
  gap: var(--kc-space-2);
}

.help-section-heading h3,
.help-section-heading span,
.help-quick-link {
  font-size: var(--kc-type-caption);
  line-height: 1.35;
}

.help-section-heading h3 {
  font-weight: 700;
}

.help-quick-links {
  gap: var(--kc-space-2);
}

.help-quick-link {
  min-height: 30px;
  padding: var(--kc-space-1) var(--kc-space-2);
  font-weight: 600;
}

.help-article-list {
  padding: var(--kc-space-3) var(--kc-space-2) var(--kc-space-5) var(--kc-space-3);
}

.help-category-title {
  margin: var(--kc-space-5) var(--kc-space-3) var(--kc-space-2);
  color: var(--e-text-3, var(--muted));
  text-transform: uppercase;
}

.help-category-title:first-child {
  margin-top: var(--kc-space-2);
}

.help-article-link {
  position: relative;
  display: grid;
  min-height: 0;
  gap: var(--kc-space-1);
  margin: 0;
  padding: var(--kc-space-2) var(--kc-space-3);
  color: var(--e-text, var(--ink));
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 4px;
  font-size: var(--kc-type-secondary);
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
}

.help-article-link span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--e-text-2, var(--muted));
  font-size: var(--kc-type-caption);
  font-weight: 400;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.help-article-link:hover,
.help-article-link:focus-visible {
  color: var(--e-text, var(--ink));
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  border-left-color: color-mix(in srgb, var(--primary) 48%, transparent);
}

.help-article-link.is-selected {
  color: var(--e-text, var(--ink));
  background: color-mix(in srgb, var(--primary) 11%, transparent);
  border-left-color: var(--primary);
}

.help-article-link.is-selected span {
  color: var(--e-text-2, var(--muted));
}

.help-article-detail {
  color: var(--e-text, var(--ink));
  font-size: var(--kc-type-body);
  line-height: 1.65;
}

.help-article-detail > header,
.help-article-purpose,
.help-article-section,
.help-article-subheading,
.help-article-detail ol,
.help-related-articles {
  max-width: 840px;
}

.help-article-detail > header {
  padding-bottom: var(--kc-space-5);
}

.help-article-detail h2 {
  margin: var(--kc-space-2) 0 var(--kc-space-3);
  font-size: var(--kc-type-h1);
  font-weight: 720;
  line-height: 1.2;
  overflow-wrap: normal;
  text-wrap: balance;
  word-break: normal;
}

.help-article-detail header p:not(.eyebrow) {
  max-width: 68ch;
  margin: 0;
  color: var(--e-text-2, var(--muted));
  font-size: var(--kc-type-body);
  font-weight: 400;
  line-height: 1.65;
}

.help-article-purpose {
  margin-top: var(--kc-space-5);
  padding: var(--kc-space-3) var(--kc-space-4);
  font-size: var(--kc-type-body);
  line-height: 1.65;
}

.help-article-section {
  margin-top: var(--kc-space-6);
}

.help-article-section h3,
.help-article-subheading,
.help-related-articles h3 {
  margin: 0 0 var(--kc-space-3);
  color: var(--e-text, var(--ink));
  font-size: var(--kc-type-h3);
  font-weight: 700;
  line-height: 1.3;
}

.help-article-subheading,
.help-related-articles {
  margin-top: var(--kc-space-6);
}

.help-article-section p,
.help-article-section ul,
.help-article-section ol,
.help-article-section li,
.help-article-detail > ol > li {
  font-size: var(--kc-type-body);
  line-height: 1.65;
}

.help-article-section p {
  margin: 0 0 var(--kc-space-4);
}

.help-article-section ul {
  gap: var(--kc-space-2);
  padding-left: var(--kc-space-5);
}

.help-article-section li {
  min-height: 0;
  padding: 0;
}

.help-article-section li::before {
  display: none;
}

.help-callout {
  padding: var(--kc-space-4);
}

.help-article-detail > ol {
  gap: var(--kc-space-4);
  margin-top: var(--kc-space-5);
}

.help-article-detail > ol > li {
  min-height: 40px;
  padding: var(--kc-space-2) 0 var(--kc-space-2) var(--kc-space-7);
}

.help-related-articles {
  gap: var(--kc-space-2);
  padding-top: var(--kc-space-4);
}

.help-related-link {
  min-height: 34px;
  padding: var(--kc-space-2) var(--kc-space-3);
  font-size: var(--kc-type-secondary);
  font-weight: 600;
  line-height: 1.35;
}

.help-article-detail table {
  font-size: var(--kc-type-secondary);
  line-height: 1.5;
}

.help-article-detail th {
  font-size: var(--kc-type-caption);
  font-weight: 700;
}

.help-on-page {
  padding: var(--kc-space-5) var(--kc-space-4);
}

.help-on-page > strong {
  padding-bottom: var(--kc-space-3);
  text-transform: uppercase;
}

.help-on-page-links {
  gap: var(--kc-space-1);
}

.help-on-page-links button {
  padding: var(--kc-space-2);
  font-size: var(--kc-type-caption);
  font-weight: 500;
  line-height: 1.4;
}

@media (min-width: 1024px) {
  .help-center-head {
    grid-template-columns: minmax(220px, 280px) minmax(260px, 440px) minmax(0, 1fr);
  }

  .help-toolbar-button,
  .help-center-head-actions .icon-button {
    gap: var(--kc-space-1);
    padding-inline: 10px;
  }
}

/* Permit status badge readability standard. Sizing only: status values and
   semantic color assignments remain owned by the existing workflow styles. */
:root {
  --permit-status-height: 34px;
  --permit-status-font-size: 13px;
  --permit-status-icon-size: 16px;
  --permit-status-inline-padding: 14px;
  --permit-status-gap: 8px;
  --permit-status-column-min: 250px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--permit-status-gap);
  min-height: var(--permit-status-height);
  max-width: 100%;
  padding: 6px var(--permit-status-inline-padding);
  border-radius: 999px;
  font-size: var(--permit-status-font-size);
  font-weight: 650;
  line-height: 1.2;
  vertical-align: middle;
  white-space: nowrap;
}

.status-badge::before {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-right: 0;
}

.status-badge .ui-icon {
  width: var(--permit-status-icon-size);
  height: var(--permit-status-icon-size);
  flex: 0 0 var(--permit-status-icon-size);
  stroke-width: 2.2;
}

.permit-status-pill {
  min-width: 0;
}

.permit-status-pill::before {
  display: none;
}

:is(
  .permit-status-pill,
  .permit-board-table .status-badge,
  .dashboard-table .status-badge,
  .permit-header-badges .status-badge
):is(.status-expired, .status-validity_ended) {
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  flex: 0 0 auto;
  justify-content: flex-start;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .permit-list-header,
  .permit-list-row .shared-permit-row {
    grid-template-columns:
      minmax(110px, .75fr)
      minmax(145px, 1.4fr)
      minmax(80px, .6fr)
      minmax(var(--permit-status-column-min), 1.1fr)
      minmax(115px, .75fr)
      44px;
    gap: 12px;
  }

  .permit-list-row .permit-status-pill {
    justify-self: start;
    white-space: nowrap;
  }

  .dashboard-table.shared-permit-table th:nth-child(4),
  .dashboard-table.shared-permit-table td:nth-child(4),
  .permit-board-table .board-status-cell {
    min-width: var(--permit-status-column-min);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .permit-list-header,
  .permit-list-row .shared-permit-row {
    grid-template-columns: minmax(0, 1fr) minmax(220px, max-content) 44px;
  }

  .permit-list-row .permit-status-pill {
    width: fit-content;
    min-width: 0;
    max-width: 100%;
    flex: 0 0 auto;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 767px) {
  .status-badge,
  .permit-list-row .permit-status-pill,
  .permit-board-table .status-badge,
  .shared-permit-table .status-badge,
  .timeline-permit-meta .status-badge {
    width: fit-content;
    min-width: 0;
    max-width: 100%;
    min-height: var(--permit-status-height);
    justify-content: flex-start;
    padding: 7px 12px;
    text-align: left;
    white-space: normal;
  }

  :is(
    .permit-status-pill,
    .permit-board-table .status-badge,
    .dashboard-table .status-badge,
    .permit-header-badges .status-badge
  ):is(.status-expired, .status-validity_ended) {
    width: min(100%, 280px);
    min-width: 0;
    white-space: normal;
  }
}

@media (max-width: 1023px), (max-width: 1025px) and (orientation: portrait) {
  .help-center-head { gap: var(--kc-space-3); }
  .help-center-head h2 { font-size: var(--kc-type-h4); }
  .help-center-head #helpCenterRole { font-size: var(--kc-type-caption); }
  .help-center-head-actions { gap: var(--kc-space-1); }
  .help-center-head-actions .help-toolbar-button { padding: 0; }
  .help-article-link { min-height: 0; }
}

@media (max-width: 767px) {
  .help-center-head { padding: var(--kc-space-2) var(--kc-space-3); }
  .help-center-head h2 { font-size: var(--kc-type-h4); }
  .help-center-search { width: 100%; max-width: none; }
  .help-article-detail { padding: var(--kc-space-5) var(--kc-space-4) var(--kc-space-7); }
  .help-article-detail h2 { font-size: var(--kc-type-h2); }
  .help-article-detail > header { padding-bottom: var(--kc-space-4); }
  .help-article-section { margin-top: var(--kc-space-5); }
  .help-article-section h3,
  .help-article-subheading,
  .help-related-articles h3 { font-size: var(--kc-type-h4); }
}

/* Knowledge Center search and toolbar refinement. */
.help-center-search {
  width: 100%;
  max-width: none;
  height: 44px;
  min-height: 44px;
  gap: var(--kc-space-2);
  padding: 0 var(--kc-space-3);
  background: var(--e-surface, var(--panel));
  border: 1px solid var(--e-line, var(--line));
  border-radius: 10px;
  box-shadow: none;
}

.help-center-search:focus-within {
  border-color: color-mix(in srgb, var(--primary) 60%, var(--e-line, var(--line)));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.help-center-search > .ui-icon {
  width: 18px;
  height: 18px;
  align-self: center;
  flex: 0 0 18px;
}

.help-center-search input,
.help-center-search input:hover,
.help-center-search input:focus,
.help-center-search input:focus-visible {
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.help-center-search input::placeholder {
  color: var(--e-text-3, var(--muted));
  opacity: 1;
}

.help-center-head-actions,
.help-toolbar-actions {
  display: flex;
  align-items: center;
  gap: var(--kc-space-2);
}

.help-toolbar-button,
.help-center-head-actions .icon-button {
  width: auto;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  gap: var(--kc-space-2);
  padding: 0 var(--kc-space-3);
  color: var(--e-text-2, var(--muted));
  background: color-mix(in srgb, var(--primary) 3%, transparent) !important;
  border: 1px solid var(--e-line, var(--line));
  border-radius: 10px;
  box-shadow: none;
}

.help-toolbar-button:hover,
.help-toolbar-button:focus-visible,
.help-center-head-actions .icon-button:hover,
.help-center-head-actions .icon-button:focus-visible {
  color: var(--e-text, var(--ink));
  background: color-mix(in srgb, var(--e-surface-2, var(--surface)) 72%, transparent);
  border-color: color-mix(in srgb, var(--primary) 26%, var(--e-line, var(--line)));
  box-shadow: none;
}

.help-toolbar-button .ui-icon,
.help-center-head-actions .icon-button .ui-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.help-toolbar-label-short,
.help-toolbar-more {
  display: none;
}

.help-mobile-nav {
  display: none !important;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .help-mobile-nav {
    display: inline-flex !important;
  }

  .help-toolbar-actions {
    display: flex;
  }

  .help-center-head-actions .help-toolbar-button {
    width: auto;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0 10px;
    font-size: var(--kc-type-caption);
  }

  .help-toolbar-label-full {
    display: none !important;
  }

  .help-toolbar-label-short {
    display: inline !important;
  }
}

@media (max-width: 767px) {
  .help-mobile-nav {
    display: inline-flex !important;
  }

  .help-center-head-actions {
    position: relative;
    gap: var(--kc-space-1);
  }

  .help-toolbar-more {
    display: inline-flex;
  }

  #helpToggleFullscreen {
    display: none;
  }

  .help-toolbar-actions {
    position: absolute;
    z-index: 8;
    top: calc(100% + var(--kc-space-2));
    right: 0;
    display: none;
    width: 220px;
    padding: var(--kc-space-2);
    flex-direction: column;
    align-items: stretch;
    gap: var(--kc-space-1);
    background: var(--e-surface, var(--panel));
    border: 1px solid var(--e-line, var(--line));
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(13, 45, 50, .16);
  }

  .help-toolbar-menu-open .help-toolbar-actions {
    display: flex;
  }

  .help-center-head-actions .help-toolbar-actions .help-toolbar-button {
    display: flex;
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    justify-content: flex-start;
    padding: 0 var(--kc-space-3);
    font-size: var(--kc-type-secondary);
    background: transparent;
    border: 0;
    border-radius: 8px;
  }

  .help-toolbar-actions .help-toolbar-label-full {
    display: inline !important;
  }

  .help-toolbar-actions .help-toolbar-label-short {
    display: none !important;
  }
}

/* The browser owns the one primary vertical scroll surface for every active
   application workspace. Tables, dialogs, and the Organisation Tree canvas
   retain their own deliberately bounded scrolling where required. */
html:has(.app-layout:not(.is-hidden)),
body:has(.app-layout:not(.is-hidden)) {
  height: auto;
  min-height: 100%;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

.app-layout:not(.is-hidden) {
  position: relative;
  inset: auto;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 100dvh !important;
  display: grid;
  grid-template-rows: var(--app-header-height) auto;
  overflow: visible;
}

.app-layout:not(.is-hidden) > .app-header {
  position: relative;
  inset: auto;
  grid-row: 1;
}

.app-layout:not(.is-hidden) > .app-shell {
  grid-row: 2;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: calc(100dvh - var(--app-header-height)) !important;
  overflow: visible;
}

.app-layout:not(.is-hidden) .content {
  width: 100%;
  max-width: none;
  min-height: 0;
  height: auto;
  overflow: visible;
  overscroll-behavior: auto;
  scrollbar-gutter: auto;
  scroll-padding-top: 96px;
}

.app-layout:not(.is-hidden) .content > .view.active > .section-head,
.app-layout:not(.is-hidden) .content > .view.active > .admin-page-header,
.app-layout:not(.is-hidden) .content > .view.active .admin-panel:not(.is-hidden) > .admin-page-header:first-child {
  position: sticky;
  top: 0;
  z-index: 24;
  padding-bottom: 12px;
  background: var(--e-bg, var(--soft));
  box-shadow: 0 -32px 0 var(--e-bg, var(--soft));
}

.app-layout:not(.is-hidden) .content > .view.active > .filter-bar,
.app-layout:not(.is-hidden) #adminView.active > .permit-form > .filter-bar,
.app-layout:not(.is-hidden) #clientadminView.active > .permit-form > .filter-bar {
  position: sticky;
  top: 78px;
  z-index: 23;
  background: var(--e-surface, var(--panel));
}

/* Queue-style pages keep their titles, tabs, summaries, filters, and pagination
   stationary. Only the record region scrolls. */
.app-layout:not(.is-hidden) .content:has(> #permitsView.active),
.app-layout:not(.is-hidden) .content:has(> #managerView.active),
.app-layout:not(.is-hidden) .content:has(> #clientView.active),
.app-layout:not(.is-hidden) .content:has(> #archiveView.active),
.app-layout:not(.is-hidden) .content:has(> #permit-boardView.active),
.app-layout:not(.is-hidden) .content:has(> #auditView.active) {
  overflow: visible;
  padding-bottom: 8px !important;
}

#permitsView.active,
#managerView.active,
#clientView.active,
#archiveView.active,
#permit-boardView.active,
#auditView.active {
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

/* Tabs may scroll horizontally on narrow screens, but must never become a
   competing vertical scroll owner because of a one-pixel rounding overflow. */
#permitsView.active > .role-page-tabs,
#managerView.active > .role-page-tabs,
#clientView.active > .role-page-tabs,
#archiveView.active > .role-page-tabs,
#permit-boardView.active > .role-page-tabs {
  flex: 0 0 auto;
  overflow-x: auto;
  overflow-y: hidden !important;
  scrollbar-gutter: auto;
  overscroll-behavior-inline: contain;
}

#permitList,
#managerList,
#clientList,
#archiveList,
#permitBoardList,
#auditList {
  flex: 0 1 auto;
  min-height: 0;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/* A constrained scrollable grid must size each track from its permit row.
   Otherwise auto tracks shrink to share the viewport and the 80px cards
   overlap inside ~22px tracks, producing a false scroll height and blank area. */
#permitList,
#managerList,
#clientList,
#archiveList {
  grid-auto-rows: max-content;
  align-content: start;
  background: transparent !important;
}

#permitListState,
#permitBoardState,
#permitPagination,
#permitBoardPagination {
  flex: 0 0 auto;
}

#permitPagination,
#permitBoardPagination {
  position: sticky;
  bottom: 0;
  z-index: 8;
  width: 100%;
  max-width: none;
  min-height: 52px;
  margin: 0;
  padding: 8px 12px;
  background: var(--e-surface, var(--panel)) !important;
  border: 1px solid var(--e-line, var(--line)) !important;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 -8px 18px color-mix(in srgb, var(--e-bg, var(--soft)) 82%, transparent) !important;
}

#permitPagination:empty,
#permitPagination[hidden],
#permitBoardPagination:empty,
#permitBoardPagination[hidden] {
  display: none !important;
  min-height: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0 !important;
}

.detail-timeline,
.audit-event-list,
.permit-notification-list,
.analytics-data-table {
  overscroll-behavior: contain;
}

@media (min-width: 1024px) {
  .app-layout:not(.is-hidden) > .app-shell > .sidebar,
  .app-layout:not(.is-hidden).admin-portal-shell > .app-shell > .sidebar {
    position: relative !important;
    inset: auto !important;
    align-self: stretch;
    width: auto;
    height: 100% !important;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 1023px) {
  .app-layout:not(.is-hidden) > .app-shell {
    display: block !important;
  }

  .app-layout:not(.is-hidden) > .app-shell > .sidebar,
  .app-layout:not(.is-hidden).admin-portal-shell > .app-shell > .sidebar {
    position: fixed !important;
    inset: calc(var(--app-header-height) + 14px) auto 14px 14px !important;
    z-index: 90;
    width: min(320px, calc(100vw - 28px)) !important;
    height: calc(100dvh - var(--app-header-height) - 28px) !important;
    transform: translateX(-115%) !important;
    transition: transform var(--e-motion, 220ms ease) !important;
  }

  .app-layout:not(.is-hidden):not(.sidebar-collapsed) > .app-shell > .sidebar,
  .app-layout:not(.is-hidden).admin-portal-shell:not(.sidebar-collapsed) > .app-shell > .sidebar {
    transform: translateX(0) !important;
  }

  .app-layout:not(.is-hidden) .content {
    padding-bottom: 24px;
    scroll-padding-top: 80px;
  }

  .app-layout:not(.is-hidden) .content > .view.active > .filter-bar,
  .app-layout:not(.is-hidden) #adminView.active > .permit-form > .filter-bar,
  .app-layout:not(.is-hidden) #clientadminView.active > .permit-form > .filter-bar {
    top: 68px;
  }
}

@media (max-width: 767px) {
  .app-layout:not(.is-hidden) .content {
    padding-bottom: 18px;
    scroll-padding-top: 72px;
  }

  /* Preserve a usable record viewport on phones. The fixed filter toolbar uses
     three compact rows instead of consuming the page as five stacked rows. */
  #permitsView.active > .permit-filter-bar,
  #managerView.active > .permit-filter-bar,
  #clientView.active > .permit-filter-bar,
  #archiveView.active > .permit-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #permitsView.active > .permit-filter-bar > .permit-filter-search,
  #managerView.active > .permit-filter-bar > .permit-filter-search,
  #clientView.active > .permit-filter-bar > .permit-filter-search,
  #archiveView.active > .permit-filter-bar > .permit-filter-search {
    grid-column: 1 / -1;
  }

  .app-layout:not(.is-hidden) .content > .view.active > .filter-bar,
  .app-layout:not(.is-hidden) #adminView.active > .permit-form > .filter-bar,
  .app-layout:not(.is-hidden) #clientadminView.active > .permit-form > .filter-bar {
    top: 60px;
  }
}

/* The route marker is retained for compatibility with the existing shell, but
   natural page flow is now the common application behaviour rather than an
   exception reserved for document and form routes. */
html:has(.app-layout.natural-page-flow:not(.is-hidden)),
body:has(.app-layout.natural-page-flow:not(.is-hidden)) {
  height: auto;
  min-height: 100%;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

.app-layout.natural-page-flow:not(.is-hidden) {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  grid-template-rows: var(--app-header-height) auto;
  overflow: visible;
}

.app-layout.natural-page-flow:not(.is-hidden) > .app-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-layout.natural-page-flow:not(.is-hidden) > .app-shell {
  height: auto;
  min-height: calc(100dvh - var(--app-header-height)) !important;
  overflow: visible;
}

.app-layout.natural-page-flow:not(.is-hidden) .content {
  height: auto;
  min-height: calc(100dvh - var(--app-header-height));
  overflow: visible !important;
  scrollbar-gutter: auto;
}

.app-layout.natural-page-flow:not(.is-hidden) .content > .view.active,
.app-layout.natural-page-flow:not(.is-hidden) .content:has(> .view.active) {
  height: auto;
  min-height: 0;
  overflow: visible !important;
}

.app-layout.natural-page-flow:not(.is-hidden) .content > .view.active > .section-head,
.app-layout.natural-page-flow:not(.is-hidden) .content > .view.active > .admin-page-header,
.app-layout.natural-page-flow:not(.is-hidden) .content > .view.active > .filter-bar {
  position: static;
  top: auto;
  box-shadow: none;
}

.app-layout.natural-page-flow:not(.is-hidden) :is(
  #permitList,
  #managerList,
  #clientList,
  #archiveList,
  #permitBoardList
) {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  overflow: visible !important;
  scrollbar-gutter: auto;
}

.app-layout.natural-page-flow:not(.is-hidden) :is(#permitPagination, #permitBoardPagination) {
  position: static;
}

@media (min-width: 1024px) {
  .app-layout.natural-page-flow:not(.is-hidden) > .app-shell > .sidebar,
  .app-layout.natural-page-flow:not(.is-hidden).admin-portal-shell > .app-shell > .sidebar {
    position: sticky !important;
    top: calc(var(--app-header-height) + 20px) !important;
    align-self: start;
    height: calc(100dvh - var(--app-header-height) - 44px) !important;
  }
}

/* Knowledge articles follow one top-to-bottom document scroll inside the native
   dialog instead of creating a second nested scrollbar in the article pane. */
body.knowledge-document-flow .help-center-dialog[open] {
  overflow-x: hidden;
  overflow-y: auto;
}

body.knowledge-document-flow .help-center-dialog[open] .help-center-shell {
  height: auto;
  min-height: 100%;
}

body.knowledge-document-flow .help-center-dialog[open] .help-center-body,
body.knowledge-document-flow .help-center-dialog[open] .help-article-detail {
  height: auto;
  min-height: 0;
  overflow: visible;
}

/* Compact page identity: page titles remain visible while navigation-context
   overlines are removed from workspace, admin, form, and documentation headers. */
.app-layout:not(.is-hidden) .content {
  padding-top: 18px;
}

.app-layout:not(.is-hidden) .content > .view > .section-head > div > .eyebrow,
.app-layout:not(.is-hidden) .admin-page-header > div > .eyebrow,
.help-center-head-title > .eyebrow {
  display: none;
}

.app-layout:not(.is-hidden) .content > .view > .section-head,
.app-layout:not(.is-hidden) .content > .view.active > .section-head {
  flex: 0 0 auto;
  min-height: 0;
  margin: 0 0 12px;
  padding: 0 0 8px;
  align-items: center;
  gap: 12px;
}

.app-layout:not(.is-hidden) .content > .view > .section-head h2 {
  margin: 0;
  color: var(--e-text, var(--ink));
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.app-layout:not(.is-hidden) .content > .view > .section-head .section-subtitle {
  margin: 4px 0 0;
  max-width: 72ch;
  font-size: 13px;
  line-height: 1.4;
}

.app-layout:not(.is-hidden) .admin-page-header,
.app-layout:not(.is-hidden).admin-portal-shell .admin-page-header,
.app-layout:not(.is-hidden) .content > .view.active .admin-panel:not(.is-hidden) > .admin-page-header:first-child {
  flex: 0 0 auto;
  min-height: 0;
  margin: 0 0 14px;
  padding: 0 0 10px;
  align-items: center;
  gap: 12px;
}

.app-layout:not(.is-hidden) .admin-page-header h2,
.app-layout:not(.is-hidden).admin-portal-shell .admin-page-header h2 {
  margin: 0;
  color: var(--e-text, var(--ink));
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.app-layout:not(.is-hidden) .admin-page-header p:not(.eyebrow),
.app-layout:not(.is-hidden).admin-portal-shell .admin-page-header p:not(.eyebrow) {
  margin: 3px 0 0;
  max-width: 72ch;
  font-size: 13px;
  line-height: 1.4;
}

.app-layout:not(.is-hidden) .page-header-actions {
  gap: 8px;
}

.app-layout:not(.is-hidden) .content > .view.active > .filter-bar,
.app-layout:not(.is-hidden) #adminView.active > .permit-form > .filter-bar,
.app-layout:not(.is-hidden) #clientadminView.active > .permit-form > .filter-bar {
  top: 66px;
}

.help-center-head-title {
  gap: 2px;
}

.help-center-head-title > h2 {
  margin: 0;
  line-height: 1.15;
}

@media (max-width: 1023px) {
  .app-layout:not(.is-hidden) .content {
    padding-top: 14px;
  }

  .app-layout:not(.is-hidden) .content > .view > .section-head,
  .app-layout:not(.is-hidden) .content > .view.active > .section-head,
  .app-layout:not(.is-hidden) .admin-page-header,
  .app-layout:not(.is-hidden).admin-portal-shell .admin-page-header,
  .app-layout:not(.is-hidden) .content > .view.active .admin-panel:not(.is-hidden) > .admin-page-header:first-child {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .app-layout:not(.is-hidden) .content > .view > .section-head h2,
  .app-layout:not(.is-hidden) .admin-page-header h2,
  .app-layout:not(.is-hidden).admin-portal-shell .admin-page-header h2 {
    font-size: 22px;
  }

  .app-layout:not(.is-hidden) .content > .view.active > .filter-bar,
  .app-layout:not(.is-hidden) #adminView.active > .permit-form > .filter-bar,
  .app-layout:not(.is-hidden) #clientadminView.active > .permit-form > .filter-bar {
    top: 58px;
  }
}

@media (max-width: 767px) {
  .app-layout:not(.is-hidden) .content {
    padding-top: 12px;
  }

  .app-layout:not(.is-hidden) .content > .view > .section-head,
  .app-layout:not(.is-hidden) .content > .view.active > .section-head,
  .app-layout:not(.is-hidden) .admin-page-header,
  .app-layout:not(.is-hidden).admin-portal-shell .admin-page-header,
  .app-layout:not(.is-hidden) .content > .view.active .admin-panel:not(.is-hidden) > .admin-page-header:first-child {
    gap: 8px;
  }

  .app-layout:not(.is-hidden) .content > .view > .section-head h2,
  .app-layout:not(.is-hidden) .admin-page-header h2,
  .app-layout:not(.is-hidden).admin-portal-shell .admin-page-header h2 {
    font-size: 20px;
  }

  .app-layout:not(.is-hidden) .admin-page-header p:not(.eyebrow),
  .app-layout:not(.is-hidden).admin-portal-shell .admin-page-header p:not(.eyebrow) {
    font-size: 12px;
  }

  .app-layout:not(.is-hidden) .content > .view.active > .filter-bar,
  .app-layout:not(.is-hidden) #adminView.active > .permit-form > .filter-bar,
  .app-layout:not(.is-hidden) #clientadminView.active > .permit-form > .filter-bar {
    top: 54px;
  }
}
