/* ==========================================================================
   Hugsa Workplace Faroese — learner design system
   --------------------------------------------------------------------------
   A thin token layer over Bootstrap 5.3. Everything the learner sees is
   themed from here, so the home and exercise screens read as one warm,
   welcoming product instead of a Bootstrap default. Palette is drawn from
   the islands: sea, turf, lamplight, wool and weathered timber.
   ========================================================================== */

:root {
    /* Brand palette */
    --hugsa-ink: #14293b;
    --hugsa-ink-soft: #4d6377;
    --hugsa-ink-faint: #7d8fa0;

    --hugsa-sea: #1f7a8c;
    --hugsa-sea-deep: #145a68;
    --hugsa-sea-soft: #dceef1;

    --hugsa-amber: #d1782a;
    --hugsa-amber-deep: #a05716;
    --hugsa-amber-soft: #fbe8d4;

    --hugsa-moss: #4f8250;
    --hugsa-moss-deep: #3a6339;
    --hugsa-moss-soft: #e1efdf;

    --hugsa-rose: #a8506f;
    --hugsa-rose-deep: #813a55;
    --hugsa-rose-soft: #f8e4eb;

    --hugsa-cream: #fdf8f1;
    --hugsa-cream-deep: #f3e9da;
    --hugsa-surface: #ffffff;
    --hugsa-line: #e9dfd1;
    --hugsa-line-strong: #d5c6b2;

    /* Accent rotation — the four learning paths each take one. */
    --hugsa-accent: var(--hugsa-sea);
    --hugsa-accent-deep: var(--hugsa-sea-deep);
    --hugsa-accent-soft: var(--hugsa-sea-soft);

    /* Type */
    --hugsa-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --hugsa-font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --hugsa-step--1: 0.8125rem;
    --hugsa-step-0: 1rem;
    --hugsa-step-1: 1.125rem;
    --hugsa-step-2: 1.375rem;
    --hugsa-step-3: 1.75rem;
    --hugsa-step-4: 2.125rem;
    --hugsa-step-5: clamp(2rem, 5vw, 2.75rem);

    /* Shape, depth and layout */
    --hugsa-radius-sm: 0.625rem;
    --hugsa-radius: 1rem;
    --hugsa-radius-lg: 1.5rem;
    --hugsa-radius-pill: 999px;
    --hugsa-shadow-1: 0 1px 2px rgba(20, 41, 59, .06), 0 2px 8px rgba(20, 41, 59, .05);
    --hugsa-shadow-2: 0 2px 6px rgba(20, 41, 59, .07), 0 12px 28px rgba(20, 41, 59, .09);
    --hugsa-shadow-3: 0 4px 12px rgba(20, 41, 59, .09), 0 24px 48px rgba(20, 41, 59, .13);
    --hugsa-ring: 0 0 0 3px rgba(31, 122, 140, .3);

    --hugsa-measure: 46rem;
    --hugsa-page: 68rem;

    /* Bootstrap bridge */
    --bs-primary: var(--hugsa-sea);
    --bs-primary-rgb: 31, 122, 140;
    --bs-body-bg: var(--hugsa-cream);
    --bs-body-color: var(--hugsa-ink);
    --bs-body-font-family: var(--hugsa-font);
    --bs-secondary-color: var(--hugsa-ink-soft);
    --bs-secondary-bg: var(--hugsa-cream-deep);
    --bs-tertiary-bg: var(--hugsa-cream-deep);
    --bs-border-color: var(--hugsa-line);
    --bs-border-radius: var(--hugsa-radius-sm);
    --bs-border-radius-lg: var(--hugsa-radius);
    --bs-border-radius-xl: var(--hugsa-radius-lg);
    --bs-link-color: var(--hugsa-sea-deep);
    --bs-link-color-rgb: 20, 90, 104;
    --bs-link-hover-color: var(--hugsa-ink);
    --bs-link-hover-color-rgb: 20, 41, 59;
    --bs-focus-ring-color: rgba(31, 122, 140, .3);
}

/* Accent rotation for the four learning paths. The order mirrors the order
   the paths are declared in content, so no content change is needed. */
.hugsa-accent-0 {
    --hugsa-accent: var(--hugsa-sea);
    --hugsa-accent-deep: var(--hugsa-sea-deep);
    --hugsa-accent-soft: var(--hugsa-sea-soft);
}

