:root {
    color-scheme: light;
    /* Type scale. Every font size is one of these, in rem, so text follows the size a reader has set in their
       browser, and the root is left at the browser's own 100%. The page is a dense data view, so its base is
       0.8125rem (13px at the default), with a step either side for labels and for headings. A new size is a new
       token here, never a literal at the point of use. */
    --text-2xs: 0.625rem;
    --text-xs: 0.6875rem;
    --text-sm: 0.75rem;
    --text-base: 0.8125rem;
    --text-md: 0.9375rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.375rem;
    --leading-tight: 1.2;
    --leading-snug: 1.4;
    --leading-normal: 1.5;
    --esp-color-gray-100: #f8f8f8;
    --esp-color-gray-200: #ebebeb;
    --esp-color-gray-300: #d8d8d8;
    --esp-color-gray-400: #c0c0c0;
    --esp-color-gray-500: #a3a3a3;
    --esp-color-gray-600: #838383;
    --esp-color-gray-700: #5f5f5f;
    --esp-color-gray-800: #484848;
    --esp-color-gray-900: #232323;
    --esp-color-primary: #0e76ba;
    --esp-color-primary-50: #e7f1f8;
    --esp-color-primary-200: #9fc8e3;
    --esp-color-primary-600: #0b5e95;
    --esp-color-success: #10a073;
    --esp-color-success-50: #e7f5f1;
    --esp-color-success-600: #0d805c;
    --esp-color-warning: #fa781a;
    --esp-color-warning-50: #fef2e8;
    --esp-color-warning-600: #c86015;
    --esp-color-danger: #bf231f;
    --esp-color-danger-50: #f9e9e9;
    --esp-color-danger-500: #cc4f4c;
    --esp-color-danger-600: #991c19;
    --esp-color-surface: #fff;
    --esp-color-terminal-background: #232323;
    --hl-instruction: #0b5e95;
    --hl-argument: #6b4c9a;
    --hl-secret-bg: #f9e9e9;
    --hl-secret-fg: #991c19;
    --hl-builtin: #8a4b08;
    --hl-string: #1c6b3b;
    --hl-variable: #7a3e9d;
    --hl-punct: #666;
    --hl-number: #a15c00;
    --hl-muted: #777;
    --esp-color-terminal-text: #e8e8e8;
    --esp-font-family-sans-serif: "Open Sans", helvetica, arial, sans-serif;
    --esp-font-family-monospace: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Dark mode is chosen by the theme switch, which starts from the operating
   system's preference and remembers a choice (base.html sets data-theme on the
   root before the page paints). Only the palette changes: the gray ramp is
   reversed, so every rule reading it keeps its contrast, and each accent is
   lightened and its tint darkened. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --esp-color-gray-100: #16181c;
    --esp-color-gray-200: #23262c;
    --esp-color-gray-300: #33373e;
    --esp-color-gray-400: #4a4f57;
    --esp-color-gray-500: #6b7079;
    --esp-color-gray-600: #8e939b;
    --esp-color-gray-700: #b0b4ba;
    --esp-color-gray-800: #cdd0d4;
    --esp-color-gray-900: #e6e7e9;
    --esp-color-primary: #4ea6e6;
    --esp-color-primary-50: #132a3d;
    --esp-color-primary-200: #2c5a80;
    --esp-color-primary-600: #82c2f0;
    --esp-color-success: #34c08f;
    --esp-color-success-50: #10302a;
    --esp-color-success-600: #6ad8b0;
    --esp-color-warning: #ff9448;
    --esp-color-warning-50: #3a2614;
    --esp-color-warning-600: #ffb982;
    --esp-color-danger: #d9423e;
    --esp-color-danger-50: #3b1716;
    --esp-color-danger-500: #e2706d;
    --esp-color-danger-600: #ff938f;
    --esp-color-surface: #1e2126;
    --esp-color-terminal-background: #0e0f11;
    --hl-instruction: #82c2f0;
    --hl-argument: #c3a6ff;
    --hl-secret-bg: #4a1f1e;
    --hl-secret-fg: #ff938f;
    --hl-builtin: #ffb86b;
    --hl-string: #8fd19e;
    --hl-variable: #d2a8ff;
    --hl-punct: #9aa0a6;
    --hl-number: #ffcf70;
    --hl-muted: #8b949e;
    --esp-color-terminal-text: #e6e7e9;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--esp-font-family-sans-serif);
    font-size: var(--text-base);
    color: var(--esp-color-gray-900);
    background: var(--esp-color-gray-100);
    margin: 0;
    line-height: var(--leading-normal);
}

a {
    color: var(--esp-color-primary);
}

a:hover {
    color: var(--esp-color-primary-600);
}

code, pre, .mono {
    font-family: var(--esp-font-family-monospace);
}

/* Shell: header + collapsed rail + main content column */

.app-header {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 16px;
    background: var(--esp-color-surface);
    border-bottom: 1px solid var(--esp-color-gray-300);
}

.app-header .app-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--esp-color-primary);
    text-decoration: none;
}

.app-header .app-title {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--esp-color-gray-900);
}

.app-header .app-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--text-sm);
    color: var(--esp-color-gray-700);
}

.app-header .app-user a {
    color: var(--esp-color-gray-700);
    text-decoration: none;
    font-weight: 600;
}

