/* App-wide */
.aiss-env-banner {
  background-color: #942514;
  border-bottom: 4px solid #fd0;
  color: #fff;
  margin-top: 0;
  padding: 0.5rem 0;
}

.aiss-env-banner .govuk-width-container {
  margin-top: 0;
}

.aiss-env-banner__text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
}

.aiss-env-banner__tag {
  margin: 0;
  text-transform: uppercase;
}

.govuk-width-container {
  max-width: 1100px !important;
}

/* Tables: compressed / condensed app-wide (DfE dfe-f-table--condensed rhythm) */
.govuk-table {
  border: 1px solid #b1b4b6;
  border-collapse: collapse;
}

.govuk-table__header,
.govuk-table__cell {
  font-size: 1rem !important;
}

.govuk-table .govuk-body,
.govuk-table .govuk-link {
  font-size: 1rem !important;
}

.aiss-text-muted {
  color: #505a5f;
}

/* Reports — single WCAG criterion drill-down */
.aiss-pre-wrap {
  white-space: pre-wrap;
}

.aiss-criterion-page__description {
  max-width: 48rem;
}

.aiss-criterion-page__resource-links {
  margin-bottom: 0;
}

.aiss-criterion-page__resource-links > li {
  margin-bottom: 0.25rem;
}

.aiss-criterion-issues-card-title-link {
  color: inherit;
  text-decoration: none;
}

.aiss-criterion-issues-card-title-link:hover {
  text-decoration: underline;
}

/* Admin statement template view — Markdown source preview */
.aiss-statement-template-view__pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1rem;
  line-height: 1.6;
  max-height: min(60vh, 600px);
  overflow: auto;
  margin: 0;
}

