/* Archivo (SIL OFL, wwwroot/fonts/OFL.txt), self-hosted: width and weight axes. */
@font-face {
    font-family: "Archivo";
    src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Archivo";
    src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Tokens. Services/BruaTheme.cs mirrors the colors for MudBlazor; change both together. */

:root {
    --ink: #13232F;
    --ink-soft: #3A4B56;
    --muted: #5B6B73;
    --paper: #F3F5F2;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --line: #D5DCD9;
    --line-soft: #E5EAE7;
    --brass: #B0802A;
    --brass-soft: rgba(176, 128, 42, 0.14);
    --solid: #13232F;
    --on-solid: #FFFFFF;
    --danger: #B3261E;
    --danger-bg: #FBEDEC;
    --shadow: 0 10px 30px rgba(19, 35, 47, 0.14), 0 1px 2px rgba(19, 35, 47, 0.08);

    /* The stage shows a light and a dark app, whatever the back office's own theme. */
    --stage-light: #FAFBFA;
    --stage-dark: #17232B;
    --night: #17232B;

    --status-open: #5B6B73;
    --status-submitted: #E0A100;
    --status-approved: #2156A5;
    --status-merged: #2E7D4F;
    --status-failed: #B3261E;

    --radius: 6px;
    --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    color-scheme: light;
}

:root[data-theme="dark"] {
    --ink: #E7EDEA;
    --ink-soft: #C3CDC9;
    --muted: #93A3A8;
    --paper: #0E161C;
    --surface: #15202A;
    --surface-2: #1A2630;
    --line: #2A3842;
    --line-soft: #223039;
    --brass: #D1A35E;
    --brass-soft: rgba(209, 163, 94, 0.18);
    --solid: #E7EDEA;
    --on-solid: #13232F;
    --danger: #F0857C;
    --danger-bg: #3A1F1E;
    --shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.4);
    --night: #0B1218;

    --status-open: #93A3A8;
    --status-submitted: #D9B04A;
    --status-approved: #7FA6E6;
    --status-merged: #63B786;
    --status-failed: #F0857C;

    color-scheme: dark;
}

html, body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

h1:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

.num {
    font-variant-numeric: tabular-nums;
}

code, .code {
    font-family: var(--mono);
    font-size: 0.92em;
}

kbd {
    display: inline-block;
    min-width: 18px;
    padding: 0 5px;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 4px;
    background: var(--surface);
    color: var(--muted);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    line-height: 17px;
    text-align: center;
    white-space: nowrap;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Shell: sidebar and content */

.shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 14px 16px;
    border-right: 1px solid var(--line);
    background: var(--surface);
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 0 8px;
    color: var(--ink);
    text-decoration: none;
}

.wordmark svg,
.wordmark img {
    flex: none;
}

/* The mark and the sign-in art are pictures from Brua's own project; the img is what the layout sees. */
.wordmark picture,
.signin-art picture {
    display: contents;
}

.wordmark span {
    font-size: 21px;
    font-weight: 700;
    font-stretch: 118%;
    letter-spacing: -0.01em;
}

.sidebar .mud-menu, .sidebar .mud-menu > .mud-menu-activator {
    display: block;
    width: 100%;
}

/* The organization above the project it holds: a menu with several organizations, a plain row with one. */
.switcher {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.organization-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 5px 8px;
    border: 0;
    border-radius: var(--radius);
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    text-align: left;
}

button.organization-switch {
    cursor: pointer;
    transition: color 120ms, background-color 120ms;
}

button.organization-switch:hover {
    background: var(--paper);
    color: var(--ink);
}

.organization-switch strong {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organization-switch .mud-icon-root {
    flex: none;
    font-size: 17px;
}

.project-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 120ms;
}

.project-switch:hover {
    border-color: var(--ink-soft);
}

.project-switch .text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.project-switch small {
    color: var(--muted);
    font-size: 12px;
}

.project-switch strong {
    font-weight: 600;
}

.project-switch .mud-icon-root {
    color: var(--muted);
}

