*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--on-surface);
  background: var(--background);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
  max-width: 100vw;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  color: var(--deep-navy);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { color: var(--deep-navy); }
#app-root { min-height: 100vh; min-width: 0; max-width: 100%; overflow-x: clip; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--academic-gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.container-app {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 768px) {
  .container-app { padding-left: var(--space-7); padding-right: var(--space-7); }
}

.text-display-lg { font-family: var(--font-display); font-size: var(--text-display-lg); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.text-headline-lg { font-family: var(--font-display); font-size: var(--text-headline-lg); font-weight: 600; line-height: 1.25; }
.text-headline-md { font-family: var(--font-display); font-size: var(--text-headline-md); font-weight: 600; line-height: 1.25; }
.text-title-md { font-size: var(--text-title-md); font-weight: 600; line-height: 1.35; }
.text-body-md { font-size: var(--text-body-md); line-height: 1.5; }
.text-body-sm { font-size: var(--text-body-sm); line-height: 1.45; }
.text-label-md { font-size: var(--text-label-md); font-weight: 600; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.04em; }
.text-data-mono { font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.35; }

.icon-ms {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}
.btn .icon-ms {
  font-size: 1.125rem;
  flex-shrink: 0;
}

/* —— LK topbar (navy) —— */
.topbar {
  height: var(--topbar-h);
  background: var(--deep-navy);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  gap: var(--space-3);
  position: sticky;
  top: 0;
  z-index: 1030;
}

@media (min-width: 768px) {
  .topbar { padding: 0 var(--space-5); gap: var(--space-4); }
}

.topbar a { color: rgba(255,255,255,.88); text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar .dropdown-menu a,
.topbar .dropdown-menu a.dropdown-item,
.shell-public-header .dropdown-menu a,
.shell-public-header .dropdown-menu a.dropdown-item {
  color: var(--on-surface);
}
.topbar .dropdown-menu a:hover,
.topbar .dropdown-menu a:focus,
.shell-public-header .dropdown-menu a:hover,
.shell-public-header .dropdown-menu a:focus {
  color: var(--on-surface);
}
.topbar .dropdown-menu a.text-danger,
.shell-public-header .dropdown-menu a.text-danger { color: var(--error-crimson); }
.topbar .dropdown-menu a.text-danger:hover,
.shell-public-header .dropdown-menu a.text-danger:hover { color: #991b1b; }
.topbar .brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-size: 1.05rem;
  white-space: nowrap;
}
.brand-with-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  background: transparent;
}
.brand-logo-pub {
  width: 40px;
  height: 40px;
}
/* Main + partner logos in public hero: identical box so the row reads evenly */
.brand-logo-hero,
.brand-logo-hero-partner {
  width: auto;
  height: 56px;
  max-width: min(180px, 40vw);
  max-height: 56px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px 10px;
  border-radius: var(--radius);
  opacity: 1;
}
.hero-pub-logo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
}
@media (max-width: 575px) {
  .brand-logo-hero,
  .brand-logo-hero-partner {
    height: 48px;
    max-height: 48px;
  }
}
.hero-pub-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.topbar .nav-links { display: none; flex: 1; justify-content: center; gap: var(--space-4); }
@media (min-width: 960px) {
  .topbar .nav-links { display: flex; }
}
.topbar .nav-links a {
  font-weight: 600;
  font-size: 0.875rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.topbar .nav-links a.active { color: #fff; border-bottom-color: var(--academic-gold); }
.topbar-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.topbar-actions .icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  color: rgba(255,255,255,.9);
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}
.topbar-actions button.icon-btn {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.topbar-actions .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.topbar-actions .dropdown-topbar-profile .icon-btn.show,
.topbar-actions .dropdown-topbar-profile .icon-btn[aria-expanded="true"] {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.topbar-profile-header {
  white-space: normal;
  line-height: 1.35;
  max-width: 240px;
}
.topbar-profile-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
}
.topbar-profile-item .topbar-profile-icon {
  font-size: 1.125rem;
  color: var(--on-surface-variant);
  flex-shrink: 0;
}
.topbar-profile-item.text-danger .topbar-profile-icon { color: inherit; opacity: 0.85; }
.topbar .dropdown-menu {
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--space-2) 0;
  margin-top: var(--space-2);
}
.topbar .dropdown-menu .dropdown-divider { margin: var(--space-2) 0; }
.topbar-conf-ctx {
  display: none;
  font-size: 0.8125rem;
  color: rgba(255,255,255,.75);
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 768px) { .topbar-conf-ctx { display: block; } }

.deadline-banner {
  background: rgba(212, 175, 55, 0.12);
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  padding: var(--space-2) var(--space-4);
  font-size: 0.8125rem;
  color: var(--deep-navy);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: center;
}
.deadline-banner .dl-item { display: flex; align-items: center; gap: var(--space-2); }
.deadline-banner .dl-item strong { font-weight: 600; }

/* Pin deadline strip under sticky topbar, above page content */
#deadline-banner-slot:not(:empty) {
  position: sticky;
  top: var(--topbar-h);
  z-index: 1025;
  background: var(--surface, #fff);
  box-shadow: 0 1px 0 rgba(26, 40, 64, 0.06);
}
#deadline-banner-slot .deadline-banner {
  background: #faf6e8;
  backdrop-filter: none;
}

/* —— Public shell —— */
.shell-public {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.shell-public-sticky {
  position: sticky;
  top: 0;
  z-index: 1030;
  width: 100%;
}

.shell-public-header {
  background: var(--deep-navy);
  color: #fff;
  width: 100%;
}

.shell-public-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  flex-wrap: wrap;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .shell-public-header-inner {
    padding-left: var(--space-7);
    padding-right: var(--space-7);
  }
}

.shell-public-header a { color: rgba(255,255,255,.88); text-decoration: none; }
.shell-public-header a:hover { color: #fff; }

.shell-public-header .brand-pub {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.25;
  flex: 0 1 auto;
  min-width: 0;
  justify-content: flex-start;
  text-align: left;
}
.shell-public-header .brand-pub span {
  text-align: left;
}

.pub-header-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) 0 var(--space-2);
  border-top: 1px solid rgba(255,255,255,.12);
  order: 3;
}
.pub-header-nav-main,
.pub-header-auth {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.pub-header-actions a {
  padding: var(--space-2) 0;
  font-weight: 600;
  font-size: 0.9375rem;
}
.pub-header-actions .dropdown-menu a {
  padding: 0.35rem 1rem;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
}
.pub-header-actions .pub-header-cta { align-self: flex-start; margin-top: var(--space-1); }
.pub-header-auth .dropdown-topbar-profile .icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: rgba(255,255,255,.9);
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}
.pub-header-auth .dropdown-topbar-profile .icon-btn:hover,
.pub-header-auth .dropdown-topbar-profile .icon-btn.show,
.pub-header-auth .dropdown-topbar-profile .icon-btn[aria-expanded="true"] {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.pub-header-auth .dropdown-menu {
  background: #fff;
  color: var(--on-surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--space-2) 0;
  margin-top: var(--space-2);
}
.pub-header-auth .dropdown-menu .dropdown-header {
  color: var(--on-surface);
}
.pub-header-auth .dropdown-menu .dropdown-divider { margin: var(--space-2) 0; }

@media (min-width: 960px) {
  .shell-public-header-inner { flex-wrap: nowrap; }
  .pub-header-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 0;
    border-top: 0;
    order: unset;
    gap: var(--space-3);
  }
  .pub-header-nav-main,
  .pub-header-auth {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
  }
  .pub-header-auth {
    margin-left: auto;
    justify-content: flex-end;
  }
  .pub-header-actions > .pub-header-nav-main > a,
  .pub-header-actions > .pub-header-auth > a { padding: 0; white-space: nowrap; }
  .pub-header-actions .dropdown-menu a {
    padding: 0.35rem 1rem;
    white-space: nowrap;
  }
  .pub-header-actions .pub-header-cta { margin-top: 0; }
  .shell-public-header .brand-pub { flex: 0 1 auto; max-width: min(42ch, 46vw); }
}