.app-header .app-user a:hover {
    color: var(--esp-color-primary);
}

.app-body {
    display: flex;
    min-height: calc(100vh - 48px);
}

.app-rail {
    position: relative;
    width: 40px;
    flex: none;
}

/* The rail keeps its 40px in the layout; hovering it widens a panel over the page to name the tools */
.rail-inner {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40px;
    overflow: hidden;
    background: var(--esp-color-surface);
    border-right: 1px solid var(--esp-color-gray-300);
    transition: width 0.12s ease-out;
    z-index: 5;
}

.app-rail:hover .rail-inner,
.app-rail:focus-within .rail-inner {
    width: 168px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.12);
}

.rail-link {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    padding-left: 9px;
    white-space: nowrap;
    text-decoration: none;
    color: var(--esp-color-gray-600);
}

.rail-link svg {
    flex: none;
}

.rail-label {
    font-size: var(--text-base);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.12s ease-out;
}

.app-rail:hover .rail-label,
.app-rail:focus-within .rail-label {
    opacity: 1;
}

.rail-link:hover {
    color: var(--esp-color-primary);
}

.rail-link[aria-current="page"] {
    color: var(--esp-color-primary);
    background: var(--esp-color-primary-50);
}

.app-main {
    flex: 1;
    min-width: 0;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Breadcrumbs */

nav.breadcrumbs {
    font-size: var(--text-sm);
    color: var(--esp-color-gray-600);
}

nav.breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

nav.breadcrumbs a:hover {
    color: var(--esp-color-primary);
}

/* Page title row */

.page-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page-title {
    font-size: var(--text-2xl);
    font-weight: 300;
    color: var(--esp-color-gray-900);
}

.spacer {
    flex: 1;
}

/* Cards */

.card {
    background: var(--esp-color-surface);
    border: 1px solid var(--esp-color-gray-300);
    border-radius: 8px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--esp-color-gray-200);
}

.card-header .card-label {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--esp-color-gray-900);
}

.card-count {
    padding: 0 8px;
    border-radius: 999px;
    background: var(--esp-color-gray-200);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--esp-color-gray-700);
}

.card-note {
    font-size: var(--text-xs);
    color: var(--esp-color-gray-600);
}

.card-body {
    padding: 14px 16px;
}

.card-footnote {
    padding: 8px 16px;
    border-top: 1px solid var(--esp-color-gray-200);
    font-size: var(--text-xs);
    color: var(--esp-color-gray-600);
}

/* Field grid: label/value pairs used on the tag and component pages */

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 12px 16px;
}

.field-grid .field-label {
    font-size: var(--text-2xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--esp-color-gray-600);
    text-transform: uppercase;
}

.field-grid .field-value {
    font-size: var(--text-sm);
    color: var(--esp-color-gray-900);
    margin-top: 2px;
    word-break: break-word;
}

/* Badges */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: var(--leading-snug);
    white-space: nowrap;
}

.badge-dot::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentcolor;
}

.badge-primary {
    background: var(--esp-color-primary-50);
    color: var(--esp-color-primary-600);
}

.badge-success {
    background: var(--esp-color-success-50);
    color: var(--esp-color-success-600);
}

.badge-warning {
    background: var(--esp-color-warning-50);
    color: var(--esp-color-warning-600);
}

.badge-danger {
    background: var(--esp-color-danger-50);
    color: var(--esp-color-danger-600);
}

.badge-danger-solid {
    background: var(--esp-color-danger);
    color: #fff;
}

.badge-info {
    background: var(--esp-color-surface);
    color: var(--esp-color-primary-600);
    border: 1px solid var(--esp-color-primary-200);
}

.badge-neutral {
    background: var(--esp-color-gray-200);
    color: var(--esp-color-gray-700);
}

.badge-group {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* Tables */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-base);
}

thead th {
    background: var(--esp-color-gray-100);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--esp-color-gray-600);
    text-transform: uppercase;
    text-align: left;
    padding: 8px 16px;
    border-bottom: 1px solid var(--esp-color-gray-200);
}

thead th a {
    color: var(--esp-color-primary);
    text-decoration: none;
}

thead th a:hover {
    color: var(--esp-color-primary-600);
    text-decoration: underline;
}

thead th a.active {
    color: var(--esp-color-primary-600);
    font-weight: 700;
}

tbody td {
    padding: 8px 16px;
    border-bottom: 1px solid var(--esp-color-gray-200);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover td {
    background: var(--esp-color-gray-100);
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-size: var(--text-base);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 2px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--esp-color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--esp-color-primary-600);
    color: #fff;
}

.btn-secondary {
    background: var(--esp-color-surface);
    color: var(--esp-color-primary);
    border-color: var(--esp-color-gray-300);
}

.btn-secondary:hover {
    color: var(--esp-color-primary-600);
    border-color: var(--esp-color-gray-400);
}

.btn-sm {
    padding: 4px 10px;
    font-size: var(--text-sm);
}

.btn-block {
    width: 100%;
}

/* A <details> dropdown: opens and closes without script, and the summary
   styles as a button so it sits beside the other title-row controls. */
.dropdown {
    position: relative;
}

.dropdown > summary {
    list-style: none;
}

