:root {
  /* Primitive brand colors. */
  --ah-color-brand-100: #edf3f1;
  --ah-color-brand-300: #b8c9c3;
  --ah-color-brand-500: #496d60;
  --ah-color-brand-700: #38574c;

  /* Primitive neutral colors. */
  --ah-color-neutral-0: #ffffff;
  --ah-color-neutral-50: #f5f7f6;
  --ah-color-neutral-100: #e5e9e7;
  --ah-color-neutral-200: #d7dfdc;
  --ah-color-neutral-300: #b8c9c3;
  --ah-color-neutral-500: #64716c;
  --ah-color-neutral-900: #27332f;

  /* Secondary information family and existing special accents. */
  --ah-color-info-100: #eef5f8;
  --ah-color-info-300: #c9d7de;
  --ah-color-info-500: #587b8b;
  --ah-color-info-700: #365966;
  --ah-color-accent-warm: #cd4f39;
  --ah-color-highlight: #ffcc01;

  /* Semantic colors. */
  --ah-color-bg: var(--ah-color-neutral-50);
  --ah-color-surface: var(--ah-color-neutral-0);
  --ah-color-surface-muted: var(--ah-color-neutral-100);
  --ah-color-text: var(--ah-color-neutral-900);
  --ah-color-text-muted: var(--ah-color-neutral-500);
  --ah-color-border: var(--ah-color-neutral-200);
  --ah-color-border-strong: var(--ah-color-neutral-300);
  --ah-color-primary: var(--ah-color-brand-500);
  --ah-color-primary-hover: var(--ah-color-brand-700);
  --ah-color-primary-soft: var(--ah-color-brand-100);
  --ah-color-focus-ring: rgba(73, 109, 96, 0.35);

  /* Semantic status colors. */
  --ah-color-success-text: #347052;
  --ah-color-success-surface: #eef7f1;
  --ah-color-success-border: #c9ded1;
  --ah-color-warning-text: #85662e;
  --ah-color-warning-surface: #fbf6e9;
  --ah-color-warning-border: #ead184;
  --ah-color-danger-text: #9b3f3f;
  --ah-color-danger-hover: #7f3333;
  --ah-color-danger-surface: #fbefef;
  --ah-color-danger-border: #9b3f3f;
  --ah-color-info-text: var(--ah-color-info-700);
  --ah-color-info-surface: var(--ah-color-info-100);
  --ah-color-info-border: var(--ah-color-info-300);

  /* Backwards-compatible aliases used by existing assessment UI. */
  --ah-color-muted: var(--ah-color-text-muted);
  --ah-color-success: var(--ah-color-success-text);
  --ah-color-success-bg: var(--ah-color-success-surface);
  --ah-color-warning: var(--ah-color-warning-text);
  --ah-color-warning-bg: var(--ah-color-warning-surface);
  --ah-color-error: var(--ah-color-danger-text);
  --ah-color-error-bg: var(--ah-color-danger-surface);

  /* Typography. */
  --ah-font-base:
    "Google Sans Text", "Google Sans", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ah-font-heading:
    "Google Sans", "Google Sans Text", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ah-font-size-xs: 0.75rem;
  --ah-font-size-sm: 0.875rem;
  --ah-font-size-md: 1rem;
  --ah-font-size-lg: 1.25rem;
  --ah-font-size-xl: 1.5rem;
  --ah-font-size-2xl: 2rem;
  --ah-font-size-page-title: clamp(2rem, 4vw, 3rem);
  --ah-font-weight-normal: 400;
  --ah-font-weight-medium: 500;
  --ah-font-weight-semibold: 600;
  --ah-font-weight-bold: 700;
  --ah-line-height-tight: 1.25;
  --ah-line-height-normal: 1.4;
  --ah-line-height-relaxed: 1.55;

  /* Spacing. */
  --ah-space-1: 0.25rem;
  --ah-space-2: 0.5rem;
  --ah-space-3: 0.75rem;
  --ah-space-4: 1rem;
  --ah-space-5: 1.5rem;
  --ah-space-6: 2rem;

  /* Borders and radii. */
  --ah-border-width: 1px;
  --ah-radius-sm: 4px;
  --ah-radius-md: 8px;
  --ah-radius-lg: 12px;
  --ah-radius-xl: 16px;
  --ah-radius-pill: 999px;

  /* Controls. */
  --ah-control-height-sm: 2.25rem;
  --ah-control-height: 2.75rem;
  --ah-control-height-lg: 3rem;

  /* Shadows. */
  --ah-shadow-sm: 0 0.4rem 1.25rem rgba(25, 52, 39, 0.045);
  --ah-shadow-md: 0 10px 30px rgba(39, 51, 47, 0.07);
  --ah-shadow-lg: 0 1.5rem 4rem rgba(0, 0, 0, 0.25);
}

/*
 * Canonical orientation values for future component media queries:
 * 40rem (640px), 56.25rem (900px), 68.75rem (1100px).
 * The WordPress 782px and existing header breakpoints remain explicit exceptions.
 */

.ah-app {
  color: var(--ah-color-text);
  font-family: var(--ah-font-base);
  margin: var(--ah-space-6) auto;
  max-width: 78rem;
  min-width: 0;
  width: 100%;
}

.ah-app h1,
.ah-app h2,
.ah-app h3,
.ah-app h4,
.ah-app h5,
.ah-app h6 {
  font-family: var(--ah-font-heading);
}

.ah-app button,
.ah-app input,
.ah-app select,
.ah-app textarea {
  font-family: var(--ah-font-base);
}

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

.ah-page.ah-card {
  box-shadow: var(--ah-shadow-md);
  padding: clamp(var(--ah-space-4), 3vw, 2.5rem);
}

.ah-app-header,
.ah-page-header {
  margin-block-end: var(--ah-space-5);
}

.ah-app-header {
  border-bottom: 1px solid var(--ah-color-border);
  padding-block-end: var(--ah-space-5);
}

.ah-page-header__main {
  align-items: flex-start;
  display: flex;
  gap: var(--ah-space-4);
  justify-content: space-between;
}

.ah-page-header__main h1 {
  color: var(--ah-color-text);
  font-family: var(--ah-font-heading);
  font-size: var(--ah-font-size-page-title);
  font-weight: var(--ah-font-weight-bold);
  line-height: 1.08;
  margin: 0;
}

.ah-app .ah-assessment-title {
  color: var(--ah-color-text);
  font-size: var(--ah-font-size-page-title);
  line-height: 1.08;
  margin: 0 0 var(--ah-space-5);
}

.ah-page-header__status {
  flex: 0 0 auto;
  font-size: 0.875rem;
  font-weight: 600;
  margin: var(--ah-space-1) 0 0;
  white-space: nowrap;
}

.ah-page-header > :last-child {
  margin-block-end: 0;
}

.ah-card {
  background: var(--ah-color-surface);
  border: var(--ah-border-width) solid var(--ah-color-border);
  border-radius: var(--ah-radius-md);
  max-width: 100%;
  padding: var(--ah-space-5);
}

.ah-card--compact {
  padding: var(--ah-space-4);
}

.ah-card__header {
  border-bottom: var(--ah-border-width) solid var(--ah-color-border);
  margin: calc(0px - var(--ah-space-5)) calc(0px - var(--ah-space-5)) 0;
  padding: var(--ah-space-4) var(--ah-space-5);
}

.ah-card--compact > .ah-card__header {
  margin: calc(0px - var(--ah-space-4)) calc(0px - var(--ah-space-4)) 0;
  padding: var(--ah-space-3) var(--ah-space-4);
}

.ah-card__body {
  padding-block: var(--ah-space-5);
}

.ah-card--compact > .ah-card__body {
  padding-block: var(--ah-space-4);
}

.ah-card__actions {
  align-items: center;
  border-top: var(--ah-border-width) solid var(--ah-color-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--ah-space-3);
  justify-content: flex-end;
  margin: 0 calc(0px - var(--ah-space-5)) calc(0px - var(--ah-space-5));
  padding: var(--ah-space-4) var(--ah-space-5);
}

.ah-card--compact > .ah-card__actions {
  margin: 0 calc(0px - var(--ah-space-4)) calc(0px - var(--ah-space-4));
  padding: var(--ah-space-3) var(--ah-space-4);
}

.ah-section {
  min-width: 0;
}

.ah-section + .ah-section {
  margin-block-start: var(--ah-space-6);
}

.ah-section-title {
  color: var(--ah-color-text);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 var(--ah-space-4);
}