.pub-nav-wrap {
  background: var(--paper-white);
  border-bottom: 1px solid var(--outline);
  width: 100%;
}

.pub-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4) var(--space-3);
}

.pub-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--on-surface-variant);
  border-bottom: 1px solid var(--outline);
  padding: var(--space-3) 0;
}
.pub-nav a:last-child {
  border-bottom-color: transparent;
}
.pub-nav a:hover,
.pub-nav a.active {
  color: var(--deep-navy);
  border-bottom-color: var(--academic-gold);
}

@media (min-width: 768px) {
  .pub-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
    padding-left: var(--space-7);
    padding-right: var(--space-7);
  }
  .pub-nav a,
  .pub-nav a:last-child {
    border-bottom: 2px solid transparent;
    padding: 0 0 2px;
    font-size: 0.875rem;
    white-space: nowrap;
  }
  /* After :last-child so active/hover underline wins for every tab incl. «Документы» */
  .pub-nav a:hover,
  .pub-nav a.active {
    border-bottom: 2px solid var(--academic-gold);
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .pub-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-padding-inline: var(--space-4);
  }
  .pub-nav::-webkit-scrollbar { height: 6px; }
  .pub-nav::-webkit-scrollbar-thumb {
    background: var(--outline-strong);
    border-radius: 999px;
  }
}

.shell-public-main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.site-footer {
  border-top: 1px solid var(--outline);
  padding: var(--space-4);
  color: var(--on-surface-variant);
  font-size: 0.8125rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  flex-wrap: wrap;
  background: var(--paper-white);
  width: 100%;
  max-width: none;
  margin-top: auto;
  box-sizing: border-box;
}
.site-footer span:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: center;
}
.site-footer a { white-space: nowrap; }

@media (min-width: 576px) {
  .site-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  .site-footer { padding: var(--space-4) var(--space-7); }
}

/* —— Public header (legacy selectors kept for compatibility) —— */

.dates-widget {
  background: var(--gallery);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}
.dates-widget.sticky-widget {
  position: sticky;
  top: calc(var(--topbar-h) + var(--space-3));
  z-index: 10;
}
.dates-widget h3 { font-size: 1rem; margin: 0 0 var(--space-3); }
.dates-widget ul { margin: 0; padding-left: 1.25rem; }
.dates-widget .tz-note { font-size: 0.8125rem; color: var(--on-surface-variant); margin-top: var(--space-2); }

/* —— LK layout —— */
.lk-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - var(--topbar-h) - var(--deadline-banner-h, 0px));
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 768px) {
  .lk-layout { grid-template-columns: var(--sidebar-w) 1fr; }
}