.dropdown > summary::-webkit-details-marker {
    display: none;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    z-index: 10;
    min-width: 160px;
    margin: 4px 0 0;
    padding: 4px 0;
    list-style: none;
    background: var(--esp-color-surface);
    border: 1px solid var(--esp-color-gray-300);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Every row of the menu looks the same: a link, an account or Log out.
   The header's own link rule (bold, gray) and a button's own look (a
   filled pill, dimmed text when disabled) must not leak in, or the rows
   disagree. */
.app-header .app-user .dropdown-menu a,
.app-header .app-user .dropdown-menu button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 16px;
    font: inherit;
    font-size: var(--text-base);
    font-weight: 400;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    color: var(--esp-color-gray-900);
    background: transparent;
    border: 0;
    border-radius: 0;
    appearance: none;
    cursor: pointer;
}

.app-header .app-user .dropdown-menu a:hover,
.app-header .app-user .dropdown-menu button:hover:not(:disabled) {
    background: var(--esp-color-gray-100);
    color: var(--esp-color-primary);
}

/* A mark column on every account, so the names line up. The account in use
   shows the tick, is bold, and cannot be picked again. */
.app-header .app-user .dropdown-menu button[role="menuitemradio"]::before {
    display: inline-block;
    width: 1.5em;
    content: "";
}

.app-header .app-user .dropdown-menu button.active {
    font-weight: 600;
    color: var(--esp-color-gray-900);
    cursor: default;
}

.app-header .app-user .dropdown-menu button.active::before {
    content: "\2713";
}

/* The admin badge sits on the name's line, a little apart from it. */
.app-header .app-user .dropdown .badge {
    margin-left: 4px;
    vertical-align: middle;
}
.app-header .app-user .dropdown > summary {
    cursor: pointer;
    font-weight: 600;
}