.ah-meta-grid {
  display: grid;
  gap: var(--ah-space-3) var(--ah-space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  margin: var(--ah-space-5) 0 0;
}

.ah-meta-grid__item {
  min-width: 0;
}

.ah-meta-grid__item dt {
  color: var(--ah-color-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  margin: 0 0 var(--ah-space-1);
  text-transform: uppercase;
}

.ah-meta-grid__item dd {
  color: var(--ah-color-text);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}

.ah-status {
  background: var(--ah-color-bg);
  border-left: 3px solid var(--ah-color-muted);
  border-radius: var(--ah-radius-sm);
  color: var(--ah-color-text);
  margin: 0 0 var(--ah-space-5);
  padding: var(--ah-space-3) var(--ah-space-4);
}

.ah-status--success {
  background: var(--ah-color-success-bg);
  border-left-color: var(--ah-color-success);
  color: var(--ah-color-success);
}

.ah-status--warning {
  background: var(--ah-color-warning-bg);
  border-left-color: var(--ah-color-warning);
  color: var(--ah-color-warning);
}

.ah-status--error {
  background: var(--ah-color-error-bg);
  border-left-color: var(--ah-color-error);
  color: var(--ah-color-error);
}

.ah-button {
  align-items: center;
  appearance: none;
  background: var(--ah-color-surface);
  border: var(--ah-border-width) solid var(--ah-color-border);
  border-radius: var(--ah-radius-sm);
  color: var(--ah-color-text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: var(--ah-font-weight-semibold);
  gap: var(--ah-space-2);
  justify-content: center;
  line-height: var(--ah-line-height-tight);
  min-height: var(--ah-control-height);
  padding: var(--ah-space-3) var(--ah-space-4);
  text-align: center;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    opacity 150ms ease;
}

.ah-button:hover {
  border-color: var(--ah-color-border-strong);
}

.ah-button:focus-visible {
  outline: 3px solid var(--ah-color-focus-ring);
  outline-offset: 2px;
}

.ah-button:disabled,
.ah-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.ah-button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.72;
}

.ah-button--small {
  min-height: var(--ah-control-height-sm);
  padding: var(--ah-space-2) var(--ah-space-3);
}

.ah-button--primary {
  background: var(--ah-color-primary);
  border-color: var(--ah-color-primary);
  color: var(--ah-color-surface);
}

.ah-button--primary:hover {
  background: var(--ah-color-primary-hover);
  border-color: var(--ah-color-primary-hover);
  color: var(--ah-color-surface);
}

.ah-button--secondary {
  background: var(--ah-color-surface);
  border-color: var(--ah-color-border-strong);
  color: var(--ah-color-text);
}

.ah-button--secondary:hover {
  background: var(--ah-color-surface-muted);
  border-color: var(--ah-color-primary);
  color: var(--ah-color-primary-hover);
}

.ah-button--danger {
  background: var(--ah-color-danger-text);
  border-color: var(--ah-color-danger-border);
  color: var(--ah-color-surface);
}

.ah-button--danger:hover {
  background: var(--ah-color-danger-hover);
  border-color: var(--ah-color-danger-hover);
  color: var(--ah-color-surface);
}

/* Keep the existing assessment secondary buttons visually stable in Phase 1. */
.single-standortbestimmung .ah-app .ah-button--secondary {
  border-color: var(--ah-color-primary);
  color: var(--ah-color-primary);
}

.single-standortbestimmung .ah-app .ah-button--secondary:hover {
  background: var(--ah-color-surface);
  border-color: var(--ah-color-primary);
  color: var(--ah-color-primary-hover);
}

/* Opt-in form-field and control foundation. */
.ah-form-field {
  display: grid;
  gap: var(--ah-space-2);
  min-width: 0;
}

.ah-form-field__label {
  color: var(--ah-color-text);
  font-size: var(--ah-font-size-sm);
  font-weight: var(--ah-font-weight-semibold);
  line-height: var(--ah-line-height-normal);
}

.ah-form-field__description {
  color: var(--ah-color-text-muted);
  font-size: var(--ah-font-size-xs);
  line-height: var(--ah-line-height-relaxed);
}

.ah-form-field__required,
.ah-form-field__error {
  color: var(--ah-color-danger-text);
}

.ah-form-field__error {
  font-size: var(--ah-font-size-xs);
  font-weight: var(--ah-font-weight-medium);
  line-height: var(--ah-line-height-normal);
}

.ah-control,
.ah-form-field__control {
  background: var(--ah-color-surface);
  border: var(--ah-border-width) solid var(--ah-color-border-strong);
  border-radius: var(--ah-radius-md);
  box-sizing: border-box;
  color: var(--ah-color-text);
  font: inherit;
  line-height: var(--ah-line-height-normal);
  min-height: var(--ah-control-height);
  min-width: 0;
  padding: var(--ah-space-2) var(--ah-space-3);
  width: 100%;
}

.ah-control::placeholder,
.ah-form-field__control::placeholder {
  color: var(--ah-color-text-muted);
  opacity: 1;
}

.ah-control:focus-visible,
.ah-form-field__control:focus-visible {
  border-color: var(--ah-color-primary);
  outline: 3px solid var(--ah-color-focus-ring);
  outline-offset: 1px;
}

.ah-control[aria-invalid="true"],
.ah-form-field__control[aria-invalid="true"] {
  border-color: var(--ah-color-danger-border);
}

.ah-control:disabled,
.ah-control[aria-disabled="true"],
.ah-form-field__control:disabled,
.ah-form-field__control[aria-disabled="true"] {
  background: var(--ah-color-surface-muted);
  color: var(--ah-color-text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.ah-control--small {
  min-height: var(--ah-control-height-sm);
}

.ah-control--large {
  min-height: var(--ah-control-height-lg);
}

textarea.ah-control,
textarea.ah-form-field__control {
  min-height: 8rem;
  resize: vertical;
}

/* Opt-in notice foundation. Existing .ah-status rules remain unchanged. */
.ah-notice {
  background: var(--ah-color-surface-muted);
  border: var(--ah-border-width) solid var(--ah-color-border);
  border-left-width: 4px;
  border-radius: var(--ah-radius-sm);
  color: var(--ah-color-text);
  font-size: var(--ah-font-size-sm);
  line-height: var(--ah-line-height-relaxed);
  padding: var(--ah-space-3) var(--ah-space-4);
}

.ah-notice > :first-child {
  margin-top: 0;
}

.ah-notice > :last-child {
  margin-bottom: 0;
}

.ah-notice--info {
  background: var(--ah-color-info-surface);
  border-color: var(--ah-color-info-border);
  color: var(--ah-color-info-text);
}

.ah-notice--success {
  background: var(--ah-color-success-surface);
  border-color: var(--ah-color-success-border);
  color: var(--ah-color-success-text);
}

.ah-notice--warning {
  background: var(--ah-color-warning-surface);
  border-color: var(--ah-color-warning-border);
  color: var(--ah-color-warning-text);
}

.ah-notice--error {
  background: var(--ah-color-danger-surface);
  border-color: var(--ah-color-danger-border);
  color: var(--ah-color-danger-text);
}

/* Opt-in toolbar foundation. Page-specific grids and sticky behavior stay local. */
.ah-toolbar,
.ah-filter-bar {
  align-items: center;
  background: var(--ah-color-surface-muted);
  border: var(--ah-border-width) solid var(--ah-color-border);
  border-radius: var(--ah-radius-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--ah-space-3) var(--ah-space-4);
  padding: var(--ah-space-4);
}

.ah-filter-bar {
  align-items: flex-end;
}

/* Opt-in action-bar foundation. */
.ah-action-bar {
  align-items: center;
  background: var(--ah-color-surface);
  border: var(--ah-border-width) solid var(--ah-color-border);
  border-radius: var(--ah-radius-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--ah-space-3) var(--ah-space-4);
  justify-content: space-between;
  padding: var(--ah-space-4);
}

.ah-action-bar--sticky {
  bottom: var(--ah-space-3);
  box-shadow: var(--ah-shadow-md);
  position: sticky;
  z-index: 20;
}

.ah-action-bar__summary {
  color: var(--ah-color-text-muted);
  flex: 1 1 16rem;
  font-size: var(--ah-font-size-sm);
  line-height: var(--ah-line-height-normal);
  min-width: 0;
}

.ah-action-bar__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ah-space-3);
  justify-content: flex-end;
}

/* Opt-in modal foundation; no existing dialog markup is targeted. */
.ah-modal {
  background: var(--ah-color-surface);
  border: 0;
  border-radius: var(--ah-radius-lg);
  box-shadow: var(--ah-shadow-lg);
  box-sizing: border-box;
  color: var(--ah-color-text);
  max-height: calc(100vh - var(--ah-space-6));
  max-width: 42rem;
  overflow: auto;
  padding: 0;
  width: min(42rem, calc(100% - var(--ah-space-6)));
}

.ah-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.ah-modal__header,
.ah-modal__content,
.ah-modal__actions {
  padding: var(--ah-space-5);
}

.ah-modal__header {
  border-bottom: var(--ah-border-width) solid var(--ah-color-border);
}

.ah-modal__header > :first-child,
.ah-modal__content > :first-child {
  margin-top: 0;
}

.ah-modal__header > :last-child,
.ah-modal__content > :last-child {
  margin-bottom: 0;
}

.ah-modal__actions {
  align-items: center;
  background: var(--ah-color-surface-muted);
  border-top: var(--ah-border-width) solid var(--ah-color-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--ah-space-3);
  justify-content: flex-end;
}

/* Compact account help, using the shared modal and button foundations. */
html.ah-user-help-open {
  overflow: hidden;
}

.ah-user-help.ah-modal {
  font-family: var(--ah-font-base);
  font-size: var(--ah-font-size-md);
  line-height: var(--ah-line-height-relaxed);
  max-height: calc(100dvh - var(--ah-space-6));
  overflow: hidden;
  box-shadow: var(--ah-shadow-md);
}

.ah-user-help[open] {
  display: flex;
  flex-direction: column;
}

.ah-user-help .ah-modal__header,
.ah-user-help .ah-modal__actions {
  flex: 0 0 auto;
}

.ah-user-help .ah-modal__content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  line-height: inherit;
}

.ah-user-help :is(h2, h3) {
  font-family: var(--ah-font-heading);
  font-weight: var(--ah-font-weight-semibold);
  line-height: var(--ah-line-height-tight);
  margin: 0 0 var(--ah-space-3);
}

.ah-user-help h2 {
  font-size: var(--ah-font-size-xl);
}

.ah-user-help h3 {
  font-size: var(--ah-font-size-lg);
}

.ah-user-help :is(p, ol, ul, dl, dd) {
  margin: 0;
}

.ah-user-help :is(ol, ul) {
  padding-left: var(--ah-space-5);
  list-style-position: outside;
}

.ah-user-help ol {
  list-style-type: decimal;
}

.ah-user-help ul {
  list-style-type: disc;
}

.ah-user-help li + li {
  margin-top: var(--ah-space-2);
}

.ah-user-help section + section {
  margin-top: var(--ah-space-5);
}

.ah-user-help dt {
  font-weight: var(--ah-font-weight-semibold);
}

.ah-user-help dd + dt {
  margin-top: var(--ah-space-4);
}

.ah-user-help #ah-user-help-intro {
  color: var(--ah-color-text-muted);
}

.ah-user-help :is(h2, h3, p, li, dt, dd, a) {
  overflow-wrap: anywhere;
}

.ah-user-help__admin-link {
  color: var(--ah-color-primary);
  margin-right: auto;
  padding-block: var(--ah-space-3);
  text-decoration: underline;
}

.ah-user-help__admin-link:hover {
  color: var(--ah-color-primary-hover);
}

.ah-user-help :is([tabindex], a):focus-visible {
  outline: 3px solid var(--ah-color-focus-ring);
  outline-offset: -2px;
}

/* Opt-in table foundation. */
.ah-table {
  background: var(--ah-color-surface);
  border-collapse: collapse;
  color: var(--ah-color-text);
  width: 100%;
}

.ah-table th,
.ah-table td {
  border-bottom: var(--ah-border-width) solid var(--ah-color-border);
  padding: var(--ah-space-3) var(--ah-space-4);
  text-align: left;
  vertical-align: top;
}

.ah-table th {
  background: var(--ah-color-surface-muted);
  color: var(--ah-color-text-muted);
  font-size: var(--ah-font-size-xs);
  font-weight: var(--ah-font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ah-table__secondary {
  color: var(--ah-color-text-muted);
  display: block;
  font-size: var(--ah-font-size-xs);
  line-height: var(--ah-line-height-normal);
  margin-top: var(--ah-space-1);
}

.ah-table__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ah-space-2);
}

/* Opt-in disclosure foundation for native details/summary markup. */
details.ah-disclosure {
  background: var(--ah-color-surface);
  border: var(--ah-border-width) solid var(--ah-color-border);
  border-radius: var(--ah-radius-md);
  overflow: hidden;
  margin: 0.5rem 0;
}

details.ah-disclosure > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: var(--ah-font-weight-semibold);
  gap: var(--ah-space-3);
  list-style: none;
  padding: var(--ah-space-3) var(--ah-space-4);
}

details.ah-disclosure > summary::-webkit-details-marker {
  display: none;
}

details.ah-disclosure > summary::after {
  color: var(--ah-color-text-muted);
  content: "▾";
  margin-left: auto;
  transition: transform 150ms ease;
}

details.ah-disclosure[open] > summary {
  background: var(--ah-color-surface-muted);
  border-bottom: var(--ah-border-width) solid var(--ah-color-border);
}

details.ah-disclosure[open] > summary::after {
  transform: rotate(180deg);
}

details.ah-disclosure > summary:focus-visible {
  outline: 3px solid var(--ah-color-focus-ring);
  outline-offset: -3px;
}

.ah-disclosure__content {
  padding: var(--ah-space-4);
}

/* Read-only developer diagnostics. */
.acherhof-developer-diagnostics {
  box-sizing: border-box;
  margin: var(--ah-space-6) auto;
  max-width: min(calc(100% - 2rem), 76rem);
  min-width: 0;
  width: 100%;
}

.acherhof-developer-diagnostics__panel {
  box-shadow: none;
}

.acherhof-developer-diagnostics__content {
  min-width: 0;
}

.acherhof-developer-diagnostics__intro {
  color: var(--ah-color-text-muted);
  margin: 0 0 var(--ah-space-5);
}

.acherhof-developer-diagnostics__section
  + .acherhof-developer-diagnostics__section,
.acherhof-developer-diagnostics__raw {
  margin-top: var(--ah-space-5);
}

.acherhof-developer-diagnostics__table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.acherhof-developer-diagnostics__table {
  table-layout: fixed;
}

.acherhof-developer-diagnostics__table th {
  width: min(19rem, 38%);
}

.acherhof-developer-diagnostics__table td,
.acherhof-developer-diagnostics__table code,
.acherhof-developer-diagnostics__check code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.acherhof-developer-diagnostics__checks {
  display: grid;
  gap: var(--ah-space-3);
}

.acherhof-developer-diagnostics__check p {
  margin: 0;
}

.acherhof-developer-diagnostics__check p + p,
.acherhof-developer-diagnostics__check dl {
  margin-top: var(--ah-space-2);
}

.acherhof-developer-diagnostics__check dl {
  display: grid;
  gap: var(--ah-space-1) var(--ah-space-3);
  grid-template-columns: max-content minmax(0, 1fr);
  margin-bottom: 0;
}

.acherhof-developer-diagnostics__check dt {
  font-weight: var(--ah-font-weight-semibold);
}

.acherhof-developer-diagnostics__check dd {
  margin: 0;
  min-width: 0;
}

@media (max-width: 37.5rem) {
  .acherhof-developer-diagnostics {
    margin-inline: 0.75rem;
    max-width: calc(100% - 1.5rem);
  }

  .acherhof-developer-diagnostics__table {
    table-layout: auto;
  }

  .acherhof-developer-diagnostics__table th,
  .acherhof-developer-diagnostics__table td {
    display: block;
    width: auto;
  }

  .acherhof-developer-diagnostics__table td {
    border-bottom: var(--ah-border-width) solid var(--ah-color-border);
  }

  .acherhof-developer-diagnostics__check dl {
    grid-template-columns: 1fr;
  }
}

.single-standortbestimmung .ah-app .ah-conversation-date {
  background: var(--ah-color-primary-soft);
  border: 1px solid var(--ah-color-border);
  border-left: 4px solid var(--ah-color-primary);
  border-radius: var(--ah-radius-md);
  margin: 0 0 var(--ah-space-5);
  padding: var(--ah-space-4);
}

.single-standortbestimmung .ah-app .ah-conversation-date__content {
  align-items: center;
  display: flex;
  gap: var(--ah-space-4);
  justify-content: space-between;
}

