body {
    color: #121212;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 400;
}

/* Links */

main a {
    color: rgb(60, 44, 89);
    text-decoration: none;
}

main a:hover {
    color: rgba(60, 44, 89, .6);
    text-decoration: underline;
}

/* Typography */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #E4251B;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.2;
}

h1,
h2 {
    font-weight: 700;
    letter-spacing: -.015em;
}

h1 {
    font-size: clamp(2.25rem, 3vw, 3rem);
    line-height: 1.125;
}

h2 {
    font-size: clamp(1.875rem, 2.25vw, 2.25rem);
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
}

h4,
h5,
h6 {
    font-weight: 500;
}

p,
li,
label,
input,
select,
textarea,
button {
    line-height: 1.333333;
}

/* Environment banners */

#uat {
    color: #fff;
    background-color: #ffc107;
}

#dev {
    color: #fff;
    background-color: #E4251B;
}

/* Primary application colour */

.btn-primary {
    color: #fff;
    background-color: rgb(60, 44, 89);
    border-color: rgb(60, 44, 89);
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
    color: #fff;
    background-color: rgb(67, 60, 99);
    border-color: rgb(60, 44, 89);
}

.list-group-item.active {
    color: #fff;
    background-color: rgb(60, 44, 89);
    border-color: rgb(60, 44, 89);
}

li .page-link,
li .page-link:hover {
    color: rgb(60, 44, 89);
}

.page-item.active .page-link {
    color: #fff;
    background-color: rgb(60, 44, 89);
    border-color: rgb(60, 44, 89);
}

/* Top navigation */

.merlin-nav {
    background-color: #121212;
    font-size: .875rem;
}

.merlin-nav .nav-link,
.merlin-nav .dropdown-toggle {
    color: #fff;
    font-weight: 400;
}

.merlin-nav .nav-link:hover,
.merlin-nav .nav-link:focus {
    color: #fff;
    text-decoration: underline;
}

.merlin-brand-bar {
    background-color: #fff;
}

/* Page masthead */

.page-masthead {
    color: #fff;
    background-color: #E4251B;
}

.page-masthead-accent {
    height: 7px;
    background-color: #E4251B;
}