.shell-lk-sidebar {
  background: var(--deep-navy);
  color: #fff;
  padding: var(--space-4) 0;
  display: none;
  flex-direction: column;
  position: sticky;
  top: calc(var(--topbar-h) + var(--deadline-banner-h, 0px));
  /* Always fill viewport under topbar (+ deadline strip) */
  height: calc(100vh - var(--topbar-h) - var(--deadline-banner-h, 0px));
  min-height: calc(100vh - var(--topbar-h) - var(--deadline-banner-h, 0px));
  max-height: calc(100vh - var(--topbar-h) - var(--deadline-banner-h, 0px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  align-self: start;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .shell-lk-sidebar { display: flex; }
}

.shell-lk-sidebar .nav-group-label {
  padding: var(--space-4) var(--space-4) var(--space-1);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,.45);
}
.shell-lk-sidebar a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  display: block;
  padding: 10px var(--space-4);
  border-left: 2px solid transparent;
  font-weight: 500;
  font-size: 0.9375rem;
}
.shell-lk-sidebar a:hover { background: rgba(255,255,255,.06); color: #fff; }
.shell-lk-sidebar a.active {
  color: #fff;
  border-left-color: var(--academic-gold);
  background: rgba(255,255,255,.08);
}
.shell-lk-sidebar .nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: var(--academic-gold, #c9a227);
  color: var(--deep-navy, #0b1f3a);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
.shell-lk-sidebar .side-cta {
  align-self: stretch;
  justify-content: center;
  gap: var(--space-1);
  margin: var(--space-3) var(--space-4);
  text-align: center;
}

.lk-main {
  padding: var(--space-4);
  background: var(--gallery);
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}
@media (min-width: 768px) {
  .lk-main { padding: var(--space-5) var(--space-6); }
}
.lk-main-inner { max-width: var(--container-max); margin: 0 auto; min-width: 0; }

/* —— Auth —— */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #f7f9fb 0%, #eef2f7 50%, #f7f9fb 100%);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  margin: var(--space-6) auto;
  background: var(--paper-white);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.auth-card .page-header { margin-bottom: var(--space-5); }
.auth-card .page-header h1 { font-size: 1.75rem; letter-spacing: -0.02em; }
.auth-card .form-control-lg { min-height: 48px; padding: 12px 16px; border-radius: var(--radius); }
.auth-card .btn-lg { min-height: 48px; padding: 12px 16px; border-radius: var(--radius); }
.auth-card .password-field .form-control-lg {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.auth-card .password-field .password-toggle {
  min-height: 48px;
  min-width: 48px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: var(--outline);
  color: var(--on-surface-variant);
}
.auth-card .password-field .password-toggle:hover,
.auth-card .password-field .password-toggle:focus-visible {
  color: var(--ink-navy);
  border-color: var(--ink-navy);
  background: rgba(15, 40, 71, 0.04);
}
.auth-card .password-field .password-toggle[aria-pressed="true"] {
  color: var(--ink-navy);
}
.auth-card-wide { max-width: 520px; }
.auth-consent-switch .form-check-input { width: 2.5em; height: 1.25em; cursor: pointer; }
.auth-consent-switch .form-check-label { font-size: 0.875rem; line-height: 1.45; cursor: pointer; color: var(--on-surface-variant); }
.consent-modal-body h1 { font-size: 1.25rem; margin-bottom: 1rem; }
.consent-modal-body p { margin-bottom: 0.75rem; }
.error-container { margin-bottom: var(--space-4); }

/* Toast queue — bottom-right */
.alert-custom {
  position: fixed;
  z-index: 2000;
  right: 1rem;
  left: auto;
  bottom: 1rem;
  max-width: min(450px, calc(100vw - 2rem));
  min-width: 0;
  width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  pointer-events: none;
}
@media (min-width: 360px) {
  .alert-custom {
    width: auto;
    min-width: min(280px, calc(100vw - 2rem));
  }
}
.alert-custom > .alert {
  margin-bottom: 0 !important;
  pointer-events: auto;
  overflow: visible;
}

/* —— Page header & surfaces —— */
.page-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
@media (min-width: 768px) {
  .page-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}
.page-header .subtitle { color: var(--on-surface-variant); margin: var(--space-1) 0 0; max-width: 56ch; font-size: 0.9375rem; }
.page-header-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.surface {
  background: var(--paper-white);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.surface-flush { padding: 0; overflow: hidden; }

.form-narrow { max-width: 420px; }
.form-select.form-narrow,
.form-select-sm.form-narrow { max-width: 220px; width: auto; }
.form-medium { max-width: 560px; }
.form-wide { max-width: 720px; }
.work-wide { max-width: none; }

.paper-detail-section + .paper-detail-section {
  border-top: 1px solid var(--outline);
  padding-top: var(--space-4);
}
.paper-detail-section h2.h6 { margin-bottom: var(--space-2); }

.form-error-summary { outline: none; }
.form-error-summary ul { margin-top: var(--space-2); }
.sp-file-drop.is-invalid {
  border-color: var(--error-crimson);
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.15);
}
.sp-file-drop.is-drag { border-color: var(--academic-gold); background: rgba(201, 162, 39, 0.06); }
.rev-decision-panel .h6,
.rev-paper-meta .h6 { color: var(--deep-navy); }
.rev-status-panel .badge { vertical-align: middle; }

.pub-section {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding: var(--space-5) var(--space-4);
}
.pub-section .page-header { margin-bottom: var(--space-4); }
.pub-section + .pub-section { padding-top: 0; }

.settings-local-nav {
  position: sticky;
  top: calc(var(--topbar-h, 56px) + var(--space-2));
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-2) 0 var(--space-3);
  margin-bottom: var(--space-3);
  background: linear-gradient(180deg, var(--surface-muted, #f5f6f8) 70%, transparent);
}
.settings-local-nav a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--deep-navy);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--outline);
  background: var(--paper-white);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.settings-local-nav a:hover { border-color: var(--deep-navy); }

@media (max-width: 575px) {
  .table-responsive-lock {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* —— Cards —— */
.conf-card {
  background: var(--paper-white);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.conf-card .thumb {
  display: block;
  height: 120px;
  background: linear-gradient(135deg, var(--deep-navy), #3a5078);
  text-decoration: none;
  cursor: pointer;
  background-size: cover;
  background-position: center;
}
.conf-card .thumb.has-image {
  background-color: var(--deep-navy);
}
.conf-card .thumb:hover,
.conf-card .thumb:focus-visible {
  filter: brightness(1.08);
  outline: none;
}
.conf-card .body { padding: var(--space-4); flex: 1; display: flex; flex-direction: column; }
.conf-card .meta { font-size: 0.6875rem; letter-spacing: .06em; color: var(--academic-gold); font-weight: 700; text-transform: uppercase; }
.conf-card h3 { font-size: 1.125rem; margin: var(--space-2) 0; font-family: var(--font-display); }
.conf-card .foot {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--outline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.kpi-tile {
  background: var(--paper-white);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  height: 100%;
}
.kpi-tile .kpi-label { font-size: 0.8125rem; color: var(--on-surface-variant); margin-bottom: var(--space-1); }
.kpi-tile .kpi-value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; color: var(--deep-navy); line-height: 1.1; }
.kpi-tile .kpi-value .badge-status {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  vertical-align: middle;
}
.form-label-nowrap { white-space: nowrap; }
.surface > .h6 {
  margin: 0 0 var(--space-4);
  color: var(--deep-navy);
}

/* Flatpickr — RU + 24h, matches Scholarly Prestige */
.flatpickr-calendar {
  font-family: var(--font-body);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(26, 43, 72, 0.12);
}
.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
span.flatpickr-weekday {
  color: var(--deep-navy);
  fill: var(--deep-navy);
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
  background: var(--deep-navy);
  border-color: var(--deep-navy);
}
.flatpickr-day.inRange,
.flatpickr-day.prevMonthDay.inRange,
.flatpickr-day.nextMonthDay.inRange {
  background: rgba(26, 43, 72, 0.12);
  border-color: transparent;
  box-shadow: none;
}
input.js-daterange-alt {
  cursor: pointer;
}
.flatpickr-time input.flatpickr-hour,
.flatpickr-time input.flatpickr-minute {
  font-weight: 600;
  color: var(--deep-navy);
}
.flatpickr-time .flatpickr-am-pm {
  display: none !important;
}
input.js-datetime-alt {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.25rem;
}

.role-chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius);
  background: var(--gallery);
  border: 1px solid var(--outline);
  color: var(--deep-navy);
  margin: 2px 4px 2px 0;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.badge-status::before {
  content: attr(data-status-mark);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.85;
}
.badge-status[data-status-mark=""]::before {
  content: none;
  display: none;
}
.badge-status.ok { background: var(--success-bg); color: var(--success-emerald); border-color: rgba(6,95,70,.2); }
.badge-status.err { background: var(--error-bg); color: var(--error-crimson); border-color: rgba(186,26,26,.2); }
.badge-status.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(146,64,14,.2); }
.badge-status.muted { background: var(--gallery); color: var(--on-surface-variant); border-color: var(--outline); }

/* —— Filter panel —— */
.filter-panel {
  background: var(--paper-white);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-end;
}
.filter-panel .filter-field { flex: 1 1 160px; min-width: 140px; }
.filter-panel .filter-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.filter-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.filter-chip {
  border: 1px solid var(--outline);
  background: var(--gallery);
  border-radius: var(--radius);
  padding: 4px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--on-surface-variant);
}
.filter-chip.active { border-color: var(--academic-gold); color: var(--deep-navy); background: rgba(212,175,55,.12); }

/* —— Stepper —— */
.stepper { margin-bottom: var(--space-5); }
.stepper-horizontal {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.stepper-vertical {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 280px;
}
@media (max-width: 767px) {
  .stepper-vertical { max-width: none; flex-direction: row; flex-wrap: wrap; }
  .stepper-vertical .step { flex: 1; min-width: 120px; }
}
.stepper .step {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--paper-white);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--on-surface-variant);
}
.stepper .step.active {
  border-color: var(--academic-gold);
  color: var(--deep-navy);
  box-shadow: inset 3px 0 0 var(--academic-gold);
}
.stepper .step.done { border-color: var(--success-emerald); color: var(--success-emerald); }

.stepper-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 768px) {
  .stepper-layout { grid-template-columns: 240px 1fr; align-items: start; }
}

/* —— Data table —— */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}
.data-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.data-table th, .data-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--outline);
  text-align: left;
  vertical-align: middle;
  font-size: 0.9375rem;
}
.data-table tbody tr:nth-child(even) { background: var(--gallery); }
.data-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--on-surface-variant);
  font-weight: 600;
  background: var(--paper-white);
  white-space: nowrap;
}
.table-program th.col-prog-num,
.table-program td.col-prog-num {
  width: 2.25rem;
  max-width: 2.25rem;
  min-width: 2.25rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
}
.table-program { min-width: 0; }