.single-standortbestimmung .ah-app .ah-conversation-date__label {
  color: var(--ah-color-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 var(--ah-space-1);
  text-transform: uppercase;
}

.single-standortbestimmung .ah-app .ah-conversation-date__value {
  color: var(--ah-color-text);
  font-size: 1.1rem;
  font-weight: 650;
  margin: 0;
}

.single-standortbestimmung .ah-app .ah-conversation-date__locked {
  color: var(--ah-color-muted);
  flex: 0 0 auto;
  font-size: 0.875rem;
  font-weight: 600;
}

.single-standortbestimmung .ah-app .ah-conversation-date__editor {
  align-items: end;
  border-top: 1px solid var(--ah-color-border);
  display: grid;
  gap: var(--ah-space-3);
  grid-template-columns: minmax(14rem, 24rem) auto;
  margin-top: var(--ah-space-4);
  padding-top: var(--ah-space-4);
}

.single-standortbestimmung .ah-app .ah-conversation-date__editor[hidden] {
  display: none;
}

.single-standortbestimmung .ah-app .ah-conversation-date__editor label {
  color: var(--ah-color-text);
  display: block;
  font-weight: 600;
  grid-column: 1;
  grid-row: 1;
}

.single-standortbestimmung
  .ah-app
  .ah-conversation-date__editor
  input[type="datetime-local"] {
  background: var(--ah-color-surface);
  border: 1px solid var(--ah-color-border);
  border-radius: var(--ah-radius-sm);
  color: var(--ah-color-text);
  font: inherit;
  grid-column: 1;
  grid-row: 2;
  min-height: 2.75rem;
  padding: var(--ah-space-2) var(--ah-space-3);
  width: 100%;
}

.single-standortbestimmung
  .ah-app
  .ah-conversation-date__editor
  input[type="datetime-local"]:focus-visible {
  border-color: var(--ah-color-primary);
  outline: 3px solid #b8c9c3;
  outline-offset: 1px;
}

.single-standortbestimmung .ah-app .ah-conversation-date__actions {
  display: flex;
  gap: var(--ah-space-2);
  grid-column: 2;
  grid-row: 2;
}

.single-standortbestimmung .ah-app .ah-conversation-date__edit[hidden] {
  display: none !important;
}

.single-standortbestimmung .ah-app .ah-conversation-date__status {
  margin: var(--ah-space-3) 0 0;
  min-height: 1.25em;
}

.single-standortbestimmung .ah-app .ah-conversation-date__status:empty {
  display: none;
}

.single-standortbestimmung .ah-app .ah-conversation-date__status--success {
  color: var(--ah-color-success);
}

.single-standortbestimmung .ah-app .ah-conversation-date__status--error {
  color: var(--ah-color-error);
}

/* The same ACF field remains the mandatory picker in step 0 only. */
.single-standortbestimmung
  .ah-app
  .ah-assessment--central-conversation-date
  .acf-field-6141ea1c65f72 {
  display: none !important;
}

.ah-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ah-space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.ah-stepper__item {
  align-items: center;
  background: var(--ah-color-bg);
  border: 1px solid var(--ah-color-border);
  border-radius: var(--ah-radius-sm);
  color: var(--ah-color-muted);
  display: flex;
  flex: 1 1 10rem;
  font-size: 0.875rem;
  gap: var(--ah-space-2);
  line-height: 1.3;
  min-width: 0;
  padding: var(--ah-space-2) var(--ah-space-3);
}

.ah-stepper__number {
  align-items: center;
  background: var(--ah-color-surface);
  border: 1px solid var(--ah-color-border);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 1.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  height: 1.75rem;
  justify-content: center;
  width: 1.75rem;
}

.ah-stepper__item--complete {
  background: var(--ah-color-success-bg);
  border-color: #c9ded1;
  color: var(--ah-color-success);
}

.ah-stepper__item--complete .ah-stepper__number {
  border-color: var(--ah-color-success);
}

.ah-stepper__item--active {
  background: var(--ah-color-primary-soft);
  border-color: var(--ah-color-primary);
  color: var(--ah-color-primary);
  font-weight: 600;
}

.ah-stepper__item--active .ah-stepper__number {
  background: var(--ah-color-primary);
  border-color: var(--ah-color-primary);
  color: #ffffff;
}

.ah-process {
  border-bottom: 1px solid var(--ah-color-border);
  margin: 0 0 var(--ah-space-6);
  padding: 0 0 var(--ah-space-6);
}

.ah-form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ah-space-3);
  justify-content: flex-end;
}

.ah-assessment {
  min-width: 0;
}

.ah-app .acf-form,
.ah-app .acf-form .acf-fields {
  max-width: 100%;
  min-width: 0;
}

.ah-app .acf-table {
  border: 0 !important;
}

/* Technische Rundenzuordnungen bleiben im Formular erhalten, aber unsichtbar. */
.ah-app .acf-field[data-name="standortrunde_id"],
.ah-app .acf-field[data-name="meta_standortrunde_id"],
.ah-app .acf-field[data-name="standortbestimmungsrunde_id"] {
  display: none !important;
}

.single-standortbestimmung .ah-app .ah-form-actions {
  gap: var(--ah-space-3);
  justify-content: flex-start;
  margin-top: var(--ah-space-5);
  padding-top: var(--ah-space-5);
}

.single-standortbestimmung .ah-app .ah-form-actions .acf-form-submit {
  display: block;
  margin: 0;
  padding: 0;
}

.single-standortbestimmung .ah-app .ah-form-actions > form {
  margin: 0;
}

.single-standortbestimmung .ah-app .ah-form-actions .back_button,
.single-standortbestimmung .ah-app .ah-form-actions #print_button,
.single-standortbestimmung .ah-app .ah-form-actions [data-acherhof-print-mode],
.single-standortbestimmung .ah-app .ah-form-actions #save_status_closed,
.single-standortbestimmung .ah-app .ah-form-actions input[type="submit"] {
  align-items: center;
  appearance: none;
  background: var(--ah-color-surface);
  border: 1px solid var(--ah-color-primary);
  border-radius: var(--ah-radius-sm);
  color: var(--ah-color-primary);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 600;
  justify-content: center;
  line-height: 1.25;
  margin: 0;
  min-height: 2.75rem;
  padding: var(--ah-space-3) var(--ah-space-4);
  text-align: center;
  text-decoration: none;
  gap: var(--ah-space-2);
}

.single-standortbestimmung
  .ah-app
  .ah-form-actions
  .acf-form-submit
  input[type="submit"] {
  background: var(--ah-color-primary);
  border-color: var(--ah-color-primary);
  color: var(--ah-color-surface);
}

.single-standortbestimmung .ah-app .ah-form-actions .back_button:hover,
.single-standortbestimmung .ah-app .ah-form-actions #print_button:hover,
.single-standortbestimmung
  .ah-app
  .ah-form-actions
  [data-acherhof-print-mode]:hover,
.single-standortbestimmung .ah-app .ah-form-actions #save_status_closed:hover {
  background: var(--ah-color-primary-soft);
  color: var(--ah-color-primary-hover);
}

.single-standortbestimmung
  .ah-app
  .ah-form-actions
  .acf-form-submit
  input[type="submit"]:hover {
  background: var(--ah-color-primary-hover);
  border-color: var(--ah-color-primary-hover);
  color: var(--ah-color-surface);
}

.single-standortbestimmung .ah-app .ah-form-actions .back_button:focus-visible,
.single-standortbestimmung .ah-app .ah-form-actions #print_button:focus-visible,
.single-standortbestimmung
  .ah-app
  .ah-form-actions
  [data-acherhof-print-mode]:focus-visible,
.single-standortbestimmung
  .ah-app
  .ah-form-actions
  #save_status_closed:focus-visible,
.single-standortbestimmung
  .ah-app
  .ah-form-actions
  input[type="submit"]:focus-visible {
  outline: 3px solid var(--ah-color-focus-ring);
  outline-offset: 2px;
}

.ah-save-state,
.ah-app .acherhof-save-status {
  color: var(--ah-color-text-muted);
  font-size: var(--ah-font-size-sm);
  line-height: 1.45;
  margin: 0 0 var(--ah-space-3);
  min-height: 1.3em;
}

.ah-app .acherhof-save-status--dirty {
  color: var(--ah-color-warning);
}

.ah-app .acherhof-save-status--saving {
  color: var(--ah-color-primary);
}

.ah-app .acherhof-save-status--saved {
  color: var(--ah-color-success);
}

.ah-app .acherhof-save-status--failed,
.ah-app .acherhof-save-status--stale {
  color: var(--ah-color-error);
  font-weight: 600;
}

.ah-app .acherhof-save-status--stale {
  background: var(--ah-color-error-bg);
  border-left: 3px solid var(--ah-color-error);
  border-radius: var(--ah-radius-sm);
  padding: var(--ah-space-3) var(--ah-space-4);
  white-space: pre-line;
}

.ah-app #message.updated,
.ah-app .mail-response,
.ah-app #mitteilung .acf-notice,
.ah-app .acf-notice.-error.acf-error-message,
.ah-app .error_message {
  border-radius: var(--ah-radius-sm);
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 var(--ah-space-5);
  padding: var(--ah-space-3) var(--ah-space-4);
}

.ah-app #message.updated,
.ah-app .mail-response {
  background: var(--ah-color-success-bg);
  border: 0;
  border-left: 3px solid var(--ah-color-success);
  color: var(--ah-color-success);
}

.ah-app #mitteilung .acf-notice {
  background: var(--ah-color-primary-soft);
  border: 0;
  border-left: 3px solid var(--ah-color-primary);
  color: var(--ah-color-text);
}

.ah-app .acf-notice.-error.acf-error-message,
.ah-app .error_message {
  background: var(--ah-color-error-bg);
  border: 0;
  border-left: 3px solid var(--ah-color-error);
  color: var(--ah-color-error);
}

.ah-app #message.updated p,
.ah-app #mitteilung .acf-notice p {
  margin: 0;
}

.ah-app .ah-focus-topics__summary {
  align-items: center;
  background: var(--ah-color-primary-soft);
  border: 1px solid #cfddd8;
  border-radius: var(--ah-radius-md);
  display: grid;
  gap: var(--ah-space-2) var(--ah-space-5);
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin: var(--ah-space-5) 0;
  padding: var(--ah-space-4);
}

.ah-app .ah-focus-counter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ah-space-2) var(--ah-space-4);
  min-width: 0;
}

.ah-app .ah-focus-counter__value {
  color: var(--ah-color-primary-hover);
  font-size: 1rem;
  font-weight: 700;
}