.page-title {
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(2.25rem, 2.75vw, 2.75rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em;
}

.page-title i {
    font-size: .9em;
}

.page-user {
    color: #fff;
}

/* Page content */

.page-subtitle {
    color: #121212;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -.01em;
}

.page-content h2 {
    color: #121212;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.page-content h3 {
    color: #121212;
    font-size: 1.25rem;
    font-weight: 600;
}

.page-content :is(h4, h5, h6) {
    color: #121212;
    font-size: 1.125rem;
    font-weight: 500;
}

.sidebar :is(h1, h2, h3, h4, h5, h6) {
    color: rgb(60, 44, 89);
}

/* Cards */

.card {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

.card .card-body h5.card-title {
    color: rgb(60, 44, 89);
}

.card-form {
    border-color: rgb(60, 44, 89);
}

.subject-header-card {
    color: rgb(60, 44, 89);
    border-top: 4px solid rgb(60, 44, 89) !important;
}

.dashboard-cards > [class*="col"] > .card {
    border: 0;
}

.dashboard-cards .card-header {
    color: rgb(60, 44, 89);
    background: transparent;
    border-bottom: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

.card-form-header {
    color: #fff;
    background-color: rgb(60, 44, 89);
}

/* Form sections */

.form-section-card {
    border-top: 4px solid #E4251B !important;
}

.form-section-heading {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(228, 37, 27, .18);
    background: rgba(228, 37, 27, .035);
    color: #E4251B;
}

.form-section-heading :is(h1, h2, h3, h4, h5, h6) {
    margin: 0;
    padding: 0;
    color: inherit;
}

.page-content .form-section-heading h2 {
    margin: 0;
    padding: 0;
    color: #E4251B;
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
}

/* Form controls */

input[type="range"]::-webkit-slider-thumb {
    background-color: rgb(60, 44, 89);
}

input[type="range"]::-moz-range-thumb {
    background-color: rgb(60, 44, 89);
}

/* Ignored validation */

input.is-invalid.ignore {
    color: #333333;
    border-color: #333333;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23333333'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23333333' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size:
            calc(.75em + .375rem)
            calc(.75em + .375rem);
}

select.is-invalid.ignore {
    --select-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    --select-error: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23333333'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23333333' stroke='none'/%3e%3c/svg%3e");

    color: #333333;
    border-color: #333333;
    background-image: var(--select-icon), var(--select-error, none);
    background-position:
            right .75rem center,
            center right 2.25rem;
    background-size:
            16px 12px,
            calc(.75em + .375rem) calc(.75em + .375rem);
}

.is-invalid:focus.ignore {
    border-color: #333333;
    box-shadow: 0 0 0 .25rem #CCCCCC;
}

input.is-invalid.ignore + .invalid-feedback {
    color: #333333;
}

/* Redaction */

.redacted {
    color: #fff;
    background-color: #333333;
    border: 2px solid #333333;
}

/* Miscellaneous */

.icon-square {
    width: 3rem;
    height: 3rem;
    border-radius: .75rem;
}

.nav-item .icon {
    width: 18px;
}

#features .icon {
    width: 50%;
    height: 50%;
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Footer */

.merlin-footer-intro {
    color: #121212;
    background-color: #f2f2f2;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 300;
}

.merlin-footer-intro p {
    font-weight: 300;
}

.merlin-footer-title {
    color: #121212;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.2;
}

.merlin-footer-main {
    color: #fff;
    background-color: #121212;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 300;
}

.merlin-footer-heading {
    color: #fff;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.2;
}

.merlin-footer-main li,
.merlin-footer-main p,
.merlin-footer-main a {
    color: #fff;
    font-weight: 300;
}

.merlin-footer-main a {
    text-decoration: none;
}

.merlin-footer-main a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-logos {
    min-height: 100px;
}

.footer-cardiff-logo {
    width: auto;
    height: 100px;
    object-fit: contain;
}

.footer-sponsors {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.footer-sponsors img {
    width: auto !important;
    height: 100px !important;
    object-fit: contain;
}

.merlin-footer-main hr {
    border-color: rgba(255, 255, 255, .35);
    opacity: 1;
}

.merlin-footer-copyright {
    font-size: .875rem;
    font-weight: 300;
}

.merlin-container {
    padding-inline: 8rem;
}

@media (max-width: 991.98px) {
    .merlin-container {
        padding-inline: 3rem;
    }
}

@media (max-width: 767.98px) {
    .merlin-container {
        padding-inline: 1.5rem;
    }
}

/* Dashboard / application workspaces */

.dashboard-workspace {
    max-width: 76rem;
    margin-inline: auto;
}

/* Primary search */

.dashboard-search {
    margin-bottom: 4rem;
}

.dashboard-search-title {
    margin: 0 0 1rem;
    color: rgb(60, 44, 89) !important;
    font-size: 1.5rem !important;
    font-weight: 500 !important;
}

.dashboard-search .form-control {
    min-height: 3.75rem;
    padding-inline: 1.25rem;
    font-size: 1.125rem;
}

.dashboard-search .input-group {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

/* Dashboard section headings */

.dashboard-section {
    display: flex;
    width: 100%;
    margin-bottom: 3.5rem;
    flex-direction: column;
}

.dashboard-section-title {
    margin: 0 0 1.5rem;
    color: #121212 !important;
    font-size: 1.5rem !important;
    font-weight: 500 !important;
    line-height: 1.25;
}

/* Individual dashboard actions */

.dashboard-action {
    height: 100%;
    padding: 1.5rem;
    border: 1px solid #dddddd;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

.dashboard-action-title {
    margin: 0 0 1rem;
    padding: 0 !important;
    color: rgb(60, 44, 89) !important;
    font-size: 1.25rem !important;
    font-weight: 500 !important;
    line-height: 1.3;
}

.dashboard-action-title i {
    margin-right: .4rem;
}

.dashboard-action p {
    color: #333333;
    font-size: 1rem;
    line-height: 1.45;
}

.dashboard-action-link {
    display: flex;
    min-height: 9rem;
    flex-direction: column;
    justify-content: space-between;
    color: rgb(60, 44, 89);
}

.dashboard-action-link:hover {
    color: rgb(60, 44, 89);
    text-decoration: none;
    border-color: rgba(60, 44, 89, .5);
    box-shadow: 0 .2rem .4rem rgba(0, 0, 0, .1);
}

.dashboard-action-link .dashboard-action-arrow {
    align-self: flex-end;
    color: #777777;
}

.dashboard-action .form-label {
    color: #121212;
    font-weight: 500;
}

.dashboard-action form {
    display: block !important;
    height: auto !important;
}

.dashboard-action .btn {
    width: auto !important;
    height: auto !important;
}

/* Equal dashboard/report/export boxes */

.dashboard-workspace .row > .col {
    display: flex;
}

.dashboard-workspace .row > .col > .dashboard-action,
.dashboard-workspace .row > .col > .dashboard-section {
    width: 100%;
}

.dashboard-section > .dashboard-action {
    flex: 1 1 auto;
}

/* Reports */

.dashboard-report-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.dashboard-report-link:first-of-type {
    border-top: 1px solid #e5e5e5;
}

.dashboard-report-link:hover {
    text-decoration: none;
}

.dashboard-report-link i:last-child {
    color: #777777;
}

/* Custom report/export lists */

.dashboard-link-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-link-list li {
    padding: .85rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.dashboard-link-list li:first-child {
    border-top: 1px solid #e5e5e5;
}

/* Sidebars */

.sidebar {
    color: #333333;
}

.sidebar > h2 {
    margin-bottom: 1.5rem;
    color: rgb(60, 44, 89);
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.2;
}

.sidebar h3,
.sidebar h4,
.sidebar h5,
.sidebar h6 {
    color: rgb(60, 44, 89);
    font-weight: 400;
}

/* Tools navigation */

.sidebar .list-group {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    border: 0;
    border-radius: 0;
}

.sidebar .list-group-item {
    padding: .9rem .75rem;
    border: 0;
    border-bottom: 1px solid #dddddd;
    border-radius: 0 !important;
    background: transparent;
    color: #333333;
}

.sidebar .list-group-item:first-child {
    border-top: 1px solid #dddddd;
}

.sidebar .list-group-item:hover,
.sidebar .list-group-item:focus {
    background: rgba(60, 44, 89, .035);
    color: rgb(60, 44, 89);
}

.sidebar .list-group-item.active {
    padding-left: .75rem;
    border-left: 4px solid rgb(60, 44, 89);
    background: rgba(60, 44, 89, .06);
    color: rgb(60, 44, 89);
    font-weight: 500;
}

/* Key / informational sidebar cards */

.sidebar .card {
    margin-top: 1.5rem;
    border: 1px solid #dddddd;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

.sidebar .card-body {
    padding: 1.25rem;
}

.sidebar .card-title {
    margin-bottom: 1rem;
    color: rgb(60, 44, 89);
    font-size: 1.25rem;
    font-weight: 400;
}

/* Public landing page */

#features > h2,
#features h3,
#features .fa-solid {
    color: rgb(60, 44, 89) !important;
}

#features > h2 small {
    color: #5f6368 !important;
}

#features + * {
    /* nothing - deliberately not used */
}

.page-content > .row > .col-md-3 h3,
.page-content > .row > .col-md-3 h3 i {
    color: rgb(60, 44, 89) !important;
}

/* Merlin metadata import */

.import-page {
    max-width: 1100px;
}

.import-results__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.import-results__eyebrow {
    margin-bottom: .25rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .8rem;
    color: rgb(60, 44, 89);
    font-weight: 700;
}

.import-upload-details summary,
.import-feedback-group > summary {
    cursor: pointer;
}

.import-upload-details dl {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.25rem 1rem;
}

.import-upload-details dd {
    margin-bottom: 0;
}

.import-results__summary {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    align-items: flex-end;
}

.import-results__summary-line {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.import-feedback-counts {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
    align-items: center;
}

.import-guide {
    border-top: 4px solid rgb(60, 44, 89) !important;
}

.import-guide__summary {
    cursor: pointer;
    margin-bottom: .75rem;
}

.import-guide__summary .import-results__eyebrow {
    display: inline;
}

.import-guide__grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.import-guide__item {
    border-radius: .75rem;
    border: 1px solid #d8dee9;
    padding: .9rem 1rem;
}

.import-guide__item h3 {
    margin-bottom: .4rem;
}

.import-guide__item p {
    margin-bottom: 0;
}

.import-guide__item--error {
    background: #fff5f6;
    border-color: #f2c6cc;
}

.import-guide__item--error h3 {
    color: #b42318;
}

.import-guide__item--warning {
    background: #fff8eb;
    border-color: #f7d7a8;
}

.import-guide__item--warning h3 {
    color: #a15c00;
}

.import-guide__item--info {
    background: #eff6ff;
    border-color: #bfd7ff;
}

.import-guide__item--info h3 {
    color: #175cd3;
}

.import-form__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.import-panel {
    border: 1px solid #eadfe2;
    border-radius: .75rem;
    padding: .9rem 1rem;
    background: #fffafb;
}

.import-panel + .import-panel {
    margin-top: .75rem;
}

.import-panel--error {
    border-color: #f2c6cc;
    background: #fff5f6;
}

.import-panel__title {
    font-weight: 700;
    margin-bottom: .4rem;
}

.import-issue--error {
    color: #b42318;
}

.import-issue--warning {
    color: #a15c00;
}

.import-issue--info {
    color: #175cd3;
}

.import-issue__severity {
    font-weight: 700;
}

.import-issue__message {
    white-space: pre-line;
}

.feedback-controls {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.feedback-controls__filters {
    border: 0;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .import-results__header,
    .import-form__header {
        flex-direction: column;
        align-items: stretch;
    }

    .import-guide__grid {
        grid-template-columns: 1fr;
    }
}

/* Merlin-specific shell details */

.merlin-brand-bar img {
    flex-shrink: 0;
    object-fit: contain;
}

.page-user {
    overflow-wrap: anywhere;
}

.merlin-nav .nav-link.text-secondary {
    color: #fff !important;
    padding: .5rem;
}

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

/* Dashboard quicktools */

.dashboard-quicktools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
}

.dashboard-quicktool {
    display: flex;
    width: 9rem;
    flex-direction: column;
    align-items: center;
    color: rgb(60, 44, 89);
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.25;
}

.dashboard-quicktool:hover,
.dashboard-quicktool:focus {
    color: rgb(60, 44, 89);
    text-decoration: none;
}

.dashboard-quicktool-icon {
    display: flex;
    width: 6rem;
    height: 6rem;
    margin-bottom: .75rem;
    align-items: center;
    justify-content: center;
    background: rgb(60, 44, 89);
    color: #fff;
    font-size: 2rem;
    border-radius: .35rem;
    transition:
            background-color .15s ease-in-out,
            transform .15s ease-in-out;
}

.dashboard-quicktool:hover .dashboard-quicktool-icon,
.dashboard-quicktool:focus .dashboard-quicktool-icon {
    background: rgb(67, 60, 99);
    transform: translateY(-2px);
}

/* Dashboard workload */

.dashboard-workload {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-workload-item {
    display: flex;
    min-height: 8rem;
    padding: 1.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #dddddd;
    border-top: 4px solid rgb(60, 44, 89);
    background: #fff;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
    text-align: center;
}

.dashboard-workload-value {
    display: block;
    margin: 0 0 .6rem;
    color: rgb(60, 44, 89);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.dashboard-workload-label {
    display: block;
    margin: 0;
    color: #121212;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
}

.dashboard-section .badge.text-bg-secondary {
    background-color: rgb(60, 44, 89) !important;
}

/* Responsive */

@media (max-width: 991.98px) {
    .dashboard-workload {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .page-title {
        line-height: 1.15;
    }

    .dashboard-workload {
        grid-template-columns: 1fr;
    }
}

/* Forecast summary: text and icons supplement the status colours. */

.dashboard-slippage-card {
    padding: 1.5rem;
    border: 1px solid;
    border-top-width: 4px;
    border-radius: .75rem;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .04);
}

.dashboard-slippage-icon {
    font-size: 1.75rem;
}

.dashboard-slippage-card--ok {
    color: #14532d;
    background: #f0fdf4;
    border-color: #15803d;
}

.dashboard-slippage-card--warning {
    color: #78350f;
    background: #fffbeb;
    border-color: #b45309;
}

.dashboard-slippage-card--late {
    color: #991b1b;
    background: #fef2f2;
    border-color: #b91c1c;
}

/* Match Outlook to the dashboard's count and label typography. */

.dashboard-slippage-card .dashboard-slippage-value {
    color: inherit;
    font-variant-numeric: tabular-nums;
}

.page-content .dashboard-slippage-label {
    color: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
}

.dashboard-slippage-description {
    font-size: 1rem;
    line-height: 1.45;
}