@media (min-width: 40.0625em) {
  .govuk-table__header,
  .govuk-table__cell {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

.govuk-table__head .govuk-table__header {
  border-bottom: 2px solid #0b0c0c;
  padding: 10px;
}

.govuk-table__body .govuk-table__row:last-child .govuk-table__cell,
.govuk-table__body .govuk-table__row:last-child .govuk-table__header {
  border-bottom: none;
}

/* Tables still using `dfe-f-table` class (sortable wrappers, etc.) */
table.dfe-f-table {
  border: 1px solid #b1b4b6;
  border-collapse: collapse;
  width: 100%;
}

table.dfe-f-table thead th,
table.dfe-f-table tbody td,
table.dfe-f-table tbody th {
  padding: 10px;
  vertical-align: top;
  line-height: 1.35;
  border-bottom: 1px solid #b1b4b6;
  font-size: 1rem !important;
}

@media (min-width: 40.0625em) {
  table.dfe-f-table thead th,
  table.dfe-f-table tbody td,
  table.dfe-f-table tbody th {
    padding: 10px;
  }
}

table.dfe-f-table thead th {
  border-bottom: 2px solid #0b0c0c;
  font-weight: 700;
}

table.dfe-f-table tbody tr:last-child td,
table.dfe-f-table tbody tr:last-child th {
  border-bottom: none;
}

/* Dashboard & tab panels */
.tab-pane:not(.on) {
  display: none;
}

.aiss-dashboard__meta {
  color: #505a5f;
}

.aiss-dashboard__callout {
  padding: 1rem 1.25rem;
  border-left: 4px solid #1d70b8;
  background: #f3f2f1;
}

.aiss-dashboard__callout--attention {
  border-left-color: #1d70b8;
}

.aiss-dashboard__callout--overdue {
  border-left-color: #d4351c;
  background: #f6d8d8;
}

.aiss-text-error {
  color: #d4351c;
}

/* Legacy overlay modals (to be migrated to dfe-f-modal) */
.govuk-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.govuk-modal {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
}

.govuk-modal__header {
  margin-bottom: 20px;
}

.govuk-modal__body {
  margin-bottom: 30px;
}

.govuk-modal__footer {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.admin-services-table .govuk-button {
  margin-bottom: 0;
}

/* Reports — business area badges */
.report-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
}

.report-badge--green {
  background-color: #cfe4dc;
  color: #083d29;
}

.report-badge--red {
  background-color: #f4d7d7;
  color: #651b1b;
}

.report-badge--orange {
  background-color: #fde4d7;
  color: #7a3c1c;
}

.report-badge--grey {
  background-color: #f3f3f3;
  color: #0b0c0c;
}

.report-badge--purple {
  background-color: #ebe9f5;
  color: #3d2375;
}

.report-badge--blue {
  background-color: #d2e2f1;
  color: #11457e;
}

.report-badge--compact {
  font-size: 0.875rem;
  padding: 2px 8px;
  line-height: 1.35;
}

/* Reports — WCAG criteria table */
.aiss-criteria-report-card .dfe-f-card__header {
  border-bottom: 1px solid #b1b4b6;
}

.aiss-criteria-report-card__intro {
  margin: 0;
  padding: 1rem 1.25rem;
  background: #f8f8f8;
  border-bottom: 1px solid #b1b4b6;
  color: #505a5f;
  font-size: 1rem;
}

@media (min-width: 40.0625em) {
  .aiss-criteria-report-card__intro {
    padding: 1rem 1.5rem;
  }
}

.aiss-criteria-report-table.govuk-table .govuk-table__header,
.aiss-criteria-report-table.govuk-table .govuk-table__cell {
  padding: 0.75rem 1rem;
  vertical-align: top;
}

.aiss-criteria-report-table.govuk-table .govuk-table__head .govuk-table__header {
  background-color: #f3f2f1;
}

.aiss-criteria-report-table.govuk-table tbody .govuk-table__row:hover {
  background-color: #f8f8f8;
}

.aiss-criteria-report-table.govuk-table tbody th[scope="row"] {
  font-weight: 400;
}

@media (min-width: 48em) {
  .aiss-criteria-report-table__col--criterion {
    min-width: 14rem;
    width: 32%;
  }

  .aiss-criteria-report-table__col--principle {
    white-space: nowrap;
    width: 1%;
  }

  .aiss-criteria-report-table__col--level {
    white-space: nowrap;
    width: 1%;
  }

  .aiss-criteria-report-table__col--services {
    min-width: 12rem;
    max-width: 24rem;
  }
}

.aiss-criteria-report-table__criterion-link {
  text-decoration: none;
}

.aiss-criteria-report-table__criterion-link:hover .aiss-criteria-report-table__criterion-code,
.aiss-criteria-report-table__criterion-link:focus .aiss-criteria-report-table__criterion-code {
  text-decoration: underline;
}

.aiss-criteria-report-table__criterion-code {
  display: block;
}

.aiss-criteria-report-table__criterion-title {
  display: block;
  margin-top: 0.25rem;
}

.aiss-criteria-report-table__service-names {
  line-height: 1.45;
}

.aiss-criteria-report-table__overdue-count {
  color: #d4351c;
}

/* Issue detail — timeline, history toggle, sticky actions */
.govuk-timeline {
  border-left: 2px solid #b1b4b6;
  padding-left: 20px;
  margin-left: 10px;
}

.govuk-timeline__entry {
  margin-bottom: 30px;
  position: relative;
}

.govuk-timeline__entry::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 0;
  width: 13px;
  height: 13px;
  background: #1d70b8;
  border-radius: 50%;
  border: 5px solid white;
}

.govuk-timeline__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 5px 0;
}

.govuk-timeline__info {
  font-size: 1rem;
  color: #505a5f;
  margin: 0 0 5px 0;
}

.govuk-timeline__date {
  font-size: 1rem;
  color: #626a6e;
  margin: 0;
}

.dfe-f-issue-actions-sidebar {
  position: sticky;
  top: 20px;
}

.dfe-f-issue-actions-sidebar .govuk-summary-card + .govuk-summary-card {
  margin-top: 1.25rem;
}

.dfe-f-issue-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dfe-f-issue-actions__section {
  margin-bottom: 0;
}

.dfe-f-issue-actions__block {
  padding-top: 0;
  border-top: 1px solid #b1b4b6;
}

.dfe-f-issue-actions__block:first-of-type {
  border-top: none;
}

