:root {
  --blue-900: #102f57;
  --blue-700: #0d5f9f;
  --gold: #d6a62c;
  --gray-050: #f7f9fc;
  --gray-100: #edf1f7;
  --gray-300: #cbd5e1;
  --gray-700: #334155;
  --white: #fff;
  --line: #e3e8f0;
  --shadow-sm: 0 1px 2px rgba(16, 47, 87, .05);
  --danger: #8a1f1f;
  --danger-line: #d99a9a;
  --danger-bg: #fdf2f2;
  --warn: #7a5700;
  --warn-bg: #fdf3dc;
  --ok: #166534;
  --ok-bg: #e7f5ec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: var(--gray-050);
  color: #172033;
}

a {
  color: var(--blue-700);
  text-decoration: none;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 72px 1fr;
}

header {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  color: var(--blue-900);
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--blue-900);
  color: var(--white);
  border-bottom: 4px solid var(--gold);
  font-weight: 800;
}

.brand-logo {
  display: block;
  width: 92px;
  height: auto;
}

.account {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gray-700);
}

.account form {
  margin: 0;
}

aside {
  background: var(--blue-900);
  color: var(--white);
  padding: 24px 18px;
}

aside h2 {
  font-size: 12px;
  line-height: normal;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #a9c1df;
  margin: 24px 10px 8px;
}

aside a {
  display: block;
  padding: 12px 12px;
  border-radius: 6px;
  color: var(--white);
}

aside a:hover {
  background: rgba(255, 255, 255, .12);
}

aside a.active { border-left: 3px solid var(--gold); background: rgba(255, 255, 255, .16); font-weight: 700; }

main {
  padding: 32px;
}

.shell > main { min-width: 0; }

.topline {
  color: var(--gray-700);
  margin-bottom: 12px;
  font-size: 13px;
}

h1 {
  margin: 0 0 24px;
  color: var(--blue-900);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  margin: 0 0 16px;
  color: var(--blue-900);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.card,
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.panel { margin: 0 0 24px; }
.panel:last-child { margin-bottom: 0; }

.publication-edit-summary {
  margin-bottom: 24px;
}

.publication-status-options {
  display: grid;
  gap: 8px;
}

.publication-status-option.check-field:hover {
  border-color: #a9c0db;
}

.publication-status-option__copy {
  display: grid;
  gap: 4px;
}

.publication-status-option__copy small {
  color: var(--gray-700);
  font-size: 14px;
}

.card strong {
  display: block;
  font-size: 28px;
  line-height: 1.2;
  color: var(--blue-900);
  font-variant-numeric: tabular-nums;
}

.cards > .card {
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
}

.cards > .card strong {
  margin-bottom: 4px;
  font-weight: 700;
}

a.card {
  display: block;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

a.card:hover {
  border-color: #b9c9dc;
  box-shadow: 0 10px 26px rgba(16, 47, 87, .1);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 24px;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

@media (min-width: 761px) {
  .table-actions { flex-wrap: nowrap; }
}

.table-action {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-900);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.table-action:hover,
.table-action:focus {
  border-color: #b9c9dc;
  background: #eef4fa;
  color: var(--blue-900);
}

.table-action--primary {
  border-color: transparent;
  background: var(--blue-700);
  color: var(--white);
}

.table-action--primary:hover,
.table-action--primary:focus {
  background: var(--blue-900);
  color: var(--white);
}

.btn,
button {
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: var(--blue-700);
  color: var(--white);
  cursor: pointer;
  font: inherit;
}

.btn,
button:where(:not(.nav-toggle, .multi-select__remove, .expandable-answer__toggle, .publication-fullscreen, .table-action, .filters-panel__toggle, .user-menu__content button)) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 40px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.btn.secondary {
  background: var(--blue-900);
}

.btn.light {
  background: var(--gray-100);
  color: var(--blue-900);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--gray-700);
  background: #fbfcfe;
  font-size: 13px;
  font-weight: 600;
}

.badge {
  display: inline-block;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 4px 10px;
  margin: 2px 4px 2px 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--gray-700);
}

.badge.ok {
  border-color: #86c59e;
  color: var(--ok);
}

.badge.warn {
  border-color: var(--gold);
  color: var(--warn);
}

.badge.danger {
  border-color: var(--danger-line);
  color: var(--danger);
}

.table-scroll {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.panel .table-scroll {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.table-scroll > table { border: 0; }
.table-scroll > table tbody tr:last-child > td { border-bottom: 0; }

tbody tr:hover > td { background: #fbfcfe; }
td { font-variant-numeric: tabular-nums; }

.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

.btn.danger {
  border: 1px solid var(--danger-line);
  background: var(--white);
  color: var(--danger);
}

.btn.danger:hover,
.btn.danger:focus-visible {
  background: var(--danger-bg);
  color: var(--danger);
}

.table-action--danger { color: var(--danger); }

.table-action--danger:hover,
.table-action--danger:focus-visible {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
}

.notice {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 4px solid var(--gold);
  background: #fff8e1;
  color: #172033;
  font-size: 14px;
}

.form-section {
  max-width: 900px;
  margin: 0 0 24px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.form-section h2 {
  margin: 0 0 16px;
  color: var(--blue-900);
  font-size: 18px;
}

.form-section > :last-child,
.form-section > .field:last-child { margin-bottom: 0; }

.is-hidden {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px 24px;
  max-width: 900px;
}

.form-grid .field {
  margin-bottom: 0;
}

.form-grid .full { grid-column: 1 / -1; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 0 0 18px;
}

.filters label {
  margin: 0;
}

.filters:not(.pa-add) label {
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
}

.filters input,
.filters select {
  width: auto;
  min-width: 180px;
}

form .field {
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--blue-900);
}

input,
textarea,
select {
  width: 100%;
  max-width: 720px;
  padding: 10px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font: inherit;
}

input:where(:not([type="checkbox"], [type="radio"], [type="file"], [type="hidden"])),
select:where(:not([multiple])) {
  box-sizing: border-box;
  height: 40px;
  padding: 0 12px;
}

textarea { padding: 8px 12px; }

input[type="checkbox"] {
  width: auto;
}

.field:has(> label + input[type="checkbox"]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
}

.field:has(> label + input[type="checkbox"]) > input[type="checkbox"] { order: -1; margin: 0; }
.field:has(> label + input[type="checkbox"]) > label { margin: 0; cursor: pointer; }
.field:has(> label + input[type="checkbox"]) > :not(label, input) { flex-basis: 100%; }

.helptext {
  display: block;
  margin: 8px 0 16px;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 400;
}

.field > .helptext:last-child { margin-bottom: 0; }

h2:has(+ .helptext) { margin-bottom: 0; }
h2 + .helptext { margin-top: 4px; }

.errorlist {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: var(--danger);
  font-size: 13px;
}

.errorlist.nonfield,
.errorlist.nonform {
  margin: 0 0 16px;
  padding: 12px;
  border-left: 4px solid var(--danger);
  background: var(--danger-bg);
  font-size: 16px;
}

.field-error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.confirm-delete__impact {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 4px solid var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
}

.confirm-delete__impact p { margin: 0 0 8px; }
.confirm-delete__impact p:last-child { margin-bottom: 0; }
.confirm-delete__impact ul { margin: 0 0 8px; padding-left: 20px; }

.messages {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.messages li {
  background: #fff8e1;
  border-left: 4px solid var(--gold);
  padding: 12px 16px;
  margin-bottom: 8px;
}

.messages li.success { background: var(--ok-bg); border-left-color: var(--ok); color: var(--ok); }
.messages li.error { background: var(--danger-bg); border-left-color: var(--danger); color: var(--danger); }
.messages li.info { background: #eef5fb; border-left-color: var(--blue-700); color: var(--blue-900); }

.multi-select {
  max-width: 900px;
}

.multi-select__label {
  margin-bottom: 6px;
}

.multi-select__search {
  max-width: none;
  margin-bottom: 8px;
}

.multi-select__summary {
  margin: 0 0 8px;
  color: var(--gray-700);
  font-size: 14px;
}

.multi-select__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
  margin-bottom: 8px;
}

.multi-select__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid #b9c9dc;
  border-radius: 999px;
  padding: 4px 8px 4px 12px;
  background: #f8fbff;
  color: var(--blue-900);
  font-size: 14px;
}

.multi-select__chip span {
  overflow-wrap: anywhere;
}

.multi-select__remove {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--blue-900);
  line-height: 1;
}

.multi-select__remove:hover,
.multi-select__remove:focus {
  background: var(--blue-900);
  color: var(--white);
}

.multi-select__options {
  max-width: 900px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: var(--white);
}

.multi-select__option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--gray-100);
  color: #172033;
  cursor: pointer;
  font-weight: 400;
}

.multi-select__option:last-of-type {
  border-bottom: 0;
}

.multi-select__option:hover {
  background: #fbfcfe;
}

.multi-select__option input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.multi-select__option span {
  overflow-wrap: anywhere;
}

.multi-select__empty {
  margin: 0;
  padding: 12px;
  color: var(--gray-700);
}

.portal-body,
.login-body {
  min-height: 100vh;
  background: var(--gray-050);
}

.portal-shell {
  min-height: 100vh;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 32px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--blue-900);
  font-weight: 700;
}

