/* Shared tokens, typography and NHS button rules live in runtime-foundation.css. */
html {
    background: var(--runtime-canvas);
    color: var(--runtime-ink);
    height: 100%;
    overflow: hidden;
}
body {
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

/* Public booking grows the document for normal scrolling and full-page capture.
   The selector follows the active layout, including navigation back to staff UI. */
html:has(.runtime-patient-booking),
body:has(.runtime-patient-booking) {
    height: auto;
    min-height: 100%;
    overflow: visible;
    scroll-padding-block: var(--runtime-space-4);
}

.runtime-report-print-copy {
    display: none;
}

@media print {
    html,
    body {
        height: auto !important;
        overflow: visible !important;
    }

    body.runtime-report-printing {
        background: #fff;
    }

    body.runtime-report-printing > *:not(.runtime-report-print-copy) {
        display: none !important;
    }

    body.runtime-report-printing > .runtime-report-print-copy {
        display: block !important;
        margin: 0 !important;
        max-width: none !important;
        padding: 0 !important;
        width: auto !important;
    }
}

/* Runtime-owned component lists manage their own spacing with gap or component
   layout. Removing the NHS list-item margin also prevents its :last-child
   reset from stretching the final item in flex and grid layouts. */
:is(ul, ol)[class^="runtime-"] > li,
:is(ul, ol)[class*=" runtime-"] > li {
    margin-bottom: 0;
}

/* NHS choice components define the target geometry but not their exterior
   rhythm. Runtime metadata editors also emit consecutive one-item groups, so
   keep both the group boundary and stacked items visibly separated. */
:is(.nhsuk-checkboxes, .nhsuk-radios) {
    margin-block: var(--runtime-space-3);
}

:is(.nhsuk-checkboxes, .nhsuk-radios) +
    :is(.nhsuk-checkboxes, .nhsuk-radios) {
    margin-block-start: 0;
}

.nhsuk-checkboxes__item + .nhsuk-checkboxes__item,
.nhsuk-radios:not(.nhsuk-radios--inline) >
    .nhsuk-radios__item + .nhsuk-radios__item {
    margin-top: var(--runtime-space-2);
}

a {
    color: var(--runtime-heading);
}

a:hover {
    color: #002f5d;
}

.nhsuk-breadcrumb {
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: var(--runtime-space-2);
    padding-top: var(--runtime-space-2);
}


.runtime-skip-link {
    background: var(--runtime-focus);
    color: #000;
    font-weight: 700;
    left: .75rem;
    padding: .75rem 1rem;
    position: absolute;
    top: -5rem;
    z-index: 1001;
}

.runtime-skip-link:focus {
    top: .75rem;
}

.runtime-shell {
    display: flex;
    flex-direction: column;
    height: var(--runtime-workspace-viewport-height);
    min-height: 0;
    overflow: hidden;
    width: var(--runtime-workspace-viewport-width);
}


.runtime-header {
    align-items: center;
    background: var(--runtime-surface);
    border-bottom: 4px solid var(--runtime-shell-accent);
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    padding: 1rem clamp(1rem, 4vw, 5rem);
}

.runtime-shell--compact-header .runtime-header {
    min-height: 4.75rem;
    padding-block: .75rem;
}

.runtime-shell--compact-header .runtime-brand__nhs-logo {
    height: 2rem;
    width: 5rem;
}

.runtime-brand {
    align-items: center;
    display: inline-flex;
    gap: .75rem;
    text-decoration: none;
}

.runtime-brand__nhs-logo {
    color: var(--runtime-brand);
    height: 2.25rem;
    width: 5.625rem;
}

.runtime-brand__name {
    color: #000;
    display: grid;
    font-size: 1rem;
    line-height: 1.15;
}

.runtime-brand__name strong {
    font-size: 1.125rem;
}

.runtime-header__account {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    justify-content: flex-end;
}

.runtime-recent-records {
    position: relative;
}

.runtime-recent-records > summary {
    align-items: center;
    border-radius: .25rem;
    color: var(--runtime-heading);
    cursor: pointer;
    display: inline-flex;
    font-size: .875rem;
    font-weight: 700;
    gap: .4rem;
    min-height: 2.25rem;
    padding: .35rem .55rem;
    user-select: none;
}

.runtime-recent-records > summary::-webkit-details-marker {
    display: none;
}

.runtime-recent-records > summary::marker {
    content: "";
}

.runtime-recent-records > summary:hover,
.runtime-recent-records[open] > summary {
    background: var(--runtime-accent-soft);
}

.runtime-recent-records[open] > summary {
    visibility: hidden;
}

.runtime-recent-records > summary:focus-visible {
    background: var(--runtime-focus);
    box-shadow: 0 0 0 3px var(--runtime-focus);
    color: var(--runtime-focus-text);
    outline: 2px solid transparent;
}

.runtime-recent-records__count {
    align-items: center;
    background: var(--runtime-accent-dark);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: .6875rem;
    height: 1.25rem;
    justify-content: center;
    min-width: 1.25rem;
    padding-inline: .25rem;
}

.runtime-recent-records__panel {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    box-shadow: 0 14px 36px rgb(23 43 58 / 24%);
    max-height: min(34rem, calc(var(--runtime-workspace-viewport-height) - 6rem));
    overflow-y: auto;
    padding: .85rem;
    position: absolute;
    right: 0;
    top: 0;
    width: min(30rem, calc(var(--runtime-workspace-viewport-width) - 1rem));
    z-index: 1200;
}

.runtime-recent-records__panel header {
    align-items: center;
    border-bottom: 1px solid var(--runtime-border);
    box-sizing: border-box;
    display: flex;
    gap: var(--runtime-space-2);
    justify-content: space-between;
    margin-bottom: .35rem;
    min-height: 2.25rem;
    padding: .1rem .25rem .8rem;
}

.runtime-recent-records__panel h2 {
    font-size: 1.25rem;
    margin: .1rem 0 0;
}

.runtime-recent-records__close {
    align-items: center;
    background: transparent;
    border: 2px solid var(--runtime-heading);
    border-radius: .25rem;
    color: var(--runtime-heading);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 2.25rem;
    height: 2.25rem;
    justify-content: center;
    padding: 0;
    width: 2.25rem;
}

.runtime-recent-records__close:hover {
    background: var(--runtime-accent-soft);
}

.runtime-recent-records__close:focus-visible {
    background: var(--runtime-focus);
    box-shadow: 0 0 0 3px var(--runtime-focus);
    color: var(--runtime-focus-text);
    outline: 2px solid transparent;
}

.runtime-recent-records__panel ul {
    display: grid;
    gap: .5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-recent-records__panel li + li {
    border-top: 0;
}

.runtime-compact-record-surface {
    --runtime-compact-record-accent: var(--runtime-accent);
    align-items: start;
    background: color-mix(in srgb, var(--runtime-compact-record-accent) 5%, #fff);
    border: 1px solid color-mix(in srgb, var(--runtime-compact-record-accent) 34%, var(--runtime-border));
    border-left: .25rem solid var(--runtime-compact-record-accent);
    border-radius: .3rem;
    box-shadow: 0 2px 5px rgb(23 43 58 / 8%);
    color: var(--runtime-heading);
    display: block;
    padding: .65rem .7rem .65rem .6rem;
    text-decoration: none;
    transition: background-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.runtime-compact-record-surface:hover {
    background: color-mix(in srgb, var(--runtime-compact-record-accent) 11%, #fff);
    box-shadow: 0 5px 12px rgb(23 43 58 / 16%);
    transform: translateY(-1px);
}

.runtime-compact-record-surface:focus-visible {
    background: var(--runtime-focus);
    box-shadow: 0 0 0 3px var(--runtime-focus);
    color: var(--runtime-focus-text);
    outline: 2px solid transparent;
}

.runtime-compact-record-card {
    align-items: start;
    display: grid;
    gap: .65rem;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    min-width: 0;
}

.runtime-compact-record-card--without-icon {
    grid-template-columns: minmax(0, 1fr);
}

.runtime-compact-record-card__icon {
    align-items: center;
    align-self: center;
    background: color-mix(in srgb, var(--runtime-compact-record-accent) 16%, #fff);
    border-radius: .3rem;
    color: color-mix(in srgb, var(--runtime-compact-record-accent) 78%, #000);
    display: inline-flex;
    font-size: 1rem;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.runtime-compact-record-card__content {
    display: grid;
    min-width: 0;
}

.runtime-compact-record-card__heading {
    align-items: baseline;
    display: flex;
    gap: .65rem;
    justify-content: space-between;
    min-width: 0;
}

.runtime-compact-record-card__heading > strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-compact-record-card__heading > strong span,
.runtime-compact-record-card__meta {
    color: var(--runtime-slate);
    font-size: .75rem;
}

.runtime-compact-record-card__meta {
    flex: 0 0 auto;
}

.runtime-compact-record-card__fields {
    border-top: 1px solid color-mix(in srgb, var(--runtime-compact-record-accent) 22%, var(--runtime-border));
    display: grid;
    gap: .2rem;
    margin: .45rem 0 0;
    padding-top: .4rem;
}

.runtime-compact-record-card__fields:empty {
    display: none;
}

.runtime-compact-record-card__fields--without-heading {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.runtime-compact-record-card__fields > div {
    align-items: baseline;
    display: grid;
    gap: .5rem;
    grid-template-columns: minmax(5.5rem, .42fr) minmax(0, 1fr);
}

.runtime-compact-record-card__fields dt,
.runtime-compact-record-card__fields dd {
    font-size: .75rem;
    line-height: 1.25;
    margin: 0;
    min-width: 0;
}

.runtime-compact-record-card__fields dt {
    color: var(--runtime-heading);
    font-weight: 700;
}

.runtime-compact-record-card__fields dd > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-compact-record-surface:focus-visible .runtime-compact-record-card__heading > strong span,
.runtime-compact-record-surface:focus-visible .runtime-compact-record-card__fields dt,
.runtime-compact-record-surface:focus-visible .runtime-compact-record-card__meta {
    color: var(--runtime-focus-text);
}

@media (prefers-reduced-motion: reduce) {
    .runtime-compact-record-surface {
        transition: none;
    }
}

.runtime-recent-records__state {
    color: var(--runtime-slate);
    margin: 0;
    padding: 1rem .25rem .4rem;
}

.runtime-recent-records__state--loading {
    align-items: center;
    display: flex;
    gap: .75rem;
}

.runtime-recent-records__state--loading .runtime-state__indicator {
    flex: 0 0 1.4rem;
}

.runtime-process {
    display: grid;
    gap: 1.25rem;
}

.runtime-process__header {
    align-items: end;
    background:
        radial-gradient(circle at 92% 12%, rgb(0 94 184 / 13%), transparent 32%),
        linear-gradient(135deg, #fff 0%, #f3f8fb 100%);
    border: 1px solid var(--runtime-border);
    border-left: 5px solid var(--runtime-shell-accent);
    border-radius: .4rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: clamp(1.25rem, 3vw, 2rem);
}

.runtime-process__header h1 {
    color: var(--runtime-heading);
    font-size: clamp(1.75rem, 3.2vw, 2.65rem);
    line-height: 1.08;
    margin: .25rem 0 .65rem;
}

.runtime-process__header p:not(.runtime-home-eyebrow) {
    color: var(--runtime-slate);
    margin: 0;
    max-width: 48rem;
}

.runtime-process__metrics {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(4, minmax(5rem, 1fr));
    margin: 0;
}

.runtime-process__metrics div {
    background: rgb(255 255 255 / 82%);
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    min-width: 5.5rem;
    padding: .75rem;
    text-align: center;
}

.runtime-process__metrics dt {
    color: var(--runtime-slate);
    font-size: .75rem;
    font-weight: 700;
    order: 2;
    text-transform: uppercase;
}

.runtime-process__metrics dd {
    color: var(--runtime-heading);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    margin: 0 0 .3rem;
}

.runtime-process__notice {
    align-items: start;
    background: #fff9c4;
    border-left: 5px solid #ffeb3b;
    display: flex;
    gap: .8rem;
    padding: 1rem 1.15rem;
}

.runtime-process__notice > i {
    color: #594d00;
    margin-top: .2rem;
}

.runtime-process__notice p {
    margin: 0;
}

.runtime-process__visual,
.runtime-process__transitions {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .4rem;
    overflow: hidden;
}

.runtime-process__visual:fullscreen {
    background: var(--runtime-surface);
    border: 0;
    border-radius: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: var(--runtime-workspace-viewport-height);
    max-height: none;
    overflow: hidden;
    width: var(--runtime-workspace-viewport-width);
}

.runtime-process__visual:fullscreen .runtime-process__canvas-region {
    height: auto;
    max-height: none;
    min-height: 0;
}

.runtime-process__section-heading {
    align-items: center;
    border-bottom: 1px solid var(--runtime-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.runtime-process__section-heading h2 {
    color: var(--runtime-heading);
    font-size: 1.35rem;
    margin: 0 0 .15rem;
}

.runtime-process__section-heading p,
.runtime-process__section-heading > span {
    color: var(--runtime-slate);
    font-size: .8rem;
    margin: 0;
}

.runtime-process__section-heading > span {
    background: var(--runtime-surface-muted);
    border-radius: 999px;
    font-weight: 700;
    padding: .35rem .65rem;
}

.runtime-process__viewport-controls {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: flex-end;
}

.runtime-process__direction-controls,
.runtime-process__pan-controls,
.runtime-process__zoom-controls {
    align-items: center;
    display: inline-flex;
}

.runtime-process__direction-controls button,
.runtime-process__pan-controls button,
.runtime-process__zoom-controls button,
.runtime-process__viewport-action {
    align-items: center;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    color: var(--runtime-heading);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: .72rem;
    font-weight: 800;
    height: 2.15rem;
    justify-content: center;
    min-width: 2.15rem;
    padding: 0 .55rem;
}

.runtime-process__direction-controls button:first-child,
.runtime-process__pan-controls button:first-child,
.runtime-process__zoom-controls button:first-child {
    border-radius: .25rem 0 0 .25rem;
}

.runtime-process__direction-controls button:last-child,
.runtime-process__pan-controls button:last-child,
.runtime-process__zoom-controls button:last-child {
    border-radius: 0 .25rem .25rem 0;
}

.runtime-process__direction-controls button + button,
.runtime-process__pan-controls button + button,
.runtime-process__zoom-controls > * + * {
    margin-left: -1px;
}

.runtime-process__direction-controls button:hover,
.runtime-process__pan-controls button:hover,
.runtime-process__zoom-controls button:hover,
.runtime-process__viewport-action:hover {
    background: var(--runtime-accent-soft);
    border-color: var(--runtime-accent-dark);
    position: relative;
    z-index: 1;
}

.runtime-process__direction-controls button[aria-pressed="true"] {
    background: var(--runtime-accent-dark);
    border-color: var(--runtime-accent-dark);
    color: #fff;
    position: relative;
    z-index: 1;
}

.runtime-process__direction-controls button:disabled,
.runtime-process__pan-controls button:disabled,
.runtime-process__zoom-controls button:disabled,
.runtime-process__viewport-action:disabled {
    background: #e8edee;
    color: #768692;
    cursor: not-allowed;
}

.runtime-process__zoom-controls output {
    align-items: center;
    background: #f5f8fa;
    border-block: 1px solid var(--runtime-border);
    color: var(--runtime-heading);
    display: inline-flex;
    font-size: .68rem;
    font-weight: 800;
    height: 2.15rem;
    justify-content: center;
    min-width: 3.25rem;
    padding-inline: .35rem;
}

.runtime-process__viewport-action {
    border-radius: .25rem;
    gap: .35rem;
}

.runtime-process__canvas-region {
    background-color: #f5f8fa;
    background-image:
        linear-gradient(rgb(66 84 98 / 6%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(66 84 98 / 6%) 1px, transparent 1px);
    background-size: 24px 24px;
    cursor: grab;
    height: min(42rem, var(--runtime-process-canvas-height));
    max-height: 42rem;
    overflow: hidden;
    overscroll-behavior: contain;
    position: relative;
    touch-action: none;
}

.runtime-process__canvas-region.runtime-drag-scroll--dragging,
.runtime-process__canvas-region.runtime-drag-scroll--dragging * {
    cursor: grabbing;
    user-select: none;
}

.runtime-process__canvas-region:focus-visible {
    box-shadow: inset 0 0 0 4px var(--runtime-focus);
    outline: 2px solid transparent;
}

.runtime-process__canvas {
    position: relative;
    transform-origin: 0 0;
    will-change: transform;
}

.runtime-process__connectors {
    height: 100%;
    inset: 0;
    overflow: visible;
    position: absolute;
    width: 100%;
    z-index: 1;
}

.runtime-process__connector {
    fill: none;
    opacity: .82;
    stroke: var(--runtime-accent-dark);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
}

.runtime-process__connector--conditional {
    stroke-dasharray: 7 4;
}

.runtime-process__connector--return {
    opacity: .68;
    stroke: var(--runtime-slate);
}

#runtime-process-arrow path {
    fill: var(--runtime-accent-dark);
}

#runtime-process-arrow-return path {
    fill: var(--runtime-slate);
}

.runtime-process-node {
    background: var(--runtime-surface);
    border: 1px solid #aeb7bd;
    border-radius: .4rem;
    box-shadow: 0 5px 16px rgb(23 43 58 / 13%);
    box-sizing: border-box;
    cursor: grab;
    position: absolute;
    touch-action: none;
    z-index: 3;
}

.runtime-process-node.runtime-process--dragging,
.runtime-process__canvas-region.runtime-process--dragging {
    cursor: grabbing;
    user-select: none;
}

.runtime-process__canvas-region.runtime-process--item-moving
    .runtime-process__connectors {
    visibility: hidden;
}

.runtime-process-node:focus-visible {
    box-shadow: 0 0 0 4px var(--runtime-focus),
        0 5px 16px rgb(23 43 58 / 13%);
    outline: 2px solid transparent;
}

.runtime-process-node > header {
    background: #e8f1f8;
    border-top: 4px solid var(--runtime-accent-dark);
    border-radius: .35rem .35rem 0 0;
    min-height: 4.5rem;
    padding: .65rem .75rem;
}

.runtime-process-node--start > header {
    align-items: center;
    background: var(--runtime-accent-dark);
    border-top-color: var(--runtime-accent-dark);
    color: #fff;
    display: flex;
    gap: .65rem;
}

.runtime-process-node--start .runtime-process-node__kind {
    color: rgb(255 255 255 / 78%);
    margin-bottom: .18rem;
}

.runtime-process-node__start-icon {
    align-items: center;
    background: rgb(255 255 255 / 18%);
    border-radius: 50%;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.runtime-process-node__kind {
    color: var(--runtime-slate);
    display: block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    margin-bottom: .4rem;
    text-transform: uppercase;
}

.runtime-process-node__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.runtime-process-node__tags .runtime-status-tag {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-status-tag {
    background: #e5e7eb;
    border: 1px solid rgb(33 43 50 / 28%);
    color: #212b32;
    display: inline-flex;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.2;
    padding: .25rem .45rem;
}

.runtime-status-tag--blue { background: #d4e6f6; color: #003d78; }
.runtime-status-tag--green { background: #cce5d8; color: #00401e; }
.runtime-status-tag--yellow { background: #fff3b0; color: #594d00; }
.runtime-status-tag--orange { background: #ffdfbf; color: #6b3200; }
.runtime-status-tag--red { background: #f5d0d0; color: #7c1515; }
.runtime-status-tag--purple { background: #e9d8f3; color: #4c1d62; }
.runtime-status-tag--pink { background: #f7d6e6; color: #6f1946; }
.runtime-status-tag--aquagreen { background: #ccebec; color: #004f52; }
.runtime-status-tag--white { background: #fff; color: #212b32; }
.runtime-status-tag--grey { background: #e5e7eb; color: #35404a; }

.runtime-process-node__body {
    display: grid;
    gap: .55rem;
    padding: .7rem .75rem .75rem;
}

.runtime-process-node__route-count,
.runtime-process-node__no-change-empty {
    color: var(--runtime-slate);
    font-size: .72rem;
    font-weight: 700;
}

.runtime-process-node__route-count {
    align-items: center;
    display: flex;
    gap: .35rem;
}

.runtime-process-node__no-change > button {
    align-items: center;
    background: #f5f7f8;
    border: 1px solid var(--runtime-border);
    border-radius: .25rem;
    color: var(--runtime-heading);
    cursor: pointer;
    display: grid;
    font-size: .72rem;
    font-weight: 800;
    gap: .4rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: .48rem .55rem;
    text-align: left;
    width: 100%;
}

.runtime-process-node__no-change > button:hover {
    background: var(--runtime-accent-soft);
}

.runtime-process-node__chevron,
.runtime-process__no-change-table > summary > i {
    transition: transform 150ms ease;
}

.runtime-process-node__chevron--expanded,
.runtime-process__no-change-table[open] > summary > i {
    transform: rotate(180deg);
}

.runtime-process-node__no-change-panel {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-accent-dark);
    border-radius: .3rem;
    margin-top: .55rem;
    padding: .75rem;
}

.runtime-process-node__no-change-panel > strong {
    color: var(--runtime-heading);
    display: block;
    font-size: .75rem;
    margin-bottom: .45rem;
}

.runtime-process-node__no-change-panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-process-node__no-change-panel li {
    display: grid;
    gap: .18rem;
    padding: .5rem .15rem;
}

.runtime-process-node__no-change-panel li + li {
    border-top: 1px solid var(--runtime-border);
}

.runtime-process-node__no-change-panel li strong {
    color: var(--runtime-heading);
    font-size: .78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-process-node__no-change-panel li span,
.runtime-process-node__no-change-panel li small {
    color: var(--runtime-slate);
    font-size: .7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-process-route {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-accent-dark);
    border-left-width: 4px;
    border-radius: .3rem;
    box-shadow: 0 4px 12px rgb(23 43 58 / 14%);
    display: grid;
    gap: .18rem;
    overflow: hidden;
    padding: .48rem .55rem;
    cursor: grab;
    pointer-events: auto;
    position: absolute;
    touch-action: none;
    z-index: 2;
}

.runtime-process-route.runtime-process--dragging {
    cursor: grabbing;
    user-select: none;
}

.runtime-process-route:focus-visible {
    box-shadow: 0 0 0 4px var(--runtime-focus),
        0 4px 12px rgb(23 43 58 / 14%);
    outline: 2px solid transparent;
}

.runtime-process-route--conditional {
    border-style: dashed;
    border-left-style: solid;
}

.runtime-process-route__form,
.runtime-process-route__condition,
.runtime-process-route__journey {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-process-route__form {
    color: var(--runtime-heading);
    font-size: .78rem;
    font-weight: 800;
}

.runtime-process-route__condition {
    color: var(--runtime-slate);
    font-size: .69rem;
}

.runtime-process-route__journey {
    align-items: center;
    color: var(--runtime-accent-dark);
    display: flex;
    font-size: .62rem;
    font-weight: 800;
    gap: .3rem;
}

.runtime-process-route__journey i {
    font-size: .55rem;
}

.runtime-process-route__badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-top: .15rem;
}

.runtime-process-route__badges > span {
    background: var(--runtime-accent-soft);
    border-radius: 999px;
    color: var(--runtime-accent-dark);
    font-size: .58rem;
    font-weight: 800;
    line-height: 1.2;
    padding: .15rem .35rem;
    text-transform: uppercase;
}

.runtime-process__table-empty {
    color: var(--runtime-slate);
    padding: 1.25rem;
}

.runtime-process__transitions .runtime-process-table-region {
    border: 0;
    max-height: 30rem;
    min-height: 0;
}

.runtime-process-table-region {
    max-width: 100%;
    min-height: 0;
    outline-offset: -.2rem;
    overflow: auto;
    scrollbar-gutter: stable;
}

.runtime-process-table-region:focus-visible {
    outline: 3px solid var(--runtime-focus);
}

.runtime-process-table {
    background: var(--runtime-surface);
    border-collapse: separate;
    border-spacing: 0;
    color: var(--runtime-ink);
    font-size: .9rem;
    line-height: 1.4;
    margin: 0;
    min-width: 68rem;
    table-layout: fixed;
    width: 100%;
}

.runtime-process-table--no-change {
    min-width: 58rem;
}

.runtime-process-table--state-changes
    .runtime-process-table__state {
    width: 11%;
}

.runtime-process-table--state-changes
    .runtime-process-table__form {
    width: 17%;
}

.runtime-process-table--state-changes
    .runtime-process-table__condition {
    width: 34%;
}

.runtime-process-table--state-changes
    .runtime-process-table__target {
    width: 25%;
}

.runtime-process-table--state-changes
    .runtime-process-table__availability {
    width: 13%;
}

.runtime-process-table--no-change
    .runtime-process-table__state {
    width: 24%;
}

.runtime-process-table--no-change
    .runtime-process-table__form {
    width: 26%;
}

.runtime-process-table--no-change
    .runtime-process-table__condition {
    width: 30%;
}

.runtime-process-table--no-change
    .runtime-process-table__availability {
    width: 20%;
}

.runtime-process-table th,
.runtime-process-table td {
    border-bottom: 1px solid var(--runtime-border);
    overflow-wrap: anywhere;
    padding: .8rem 1.25rem;
    text-align: left;
    vertical-align: top;
}

.runtime-process-table thead th {
    background: var(--runtime-canvas);
    box-shadow: 0 1px 0 var(--runtime-border);
    color: var(--runtime-heading);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .015em;
    position: sticky;
    top: 0;
    z-index: 2;
}

.runtime-process-table tbody th {
    color: var(--runtime-ink);
    font-weight: 400;
}

.runtime-process-table tbody tr:hover {
    background: #f5f8fa;
}

.runtime-process-table tbody tr:last-child > * {
    border-bottom: 0;
}

.runtime-process-table td > strong {
    color: var(--runtime-ink);
    font-weight: 700;
}

.runtime-process__rule-type {
    background: var(--runtime-surface-muted);
    border-radius: 999px;
    color: var(--runtime-slate);
    display: inline-flex;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.2;
    margin-left: .35rem;
    padding: .12rem .4rem;
    vertical-align: .08em;
    white-space: nowrap;
}

.runtime-process__no-change-table {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .4rem;
    overflow: hidden;
}

.runtime-process__no-change-table > summary {
    align-items: center;
    color: var(--runtime-heading);
    cursor: pointer;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    list-style: none;
    padding: 1rem 1.25rem;
}

.runtime-process__no-change-table > summary::-webkit-details-marker {
    display: none;
}

.runtime-process__no-change-table > summary::marker {
    content: "";
}

.runtime-process__no-change-table > summary:hover {
    background: #f5f8fa;
}

.runtime-process__no-change-table > summary strong,
.runtime-process__no-change-table > summary small {
    display: block;
}

.runtime-process__no-change-table > summary small {
    color: var(--runtime-slate);
    font-size: .75rem;
    font-weight: 400;
    margin-top: .18rem;
}

.runtime-process__no-change-count {
    align-items: center;
    background: var(--runtime-accent-soft);
    border-radius: 999px;
    color: var(--runtime-accent-dark);
    display: inline-flex;
    font-size: .75rem;
    font-weight: 800;
    height: 1.75rem;
    justify-content: center;
    min-width: 1.75rem;
    padding-inline: .45rem;
}

.runtime-process__no-change-table .runtime-process-table-region {
    border: 0;
    border-top: 1px solid var(--runtime-border);
    max-height: 24rem;
    min-height: 0;
}

.runtime-scale-control {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: .2rem;
}

.runtime-scale-control__button,
.runtime-scale-control__value {
    align-items: center;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .2rem;
    color: var(--runtime-heading);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: .75rem;
    font-weight: 700;
    height: 1.85rem;
    justify-content: center;
    line-height: 1;
    min-width: 1.85rem;
    padding: 0 .35rem;
}

.runtime-scale-control__value {
    min-width: 2.9rem;
}

.runtime-scale-control__button:hover:not(:disabled),
.runtime-scale-control__value:hover:not(:disabled) {
    background: var(--runtime-accent-soft);
    border-color: var(--runtime-accent-dark);
}

.runtime-scale-control__button:disabled,
.runtime-scale-control__value:disabled {
    color: var(--runtime-slate);
    cursor: default;
    opacity: .55;
}

.runtime-profile-link {
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 auto;
    text-decoration: none;
    transition: box-shadow 140ms ease, transform 140ms ease;
}

.runtime-profile-link:hover {
    box-shadow: 0 0 0 3px var(--runtime-accent-soft), 0 3px 10px rgb(23 43 58 / 28%);
    transform: translateY(-1px);
}

.runtime-profile-avatar {
    background: var(--runtime-surface-muted);
    border: 2px solid var(--runtime-accent-dark);
    border-radius: 50%;
    display: block;
    height: 2.65rem;
    object-fit: cover;
    width: 2.65rem;
}

.runtime-profile-avatar--initials {
    align-items: center;
    background: var(--runtime-accent-soft);
    color: var(--runtime-heading);
    display: inline-flex;
    font-size: .875rem;
    font-weight: 700;
    justify-content: center;
}

.runtime-link-button {
    background: transparent;
    border: 0;
    color: var(--runtime-heading);
    cursor: pointer;
    font: inherit;
    padding: .25rem;
    text-decoration: underline;
}

.runtime-navigation__link {
    align-items: center;
    color: #fff;
    display: flex;
    font-weight: 700;
    gap: .75rem;
    padding: .7rem .25rem;
    text-decoration: none;
}

.runtime-navigation__link:hover {
    background: rgb(255 255 255 / 16%);
    color: #fff;
}

.runtime-navigation__link:visited,
.runtime-navigation__link:active {
    color: #fff;
}

.runtime-navigation__link:active {
    background: rgb(255 255 255 / 24%);
}

.runtime-navigation__link:focus-visible,
.runtime-navigation__link:focus-visible:hover {
    background: var(--runtime-focus);
    box-shadow: inset 0 -4px var(--runtime-ink);
    color: var(--runtime-ink);
    outline: 3px solid transparent;
}

.runtime-navigation__link--selected,
.runtime-navigation__link--selected:visited {
    background: rgb(255 255 255 / 24%);
    color: #fff;
}

.runtime-navigation__items {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-navigation__items li {
    display: flex;
    margin: 0;
    position: relative;
}

.runtime-navigation__icon {
    flex: 0 0 1.5rem;
    font-size: 1.25rem;
    height: 1.5rem;
    line-height: 1.5rem;
    text-align: center;
    width: 1.5rem;
}

.runtime-navigation__initials {
    align-items: center;
    display: inline-flex;
    flex: 0 0 1.75rem;
    font-size: .875rem;
    height: 1.75rem;
    justify-content: center;
    width: 1.75rem;
}

.runtime-navigation-menu {
    display: none;
    flex: 0 0 auto;
}

.runtime-shell--vertical-navigation {
    padding-left: 4rem;
}

.runtime-navigation-rail {
    background:
        radial-gradient(circle at 50% 8%, rgb(255 255 255 / 13%), transparent 30%),
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--runtime-shell-accent) 88%, #102d3b),
            color-mix(in srgb, var(--runtime-shell-accent) 72%, #061d2c));
    border-right: 1px solid rgb(255 255 255 / 14%);
    box-shadow: 4px 0 18px rgb(6 29 44 / 24%);
    height: var(--runtime-workspace-viewport-height);
    left: 0;
    overflow: visible;
    position: fixed;
    top: 0;
    transition: width .18s ease;
    width: 4rem;
    z-index: 1000;
}

.runtime-navigation-rail__primary {
    height: 100%;
    overflow: hidden auto;
    padding-block: .5rem;
    scrollbar-width: none;
    transition: width .18s ease;
    width: 4rem;
}
/* Keep the compact rail wheel- and keyboard-scrollable without spending its
   narrow icon width on persistent scrollbar chrome. Opening the rail restores
   the visible scrollbar so the longer labelled menu retains a clear cue. */
.runtime-navigation-rail__primary::-webkit-scrollbar {
    width: 0;
}

.runtime-navigation-rail:hover,
.runtime-navigation-rail:focus-within {
    width: 17.5rem;
}

.runtime-navigation-rail:has(.runtime-navigation__item--has-actions:hover),
.runtime-navigation-rail:has(.runtime-navigation__item--has-actions:focus-within) {
    width: 32.5rem;
}

.runtime-navigation-rail:hover .runtime-navigation-rail__primary,
.runtime-navigation-rail:focus-within .runtime-navigation-rail__primary {
    scrollbar-width: thin;
    width: 17.5rem;
}

.runtime-navigation-rail:hover .runtime-navigation-rail__primary::-webkit-scrollbar,
.runtime-navigation-rail:focus-within .runtime-navigation-rail__primary::-webkit-scrollbar {
    width: .5rem;
}

.runtime-navigation-rail.runtime-navigation-rail--closing,
.runtime-navigation-rail.runtime-navigation-rail--closing:hover,
.runtime-navigation-rail.runtime-navigation-rail--closing:focus-within {
    width: 4rem;
}

.runtime-navigation-rail.runtime-navigation-rail--closing .runtime-navigation-rail__primary,
.runtime-navigation-rail.runtime-navigation-rail--closing:hover .runtime-navigation-rail__primary,
.runtime-navigation-rail.runtime-navigation-rail--closing:focus-within .runtime-navigation-rail__primary {
    scrollbar-width: none;
    width: 4rem;
}

.runtime-navigation-rail.runtime-navigation-rail--closing
    .runtime-navigation-rail__primary::-webkit-scrollbar,
.runtime-navigation-rail.runtime-navigation-rail--closing:hover
    .runtime-navigation-rail__primary::-webkit-scrollbar,
.runtime-navigation-rail.runtime-navigation-rail--closing:focus-within
    .runtime-navigation-rail__primary::-webkit-scrollbar {
    width: 0;
}

.runtime-navigation-rail .runtime-navigation__items {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: .25rem;
    min-height: calc(100% - 1rem);
    padding: .25rem .375rem;
    width: 17.5rem;
}

.runtime-navigation-rail .runtime-navigation__items li {
    align-items: center;
    display: flex;
    flex: 1 0 3.25rem;
    min-height: 3.25rem;
    width: 100%;
}

.runtime-navigation-rail .runtime-navigation__link {
    border: 1px solid transparent;
    border-radius: .5rem;
    box-sizing: border-box;
    color: #fff;
    flex: 0 0 3.25rem;
    font-size: .9375rem;
    font-weight: 650;
    gap: .75rem;
    height: 3rem;
    margin-block: auto;
    min-height: 3rem;
    overflow: hidden;
    padding: .5rem .625rem;
    transition:
        background-color .14s ease,
        border-color .14s ease,
        box-shadow .14s ease,
        color .14s ease,
        transform .14s ease,
        width .18s ease;
    white-space: nowrap;
    width: 3.25rem;
}

.runtime-navigation-rail:not(.runtime-navigation-rail--closing):hover
    .runtime-navigation__link,
.runtime-navigation-rail:not(.runtime-navigation-rail--closing):focus-within
    .runtime-navigation__link {
    flex: 1 1 auto;
    width: 100%;
}

.runtime-navigation-rail .runtime-navigation__icon,
.runtime-navigation-rail .runtime-navigation__initials {
    align-items: center;
    background: rgb(255 255 255 / 10%);
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: .4rem;
    display: inline-flex;
    flex: 0 0 2rem;
    font-size: 1rem;
    height: 2rem;
    justify-content: center;
    line-height: 2rem;
    transition:
        background-color .14s ease,
        border-color .14s ease,
        transform .14s ease;
    width: 2rem;
}

.runtime-navigation-rail .runtime-navigation__label {
    opacity: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity .12s ease;
}

.runtime-navigation-rail:hover .runtime-navigation__label,
.runtime-navigation-rail:focus-within .runtime-navigation__label {
    opacity: 1;
}

.runtime-navigation-rail.runtime-navigation-rail--closing .runtime-navigation__label {
    opacity: 0;
}

.runtime-navigation-actions {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    box-shadow: 0 4px 12px rgb(33 43 50 / 18%);
    color: var(--runtime-ink);
    display: none;
    min-width: 15rem;
    z-index: 1001;
}

.runtime-navigation-actions__toggle {
    display: none;
}

.runtime-navigation-actions__heading {
    border-bottom: 1px solid var(--runtime-border);
    color: var(--runtime-ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    padding: .875rem 1rem;
}

.runtime-navigation-actions__item,
.runtime-navigation-actions__item:visited {
    align-items: center;
    background: var(--runtime-surface);
    color: var(--runtime-heading);
    display: flex;
    font-size: 1rem;
    gap: .625rem;
    line-height: 1.3;
    padding: .75rem 1rem;
    text-decoration: none;
}

.runtime-navigation-actions__item:hover {
    background: #f0f4f5;
    color: var(--runtime-heading);
}

.runtime-navigation-actions__item .runtime-navigation__icon {
    flex: 0 0 1.125rem;
    font-size: 1rem;
    height: 1.125rem;
    line-height: 1.125rem;
    width: 1.125rem;
}

.runtime-navigation-rail .runtime-navigation-actions {
    background: var(--runtime-surface);
    border-bottom: 0;
    border-left: 0;
    border-right: 1px solid var(--runtime-border);
    border-top: .25rem solid var(--runtime-shell-accent);
    bottom: 0;
    box-shadow: 4px 0 18px rgb(6 29 44 / 22%);
    left: 17.5rem;
    overflow-y: auto;
    padding: 0;
    position: fixed;
    top: 0;
    width: 15rem;
}

.runtime-navigation-rail .runtime-navigation__item--has-actions:hover > .runtime-navigation-actions,
.runtime-navigation-rail .runtime-navigation__item--has-actions:focus-within > .runtime-navigation-actions {
    display: block;
}

.runtime-navigation-rail.runtime-navigation-rail--closing .runtime-navigation-actions,
.runtime-navigation-rail.runtime-navigation-rail--closing .runtime-navigation__item--has-actions:hover > .runtime-navigation-actions,
.runtime-navigation-rail.runtime-navigation-rail--closing .runtime-navigation__item--has-actions:focus-within > .runtime-navigation-actions {
    display: none;
}

.runtime-navigation-rail .runtime-navigation__link:hover {
    background: rgb(255 255 255 / 14%);
    border-color: rgb(255 255 255 / 18%);
    box-shadow: 0 3px 10px rgb(6 29 44 / 15%);
    transform: translateY(-1px);
}

.runtime-navigation-rail .runtime-navigation__link:hover .runtime-navigation__icon,
.runtime-navigation-rail .runtime-navigation__link:hover .runtime-navigation__initials {
    background: rgb(255 255 255 / 17%);
    border-color: rgb(255 255 255 / 22%);
}

.runtime-navigation-rail .runtime-navigation__link--selected,
.runtime-navigation-rail .runtime-navigation__link--selected:visited {
    background: var(--runtime-surface);
    border-color: rgb(255 255 255 / 46%);
    box-shadow:
        0 2px 0 rgb(6 29 44 / 18%),
        0 7px 16px rgb(6 29 44 / 17%);
    color: var(--runtime-heading);
    padding: .5rem .625rem;
}

.runtime-navigation-rail .runtime-navigation__link--selected .runtime-navigation__icon,
.runtime-navigation-rail .runtime-navigation__link--selected .runtime-navigation__initials {
    background: color-mix(
        in srgb,
        var(--runtime-shell-accent) 14%,
        var(--runtime-surface));
    border-color: color-mix(
        in srgb,
        var(--runtime-shell-accent) 28%,
        var(--runtime-border));
    color: color-mix(in srgb, var(--runtime-shell-accent) 78%, #001f33);
}

.runtime-navigation-rail .runtime-navigation__link:focus-visible,
.runtime-navigation-rail .runtime-navigation__link:focus-visible:hover {
    background: var(--runtime-focus);
    border-color: var(--runtime-ink);
    box-shadow: 0 0 0 3px var(--runtime-focus);
    color: var(--runtime-ink);
    transform: none;
}

.runtime-navigation-rail .runtime-navigation__link:focus-visible .runtime-navigation__icon,
.runtime-navigation-rail .runtime-navigation__link:focus-visible .runtime-navigation__initials {
    background: transparent;
    border-color: var(--runtime-ink);
    color: var(--runtime-ink);
}

.runtime-navigation-rail .runtime-navigation-actions__heading {
    background: color-mix(
        in srgb,
        var(--runtime-shell-accent) 9%,
        var(--runtime-surface));
    border: 0;
    border-bottom: 1px solid var(--runtime-border);
    padding: 1rem;
}

.runtime-navigation-rail .runtime-navigation-actions__item {
    border: 0;
    border-bottom: 1px solid var(--runtime-border);
    box-shadow: none;
}

.runtime-account-strip {
    align-items: center;
    background: var(--runtime-surface);
    border-bottom: 4px solid var(--runtime-shell-accent);
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    min-height: 3rem;
    padding: .5rem clamp(1rem, 4vw, 5rem);
}

.runtime-main {
    --runtime-main-inline-padding: clamp(.75rem, 2.5vw, 2.5rem);

    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0 var(--runtime-main-inline-padding) 2rem;
}

.runtime-main--documentation {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    padding-bottom: var(--runtime-space-4);
}

.runtime-main > .nhsuk-breadcrumb,
.runtime-record-details > .nhsuk-breadcrumb {
    background: var(--runtime-canvas);
    display: block;
    margin:
        0
        calc(0px - var(--runtime-main-inline-padding))
        0;
    padding:
        var(--runtime-space-2)
        var(--runtime-main-inline-padding)
        var(--runtime-space-2);
    position: sticky;
    top: 0;
    width:
        calc(
            100% +
            var(--runtime-main-inline-padding) +
            var(--runtime-main-inline-padding));
    z-index: 20;
}

.runtime-footer {
    align-items: baseline;
    background: #d8dee0;
    border-top: 2px solid var(--runtime-shell-accent);
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    font-size: .875rem;
    gap: .25rem 1rem;
    justify-content: space-between;
    padding: .5rem clamp(1rem, 4vw, 5rem);
}

.runtime-footer p {
    margin: 0;
}

.runtime-footer .nhsuk-footer__copyright {
    color: #231f20;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.7142857143;
}

.runtime-footer .dynamisFooter {
    font-family: "Changa", "Frutiger W01", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-inline-start: auto;
    text-align: right;
}

.runtime-footer .dynamisFooterBrand,
.runtime-footer .dynamisFooterBrand:visited {
    color: var(--runtime-accent-dark);
    text-decoration: none;
}

.runtime-footer .dynamisFooterBrand:hover {
    color: var(--runtime-heading);
    text-decoration: underline;
}

@media (min-width: 40.0625rem) {
    .runtime-footer .nhsuk-footer__copyright {
        font-size: 1rem;
        line-height: 1.5;
    }
}

.runtime-home {
    display: grid;
    gap: 1.5rem;
    margin: 0;
    max-width: none;
    padding-top: var(--runtime-space-2);
    width: 100%;
}

.runtime-home-hero {
    background:
        radial-gradient(circle at 82% 18%, rgb(0 169 183 / 24%), transparent 28%),
        linear-gradient(125deg, var(--runtime-home-hero-dark) 0%, #005eb8 66%, #006f89 100%);
    border-radius: .75rem;
    box-shadow: 0 .75rem 2rem rgb(0 47 93 / 20%);
    color: #fff;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(.8rem, 1.8vw, 1.25rem);
    position: relative;
}

.runtime-home-hero::before,
.runtime-home-hero::after {
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: 50%;
    content: "";
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

.runtime-home-hero::before {
    height: 25rem;
    right: -9rem;
    top: -15rem;
    width: 25rem;
}

.runtime-home-hero::after {
    bottom: -18rem;
    height: 31rem;
    left: 39%;
    width: 31rem;
}

.runtime-home-eyebrow {
    color: var(--runtime-accent-dark);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .11em;
    margin: 0 0 .65rem;
    text-transform: uppercase;
}

.runtime-home-definition {
    align-items: center;
    display: grid;
    gap: clamp(1.25rem, 2.8vw, 2.5rem);
    grid-template-columns: minmax(16rem, .68fr) 1px minmax(0, 1fr);
    padding: clamp(.65rem, 1.4vw, 1rem);
    width: 100%;
}

.runtime-home-definition__heading {
    align-items: center;
    display: flex;
    gap: 1.25rem;
}

.runtime-home-mark {
    color: #fff;
    flex: 0 0 4.25rem;
    height: 4.25rem;
    width: 4.25rem;
}

.runtime-home-mark__backdrop {
    fill: rgb(255 255 255 / 8%);
    stroke: rgb(255 255 255 / 30%);
}

.runtime-home-mark path {
    fill: none;
    stroke: currentcolor;
    stroke-linejoin: round;
    stroke-width: 4;
}

.runtime-home-definition__word {
    color: #fff;
    font-family: "Changa", "Frutiger W01", Arial, sans-serif;
    font-size: clamp(1.65rem, 2.5vw, 2.1rem);
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1;
    margin: 0;
}

.runtime-home-definition__pronunciation {
    color: #b8e8ef;
    font-size: .95rem;
    font-style: italic;
    font-weight: 700;
    margin: .35rem 0 0;
}

.runtime-home-definition__pronunciation span {
    color: rgb(255 255 255 / 72%);
    font-weight: 400;
}

.runtime-home-definition__rule {
    background: rgb(255 255 255 / 24%);
    height: 100%;
    min-height: 4.75rem;
    width: 1px;
}

.runtime-home-definition__body {
    min-width: 0;
}

.runtime-home-definition__label {
    color: #a9edf2;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .09em;
    margin: 0 0 .4rem;
    text-transform: uppercase;
}

.runtime-home-definition__meaning {
    color: #fff;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
}

.runtime-home-destinations,
.runtime-home-recent,
.runtime-home-empty {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .6rem;
    box-shadow: 0 .25rem .85rem rgb(23 43 58 / 9%);
    padding: clamp(1.25rem, 2.6vw, 2rem);
}

.runtime-home-section-heading {
    align-items: end;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.runtime-home-section-heading h2,
.runtime-home-empty h2 {
    color: var(--runtime-heading);
    font-size: clamp(1.55rem, 2.5vw, 2rem);
    letter-spacing: -.02em;
    line-height: 1.15;
    margin: 0;
}

.runtime-home-section-heading p:not(.runtime-home-eyebrow),
.runtime-home-empty p:not(.runtime-home-eyebrow) {
    color: var(--runtime-slate);
    margin: .45rem 0 0;
}

.runtime-home-count {
    background: var(--runtime-accent-soft);
    border: 1px solid color-mix(in srgb, var(--runtime-accent) 55%, var(--runtime-border));
    border-radius: 999px;
    color: var(--runtime-heading);
    flex: 0 0 auto;
    font-size: .8rem;
    font-weight: 700;
    padding: .4rem .75rem;
}

.runtime-home-destination-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-home-destination-grid li {
    min-width: 0;
}

.runtime-home-destination,
.runtime-home-destination:visited {
    --runtime-home-card-accent: var(--runtime-accent);
    align-items: center;
    background: #fff;
    border: 1px solid var(--runtime-border);
    border-left: .3rem solid var(--runtime-home-card-accent);
    border-radius: .35rem;
    color: var(--runtime-ink);
    display: grid;
    gap: .9rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    height: 100%;
    min-height: 6.25rem;
    padding: 1rem;
    text-decoration: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.runtime-home-destination:hover {
    border-color: color-mix(in srgb, var(--runtime-home-card-accent) 68%, var(--runtime-border));
    box-shadow: 0 .45rem 1rem rgb(23 43 58 / 13%);
    color: var(--runtime-ink);
    transform: translateY(-2px);
}

.runtime-home-destination__icon {
    align-items: center;
    background: color-mix(in srgb, var(--runtime-home-card-accent) 16%, #fff);
    border-radius: .45rem;
    color: color-mix(in srgb, var(--runtime-home-card-accent) 72%, #000);
    display: flex;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

.runtime-home-destination__icon .runtime-navigation__icon {
    font-size: 1.15rem;
    margin: 0;
}

.runtime-home-destination__content {
    display: grid;
    gap: .2rem;
    min-width: 0;
}

.runtime-home-destination__content strong {
    color: var(--runtime-heading);
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-home-destination__content span {
    color: var(--runtime-slate);
    font-size: .82rem;
    line-height: 1.35;
}

.runtime-home-destination__arrow {
    color: color-mix(in srgb, var(--runtime-home-card-accent) 72%, #000);
    font-size: .85rem;
    transition: transform 140ms ease;
}

.runtime-home-destination:hover .runtime-home-destination__arrow {
    transform: translateX(.2rem);
}

.runtime-home-destinations__more {
    color: var(--runtime-slate);
    font-size: .85rem;
    margin: 1rem 0 0;
    text-align: right;
}

.runtime-home-empty {
    align-items: center;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: auto minmax(0, 1fr);
}

.runtime-home-empty__icon {
    align-items: center;
    background: var(--runtime-accent-soft);
    border-radius: 50%;
    color: var(--runtime-accent-dark);
    display: flex;
    font-size: 1.4rem;
    height: 4rem;
    justify-content: center;
    width: 4rem;
}

.runtime-home-empty a {
    display: inline-block;
    font-weight: 700;
    margin-top: .65rem;
}

.runtime-home-anonymous {
    display: grid;
    gap: 1rem;
}

.runtime-home-sign-in {
    align-items: center;
    background:
        radial-gradient(
            circle at 92% 12%,
            rgb(0 94 184 / 10%),
            transparent 34%),
        var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-left: .35rem solid var(--runtime-brand);
    border-radius: .6rem;
    box-shadow: 0 .25rem .85rem rgb(23 43 58 / 9%);
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: clamp(1.25rem, 2.6vw, 2rem);
}

.runtime-home-sign-in h2 {
    color: var(--runtime-heading);
    font-size: clamp(1.55rem, 2.5vw, 2rem);
    letter-spacing: -.02em;
    line-height: 1.15;
    margin: 0;
}

.runtime-home-sign-in p:not(.runtime-home-eyebrow) {
    color: var(--runtime-slate);
    margin: .45rem 0 0;
    max-width: 50rem;
}

.runtime-home-sign-in .nhsuk-button {
    margin: 0;
    white-space: nowrap;
}

.runtime-home-feature-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-home-feature {
    --runtime-home-feature-accent: var(--runtime-brand);
    background:
        linear-gradient(
            145deg,
            color-mix(
                in srgb,
                var(--runtime-home-feature-accent) 8%,
                var(--runtime-surface)),
            var(--runtime-surface) 62%);
    border: 1px solid var(--runtime-border);
    border-radius: .6rem;
    border-top: .3rem solid var(--runtime-home-feature-accent);
    box-shadow: 0 .25rem .85rem rgb(23 43 58 / 8%);
    min-width: 0;
    padding: 1.35rem;
}

.runtime-home-feature:nth-child(2) {
    --runtime-home-feature-accent: #007f8a;
}

.runtime-home-feature:nth-child(3) {
    --runtime-home-feature-accent: #330072;
}

.runtime-home-feature__icon {
    align-items: center;
    background: color-mix(
        in srgb,
        var(--runtime-home-feature-accent) 14%,
        var(--runtime-surface));
    border-radius: .5rem;
    color: var(--runtime-home-feature-accent);
    display: flex;
    font-size: 1.2rem;
    height: 2.75rem;
    justify-content: center;
    margin-bottom: 1rem;
    width: 2.75rem;
}

.runtime-home-feature h3 {
    color: var(--runtime-heading);
    font-size: 1.2rem;
    line-height: 1.25;
    margin: 0 0 .5rem;
}

.runtime-home-feature p {
    color: var(--runtime-slate);
    line-height: 1.45;
    margin: 0;
}

.runtime-home-section-heading--compact {
    margin-bottom: 1rem;
}

.runtime-home-recent .runtime-recent-records__panel--inline {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-height: none;
    overflow: visible;
    padding: 0;
    position: static;
    width: 100%;
    z-index: auto;
}

.runtime-home-recent .runtime-recent-records__panel--inline ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.runtime-recent-records__panel li,
.runtime-home-recent .runtime-recent-records__panel--inline li {
    margin: 0;
}

.runtime-home-recent .runtime-recent-records__panel--inline li a {
    height: 100%;
}

@media (max-width: 75rem) {
    .runtime-home-destination-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .runtime-home-recent .runtime-recent-records__panel--inline ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 52rem) {
    .runtime-home-sign-in {
        align-items: start;
        gap: 1.25rem;
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-home-sign-in .nhsuk-button {
        justify-self: start;
    }

    .runtime-home-feature-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-home-recent .runtime-recent-records__panel--inline ul {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 40rem) {
    .runtime-home {
        gap: 1rem;
    }

    .runtime-home-hero {
        border-radius: .5rem;
        padding: .75rem;
    }

    .runtime-home-definition {
        align-items: start;
        gap: .9rem;
        grid-template-columns: minmax(0, 1fr);
        padding: .5rem;
    }

    .runtime-home-definition__rule {
        height: 1px;
        min-height: 0;
        width: 100%;
    }

    .runtime-home-mark {
        flex-basis: 3.75rem;
        height: 3.75rem;
        width: 3.75rem;
    }

    .runtime-home-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: .75rem;
    }

    .runtime-home-destination-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-home-destination-grid li {
        display: flex;
    }

    .runtime-home-destination,
    .runtime-home-destination:visited {
        height: auto;
        min-height: 5.25rem;
        padding: .8rem;
        width: 100%;
    }

    .runtime-home-destinations__more {
        text-align: left;
    }

    .runtime-home-empty {
        align-items: start;
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (forced-colors: active) {
    .runtime-home-hero,
    .runtime-home-definition,
    .runtime-home-destination,
    .runtime-home-sign-in,
    .runtime-home-feature,
    .runtime-home-recent {
        border: 1px solid CanvasText;
    }
}

.runtime-profile-page {
    display: grid;
    gap: 1rem;
    margin: 0;
    max-width: none;
    padding-top: var(--runtime-space-2);
    width: 100%;
}

.runtime-profile-page__heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
}

.runtime-profile-page__heading h1 {
    color: var(--runtime-heading);
    margin: .15rem 0 .35rem;
}

.runtime-profile-page__heading p {
    color: var(--runtime-slate);
    margin: 0;
}

.runtime-profile-page__eyebrow {
    color: var(--runtime-accent-dark);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.runtime-profile-card {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    box-shadow: var(--runtime-shadow);
    margin: 0;
    padding: 1.25rem;
}

.runtime-profile-card--identity {
    align-items: start;
    border-top: 4px solid var(--runtime-accent);
    display: grid;
    gap: 1.5rem;
    grid-template-columns: auto minmax(0, 1fr);
}

.runtime-profile-account {
    display: grid;
    gap: .75rem;
    justify-items: center;
    width: 12rem;
}

.runtime-profile-portrait {
    align-items: center;
    aspect-ratio: 1;
    background: var(--runtime-accent-soft);
    border: 3px solid var(--runtime-accent-dark);
    border-radius: 50%;
    color: var(--runtime-heading);
    display: flex;
    font-size: 1.7rem;
    font-weight: 700;
    justify-content: center;
    overflow: hidden;
    width: 9rem;
}

.runtime-profile-account-actions,
.runtime-profile-sign-out,
.runtime-profile-switch-user {
    width: 100%;
}

.runtime-profile-account-actions {
    display: grid;
    gap: .5rem;
}

.runtime-profile-sign-out .nhsuk-button,
.runtime-profile-switch-user .nhsuk-button {
    margin: 0;
    white-space: nowrap;
    width: 100%;
}

.runtime-profile-portrait img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.runtime-profile-identity__title,
.runtime-profile-card__heading {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.runtime-profile-identity__title h2,
.runtime-profile-card__heading h2 {
    color: var(--runtime-heading);
    margin: 0 0 .25rem;
}

.runtime-profile-card__heading p {
    color: var(--runtime-slate);
    margin: 0;
}

.runtime-profile-source,
.runtime-profile-kind {
    background: var(--runtime-accent-soft);
    border: 1px solid var(--runtime-accent-dark);
    border-radius: 999px;
    color: var(--runtime-heading);
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    padding: .2rem .55rem;
    white-space: nowrap;
}

.runtime-profile-notice {
    background: #fff9c4;
    border-left: 4px solid #ffeb3b;
    margin: 1rem 0 0;
    padding: .65rem .8rem;
}

.runtime-profile-reconnect {
    margin: .75rem 0 0;
}

.runtime-profile-facts {
    display: grid;
    gap: .8rem 1.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1.25rem 0 0;
}

.runtime-profile-facts div {
    border-top: 1px solid var(--runtime-border);
    min-width: 0;
    padding-top: .6rem;
}

.runtime-profile-facts dt {
    color: var(--runtime-heading);
    font-size: .8rem;
    font-weight: 700;
}

.runtime-profile-facts dd {
    margin: .15rem 0 0;
    overflow-wrap: anywhere;
}

.runtime-profile-count {
    align-items: center;
    background: var(--runtime-accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .8rem;
    font-weight: 700;
    height: 1.8rem;
    justify-content: center;
    min-width: 1.8rem;
    padding-inline: .45rem;
}

.runtime-profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.runtime-profile-tags li {
    background: var(--runtime-canvas);
    border: 1px solid var(--runtime-border);
    border-radius: .25rem;
    color: var(--runtime-heading);
    font-size: .8rem;
    font-weight: 700;
    padding: .35rem .55rem;
}

.runtime-profile-expander {
    padding: 0;
}

.runtime-profile-expander > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    list-style-position: inside;
    padding: 1rem 1.25rem;
}

.runtime-profile-expander > summary strong {
    color: var(--runtime-heading);
    display: block;
    font-size: 1.15rem;
}

.runtime-profile-expander > summary small {
    color: var(--runtime-slate);
    display: block;
    margin: .15rem 0 0 1.15rem;
}

.runtime-profile-expander__content {
    border-top: 1px solid var(--runtime-border);
    padding: 1rem 1.25rem 1.25rem;
}

.runtime-profile-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.runtime-profile-table {
    border-collapse: collapse;
    font-size: .875rem;
    width: 100%;
}

.runtime-profile-table th {
    background: var(--runtime-canvas);
    color: var(--runtime-heading);
    font-weight: 700;
    text-align: left;
}

.runtime-profile-table th,
.runtime-profile-table td {
    border-bottom: 1px solid var(--runtime-border);
    padding: .7rem;
    vertical-align: top;
}

.runtime-profile-table td {
    overflow-wrap: anywhere;
}

.runtime-profile-table td small {
    color: var(--runtime-slate);
    display: block;
    margin-top: .2rem;
}

.runtime-profile-table--claims code {
    color: var(--runtime-heading);
    font-size: .8rem;
}

.runtime-profile-role-list {
    color: var(--runtime-heading);
    font-weight: 700;
}

.runtime-record-list {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0 auto;
    max-width: none;
    min-height: 0;
    padding-top: var(--runtime-space-4);
    width: 100%;
}

.runtime-state.runtime-record-list__loading {
    box-sizing: border-box;
    max-width: none;
    padding-top: var(--runtime-space-4);
    width: 100%;
}

.runtime-record-list__header {
    align-items: end;
    display: grid;
    gap: .15rem 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0 0 1rem;
}

.runtime-record-list__header h1 {
    color: var(--runtime-heading);
    font-size: clamp(1.5rem, 2vw, 2rem);
    line-height: 1.15;
    margin: 0;
}

.runtime-record-results {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    position: relative;
}

/* The table owns its bounded scroll region. Clip its scrollable overflow at the
   overlay wrapper so it cannot also enlarge the main content scroller. */
.runtime-record-results--table {
    overflow: hidden;
    overflow: clip;
}

.runtime-record-results--cards {
    overflow: auto;
    overscroll-behavior: contain;
    padding: .25rem;
}

.runtime-record-results--cards > .runtime-record-cards {
    flex: 0 0 auto;
}

/* Spatial presentations own their panning. Their max-content canvases must not
   enlarge the page-level scroller outside the bounded presentation host. */
.runtime-record-results--kanban,
.runtime-record-results--gantt {
    overflow: hidden;
    overflow: clip;
}

.runtime-record-results__overlay {
    align-items: center;
    background: rgb(238 242 243 / 78%);
    color: var(--runtime-heading);
    display: flex;
    font-size: .9rem;
    font-weight: 700;
    gap: .65rem;
    inset: 0;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity .18s ease-out, visibility 0s linear .18s;
    visibility: hidden;
    z-index: 3;
}

.runtime-record-results__overlay--visible {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
    visibility: visible;
}

.runtime-record-results__loading-message {
    align-items: center;
    display: inline-flex;
    gap: .65rem;
}

.runtime-record-results__spinner {
    animation: runtime-record-results-spin .8s linear infinite;
    border: 2px solid color-mix(in srgb, var(--runtime-accent) 28%, #fff);
    border-radius: 50%;
    border-top-color: var(--runtime-accent-dark);
    height: 1.5rem;
    width: 1.5rem;
}

@keyframes runtime-record-results-spin {
    to {
        transform: rotate(1turn);
    }
}

.runtime-eyebrow {
    color: var(--runtime-slate);
    font-size: .875rem;
    grid-column: 1 / -1;
    margin: 0;
}

.runtime-record-list__view {
    color: var(--runtime-slate);
    font-size: .875rem;
    margin: 0;
    overflow-wrap: anywhere;
}

.runtime-toolbar {
    align-items: end;
    display: grid;
    gap: .75rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-block-end: 1rem;
}

.runtime-toolbar__view-group {
    align-items: flex-end;
    display: flex;
    gap: .4rem;
    min-width: 0;
}

.runtime-toolbar__view-group > .runtime-toolbar__view {
    flex: 1 1 auto;
    min-width: 0;
}

.runtime-toolbar__view-delete {
    transform: translateY(calc(0px - var(--runtime-button-shadow-depth)));
}

.runtime-toolbar__query {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: start;
}

.runtime-toolbar .runtime-toolbar__reload {
    flex: 0 0 var(--runtime-control-height);
    height: var(--runtime-small-button-height);
    margin: 0;
    min-height: var(--runtime-small-button-height);
    padding: 0;
    transform: translateY(calc(0px - var(--runtime-button-shadow-depth)));
    width: var(--runtime-control-height);
}

.runtime-toolbar__reload i {
    pointer-events: none;
}

.runtime-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.runtime-toolbar__actions {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    justify-self: end;
    min-width: 0;
    position: relative;
}

.runtime-toolbar-actions__toggle {
    display: none !important;
    gap: .55rem;
}

.runtime-toolbar-actions__count {
    align-items: center;
    background: var(--runtime-accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: .75rem;
    justify-content: center;
    line-height: 1;
    min-height: 1.4rem;
    min-width: 1.4rem;
    padding: .2rem .35rem;
}

.runtime-toolbar-actions__chevron {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    height: .5rem;
    margin-block-start: -.2rem;
    transform: rotate(45deg);
    transition: transform .2s ease;
    width: .5rem;
}

.runtime-toolbar-actions__panel {
    display: contents;
}

.runtime-toolbar-actions__items {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: .75rem;
}

.runtime-toolbar-action-icon {
    flex: 0 0 var(--runtime-control-height);
    height: var(--runtime-small-button-height);
    min-height: var(--runtime-small-button-height);
    min-width: var(--runtime-control-height);
    padding: 0;
    position: relative;
    width: var(--runtime-control-height);
}

.runtime-toolbar-action-icon i {
    pointer-events: none;
}

.runtime-toolbar-action-icon__count {
    align-items: center;
    background: var(--runtime-heading);
    border: 2px solid var(--runtime-surface);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: .625rem;
    font-weight: 800;
    height: 1.125rem;
    justify-content: center;
    line-height: 1;
    min-width: 1.125rem;
    padding-inline: .2rem;
    position: absolute;
    right: -.45rem;
    top: -.5rem;
}

.runtime-toolbar-actions[data-collapsed="true"] {
    z-index: 45;
}

.runtime-toolbar-actions[data-collapsed="true"] .runtime-toolbar-actions__toggle {
    display: inline-flex !important;
}

.runtime-toolbar-actions[data-collapsed="true"] .runtime-toolbar-actions__panel {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .375rem;
    box-shadow:
        0 .625rem 1.5rem rgb(33 43 50 / 18%),
        0 .125rem .375rem rgb(33 43 50 / 10%);
    display: block;
    max-width: calc(var(--runtime-workspace-viewport-width) - 2rem);
    opacity: 0;
    padding: .75rem;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    transform: translateY(-.25rem) scale(.98);
    transform-origin: top right;
    transition:
        opacity .18s ease,
        transform .22s cubic-bezier(.2, .8, .2, 1),
        visibility 0s linear .22s;
    visibility: hidden;
    width: 18rem;
    z-index: 50;
}

.runtime-toolbar-actions[data-collapsed="true"] .runtime-toolbar-actions__items,
.runtime-toolbar-actions[data-collapsed="true"] .runtime-filter-actions {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
}

.runtime-toolbar-actions[data-collapsed="true"] .runtime-toolbar-actions__items > .nhsuk-button,
.runtime-toolbar-actions[data-collapsed="true"] .runtime-filter-actions .nhsuk-button {
    justify-content: center;
    width: 100%;
}

.runtime-toolbar-actions[data-collapsed="true"][data-expanded="true"]
    .runtime-toolbar-actions__panel {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
    visibility: visible;
}

.runtime-toolbar-actions[data-expanded="true"] .runtime-toolbar-actions__chevron {
    margin-block-start: .2rem;
    transform: rotate(225deg);
}

/* Measure the action row at its natural inline width even while the visible
   presentation is collapsed. This keeps the switching point driven by actual
   labels, permissions, and browser text metrics instead of a fixed breakpoint. */
.runtime-toolbar-actions[data-runtime-toolbar-actions-measuring="true"]
    .runtime-toolbar-actions__panel {
    display: block;
    left: -10000px;
    max-width: none;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    position: fixed;
    right: auto;
    top: 0;
    transform: none;
    visibility: hidden;
    width: max-content;
}

.runtime-toolbar-actions[data-runtime-toolbar-actions-measuring="true"]
    .runtime-toolbar-actions__items,
.runtime-toolbar-actions[data-runtime-toolbar-actions-measuring="true"]
    .runtime-filter-actions {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    width: max-content;
}

.runtime-toolbar-actions[data-runtime-toolbar-actions-measuring="true"]
    .runtime-toolbar-actions__items > .nhsuk-button,
.runtime-toolbar-actions[data-runtime-toolbar-actions-measuring="true"]
    .runtime-filter-actions .nhsuk-button {
    width: auto;
}

/* NHS secondary buttons paint a four-pixel action shadow below their layout
   box. Compensate in the horizontal list toolbar so that visual edge, rather
   than the hidden box edge, aligns with the adjacent inputs. */
.runtime-toolbar > .runtime-toolbar__actions {
    transform: translateY(calc(0px - var(--runtime-button-shadow-depth)));
}

.runtime-toolbar .nhsuk-button--small,
.runtime-filter-dialog .nhsuk-button--small,
.runtime-advanced-search-dialog .nhsuk-button--small,
.runtime-pagination .nhsuk-button--small {
    margin-bottom: 0;
}

.runtime-record-list__fullscreen {
    gap: .4rem;
}

.runtime-control {
    min-width: 0;
}

.runtime-view-selector {
    max-width: 100%;
    position: relative;
    width: clamp(12rem, 22vw, 26rem);
}

.runtime-view-selector__label {
    color: var(--runtime-heading);
    display: block;
    font-size: .875rem;
    font-weight: 700;
    margin-block-end: .25rem;
}

.runtime-view-selector__control {
    position: relative;
}

.runtime-view-selector__input {
    background: #fff;
    border: 1px solid var(--runtime-slate);
    border-radius: 0;
    color: #000;
    cursor: pointer;
    font: inherit;
    min-height: var(--runtime-control-height);
    padding: .4rem 2.25rem .4rem .5rem;
    width: 100%;
}

.runtime-view-selector__input:focus {
    border-color: #212b32;
    box-shadow: 0 0 0 3px #ffeb3b;
    outline: 3px solid transparent;
}

.runtime-view-selector__input:disabled {
    cursor: not-allowed;
}

.runtime-view-selector__toggle {
    align-items: center;
    background: transparent;
    border: 0;
    bottom: 1px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 1px;
    top: 1px;
    width: 2.25rem;
}

.runtime-view-selector__toggle span {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #212b32;
    height: 0;
    width: 0;
}

.runtime-view-selector__toggle:disabled span {
    border-top-color: #768692;
}

.runtime-view-selector__menu {
    background: #fff;
    border: 2px solid var(--runtime-slate);
    box-shadow: 0 .25rem .75rem rgb(33 43 50 / 18%);
    left: 0;
    max-height: 16rem;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    /* Above record content, below the shell navigation rail (1000). */
    z-index: 50;
}

.runtime-view-selector__option {
    align-items: center;
    background: #fff;
    border: 0;
    color: #212b32;
    cursor: pointer;
    display: block;
    font: inherit;
    line-height: 1.35;
    margin: 0;
    padding: .5rem .625rem;
    text-align: left;
    width: 100%;
}

.runtime-view-selector__option:hover,
.runtime-view-selector__option:focus,
.runtime-view-selector__option--active {
    background: color-mix(in srgb, var(--runtime-accent, #005eb8) 25%, #fff);
    color: #212b32;
    outline: none;
}

.runtime-view-selector__option--selected {
    font-weight: 700;
}

.runtime-view-selector__empty {
    color: var(--runtime-slate);
    font-size: .875rem;
    margin: 0;
    padding: .5rem .625rem;
}

.runtime-control label {
    color: var(--runtime-heading);
    display: block;
    font-size: .875rem;
    font-weight: 700;
    margin-block-end: .25rem;
}

.runtime-control input,
.runtime-control select {
    background: #fff;
    border: 1px solid var(--runtime-slate);
    border-radius: 0;
    color: #000;
    font: inherit;
    min-height: var(--runtime-control-height);
    padding: .4rem .5rem;
    width: 100%;
}

.runtime-hint {
    color: var(--runtime-slate);
    display: block;
    font-size: .75rem;
    margin-block-end: .25rem;
}

.runtime-link-button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.runtime-table-region {
    flex: 1 1 auto;
    height: auto;
    max-width: 100%;
    min-height: 10rem;
    overflow: auto;
    overscroll-behavior: contain;
}

.runtime-record-table {
    --runtime-record-cell-padding-inline: .35rem;
    background: transparent;
    border-collapse: collapse;
    color: #000;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0;
    width: 100%;
}

.runtime-record-table--fixed {
    table-layout: fixed;
}

.runtime-record-table--horizontal {
    min-width: 100%;
    width: max-content;
}

.runtime-record-table caption {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.runtime-record-table th,
.runtime-record-table td {
    border-bottom: 1px solid var(--runtime-border);
    font-size: 1rem;
    line-height: 1.3;
    padding: .25rem var(--runtime-record-cell-padding-inline);
    vertical-align: middle;
}

.runtime-record-table th {
    background: var(--runtime-canvas);
    color: var(--runtime-heading);
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
}

.runtime-record-table__row {
    cursor: pointer;
}

.runtime-record-table tbody tr:hover,
.runtime-record-table tbody tr:focus-within {
    background: var(--runtime-accent-soft);
}

.runtime-record-table tbody tr:active {
    background: color-mix(in srgb, var(--runtime-accent) 26%, #fff);
}

.runtime-sort-link {
    align-items: center;
    color: var(--runtime-heading);
    display: inline-flex;
    gap: .35rem;
    min-height: 1.5rem;
    text-decoration: none;
}

.runtime-sort-link:hover,
.runtime-sort-link:focus-visible {
    text-decoration: underline;
}

.runtime-record-table__heading {
    align-items: center;
    display: flex;
    gap: .35rem;
    min-width: 0;
}

.runtime-record-table__cell > .runtime-record-table__heading,
.runtime-record-table__cell > .runtime-table-responsive__value {
    /* Bound intrinsic content sizing as well as the col/cell. A max-content
       table otherwise expands no-wrap text before ellipsis can take effect.
       Keep overflow on the value so header search panels remain visible. */
    max-width: var(--runtime-record-column-width, 100%);
    width: var(--runtime-record-column-width, auto);
}

.runtime-column-search {
    flex: 0 0 auto;
    margin-inline-start: auto;
    position: relative;
}

.runtime-record-table--personal-widths,
.runtime-record-table--resizing {
    /* User-sized columns must not stretch again to fill spare viewport space. */
    min-width: 0;
    width: max-content;
}

.runtime-record-table--resizable .runtime-record-table__heading,
.runtime-record-table--resizable .runtime-table-responsive__value {
    /* Keep values, including column-filling tags, clear of the same handle
       strip reserved by the header rather than touching the next column. */
    padding-inline-end: 1.5rem;
}
.runtime-record-table--resizing, .runtime-record-table--resizing * { cursor: col-resize; user-select: none; }
.runtime-record-table .runtime-column-width--preview {
    --runtime-record-column-width: calc(var(--runtime-drag-column-width) - (2 * var(--runtime-record-cell-padding-inline))) !important;
    width: var(--runtime-drag-column-width) !important;
    min-width: var(--runtime-drag-column-width) !important;
    max-width: var(--runtime-drag-column-width) !important;
}
.runtime-column-width { position: absolute; inset: 0 0 0 auto; width: 1.5rem; }
.runtime-column-width__handle {
    align-items: center;
    cursor: col-resize;
    display: flex;
    height: 100%;
    justify-content: center;
    list-style: none;
    min-height: 1.5rem;
    touch-action: none;
    width: 1.5rem;
}
.runtime-column-width__handle::-webkit-details-marker { display: none; }
.runtime-column-width__handle > span { border-inline-start: 2px solid var(--runtime-border-strong); height: 1.25rem; }
.runtime-column-width__handle:hover, .runtime-column-width__handle:focus-visible { background: var(--runtime-accent-soft); }
.runtime-column-width__handle:focus-visible { outline: 3px solid var(--runtime-focus); outline-offset: -3px; }
.runtime-record-table th:has(.runtime-column-width[open]) { z-index: 5; }
.runtime-column-width__panel {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border-strong);
    box-shadow: var(--runtime-shadow);
    color: var(--runtime-ink);
    font-weight: 400;
    padding: .75rem;
    position: absolute;
    right: 0;
    text-align: left;
    top: 100%;
    white-space: normal;
    width: 19rem;
}
.runtime-record-table th:nth-child(-n + 2) .runtime-column-width__panel { left: 100%; right: auto; }
.runtime-column-width__panel label { display: block; font-weight: 700; }
.runtime-column-width__panel p { font-size: .875rem; margin-block: .5rem; }
.runtime-column-width__panel input { width: 7rem; }
.runtime-column-width-status { margin-block: .5rem; }

.runtime-column-search__trigger {
    align-items: center;
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--runtime-radius);
    color: var(--runtime-heading);
    cursor: pointer;
    display: inline-flex;
    height: 1.75rem;
    justify-content: center;
    list-style: none;
    padding: 0;
    width: 1.75rem;
}

.runtime-column-search__trigger:hover {
    background: var(--runtime-accent-soft);
}

.runtime-column-search__trigger:focus-visible {
    border-color: var(--runtime-focus);
    box-shadow: 0 0 0 2px var(--runtime-focus);
    outline: none;
}

.runtime-column-search--open > .runtime-column-search__trigger {
    background: var(--runtime-accent-soft);
}

.runtime-record-table th:has(.runtime-column-search--open) {
    z-index: 4;
}

.runtime-column-search__panel {
    animation: runtime-column-search-open 140ms ease-out;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border-strong);
    border-radius: var(--runtime-radius);
    box-shadow: var(--runtime-shadow);
    color: var(--runtime-ink);
    left: 0;
    margin-block-start: .35rem;
    padding: .75rem;
    position: absolute;
    text-align: left;
    top: 100%;
    width: min(17.5rem, calc(100vw - 2rem));
}

.runtime-record-table th:nth-last-child(-n + 2) .runtime-column-search__panel {
    left: auto;
    right: 0;
}

.runtime-column-search__panel label {
    display: block;
    font-size: .875rem;
    margin-block-end: .35rem;
}

.runtime-column-search__controls {
    align-items: flex-end;
    display: grid;
    gap: .4rem;
    grid-template-columns: minmax(0, 12.5rem) auto;
}

.runtime-column-search__controls input {
    background: #fff;
    border: 1px solid var(--runtime-slate);
    border-radius: 0;
    color: #000;
    font: inherit;
    min-height: var(--runtime-control-height);
    min-width: 0;
    padding: .4rem .5rem;
    width: 100%;
}

.runtime-column-search__apply {
    font-size: .8rem;
    line-height: 1;
    margin: 0;
    min-height: 2rem;
    padding: .35rem .55rem;
}

.runtime-column-search__panel .runtime-error-message {
    font-size: .75rem;
    margin: .5rem 0 0;
}

@keyframes runtime-column-search-open {
    from {
        opacity: 0;
        transform: translateY(-.35rem) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .runtime-column-search__panel {
        animation: none;
    }
}

.runtime-record-table .runtime-cell--break-normal {
    overflow-wrap: normal;
    white-space: normal;
    word-break: normal;
}

.runtime-record-table .runtime-cell--break-anywhere {
    overflow-wrap: anywhere;
    word-break: normal;
}

.runtime-record-table .runtime-cell--break-word {
    overflow-wrap: break-word;
    word-break: normal;
}

.runtime-record-table .runtime-cell--auto-date:where(:not(.runtime-column-width--preview)) > .runtime-table-responsive__value {
    /* Include the entire date/time in automatic column sizing. Manual widths
       use ellipsis; the labelled mobile rows can still reflow. */
    overflow-wrap: normal;
    white-space: nowrap;
}

.runtime-record-table .runtime-cell--no-wrap,
.runtime-record-table .runtime-cell--truncate {
    overflow-wrap: normal;
    white-space: nowrap;
    word-break: normal;
}

.runtime-record-table .runtime-cell--truncate {
    overflow: hidden;
    text-overflow: ellipsis;
}

.runtime-record-table .runtime-cell--truncate:has(> .runtime-record-table__heading, > .runtime-table-responsive__value) {
    /* Clip text inside the cell, leaving column-search panels and the
       selection outline free to extend beyond the cell's padding box. */
    overflow: visible;
}

.runtime-record-table .runtime-cell--truncate .runtime-sort-link {
    min-width: 0;
}

.runtime-record-table .runtime-cell--truncate .runtime-record-table__heading-label,
.runtime-record-table .runtime-cell--truncate .runtime-table-responsive__value {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-record-table .runtime-cell--left {
    text-align: left;
}

.runtime-record-table .runtime-cell--center {
    text-align: center;
}

.runtime-record-table .runtime-cell--right {
    text-align: right;
}

.runtime-record-table .runtime-cell--center > .runtime-record-table__heading {
    justify-content: center;
}

.runtime-record-table .runtime-cell--right > .runtime-record-table__heading {
    justify-content: flex-end;
}

.runtime-record-table :is(.runtime-cell--center, .runtime-cell--right) .runtime-column-search {
    /* An auto margin would consume the free space and keep the heading left aligned. */
    margin-inline-start: 0;
}

.runtime-tag--compact {
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1.15;
    padding: .15rem .4rem;
}

.runtime-tag--full-width,
.runtime-tag--dynamic {
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.runtime-tag--dynamic {
    display: inline-block;
}

.runtime-tag--full-width {
    display: block;
    text-align: center;
    width: 100%;
}

.runtime-view-selector__option-kind {
    color: var(--runtime-slate);
    font-size: .75rem;
    font-weight: 400;
    margin-inline-start: auto;
    padding-inline-start: .75rem;
}

.runtime-record-table .runtime-tag--full-width {
    text-align: inherit;
}

/* Saved and live manual widths use the same value rules. Keep specificity at
   the mobile value rule's level so labelled rows can release desktop cropping. */
.runtime-record-table :is(.runtime-column-width--personal, .runtime-column-width--preview) > .runtime-table-responsive__value {
    overflow: hidden;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-record-table :is(.runtime-column-width--personal, .runtime-column-width--preview):where(.runtime-cell--tag) > .runtime-table-responsive__value,
.runtime-record-table :is(.runtime-column-width--personal, .runtime-column-width--preview) :is(.runtime-tag--full-width, .runtime-tag--dynamic) {
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.runtime-table-responsive__value {
    min-width: 0;
}

.runtime-record-list__footer {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 0 0;
}

.runtime-record-export-options {
    row-gap: 5px;
}

.runtime-record-export-options > .nhsuk-card-group__item {
    margin-bottom: 0;
}

.runtime-record-export-option {
    border: 1px solid var(--runtime-border);
    color: var(--runtime-ink);
    display: block;
    height: auto;
    margin-bottom: 0;
    text-decoration: none;
    transition:
        background-color .15s ease,
        border-color .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
    width: 100%;
}

.runtime-record-export-option .nhsuk-card__content {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: auto;
}

.runtime-record-export-option__heading {
    align-items: center;
    display: flex;
    gap: .75rem;
    margin-bottom: .75rem;
}

.runtime-record-export-option__heading > i {
    color: var(--runtime-heading);
    flex: 0 0 auto;
    font-size: 1.25rem;
    width: 1.5rem;
}

.runtime-record-export-option .nhsuk-card__heading,
.runtime-record-export-option p {
    margin: 0;
}

.runtime-record-export-option .nhsuk-card__heading {
    color: var(--runtime-heading);
    text-decoration: underline;
    text-decoration-thickness: .0625rem;
    text-underline-offset: .18rem;
}

.runtime-record-export-option__action {
    align-items: center;
    color: var(--runtime-heading);
    display: inline-flex;
    font-size: .875rem;
    font-weight: 700;
    gap: .4rem;
    margin-block-start: 0;
}

.runtime-record-export-option:hover {
    background: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 6%, #fff);
    border-color: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 42%, var(--runtime-border));
    box-shadow: 0 .25rem .65rem rgb(23 43 58 / 12%);
    color: var(--runtime-ink);
    transform: translateY(-1px);
}

.runtime-record-export-option:active {
    box-shadow: 0 .125rem .25rem rgb(23 43 58 / 10%);
    transform: translateY(0);
}

.runtime-record-export-option:focus-visible {
    background: var(--runtime-focus);
    color: #000;
}

.runtime-record-export-option:focus-visible :is(
    .nhsuk-card__heading,
    .runtime-record-export-option__action,
    .runtime-record-export-option__heading > i) {
    color: #000;
}

.runtime-record-list__page-size {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: .4rem;
}

.runtime-pagination__label,
.runtime-record-list__page-size label,
.runtime-pagination__page-picker label {
    color: var(--runtime-heading);
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.15;
}

.runtime-record-list__page-size select,
.runtime-pagination__page-picker select {
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--runtime-heading) 55%, #fff);
    border-radius: .125rem;
    box-shadow: 0 1px 2px rgb(23 43 58 / 12%);
    color: #000;
    font: inherit;
    min-height: 2.25rem;
    padding: .25rem 1.5rem .25rem .45rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.runtime-record-list__page-size select {
    min-width: 4rem;
}

.runtime-record-list__mobile-meta {
    display: none;
}

.runtime-record-list__page-size select:hover,
.runtime-pagination__page-picker select:hover {
    border-color: var(--runtime-accent-dark);
    box-shadow: 0 2px 4px rgb(23 43 58 / 16%);
}

.runtime-record-list__total,
.runtime-pagination__position {
    margin: 0;
}

.runtime-pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
}

.runtime-pagination__position {
    font-size: .875rem;
}

.runtime-pagination__list {
    display: flex;
    gap: .5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-pagination__list li {
    min-width: 5.5rem;
}

.runtime-pagination__list .nhsuk-button {
    width: 100%;
}

.runtime-pagination--record-list {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.runtime-pagination__list--record-list {
    align-items: center;
    display: grid;
    gap: clamp(.75rem, 2vw, 2rem);
    grid-template-columns: minmax(28rem, 1fr) auto;
    width: 100%;
}

.runtime-pagination__list--record-list .runtime-pagination__navigation {
    align-items: center;
    display: flex;
    gap: .5rem;
    justify-self: end;
    min-width: 0;
}

.runtime-pagination__list--record-list .runtime-pagination__icon-button {
    padding: 0;
    width: var(--runtime-control-height);
}

.runtime-pagination__list--record-list .runtime-pagination__summary {
    min-width: 0;
}

.runtime-pagination__summary p {
    align-items: center;
    display: grid;
    font-size: .875rem;
    gap: clamp(.5rem, 2.5vw, 3rem);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    text-align: center;
    width: 100%;
}

.runtime-pagination__summary .runtime-pagination__page-picker,
.runtime-pagination__summary .runtime-pagination__page-position {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
}

.runtime-pagination__summary .runtime-pagination__metric {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

.runtime-pagination__summary .runtime-record-list__page-size {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

.runtime-pagination__mobile {
    display: none;
}

.runtime-pagination__metric,
.runtime-pagination__page-position {
    align-items: baseline;
    display: inline-flex;
    gap: .35rem;
    white-space: nowrap;
}

.runtime-pagination__metric strong {
    color: #000;
    font-size: .9375rem;
    font-variant-numeric: tabular-nums;
}

.runtime-pagination__page-picker {
    align-items: center;
    display: inline-flex;
    gap: .35rem;
    white-space: nowrap;
}

.runtime-pagination__page-picker select {
    min-width: 3.5rem;
}

.runtime-record-list__page-size select:focus,
.runtime-pagination__page-picker select:focus {
    border-color: #212b32;
    box-shadow: 0 0 0 3px #ffeb3b;
    outline: 3px solid transparent;
}

.runtime-state {
    background: var(--runtime-surface);
    border-left: 5px solid var(--runtime-accent);
    margin: 1rem 0;
    max-width: 60rem;
    padding: 1rem 1.25rem;
}

.runtime-state h1,
.runtime-state h2 {
    color: var(--runtime-heading);
    margin-block: 0 .5rem;
}

.runtime-state p:last-child {
    margin-block-end: 0;
}

.runtime-state--error {
    border-left-color: var(--runtime-danger);
}

.runtime-state--empty {
    border-left-color: var(--runtime-slate);
}

.runtime-state--notice {
    border-left-color: #ffb81c;
}

.runtime-state--loading {
    align-items: center;
    display: flex;
    gap: .75rem;
}

.runtime-state__indicator {
    animation: runtime-spin .8s linear infinite;
    border: 3px solid var(--runtime-border);
    border-radius: 50%;
    border-top-color: var(--runtime-accent-dark);
    height: 1.4rem;
    width: 1.4rem;
}

.runtime-error-code {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: .875rem;
    overflow-wrap: anywhere;
}

.runtime-visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.runtime-record-link {
    color: inherit;
    font-weight: 400;
    text-decoration: none;
}

.runtime-record-link:visited,
.runtime-record-link:hover,
.runtime-record-link:active,
.runtime-record-link:focus-visible {
    color: inherit;
    text-decoration: none;
}

.runtime-record-details {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    max-width: none;
}

.runtime-state.runtime-record-details__loading {
    max-width: none;
    width: 100%;
}

.runtime-record-details--history {
    height: 100%;
    min-height: 0;
}

.runtime-record-details > .nhsuk-breadcrumb {
    flex: 0 0 auto;
}

.runtime-record-details--history .runtime-record-details__workspace {
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
}

.runtime-record-details--history .runtime-record-details__content,
.runtime-record-details--history .runtime-record-tabs {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.runtime-record-details--history .runtime-record-tabs {
    flex: 1 1 auto;
}

.runtime-record-details--history .runtime-record-details__sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Keep the Actions flydown outside the summary's scroll clipping boundary. */
.runtime-record-details--history .runtime-record-details__summary {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.runtime-record-details--history .runtime-record-tabs > nav {
    flex: 0 0 auto;
}

.runtime-record-details__workspace {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(17rem, 1fr) minmax(0, 2fr);
}

.runtime-record-details__workspace--single {
    grid-template-columns: minmax(0, 1fr);
}

.runtime-canonical-record__sections {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.runtime-canonical-history {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    box-shadow: 0 .2rem .75rem rgb(23 43 58 / 8%);
    min-width: 0;
    padding: 1.25rem;
}

.runtime-canonical-history__entries {
    display: grid;
    gap: .75rem;
}

.runtime-canonical-history__entries > p {
    margin: 0;
}

.runtime-canonical-history__footer {
    align-items: center;
    border-top: 1px solid var(--runtime-border);
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
}

.runtime-canonical-history__footer p,
.runtime-canonical-history__footer .nhsuk-button {
    margin-block-end: 0;
}

.runtime-user-lifecycle {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-left: .35rem solid var(--runtime-shell-accent);
    border-radius: .35rem;
    box-shadow: 0 .125rem .4rem rgb(23 43 58 / 8%);
    padding: 1.25rem;
}

.runtime-user-lifecycle h2 {
    margin-bottom: .4rem;
}

.runtime-user-lifecycle__controls {
    display: block;
}

.runtime-user-lifecycle__controls .nhsuk-form-group,
.runtime-user-lifecycle__controls .nhsuk-button {
    margin-bottom: 0;
}

.runtime-user-lifecycle__actions {
    margin-top: 1rem;
}

.runtime-user-lifecycle__message {
    border-left: .3rem solid var(--runtime-success);
    margin: 1rem 0 0;
    padding: .65rem .85rem;
}

.runtime-user-lifecycle__message--error {
    border-left-color: var(--runtime-danger);
}

.runtime-system-activity-notice {
    display: grid;
    gap: .25rem;
    padding: 1rem 1.25rem;
    border-left: .35rem solid var(--runtime-shell-accent);
    background: var(--runtime-surface-muted);
}

.runtime-admin-workspace {
    display: grid;
    gap: 1.5rem;
    margin: 0;
    max-width: none;
    width: 100%;
}

.runtime-admin-workspace--form-builder,
.runtime-admin-workspace--full {
    max-width: none;
    width: 100%;
}

.runtime-main--administration:has(> .runtime-admin-journey) {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    padding-bottom: var(--runtime-space-1);
}

.runtime-shell:has(
    > .runtime-main--administration > .runtime-admin-journey)
    > .runtime-footer {
    display: none;
}

.runtime-admin-journey {
    background: var(--runtime-canvas);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    box-shadow: 0 .2rem .75rem rgb(23 43 58 / 8%);
    display: grid;
    grid-template-rows: max-content minmax(0, 1fr) max-content;
    height: 100%;
    margin: 0;
    max-width: none;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}

.runtime-admin-journey__header {
    align-items: center;
    background: var(--runtime-surface);
    border-bottom: 1px solid var(--runtime-border);
    display: grid;
    gap: var(--runtime-space-3);
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: var(--runtime-space-1) var(--runtime-space-3);
}

.runtime-admin-journey__header--with-progress {
    grid-template-columns: minmax(13rem, .7fr) minmax(30rem, 1.7fr);
}

.runtime-admin-journey__header--progress-only {
    grid-template-columns: minmax(0, 1fr);
}

.runtime-admin-journey__header--accessibility-only {
    border: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
}

.runtime-admin-journey__heading {
    min-width: 0;
}

.runtime-admin-journey__heading > h1 {
    font-size: 1.125rem;
    line-height: 1.2;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-admin-journey__heading > p {
    color: var(--runtime-muted);
    font-size: .75rem;
    line-height: 1.2;
    margin: var(--runtime-space-1) 0 0;
}

.runtime-admin-journey__progress {
    min-width: 0;
    padding: 5px;
}

.runtime-admin-journey__content {
    min-height: 0;
    overflow: auto;
    padding: var(--runtime-space-4);
}

.runtime-sla-workspace {
    gap: var(--runtime-space-4);
}

.runtime-sla-workspace > .runtime-admin-workspace__header,
.runtime-sla-workspace > .runtime-admin-panel,
.runtime-sla-workspace__secondary-grid > .runtime-admin-panel {
    padding: var(--runtime-space-4);
}

.runtime-sla-workspace .runtime-admin-panel > h2 {
    margin-bottom: var(--runtime-space-2);
}

.runtime-sla-workspace .runtime-admin-panel > p {
    margin-bottom: var(--runtime-space-3);
}

.runtime-sla-workspace .runtime-admin-plan-list {
    gap: var(--runtime-space-2);
}

.runtime-sla-workspace__secondary-grid {
    align-items: start;
    display: grid;
    gap: var(--runtime-space-4);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.runtime-sla-workspace__calendar-summary {
    margin-bottom: 0;
}

@media (max-width: 64rem) {
    .runtime-sla-workspace__secondary-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.runtime-sla-editor__content {
    padding: var(--runtime-space-3);
}

.runtime-sla-editor__step {
    margin-inline: auto;
    max-width: 72rem;
    min-width: 0;
    width: 100%;
}

.runtime-sla-editor__step > h2,
.runtime-sla-editor__calendar-section > h3 {
    margin-bottom: var(--runtime-space-1);
}

.runtime-sla-editor__step > h2 {
    font-size: 1.5rem;
    line-height: 1.2;
}

.runtime-sla-editor__step > h2:focus {
    outline: none;
}

.runtime-sla-editor__calendar-section > h3 {
    font-size: 1.25rem;
    line-height: 1.2;
}

.runtime-sla-editor__form-grid,
.runtime-sla-editor__warning-grid {
    display: grid;
    gap: var(--runtime-space-3);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 64rem;
}

.runtime-sla-editor__form-grid > .nhsuk-form-group,
.runtime-sla-editor__warning-grid > .nhsuk-form-group,
.runtime-sla-editor__duration-grid > .nhsuk-form-group,
.runtime-sla-editor__interval-row > .nhsuk-form-group,
.runtime-sla-editor__date-action > .nhsuk-form-group {
    margin-bottom: 0;
}

.runtime-sla-editor__field--wide,
.runtime-sla-editor__warning-form {
    grid-column: 1 / -1;
}

.runtime-sla-editor__duration-grid {
    display: grid;
    gap: var(--runtime-space-2);
    grid-template-columns: repeat(3, minmax(5.5rem, 7rem));
}

.runtime-sla-editor__calendar-section {
    margin-top: var(--runtime-space-4);
}

.runtime-sla-editor__calendar-section
    .runtime-record-page-designer__section-tabs {
    margin-top: var(--runtime-space-2);
    overflow-y: hidden;
}

.runtime-sla-editor__day-panel {
    padding: var(--runtime-space-3);
}

.runtime-sla-editor__interval-row {
    align-items: end;
    display: grid;
    gap: var(--runtime-space-2);
    grid-template-columns: repeat(2, minmax(7rem, 9rem)) max-content;
    margin-bottom: var(--runtime-space-2);
}

.runtime-sla-editor__interval-row > .nhsuk-button,
.runtime-sla-editor__date-action > .nhsuk-button {
    margin: 0 0 3px;
}

.runtime-sla-editor__empty-day {
    color: var(--runtime-muted);
    margin-top: 0;
}

.runtime-sla-editor__date-action {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: var(--runtime-space-2);
}

.runtime-sla-editor__excluded-dates {
    display: grid;
    gap: var(--runtime-space-1);
    margin-top: var(--runtime-space-2);
    max-width: 32rem;
}

.runtime-sla-editor__excluded-dates > li {
    align-items: center;
    border-bottom: 1px solid var(--runtime-border);
    display: flex;
    gap: var(--runtime-space-2);
    justify-content: space-between;
    padding-bottom: var(--runtime-space-1);
}

.runtime-sla-editor__excluded-dates .nhsuk-button {
    margin: 0;
}

.runtime-sla-editor__warning {
    margin-bottom: var(--runtime-space-3);
    padding: var(--runtime-space-3);
}

.runtime-sla-editor__warning > .nhsuk-button {
    margin: var(--runtime-space-2) 0 0;
}

.runtime-sla-editor .nhsuk-error-summary__list .runtime-error-code {
    display: block;
    margin-top: .25rem;
}

.runtime-sla-editor__breach-form,
.runtime-sla-editor__retirement {
    max-width: 48rem;
}

.runtime-sla-editor__retirement {
    margin-top: var(--runtime-space-4);
}

@media (max-width: 40rem) {
    .runtime-sla-editor__form-grid,
    .runtime-sla-editor__warning-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-sla-editor__field--wide,
    .runtime-sla-editor__warning-form {
        grid-column: auto;
    }

    .runtime-sla-editor__interval-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .runtime-sla-editor__interval-row > .nhsuk-button {
        grid-column: 1 / -1;
        justify-content: center;
        margin-bottom: 0;
        width: 100%;
    }
}

.runtime-record-layout-editor,
.runtime-record-layout-editor > fieldset,
.runtime-record-layout-editor .runtime-admin-step,
.runtime-record-layout-editor
    .runtime-record-page-designer__section-panel {
    box-sizing: border-box;
    max-width: 100%;
    min-inline-size: 0;
    min-width: 0;
    width: 100%;
}

.runtime-record-layout-colour-selector {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--runtime-space-2);
}

.runtime-record-layout-colour-selector__input {
    background: var(--runtime-surface);
    border: 2px solid var(--runtime-border-strong);
    box-sizing: border-box;
    cursor: pointer;
    height: 2.5rem;
    padding: .15rem;
    width: 3.5rem;
}

.runtime-record-layout-colour-selector__input:focus-visible {
    border-color: var(--runtime-heading);
    box-shadow: 0 0 0 .2rem var(--runtime-focus);
    outline: 0;
}

.runtime-admin-journey__footer {
    background: var(--runtime-surface);
    border-top: 1px solid var(--runtime-border);
    padding: var(--runtime-space-2) var(--runtime-space-3);
}

.runtime-admin-journey__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--runtime-space-3);
    justify-content: flex-end;
}

.runtime-admin-journey__actions > .nhsuk-button,
.runtime-admin-journey__actions > .nhsuk-button-group {
    margin: 0;
}

.runtime-admin-journey__progress .runtime-admin-steps--compact {
    gap: var(--runtime-space-2);
    margin: 0;
}

.runtime-admin-field-action-row {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: var(--runtime-space-2);
}

.runtime-admin-field-action-row > .nhsuk-select {
    flex: 1 1 20rem;
    min-width: 0;
}

.runtime-admin-field-action-row > .nhsuk-button {
    margin: 0;
}

.runtime-admin-steps--compact .runtime-admin-steps__button,
.runtime-admin-steps--compact .runtime-admin-steps__content {
    font-size: .8125rem;
    gap: var(--runtime-space-1);
    min-height: 1.75rem;
    padding: 0 0 var(--runtime-space-1);
}

.runtime-admin-steps--compact .runtime-admin-steps__number {
    flex-basis: 1.25rem;
    font-size: .75rem;
    height: 1.25rem;
}

.runtime-admin-steps--compact .runtime-admin-steps__item--current
    .runtime-admin-steps__button,
.runtime-admin-steps--compact .runtime-admin-steps__item--current
    .runtime-admin-steps__content {
    font-size: .8125rem;
}

@media (max-width: 64rem) {
    .runtime-admin-journey__header--with-progress {
        align-items: stretch;
        gap: var(--runtime-space-2);
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-admin-journey__heading > h1 {
        white-space: normal;
    }
}

@media (max-width: 40rem) {
    .runtime-admin-field-action-row {
        align-items: stretch;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-admin-journey__progress .runtime-admin-steps--compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .runtime-admin-steps--compact .runtime-admin-steps__button,
    .runtime-admin-steps--compact .runtime-admin-steps__content {
        font-size: 0;
        justify-content: center;
    }

    .runtime-admin-steps--compact .runtime-admin-steps__number,
    .runtime-admin-steps--compact
        .runtime-admin-steps__item--current
        .runtime-admin-steps__button,
    .runtime-admin-steps--compact
        .runtime-admin-steps__item--current
        .runtime-admin-steps__content {
        font-size: .875rem;
    }

    .runtime-admin-journey__actions {
        align-items: stretch;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-admin-journey__actions > .nhsuk-button {
        justify-content: center;
        text-align: center;
        width: 100%;
    }
}

.runtime-admin-workspace__header {
    background:
        radial-gradient(circle at 92% 8%, rgb(51 0 114 / 12%), transparent 38%),
        var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-left: .4rem solid var(--runtime-shell-accent);
    border-radius: .5rem;
    box-shadow: 0 .2rem .75rem rgb(23 43 58 / 8%);
    padding: 1.5rem;
}

.runtime-admin-workspace__header h1,
.runtime-admin-workspace__header p:last-child {
    margin-bottom: 0;
}

.runtime-admin-workspace__eyebrow {
    color: var(--runtime-shell-accent);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .08em;
    margin: 0 0 .35rem;
    text-transform: uppercase;
}

.runtime-admin-boundary {
    background: color-mix(
        in srgb,
        var(--runtime-shell-accent) 7%,
        var(--runtime-surface));
    border-left: .35rem solid var(--runtime-shell-accent);
    display: grid;
    gap: .25rem;
    padding: 1rem 1.25rem;
}

.runtime-admin-destinations {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.runtime-admin-destination,
.runtime-admin-destination:visited {
    border-top: .25rem solid var(--runtime-shell-accent);
    color: var(--runtime-ink);
    margin: 0;
    text-decoration: none;
}

.runtime-admin-destination[aria-disabled="true"] {
    background: var(--runtime-surface-muted);
    border-top-color: var(--runtime-border-strong);
}

.runtime-admin-destination__icon {
    align-items: center;
    background: color-mix(
        in srgb,
        var(--runtime-shell-accent) 12%,
        var(--runtime-surface));
    border-radius: .35rem;
    color: var(--runtime-shell-accent);
    display: inline-flex;
    height: 2.5rem;
    justify-content: center;
    margin-bottom: .75rem;
    width: 2.5rem;
}

.runtime-admin-destination__status {
    color: var(--runtime-muted);
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: .75rem;
    text-transform: uppercase;
}

.runtime-admin-empty {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    box-shadow: 0 .2rem .75rem rgb(23 43 58 / 8%);
    padding: 1.5rem;
}

.runtime-admin-empty h2,
.runtime-admin-empty p:last-child {
    margin-bottom: 0;
}

.runtime-admin-panel {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    box-shadow: 0 .2rem .75rem rgb(23 43 58 / 8%);
    padding: 1.5rem;
}

.runtime-admin-panel > h2 {
    margin-top: 0;
}

.runtime-admin-danger-zone {
    border-top: 1px solid var(--runtime-border);
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.runtime-admin-danger-zone > h2 {
    margin-top: 0;
}

.runtime-configuration-seed-grid {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.runtime-configuration-seed-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .75rem;
}

.runtime-configuration-seed-actions .nhsuk-button {
    margin-bottom: 0;
}

.runtime-admin-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .75rem;
}

.runtime-admin-button-row .nhsuk-button {
    margin-bottom: 0;
}

.runtime-configuration-seed-selection {
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    display: grid;
    gap: .25rem;
    margin-bottom: 1.25rem;
    max-height: 22rem;
    overflow: auto;
    padding: .75rem;
}

.runtime-form-access-roles {
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    display: grid;
    gap: .25rem;
    margin-bottom: 1rem;
    max-height: 22rem;
    overflow: auto;
    padding: .75rem;
}

.runtime-admin-plan-list {
    display: grid;
    gap: .75rem;
}

.runtime-permission-role-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.runtime-permission-role-list > article {
    min-width: 0;
}

.runtime-permission-role-card {
    align-items: flex-start;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-left: .3rem solid var(--runtime-shell-accent);
    border-radius: .35rem;
    color: var(--runtime-ink);
    display: flex;
    font: inherit;
    gap: 1rem;
    height: 100%;
    justify-content: space-between;
    min-height: 9.5rem;
    padding: 1.25rem;
    text-align: left;
    width: 100%;
}

button.runtime-permission-role-card {
    cursor: pointer;
}

button.runtime-permission-role-card:hover {
    background: var(--runtime-surface-muted);
    border-color: var(--runtime-shell-accent);
}

.runtime-permission-role-card--protected {
    border-left-color: var(--runtime-success);
}

.runtime-permission-role-card__content {
    align-self: stretch;
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.runtime-permission-role-card__name,
.runtime-permission-role-card__description,
.runtime-permission-role-card__reference {
    display: block;
}

.runtime-permission-role-card__name {
    line-height: 1;
    margin-bottom: 1.5rem;
}
.runtime-permission-role-card > i {
    align-self: center;
    color: var(--runtime-shell-accent);
    flex: 0 0 auto;
}

.runtime-permission-role-card__summary {
    color: var(--runtime-heading);
    display: block;
    font-size: .9rem;
    font-weight: 700;
    margin-top: .75rem;
}

.runtime-permission-add-role {
    flex: 0 0 auto;
    white-space: nowrap;
}

.runtime-permission-modal-summary {
    background: var(--runtime-accent-soft);
    border-left: .3rem solid var(--runtime-shell-accent);
    font-weight: 700;
    padding: .75rem 1rem;
}

.runtime-permission-access-list {
    display: grid;
}

.runtime-permission-access-row {
    align-items: center;
    border-bottom: 1px solid var(--runtime-border);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: .9rem 1rem;
}

.runtime-permission-access-row:last-child {
    border-bottom: 0;
}

.runtime-permission-access-row > span,
.runtime-permission-access-row strong {
    display: block;
}

.runtime-permission-access-row > span > span {
    color: var(--runtime-slate);
    font-size: .9rem;
    margin-top: .15rem;
}

.runtime-permission-switch {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: .5rem;
    min-width: 5rem;
}

.runtime-permission-switch__input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.runtime-permission-switch__track {
    align-items: center;
    background: var(--runtime-slate);
    border: 2px solid var(--runtime-slate);
    border-radius: 1rem;
    display: inline-flex;
    height: 1.75rem;
    padding: .12rem;
    transition: background-color .15s ease;
    width: 3rem;
}

.runtime-permission-switch__thumb {
    background: var(--runtime-surface);
    border-radius: 50%;
    box-shadow: 0 1px 2px rgb(0 0 0 / 30%);
    display: block;
    height: 1.15rem;
    transform: translateX(0);
    transition: transform .15s ease;
    width: 1.15rem;
}

.runtime-permission-switch__input:checked +
    .runtime-permission-switch__track {
    background: var(--runtime-success);
    border-color: var(--runtime-success);
}

.runtime-permission-switch__input:checked +
    .runtime-permission-switch__track
    .runtime-permission-switch__thumb {
    transform: translateX(1.2rem);
}

.runtime-permission-switch__input:focus-visible +
    .runtime-permission-switch__track {
    box-shadow: 0 0 0 3px #000;
    outline: 3px solid var(--runtime-focus);
    outline-offset: 0;
}

.runtime-permission-switch__state {
    font-weight: 700;
    min-width: 1.8rem;
}

.runtime-permission-primary-tabs {
    margin: 1.5rem 0;
    padding: 0;
}

.runtime-permission-expander-list {
    display: grid;
    gap: .75rem;
    margin: 1.5rem 0;
}

.runtime-permission-expander {
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    overflow: hidden;
}

.runtime-permission-expander__heading {
    margin: 0;
}

.runtime-permission-expander__toggle {
    align-items: center;
    background: var(--runtime-surface-muted);
    border: 0;
    color: var(--runtime-heading);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-weight: 700;
    gap: 1rem;
    justify-content: space-between;
    padding: .9rem 1rem;
    text-align: left;
    width: 100%;
}

.runtime-permission-expander__toggle:hover {
    background: var(--runtime-accent-soft);
}

.runtime-permission-expander__toggle > span,
.runtime-permission-expander__count {
    display: block;
}

.runtime-permission-expander__count {
    color: var(--runtime-slate);
    font-size: .85rem;
    font-weight: 400;
    margin-top: .15rem;
}

.runtime-permission-expander__icon {
    flex: 0 0 auto;
    transition: transform .25s ease;
}

.runtime-permission-expander__icon--open {
    transform: rotate(180deg);
}

.runtime-permission-expander__panel {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
        grid-template-rows .28s ease,
        opacity .2s ease;
}

.runtime-permission-expander__panel--open {
    grid-template-rows: 1fr;
    opacity: 1;
}

.runtime-permission-expander__content {
    min-height: 0;
    overflow: hidden;
}

.runtime-permission-expander__panel--open
    .runtime-permission-expander__content {
    border-top: 1px solid var(--runtime-border);
}

@media (prefers-reduced-motion: reduce) {
    .runtime-permission-expander__icon,
    .runtime-permission-expander__panel {
        transition-duration: .01ms;
    }
}

@media (max-width: 40rem) {
    .runtime-permission-access-row {
        align-items: start;
        grid-template-columns: minmax(0, 1fr);
    }
}

.runtime-admin-plan-item {
    align-items: center;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.runtime-inbound-status-card {
    align-items: stretch;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-left: .3rem solid var(--runtime-shell-accent);
    border-radius: .35rem;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    padding: 1rem;
}

.runtime-inbound-status-card > .runtime-form-draft-summary {
    align-items: flex-start;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.runtime-inbound-status-card > .runtime-form-draft-summary > :first-child {
    min-width: 0;
}

.runtime-inbound-status-card > p {
    margin-block: 0;
}

.runtime-inbound-attention-card__diagnosis {
    border-top: 1px solid var(--runtime-border);
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 1rem;
}

.runtime-inbound-attention-card__diagnosis h4,
.runtime-inbound-attention-card__diagnosis p {
    margin-block: 0;
}

.runtime-inbound-attention-card__diagnosis h4 {
    margin-bottom: .25rem;
}

.runtime-inbound-manual-review {
    border-top: 1px solid var(--runtime-border);
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding-top: 1rem;
}

.runtime-inbound-manual-review__heading,
.runtime-inbound-manual-form__header {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    min-width: 0;
}

.runtime-inbound-manual-review__heading > div,
.runtime-inbound-manual-form__header > div {
    flex: 1 1 22rem;
    min-width: 0;
}

.runtime-inbound-manual-review__heading h3,
.runtime-inbound-manual-review__heading p,
.runtime-inbound-manual-form__header h4 {
    margin-block: 0;
}

.runtime-inbound-manual-review__heading p {
    margin-top: .25rem;
}

.runtime-inbound-manual-review__heading > .nhsuk-button {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.runtime-inbound-manual-review__summary {
    background: var(--runtime-surface-muted);
    border-left: .3rem solid var(--runtime-shell-accent);
    min-width: 0;
    padding: .75rem 1rem;
}

.runtime-inbound-manual-review__summary > :first-child,
.runtime-inbound-manual-review__summary > :last-child {
    margin-block: 0;
}

.runtime-inbound-manual-review__bulk {
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding: 1rem;
}

.runtime-inbound-manual-review__bulk > h4,
.runtime-inbound-manual-review__bulk > p,
.runtime-inbound-manual-review__bulk-editor > h5,
.runtime-inbound-manual-review__bulk-editor > p {
    margin-block: 0;
}

.runtime-inbound-manual-review__problem-list {
    display: grid;
    gap: .75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-inbound-manual-review__problem-list > li {
    align-items: flex-start;
    background: var(--runtime-surface);
    border-left: .25rem solid var(--runtime-shell-accent);
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    justify-content: space-between;
    min-width: 0;
    padding: .75rem;
}

.runtime-inbound-manual-review__problem-list > li > div {
    display: grid;
    flex: 1 1 22rem;
    gap: .2rem;
    min-width: 0;
}

.runtime-inbound-manual-review__problem-list .nhsuk-button {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.runtime-inbound-manual-review__bulk-editor {
    background: var(--runtime-surface);
    border-top: 1px solid var(--runtime-border);
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding: 1rem;
}

.runtime-inbound-manual-review__bulk-editor .runtime-form-question,
.runtime-inbound-manual-review__bulk-editor input,
.runtime-inbound-manual-review__bulk-editor select,
.runtime-inbound-manual-review__bulk-editor textarea {
    max-width: 100%;
    min-width: 0;
}

.runtime-inbound-manual-review__forms {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.runtime-inbound-manual-form {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-left: .3rem solid var(--runtime-shell-accent);
    border-radius: .35rem;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 1rem;
}

.runtime-inbound-manual-form > .runtime-form__layout,
.runtime-inbound-manual-form .runtime-form__page,
.runtime-inbound-manual-form .runtime-form__question,
.runtime-inbound-manual-form .runtime-form__field {
    min-width: 0;
    width: 100%;
}

.runtime-inbound-manual-form input,
.runtime-inbound-manual-form select,
.runtime-inbound-manual-form textarea {
    max-width: 100%;
}

.runtime-inbound-manual-form .runtime-form__actions {
    flex-wrap: wrap;
}

.runtime-inbound-run-card__progress {
    inline-size: min(100%, 48rem);
    max-inline-size: 100%;
}

.runtime-admin-run-progress {
    inline-size: min(100%, 48rem);
    max-inline-size: 100%;
}

.runtime-admin-subsection {
    border-block: 1px solid var(--runtime-border);
    margin-block: 1.5rem;
    padding-block: 1.25rem;
}

.runtime-scheduled-rule-operations {
    border-top: 1px solid var(--runtime-border);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.runtime-scheduled-rule-run-card > .nhsuk-button {
    justify-self: start;
    margin-bottom: 0;
}

.runtime-inbound-status-card > .nhsuk-button {
    justify-self: start;
    margin-bottom: 0;
}

.runtime-record-layout-expander,
.runtime-admin-catalogue-expander {
    border-left: .3rem solid var(--runtime-shell-accent);
}

.runtime-record-layout-expander__toggle,
.runtime-admin-catalogue-expander__toggle {
    background: var(--runtime-surface);
    font-size: 1rem;
    line-height: 1.25;
    padding: .75rem 1rem;
}

.runtime-record-layout-expander__toggle
    > .runtime-record-layout-expander__summary,
.runtime-admin-catalogue-expander__toggle
    > .runtime-admin-catalogue-expander__summary {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
}

.runtime-record-layout-expander__summary > span:first-child,
.runtime-admin-catalogue-expander__summary > span:first-child {
    min-width: 0;
}

.runtime-record-layout-expander__summary strong,
.runtime-admin-catalogue-expander__summary strong {
    display: block;
}

.runtime-record-layout-expander__actions,
.runtime-admin-catalogue-expander__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    list-style: none;
    margin: 0;
    padding: .75rem 1rem 1rem;
}

.runtime-record-layout-expander__actions > li,
.runtime-admin-catalogue-expander__actions > li {
    margin: 0;
}

.runtime-record-layout-expander__action,
.runtime-record-layout-expander__action:link,
.runtime-record-layout-expander__action:visited,
.runtime-admin-catalogue-expander__action,
.runtime-admin-catalogue-expander__action:link,
.runtime-admin-catalogue-expander__action:visited {
    margin: 0;
}

.runtime-record-layout-expander__action--destructive,
.runtime-record-layout-expander__action--destructive:link,
.runtime-record-layout-expander__action--destructive:visited,
.runtime-admin-catalogue-expander__action--destructive,
.runtime-admin-catalogue-expander__action--destructive:link,
.runtime-admin-catalogue-expander__action--destructive:visited {
    color: var(--runtime-danger);
}

.runtime-admin-catalogue-expander__details {
    padding: 0 1rem 1rem;
}

.runtime-admin-catalogue-expander__details > :last-child {
    margin-bottom: 0;
}

@media (max-width: 40rem) {
    .runtime-record-layout-expander__summary,
    .runtime-admin-catalogue-expander__summary {
        align-items: start;
        flex-direction: column;
        gap: .35rem;
    }

    .runtime-record-layout-expander__actions,
    .runtime-admin-catalogue-expander__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-record-layout-expander__action,
    .runtime-admin-catalogue-expander__action {
        width: 100%;
    }
}

.runtime-admin-plan-card,
.runtime-admin-plan-card:visited,
.runtime-form-draft-summary {
    align-items: center;
    border: 1px solid var(--runtime-border);
    border-left: .3rem solid var(--runtime-shell-accent);
    border-radius: .35rem;
    color: var(--runtime-ink);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
    text-decoration: none;
}

.runtime-admin-plan-card:hover {
    background: var(--runtime-surface-muted);
    border-color: var(--runtime-shell-accent);
}

.runtime-admin-plan-card strong,
.runtime-admin-plan-card code,
.runtime-form-draft-summary strong {
    display: block;
}

.runtime-admin-reference {
    color: var(--runtime-muted);
    display: block;
    font-size: .9rem;
    margin-top: .2rem;
}

.runtime-admin-plan-card__state {
    color: var(--runtime-shell-accent);
    font-size: .85rem;
    font-weight: 800;
    white-space: nowrap;
}

.runtime-admin-actions {
    min-width: 16rem;
    position: relative;
    width: 16rem;
    z-index: 1;
}

.runtime-admin-actions[data-expanded="true"] {
    z-index: 30;
}

.runtime-admin-actions__toggle {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin: 0;
    width: 100%;
}

.runtime-admin-actions__chevron {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    height: .5rem;
    margin: -.2rem .15rem 0 .25rem;
    transform: rotate(45deg);
    transition: transform .18s ease;
    width: .5rem;
}

.runtime-admin-actions[data-expanded="true"]
    .runtime-admin-actions__chevron {
    margin-top: .2rem;
    transform: rotate(225deg);
}

.runtime-admin-actions--opens-up .runtime-admin-actions__chevron {
    margin-top: .2rem;
    transform: rotate(225deg);
}

.runtime-admin-actions--opens-up[data-expanded="true"]
    .runtime-admin-actions__chevron {
    margin-top: -.2rem;
    transform: rotate(45deg);
}

.runtime-admin-actions__panel {
    background: var(--runtime-surface);
    border: 2px solid var(--runtime-shell-accent);
    border-radius: .35rem;
    box-shadow: 0 .5rem 1.25rem rgb(33 43 50 / 20%);
    min-width: 16rem;
    opacity: 0;
    overflow: hidden;
    padding: .5rem;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: calc(100% + .25rem);
    transform: translateY(-.25rem);
    transition:
        opacity .15s ease,
        transform .18s ease,
        visibility 0s linear .18s;
    visibility: hidden;
}

.runtime-admin-actions--opens-up .runtime-admin-actions__panel {
    bottom: calc(100% + .25rem);
    top: auto;
    transform: translateY(.25rem);
}

.runtime-admin-actions[data-expanded="true"]
    .runtime-admin-actions__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
    visibility: visible;
}

.runtime-admin-actions__panel ul {
    display: grid;
    gap: .375rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-admin-actions__panel li {
    border: 1px solid var(--runtime-border);
    border-radius: .25rem;
    margin: 0;
    overflow: hidden;
}

.runtime-admin-actions__item,
.runtime-admin-actions__item:link,
.runtime-admin-actions__item:visited {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--runtime-heading);
    cursor: pointer;
    display: block;
    font: inherit;
    font-weight: 700;
    height: auto;
    margin: 0;
    min-height: 0;
    padding: .75rem 1rem;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.runtime-admin-actions__item::before,
.runtime-admin-actions__item::after {
    content: none;
    display: none;
}

.runtime-admin-actions__item:hover {
    background: var(--runtime-surface-muted);
    color: var(--runtime-heading);
    text-decoration: underline;
}

.runtime-admin-actions__item:focus-visible {
    background: var(--runtime-focus);
    box-shadow: inset 0 -.2rem 0 var(--runtime-ink);
    color: var(--runtime-ink);
    outline: 0;
    text-decoration: none;
}

.runtime-admin-actions__item:disabled {
    background: transparent;
    color: var(--runtime-muted);
    cursor: not-allowed;
    opacity: .7;
}

.runtime-admin-actions__item--destructive,
.runtime-admin-actions__item--destructive:link,
.runtime-admin-actions__item--destructive:visited {
    color: var(--runtime-danger);
}

.runtime-admin-delete-confirmation,
.runtime-admin-action-confirmation {
    grid-column: 1 / -1;
    margin-bottom: .5rem;
}

.runtime-admin-steps {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 1.5rem 0 2rem;
    padding: 0;
}

.runtime-admin-steps__item {
    border-bottom: .25rem solid var(--runtime-border);
    color: var(--runtime-muted);
    margin: 0;
    padding: 0;
}

.runtime-admin-steps__button,
.runtime-admin-steps__content {
    align-items: center;
    background: transparent;
    color: inherit;
    display: flex;
    font: inherit;
    font-size: .875rem;
    font-weight: 700;
    gap: .6rem;
    min-height: 3rem;
    padding: .5rem 0 .75rem;
    text-align: left;
    width: 100%;
}

.runtime-admin-steps__button {
    appearance: none;
    border: 0;
    cursor: pointer;
}

.runtime-admin-steps__button:disabled {
    cursor: default;
    opacity: 1;
}

.runtime-admin-steps__number {
    align-items: center;
    background: var(--runtime-border);
    border-radius: 50%;
    color: var(--runtime-ink);
    display: inline-flex;
    flex: 0 0 2rem;
    height: 2rem;
    justify-content: center;
}

.runtime-admin-steps__item--current {
    border-bottom-color: var(--runtime-shell-accent);
    color: var(--runtime-ink);
}

.runtime-admin-steps__item--current .runtime-admin-steps__button,
.runtime-admin-steps__item--current .runtime-admin-steps__content {
    font-size: 1rem;
}

.runtime-admin-steps__item--current .runtime-admin-steps__number,
.runtime-admin-steps__item--complete .runtime-admin-steps__number {
    background: var(--runtime-shell-accent);
    color: #fff;
}

.runtime-admin-steps__item--complete {
    border-bottom-color: color-mix(
        in srgb,
        var(--runtime-shell-accent) 50%,
        var(--runtime-border));
    color: var(--runtime-ink);
}

.runtime-admin-step > h3 {
    margin-top: 0;
}

.runtime-admin-definition-group {
    border-top: 1px solid var(--runtime-border);
    margin: 2rem 0;
    padding-top: 1.5rem;
}

.runtime-admin-definition-row {
    align-items: end;
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(12rem, 1fr) minmax(12rem, 1fr) auto;
    margin-bottom: 1rem;
    padding: 1rem;
}

.runtime-admin-definition-row--field {
    grid-template-columns:
        minmax(10rem, 1fr)
        minmax(10rem, 1fr)
        minmax(8rem, auto)
        minmax(7rem, auto)
        auto;
}

.runtime-admin-definition-row .nhsuk-form-group,
.runtime-admin-row-action {
    margin-bottom: 0;
}

.runtime-admin-result {
    margin-top: 1.5rem;
}

.runtime-admin-result:focus {
    outline: 4px solid #ffdd00;
    outline-offset: 4px;
}

.runtime-admin-apply {
    border-top: 1px solid var(--runtime-border);
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.runtime-admin-apply .nhsuk-checkboxes {
    margin-bottom: 1.5rem;
}

.runtime-admin-delete {
    border-top: 1px solid var(--runtime-border);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.runtime-admin-steps--one {
    grid-template-columns: minmax(0, 1fr);
}

.runtime-admin-steps--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.runtime-admin-steps--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.runtime-admin-steps--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.runtime-admin-steps--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.runtime-admin-steps--six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.runtime-admin-steps--seven {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.runtime-admin-definition-heading,
.runtime-layout-editor-row,
.runtime-layout-editor-row__actions,
.runtime-layout-editor-sort,
.runtime-layout-editor-options {
    align-items: center;
    display: flex;
    gap: .75rem;
}

.runtime-admin-definition-heading,
.runtime-layout-editor-row {
    justify-content: space-between;
}

.runtime-admin-definition-heading h3,
.runtime-layout-editor-row .nhsuk-button,
.runtime-layout-editor-row__actions .nhsuk-button {
    margin-bottom: 0;
}

.runtime-layout-editor-row {
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    margin-bottom: .75rem;
    padding: .75rem;
}

.runtime-layout-editor-row__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.runtime-layout-editor-sort,
.runtime-layout-editor-options {
    align-items: start;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.25rem;
}

.runtime-card-designer {
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    margin: 1.5rem 0;
    padding: 1rem;
}

.runtime-card-designer__heading,
.runtime-card-designer__field-heading,
.runtime-card-designer__field-actions {
    align-items: center;
    display: flex;
    gap: .75rem;
}

.runtime-card-designer__heading {
    justify-content: space-between;
    margin-bottom: 1rem;
}

.runtime-card-designer__heading h3,
.runtime-card-designer__heading h4,
.runtime-card-designer__heading .nhsuk-hint,
.runtime-card-designer__field-actions .nhsuk-button {
    margin-bottom: 0;
}

.runtime-card-designer__size {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border-strong);
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 700;
    padding: .2rem .65rem;
    white-space: nowrap;
}

.runtime-card-designer__canvas {
    background-color: var(--runtime-surface);
    background-image:
        linear-gradient(
            to right,
            color-mix(in srgb, var(--runtime-border) 40%, transparent) 1px,
            transparent 1px),
        linear-gradient(
            to bottom,
            color-mix(in srgb, var(--runtime-border) 40%, transparent) 1px,
            transparent 1px);
    background-size: 1.5rem 1.5rem;
    border: 2px dashed var(--runtime-border-strong);
    border-radius: .5rem;
    display: grid;
    gap: .75rem;
    grid-template-columns:
        repeat(var(--runtime-card-designer-columns), minmax(0, 1fr));
    margin-bottom: 1rem;
    min-height: 12rem;
    padding: 1rem;
}

.runtime-card-designer__field {
    align-self: start;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border-strong);
    border-left: .35rem solid var(--runtime-shell-accent);
    border-radius: .4rem;
    box-shadow: 0 .15rem .45rem rgb(23 43 58 / 12%);
    min-width: 0;
    padding: .8rem;
    transition:
        box-shadow 120ms ease,
        opacity 120ms ease,
        outline-color 120ms ease,
        transform 120ms ease;
}

.runtime-card-designer__field--dragging {
    opacity: .45;
    transform: scale(.985);
}

.runtime-card-designer__field--drop-target {
    outline: 4px solid #ffdd00;
    outline-offset: 2px;
}

.runtime-card-designer__field-heading {
    align-items: flex-start;
    cursor: grab;
}

.runtime-card-designer__field-heading:active {
    cursor: grabbing;
}

.runtime-card-designer__field-heading > span:last-child {
    min-width: 0;
}

.runtime-card-designer__drag-handle {
    color: var(--runtime-ink-muted);
    padding-top: .15rem;
}

.runtime-card-designer__field-preview {
    background: var(--runtime-surface-muted);
    border-radius: .25rem;
    color: var(--runtime-ink-muted);
    margin-top: .75rem;
    min-height: 2.5rem;
    padding: .55rem .65rem;
}

.runtime-card-designer__field-settings {
    border-top: 1px solid var(--runtime-border);
    margin-top: .8rem;
    padding-top: .65rem;
}

.runtime-card-designer__field-settings > summary {
    color: var(--runtime-link);
    cursor: pointer;
    font-weight: 700;
    margin-bottom: .75rem;
}

.runtime-card-designer__height-settings {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.runtime-card-designer__field-actions {
    border-top: 1px solid var(--runtime-border);
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .75rem;
    padding-top: .75rem;
}

.runtime-card-designer__icon-button {
    align-items: center;
    display: inline-flex;
    height: 2.25rem;
    justify-content: center;
    min-height: 2.25rem;
    min-width: 2.25rem;
    padding: 0;
    width: 2.25rem;
}

.runtime-card-designer__icon-button i {
    pointer-events: none;
}

.runtime-card-designer__add-field {
    align-items: end;
    display: flex;
    gap: .75rem;
}

.runtime-card-designer__add-field .nhsuk-form-group,
.runtime-card-designer__add-field .nhsuk-button {
    margin-bottom: 0;
}

.runtime-record-page-designer__section-tabs {
    align-items: end;
    border-bottom: 1px solid var(--runtime-border);
    display: flex;
    gap: .25rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding: 0 .25rem;
}

.runtime-record-page-designer__section-tab-list {
    align-items: end;
    display: flex;
    gap: .25rem;
}

.runtime-record-page-designer__section-tab {
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-bottom: 0;
    color: var(--runtime-link);
    cursor: pointer;
    flex: 0 0 auto;
    font: inherit;
    font-weight: 700;
    min-height: 2.5rem;
    padding: .45rem .85rem;
    white-space: nowrap;
}

.runtime-record-page-designer__section-tab[draggable="true"] {
    cursor: grab;
}

.runtime-record-page-designer__section-tab--dragging {
    cursor: grabbing;
    opacity: .45;
}

.runtime-record-page-designer__section-tab--drop-target {
    box-shadow: inset .25rem 0 0 var(--runtime-shell-accent);
}

.runtime-record-page-designer__section-tab:hover {
    background: var(--runtime-surface);
}

.runtime-record-page-designer__section-tab:focus-visible {
    box-shadow: 0 0 0 4px #ffdd00;
    outline: 2px solid var(--runtime-ink);
    outline-offset: 0;
    position: relative;
    z-index: 2;
}

.runtime-record-page-designer__section-tab--active {
    background: var(--runtime-surface);
    border-top: .25rem solid var(--runtime-shell-accent);
    color: var(--runtime-ink);
    margin-bottom: -1px;
}

.runtime-record-page-designer__add-section {
    flex: 0 0 auto;
    margin: 0 0 .2rem .25rem;
}

.runtime-record-page-designer__section-order-hint {
    margin-bottom: 0;
}

.runtime-record-page-designer__section-panel {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-top: 0;
    min-height: 0;
    padding: 1rem;
}

.runtime-recent-record-card-designer__canvas {
    --runtime-card-designer-columns: 1;

    margin-inline: auto;
    max-width: 48rem;
    width: 100%;
}

.runtime-record-page-designer__section-panel:focus {
    outline: none;
}

.runtime-record-page-designer {
    min-width: 0;
}

.runtime-record-page-designer__heading,
.runtime-record-page-designer__section-actions,
.runtime-record-page-designer__summary {
    align-items: center;
    display: flex;
    gap: .5rem;
}

.runtime-record-page-designer__heading {
    justify-content: space-between;
}

.runtime-record-page-designer__heading h3,
.runtime-record-page-designer__heading .nhsuk-hint,
.runtime-record-page-designer__section-actions .nhsuk-button {
    margin-bottom: 0;
}

.runtime-record-page-designer__summary {
    color: var(--runtime-ink-muted);
    flex-wrap: wrap;
    font-size: .875rem;
    margin: .75rem 0;
}

.runtime-record-page-designer__summary > span {
    border-right: 1px solid var(--runtime-border);
    padding-right: .5rem;
}

.runtime-record-page-designer__summary > span:last-child {
    border-right: 0;
}

.runtime-record-page-designer__canvas {
    align-content: start;
    background-color: var(--runtime-surface);
    background-image:
        linear-gradient(
            to right,
            color-mix(in srgb, var(--runtime-border) 45%, transparent) 1px,
            transparent 1px),
        linear-gradient(
            to bottom,
            color-mix(in srgb, var(--runtime-border) 45%, transparent) 1px,
            transparent 1px);
    background-size: 1.5rem 1.5rem;
    border: 2px dashed var(--runtime-border-strong);
    display: grid;
    gap: .75rem;
    grid-template-columns:
        repeat(var(--runtime-record-page-columns), minmax(0, 1fr));
    margin-bottom: 1rem;
    min-height: 20rem;
    padding: 1rem;
}

.runtime-record-page-designer__canvas-actions {
    justify-content: flex-end;
    margin-bottom: .5rem;
}

.runtime-field-layout-designer__drag-bar {
    align-items: center;
    background: var(--runtime-shell-accent);
    bottom: 0;
    color: transparent;
    cursor: grab;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 0;
    position: absolute;
    top: 0;
    width: .45rem;
    z-index: 2;
}

.runtime-field-layout-designer__drag-bar:active {
    cursor: grabbing;
}

.runtime-field-layout-designer__field
    .runtime-card-designer__field-preview {
    margin-top: 0;
}

.runtime-field-layout-designer__field {
    border-left: 0;
    padding-left: 1rem;
}

.runtime-field-layout-designer__preview {
    min-width: 0;
    position: relative;
}

.runtime-field-layout-designer__preview
    > .runtime-card-designer__field-actions {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    bottom: .25rem;
    box-shadow: 0 .2rem .55rem rgb(23 43 58 / 18%);
    gap: .2rem;
    inset-inline-end: .25rem;
    margin: 0;
    opacity: 0;
    padding: .25rem;
    pointer-events: none;
    position: absolute;
    transition: opacity 100ms ease;
    z-index: 3;
}

.runtime-field-layout-designer__field:hover
    .runtime-card-designer__field-actions,
.runtime-field-layout-designer__field:focus-within
    .runtime-card-designer__field-actions {
    opacity: 1;
    pointer-events: auto;
}

.runtime-field-layout-designer__add-field {
    margin-top: .75rem;
}

.runtime-field-layout-designer {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.runtime-table-field-designer__canvas {
    align-items: center;
    background-color: var(--runtime-surface);
    background-image:
        linear-gradient(
            to right,
            color-mix(in srgb, var(--runtime-border) 45%, transparent) 1px,
            transparent 1px),
        linear-gradient(
            to bottom,
            color-mix(in srgb, var(--runtime-border) 45%, transparent) 1px,
            transparent 1px);
    background-size: 1.5rem 1.5rem;
    border: 2px dashed var(--runtime-border-strong);
    box-sizing: border-box;
    display: flex;
    gap: .5rem;
    max-width: 100%;
    min-height: 4.5rem;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: .75rem;
    scrollbar-gutter: stable;
    width: 100%;
}

.runtime-table-field-designer__field {
    align-items: center;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border-strong);
    border-left: .25rem solid var(--runtime-shell-accent);
    border-radius: var(--runtime-surface-radius);
    box-shadow: 0 .15rem .45rem rgb(23 43 58 / 12%);
    display: inline-flex;
    flex: 0 0 auto;
    gap: .5rem;
    min-height: 2.75rem;
    padding: .35rem .4rem .35rem .55rem;
    position: relative;
    white-space: nowrap;
}

.runtime-table-field-designer__drag {
    color: var(--runtime-ink-muted);
    cursor: grab;
    display: grid;
    min-height: 1.75rem;
    min-width: 1.25rem;
    place-items: center;
}

.runtime-table-field-designer__drag:active {
    cursor: grabbing;
}

.runtime-table-field-designer__actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: .2rem;
    opacity: 0;
    pointer-events: none;
    position: static;
    transition:
        opacity 100ms ease,
        visibility 0s linear 100ms;
    visibility: hidden;
}

.runtime-table-field-designer__field:hover
    .runtime-table-field-designer__actions,
.runtime-table-field-designer__field:focus-within
    .runtime-table-field-designer__actions {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
    visibility: visible;
}

.runtime-table-field-designer__actions
    .runtime-card-designer__icon-button {
    height: 2rem;
    line-height: 1;
    margin: 0;
    min-height: 2rem;
    min-width: 2rem;
    width: 2rem;
}

.runtime-table-field-designer__field:focus-visible,
.runtime-table-field-designer__field.runtime-record-page-designer__field--selected {
    outline: 4px solid #ffdd00;
    outline-offset: 2px;
}

@media (hover: none) {
    .runtime-field-layout-designer__preview
        > .runtime-card-designer__field-actions {
        opacity: 1;
        pointer-events: auto;
    }

    .runtime-table-field-designer__actions {
        box-shadow: none;
        margin-left: .15rem;
        opacity: 1;
        pointer-events: auto;
        position: static;
        transform: none;
        visibility: visible;
    }
}

.runtime-record-page-designer__field {
    align-self: stretch;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.runtime-record-page-designer__canvas--stacked,
.runtime-record-page-designer__canvas--table,
.runtime-record-page-designer__canvas--valueonly {
    grid-template-columns: minmax(0, 1fr);
}

.runtime-record-page-designer__canvas--stacked
    .runtime-record-page-designer__field,
.runtime-record-page-designer__canvas--table
    .runtime-record-page-designer__field,
.runtime-record-page-designer__canvas--valueonly
    .runtime-record-page-designer__field {
    grid-column: 1 / -1 !important;
}

.runtime-record-page-designer__field-preview {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.runtime-record-page-designer__field-preview-label {
    color: var(--runtime-ink-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.runtime-record-page-designer__field-preview-value {
    color: var(--runtime-ink);
}

.runtime-record-page-designer__canvas--table
    .runtime-record-page-designer__field-preview {
    align-items: start;
    display: grid;
    grid-template-columns: minmax(7rem, 2fr) minmax(0, 3fr);
}

.runtime-record-page-designer__canvas--valueonly
    .runtime-record-page-designer__field-preview {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
}

.runtime-record-page-designer__field:focus-visible,
.runtime-record-page-designer__field--selected {
    outline: 4px solid #ffdd00;
    outline-offset: 2px;
}

.runtime-record-page-designer__field--resizing {
    box-shadow: 0 0 0 3px var(--runtime-shell-accent);
}

.runtime-record-page-designer__resize-handle {
    align-items: center;
    bottom: 0;
    color: var(--runtime-link);
    cursor: ew-resize;
    display: flex;
    justify-content: center;
    position: absolute;
    right: -.45rem;
    top: 0;
    width: .9rem;
    z-index: 1;
}

.runtime-record-page-designer__resize-handle:hover {
    background: color-mix(
        in srgb,
        var(--runtime-shell-accent) 12%,
        transparent);
}

.runtime-record-page-designer__height-resize-handle {
    align-items: center;
    bottom: -.4rem;
    color: var(--runtime-link);
    cursor: ns-resize;
    display: flex;
    height: .8rem;
    justify-content: center;
    left: .45rem;
    position: absolute;
    right: 0;
    z-index: 2;
}

.runtime-record-page-designer__height-resize-handle:hover {
    background: color-mix(
        in srgb,
        var(--runtime-shell-accent) 12%,
        transparent);
}

.runtime-visual-layout-editor__journey-content {
    padding: var(--runtime-space-3);
}

.runtime-visual-layout-editor__mode-bar,
.runtime-visual-layout-editor__panel-heading,
.runtime-visual-layout-editor__field-actions,
.runtime-visual-layout-canvas__page-header {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.runtime-visual-layout-editor__mode-bar {
    border-bottom: 1px solid var(--runtime-border);
    margin-bottom: 1rem;
    padding-bottom: .75rem;
}

.runtime-visual-layout-editor__mode-bar [role="group"] {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.runtime-visual-layout-editor__mode-bar .nhsuk-button,
.runtime-visual-layout-editor__panel-heading .nhsuk-button,
.runtime-visual-layout-editor__panel-heading h2,
.runtime-visual-layout-editor__field-actions .nhsuk-button,
.runtime-visual-layout-canvas__page-header h2,
.runtime-visual-layout-canvas__page-header p {
    margin-bottom: 0;
}

.runtime-visual-layout-editor__workspace {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
}

.runtime-visual-layout-editor__palette {
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
    padding: 1rem;
}

.runtime-visual-layout-editor__palette h2 {
    font-size: 1.1rem;
    margin-bottom: .5rem;
}

.runtime-visual-layout-editor__appearance {
    border-bottom: 1px solid var(--runtime-border);
    padding-bottom: 1rem;
}

.runtime-visual-layout-editor__appearance summary {
    color: var(--runtime-link);
    cursor: pointer;
    font-weight: 700;
    margin-bottom: .75rem;
}

.runtime-visual-layout-editor__appearance .nhsuk-form-group:last-child {
    margin-bottom: 0;
}

.runtime-visual-layout-editor__section-list {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1rem;
}

.runtime-visual-layout-editor__section-button {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border-strong);
    color: var(--runtime-link);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    min-height: 2.5rem;
    padding: .4rem .65rem;
}

.runtime-visual-layout-editor__section-button--active {
    background: var(--runtime-link);
    color: #fff;
}

.runtime-visual-layout-editor__section-button:focus-visible,
.runtime-visual-layout-editor__palette-field:focus-visible {
    box-shadow: 0 0 0 4px #ffdd00;
    outline: 2px solid var(--runtime-ink);
    outline-offset: 0;
}

.runtime-visual-layout-editor__field-palette {
    display: grid;
    gap: .4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-visual-layout-editor__placed-fields {
    display: grid;
    gap: .3rem;
    list-style-position: inside;
    margin: 0 0 1rem;
    padding: 0;
}

.runtime-visual-layout-editor__placed-field {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--runtime-link);
    cursor: pointer;
    display: flex;
    font: inherit;
    justify-content: space-between;
    min-height: 2.5rem;
    padding: .35rem .5rem;
    text-align: left;
    width: 100%;
}

.runtime-visual-layout-editor__placed-field:hover,
.runtime-visual-layout-editor__placed-field--selected {
    background: var(--runtime-surface);
}

.runtime-visual-layout-editor__placed-field--selected {
    box-shadow: inset .25rem 0 0 var(--runtime-shell-accent);
    color: var(--runtime-ink);
    font-weight: 700;
}

.runtime-visual-layout-editor__placed-field:focus-visible {
    box-shadow: 0 0 0 4px #ffdd00;
    outline: 2px solid var(--runtime-ink);
    outline-offset: 0;
}

.runtime-visual-layout-editor__palette-field {
    align-items: center;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    color: var(--runtime-ink);
    cursor: grab;
    display: grid;
    gap: .6rem;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 3rem;
    padding: .5rem .65rem;
    text-align: left;
    width: 100%;
}

.runtime-visual-layout-editor__palette-field:hover {
    border-color: var(--runtime-link);
}

.runtime-visual-layout-editor__palette-field span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.runtime-visual-layout-editor__palette-field small {
    color: var(--runtime-ink-muted);
}

.runtime-visual-layout-editor__inspector {
    border-top: 1px solid var(--runtime-border);
    padding-top: 1rem;
}

.runtime-visual-layout-editor__field-actions {
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.runtime-visual-layout-editor__canvas-host {
    background: var(--runtime-surface-muted);
    border: 2px dashed var(--runtime-border-strong);
    min-height: 38rem;
    min-width: 0;
    padding: 1rem;
}

.runtime-visual-layout-editor__canvas-host:focus {
    outline: none;
}

.runtime-visual-layout-editor__preview-status {
    background: var(--runtime-surface);
    border-left: .25rem solid var(--runtime-link);
    margin-bottom: .75rem;
    padding: .5rem .75rem;
}

.runtime-visual-layout-canvas {
    background: var(--runtime-surface);
    box-shadow: 0 .25rem 1rem rgb(23 43 58 / 12%);
    min-width: 0;
    padding: clamp(.75rem, 2vw, 1.5rem);
}

.runtime-visual-layout-canvas__page-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--runtime-border);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.runtime-visual-layout-canvas__toolbar {
    background: var(--runtime-surface-muted);
    margin-bottom: 1rem;
    padding: .75rem;
}

.runtime-visual-layout-canvas__toolbar .nhsuk-label {
    font-weight: 700;
}

.runtime-visual-layout-canvas__component {
    min-width: 0;
}

.runtime-layout-design-field {
    cursor: grab;
    position: relative;
}

.runtime-layout-design-field:hover {
    outline: 2px dashed var(--runtime-link);
    outline-offset: -2px;
}

.runtime-layout-design-field--selected {
    box-shadow: inset 0 0 0 3px var(--runtime-shell-accent);
    outline: 4px solid #ffdd00;
    outline-offset: 1px;
}

.runtime-visual-record-page__workspace {
    gap: 1rem;
}

.runtime-visual-record-page__section {
    border: 2px solid transparent;
    padding: .25rem;
}

.runtime-visual-record-page__section--selected {
    border-color: var(--runtime-shell-accent);
}

@media (max-width: 64rem) {
    .runtime-visual-layout-editor__workspace {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 40rem) {
    .runtime-visual-layout-editor__mode-bar,
    .runtime-visual-layout-canvas__page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-visual-layout-editor__mode-bar > .nhsuk-button {
        width: 100%;
    }

    .runtime-visual-layout-editor__canvas-host {
        padding: .5rem;
    }
}

@media (forced-colors: active) {
    .runtime-layout-design-field--selected,
    .runtime-visual-record-page__section--selected {
        outline: 3px solid Highlight;
    }
}

.runtime-layout-editor-add-choice {
    align-items: end;
    display: flex;
    gap: .75rem;
    margin-top: 1.5rem;
}

.runtime-layout-editor-add-choice .nhsuk-form-group,
.runtime-layout-editor-add-choice .nhsuk-button {
    margin-bottom: 0;
}

.runtime-board-designer {
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    margin: 1.5rem 0;
    padding: 1rem;
}

.runtime-board-designer__heading,
.runtime-board-designer__lane-heading,
.runtime-board-designer__lane-actions,
.runtime-board-designer__add-lane {
    align-items: center;
    display: flex;
    gap: .75rem;
}

.runtime-board-designer__heading {
    justify-content: space-between;
    margin-bottom: 1rem;
}

.runtime-board-designer__heading h4,
.runtime-board-designer__heading .nhsuk-hint,
.runtime-board-designer__lane-actions .nhsuk-button,
.runtime-board-designer__add-lane .nhsuk-form-group,
.runtime-board-designer__add-lane .nhsuk-button {
    margin-bottom: 0;
}

.runtime-board-designer__count {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border-strong);
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 700;
    padding: .2rem .65rem;
    white-space: nowrap;
}

.runtime-board-designer__canvas {
    background: var(--runtime-surface);
    border: 2px dashed var(--runtime-border-strong);
    border-radius: .5rem;
    display: grid;
    gap: .8rem;
    grid-auto-columns: minmax(16rem, 1fr);
    grid-auto-flow: column;
    margin-bottom: 1rem;
    min-height: 20rem;
    overflow-x: auto;
    padding: 1rem;
}

.runtime-board-designer__lane {
    --runtime-board-lane-colour: var(--runtime-shell-accent);
    align-self: stretch;
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-top: .45rem solid var(--runtime-board-lane-colour);
    border-radius: .4rem;
    box-shadow: 0 .15rem .45rem rgb(23 43 58 / 12%);
    min-width: 0;
    padding: .8rem;
    transition:
        opacity 120ms ease,
        outline-color 120ms ease,
        transform 120ms ease;
}

.runtime-board-designer__lane--dragging {
    opacity: .45;
    transform: scale(.985);
}

.runtime-board-designer__lane--drop-target {
    outline: 4px solid #ffdd00;
    outline-offset: 2px;
}

.runtime-board-designer__lane-heading {
    align-items: flex-start;
    cursor: grab;
    margin-bottom: 1rem;
}

.runtime-board-designer__lane-heading:active {
    cursor: grabbing;
}

.runtime-board-designer__lane-heading > span:last-child {
    min-width: 0;
}

.runtime-board-designer__drag-handle {
    color: var(--runtime-ink-muted);
    padding-top: .15rem;
}

.runtime-board-designer__record-preview {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .3rem;
    display: grid;
    gap: .45rem;
    margin: 1rem 0;
    padding: .75rem;
}

.runtime-board-designer__record-preview span {
    background: var(--runtime-surface-muted);
    border-radius: .2rem;
    display: block;
    height: .7rem;
}

.runtime-board-designer__record-preview span:nth-child(2) {
    width: 72%;
}

.runtime-board-designer__record-preview span:nth-child(3) {
    width: 48%;
}

.runtime-board-designer__lane-actions {
    border-top: 1px solid var(--runtime-border);
    flex-wrap: wrap;
    padding-top: .75rem;
}

.runtime-board-designer__add-lane {
    align-items: end;
}

.runtime-timeline-designer {
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    margin: 1.5rem 0;
    padding: 1rem;
}

.runtime-timeline-designer__heading,
.runtime-timeline-designer__add-label,
.runtime-timeline-designer__label,
.runtime-timeline-designer__label-actions {
    align-items: center;
    display: flex;
    gap: .75rem;
}

.runtime-timeline-designer__heading {
    justify-content: space-between;
    margin-bottom: 1rem;
}

.runtime-timeline-designer__heading h4,
.runtime-timeline-designer__heading .nhsuk-hint,
.runtime-timeline-designer__label-actions .nhsuk-button,
.runtime-timeline-designer__add-label .nhsuk-form-group,
.runtime-timeline-designer__add-label .nhsuk-button {
    margin-bottom: 0;
}

.runtime-timeline-designer__scale {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border-strong);
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 700;
    padding: .2rem .65rem;
    white-space: nowrap;
}

.runtime-timeline-designer__settings {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.runtime-timeline-designer__settings .nhsuk-form-group {
    margin-bottom: 0;
}

.runtime-label-with-tooltip {
    align-items: center;
    display: flex;
    gap: .35rem;
    margin-bottom: .25rem;
    max-width: 100%;
    position: relative;
    width: max-content;
}

.runtime-label-with-tooltip .nhsuk-label {
    margin-bottom: 0;
}

.runtime-label-tooltip {
    border-radius: 50%;
    color: var(--runtime-link);
    cursor: help;
    display: inline-flex;
    flex: 0 0 auto;
    line-height: 1;
}

.runtime-label-tooltip:focus-visible {
    box-shadow: 0 0 0 2px var(--runtime-ink);
    outline: 3px solid var(--runtime-focus);
    outline-offset: 2px;
}

.runtime-label-tooltip__content {
    background: var(--runtime-ink);
    border-radius: .25rem;
    box-shadow: 0 .2rem .55rem rgb(23 43 58 / 24%);
    color: #fff;
    font-size: .875rem;
    font-weight: 400;
    inset-block-start: calc(100% + .5rem);
    inset-inline-start: 0;
    line-height: 1.35;
    opacity: 0;
    padding: .6rem .75rem;
    pointer-events: none;
    position: absolute;
    transition: opacity .12s ease;
    visibility: hidden;
    white-space: normal;
    width: min(18rem, calc(100vw - 3rem));
    z-index: 30;
}

.runtime-label-tooltip:hover .runtime-label-tooltip__content,
.runtime-label-tooltip:focus .runtime-label-tooltip__content,
.runtime-label-tooltip:focus-within .runtime-label-tooltip__content {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.runtime-timeline-designer__canvas {
    background: var(--runtime-surface);
    border: 2px dashed var(--runtime-border-strong);
    border-radius: .5rem;
    margin: 1.25rem 0;
    overflow: hidden;
    padding: 1rem;
}

.runtime-timeline-designer__ruler {
    border-bottom: 1px solid var(--runtime-border);
    color: var(--runtime-ink-muted);
    display: grid;
    font-size: .85rem;
    grid-template-columns: repeat(3, 1fr);
    padding-bottom: .45rem;
}

.runtime-timeline-designer__ruler span:nth-child(2) {
    text-align: center;
}

.runtime-timeline-designer__ruler span:last-child {
    text-align: right;
}

.runtime-timeline-designer__track {
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent calc(33.333% - 1px),
            var(--runtime-border) calc(33.333% - 1px),
            var(--runtime-border) 33.333%);
    min-height: 5rem;
    padding: 1.3rem 12%;
}

.runtime-timeline-designer__bar {
    border-radius: .3rem;
    box-shadow: 0 .15rem .4rem rgb(23 43 58 / 18%);
    display: block;
    font-weight: 700;
    overflow: hidden;
    padding: .65rem .8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 62%;
}

.runtime-timeline-designer__labels {
    display: grid;
    gap: .65rem;
    margin-bottom: 1rem;
}

.runtime-timeline-designer__label {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-left: .3rem solid var(--runtime-shell-accent);
    border-radius: .35rem;
    cursor: grab;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: .7rem;
    transition:
        opacity 120ms ease,
        outline-color 120ms ease,
        transform 120ms ease;
}

.runtime-timeline-designer__label:active {
    cursor: grabbing;
}

.runtime-timeline-designer__label--dragging {
    opacity: .45;
    transform: scale(.99);
}

.runtime-timeline-designer__label--drop-target {
    outline: 4px solid #ffdd00;
    outline-offset: 2px;
}

.runtime-timeline-designer__drag-handle {
    color: var(--runtime-ink-muted);
}

.runtime-timeline-designer__label-actions {
    flex-wrap: wrap;
    margin-left: auto;
}

.runtime-timeline-designer__add-label {
    align-items: end;
}

.runtime-list-criteria {
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    margin: 1.5rem 0;
    padding: 1rem;
}

.runtime-list-criteria__heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.runtime-list-criteria__heading h4,
.runtime-list-criteria__heading .nhsuk-hint,
.runtime-list-criteria__heading .nhsuk-button {
    margin-bottom: 0;
}

.runtime-list-criteria__empty {
    background: var(--runtime-surface);
    border: 1px dashed var(--runtime-border-strong);
    border-radius: .35rem;
    margin: 0;
    padding: 1rem;
}

.runtime-list-criteria__conditions {
    display: grid;
    gap: .75rem;
}

.runtime-list-criteria__condition {
    align-items: end;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-left: .3rem solid var(--runtime-shell-accent);
    border-radius: .35rem;
    display: grid;
    gap: .75rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: .8rem;
}

.runtime-list-criteria__condition-number {
    align-items: center;
    align-self: start;
    background: var(--runtime-shell-accent);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: .875rem;
    font-weight: 700;
    height: 1.8rem;
    justify-content: center;
    width: 1.8rem;
}

.runtime-list-criteria__condition-fields {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.runtime-list-criteria__condition-fields .nhsuk-form-group,
.runtime-list-criteria__condition > .nhsuk-button {
    margin-bottom: 0;
}

@media (max-width: 48rem) {
    .runtime-list-criteria__heading,
    .runtime-list-criteria__condition {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .runtime-list-criteria__heading {
        flex-direction: column;
    }

    .runtime-list-criteria__condition-number {
        display: none;
    }
}

.runtime-layout-preview {
    --runtime-layout-preview-accent: var(--runtime-shell-accent);
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    box-shadow: 0 .2rem .75rem rgb(23 43 58 / 8%);
    margin-top: 1.5rem;
    overflow: hidden;
}

.runtime-layout-preview__header {
    align-items: center;
    background: var(--runtime-surface);
    border-top: .35rem solid var(--runtime-layout-preview-accent);
    display: grid;
    gap: .75rem;
    grid-template-columns: auto auto minmax(0, 1fr);
    padding: 1rem 1.25rem;
}

.runtime-layout-preview__header > span:nth-child(2) {
    display: grid;
}

.runtime-layout-preview__header > .nhsuk-tag {
    justify-self: end;
}

.nhsuk-tag {
    font-size: .9rem;
}

    .runtime-layout-preview__brand {
        align-items: center;
        background: var(--runtime-layout-preview-accent);
        border-radius: .35rem;
        color: #fff;
        display: inline-flex;
        font-size: 1.25rem;
        font-weight: 800;
        height: 2.5rem;
        justify-content: center;
        width: 2.5rem;
    }

    .runtime-layout-preview__shell {
        display: grid;
        grid-template-columns: 3.5rem minmax(0, 1fr);
        min-height: 32rem;
    }

    .runtime-layout-preview__navigation {
        background: var(--runtime-layout-preview-accent);
        padding: .8rem .55rem;
    }

    .runtime-layout-preview__navigation-link {
        align-items: center;
        background: var(--runtime-surface);
        border: 0;
        border-radius: .35rem;
        color: var(--runtime-layout-preview-accent);
        cursor: pointer;
        display: flex;
        font-size: 1.1rem;
        height: 2.4rem;
        justify-content: center;
        width: 2.4rem;
    }

        .runtime-layout-preview__navigation-link:focus-visible {
            outline: .2rem solid var(--runtime-focus);
            outline-offset: .15rem;
        }

    .runtime-layout-preview__content {
        min-width: 0;
        padding: 1rem;
    }

    .runtime-layout-preview__area-heading {
        align-items: center;
        display: flex;
        gap: .8rem;
        margin-bottom: 1rem;
    }

        .runtime-layout-preview__area-heading h3 {
            margin: 0;
        }

    .runtime-layout-preview__icon {
        align-items: center;
        background: color-mix( in srgb, var(--runtime-layout-preview-accent) 12%, var(--runtime-surface));
        border-radius: .4rem;
        color: var(--runtime-layout-preview-accent);
        display: inline-flex;
        flex: 0 0 2.75rem;
        height: 2.75rem;
        justify-content: center;
    }

    .runtime-layout-preview__page-switcher {
        border-bottom: 1px solid var(--runtime-border);
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        margin-bottom: 1rem;
    }

        .runtime-layout-preview__page-switcher .nhsuk-button {
            margin-bottom: .75rem;
        }

    .runtime-layout-preview__list-selector {
        align-items: end;
        display: flex;
        gap: 1rem;
        margin-bottom: 1rem;
    }

        .runtime-layout-preview__list-selector .nhsuk-label {
            font-weight: 700;
        }

    .runtime-layout-preview__list-page {
        background: var(--runtime-surface);
        border: 1px solid var(--runtime-border);
        border-radius: .35rem;
        min-width: 0;
        padding: 1rem;
    }

    .runtime-layout-preview__page-heading {
        align-items: start;
        display: flex;
        gap: 1rem;
        justify-content: space-between;
    }

        .runtime-layout-preview__page-heading h4 {
            margin: 0;
        }

    .runtime-layout-preview__count {
        color: var(--runtime-muted);
        font-size: .85rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .runtime-timeline-designer__bar:not([class*="nhsuk-tag--"]) {
        background: var(--runtime-shell-accent);
        color: #fff;
    }

    .runtime-layout-preview__view-controls {
        align-items: end;
        background: var(--runtime-surface-muted);
        border-radius: .35rem;
        display: grid;
        gap: 1rem;
        grid-template-columns: minmax(12rem, 1fr) auto;
        margin: 1rem 0;
        padding: .85rem;
    }

        .runtime-layout-preview__view-controls .nhsuk-form-group,
        .runtime-layout-preview__search .nhsuk-button {
            margin-bottom: 0;
        }

    .runtime-layout-preview__search {
        align-items: end;
        display: flex;
        gap: .5rem;
    }

    .runtime-layout-preview__view-summary {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        justify-content: end;
    }

    .runtime-layout-preview__quick-filters {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        margin-bottom: 1rem;
    }

    .runtime-layout-preview__table-wrap {
        overflow-x: auto;
    }

    .runtime-layout-preview__table {
        margin-bottom: 0;
        min-width: 32rem;
    }

    .runtime-layout-preview__cards {
        display: grid;
        gap: .75rem;
        grid-template-columns: repeat( var(--runtime-layout-preview-cards), minmax(0, 1fr));
    }

    .runtime-layout-preview__card,
    .runtime-layout-preview__lane-card {
        background: var(--runtime-surface);
        border: 1px solid var(--runtime-border);
        border-left: .25rem solid var(--runtime-layout-preview-accent);
        border-radius: .35rem;
        padding: .8rem;
    }

        .runtime-layout-preview__card h5 {
            margin: 0 0 .65rem;
        }

        .runtime-layout-preview__card dl {
            display: grid;
            gap: .6rem;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            margin: 0;
        }

            .runtime-layout-preview__card dl > div {
                grid-column: span var(--runtime-layout-preview-card-span);
            }

        .runtime-layout-preview__card dt,
        .runtime-layout-preview__lane-card small {
            color: var(--runtime-muted);
            display: block;
            font-size: .75rem;
            font-weight: 700;
        }

        .runtime-layout-preview__card dd {
            margin: .15rem 0 0;
        }

    .runtime-layout-preview__board {
        display: grid;
        gap: .75rem;
        grid-auto-columns: minmax(13rem, 1fr);
        grid-auto-flow: column;
        overflow-x: auto;
        padding-bottom: .25rem;
    }

    .runtime-layout-preview__lane {
        background: var(--runtime-surface-muted);
        border-radius: .35rem;
        padding: .75rem;
    }

        .runtime-layout-preview__lane > header {
            align-items: center;
            display: flex;
            gap: .5rem;
            justify-content: space-between;
            margin-bottom: .75rem;
        }

    .runtime-layout-preview__lane-card {
        display: grid;
        gap: .5rem;
    }

        .runtime-layout-preview__lane-card > span {
            display: block;
        }

    .runtime-layout-preview__timeline {
        border: 1px solid var(--runtime-border);
        border-radius: .35rem;
        overflow: hidden;
    }

        .runtime-layout-preview__timeline > header {
            background: var(--runtime-surface-muted);
            display: grid;
            gap: .5rem;
            grid-template-columns: minmax(9rem, 1fr) repeat(3, 1fr);
            padding: .65rem .75rem;
            text-align: center;
        }

            .runtime-layout-preview__timeline > header strong {
                text-align: left;
            }

    .runtime-layout-preview__timeline-row {
        border-top: 1px solid var(--runtime-border);
        display: grid;
        gap: .75rem;
        grid-template-columns: minmax(9rem, 1fr) minmax(18rem, 3fr);
        min-height: 3.25rem;
        padding: .65rem .75rem;
    }

        .runtime-layout-preview__timeline-row > span {
            display: grid;
        }

        .runtime-layout-preview__timeline-row i {
            align-self: center;
            border-radius: 999px;
            grid-column: 2;
            height: .9rem;
            margin-left: var(--runtime-layout-preview-timeline-start);
            width: var(--runtime-layout-preview-timeline-width);
        }

            .runtime-layout-preview__timeline-row i:not([class*="nhsuk-tag--"]) {
                background: var(--runtime-layout-preview-accent);
            }

    .runtime-layout-preview__pagination {
        align-items: center;
        border-top: 1px solid var(--runtime-border);
        display: flex;
        gap: .5rem;
        justify-content: end;
        margin-top: 1rem;
        padding-top: .75rem;
    }

        .runtime-layout-preview__pagination span {
            color: var(--runtime-muted);
            margin-right: auto;
        }

        .runtime-layout-preview__pagination .nhsuk-button {
            margin-bottom: 0;
        }

    .runtime-layout-preview__record-page {
        display: grid;
        gap: 1rem;
        grid-template-columns: minmax(12rem, 1fr) minmax(0, 3fr);
    }

    .runtime-layout-preview__summary,
    .runtime-layout-preview__main {
        min-width: 0;
    }

    .runtime-layout-preview__summary {
        align-content: start;
        display: grid;
        gap: .75rem;
    }

    .runtime-layout-preview__main {
        background: var(--runtime-surface);
        border: 1px solid var(--runtime-border);
        border-radius: .35rem;
        padding: 1rem;
    }

    .runtime-layout-preview__tabs {
        border-bottom: 1px solid var(--runtime-border);
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        margin: -1rem -1rem 1rem;
        padding: .75rem 1rem 0;
    }

        .runtime-layout-preview__tabs span {
            border-bottom: .2rem solid var(--runtime-layout-preview-accent);
            font-weight: 700;
            padding: .45rem .6rem;
        }

    .runtime-layout-preview__section {
        background: var(--runtime-surface);
        border: 1px solid var(--runtime-border);
        border-radius: .35rem;
        margin-bottom: 1rem;
        padding: 1rem;
    }

        .runtime-layout-preview__section:last-child {
            margin-bottom: 0;
        }

        .runtime-layout-preview__section h4 {
            margin-top: 0;
        }

    .runtime-layout-preview__fields {
        display: grid;
        gap: .75rem;
        grid-template-columns: repeat(var(--runtime-layout-preview-columns), minmax(0, 1fr));
        margin: 0;
    }

        .runtime-layout-preview__fields > div {
            grid-column: span var(--runtime-layout-preview-span);
            min-width: 0;
        }

        .runtime-layout-preview__fields dt {
            color: var(--runtime-muted);
            font-size: .85rem;
            font-weight: 700;
        }

        .runtime-layout-preview__fields dd {
            margin: .2rem 0 0;
        }

    .runtime-layout-preview__fingerprint {
        border-top: 1px solid var(--runtime-border);
        color: var(--runtime-muted);
        font-size: .8rem;
        padding: .65rem 1rem;
    }

    .runtime-layout-version-actions {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
    }

        .runtime-layout-version-actions .nhsuk-button {
            margin-bottom: 0;
        }

    .runtime-layout-version-preview-dialog .runtime-dialog__body {
        overflow: auto;
        overscroll-behavior: contain;
    }

    .runtime-layout-version-preview-dialog .runtime-layout-preview {
        margin-top: 0;
    }

    .runtime-form-editor-card {
        background: var(--runtime-surface-muted);
        border: 1px solid var(--runtime-border);
        border-radius: .5rem;
        margin-bottom: 1rem;
        padding: 1rem;
    }

    .runtime-form-editor-card__heading {
        align-items: center;
        display: flex;
        gap: 1rem;
        justify-content: space-between;
        margin-bottom: 1rem;
    }

        .runtime-form-editor-card__heading h3,
        .runtime-form-editor-card__heading h4 {
            margin: 0;
        }

    .runtime-form-editor-card__nested {
        background: var(--runtime-surface);
        border: 1px solid var(--runtime-border);
        border-radius: .35rem;
        margin: 0 0 1rem;
        padding: 1rem;
    }

    .runtime-form-code-input {
        font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
        min-height: 18rem;
        tab-size: 4;
        white-space: pre;
    }

    .runtime-form-editor-grid {
        display: grid;
        gap: 1rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .runtime-admin-step__heading {
        align-items: center;
        display: flex;
        gap: 1rem;
        justify-content: space-between;
    }

        .runtime-admin-step__heading h2,
        .runtime-admin-step__heading .nhsuk-button {
            margin-bottom: 0;
        }

    .runtime-layout-preview__fields--stacked,
    .runtime-layout-preview__fields--valueonly {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-layout-preview__fields--table {
        display: block;
    }

        .runtime-layout-preview__fields--table > div {
            align-items: start;
            display: grid;
            gap: .5rem;
            grid-template-columns: minmax(7rem, 2fr) minmax(0, 3fr);
            padding-block: .4rem;
        }

            .runtime-layout-preview__fields--table > div + div {
                border-top: 1px solid var(--runtime-border);
            }

    .runtime-admin-step__heading-actions {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        justify-content: flex-end;
    }

    .runtime-form-organizer {
        border: 1px solid var(--runtime-border);
        display: grid;
        grid-template-columns: minmax(14rem, .75fr) minmax(0, 1.6fr);
        height: 28rem;
        margin-bottom: 1rem;
        min-height: 0;
        overflow: hidden;
    }

    .runtime-form-organizer__pages,
    .runtime-form-organizer__questions {
        display: grid;
        grid-template-rows: max-content minmax(0, 1fr);
        min-height: 0;
        min-width: 0;
        overflow: hidden;
        padding: 1rem;
    }

    .runtime-list-criteria--summary {
        background: var(--runtime-surface);
        margin: 1rem 0;
        padding: .75rem 1rem;
    }

        .runtime-list-criteria--summary .runtime-list-criteria__heading {
            margin-bottom: 0;
        }

    .runtime-form-organizer__pages {
        background: var(--runtime-surface-muted);
        border-right: 1px solid var(--runtime-border);
    }

    .runtime-form-organizer__questions {
        background: var(--runtime-surface);
    }

    .runtime-form-organizer__heading {
        align-items: center;
        display: flex;
        gap: .75rem;
        justify-content: space-between;
        margin-bottom: 1rem;
    }

        .runtime-form-organizer__heading h3,
        .runtime-form-organizer__heading .nhsuk-button {
            margin-bottom: 0;
        }

    .runtime-form-organizer__title {
        align-items: center;
        display: flex;
        gap: .5rem;
    }

    .runtime-form-organizer__list {
        align-content: start;
        display: grid;
        gap: .5rem;
        grid-auto-rows: max-content;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .runtime-form-organizer
        > .runtime-form-organizer__pages
        > .runtime-form-organizer__list,
    .runtime-form-organizer
        > .runtime-form-organizer__questions
        > .runtime-form-organizer__list {
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        padding-right: var(--runtime-space-1);
        scrollbar-gutter: stable;
    }

.runtime-form-organizer__page {
    align-items: stretch;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    display: grid;
    gap: .35rem;
    grid-template-columns: minmax(0, 1fr);
    min-height: 3.75rem;
    padding: .35rem;
    position: relative;
}

.runtime-form-organizer__page--selected {
    border-color: var(--runtime-accent);
    box-shadow: inset .25rem 0 0 var(--runtime-accent);
}

.runtime-form-organizer--dragging .runtime-form-organizer__page {
    border-style: dashed;
}

.runtime-form-organizer__page-select {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--runtime-heading);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-weight: 700;
    gap: .5rem;
    justify-content: space-between;
    min-width: 0;
    padding: .45rem .55rem;
    text-align: left;
}

.runtime-form-organizer__page-select:focus {
    outline: 3px solid #ffeb3b;
    outline-offset: 0;
}

.runtime-form-organizer__count {
    background: var(--runtime-accent-soft);
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: .75rem;
    min-width: 1.5rem;
    padding: .1rem .4rem;
    text-align: center;
}

.runtime-form-organizer__move {
    margin: 0;
}

.runtime-form-organizer__question {
    align-items: center;
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    cursor: grab;
    display: grid;
    gap: .65rem;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 3.75rem;
    padding: .45rem .55rem;
    position: relative;
}

.runtime-form-organizer__question:active {
    cursor: grabbing;
}

.runtime-form-organizer__question--static,
.runtime-form-organizer__question--static:active {
    cursor: default;
    grid-template-columns: minmax(0, 1fr);
}

.runtime-record-area-change-list {
    margin-bottom: .75rem;
}

.runtime-record-area-change-list
    .runtime-form-organizer__question-summary {
    padding-right: 6.5rem;
}

.runtime-record-area-change-list
    .runtime-form-organizer__question-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%);
    visibility: visible;
}

.runtime-form-organizer__drag {
    color: var(--runtime-muted);
    font-size: 1.15rem;
    letter-spacing: -.2rem;
}

.runtime-form-organizer__question-name {
    color: inherit;
    display: grid;
    min-width: 0;
    padding: .25rem;
}

.runtime-form-organizer__question-summary {
    align-items: center;
    display: grid;
    gap: .5rem;
    grid-template-columns: minmax(10rem, 14rem) minmax(12rem, 1fr);
    min-width: 0;
}

.runtime-form-organizer__question-settings {
    display: grid;
    gap: .1rem;
    grid-template-columns: minmax(0, 1fr);
    list-style: none;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.runtime-form-organizer__question-setting {
    color: var(--runtime-muted);
    font-size: .7rem;
    line-height: 1.15;
    white-space: nowrap;
}

.runtime-form-organizer__question-name strong,
.runtime-form-organizer__question-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-form-organizer__question-name span {
    color: var(--runtime-muted);
    font-size: .8rem;
}

.runtime-form-organizer__page-actions,
.runtime-form-organizer__question-actions {
    align-items: center;
    display: flex;
    gap: .35rem;
    opacity: 0;
    padding-left: 1.25rem;
    pointer-events: none;
    position: absolute;
    right: .25rem;
    top: 50%;
    transform: translate(.35rem, -50%);
    transition:
        opacity 120ms ease,
        transform 120ms ease,
        visibility 120ms ease;
    visibility: hidden;
    z-index: 2;
}

.runtime-form-organizer__page-actions {
    background:
        linear-gradient(
            90deg,
            transparent,
            var(--runtime-surface) 1.1rem);
}

.runtime-form-organizer__question-actions {
    background:
        linear-gradient(
            90deg,
            transparent,
            var(--runtime-surface-muted) 1.1rem);
}

.runtime-form-organizer__page:hover
    .runtime-form-organizer__page-actions,
.runtime-form-organizer__page:focus-within
    .runtime-form-organizer__page-actions,
.runtime-form-organizer__question:hover
    .runtime-form-organizer__question-actions,
.runtime-form-organizer__question:focus-within
    .runtime-form-organizer__question-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%);
    visibility: visible;
}

.runtime-form-organizer__page-actions .nhsuk-button,
.runtime-form-organizer__question-actions .nhsuk-button {
    margin: 0;
}

@media (hover: none) {
    .runtime-form-organizer__page-actions,
    .runtime-form-organizer__question-actions {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(-50%);
        visibility: visible;
    }

    .runtime-form-organizer__page-select {
        padding-right: 10.5rem;
    }

    .runtime-form-organizer__question-summary {
        padding-right: 10.5rem;
    }
}

.runtime-form-organizer__move {
    font-size: 1rem;
    min-width: 2.25rem;
    padding-inline: .55rem;
}

.runtime-form-organizer__delete {
    min-width: 2.25rem;
    padding-inline: .55rem;
}

.runtime-form-organizer__empty,
.runtime-form-organizer__drop-end {
    border: 2px dashed var(--runtime-border-strong);
    color: var(--runtime-muted);
    padding: 1rem;
    text-align: center;
}

.runtime-form-organizer__empty p {
    margin: 0;
}

.runtime-form-mapping-canvas {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    padding: 1rem;
}

.runtime-form-mapping-canvas.runtime-admin-definition-group {
    margin-block: 1.5rem 2rem;
}

.runtime-form-mapping-card {
    align-items: center;
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: .45rem .55rem;
}

.runtime-form-mapping-card__destination {
    align-items: baseline;
    display: flex;
    gap: .25rem;
    min-width: 0;
}

.runtime-form-mapping-card__destination strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-form-mapping-card__actions {
    align-items: center;
    display: flex;
    gap: .35rem;
}

.runtime-form-mapping-card__actions .nhsuk-button {
    margin: 0;
}

.runtime-form-mapping-canvas__hint {
    margin: 1rem 0 0;
}

.runtime-form-organizer__drop-end {
    display: none;
    font-size: .8rem;
}

.runtime-form-organizer--dragging .runtime-form-organizer__drop-end {
    display: block;
}

.runtime-form-dynamic-validation-editor__code {
    margin-bottom: var(--runtime-space-3);
}

.runtime-form-question-location {
    max-width: 36rem;
}

.runtime-form-question-location .nhsuk-button {
    display: block;
    margin-top: .75rem;
}

.runtime-dialog-tabs {
    border-bottom: 1px solid var(--runtime-border);
    margin: -1rem -1.5rem 1.5rem;
    padding: 0 1.5rem;
}

.runtime-workspace-tabs {
    border-bottom: 1px solid var(--runtime-border);
    margin: 0 0 1.5rem;
}

.runtime-workspace-tabs__panel[hidden] {
    display: none;
}

.runtime-dialog-tabs__list {
    display: flex;
    gap: .25rem;
    list-style: none;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
}

.runtime-dialog-tabs__list li {
    margin: 0;
}

.runtime-dialog-tabs__tab {
    align-items: center;
    background: transparent;
    border: 0;
    border-bottom: .25rem solid transparent;
    color: var(--runtime-link);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-weight: 700;
    gap: .4rem;
    margin-bottom: -.0625rem;
    padding: .8rem 1rem .65rem;
    white-space: nowrap;
}

.runtime-dialog-tabs__tab:hover {
    background: var(--runtime-surface-muted);
}

.runtime-dialog-tabs__tab:focus {
    background: #ffeb3b;
    box-shadow: 0 .25rem 0 var(--runtime-heading);
    color: var(--runtime-heading);
    outline: 3px solid transparent;
}

.runtime-dialog-tabs__tab--current {
    border-bottom-color: var(--runtime-shell-accent);
    color: var(--runtime-heading);
}

.runtime-dialog-tabs__count {
    align-items: center;
    background: var(--runtime-accent-soft);
    border-radius: 999px;
    color: var(--runtime-heading);
    display: inline-flex;
    font-size: .75rem;
    justify-content: center;
    min-height: 1.5rem;
    min-width: 1.5rem;
    padding: 0 .35rem;
}

.runtime-dialog-tabs__panel[hidden] {
    display: none;
}

.runtime-form-question-rules > h3 {
    margin-bottom: .5rem;
}

.runtime-form-answer-options {
    padding-top: .25rem;
}

.runtime-form-range {
    accent-color: var(--runtime-color-action, #005eb8);
    max-width: 32rem;
    width: 100%;
}

.runtime-form-range:focus-visible {
    outline: .25rem solid #ffeb3b;
    outline-offset: .2rem;
}

.runtime-form-answer-row {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        8rem
        2.5rem;
}

.runtime-form-answer-row--with-icon {
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        8rem
        10rem
        2.5rem;
}

.runtime-form-answer-row--threshold {
    grid-template-columns:
        8rem
        8rem
        9rem
        minmax(0, 1fr)
        2.5rem;
}

.runtime-form-answer-row .nhsuk-form-group {
    margin-bottom: 0;
    min-width: 0;
}

.runtime-form-answer-remove {
    align-items: center;
    display: inline-flex;
    font-size: 1.5rem;
    height: 2.5rem;
    justify-content: center;
    line-height: 1;
    min-height: 2.5rem;
    min-width: 2.5rem;
    padding: 0;
    width: 2.5rem;
}

.runtime-form-preview {
    --runtime-form-action-background: var(--runtime-surface);

    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    display: grid;
    gap: 1.25rem;
    padding: 1.5rem;
}

.runtime-form-builder-layout {
    align-items: start;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 3fr) minmax(17rem, 1fr);
}

.runtime-form-create-journey__content {
    padding: var(--runtime-space-2);
}

.runtime-form-create-journey__panel {
    margin: 0;
    max-width: none;
}

.runtime-form-editor-journey__content {
    display: flex;
    flex-direction: column;
    gap: var(--runtime-space-2);
    overflow: hidden;
    padding: var(--runtime-space-2);
}

.runtime-form-editor-journey__content > .runtime-admin-boundary {
    flex: 0 0 auto;
    margin: 0;
}

.runtime-form-editor-journey__content > .runtime-form-builder-layout {
    align-items: stretch;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
}

.runtime-form-editor-journey__content
    > .runtime-form-builder-layout
    > .runtime-form-builder-layout__editor,
.runtime-form-editor-journey__content
    > .runtime-form-builder-layout
    > .runtime-form-builder-layout__preview {
    height: 100%;
}

.runtime-form-editor-journey__content
    > .runtime-form-builder-layout
    > .runtime-form-builder-layout__editor {
    overflow: auto;
}

.runtime-form-editor-journey__content
    > .runtime-form-builder-layout
    > .runtime-form-builder-layout__preview {
    overflow: hidden;
}

.runtime-form-editor-journey__content
    > .runtime-form-builder-layout
    > .runtime-form-builder-layout__preview
    > .runtime-form-preview {
    height: 100%;
    max-height: 100%;
}

.runtime-form-builder-layout__editor,
.runtime-form-builder-layout__preview {
    min-width: 0;
}

.runtime-form-builder-layout__preview {
    position: sticky;
    top: 3.2rem;
}

.runtime-form-editor-journey__preview-action {
    display: none;
}

.runtime-form-editor-journey__preview-action .runtime-admin-actions {
    min-width: 12rem;
    width: 12rem;
}

.runtime-ai-form-workbench {
    align-items: stretch;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 3fr) minmax(17rem, 1fr);
    grid-template-rows: minmax(0, 1fr);
    height: 100%;
    margin-block: 0;
    max-height: 100%;
    min-height: 0;
}

.runtime-ai-form-journey__content {
    display: grid;
    grid-template-rows: minmax(0, 1fr) max-content;
    overflow: hidden;
    padding: var(--runtime-space-2);
}

.runtime-ai-form-journey__content .runtime-ai-form-preview {
    position: static;
    top: auto;
}

.runtime-ai-form-chat,
.runtime-ai-form-preview {
    min-width: 0;
}

.runtime-ai-form-workbench > .runtime-admin-panel {
    min-width: 0;
}

.runtime-ai-form-workbench__conversation {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.runtime-ai-form-chat {
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.runtime-ai-form-chat__messages {
    background: var(--runtime-surface-muted);
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: var(--runtime-space-2);
    min-height: 0;
    overflow-y: auto;
    padding: var(--runtime-space-2);
}

.runtime-ai-form-chat__message {
    align-self: flex-start;
    background: var(--runtime-surface);
    border-left: .3rem solid var(--runtime-border-strong);
    border-radius: .25rem;
    font-size: .875rem;
    line-height: 1.35;
    max-width: min(44rem, 92%);
    padding: var(--runtime-space-2) var(--runtime-space-3);
}

.runtime-ai-form-chat__message--assistant {
    background: color-mix(
        in srgb,
        var(--runtime-brand) 10%,
        var(--runtime-surface));
    border-left-color: var(--runtime-brand);
}

.runtime-ai-form-chat__message--author {
    align-self: flex-end;
    background: color-mix(
        in srgb,
        var(--runtime-shell-accent) 8%,
        var(--runtime-surface));
    border-left-color: var(--runtime-shell-accent);
}

.runtime-ai-form-chat__message--pending {
    min-width: min(19rem, 92%);
}

.runtime-ai-form-chat__message > strong {
    display: block;
    margin-bottom: var(--runtime-space-1);
}

.runtime-ai-form-chat__pending {
    align-items: center;
    display: flex;
    gap: .75rem;
    margin-bottom: 0;
}

.runtime-ai-form-chat__pending .runtime-state__indicator {
    flex: 0 0 auto;
}

.runtime-ai-form-chat__message p:last-child {
    margin-bottom: 0;
}

.runtime-ai-form-chat__follow-up {
    color: var(--runtime-muted);
}

.runtime-ai-form-chat__follow-up-heading {
    margin-bottom: .25rem;
    margin-top: .75rem;
}

.runtime-ai-form-chat__follow-up-list {
    margin-bottom: .75rem;
    margin-top: 0;
    padding-left: 1.25rem;
}

.runtime-ai-form-chat__follow-up-list li {
    margin-bottom: .25rem;
}

.runtime-ai-form-chat__composer {
    background: var(--runtime-surface);
    border-top: 1px solid var(--runtime-border);
    flex: 0 0 auto;
    padding: var(--runtime-space-2);
}

.runtime-ai-form-chat__composer .nhsuk-textarea {
    max-width: none;
    width: 100%;
}

.runtime-ai-form-chat__composer-row {
    align-items: end;
    display: grid;
    gap: var(--runtime-space-2);
    grid-template-columns: minmax(0, 1fr) 12rem;
}

.runtime-ai-form-chat__composer-row > .nhsuk-textarea {
    margin-bottom: 0;
    min-height: 4rem;
}

.runtime-ai-form-chat__composer-side {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: var(--runtime-space-2);
    justify-content: flex-end;
    justify-self: end;
    min-width: 0;
    width: 12rem;
}

.runtime-ai-form-chat__composer-side > .nhsuk-button {
    align-items: center;
    align-self: stretch;
    display: flex;
    justify-content: center;
    margin-bottom: 0;
    text-align: center;
    width: 100%;
}

.runtime-ai-form-preview {
    align-self: stretch;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    position: sticky;
    top: 3.2rem;
}

.runtime-ai-form-preview > .runtime-form-preview--compact {
    box-sizing: border-box;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

.runtime-ai-form-preview__placeholder {
    box-sizing: border-box;
    height: 100%;
    min-height: 16rem;
}

.runtime-ai-form-preview__placeholder > h3 {
    margin-top: 0;
}

.runtime-ai-form-upload {
    margin-bottom: 1.5rem;
}

.runtime-ai-form-upload input[type="file"] {
    max-width: 100%;
}

.runtime-ai-form-upload--compact {
    flex: 0 1 auto;
    margin-bottom: 0;
    min-width: 0;
    width: 100%;
}

.runtime-ai-form-upload--compact input[type="file"] {
    font-size: .75rem;
    width: 100%;
}

.runtime-ai-form-upload--compact .nhsuk-label,
.runtime-ai-form-upload--compact .nhsuk-hint {
    font-size: .875rem;
    margin-bottom: .25rem;
}

.runtime-ai-form-screenshot-preview {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: var(--runtime-space-2);
    margin-top: var(--runtime-space-3);
}

.runtime-ai-form-screenshot-preview__trigger {
    appearance: none;
    background: transparent;
    border: 2px solid transparent;
    color: var(--runtime-ink);
    cursor: pointer;
    display: inline-grid;
    font: inherit;
    gap: var(--runtime-space-1);
    max-width: 100%;
    padding: 0;
    text-align: left;
}

.runtime-ai-form-screenshot-preview__trigger:hover {
    background: var(--runtime-surface);
    border-color: var(--runtime-border-strong);
}

.runtime-ai-form-screenshot-preview__trigger img {
    border: 1px solid var(--runtime-border);
    display: block;
    height: auto;
    max-height: 14rem;
    max-width: 100%;
    object-fit: contain;
}

.runtime-ai-form-screenshot-preview__trigger span {
    color: var(--runtime-muted);
    font-size: .8125rem;
}

.runtime-ai-form-screenshot-preview__remove {
    margin: 0;
}

.runtime-ai-form-screenshot-preview--compact {
    align-items: center;
    flex-wrap: nowrap;
    margin-top: var(--runtime-space-1);
}

.runtime-ai-form-screenshot-preview--compact
    .runtime-ai-form-screenshot-preview__trigger {
    align-items: center;
    display: flex;
    min-width: 0;
}

.runtime-ai-form-screenshot-preview--compact
    .runtime-ai-form-screenshot-preview__trigger img {
    max-height: 3rem;
    max-width: 5rem;
}

.runtime-ai-form-screenshot-preview--compact
    .runtime-ai-form-screenshot-preview__trigger span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-ai-form-screenshot-dialog__body {
    display: flex;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: var(--runtime-space-2);
}

.runtime-ai-form-screenshot-dialog__figure {
    display: grid;
    gap: var(--runtime-space-2);
    grid-template-rows: max-content minmax(0, 1fr) max-content;
    height: 100%;
    margin: 0;
    max-height: 100%;
    max-width: 100%;
    min-height: 0;
    width: 100%;
}

.runtime-ai-form-screenshot-dialog__toolbar {
    align-items: center;
    display: flex;
    gap: var(--runtime-space-1);
    justify-content: center;
}

.runtime-ai-form-screenshot-dialog__toolbar .nhsuk-button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    margin: 0;
    min-width: 2.5rem;
    padding: .35rem .65rem;
}

.runtime-ai-form-screenshot-dialog__zoom {
    align-items: center;
    align-self: stretch;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    display: inline-flex;
    font-variant-numeric: tabular-nums;
    justify-content: center;
    min-width: 4.25rem;
    padding-inline: var(--runtime-space-2);
}

.runtime-ai-form-screenshot-dialog__reset {
    margin-left: var(--runtime-space-1) !important;
}

.runtime-ai-form-screenshot-dialog__viewport {
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    cursor: grab;
    min-height: 18rem;
    overflow: hidden;
    position: relative;
    touch-action: none;
    user-select: none;
}

.runtime-ai-form-screenshot-dialog__viewport:focus-visible {
    outline: 4px solid var(--runtime-focus);
    outline-offset: -4px;
}

.runtime-ai-form-screenshot-dialog__viewport--dragging {
    cursor: grabbing;
}

.runtime-ai-form-screenshot-dialog__viewport img {
    display: block;
    height: 100%;
    inset: 0;
    object-fit: contain;
    pointer-events: none;
    position: absolute;
    user-select: none;
    width: 100%;
    will-change: transform;
}

.runtime-ai-form-screenshot-dialog__figure figcaption {
    align-items: center;
    color: var(--runtime-muted);
    display: flex;
    font-size: .875rem;
    flex-wrap: wrap;
    gap: var(--runtime-space-2);
    justify-content: space-between;
}

.runtime-form-builder-layout__preview > .runtime-form-preview {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.runtime-form-builder-layout__preview > .runtime-form-preview--compact {
    height: min(
        44rem,
        calc(var(--runtime-workspace-viewport-height) - 10rem));
}

.runtime-form-live-preview__empty {
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    padding: 1rem;
}

.runtime-form-live-preview__empty h2,
.runtime-form-live-preview__empty p {
    margin-bottom: .5rem;
}

.runtime-form-live-preview__empty p:last-child {
    margin-bottom: 0;
}

.runtime-form-preview--compact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
    overflow: hidden;
    padding: 1rem;
}

.runtime-form-preview--compact h2 {
    font-size: 1.35rem;
    margin-bottom: .35rem;
}

.runtime-form-preview--compact h3 {
    font-size: 1.1rem;
}

.runtime-form-preview--compact .nhsuk-label,
.runtime-form-preview--compact .nhsuk-fieldset__legend {
    font-size: 1rem;
}

.runtime-form-preview--compact .nhsuk-input,
.runtime-form-preview--compact .nhsuk-select,
.runtime-form-preview--compact .nhsuk-textarea {
    max-width: 100%;
}

.runtime-form-preview__desktop-action {
    border-bottom: 1px solid var(--runtime-border);
    display: flex;
    flex: 0 0 auto;
    width: 100%;
}

.runtime-form-preview__desktop-action .nhsuk-button {
    align-items: center;
    display: flex;
    font-size: .875rem;
    justify-content: center;
    line-height: 1.2;
    margin: 0;
    min-height: 2.25rem;
    padding: var(--runtime-space-1) var(--runtime-space-2);
    text-align: center;
    width: 100%;
}

.runtime-form-preview__desktop-action--paired {
    display: grid;
    gap: var(--runtime-space-2);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: var(--runtime-space-2);
}

.runtime-form-preview__interactive {
    min-width: 0;
}

.runtime-form-preview__form {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.runtime-form-preview__actions {
    margin-block-start: 1.5rem;
}

.runtime-form-preview--compact .runtime-form__actions {
    flex-wrap: nowrap;
    gap: .375rem;
    padding-inline-end: 0;
}

.runtime-form-preview--compact .runtime-form__actions .nhsuk-button {
    flex: 1 1 0;
    font-size: .875rem;
    min-width: 0;
    padding-inline: .5rem;
    width: auto;
}

.runtime-form-preview--compact .runtime-form__progress-label {
    font-size: .8125rem;
    line-height: 1.25;
}

.runtime-form-preview--compact
    .runtime-form__page-heading + .runtime-form__progress {
    margin-top: .5rem;
}

.runtime-form-preview__progress {
    color: var(--runtime-muted);
    font-weight: 700;
}

.runtime-form-review {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .5rem;
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
}

.runtime-layout-review {
    display: grid;
    gap: 1rem;
}

.runtime-layout-review > h2,
.runtime-layout-review > p,
.runtime-layout-review > details {
    margin-bottom: 0;
}

.runtime-form-review__changes {
    display: grid;
    gap: .75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-form-review__change {
    border-left: .35rem solid var(--runtime-border-strong);
    display: grid;
    gap: .15rem;
    padding: .65rem .85rem;
}

.runtime-form-review__change--added {
    border-left-color: var(--runtime-success);
}

.runtime-form-review__change--changed {
    border-left-color: #ffb81c;
}

.runtime-form-review__change--removed {
    border-left-color: var(--runtime-danger);
}

@media (max-width: 64rem) {
    .runtime-form-builder-layout,
    .runtime-ai-form-workbench {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-ai-form-journey__content {
        display: block;
        overflow: auto;
    }

    .runtime-ai-form-workbench {
        grid-template-rows: auto;
        height: auto;
    }

    .runtime-ai-form-workbench__conversation {
        height:
            max(
                32rem,
                calc(var(--runtime-workspace-viewport-height) - 8rem));
    }

    .runtime-form-builder-layout__preview,
    .runtime-ai-form-preview {
        position: static;
    }

    .runtime-ai-form-preview {
        height:
            clamp(
                24rem,
                calc(var(--runtime-workspace-viewport-height) - 8rem),
                44rem);
        max-height: none;
        max-width: 28rem;
    }

    .runtime-admin-destinations {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .runtime-admin-definition-row--field,
    .runtime-form-answer-row,
    .runtime-form-answer-row--threshold {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 50rem) {
    .runtime-ai-form-chat__composer-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-form-organizer {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
    }

    .runtime-form-organizer__pages,
    .runtime-form-organizer__questions {
        height: 22rem;
    }

    .runtime-form-organizer__pages {
        border-bottom: 1px solid var(--runtime-border);
        border-right: 0;
    }

}

@media (max-width: 40rem) {
    .runtime-main .nhsuk-breadcrumb .nhsuk-back-link {
        margin-top: 0;
    }

    .runtime-admin-destinations {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-admin-workspace__header,
    .runtime-admin-empty,
    .runtime-admin-panel {
        padding: 1rem;
    }

    .runtime-admin-definition-row,
    .runtime-admin-definition-row--field,
    .runtime-form-editor-grid,
    .runtime-form-answer-row,
    .runtime-form-answer-row--threshold {
        align-items: stretch;
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-form-organizer__question {
        align-items: stretch;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .runtime-form-organizer__question-summary {
        align-items: start;
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-form-mapping-card__destination {
        padding-inline: .25rem;
    }

    .runtime-form-organizer__question-setting {
        white-space: normal;
    }

    .runtime-admin-plan-item,
    .runtime-configuration-seed-grid,
    .runtime-admin-steps,
    .runtime-admin-steps--two,
    .runtime-admin-steps--four,
    .runtime-admin-steps--five,
    .runtime-admin-steps--six,
    .runtime-admin-steps--seven,
    .runtime-layout-editor-sort,
    .runtime-layout-editor-options,
    .runtime-layout-preview__record-page,
    .runtime-layout-preview__view-controls {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-inbound-status-card > .runtime-form-draft-summary {
        flex-direction: column;
        gap: .25rem;
    }

    .runtime-inbound-attention-card__diagnosis {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-inbound-manual-review__heading,
    .runtime-inbound-manual-form__header {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-inbound-manual-review__heading > div,
    .runtime-inbound-manual-form__header > div {
        flex-basis: auto;
    }

    .runtime-inbound-manual-review__heading > .nhsuk-button {
        align-self: flex-start;
    }

    .runtime-inbound-run-card__progress {
        inline-size: 100%;
    }

    .runtime-layout-preview__header {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .runtime-layout-preview__header > .nhsuk-tag {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .runtime-layout-preview__shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-layout-preview__navigation {
        display: flex;
        min-height: 3.5rem;
    }

    .runtime-layout-preview__list-selector,
    .runtime-layout-preview__page-heading,
    .runtime-layout-preview__search,
    .runtime-layout-preview__pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-layout-preview__view-summary {
        justify-content: start;
    }

    .runtime-layout-preview__cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-admin-definition-heading,
    .runtime-layout-editor-row {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-card-designer__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .runtime-record-page-designer__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .runtime-record-page-designer__section-actions {
        align-self: flex-end;
    }

    .runtime-card-designer__add-field {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-layout-editor-add-choice {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-board-designer__heading,
    .runtime-board-designer__add-lane {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-board-designer__canvas {
        grid-auto-columns: minmax(0, 1fr);
        grid-auto-flow: row;
        overflow-x: visible;
    }

    .runtime-card-designer__canvas,
    .runtime-card-designer__height-settings {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-card-designer__field {
        grid-column: 1 / -1 !important;
    }

    .runtime-layout-editor-row__actions {
        justify-content: flex-start;
    }

    .runtime-admin-actions {
        width: 100%;
    }

    .runtime-admin-actions__panel {
        left: 0;
        min-width: 0;
        right: 0;
    }

    .runtime-form-editor-card__heading {
        align-items: stretch;
        flex-direction: column;
    }
}

.runtime-access-denied {
    margin: 2rem auto;
    max-width: 48rem;
}

.runtime-access-denied form {
    margin-top: 1.25rem;
}

.runtime-record-details__sidebar,
.runtime-record-details__summary,
.runtime-record-details__content {
    min-width: 0;
}

.runtime-record-details__sidebar {
    align-content: start;
    display: grid;
    gap: .625rem;
    grid-auto-rows: max-content;
}

.runtime-record-tabs {
    min-width: 0;
}

.runtime-record-navigation {
    flex: 0 0 auto;
    min-width: 0;
}

/* With no summary, Actions occupies one matching card beside the four tab slots. */
.runtime-record-navigation--with-actions {
    align-items: start;
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.runtime-record-navigation--with-actions > nav {
    grid-column: span 4;
    min-width: 0;
}

.tabCardGroup.runtime-record-tabs__list {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0 0 .625rem;
    padding: 0;
}

.tabCardGroup .runtime-record-tabs__item {
    display: flex;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.tabCardGroup .runtime-record-tab-card {
    align-items: stretch;
    appearance: none;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .375rem;
    border-top: .25rem solid color-mix(in srgb, var(--runtime-border) 70%, #768692);
    box-shadow:
        0 .0625rem .15rem rgb(23 43 58 / 8%),
        0 .2rem .5rem rgb(23 43 58 / 4%);
    color: var(--runtime-heading);
    cursor: pointer;
    display: flex;
    flex: 1 1 auto;
    font: inherit;
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 !important;
    min-height: 2.875rem;
    padding: 0;
    position: relative;
    text-align: center;
    text-decoration: none;
    width: 100%;
}

.tabCardGroup .runtime-record-tab-card__content {
    align-items: center;
    /* Reserve the badge height before padding, including in tabs without a count. */
    box-sizing: content-box;
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    min-height: 1.5rem;
    padding: .625rem .5rem;
}

.tabCardGroup .runtime-record-tabs__more {
    position: relative;
    z-index: 20;
}

.runtime-record-tabs__mobile-menu {
    display: none;
    margin-block-end: .625rem;
    position: relative;
    z-index: 20;
}

.runtime-record-tabs__more:not([data-open-on-hover="false"]):hover,
.runtime-record-tabs__more[data-expanded="true"] {
    z-index: 40;
}

.runtime-record-tabs__more::before {
    background: rgb(23 43 58 / 10%);
    content: "";
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .18s ease;
    z-index: 0;
}

.runtime-record-tabs__count {
    background: var(--runtime-accent);
    border-radius: 999px;
    color: #fff;
    display: inline-block;
    flex: 0 0 auto;
    font-size: .75rem;
    font-variant-numeric: lining-nums tabular-nums;
    /* Keep the number's line box and badge at the same height so fractional
       workspace zoom scales both together without separate vertical padding. */
    height: 1.5rem;
    line-height: 1.5rem;
    min-width: 1.5rem;
    padding: 0 .4rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.tabCardGroup .runtime-record-tabs__more-toggle .runtime-record-tab-card__content {
    gap: .65rem;
}

.tabCardGroup .runtime-record-tabs__more-toggle {
    border: 1px solid var(--runtime-border);
    border-radius: .375rem;
    border-top: .25rem solid color-mix(in srgb, var(--runtime-border) 70%, #768692);
    position: relative;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        border-radius .16s ease,
        box-shadow .18s ease;
    z-index: 31;
}

.tabCardGroup .runtime-record-tabs__more-toggle::after {
    bottom: -1px;
    content: "";
    height: 2px;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
}

.runtime-record-tabs__more-chevron {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    height: .55rem;
    margin-block-start: -.2rem;
    transform: rotate(45deg);
    transition: transform .2s ease;
    width: .55rem;
}

.runtime-record-tabs__more-panel {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .375rem;
    box-shadow:
        0 .625rem 1.5rem rgb(33 43 50 / 18%),
        0 .125rem .375rem rgb(33 43 50 / 10%);
    left: 0;
    max-height: min(70dvh, 32rem);
    min-width: 0;
    opacity: 0;
    overflow-y: auto;
    padding: .5rem;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: calc(100% - 1px);
    transform: translateY(-.25rem) scale(.99);
    transform-origin: top right;
    transition:
        border-color .16s ease,
        opacity .18s ease,
        transform .22s cubic-bezier(.2, .8, .2, 1),
        visibility 0s linear .22s;
    visibility: hidden;
    width: 100%;
    z-index: 30;
}

.runtime-record-tabs__more-panel ul {
    display: grid;
    gap: .35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-record-tabs__more-panel li {
    margin: 0;
}

.runtime-record-tabs__more-item {
    appearance: none;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    color: var(--runtime-heading);
    cursor: pointer;
    display: block;
    font: inherit;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.2;
    padding: .65rem .75rem;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.runtime-record-tabs__more-item:hover {
    background: var(--runtime-accent-soft);
    border-color: var(--runtime-accent-dark);
    color: var(--runtime-heading);
    text-decoration: none;
}

.runtime-record-tabs__more-item:focus-visible {
    background: var(--runtime-focus);
    box-shadow: inset 0 -4px #212b32;
    color: #000;
    outline: 3px solid transparent;
    text-decoration: none;
}

.runtime-record-tabs__more-item[aria-current="page"] {
    background: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 10%, #fff);
    border-color: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 55%, var(--runtime-border));
    border-left: .25rem solid var(--runtime-shell-accent, var(--runtime-accent));
    color: var(--runtime-heading);
    font-weight: 800;
}

.runtime-record-tabs__more-item[aria-current="page"]:focus-visible {
    background: var(--runtime-focus);
    border-color: #212b32;
    box-shadow: inset .25rem 0 #212b32;
    color: #000;
    outline: .25rem solid transparent;
}

.runtime-record-tabs__more[data-expanded="true"] .runtime-record-tabs__more-panel {
    background: color-mix(in srgb, var(--runtime-accent-soft) 50%, var(--runtime-surface));
    border-color: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 42%, var(--runtime-border));
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
    visibility: visible;
}

.tabCardGroup .runtime-record-tabs__more[data-expanded="true"] button.runtime-record-tabs__more-toggle,
.tabCardGroup.runtime-record-tabs__more[data-expanded="true"] button.runtime-record-tabs__more-toggle {
    border-color: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 42%, var(--runtime-border));
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-color: var(--runtime-shell-accent, var(--runtime-accent));
}

.tabCardGroup .runtime-record-tabs__more[data-expanded="true"] button.runtime-record-tabs__more-toggle:not(:focus-visible),
.tabCardGroup.runtime-record-tabs__more[data-expanded="true"] button.runtime-record-tabs__more-toggle:not(:focus-visible) {
    background: color-mix(in srgb, var(--runtime-accent-soft) 50%, var(--runtime-surface));
    box-shadow:
        .45rem -.45rem 1.2rem rgb(33 43 50 / 22%),
        .125rem -.125rem .35rem rgb(33 43 50 / 12%);
}

.tabCardGroup .runtime-record-tabs__more[data-expanded="true"] button.runtime-record-tabs__more-toggle::after,
.tabCardGroup.runtime-record-tabs__more[data-expanded="true"] button.runtime-record-tabs__more-toggle::after {
    background: color-mix(in srgb, var(--runtime-accent-soft) 50%, var(--runtime-surface));
    opacity: 1;
    pointer-events: auto;
}

.tabCardGroup .runtime-record-tabs__more[data-expanded="true"] button.runtime-record-tabs__more-toggle:focus-visible::after,
.tabCardGroup.runtime-record-tabs__more[data-expanded="true"] button.runtime-record-tabs__more-toggle:focus-visible::after {
    background: var(--runtime-focus);
}

.runtime-record-tabs__more[data-expanded="true"]::before {
    opacity: 1;
}

.runtime-record-tabs__more[data-expanded="true"] .runtime-record-tabs__more-chevron {
    transform: translateY(.12rem) rotate(45deg);
}

.tabCardGroup .runtime-record-tab-card:not(.nhsuk-card--selected):hover {
    background: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 5%, #fff);
    border-color: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 42%, var(--runtime-border));
    border-top-color: var(--runtime-shell-accent, var(--runtime-accent));
    box-shadow:
        0 .125rem .25rem rgb(23 43 58 / 10%),
        0 .3rem .7rem rgb(23 43 58 / 7%);
    color: var(--runtime-heading);
}

.tabCardGroup .runtime-record-tab-card.nhsuk-card--selected {
    background: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 10%, #fff);
    border-color: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 55%, var(--runtime-border));
    border-top-color: var(--runtime-shell-accent, var(--runtime-accent));
    border-top-width: .25rem;
    box-shadow:
        0 .125rem .25rem rgb(23 43 58 / 10%),
        0 .35rem .75rem rgb(23 43 58 / 8%);
    color: var(--runtime-heading);
    font-weight: 800;
}

.tabCardGroup .runtime-record-tab-card.nhsuk-card--selected:hover {
    background: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 14%, #fff);
    border-color: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 70%, var(--runtime-border));
    color: var(--runtime-heading);
}

.tabCardGroup .runtime-record-tab-card:focus-visible {
    background: var(--runtime-focus);
    border-color: #212b32;
    border-top-color: #212b32;
    box-shadow: 0 0 0 .25rem var(--runtime-focus), inset 0 -.25rem #212b32;
    color: #000;
    outline: .25rem solid transparent;
}

.runtime-history-panel {
    display: grid;
    flex: 1 1 auto;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: none;
    min-height: 0;
    overflow: hidden;
}

.runtime-history-panel__controls {
    align-items: center;
    border-bottom: 1px solid var(--runtime-border);
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    justify-content: flex-end;
    margin: 0 0 .75rem;
    padding: 0 0 .75rem;
    padding-block-start: .25rem;
    padding-inline-end: .25rem;
}

.runtime-history-panel__preferences {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: .5rem;
}

.runtime-history-panel__preference-group {
    border: 1px solid var(--runtime-border);
    border-radius: .25rem;
    display: inline-flex;
    overflow: hidden;
}

.runtime-history-panel__preference {
    align-items: center;
    background: #fff;
    border: 0;
    color: var(--runtime-heading);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: .75rem;
    font-weight: 700;
    gap: .35rem;
    justify-content: center;
    min-height: 2.25rem;
    padding: .35rem .65rem;
}

.runtime-history-panel__preference +
.runtime-history-panel__preference {
    border-inline-start: 1px solid var(--runtime-border);
}

.runtime-history-panel__preference:hover {
    background: var(--runtime-accent-soft);
}

.runtime-history-panel__preference--selected {
    background: var(--runtime-accent-dark);
    color: #fff;
}

.runtime-history-panel__preference--selected:hover {
    background: var(--runtime-accent-dark);
    color: #fff;
}

.runtime-history-panel__preference:focus-visible {
    background: var(--runtime-focus);
    box-shadow: inset 0 -.25rem #212b32;
    color: #000;
    outline: .25rem solid transparent;
    position: relative;
    z-index: 1;
}

.runtime-history-filters {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.runtime-history-filters__options {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.runtime-history-filter {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    font-size: .8125rem;
    gap: .5rem;
    max-width: 22rem;
    min-height: 2rem;
    padding: .3rem .5rem;
    text-transform: none;
}

.runtime-history-filter span {
    overflow-wrap: anywhere;
}

.runtime-history-filter input {
    accent-color: var(--runtime-heading);
    flex: 0 0 auto;
    height: 1rem;
    margin: 0;
    width: 1rem;
}

.runtime-history-panel__actions {
    display: flex;
    flex: 0 0 auto;
    gap: .5rem;
}

.runtime-history-panel__icon-button {
    align-items: center;
    display: inline-flex;
    height: 2.25rem;
    justify-content: center;
    min-height: 2.25rem;
    min-width: 2.25rem;
    padding: 0;
    position: relative;
    width: 2.25rem;
}

.runtime-history-panel__icon-button i {
    pointer-events: none;
}

.runtime-history-panel__filter-count {
    align-items: center;
    background: var(--runtime-heading);
    border: 2px solid var(--runtime-surface);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: .625rem;
    font-weight: 800;
    height: 1.125rem;
    justify-content: center;
    line-height: 1;
    min-width: 1.125rem;
    padding-inline: .2rem;
    position: absolute;
    right: -.45rem;
    top: -.45rem;
}

.runtime-history-filters__options--panel {
    align-items: stretch;
    display: grid;
    gap: .65rem;
    grid-template-columns: minmax(0, 1fr);
}

.runtime-history-filter-dialog .runtime-history-filter {
    box-sizing: border-box;
    justify-content: space-between;
    max-width: none;
    width: 100%;
}

.runtime-history-panel__actions .nhsuk-button--small,
.runtime-history-panel__footer .nhsuk-button--small {
    margin-bottom: 0;
}

.runtime-history-panel__entries {
    align-content: start;
    grid-auto-rows: max-content;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-inline-end: .25rem;
    scrollbar-gutter: stable;
}

.runtime-history-panel__empty {
    margin: .5rem 0;
}

.runtime-history-panel__footer {
    align-items: center;
    border-top: 1px solid var(--runtime-border);
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    justify-content: space-between;
    margin-top: .75rem;
    padding-top: .75rem;
    padding-inline-end: .25rem;
}

.runtime-history-panel__search {
    flex: 1 1 18rem;
    margin: 0 auto 0 0;
    max-width: 22rem;
}

.runtime-history-panel__search .runtime-control {
    width: 100%;
}

.runtime-history-panel__footer .runtime-pagination__list li {
    min-width: 0;
}

.runtime-history-panel__page-size {
    align-items: center;
    display: flex;
    gap: .5rem;
}

.runtime-history-panel__page-size--mobile,
.runtime-history-panel__position--mobile {
    display: none;
}

.runtime-history-panel__page-size .nhsuk-label,
.runtime-history-panel__position {
    font-size: .875rem;
    font-weight: 700;
    margin: 0;
}

.runtime-history-panel__page-size .nhsuk-select {
    font-size: .875rem;
    min-width: 4.5rem;
    padding-block: .25rem;
}

* {
    scrollbar-color: #768692 #e8edee;
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    height: .5rem;
    width: .5rem;
}

*::-webkit-scrollbar-track {
    background: #e8edee;
}

*::-webkit-scrollbar-thumb {
    background: #768692;
    border: 1px solid #e8edee;
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #425563;
}

@media (forced-colors: active) {
    * {
        scrollbar-color: auto;
    }
}

.runtime-record-actions {
    flex: 0 0 auto;
    min-width: 0;
}

.runtime-record-actions__toggle {
    display: none;
}

.runtime-record-actions__toggle-label--mobile {
    display: none;
}

.runtime-record-actions__more {
    display: none;
    margin-top: .35rem;
}

.runtime-record-actions[data-visible-count="0"] .runtime-record-actions__more {
    margin-top: 0;
}

.runtime-record-actions__panel {
    min-width: 0;
}

.runtime-record-actions ul {
    display: grid;
    gap: .35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

li:has(> .runtime-record-action) {
    margin-bottom: 0;
}


.runtime-record-action {
    color: var(--runtime-heading);
    margin: 0;
    text-align: center;
    width: 100%;
}

.runtime-record-action .nhsuk-card__content {
    font-size: .9375rem;
    padding: .65rem .5rem;
}

    .runtime-record-action a,
    .runtime-record-action a:link,
    .runtime-record-action a:visited,
    .runtime-record-action a:hover,
    .runtime-record-action a:active,
    .runtime-record-action a:focus {
        color: inherit !important;
        text-decoration: none !important;
    }

.runtime-record-action[aria-disabled="true"] {
    cursor: not-allowed;
}

.runtime-record-quick-actions {
    align-items: start;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, .8fr);
}

.runtime-record-quick-actions__preview {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    border-top: .25rem solid var(--runtime-shell-accent, var(--runtime-accent));
    box-shadow:
        0 .125rem .25rem rgb(23 43 58 / 10%),
        0 .35rem .8rem rgb(23 43 58 / 6%);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
}

.runtime-record-quick-actions__preview h3 {
    background: color-mix(
        in srgb,
        var(--runtime-shell-accent, var(--runtime-accent)) 7%,
        #fff);
    border-bottom: 1px solid var(--runtime-border);
    color: var(--runtime-heading);
    font-size: 1rem;
    margin: 0;
    padding: .75rem .875rem;
}

.runtime-record-quick-actions__preview dl {
    display: grid;
    gap: .625rem;
    margin: 0;
    padding: .75rem;
}

.runtime-record-quick-actions__preview dl > div {
    background: #f6f8f9;
    border: 1px solid color-mix(in srgb, var(--runtime-border) 82%, #fff);
    border-radius: .25rem;
    min-width: 0;
    padding: .5rem .625rem;
}

.runtime-record-quick-actions__preview dt {
    color: var(--runtime-slate);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .035em;
    line-height: 1.25;
    text-transform: uppercase;
}

.runtime-record-quick-actions__preview dd {
    color: var(--runtime-heading);
    font-size: .9rem;
    line-height: 1.35;
    margin: .3rem 0 0;
    overflow-wrap: anywhere;
}

.runtime-record-quick-actions__menu {
    min-width: 0;
}

.runtime-record-quick-actions__menu ul {
    display: grid;
    gap: .375rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-quick-action-form-layout {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
}

.runtime-dialog__body.runtime-form-dialog__body {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Executable Generic Forms own their question scroll region so navigation
   remains available at the bottom of every direct or split form modal. */
.runtime-dialog__body.runtime-generic-form-dialog__body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Activity capture owns a scrolling field panel and a persistent action panel. */
.runtime-dialog__body.runtime-activity-entry-dialog__body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.runtime-generic-form-dialog__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.runtime-generic-form-dialog__content > .runtime-form {
    flex: 1 1 auto;
}

.runtime-dialog__body.runtime-quick-action-form-dialog__body {
    overflow: hidden;
}

.runtime-quick-action-form-dialog__body .runtime-quick-action-form-layout {
    height: 100%;
    min-height: 0;
}

.runtime-quick-action-form-dialog__body .runtime-record-quick-actions__preview,
.runtime-quick-action-form-layout__form {
    max-height: 100%;
    min-width: 0;
}

.runtime-quick-action-form-dialog__body .runtime-record-quick-actions__preview {
    min-height: 0;
}

.runtime-quick-action-form-dialog__body .runtime-record-quick-actions__preview-content {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.runtime-quick-action-form-layout__form {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
    overflow: hidden;
}

.runtime-quick-action-form-layout__toolbar,
.runtime-generic-form-dialog__toolbar {
    border-bottom: 1px solid var(--runtime-border);
    display: flex;
    flex-shrink: 0;
    justify-content: flex-end;
    margin-bottom: 1rem;
    /* NHS button borders and keyboard focus extend outside the button box.
       Leave room inside the clipped form panel, including at fractional zoom. */
    padding: .375rem .375rem .75rem;
}

.runtime-quick-action-form-layout__toolbar .nhsuk-button,
.runtime-generic-form-dialog__toolbar .nhsuk-button {
    height: auto;
    margin: 0;
    max-width: 100%;
    width: auto;
}

.runtime-quick-action-form-layout__content {
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: contain;
    padding-inline-end: .75rem;
}

@media (max-width: 48em) {
    .runtime-record-quick-actions,
    .runtime-quick-action-form-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-dialog__body.runtime-quick-action-form-dialog__body {
        overflow: hidden;
    }

    .runtime-quick-action-form-dialog__body .runtime-quick-action-form-layout {
        grid-template-rows: minmax(8rem, 35%) minmax(0, 1fr);
        height: 100%;
    }

    .runtime-quick-action-form-dialog__body .runtime-record-quick-actions__preview,
    .runtime-quick-action-form-layout__form {
        height: 100%;
        max-height: 100%;
        overflow: hidden;
        padding-inline-end: 0;
    }

    .runtime-quick-action-form-dialog__body .runtime-record-quick-actions__preview-content {
        min-height: 0;
        overflow-y: auto;
        padding-inline-end: 0;
    }

    .runtime-quick-action-form-layout__content {
        min-height: 0;
        overflow: hidden;
        padding-inline-end: 0;
    }

    .runtime-form__actions {
        flex-wrap: nowrap;
        gap: .375rem;
        padding-inline-end: 0;
    }

    .runtime-form__actions .nhsuk-button {
        flex: 1 1 0;
        font-size: .875rem;
        min-width: 0;
        padding-inline: .5rem;
        width: auto;
    }

    .runtime-form__progress-label {
        font-size: .8125rem;
        line-height: 1.25;
    }

    .runtime-form__page-heading + .runtime-form__progress {
        margin-top: .5rem;
    }
}

.runtime-details-section {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    border-top: .25rem solid var(--runtime-shell-accent, var(--runtime-accent));
    box-shadow:
        0 .125rem .25rem rgb(23 43 58 / 10%),
        0 .35rem .8rem rgb(23 43 58 / 6%);
    min-width: 0;
    overflow: hidden;
}

.runtime-details-section__heading {
    background: color-mix(
        in srgb,
        var(--runtime-shell-accent, var(--runtime-accent)) 7%,
        #fff);
    border-bottom: 1px solid var(--runtime-border);
    color: var(--runtime-heading);
    font-size: 1rem;
    margin: 0;
    padding: .75rem .875rem;
}

.runtime-details-section__empty {
    color: var(--runtime-slate);
    margin: 0;
    padding: 1rem;
}

.runtime-details-fields {
    display: grid;
    gap: .625rem;
    grid-template-columns: repeat(
        var(--runtime-details-columns, 1),
        minmax(0, 1fr));
    margin: 0;
    padding: .75rem;
}

.runtime-details-field {
    background: #f6f8f9;
    border: 1px solid color-mix(in srgb, var(--runtime-border) 82%, #fff);
    border-radius: .25rem;
    box-sizing: border-box;
    grid-column: span 1;
    min-width: 0;
    padding: .55rem .625rem;
}

.runtime-details-field--text {
    background: #fff;
}

.runtime-details-field__label {
    color: var(--runtime-slate);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .035em;
    line-height: 1.25;
    margin-block-end: .3rem;
    text-transform: uppercase;
}

.runtime-details-field dd {
    color: var(--runtime-heading);
    font-size: .9rem;
    line-height: 1.35;
    margin: 0;
    overflow-wrap: anywhere;
}

.runtime-details-field__value {
    color: var(--runtime-heading);
    white-space: pre-line;
}

.runtime-details-field__linked-value,
.runtime-record-page-designer__linked-preview,
.runtime-layout-preview__linked-value {
    align-items: center;
    display: flex;
    gap: .5rem;
    min-width: 0;
}

.runtime-details-field__linked-value > .runtime-details-field__value,
.runtime-record-page-designer__linked-preview > :first-child,
.runtime-layout-preview__linked-value > :first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.runtime-details-field__linked-action {
    align-items: center;
    align-self: center;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .5rem;
    height: 1.25rem;
    justify-content: center;
    margin: 0;
    min-height: 1.25rem;
    padding: 0;
    width: 1.25rem;
}

.runtime-details-field__linked-action i {
    pointer-events: none;
}

.runtime-details-field__value--rich-text {
    white-space: normal;
}

.runtime-rich-text {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    min-width: 0;
    overflow-wrap: anywhere;
}

.runtime-rich-text :where(*) {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.runtime-rich-text > :first-child {
    margin-block-start: 0;
}

.runtime-rich-text > :last-child {
    margin-block-end: 0;
}

.runtime-rich-text :is(p, ul, ol, blockquote, pre, dl) {
    margin-block: 0 .65em;
}

.runtime-rich-text :is(h2, h3, h4, h5, h6) {
    font: inherit;
    font-weight: 700;
    margin-block: 0 .45em;
}

.runtime-rich-text :is(ul, ol) {
    padding-inline-start: 1.5em;
}

.runtime-rich-text blockquote {
    border-inline-start: .2rem solid var(--runtime-border);
    padding-inline-start: .75rem;
}

.runtime-rich-text pre {
    max-width: 100%;
    overflow: auto;
    white-space: pre-wrap;
}

.runtime-rich-text a {
    color: var(--runtime-brand);
    overflow-wrap: anywhere;
}

.runtime-rich-text.runtime-record-table__rich-text {
    display: block;
    max-width: var(--runtime-rich-text-column-width, 100%);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: var(--runtime-rich-text-column-width, 100%);
}

.runtime-rich-text__notice {
    color: var(--runtime-slate);
    font-size: .8rem;
    font-style: italic;
    margin-block: .5rem 0;
}

.runtime-details-field--placeholder {
    background: transparent;
    border-color: transparent;
    padding: 0;
}

.runtime-details-section--table .runtime-details-fields {
    display: block;
}

.runtime-details-section--table .runtime-details-field {
    align-items: start;
    display: grid;
    gap: .5rem;
    grid-template-columns: minmax(7rem, 2fr) minmax(0, 3fr);
    padding: .55rem .625rem;
}

.runtime-details-section--table .runtime-details-field__label {
    margin: 0;
}

.runtime-record-details__summary
    .runtime-details-section--table
    .runtime-details-field {
    gap: .25rem;
    grid-template-columns: minmax(0, 1fr);
}

.runtime-history-answer {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.runtime-form-record-selector {
    max-width: 48rem;
    position: relative;
}

.runtime-form-record-selector__status {
    color: var(--runtime-slate);
    font-size: .875rem;
    margin: 0 0 .35rem;
}

.runtime-form-record-selector__input-row {
    position: relative;
}

.runtime-form-record-selector__input-row .nhsuk-input {
    min-width: 0;
    width: 100%;
}

.runtime-form-record-selector__input-row .nhsuk-button {
    margin: 0;
}

.runtime-form-record-selector__selection-status {
    margin-top: .5rem;
}

.runtime-form-record-selector__selection-group {
    margin-top: .5rem;
    width: 100%;
}

.runtime-form-record-selector__selections {
    display: grid;
    gap: .35rem;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.runtime-form-record-selector__record-card {
    align-items: center;
    background: color-mix(in srgb, var(--runtime-form-record-selector-accent) 5%, #fff);
    border: 1px solid color-mix(in srgb, var(--runtime-form-record-selector-accent) 28%, var(--runtime-border));
    border-left: .2rem solid var(--runtime-form-record-selector-accent);
    border-radius: var(--runtime-radius);
    box-sizing: border-box;
    display: flex;
    font-size: .875rem;
    gap: .35rem;
    max-width: 100%;
    min-width: 0;
    padding: .2rem .25rem .2rem .35rem;
    width: 100%;
}

.runtime-form-record-selector__record-card--selected {
    background: color-mix(in srgb, var(--runtime-form-record-selector-accent) 7%, #fff);
    border-color: color-mix(in srgb, var(--runtime-form-record-selector-accent) 34%, var(--runtime-border));
    border-left-color: var(--runtime-form-record-selector-accent);
}

.runtime-form-record-selector__record-card--removed {
    background: color-mix(in srgb, var(--runtime-danger) 5%, #fff);
    border-color: color-mix(in srgb, var(--runtime-danger) 30%, var(--runtime-border));
    border-left-color: var(--runtime-form-record-selector-accent);
}

.runtime-form-record-selector__record-icon {
    align-items: center;
    align-self: center;
    background: color-mix(in srgb, var(--runtime-form-record-selector-accent) 14%, #fff);
    border-radius: 999px;
    color: color-mix(in srgb, var(--runtime-form-record-selector-accent) 72%, #231f20);
    display: inline-flex;
    flex: 0 0 1.5rem;
    height: 1.5rem;
    justify-content: center;
    width: 1.5rem;
}

.runtime-form-record-selector__record-card--selected
    .runtime-form-record-selector__record-icon {
    background: color-mix(in srgb, var(--runtime-form-record-selector-accent) 14%, #fff);
    color: color-mix(in srgb, var(--runtime-form-record-selector-accent) 72%, #231f20);
}

.runtime-form-record-selector__record-card--removed
    .runtime-form-record-selector__record-icon {
    background: color-mix(in srgb, var(--runtime-form-record-selector-accent) 14%, #fff);
    color: color-mix(in srgb, var(--runtime-form-record-selector-accent) 72%, #231f20);
}

.runtime-form-record-selector__record-details {
    align-items: baseline;
    display: inline-flex;
    flex: 1 1 auto;
    gap: .3rem;
    min-width: 0;
    overflow: hidden;
}

.runtime-form-record-selector__record-details strong,
.runtime-form-record-selector__record-details span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-form-record-selector__record-details span {
    color: var(--runtime-slate);
    font-size: .8125rem;
}

.runtime-form-record-selector__card-remove {
    align-items: center;
    align-self: center;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-accent-dark);
    border-radius: 999px;
    color: var(--runtime-accent-dark);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .875rem;
    height: 1.5rem;
    justify-content: center;
    line-height: 1;
    margin: 0;
    padding: 0;
    width: 1.5rem;
}

.runtime-form-record-selector__card-remove:hover {
    background: color-mix(in srgb, var(--runtime-danger) 10%, #fff);
    border-color: var(--runtime-danger);
    color: var(--runtime-danger);
}

.runtime-form-record-selector__card-remove:focus-visible {
    background: var(--runtime-focus);
    border-color: var(--runtime-focus-text);
    box-shadow: 0 0 0 2px var(--runtime-focus);
    color: var(--runtime-focus-text);
    outline: 2px solid transparent;
}

.runtime-form-record-selector__results {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-accent-dark);
    border-radius: 0 0 .3rem .3rem;
    box-shadow: 0 .5rem 1rem rgb(23 43 58 / 18%);
    inset-inline: 0;
    list-style: none;
    margin: .1rem 0 0;
    max-height: 18rem;
    overflow-y: auto;
    padding: 0;
    position: absolute;
    top: 100%;
    z-index: 60;
}

.runtime-form-record-selector__results li + li {
    border-top: 1px solid var(--runtime-border);
}

.runtime-form-record-selector__results button {
    background: transparent;
    border: 0;
    color: var(--runtime-heading);
    cursor: pointer;
    display: grid;
    gap: .15rem;
    font: inherit;
    padding: .65rem .75rem;
    text-align: left;
    width: 100%;
}

.runtime-form-record-selector__results button:hover {
    background: color-mix(in srgb, var(--runtime-accent) 8%, #fff);
}

.runtime-form-record-selector__results button:focus-visible {
    background: var(--runtime-focus);
    box-shadow: inset 0 0 0 3px var(--runtime-focus-text);
    color: var(--runtime-focus-text);
    outline: 2px solid transparent;
}

.runtime-form-record-selector__result-title {
    font-weight: 700;
}

.runtime-form-record-selector__result-detail {
    color: var(--runtime-slate);
    font-size: .8125rem;
}

.runtime-form-record-selector__results button:focus-visible
    .runtime-form-record-selector__result-detail {
    color: var(--runtime-focus-text);
}

.runtime-form-record-selector__results button:disabled {
    background: var(--runtime-surface-muted);
    color: var(--runtime-slate);
    cursor: not-allowed;
}

.runtime-form-component-display {
    margin-bottom: 24px;
    padding: 16px;
    border-left: 4px solid var(--runtime-accent, #005eb8);
    background: #fff;
}

.runtime-form-component-display > :last-child {
    margin-bottom: 0;
}

.runtime-form-question {
    display: grid;
    grid-template-rows: 1fr;
    min-width: 0;
}

.runtime-form-question__content {
    min-height: 0;
    min-width: 0;
}

/* The form-level two-column setting behaves like an accessible definition
   list rather than an HTML table: prompt content and answer controls remain
   correctly associated, and the layout can collapse without changing the
   document reading order. */
@media (min-width: 64.0625rem) {
    .runtime-form__page--two-column
        .runtime-form-question:not(.runtime-form-question--full-width) {
        border-bottom: 1px solid var(--runtime-border);
        padding-block: var(--runtime-space-4);
    }

    .runtime-form__page--two-column
        .runtime-form-question:not(.runtime-form-question--full-width)
        > .runtime-form-question__content
        > .nhsuk-form-group {
        margin-bottom: 0;
    }

    .runtime-form__page--two-column
        .runtime-form-question:not(.runtime-form-question--full-width)
        .runtime-form-field {
        align-items: start;
        column-gap: var(--runtime-space-5);
        display: grid;
        grid-template-columns: minmax(12rem, 2fr) minmax(0, 3fr);
    }

    .runtime-form__page--two-column
        .runtime-form-question:not(.runtime-form-question--full-width)
        .runtime-form-field__prompt {
        grid-column: 1;
        min-width: 0;
    }

    .runtime-form__page--two-column
        .runtime-form-question:not(.runtime-form-question--full-width)
        .runtime-form-field__answer {
        grid-column: 2;
        min-width: 0;
    }

    .runtime-form__page--two-column
        .runtime-form-question:not(.runtime-form-question--full-width)
        .runtime-form-choice-field {
        align-items: start;
        column-gap: var(--runtime-space-5);
        display: grid;
        grid-template-columns: minmax(12rem, 2fr) minmax(0, 3fr);
        grid-template-rows: auto 1fr;
    }

    .runtime-form__page--two-column
        .runtime-form-question:not(.runtime-form-question--full-width)
        .runtime-form-choice-field__legend {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .runtime-form__page--two-column
        .runtime-form-question:not(.runtime-form-question--full-width)
        .runtime-form-choice-field__description {
        grid-column: 1;
        grid-row: 2;
        min-width: 0;
    }

    .runtime-form__page--two-column
        .runtime-form-question:not(.runtime-form-question--full-width)
        .runtime-form-choice-field > .runtime-form-field__answer {
        grid-column: 2;
        grid-row: 1 / span 2;
        min-width: 0;
    }
}

/* Compact previews model the mobile presentation even when their host
   viewport is wider than the responsive breakpoint. */
:is(.runtime-form-preview--compact, .runtime-form-preview--mobile-context)
    .runtime-form__page--two-column
    .runtime-form-question:not(.runtime-form-question--full-width) {
    border-bottom: 0;
    padding-block: 0;
}

:is(.runtime-form-preview--compact, .runtime-form-preview--mobile-context)
    .runtime-form__page--two-column
    .runtime-form-question:not(.runtime-form-question--full-width)
    .runtime-form-field,
:is(.runtime-form-preview--compact, .runtime-form-preview--mobile-context)
    .runtime-form__page--two-column
    .runtime-form-question:not(.runtime-form-question--full-width)
    .runtime-form-choice-field {
    display: block;
}

:is(.runtime-form-preview--compact, .runtime-form-preview--mobile-context)
    .runtime-form__page--two-column
    .runtime-form-question:not(.runtime-form-question--full-width)
    > .runtime-form-question__content
    > .nhsuk-form-group {
    margin-bottom: var(--runtime-space-5);
}

.runtime-form-question--revealed {
    animation: runtime-form-question-reveal .42s cubic-bezier(.16, 1, .3, 1) backwards;
    transform-origin: top center;
}

.runtime-form-question--hidden {
    animation: runtime-form-question-hide .36s cubic-bezier(.4, 0, .6, 1) forwards;
    pointer-events: none;
    transform-origin: top center;
}

@keyframes runtime-form-question-reveal {
    0% {
        clip-path: inset(0 0 100% 0);
        grid-template-rows: 0fr;
        opacity: 0;
        transform: translateY(-.65rem) scale(.985);
    }

    65% {
        clip-path: inset(0 0 0 0);
        opacity: 1;
        transform: translateY(.1rem) scale(1.003);
    }

    100% {
        clip-path: inset(0 0 0 0);
        grid-template-rows: 1fr;
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes runtime-form-question-hide {
    0% {
        clip-path: inset(0 0 0 0);
        grid-template-rows: 1fr;
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    35% {
        opacity: .85;
        transform: translateY(-.1rem) scale(.997);
    }

    100% {
        clip-path: inset(0 0 100% 0);
        grid-template-rows: 0fr;
        opacity: 0;
        transform: translateY(-.55rem) scale(.985);
    }
}

.runtime-icon-picker {
    position: relative;
}

.runtime-icon-picker__selection {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.runtime-icon-picker__selection .nhsuk-button {
    align-items: center;
    display: inline-flex;
    gap: .5rem;
    margin-block-end: 0;
}

.runtime-form-answer-icon .runtime-icon-picker__selection,
.runtime-form-answer-icon .runtime-icon-picker__selection .nhsuk-button {
    width: 100%;
}

.runtime-form-answer-icon .runtime-icon-picker__selection .nhsuk-button {
    justify-content: center;
    white-space: nowrap;
}

.runtime-icon-picker__panel {
    background: #f0f4f5;
    border: 1px solid #aeb7bd;
    border-radius: .25rem;
    box-sizing: border-box;
    box-shadow: 0 .5rem 1.5rem rgb(33 43 50 / 30%);
    gap: .5rem;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    inset: auto;
    margin: 0;
    max-height: calc(100dvh - 2rem);
    max-width: calc(100vw - 2rem);
    overflow: hidden;
    padding: .75rem;
    position: fixed;
    width: min(38rem, calc(100vw - 2rem));
}

.runtime-icon-picker__panel:not(:popover-open) {
    display: none;
}

.runtime-icon-picker__panel:popover-open {
    display: grid;
}

.runtime-icon-picker__panel::backdrop {
    background: transparent;
}

.runtime-icon-picker__panel .nhsuk-label {
    font-size: 1rem;
    margin-bottom: 0;
}

.runtime-icon-picker__panel .nhsuk-input {
    height: 2.5rem;
}

.runtime-icon-picker__result-count {
    color: var(--runtime-slate);
    font-size: .875rem;
    margin: 0;
}

.runtime-icon-picker__actions {
    display: flex;
    justify-content: flex-end;
}

.runtime-icon-picker__actions .nhsuk-button {
    margin-block-end: 0;
}

.runtime-icon-picker__grid {
    display: grid;
    gap: .25rem;
    grid-template-columns: repeat(auto-fill, minmax(2.5rem, 1fr));
    max-height: 18rem;
    min-height: 0;
    overflow-y: auto;
    padding: .25rem;
}

.runtime-icon-picker__option {
    align-items: center;
    background: #fff;
    border: 2px solid #768692;
    border-radius: .25rem;
    color: #212b32;
    cursor: pointer;
    display: grid;
    min-height: 2.5rem;
    padding: .25rem;
    place-items: center;
    text-align: center;
}

.runtime-icon-picker__option i {
    font-size: 1rem;
}

.runtime-icon-picker__option:hover,
.runtime-icon-picker__option--selected {
    background: var(--runtime-accent-soft);
    border-color: var(--runtime-accent, #005eb8);
}

.runtime-icon-picker__option:focus-visible {
    border-color: #212b32;
    box-shadow: 0 0 0 3px #212b32;
    outline: 3px solid var(--runtime-focus);
    outline-offset: 3px;
}

.runtime-form-answer-icon {
    min-width: 10rem;
}

.runtime-icon-options {
    --runtime-icon-options-gap: .75rem;
    display: grid;
    gap: var(--runtime-icon-options-gap);
}

.runtime-icon-options--dynamic {
    grid-template-columns: repeat(
        auto-fit,
        minmax(
            min(
                100%,
                max(
                    var(--runtime-icon-options-min-tile-width),
                    calc(
                        (100% -
                            (var(--runtime-icon-options-gap) *
                                (var(--runtime-icon-options-default-columns) - 1))) /
                        var(--runtime-icon-options-default-columns)))),
            1fr));
}

.runtime-icon-options--fixed {
    grid-template-columns: repeat(
        var(--runtime-icon-options-columns),
        minmax(0, 1fr));
}

.runtime-icon-options--normal {
    --runtime-icon-options-default-columns: 3;
    --runtime-icon-options-min-tile-width: 7.5rem;
}

.runtime-icon-options--full-width {
    --runtime-icon-options-default-columns: 6;
    --runtime-icon-options-min-tile-width: 8.75rem;
}

.runtime-icon-options__option {
    align-items: center;
    background: #fff;
    border: 2px solid #d8dde0;
    border-radius: .25rem;
    color: #212b32;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    gap: .5rem;
    justify-content: center;
    min-height: 6rem;
    padding: .875rem .75rem;
    text-align: center;
    width: 100%;
}

.runtime-icon-options__option:hover:not(:disabled) {
    background: var(--runtime-accent-soft);
    border-color: var(--runtime-accent, #005eb8);
    box-shadow: 0 0 0 3px color-mix(
        in srgb,
        var(--runtime-accent, #005eb8) 18%,
        transparent);
}

.runtime-icon-options__option:focus-visible {
    border-color: #212b32;
    box-shadow: 0 0 0 3px #212b32;
    outline: 3px solid var(--runtime-focus);
    outline-offset: 3px;
}

.runtime-icon-options__option--selected {
    background: var(--runtime-accent, #005eb8);
    border-color: var(--runtime-accent, #005eb8);
    color: #fff;
}

.runtime-icon-options__option--selected:hover:not(:disabled) {
    background: var(--runtime-accent-dark, #003e75);
    border-color: var(--runtime-accent-dark, #003e75);
    color: #fff;
}

.runtime-icon-options__option:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.runtime-icon-options__icon {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.runtime-icon-options--small .runtime-icon-options__option {
    gap: .375rem;
    min-height: 4.75rem;
    padding: .625rem;
}

.runtime-icon-options--small .runtime-icon-options__icon {
    font-size: 1.5rem;
}

.runtime-icon-options--large .runtime-icon-options__option {
    gap: .625rem;
    min-height: 7.5rem;
    padding: 1.125rem .875rem;
}

.runtime-icon-options--large .runtime-icon-options__icon {
    font-size: 2.75rem;
}

.runtime-icon-options__label {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

@media (max-width: 40.0525em) {
    .runtime-icon-options {
        grid-template-columns: 1fr;
    }
}

.runtime-history-expander {
    font-size: .875rem;
    line-height: 1.35;
    margin-block-end: .5rem;
}

.runtime-history-expander .nhsuk-details__summary {
    padding: 1.25rem 4.5rem 1.25rem 1.25rem;
    position: relative;
}

.runtime-history-expander .nhsuk-details__summary-text {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    margin-block-end: .25rem;
    text-decoration: none;
}

.runtime-history-expander__meta {
    color: var(--runtime-slate);
    display: block;
    font-size: .8125rem;
    line-height: 1.3;
}

.runtime-history-expander__version {
    color: #667680;
    font-size: .75rem;
    font-weight: 400;
    line-height: 1;
    position: absolute;
    right: 1.25rem;
    top: 1.35rem;
}

.runtime-history-expander .nhsuk-details__text {
    font-size: .875rem;
    line-height: 1.35;
    padding: 0 1.25rem 1rem;
}

.runtime-history-expander .nhsuk-table {
    font-size: .875rem;
    line-height: 1.35;
    margin-block-end: 0;
}

.runtime-history-expander .nhsuk-table__header,
.runtime-history-expander .nhsuk-table__cell {
    font-size: inherit;
    line-height: inherit;
    padding: .625rem 1rem .625rem 0;
    width: 50%;
}

.runtime-history-expander .nhsuk-table__header {
    font-weight: 400;
}

.runtime-history-expander .nhsuk-table__cell {
    font-weight: 600;
}

.runtime-history-expander .nhsuk-body-m {
    font-size: inherit;
    line-height: inherit;
    margin-block-end: 0;
}

.runtime-history-expander__actions {
    border-block-start: 1px solid #d8dde0;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: flex-end;
    margin-block-start: .75rem;
    padding-block-start: .5rem;
}

.runtime-history-expander__action {
    align-items: center;
    appearance: none;
    background: color-mix(in srgb, var(--runtime-surface-muted) 70%, #fff);
    border: 1px solid color-mix(in srgb, var(--runtime-border) 72%, #fff);
    border-radius: var(--runtime-radius);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--runtime-border) 55%, transparent);
    color: var(--runtime-heading);
    cursor: pointer;
    display: inline-flex;
    font-size: .75rem;
    font-weight: 700;
    gap: .35rem;
    line-height: 1.2;
    margin-block-end: 0;
    min-height: 1.875rem;
    padding: .25rem .5rem;
}

.runtime-history-expander__action:hover {
    background: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 7%, #fff);
    border-color: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 34%, var(--runtime-border));
    color: #002f5d;
}

.runtime-history-expander__action:active {
    box-shadow: none;
    transform: translateY(1px);
}

.runtime-history-expander__action i {
    font-size: .75rem;
    pointer-events: none;
}

.runtime-history-dialog .runtime-dialog__body {
    display: flex;
    min-height: 0;
}

.runtime-history-panel--modal {
    min-height: 0;
    width: 100%;
}

.runtime-history-panel--filters-visible {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.runtime-history-inline-filters {
    animation: runtime-history-filter-reveal 180ms cubic-bezier(.2, .8, .2, 1) both;
    background: color-mix(in srgb, var(--runtime-surface-muted) 72%, #fff);
    border: 1px solid var(--runtime-border);
    border-radius: var(--runtime-radius);
    margin-block-end: .75rem;
    padding: .75rem;
    transform-origin: top center;
}

.runtime-history-inline-filters .runtime-history-filters__options--panel {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
}

.runtime-history-inline-filters .runtime-history-filter {
    box-sizing: border-box;
    justify-content: space-between;
    max-width: none;
    width: 100%;
}

.runtime-history-panel__entries--timeline {
    padding: .75rem 1rem;
}

.runtime-history-card-list {
    display: grid;
    gap: .85rem;
    list-style: none;
    margin: 0;
    max-width: 100%;
    min-width: 0;
    padding: .75rem 1rem;
}

.runtime-history-card-list > li {
    margin: 0;
    min-width: 0;
}

.runtime-history-panel__expand-all {
    align-items: center;
    display: inline-flex;
    font-size: .8125rem;
    gap: .35rem;
    height: 2.25rem;
    margin-block-end: 0;
    min-height: 2.25rem;
    padding-inline: .65rem;
}

@keyframes runtime-history-filter-reveal {
    from {
        opacity: 0;
        transform: translateY(-.4rem) scaleY(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

.runtime-history-timeline {
    list-style: none;
    margin: 0;
    padding: .25rem 1rem;
    position: relative;
}

.runtime-history-timeline::before {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 75%, #fff),
        color-mix(in srgb, var(--runtime-border) 80%, #fff));
    border-radius: 999px;
    bottom: 1.5rem;
    content: "";
    left: 50%;
    position: absolute;
    top: 1.5rem;
    transform: translateX(-50%);
    width: .25rem;
}

.runtime-history-timeline__item {
    margin: 0 auto 1.25rem 0;
    padding-inline-end: 2.5rem;
    position: relative;
    width: 50%;
}

.runtime-history-timeline__item:nth-child(even) {
    margin-inline: auto 0;
    padding-inline: 2.5rem 0;
}

.runtime-history-timeline__item:last-child {
    margin-block-end: 0;
}

.runtime-history-timeline__marker {
    align-items: center;
    background: var(--runtime-shell-accent, var(--runtime-accent));
    border: .3rem solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 45%, var(--runtime-border));
    color: #fff;
    display: flex;
    height: 2.25rem;
    justify-content: center;
    right: -1.125rem;
    position: absolute;
    top: 1.1rem;
    width: 2.25rem;
    z-index: 1;
}

.runtime-history-timeline__item:nth-child(even) .runtime-history-timeline__marker {
    left: -1.125rem;
    right: auto;
}

.runtime-history-timeline__marker i {
    font-size: .8rem;
}

.runtime-history-timeline__card {
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 5%, #fff),
            #fff 45%);
    border: 1px solid color-mix(in srgb, var(--runtime-border) 82%, #fff);
    border-block-start: .25rem solid var(--runtime-shell-accent, var(--runtime-accent));
    border-radius: var(--runtime-radius);
    box-sizing: border-box;
    box-shadow: 0 .2rem .7rem rgb(33 43 50 / 10%);
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.runtime-history-timeline__card:hover,
.runtime-history-timeline__card:focus-within {
    border-color: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 48%, var(--runtime-border));
    box-shadow: 0 .45rem 1.15rem rgb(33 43 50 / 16%);
    transform: translateY(-.125rem);
}

.runtime-history-timeline__details {
    interpolate-size: allow-keywords;
    max-width: 100%;
    min-width: 0;
}

.runtime-history-timeline__details::details-content {
    block-size: 0;
    opacity: 0;
    overflow: clip;
    transition:
        block-size 240ms ease,
        content-visibility 240ms allow-discrete,
        opacity 180ms ease;
}

.runtime-history-timeline__details[open]::details-content {
    block-size: auto;
    opacity: 1;
}

.runtime-history-timeline__summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 1rem;
    list-style: none;
    justify-content: space-between;
    min-height: 5rem;
    padding: 1rem 1.25rem;
}

.runtime-history-timeline__summary::-webkit-details-marker {
    display: none;
}

.runtime-history-timeline__heading {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.runtime-history-timeline__title {
    color: var(--runtime-heading);
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    margin-block-end: .35rem;
}

.runtime-history-timeline__meta {
    color: var(--runtime-slate);
    display: flex;
    flex-wrap: wrap;
    font-size: .8125rem;
    gap: .25rem .45rem;
}

.runtime-history-timeline__summary .runtime-history-expander__version {
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-radius: 999px;
    flex: 0 0 auto;
    font-weight: 700;
    padding: .3rem .55rem;
    position: static;
}

.runtime-history-timeline__toggle {
    align-items: center;
    color: var(--runtime-shell-accent, var(--runtime-accent));
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .75rem;
    font-weight: 700;
    gap: .4rem;
}

.runtime-history-timeline__toggle--open {
    display: none;
}

.runtime-history-timeline__details[open] .runtime-history-timeline__toggle--closed {
    display: none;
}

.runtime-history-timeline__details[open] .runtime-history-timeline__toggle--open {
    display: inline;
}

.runtime-history-timeline__toggle i {
    transition: transform 180ms ease;
}

.runtime-history-timeline__details[open] .runtime-history-timeline__toggle i {
    transform: rotate(180deg);
}

.runtime-history-timeline__content {
    border-block-start: 1px solid color-mix(in srgb, var(--runtime-border) 72%, #fff);
    max-width: 100%;
    min-width: 0;
}

.runtime-history-answer-table-wrap {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: .75rem 1.25rem 1rem;
}

.runtime-history-timeline__answer-table {
    background: #fff;
    color: var(--runtime-heading);
    font-family: inherit;
    font-size: .875rem;
    line-height: 1.4;
    margin: 0;
    max-width: 100%;
    table-layout: fixed;
    width: 100%;
}

.runtime-history-timeline__answer-table :is(
    .nhsuk-table__header,
    .nhsuk-table__cell) {
    border-block-end: 1px solid var(--runtime-border);
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    overflow-wrap: anywhere;
    padding: .55rem .75rem;
    vertical-align: top;
}

.runtime-history-timeline__answer-table .nhsuk-table__header {
    background: color-mix(in srgb, var(--runtime-surface-muted) 62%, #fff);
    font-weight: 700;
    width: 32%;
}

.runtime-history-timeline__answer-table .nhsuk-table__cell {
    font-weight: 400;
    white-space: pre-wrap;
}

.runtime-history-answer-text {
    font: inherit;
}

.runtime-history-timeline__media {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.runtime-history-answer-video {
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.runtime-history-answer-video video {
    background: #000;
    box-sizing: border-box;
    display: block;
    max-height: 36rem;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}

.runtime-history-answer-media-unavailable {
    color: var(--runtime-text-muted);
    display: block;
    font-size: .875em;
    margin-block-start: .25rem;
}

.runtime-history-answer-rich-text {
    color: inherit;
    font: inherit;
    white-space: normal;
}

.runtime-history-answer-rich-text :is(p, ul, ol, blockquote, pre, dl) {
    margin-block: 0 .45rem;
}

.runtime-history-answer-rich-text :is(pre, code) {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.runtime-history-timeline__values {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.runtime-history-timeline__values div {
    border-block-start: 1px solid color-mix(in srgb, var(--runtime-border) 62%, #fff);
    min-width: 0;
    padding: .8rem 1.25rem .9rem;
}

.runtime-history-timeline__values div:nth-child(-n + 2) {
    border-block-start: 0;
}

.runtime-history-timeline__values div:nth-child(odd):not(:last-child) {
    border-inline-end: 1px solid color-mix(in srgb, var(--runtime-border) 72%, #fff);
}

.runtime-history-timeline__values dt {
    color: var(--runtime-slate);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    margin-block-end: .25rem;
    text-transform: uppercase;
}

.runtime-history-timeline__values dd {
    color: var(--runtime-heading);
    font-size: .9rem;
    font-weight: 600;
    margin: 0;
    white-space: pre-wrap;
}

.runtime-history-timeline__no-values {
    border-block-start: 1px solid var(--runtime-border);
    color: var(--runtime-slate);
    font-size: .875rem;
    margin: 0;
    padding: .8rem 1.25rem;
}

.runtime-history-timeline__actions {
    margin: 0;
    padding: .65rem 1.25rem .8rem;
}

.runtime-layout-choice-group {
    margin-block: 1.5rem;
}

@media (max-width: 40.0525em) {
    .runtime-history-panel__entries--timeline,
    .runtime-history-card-list {
        padding-inline: 0;
    }

    .runtime-history-timeline {
        padding: .25rem 0 .25rem 2.9rem;
    }

    .runtime-history-timeline::before {
        left: 1rem;
        transform: none;
    }

    .runtime-history-timeline__item,
    .runtime-history-timeline__item:nth-child(even) {
        margin: 0 0 1rem;
        padding: 0;
        width: 100%;
    }

    .runtime-history-timeline__marker,
    .runtime-history-timeline__item:nth-child(even) .runtime-history-timeline__marker {
        height: 1.9rem;
        left: -2.8rem;
        right: auto;
        top: .9rem;
        width: 1.9rem;
    }

    .runtime-history-timeline__summary {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: .65rem;
        min-height: 0;
        padding: .9rem 1rem;
    }

    .runtime-history-answer-table-wrap {
        padding: .5rem;
    }

    .runtime-history-timeline__toggle {
        margin-inline-start: auto;
    }

    .runtime-history-timeline__values {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-history-timeline__values div:nth-child(odd):not(:last-child) {
        border-inline-end: 0;
    }

    .runtime-history-timeline__values div:nth-child(2) {
        border-block-start: 1px solid color-mix(in srgb, var(--runtime-border) 62%, #fff);
    }
}

@media (prefers-reduced-motion: reduce) {
    .runtime-history-inline-filters {
        animation: none;
    }

    .runtime-history-timeline__card,
    .runtime-history-timeline__details::details-content,
    .runtime-history-timeline__toggle i {
        transition: none;
    }

    .runtime-history-timeline__card:hover,
    .runtime-history-timeline__card:focus-within {
        transform: none;
    }
}

.runtime-dialog {
    background: transparent;
    border: 0;
    box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / 35%);
    color: #000;
    margin: auto;
    max-height: calc(var(--runtime-workspace-viewport-height) - 2rem);
    max-width: calc(var(--runtime-workspace-viewport-width) - 2rem);
    /* Only the dialog body owns scrolling. Unlike hidden, clip prevents a
       focused control from programmatically scrolling the native dialog and
       moving its entire surface out of the viewport. */
    overflow: clip;
    padding: 0;
}

.runtime-dialog[open] {
    /* Toolbar actions collapse after activation at compact widths. Native
       dialogs remain in that DOM subtree, so override the panel's inherited
       pointer state once the dialog has entered the browser top layer. */
    pointer-events: auto;
}

.runtime-dialog::backdrop {
    background: rgb(0 0 0 / 55%);
}

.runtime-dialog[open]:not(.runtime-filter-dialog) .runtime-dialog__surface {
    animation: runtime-dialog-reveal .18s cubic-bezier(.2, .8, .2, 1) backwards;
    transform-origin: top center;
}

.runtime-filter-dialog[open]:not(.runtime-dialog--closing) {
    animation: runtime-side-panel-reveal .22s ease-in-out backwards;
}

.runtime-dialog[open]::backdrop {
    animation: runtime-dialog-backdrop-reveal .14s ease-out backwards;
}

.runtime-filter-dialog[open].runtime-dialog--closing {
    animation: runtime-side-panel-dismiss .18s ease-in forwards;
    pointer-events: none;
}

.runtime-filter-dialog[open].runtime-dialog--closing::backdrop {
    animation: runtime-dialog-backdrop-dismiss .18s ease-in forwards;
}

@keyframes runtime-dialog-reveal {
    from {
        opacity: 0;
        transform: translateY(.75rem) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes runtime-dialog-backdrop-reveal {
    from {
        background: rgb(0 0 0 / 0%);
    }

    to {
        background: rgb(0 0 0 / 55%);
    }
}

@keyframes runtime-side-panel-reveal {
    from {
        opacity: .92;
        transform: translateX(105%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes runtime-side-panel-dismiss {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: .92;
        transform: translateX(105%);
    }
}

@keyframes runtime-dialog-backdrop-dismiss {
    from {
        background: rgb(0 0 0 / 55%);
    }

    to {
        background: rgb(0 0 0 / 0%);
    }
}

/* Only compensate for the four-rem workspace reserved by the desktop rail.
   At the shared 64rem compact breakpoint navigation moves above the content,
   so dialogs return to true viewport centring. */
@media (min-width: 64.0625rem) {
    .runtime-shell--vertical-navigation .runtime-dialog:not(.runtime-filter-dialog) {
        max-width: calc(var(--runtime-workspace-viewport-width) - 6rem);
        transform: translateX(2rem);
    }
}

.runtime-dialog--dynamic {
    width: fit-content;
}

.runtime-dialog--small {
    width: min(27rem, calc(var(--runtime-workspace-viewport-width) - 2rem));
}

.runtime-dialog--medium {
    width: min(54rem, calc(var(--runtime-workspace-viewport-width) - 2rem));
}

.runtime-dialog--wide {
    width: var(--runtime-workspace-viewport-wide-width);
}

.runtime-dialog--large {
    width: min(calc(var(--runtime-workspace-viewport-width) - 2rem));
}

.runtime-dialog--full-height {
    height: calc(var(--runtime-workspace-viewport-height) - 2rem);
}

.runtime-filter-dialog {
    height: var(--runtime-workspace-viewport-height);
    margin: 0 0 0 auto;
    max-height: var(--runtime-workspace-viewport-height);
    max-width: min(27rem, var(--runtime-workspace-viewport-width));
    width: min(27rem, var(--runtime-workspace-viewport-width));
}

.runtime-filter-dialog .runtime-dialog__surface {
    height: 100%;
    max-height: var(--runtime-workspace-viewport-height);
}

.runtime-filter-dialog .runtime-filter-rule {
    grid-template-columns: minmax(0, 1fr);
}

.runtime-filter-dialog .nhsuk-button--small {
    width: 100%;
}

.runtime-dialog__surface {
    background: var(--runtime-canvas);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: calc(var(--runtime-workspace-viewport-height) - 2rem);
    min-height: 0;
    overflow: clip;
}

.runtime-dialog--full-height .runtime-dialog__surface {
    height: 100%;
}

.runtime-form__progress {
    color: var(--runtime-slate);
    font-size: .875rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    width: 100%;
}

.runtime-form__progress-label {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1rem;
    justify-content: space-between;
    margin: 0 0 .35rem;
}

.runtime-form__progress-bar {
    appearance: none;
    background: var(--runtime-border);
    border: 0;
    display: block;
    height: .25rem;
    width: 100%;
}

.runtime-form__progress-bar::-webkit-progress-bar {
    background: var(--runtime-border);
}

.runtime-form__progress-bar::-webkit-progress-value {
    background: var(--runtime-accent);
}

.runtime-form__progress-bar::-moz-progress-bar {
    background: var(--runtime-accent);
}

.runtime-form__page-heading:focus {
    outline: 3px solid #ffeb3b;
    outline-offset: .2rem;
}

.runtime-form--modal {
    height: 100%;
    min-height: 0;
}

.runtime-form--modal .runtime-form__layout {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
}

.runtime-form__scroll-region {
    min-width: 0;
}

.runtime-form--modal .runtime-form__scroll-region {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    /* Keep the NHS focus halo inside the scroll viewport. */
    padding-inline-start: .25rem;
    padding-inline-end: .75rem;
    scroll-padding-block: 1rem;
}

.runtime-form__actions {
    align-items: center;
    background: var(
        --runtime-form-action-background,
        var(--runtime-canvas));
    border-top: 1px solid var(--runtime-border);
    bottom: 0;
    box-shadow: 0 -.5rem .75rem rgba(33, 43, 50, .04);
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
    padding: 1rem .25rem .25rem 0;
    position: sticky;
    z-index: 2;
}

.runtime-form--modal .runtime-form__actions {
    margin-top: 0;
}

.runtime-form__actions .nhsuk-button {
    margin: 0;
}

.runtime-form__scroll-region > .nhsuk-error-summary {
    margin-top: 1.5rem;
}

.runtime-form__error-summary {
    scroll-margin-block: 2rem;
}

.runtime-form__error-summary-item {
    color: #d5281b;
    font-weight: 600;
}

.runtime-form__review .nhsuk-summary-list {
    margin-bottom: 1.5rem;
}

.runtime-form-review__value {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.runtime-dialog__header {
    align-items: center;
    background: var(--runtime-accent);
    color: #fff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 4rem;
    padding: .75rem 2rem;
}

.runtime-dialog__header h2,
.runtime-dialog__header form {
    margin: 0;
}

.runtime-dialog__header form {
    flex: 0 0 auto;
}

.runtime-dialog__header p {
    color: inherit;
    font-size: .8125rem;
    margin: .15rem 0 0;
}

.runtime-dialog__header h2 {
    color: inherit;
    font-size: 1.125rem;
    line-height: 1.3;
}

.runtime-dialog__close {
    align-items: center;
    display: inline-flex;
    font-size: .875rem;
    height: 2rem !important;
    justify-content: center;
    line-height: 1;
    margin: 0;
    min-width: 2rem;
    padding: 0;
    width: 2rem;
    min-height: unset;
    padding-top: 2px;
}

.runtime-dialog__body {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 2rem;
    scroll-padding-block: 2rem;
}

.runtime-record-report-dialog .runtime-dialog__header {
    background: var(--runtime-brand);
}

.runtime-record-report-dialog .runtime-dialog__body {
    background: var(--runtime-surface);
    padding: 0;
}

.runtime-dialog--question-properties {
    height: min(
        50rem,
        calc(var(--runtime-workspace-viewport-height) - 2rem));
}

.runtime-dialog--question-properties > .runtime-dialog__surface {
    height: 100%;
}

.runtime-dialog--question-properties
    > .runtime-dialog__surface
    > .runtime-dialog__body {
    overflow: hidden;
    padding: 0;
}

.runtime-question-properties-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(18rem, 1fr);
    height: 100%;
    min-height: 0;
}

.runtime-question-properties-layout__editor,
.runtime-question-properties-layout__preview {
    min-height: 0;
    min-width: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 2rem;
}

.runtime-question-properties-layout__preview {
    background: var(--runtime-surface);
    border-left: 1px solid var(--runtime-border);
    padding: 1.5rem;
}

.runtime-question-properties-layout__preview > .runtime-form-preview {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.runtime-question-properties-layout__toolbar {
    align-items: center;
    border-bottom: 1px solid var(--runtime-border);
    display: flex;
    margin: -1rem -1.5rem 1.5rem;
    padding: 0 1.5rem;
}

.runtime-question-properties-layout__toolbar .runtime-dialog-tabs {
    border-bottom: 0;
    flex: 1 1 auto;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.runtime-question-properties-layout__preview-trigger {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    margin: 0 0 0 .75rem;
}

@media (max-width: 64rem) {
    .runtime-question-properties-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 3fr) minmax(12rem, 2fr);
    }

    .runtime-question-properties-layout__preview {
        border-left: 0;
        border-top: 1px solid var(--runtime-border);
    }
}

.runtime-record-process-dialog .runtime-dialog__body {
    padding: 1rem;
    scroll-padding-block: 1rem;
}

.runtime-record-process-dialog .runtime-process__canvas-region {
    height: min(
        48rem,
        max(26rem, calc(var(--runtime-workspace-viewport-height) - 14rem)));
    max-height: none;
}

.runtime-dialog__intro,
.runtime-filter-empty {
    font-size: .875rem;
    margin: 0 0 .75rem;
}

.runtime-filter-review {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.runtime-filter-review li {
    align-items: center;
    display: flex;
    font-size: .875rem;
    gap: 1rem;
    justify-content: space-between;
    padding: .45rem .65rem;
}

.runtime-filter-review li + li {
    border-top: 1px solid var(--runtime-border);
}

.runtime-filter-quick-form {
    border-top: 1px solid var(--runtime-border);
    padding-block-start: .75rem;
}

.runtime-filter-quick-form h3 {
    color: var(--runtime-heading);
    font-size: 1rem;
    margin: 0 0 .5rem;
}

.runtime-filter-rules {
    display: grid;
    gap: .65rem;
}

.runtime-filter-groups {
    display: grid;
    gap: .85rem;
}

.runtime-filter-group {
    background:
        linear-gradient(135deg, rgba(0, 94, 184, .045), transparent 38%),
        #fff;
    border: 1px solid var(--runtime-border);
    border-left: .3rem solid var(--runtime-blue);
    border-radius: .45rem;
    box-shadow: 0 .2rem .65rem rgba(33, 43, 50, .08);
    min-width: 0;
    overflow: hidden;
}

.runtime-filter-group__header {
    align-items: end;
    background: rgba(230, 242, 255, .62);
    border-bottom: 1px solid var(--runtime-border);
    display: grid;
    gap: .8rem;
    grid-template-columns: minmax(10rem, 1fr) minmax(13rem, auto) auto;
    padding: .9rem;
}

.runtime-filter-group__header h3,
.runtime-filter-group__header p {
    margin: 0;
}

.runtime-filter-group__header h3 {
    color: var(--runtime-heading);
    font-size: 1.125rem;
}

.runtime-filter-group__header p {
    color: var(--runtime-muted);
    font-size: .875rem;
    margin-block-start: .18rem;
}

.runtime-filter-group__settings label {
    color: var(--runtime-heading);
    display: block;
    font-size: .8125rem;
    font-weight: 700;
    margin-block-end: .2rem;
}

.runtime-filter-group__settings select {
    min-width: 11rem;
}

.runtime-filter-group .runtime-filter-rules {
    padding: .85rem;
}

.runtime-filter-group__actions {
    border-top: 1px solid var(--runtime-border);
    display: flex;
    justify-content: flex-end;
    padding: .75rem .85rem;
}

.runtime-filter-icon-button {
    align-items: center;
    display: inline-flex;
    height: 2.25rem;
    justify-content: center;
    min-height: 2.25rem;
    min-width: 2.25rem;
    padding: 0;
    width: 2.25rem;
}

.runtime-filter-icon-button i {
    pointer-events: none;
}

.runtime-filter-group-connector {
    align-items: center;
    display: flex;
    gap: .65rem;
    justify-content: center;
    margin-block: -.25rem;
    position: relative;
    z-index: 1;
}

.runtime-filter-group-connector::before,
.runtime-filter-group-connector::after {
    background: var(--runtime-border);
    content: "";
    height: 1px;
    min-width: 1rem;
    width: 3rem;
}

.runtime-filter-group-connector span {
    color: var(--runtime-muted);
    font-size: .8125rem;
    font-weight: 700;
}

.runtime-filter-group-connector select {
    background-color: #fff;
    font-weight: 700;
    min-width: 5.25rem;
}

.runtime-filter-rule {
    align-items: end;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    display: grid;
    gap: .65rem;
    grid-template-columns: minmax(10rem, 1fr) minmax(10rem, 1fr) minmax(12rem, 2fr) auto;
    margin: 0;
    min-width: 0;
    padding: .65rem;
}

.runtime-filter-rule--grouped {
    background: #fff;
    border-radius: .3rem;
    grid-template-columns:
        minmax(10rem, 1fr)
        minmax(10rem, 1fr)
        minmax(12rem, 2fr)
        auto;
}

.runtime-filter-rule__remove {
    align-self: end;
}

.runtime-filter-rule legend {
    color: var(--runtime-heading);
    font-size: .8125rem;
    font-weight: 700;
    padding-inline: .25rem;
}

.runtime-filter-rule--quick {
    border: 0;
    padding: 0;
}

.runtime-filter-rule__value {
    align-items: end;
    display: grid;
    gap: .4rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    min-width: 0;
}

.runtime-filter-rule__value .runtime-hint {
    margin: 0;
}

.runtime-filter-dialog__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-block-start: .85rem;
}

.runtime-personal-view-save {
    border-block-start: 1px solid var(--runtime-border);
    margin-block-start: var(--runtime-space-4);
    padding-block-start: var(--runtime-space-4);
}

.runtime-personal-view-save h3 {
    margin-block-end: var(--runtime-space-2);
}

.runtime-filter-clear {
    margin-block-start: .75rem;
}

.runtime-dialog__body.runtime-facet-panel {
    display: grid;
    gap: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
    padding: 0;
    scroll-padding-block: 0;
}

.runtime-facet-panel__content {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 2rem;
    scroll-padding-block: 2rem;
}

.runtime-facet-panel__bulk-actions {
    display: grid;
    gap: .65rem;
    grid-template-columns: 1fr 1fr;
}

.runtime-facet-panel__bulk-actions--single {
    grid-template-columns: 1fr;
}

.runtime-facet-panel__sort {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    display: grid;
    gap: .75rem;
    padding: .85rem;
}

.runtime-facet-panel__sort h3 {
    color: var(--runtime-heading);
    font-size: 1rem;
    margin: 0;
}

.runtime-facet-panel__sort .runtime-control {
    gap: .25rem;
}

.runtime-facet-panel__sort select {
    width: 100%;
}

.runtime-state.runtime-filter-loading {
    align-self: stretch;
    box-sizing: border-box;
    font-size: .875rem;
    margin: 0;
    max-width: 100%;
    padding: .6rem .75rem;
    width: 100%;
}

.runtime-filter-loading .runtime-state__indicator {
    border-width: 2px;
    flex: 0 0 1.1rem;
    height: 1.1rem;
    width: 1.1rem;
}

.runtime-facet {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    interpolate-size: allow-keywords;
}

/* Keep the native details/summary interaction and animate its content on both
   opening and closing, matching the History expanders. */
.runtime-facet::details-content {
    block-size: 0;
    opacity: 0;
    overflow: clip;
    transition:
        block-size 240ms ease,
        content-visibility 240ms allow-discrete,
        opacity 180ms ease;
}

.runtime-facet[open]::details-content {
    block-size: auto;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .runtime-facet::details-content {
        transition: none;
    }
}

.runtime-facet summary {
    align-items: center;
    color: var(--runtime-heading);
    cursor: pointer;
    display: flex;
    font-size: .875rem;
    font-weight: 700;
    gap: .5rem;
    justify-content: space-between;
    list-style: none;
    padding: .65rem;
}

.runtime-facet summary::-webkit-details-marker {
    display: none;
}

.runtime-facet__status {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
    min-width: 0;
}

.runtime-facet__summary {
    color: var(--runtime-slate);
    font-size: .75rem;
    font-weight: 400;
    overflow-wrap: anywhere;
    text-align: right;
}

.runtime-facet__indicator {
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    flex: 0 0 auto;
    height: .5rem;
    transform: rotate(45deg);
    transition: transform .15s ease-in-out;
    width: .5rem;
}

.runtime-facet[open] .runtime-facet__indicator {
    transform: rotate(225deg);
}

.runtime-facet fieldset {
    border: 0;
    margin: 0;
    padding: 0 .65rem .65rem;
}

.runtime-facet__options {
    display: grid;
    gap: .4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-facet__tag {
    align-items: center;
    cursor: pointer;
    display: flex;
    font-size: .8125rem;
    gap: .75rem;
    justify-content: space-between;
    max-width: none;
    min-height: 2rem;
    padding: .35rem .5rem;
    text-transform: none;
    width: 100%;
}

.runtime-facet__tag input {
    accent-color: var(--runtime-heading);
    flex: 0 0 auto;
    height: 1.15rem;
    margin: 0;
    width: 1.15rem;
}

.runtime-facet-panel__actions {
    background: var(--runtime-canvas);
    border-top: 1px solid var(--runtime-border);
    box-shadow: 0 -.25rem .75rem rgb(33 43 50 / 8%);
    margin: 0;
    padding: .75rem 2rem 2rem;
}

.runtime-linked-dialog__count {
    flex: 0 0 auto;
    font-size: .875rem;
    font-weight: 700;
    margin-block: 0 .75rem;
}

.runtime-linked-dialog .runtime-dialog__body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.runtime-linked-dialog__layout {
    display: grid;
    flex: 1 1 auto;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
}

.runtime-linked-dialog__controls {
    align-items: start;
    border-bottom: 1px solid var(--runtime-border);
    display: grid;
    gap: .75rem 1rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    margin-bottom: .75rem;
    padding-bottom: .75rem;
}

.runtime-linked-dialog__view-selector {
    grid-column: 2;
    justify-self: end;
}

.runtime-linked-dialog__gantt-scale,
.runtime-linked-dialog__cards-per-row {
    grid-column: 3;
    justify-self: end;
}

.runtime-linked-dialog__gantt-scale label,
.runtime-linked-dialog__cards-per-row label {
    font-size: .875rem;
}

.runtime-linked-dialog__gantt-scale select,
.runtime-linked-dialog__cards-per-row select {
    min-width: 7rem;
}

.runtime-linked-dialog__search {
    grid-column: 1;
    margin: 0;
    min-width: 0;
}

.runtime-linked-dialog__search .nhsuk-form-group,
.runtime-linked-dialog__search .nhsuk-hint,
.runtime-linked-dialog__search .nhsuk-button--small {
    margin-bottom: 0;
}

.runtime-linked-dialog__search-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--runtime-space-2);
    max-width: 34rem;
}

.runtime-linked-dialog__search-controls > input {
    flex: 1 1 12rem;
    max-width: 16.5rem;
    min-width: 0;
    width: auto;
}

.runtime-linked-dialog__search-controls > button {
    flex-shrink: 0;
}

.runtime-linked-dialog__results {
    min-height: 0;
    opacity: 1;
    overflow: auto;
    overscroll-behavior: contain;
    padding-inline-end: .25rem;
    transition: opacity .12s ease-in-out;
}

/* The outer results region owns vertical scrolling. The table retains its
   horizontal overflow affordance but must allow wheel chaining vertically. */
.runtime-linked-dialog__results .runtime-table-region {
    min-height: 0;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
}

.runtime-linked-dialog__results[aria-busy="true"] {
    opacity: .65;
}

.runtime-linked-dialog__footer {
    align-items: center;
    border-top: 1px solid var(--runtime-border);
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
    justify-content: space-between;
    margin-top: .75rem;
    padding-top: .75rem;
}

.runtime-linked-dialog__page-size {
    align-items: center;
    display: flex;
    gap: .5rem;
}

.runtime-linked-dialog__page-size .nhsuk-label {
    color: var(--runtime-heading);
    font-size: .875rem;
    font-weight: 700;
    margin: 0;
}

.runtime-linked-dialog__page-size .nhsuk-select {
    font-size: .875rem;
    min-width: 4.5rem;
    padding-block: .25rem;
}

.runtime-linked-dialog__position {
    font-size: .875rem;
    font-weight: 700;
    margin: 0;
}

.runtime-linked-dialog__footer .runtime-pagination,
.runtime-linked-dialog__footer .runtime-pagination__position {
    margin: 0;
}

.runtime-linked-dialog__error {
    margin-bottom: 0;
}

.runtime-linked-dialog__list {
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    margin-block-end: 0;
}

.runtime-linked-dialog__list li {
    margin: 0;
}

.runtime-linked-dialog__list li + li {
    border-top: 1px solid var(--runtime-border);
}

.runtime-linked-dialog__list a {
    display: block;
    font-weight: 700;
    overflow-wrap: anywhere;
    padding: .65rem .75rem;
}

.runtime-linked-dialog__limit {
    font-size: .8rem;
    margin: .75rem 0 0;
}

@keyframes runtime-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 90rem) {
    .tabCardGroup .runtime-record-tab-card {
        font-size: .875rem;
        line-height: 1.15;
    }

    .tabCardGroup .runtime-record-tab-card__content {
        padding-block: .5rem;
    }
}

.runtime-record-actions[data-has-overflow="true"] {
    position: relative;
    z-index: 20;
}

.runtime-record-actions[data-has-overflow="true"][data-expanded="true"] {
    z-index: 40;
}

.runtime-record-actions[data-has-overflow="true"] .runtime-record-actions__more {
    display: block;
}

.runtime-record-actions[data-has-overflow="true"] .runtime-record-actions__more::before {
    background: rgb(23 43 58 / 10%);
    content: "";
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .18s ease;
    z-index: 0;
}

.runtime-record-actions[data-has-overflow="true"] .runtime-record-actions__toggle {
    align-items: center;
    appearance: none;
    background: var(--runtime-surface);
    border: 3px solid var(--runtime-border);
    border-radius: .375rem;
    color: var(--runtime-heading);
    cursor: pointer;
    display: grid;
    font: inherit;
    font-size: .875rem;
    font-weight: 700;
    gap: .5rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 2.875rem;
    padding: .625rem .75rem;
    position: relative;
    text-align: left;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        border-radius .16s ease,
        box-shadow .18s ease;
    width: 100%;
    z-index: 31;
}

.runtime-record-actions[data-has-overflow="true"] .runtime-record-actions__toggle:hover {
    border-color: var(--runtime-accent-dark);
}

.runtime-record-actions[data-has-overflow="true"] .runtime-record-actions__toggle:focus-visible {
    background: var(--runtime-focus);
    box-shadow: 0 0 0 4px #212b32;
    color: #000;
    outline: 3px solid transparent;
    outline-offset: 0;
}

.runtime-record-actions[data-has-overflow="true"] .runtime-record-actions__count {
    align-items: center;
    background: var(--runtime-accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: .75rem;
    justify-content: center;
    line-height: 1;
    min-height: 1.5rem;
    min-width: 1.5rem;
    padding: .25rem .4rem;
}

.runtime-record-actions[data-has-overflow="true"] .runtime-record-actions__chevron {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    height: .55rem;
    margin: .2rem .2rem 0;
    transform: rotate(45deg);
    transition: transform .2s ease;
    width: .55rem;
}

.runtime-record-actions[data-has-overflow="true"] .runtime-record-actions__panel {
    background: var(--runtime-surface);
    border: 3px solid var(--runtime-border);
    border-radius: .375rem;
    box-shadow:
        0 .625rem 1.5rem rgb(33 43 50 / 18%),
        0 .125rem .375rem rgb(33 43 50 / 10%);
    left: 0;
    max-height: min(70dvh, 32rem);
    opacity: 0;
    overflow-y: auto;
    padding: .5rem;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: calc(100% - 3px);
    transform: translateY(-.25rem) scale(.99);
    transform-origin: top center;
    transition:
        border-color .16s ease,
        opacity .18s ease,
        transform .22s cubic-bezier(.2, .8, .2, 1),
        visibility 0s linear .22s;
    visibility: hidden;
    z-index: 30;
}

.runtime-record-actions[data-has-overflow="true"] .runtime-record-actions__panel ul {
    gap: .25rem;
}

.runtime-record-actions[data-has-overflow="true"] .runtime-record-actions__panel .runtime-record-action .nhsuk-card__content {
    padding: .55rem .75rem;
}

.runtime-record-actions[data-has-overflow="true"][data-placement="right"] .runtime-record-actions__panel {
    box-shadow:
        .625rem .375rem 1.5rem rgb(33 43 50 / 18%),
        .125rem .125rem .375rem rgb(33 43 50 / 10%);
    left: var(--runtime-record-actions-panel-left);
    position: fixed;
    right: auto;
    top: var(--runtime-record-actions-panel-top);
    transform: translateX(-.25rem) scale(.99);
    transform-origin: left center;
    width: min(var(--runtime-record-actions-panel-width, 20rem), 20rem);
}

.runtime-record-actions[data-has-overflow="true"][data-placement="right"] .runtime-record-actions__chevron {
    transform: rotate(-45deg);
}

.runtime-record-actions[data-has-overflow="true"][data-expanded="true"] .runtime-record-actions__panel {
    background: color-mix(in srgb, var(--runtime-accent-soft) 50%, var(--runtime-surface));
    border-color: var(--runtime-accent-dark);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
    visibility: visible;
}

.runtime-record-actions[data-has-overflow="true"][data-expanded="true"] .runtime-record-actions__toggle {
    border-color: var(--runtime-accent-dark);
}

.runtime-record-actions[data-has-overflow="true"][data-expanded="true"] .runtime-record-actions__toggle:not(:focus-visible) {
    background: color-mix(in srgb, var(--runtime-accent-soft) 50%, var(--runtime-surface));
    box-shadow:
        0 .45rem 1.2rem rgb(33 43 50 / 22%),
        0 .125rem .35rem rgb(33 43 50 / 12%);
}

.runtime-record-actions[data-has-overflow="true"][data-expanded="true"] .runtime-record-actions__more::before {
    opacity: 1;
}

.runtime-record-actions[data-has-overflow="true"][data-placement="below"][data-expanded="true"] .runtime-record-actions__toggle {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.runtime-record-actions[data-has-overflow="true"][data-placement="below"][data-expanded="true"] .runtime-record-actions__panel {
    background: color-mix(in srgb, var(--runtime-accent-soft) 50%, var(--runtime-surface));
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.runtime-record-actions[data-has-overflow="true"][data-placement="below"][data-expanded="true"] .runtime-record-actions__toggle:not(:focus-visible) {
    box-shadow:
        .45rem -.45rem 1.2rem rgb(33 43 50 / 22%),
        .125rem -.125rem .35rem rgb(33 43 50 / 12%);
}

.runtime-record-actions[data-has-overflow="true"][data-placement="below"][data-expanded="true"] .runtime-record-actions__toggle::after {
    background: color-mix(in srgb, var(--runtime-accent-soft) 50%, var(--runtime-surface));
    bottom: -3px;
    content: "";
    height: 6px;
    left: 0;
    pointer-events: auto;
    position: absolute;
    right: 0;
}

.runtime-record-actions[data-has-overflow="true"][data-placement="below"][data-expanded="true"] .runtime-record-actions__toggle:focus-visible::after {
    background: var(--runtime-focus);
}

.runtime-record-actions[data-has-overflow="true"][data-placement="right"][data-expanded="true"] .runtime-record-actions__toggle {
    border-right-color: transparent;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.runtime-record-actions[data-has-overflow="true"][data-placement="right"][data-expanded="true"] .runtime-record-actions__toggle::after {
    background: color-mix(in srgb, var(--runtime-accent-soft) 50%, var(--runtime-surface));
    border-bottom: 3px solid var(--runtime-accent-dark);
    border-top: 3px solid var(--runtime-accent-dark);
    bottom: -3px;
    content: "";
    pointer-events: auto;
    position: absolute;
    right: -.5rem;
    top: -3px;
    width: .6875rem;
}

.runtime-record-actions[data-has-overflow="true"][data-placement="right"][data-expanded="true"] .runtime-record-actions__toggle:focus-visible::after {
    background: var(--runtime-focus);
}

.runtime-record-actions[data-has-overflow="true"][data-placement="right"][data-expanded="true"] .runtime-record-actions__panel {
    transform: translateX(0) scale(1);
}

.runtime-record-actions[data-has-overflow="true"][data-placement="below"][data-expanded="true"] .runtime-record-actions__chevron {
    transform: translateY(.12rem) rotate(225deg);
}

.runtime-record-actions[data-has-overflow="true"][data-placement="right"][data-expanded="true"] .runtime-record-actions__chevron {
    transform: translateX(.12rem) rotate(-45deg);
}

@media (hover: hover) and (pointer: fine) {
    .runtime-record-tabs__more:not([data-open-on-hover="false"]):hover::before {
        opacity: 1;
    }

    .tabCardGroup .runtime-record-tabs__more:not([data-open-on-hover="false"]):hover .runtime-record-tabs__more-toggle,
    .tabCardGroup.runtime-record-tabs__more:not([data-open-on-hover="false"]):hover .runtime-record-tabs__more-toggle {
        border-color: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 42%, var(--runtime-border));
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-top-color: var(--runtime-shell-accent, var(--runtime-accent));
    }

    .tabCardGroup .runtime-record-tabs__more:not([data-open-on-hover="false"]):hover .runtime-record-tabs__more-toggle:not(:focus-visible),
    .tabCardGroup.runtime-record-tabs__more:not([data-open-on-hover="false"]):hover .runtime-record-tabs__more-toggle:not(:focus-visible) {
        background: color-mix(in srgb, var(--runtime-accent-soft) 50%, var(--runtime-surface));
        box-shadow:
            .45rem -.45rem 1.2rem rgb(33 43 50 / 22%),
            .125rem -.125rem .35rem rgb(33 43 50 / 12%);
    }

    .tabCardGroup .runtime-record-tabs__more:not([data-open-on-hover="false"]):hover .runtime-record-tabs__more-toggle::after,
    .tabCardGroup.runtime-record-tabs__more:not([data-open-on-hover="false"]):hover .runtime-record-tabs__more-toggle::after {
        background: color-mix(in srgb, var(--runtime-accent-soft) 50%, var(--runtime-surface));
        opacity: 1;
        pointer-events: auto;
    }

    .tabCardGroup .runtime-record-tabs__more:not([data-open-on-hover="false"]):hover .runtime-record-tabs__more-toggle:focus-visible::after,
    .tabCardGroup.runtime-record-tabs__more:not([data-open-on-hover="false"]):hover .runtime-record-tabs__more-toggle:focus-visible::after {
        background: var(--runtime-focus);
    }

    .runtime-record-tabs__more:not([data-open-on-hover="false"]):hover .runtime-record-tabs__more-panel {
        background: color-mix(in srgb, var(--runtime-accent-soft) 50%, var(--runtime-surface));
        border-color: color-mix(in srgb, var(--runtime-shell-accent, var(--runtime-accent)) 42%, var(--runtime-border));
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scale(1);
        transition-delay: 0s;
        visibility: visible;
    }

    .runtime-record-tabs__more:not([data-open-on-hover="false"]):hover .runtime-record-tabs__more-chevron {
        transform: translateY(.12rem) rotate(45deg);
    }
}

@media (max-width: 64rem) {
    .runtime-shell--vertical-navigation {
        padding-left: 0;
    }

    .runtime-navigation-rail {
        display: none;
    }

    .runtime-navigation-menu {
        background:
            linear-gradient(
                135deg,
                color-mix(in srgb, var(--runtime-shell-accent) 90%, #102d3b),
                color-mix(in srgb, var(--runtime-shell-accent) 72%, #061d2c));
        color: #fff;
        display: block;
        padding: .375rem;
    }

    .runtime-navigation-menu > summary {
        align-items: center;
        border: 1px solid rgb(255 255 255 / 14%);
        border-radius: .45rem;
        cursor: pointer;
        display: flex;
        font-weight: 700;
        gap: .75rem;
        min-height: 3rem;
        padding: .625rem .75rem;
    }

    .runtime-navigation-menu > summary::marker {
        content: "";
    }

    .runtime-navigation-menu > summary::-webkit-details-marker {
        display: none;
    }

    .runtime-navigation-menu > summary::after {
        border-bottom: .125rem solid currentcolor;
        border-right: .125rem solid currentcolor;
        content: "";
        height: .55rem;
        margin-left: auto;
        transform: translateY(-.15rem) rotate(45deg);
        transition: transform .2s ease;
        width: .55rem;
    }

    .runtime-navigation-menu[open] > summary::after {
        transform: translateY(.15rem) rotate(225deg);
    }

    .runtime-navigation-menu[open] > summary {
        background: rgb(255 255 255 / 10%);
        margin-bottom: .25rem;
    }

    .runtime-navigation-menu__content-inner {
        overflow: hidden;
    }

    .runtime-navigation-menu--animated[open] >
        .runtime-navigation-menu__content {
        display: grid;
        grid-template-rows: 0fr;
        opacity: 0;
        transform: translateY(-.35rem);
        transition:
            grid-template-rows .22s ease,
            opacity .18s ease,
            transform .22s ease;
    }

    .runtime-navigation-menu--animated.runtime-navigation-menu--expanded[open] >
        .runtime-navigation-menu__content {
        grid-template-rows: 1fr;
        opacity: 1;
        transform: translateY(0);
    }

    .runtime-navigation-menu .runtime-navigation__items {
        align-items: stretch;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: .25rem;
        padding-block: .25rem;
    }

    .runtime-navigation-menu .runtime-navigation__items li {
        display: block;
    }

    .runtime-navigation-menu .runtime-navigation__item--has-actions {
        position: relative;
    }

    .runtime-navigation-menu .runtime-navigation__link {
        border: 1px solid transparent;
        border-radius: .4rem;
        min-height: 3rem;
        padding: .65rem .75rem;
    }

    .runtime-navigation-menu .runtime-navigation__link:hover {
        background: rgb(255 255 255 / 14%);
        border-color: rgb(255 255 255 / 18%);
    }

    .runtime-navigation-menu .runtime-navigation__link--selected,
    .runtime-navigation-menu .runtime-navigation__link--selected:visited {
        background: var(--runtime-surface);
        border: 1px solid rgb(255 255 255 / 45%);
        border-left: .25rem solid var(--runtime-shell-accent);
        box-shadow: var(--runtime-shadow);
        color: var(--runtime-heading);
        padding-left: .75rem;
    }

    .runtime-navigation-menu .runtime-navigation-actions {
        background: var(--runtime-surface);
        border-bottom: 0;
        border-left: 0;
        border-right: 0;
        border-top: .25rem solid var(--runtime-shell-accent);
        box-shadow: none;
        margin: .25rem 0 .5rem;
        min-width: 0;
        position: static;
        width: 100%;
    }

    .runtime-navigation-menu
        .runtime-navigation-actions__toggle[aria-expanded="true"] +
        .runtime-navigation-actions {
        display: block;
    }

    .runtime-navigation-menu .runtime-navigation__item--has-actions >
        .runtime-navigation__link {
        padding-right: 6rem;
    }

    .runtime-navigation-menu .runtime-navigation-actions__toggle {
        align-items: center;
        background: rgb(255 255 255 / 11%);
        border: 1px solid rgb(255 255 255 / 28%);
        border-radius: .35rem;
        color: #fff;
        cursor: pointer;
        display: inline-flex;
        font: inherit;
        font-size: .875rem;
        font-weight: 700;
        gap: .35rem;
        min-height: 2.25rem;
        padding: .35rem .55rem;
        position: absolute;
        right: .45rem;
        top: .45rem;
        z-index: 1;
    }

    .runtime-navigation-menu .runtime-navigation-actions__toggle:hover {
        background: rgb(255 255 255 / 18%);
        border-color: rgb(255 255 255 / 42%);
    }

    .runtime-navigation-menu .runtime-navigation-actions__toggle:focus-visible {
        background: var(--runtime-focus);
        border-color: var(--runtime-ink);
        box-shadow: 0 0 0 3px var(--runtime-focus);
        color: var(--runtime-ink);
        outline: 0;
    }

    .runtime-navigation-menu .runtime-navigation-actions__toggle
        .runtime-navigation__icon {
        font-size: .75rem;
        height: 1rem;
        line-height: 1rem;
        transform: rotate(0);
        transition: transform .18s ease;
        width: 1rem;
    }

    .runtime-navigation-menu
        .runtime-navigation-actions__toggle[aria-expanded="true"]
        .runtime-navigation__icon {
        transform: rotate(180deg);
    }

    .runtime-navigation-menu
        .runtime-navigation__item--selected >
        .runtime-navigation-actions__toggle {
        background: color-mix(
            in srgb,
            var(--runtime-shell-accent) 11%,
            var(--runtime-surface));
        border-color: color-mix(
            in srgb,
            var(--runtime-shell-accent) 34%,
            var(--runtime-border));
        color: var(--runtime-heading);
    }

    .runtime-navigation-menu .runtime-navigation-actions__heading {
        background: color-mix(
            in srgb,
            var(--runtime-shell-accent) 9%,
            var(--runtime-surface));
        border: 0;
        border-bottom: 1px solid var(--runtime-border);
    }

    .runtime-navigation-menu .runtime-navigation-actions__item {
        border-bottom: 1px solid var(--runtime-border);
    }

    .runtime-navigation-menu .runtime-navigation__link:focus-visible,
    .runtime-navigation-menu .runtime-navigation__link:focus-visible:hover {
        background: var(--runtime-focus);
        border-color: var(--runtime-ink);
        box-shadow: 0 0 0 3px var(--runtime-focus);
        color: var(--runtime-ink);
    }

    .runtime-header,
    .runtime-shell--compact-header .runtime-header {
        align-items: center;
        flex-direction: row;
        gap: .5rem;
        min-height: 4rem;
        padding: .6rem .75rem;
    }

    .runtime-header__brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    .runtime-header .runtime-brand {
        min-width: 0;
    }

    .runtime-header__account {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: .35rem;
        justify-content: flex-end;
    }

    .runtime-recent-records__panel {
        left: 0;
        right: auto;
    }

    .runtime-process__header {
        align-items: stretch;
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-process__metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .runtime-process__section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .runtime-process__viewport-controls {
        justify-content: flex-start;
        width: 100%;
    }

    .runtime-main {
        padding: 0 .75rem 1.5rem;
    }

    .runtime-main--documentation {
        display: block;
        overflow: auto;
    }

    /* Compact layouts use the main document scroller. Allow record results to
       grow naturally instead of reserving a second, fixed-height viewport. */
    .runtime-record-list {
        height: auto;
        min-height: 100%;
    }

    .runtime-record-results {
        flex: 0 0 auto;
        min-height: 0;
    }

    .runtime-record-results--table {
        overflow: visible;
    }

    .runtime-record-results--cards {
        overflow: visible;
        padding: 0;
    }

    .runtime-record-results__loading-message {
        background: var(--runtime-surface);
        border: 2px solid var(--runtime-accent-dark);
        box-shadow: 0 .35rem 1rem rgb(23 43 58 / 24%);
        left: 50%;
        max-width: calc(var(--runtime-workspace-viewport-width) - 2rem);
        padding: .65rem .85rem;
        position: fixed;
        top: 50%;
        transform: translate(-50%, -50%);
        white-space: nowrap;
    }

    .runtime-record-results > .runtime-table-region {
        flex: 0 0 auto;
        min-height: 0;
        overflow-x: auto;
        overflow-y: visible;
        overscroll-behavior-x: contain;
        overscroll-behavior-y: auto;
    }

    .runtime-record-list__header {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .runtime-toolbar {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .runtime-view-selector {
        width: 100%;
    }

    .runtime-linked-dialog__controls {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-linked-dialog__search,
    .runtime-linked-dialog__view-selector,
    .runtime-linked-dialog__gantt-scale,
    .runtime-linked-dialog__cards-per-row {
        grid-column: 1;
    }

    .runtime-linked-dialog__view-selector,
    .runtime-linked-dialog__gantt-scale,
    .runtime-linked-dialog__cards-per-row {
        justify-self: start;
    }

    .runtime-toolbar__query,
    .runtime-filter-rule {
        grid-auto-flow: row;
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-filter-group__header {
        align-items: stretch;
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-filter-group__settings select {
        width: 100%;
    }

    .runtime-filter-group-connector {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-filter-group-connector::before,
    .runtime-filter-group-connector::after {
        display: none;
    }

    .runtime-filter-group-connector span {
        text-align: center;
    }

    .runtime-filter-actions,
    .runtime-filter-dialog__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-toolbar > .runtime-toolbar__actions {
        justify-self: end;
        transform: none;
        width: 100%;
    }

    .runtime-toolbar .runtime-toolbar__reload {
        transform: none;
    }

    .runtime-toolbar-actions__toggle,
    .runtime-toolbar-actions[data-collapsed="true"] .runtime-toolbar-actions__panel {
        max-width: none;
        width: 100%;
    }

    .runtime-dialog {
        max-height: calc(var(--runtime-workspace-viewport-height) - 1rem);
        max-width: calc(var(--runtime-workspace-viewport-width) - 1rem);
        width: calc(var(--runtime-workspace-viewport-width) - 1rem);
    }

    .runtime-dialog__surface {
        max-height: calc(var(--runtime-workspace-viewport-height) - 1rem);
    }

    .runtime-dialog__header {
        padding-inline: 1.5rem;
    }

    .runtime-dialog__body {
        padding: 1.5rem;
        scroll-padding-block: 1.5rem;
    }

    .runtime-dialog__body.runtime-facet-panel {
        padding: 0;
        scroll-padding-block: 0;
    }

    .runtime-facet-panel__content {
        padding: 1.5rem;
        scroll-padding-block: 1.5rem;
    }

    .runtime-facet-panel__actions {
        padding: .75rem 1.5rem 1.5rem;
    }

    .runtime-record-table {
        min-width: 0;
        table-layout: auto;
        width: 100%;
    }

    /* NHS.UK's responsive-table treatment normally starts at 48rem. Runtime's
       compact shell starts at 64rem, so reproduce the labelled-row layout at
       the same point and discard configured desktop sizing constraints. */
    .runtime-record-table colgroup {
        display: none;
    }

    .runtime-column-width { display: none; }

    .runtime-record-table thead {
        border: 0 !important;
        clip: rect(0 0 0 0) !important;
        clip-path: inset(50%) !important;
        height: 1px !important;
        margin: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        position: absolute !important;
        user-select: none;
        white-space: nowrap !important;
        width: 1px !important;
    }

    .runtime-record-table thead::before,
    .runtime-record-table thead::after {
        content: "\00a0";
    }

    .runtime-record-table .nhsuk-table__body {
        display: block;
        width: 100%;
    }

    .runtime-record-table .nhsuk-table__body .nhsuk-table__row {
        display: block;
        height: auto !important;
        margin-bottom: 1rem;
        width: 100%;
    }

    .runtime-record-table .nhsuk-table__body .nhsuk-table__row:last-child {
        margin-bottom: 0;
    }

    .runtime-record-table th {
        position: static;
    }

    .runtime-record-table .nhsuk-table__body td.runtime-record-table__cell {
        align-items: flex-start;
        display: flex;
        gap: 1rem;
        height: auto !important;
        justify-content: space-between;
        max-width: none !important;
        min-width: 0 !important;
        overflow: visible;
        padding-right: 0;
        text-align: right;
        text-overflow: clip;
        white-space: normal !important;
        width: auto !important;
        word-break: normal;
    }

    .runtime-record-table .nhsuk-table__body td.runtime-record-table__cell:last-child {
        border-bottom-width: 3px;
    }

    .runtime-record-table .nhsuk-table__body .nhsuk-table-responsive__heading {
        display: block;
        flex: 0 1 40%;
        font-weight: 600;
        padding-right: 0;
        text-align: left;
    }

    .runtime-record-table .nhsuk-table__body .runtime-table-responsive__value {
        flex: 1 1 60%;
        max-width: 100%;
        min-width: 0;
        overflow-wrap: anywhere;
        padding-inline-end: 0;
        text-align: right;
        white-space: normal;
        width: auto;
    }

    .runtime-rich-text.runtime-record-table__rich-text {
        max-width: 100%;
        width: 100%;
    }

    .runtime-record-table .runtime-tag--full-width {
        display: inline-block;
        width: auto;
    }

    .runtime-record-list__footer {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .runtime-record-list__footer {
        background: var(--runtime-canvas);
        border-top: 1px solid var(--runtime-border);
        bottom: -1.5rem;
        box-shadow: 0 -.35rem .75rem rgb(23 43 58 / 10%);
        margin-inline: -.75rem;
        padding: .75rem;
        position: sticky;
        width: calc(100% + 1.5rem);
        z-index: 4;
    }

    .runtime-record-list__page-size {
        gap: .4rem;
    }

    .runtime-pagination__label,
    .runtime-record-list__page-size label,
    .runtime-pagination__page-picker label {
        font-size: .8rem;
    }

    .runtime-record-list__page-size select,
    .runtime-pagination__page-picker select {
        min-height: 2rem;
        padding-block: .15rem;
    }

    .runtime-pagination__summary p {
        font-size: .8rem;
    }

    .runtime-pagination__page-picker select {
        min-width: 3.25rem;
    }

    .runtime-pagination__list {
        justify-content: space-between;
        width: 100%;
    }

    .runtime-record-details__workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-record-details--history {
        height: auto;
        min-height: 0;
    }

    .runtime-record-details--history .runtime-record-details__content,
    .runtime-record-details--history .runtime-record-tabs {
        display: block;
    }

    .runtime-record-details--history .runtime-record-details__summary {
        overflow: visible;
    }

    .runtime-history-panel {
        display: block;
        max-height: none;
        overflow: visible;
    }

    .runtime-history-panel__controls {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
    }

    .runtime-history-panel__search {
        flex-basis: 100%;
        max-width: none;
    }

    .runtime-history-panel__page-size--mobile {
        display: flex;
    }

    .runtime-history-panel__page-size--desktop,
    .runtime-history-panel__position--desktop {
        display: none;
    }

    .runtime-history-panel__footer {
        display: block;
    }

    .runtime-history-panel__footer .runtime-pagination,
    .runtime-history-panel__footer .runtime-pagination__list {
        width: 100%;
    }

    .runtime-history-panel__footer .runtime-pagination__list {
        align-items: center;
        display: grid;
        gap: .5rem;
        grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem;
    }

    .runtime-history-panel__footer .runtime-pagination__list li:last-child {
        justify-self: end;
    }

    .runtime-history-panel__position--mobile {
        display: block;
        justify-self: center;
        text-align: center;
    }

    .runtime-history-panel__actions {
        flex-wrap: nowrap;
        margin-inline-start: auto;
    }

    .runtime-history-panel__preferences {
        display: none;
    }

    /* Compact History has one predictable presentation. Desktop choices stay
       in component state and return when the viewport widens, while Timeline
       and Grid markup converge visually on stacked cards and field/value rows. */
    .runtime-history-panel__entries--timeline {
        padding: 0;
    }

    .runtime-history-timeline {
        display: grid;
        gap: .85rem;
        padding: .75rem 1rem;
    }

    .runtime-history-timeline::before,
    .runtime-history-timeline__marker {
        display: none;
    }

    .runtime-history-timeline__item,
    .runtime-history-timeline__item:nth-child(even) {
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .runtime-history-timeline__values {
        display: block;
    }

    .runtime-history-timeline__values div {
        border-block-start: 1px solid var(--runtime-border);
        display: grid;
        grid-template-columns: 32% minmax(0, 1fr);
        padding: 0;
    }

    .runtime-history-timeline__values div:first-child {
        border-block-start: 0;
    }

    .runtime-history-timeline__values div:nth-child(odd):not(:last-child) {
        border-inline-end: 0;
    }

    .runtime-history-timeline__values dt,
    .runtime-history-timeline__values dd {
        font-size: .875rem;
        line-height: 1.4;
        margin: 0;
        overflow-wrap: anywhere;
        padding: .55rem .75rem;
    }

    .runtime-history-timeline__values dt {
        background: color-mix(in srgb, var(--runtime-surface-muted) 62%, #fff);
        color: var(--runtime-heading);
        font-weight: 700;
        letter-spacing: normal;
        text-transform: none;
    }

    .runtime-history-timeline__values dd {
        color: var(--runtime-heading);
        font-weight: 400;
        white-space: pre-wrap;
    }

    .runtime-history-panel__entries {
        overflow: visible;
        padding-inline-end: 0;
        scrollbar-gutter: auto;
    }

    /* Full-height History dialogs must retain their internal grid and scroll
       region on compact screens. The surrounding record page uses natural
       document flow at this breakpoint, but applying that rule to the modal
       lets expanded cards escape the dialog body. */
    .runtime-history-panel.runtime-history-panel--modal {
        display: grid;
        max-height: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .runtime-history-panel--modal .runtime-history-panel__entries {
        min-width: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .runtime-details-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-details-field {
        grid-column: 1 / -1 !important;
        max-height: none !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    .runtime-details-field--placeholder {
        display: none;
    }

    .runtime-details-section--table .runtime-details-field {
        grid-template-columns: minmax(0, 1fr);
    }

    .tabCardGroup.runtime-record-tabs__list {
        display: none;
    }

    .runtime-record-tabs__mobile-menu {
        display: block;
    }

    .runtime-record-navigation--with-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .runtime-record-navigation--with-actions > nav {
        grid-column: auto;
    }

    .runtime-record-tabs__mobile-menu .runtime-record-tabs__more-toggle,
    .runtime-record-tabs__mobile-menu .runtime-record-tab-card__content {
        text-align: left;
    }

    .runtime-record-tabs__mobile-menu .runtime-record-tabs__more-toggle {
        min-height: 2.875rem;
        padding: 0;
    }

    .runtime-record-tabs__mobile-menu .runtime-record-tab-card__content {
        display: grid;
        gap: .5rem;
        grid-template-columns: minmax(0, 1fr) auto auto;
        justify-content: normal;
        padding: .625rem .75rem;
    }

    .runtime-record-tabs__mobile-menu .runtime-record-tabs__count {
        margin-left: 0;
    }

    .runtime-record-tabs__mobile-menu .runtime-record-tabs__more-chevron {
        margin: .2rem .2rem 0;
    }

    .runtime-record-actions__toggle-label--overflow {
        display: none;
    }

    .runtime-record-actions__toggle-label--mobile {
        display: inline;
    }

}

@media (max-width: 40rem) {
    .runtime-header,
    .runtime-shell--compact-header .runtime-header {
        gap: .35rem;
        min-height: 3.5rem;
        padding: .45rem .5rem;
    }

    .runtime-header .runtime-brand {
        gap: .35rem;
    }

    .runtime-header .runtime-brand__nhs-logo,
    .runtime-shell--compact-header .runtime-brand__nhs-logo {
        flex: 0 0 auto;
        height: 1.3rem;
        width: 3.25rem;
    }

    .runtime-header .runtime-brand__name {
        font-size: .7rem;
        line-height: 1.05;
        min-width: 0;
    }

    .runtime-header .runtime-brand__name strong {
        font-size: .8rem;
    }

    .runtime-header__account {
        gap: .2rem;
    }

    .runtime-header__account .runtime-recent-records > summary {
        min-height: 1.75rem;
        padding: .25rem .35rem;
    }

    .runtime-header__account .runtime-recent-records > summary > span {
        display: none;
    }

    .runtime-header:has(.runtime-recent-records[open]) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) max-content max-content;
    }

    .runtime-header:has(.runtime-recent-records[open]) .runtime-header__brand {
        grid-column: 1;
        grid-row: 1;
    }

    .runtime-header:has(.runtime-recent-records[open]) .runtime-header__account {
        display: contents;
    }

    .runtime-header:has(.runtime-recent-records[open]) .runtime-recent-records {
        grid-column: 1 / -1;
        grid-row: 2;
        min-width: 0;
        width: 100%;
    }

    .runtime-header:has(.runtime-recent-records[open])
        .runtime-recent-records > summary {
        display: none;
    }

    .runtime-header:has(.runtime-recent-records[open]) .runtime-scale-control {
        grid-column: 2;
        grid-row: 1;
    }

    .runtime-header:has(.runtime-recent-records[open]) .runtime-profile-link {
        grid-column: 3;
        grid-row: 1;
    }

    .runtime-header .runtime-recent-records__panel {
        box-sizing: border-box;
        box-shadow: none;
        left: auto;
        margin-top: .35rem;
        max-height: min(34rem, calc(var(--runtime-workspace-viewport-height) - 7rem));
        position: static;
        right: auto;
        top: auto;
        width: 100%;
        z-index: auto;
    }

    .runtime-shell--vertical-navigation
        .runtime-header .runtime-recent-records__panel {
        max-height: min(34rem, calc(var(--runtime-workspace-viewport-height) - 11rem));
    }

    .runtime-header__account .runtime-scale-control__button,
    .runtime-header__account .runtime-scale-control__value {
        height: 1.7rem;
        min-width: 1.7rem;
        padding-inline: .2rem;
    }

    .runtime-header__account .runtime-scale-control__value {
        min-width: 2.35rem;
    }

    .runtime-header__account .runtime-profile-avatar {
        height: 2.2rem;
        width: 2.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .runtime-dialog[open]:not(.runtime-filter-dialog) .runtime-dialog__surface,
    .runtime-filter-dialog[open],
    .runtime-filter-dialog[open].runtime-dialog--closing,
    .runtime-dialog[open]::backdrop {
        animation: none;
    }

    .runtime-form-question--revealed,
    .runtime-form-question--hidden {
        animation-duration: 1ms;
    }

    .runtime-state__indicator {
        animation-duration: 1.6s;
    }

    .runtime-record-actions__chevron,
    .runtime-record-actions__more::before,
    .runtime-record-actions__toggle,
    .runtime-record-actions__panel,
    .runtime-admin-actions__chevron,
    .runtime-admin-actions__panel,
    .runtime-record-tabs__more-chevron,
    .runtime-record-tabs__more::before,
    .runtime-record-tabs__more-toggle,
    .runtime-record-tabs__more-panel,
    .runtime-process-node__chevron,
    .runtime-process__no-change-table > summary > i,
    .runtime-facet__indicator,
    .runtime-record-results__overlay,
    .runtime-navigation-rail,
    .runtime-navigation-rail__primary,
    .runtime-navigation-rail .runtime-navigation__link,
    .runtime-navigation-rail .runtime-navigation__label,
    .runtime-navigation-menu > summary::after,
    .runtime-navigation-menu--animated[open] >
        .runtime-navigation-menu__content,
    .runtime-navigation-menu .runtime-navigation-actions__toggle
        .runtime-navigation__icon,
    .runtime-home-destination,
    .runtime-home-destination__arrow {
        transition: none;
    }

    .runtime-record-results__spinner {
        animation: none;
    }
}

.runtime-record-cards,
.runtime-record-kanban__cards {
    list-style: none;
    margin: 0;
    padding: 0;
}

.runtime-record-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(var(--runtime-cards-per-row), minmax(0, 1fr));
    padding: .125rem .125rem .5rem;
}

.runtime-record-cards__item {
    container-name: runtime-record-card;
    container-type: inline-size;
    min-width: 0;
}

.runtime-record-card {
    background: #fff;
    height: 100%;
}

.runtime-record-card {
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    border-top: .25rem solid color-mix(in srgb, var(--runtime-border) 70%, #768692);
    box-shadow:
        0 .125rem .25rem rgb(23 43 58 / 10%),
        0 .35rem .8rem rgb(23 43 58 / 6%);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    position: relative;
}

.runtime-record-card:hover {
    background: #fff;
    border-color: color-mix(
        in srgb,
        var(--runtime-shell-accent, #003e75) 48%,
        var(--runtime-border));
    border-top-color: var(--runtime-shell-accent, var(--runtime-accent));
    box-shadow:
        0 .25rem .45rem rgb(23 43 58 / 14%),
        0 .65rem 1.15rem rgb(23 43 58 / 10%);
    transform: translateY(-.125rem);
}

.runtime-record-card__link {
    color: inherit;
}

.runtime-record-card:has(> .runtime-record-card__link:focus-visible) {
    border-color: #212b32;
    border-top-color: var(--runtime-shell-accent, var(--runtime-accent));
    box-shadow:
        0 0 0 .25rem #ffeb3b,
        inset 0 0 0 .25rem #212b32;
    outline: .25rem solid transparent;
    transform: none;
}

.runtime-record-card__field:focus-visible {
    box-shadow: inset 0 0 0 2px #212b32;
    outline: 3px solid #ffeb3b;
    outline-offset: 0;
}

.runtime-record-card__fields {
    display: grid;
    flex: 1 1 auto;
    gap: .625rem;
    grid-template-columns: repeat(var(--runtime-card-columns-6), minmax(0, 1fr));
    margin: 0;
    padding: .75rem;
}

.runtime-record-card__field {
    background: #f6f8f9;
    border: 1px solid color-mix(in srgb, var(--runtime-border) 82%, #fff);
    border-radius: .25rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    grid-column: span var(--runtime-card-column-span-6);
    min-width: 0;
    padding: .55rem .625rem;
}

.runtime-record-card__field--text {
    background: #fff;
}

.runtime-record-card__field--rich-text,
.runtime-record-kanban__field--rich-text {
    background: #fff;
}

.runtime-record-card__field--scrollable {
    scrollbar-color: #8aa0ad #eef3f5;
    scrollbar-width: thin;
}

.runtime-record-card dt,
.runtime-record-kanban dt {
    color: #003d78;
    font-size: .875rem;
    font-weight: 700;
}

.runtime-record-card dt {
    color: var(--runtime-slate);
    font-size: .7rem;
    letter-spacing: .035em;
    line-height: 1.25;
    text-transform: uppercase;
}

.runtime-record-card dd,
.runtime-record-kanban dd {
    margin: .15rem 0 0;
}

.runtime-record-card dt,
.runtime-record-card dd {
    overflow-wrap: anywhere;
}

.runtime-record-card dd {
    color: var(--runtime-heading);
    font-size: .9rem;
    line-height: 1.35;
    margin-top: .3rem;
}

.runtime-record-card__field .nhsuk-tag {
    border-radius: .15rem;
    box-sizing: border-box;
    display: block;
    font-size: .75rem;
    line-height: 1.3;
    min-height: 1.55rem;
    overflow: hidden;
    padding: .25rem .45rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-record-card--compact {
    --runtime-compact-record-accent:
        var(--runtime-shell-accent, var(--runtime-accent));
    border: 1px solid color-mix(
        in srgb,
        var(--runtime-compact-record-accent) 34%,
        var(--runtime-border));
    border-left: .25rem solid var(--runtime-compact-record-accent);
    border-radius: .3rem;
    display: block;
    height: 100%;
    overflow: visible;
    padding: .65rem .7rem .65rem .6rem;
}

.runtime-record-card--compact:hover {
    background: color-mix(
        in srgb,
        var(--runtime-compact-record-accent) 11%,
        #fff);
    border-color: color-mix(
        in srgb,
        var(--runtime-compact-record-accent) 44%,
        var(--runtime-border));
    border-left-color: var(--runtime-compact-record-accent);
    box-shadow: 0 5px 12px rgb(23 43 58 / 16%);
    transform: translateY(-1px);
}

.runtime-record-card--compact .runtime-compact-record-card__fields--configured {
    gap: .35rem .75rem;
    grid-template-columns:
        repeat(var(--runtime-card-columns-6), minmax(0, 1fr));
}

.runtime-record-card--compact .runtime-record-card__field {
    background: transparent;
    border: 0;
    border-radius: 0;
    display: grid;
    gap: .5rem;
    grid-template-columns: minmax(5.5rem, .42fr) minmax(0, 1fr);
    padding: .2rem 0;
}

.runtime-record-card--compact .runtime-record-card__field--scrollable {
    padding-inline-end: .25rem;
}

.runtime-record-card--compact .runtime-record-card__field dt {
    color: var(--runtime-heading);
    font-size: .75rem;
    letter-spacing: normal;
    line-height: 1.25;
    text-transform: none;
}

.runtime-record-card--compact .runtime-record-card__field dd {
    font-size: .75rem;
    line-height: 1.25;
    margin: 0;
}

.runtime-record-card--compact .runtime-record-card__field .nhsuk-tag {
    font-size: .6875rem;
    min-height: 1.25rem;
    padding: .15rem .35rem;
}

.runtime-compact-record-card__action {
    align-items: center;
    color: var(--runtime-compact-record-accent);
    display: inline-flex;
    font-weight: 800;
    gap: .35rem;
}

.runtime-record-card--compact:has(> .runtime-record-card__link:focus-visible)
    .runtime-compact-record-card__heading > strong span,
.runtime-record-card--compact:has(> .runtime-record-card__link:focus-visible)
    .runtime-compact-record-card__fields dt,
.runtime-record-card--compact:has(> .runtime-record-card__link:focus-visible)
    .runtime-compact-record-card__meta,
.runtime-record-card--compact:has(> .runtime-record-card__link:focus-visible)
    .runtime-compact-record-card__action {
    color: var(--runtime-focus-text);
}

@media (prefers-reduced-motion: no-preference) {
    .runtime-record-card,
    .runtime-record-kanban__card {
        transition:
            border-color .16s ease,
            box-shadow .16s ease,
            transform .16s ease;
    }
}

/*
 * Cards per row remains the configured/user-selected preference. These
 * container thresholds only reduce the field grid when an individual card can
 * no longer give each configured column a readable amount of inline space.
 */
@container runtime-record-card (max-width: 56rem) {
    .runtime-record-card__fields {
        grid-template-columns: repeat(var(--runtime-card-columns-5), minmax(0, 1fr));
    }

    .runtime-record-card__field {
        grid-column: span var(--runtime-card-column-span-5);
    }

    .runtime-record-card--compact .runtime-compact-record-card__fields--configured {
        grid-template-columns:
            repeat(var(--runtime-card-columns-5), minmax(0, 1fr));
    }
}

@container runtime-record-card (max-width: 46.5rem) {
    .runtime-record-card__fields {
        grid-template-columns: repeat(var(--runtime-card-columns-4), minmax(0, 1fr));
    }

    .runtime-record-card__field {
        grid-column: span var(--runtime-card-column-span-4);
    }

    .runtime-record-card--compact .runtime-compact-record-card__fields--configured {
        grid-template-columns:
            repeat(var(--runtime-card-columns-4), minmax(0, 1fr));
    }
}

@container runtime-record-card (max-width: 37rem) {
    .runtime-record-card__fields {
        grid-template-columns: repeat(var(--runtime-card-columns-3), minmax(0, 1fr));
    }

    .runtime-record-card__field {
        grid-column: span var(--runtime-card-column-span-3);
    }

    .runtime-record-card--compact .runtime-compact-record-card__fields--configured {
        grid-template-columns:
            repeat(var(--runtime-card-columns-3), minmax(0, 1fr));
    }
}

@container runtime-record-card (max-width: 27.5rem) {
    .runtime-record-card__fields {
        grid-template-columns: repeat(var(--runtime-card-columns-2), minmax(0, 1fr));
    }

    .runtime-record-card__field {
        grid-column: span var(--runtime-card-column-span-2);
    }

    .runtime-record-card--compact .runtime-compact-record-card__fields--configured {
        grid-template-columns:
            repeat(var(--runtime-card-columns-2), minmax(0, 1fr));
    }
}

@container runtime-record-card (max-width: 18rem) {
    .runtime-record-card__fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-record-card__field {
        grid-column: span var(--runtime-card-column-span-1);
    }

    .runtime-record-card--compact .runtime-compact-record-card__fields--configured {
        grid-template-columns: minmax(0, 1fr);
    }
}

.runtime-record-kanban-host {
    box-sizing: border-box;
    cursor: grab;
    height: clamp(
        24rem,
        calc(var(--runtime-workspace-viewport-height) - 17rem),
        51rem);
    max-width: 100%;
    min-height: 20rem;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    width: 100%;
}

.runtime-record-kanban-host::-webkit-scrollbar,
.runtime-record-gantt-host::-webkit-scrollbar {
    display: none;
}

.runtime-record-kanban-host.runtime-drag-scroll--dragging,
.runtime-record-gantt-host.runtime-drag-scroll--dragging,
.runtime-record-kanban-host.runtime-drag-scroll--dragging *,
.runtime-record-gantt-host.runtime-drag-scroll--dragging * {
    cursor: grabbing;
    user-select: none;
}

.runtime-record-kanban {
    align-items: stretch;
    display: grid;
    gap: .75rem;
    grid-auto-columns: minmax(18.75rem, 26.25rem);
    grid-auto-flow: column;
    height: 100%;
    min-width: 100%;
    padding: .25rem .25rem .75rem;
    width: max-content;
}

.runtime-record-kanban::after {
    content: "";
    display: block;
    width: 1.125rem;
}

.runtime-record-kanban__lane {
    background: #f0f4f5;
    border-top: .25rem solid var(--runtime-shell-accent, #003e75);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.runtime-record-kanban__header {
    background: #fff;
    border-bottom: 1px solid #d8dde0;
    min-height: 5.5rem;
    padding: .55rem .625rem;
    text-align: center;
}

.runtime-record-kanban__header h2 {
    font-size: 1rem;
    line-height: 1.25;
    margin: 0 0 .375rem;
}

.runtime-record-kanban__count {
    display: block;
    font-size: .75rem;
    line-height: 1.2;
    padding: .2rem .45rem;
    width: 100%;
}

.runtime-record-kanban__cards {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: .55rem;
    min-height: 0;
    overflow-y: auto;
    padding: .625rem;
    scrollbar-color: #8aa0ad #eef3f5;
    scrollbar-width: thin;
}

.runtime-record-kanban__empty {
    border: 2px dashed #d8dde0;
    color: #4c6272;
    font-size: .875rem;
    margin: 0;
    padding: .75rem;
    text-align: center;
}

.runtime-record-kanban__card {
    background: #fff;
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    border-top: .25rem solid var(--runtime-shell-accent, var(--runtime-accent));
    box-shadow:
        0 .125rem .25rem rgb(23 43 58 / 10%),
        0 .35rem .8rem rgb(23 43 58 / 6%);
    color: var(--runtime-ink);
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    font-size: .875rem;
    line-height: 1.25;
    overflow: hidden;
    padding: 0;
    text-decoration: none;
}

.runtime-record-kanban__card:hover {
    background: #fff;
    border-color: color-mix(
        in srgb,
        var(--runtime-shell-accent, #003e75) 48%,
        var(--runtime-border));
    color: var(--runtime-ink);
    box-shadow:
        0 .25rem .45rem rgb(23 43 58 / 14%),
        0 .65rem 1.15rem rgb(23 43 58 / 10%);
    transform: translateY(-.125rem);
}

.runtime-record-kanban__card:has(> .runtime-record-kanban__link:focus-visible) {
    border-color: #212b32;
    box-shadow:
        0 0 0 .25rem #ffeb3b,
        inset 0 0 0 .25rem #212b32;
    color: var(--runtime-ink);
    outline: .25rem solid transparent;
    transform: none;
}

.runtime-record-kanban__selection-panel {
    align-items: center;
    background: color-mix(
        in srgb,
        var(--runtime-shell-accent, var(--runtime-accent)) 5%,
        #fff);
    border-bottom: 1px solid var(--runtime-border);
    display: flex;
    flex: 0 0 auto;
    min-height: 2.75rem;
    padding: .25rem .625rem;
}

.runtime-record-kanban__card:hover > .runtime-record-kanban__selection-panel {
    background: color-mix(
        in srgb,
        var(--runtime-shell-accent, var(--runtime-accent)) 11%,
        #fff);
}

.runtime-record-kanban__link {
    color: inherit;
    display: block;
    text-decoration: none;
}

/* The card surface carries the keyboard focus ring around both its header
   and content; the selection button keeps its own independent focus style. */
.runtime-record-kanban__link:focus-visible {
    background: transparent;
    box-shadow: none;
    color: inherit;
    outline: none;
}

.runtime-record-kanban__card dl {
    display: grid;
    flex: 1 1 auto;
    gap: .5rem;
    margin: 0;
    padding: .625rem;
}

.runtime-record-kanban__field {
    background: #f6f8f9;
    border: 1px solid color-mix(in srgb, var(--runtime-border) 82%, #fff);
    border-radius: .25rem;
    min-width: 0;
    padding: .5rem .55rem;
}

.runtime-record-kanban__field--text {
    background: #fff;
}

.runtime-record-kanban__field dt {
    color: var(--runtime-slate);
    font-size: .7rem;
    letter-spacing: .035em;
    line-height: 1.25;
    margin: 0;
    text-transform: uppercase;
}

.runtime-record-kanban__field dd {
    color: var(--runtime-heading);
    font-size: .9rem;
    line-height: 1.35;
    margin: .3rem 0 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.runtime-record-kanban__field .nhsuk-tag {
    font-size: .75rem;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    padding: .2rem .45rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-record-kanban__tag--full-width {
    display: block;
    width: 100%;
}

.runtime-record-kanban__tag--dynamic {
    display: inline-block;
}

.runtime-record-gantt-host {
    cursor: grab;
    height: clamp(
        24rem,
        calc(var(--runtime-workspace-viewport-height) - 17rem),
        51rem);
    min-height: 20rem;
    overflow: auto;
    scrollbar-width: none;
}

.runtime-record-gantt {
    --runtime-gantt-leading-gutter: 2.125rem;
    box-sizing: border-box;
    font-size: .875rem;
    padding: .25rem .25rem .75rem;
    position: relative;
    width: 100%;
}

.runtime-gantt-zoom {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .25rem 0 .75rem;
}

.runtime-gantt-zoom .nhsuk-button { margin: 0; }
.runtime-gantt-zoom label { font-weight: 700; }
.runtime-gantt-zoom input { width: 12rem; max-width: 35vw; min-height: 2.5rem; }
.runtime-gantt-zoom output { min-width: 4rem; font-variant-numeric: tabular-nums; }

.runtime-record-gantt__timeline {
    background: #f0f4f5;
    border-bottom: 2px solid #d8dde0;
    display: grid;
    min-height: 7rem;
    overflow: hidden;
    padding-left: var(--runtime-gantt-leading-gutter);
    position: sticky;
    top: 0;
    z-index: 5;
}

.runtime-record-gantt__tick {
    align-items: flex-end;
    display: flex;
    font-weight: 700;
    height: 6.5rem;
    line-height: 1.25;
    padding: .5rem;
    transform: rotate(-45deg);
    transform-origin: left bottom;
    white-space: nowrap;
}

.runtime-record-gantt__tick--today {
    color: #d5281b;
    font-weight: 900;
}

.runtime-record-gantt__today-line {
    background: #d5281b;
    bottom: .75rem;
    opacity: .4;
    pointer-events: none;
    position: absolute;
    top: 7.375rem;
    width: 2px;
    z-index: 4;
}

.runtime-record-gantt__rows {
    display: grid;
    gap: .375rem;
    padding: .5rem 0 .75rem;
}

.runtime-record-gantt__row {
    align-items: center;
    border-bottom: 1px solid #d8dde0;
    display: grid;
    grid-template-columns: var(--runtime-gantt-leading-gutter) minmax(0, 1fr);
    min-height: 2.75rem;
}

.runtime-record-gantt__track {
    background: repeating-linear-gradient(to right, #f8f8f8 0, #f8f8f8 calc(var(--runtime-gantt-unit-width) - 1px), #e8edee var(--runtime-gantt-unit-width));
    border-left: 1px solid #d8dde0;
    height: 2.5rem;
    grid-column: 2;
    grid-row: 1;
    position: relative;
}

.runtime-record-gantt__bar {
    align-items: center;
    border: 1px solid;
    box-sizing: border-box;
    box-shadow: 2px 4px 11px 0px rgb(0 0 0 / 30%);
    display: flex;
    font-size: .8rem;
    font-weight: 700;
    height: 2.25rem;
    min-width: 2px;
    overflow: hidden;
    line-height: 1.2;
    padding: .125rem;
    position: absolute;
    text-align: left;
    text-decoration: none;
    top: .125rem;
    white-space: nowrap;
}

/* A very short appointment still needs room for its in-bar selection target.
   Fit labels includes this space; the exact interval remains in the link title. */
.runtime-record-gantt__bar--selectable { min-width: 2.25rem; }

.runtime-record-gantt__bar:not([class*="nhsuk-tag--"]) {
    background: var(--runtime-shell-accent, #005eb8);
    color: #fff;
}

.runtime-record-gantt__bar:hover,
.runtime-record-gantt__bar:has(:focus-visible) {
    box-shadow: 0 0 0 3px var(--runtime-focus);
    color: var(--runtime-ink);
}

.runtime-record-gantt__bar:not([class*="nhsuk-tag--"]):hover,
.runtime-record-gantt__bar:not([class*="nhsuk-tag--"]):has(:focus-visible) {
    color: #fff;
}

.runtime-record-gantt__link,
.runtime-record-gantt__link:visited {
    align-items: center;
    color: inherit;
    display: flex;
    flex: 1;
    height: 100%;
    min-width: 0;
    padding: 0 .375rem;
    text-decoration: none;
}

.runtime-record-gantt__bar span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Shared selection styles belong to each list root, including linked-record
   dialogs rendered outside RecordListPage's CSS isolation scope. */
[data-runtime-record-selection-root] .runtime-record-selection-column { width: 2.75rem; }
[data-runtime-record-selection-root] .runtime-record-selection-cell { vertical-align: middle; }

[data-runtime-record-selection-root] .runtime-record-selection--dragging,
[data-runtime-record-selection-root] .runtime-record-selection--dragging * {
    cursor: crosshair;
    user-select: none;
}

[data-runtime-record-selection-root] .runtime-record-selection-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .25rem;
    border: 0;
    border-radius: 0;
    color: var(--runtime-accent-dark);
    background: transparent;
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

[data-runtime-record-selection-root] .runtime-record--selected {
    outline: 3px solid var(--runtime-accent);
    outline-offset: -3px;
    background: color-mix(in srgb, var(--runtime-accent) 22%, var(--runtime-surface));
}

[data-runtime-record-selection-root] .runtime-record--selected > td,
[data-runtime-record-selection-root] .runtime-record-kanban__card.runtime-record--selected {
    background: color-mix(in srgb, var(--runtime-accent) 22%, var(--runtime-surface));
}

/* Paint one outline around each consecutive selected table block. Cell-local
   borders keep column/row measurements unchanged and survive forced colours. */
[data-runtime-record-selection-root] .runtime-record-table__row.runtime-record--selected {
    --runtime-selection-top: 3px;
    --runtime-selection-bottom: 3px;
    --runtime-selection-border: var(--runtime-accent);
    outline: none;
}

[data-runtime-record-selection-root] .runtime-record-table__row.runtime-record--selected + .runtime-record-table__row.runtime-record--selected {
    --runtime-selection-top: 0px;
}

[data-runtime-record-selection-root] .runtime-record-table__row.runtime-record--selected:has(+ .runtime-record-table__row.runtime-record--selected) {
    --runtime-selection-bottom: 0px;
}

[data-runtime-record-selection-root] .runtime-record-table__row.runtime-record--selected > td {
    --runtime-selection-left: 0px;
    --runtime-selection-right: 0px;
    position: relative;
}

[data-runtime-record-selection-root] .runtime-record-table__row.runtime-record--selected > td:first-child { --runtime-selection-left: 3px; }
[data-runtime-record-selection-root] .runtime-record-table__row.runtime-record--selected > td:last-child { --runtime-selection-right: 3px; }

[data-runtime-record-selection-root] .runtime-record-table__row.runtime-record--selected > td::after {
    content: "";
    position: absolute;
    /* Cover the collapsed one-pixel cell divider so the side edges stay joined. */
    inset: 0 0 -1px;
    pointer-events: none;
    border-style: solid;
    border-color: var(--runtime-selection-border);
    border-width: var(--runtime-selection-top) var(--runtime-selection-right)
        var(--runtime-selection-bottom) var(--runtime-selection-left);
}

[data-runtime-record-selection-root] .runtime-record-card > .runtime-record-selection-toggle {
    margin: .5rem;
}

[data-runtime-record-selection-root] .runtime-record-gantt__bar > .runtime-record-selection-toggle {
    width: 1.75rem;
    height: 1.75rem;
    color: inherit;
}

/* Bar colours already have a tinted fill, so use a stronger accent tint to
   distinguish selection while keeping the surrounding timeline unchanged. */
[data-runtime-record-selection-root] .runtime-record-gantt__bar.runtime-record--selected {
    background: color-mix(in srgb, var(--runtime-accent) 32%, var(--runtime-surface));
    border-color: var(--runtime-accent);
    color: var(--runtime-ink);
}

/* The shared table layout stacks records below this breakpoint, with space
   between them, so each record needs its own outline. */
@media (max-width: 64rem) {
    [data-runtime-record-selection-root] .runtime-record-table__row.runtime-record--selected {
        outline: 3px solid var(--runtime-selection-border);
    }

    [data-runtime-record-selection-root] .runtime-record-table__row.runtime-record--selected > td::after {
        content: none;
    }
}

@media (forced-colors: active) {
    [data-runtime-record-selection-root] .runtime-record--selected { outline-color: Highlight; }
    [data-runtime-record-selection-root] .runtime-record-table__row.runtime-record--selected { --runtime-selection-border: Highlight; }
    [data-runtime-record-selection-root] .runtime-record-selection-toggle[aria-pressed="true"] {
        color: Highlight;
    }
}

.runtime-record-gantt__missing-dates {
    align-items: center;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-left: .25rem solid var(--runtime-accent);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 1rem;
    padding: .75rem 1rem;
}

.runtime-record-gantt__missing-dates p,
.runtime-record-gantt__missing-dates .nhsuk-button {
    margin: 0;
}

.runtime-record-gantt__missing-dates p {
    flex: 1 1 20rem;
}

.runtime-record-gantt__missing-dates .nhsuk-button {
    flex: 0 0 auto;
}

.runtime-record-gantt__missing-dates-dialog .runtime-table-region {
    max-height: min(60vh, 40rem);
}

@media (max-width: 48em) {
    .runtime-profile-card--identity {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-profile-account {
        align-items: center;
        grid-template-columns: 6.5rem minmax(0, 1fr);
        justify-items: stretch;
        width: 100%;
    }

    .runtime-profile-portrait {
        height: 6.5rem;
        width: 6.5rem;
    }

    .runtime-profile-account-actions {
        min-width: 0;
    }

    .runtime-profile-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .runtime-record-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .runtime-record-cards[data-cards-per-row="1"] {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-record-card__fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-record-card__field {
        grid-column: 1 / -1;
    }

    .runtime-record-card--compact .runtime-compact-record-card__fields--configured {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-record-kanban-host,
    .runtime-record-gantt-host {
        height: 65dvh;
    }

    .runtime-record-kanban-host {
        height: auto;
        overflow: visible;
    }

    .runtime-record-kanban {
        grid-auto-flow: row;
        grid-template-columns: minmax(0, 1fr);
        height: auto;
        width: 100%;
    }

    .runtime-record-kanban::after {
        display: none;
    }

    .runtime-record-kanban__lane {
        height: clamp(20rem, 60dvh, 34rem);
    }
}

@media (max-width: 40em) {
    .runtime-profile-page__heading h1 {
        font-size: 1.7rem;
    }

    .runtime-profile-card,
    .runtime-profile-expander__content {
        padding: .9rem;
    }

    .runtime-profile-expander {
        padding: 0;
    }

    .runtime-profile-expander > summary {
        padding: .9rem;
    }

    .runtime-profile-identity__title {
        align-items: flex-start;
        flex-direction: column;
    }

    .runtime-profile-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-profile-table-wrap {
        overflow: visible;
    }

    .runtime-profile-table,
    .runtime-profile-table tbody,
    .runtime-profile-table tr,
    .runtime-profile-table td {
        display: block;
        width: 100%;
    }

    .runtime-profile-table thead {
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        height: 1px;
        overflow: hidden;
        position: absolute;
        white-space: nowrap;
        width: 1px;
    }

    .runtime-profile-table tr {
        border-bottom: 2px solid var(--runtime-border);
        padding-block: .35rem;
    }

    .runtime-profile-table td {
        border: 0;
        padding: .4rem 0;
    }

    .runtime-profile-table td::before {
        color: var(--runtime-heading);
        content: attr(data-label);
        display: block;
        font-size: .75rem;
        font-weight: 700;
        margin-bottom: .12rem;
    }

    .runtime-pagination__list--record-list {
        display: none;
    }

    .runtime-pagination__mobile {
        display: grid;
        gap: .5rem;
        width: 100%;
    }

    .runtime-pagination__mobile-navigation {
        align-items: center;
        display: grid;
        gap: .5rem;
        grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .runtime-pagination__mobile-navigation li {
        min-width: 0;
    }

    .runtime-pagination__mobile-navigation li:last-child {
        justify-self: end;
    }

    .runtime-pagination__mobile-page {
        justify-self: center;
        text-align: center;
    }

    .runtime-pagination__mobile .nhsuk-button {
        align-items: center;
        display: inline-flex;
        height: 2.5rem;
        justify-content: center;
        padding: 0;
        width: 2.5rem;
    }

    .runtime-pagination__mobile-summary {
        color: var(--runtime-heading);
        font-size: .8rem;
        font-weight: 700;
        margin: 0;
    }

    .runtime-record-list__mobile-meta {
        align-items: center;
        display: flex;
        grid-column: 1 / -1;
        grid-row: 4;
        justify-self: center;
    }

    .runtime-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-toolbar > .runtime-toolbar__view-group,
    .runtime-toolbar > .runtime-toolbar__query {
        grid-column: 1 / -1;
    }

    .runtime-toolbar > .runtime-toolbar__actions {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-content: center;
        justify-self: stretch;
        width: 100%;
    }

    .runtime-toolbar-actions__items,
    .runtime-toolbar-actions__items > .runtime-filter-actions {
        justify-content: center;
    }

    /* Phone layouts place the centred list actions before the page-size row.
       Keep the nested search/filter controls inline so the row remains visually
       coherent; the measured Actions disclosure still takes over when the row
       cannot fit. */
    .runtime-toolbar-actions__items > .runtime-filter-actions {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
    }

    /* The NHS secondary-button shadow extends below its layout box. Restore
       the visual-edge compensation only at phone widths so Refresh aligns
       with the adjacent view selector without changing wider toolbars. */
    .runtime-toolbar .runtime-toolbar__reload {
        transform: translateY(calc(0px - var(--runtime-button-shadow-depth)));
    }

    .runtime-record-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Kanban and Gantt use the whole list as their native full-screen boundary so
   the view controls, pagination, quick-action dialog, and modal form remain
   available above the spatial presentation. */
.runtime-record-list:fullscreen {
    background: var(--runtime-canvas);
    box-sizing: border-box;
    height: var(--runtime-workspace-viewport-height);
    max-height: none;
    min-height: 0;
    overflow: hidden;
    padding: 1rem;
    width: var(--runtime-workspace-viewport-width);
}

.runtime-record-list:fullscreen::backdrop {
    background: var(--runtime-canvas);
}

.runtime-record-list:fullscreen .runtime-record-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.runtime-record-list:fullscreen .runtime-record-kanban-host,
.runtime-record-list:fullscreen .runtime-record-gantt-host {
    flex: 1 1 auto;
    height: auto;
    max-height: none;
    min-height: 0;
}

.runtime-record-list:fullscreen .runtime-record-kanban-host {
    overflow-x: auto;
    overflow-y: hidden;
}

.runtime-record-list:fullscreen .runtime-record-gantt-host {
    overflow: auto;
}

.runtime-record-list:fullscreen .runtime-record-kanban {
    grid-auto-flow: column;
    grid-template-columns: none;
    height: 100%;
    width: max-content;
}

.runtime-record-list:fullscreen .runtime-record-kanban::after {
    display: block;
}

.runtime-record-list:fullscreen .runtime-record-kanban__lane {
    height: 100%;
}

.runtime-record-list:fullscreen .runtime-record-list__footer {
    background: transparent;
    border-top: 0;
    bottom: auto;
    box-shadow: none;
    flex-direction: row;
    margin-inline: 0;
    padding: 1rem 0 0;
    position: static;
    width: 100%;
}

@media (min-width: 64.0625rem) {
    .runtime-shell--vertical-navigation .runtime-record-list:fullscreen > .runtime-dialog:not(.runtime-filter-dialog) {
        transform: none;
    }
}

.runtime-dialog__body.runtime-chat-dialog__body {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.runtime-chat {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    overflow: hidden;
}

.runtime-chat__conversation {
    align-content: start;
    display: grid;
    gap: .8rem;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 1rem;
    scroll-padding-block: 1rem;
}

.runtime-chat__empty {
    color: var(--runtime-slate);
    font-size: .875rem;
    line-height: 1.45;
}

.runtime-chat__empty p {
    margin: 0 0 .75rem;
}

.runtime-chat__message {
    border: 1px solid var(--runtime-border);
    border-left: .25rem solid var(--runtime-accent);
    justify-self: start;
    max-width: 92%;
    min-width: 0;
    padding: .75rem;
}

.runtime-chat__message--assistant {
    background: color-mix(in srgb, var(--runtime-accent) 7%, var(--runtime-surface));
}

.runtime-chat__message--user {
    background: var(--runtime-accent-soft);
    border-left-color: var(--runtime-accent-dark);
    justify-self: end;
}

.runtime-chat__message--error {
    border-left-color: var(--runtime-danger);
}

.runtime-chat__message-label {
    color: var(--runtime-heading);
    display: block;
    font-size: .75rem;
    margin-bottom: .25rem;
}

.runtime-chat__message p {
    font-size: .875rem;
    line-height: 1.45;
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.runtime-chat__busy {
    align-items: center;
    color: var(--runtime-slate);
    display: flex;
    font-size: .875rem;
    gap: .5rem;
}

.runtime-chat__composer {
    background: var(--runtime-surface);
    border-top: 1px solid var(--runtime-border);
    display: grid;
    gap: .75rem;
    padding: 1rem;
}

.runtime-chat__composer textarea {
    font: inherit;
    line-height: 1.5;
    max-height: 10rem;
    min-height: 5.5rem;
    padding: .4rem .5rem;
    resize: vertical;
    width: 100%;
}

.runtime-chat__composer-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.runtime-chat__composer-actions .nhsuk-button {
    margin-bottom: 0;
}

.runtime-chat__submit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    width: 100%;
}

.runtime-chat__submit-actions .nhsuk-button {
    flex: 1 1 8rem;
    width: auto;
}

@media (forced-colors: active) {
    .runtime-chat__message {
        border-color: CanvasText;
    }
}

@media (max-width: 99.9375rem) {
    .runtime-form-builder-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-form-builder-layout__preview {
        display: none;
    }

    .runtime-form-editor-journey__preview-action {
        display: block;
    }

    .runtime-form-preview-dialog .runtime-dialog__body {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .runtime-form-preview-dialog .runtime-form-preview {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    .runtime-form-preview-dialog .runtime-form-preview--compact {
        --runtime-form-action-background: var(--runtime-canvas);

        background: transparent;
        border: 0;
        border-radius: 0;
        padding: 0;
    }

    .runtime-form-preview-dialog .runtime-form__scroll-region {
        /* Let unused wheel movement continue through the preview to the drawer. */
        overscroll-behavior-y: auto;
    }

    .runtime-form-preview-dialog .nhsuk-button--small {
        width: auto;
    }

    .runtime-question-properties-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
    }

    .runtime-question-properties-layout__preview {
        display: none;
    }

}

/* Compact authoring previews are narrow even when the browser viewport is
   wide. Use each preview's own inline size so the shared form controls
   reproduce their real mobile reflow instead of inheriting desktop
   media-query layouts. */
.runtime-form-preview--mobile-context {
    container-name: runtime-form-mobile-preview;
    container-type: inline-size;
}

@container runtime-form-mobile-preview (max-width: 40.0525rem) {
    .runtime-form-preview--mobile-context .nhsuk-summary-list {
        display: block;
        margin-bottom: 1.5rem;
        width: 100%;
    }

    .runtime-form-preview--mobile-context .nhsuk-summary-list__row {
        display: block;
        margin-bottom: 1rem;
    }

    .runtime-form-preview--mobile-context
        .nhsuk-summary-list__actions,
    .runtime-form-preview--mobile-context
        .nhsuk-summary-list__key,
    .runtime-form-preview--mobile-context
        .nhsuk-summary-list__value {
        display: block;
        padding: 0;
        text-align: left;
        width: auto;
    }

    .runtime-form-preview--mobile-context .nhsuk-summary-list__key {
        margin-bottom: .25rem;
    }

    .runtime-form-preview--mobile-context .nhsuk-summary-list__value {
        margin-bottom: 1rem;
    }

    .runtime-form-preview--mobile-context .nhsuk-summary-list__actions {
        margin-bottom: 1rem;
        margin-top: -.25rem;
    }

    .runtime-form-preview--mobile-context .runtime-icon-options {
        grid-template-columns: 1fr;
    }
}

.runtime-rule-summary-list {
    display: grid;
    gap: .75rem;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.runtime-rule-summary-card {
    align-items: center;
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-left: .3rem solid var(--runtime-shell-accent);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    padding: .8rem 1rem;
}

.runtime-rule-summary-card--error {
    background: color-mix(in srgb, var(--runtime-danger) 5%, #fff);
    border-left-color: var(--runtime-danger);
}

.runtime-rule-summary-card__content {
    align-items: center;
    display: grid;
    gap: .75rem 1rem;
    grid-template-columns:
        minmax(10rem, 14rem)
        minmax(12rem, 1fr)
        auto;
    min-width: 0;
}

.runtime-rule-summary-card__name {
    display: grid;
    min-width: 0;
}

.runtime-rule-summary-card__name strong,
.runtime-rule-summary-card__name span,
.runtime-rule-summary-card__settings li {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-rule-summary-card__name span,
.runtime-rule-summary-card__settings {
    color: var(--runtime-muted);
    font-size: .8rem;
}

.runtime-rule-summary-card__settings {
    display: grid;
    gap: .1rem;
    list-style: none;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.runtime-rule-summary-card__error {
    align-items: center;
    color: var(--runtime-danger);
    display: inline-flex;
    font-size: .8rem;
    font-weight: 700;
    gap: .3rem;
    white-space: nowrap;
}

.runtime-rule-summary-card__actions {
    align-items: center;
    display: flex;
    gap: .35rem;
}

.runtime-rule-summary-card__actions .nhsuk-button {
    margin: 0;
}

.runtime-condition-group-overview {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-block-end: .65rem;
}

.runtime-condition-group-overview__group {
    background:
        linear-gradient(135deg, rgba(0, 94, 184, .08), transparent),
        #fff;
    border: 1px solid var(--runtime-border);
    border-left: .3rem solid var(--runtime-blue);
    border-radius: .35rem;
    display: grid;
    min-width: 9rem;
    padding: .55rem .7rem;
}

.runtime-condition-group-overview__group span {
    color: var(--runtime-muted);
    font-size: .78rem;
}

.runtime-condition-group-overview__connector {
    align-self: center;
    background: var(--runtime-heading);
    border-radius: 999px;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: .28rem .5rem;
}

.runtime-configured-filter-summary {
    align-items: center;
    background: color-mix(in srgb, var(--runtime-accent) 4%, var(--runtime-surface));
    border: 1px solid var(--runtime-border);
    border-left: .25rem solid var(--runtime-accent);
    border-radius: var(--runtime-radius);
    display: grid;
    gap: var(--runtime-space-3);
    grid-template-columns: minmax(12rem, auto) minmax(0, 1fr);
    margin: 0 0 var(--runtime-space-4);
    padding: var(--runtime-space-3);
}

.runtime-configured-filter-summary__heading {
    align-items: center;
    display: flex;
    gap: var(--runtime-space-2);
    min-width: 0;
}

.runtime-configured-filter-summary__icon {
    align-items: center;
    background: color-mix(in srgb, var(--runtime-accent) 12%, var(--runtime-surface));
    border-radius: 999px;
    color: var(--runtime-accent-dark);
    display: inline-flex;
    flex: 0 0 2rem;
    height: 2rem;
    justify-content: center;
}

.runtime-configured-filter-summary__heading h3 {
    color: var(--runtime-heading);
    font-size: 1rem;
    margin: 0;
}

.runtime-configured-filter-summary__heading p {
    color: var(--runtime-muted);
    font-size: .8125rem;
    margin: .1rem 0 0;
}

.runtime-configured-filter-summary__groups {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--runtime-space-2);
    min-width: 0;
}

.runtime-configured-filter-summary__group {
    align-items: center;
    background: var(--runtime-surface);
    border: 1px solid var(--runtime-border);
    border-radius: var(--runtime-radius);
    display: flex;
    gap: var(--runtime-space-2);
    min-width: 0;
    padding: var(--runtime-space-2) var(--runtime-space-3);
}

.runtime-configured-filter-summary__mode,
.runtime-configured-filter-summary__connector {
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}

.runtime-configured-filter-summary__mode {
    background: var(--runtime-accent-soft);
    color: var(--runtime-accent-dark);
    padding: .2rem .45rem;
}

.runtime-configured-filter-summary__connector {
    background: var(--runtime-heading);
    color: #fff;
    padding: .25rem .5rem;
}

.runtime-configured-filter-summary__conditions {
    display: flex;
    flex-wrap: wrap;
    font-size: .875rem;
    font-weight: 600;
    gap: var(--runtime-space-2);
    list-style: none;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.runtime-configured-filter-summary__conditions li + li::before {
    color: var(--runtime-muted);
    content: "\2022";
    margin-inline-end: var(--runtime-space-2);
}

.runtime-condition-group-settings {
    background: var(--runtime-surface-muted);
    border: 1px solid var(--runtime-border);
    border-radius: .35rem;
    margin: 0 0 1.25rem;
    padding: .8rem;
}

.runtime-condition-group-settings legend {
    color: var(--runtime-heading);
    font-size: 1rem;
    font-weight: 700;
    padding-inline: .25rem;
}

.runtime-condition-group-settings__grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.runtime-condition-group-settings .nhsuk-form-group {
    margin-bottom: 0;
}

@media (max-width: 48.0525rem) {
    .runtime-admin-step__heading {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-admin-step__heading-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-admin-step__heading-actions .nhsuk-button {
        width: 100%;
    }

    .runtime-condition-group-overview {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-condition-group-overview__connector {
        align-self: center;
    }

    .runtime-configured-filter-summary {
        align-items: stretch;
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-configured-filter-summary__groups {
        align-items: stretch;
        flex-direction: column;
    }

    .runtime-configured-filter-summary__group {
        align-items: flex-start;
        flex-direction: column;
    }

    .runtime-configured-filter-summary__connector {
        align-self: center;
    }

    .runtime-rule-summary-card {
        align-items: stretch;
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-rule-summary-card__content {
        align-items: start;
        grid-template-columns: minmax(0, 1fr);
    }

    .runtime-rule-summary-card__name strong,
    .runtime-rule-summary-card__name span,
    .runtime-rule-summary-card__settings li {
        white-space: normal;
    }

    .runtime-rule-summary-card__actions {
        justify-content: flex-end;
    }
}

/* Cards and panels use flat geometry throughout Runtime. Keep pills, badges,
   avatars and icon controls out of this surface contract so their shape still
   communicates their distinct interaction or status purpose. */
.runtime-shell :is(
    .nhsuk-card,
    .nhsuk-panel,
    .runtime-recent-records__panel,
    .runtime-compact-record-surface,
    .runtime-home-destinations,
    .runtime-home-recent,
    .runtime-home-empty,
    .runtime-home-destination,
    .runtime-profile-card,
    .runtime-toolbar-actions__panel,
    .runtime-details-section,
    .runtime-canonical-history,
    .runtime-user-lifecycle,
    .runtime-admin-workspace__header,
    .runtime-admin-empty,
    .runtime-admin-panel,
    .runtime-permission-role-card,
    .runtime-permission-expander,
    .runtime-permission-expander__panel,
    .runtime-admin-plan-card,
    .runtime-admin-actions__panel,
    .runtime-card-designer,
    .runtime-card-designer__canvas,
    .runtime-card-designer__field,
    .runtime-layout-preview__card,
    .runtime-layout-preview__lane-card,
    .runtime-form-editor-card,
    .runtime-form-editor-card__nested,
    .runtime-form-create-journey__panel,
    .tabCardGroup .runtime-record-tab-card,
    .runtime-record-tabs__more-panel,
    .runtime-history-panel,
    .runtime-history-filters__options--panel,
    .runtime-record-actions__panel,
    .runtime-record-card,
    .runtime-record-card__field,
    .runtime-record-kanban__card,
    .runtime-form-record-selector__record-card,
    .runtime-icon-picker__panel,
    .runtime-rule-summary-card,
    .runtime-condition-group-overview__group,
    .runtime-condition-group-settings) {
    border-radius: var(--runtime-surface-radius);
}

.runtime-shell .runtime-toolbar-actions[data-collapsed="true"]
    .runtime-toolbar-actions__panel,
.runtime-shell .runtime-record-actions[data-has-overflow="true"]
    .runtime-record-actions__panel {
    border-radius: var(--runtime-surface-radius);
}

/* Hybrid disclosures retain table semantics and share the existing card grid. */
.runtime-record-expansion-column { width: 2.75rem; }
.runtime-record-expansion-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: var(--runtime-radius);
    background: transparent;
    color: var(--runtime-accent);
    cursor: pointer;
}
.runtime-record-expansion-toggle:focus-visible {
    outline: .2rem solid var(--runtime-focus);
    outline-offset: .15rem;
}
.runtime-record-expansion-toggle i { transition: transform 180ms ease; }
.runtime-record-expansion-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.runtime-record-table--hybrid .runtime-record-expansion-row > td {
    padding: 0;
    border: 0;
    max-width: 0;
    white-space: normal;
}
.runtime-record-expansion {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 180ms ease, visibility 180ms;
}
.runtime-record-expansion[data-expanded="true"] {
    grid-template-rows: 1fr;
    visibility: visible;
}
.runtime-record-expansion__clip { min-height: 0; overflow: hidden; }
.runtime-record-expansion__content { padding: var(--runtime-space-3); cursor: pointer; }
.runtime-record-expansion .runtime-record-cards { margin: 0; }
.runtime-record-expansion .runtime-record-card:hover { transform: none; }
.runtime-record-expansion__content:has(> .runtime-record-link:focus-visible) {
    outline: .2rem solid var(--runtime-focus);
    outline-offset: -.2rem;
}
@media (max-width: 64rem) {
    .runtime-record-table--hybrid .runtime-record-expansion-row,
    .runtime-record-table--hybrid .runtime-record-expansion-row > td {
        display: block;
        width: 100%;
        max-width: none;
    }
    .runtime-record-table--hybrid .nhsuk-table__body .nhsuk-table__row { margin-bottom: 0; }
    .runtime-record-expansion[data-expanded="true"] { margin-bottom: var(--runtime-space-4); }
}
@media (prefers-reduced-motion: reduce) {
    .runtime-record-expansion, .runtime-record-expansion-toggle i { transition: none; }
}
@media (min-width: 64.0625rem) {
    /* Collapsed detail rows must not split a contiguous selected table range. */
    [data-runtime-record-selection-root] .runtime-record-table--hybrid
    .runtime-record-table__row.runtime-record--selected + .runtime-record-expansion-row[aria-hidden="true"] + .runtime-record-table__row.runtime-record--selected {
        --runtime-selection-top: 0px;
    }
    [data-runtime-record-selection-root] .runtime-record-table--hybrid
    .runtime-record-table__row.runtime-record--selected:has(+ .runtime-record-expansion-row[aria-hidden="true"] + .runtime-record-table__row.runtime-record--selected) {
        --runtime-selection-bottom: 0px;
    }
}