.dropdown-menu [role="separator"] {
    margin: 4px 0;
    border-top: 1px solid var(--esp-color-gray-300);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Login page */

.login-backdrop {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(at 15% 15%, #3068a1 0px, transparent 50%),
        radial-gradient(at 85% 8%, #726cc8 0px, transparent 50%),
        radial-gradient(at 60% 85%, #4085c5 0px, transparent 55%),
        radial-gradient(at 92% 70%, #785cc6 0px, transparent 50%),
        radial-gradient(at 25% 95%, #240968 0px, transparent 60%),
        #204d82;
}

.login-card {
    width: 400px;
    background: var(--esp-color-surface);
    border-radius: 8px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    padding: 32px 36px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-header .login-logo {
    color: var(--esp-color-primary);
}

.login-header .login-title {
    font-size: var(--text-2xl);
    font-weight: 300;
    color: var(--esp-color-gray-900);
    line-height: var(--leading-tight);
}

.login-header .login-registry {
    font-size: var(--text-xs);
    color: var(--esp-color-gray-600);
    font-family: var(--esp-font-family-monospace);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--esp-color-gray-700);
}

.login-form input {
    font-family: inherit;
    font-size: var(--text-base);
    padding: 12px;
    border: 1px solid var(--esp-color-gray-400);
    border-radius: 4px;
}

.login-form select {
    font-family: inherit;
    font-size: var(--text-base);
    padding: 12px;
    border: 1px solid var(--esp-color-gray-400);
    border-radius: 4px;
}

.login-form input:focus,
.login-form select:focus {
    outline: 2px solid var(--esp-color-primary-200);
    border-color: var(--esp-color-primary);
}

/* The usernames this browser has used for the chosen registry. */
.remembered {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.remembered[hidden] {
    display: none;
}

.remembered-chip {
    display: inline-flex;
    border: 1px solid var(--esp-color-gray-400);
    border-radius: 12px;
    overflow: hidden;
}

.remembered-chip button {
    font: inherit;
    font-size: var(--text-sm);
    color: var(--esp-color-gray-900);
    background: none;
    border: 0;
    padding: 3px 8px;
    cursor: pointer;
}

.remembered-chip button:hover {
    background: var(--esp-color-gray-100);
    color: var(--esp-color-primary);
}

.remembered-chip .remembered-forget {
    border-left: 1px solid var(--esp-color-gray-300);
    padding: 3px 7px;
}

.login-footnote {
    font-size: var(--text-xs);
    line-height: var(--leading-normal);
    color: var(--esp-color-gray-600);
    border-top: 1px solid var(--esp-color-gray-200);
    padding-top: 12px;
}

.alert {
    border-radius: 4px;
    padding: 10px 14px;
    font-size: var(--text-base);
}

.alert-warning {
    background: var(--esp-color-warning-50);
    color: var(--esp-color-warning-600);
    border: 1px solid var(--esp-color-warning-600);
}

.alert-title {
    font-weight: 700;
    margin-bottom: 4px;
}

/* Layer master-detail */

.layer-list {
    display: grid;
    grid-template-columns: 44px 1fr 90px;
    align-items: center;
}

.layer-list .layer-list-header {
    display: contents;
}

.layer-list .layer-list-header > span {
    font-size: var(--text-2xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--esp-color-gray-600);
    text-transform: uppercase;
    padding: 8px 16px;
    border-bottom: 1px solid var(--esp-color-gray-200);
}

.layer-row {
    display: contents;
}

.layer-row > * {
    padding: 8px 16px;
    border-bottom: 1px solid var(--esp-color-gray-200);
    font-size: var(--text-sm);
    color: var(--esp-color-gray-700);
    text-decoration: none;
    min-width: 0;
}

.layer-row .layer-index {
    color: var(--esp-color-gray-600);
}

.layer-row .layer-command {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layer-row .layer-size {
    text-align: right;
    font-family: var(--esp-font-family-monospace);
}

.layer-row.selected > * {
    background: var(--esp-color-primary-50);
    color: var(--esp-color-gray-900);
    font-weight: 700;
}

.layer-detail-body {
    background: var(--esp-color-terminal-background);
    color: var(--esp-color-terminal-text);
    border-radius: 4px;
    padding: 12px 14px;
    font-family: var(--esp-font-family-monospace);
    font-size: var(--text-sm);
    line-height: 1.6;
    overflow-x: auto;
    /* Docker pads a history entry with runs of spaces; line breaks are the only ones that mean something. */
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* Vulnerability count summary */

.vuln-counts {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.vuln-count {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.vuln-count .vuln-count-value {
    font-size: var(--text-lg);
    font-weight: 700;
}

.vuln-count .vuln-count-label {
    font-size: var(--text-sm);
    color: var(--esp-color-gray-700);
}

.vuln-count-critical {
    color: var(--esp-color-danger);
}

.vuln-count-high {
    color: var(--esp-color-danger-500);
}

.vuln-count-medium {
    color: var(--esp-color-warning-600);
}

.vuln-count-low {
    color: var(--esp-color-gray-700);
}

.vuln-divider {
    width: 1px;
    height: 24px;
    background: var(--esp-color-gray-300);
}

/* Misc */

.empty-state {
    color: var(--esp-color-gray-600);
    font-style: italic;
}

.stacked-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stacked-row {
    display: flex;
    gap: 8px;
    font-size: var(--text-base);
    color: var(--esp-color-gray-900);
}

.stacked-row .stacked-row-label {
    width: 110px;
    flex: none;
    color: var(--esp-color-gray-600);
}

.stacked-row > *:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 14px;
    align-items: start;
}

/* CVE detail page: prose, per-source ratings, and reference lists.

   A triage pass records thousands of characters of research per CVE, so this
   page's job is readability at length rather than density. */

.column-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    min-width: 0;
}

/* Every prose field on this page is Markdown and shares the .markdown rules
   below. A per-CNA justification sits inside a rating row rather than in its
   own card, so it is the one that runs a size smaller. */

.markdown-tight {
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--esp-color-gray-700);
    margin-top: 6px;
}

.prose-block + .prose-block {
    margin-top: 16px;
}

.prose-label {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--esp-color-gray-600);
    margin-bottom: 6px;
}

.rating-row + .rating-row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--esp-color-gray-200);
}

.rating-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.rating-source {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--esp-color-gray-900);
    text-decoration: none;
}

a.rating-source:hover {
    color: var(--esp-color-primary);
}

.rating-score {
    font-size: var(--text-base);
    font-weight: 600;
}

.rating-severity {
    font-size: var(--text-sm);
    color: var(--esp-color-gray-700);
}

.rating-unscored {
    font-style: italic;
    color: var(--esp-color-gray-600);
}

.rating-method {
    font-size: var(--text-xs);
    color: var(--esp-color-gray-600);
}

.rating-vector {
    font-size: var(--text-xs);
    color: var(--esp-color-gray-700);
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.reference-list {
    margin: 0;
    padding-left: 18px;
    font-size: var(--text-base);
    line-height: 1.8;
}

.reference-list a {
    color: var(--esp-color-primary);
    text-decoration: none;
}

.reference-list a:hover {
    text-decoration: underline;
}

.crumb-sep {
    margin: 0 6px;
    color: var(--esp-color-gray-400);
}

/* Rendered scanner Markdown: a description arrives with headings, code
   spans, and reference links, so it needs block spacing a plain paragraph
   does not. */

.markdown {
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--esp-color-gray-800);
    max-width: 76ch;
    overflow-wrap: anywhere;
}

.markdown > :first-child {
    margin-top: 0;
}

.markdown > :last-child {
    margin-bottom: 0;
}

.markdown h1,
.markdown h2,
.markdown h3 {
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--esp-color-gray-600);
    margin: 18px 0 6px;
}

.markdown p {
    margin: 0 0 10px;
}

.markdown code {
    font-family: var(--esp-font-mono, ui-monospace, monospace);
    font-size: var(--text-sm);
    background: var(--esp-color-gray-100);
    border-radius: 3px;
    padding: 1px 4px;
}

/* Reproduction steps are shell transcripts, so a fenced block scrolls on its
   own rather than forcing the page sideways. The inline-span padding and
   background would double up inside a block, so they are undone. */

.markdown pre {
    margin: 0 0 10px;
    padding: 10px 12px;
    background: var(--esp-color-gray-100);
    border-radius: 4px;
    overflow-x: auto;
}

.markdown pre code {
    padding: 0;
    background: none;
    white-space: pre;
    overflow-wrap: normal;
}

.markdown a {
    color: var(--esp-color-primary);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.markdown a:hover {
    text-decoration: underline;
}

.markdown ul,
.markdown ol {
    margin: 0 0 10px;
    padding-left: 20px;
}

/* Prose following a label/value block needs its own separation: the two read
   as one run-on field otherwise. */

.stacked-rows + .prose-block {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--esp-color-gray-200);
}

/* A footnote carries a dossier path and its digest, neither of which has a
   break opportunity a browser would find on its own. */

.card-footnote {
    overflow-wrap: anywhere;
}

.tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    margin-right: 0.35rem;
    padding: 0;
    border: 1px solid var(--esp-color-gray-300);
    border-radius: 3px;
    background: var(--esp-color-gray-100);
    color: var(--esp-color-gray-700);
    font-family: var(--esp-font-family-sans-serif);
    font-size: var(--text-base);
    line-height: 1;
    cursor: pointer;
    transition: transform 0.12s ease-in-out;
}

.tree-toggle:hover {
    border-color: var(--esp-color-primary-200);
    color: var(--esp-color-primary);
}

.tree-toggle[aria-expanded="true"] {
    transform: rotate(90deg);
}

.tree-leaf {
    display: inline-block;
    width: 1.1rem;
    margin-right: 0.35rem;
}

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

.diff-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
}

.diff-list li {
    padding: 0.15rem 0;
}

.diff-added {
    color: var(--esp-color-success);
    font-weight: 600;
}

.diff-removed {
    color: var(--esp-color-danger);
    font-weight: 600;
}

.diff-changed {
    color: var(--esp-color-warning-600);
    font-weight: 600;
}

.diff-note {
    color: var(--esp-color-gray-700);
    font-size: var(--text-base);
    margin-left: 0.4rem;
}

.diff-form {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin-left: 0.5rem;
}

.diff-form input {
    padding: 0.2rem 0.4rem;
    border: 1px solid var(--esp-color-gray-300);
    border-radius: 3px;
    font-size: var(--text-base);
    width: 12rem;
}

/* A panel's placeholder, until its own request answers (elements/deferred.html).
   Each size reserves about the room its panel takes, so the page does not jump
   as panels arrive. */
.deferred {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    margin-bottom: 16px;
    border: 1px dashed var(--esp-color-gray-300);
    border-radius: 8px;
    background: var(--esp-color-gray-100);
}

.deferred-line {
    min-height: 3rem;
}

.deferred-card {
    min-height: 6rem;
}

.deferred-table {
    min-height: 12rem;
    align-items: flex-start;
    padding-top: 16px;
}

.deferred-quiet {
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.deferred-inline {
    display: inline-flex;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    vertical-align: middle;
}

/* One spinner for every wait: a placeholder, and a button whose request is in
   flight (htmx puts .htmx-request on the element that issued it). */
.spinner,
.btn.htmx-request::before {
    display: inline-block;
    flex: none;
    width: 0.9rem;
    height: 0.9rem;
    border: 2px solid var(--esp-color-gray-300);
    border-top-color: var(--esp-color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn.htmx-request::before {
    content: "";
    width: 0.7rem;
    height: 0.7rem;
    margin-right: 6px;
    vertical-align: -1px;
}

.btn.htmx-request,
.btn[disabled] {
    cursor: progress;
    opacity: 0.7;
}

/* hx-pending wraps what it shows in a div styled "all: initial", which resets the
   font and the colour to the browser's (a serif face). Revert that wrapper, so
   what it holds is set as it is everywhere else on the page. */
.hx-pending {
    all: revert !important;
}

/* A tree row's children while they load (hx-pending puts a div beside the row, which
   inside a table body is made a row of one cell). */
tbody > .hx-pending {
    display: table-row !important;
}

.pending-row {
    display: table-cell;
    padding: 6px 12px;
    color: var(--esp-color-gray-700);
    font-size: var(--text-sm);
}

a.htmx-request {
    cursor: progress;
    opacity: 0.6;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* The page's own progress bar, shown while any request is in flight: htmx puts
   .htmx-request on the element that issued one and takes it off when the
   request ends or the element is replaced, so the page needs no count of its own. A boosted
   navigation is an XHR, so the browser shows no loading state of its own; this
   is the only sign a click did something. Delayed, so a request that answers at
   once does not flash it. */
.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 3px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-out;
}

.page-progress::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    background: var(--esp-color-primary);
    animation: progress 1.1s ease-in-out infinite;
}

html:has(.htmx-request) .page-progress {
    opacity: 1;
    transition-delay: 0.12s;
}

@keyframes progress {
    from {
        left: -30%;
    }
    to {
        left: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .spinner,
    .btn.htmx-request::before,
    .page-progress::before {
        animation-duration: 2.4s;
    }
}

/* How old a panel's registry answers are, beside its Refresh (elements/freshness.html). */
.freshness {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* A table whose cells carry media types and digests, which have no break
   opportunity, scrolls inside its card rather than widening the page. */

.table-scroll {
    overflow-x: auto;
}

.nowrap {
    white-space: nowrap;
}

/* A digest or media type in a table cell, which has no break opportunity of its own. */
.breakable {
    overflow-wrap: anywhere;
}

/* The guided view of a release repository's tags. */

.view-switch {
    display: inline-flex;
    gap: 4px;
    margin-left: auto;
}

.guide-legend {
    padding: 12px 16px;
    font-size: var(--text-base);
    color: var(--esp-color-gray-700);
    border-bottom: 1px solid var(--esp-color-gray-300);
}

.release-group {
    padding: 4px 16px 12px;
    border-bottom: 1px solid var(--esp-color-gray-300);
}

.release {
    padding: 12px 0 4px;
}

.release-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.release-version {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--esp-color-gray-900);
}

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

.variant {
    padding: 10px 12px;
    border: 1px solid var(--esp-color-gray-300);
    border-radius: 4px;
}

.variant-title {
    margin-bottom: 6px;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--esp-color-gray-600);
}

.build {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
}

.hotfixes {
    margin-top: 8px;
}

.badge-icon {
    flex: none;
}

.end-of-life {
    padding: 8px 16px 12px;
    border-bottom: 1px solid var(--esp-color-gray-300);
}

.end-of-life > summary {
    font-weight: 600;
}

.end-of-life .release-group {
    padding-inline: 0;
}

/* The guided tags view: support strip, quick start, key, major sections, history chain. */
.support-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--esp-color-gray-300);
}

.line-chip {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--esp-color-gray-300);
    border-radius: 8px;
    background: var(--esp-color-surface);
    color: inherit;
    text-decoration: none;
}