.ah-app .ah-focus-counter__remaining,
.ah-app .ah-focus-limit {
  color: var(--ah-color-muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.ah-app .ah-focus-limit {
  margin: 0;
  text-align: right;
}

.ah-app .ah-focus-counter-source {
  display: block !important;
  justify-self: end;
  position: static;
  transform: none;
  z-index: auto;
}

.ah-app .ah-focus-topics {
  min-width: 0;
  padding-block: 0 !important;
}

.ah-app .ah-focus-topics > .acf-label {
  margin-bottom: var(--ah-space-4);
}

.ah-app .ah-focus-topics .ah-focus-group {
  background: var(--ah-color-surface) !important;
  border: 1px solid var(--ah-color-border) !important;
  border-radius: var(--ah-radius-md);
  margin: 0 0 var(--ah-space-4) !important;
  overflow: hidden;
}

.ah-app .ah-focus-topics .ah-focus-group__title {
  align-items: center;
  background: var(--ah-color-bg) !important;
  display: flex;
  gap: var(--ah-space-3);
  min-height: 3.5rem;
  padding: var(--ah-space-3) var(--ah-space-4) !important;
}

.ah-app .ah-focus-topics .ah-focus-group__title label {
  color: var(--ah-color-text) !important;
  font-size: 1.1rem !important;
  font-weight: 600;
  letter-spacing: 0 !important;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ah-app .ah-focus-group__count {
  background: var(--ah-color-surface);
  border: 1px solid var(--ah-color-border);
  border-radius: 999px;
  color: var(--ah-color-muted);
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: auto;
  padding: 0.25rem 0.55rem;
  white-space: nowrap;
}

.ah-app .ah-focus-topics .acf-accordion-content > .acf-fields {
  background: transparent !important;
  border: 0 !important;
  padding: var(--ah-space-4) !important;
}

.ah-app .ah-focus-topics ul.acf-checkbox-list {
  display: grid;
  gap: var(--ah-space-2);
  margin: 0;
  padding: 0;
}

.ah-app .ah-focus-topics .ah-focus-option {
  display: grid;
  font-size: 1rem !important;
  line-height: 1.35 !important;
  margin: 0 !important;
  opacity: 1;
  padding: 0 !important;
}

.ah-app .ah-focus-topics .ah-focus-option__label {
  align-items: flex-start;
  background: var(--ah-color-surface);
  border: 1px solid var(--ah-color-border);
  border-radius: var(--ah-radius-sm);
  color: var(--ah-color-text);
  cursor: pointer;
  display: flex;
  gap: var(--ah-space-3);
  line-height: 1.4;
  min-height: 3rem;
  padding: 0.75rem var(--ah-space-3);
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
  width: 100%;
}

.ah-app .ah-focus-topics .ah-focus-option__label:hover {
  background: var(--ah-color-primary-soft);
  border-color: #aebfba;
}

.ah-app .ah-focus-topics .ah-focus-option__label:focus-within {
  border-color: var(--ah-color-primary);
  box-shadow: 0 0 0 3px #dce8e4;
}

.ah-app .ah-focus-topics .ah-focus-option input[type="checkbox"] {
  accent-color: var(--ah-color-primary);
  flex: 0 0 auto;
  height: 1.15rem;
  margin: 0.1rem 0 0;
  width: 1.15rem;
}

.ah-app .ah-focus-topics .ah-focus-option--selected .ah-focus-option__label {
  background: var(--ah-color-primary-soft);
  border-color: var(--ah-color-primary);
  box-shadow: inset 3px 0 0 var(--ah-color-primary);
  font-weight: 600;
}

.ah-app .ah-focus-topics .ah-focus-option--disabled,
.ah-app .ah-focus-topics .ah-focus-option.forbidden,
.ah-app .ah-focus-topics .ah-focus-option.total {
  opacity: 0.68;
  pointer-events: none;
}

.ah-app .ah-focus-topics .ah-focus-option--disabled .ah-focus-option__label,
.ah-app .ah-focus-topics .ah-focus-option.forbidden .ah-focus-option__label,
.ah-app .ah-focus-topics .ah-focus-option.total .ah-focus-option__label {
  background: #f1f3f2;
  border-color: #dfe4e2;
  color: #53605b;
  cursor: not-allowed;
}

.ah-app .ah-focus-topics .ah-focus-option--preselected .ah-focus-option__label {
  box-shadow: inset 3px 0 0 #89958f;
}

.ah-app .ah-focus-topics--readonly .ah-focus-option,
.ah-app .ah-focus-topics--readonly .ah-focus-option--readonly {
  opacity: 1;
  pointer-events: auto;
}

.ah-app .ah-focus-topics--readonly > .ah-focus-readonly__heading {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ah-space-2) var(--ah-space-4);
  justify-content: space-between;
}

.ah-app .ah-focus-topics--readonly > .ah-focus-readonly__heading > label {
  margin: 0;
}

.ah-app .ah-focus-readonly__count {
  color: var(--ah-color-text-muted);
  font-size: var(--ah-font-size-sm);
  font-weight: var(--ah-font-weight-medium);
  line-height: var(--ah-line-height-normal);
}

.ah-app .ah-focus-topics--readonly .ah-focus-group {
  margin-bottom: var(--ah-space-3) !important;
}

.ah-app .ah-focus-topics--readonly .ah-focus-group__count {
  background: transparent;
  border: 0;
  font-weight: var(--ah-font-weight-medium);
  padding: 0;
}

.ah-app
  .ah-focus-topics--readonly
  .ah-focus-option:not(.ah-focus-option--selected) {
  opacity: 0.5;
}

.ah-app .ah-focus-topics--readonly .ah-focus-option__label {
  cursor: default;
}

.ah-app
  .ah-focus-topics--readonly
  .ah-focus-option:not(.ah-focus-option--selected)
  .ah-focus-option__label {
  background: var(--ah-color-surface-muted);
  border-color: var(--ah-color-border);
  color: var(--ah-color-text-muted);
}

.ah-app
  .ah-focus-topics--readonly
  .ah-focus-option:not(.ah-focus-option--selected)
  .ah-focus-option__label:hover {
  background: var(--ah-color-surface-muted);
  border-color: var(--ah-color-border);
}

.ah-app
  .ah-focus-topics--readonly
  .ah-focus-option--selected
  .ah-focus-option__label:hover {
  background: var(--ah-color-primary-soft);
  border-color: var(--ah-color-primary);
}

.ah-app .ah-focus-topics--readonly input[type="checkbox"]:disabled,
.ah-app .ah-focus-topics--readonly input[type="radio"]:disabled {
  accent-color: var(--ah-color-primary);
  cursor: default;
  filter: none;
  opacity: 1;
}

.ah-app .ah-focus-topics--readonly input[readonly],
.ah-app .ah-focus-topics--readonly textarea[readonly] {
  background: var(--ah-color-surface);
  color: var(--ah-color-text);
}

.ah-app .ah-focus-readonly__actions {
  margin-top: var(--ah-space-5);
}

.ah-app .ah-focus-option__state {
  color: var(--ah-color-muted);
  font-size: 0.75rem;
  line-height: 1.3;
  margin: 0.25rem var(--ah-space-3) var(--ah-space-1);
}

.ah-app .ah-focus-option__state:empty {
  display: none;
}

.ah-rating-list {
  margin-block: var(--ah-space-5);
  min-width: 0;
}

.ah-rating-list > .acf-label {
  margin: 0 0 var(--ah-space-4);
}

.ah-rating-list > .acf-label label {
  color: var(--ah-color-text);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
}

.ah-rating-card {
  /*
  background: var(--ah-color-surface);
  border: 1px solid var(--ah-color-border);
  border-radius: var(--ah-radius-md);
  box-shadow: 0 4px 16px rgba(39, 51, 47, 0.05);
  overflow: hidden;
  */
}

.ah-rating-card + .ah-rating-card {
  margin-top: var(--ah-space-5);
}

.ah-rating-card__header {
  margin: 0 0 var(--ah-space-2);
}

.ah-rating-card__meta {
  color: var(--ah-color-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ah-rating-card__title {
  margin: 0;
  color: var(--ah-color-text);
  font-family: var(--ah-font-heading);
  font-size: 1.25rem;
  font-weight: var(--ah-font-weight-semibold);
  line-height: var(--ah-line-height-tight);
  text-align: center;
  overflow-wrap: anywhere;
}

.ah-rating-scale {
  --ah-rating-position: 0%;
  --ah-rating-thumb-size: 1.25rem;
  --ah-rating-track-height: 0.375rem;
  --ah-rating-track-inset: calc(var(--ah-rating-thumb-size) / 2);
  border-top: 1px solid var(--ah-color-border) !important;
  margin-top: var(--ah-space-4);
  padding-top: var(--ah-space-5) !important;
}

.ah-rating-scale__summary {
  align-items: baseline;
  display: flex;
  gap: var(--ah-space-3);
  justify-content: space-between;
  margin: 0 0 var(--ah-space-4);
}

.ah-rating-scale__label {
  color: var(--ah-color-text);
  font-size: 0.875rem;
  font-weight: 600;
}

.ah-rating-value {
  color: var(--ah-color-primary);
  font-size: 0.95rem;
  line-height: 1.3;
  text-align: right;
}

.ah-rating-value__current {
  font-size: 1.5rem;
  font-weight: 700;
}

.ah-rating-value--unrated {
  color: var(--ah-color-text-muted);
}

.ah-rating-value--unrated .ah-rating-value__current {
  font-size: 0.875rem;
  font-weight: 600;
}

.ah-rating-scale__ticks {
  font-size: 0.7rem;
  height: 1.75rem;
  line-height: 1;
  margin-top: var(--ah-space-2);
  margin-inline: var(--ah-rating-track-inset);
  position: relative;
  user-select: none;
  z-index: 2;
}

.ah-rating-scale__tick {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: var(--ah-radius-sm);
  box-sizing: border-box;
  color: var(--ah-color-muted);
  cursor: pointer;
  display: block;
  font: inherit;
  left: var(--ah-rating-tick-position);
  line-height: 1;
  min-width: 1.75rem;
  padding: 0.5rem 0.25rem;
  pointer-events: auto;
  position: absolute;
  text-align: center;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 2;
}

.ah-rating-scale__tick:hover,
.ah-rating-scale__tick:focus-visible {
  background: var(--ah-color-primary-soft);
  color: var(--ah-color-primary-hover);
}

.ah-rating-scale__tick:focus-visible {
  outline: 2px solid var(--ah-color-primary);
  outline-offset: 1px;
}

.ah-rating-scale__tick--active {
  color: var(--ah-color-primary);
  font-weight: 700;
}

.ah-rating-comment {
  border-top: 1px solid var(--ah-color-border) !important;
  margin-top: var(--ah-space-5);
  padding-top: var(--ah-space-5) !important;
}

.ah-rating-comment textarea {
  background: var(--ah-color-bg);
  border: 1px solid var(--ah-color-border);
  border-radius: var(--ah-radius-md);
  color: var(--ah-color-text);
  font: inherit;
  line-height: 1.5;
  min-height: 7rem;
  padding: var(--ah-space-3);
  resize: vertical;
  width: 100%;
}

.ah-rating-comment textarea:focus {
  background: var(--ah-color-surface);
  border-color: var(--ah-color-primary);
  box-shadow: 0 0 0 3px #dce8e4;
  outline: 0;
}

.ah-rating-card--unrated {
  border-color: #decfae;
}

.ah-rating-locked {
  min-width: 0;
}

@media screen and (max-width: 60rem) {
  body.single-standortbestimmung {
    width: calc(100% - 2rem);
  }

  .ah-app {
    margin-block: var(--ah-space-5);
  }
}

@media (max-width: 40rem) {
  .single-standortbestimmung .ah-app .ah-conversation-date__content {
    align-items: stretch;
    flex-direction: column;
  }

  .single-standortbestimmung .ah-app .ah-conversation-date__edit {
    width: 100%;
  }

  .single-standortbestimmung .ah-app .ah-conversation-date__editor {
    grid-template-columns: 1fr;
  }

  .single-standortbestimmung .ah-app .ah-conversation-date__editor label,
  .single-standortbestimmung .ah-app .ah-conversation-date__actions {
    grid-column: 1;
  }

  .single-standortbestimmung .ah-app .ah-conversation-date__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .single-standortbestimmung .ah-app .ah-conversation-date__actions .ah-button {
    width: 100%;
  }

  .ah-app .ah-focus-topics__summary {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .ah-app .ah-focus-limit {
    text-align: left;
  }

  .ah-app .ah-focus-counter-source {
    justify-self: start;
  }

  .ah-app .ah-focus-topics .ah-focus-group__title {
    align-items: flex-start;
    padding: var(--ah-space-3) !important;
  }

  .ah-app .ah-focus-topics .acf-accordion-content > .acf-fields {
    padding: var(--ah-space-3) !important;
  }

  .ah-app .ah-focus-topics .ah-focus-option__label {
    min-height: 3.25rem;
  }

  .ah-page-header__main {
    align-items: flex-start;
    flex-direction: column;
  }

  .ah-page-header__status {
    white-space: normal;
  }

  .ah-meta-grid {
    grid-template-columns: 1fr;
  }

  .ah-stepper__item {
    flex-basis: 100%;
  }

  .ah-rating-scale__summary {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--ah-space-1);
  }

  .ah-rating-value {
    text-align: left;
  }

  .ah-card {
    padding: var(--ah-space-4);
  }

  .ah-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ah-form-actions .ah-button {
    width: 100%;
  }

  .single-standortbestimmung .ah-app .ah-form-actions .back_button,
  .single-standortbestimmung .ah-app .ah-form-actions #print_button,
  .single-standortbestimmung
    .ah-app
    .ah-form-actions
    [data-acherhof-print-mode],
  .single-standortbestimmung .ah-app .ah-form-actions #save_status_closed,
  .single-standortbestimmung .ah-app .ah-form-actions .acf-form-submit,
  .single-standortbestimmung .ah-app .ah-form-actions input[type="submit"] {
    width: 100%;
  }
}

.single-standortbestimmung .acherhof-history-print-header {
  display: none;
}

.single-standortbestimmung .acherhof-snapshot-details {
  border-top: 1px solid var(--ah-color-border);
  margin-top: var(--ah-space-5);
  padding-top: var(--ah-space-4);
}

.single-standortbestimmung .acherhof-snapshot-details h3,
.single-standortbestimmung .acherhof-snapshot-details h4 {
  margin-bottom: var(--ah-space-3);
}

.single-standortbestimmung .acherhof-snapshot-details__meta {
  display: grid;
  gap: var(--ah-space-2) var(--ah-space-4);
  grid-template-columns: max-content minmax(0, 1fr);
}

.single-standortbestimmung .acherhof-snapshot-details__meta dt {
  font-weight: 600;
}

.single-standortbestimmung .acherhof-snapshot-details__meta dd {
  margin: 0;
}

.single-standortbestimmung .acherhof-snapshot-details__ratings {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.single-standortbestimmung .acherhof-snapshot-details__ratings th,
.single-standortbestimmung .acherhof-snapshot-details__ratings td {
  border: 1px solid var(--ah-color-border);
  overflow-wrap: anywhere;
  padding: var(--ah-space-2);
  text-align: left;
  vertical-align: top;
}

@media print {
  @page {
    margin: 14mm;
    size: A4 portrait;
  }

  @page acherhof-assessment {
    @bottom-center {
      font-family: sans-serif;
      font-size: 9pt;
      font-weight: normal;
      color: #000;
      vertical-align: middle;
    }
  }

  body.single-standortbestimmung.print_standortbestimmung {
    page: acherhof-assessment;
  }

  .ah-app {
    margin: 0;
    max-width: none;
  }

  .ah-page.ah-card {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  body.single-standortbestimmung.print_standortbestimmung,
  body.single-standortbestimmung.print_verlauf {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    min-height: 0 !important;
    width: auto !important;
  }

  /* The screen body's 30vh bottom padding must not reserve a trailing print page. */
  body.single-standortbestimmung.print_standortbestimmung {
    padding-bottom: 0;
  }

  /* Add space once at the start of the document, not to every printed page. */
  body.single-standortbestimmung.print_standortbestimmung #content {
    padding-top: 10mm;
  }

  body.single-standortbestimmung.print_standortbestimmung #masthead,
  body.single-standortbestimmung.print_standortbestimmung #header,
  body.single-standortbestimmung.print_standortbestimmung #wpadminbar,
  body.single-standortbestimmung.print_standortbestimmung #sidebar,
  body.single-standortbestimmung.print_standortbestimmung #footer,
  body.single-standortbestimmung.print_standortbestimmung #secondary,
  body.single-standortbestimmung.print_standortbestimmung .site-footer,
  body.single-standortbestimmung.print_standortbestimmung .ah-form-actions,
  body.single-standortbestimmung.print_standortbestimmung .ah-conversation-date,
  body.single-standortbestimmung.print_standortbestimmung
    .acherhof-history-print-header,
  body.single-standortbestimmung.print_standortbestimmung
    .acherhof-snapshot-status,
  body.single-standortbestimmung.print_standortbestimmung
    .acherhof-audit-identity-summary,
  body.single-standortbestimmung.print_standortbestimmung
    .acherhof-audit-timeline,
  body.single-standortbestimmung.print_standortbestimmung .entwickler-content,
  body.single-standortbestimmung.print_standortbestimmung
    span.ah-assessment-header__lock,
  body.single-standortbestimmung.print_standortbestimmung
    #acherhof-developer-diagnostics,
  body.single-standortbestimmung.print_verlauf #masthead,
  body.single-standortbestimmung.print_verlauf #header,
  body.single-standortbestimmung.print_verlauf #wpadminbar,
  body.single-standortbestimmung.print_verlauf #sidebar,
  body.single-standortbestimmung.print_verlauf #footer,
  body.single-standortbestimmung.print_verlauf #secondary,
  body.single-standortbestimmung.print_verlauf .site-footer,
  body.single-standortbestimmung.print_verlauf .ah-form-actions,
  body.single-standortbestimmung.print_verlauf .ah-assessment-title,
  body.single-standortbestimmung.print_verlauf .ah-assessment,
  body.single-standortbestimmung.print_verlauf .acherhof-closed-round-notice,
  body.single-standortbestimmung.print_verlauf .entwickler-content,
  body.single-standortbestimmung.print_verlauf #mitteilung {
    display: none !important;
  }

  .single-standortbestimmung .ah-app .ah-assessment-header {
    border-bottom: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  body.single-standortbestimmung.print_standortbestimmung .punktetabelle {
    break-before: page;
    page-break-before: always;
  }

  body.single-standortbestimmung.print_verlauf #content {
    display: flex;
    flex-direction: column;
  }

  body.single-standortbestimmung.print_verlauf .acherhof-history-print-header {
    display: block;
    order: 1;
  }

  body.single-standortbestimmung.print_verlauf
    .acherhof-history-print-header
    h1 {
    font-size: 20pt;
    margin: 0 0 8mm;
  }

  body.single-standortbestimmung.print_verlauf
    .acherhof-history-print-header
    dl {
    display: grid;
    gap: 2mm 5mm;
    grid-template-columns: max-content minmax(0, 1fr);
    margin: 0 0 8mm;
  }

  body.single-standortbestimmung.print_verlauf
    .acherhof-history-print-header
    dt {
    font-weight: 700;
  }

  body.single-standortbestimmung.print_verlauf
    .acherhof-history-print-header
    dd {
    margin: 0;
  }

  body.single-standortbestimmung.print_verlauf
    .acherhof-audit-identity-summary {
    order: 2;
  }

  body.single-standortbestimmung.print_verlauf .acherhof-audit-timeline {
    order: 3;
  }

  body.single-standortbestimmung.print_verlauf .acherhof-snapshot-status {
    order: 4;
  }

  body.single-standortbestimmung.print_verlauf .acherhof-audit-timeline__list {
    display: flex;
    flex-direction: column-reverse;
  }

  body.single-standortbestimmung.print_verlauf
    .acherhof-audit-timeline
    details:not([open])
    > :not(summary) {
    display: block !important;
  }

  body.single-standortbestimmung.print_verlauf
    .acherhof-audit-timeline
    details
    summary {
    display: none !important;
  }

  body.single-standortbestimmung.print_verlauf .acherhof-audit-timeline__item,
  body.single-standortbestimmung.print_verlauf .acherhof-snapshot-status,
  body.single-standortbestimmung.print_verlauf
    .acherhof-snapshot-details__ratings
    tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.single-standortbestimmung.print_verlauf
    .acherhof-audit-timeline__content,
  body.single-standortbestimmung.print_verlauf .acherhof-audit-identity-summary,
  body.single-standortbestimmung.print_verlauf .acherhof-snapshot-status {
    background: transparent !important;
    box-shadow: none !important;
  }

  body.single-standortbestimmung.print_verlauf pre,
  body.single-standortbestimmung.print_verlauf code,
  body.single-standortbestimmung.print_verlauf td,
  body.single-standortbestimmung.print_verlauf dd {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
  }
}
/* One-time credentials after the supervisor completes focus topics. */
.ah-process-credentials-dialog {
  width: min(38rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - var(--ah-space-6));
}

.ah-process-credentials-dialog__panel {
  display: grid;
  gap: var(--ah-space-4);
  padding: var(--ah-space-5);
  line-height: var(--ah-line-height-relaxed);
}

.ah-process-credentials-dialog__panel > p {
  margin: 0;
}

.ah-process-credentials-dialog__header {
  display: flex;
  align-items: flex-start;
  gap: var(--ah-space-3);
}

.ah-process-credentials-dialog__header h2 {
  flex: 1;
  margin: 0;
  color: var(--ah-color-text);
  font-size: var(--ah-font-size-lg);
  font-weight: var(--ah-font-weight-semibold);
  line-height: var(--ah-line-height-tight);
  overflow-wrap: anywhere;
}

.ah-process-credentials-dialog
  .ah-process-credentials-dialog__header
  .ah-button[data-acherhof-process-dismiss] {
  flex: none;
  width: var(--ah-control-height-sm);
  padding: var(--ah-space-2);
}

.ah-process-credentials-dialog.ah-modal .ah-button.ah-button--secondary,
.ah-process-credentials-dialog.ah-modal
  .ah-button.ah-button--secondary:disabled {
  background: var(--ah-color-surface);
  border-color: var(--ah-color-border);
  color: var(--ah-color-text);
}

.ah-process-credentials-dialog.ah-modal
  .ah-button.ah-button--secondary:enabled:hover {
  background: var(--ah-color-surface-muted);
  border-color: var(--ah-color-border-strong);
  color: var(--ah-color-text);
}

.ah-process-credentials-dialog__confirmation {
  display: flex;
  align-items: flex-start;
  gap: var(--ah-space-3);
  cursor: pointer;
}

.ah-process-credentials-dialog__confirmation input {
  flex: none;
  margin-top: var(--ah-space-1);
  accent-color: var(--ah-color-primary);
}

.ah-process-credentials-dialog__warning {
  color: var(--ah-color-warning-text);
}

.ah-process-credentials-dialog__warning:empty {
  position: absolute;
  margin: 0;
}

.ah-process-credentials-dialog .ah-process-credentials-card {
  margin: 0;
  padding: var(--ah-space-4);
}

.ah-process-credentials-dialog .ah-process-credentials-card dl {
  gap: var(--ah-space-3) var(--ah-space-4);
  line-height: var(--ah-line-height-relaxed);
}

.ah-process-credentials-dialog .ah-process-credentials-card dt {
  font-weight: var(--ah-font-weight-semibold);
}

.ah-process-credentials-dialog .ah-process-credentials-card dd {
  color: var(--ah-color-text);
  font-weight: var(--ah-font-weight-normal);
}

.ah-process-credentials-dialog [data-acherhof-process-password] {
  font-weight: var(--ah-font-weight-bold);
}

.ah-process-credentials-dialog a[data-acherhof-handoff-login_url] {
  color: var(--ah-color-primary);
}

.ah-process-credentials-dialog a[data-acherhof-handoff-login_url]:hover {
  color: var(--ah-color-primary-hover);
}

.ah-process-credentials-dialog
  a[data-acherhof-handoff-login_url]:focus-visible {
  outline: 3px solid var(--ah-color-focus-ring);
  outline-offset: 2px;
}

.ah-process-credentials-card {
  margin: 1.25rem 0;
  padding: 1.25rem;
  border: var(--ah-border-width) solid var(--ah-color-border);
  border-radius: var(--ah-radius-md);
  background: var(--ah-color-surface);
}

.ah-process-credentials-card dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.65rem 1rem;
  margin: 0;
}

.ah-process-credentials-card dt {
  font-weight: 700;
}

.ah-process-credentials-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ah-process-credentials-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ah-space-3);
}

.ah-process-credentials-print-card {
  display: none;
}

@media (max-width: 480px) {
  .ah-process-credentials-dialog .ah-process-credentials-card dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .ah-process-credentials-dialog__actions .ah-button {
    width: 100%;
  }
}

/* Phase 8B: harmonisierte Standortbestimmung-Einzelseite. */
.single-standortbestimmung .ah-app .ah-assessment-header {
  /* border-bottom: 1px solid var(--ah-color-border); */
  margin-bottom: var(--ah-space-5);
  padding-bottom: var(--ah-space-5);
}

.single-standortbestimmung .ah-app .ah-assessment-header .ah-page-header__main {
  align-items: flex-start;
  gap: var(--ah-space-3);
}

.single-standortbestimmung .ah-app .ah-assessment-header__identity {
  flex: 1 1 auto;
  min-width: 0;
}

.single-standortbestimmung .ah-app .ah-assessment-header__eyebrow {
  color: var(--ah-color-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0 0 var(--ah-space-1);
  text-transform: uppercase;
}

.single-standortbestimmung .ah-app .ah-assessment-header .ah-assessment-title {
  margin: 0;
  overflow-wrap: anywhere;
}

.single-standortbestimmung .ah-app .ah-assessment-header__lock {
  align-items: center;
  color: var(--ah-color-muted);
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  min-height: 2rem;
  width: 2rem;
}

/* Upper workflow orientation; the floating task progress remains independent. */
.single-standortbestimmung .ah-app .ah-assessment-workflow {
  background: var(--ah-color-bg);
  border: 1px solid var(--ah-color-border);
  border-radius: var(--ah-radius-md);
  display: block;
  margin-top: var(--ah-space-4);
  /* max-width: 42rem; */
  padding: var(--ah-space-2) var(--ah-space-3);
}

.single-standortbestimmung .ah-app .ah-assessment-workflow__content {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ah-space-1) var(--ah-space-2);
  min-width: 0;
}

.single-standortbestimmung .ah-app .ah-assessment-workflow__task,
.single-standortbestimmung .ah-app .ah-assessment-workflow__step {
  margin: 0;
  overflow-wrap: anywhere;
}

.single-standortbestimmung .ah-app .ah-assessment-workflow__task {
  color: var(--ah-color-text);
  font-weight: var(--ah-font-weight-semibold);
  line-height: var(--ah-line-height-tight);
  min-width: 0;
}

.single-standortbestimmung .ah-app .ah-assessment-workflow__step {
  color: var(--ah-color-text-muted);
  font-size: var(--ah-font-size-xs);
  line-height: var(--ah-line-height-tight);
  white-space: nowrap;
}

.single-standortbestimmung .ah-app .ah-assessment-workflow__step::before {
  content: "·";
  margin-right: var(--ah-space-2);
}

.single-standortbestimmung .ah-app .ah-task-progress {
  --ah-task-progress: 0%;
  align-items: center;
  background:
    radial-gradient(circle, var(--ah-color-surface) 0 59%, transparent 61%),
    conic-gradient(
      var(--ah-color-primary) 0 var(--ah-task-progress),
      var(--ah-color-border) var(--ah-task-progress) 100%
    );
  border-radius: 50%;
  bottom: max(var(--ah-space-5), env(safe-area-inset-bottom));
  box-shadow: var(--ah-shadow-md);
  color: var(--ah-color-text);
  display: flex;
  font-size: var(--ah-font-size-xs);
  font-variant-numeric: tabular-nums;
  font-weight: var(--ah-font-weight-bold);
  height: 4rem;
  justify-content: center;
  line-height: 1;
  position: fixed;
  right: max(var(--ah-space-5), env(safe-area-inset-right));
  width: 4rem;
  z-index: 30;
}

.single-standortbestimmung .ah-app .ah-task-progress[hidden] {
  display: none;
}

.single-standortbestimmung.ah-has-task-progress .ah-app .ah-action-bar {
  margin-bottom: calc(4rem + var(--ah-space-6));
}

.single-standortbestimmung .ah-app .ah-focus-topics .ah-focus-group__title {
  min-height: 3.25rem;
  padding: var(--ah-space-3) var(--ah-space-4) !important;
}

.single-standortbestimmung
  .ah-app
  .ah-focus-topics
  .ah-focus-group__title:focus-visible {
  outline: 3px solid var(--ah-color-focus-ring);
  outline-offset: -3px;
}

.single-standortbestimmung
  .ah-app
  .ah-focus-topics
  .acf-accordion-content
  > .acf-fields {
  padding: var(--ah-space-3) var(--ah-space-4) !important;
}

.single-standortbestimmung
  .ah-app
  .ah-focus-topics--readonly
  .ah-focus-option__state {
  display: none;
}

.single-standortbestimmung .ah-app .ah-status[data-persistent-status] {
  margin-bottom: var(--ah-space-4);
  padding: var(--ah-space-3) var(--ah-space-4);
}

.single-standortbestimmung .ah-app .ah-focus-completion > .ah-status {
  margin: 0;
  padding: var(--ah-space-3) var(--ah-space-4);
}

.single-standortbestimmung
  .ah-app
  .ah-assessment--focus-completed
  .ah-conversation-date {
  margin-bottom: var(--ah-space-4);
}

.single-standortbestimmung .ah-app .ah-focus-completion {
  margin: 0 0 10rem;
}

.single-standortbestimmung
  .ah-app
  .ah-focus-completion
  > .ah-status
  + .ah-status {
  margin-top: var(--ah-space-3);
}

.single-standortbestimmung
  .ah-app
  .ah-focus-completion
  > .ah-focus-completion__status {
  align-items: flex-start;
  display: flex;
  gap: var(--ah-space-3);
  justify-content: flex-start;
  text-align: left;
}

.single-standortbestimmung .ah-app .ah-focus-completion__status > i {
  flex: 0 0 auto;
  line-height: var(--ah-line-height-normal);
}

.single-standortbestimmung .ah-app .ah-focus-completion__status-content {
  display: grid;
  flex: 1 1 auto;
  gap: var(--ah-space-1);
  justify-items: start;
  min-width: 0;
  text-align: left;
}

.single-standortbestimmung
  .ah-app
  .ah-focus-completion
  > .ah-focus-completion__status
  .ah-focus-completion__status-content
  > h2 {
  margin: 0;
}

.single-standortbestimmung
  .ah-app
  .ah-focus-completion
  > .ah-focus-completion__status--success
  .ah-focus-completion__status-content
  > h2 {
  margin-inline: 0;
  text-align: left;
  white-space: normal;
}

.single-standortbestimmung .ah-app .ah-status[data-persistent-status] h2,
.single-standortbestimmung .ah-app .ah-focus-completion > .ah-status h2 {
  font-size: 1rem;
  line-height: var(--ah-line-height-normal);
  margin: 0 0 var(--ah-space-1);
  text-align: left;
}

.single-standortbestimmung .ah-app .ah-status[data-persistent-status] p,
.single-standortbestimmung .ah-app .ah-focus-completion > .ah-status p {
  margin: 0;
}

.single-standortbestimmung
  .ah-app
  .ah-focus-completion
  > .ah-focus-completion__status--success {
  background: var(--ah-color-success-surface);
  border-left-color: var(--ah-color-success-border);
  color: var(--ah-color-success-text);
}

.single-standortbestimmung
  .ah-app
  .ah-focus-completion
  > .ah-focus-completion__test-mode {
  background: var(--ah-color-warning-surface);
  border-left-color: var(--ah-color-warning-border);
  color: var(--ah-color-warning-text);
}

.single-standortbestimmung
  .ah-app
  .ah-focus-completion
  > .ah-focus-completion__actions {
  align-items: center;
  justify-content: flex-start;
  margin-top: var(--ah-space-4);
}

.single-standortbestimmung
  .ah-app
  .ah-assessment--focus-completed
  .ah-focus-topics--readonly
  > .ah-focus-readonly__heading {
  gap: var(--ah-space-3);
  margin-bottom: var(--ah-space-3);
}

.single-standortbestimmung
  .ah-app
  .ah-focus-completion__actions
  .ah-action-bar__navigation {
  flex: 0 0 auto;
}

.single-standortbestimmung
  .ah-app
  .ah-focus-completion__actions
  .ah-action-bar__navigation
  .back_button {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--ah-color-text-muted);
  font-weight: var(--ah-font-weight-medium);
  justify-content: flex-start;
  min-height: var(--ah-control-height);
  padding: var(--ah-space-2) 0;
  width: auto;
  column-gap: 0.5rem;
}