.prog-entry-break {
  min-height: 1.6rem;
  max-height: 1.85rem;
  line-height: 1.2;
  background: var(--surface-container-low, #f3f4f6);
}
.prog-entry-break .btn,
.prog-entry-paper .btn {
  line-height: 1;
  align-self: center;
}
.prog-entry-paper {
  min-height: 1.6rem;
  line-height: 1.25;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}
.prog-preview-list {
  padding-left: 1.1rem;
}
.prog-preview-break {
  background: var(--surface-container-low, #f3f4f6);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}
.prog-preview-paper {
  line-height: 1.35;
}

.empty-state {
  text-align: center;
  padding: var(--space-7) var(--space-4);
  color: var(--on-surface-variant);
}
.empty-state .empty-icon { font-size: 2.5rem; color: var(--outline-strong); margin-bottom: var(--space-3); }
.empty-state p { margin: 0 0 var(--space-4); max-width: 36ch; margin-left: auto; margin-right: auto; }

.btn-primary {
  --bs-btn-bg: var(--deep-navy);
  --bs-btn-border-color: var(--deep-navy);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: transparent;
  --bs-btn-hover-border-color: var(--deep-navy);
  --bs-btn-hover-color: var(--deep-navy);
  background: var(--deep-navy);
  border-color: var(--deep-navy);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
}
.btn-primary:hover {
  background: transparent;
  border-color: var(--deep-navy);
  color: var(--deep-navy);
}
.btn-outline-secondary { border-radius: var(--radius); font-weight: 600; }
.btn-gold {
  --bs-btn-bg: var(--academic-gold);
  --bs-btn-border-color: var(--academic-gold);
  --bs-btn-color: var(--deep-navy);
  --bs-btn-hover-bg: #c4a032;
  --bs-btn-hover-border-color: #c4a032;
  --bs-btn-hover-color: var(--deep-navy);
  --bs-btn-active-bg: #b3922d;
  --bs-btn-active-border-color: #b3922d;
  --bs-btn-active-color: var(--deep-navy);
  background-color: var(--academic-gold);
  border-color: var(--academic-gold);
  color: var(--deep-navy);
  font-weight: 600;
  border-radius: var(--radius);
}
.btn-gold:hover,
.btn-gold:focus-visible {
  background-color: var(--bs-btn-hover-bg);
  border-color: var(--bs-btn-hover-border-color);
  color: var(--bs-btn-hover-color);
}

.hero-pub {
  background: var(--deep-navy);
  color: #fff;
  padding: var(--space-6) var(--space-4);
  margin-bottom: var(--space-5);
  min-height: var(--hero-height, 320px);
}
.hero-pub.has-bg {
  width: calc(100% - 2 * var(--space-4));
  max-width: calc(var(--container-max) - 2 * var(--space-4));
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-5);
  aspect-ratio: auto;
  height: var(--hero-height, 400px);
  min-height: var(--hero-height, 400px);
  display: flex;
  align-items: flex-start;
  background-color: var(--deep-navy);
  background-image:
    linear-gradient(165deg, rgba(26, 40, 64, var(--hero-overlay, 0.72)) 0%, rgba(26, 40, 64, calc(var(--hero-overlay, 0.72) * 0.75)) 100%),
    var(--hero-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: var(--space-4) var(--space-5);
  overflow: auto;
  border-radius: var(--radius-lg);
}
.hero-pub.has-bg > .container-app {
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
@media (min-width: 768px) {
  .hero-pub { padding: var(--space-7) var(--space-7); }
  .hero-pub.has-bg {
    width: calc(100% - 2 * var(--space-7));
    max-width: calc(var(--container-max) - 2 * var(--space-7));
    padding: var(--space-5) var(--space-6);
  }
}
@media (max-width: 767px) {
  .hero-pub.has-bg { padding: var(--space-4); }
}
.hero-pub h1 { color: #fff; font-size: clamp(1.75rem, 4vw, 2.25rem); margin-bottom: var(--space-3); }
.hero-pub .lead { color: rgba(255,255,255,.82); max-width: 50ch; margin-bottom: var(--space-5); }

/* Hero countdown to registration_start */
.hero-countdown {
  margin-top: var(--space-5);
  margin-left: auto;
  margin-right: 0;
  width: fit-content;
  max-width: 100%;
  text-align: right;
}
.hero-countdown-label {
  margin: 0 0 var(--space-1);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
.hero-countdown-tz {
  margin: 0 0 var(--space-3);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.7);
}
.hero-countdown-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: flex-end;
}
.hero-countdown-unit {
  min-width: 4.25rem;
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: var(--radius);
  text-align: center;
}
.hero-countdown-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
}
.hero-countdown-unit-label {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}
.hero-countdown-done {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--academic-gold);
}

.tabs-cm {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--outline);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  overflow-x: auto;
}
.tabs-cm a, .tabs-cm button {
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--on-surface-variant);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.tabs-cm a.active, .tabs-cm button.active {
  color: var(--deep-navy);
  border-bottom-color: var(--academic-gold);
}

.tabs-cm span.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--on-surface-variant, #5f5e62);
  border-bottom: 2px solid transparent;
}
.tabs-cm-grouped { overflow: visible; }
.tabs-cm-grouped .dropdown { display: flex; }
.tabs-cm-grouped .dropdown-menu { padding: var(--space-2); min-width: 220px; }
.tabs-cm-grouped .dropdown-menu a {
  display: block;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 500;
  white-space: normal;
}
.tabs-cm-grouped .dropdown-menu a.active {
  color: var(--deep-navy);
  background: rgba(212,175,55,.16);
}

.side-nav-section { border-top: 1px solid rgba(255,255,255,.08); }
.side-nav-section summary {
  cursor: pointer;
  list-style: none;
  padding: 10px var(--space-4);
  color: rgba(255,255,255,.82);
  font-weight: 600;
  font-size: 0.875rem;
}
.side-nav-section summary::-webkit-details-marker { display: none; }
.side-nav-section summary::after { content: "＋"; float: right; color: rgba(255,255,255,.45); }
.side-nav-section[open] summary::after { content: "−"; }
.side-nav-section summary:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav-section-links a { padding-left: calc(var(--space-4) + var(--space-3)); font-size: 0.875rem; }

.shell-lk-sidebar .nav-disabled {
  color: rgba(255, 255, 255, 0.35);
  display: block;
  padding: 10px var(--space-4);
  border-left: 2px solid transparent;
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.disabled,
a.btn.disabled {
  pointer-events: none;
  opacity: 0.55;
  cursor: not-allowed;
}

.nav-trail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
}
.nav-trail a {
  color: var(--deep-navy);
  text-decoration: none;
  font-weight: 500;
}
.nav-trail a:hover { text-decoration: underline; }
.nav-trail-current { color: var(--on-surface-variant); font-weight: 600; }
.nav-trail-sep { opacity: 0.45; user-select: none; padding: 0 2px; }