.hugsa-accent-1 {
    --hugsa-accent: var(--hugsa-amber);
    --hugsa-accent-deep: var(--hugsa-amber-deep);
    --hugsa-accent-soft: var(--hugsa-amber-soft);
}

.hugsa-accent-2 {
    --hugsa-accent: var(--hugsa-moss);
    --hugsa-accent-deep: var(--hugsa-moss-deep);
    --hugsa-accent-soft: var(--hugsa-moss-soft);
}

.hugsa-accent-3 {
    --hugsa-accent: var(--hugsa-rose);
    --hugsa-accent-deep: var(--hugsa-rose-deep);
    --hugsa-accent-soft: var(--hugsa-rose-soft);
}

body {
    background-color: var(--hugsa-cream);
    color: var(--hugsa-ink);
    font-family: var(--hugsa-font);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* A fixed wash of sea light and lamplight behind everything. Painted on a
   pseudo-element so mobile browsers do not have to repaint it while scrolling. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(1100px 560px at 10% -10%, rgba(31, 122, 140, .11), transparent 62%),
        radial-gradient(880px 480px at 94% 2%, rgba(209, 120, 42, .13), transparent 60%);
    background-repeat: no-repeat;
}

h1, h2, .hugsa-display {
    font-family: var(--hugsa-font-display);
    letter-spacing: -0.01em;
}

h1:focus {
    outline: none;
}

.hugsa-page {
    width: 100%;
    max-width: var(--hugsa-page);
    margin-inline: auto;
}

.hugsa-measure {
    max-width: var(--hugsa-measure);
}

.hugsa-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hugsa-ink-faint);
    margin-bottom: 0.5rem;
}

.hugsa-surface {
    background: var(--hugsa-surface);
    border: 1px solid var(--hugsa-line);
    border-radius: var(--hugsa-radius-lg);
    box-shadow: var(--hugsa-shadow-1);
}

/* Buttons ---------------------------------------------------------------- */

.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-padding-y: 0.625rem;
    --bs-btn-padding-x: 1.25rem;
    --bs-btn-border-radius: var(--hugsa-radius-sm);
    --bs-btn-focus-shadow-rgb: 31, 122, 140;
}

.btn:focus-visible {
    box-shadow: var(--hugsa-ring);
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--hugsa-sea);
    --bs-btn-border-color: var(--hugsa-sea);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--hugsa-sea-deep);
    --bs-btn-hover-border-color: var(--hugsa-sea-deep);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--hugsa-sea-deep);
    --bs-btn-active-border-color: var(--hugsa-sea-deep);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--hugsa-sea);
    --bs-btn-disabled-border-color: var(--hugsa-sea);
    box-shadow: 0 1px 2px rgba(20, 41, 59, .14);
}

.btn-outline-primary {
    --bs-btn-color: var(--hugsa-sea-deep);
    --bs-btn-border-color: var(--hugsa-line-strong);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--hugsa-sea);
    --bs-btn-hover-border-color: var(--hugsa-sea);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--hugsa-sea-deep);
    --bs-btn-active-border-color: var(--hugsa-sea-deep);
    --bs-btn-disabled-color: var(--hugsa-ink-faint);
    --bs-btn-disabled-border-color: var(--hugsa-line);
}

/* Forms ------------------------------------------------------------------ */

.form-label {
    font-weight: 600;
    color: var(--hugsa-ink);
    margin-bottom: 0.375rem;
}

.form-control,
.form-select {
    background-color: var(--hugsa-surface);
    border-color: var(--hugsa-line-strong);
    border-radius: var(--hugsa-radius-sm);
    padding: 0.7rem 0.9rem;
    color: var(--hugsa-ink);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--hugsa-surface);
    border-color: var(--hugsa-sea);
    box-shadow: var(--hugsa-ring);
}

.form-text {
    color: var(--hugsa-ink-soft);
}

/* Surfaces --------------------------------------------------------------- */

.card {
    --bs-card-bg: var(--hugsa-surface);
    --bs-card-border-color: var(--hugsa-line);
    --bs-card-border-radius: var(--hugsa-radius-lg);
    --bs-card-cap-bg: transparent;
    --bs-card-inner-border-radius: calc(var(--hugsa-radius-lg) - 1px);
    box-shadow: var(--hugsa-shadow-1);
}

.progress {
    --bs-progress-height: 0.75rem;
    --bs-progress-bg: var(--hugsa-cream-deep);
    --bs-progress-bar-bg: var(--hugsa-sea);
    --bs-progress-border-radius: var(--hugsa-radius-pill);
    overflow: hidden;
}