.portal-brand__logo {
  display: block;
  width: 112px;
  height: auto;
}

.portal-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-nav > a,
.user-menu > summary {
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--blue-900);
  font-weight: 600;
}

.portal-nav > a:hover,
.portal-nav > a:focus,
.user-menu > summary:hover,
.user-menu[open] > summary {
  background: var(--gray-100);
}

.user-menu {
  position: relative;
}

.user-menu > summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.user-menu > summary::-webkit-details-marker {
  display: none;
}

.user-menu > summary::after {
  content: "▾";
  margin-left: 8px;
  color: var(--gray-700);
}

.user-menu__content {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  min-width: 190px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(16, 47, 87, .12);
}

.user-menu__content a,
.user-menu__content button {
  display: block;
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--blue-900);
  text-align: left;
}

.user-menu__content a:hover,
.user-menu__content button:hover,
.user-menu__content a:focus,
.user-menu__content button:focus {
  background: var(--gray-100);
}

.user-menu__content form {
  margin: 0;
}

.portal-main {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.portal-hero {
  margin-bottom: 16px;
}

.portal-hero h1 {
  margin-bottom: 8px;
  line-height: 1.2;
}

.portal-hero p {
  max-width: 640px;
  margin: 0;
  color: var(--gray-700);
}

.filter-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 8px 0 16px;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  color: var(--blue-900);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.filter-link:hover { border-color: var(--blue-700); }

.filter-link.active {
  background: var(--blue-900);
  border-color: var(--blue-900);
  color: var(--white);
}

.portal-controls {
  margin: 0 0 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.portal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin: 0;
  padding: 16px;
}

.report-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.process-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.portal-search {
  display: flex;
  flex: 1 1 320px;
  align-items: center;
  gap: 12px;
  padding-left: 24px;
  border-left: 1px solid var(--gray-100);
}
.publication-approval-filters { margin: 0; gap: 12px 16px; align-items: end; }
.publication-approval-filters .filter-field { display: grid; gap: 6px; }
.publication-approval-filters .filter-search-action { display: flex; flex: 1 1 320px; max-width: 520px; gap: 12px; align-items: end; }
.publication-approval-filters .filter-field--status select { width: 200px; min-width: 0; max-width: none; }
.publication-approval-filters .filter-field--search { flex: 1 1 auto; }
.publication-approval-filters .filter-field--search input { width: 100%; min-width: 0; max-width: 420px; }
.filter-link span { display: inline-grid; min-width: 24px; height: 20px; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--gray-100); font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1; }
.filter-link.active span { background: rgba(255, 255, 255, .2); }
.portal-search input { flex: 1 1 auto; width: auto; min-width: 0; max-width: none; height: 40px; padding: 0 12px; }
.portal-search button,
.portal-search .btn { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; height: 40px; padding: 0 16px; white-space: nowrap; }