.topbar-conf-hub {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--academic-gold);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.08);
  white-space: nowrap;
}
.topbar-conf-hub:hover { color: #fff; background: rgba(255,255,255,.14); }

.side-conf-links {
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.side-hub, .side-public-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: rgba(255,255,255,.9);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.side-hub:hover, .side-public-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-hub.active { background: rgba(201,162,39,.2); color: var(--academic-gold); }
.side-public-link { font-weight: 500; opacity: 0.85; font-size: 0.8125rem; }

.hub-tile {
  transition: box-shadow 0.15s, transform 0.15s;
}
.hub-tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.role-launcher-tile {
  transition: box-shadow 0.15s, transform 0.15s;
}
.role-launcher-tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.role-dash-actions .btn { white-space: nowrap; }

.next-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid rgba(184, 148, 58, 0.5);
  border-left: 4px solid var(--academic-gold);
  border-radius: var(--radius-lg);
  background: linear-gradient(100deg, rgba(184, 148, 58, 0.12), var(--surface, #fff) 70%);
}
.next-action-kicker {
  margin-bottom: var(--space-1);
  color: var(--on-surface-variant);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.next-action p { color: var(--on-surface-variant); }
@media (max-width: 575.98px) {
  .next-action { align-items: stretch; flex-direction: column; }
  .next-action .btn { width: 100%; }
}

.next-steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.next-steps-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--outline);
}
.next-steps-list li:last-child { border-bottom: 0; }
.next-steps-list a { font-weight: 600; text-decoration: none; }
.next-steps-list a:hover { text-decoration: underline; }

.cms-save-error { margin-bottom: var(--space-3); }
.cms-save-error .alert { margin-bottom: 0; }
.cms-page-item.unsaved .cms-page-title::after {
  content: " ●";
  color: var(--academic-gold);
}
.cms-draft-banner { font-size: 0.875rem; }
.cms-editor-toolbar .btn.is-saving { pointer-events: none; opacity: 0.7; }
.field-inline-error {
  color: var(--error-crimson);
  font-size: 0.8125rem;
  margin-top: 4px;
}

@media (max-width: 767px) {
  .topbar-conf-hub span:not(.icon-ms) { display: none; }
  .nav-trail { font-size: 0.75rem; }
}

.wizard-steps .w-step {
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  background: var(--paper-white);
}

.work-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 960px) {
  .work-layout.has-side { grid-template-columns: 1fr 320px; }
}


.note-inline { font-size: 0.8125rem; color: var(--on-surface-variant); }
.cms-html { line-height: 1.65; }
.cms-html img { max-width: 100%; height: auto; }
.note-editor.note-frame { border-color: var(--outline) !important; border-radius: var(--radius); }

.dropdown-conf-switcher .dropdown-toggle {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 0.8125rem;
  padding: 4px 10px;
  border-radius: var(--radius);
  max-width: min(36ch, 40vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-conf-switcher .dropdown-toggle::after { margin-left: var(--space-2); }
.dropdown-conf-switcher .dropdown-menu {
  background: #fff;
  color: var(--on-surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--space-2) 0;
  margin-top: var(--space-2);
  max-height: min(60vh, 360px);
  overflow-y: auto;
}
.dropdown-conf-switcher .dropdown-item {
  color: var(--on-surface);
}
.dropdown-conf-switcher .dropdown-item:hover,
.dropdown-conf-switcher .dropdown-item:focus {
  background: var(--gallery);
  color: var(--on-surface);
}

.dropdown-role-switcher .dropdown-toggle {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 0.8125rem;
  padding: 4px 10px;
  border-radius: var(--radius);
  max-width: min(22ch, 28vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-role-switcher .dropdown-toggle::after { margin-left: var(--space-2); }
.dropdown-role-switcher .dropdown-menu {
  background: #fff;
  color: var(--on-surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--space-2) 0;
  margin-top: var(--space-2);
  max-height: min(60vh, 360px);
  overflow-y: auto;
}
.dropdown-role-switcher .dropdown-item {
  color: var(--on-surface);
}
.dropdown-role-switcher .dropdown-item:hover,
.dropdown-role-switcher .dropdown-item:focus {
  background: var(--gallery);
  color: var(--on-surface);
}

.rating-bar { height: 8px; max-width: 280px; display: inline-block; width: 70%; vertical-align: middle; }

/* Feedback form: star rating + NPS scale */
.fb-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.fb-star {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px;
  margin: 0;
  cursor: pointer;
  line-height: 1;
  color: var(--outline-strong, #c4c7c5);
  border-radius: var(--radius-sm, 6px);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fb-star .icon-ms {
  font-size: 1.75rem;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  transition: color 0.12s ease, font-variation-settings 0.12s ease;
}
.fb-star:hover,
.fb-star:focus-visible {
  outline: none;
  background: rgba(212, 175, 55, 0.1);
}
.fb-star.is-on {
  color: var(--academic-gold, #d4af37);
}
.fb-star.is-on .icon-ms {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.fb-nps-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.fb-nps-btn {
  appearance: none;
  min-width: 40px;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--outline, #cac4d0);
  border-radius: var(--radius, 8px);
  background: var(--paper-white, #fff);
  color: var(--deep-navy, #0f2847);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.fb-nps-btn:hover,
.fb-nps-btn:focus-visible {
  outline: none;
  border-color: var(--deep-navy, #0f2847);
  background: rgba(15, 40, 71, 0.06);
}
.fb-nps-btn.is-on {
  background: var(--deep-navy, #0f2847);
  border-color: var(--deep-navy, #0f2847);
  color: #fff;
}
.fb-nps-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
#fb-rating-hint {
  text-align: center;
}
#fb-rating-label,
#fb-nps-label {
  display: block;
  text-align: center;
}

.modal-content { border-radius: var(--radius-lg); border: 1px solid var(--outline); box-shadow: var(--shadow-level2); }
.offcanvas { box-shadow: var(--shadow-level2); }
.offcanvas-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }

.screen-root[data-screen] { /* smoke hook */ }

/* —— CMS page editor —— */
.cms-work-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 960px) {
  .cms-work-layout { grid-template-columns: 240px 1fr; }
}
.cms-sidebar { padding: var(--space-3); }
.cms-sidebar-head { margin-bottom: var(--space-3); }
.cms-page-list {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
}
.cms-page-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: var(--space-1);
}
.cms-page-item:hover { background: var(--gallery); }
.cms-page-item.active {
  background: var(--gallery);
  border-color: var(--academic-gold);
  box-shadow: inset 3px 0 0 var(--academic-gold);
}
.cms-page-item .cms-page-del {
  padding: 0.1rem 0.35rem;
  line-height: 1;
  opacity: 0.65;
}
.cms-page-item:hover .cms-page-del,
.cms-page-item.active .cms-page-del {
  opacity: 1;
}
.table-row-actions .btn {
  white-space: nowrap;
}
.cms-page-title { font-size: 0.875rem; font-weight: 600; }
.cms-page-meta { flex-shrink: 0; }
.cms-editor { padding: var(--space-4); min-width: 0; }
.cms-hint-footnote {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.cms-hint-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--outline);
  border-radius: 50%;
  background: var(--paper-white);
  color: var(--on-surface-variant);
  cursor: pointer;
  line-height: 1;
}
.cms-hint-toggle:hover,
.cms-hint-toggle[aria-expanded="true"] {
  border-color: var(--deep-navy);
  color: var(--deep-navy);
  background: var(--gallery);
}
.cms-hint-toggle .icon-ms {
  font-size: 1.125rem;
}
.cms-hint-bubble {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  min-width: 220px;
  max-width: min(360px, 70vw);
  padding: 10px 12px;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--paper-white);
  box-shadow: var(--shadow-level2, 0 4px 16px rgba(26, 40, 64, 0.12));
  color: var(--on-surface-variant);
  font-size: 0.8125rem;
  line-height: 1.45;
}
.cms-hint-bubble::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 12px;
  width: 10px;
  height: 10px;
  background: var(--paper-white);
  border-left: 1px solid var(--outline);
  border-top: 1px solid var(--outline);
  transform: rotate(45deg);
}

.cms-assets-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
@media (min-width: 900px) {
  .cms-assets-grid { grid-template-columns: 1fr 1fr; }
}
.cms-asset-card {
  padding: var(--space-4);
}
.cms-asset-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.cms-asset-card-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--deep-navy);
}
.cms-asset-hint {
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
  margin: 0 0 var(--space-3);
  line-height: 1.45;
}
.cms-asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.cms-logo-preview {
  min-height: 120px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--outline-strong);
  background: var(--gallery);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding: var(--space-3);
}
.cms-logo-preview img {
  max-width: 100%;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  background: rgba(26, 40, 64, 0.08);
}
.cms-logo-preview.has-image {
  border-style: solid;
  border-color: var(--outline);
  background: var(--paper-white, #fff);
}
.cms-asset-placeholder {
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
}
.cms-hero-bg-preview {
  min-height: 120px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--outline-strong);
  background: var(--deep-navy);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-3);
  overflow: hidden;
  font-size: 0.875rem;
}
.cms-hero-bg-preview.has-image {
  border-style: solid;
  color: transparent;
}

.cms-partners-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.cms-partner-card {
  padding: var(--space-3);
  border: 1px solid var(--outline);
}
.cms-partner-card-top {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  margin-bottom: var(--space-3);
}
.cms-partner-bg-preview {
  flex: 1;
  min-height: 110px;
  border-radius: var(--radius-lg);
  background: var(--deep-navy);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
}
.cms-partner-logo-preview {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92) center / contain no-repeat;
  box-shadow: var(--shadow-level1, 0 1px 3px rgba(0, 0, 0, 0.12));
}
.partners-carousel {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--deep-navy);
}
.partners-carousel .carousel-indicators {
  margin-bottom: 0.75rem;
}
.partner-slide {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-5);
  background: linear-gradient(165deg, #1a2840 0%, #2a3f63 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.partner-slide.has-bg {
  background-image:
    linear-gradient(165deg, rgba(26, 40, 64, 0.72) 0%, rgba(26, 40, 64, 0.55) 100%),
    var(--partner-bg);
  background-size: cover;
  background-position: center;
}
.partner-slide.has-video {
  background-image: none;
  background-color: #0b1220;
}
.partner-slide-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.partner-slide.has-video::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(165deg, rgba(26, 40, 64, 0.55) 0%, rgba(26, 40, 64, 0.35) 100%);
  pointer-events: none;
}
.partner-slide-logo,
.partner-slide-name {
  position: relative;
  z-index: 2;
}
.partner-mute-btn {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--deep-navy);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.partner-mute-btn:hover { background: #fff; }
.partner-mute-btn .icon-ms { font-size: 1.35rem; line-height: 1; }
.partner-mute-btn.is-unmuted { background: var(--academic-gold); color: #1a2840; }
.partner-slide-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.partner-slide-name {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  max-width: 28ch;
  line-height: 1.3;
}
.cms-partner-card .cms-partner-media {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.cms-partner-media-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.cms-partner-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius);
  background: #eef2f7;
  border: 1px solid var(--outline);
}
.cms-partner-thumb.is-logo { object-fit: contain; background: #fff; }
@media (min-width: 768px) {
  .partner-slide { min-height: 340px; }
}

/* —— SCR-CM-07 Proceedings (Stitch-inspired) —— */
.proc-pipeline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  gap: var(--space-2);
  padding: var(--space-2) 0;
}
.proc-pipeline::before {
  content: "";
  position: absolute;
  top: calc(20px + var(--space-2));
  left: 12%;
  right: 12%;
  height: 2px;
  background: var(--outline);
  z-index: 0;
}
.proc-pipeline::after {
  content: "";
  position: absolute;
  top: calc(20px + var(--space-2));
  left: 12%;
  height: 2px;
  /* Progress is 0–100 unitless; width relative to the track (100% − 24%), not the full row */
  width: calc((100% - 24%) * var(--proc-pipe-progress, 0) / 100);
  max-width: calc(100% - 24%);
  background: var(--success-emerald);
  z-index: 0;
  transition: width 0.25s ease;
  pointer-events: none;
}
.proc-pipeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
  background: var(--paper-white);
  padding: 0 var(--space-2);
  min-width: 0;
}
.proc-pipeline-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
  border: 2px solid var(--outline);
  background: var(--gallery);
  color: var(--on-surface-variant);
  font-size: 1.125rem;
}
.proc-pipeline-step.done .proc-pipeline-dot {
  background: var(--success-emerald);
  border-color: var(--success-emerald);
  color: #fff;
}
.proc-pipeline-step.active .proc-pipeline-dot {
  background: var(--paper-white);
  border-color: var(--academic-gold);
  color: var(--academic-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}
.proc-pipeline-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  line-height: 1.25;
}
.proc-pipeline-step.active .proc-pipeline-label,
.proc-pipeline-step.done .proc-pipeline-label {
  color: var(--deep-navy);
}
.proc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 992px) {
  .proc-layout {
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    align-items: start;
  }
}
.proc-col-main,
.proc-col-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.proc-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--outline);
}
.proc-card-head .h6 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.proc-card-sub {
  margin: var(--space-1) 0 0;
  font-size: 0.875rem;
  color: var(--on-surface-variant);
}
.proc-tree {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.proc-node {
  --proc-depth: 0;
}
.proc-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  background: var(--paper-white);
  margin-left: calc(var(--proc-depth, 0) * 16px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.proc-row:hover {
  border-color: var(--academic-gold);
}
.proc-row.is-dragging {
  opacity: 0.5;
}
.proc-row.proc-drag-over {
  border-color: var(--deep-navy);
  box-shadow: inset 0 0 0 1px var(--deep-navy);
}
.proc-handle {
  cursor: grab;
  color: var(--outline-strong, var(--on-surface-variant));
  flex-shrink: 0;
  user-select: none;
  padding-top: 2px;
}
.proc-handle:active {
  cursor: grabbing;
}
.proc-row-body {
  flex: 1;
  min-width: 0;
}
.proc-row-title {
  font-weight: 600;
  color: var(--deep-navy);
  margin: 0;
  font-size: 0.9375rem;
}
.proc-row-meta {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--on-surface-variant);
  margin-top: 2px;
}
.proc-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  flex-shrink: 0;
}
.proc-children {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.proc-expand {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--outline);
}
.proc-overview-rows {
  display: flex;
  flex-direction: column;
}
.proc-overview-rows .proc-ov-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--outline);
  font-size: 0.9375rem;
}
.proc-overview-rows .proc-ov-row:last-child {
  border-bottom: none;
}
.proc-overview-rows .proc-ov-val {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 600;
  color: var(--deep-navy);
}
.proc-assembly {
  border-color: var(--academic-gold) !important;
  background: var(--gallery);
  text-align: center;
}
.proc-assembly-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-3);
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.2);
  color: var(--academic-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}