.single-standortbestimmung
  .ah-app
  .ah-focus-completion__actions
  .ah-action-bar__navigation
  .back_button:hover {
  background: transparent;
  color: var(--ah-color-primary-hover);
}

.single-standortbestimmung
  .ah-app
  .ah-focus-completion__actions
  .ah-action-bar__actions {
  flex: 0 1 auto;
  min-width: 0;
}

.single-standortbestimmung
  .ah-app
  .ah-focus-completion__actions
  .ah-action-bar__actions
  form {
  margin: 0;
}

.single-standortbestimmung .ah-app .ah-action-bar {
  background: var(--ah-color-bg);
  border-top: 1px solid var(--ah-color-border);
  border-radius: var(--ah-radius-md);
  margin-top: var(--ah-space-5);
  padding: var(--ah-space-4);
  position: static;
}

.single-standortbestimmung .ah-app .ah-assessment-action-bar {
  background: var(--ah-color-surface);
  border: 1px solid var(--ah-color-border);
  border-radius: var(--ah-radius-md);
  flex-wrap: nowrap;
  max-width: 100%;
  min-width: 0;
}

.single-standortbestimmung
  .ah-app
  .ah-assessment-action-bar
  .ah-action-bar__navigation {
  flex: 0 0 auto;
  min-width: 0;
}

