h1:focus {
    outline: none;
}

/* Catalogue cards.

   Global rather than a SessionCard.razor.css, because Blazor's CSS isolation only stamps its
   scope attribute onto elements in a component's own markup — MudCard is a child component, so
   its rendered root div never receives it and a scoped rule would simply not apply. */

/* Every card in the catalogue is a click target (the whole card navigates, not a button inside
   it), and until now nothing on screen said so. Lift plus shadow on hover is the affordance;
   the cursor alone is a mouse-only hint that says nothing on a tablet. */
.session-card {
    height: 100%;
    cursor: pointer;
    transition: transform 120ms ease-in-out, box-shadow 120ms ease-in-out;
}

.session-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--mud-elevation-8);
}

/* The card is reached by keyboard through the shelf scroller rather than being a tab stop of its
   own, but a focus ring costs nothing and matches the shelf's own treatment. */
.session-card:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

/* Titles run to one or two lines depending on the session, which pushed the objective and the
   chip row to a different height on every card — measured at 260px on a one-line title against
   288px on a two-line one, so a shelf's chip rows stepped up and down as you scanned across it.
   Reserving two lines lines them up; clamping at two stops a long title reintroducing the drift.
   The em fallback assumes MudBlazor's subtitle1 line-height of 1.75; lh supersedes it wherever
   the unit is supported, and is correct whatever the typography does later. */
.session-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.5em;
    min-height: 2lh;
}

/* Clamped to two lines so the card keeps a fixed, scannable height regardless of how long the
   first learning objective happens to be. */
.session-card-objective {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Reserved whether or not there is an objective — see SessionCard.razor. body2's line-height
       is 1.43, hence the em fallback; lh takes over where supported. */
    min-height: 2.86em;
    min-height: 2lh;
}

/* One search result: the card plus the "matched in" line beneath it. .session-card is height: 100%,
   which inside this wrapper made the card fill the whole slot and pushed the caption out below
   it, overlapping whatever came next (the next row, or the newsletter strip after the last one).
   A column flex lets the card take the height that's left after the caption. */
.search-result-slot {
    width: 260px;
    display: flex;
    flex-direction: column;
}

.search-result-slot .session-card {
    height: auto;
    flex: 1 1 auto;
}

/* One card's slot in a horizontal shelf. Fixed width on purpose: shelves are scrolled, not
   wrapped, so cards that sized to their content would give every row a different rhythm. */
.catalogue-card-slot {
    width: 220px;
    flex: 0 0 auto;
}

/* SessionDetail's hero row: the info card and the action sidebar sit side by side and should
   read as one row, not two cards of whatever height their own content happens to need. Global
   rather than scoped for the same reason as .session-card above — MudCard is a child component,
   so a scoped rule never reaches its rendered root. */
.session-hero-row .mud-grid-item {
    display: flex;
}

.session-hero-row .mud-card {
    width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .session-card {
        transition: none;
    }

    .session-card:hover {
        transform: none;
    }
}

.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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44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3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* The two inner panels of SessionDetail's objectives card. Stretched to the row height so the pair
   reads as two equal halves whichever side has more content. Global for the same reason as
   .session-card: MudPaper is a child component, so scoped CSS wouldn't reach it. */
.session-split-panel {
    height: 100%;
}

/* SessionDetail's "about this session" list. Stops a wrapping line (the microlearning one does at
   most widths) squeezing its icon out of the card: MudBlazor's icon cell shrinks by default. */
.session-facts .mud-list-item-icon {
    flex-shrink: 0;
}

/* SessionDetail's "About this session" panel: label and value side by side, labels in a column
   of their own so the values line up. */
.session-about {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 1.5rem;
    margin: 0;
}

.session-about dt {
    opacity: 0.7;
}

.session-about dd {
    margin: 0;
}

/* The recommended time inside a Type filter chip: secondary to the type's name, so quieter. */
.catalogue-kind-time {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 0.4rem;
    opacity: 0.75;
}

.catalogue-kind-time .mud-icon-root {
    font-size: 1rem;
}

/* The welcome strip's three ways in: a compact numbered list that doesn't need the page's full
   paragraph spacing. */
.welcome-steps {
    padding-left: 1.25rem;
}

/* The PD package page (/personal-development): a topic by level grid in the shape of the website's
   My Resources page. Global rather than scoped for the same reason as .session-card above: the
   cards are MudBlazor components, so a scoped rule never reaches their rendered root. */
.pd-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pd-level-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pd-search {
    min-width: 240px;
    max-width: 360px;
    flex: 1 1 240px;
}

.pd-level-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.pd-level-dot {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    flex: 0 0 auto;
}

.pd-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.pd-topic-card {
    height: 100%;
}

/* The whole tile is one link, so it is a single tab stop. */
.pd-tile-button {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.pd-tile-button:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
}

.pd-topic-name {
    margin-bottom: 0.5rem;
}

.pd-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pd-file-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.pd-file-role {
    flex: 1 1 auto;
    font-size: 0.875rem;
}

/* Landing page: the collections tile beside the newest shelf, so the newest e-learning is in view
   without scrolling past a mostly empty row. min-width: 0 on the shelf is what lets it scroll
   sideways inside the space left over instead of stretching the row. Stacked on a narrow screen. */
.library-top-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.library-top-row > .collections-row {
    flex: 0 0 auto;
}

.library-top-row > .unit-shelf {
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 959.98px) {
    .library-top-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
}

.pd-showcase-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 3rem;
    align-items: stretch;
}

.pd-showcase-intro {
    flex: 999 1 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.75rem;
}

.pd-showcase-image {
    flex: 1 1 320px;
    max-width: 520px;
    min-height: 240px;
    border-radius: 8px;
    object-fit: cover;
}

/* The XR placeholder's partnership card is a 5:3 logo lockup, not a photograph: cropping it to the
   hero's stretched box cuts the edges off, so it keeps its own proportions instead. */
.pd-showcase-image.xr-showcase-image {
    align-self: center;
    min-height: 0;
    aspect-ratio: 5 / 3;
    object-fit: contain;
}

/* The XR tile's logo lockup is 5:3 and the tile's image holder is not, so cover would cut the
   edges off. Fitted instead, on the lockup's own background colour (sampled from the image) so the
   spare space reads as part of it. */
.xr-tile-media {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #e7f1e1;
}

/* The image holder on every catalogue card: 16:9, the shape of the video and slide frames behind
   the thumbnails. It was a fixed 160px, close to 4:3, which suited nothing: YouTube's 480x360
   thumbnail has its 16:9 frame padded top and bottom with black bars, and at 4:3 they showed.
   At 16:9 with cover the bars fall outside the box, so the thumbnail's own frame fills it. The
   ratio rather than a height so a card in a slot of any width stays 16:9. MudCardMedia writes
   its own height inline, hence the !important. */
.card-media-16-9.mud-card-media {
    height: auto !important;
    aspect-ratio: 16 / 9;
}

/* The app bar's logo and title, one link home. Looks as it did when they were plain; only the
   cursor and the keyboard focus ring say it is a link. */
.app-bar-home {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.app-bar-home:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 2px;
}