.search-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 8px 7px 10px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    transition: border-color 120ms, color 120ms;
}

.search-trigger:hover {
    border-color: var(--line);
    color: var(--ink-soft);
}

.search-trigger span {
    flex: 1;
    text-align: left;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--radius);
    color: var(--ink-soft);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.nav a:hover {
    background: var(--paper);
    color: var(--ink);
}

.nav a.active {
    background: var(--solid);
    color: var(--on-solid);
}

.nav a .mud-icon-root {
    font-size: 19px;
}

.nav a kbd {
    margin-left: auto;
    opacity: 0;
    transition: opacity 120ms;
}

.nav a:hover kbd, .nav a:focus-visible kbd {
    opacity: 1;
}

.nav a.active kbd {
    border-color: rgba(128, 128, 128, 0.4);
    background: transparent;
    color: inherit;
}

.nav .count {
    margin-left: auto;
    min-width: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--brass);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
}

.new-asset {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    padding: 9px 12px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 120ms, color 120ms, background 120ms;
}

.new-asset:hover {
    border-style: solid;
    border-color: var(--brass);
    background: var(--brass-soft);
    color: var(--ink);
}

.new-asset span {
    flex: 1;
    text-align: left;
}

.sidebar-foot {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
}

.who-button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 8px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.who-button:hover {
    background: var(--paper);
}

.who-button .mud-icon-root {
    color: var(--muted);
}

.avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 50%;
    background: var(--brass-soft);
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 600;
    text-transform: uppercase;
}

.who {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.who strong {
    overflow: hidden;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.who small {
    color: var(--muted);
    font-size: 12px;
}

/* Menus (MudMenu popovers) */

.menu-list {
    min-width: 240px;
    padding: 6px;
}

.menu-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px 10px;
}

.menu-head small {
    color: var(--muted);
    font-size: 12px;
}

.menu-head strong {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.menu-row small {
    color: var(--muted);
}

.menu-theme {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 10px 12px;
}

.menu-theme small {
    color: var(--muted);
    font-size: 12px;
}

.menu-theme .segmented {
    display: flex;
}

.menu-theme .segmented button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mud-list-item kbd.right {
    margin-left: auto;
}

.content {
    min-width: 0;
    padding: 36px 44px 64px;
}

.page {
    max-width: 1240px;
    margin: 0 auto;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.page-head h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 650;
    font-stretch: 112%;
    letter-spacing: -0.015em;
    line-height: 1.15;
}

.page-head p {
    margin: 6px 0 0;
    color: var(--muted);
    max-width: 62ch;
}

.page-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 0;
}

.page-meta > * + *::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 12px;
    margin: 0 12px;
    background: var(--line);
    vertical-align: -1px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    color: var(--muted);
    font-weight: 500;
    text-decoration: none;
}

.back:hover {
    color: var(--ink);
}

.panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-soft);
}

.panel-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.panel-head .muted {
    font-size: 13px;
}

.panel-body {
    padding: 18px;
}

.section-title {
    margin: 36px 0 14px;
    font-size: 17px;
    font-weight: 600;
    font-stretch: 108%;
}

.muted {
    color: var(--muted);
}

.failure {
    color: var(--danger);
    line-height: 1.5;
}

.hint {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

button.link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 14px;
    border: 1px solid var(--brass);
    border-radius: 8px;
    background: var(--brass-soft);
}

.notice .mud-icon-root {
    color: var(--brass);
}

.notice span {
    flex: 1;
}

/* Status: a colored dot and a plain word, never a filled chip. */

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot, var(--status-open));
}

.status.live { --dot: var(--status-merged); }
.status.merged { --dot: var(--status-merged); }
.status.ready { --dot: var(--status-approved); }
.status.approved { --dot: var(--status-approved); }
.status.submitted { --dot: var(--status-submitted); }
.status.processing { --dot: var(--status-submitted); }
.status.processing::before { animation: pulse 1.2s ease-in-out infinite; }
.status.draft, .status.open { --dot: var(--status-open); }
.status.failed { --dot: var(--status-failed); color: var(--status-failed); }