.single-standortbestimmung
  .ah-app
  .ah-action-bar
  .back_button:not([data-acherhof-print-mode]) {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--ah-color-text-muted);
  display: inline-flex;
  font: inherit;
  font-weight: var(--ah-font-weight-medium);
  gap: var(--ah-space-2);
  justify-content: flex-start;
  min-height: var(--ah-control-height);
  padding: 0;
  text-decoration: none;
  width: auto;
}

.single-standortbestimmung
  .ah-app
  .ah-action-bar
  .back_button:not([data-acherhof-print-mode]):hover {
  background: transparent;
  color: var(--ah-color-primary-hover);
  text-decoration: none;
}

.single-standortbestimmung
  .ah-app
  .ah-action-bar
  .back_button:not([data-acherhof-print-mode]):focus-visible {
  outline: 3px solid var(--ah-color-focus-ring);
  outline-offset: 2px;
}

.single-standortbestimmung
  .ah-app
  .ah-assessment-action-bar
  .ah-action-bar__summary {
  background: transparent;
  border: 0;
  color: var(--ah-color-text-muted);
  font-weight: var(--ah-font-weight-normal);
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 0;
  white-space: normal;
}

.single-standortbestimmung
  .ah-app
  .ah-assessment-action-bar
  .ah-action-bar__actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  min-width: 0;
}

.single-standortbestimmung
  .ah-app
  .ah-assessment-action-bar
  .ah-action-bar__actions
  .acf-form-submit {
  align-items: center;
  display: flex;
}

.single-standortbestimmung
  .ah-app
  .ah-assessment-action-bar
  .ah-action-bar__actions
  #save_status_closed {
  background: var(--ah-color-surface);
  border-color: var(--ah-color-border-strong);
  color: var(--ah-color-text);
}

.single-standortbestimmung
  .ah-app
  .ah-assessment-action-bar
  .ah-action-bar__actions
  #save_status_closed:hover {
  background: var(--ah-color-surface-muted);
  border-color: var(--ah-color-primary);
  color: var(--ah-color-primary-hover);
}

.single-standortbestimmung .ah-app .close_button {
  appearance: none;
  background: transparent;
  border: 0;
  color: currentColor;
  cursor: pointer;
  line-height: 1;
  padding: var(--ah-space-2);
}

.single-standortbestimmung .ah-app #message.updated {
  left: auto;
  position: relative;
  top: auto;
  transform: none;
  z-index: auto;
}

.single-standortbestimmung .ah-app #message.updated .close_button {
  right: var(--ah-space-2);
  top: var(--ah-space-2);
}

.single-standortbestimmung .ah-app .close_button:focus-visible {
  outline: 3px solid var(--ah-color-focus-ring);
  outline-offset: 2px;
}

/* Altes Aufgaben-Overlay bleibt auf der Einzelseite auch bei Fremd-Markup inaktiv. */
.single-standortbestimmung .ah-app .donut-wrapper,
.single-standortbestimmung .ah-app #specificChart {
  display: none !important;
}

.single-standortbestimmung .ah-app .meta-header {
  flex-wrap: wrap;
}

/* Keep the result wrapper layout-neutral outside the mobile list. */
.single-standortbestimmung .ah-assessment-result > .ah-rating-table {
  display: contents;
}

.single-standortbestimmung
  .punktetabelle
  :is(.ah-rating-person, .ah-rating-mobile-label) {
  display: none;
}

@media print {
  .single-standortbestimmung .ah-rating-table .punktetabelle thead {
    /* The original header was part of tbody and did not repeat on printed pages. */
    display: table-row-group;
  }
}

.single-standortbestimmung .ah-app .punktetabelle {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  width: 100%;
}

.single-standortbestimmung .ah-app .punktetabelle .kompetenz,
.single-standortbestimmung .ah-app .punktetabelle .anmerkung {
  /* Keep markers and their margins inside the cells to avoid vertical overflow in Firefox. */
  vertical-align: top;
}

.single-standortbestimmung .ah-app .punktetabelle .anmerkung > .sub,
.single-standortbestimmung .ah-app .punktetabelle .anmerkung > .sup,
.single-standortbestimmung .ah-app .punktetabelle .kompetenz > .sub,
.single-standortbestimmung .ah-app .punktetabelle .kompetenz > .sup {
  box-sizing: border-box;
  padding: var(--ah-space-1);
  margin: var(--ah-space-1) auto;
}

@media (max-width: 52.5rem) {
  .single-standortbestimmung
    .ah-app
    .ah-assessment-header
    .ah-page-header__main {
    flex-wrap: wrap;
  }

  .single-standortbestimmung .ah-app .ah-assessment-workflow {
    max-width: 100%;
  }

  .single-standortbestimmung .ah-app .ah-action-bar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .single-standortbestimmung .ah-app .ah-rating-card__title {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 40rem) {
  .single-standortbestimmung .ah-app .ah-task-progress {
    bottom: max(var(--ah-space-4), env(safe-area-inset-bottom));
    height: 3.75rem;
    right: max(var(--ah-space-4), env(safe-area-inset-right));
    width: 3.75rem;
  }

  .single-standortbestimmung.ah-has-task-progress .ah-app .ah-action-bar {
    margin-bottom: calc(3.75rem + var(--ah-space-6));
  }

  .single-standortbestimmung .ah-app .ah-action-bar {
    flex-direction: column;
  }

  .single-standortbestimmung .ah-app .ah-action-bar > *,
  .single-standortbestimmung .ah-app .ah-action-bar .back_button,
  .single-standortbestimmung .ah-app .ah-action-bar #save_status_closed,
  .single-standortbestimmung .ah-app .ah-action-bar .acf-form-submit,
  .single-standortbestimmung .ah-app .ah-action-bar input[type="submit"] {
    width: 100%;
  }

  .single-standortbestimmung
    .ah-app
    .ah-assessment-action-bar
    > .ah-action-bar__navigation,
  .single-standortbestimmung
    .ah-app
    .ah-assessment-action-bar
    > .ah-action-bar__summary,
  .single-standortbestimmung
    .ah-app
    .ah-assessment-action-bar
    > .ah-action-bar__actions {
    width: 100%;
  }

  .single-standortbestimmung
    .ah-app
    .ah-assessment-action-bar
    .ah-action-bar__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .single-standortbestimmung
    .ah-app
    .ah-assessment-action-bar
    .ah-action-bar__navigation
    .back_button {
    width: auto;
  }

  .single-standortbestimmung
    .ah-app
    .ah-assessment-action-bar
    #save_status_closed,
  .single-standortbestimmung .ah-app .ah-assessment-action-bar .acf-form-submit,
  .single-standortbestimmung
    .ah-app
    .ah-assessment-action-bar
    input[type="submit"] {
    box-sizing: border-box;
    width: 100%;
  }

  .single-standortbestimmung
    .ah-app
    .ah-assessment-action-bar
    .acf-form-submit {
    flex-wrap: wrap;
  }

  .single-standortbestimmung
    .ah-app
    .ah-focus-completion__actions
    > .ah-action-bar__navigation,
  .single-standortbestimmung
    .ah-app
    .ah-focus-completion__actions
    > .ah-action-bar__actions {
    width: 100%;
  }

  .single-standortbestimmung
    .ah-app
    .ah-focus-completion__actions
    .ah-action-bar__navigation
    .back_button {
    width: auto;
  }

  .single-standortbestimmung
    .ah-app
    .ah-focus-completion__actions
    .ah-action-bar__actions {
    align-items: stretch;
  }

  .single-standortbestimmung
    .ah-app
    .ah-focus-completion__actions
    .ah-action-bar__actions,
  .single-standortbestimmung
    .ah-app
    .ah-focus-completion__actions
    .ah-action-bar__actions
    form,
  .single-standortbestimmung
    .ah-app
    .ah-focus-completion__actions
    .ah-action-bar__actions
    .ah-button {
    width: 100%;
  }

  .single-standortbestimmung .ah-app .ah-rating-scale__ticks {
    font-size: 0.65rem;
  }
}

@media print {
  body.ah-process-credentials-printing
    > *:not(.ah-process-credentials-print-card) {
    display: none !important;
  }

  body.ah-process-credentials-printing .ah-process-credentials-print-card {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 170mm;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    font-family: var(--ah-font-base);
    font-size: 11pt;
    line-height: var(--ah-line-height-normal);
    break-inside: avoid;
  }

  body.ah-process-credentials-printing .ah-process-credentials-print-card,
  body.ah-process-credentials-printing .ah-process-credentials-print-card *,
  body.ah-process-credentials-printing
    .ah-process-credentials-print-card::before,
  body.ah-process-credentials-printing
    .ah-process-credentials-print-card::after,
  body.ah-process-credentials-printing
    .ah-process-credentials-print-card
    dl::before {
    color: #000 !important;
    background: #fff !important;
    box-shadow: none;
    text-shadow: none;
  }

  /* Print-only document copy; keep the shared handoff markup and JS unchanged. */
  body.ah-process-credentials-printing
    .ah-process-credentials-print-card::before {
    content: "AH! STANDORT";
    display: block;
    margin-bottom: var(--ah-space-2);
    font-family: var(--ah-font-heading);
    font-size: 10pt;
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  body.ah-process-credentials-printing .ah-process-credentials-print-card dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--ah-space-2) var(--ah-space-5);
    margin: 0;
    line-height: inherit;
  }

  body.ah-process-credentials-printing
    .ah-process-credentials-print-card
    dl::before {
    content: "Zugangsdaten";
    grid-column: 1 / -1;
    margin-bottom: var(--ah-space-3);
    font-family: var(--ah-font-heading);
    font-size: 18pt;
    font-weight: 700;
    line-height: var(--ah-line-height-tight);
  }

  body.ah-process-credentials-printing .ah-process-credentials-print-card dt,
  body.ah-process-credentials-printing .ah-process-credentials-print-card dd {
    margin: 0;
    padding: 0;
    line-height: inherit;
  }

  body.ah-process-credentials-printing .ah-process-credentials-print-card dt {
    font-weight: var(--ah-font-weight-medium);
  }

  body.ah-process-credentials-printing .ah-process-credentials-print-card dd {
    min-width: 0;
    font-weight: var(--ah-font-weight-normal);
    overflow-wrap: anywhere;
  }

  body.ah-process-credentials-printing
    .ah-process-credentials-print-card
    [data-acherhof-process-password] {
    font-weight: 700;
  }

  body.ah-process-credentials-printing .ah-process-credentials-print-card a,
  body.ah-process-credentials-printing
    .ah-process-credentials-print-card
    a:visited {
    color: #000 !important;
    text-decoration: none;
  }

  body.ah-process-credentials-printing
    .ah-process-credentials-print-card::after {
    content: "Diese Zugangsdaten sind für die persönliche Übergabe bestimmt.";
    display: block;
    margin-top: var(--ah-space-5);
    font-size: 9pt;
    line-height: var(--ah-line-height-normal);
  }
}