.dfe-f-issue-actions__block-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.dfe-f-issue-actions__block-header .govuk-heading-s {
  margin-bottom: 0;
}

.dfe-f-issue-actions__block .govuk-heading-s {
  font-size: 1rem;
}

/* Statement templates — publish modal & previous versions toggle */
.previous-versions-toggle-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.previous-versions-toggle-button:hover {
  opacity: 0.8;
}

.previous-versions-toggle-button:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 2px;
}

.previous-versions-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 20px;
  font-weight: bold;
  color: #1d70b8;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.previous-versions-content {
  transition: opacity 0.2s ease;
}

.govuk-modal.govuk-modal--publish-template {
  min-width: min(600px, 90vw);
  max-width: min(800px, 90vw);
}

/* Statement template comparison */
.comparison-wrapper {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comparison-column {
  flex: 1;
  min-width: 0;
}

.template-comparison-container {
  border: 1px solid #b1b4b6;
  border-radius: 4px;
  padding: 15px;
  background-color: #f3f2f1;
  max-height: 600px;
  overflow-y: auto;
}

.diff-indicator-column {
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  padding: 15px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.diff-indicator-column::-webkit-scrollbar {
  display: none;
}

.diff-indicator {
  width: 4px;
  height: 1.6em;
  margin: 0;
  flex-shrink: 0;
  line-height: 1.6;
}

.diff-indicator-added {
  background-color: #28a745;
}

.diff-indicator-removed {
  background-color: #dc3545;
}

.diff-indicator-modified {
  background-color: #ffc107;
}

.diff-indicator-unchanged {
  background-color: transparent;
}

.template-content {
  margin: 0;
  font-family: monospace;
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: transparent;
  border: none;
  padding: 0;
}

.diff-added {
  background-color: #d4edda;
  color: #155724;
  padding: 2px 4px;
  border-radius: 2px;
}

.diff-removed {
  background-color: #f8d7da;
  color: #721c24;
  padding: 2px 4px;
  border-radius: 2px;
  text-decoration: line-through;
}

.diff-unchanged {
  color: #505a5f;
}

/* Profile — notification email preview (wider than default DfE modal) */
.dfe-f-modal.dfe-f-modal--notification-email {
  width: min(56rem, calc(100vw - 2rem));
  max-width: min(56rem, calc(100vw - 2rem));
}

/* Profile — modal content styled like an email client */
.aiss-email-preview {
  border: 1px solid #b1b4b6;
  border-radius: 4px;
  overflow: hidden;
  background: #f3f2f1;
  box-shadow: 0 2px 4px rgba(11, 12, 12, 0.08);
}

.aiss-email-preview__masthead {
  background: #505a5f;
  color: #ffffff;
  padding: 0.5rem 1rem;
}

.aiss-email-preview__masthead-label {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.aiss-email-preview__inner {
  background: #ffffff;
  padding: 1.25rem 1.25rem 1.5rem;
}

.aiss-email-preview__subject {
  margin-top: 0;
  word-break: break-word;
}

.aiss-email-preview__meta .govuk-summary-list__key {
  width: 6.5rem;
}

@media (min-width: 40.0625em) {
  .aiss-email-preview__meta .govuk-summary-list__key {
    width: 9rem;
  }
}

.aiss-email-preview__body-wrap {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #b1b4b6;
}

.aiss-email-preview__body-label {
  color: #505a5f;
}

.aiss-email-preview__body {
  margin-bottom: 0;
  padding: 1rem 1.25rem;
  background: #fafafa;
  border: 1px solid #d0d3d4;
  border-radius: 2px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  max-height: min(24rem, 50vh);
  overflow-y: auto;
  font-size: 1rem;
  line-height: 1.6;
}

.aiss-email-preview__body :last-child {
  margin-bottom: 0;
}


/* Service name takes the full container width so the nav items wrap onto the line below */
.govuk-service-navigation__container {
    flex-wrap: wrap;
}

.govuk-service-navigation__service-name {
    width: 100%;
    flex-basis: 100%;
}

.govuk-service-navigation__service-name + .govuk-service-navigation__wrapper {
    margin-top: 0;
}

/* Services index — horizontal filters above full-width table */
.aiss-services-filter-bar__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: flex-end;
}

.aiss-services-filter-bar .govuk-form-group {
  flex: 1 1 12rem;
  margin-bottom: 0;
}

.aiss-services-filter-bar__actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

/* Service issues — search and filter panel */
.aiss-issues-filter-panel {
  padding: 1.25rem;
  border: 1px solid #b1b4b6;
  background-color: #f3f2f1;
  box-sizing: border-box;
}

/* Inside DfE toggle: avoid double border / grey-on-grey box */
.aiss-issues-filter-panel--in-toggle {
  padding: 0;
  border: 0;
  background-color: transparent;
}

@media (min-width: 40.0625em) {
  .aiss-issues-filter-panel {
    padding: 1.5rem 2rem;
  }

  .aiss-issues-filter-panel--in-toggle {
    padding: 0;
  }
}

.aiss-issues-filter-panel__divider {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.aiss-issues-filter-panel__actions {
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  width: 100%;
  margin-top: 1.5rem;
  margin-bottom: 0;
  padding-top: 1.25rem;
  border-top: 1px solid #b1b4b6;
}

.aiss-issues-filter-panel__actions .govuk-button {
  margin-bottom: 0;
}

.aiss-issues-filter-form__search .govuk-input {
  max-width: none;
  width: 100%;
}

/* Centre “Open issues” column (sortable header + cells) */
.aiss-table-col--centre {
  text-align: center;
}

.aiss-table-col--centre .dfe-f-table-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Reports — business areas: centre numeric columns (headers + values) */
.aiss-reports-business-areas-table .govuk-table__cell--numeric,
.aiss-reports-business-areas-table th.govuk-table__header--numeric {
  text-align: center;
}

.aiss-reports-business-areas-table th.govuk-table__header--numeric .dfe-f-table-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Slightly roomier padding than app-wide compressed tables; vertical centre */
.aiss-reports-business-areas-table.govuk-table .govuk-table__header,
.aiss-reports-business-areas-table.govuk-table .govuk-table__cell {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

/* Admin — all-issues table: no wrap on dates/status; compact meta */
.aiss-admin-issues-table .aiss-admin-issues-table__col--nowrap,
.aiss-admin-issues-table th.aiss-admin-issues-table__col--nowrap {
  white-space: nowrap;
  vertical-align: middle;
}

.aiss-admin-issues-table .aiss-admin-issues-table__col--compact {
  white-space: nowrap;
  width: 1%;
  vertical-align: middle;
}

.aiss-admin-issues-table .aiss-admin-issues-table__status-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  white-space: nowrap;
}

/* Admin issues table — denser rows and inline status badges */
.aiss-admin-issues-table--compressed .aiss-admin-issues-table__status-stack {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.aiss-admin-issues-table--compressed .aiss-admin-issues-table__criteria-tags {
  max-width: 32rem;
  gap: 0.25rem;
}

.aiss-admin-issues-table .aiss-admin-issues-table__criteria-badges,
.aiss-admin-issues-table .aiss-admin-issues-table__criteria-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  max-width: 42rem;
}

/* Admin — Issues KPI row: four dfe-f-stat-cards (DfE card grid is capped at 3 columns + 25rem card width). */
.aiss-admin-issues-kpi-grid.dfe-f-card-grid {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 40.0625em) {
  .aiss-admin-issues-kpi-grid.dfe-f-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 68.0625em) {
  .aiss-admin-issues-kpi-grid.dfe-f-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.aiss-admin-issues-kpi-grid.dfe-f-card-grid > .dfe-f-stat-card {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

/* Admin — Issues page: search row, filter grid and active-filter chips */
.aiss-admin-issues-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.aiss-admin-issues-search-row__input {
  flex: 1 1 22rem;
  min-width: 16rem;
  max-width: 36rem;
  margin-bottom: 0;
}

.aiss-admin-issues-search-row__clear {
  flex: 0 0 auto;
}

.aiss-admin-issues-filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 40rem) {
  .aiss-admin-issues-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .aiss-admin-issues-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.aiss-admin-issues-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.aiss-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  background: #f3f2f1;
  border: 1px solid #b1b4b6;
  border-radius: 999px;
  color: #0b0c0c;
  font-size: 0.875rem;
  line-height: 1.2;
  text-decoration: none;
}

.aiss-filter-chip:hover,
.aiss-filter-chip:focus {
  background: #e8e7e6;
  border-color: #0b0c0c;
}

.aiss-filter-chip:focus {
  outline: 3px solid transparent;
  box-shadow: 0 0 0 3px #ffdd00;
}

.aiss-filter-chip strong {
  font-weight: 700;
}

.aiss-filter-chip > span[aria-hidden="true"] {
  font-size: 1.05rem;
  line-height: 1;
}

.aiss-admin-issues-table .aiss-admin-issues-table__meta {
  color: #505a5f;
  max-width: 42rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 48rem) {
  .aiss-admin-issues-table .aiss-admin-issues-table__meta {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Service issues list — align with admin table: no wrap on dates/status */
.aiss-service-issues-table .aiss-service-issues-table__col--nowrap,
.aiss-service-issues-table th.aiss-service-issues-table__col--nowrap {
  white-space: nowrap;
  vertical-align: middle;
}

.aiss-service-issues-table .aiss-service-issues-table__status-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  white-space: nowrap;
}

.aiss-service-issues-table__row--retest {
  background-color: #f3f2f1;
}

/* Service Issues page: top action buttons align right on wide screens */
.aiss-issues-actions {
  justify-content: flex-end;
}

@media (max-width: 40.0625em) {
  .aiss-issues-actions {
    justify-content: flex-start;
  }
}

/* Service Issues page: overdue callout (lightweight, not a summary card) */
.aiss-issues-overdue-callout {
  border-left: 5px solid #d4351c;
  padding: 1rem 1.25rem;
  background: #fdf3f1;
}

.aiss-issues-overdue-callout > h2 {
  color: #942514;
}

/* Team members (contacts) table inside summary card */
.aiss-team-members-table .aiss-team-members-table__col--nowrap,
.aiss-team-members-table th.aiss-team-members-table__col--nowrap {
  white-space: nowrap;
  vertical-align: middle;
}

.aiss-team-members-table .aiss-team-members-table__remove {
  color: #d4351c;
}

.aiss-team-members-table .aiss-team-members-table__remove:visited {
  color: #d4351c;
}

.aiss-team-members-table .aiss-team-members-table__remove:hover {
  color: #942514;
}

/* GDS Transport fonts: see Aiss.Web.csproj target EnsureGovukFrontendFonts (files under /assets/fonts/). */

/* Footer crest (img replacement for the inline crown SVG): govuk-frontend rules expect an SVG. */
img.govuk-footer__crown {
  display: block;
  margin-bottom: 1.25rem;
  height: 30px;
  width: auto;
}

.govuk-footer__copyright-logo-image {
  display: block;
  margin: 0 auto 0.25rem;
  height: auto;
  width: 125px;
  max-width: 100%;
}

/* User picker (_UserPicker.cshtml + user-picker.js) */
.user-picker .user-picker__spinner {
  display: none;
  margin-left: 0.5rem;
  font-size: 0.875rem;
  color: #505a5f;
}

.user-picker__results {
  display: none;
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  max-width: 36rem;
  max-height: 18rem;
  overflow-y: auto;
  margin-top: 0.25rem;
  padding: 0.75rem;
  background: #ffffff;
  border: 2px solid #0b0c0c;
  box-shadow: 0 4px 0 rgba(11, 12, 12, 0.15);
}

.user-picker__result-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.user-picker__result-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.25rem;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #b1b4b6;
  font: inherit;
}

.user-picker__result-item:last-child .user-picker__result-button {
  border-bottom: 0;
}

.user-picker__result-button:hover,
.user-picker__result-button:focus {
  background: #f3f2f1;
  outline: 3px solid #ffdd00;
  outline-offset: 0;
}

.user-picker__selected-card {
  padding: 0.75rem 1rem;
  border-left: 4px solid #1d70b8;
  background: #f3f2f1;
}

.user-picker__selected-name {
  font-weight: 700;
}

.user-picker__selected-meta {
  margin-top: 0.25rem;
  color: #505a5f;
  font-size: 1rem;
}

/* Developer documentation (/developers) */
.developers-docs {
  align-items: flex-start;
}

.developers-docs__main {
  min-width: 0;
}

.developers-docs__intro .govuk-caption-xl {
  margin-bottom: 0.25rem;
}

.developers-docs__contents {
  padding: 1rem 1.25rem;
  border-left: 4px solid #1d70b8;
  background: #f3f2f1;
}

.developers-docs__contents-list {
  margin-bottom: 0;
  padding-left: 1.25rem;
  list-style-type: disc;
}

.developers-docs__contents-list li {
  margin-bottom: 0.25rem;
}

.developers-docs__path {
  font-size: 1.125rem;
  word-break: break-word;
}

.developers-docs__endpoint .dfe-f-badge {
  margin-right: 0.5rem;
  vertical-align: middle;
}

.developers-code-block {
  margin: 0 0 1rem;
  padding: 1rem 1.25rem;
  overflow: auto;
  max-height: min(70vh, 560px);
  border: 1px solid #b1b4b6;
  background: #ffffff;
  color: #0b0c0c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1rem;
  line-height: 1.45;
  tab-size: 2;
}

.developers-code-block code {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: transparent;
  padding: 0;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}

@media (min-width: 48.0625em) {
  .developers-docs .govuk-grid-column-one-quarter {
    position: sticky;
    top: 1rem;
    align-self: flex-start;
  }
}

table.developers-api-table .govuk-table__header,
table.developers-api-table .govuk-table__cell {
  vertical-align: top;
}

/* Developers — Stripe-style API reference layout (still GOV.UK / accessible) */
.developers-docs-nav__sub {
  padding-left: 0.75rem;
  margin-left: 0.25rem;
  border-left: 3px solid #b1b4b6;
  list-style: none;
}

.developers-docs-nav__sub-item {
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.developers-docs__contents--columns .developers-docs__contents-columns {
  display: grid;
  gap: 1.25rem 2rem;
}

@media (min-width: 40.0625em) {
  .developers-docs__contents--columns .developers-docs__contents-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64.0625em) {
  .developers-docs__contents--columns .developers-docs__contents-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.developers-docs__contents-group-heading {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0b0c0c;
}

.developers-api-spotlight {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #b1b4b6;
  border-left: 6px solid #1d70b8;
  background: #f8fafc;
}

.developers-api-spotlight__title {
  margin-top: 0;
}

.developers-api-panel {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #b1b4b6;
  background: #ffffff;
}

.developers-api-meta-grid {
  display: grid;
  gap: 1rem 1.5rem;
  margin: 0;
}

@media (min-width: 48.0625em) {
  .developers-api-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.developers-api-meta-grid > div {
  margin: 0;
}

.developers-api-meta-grid dt {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: 1rem;
  color: #0b0c0c;
}

.developers-api-meta-grid dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.developers-api-path-inline {
  padding: 0.1rem 0.35rem;
  background: #f3f2f1;
  font-weight: 400;
}

/* One operation = method bar + narrative | code (wide viewports) */
.developers-api-operation {
  margin-bottom: 2rem;
  border: 1px solid #b1b4b6;
  background: #ffffff;
}

.developers-api-operation__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #b1b4b6;
  background: #f3f2f1;
}

.developers-api-operation__method {
  display: inline-block;
  min-width: 3.25rem;
  box-sizing: border-box;
  text-align: center;
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.2;
  padding: 0.35rem 0.5rem;
  letter-spacing: 0.06em;
  border-radius: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.developers-api-operation__method--get {
  background: #d2e2f1;
  color: #0b0c0c;
  border: 1px solid #1d70b8;
}

.developers-api-operation__method--post {
  background: #cce2d8;
  color: #0b0c0c;
  border: 1px solid #00703c;
}

.developers-api-operation__method--put {
  background: #f3f2d8;
  color: #0b0c0c;
  border: 1px solid #85994b;
}

.developers-api-operation__method--delete {
  background: #f6d7d2;
  color: #0b0c0c;
  border: 1px solid #d4351c;
}

.developers-api-operation__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.35;
  flex: 1 1 12rem;
  min-width: 0;
}

.developers-api-operation__path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1rem;
  word-break: break-word;
}

.developers-api-operation__grid {
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem;
}

@media (min-width: 64.0625em) {
  .developers-api-operation__grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 40%);
    align-items: start;
  }

  .developers-api-operation__examples {
    position: sticky;
    top: 1rem;
  }
}

.developers-api-operation__body > p:first-child {
  margin-top: 0;
}

.developers-api-operation__examples-heading {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.developers-api-operation__examples-heading:not(:first-child) {
  margin-top: 1.25rem;
}

.developers-code-block--inverse {
  background: #1d2730;
  color: #f3f2f1;
  border-color: #0b0c0c;
}

.developers-code-block--inverse code {
  color: inherit;
}

/* Landing: resource cards (overview page) */
.developers-resource-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 48.0625em) {
  .developers-resource-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.developers-resource-card {
  display: block;
  height: 100%;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid #b1b4b6;
  background: #ffffff;
  text-decoration: none;
  color: #1d70b8;
  box-shadow: none;
}

.developers-resource-card:hover {
  border-color: #0b0c0c;
  background: #f3f2f1;
}

.developers-resource-card:focus {
  outline: 3px solid #fd0;
  outline-offset: 0;
}

.developers-resource-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1d70b8;
}

.developers-resource-card__summary {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: #0b0c0c;
}

/* Published public accessibility statement (/statement/{id}) */
.aiss-public-statement {
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.aiss-public-statement > *:first-child {
  margin-top: 0;
}

.aiss-public-statement img {
  max-width: 100%;
  height: auto;
}

.aiss-public-statement__pre {
  overflow-x: auto;
  max-width: 100%;
  padding: 15px;
  margin-top: 0;
  margin-bottom: 15px;
  border: 1px solid #b1b4b6;
  background-color: #f3f2f1;
  font-size: 1rem;
  line-height: 1.45;
}

/* Admin issues list — per-row "Manage" column + admin actions modal */
.aiss-admin-issues-table__col--actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.aiss-admin-issues-manage-button {
  white-space: nowrap;
}

dialog.aiss-admin-issues-modal {
  padding: 0;
  border: 1px solid #b1b4b6;
  border-top: 6px solid #1d70b8;
  background: #fff;
  color: #0b0c0c;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.15);
  max-width: 36rem;
  width: calc(100% - 2rem);
}

dialog.aiss-admin-issues-modal::backdrop {
  background: rgba(11, 12, 12, 0.55);
}

.aiss-admin-issues-modal__panel {
  padding: 1.5rem;
}

.aiss-admin-issues-modal__header {
  margin-bottom: 1.25rem;
}

.aiss-admin-issues-modal__body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.aiss-admin-issues-modal__action {
  padding: 1rem;
  border: 1px solid #b1b4b6;
  background: #f8f8f8;
}

.aiss-admin-issues-modal__action--danger {
  border-color: #d4351c;
  background: #fdf2f1;
}

.aiss-admin-issues-modal__form {
  margin: 0;
}

.aiss-admin-issues-modal__footer {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
}

/* Fallback for browsers without native <dialog> support */
.aiss-admin-issues-modal-open {
  overflow: hidden;
}

dialog.aiss-admin-issues-modal.aiss-admin-issues-modal--fallback-open {
  display: block;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

/* Admin — notification settings */
.aiss-notification-settings__group-lede {
  margin-bottom: 1.5rem;
  max-width: 48rem;
}

.aiss-notification-settings__list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.aiss-notification-settings__item {
  padding-bottom: 2rem;
  border-bottom: 1px solid #b1b4b6;
}

.aiss-notification-settings__list > .aiss-notification-settings__item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.aiss-notification-settings__controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aiss-notification-settings__control-block {
  min-width: 0;
}