.progress-bar {
    border-radius: var(--hugsa-radius-pill);
    transition: width .4s ease;
}

.alert {
    border-radius: var(--hugsa-radius);
    border-width: 1px;
}

.alert-success {
    --bs-alert-bg: var(--hugsa-moss-soft);
    --bs-alert-color: #33582f;
    --bs-alert-border-color: #c9dfc7;
}

.alert-danger {
    --bs-alert-bg: var(--hugsa-rose-soft);
    --bs-alert-color: #7a3450;
    --bs-alert-border-color: #eccdd9;
}

.badge {
    font-weight: 600;
    letter-spacing: 0.01em;
}

hr {
    border-color: var(--hugsa-line);
    opacity: 1;
}

a {
    text-underline-offset: 0.18em;
}

/* ==========================================================================
   Administration UX layer
   --------------------------------------------------------------------------
   The pieces every /org and /platform page composes from: a page head, a
   workflow strip, next-action rows, linked metrics, disclosures and inline
   confirmations. They are deliberately plain HTML plus tokens, so a page that
   renders statically behaves exactly like one on a circuit.
   ========================================================================== */

.ux-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ux-page-head__text {
    min-width: 0;
    flex: 1 1 22rem;
}

.ux-page-head__title {
    font-family: var(--hugsa-font-display);
    font-size: var(--hugsa-step-3);
    line-height: 1.15;
    margin-bottom: 0.35rem;
}

.ux-page-head__lede {
    color: var(--hugsa-ink-soft);
    margin-bottom: 0;
    max-width: 44rem;
}

.ux-page-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Workflow strip: where this page sits in skriva → týða → eftirkanna → geva út. */

.ux-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.ux-step {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem 0.4rem 0.45rem;
    border: 1px solid var(--hugsa-line);
    border-radius: var(--hugsa-radius-pill);
    background: var(--hugsa-surface);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hugsa-ink-soft);
    text-decoration: none;
}

a.ux-step:hover,
a.ux-step:focus-visible {
    border-color: var(--hugsa-sea);
    color: var(--hugsa-sea-deep);
}

.ux-step__num {
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--hugsa-cream-deep);
    color: var(--hugsa-ink-soft);
    font-size: 0.75rem;
    font-weight: 700;
}

.ux-step--current {
    border-color: var(--hugsa-sea);
    background: var(--hugsa-sea-soft);
    color: var(--hugsa-sea-deep);
}

.ux-step--current .ux-step__num {
    background: var(--hugsa-sea);
    color: #fff;
}

.ux-step--done .ux-step__num {
    background: var(--hugsa-moss-soft);
    color: var(--hugsa-moss-deep);
}

/* Next actions: the one thing the page wants a person to do, then the rest. */

.ux-actions {
    display: grid;
    gap: 0.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ux-action {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--hugsa-line);
    border-radius: var(--hugsa-radius);
    background: var(--hugsa-surface);
    color: var(--hugsa-ink);
    text-decoration: none;
    box-shadow: var(--hugsa-shadow-1);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ux-action:hover,
.ux-action:focus-visible {
    border-color: var(--hugsa-sea);
    box-shadow: var(--hugsa-shadow-2);
    color: var(--hugsa-ink);
    transform: translateY(-1px);
}

.ux-action__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.8rem;
    background: var(--hugsa-sea-soft);
    color: var(--hugsa-sea-deep);
    font-weight: 700;
}

.ux-action--warn .ux-action__icon {
    background: var(--hugsa-amber-soft);
    color: var(--hugsa-amber-deep);
}

.ux-action--calm .ux-action__icon {
    background: var(--hugsa-moss-soft);
    color: var(--hugsa-moss-deep);
}

.ux-action__body {
    flex: 1 1 auto;
    min-width: 0;
}

.ux-action__title {
    display: block;
    font-weight: 700;
    line-height: 1.3;
}

.ux-action__desc {
    display: block;
    font-size: 0.8125rem;
    color: var(--hugsa-ink-soft);
    line-height: 1.4;
}

.ux-action__go {
    flex: none;
    color: var(--hugsa-ink-faint);
    font-weight: 700;
}

/* A pending item is not a control: somebody else owes this one. It reads as a
   status, so it does not lift under the pointer and it carries a chip where a
   destination would put its arrow. */

.ux-action--pending,
.ux-action--pending:hover {
    border-style: dashed;
    background: var(--hugsa-cream);
    box-shadow: none;
    transform: none;
    cursor: default;
}