/* Completed results and administrative supplements; active ACF tasks keep their skin. */
@media screen {
  .single-standortbestimmung .ah-assessment-result {
    display: grid;
    gap: var(--ah-space-5);
    min-width: 0;
  }

  .single-standortbestimmung .ah-assessment-result {
    color: var(--ah-color-text);
    font-size: var(--ah-font-size-md);
  }

  .single-standortbestimmung
    .ah-assessment-result
    :is(h2, h3, .meta-header, .radar-chart, .situation) {
    margin: 0;
    min-width: 0;
  }

  .single-standortbestimmung .ah-assessment-result .meta-header {
    display: grid;
    gap: var(--ah-space-2) var(--ah-space-3);
    grid-template-columns: auto minmax(0, 1fr);
    overflow-wrap: anywhere;
    padding: 0;
  }

  .single-standortbestimmung .ah-assessment-result .meta-header .row {
    display: contents;
  }

  .single-standortbestimmung
    .ah-assessment-result
    .meta-header
    .column:nth-child(odd) {
    color: var(--ah-color-text-muted);
    padding: 0;
  }

  .single-standortbestimmung .ah-assessment-result .radar-chart {
    justify-self: center;
    max-width: 42rem;
    padding: 0;
    width: 100%;
  }

  .single-standortbestimmung .ah-result-disclosure > summary > h2 {
    font-size: var(--ah-font-size-md);
    line-height: inherit;
    margin: 0;
  }

  .single-standortbestimmung .ah-result-disclosure .ah-disclosure__content {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .single-standortbestimmung .ah-result-table-scroll {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
  }

  .single-standortbestimmung .ah-result-table-scroll:focus-visible {
    outline: 2px solid var(--ah-color-primary);
    outline-offset: -2px;
  }

  .single-standortbestimmung .acherhof-snapshot-details__ratings :is(th, td) {
    border: 0;
    padding: var(--ah-space-2) var(--ah-space-3);
    vertical-align: top;
  }

  .single-standortbestimmung .acherhof-snapshot-details__ratings th {
    border-bottom: 1px solid var(--ah-color-border-strong);
    font-size: var(--ah-font-size-sm);
    overflow-wrap: normal;
  }

  .single-standortbestimmung
    .acherhof-snapshot-details__ratings
    tbody
    tr:not(:last-child)
    td {
    border-bottom: 1px solid var(--ah-color-border);
  }

  .single-standortbestimmung
    :is(
      .acherhof-snapshot-status,
      .acherhof-audit-identity-summary,
      .acherhof-audit-timeline
    ) {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--ah-color-text);
    font-size: var(--ah-font-size-md);
    margin: var(--ah-space-4) 0 0;
    min-width: 0;
    padding: 0;
  }

  .single-standortbestimmung .acherhof-snapshot-status {
    display: grid;
    gap: var(--ah-space-3);
  }

  .single-standortbestimmung .acherhof-snapshot-status > :is(h2, p) {
    margin: 0;
  }

  .single-standortbestimmung .acherhof-snapshot-status > p,
  .single-standortbestimmung .acherhof-audit-timeline__meta {
    color: var(--ah-color-text-muted);
    font-size: var(--ah-font-size-sm);
  }

  .single-standortbestimmung .acherhof-snapshot-details {
    border: 0;
    margin: 0;
    padding: 0;
  }

  .single-standortbestimmung
    .acherhof-snapshot-history
    .acherhof-snapshot-details
    > h3 {
    display: none;
  }

  .single-standortbestimmung .acherhof-snapshot-details__ratings {
    font-size: var(--ah-font-size-md);
    min-width: 42rem;
  }

  .single-standortbestimmung .acherhof-audit-timeline__list {
    display: grid;
    gap: var(--ah-space-3);
    margin: 0;
  }

  .single-standortbestimmung .acherhof-audit-timeline__list::before {
    background: var(--ah-color-border);
  }

  .single-standortbestimmung .acherhof-audit-timeline__item {
    gap: var(--ah-space-3);
    margin: 0;
    min-width: 0;
  }

  .single-standortbestimmung .acherhof-audit-timeline__content {
    background: transparent;
    border: 0;
    border-radius: 0;
    min-width: 0;
    padding: 0;
  }

  .single-standortbestimmung .acherhof-audit-timeline__marker {
    background: var(--ah-color-text-muted);
    border-color: var(--ah-color-surface);
    box-shadow: none;
  }

  .single-standortbestimmung
    .acherhof-audit-timeline__item--saved
    .acherhof-audit-timeline__marker {
    background: var(--ah-color-primary);
  }

  .single-standortbestimmung
    .acherhof-audit-timeline__item--closed
    .acherhof-audit-timeline__marker {
    background: var(--ah-color-success-text);
  }

  .single-standortbestimmung
    .acherhof-audit-timeline__item--mail
    .acherhof-audit-timeline__marker {
    background: var(--ah-color-text-muted);
  }

  .single-standortbestimmung
    .acherhof-audit-timeline__item--error
    .acherhof-audit-timeline__marker {
    background: var(--ah-color-danger-text);
  }

  .single-standortbestimmung .acherhof-audit-change--added {
    color: var(--ah-color-success-text);
  }

  .single-standortbestimmung .acherhof-audit-change--removed {
    color: var(--ah-color-danger-text);
  }

  .single-standortbestimmung .acherhof-audit-identity-summary__hints {
    background: var(--ah-color-warning-surface);
    border-color: var(--ah-color-warning-border);
    color: var(--ah-color-warning-text);
  }

  .single-standortbestimmung .acherhof-audit-timeline pre {
    background: var(--ah-color-surface-muted);
    border: 0;
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
  }

  .single-standortbestimmung
    :is(
      .acherhof-snapshot-status,
      .acherhof-audit-timeline,
      .acherhof-audit-identity-summary
    )
    dd {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media screen and (max-width: 40rem) {
  .single-standortbestimmung .ah-result-disclosure > .ah-disclosure__content {
    padding: var(--ah-space-3);
  }

  .single-standortbestimmung .acherhof-snapshot-status dl,
  .single-standortbestimmung .acherhof-audit-changes dl,
  .single-standortbestimmung .acherhof-audit-identity-event {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--ah-space-1);
  }
}

/* New screen disclosures must not hide previously printable content. */
@media print {
  .single-standortbestimmung details.ah-result-disclosure {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .single-standortbestimmung .ah-result-disclosure::details-content {
    content-visibility: visible;
    display: block;
  }

  .single-standortbestimmung .ah-result-disclosure > .ah-disclosure__content {
    display: block !important;
    padding: 0;
  }

  .single-standortbestimmung .ah-result-disclosure > summary {
    background: transparent;
    border: 0;
    padding: 0;
  }

  .single-standortbestimmung .ah-result-disclosure > summary::after {
    content: none;
  }

  .single-standortbestimmung .acherhof-snapshot-history > summary {
    display: none;
  }

  body.single-standortbestimmung.print_verlauf
    .acherhof-audit-timeline
    > .ah-result-disclosure
    > summary {
    display: block !important;
  }

  .single-standortbestimmung .ah-result-table-scroll {
    overflow: visible;
  }
}

/* Single assessment: screen-only mobile corrections, leaving desktop and print intact. */
@media screen and (max-width: 40rem) {
  /* One data/rendering path: the native table becomes a compact visual list.
   * Explicit table roles and clipped column headers retain the accessible context. */
  .single-standortbestimmung .ah-assessment-result > .ah-rating-table {
    display: block;
    min-width: 0;
    max-width: 100%;
  }

  .single-standortbestimmung .ah-app .ah-rating-table > .punktetabelle {
    position: relative;
    display: block;
    table-layout: auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
    background: var(--ah-color-surface);
    font-size: var(--ah-font-size-md);
    line-height: var(--ah-line-height-normal);
  }

  .single-standortbestimmung .ah-rating-table .punktetabelle thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .single-standortbestimmung .ah-rating-table .punktetabelle tbody {
    display: block;
    width: 100%;
  }

  .single-standortbestimmung .ah-rating-table .punktetabelle tbody > tr {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--ah-space-2);
    padding: var(--ah-space-4) 0;
  }

  .single-standortbestimmung .ah-rating-table .punktetabelle tbody > tr + tr {
    border-top: var(--ah-border-width) solid var(--ah-color-border);
  }

  .single-standortbestimmung .ah-app .ah-rating-table .punktetabelle tr > td {
    display: block;
    min-width: 0;
    width: auto;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: none;
    text-align: left;
  }

  .single-standortbestimmung .ah-app .ah-rating-table .punktetabelle .legende {
    grid-column: 1;
    grid-row: 1;
    padding-top: var(--ah-space-1);
  }

  .single-standortbestimmung .ah-rating-table .punktetabelle .kompetenz {
    grid-column: 2;
    grid-row: 1;
    font-weight: var(--ah-font-weight-semibold);
  }

  .single-standortbestimmung
    .ah-app
    .ah-rating-table
    .punktetabelle
    .kompetenz
    > span {
    display: block;
    margin: 0;
    line-height: var(--ah-line-height-normal);
  }

  .single-standortbestimmung .ah-app .ah-rating-table .punktetabelle .punkte {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    gap: var(--ah-space-1);
  }

  .single-standortbestimmung .ah-app .ah-rating-table .punktetabelle .bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: baseline;
    gap: var(--ah-space-2);
    box-sizing: border-box;
    /* Override the desktop inline percentage bar width only for the mobile name/value row. */
    width: 100% !important;
    height: auto;
    min-width: 0;
    padding: var(--ah-space-1) var(--ah-space-2);
    font-size: var(--ah-font-size-md);
    font-weight: var(--ah-font-weight-semibold);
    line-height: var(--ah-line-height-normal);
    text-align: left;
  }

  .single-standortbestimmung .ah-rating-table .punktetabelle .ah-rating-person {
    display: block;
    font-size: var(--ah-font-size-sm);
    font-weight: var(--ah-font-weight-normal);
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .single-standortbestimmung .ah-rating-table .punktetabelle .kompetenzbereich {
    grid-column: 2;
    grid-row: 3;
    color: var(--ah-color-text-muted);
    font-size: var(--ah-font-size-sm);
  }

  .single-standortbestimmung .ah-rating-table .punktetabelle .anmerkung {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .single-standortbestimmung
    .ah-app
    .ah-rating-table
    .punktetabelle
    .anmerkung:empty {
    display: none;
  }

  .single-standortbestimmung
    .ah-rating-table
    .punktetabelle
    .ah-rating-mobile-label {
    display: block;
    margin-bottom: var(--ah-space-2);
    color: var(--ah-color-text-muted);
    font-size: var(--ah-font-size-sm);
  }

  .single-standortbestimmung
    .ah-app
    .ah-rating-table
    .punktetabelle
    .anmerkung
    > :is(.sub, .sup) {
    margin: 0;
    padding: var(--ah-space-2);
    line-height: var(--ah-line-height-normal);
  }

  .single-standortbestimmung
    .ah-app
    .ah-rating-table
    .punktetabelle
    .anmerkung
    > :is(.sub, .sup)
    + :is(.sub, .sup) {
    margin-top: var(--ah-space-2);
  }

  body.single-standortbestimmung {
    width: calc(100% - 2 * var(--ah-space-4));
  }

  /* The global header carries an 8rem desktop margin and a 44px mobile logo. */
  .single-standortbestimmung #header.ah-site-header {
    margin-bottom: var(--ah-space-5);
  }
  .single-standortbestimmung #header.ah-site-header .ah-site-header__bar {
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: var(--ah-space-2);
    padding: var(--ah-space-2);
  }
  .single-standortbestimmung
    #header.ah-site-header
    #site-title
    .ah-brand__logo {
    width: clamp(6.5rem, 32vw, 8rem);
    max-width: 8rem;
    height: auto;
  }
  .single-standortbestimmung #header.ah-site-header .ah-brand__link {
    display: flex;
  }
  .single-standortbestimmung
    #header.ah-site-header
    .ah-brand__text
    #site-description {
    display: none;
  }
  .single-standortbestimmung #header.ah-site-header #current_user.ah-user-menu {
    min-width: 0;
    justify-self: end;
    max-width: 100%;
  }
  .single-standortbestimmung #header.ah-site-header .ah-user-menu__button {
    gap: var(--ah-space-1);
    padding: var(--ah-space-1);
    min-height: var(--ah-control-height);
    min-width: 0;
    max-width: 100%;
  }

  .single-standortbestimmung #primary.ah-app {
    margin-top: 0;
  }
  .single-standortbestimmung .ah-app > #content.ah-page.ah-card {
    display: flex;
    flex-direction: column;
    padding: var(--ah-space-3);
  }
  .single-standortbestimmung .ah-app .ah-assessment-header {
    margin-bottom: var(--ah-space-5);
    padding-bottom: 0;
  }
  .single-standortbestimmung
    .ah-app
    .ah-assessment-header
    .ah-page-header__main {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: var(--ah-space-2);
  }
  .single-standortbestimmung
    .ah-app
    .ah-assessment-header
    .ah-assessment-title {
    font-size: var(--ah-font-size-xl);
    line-height: var(--ah-line-height-tight);
    hyphens: none;
  }
  .single-standortbestimmung .ah-app .ah-assessment-header__eyebrow {
    overflow-wrap: anywhere;
  }
  .single-standortbestimmung .ah-app .ah-assessment-workflow {
    margin-top: var(--ah-space-3);
  }

  /* Keep the live status in flow after the content: it cannot cover any controls. */
  .single-standortbestimmung .ah-app .ah-task-progress {
    order: 1;
    position: static;
    inset: auto;
    flex: 0 0 auto;
    align-self: flex-end;
    width: 4rem;
    height: 4rem;
    margin-top: var(--ah-space-5);
    box-shadow: none;
    z-index: auto;
  }
  .single-standortbestimmung.ah-has-task-progress .ah-app .ah-action-bar {
    margin-bottom: 0;
  }

  /* The desktop summary's 16rem flex-basis becomes height in a column. */
  .single-standortbestimmung .ah-app .ah-assessment-action-bar {
    justify-content: flex-start;
    align-items: stretch;
    gap: var(--ah-space-4);
    height: auto;
    min-height: 0;
  }
  .single-standortbestimmung
    .ah-app
    .ah-assessment-action-bar
    > .ah-action-bar__summary {
    flex: 0 0 auto;
  }
  .single-standortbestimmung
    .ah-app
    .ah-assessment-action-bar
    > .ah-action-bar__summary:empty {
    display: none;
  }
  .single-standortbestimmung
    .ah-app
    .ah-assessment-action-bar
    > .ah-task-progress {
    order: 0;
    width: 4rem;
    height: 4rem;
    margin: 0;
    align-self: flex-end;
  }

  /* Step 0's inline date spacing is 4rem; preserve a normal section gap here. */
  .single-standortbestimmung .ah-app .acf-field-6141ea1c65f72 {
    margin-bottom: var(--ah-space-5) !important;
    padding: 0;
    min-width: 0;
  }
  .single-standortbestimmung .ah-app .acf-field-61498788174c3 {
    padding: 0 0 var(--ah-space-4);
    min-width: 0;
  }
  .single-standortbestimmung
    .ah-app
    .acf-field-61498788174c3
    .select2-container {
    max-width: 100%;
  }
  .single-standortbestimmung
    .ah-app
    div[data-key="field_61498788174c3"]
    .acf-input
    .select2.select2-container
    .selection
    .select2-selection.select2-selection--single {
    height: auto;
    font-size: var(--ah-font-size-lg);
  }
  .single-standortbestimmung
    .ah-app
    .acf-field-61498788174c3
    .select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: var(--ah-line-height-normal);
  }
  .single-standortbestimmung
    .ah-app
    .acf-field-6141ea1c65f72
    input[type="text"],
  .single-standortbestimmung
    .ah-app
    .ah-conversation-date__editor
    input[type="datetime-local"] {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding-inline: var(--ah-space-2);
  }
  .single-standortbestimmung .ah-app .ah-conversation-date {
    padding: var(--ah-space-3);
  }
  .single-standortbestimmung .ah-app .ah-conversation-date__editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .single-standortbestimmung .ah-app .ah-conversation-date__editor > * {
    min-width: 0;
  }
  .single-standortbestimmung .ah-app .ah-conversation-date__actions {
    grid-row: 3;
  }

  .single-standortbestimmung .ah-app .ah-focus-topics > .acf-label {
    margin-bottom: var(--ah-space-3);
  }
  .single-standortbestimmung .ah-app .ah-focus-topics .ah-focus-group__title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--ah-space-2);
    min-height: var(--ah-control-height);
    padding: var(--ah-space-3) var(--ah-space-2) !important;
    box-sizing: border-box;
  }
  .single-standortbestimmung
    .ah-app
    .ah-focus-topics
    .ah-focus-group__title
    .acf-accordion-icon {
    position: static;
    float: none;
    transform: none;
    width: 1em;
    font-size: var(--ah-font-size-md);
  }
  .single-standortbestimmung
    .ah-app
    .ah-focus-topics
    .ah-focus-group__title
    label {
    font-size: var(--ah-font-size-md) !important;
    white-space: normal;
    hyphens: none;
    overflow-wrap: anywhere;
  }
  .single-standortbestimmung .ah-app .ah-focus-group__count {
    margin: 0;
    padding: var(--ah-space-1);
  }
  .single-standortbestimmung
    .ah-app
    .ah-focus-topics
    .acf-accordion-content
    > .acf-fields {
    padding: var(--ah-space-2) !important;
  }
  .single-standortbestimmung .ah-app .ah-focus-topics .ah-focus-option__label {
    min-height: 0;
    box-sizing: border-box;
    padding: var(--ah-space-3);
    gap: var(--ah-space-2);
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: none;
  }
  .single-standortbestimmung .ah-app .ah-focus-option__state {
    color: var(--ah-color-text-muted);
    font-size: var(--ah-font-size-xs);
    line-height: var(--ah-line-height-normal);
    margin: var(--ah-space-1) var(--ah-space-3) 0;
  }
}