.line-chip:hover {
    border-color: var(--esp-color-primary);
    background: var(--esp-color-primary-50);
}

.line-chip-title {
    font-size: var(--text-lg);
    font-weight: 600;
}

.line-chip-caption {
    font-size: var(--text-sm);
    color: var(--esp-color-gray-700);
}

.quick-start {
    margin: 14px 16px;
    padding: 12px 14px;
    border: 1px solid var(--esp-color-success);
    border-radius: 8px;
    background: var(--esp-color-success-50);
}

.quick-title {
    margin-bottom: 8px;
    font-weight: 600;
}

.quick-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 4px 0;
}

.quick-variant {
    min-width: 9em;
    font-weight: 600;
}

.quick-command {
    flex: 1 1 18em;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--esp-color-terminal-background);
    color: var(--esp-color-terminal-text);
    overflow-x: auto;
    white-space: nowrap;
}

.quick-tag {
    font-size: var(--text-sm);
}

.guide-key {
    margin: 0 16px 14px;
    font-size: var(--text-base);
}

.guide-key > summary {
    cursor: pointer;
    font-weight: 600;
}

.guide-key dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 14px;
    align-items: center;
    margin: 8px 0 0;
}

.guide-key dt,
.guide-key dd {
    margin: 0;
}

.major-section {
    border-top: 1px solid var(--esp-color-gray-300);
    scroll-margin-top: 12px;
}