@media (max-width: 1000px) {
  .portal-search { flex-basis: 100%; padding-left: 0; border-left: 0; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.sector-index {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding: 8px 16px;
  background: var(--gray-050);
  border-top: 1px solid var(--gray-100);
  border-radius: 0 0 10px 10px;
  font-size: 13px;
}

.sector-index__label {
  flex: 0 0 auto;
  padding: 6px 0;
  color: var(--gray-700);
  font-weight: 600;
  white-space: nowrap;
}

.sector-index__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sector-index__list li { min-width: 0; max-width: 100%; }

.sector-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--blue-700);
  font-weight: 600;
}

.sector-chip:hover {
  background: var(--gray-100);
  text-decoration: underline;
}

.sector-chip__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sector-chip__count {
  flex: 0 0 auto;
  color: var(--gray-700);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.sector-groups { display: flex; flex-direction: column; gap: 32px; }
.sector-group { scroll-margin-top: 16px; }

.sector-group__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-100);
}

.sector-group__title {
  margin: 0;
  color: var(--blue-900);
  font-size: 18px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.sector-group__count {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

.portal-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

a.portal-card:hover {
  border-color: #b9c9dc;
  box-shadow: 0 6px 18px rgba(16, 47, 87, .07);
}

a.portal-card:focus-visible {
  outline: 3px solid rgba(13, 95, 159, .35);
  outline-offset: 2px;
}

.portal-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.portal-card__type {
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.portal-card__top .status-pill { margin-left: auto; }

.portal-card__title {
  margin: 0;
  color: var(--blue-900);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.portal-card__description {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--gray-700);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.portal-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
  font-size: 13px;
}

.portal-card__meta { min-width: 0; color: var(--gray-700); overflow-wrap: anywhere; }
.portal-card__alert { font-weight: 600; }
.portal-card__alert--danger { color: var(--danger); }
.portal-card__alert--warn { color: var(--warn); }

.portal-card__open {
  margin-left: auto;
  color: var(--blue-700);
  font-weight: 600;
  white-space: nowrap;
}

a.portal-card:hover .portal-card__open { text-decoration: underline; }

.portal-card--unavailable {
  background: var(--gray-050);
  border-style: dashed;
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
}

.portal-card--unavailable .portal-card__title { color: var(--gray-700); }

.status-pill {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill--pending { background: var(--warn-bg); color: var(--warn); }
.status-pill--done { background: var(--ok-bg); color: var(--ok); }

.muted {
  color: var(--gray-700);
}

.empty-state {
  max-width: 620px;
  padding: 24px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.empty-state h2 {
  margin: 0 0 4px;
  color: var(--blue-900);
  font-size: 18px;
}

.empty-state p {
  margin: 0;
  color: var(--gray-700);
}

.summary-cards { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 16px; margin-bottom: 24px; }
.summary-card { padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); }
.summary-card strong { display: block; margin-bottom: 4px; color: var(--blue-900); font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.summary-card span { color: var(--gray-700); font-size: 13px; font-weight: 600; }

@media (min-width: 861px) {
  .cards:has(> :last-child:nth-child(3n)):not(:has(> :last-child:nth-child(4n))),
  .summary-cards:has(> :last-child:nth-child(3n)):not(:has(> :last-child:nth-child(4n))) {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}
.report-filters { margin-bottom: 20px; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.report-filters > div { display: grid; gap: 6px; }
.report-filters > button,
.report-filters > a { align-self: end; }
.report-filters > button {
  align-self: end;
  height: 44px;
  padding-top: 0;
  padding-bottom: 0;
}
.report-filters input, .report-filters select { min-width: 190px; }
.report-filters__search { flex: 1; }
.report-filters__search input { width: 100%; max-width: none; }
.table-wrap { overflow-x: auto; }
.approval-table { min-width: 820px; }

.filters-panel {
  margin: 0 0 24px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.filters-panel__title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-900);
}

.filters-panel__search { margin-bottom: 16px; }
.filters-panel__search label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--gray-700); }
.filters-panel__search input { width: 100%; height: 40px; }

.filters-panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(190px, calc((100% - 48px) / 4)), 1fr));
  gap: 16px;
}

.filters-panel__field { display: grid; gap: 6px; min-width: 0; }
.filters-panel__field label { font-size: 13px; color: var(--gray-700); }
.filters-panel__field select { width: 100%; height: 40px; }

.filters-panel__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 16px;
  color: var(--gray-700);
  font-size: 13px;
}

.active-filters__label {
  font-weight: 600;
  color: var(--blue-900);
}

.active-filters__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.active-filters__chip {
  display: inline-flex;
  align-items: center;
  margin: 0 6px 6px 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  font-size: 12px;
  line-height: 1.4;
  color: var(--blue-900);
  white-space: normal;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 0;
}

.pagination__status { color: var(--gray-700); font-size: 14px; font-variant-numeric: tabular-nums; }

.results-count { margin: 0 0 12px; color: var(--gray-700); font-size: 14px; }

.empty-state-inline {
  padding: 32px 24px;
  text-align: center;
  background: var(--white);
  border: 1px dashed var(--gray-300);
  border-radius: 8px;
  color: var(--gray-700);
}
.empty-state-inline__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--blue-900);
}
.empty-state-inline p { margin: 0 0 12px; }
.empty-state-inline p:last-of-type { margin-bottom: 16px; }

@media (max-width: 560px) {
  .filters-panel__grid { grid-template-columns: 1fr; }
  .filters-panel__actions { justify-content: stretch; }
  .filters-panel__actions > * { flex: 1 1 auto; text-align: center; }
}
.approval-summary { display: grid; gap: 4px; }
.approval-summary span { color: var(--gray-700); font-size: 13px; }