.proc-assembly .btn {
  width: 100%;
}
.proc-assembly-or {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-4) 0;
  color: var(--on-surface-variant);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.proc-assembly-or::before,
.proc-assembly-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--outline);
}
.proc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
@media (max-width: 575px) {
  .proc-pipeline-label { font-size: 0.6875rem; }
  .proc-pipeline-dot { width: 32px; height: 32px; font-size: 1rem; }
  .proc-row { flex-wrap: wrap; }
}

/* —— CMS visual builder —— */
.cms-builder-layout {
  display: grid;
  grid-template-columns: 220px 1fr 300px;
  gap: var(--space-3);
  align-items: start;
  min-height: 70vh;
}
@media (max-width: 1199px) {
  .cms-builder-layout { grid-template-columns: 1fr; }
}
.cms-builder-preview {
  background: var(--surface-muted, #f5f6f8);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  overflow: auto;
  max-height: calc(100vh - 180px);
  position: relative;
  /* Keep preview below LK topbar when page scrolls (sticky/pub-nav must not escape) */
  z-index: 0;
  isolation: isolate;
  margin-inline: auto;
  width: 100%;
  transition: width 0.2s ease;
}
.cms-builder-preview.cms-preview-tablet { width: min(768px, 100%); }
.cms-builder-preview.cms-preview-mobile { width: min(390px, 100%); }
.cms-device-switch .btn.active {
  background: var(--deep-navy);
  border-color: var(--deep-navy);
  color: #fff;
}
.cms-toolbar-separator {
  width: 1px;
  align-self: stretch;
  background: var(--outline);
  margin-inline: var(--space-1);
}
.cms-builder-preview .shell-public {
  min-height: 400px;
}
.cms-builder-preview .shell-public-sticky,
.cms-builder-preview .dates-widget.sticky-widget {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
}
.cms-edit-section {
  outline: 1px dashed transparent;
  cursor: pointer;
  transition: outline-color 0.15s;
}
.cms-builder-preview.edit-mode .cms-edit-section:hover,
.cms-builder-preview.edit-mode [data-cms-target]:hover {
  outline: 1px dashed var(--academic-gold);
}
.cms-edit-section.is-selected,
.cms-builder-preview.edit-mode [data-cms-target].is-selected {
  outline: 2px solid var(--academic-gold);
}
.cms-builder-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  align-items: center;
}
.cms-inspector .form-label { font-size: 0.8125rem; }
.cms-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
}
.cms-card-thumb-preview {
  height: 80px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--deep-navy), #3a5078);
  background-size: cover;
  background-position: center;
  margin-bottom: var(--space-2);
}
.cms-section-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3);
}
.cms-section-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-1);
  cursor: pointer;
}
.cms-section-list li.active {
  border-color: var(--academic-gold);
  background: rgba(184, 148, 58, 0.08);
}
.cms-section-list li.cms-sec-drag-over {
  border-color: var(--deep-navy);
  border-style: dashed;
}
.cms-section-list .cms-sec-grip {
  cursor: grab;
  color: var(--text-muted);
  user-select: none;
  padding: 0 0.25rem;
}
.cms-image-block img { max-width: 100%; border-radius: var(--radius-md); }
.cms-image-block figcaption { font-size: 0.875rem; color: var(--text-muted); margin-top: var(--space-1); }
.cms-video-block { width: 100%; }
.cms-video-title { margin-bottom: var(--space-3); }
.cms-video-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0b1220;
  isolation: isolate;
  aspect-ratio: 16 / 9;
}
.cms-video-frame .cms-block-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
}
.cms-video-frame .cms-mute-btn,
.cms-video-frame .partner-mute-btn {
  right: 1rem;
  bottom: 1rem;
}
.cms-media-video-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  background: #1a2840;
  color: #fff;
}
.cms-media-video-thumb .icon-ms { font-size: 2rem; }