.ux-action__state {
    flex: none;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--hugsa-line-strong);
    border-radius: var(--hugsa-radius-pill);
    background: var(--hugsa-surface);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hugsa-ink-soft);
    white-space: nowrap;
}

/* Metrics are destinations, not decoration — but a tile that has nowhere to go
   must not pretend otherwise by lighting up under the pointer. */

.ux-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.6rem;
}

.ux-metric {
    display: block;
    padding: 0.9rem 1rem;
    border: 1px solid var(--hugsa-line);
    border-radius: var(--hugsa-radius);
    background: var(--hugsa-surface);
    color: var(--hugsa-ink);
    text-decoration: none;
}

a.ux-metric:hover,
a.ux-metric:focus-visible {
    border-color: var(--hugsa-sea);
    color: var(--hugsa-sea-deep);
}

.ux-metric__value {
    display: block;
    font-family: var(--hugsa-font-display);
    font-size: 1.6rem;
    line-height: 1.1;
}

/* A denominator or a date inside the value slot: same slot, quieter type. */
.ux-metric__of {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--hugsa-ink-soft);
}

.ux-metric__value--text {
    font-size: 0.95rem;
    padding-top: 0.45rem;
}

.ux-metric__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hugsa-ink-faint);
}

.ux-metric__hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--hugsa-ink-soft);
}

/* Panels and section headings. */

.ux-panel {
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--hugsa-line);
    border-radius: var(--hugsa-radius-lg);
    background: var(--hugsa-surface);
    box-shadow: var(--hugsa-shadow-1);
}

.ux-panel--quiet {
    background: var(--hugsa-cream);
    box-shadow: none;
}

.ux-panel__title {
    font-family: var(--hugsa-font-display);
    font-size: var(--hugsa-step-1);
    margin-bottom: 0.25rem;
}

.ux-panel__hint {
    font-size: 0.8125rem;
    color: var(--hugsa-ink-soft);
    margin-bottom: 1rem;
}

.ux-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hugsa-ink-faint);
    margin-bottom: 0.6rem;
}

/* Disclosure. Native <details>, so it works without a circuit. */

.ux-disclosure {
    border: 1px solid var(--hugsa-line);
    border-radius: var(--hugsa-radius);
    background: var(--hugsa-surface);
}

.ux-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--hugsa-ink);
    list-style: none;
}

.ux-disclosure > summary::-webkit-details-marker {
    display: none;
}

.ux-disclosure > summary::after {
    content: "+";
    font-size: 1.1rem;
    line-height: 1;
    color: var(--hugsa-ink-faint);
}

.ux-disclosure[open] > summary::after {
    content: "–";
}

.ux-disclosure[open] > summary {
    border-bottom: 1px solid var(--hugsa-line);
}

.ux-disclosure__body {
    padding: 1rem;
}

.ux-disclosure--plain {
    border: 0;
    background: transparent;
}

.ux-disclosure--plain > summary {
    padding-inline: 0;
}

/* Tabs held in the query string. */

.ux-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
    border-bottom: 1px solid var(--hugsa-line);
    margin-bottom: 1.25rem;
}

.ux-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.85rem;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--hugsa-ink-soft);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.ux-tab:hover,
.ux-tab:focus-visible {
    color: var(--hugsa-sea-deep);
}

.ux-tab--active {
    border-bottom-color: var(--hugsa-sea);
    color: var(--hugsa-sea-deep);
}

.ux-tab__count {
    display: inline-block;
    min-width: 1.4rem;
    padding: 0.05rem 0.4rem;
    border-radius: var(--hugsa-radius-pill);
    background: var(--hugsa-cream-deep);
    color: var(--hugsa-ink-soft);
    font-size: 0.6875rem;
    text-align: center;
}

.ux-tab--active .ux-tab__count {
    background: var(--hugsa-sea-soft);
    color: var(--hugsa-sea-deep);
}

/* Empty states and inline notes. */

.ux-empty {
    padding: 1.5rem 1rem;
    border: 1px dashed var(--hugsa-line-strong);
    border-radius: var(--hugsa-radius);
    background: var(--hugsa-cream);
    color: var(--hugsa-ink-soft);
    text-align: center;
}

.ux-empty__title {
    display: block;
    font-weight: 700;
    color: var(--hugsa-ink);
}

.ux-note {
    font-size: 0.8125rem;
    color: var(--hugsa-ink-soft);
}