.questionnaire-shell {
  max-width: 820px;
  margin: 0 auto;
}

.questionnaire-header {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue-700);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.questionnaire-header h1 { margin: 0 0 10px; color: var(--blue-900); }
.questionnaire-header p { margin: 0 0 8px; color: var(--gray-700); }
.questionnaire-header p:last-child { margin-bottom: 0; }
.questionnaire-header__instructions { font-style: italic; }

.questionnaire-version-note,
.questionnaire-question.questionnaire-version-note {
  border-left: 4px solid var(--blue-700);
  background: #eef5fb;
  color: var(--blue-900);
}

.questionnaire-version-note p { margin: 0 0 6px; }
.questionnaire-version-note p:last-child { margin-bottom: 0; }

.questionnaire-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.answer-view__header {
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue-700);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.answer-view__header h1 {
  margin: 0 0 8px;
  color: var(--blue-900);
  font-size: 28px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.answer-view__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  color: var(--gray-700);
  font-size: 14px;
}

.answer-view__tag {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.answer-view__tag--current { background: var(--ok-bg); color: var(--ok); }
.answer-view__tag--previous { background: var(--warn-bg); color: var(--warn); }

.response-history {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px 24px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.response-history__title {
  margin: 0 0 4px;
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.response-history__count {
  margin: 0 0 2px;
  color: var(--blue-900);
  font-size: 16px;
  font-weight: 600;
}

.response-history__latest {
  margin: 0;
  color: var(--gray-700);
  font-size: 13px;
}

.response-history__picker { display: grid; gap: 6px; }

.response-history__picker label {
  margin: 0;
  color: var(--blue-900);
  font-size: 13px;
  font-weight: 600;
}

.response-history__controls { display: flex; gap: 8px; }

.response-history__controls select {
  width: auto;
  min-width: 280px;
  max-width: 100%;
  height: 38px;
  padding: 0 10px;
}

.response-history__controls .btn { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; }

.response-history__notice {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  background: var(--gray-050);
  color: var(--gray-700);
  font-size: 14px;
}

.answer-list {
  display: grid;
  gap: 16px;
}

.answer-item {
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.answer-item__question {
  margin: 0 0 8px;
  color: var(--blue-900);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.answer-item__answer {
  color: #172033;
  font-size: 16px;
  line-height: 1.5;
}

.answer-view__actions { gap: 12px; }

.submission-view { max-width: 960px; }

.submission-view .response-history { margin-bottom: 0; }

.submission-view__header h1 { overflow-wrap: anywhere; }

.submission-summary {
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.submission-summary__item dd { overflow-wrap: anywhere; }

.submission-summary__hint { color: var(--gray-700); font-weight: 400; }

.submission-answers__card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.submission-answers__item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
}

.submission-answers__item:last-child { border-bottom: 0; }

.submission-answers__question {
  margin: 0 0 8px;
  color: var(--blue-900);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.submission-answers__number { color: var(--blue-700); }

.submission-answers__answer {
  color: #172033;
  font-size: 16px;
  line-height: 1.5;
}

.submission-answers__empty { margin: 0; padding: 16px 20px; color: var(--gray-700); }

@media (max-width: 760px) {
  .submission-summary,
  .submission-answers__item { padding: 16px; }
  .submission-view__actions .btn { flex: 1 1 auto; text-align: center; }
}

@media (max-width: 640px) {
  .answer-view__header { padding: 16px; }
  .response-history { grid-template-columns: 1fr; padding: 16px; }
  .response-history__controls { flex-wrap: wrap; }
  .response-history__controls select { flex: 1 1 100%; min-width: 0; width: 100%; }
  .response-history__controls .btn { flex: 1 1 auto; justify-content: center; }
  .answer-item { padding: 16px; }
  .answer-view__actions .btn { flex: 1 1 auto; text-align: center; }
}

.questionnaire-required-note {
  margin: 0 0 16px;
  color: var(--gray-700);
  font-size: 13px;
}

.questionnaire-question {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.questionnaire-submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.questionnaire-submit .helptext { margin: 0; }

.questionnaire-question fieldset { border: 0; margin: 0; padding: 0; }

.questionnaire-question__label {
  display: block;
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--blue-900);
}

.questionnaire-question__required { color: var(--danger); margin-left: 2px; }

.questionnaire-question textarea {
  min-height: 84px;
  max-height: 220px;
  resize: vertical;
  width: 100%;
}

.questionnaire-char-count {
  margin-top: 4px;
  text-align: right;
  color: var(--gray-700);
  font-size: 12px;
}

.questionnaire-options {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.questionnaire-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--gray-100);
  border-radius: 6px;
  cursor: pointer;
}

.questionnaire-option:hover { border-color: #b9c9dc; }
.questionnaire-option input[type="radio"] { flex: 0 0 auto; width: auto; margin-top: 3px; }

.questionnaire-question--error { border-color: var(--danger-line); }

.expandable-answer__text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.expandable-answer__text.is-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.expandable-answer__toggle {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: underline;
}

.expandable-answer__toggle:hover,
.expandable-answer__toggle:focus {
  background: none;
  color: var(--blue-900);
}

.expandable-answer__toggle:active { transform: none; }

@media print {
  .expandable-answer__text.is-collapsed {
    -webkit-line-clamp: unset;
    overflow: visible;
  }
  .expandable-answer__toggle { display: none; }
}

@media (max-width: 560px) {
  .questionnaire-header { padding: 22px 18px; }
  .questionnaire-question { padding: 16px; }
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(16, 47, 87, .12);
}

.login-card__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 24px;
  background: var(--blue-900);
}

.login-card__logo {
  display: block;
  width: 170px;
  max-width: 80%;
  height: auto;
}

.login-card__content {
  padding: 32px;
}

.login-card__eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-card h1 {
  margin-bottom: 8px;
}

.login-card__intro {
  margin: 0 0 24px;
  color: var(--gray-700);
}

.login-card__intro:has(+ .login-card__intro) { margin-bottom: 16px; }

.login-submit {
  width: 100%;
  margin-top: 0;
}

.login-card__action {
  justify-content: center;
  text-align: center;
}

.form-error {
  margin: 0 0 16px;
  padding: 12px;
  border-left: 4px solid var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.account-hero {
  margin-bottom: 0;
}

.account-panel {
  max-width: 620px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.account-panel h2 {
  margin: 0 0 16px;
  color: var(--blue-900);
  font-size: 18px;
}

.account-panel form {
  margin: 0;
}

.account-panel .field {
  margin-bottom: 16px;
}

.account-panel input {
  max-width: none;
}

.account-panel .errorlist {
  margin: 8px 0 0;
  padding: 0;
  color: var(--danger);
}

.account-panel .helptext {
  display: block;
  margin: 8px 0 0;
  color: var(--gray-700);
  font-size: 14px;
}

.account-panel .helptext ul {
  margin: 0;
  padding-left: 16px;
}

.account-done {
  max-width: 560px;
}

.account-done h1 {
  margin-bottom: 8px;
}

.account-done .form-actions {
  margin-top: 16px;
}

.empty-state--error h1 { margin: 0 0 8px; overflow-wrap: anywhere; }
.empty-state--error p { color: #172033; }

.submitted-page > * { min-width: 0; }
.submitted-page .questionnaire-header { padding: 24px 32px; }
.submitted-page .questionnaire-header h1 { margin: 0 0 8px; overflow-wrap: anywhere; }
.submitted-page .questionnaire-header p { overflow-wrap: anywhere; }
.submitted-page .questionnaire-question { box-shadow: var(--shadow-sm); }

@media (max-width: 760px) {
  .submitted-page .questionnaire-header { padding: 20px 16px; }
}

.questionnaire-submit .helptext { color: #172033; }

.publication-heading h1 {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.publication-heading__meta {
  margin: 0;
  overflow-wrap: anywhere;
}

.publication-heading .badge-list { margin-top: 12px; }

.publication-frame-panel {
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.publication-frame {
  display: block;
  width: 100%;
  min-height: 72vh;
  border: 0;
  background: var(--white);
}

.approval-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.approval-panel > *,
.approval-panel form { margin: 0; }

.approval-panel h2 {
  margin: 0;
  color: var(--blue-900);
  font-size: 18px;
}

.approval-panel .badge { margin: 0; }

.approval-confirmation > :not(summary) { margin: 16px 0 0; }

.btn:hover,
button:hover {
  background: var(--blue-900);
}

.btn.light:hover,
.btn.light:focus {
  background: #dbe4ef;
  color: var(--blue-900);
}

.btn:active,
button:active {
  transform: translateY(1px);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue-700);
  outline: 2px solid rgba(13, 95, 159, .35);
  outline-offset: 1px;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 2px solid var(--blue-700);
  outline-offset: 2px;
}

::selection { background: rgba(13, 95, 159, .18); }

@media (max-width: 860px) {
  .shell {
    display: block;
  }

  aside {
    display: flex;
    overflow-x: auto;
    gap: 6px;
  }

  aside h2 {
    display: none;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .summary-cards { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .portal-search { flex-basis: 100%; max-width: none; margin-left: 0; }

  main {
    padding: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .multi-select__options {
    max-height: 340px;
  }

  .portal-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 20px;
  }

  .portal-nav {
    justify-content: flex-start;
    width: 100%;
  }

  .user-menu {
    width: 100%;
  }

  .user-menu > summary {
    display: inline-block;
  }

  .user-menu__content {
    position: static;
    margin-top: 8px;
    box-shadow: none;
  }

  .portal-main {
    width: min(100% - 32px, 1120px);
    padding-top: 24px;
  }

  .login-card__content {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .summary-cards { grid-template-columns: 1fr; }
  .process-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .filter-link { width: 100%; padding: 0 10px; }
  .portal-search { flex-wrap: wrap; }
  .portal-search input { flex-basis: 100%; }
  .portal-search button,
  .portal-search .btn { flex: 1 1 0; justify-content: center; }
  .sector-index { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 12px 12px; }
  .sector-index__list { margin-left: -8px; }
  .portal-main { padding-top: 20px; }
  .portal-hero h1 { font-size: 26px; }
  .portal-card { padding: 16px; }
  .publication-approval-filters .filter-field,
  .publication-approval-filters .filter-field--status select,
  .publication-approval-filters .filter-field--search input { width: 100%; max-width: none; }
  .publication-approval-filters .filter-search-action { width: 100%; max-width: none; flex-basis: auto; }
  .publication-approval-filters .filter-search-action .filter-field { flex: 1; width: auto; }
}

@media (max-width: 760px) {
  .portal-header,
  .shell > header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-height: 0;
    padding: 12px 16px;
  }

  .portal-brand {
    gap: 8px;
    font-size: 15px;
    line-height: 1.25;
  }

  .brand {
    gap: 10px;
    font-size: 15px;
    line-height: 1.25;
  }

  .portal-brand__logo,
  .brand-logo { width: 80px; flex: 0 0 auto; }

  .portal-nav {
    justify-content: flex-start;
    gap: 4px;
    width: 100%;
  }

  .portal-nav > a,
  .user-menu > summary { padding: 8px 8px; }

  .user-menu { width: auto; min-width: 0; }
  .user-menu > summary {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .user-menu__content { min-width: 0; }

  .shell > aside {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
    padding: 10px 12px;
  }

  .shell > aside a {
    padding: 8px 12px;
    font-size: 14px;
  }

  .shell > aside a.active {
    border-left: 0;
    box-shadow: inset 0 -3px 0 var(--gold);
  }

  .shell > main { padding: 16px; }

  h1,
  .shell > main h1 {
    font-size: 26px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .actions > .btn,
  .form-actions > .btn,
  .form-actions > button { flex: 1 1 auto; text-align: center; justify-content: center; }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

  .table-wrap { overflow-x: visible; }
  .table-scroll { overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  tbody tr:hover > td { background: transparent; }
  .approval-table { min-width: 0; }

  table.table--stackable,
  table.table--stackable tbody,
  table.table--stackable tr,
  table.table--stackable td {
    display: block;
    width: 100%;
  }

  table.table--stackable {
    border: 0;
    background: transparent;
  }

  table.table--stackable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  table.table--stackable tr {
    margin-bottom: 12px;
    padding: 4px 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  table.table--stackable td {
    position: relative;
    min-height: 38px;
    padding: 9px 0 9px calc(36% + 10px);
    border-bottom: 1px solid var(--gray-100);
    overflow-wrap: anywhere;
  }

  table.table--stackable td:last-child { border-bottom: 0; }

  table.table--stackable td::before {
    content: attr(data-label);
    position: absolute;
    top: 9px;
    left: 0;
    width: 36%;
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
  }

  table.table--stackable td:not([data-label]) { padding-left: 0; }
  table.table--stackable td:not([data-label])::before { content: none; }
  table.table--stackable td .badge { margin: 0 4px 4px 0; }

  .filters-panel { padding: 14px 16px; }

  .filters-panel__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .filters-panel.is-collapsed .filters-panel__title { margin-bottom: 0; }
  .filters-panel.is-collapsed .filters-panel__body { display: none; }

  .filters-panel__toggle {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    background: var(--white);
    color: var(--blue-700);
    font-size: 13px;
    font-weight: 600;
  }

  .filters-panel__toggle:hover { background: var(--gray-050); color: var(--blue-900); }

  .confirm-delete input { max-width: none; }

  .summary-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .summary-card { padding: 12px; }
  .summary-card strong { font-size: 22px; }

  .questionnaire-header { padding: 20px 18px; }
  .questionnaire-header h1 { font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
  .questionnaire-question { padding: 16px; }
  .questionnaire-submit button { width: 100%; }
}

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .js .portal-header,
  .js .shell > header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .js .portal-brand,
  .js .brand { flex: 1 1 0; min-width: 0; }

  .js .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
  }

  .js .nav-toggle:hover,
  .js .nav-open .nav-toggle { background: var(--gray-100); }

  .nav-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--blue-900);
    transition: transform .2s ease, opacity .2s ease;
  }

  .nav-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .js .portal-nav,
  .js .shell > aside { display: none; }

  .js .nav-open .portal-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
  }

  .js .nav-open .portal-nav > a,
  .js .nav-open .user-menu > summary { padding: 12px; }

  .js .nav-open .user-menu { width: 100%; }
  .js .nav-open .user-menu > summary { display: block; max-width: none; }
  .js .nav-open .user-menu__content { position: static; margin: 4px 0 0; box-shadow: none; }

  .js .shell.nav-open > aside {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 12px 16px 16px;
  }

  .js .shell.nav-open > aside h2 { display: block; margin: 12px 12px 4px; }

  .js .shell.nav-open > aside a { padding: 12px; font-size: 15px; }

  .js .shell.nav-open > aside a.active {
    border-left: 3px solid var(--gold);
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle__bar { transition: none; }
}

.publication-frame-toolbar { display: none; }

@media (max-width: 760px) {
  .js .publication-frame-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 8px;
    background: var(--gray-050);
    border-bottom: 1px solid var(--line);
  }

  .publication-fullscreen {
    min-height: 40px;
    padding: 0 16px;
    font-weight: 600;
  }
}

.publication-frame-panel:fullscreen,
.publication-frame-panel.is-expanded {
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.publication-frame-panel.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 1000;
  height: 100vh;
  height: 100dvh;
}

.publication-frame-panel:fullscreen .publication-frame,
.publication-frame-panel.is-expanded .publication-frame {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.publication-expanded { overflow: hidden; }

.page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page > * { margin: 0; }

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-header > h1,
.page-header .actions { margin: 0; }

.panel--table { padding: 0; overflow: hidden; }
.panel--table > h2 { margin: 0; padding: 16px 16px 0; }
.panel--table > .helptext { margin: 4px 16px 16px; }
.panel--table > .empty-state-inline { margin: 0 16px 16px; padding: 16px; text-align: left; }

.data-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px 24px;
  margin: 0;
}

.data-list > div { min-width: 0; }

.data-list dt {
  margin-bottom: 4px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
}

.data-list dd { margin: 0; overflow-wrap: anywhere; }

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #172033;
  cursor: pointer;
  font-weight: 400;
}

.check-field input[type="checkbox"],
.check-field input[type="radio"] { flex: 0 0 auto; margin: 0; }
.check-field > span:first-of-type { min-width: 0; overflow-wrap: anywhere; }
.check-field .badge { margin: 0 0 0 auto; white-space: nowrap; }
.check-field:hover { background: #fbfcfe; border-color: var(--gray-300); }
.check-field:has(input:disabled) { cursor: default; }
.check-field:has(input:focus-visible) { border-color: var(--blue-700); }

@media (hover: none) {
  .check-field:hover { background: transparent; border-color: var(--line); }
}

@media (max-width: 760px) {
  .panel--table { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .panel--table > h2,
  .panel--table > .helptext,
  .panel--table > .empty-state-inline { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .panel--table > .empty-state-inline { padding: 16px; }
}

.publication-approvals {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.publication-approvals > * { margin: 0; }

main:has(.publication-approvals) .topline { margin-bottom: 12px; font-size: 13px; }

.publication-approvals h1 { margin: 0; font-size: 28px; line-height: 1.2; }

.publication-approvals h2 {
  margin: 0;
  color: var(--blue-900);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.publication-approvals .helptext {
  margin: 4px 0 16px;
  color: var(--gray-700);
  font-size: 14px;
}

.publication-approvals .btn,
.publication-approvals button,
.publication-approvals input:not([type="checkbox"]),
.publication-approvals select {
  box-sizing: border-box;
  height: 40px;
  padding: 0 12px;
  line-height: 1.2;
}

.publication-approvals .btn,
.publication-approvals button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.publication-approvals .btn,
.publication-approvals button,
.publication-approvals input,
.publication-approvals select,
.publication-approvals .pa-signer {
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, outline-color 160ms ease-out;
}

.publication-approvals button:disabled,
.publication-approvals input:disabled { cursor: not-allowed; }

.pa-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pa-header .actions { margin: 0; }

.pa-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.pa-summary dl,
.pa-summary dd { margin: 0; }

.pa-meta {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 2fr);
  gap: 16px 24px;
}

.pa-field { min-width: 0; }

.pa-field dt {
  margin-bottom: 4px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
}

.pa-field dd { overflow-wrap: anywhere; }

.pa-hash {
  display: block;
  overflow: hidden;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pa-metrics {
  display: grid;
  gap: 8px;
  min-width: 240px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.pa-metrics-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pa-metric {
  color: var(--blue-900);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.pa-progress {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--blue-700);
  overflow: hidden;
}

.pa-progress::-webkit-progress-bar { background: var(--gray-100); }
.pa-progress::-webkit-progress-value { background: var(--blue-700); border-radius: 999px; }
.pa-progress::-moz-progress-bar { background: var(--blue-700); border-radius: 999px; }

.pa-table-panel { padding: 0; overflow: hidden; }
.pa-table-panel > h2 { padding: 16px 16px 0; }
.pa-table-panel > .helptext { margin: 4px 16px 16px; }
.pa-table-panel > .pa-empty { margin: 0 16px 16px; }
.pa-table-panel .table-scroll { border: 0; border-radius: 0; }

.pa-table { table-layout: fixed; border: 0; }

.pa-table th,
.pa-table td {
  padding: 12px 16px;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.pa-table th { color: var(--gray-700); font-size: 13px; font-weight: 600; }
.pa-table th:nth-child(1) { width: 24%; }
.pa-table th:nth-child(2) { width: 28%; }
.pa-table th:nth-child(3) { width: 20%; }
.pa-table th:nth-child(4) { width: 14%; }
.pa-table th:nth-child(5) { width: 14%; }
.pa-table td:last-child { white-space: nowrap; }
.pa-table tbody tr:last-child > td { border-bottom: 0; }

.pa-table .badge {
  margin: 0;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
}

.pa-table td.pa-empty-cell { color: var(--gray-700); text-align: center; }

.pa-empty { padding: 16px; text-align: left; }

.pa-signers {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.pa-signer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #172033;
  cursor: pointer;
  font-weight: 400;
}

.pa-signer input[type="checkbox"] { flex: 0 0 auto; margin: 0; }
.pa-signer > span:first-of-type { min-width: 0; overflow-wrap: anywhere; }
.pa-signer .badge { margin: 0 0 0 auto; padding: 4px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pa-signer:hover { background: #fbfcfe; border-color: var(--gray-300); }
.pa-signer:has(input:disabled) { cursor: default; }
.pa-signer:has(input:focus-visible) { border-color: var(--blue-700); }

.pa-manage form:first-of-type button[type="submit"] { margin-top: 16px; }

.pa-add {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pa-add .filter-field { flex: 1 1 320px; max-width: 420px; }
.pa-add .filter-field select { width: 100%; min-width: 0; max-width: none; }
.pa-add-help { margin: 8px 0 0; }

@media (hover: none) {
  .pa-signer:hover { background: transparent; border-color: var(--line); }
}

@media (max-width: 1100px) {
  .pa-summary { grid-template-columns: minmax(0, 1fr); }
  .pa-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pa-field--hash { grid-column: 1 / -1; }
  .pa-metrics { min-width: 0; padding: 16px 0 0; border-top: 1px solid var(--line); border-left: 0; }
}

@media (min-width: 1000px) {
  .pa-signers { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

@media (max-width: 760px) {
  .pa-table th:nth-child(n) { width: auto; }
  .pa-table-panel { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .pa-table-panel > h2,
  .pa-table-panel > .helptext,
  .pa-table-panel > .pa-empty { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .pa-table-panel > .pa-empty { padding: 16px; }
  .pa-table td:last-child { white-space: normal; }
}

@media (max-width: 560px) {
  .pa-meta { grid-template-columns: minmax(0, 1fr); }
  .publication-approvals h1 { font-size: 26px; }
  .pa-add .filter-field { max-width: none; flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .publication-approvals .btn,
  .publication-approvals button,
  .publication-approvals input,
  .publication-approvals select,
  .publication-approvals .pa-signer { transition: none; }
}

.page-results { min-width: 0; }

.badge-list,
.cell-inline,
.cell-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.cell-inline { gap: 4px 8px; }
.cell-stack { flex-direction: column; align-items: flex-start; }
.cell-stack small { color: var(--gray-700); font-size: 13px; }

.badge-list .badge,
.cell-inline .badge,
.cell-stack .badge,
.table-actions > .badge { margin: 0; }

.table-actions > .badge,
.cell-inline .badge,
.cell-stack .badge { white-space: nowrap; }

.table--dense .cell-inline .badge,
.table--dense .cell-stack .badge { white-space: normal; }

@media (min-width: 861px) {
  .filters-panel__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 761px) {
  .table--dense th,
  .table--dense td { padding-left: 8px; padding-right: 8px; }
  .table--dense th:first-child,
  .table--dense td:first-child { padding-left: 16px; }
  .table--dense th:last-child,
  .table--dense td:last-child { padding-right: 16px; }

  .col-nowrap { white-space: nowrap; }
  .col-shrink { width: 1%; white-space: nowrap; }
  .col-name { min-width: 150px; }

  .table--sticky-actions th:last-child,
  .table--sticky-actions td:last-child {
    position: sticky;
    right: 0;
    z-index: 1;
    background: var(--white);
    box-shadow: -1px 0 0 var(--line);
  }
  .table--sticky-actions th:last-child { background: #fbfcfe; }
  .table--sticky-actions tbody tr:hover > td:last-child { background: #fbfcfe; }
}

@media (max-width: 760px) {
  table.table--stackable td :is(.badge-list, .cell-inline, .cell-stack, .table-actions) .badge,
  table.table--stackable td .table-actions > .badge { margin: 0; }
}

.col-break { overflow-wrap: anywhere; }

@media (min-width: 761px) {
  .col-wide { min-width: 200px; }
}

td.cell-empty { color: var(--gray-700); text-align: center; }

.panel--table > h2:has(+ :is(table, .table-scroll)) { margin-bottom: 16px; }

@media (max-width: 760px) {
  .cards > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .summary-cards:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.page-header > h1 { min-width: 0; overflow-wrap: anywhere; }

.data-list__full { grid-column: 1 / -1; }

.data-list__lead { margin: 0 0 16px; overflow-wrap: anywhere; }

.data-list__lead strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
}

.question-list { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.question-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.question-card > * { margin: 0; }
.question-card .questionnaire-question__label { margin: 0; }
.question-card > .table-actions { margin-top: 4px; }

.question-meta { color: var(--gray-700); font-size: 14px; }

.question-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  list-style: none;
}

.question-options li { position: relative; padding-left: 16px; }

.question-options li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .6em;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--gray-700);
}

.submission-view .response-history {
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.submission-view .response-history__title {
  margin: 0 0 4px;
  color: var(--blue-900);
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
}

.submission-view .response-history__picker { gap: 6px; }
.submission-view .response-history__picker label { color: var(--gray-700); }
.submission-view .response-history__controls select,
.submission-view .response-history__controls .btn { height: 40px; }
.submission-view .response-history__controls select { padding: 0 12px; }
.submission-view .response-history__notice { padding: 12px; }

.preview-page { max-width: 820px; }
.preview-page .questionnaire-shell { margin: 0; width: 100%; display: flex; flex-direction: column; gap: 16px; }
.preview-page .questionnaire-shell > * { margin: 0; min-width: 0; }
.preview-page .questionnaire-header { padding: 20px; text-align: left; }
.preview-page .questionnaire-question { overflow-wrap: anywhere; }
.preview-page .questionnaire-question__label { margin-bottom: 8px; }
.preview-page .questionnaire-options { gap: 8px; }
.preview-page .questionnaire-options > li { min-width: 0; }
.preview-page .questionnaire-option { gap: 8px; padding: 8px 12px; border-color: var(--line); }
.preview-page .questionnaire-option > span { min-width: 0; }
.preview-page .results-count { margin: 0; }

.form-page .field > :is(input, select, textarea) { max-width: none; }

.form-page .field--file input[type="file"] {
  box-sizing: border-box;
  min-height: 40px;
  padding: 6px 12px;
}

.form-page .field > .helptext:has(+ .errorlist) { margin-bottom: 0; }
.form-page .form-section > .helptext:has(+ .helptext) { margin-bottom: 8px; }
.form-page > .errorlist.nonfield { margin-bottom: 24px; }

.publication-edit-summary { max-width: 900px; }
.page:has(> .form-page) > .page-header { max-width: 900px; }

.form-summary { max-width: 900px; }

.notice--danger {
  border-left-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.form-page--action > .errorlist.nonfield,
.page:has(> .form-page--action) > .notice { max-width: 900px; box-sizing: border-box; }

.check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-list > .field { margin: 0; }
#options-list .field > .check-field { margin-top: 8px; }

.confirm-delete {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 900px;
}

.confirm-delete > *,
.confirm-delete form > *,
.confirm-delete .field { margin: 0; }

.confirm-delete form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portal-page .empty-state { padding: 24px; box-shadow: var(--shadow-sm); }

.portal-main:has(> .questionnaire-shell) > .messages { max-width: 820px; margin: 0 auto 24px; }

.fill-body,
.fill-page form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fill-body > * { margin: 0; }
.fill-page .questionnaire-header { padding: 24px 32px; }
.fill-page .questionnaire-header h1 { margin: 0 0 8px; overflow-wrap: anywhere; }
.fill-page .questionnaire-header p { overflow-wrap: anywhere; }
.fill-page .questionnaire-version-note p { margin: 0 0 8px; }
.fill-page .questionnaire-version-note p:last-child { margin-bottom: 0; }

.fill-page .questionnaire-question {
  margin: 0;
  box-shadow: var(--shadow-sm);
  overflow-wrap: anywhere;
}

.fill-page .questionnaire-question__label { margin-bottom: 6px; }
.fill-page legend.questionnaire-question__label { margin-bottom: 8px; padding: 0; }
.fill-page .questionnaire-question textarea { max-width: none; }
.fill-page .questionnaire-char-count { font-size: 13px; }
.fill-page .questionnaire-options { margin: 0; gap: 8px; }
.fill-page .questionnaire-options > li { min-width: 0; }
.fill-page .questionnaire-option { align-items: flex-start; }
.fill-page .questionnaire-option input[type="radio"] { margin-top: 3px; }

.questionnaire-option.check-field { border-color: var(--gray-100); color: var(--blue-900); }
.questionnaire-option.check-field:hover { border-color: #b9c9dc; background: transparent; }

@media (max-width: 760px) {
  .fill-page .questionnaire-header { padding: 20px 16px; }
  .fill-page .questionnaire-header h1,
  .answer-view__header h1 { font-size: 26px; }
}

.answer-view .response-history {
  margin-bottom: 0;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.answer-view .response-history__title {
  margin: 0 0 4px;
  color: var(--gray-700);
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
}

.answer-view .response-history__controls select,
.answer-view .response-history__controls .btn { height: 40px; }
.answer-view .response-history__controls select { padding: 0 12px; }
.answer-view .response-history__notice { padding: 12px; }

@media (max-width: 640px) {
  .answer-view .response-history { padding: 16px; }
}