@keyframes pulse {
    50% { opacity: 0.3; }
}

/* Toolbar */

.toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.search {
    flex: 1 1 240px;
    max-width: 340px;
}

.toolbar-end {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.toolbar .sort {
    width: 190px;
}

.segmented {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.segmented button {
    padding: 6px 12px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 120ms, color 120ms;
}

.segmented button:hover {
    color: var(--ink);
}

.segmented button[aria-pressed="true"] {
    background: var(--solid);
    color: var(--on-solid);
}

.segmented .count {
    margin-left: 6px;
    opacity: 0.6;
}

.segmented.small button {
    padding: 4px 9px;
    font-size: 13px;
}

.segmented.icons button {
    display: grid;
    place-items: center;
    padding: 5px 7px;
}

.chips {
    display: inline-flex;
    gap: 6px;
}

.chip {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    color: var(--ink-soft);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 120ms, background 120ms, color 120ms;
}

.chip:hover {
    border-color: var(--ink-soft);
    color: var(--ink);
}

.chip[aria-pressed="true"] {
    border-color: var(--brass);
    background: var(--brass-soft);
    color: var(--ink);
}

/* Asset tiles: light and dark side by side, the way the asset is delivered. */

.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: 18px;
}

.asset-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    transition: border-color 120ms, box-shadow 120ms, transform 120ms;
}

.asset-card:hover, .asset-card:focus-within {
    border-color: var(--ink-soft);
    box-shadow: 0 2px 10px rgba(19, 35, 47, 0.08);
}

.asset-card.failed {
    border-color: var(--status-failed);
}

.asset-card > a {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.asset-card .kind {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(19, 35, 47, 0.72);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 120ms;
    pointer-events: none;
}

.asset-card:hover .kind, .asset-card:focus-within .kind {
    opacity: 1;
}

.card-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: opacity 120ms;
}

.asset-card:hover .card-actions, .asset-card:focus-within .card-actions {
    opacity: 1;
}

.stage {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-bottom: 1px solid var(--line-soft);
}

.stage .side {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    padding: 14%;
    background: var(--stage-light);
}

.stage .side.dark {
    background: var(--stage-dark);
}

.stage.cover .side {
    position: relative;
    padding: 0;
}

.stage.cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
}

.stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.stage .empty {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.asset-card .meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px 14px;
}