/* Confirmation strip. Inline rather than modal: no focus trap, and it survives
   a static render. */

.ux-confirm {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid #eccdd9;
    border-radius: var(--hugsa-radius-sm);
    background: var(--hugsa-rose-soft);
    color: var(--hugsa-rose-deep);
    font-size: 0.8125rem;
}

.ux-confirm__text {
    flex: 1 1 14rem;
}

.ux-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/* A row menu for the secondary actions of a table row or list item. */

.ux-row-menu {
    position: relative;
}

.ux-row-menu > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--hugsa-line-strong);
    border-radius: var(--hugsa-radius-pill);
    background: var(--hugsa-surface);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hugsa-ink-soft);
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.ux-row-menu > summary::-webkit-details-marker {
    display: none;
}

.ux-row-menu[open] > summary,
.ux-row-menu > summary:hover {
    border-color: var(--hugsa-sea);
    color: var(--hugsa-sea-deep);
}

.ux-row-menu__body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-top: 0.4rem;
}

@media (max-width: 767.98px) {
    /* A disclosure is a tap target on a phone, not a line of text. Padding keeps the
       native marker (display: flex would drop it) while growing the hit area. */
    .ux-disclosure > summary,
    .ux-row-menu > summary {
        padding-block: 0.5rem;
    }

    /* A 16px checkbox is a fiddly target next to a 17px label. Growing the box is
       the one change that helps without restyling the label. */
    .form-check-input {
        inline-size: 1.25rem;
        block-size: 1.25rem;
    }

    .form-check-input.mt-0 {
        margin-block-start: 0.1rem !important;
    }

    /* A pending item's chip drops under its text rather than squeezing the text
       into a column beside it. */
    .ux-action--pending {
        flex-wrap: wrap;
    }

    .ux-action__state {
        margin-inline-start: 3.3rem;
    }

    /* Tables become cards. A seven-column learner row cannot be read on a phone,
       and a sideways scroll hides the very controls the row exists for, so below
       768px each row is its own block and each cell names itself from its
       data-label. One markup, so the two layouts cannot drift apart; the table
       semantics stay for screen readers on wide screens and the cells keep their
       text on narrow ones. */
    .ux-table--stack,
    .ux-table--stack tbody,
    .ux-table--stack tr,
    .ux-table--stack td {
        display: block;
        width: 100%;
    }

    .ux-table--stack thead {
        display: none;
    }

    .ux-table--stack tr {
        margin-bottom: 0.6rem;
        padding: 0.7rem 0.85rem;
        border: 1px solid var(--hugsa-line);
        border-radius: var(--hugsa-radius);
        background: var(--hugsa-surface);
    }

    .ux-table--stack td {
        padding: 0.3rem 0;
        border: 0;
        text-align: start;
    }

    .ux-table--stack td[data-label] {
        display: grid;
        grid-template-columns: 7.5rem minmax(0, 1fr);
        align-items: center;
        gap: 0.5rem;
    }

    .ux-table--stack td[data-label]::before {
        content: attr(data-label);
        font-size: 0.6875rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--hugsa-ink-faint);
    }

    /* A column hidden to save width in a table is worth showing again once the row
       is a card: the card has the height for it. Bootstrap's .d-none is
       `!important`, so this rule has to be too — specificity cannot beat it. */
    .ux-table--stack td.d-lg-table-cell {
        display: grid !important;
    }

    /* The first cell is the card's title, and the last is its actions; neither
       needs a label of its own. A log row labels every cell instead, and then the
       timestamp is just the first field rather than a heading. */
    .ux-table--stack td:first-child:not([data-label]) {
        margin-bottom: 0.4rem;
        font-size: 1.0625rem;
        font-weight: 700;
        line-height: 1.25;
    }

    .ux-table--stack td.text-end {
        margin-top: 0.4rem;
        text-align: start;
    }

    .ux-table--stack td.text-end > .d-flex {
        justify-content: flex-start !important;
    }

    /* The confirmation row spans every column, so it is a card of its own rather
       than a cell inside the row above it. */
    .ux-table--stack td[colspan] {
        padding: 0;
    }
}

@media (max-width: 575.98px) {
    .ux-page-head__title {
        font-size: var(--hugsa-step-2);
    }

    .ux-page-head__actions {
        width: 100%;
    }

    .ux-page-head__actions .btn {
        flex: 1 1 auto;
    }

    .ux-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------------------ */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}