.major-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 12px 16px 4px;
}

.major-title {
    font-size: var(--text-xl);
    font-weight: 600;
}

.chain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin-top: 6px;
}

.chain-label {
    font-size: var(--text-sm);
    color: var(--esp-color-gray-700);
    margin-right: 4px;
}

.chain-arrow {
    color: var(--esp-color-gray-500);
}

.chip {
    text-decoration: none;
}

.end-of-life .major-section {
    opacity: 0.85;
}

/* Home page: one icon card per feature */

.home-cards {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    margin-top: 16px;
}

.home-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    color: var(--esp-color-gray-900);
    text-decoration: none;
}

.home-card:hover,
.home-card:focus-visible {
    border-color: var(--esp-color-primary);
    color: var(--esp-color-gray-900);
}

.home-card .card-icon {
    color: var(--esp-color-primary);
}

.home-card-title {
    font-size: var(--text-lg);
    font-weight: 600;
}

.home-card-subtitle {
    font-size: var(--text-base);
    color: var(--esp-color-gray-600);
}

.home-card-action {
    margin-top: auto;
    padding-top: 8px;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--esp-color-primary);
}

/* Theme switch: a light and a dark button in the header's right corner */

.theme-switch {
    margin-left: auto;
    display: inline-flex;
    border: 1px solid var(--esp-color-gray-300);
    border-radius: 6px;
    overflow: hidden;
}

.theme-switch button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--esp-color-gray-600);
    cursor: pointer;
}

.theme-switch button + button {
    border-left: 1px solid var(--esp-color-gray-300);
}

.theme-switch button:hover {
    color: var(--esp-color-gray-900);
}

[data-theme="light"] .theme-switch [data-theme-choice="light"],
[data-theme="dark"] .theme-switch [data-theme-choice="dark"] {
    background: var(--esp-color-primary-50);
    color: var(--esp-color-primary);
}

.theme-switch button:focus-visible {
    outline: 2px solid var(--esp-color-primary);
    outline-offset: -2px;
}

/* Recently updated images: the repository leads, the tag and digest follow quietly */

.image-name {
    font-weight: 600;
    font-family: var(--esp-font-family-monospace);
    text-decoration: none;
}

.image-repository {
    margin-left: 8px;
    font-size: var(--text-sm);
    color: var(--esp-color-gray-600);
}

/* Every column is as wide as its content and the last takes the rest, so the empty
   space is at the right of the row and not between the columns */
.recent-table {
    width: 100%;
}

.recent-table .spacer-col {
    width: 100%;
    padding: 0;
}

.recent-table th,
.recent-table td {
    padding-right: 32px;
    white-space: nowrap;
}

/* The image cell may wrap, but not down to a word a line: below this the table scrolls in its card */
.recent-table td:first-child {
    white-space: normal;
    min-width: 32rem;
}

/* A table wider than its card scrolls inside it, never out from under the next card */
.badge-absent {
    background: transparent;
    border: 1px dashed var(--esp-color-gray-300);
    color: var(--esp-color-gray-500);
}

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