.asset-card .id {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-card .alt, .asset-table .alt {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-card .alt.decorative, .asset-table .alt.decorative {
    font-style: italic;
}

.asset-card .facts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

/* Thumbnails: the stage, small. */
.thumb {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    height: 60px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 4px;
}

.thumb .side {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 6px;
    background: var(--stage-light);
}

.thumb .side.dark {
    background: var(--stage-dark);
}

.thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumb.cover .side {
    position: relative;
    padding: 0;
}

.thumb.cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb .empty {
    color: var(--muted);
    font-size: 12px;
}

/* The list view */

.asset-table {
    width: 100%;
    border-collapse: collapse;
}

.asset-table th, .asset-table td {
    padding: 10px 14px;
    border-top: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: middle;
}

.asset-table thead th {
    border-top: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.asset-table td:first-child {
    width: 96px;
    padding-right: 0;
}

.asset-table td:first-child .thumb {
    width: 80px;
    height: 48px;
}

.asset-table .name {
    max-width: 0;
    width: 40%;
}

.asset-table .name a {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-table .name a:hover {
    text-decoration: underline;
}

.asset-table .alt {
    display: block;
    font-size: 13px;
}

.asset-table th.num, .asset-table td.num {
    text-align: right;
}

.asset-table .row-actions {
    width: 48px;
    text-align: right;
}

.asset-table tbody tr:hover {
    background: var(--surface-2);
}

.empty-state {
    padding: 56px 24px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
}

.empty-state.compact {
    padding: 28px 20px;
    border: 0;
}

.empty-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

/* Asset detail */

.detail {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
    gap: 24px;
    align-items: start;
}

.detail-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.detail .stage {
    aspect-ratio: 16 / 10;
    border-radius: 8px 8px 0 0;
}

.detail .stage .side {
    padding: 10%;
}

.stage-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 14px;
}

.stage-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.slot-group {
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
}

.slot-group:first-of-type {
    margin-top: 0;
}

.segmented.languages {
    margin-top: 10px;
}

.facts-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 18px;
    margin: 0;
}

.facts-list dt {
    color: var(--muted);
}

.facts-list dd {
    margin: 0;
    font-weight: 500;
}

.alt-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.alt-list li {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 10px;
}

.lang {
    align-self: start;
    padding: 1px 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.snippet-note {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.5;
}

.snippet {
    position: relative;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--paper);
}

.snippet pre {
    margin: 0;
    padding: 12px 40px 12px 12px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.55;
    tab-size: 2;
}

.snippet .mud-icon-button {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--paper);
}

.files {
    width: 100%;
    border-collapse: collapse;
}

.files th, .files td {
    padding: 8px 14px;
    border-top: 1px solid var(--line-soft);
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

.files thead th {
    border-top: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.files tbody th {
    color: var(--ink-soft);
    font-weight: 500;
}

.files td a {
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

.files td a:hover {
    border-color: var(--ink);
}

.files .copy {
    margin-left: 4px;
    padding: 2px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    vertical-align: middle;
    cursor: pointer;
    opacity: 0;
    transition: opacity 120ms;
}

.files td:hover .copy, .files .copy:focus-visible {
    opacity: 1;
}

.files .copy:hover {
    color: var(--ink);
}

.files .copy .mud-icon-root {
    font-size: 15px;
}

.versions {
    display: flex;
    flex-direction: column;
}

.version {
    display: grid;
    grid-template-columns: 64px 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    border-top: 1px solid var(--line-soft);
    cursor: pointer;
    transition: background 120ms;
}

.version:first-child {
    border-top: 0;
}

.version:hover {
    background: var(--surface-2);
}

.version.shown {
    background: var(--surface-2);
    box-shadow: inset 3px 0 0 var(--brass);
}

.version .number {
    font-size: 20px;
    font-weight: 650;
    font-stretch: 112%;
}

.version .types {
    color: var(--muted);
    font-size: 13px;
}

.version-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Change sets */

.review {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.cs-group {
    margin: 0 0 8px;
    padding: 0 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.cs-empty {
    margin: 0 0 24px;
    padding: 14px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
}

.cs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.cs-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 120ms;
}

.cs-item:hover {
    border-color: var(--ink-soft);
}

.cs-item[aria-current="true"] {
    border-color: var(--ink);
    box-shadow: inset 3px 0 0 var(--brass);
}

.cs-item .name {
    font-weight: 600;
}

.cs-item .line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.cs-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.cs-head .muted {
    display: block;
}

.cs-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 650;
    font-stretch: 110%;
}

/* The change set's way to prod, a real sequence. */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 22px 0 6px;
    padding: 0;
    list-style: none;
}

.steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 22px;
    color: var(--muted);
    font-size: 13px;
}

.steps li::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--line);
}

.steps li::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
}

.steps li.done::before, .steps li.done::after {
    background: var(--solid);
    border-color: var(--solid);
}

.steps li.current::after {
    border-color: var(--brass);
    background: var(--brass);
    box-shadow: 0 0 0 4px var(--brass-soft);
}

.steps li strong {
    color: var(--ink);
    font-weight: 600;
}

.steps li:not(.done):not(.current) strong {
    color: var(--muted);
    font-weight: 500;
}

.diff {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line-soft);
}

.diff-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 20px 120px;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-top: 1px solid var(--line-soft);
}

.diff-row:first-child {
    border-top: 0;
}

.diff-row .asset-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.diff-row .asset-name a {
    overflow: hidden;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.diff-row .asset-name a:hover {
    text-decoration: underline;
}

.diff-thumb {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
}

.diff-thumb .thumb {
    height: 64px;
    background: repeating-linear-gradient(135deg, var(--paper) 0 6px, var(--surface) 6px 12px);
}

.diff-thumb .none {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--muted);
}