.cms-edit-section {
  position: relative;
  padding-top: 1.25rem;
}
.cms-block-handle {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  z-index: 2;
  border: 1px solid var(--outline);
  background: var(--surface, #fff);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  line-height: 1;
  padding: 0.2rem 0.35rem;
  cursor: grab;
  color: var(--text-muted);
}
.cms-block-type-badge {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  z-index: 2;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--deep-navy);
  color: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
}
.cms-builder-preview.edit-mode .cms-edit-section:hover .cms-block-type-badge,
.cms-edit-section.is-selected .cms-block-type-badge {
  opacity: 0.9;
}
.cms-palette-wrap { position: relative; }
.cms-palette-menu {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  min-width: 200px;
  margin-top: 0.25rem;
  padding: 0.35rem;
  background: var(--surface, #fff);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.cms-palette-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}
.cms-palette-menu button:hover {
  background: rgba(184, 148, 58, 0.12);
}
.cms-logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}
.cms-logo-row-left { justify-content: flex-start; }
.cms-logo-row-center { justify-content: center; }
.cms-logo-row-right { justify-content: flex-end; }
.brand-logo-row {
  max-height: 56px;
  width: auto;
  object-fit: contain;
}
.cms-hero-logos-list .cms-hero-logo-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.cms-hero-logos-list img {
  max-height: 40px;
  max-width: 48px;
  object-fit: contain;
}
.cms-media-modal .modal-body {
  max-height: 60vh;
  overflow: auto;
}
.cms-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
}
.cms-media-tile {
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 0.35rem;
  background: var(--surface, #fff);
  text-align: center;
}
.cms-media-tile .cms-media-pick {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: center;
}
.cms-media-tile:hover,
.cms-media-tile.is-selected {
  border-color: var(--academic-gold);
}
.cms-media-tile img {
  width: 100%;
  height: 72px;
  object-fit: contain;
  background: var(--surface-muted, #f5f6f8);
  border-radius: var(--radius-sm);
}
.cms-media-tile .cms-media-name {
  font-size: 0.7rem;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ——— UX-07…09: ConfUI kit ——— */
.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--deep-navy);
  font-weight: 600;
  border-radius: var(--radius);
  min-height: var(--btn-min-height-sm);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--muted-bg);
  color: var(--deep-navy);
}
.btn,
.btn-sm,
.btn:not(.btn-lg) {
  min-height: var(--btn-min-height-sm);
}
.btn-lg {
  min-height: var(--btn-min-height);
}
/* Bootstrap .btn-sm shrinks padding — keep AA target via padding box */
.btn.btn-sm {
  min-height: 44px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
  font-size: var(--text-body-sm);
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid var(--outline);
  background: var(--muted-bg);
  color: var(--on-surface-variant);
}
.status-chip-ok,
.status-chip-success { background: var(--success-bg); color: var(--success-emerald); border-color: transparent; }
.status-chip-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.status-chip-danger,
.status-chip-error { background: var(--error-bg); color: var(--error-crimson); border-color: transparent; }
.status-chip-info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.status-chip-muted { background: var(--muted-bg); color: var(--muted); }

.ui-skeleton {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.ui-skeleton-line {
  height: 0.85rem;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--muted-bg) 0%, #e8eef5 50%, var(--muted-bg) 100%);
  background-size: 200% 100%;
  animation: ui-skeleton-shine 1.2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .ui-skeleton-line { animation: none; background: var(--muted-bg); }
}
@keyframes ui-skeleton-shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.conf-ui-modal .modal-title { font-family: var(--font-display); }

.danger-zone {
  margin-top: var(--space-6);
  padding: var(--space-4);
  border: 1px solid var(--error-crimson);
  border-radius: var(--radius-lg);
  background: var(--error-bg);
}
.danger-zone-title {
  font-size: var(--text-title-md);
  color: var(--error-crimson);
  margin: 0 0 var(--space-2);
}
.danger-zone-body {
  margin: 0 0 var(--space-3);
  color: var(--on-surface-variant);
  max-width: 48ch;
}