.digest-copy {
    margin-left: 6px;
    padding: 0;
    border: 0;
    background: none;
    font-size: var(--text-xs);
    color: var(--esp-color-gray-600);
    cursor: pointer;
}

.digest-copy:hover {
    color: var(--esp-color-primary);
}

/* The copy hint shows with the row, so a reader sees the digest can be taken */
.digest-copy::after {
    content: " copy";
    opacity: 0;
    font-family: var(--esp-font-family-sans-serif);
    font-size: var(--text-xs);
}

tr:hover .digest-copy::after,
.digest-copy:focus-visible::after {
    opacity: 1;
}

a.badge {
    text-decoration: none;
}

a.badge:hover {
    filter: brightness(0.95);
}

.folder-none[hidden] {
    display: none;
}

.folder-none {
    display: block;
    width: 100%;
    padding: 8px 0;
    font-size: var(--text-base);
    font-style: italic;
    color: var(--esp-color-gray-600);
}

/* Folders: a filter and light chips, since a registry can hold dozens */

.folder-filter-row {
    padding-bottom: 0;
}

.folder-filter {
    width: 100%;
    max-width: 320px;
    padding: 6px 10px;
    border: 1px solid var(--esp-color-gray-300);
    border-radius: 6px;
    background: var(--esp-color-surface);
    color: var(--esp-color-gray-900);
    font: inherit;
    font-size: var(--text-base);
}

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

.folder-chip {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--esp-color-gray-200);
    color: var(--esp-color-gray-900);
    font-size: var(--text-base);
    text-decoration: none;
}

.folder-chip:hover,
.folder-chip:focus-visible {
    background: var(--esp-color-primary-50);
    color: var(--esp-color-primary);
}

.folder-chip[hidden] {
    display: none;
}

.folder-none {
    font-size: var(--text-base);
    color: var(--esp-color-gray-600);
}

.page-subtitle {
    margin: -8px 0 0;
    font-size: var(--text-base);
    color: var(--esp-color-gray-600);
}

/* The listing page: the folders, then the images or tags beside them on a wide screen */

.listing-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr);
    align-items: start;
}

/* A path's panels are grid areas. The tags are wide on the left; a path with no tags is a folder, so
   its tags panel arrives hidden and the folders take the left with the token grants beside them.
   Which a path is only the registry knows, so the page starts as a repository and settles on the answer. */
.listing-grid-path {
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    grid-template-areas: "tags folders";
    grid-template-rows: auto;
}

.listing-grid-path:has(.area-tags > .fragment[hidden]) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "folders";
    grid-template-rows: auto;
}

.area-tags,
.area-folders {
    min-width: 0;
}

.area-tags {
    grid-area: tags;
}

.area-folders {
    grid-area: folders;
}

.listing-main,
.listing-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.listing-aside .folder-chips {
    max-height: 70vh;
    overflow-y: auto;
}

@media (max-width: 1000px) {
    .listing-grid,
    .listing-grid-path,
    .listing-grid-path:has(.area-tags > .fragment[hidden]) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: none;
        grid-template-rows: auto;
    }

    .area-tags,
    .area-folders {
        grid-area: auto;
    }
}

.group-row td {
    padding-top: 14px;
    padding-bottom: 4px;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--esp-color-gray-600);
    background: transparent;
}

.group-row:hover td {
    background: transparent;
}

/* A fold of superseded rows (static/js/folds.js): the line that opens it. */
.fold-toggle td {
    padding: 2px 12px;
    background: var(--esp-color-gray-100);
}

.fold-button {
    padding: 2px 6px;
    border: 0;
    background: none;
    color: var(--esp-color-gray-700);
    font: inherit;
    font-size: var(--text-sm);
    cursor: pointer;
}

.fold-button:hover {
    color: var(--esp-color-primary);
}

/* A fold in the page's own markup (a <details>): the same quiet gray line the attachments
   table folds superseded rows behind, with the same chevron, and no script. */
details.fold {
    margin-block: 6px;
}

details.fold > summary {
    display: block;
    padding: 2px 12px;
    background: var(--esp-color-gray-100);
    color: var(--esp-color-gray-700);
    font-size: var(--text-sm);
    cursor: pointer;
    list-style: none;
}

details.fold > summary::-webkit-details-marker {
    display: none;
}

details.fold > summary::before {
    content: "\203a";
    display: inline-block;
    width: 1.2em;
}

details.fold[open] > summary::before {
    content: "\2304";
}

details.fold > summary:hover {
    color: var(--esp-color-primary);
}

/* Small layout helpers, so a template never carries a style attribute for them. */
.card-aside {
    margin-left: auto;
}