.diff-arrow {
    color: var(--muted);
    text-align: center;
}

.conflict,
.heads-up {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    grid-column: 1 / -1;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--danger-bg);
    color: var(--danger);
}

/* A change that will reach layouts built for the old version: worth a look, not an error. */
.heads-up {
    background: var(--brass-soft);
    color: var(--ink);
}

.heads-up .mud-icon-root {
    color: var(--brass);
}

.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid var(--line-soft);
    background: var(--surface-2);
    border-radius: 0 0 8px 8px;
}

.actions .hint {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* Settings: a sticky section list beside stacked panels. */

.settings {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.settings-nav {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-nav a {
    padding: 7px 10px;
    border-radius: var(--radius);
    color: var(--ink-soft);
    font-weight: 500;
    text-decoration: none;
}

.settings-nav a:hover {
    background: var(--surface);
    color: var(--ink);
}

.settings-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.settings-body section {
    scroll-margin-top: 24px;
}

.settings-body h3 {
    margin: 24px 0 10px;
    font-size: 14px;
    font-weight: 600;
}

.settings-body h3:first-child {
    margin-top: 0;
}

.setting-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.setting-row .grow {
    flex: 1;
}

.setting-row .narrow {
    width: 200px;
    flex: none;
}

.setting-row .mud-button-root {
    margin-top: 2px;
}

.setting-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
}

.settings-table {
    width: 100%;
    border-collapse: collapse;
}

.settings-table th, .settings-table td {
    padding: 10px 12px;
    border-top: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: middle;
}

.settings-table thead th {
    border-top: 0;
    padding-top: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.settings-table tbody tr:first-child td {
    border-top: 0;
}

.settings-table td:first-child {
    padding-left: 0;
}

.settings-table td:last-child {
    padding-right: 0;
}

.settings-table .person {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-table .role {
    width: 170px;
}

.settings-table .row-actions {
    width: 80px;
    text-align: right;
}

.settings-table td small {
    display: block;
    font-size: 12px;
}

.settings-table tr.revoked td {
    color: var(--muted);
}

.settings-table tr.revoked code {
    text-decoration: line-through;
}

.settings-table code {
    font-size: 12px;
}

.avatar.small {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.lang-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.lang-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 4px 0;
}

.lang-list .lang {
    min-width: 44px;
    padding: 2px 0;
}

.lang-list .name {
    flex: 1;
    color: var(--ink-soft);
}

.add-member {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}

.password-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.policy {
    display: flex;
    flex-direction: column;
}

.policy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
    border-top: 1px solid var(--line-soft);
}

.policy-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.policy-row .text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 56ch;
}

.policy-row .text span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.planned {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.planned li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.planned li:first-child {
    border-top: 0;
}

.planned strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
}

.tag {
    flex: none;
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* A tag after an asset's id or a project's name. */
.id .tag, .name .tag, .settings-table .tag {
    margin-left: 6px;
    vertical-align: 2px;
}

.scope-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scope {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 120ms, background 120ms;
}

.scope:hover {
    border-color: var(--ink-soft);
}

.scope.picked {
    border-color: var(--brass);
    background: var(--brass-soft);
}

.scope input {
    accent-color: var(--brass);
}

.scope .text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.scope .text .muted {
    font-size: 12px;
}

.scope code {
    color: var(--muted);
    font-size: 12px;
}

/* Releases: a logbook, newest entry on top. */

.logbook {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.logbook::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 87px;
    width: 1px;
    background: var(--line);
}

.entry {
    position: relative;
    display: grid;
    grid-template-columns: 72px 32px minmax(0, 1fr) auto;
    align-items: start;
    gap: 0;
    padding: 14px 0;
}

.entry .rel {
    padding-top: 2px;
    font-size: 22px;
    font-weight: 650;
    font-stretch: 112%;
    text-align: right;
    line-height: 1.1;
}

.entry .node {
    justify-self: center;
    width: 11px;
    height: 11px;
    margin-top: 8px;
    border: 2px solid var(--muted);
    border-radius: 50%;
    background: var(--paper);
}

.entry.current .node {
    border-color: var(--status-merged);
    background: var(--status-merged);
    box-shadow: 0 0 0 4px rgba(46, 125, 79, 0.16);
}

.entry .body {
    padding: 0 18px 0 6px;
}

.entry .note {
    font-weight: 600;
}

.entry .when {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.entry .card {
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.entry.current .card {
    border-color: var(--status-merged);
}

.entry .card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Sign in */

.signin {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, 1fr);
    min-height: 100vh;
}

.signin-art {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 48px;
    overflow: hidden;
    background: var(--stage-dark);
    color: #E9EEEC;
}

.signin-art .wordmark {
    color: #fff;
}

.signin-art h2 {
    max-width: 18ch;
    margin: 0;
    font-size: 40px;
    font-weight: 600;
    font-stretch: 116%;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.signin-art p {
    max-width: 44ch;
    margin: 16px 0 0;
    color: #A9B6B3;
    font-size: 15px;
    line-height: 1.55;
}

.signin-art .chart {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.signin-art > * {
    position: relative;
}

.signin-form {
    display: grid;
    place-items: center;
    padding: 40px 24px;
    background: var(--surface);
}

.signin-form .inner {
    width: 100%;
    max-width: 360px;
}

.signin-form h1 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 650;
    font-stretch: 110%;
}

.dev-users {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 13px;
}

.dev-users ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.dev-users button {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink-soft);
    font: inherit;
    cursor: pointer;
}

.dev-users button:hover {
    border-color: var(--ink-soft);
    color: var(--ink);
}

/* The links under a sign-in style form: forgot password, sign up, back. */
.signin-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.signin-links a {
    color: var(--ink-soft);
}

.signin-links a:hover {
    color: var(--ink);
}

.signin-form .mud-alert {
    margin-bottom: 4px;
}

/* A notice at the top of a page, under its heading. */
.page-notice {
    margin-bottom: 20px;
}

.page-notice a {
    color: inherit;
    font-weight: 600;
}

/* Command palette (⌘K) */

.palette-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 12vh 16px 16px;
    background: rgba(10, 18, 24, 0.45);
    backdrop-filter: blur(2px);
    animation: fade 120ms ease-out;
}

.palette {
    width: 100%;
    max-width: 600px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
    animation: rise 140ms ease-out;
}

.palette-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
}

.palette-input .mud-icon-root {
    color: var(--muted);
}

.palette-input input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    outline: none;
}

.palette-input input::placeholder {
    color: var(--muted);
}

.palette-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.palette-group {
    padding: 10px 10px 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.palette-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.palette-item.active {
    background: var(--paper);
}

.palette-item .icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 32px;
    flex: none;
    border-radius: 4px;
    background: var(--paper);
    color: var(--ink-soft);
}

.palette-item.active .icon {
    background: var(--surface);
}

.palette-item .thumb {
    width: 44px;
    height: 32px;
    flex: none;
}

.palette-item .thumb .side {
    padding: 3px;
}

.palette-item .text {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: baseline;
    min-width: 0;
}

.palette-item .title {
    flex: none;
    font-weight: 500;
    white-space: nowrap;
}

.palette-item .detail {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.palette-empty {
    padding: 28px 12px;
    color: var(--muted);
    text-align: center;
}

.palette-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding: 8px 14px;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 12px;
}

.palette-foot kbd {
    margin-right: 2px;
}

@keyframes fade {
    from { opacity: 0; }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(-8px); }
}