/* Completion provenance and history: compact summaries, details on demand. */
@media screen {
  .single-standortbestimmung .ah-history-summary {
    display: grid;
    gap: var(--ah-space-1);
  }
  .single-standortbestimmung .ah-history-summary__meta,
  .single-standortbestimmung .ah-history-limit {
    color: var(--ah-color-text-muted);
    font-size: var(--ah-font-size-sm);
    font-weight: 400;
  }
  .single-standortbestimmung .ah-snapshot-overview__meta {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--ah-space-2) var(--ah-space-4);
    margin: var(--ah-space-3) 0;
  }
  .single-standortbestimmung .ah-snapshot-overview__meta dt {
    font-weight: 600;
  }
  .single-standortbestimmung .ah-snapshot-overview__meta dd {
    margin: 0;
  }
  .single-standortbestimmung .ah-audit-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ah-space-2) var(--ah-space-3);
    margin: var(--ah-space-4) 0;
  }
  .single-standortbestimmung .ah-audit-tools select {
    width: auto;
    max-width: 100%;
  }
  .single-standortbestimmung .ah-audit-tools p {
    margin: 0;
  }
  .single-standortbestimmung .acherhof-audit-timeline__list {
    gap: 0;
  }
  .single-standortbestimmung .acherhof-audit-timeline__list::before,
  .single-standortbestimmung .acherhof-audit-timeline__marker {
    display: none;
  }
  .single-standortbestimmung .ah-audit-day {
    color: var(--ah-color-text-muted);
    font-size: var(--ah-font-size-sm);
    font-weight: 600;
    padding: var(--ah-space-4) 0 var(--ah-space-2);
  }
  .single-standortbestimmung
    .acherhof-audit-timeline
    :is(.ah-audit-event, .ah-audit-group__details) {
    margin: 0;
    border-bottom: 1px solid var(--ah-color-border);
  }
  .single-standortbestimmung
    :is(.ah-audit-event, .ah-audit-group__details)
    > summary {
    padding: var(--ah-space-3) var(--ah-space-5) var(--ah-space-3) 0;
    position: relative;
    list-style: none;
    overflow-wrap: anywhere;
  }
  .single-standortbestimmung
    :is(.ah-audit-event, .ah-audit-group__details)
    > summary::-webkit-details-marker {
    display: none;
  }
  .single-standortbestimmung
    :is(.ah-audit-event, .ah-audit-group__details)
    > summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: var(--ah-space-3);
    color: var(--ah-color-text-muted);
  }
  .single-standortbestimmung
    :is(.ah-audit-event, .ah-audit-group__details)[open]
    > summary::after {
    content: "−";
  }
  .single-standortbestimmung .ah-audit-event__title {
    display: block;
    font-weight: 600;
  }
  .single-standortbestimmung .acherhof-audit-timeline__meta {
    margin: var(--ah-space-1) 0 0;
  }
  .single-standortbestimmung
    :is(.ah-audit-event, .ah-audit-group__details)
    > .ah-disclosure__content {
    padding: 0 0 var(--ah-space-3);
  }
  .single-standortbestimmung .ah-audit-group__list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 var(--ah-space-4);
    border-left: 2px solid var(--ah-color-border);
  }
  .single-standortbestimmung .ah-audit-technical > summary {
    color: var(--ah-color-text-muted);
    font-size: var(--ah-font-size-sm);
  }
  .single-standortbestimmung .ah-audit-more {
    margin-top: var(--ah-space-4);
  }
  .single-standortbestimmung .acherhof-audit-timeline [hidden] {
    display: none !important;
  }
}
@media screen and (max-width: 40rem) {
  .single-standortbestimmung .ah-snapshot-overview__meta {
    grid-template-columns: minmax(0, 1fr);
  }
  .single-standortbestimmung .ah-audit-tools select {
    width: 100%;
  }
}
@media print {
  /* Filtering/pagination never remove original events from the history print. */
  body.single-standortbestimmung.print_verlauf
    .acherhof-audit-timeline
    [data-audit-id] {
    display: flex !important;
  }
  body.single-standortbestimmung.print_verlauf
    .acherhof-audit-timeline
    .ah-audit-group {
    display: block !important;
  }
  body.single-standortbestimmung.print_verlauf
    .acherhof-audit-timeline
    .acherhof-audit-identity-summary
    > details
    > summary,
  body.single-standortbestimmung.print_verlauf
    .acherhof-audit-timeline
    .ah-audit-event
    > summary {
    display: block !important;
  }
  body.single-standortbestimmung.print_verlauf .ah-audit-group__list {
    display: flex;
    flex-direction: column-reverse;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .single-standortbestimmung
    :is(.ah-audit-tools, .ah-audit-more, .ah-audit-day) {
    display: none !important;
  }
  .single-standortbestimmung .ah-history-summary__meta {
    display: block;
    font-size: 9pt;
    font-weight: 400;
  }
}

/* Lower read-only navigation; editing action bars and print styles stay unchanged. */
@media screen {
  .single-standortbestimmung .ah-app .ah-action-bar.ah-action-bar--footer {
    align-items: flex-start;
    background: var(--ah-color-surface-muted);
    border: var(--ah-border-width) solid var(--ah-color-border);
    border-radius: var(--ah-radius-md);
    justify-content: flex-start;
    padding: var(--ah-space-4);
  }

  .single-standortbestimmung
    .ah-app
    .ah-action-bar--footer
    .back_button:not([data-acherhof-print-mode]) {
    box-sizing: border-box;
    color: var(--ah-color-primary);
    font-size: var(--ah-font-size-md);
    font-weight: var(--ah-font-weight-normal);
    gap: var(--ah-space-2);
    line-height: var(--ah-line-height-normal);
    max-width: 100%;
    min-height: var(--ah-control-height);
    overflow-wrap: anywhere;
    text-align: left;
    white-space: normal;
    width: auto;
  }

  .single-standortbestimmung
    .ah-app
    .ah-action-bar--footer
    .back_button:not([data-acherhof-print-mode]):hover {
    color: var(--ah-color-primary-hover);
  }

  .single-standortbestimmung
    .ah-app
    .ah-action-bar--footer
    .back_button:not([data-acherhof-print-mode]):focus-visible {
    outline: 3px solid var(--ah-color-focus-ring);
    outline-offset: 2px;
  }

  .single-standortbestimmung
    .ah-app
    .ah-action-bar--footer
    .back_button:not([data-acherhof-print-mode])
    > .fa-arrow-left {
    flex-shrink: 0;
  }
}