.align-end {
    text-align: right;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-title-note {
    font-size: var(--text-sm);
    color: var(--esp-color-gray-600);
}

.two-column-layers {
    grid-template-columns: 1fr 420px;
}

.error-card {
    max-width: 860px;
    margin: 40px auto 0;
}

.evidence-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.evidence-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* A notice that is information, not a warning. */
.alert-info {
    background: var(--esp-color-primary-50);
    color: var(--esp-color-gray-800);
    border: 1px solid var(--esp-color-primary-600);
}

/* A panel's "Updated … Refresh" inside a card row sits inline, not as a footnote strip. */
.card-body > .freshness {
    padding: 0;
    border-top: 0;
}

/* A long table inside a card scrolls within it, its header kept in view, so one panel
   cannot push the rest of the page a screen away. */
.table-scroll-tall {
    max-height: 70vh;
    overflow-y: auto;
}

.table-scroll-tall thead th {
    position: sticky;
    top: 0;
    background: var(--esp-color-gray-100);
}

.nowrap {
    white-space: nowrap;
}

/* Who has access: a menu in the title row, wide enough for a table. */
.dropdown-panel {
    min-width: 440px;
    max-width: min(640px, 90vw);
}

.dropdown-panel .table-scroll-tall {
    max-height: 60vh;
}

/* "+N more" after a short list: opens the rest in place, as plain text beside the links. */
details.more {
    display: inline;
}

details.more > summary {
    display: inline;
    color: var(--esp-color-primary-600);
    cursor: pointer;
    list-style: none;
    font-size: var(--text-sm);
}

details.more > summary::-webkit-details-marker {
    display: none;
}

details.more > summary .more-close,
details.more[open] > summary .more-open {
    display: none;
}

details.more[open] > summary .more-close {
    display: inline;
    margin-right: 4px;
}

/* INVARIANT: the blocks of a panel never touch. A panel arrives as one wrapper holding several
   cards, tables and notes, so the wrapper stacks them with the page's own gap. Anything that
   is itself a card, a menu or a notice is its own block and is left to its own layout. */
div.fragment:not(.card):not(.alert) {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fragment[hidden] {
    display: none;
}

/* A menu's items: a row each, set in from the edge, quiet until pointed at. The account menu
   states its own, further up, and wins over these. */
.dropdown-menu a,
.dropdown-menu button {
    display: block;
    padding: 8px 16px;
    color: var(--esp-color-gray-900);
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover:not(:disabled) {
    background: var(--esp-color-gray-100);
    color: var(--esp-color-primary);
}

/* The layer's detail stays in view while the list scrolls, so choosing a lower layer
   never means scrolling back up to read it. */
#layer-detail {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

/* A layer's build command in colour (web/highlight.py). The pane is dark in both themes, so it
   carries the dark palette itself; the list rows follow the page's theme. */
.layer-detail-body {
    --hl-instruction: #82c2f0;
    --hl-argument: #c3a6ff;
    --hl-secret-bg: #4a1f1e;
    --hl-secret-fg: #ff938f;
    --hl-builtin: #ffb86b;
    --hl-string: #8fd19e;
    --hl-variable: #d2a8ff;
    --hl-punct: #9aa0a6;
    --hl-number: #ffcf70;
    --hl-muted: #8b949e;
}

.hl-instruction {
    color: var(--hl-instruction);
    font-weight: 700;
}

.hl-argument {
    color: var(--hl-argument);
}

.hl-argument-name {
    font-weight: 600;
}

.hl-secret {
    padding: 0 3px;
    border-radius: 3px;
    background: var(--hl-secret-bg);
    color: var(--hl-secret-fg);
    cursor: help;
}

.hl-shell,
.hl-marker {
    color: var(--hl-muted);
}

.hl-k, .hl-kc, .hl-kd, .hl-kn, .hl-kp, .hl-kr, .hl-kt { color: var(--hl-instruction); }
.hl-nb { color: var(--hl-builtin); }
.hl-s, .hl-s1, .hl-s2, .hl-sa, .hl-sb, .hl-sc, .hl-sd, .hl-se, .hl-sh, .hl-si, .hl-sx, .hl-sr, .hl-ss { color: var(--hl-string); }
.hl-nv, .hl-vc, .hl-vg, .hl-vi, .hl-vm { color: var(--hl-variable); }
.hl-o, .hl-ow, .hl-p { color: var(--hl-punct); }
.hl-m, .hl-mb, .hl-mf, .hl-mh, .hl-mi, .hl-mo, .hl-il { color: var(--hl-number); }
.hl-c, .hl-c1, .hl-ch, .hl-cm, .hl-cp, .hl-cpf, .hl-cs { color: var(--hl-muted); font-style: italic; }

/* A panel being replaced in place stays on screen, dimmed, with a spinner at its top: the
   link that asked for the change does not vanish and come back (hx-busy, static/js/requests.js). */
.fragment[aria-busy="true"] {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.15s ease-in;
}

.fragment[aria-busy="true"]::after {
    content: "";
    position: absolute;
    top: 14px;
    left: 50%;
    width: 1.2rem;
    height: 1.2rem;
    margin-left: -0.6rem;
    border: 2px solid var(--esp-color-gray-300);
    border-top-color: var(--esp-color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* The page's dialog (a JSON document in colour). */
dialog.modal {
    width: min(1100px, 94vw);
    max-height: 88vh;
    padding: 0;
    border: 1px solid var(--esp-color-gray-300);
    border-radius: 8px;
    background: var(--esp-color-surface);
    color: var(--esp-color-gray-900);
    overflow: hidden;
}

dialog.modal[open] {
    display: flex;
    flex-direction: column;
}

dialog.modal::backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.modal-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--esp-color-gray-200);
}

.modal-head form {
    margin: 0;
}

.modal-title {
    font-weight: 600;
}

.json-body {
    flex: 1;
    margin: 12px;
    overflow: auto;
    white-space: pre;
}

.hl-nt { color: var(--hl-builtin); }