/* The new asset dialog */

.asset-dialog .mud-dialog-title {
    padding: 20px 24px 8px;
    font-family: var(--font);
    font-size: 20px;
    font-weight: 650;
    font-stretch: 110%;
}

.asset-dialog .mud-dialog-content {
    padding: 8px 24px 16px;
}

.asset-dialog .mud-dialog-actions {
    gap: 8px;
    padding: 12px 24px 20px;
    border-top: 1px solid var(--line-soft);
}

.dialog-note {
    flex: 1;
    color: var(--muted);
    font-size: 13px;
}

.asset-dialog .form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.asset-dialog .field h3 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.asset-dialog .field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 4px;
}

.asset-dialog .field-head h3 {
    margin: 0;
}

.asset-dialog .row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.asset-dialog .row .grow {
    flex: 1;
}

.asset-dialog .row .size {
    width: 130px;
    flex: none;
}

.preset-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.preset-cards button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 120ms, background 120ms;
}

.preset-cards button:hover {
    border-color: var(--ink-soft);
}

.preset-cards button[aria-checked="true"] {
    border-color: var(--brass);
    background: var(--brass-soft);
    color: var(--ink-soft);
}

.preset-cards .mud-icon-root {
    color: var(--ink-soft);
}

.preset-cards strong {
    color: var(--ink);
    font-weight: 600;
}