.error-panel {
  padding: var(--space-4);
  border-left: 4px solid var(--error-crimson);
  margin: var(--space-3) 0;
}
.error-panel-title {
  font-weight: 700;
  color: var(--error-crimson);
  margin-bottom: var(--space-2);
}
.error-panel-cause,
.error-panel-impact,
.error-panel-fix {
  margin: 0 0 var(--space-2);
  font-size: var(--text-body-sm);
}
.error-panel-actions { margin-top: var(--space-3); }

.busy-job-host {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: min(360px, calc(100vw - 2rem));
}
.busy-job-card {
  background: var(--paper-white);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-level2);
  padding: var(--space-3) var(--space-4);
}
.busy-job-label { font-weight: 600; margin-bottom: var(--space-2); }
.busy-job-bar {
  height: 6px;
  background: var(--muted-bg);
  border-radius: 3px;
  overflow: hidden;
}
.busy-job-bar > span {
  display: block;
  height: 100%;
  background: var(--deep-navy);
  transition: width 0.2s ease;
}
.busy-job-indeterminate {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--muted-bg), var(--deep-navy), var(--muted-bg));
  background-size: 200% 100%;
  animation: ui-skeleton-shine 1s linear infinite;
}
.busy-job-hint { margin-top: var(--space-2); }

.ui-registry-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-end;
  margin-bottom: var(--space-3);
}
.ui-registry-search { flex: 1 1 220px; max-width: 420px; }
.ui-registry-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.ui-registry-filters {
  display: none;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-end;
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: var(--gallery);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
}
.ui-registry-filters.show {
  display: flex !important;
}
.ui-registry-filter-field { min-width: 140px; }
.ui-registry-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  min-height: 0;
}
.ui-registry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}
.ui-registry-sort {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-height: var(--btn-min-height-sm);
}
.ui-registry-sort:hover,
.ui-registry-sort:focus-visible {
  color: var(--deep-navy);
  text-decoration: underline;
}
.ui-registry-pager {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
}
.ui-registry-page-btns {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.ui-registry-cards { display: none; }
.ui-registry-card {
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}
.ui-registry-card-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-size: var(--text-body-sm);
}
@media (max-width: 767.98px) {
  .ui-registry-table-wrap { display: none; }
  .ui-registry-cards { display: block; }
}

.ui-kit-showcase .danger-zone { margin-top: var(--space-4); }
.ui-kit-showcase .error-panel { margin-top: var(--space-3); }
.ui-kit-showcase .ui-skeleton { margin: var(--space-3) 0; }

/* ——— UX-10: attention queue ——— */
.attention-queue {
  background: var(--paper-white);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.attention-queue-head { margin-bottom: var(--space-3); }
.attention-queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.attention-queue-item {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  border-radius: var(--radius);
  background: var(--gallery);
  border-left: 4px solid var(--info);
}
.attention-queue-item.severity-critical {
  border-left-color: var(--error-crimson);
  background: var(--error-bg);
}
.attention-queue-item.severity-warn {
  border-left-color: var(--warn);
  background: var(--warn-bg);
}
.attention-queue-item.severity-info {
  border-left-color: var(--deep-navy);
}
.attention-queue-sev {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.attention-queue-item.severity-critical .attention-queue-sev { color: var(--error-crimson); }
.attention-queue-item.severity-warn .attention-queue-sev { color: var(--warn); }
.attention-queue-item.severity-info .attention-queue-sev { color: var(--deep-navy); }
.attention-queue-body { flex: 1 1 12rem; min-width: 0; }
.attention-queue-item-title { font-weight: 600; }
.attention-queue-empty { padding: var(--space-2) 0; }

/* ——— UX-12: wizard shell ——— */
.ui-wizard {
  background: var(--paper-white);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}
.ui-wizard-progress { margin-bottom: var(--space-4); }
.ui-wizard-reqs {
  background: var(--gallery);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}
.ui-wizard-reqs ul { margin: 0; padding-left: 1.2rem; }
.ui-wizard-incomplete {
  border: 1px dashed var(--warn);
  background: var(--warn-bg);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}
.ui-wizard-body { min-height: 8rem; margin-bottom: var(--space-4); }
.ui-wizard-footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--outline);
  padding-top: var(--space-3);
}
.ui-wizard-footer-main {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* —— UX-13 WCAG —— */
.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -100px;
  z-index: 10000;
  padding: 0.6rem 1rem;
  background: var(--deep-navy);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: var(--space-3);
  outline: 2px solid var(--gold, #c9a227);
  outline-offset: 2px;
  color: #fff;
}
#main-content:focus {
  outline: none;
}
.icon-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shell-lk-sidebar a,
.nav-links a,
.pub-nav a,
.pub-header-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.cms-preflight-list { margin: 0; padding-left: 1.25rem; }
.cms-preflight-list li { margin-bottom: var(--space-2); }
.cms-preflight-error { color: var(--error-crimson); }
.cms-preflight-warning { color: var(--warn); }
.cms-seo-preview { padding: 12px; border: 1px solid var(--line, #d7dce3); border-radius: 8px; background: #fff; }
.cms-seo-preview-title { color: #1a0dab; font-size: 1rem; line-height: 1.3; }
.cms-seo-preview-url { color: #137333; font-size: .78rem; word-break: break-all; }
.cms-seo-preview-description { color: #4d5156; font-size: .82rem; line-height: 1.4; margin-top: 3px; }
.cms-documents-list { display: grid; gap: 10px; margin-top: 14px; }
.cms-document-link { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 12px 14px; border: 1px solid var(--line, #d7dce3); border-radius: 8px; color: var(--ink, #17233d); text-decoration: none; background: #fff; transition: border-color .15s ease, background-color .15s ease, transform .15s ease; }
.cms-document-link:hover { color: var(--ink, #17233d); border-color: var(--navy, #17233d); background: #f7f9fc; transform: translateY(-1px); }
.cms-document-link:focus-visible { outline: 3px solid rgba(201, 162, 39, .35); outline-offset: 2px; }
.cms-document-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 8px; color: var(--navy, #17233d); background: #eef2f7; }
.cms-document-copy { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; line-height: 1.35; }
.cms-document-copy small { color: #596579; margin-top: 2px; }
.cms-document-file { color: #7a8495; font-family: var(--font-mono, monospace); font-size: .75rem; margin-top: 3px; overflow-wrap: anywhere; }
.cms-document-download { flex: 0 0 auto; }
.cms-doc-item .cms-doc-actions .btn { min-width: 36px; padding-left: .45rem; padding-right: .45rem; }
.cms-doc-item .min-w-0 { min-width: 0; }
.shell-lk-sidebar a {
  box-sizing: border-box;
  width: 100%;
}
.shell-lk-sidebar .side-cta {
  width: auto;
}
.btn-close {
  min-width: 44px;
  min-height: 44px;
}

/* Email typeahead for role assignment */
.conf-email-suggest {
  position: relative;
}
.conf-email-suggest-list {
  position: absolute;
  z-index: 1080;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  max-height: 240px;
  overflow-y: auto;
  margin: 0;
  padding: 4px 0;
  background: #fff;
  border: 1px solid var(--line, #d7dce3);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 35, 61, 0.12);
}
.conf-email-suggest-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  cursor: pointer;
  line-height: 1.25;
}
.conf-email-suggest-item:hover,
.conf-email-suggest-item.is-active {
  background: #eef2f7;
}
.conf-email-suggest-email {
  font-weight: 500;
  color: var(--ink, #17233d);
  word-break: break-all;
}
.conf-email-suggest-name {
  font-size: 0.82rem;
  color: #596579;
}