.preset-cards span {
    font-size: 12px;
    line-height: 1.45;
}

/* The files area: an attributes inspector beside a grid of wells, as an Xcode image set. */

.xc {
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.inspector {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.attr {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.attr h4 {
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.attr-value {
    font-weight: 500;
}

.attr-note {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.choice {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    align-self: stretch;
    width: 100%;
    gap: 8px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.choice .mark {
    flex: none;
    width: 14px;
    height: 14px;
    margin-top: 2px;
    border: 1.5px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    transition: border-color 120ms, background 120ms;
}

.choice.box .mark {
    border-radius: 3px;
}

.choice[aria-checked="true"] .mark {
    border-color: var(--solid);
    background: radial-gradient(circle, var(--solid) 42%, transparent 48%);
}

.choice.box[aria-checked="true"] .mark {
    background: var(--solid);
}

.choice:hover .mark {
    border-color: var(--ink-soft);
}

.choice .text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.choice strong {
    color: var(--ink);
    font-weight: 500;
}

.choice[aria-checked="true"] strong {
    font-weight: 600;
}

.choice small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.wells {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
}

.wells-group {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 600;
}

.wells-group:first-child {
    margin-top: 0;
}

.wells-group small {
    margin-left: 8px;
    color: var(--muted);
    font-weight: 400;
}

.colhead, .wellrow {
    display: grid;
    grid-template-columns: 116px repeat(var(--cols, 1), 108px);
    gap: 10px;
    align-items: start;
}

.colhead span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.wellrow .rowname {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 34px;
    font-size: 13px;
}

.wellrow .rowname strong {
    font-weight: 600;
}

.wellrow .rowname span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.well {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.well input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.well .box {
    display: grid;
    place-items: center;
    width: 108px;
    height: 96px;
    padding: 8px;
    border: 1px dashed var(--line);
    border-radius: 6px;
    background: var(--stage-light);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
    overflow: hidden;
    transition: border-color 120ms, background 120ms;
}

.well.dark .box {
    background: var(--stage-dark);
    color: #A9B6B3;
}

.well:hover .box, .well.dragging .box {
    border-color: var(--brass);
}

.well.dragging .box {
    border-style: solid;
    background: var(--brass-soft);
}

.well.filled .box {
    border-style: solid;
    padding: 4px;
}

.well .box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.well .box .mud-icon-root {
    font-size: 26px;
    color: var(--ink-soft);
}

.well.dark .box .mud-icon-root {
    color: #A9B6B3;
}

.well .cap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 108px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
}

.well .cap strong {
    max-width: 100%;
    overflow: hidden;
    color: var(--ink);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alt-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.progress-steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 0 10px 32px;
    color: var(--muted);
}

.progress-steps li::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 4px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
}

.progress-steps li + li::after {
    content: "";
    position: absolute;
    top: -12px;
    left: 10px;
    width: 2px;
    height: 26px;
    background: var(--line);
}

.progress-steps li.done::before {
    border-color: var(--status-merged);
    background: var(--status-merged);
}

.progress-steps li.current::before {
    border-color: var(--brass);
    background: var(--brass);
    animation: pulse 1.2s ease-in-out infinite;
}

.progress-steps li.failed::before {
    border-color: var(--status-failed);
    background: var(--status-failed);
}

.progress-steps strong {
    color: var(--ink);
    font-weight: 600;
}

.progress-steps li:not(.done):not(.current):not(.failed) strong {
    color: var(--muted);
    font-weight: 500;
}

.progress-steps span {
    font-size: 13px;
}

.outcome {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.outcome .stage {
    border: 1px solid var(--line-soft);
    border-radius: 6px;
}

.outcome p {
    margin: 0;
    line-height: 1.5;
}

.outcome strong {
    display: block;
    margin-bottom: 4px;
}

.pick-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pick {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 120ms, background 120ms;
}

.pick:hover {
    border-color: var(--ink-soft);
}

.pick.picked {
    border-color: var(--brass);
    background: var(--brass-soft);
}

.pick input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pick .thumb {
    width: 72px;
    height: 44px;
    flex: none;
}

.pick .text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pick .tick {
    color: var(--brass);
    opacity: 0;
}

.pick.picked .tick {
    opacity: 1;
}

/* MudBlazor adjustments */

.mud-button-root {
    letter-spacing: 0;
}

.mud-input-outlined-border {
    border-color: var(--line);
}

.mud-snackbar {
    font-family: var(--font);
}

.mud-popover {
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.mud-dialog {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.mud-list-item kbd {
    margin-left: auto;
}

.mud-list-item-text {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Small screens: sidebar becomes a top bar. */

@media (max-width: 900px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .wordmark {
        margin: 0;
    }

    .sidebar .switcher, .search-trigger, .sidebar-foot .who, .nav kbd, .new-asset kbd {
        display: none;
    }

    .nav {
        flex-direction: row;
        order: 3;
        width: 100%;
        margin: 0;
        overflow-x: auto;
    }

    .new-asset {
        margin: 0;
        padding: 7px 10px;
    }

    .sidebar-foot {
        margin: 0 0 0 auto;
        padding: 0;
        border: 0;
    }

    .who-button {
        padding: 2px;
    }

    .content {
        padding: 24px 16px 48px;
    }

    .page-head h1 {
        font-size: 26px;
    }

    .toolbar-end {
        margin-left: 0;
    }

    .detail, .review, .signin, .settings {
        grid-template-columns: 1fr;
    }

    .settings-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .setting-row {
        flex-wrap: wrap;
    }

    .policy-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .signin-art {
        min-height: 260px;
        padding: 28px 24px;
    }

    .signin-art h2 {
        font-size: 30px;
    }

    .diff-row {
        grid-template-columns: 1fr 1fr;
    }

    .diff-row .asset-name {
        grid-column: 1 / -1;
    }

    .diff-arrow {
        display: none;
    }

    .version {
        grid-template-columns: 48px 80px minmax(0, 1fr);
    }

    .version > :last-child {
        grid-column: 1 / -1;
    }

    .files {
        display: block;
        overflow-x: auto;
    }

    .preset-cards {
        grid-template-columns: 1fr;
    }

    .xc {
        grid-template-columns: 1fr;
    }

    .asset-dialog .row {
        flex-wrap: wrap;
    }

    .outcome {
        grid-template-columns: 1fr;
    }

    .palette-backdrop {
        padding-top: 16px;
    }

    .palette-foot {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Blazor boot and error UI */

.loading {
    display: grid;
    place-items: center;
    min-height: 100vh;
    color: var(--muted);
}

.loading svg {
    animation: breathe 1.6s ease-in-out infinite;
}

@keyframes breathe {
    50% { opacity: 0.35; }
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    padding: 0.8rem 1.25rem;
    background: var(--danger-bg);
    color: var(--danger);
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    cursor: pointer;
}

.blazor-error-boundary {
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--danger-bg);
    color: var(--danger);
}

.blazor-error-boundary::after {
    content: "Something went wrong on this page. Reload to try again.";
}
