/* Default Athena UI Theme

   Every rule of Athena UI is in the cascade layer "athena". CSS that is not in a layer (the normal CSS of an application) beats it whatever the
   specificity, so overriding a style never needs a more specific selector. The design tokens (colours, radius, spacing, focus ring, dialog widths,
   row height) are in tokens.css, which this file imports into the same layer. See docs/styling.md for the classes and variables of every component. */

@import url("../tokens.css") layer(athena);

@layer athena {

body {
    background-color: var(--athena-bg);
    color: var(--athena-fg);
}

a {
    color: var(--athena-accent);
}

input,
select,
textarea {
    background-color: var(--athena-bg);
    color: var(--athena-fg);
    border: var(--athena-border-width) solid var(--athena-field-border, var(--athena-line));
    border-radius: 3px;
    padding: 4px 6px;
    font: inherit;
}

:focus-visible {
    outline: 2px solid var(--athena-accent);
    outline-offset: 1px;
}

/* Header, Wrapper, Footer */

.container,
.header-container,
.wrapper-container,
.footer-container {
    box-sizing: border-box;      /* a border or an application's padding stays inside the 100 %: no sideways scrolling */
}

.header-container {
    width: 100%;
    height: 20%;
}

.wrapper-container {
    width: 100%;
    height: 75%;
}

.footer-container {
    width: 100%;
    height: 5%;
}

/* Elements */

.container {
    width: 100%;
    height: 100%;
}

.default-cointainer-bordered {
    border: 1px solid var(--athena-border);
}

.menu {
    display: flex;
    flex-wrap: wrap;
    list-style-type: none;
}

.menu li {
    margin: 5px;
    cursor: pointer;
}

/* Modal (background) */

.modal {
    display: none;
    position: fixed;
    z-index: var(--athena-z-overlay);
    inset: 0;
    padding-top: 100px;
    overflow: auto;
    background-color: var(--athena-overlay);
}

.modal-content {
    background-color: var(--athena-bg);
    color: var(--athena-fg);
    margin: auto;
    padding: 20px;
    border: var(--athena-border-width) solid var(--athena-line);
    width: 80%;
}

/* Modal close button */

.close {
    color: var(--athena-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: var(--athena-fg);
    text-decoration: none;
    cursor: pointer;
}

/* Buttons */

.athena-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid transparent;
    border-radius: var(--athena-radius-control, var(--athena-radius));
    font: inherit;
    cursor: pointer;
    background-color: var(--athena-accent);
    color: var(--athena-accent-fg);
}

.athena-button:hover:not(:disabled) {
    filter: brightness(1.1);
}

.athena-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.button-secondary {
    background-color: var(--athena-surface);
    color: var(--athena-fg);
    border-color: var(--athena-line);
}

.button-danger {
    background-color: var(--athena-danger);
    color: var(--athena-danger-fg, #fff);
}

.button-link {
    background: none;
    color: var(--athena-accent);
    text-decoration: underline;
    padding: 0;
}

.button-small {
    padding: 2px 8px;
    font-size: 0.85em;
}

.button-large {
    padding: 10px 20px;
    font-size: 1.15em;
}

/* Forms */

.form-message {
    min-height: 1.2em;
}

.form-message-error,
.field-error {
    color: var(--athena-danger);
}

.form-message-success {
    color: var(--athena-success);
}

.athena-form {
    display: flex;
    flex-direction: column;
    gap: var(--athena-space-3);
    max-width: 480px;
}

.form-actions {
    display: flex;
    gap: var(--athena-space-2);
}

.field {
    display: flex;
    flex-direction: column;
    gap: var(--athena-space-1);
}

.field-label,
.field-group legend {
    font-weight: 600;
}

.field-required {
    color: var(--athena-danger);
}

.field-help {
    font-size: 0.85em;
    color: var(--athena-muted);
}

.field-error {
    font-size: 0.85em;
    min-height: 1.1em;
}

.field-error:empty {
    display: none;
}

.field-invalid input:not([type=checkbox]):not([type=radio]),
.field-invalid select,
.field-invalid textarea {
    border-color: var(--athena-danger);
}

.field-group {
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    padding: 6px 10px;
}

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Switch: a checkbox drawn as a toggle */

.switch {
    position: relative;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-track {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background-color: var(--athena-line);
    position: relative;
    transition: background-color var(--athena-duration-fast) var(--athena-ease-standard);
}

.switch-track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--athena-switch-knob);
    transition: transform var(--athena-duration-fast) var(--athena-ease-standard);
}

.switch input:checked + .switch-track {
    background-color: var(--athena-accent);
}

.switch input:checked + .switch-track::after {
    transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
    outline: 2px solid var(--athena-accent);
    outline-offset: 2px;
}

/* Spinner, alerts, toasts, progress */

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--athena-line);
    border-top-color: var(--athena-accent);
    border-radius: 50%;
    animation: athena-spin 0.8s linear infinite;
    vertical-align: middle;
}

.spinner-small {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.spinner-large {
    width: 44px;
    height: 44px;
    border-width: 5px;
}

.button-loading .spinner {
    border-color: rgb(255 255 255 / 40%);
    border-top-color: currentcolor;
}

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

.alert,
.toast {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--athena-space-3);
    padding: 10px 14px;
    border: 1px solid var(--alert-color, var(--athena-info));
    border-left-width: 5px;
    border-radius: var(--athena-radius);
    background-color: var(--athena-surface-alt);
    color: var(--athena-fg);
}

.alert-info {
    --alert-color: var(--athena-info);
}

.alert-success {
    --alert-color: var(--athena-success);
}

.alert-warning {
    --alert-color: var(--athena-warning);
}

.alert-error {
    --alert-color: var(--athena-danger);
}

.alert-body {
    display: flex;
    flex-direction: column;
}

.alert-close {
    background: none;
    border: 0;
    font-size: 1.3em;
    line-height: 1;
    cursor: pointer;
    color: var(--athena-muted);
}

.toast-container {
    position: fixed;
    top: var(--athena-toast-y, 16px);
    right: var(--athena-toast-x, 16px);
    z-index: var(--athena-z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--athena-space-2);
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;           /* the stack must not cover what is under it: only the toasts take clicks */
}

.toast-container-top-left {
    right: auto;
    left: var(--athena-toast-x, 16px);
}

.toast-container-top-center {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
}

.toast-container-bottom-right,
.toast-container-bottom-left,
.toast-container-bottom-center {
    top: auto;
    bottom: var(--athena-toast-y, 16px);
}

.toast-container-bottom-left {
    right: auto;
    left: var(--athena-toast-x, 16px);
}

.toast-container-bottom-center {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
}

.toast {
    box-shadow: var(--athena-shadow);
    pointer-events: auto;
}

.progress-bar {
    height: 10px;
    border-radius: 5px;
    background-color: var(--athena-surface);
    border: var(--athena-border-width) solid var(--athena-line);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--progress-color, var(--athena-accent));
    transition: width var(--athena-duration-base) var(--athena-ease-standard);
}

.progress-success {
    --progress-color: var(--athena-success);
}

.progress-warning {
    --progress-color: var(--athena-warning);
}

.progress-error {
    --progress-color: var(--athena-danger);
}

.progress-indeterminate .progress-fill {
    width: 40%;
    animation: athena-slide 1.2s ease-in-out infinite;
}

@keyframes athena-slide {
    0% {
        margin-left: -40%;
    }

    100% {
        margin-left: 100%;
    }
}

.progress-label {
    font-size: 0.85em;
    margin-bottom: 2px;
}

/* Dialog: the native <dialog> element, opened with showModal() */

dialog.dialog {
    width: min(var(--dialog-width, var(--athena-dialog-medium)), 92%);
    max-width: none;
    padding: 0;
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    background-color: var(--athena-bg);
    color: var(--athena-fg);
    box-shadow: var(--athena-shadow);
}

dialog.dialog::backdrop {
    background-color: var(--athena-overlay);
}

/* The content fills the dialog up to its edge, so a click on the backdrop is a click on the dialog element itself */
.dialog-inner {
    position: relative;
    padding: 20px;
}

.dialog-small { --dialog-width: var(--athena-dialog-small); }
.dialog-medium { --dialog-width: var(--athena-dialog-medium); }
.dialog-large { --dialog-width: var(--athena-dialog-large); }
.dialog-full { --dialog-width: 100%; min-height: calc(100vh - 40px); }

.dialog-title {
    font-family: var(--athena-font-heading, inherit);
    text-transform: var(--athena-heading-transform, none);
    margin: 0 28px 12px 0;
}

.dialog-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: 0;
    font-size: 24px;
    cursor: pointer;
    color: var(--athena-muted);
}

.dialog-body {
    display: flex;
    flex-direction: column;
    gap: var(--athena-space-2);
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--athena-space-2);
    margin-top: 16px;
}

/* Tabs */

.tab-list {
    display: flex;
    flex-wrap: wrap;
    border-bottom: var(--athena-border-width) solid var(--athena-line);
}

.tab {
    padding: 8px 16px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    color: var(--athena-fg);
    font: inherit;
    cursor: pointer;
}

.tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tab-active {
    border-bottom-color: var(--athena-accent);
    font-weight: 600;
}

.tab-panel {
    padding: 12px 4px;
}

/* Breadcrumbs, pagination */

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    margin: 0 8px;
    color: var(--athena-muted);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: var(--athena-space-1);
    align-items: center;
}

.page-button {
    min-width: 32px;
    padding: 4px 8px;
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius-control, 4px);
    background-color: var(--athena-bg);
    color: var(--athena-fg);
    cursor: pointer;
}

.page-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-current {
    background-color: var(--athena-accent);
    border-color: var(--athena-accent);
    color: var(--athena-accent-fg);
}

/* Accordion: <details> and <summary> */

.accordion-item {
    border: var(--athena-border-width) solid var(--athena-line);
}

.accordion-item + .accordion-item {
    border-top: 0;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background-color: var(--athena-surface);
    color: var(--athena-fg);
    list-style: none;
    cursor: pointer;
}

.accordion-header::-webkit-details-marker {
    display: none;
}

.accordion-header:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent));
    outline-offset: -2px;
}

.accordion-icon::before {
    content: "▾";
    display: inline-block;
    transition: transform var(--athena-duration-fast) var(--athena-ease-standard);
}

.accordion-item[open] > .accordion-header .accordion-icon::before,
.sidebar-parent[aria-expanded="true"] .accordion-icon::before {
    transform: rotate(180deg);
}

.accordion-panel {
    padding: 12px 14px;
}

/* Dropdown */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    z-index: var(--athena-z-dropdown);
    left: 0;
    min-width: 180px;
    margin-top: 4px;
    padding: 4px 0;
    background-color: var(--athena-bg);
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    box-shadow: var(--athena-shadow);
}

.dropdown-right {
    left: auto;
    right: 0;
}

/* A popover (the dropdown menu, the tooltip) is in the top layer, placed next to its anchor by script through two variables */
.athena-popover[popover] {
    position: fixed;
    inset: auto;
    left: var(--athena-popover-left, 0);
    top: var(--athena-popover-top, 0);
    margin: 0;
    width: max-content;
    max-width: min(92vw, 36em);
    overflow: visible;
}

.athena-popover-center { translate: -50% 0; }
.athena-popover-end { translate: -100% 0; }
.athena-popover-above { translate: 0 -100%; }
.athena-popover-center.athena-popover-above { translate: -50% -100%; }
.athena-popover-end.athena-popover-above { translate: -100% -100%; }

.dropdown-menu[popover] {
    max-height: min(70vh, 28em);
    overflow-y: auto;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 6px 14px;
    border: 0;
    background: none;
    color: var(--athena-fg);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.dropdown-item:hover:not(:disabled),
.dropdown-item:focus {
    background-color: var(--athena-hover);
}

.dropdown-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dropdown-divider {
    height: 1px;
    margin: 4px 0;
    background-color: var(--athena-line);
}

/* Sidebar */

.sidebar {
    min-width: 200px;
}

.sidebar-toggle {
    display: none;
}

.sidebar-list,
.sidebar-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-sublist {
    padding-left: 16px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--athena-space-2);
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-radius: 4px;
    background: none;
    color: var(--athena-fg);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.sidebar-link:hover {
    background-color: var(--athena-hover);
}

.sidebar-link[aria-current="page"] {
    background-color: var(--athena-accent);
    color: var(--athena-accent-fg);
}

.sidebar-parent .accordion-icon {
    margin-left: auto;
}

/* Cards, sections, grid */

.card {
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    background-color: var(--athena-bg);
    overflow: hidden;
}

.card-image {
    display: block;
    width: 100%;
    height: auto;
}

.card-body {
    padding: 14px;
}

.card-title {
    font-family: var(--athena-font-heading, inherit);
    text-transform: var(--athena-heading-transform, none);
    margin: 0 0 8px;
}

.card-footer {
    padding: 10px 14px;
    border-top: var(--athena-border-width) solid var(--athena-line);
    background-color: var(--athena-surface-alt);
}

.athena-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns, 3), minmax(0, 1fr));
    gap: var(--grid-gap);
}

/* Badge, avatar, stat */

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--athena-radius-control, 4px);
    font-size: 0.8em;
    font-weight: 600;
    background-color: var(--athena-surface);
    color: var(--athena-fg);
    border: var(--athena-border-width) solid var(--athena-line);
}

.badge-pill {
    border-radius: 999px;
}

.badge-info {
    background-color: var(--athena-info);
    color: var(--athena-info-fg, #fff);
    border-color: transparent;
}

.badge-success {
    background-color: var(--athena-success);
    color: var(--athena-success-fg, #fff);
    border-color: transparent;
}

.badge-warning {
    background-color: var(--athena-warning);
    color: var(--athena-warning-fg, #fff);
    border-color: transparent;
}

.badge-error {
    background-color: var(--athena-danger);
    color: var(--athena-danger-fg, #fff);
    border-color: transparent;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--athena-accent);
    color: var(--athena-accent-fg);
    font-weight: 600;
    vertical-align: middle;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.avatar-large {
    width: 64px;
    height: 64px;
    font-size: 1.4em;
}

.stat {
    padding: 14px;
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    background-color: var(--athena-bg);
}

.stat-label {
    color: var(--athena-muted);
    font-size: 0.85em;
}

.stat-value {
    font-size: 1.9em;
    font-weight: 700;
}

.stat-good {
    color: var(--athena-success);
}

.stat-bad {
    color: var(--athena-danger);
}

.stat-neutral {
    color: var(--athena-muted);
}

/* Tooltip */

.has-tooltip,
.tooltip-wrap {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--athena-z-tooltip);
    padding: 4px 8px;
    border-radius: 4px;
    background-color: var(--athena-tooltip-bg);
    color: var(--athena-tooltip-fg);
    font-size: 0.8em;
    font-weight: 400;
    /* short tips stay on one line, a long one wraps instead of running off a phone screen */
    box-sizing: border-box;
    width: max-content;
    max-width: min(20rem, calc(100vw - 16px));
    white-space: normal;
    overflow-wrap: anywhere;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--athena-duration-fast) var(--athena-ease-standard);
}

.has-tooltip:hover > .tooltip-text,
.has-tooltip:focus-within > .tooltip-text,
.has-tooltip:focus > .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* As a popover it is only drawn while it is open, so it is always visible; the position comes from placePopover() */
.tooltip-text[popover] {
    border: 0;
    bottom: auto;
    transform: none;
    visibility: visible;
    opacity: 1;
}

/* Combobox (autocomplete, multi select) and chips */

.combobox {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--athena-space-1);
}

.combobox-multiple {
    padding: 2px 4px;
    border: var(--athena-border-width) solid var(--athena-field-border, var(--athena-line));
    border-radius: 3px;
    background-color: var(--athena-bg);
}

.combobox-multiple .combobox-input {
    flex: 1;
    min-width: 80px;
    border: 0;
}

.combobox:not(.combobox-multiple) .combobox-input {
    flex: 1;
}

.combobox-chips {
    display: contents;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--athena-space-1);
    padding: 1px 4px 1px 8px;
    border-radius: 999px;
    background-color: var(--athena-accent);
    color: var(--athena-accent-fg);
    font-size: 0.85em;
}

.chip-remove {
    border: 0;
    background: none;
    color: inherit;
    font-size: 1.1em;
    line-height: 1;
    cursor: pointer;
}

.combobox-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: var(--athena-z-dropdown);
    max-height: 220px;
    overflow-y: auto;
    margin: 2px 0 0;
    padding: 4px 0;
    list-style: none;
    background-color: var(--athena-bg);
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    box-shadow: var(--athena-shadow);
}

.combobox-option,
.combobox-empty {
    padding: 6px 12px;
    cursor: pointer;
}

.combobox-empty {
    color: var(--athena-muted);
    cursor: default;
}

.combobox-active,
.combobox-option:hover {
    background-color: var(--athena-hover);
}

.combobox-selected {
    font-weight: 600;
}

/* File upload */

.dropzone {
    padding: 24px;
    border: 2px dashed var(--athena-line);
    border-radius: var(--athena-radius);
    text-align: center;
    color: var(--athena-muted);
    cursor: pointer;
}

.dropzone:hover,
.dropzone-over {
    border-color: var(--athena-accent);
    background-color: var(--athena-hover);
}

.dropzone-input {
    display: none;
}

.dropzone-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dropzone-disabled:hover {
    border-color: var(--athena-line);
    background-color: transparent;
}

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

.file-item {
    display: grid;
    grid-template-columns: 1fr 120px auto;
    align-items: center;
    gap: 4px 10px;
    padding: 4px 0;
}

.file-status {
    grid-column: 1 / -1;
    font-size: 0.85em;
}

.file-status:empty {
    display: none;
}

/* Stepper */

.stepper-steps {
    display: flex;
    gap: var(--athena-space-2);
    padding: 0;
    margin: 0 0 16px;
    list-style: none;
}

.stepper-step {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    color: var(--athena-muted);
}

.stepper-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--athena-line);
    font-size: 0.85em;
    flex: none;
}

.stepper-current {
    color: var(--athena-fg);
    font-weight: 600;
}

.stepper-current .stepper-number {
    border-color: var(--athena-accent);
    background-color: var(--athena-accent);
    color: var(--athena-accent-fg);
}

.stepper-done .stepper-number {
    border-color: var(--athena-success);
    color: var(--athena-success);
}

.stepper .form-actions {
    margin-top: 16px;
}

/* Tables */

.athena-table-wrapper {
    overflow-x: auto;
    position: relative;        /* hidden labels inside a wide table stay in its scroll area and do not widen the page */
}

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

.athena-table th,
.athena-table td {
    border: var(--athena-border-width) solid var(--athena-line);
    padding: 6px 10px;
    text-align: left;
}

.athena-table th {
    background-color: var(--athena-surface);
}

.athena-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.athena-table tbody tr:nth-child(even) {
    background-color: var(--athena-surface-alt);
}

.athena-table tr.clickable:hover {
    background-color: var(--athena-hover);
    cursor: pointer;
}

.athena-table tr.selected {
    background-color: var(--athena-hover);
}

.athena-table .athena-table-select {
    width: 1%;
    text-align: center;
}

.athena-table td.editable {
    cursor: text;
}

.athena-table td.editable:hover {
    outline: 1px dashed var(--athena-accent);
}

.athena-table-edit {
    width: 100%;
    box-sizing: border-box;
}

.athena-table-filter {
    margin-bottom: 8px;
}

.athena-table-pager {
    margin-top: 8px;
}

.athena-table-pager[hidden] {
    display: none;
}

/* Table options: density, wrapping, alignment */

.athena-table.athena-table-compact th,
.athena-table.athena-table-compact td {
    padding: 2px 6px;
}

.athena-table.athena-table-nowrap td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0;
}

.athena-table.athena-table-wrap td {
    white-space: normal;
    overflow-wrap: anywhere;
}

.athena-table td.athena-align-center { text-align: center; }
.athena-table td.athena-align-right { text-align: right; }

.athena-table tr:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus, currentColor);
    outline-offset: -2px;
}

/* Charts */

.athena-chart {
    max-width: 100%;
    height: auto;
    vertical-align: top;          /* an inline svg sits on the baseline and leaves a gap under it: a widget would scroll by a pixel */
    font-family: var(--athena-font, sans-serif);
}

.athena-chart .chart-title {
    font-size: 16px;
    font-weight: bold;
    fill: var(--athena-fg);
}

.athena-chart .chart-tick,
.athena-chart .chart-legend {
    font-size: 11px;
    fill: var(--athena-muted);
}

.athena-chart .chart-grid {
    stroke: var(--athena-line);
}

.athena-chart .chart-axis {
    stroke: var(--athena-muted);
}

.athena-chart .chart-slice {
    stroke: var(--athena-bg);
}

.athena-chart .chart-bar:hover,
.athena-chart .chart-slice:hover {
    opacity: 0.8;
}

/* Responsive */

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

    .modal-content {
        width: 94%;
    }

    .modal {
        padding-top: 24px;
    }

    .athena-form {
        max-width: none;
    }

    .stepper-title {
        display: none;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .sidebar:not(.sidebar-open) .sidebar-list {
        display: none;
    }

    .file-item {
        grid-template-columns: 1fr auto;
    }

    .file-progress {
        grid-column: 1 / -1;
    }
}

/* Reduced motion: a spinner and an indeterminate bar still have to say "busy", but slowly. The transitions read the duration tokens (0). */
@media (prefers-reduced-motion: reduce) {
    :root:not([data-motion="full"]) .spinner,
    :root:not([data-motion="full"]) .progress-indeterminate .progress-fill {
        animation-duration: 3s;
    }
}

:root[data-motion="reduce"] .spinner,
:root[data-motion="reduce"] .progress-indeterminate .progress-fill {
    animation-duration: 3s;
}

/* Menu submenus */

.has-submenu {
    position: relative;
}

.menu-parent {
    cursor: pointer;
}

.menu-parent::after {
    content: " ▾";
    font-size: 0.8em;
}

.submenu {
    position: absolute;
    z-index: var(--athena-z-submenu);
    top: 100%;
    left: 0;
    min-width: 160px;
    margin: 2px 0 0;
    padding: 4px 0;
    list-style: none;
    background-color: var(--athena-bg);
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    box-shadow: var(--athena-shadow);
}

.submenu[hidden] {
    display: none;
}

.submenu-item {
    padding: 6px 14px;
    cursor: pointer;
    white-space: nowrap;
}

.submenu-item:hover:not([aria-disabled="true"]),
.submenu-item:focus {
    background-color: var(--athena-hover);
}

.submenu-item[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Table: resizable columns, virtual scrolling */

.athena-table-resizable th {
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.athena-col-resizer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 8px;
    cursor: col-resize;
    touch-action: none;
}

.athena-col-resizer:hover,
.athena-col-resizer.resizing,
.athena-col-resizer:focus-visible {
    background-color: var(--athena-accent);
    opacity: 0.6;
}

.athena-table-resizable td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.athena-table-scroll {
    position: relative;
    overflow: auto;
    border: var(--athena-border-width) solid var(--athena-line);
}

.athena-table-virtual {
    border-collapse: separate;
    border-spacing: 0;
}

.athena-table-virtual th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.athena-table-virtual tbody tr:not(.athena-table-spacer) {
    height: var(--row-height, var(--athena-row-height));
}

/* The window of rows is computed from a fixed row height, so every row has to be exactly that high. */
/* The doubled class beats a general `.athena-table td` padding of the application. */
.athena-table.athena-table-virtual td {
    box-sizing: border-box;
    height: var(--row-height, var(--athena-row-height));
    padding-top: 0;
    padding-bottom: 0;
    line-height: calc(var(--row-height, var(--athena-row-height)) - 2px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* A virtual row keeps its fixed height for the window maths. With wrap, the line box is its own
   knob so a long message does not inherit the row height; text beyond the row is clipped. */
.athena-table.athena-table-virtual.athena-table-wrap td {
    line-height: var(--athena-table-wrap-line-height, 1.4);
    white-space: normal;
    overflow-wrap: anywhere;
}

.athena-table-spacer td {
    padding: 0;
    border: 0;
}

/* A row with an open detail: the detail sits directly below the row, also in a virtual table. */
.athena-table td.athena-table-expand { padding: 2px 4px; text-align: center; }
.athena-table-expand-btn { border: 0; background: none; color: var(--athena-accent); font: inherit; cursor: pointer; padding: 2px 6px; }
/* a finger needs 44 x 44 */
@media (pointer: coarse) {
    .athena-table-expand-btn { min-width: 44px; min-height: 44px; }
}
.athena-table-expand-btn:focus-visible { outline: var(--athena-focus-width) solid var(--athena-focus); outline-offset: 2px; }
.athena-table-detail td { padding: 8px 12px; background: var(--athena-surface-alt); white-space: normal; overflow: visible; }
.athena-table.athena-table-virtual .athena-table-detail td { height: auto; line-height: 1.4; }

/* Date range */

.daterange {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.daterange-part {
    display: inline-flex;
    flex-wrap: wrap;           /* in a narrow place the word goes above its input */
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}

.daterange-part input {
    min-width: 0;              /* a date input is as wide as its font makes it: let it shrink with its place */
    max-width: 100%;
}

/* Rich text editor */

.richtext {
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    background-color: var(--athena-bg);
}

.richtext:focus-within {
    border-color: var(--athena-accent);
}

.rt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-bottom: var(--athena-border-width) solid var(--athena-line);
    background-color: var(--athena-surface);
    border-radius: var(--athena-radius) var(--athena-radius) 0 0;
}

.rt-button {
    min-width: 30px;
    padding: 3px 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: none;
    color: var(--athena-fg);
    font: inherit;
    cursor: pointer;
}

.rt-button:hover:not(:disabled) {
    background-color: var(--athena-hover);
}

.rt-button[aria-pressed="true"] {
    background-color: var(--athena-accent);
    color: var(--athena-accent-fg);
}

.rt-bold {
    font-weight: 700;
}

.rt-italic {
    font-style: italic;
}

.rt-underline {
    text-decoration: underline;
}

.rt-strike {
    text-decoration: line-through;
}

.rt-separator {
    width: 1px;
    align-self: stretch;
    margin: 2px 4px;
    background-color: var(--athena-line);
}

.rt-editor {
    padding: 8px 10px;
    overflow-y: auto;
    outline: none;
}

.rt-editor.rt-empty::before {
    content: attr(data-placeholder);
    color: var(--athena-muted);
    pointer-events: none;
    float: left;
    height: 0;
}

.rt-editor blockquote {
    margin: 8px 0;
    padding-left: 12px;
    border-left: 3px solid var(--athena-line);
    color: var(--athena-muted);
}

.rt-editor p {
    margin: 0 0 8px;
}

.rt-source-view {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    outline: none;
    resize: vertical;
    background: transparent;
    color: var(--athena-fg);
    font-family: monospace;
}

.rt-source-view[hidden],
.rt-editor[hidden] {
    display: none;
}

.rt-disabled .rt-editor {
    opacity: 0.6;
}

@media (max-width: 768px) {
    .submenu {
        position: static;
        box-shadow: none;
    }
}

/* Theme picker (generateThemePicker). The preview is drawn with the colours of the theme it shows. */

.theme-picker {
    display: flex;
    flex-direction: column;
    gap: var(--athena-space-4);
}

.theme-picker-group {
    border: 0;
    margin: 0;
    padding: 0;
}

.theme-picker-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--athena-space-3);
}

.theme-picker-option {
    display: flex;
    flex-direction: column;
    gap: var(--athena-space-1);
    min-width: 140px;
    padding: 8px;
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    cursor: pointer;
}

.theme-picker-option:has(input:checked) {
    border-color: var(--athena-accent);
    box-shadow: 0 0 0 1px var(--athena-accent);
}

.theme-picker-option:has(input:focus-visible) {
    outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent));
    outline-offset: 2px;
}

.theme-picker-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-picker-description {
    color: var(--athena-muted);
    font-size: 0.85em;
}

.theme-preview {
    display: block;
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: 4px;
    overflow: hidden;
    background: var(--athena-bg);
}

.theme-preview-both {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.theme-preview-half {
    display: block;
    background: var(--athena-bg);
}

.theme-preview-bar {
    display: block;
    height: 10px;
    background: var(--athena-accent);
}

.theme-preview-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.theme-preview-line {
    display: block;
    height: 5px;
    width: 70%;
    border-radius: 3px;
    background: var(--athena-fg);
    opacity: 0.6;
}

.theme-preview-button {
    display: block;
    height: 8px;
    width: 30%;
    border-radius: 3px;
    background: var(--athena-accent);
}

/* Tables with a data source and row actions */

.athena-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.athena-table-is-loading tbody {
    opacity: 0.6;
}

.athena-table td.athena-table-loading,
.athena-table td.athena-table-error {
    text-align: center;
    color: var(--athena-muted);
}

.athena-table .athena-table-error {
    color: var(--athena-danger);
}

.athena-table td.athena-table-actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.athena-table td.athena-table-actions .athena-button + .athena-button {
    margin-left: 4px;
}

/* Tables: the stacked layout of the option `stack`: while the table is narrow every row is a block and the label of the column stands next to each value */

.athena-table-stackable.is-stacked {
    overflow-x: visible;
}

.athena-table-stackable.is-stacked .athena-table,
.athena-table-stackable.is-stacked .athena-table tbody,
.athena-table-stackable.is-stacked .athena-table tr {
    display: block;
    min-width: 0;
}

.athena-table-stackable.is-stacked .athena-table thead {
    display: none;
}

.athena-table-stackable.is-stacked .athena-table tr {
    padding: 8px 12px;
    border-bottom: var(--athena-border-width) solid var(--athena-line);
}

.athena-table-stackable.is-stacked .athena-table tr:last-child {
    border-bottom: 0;
}

.athena-table-stackable.is-stacked .athena-table td {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    width: auto;
    max-width: none;
    padding: 3px 0;
    border: 0;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
}

.athena-table-stackable.is-stacked .athena-table td[data-label]::before {
    content: attr(data-label);
    flex: none;
    max-width: 45%;
    color: var(--athena-muted);
    font-size: 0.8em;
    text-align: left;
}

.athena-table-stackable.is-stacked .athena-table td.athena-table-actions {
    justify-content: flex-end;
    padding-top: 8px;
}

/* the toggle of an expanding row stands in the corner of its block, not on a line of its own */
.athena-table-stackable.is-stacked .athena-table tr { display: flow-root; }
.athena-table-stackable.is-stacked .athena-table td.athena-table-expand {
    float: right;
    margin-left: 8px;
    padding: 0;
}

.athena-table-stackable.is-stacked .athena-table td:empty {
    display: none;
}

/* Charts: series colours, tooltip, legend, table of values.
   The colours are the tokens --athena-series-1 ... -8 (light and dark); an application's --series-1 ... --series-8 (on :root or per theme) still win.
   The HTML legend (legend: "html") uses the same rule. */

.athena-chart .s1,
.chart-legend-swatch .s1 { color: var(--series-1, var(--athena-series-1)); }
.athena-chart .s2,
.chart-legend-swatch .s2 { color: var(--series-2, var(--athena-series-2)); }
.athena-chart .s3,
.chart-legend-swatch .s3 { color: var(--series-3, var(--athena-series-3)); }
.athena-chart .s4,
.chart-legend-swatch .s4 { color: var(--series-4, var(--athena-series-4)); }
.athena-chart .s5,
.chart-legend-swatch .s5 { color: var(--series-5, var(--athena-series-5)); }
.athena-chart .s6,
.chart-legend-swatch .s6 { color: var(--series-6, var(--athena-series-6)); }
.athena-chart .s7,
.chart-legend-swatch .s7 { color: var(--series-7, var(--athena-series-7)); }
.athena-chart .s8,
.chart-legend-swatch .s8 { color: var(--series-8, var(--athena-series-8)); }

.athena-chart .chart-bar,
.athena-chart .chart-slice,
.athena-chart .chart-swatch,
.athena-chart .chart-point,
.athena-chart .chart-area {
    fill: currentColor;
}

.athena-chart .chart-area {
    opacity: 0.18;
}

.athena-chart .chart-line {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
}

.athena-chart-sparkline .chart-line {
    stroke-width: 1.5;
}

.athena-chart .chart-ring {
    stroke: currentColor;
}

.athena-chart .chart-point {
    stroke: var(--athena-bg);
    stroke-width: 1;
}

.athena-chart .chart-hidden {
    display: none;
}

.athena-chart-sparkline {
    vertical-align: middle;
}

.athena-chart .chart-legend-item {
    cursor: pointer;
}

.athena-chart .chart-legend-item.is-off {
    opacity: 0.45;
}

.athena-chart [tabindex]:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus, currentColor);
    outline-offset: 2px;
}

.athena-chart .chart-tooltip {
    display: none;
    pointer-events: none;
}

.athena-chart .chart-tooltip.is-visible {
    display: block;
}

.athena-chart .chart-tooltip-box {
    fill: var(--athena-fg);
}

.athena-chart .chart-tooltip-text {
    fill: var(--athena-bg);
    font-size: 12px;
}

.chart-data {
    margin-top: 8px;
}

.chart-data summary {
    cursor: pointer;
}

/* Menu (generateMenu): a bar, or tabs at the bottom of the screen with sheets for the groups */

.athena-menu {
    background-color: var(--athena-menu-bg, transparent);
    color: var(--athena-menu-fg, inherit);
}

.athena-menu-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.athena-menu .menu-item {
    position: relative;
}

.athena-menu .menu-item-end {
    margin-left: auto;
}

.athena-menu .menu-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--athena-radius-control, var(--athena-radius));
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.athena-menu .menu-control:hover:not([aria-disabled="true"]):not(:disabled),
.athena-menu .menu-control:focus-visible {
    background-color: var(--athena-menu-hover, var(--athena-hover));
}

.athena-menu .menu-control:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent));
    outline-offset: -2px;
}

.athena-menu .menu-control.is-active,
.athena-menu .has-active > .menu-control {
    font-weight: bold;
    box-shadow: inset 0 -3px 0 var(--athena-menu-active, var(--athena-accent));
}

.athena-menu .menu-control:disabled,
.athena-menu .menu-control[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.athena-menu .menu-icon {
    display: inline-flex;
    line-height: 1;
}

.athena-menu .menu-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--athena-accent);
    color: var(--athena-accent-fg);
    font-size: 0.8em;
    font-weight: bold;
}

.athena-menu .menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.athena-menu .menu-sheet {
    position: absolute;
    z-index: var(--athena-z-sheet);
    top: 100%;
    left: 0;
    min-width: 180px;
    margin: 2px 0 0;
    padding: 4px;
    list-style: none;
    background: var(--athena-bg);
    color: var(--athena-fg);
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    box-shadow: var(--athena-shadow);
}

.athena-menu .menu-item-end .menu-sheet {
    left: auto;
    right: 0;
}

.athena-menu .menu-sheet[hidden] {
    display: none;
}

.athena-menu .menu-sheet .menu-control {
    display: flex;
    width: 100%;
    text-align: left;
}

/* Tabs at the bottom (layout "responsive" switches to it under 700px, or under the `breakpoint` option: the menu then has the class is-tabs) */

.athena-menu-bottom-tabs {
    position: fixed;
    z-index: var(--athena-z-bar);
    inset: auto 0 0;
    background: var(--athena-menu-bg, var(--athena-bg));
    border-top: var(--athena-border-width) solid var(--athena-line);
}

.athena-menu-bottom-tabs .athena-menu-list {
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;          /* more tabs than fit: the bar scrolls, not the page */
    scrollbar-width: thin;
}

.athena-menu-bottom-tabs .menu-item {
    flex: 1 0 auto;            /* share the room when there is some, never shrink below the label */
    min-width: 44px;
    position: static;
}

.athena-menu-bottom-tabs .menu-item-end {
    margin-left: 0;
}

.athena-menu-bottom-tabs .menu-control {
    flex-direction: column;
    width: 100%;
    gap: 2px;
    padding: 6px 4px;
    font-size: 0.75em;
}

.athena-menu-bottom-tabs .menu-sheet {
    position: fixed;
    inset: auto 0 56px;
    margin: 0;
    border-radius: var(--athena-radius) var(--athena-radius) 0 0;
}

.athena-menu-responsive.is-tabs {
    position: fixed;
    z-index: var(--athena-z-bar);
    inset: auto 0 0;
    background: var(--athena-menu-bg, var(--athena-bg));
    border-top: var(--athena-border-width) solid var(--athena-line);
}

.athena-menu-responsive.is-tabs .athena-menu-list {
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;          /* more tabs than fit: the bar scrolls, not the page */
    scrollbar-width: thin;
}

.athena-menu-responsive.is-tabs .menu-item {
    flex: 1 0 auto;            /* share the room when there is some, never shrink below the label */
    min-width: 44px;
    position: static;
}

.athena-menu-responsive.is-tabs .menu-item-end {
    margin-left: 0;
}

.athena-menu-responsive.is-tabs .menu-control {
    flex-direction: column;
    width: 100%;
    gap: 2px;
    padding: 6px 4px;
    font-size: 0.75em;
}

.athena-menu-responsive.is-tabs .menu-sheet {
    position: fixed;
    inset: auto 0 56px;
    margin: 0;
    border-radius: var(--athena-radius) var(--athena-radius) 0 0;
}

/* The router with keepPage: the old page while the next one is loading (after loadingDelay) */
.athena-router-loading {
    cursor: progress;
}

.athena-router-loading > * {
    opacity: 0.55;
    transition: opacity var(--athena-duration-fast) var(--athena-ease-standard);
}

/* Equal tabs (option equalTabs): every tab the same width, never below --athena-menu-tab-min (then the bar scrolls as above);
   a long label wraps onto two lines at most (its whole text is still what a screen reader hears). Short labels read best. */
.athena-menu-equal-tabs:is(.athena-menu-bottom-tabs, .is-tabs) .menu-item {
    flex: 1 1 0;
    min-width: var(--athena-menu-tab-min, 48px);
}

.athena-menu-equal-tabs:is(.athena-menu-bottom-tabs, .is-tabs) .menu-label {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    max-width: 100%;
    overflow-wrap: anywhere;   /* a word that does not fit is hyphenated where the browser can (lang on <html>), else broken */
    -webkit-hyphens: auto;
    hyphens: auto;
    line-height: 1.2;
    text-align: center;
}

/* A vertical rail (layout "vertical", or orientation "vertical" above the breakpoint): items below each other, sheets beside them */
.athena-menu.athena-menu-vertical .athena-menu-list {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
}

.athena-menu.athena-menu-vertical .menu-item { position: relative; }
.athena-menu.athena-menu-vertical .menu-item-end { margin-left: 0; }

.athena-menu.athena-menu-vertical .menu-control {
    box-sizing: border-box;      /* the padding is inside the rail, for a link as for a button */
    width: 100%;
    min-height: 44px;
    text-align: left;
}

.athena-menu.athena-menu-vertical .menu-control.is-active,
.athena-menu.athena-menu-vertical .has-active > .menu-control {
    box-shadow: inset 4px 0 0 var(--athena-menu-active, var(--athena-accent));
}

.athena-menu.athena-menu-vertical > .athena-menu-list > .menu-item > .menu-sheet {
    top: 0;
    right: auto;
    left: 100%;
    margin: 0 0 0 2px;
}

.athena-menu.athena-menu-vertical > .athena-menu-list > .menu-item > .menu-control .menu-caret {
    margin-left: auto;
    rotate: -90deg;
}

/* Menu: groups inside groups, and badges */

.athena-menu .menu-sheet-nested {
    top: 0;
    left: 100%;
    margin: 0 0 0 2px;
}

.athena-menu .menu-sheet .menu-caret {
    margin-left: auto;
}

.athena-menu .menu-badge {
    display: inline-block;
    min-width: 1.5em;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--athena-accent);
    color: var(--athena-accent-fg);
    font-size: 0.75em;
    font-weight: bold;
    line-height: 1.6;
    text-align: center;
}

.athena-menu .menu-badge-ok { background: var(--athena-success); color: var(--athena-success-fg, #fff); }
.athena-menu .menu-badge-warn { background: var(--athena-warning); color: var(--athena-warning-fg, #fff); }
.athena-menu .menu-badge-bad { background: var(--athena-danger); color: var(--athena-danger-fg, #fff); }
.athena-menu .menu-badge-info { background: var(--athena-info); color: var(--athena-info-fg, #fff); }

.athena-menu-bottom-tabs .menu-sheet-nested {
    position: static;
    margin: 0;
    padding: 0 0 0 12px;
    border: 0;
    box-shadow: none;
    background: none;
}

@media (max-width: 700px) {
    .athena-menu-responsive .menu-sheet-nested {
        position: static;
        margin: 0;
        padding: 0 0 0 12px;
        border: 0;
        box-shadow: none;
        background: none;
    }
}

.athena-table-placeholder td {
    color: var(--athena-muted);
}

.athena-table-status {
    margin-top: 4px;
}

.athena-table-status[hidden] {
    display: none;
}

/* Charts: pointer layer, zoom */

.athena-chart .chart-hit {
    fill: transparent;
    cursor: crosshair;
}

.athena-chart .chart-hit:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent));
    outline-offset: 2px;
}

.athena-chart .chart-marker {
    stroke: var(--athena-muted);
    stroke-dasharray: 3 3;
    pointer-events: none;
}

.athena-chart .chart-selection {
    fill: var(--athena-accent);
    opacity: 0.2;
    pointer-events: none;
}

.athena-chart .chart-reset {
    cursor: pointer;
}

/* Page header, facts, empty state, loading, stat tone and note */

.page-header {
    margin-bottom: 16px;
}

.page-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--athena-space-3);
}

.page-title {
    font-family: var(--athena-font-heading, inherit);
    text-transform: var(--athena-heading-transform, none);
    margin: 0;
}

.page-description {
    max-width: 70ch;              /* a long sentence would take the whole row and push the actions to a row of their own */
    margin: 4px 0 0;
    color: var(--athena-muted);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;        /* a button next to a field with a label stands on the line of the field */
    gap: var(--athena-space-2);
}

.facts {
    display: grid;
    gap: var(--athena-space-2);
    margin: 0;
}

.facts .fact {
    display: flex;
    flex-direction: column;
}

.facts dt {
    color: var(--athena-muted);
    font-size: 0.85em;
}

.facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.facts-inline .fact {
    flex-direction: row;
    gap: var(--athena-space-3);
}

.facts-inline dt {
    min-width: 10em;
    font-size: inherit;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--athena-space-2);
    padding: 32px 16px;
    text-align: center;
    color: var(--athena-muted);
}

.empty-state .empty-icon {
    font-size: 2.5em;
    line-height: 1;
}

.empty-state .empty-title {
    margin: 0;
    color: var(--athena-fg);
    font-weight: bold;
}

.empty-state .empty-message {
    margin: 0;
    max-width: 40em;
}

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--athena-space-2);
    padding: 24px;
    color: var(--athena-muted);
}

.stat-note {
    margin-top: 2px;
    color: var(--athena-muted);
    font-size: 0.85em;
}

.stat-note[hidden] {
    display: none;
}

.stat.is-ok { border-left: 4px solid var(--athena-success); }
.stat.is-warn { border-left: 4px solid var(--athena-warning); }
.stat.is-bad { border-left: 4px solid var(--athena-danger); }
.stat.is-ok .stat-value { color: var(--athena-success); }
.stat.is-warn .stat-value { color: var(--athena-warning); }
.stat.is-bad .stat-value { color: var(--athena-danger); }


/* ------------------------------------------------------------ Motion
   Everything reads the --athena-duration-* and --athena-ease-* tokens: 0 under reduced motion. Entering uses @starting-style, leaving
   uses transition-behavior: allow-discrete, so a closed dialog or popover fades out before it is taken off the screen. A browser that
   does not know them just shows and hides without motion. */

dialog.dialog {
    opacity: 0;
    translate: 0 8px;
    transition:
        opacity var(--athena-duration-base) var(--athena-ease-out),
        translate var(--athena-duration-base) var(--athena-ease-out),
        overlay var(--athena-duration-base) allow-discrete,
        display var(--athena-duration-base) allow-discrete;
}

dialog.dialog[open] {
    opacity: 1;
    translate: 0 0;
}

dialog.dialog::backdrop {
    opacity: 0;
    transition:
        opacity var(--athena-duration-base) var(--athena-ease-out),
        overlay var(--athena-duration-base) allow-discrete,
        display var(--athena-duration-base) allow-discrete;
}

dialog.dialog[open]::backdrop {
    opacity: 1;
}

@starting-style {
    dialog.dialog[open] {
        opacity: 0;
        translate: 0 8px;
    }

    dialog.dialog[open]::backdrop {
        opacity: 0;
    }
}

.athena-popover[popover] {
    opacity: 0;
    scale: 0.97;
    transform-origin: top;
    transition:
        opacity var(--athena-duration-fast) var(--athena-ease-out),
        scale var(--athena-duration-fast) var(--athena-ease-out),
        overlay var(--athena-duration-fast) allow-discrete,
        display var(--athena-duration-fast) allow-discrete;
}

.athena-popover[popover]:popover-open {
    opacity: 1;
    scale: 1;
}

.athena-popover-above[popover] {
    transform-origin: bottom;
}

@starting-style {
    .athena-popover[popover]:popover-open {
        opacity: 0;
        scale: 0.97;
    }
}

/* Toasts slide in from the side, and out again when they are closed */
.toast {
    transition:
        opacity var(--athena-duration-base) var(--athena-ease-out),
        translate var(--athena-duration-base) var(--athena-ease-out);
}

@starting-style {
    .toast {
        opacity: 0;
        translate: 16px 0;
    }
}

.toast.is-leaving {
    opacity: 0;
    translate: 16px 0;
}

/* The panel of an accordion opens and closes smoothly (a browser without ::details-content opens it at once) */
.accordion-item {
    interpolate-size: allow-keywords;
}

.accordion-item::details-content {
    block-size: 0;
    overflow: clip;
    transition:
        block-size var(--athena-duration-base) var(--athena-ease-standard),
        content-visibility var(--athena-duration-base) allow-discrete;
}

.accordion-item[open]::details-content {
    block-size: auto;
}

/* The mark of the active item, and hover, move gently */
.athena-menu .menu-control {
    transition:
        background-color var(--athena-duration-fast) var(--athena-ease-standard),
        box-shadow var(--athena-duration-fast) var(--athena-ease-standard);
}

/* A place holder for what is loading: a skeleton with a shimmer (generateSkeleton) */
.athena-skeleton {
    display: block;
    min-height: 1em;
    border-radius: var(--athena-radius);
    background: linear-gradient(90deg, var(--athena-surface) 25%, var(--athena-hover) 50%, var(--athena-surface) 75%);
    background-size: 200% 100%;
    animation: athena-shimmer 1.4s linear infinite;
}

.athena-skeleton-line + .athena-skeleton-line {
    margin-top: var(--athena-space-2);
}

.athena-skeleton-line:last-child:not(:only-child) {
    width: 60%;
}

@keyframes athena-shimmer {
    to {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    :root:not([data-motion="full"]) .athena-skeleton {
        animation: none;
    }
}

:root[data-motion="reduce"] .athena-skeleton {
    animation: none;
}

/* A theme or mode change cross-fades instead of flashing (the theme manager sets the class for a moment) */
.athena-switching,
.athena-switching *,
.athena-switching *::before,
.athena-switching *::after {
    transition:
        background-color var(--athena-duration-slow) var(--athena-ease-standard),
        color var(--athena-duration-slow) var(--athena-ease-standard),
        border-color var(--athena-duration-slow) var(--athena-ease-standard),
        fill var(--athena-duration-slow) var(--athena-ease-standard),
        stroke var(--athena-duration-slow) var(--athena-ease-standard);
}

/* Page transitions of the router (router({ transition: true })) */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: var(--athena-duration-base);
    animation-timing-function: var(--athena-ease-standard);
}

/* Charts draw themselves when they appear: bars grow, lines are drawn, slices pop in (only the first time, not when a chart streams or is zoomed) */
@keyframes athena-grow {
    from {
        scale: 1 0;
    }
}

@keyframes athena-draw {
    from {
        stroke-dashoffset: 1;
    }
}

@keyframes athena-appear {
    from {
        opacity: 0;
    }
}

@keyframes athena-pop {
    from {
        opacity: 0;
        scale: 0.6;
    }
}

.athena-chart-animated .chart-bar {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: athena-grow var(--athena-duration-slow) var(--athena-ease-out) backwards;
}

.athena-chart-animated .chart-line {
    stroke-dasharray: 1;
    animation: athena-draw var(--athena-duration-slow) var(--athena-ease-out) backwards;
}

.athena-chart-animated .chart-area,
.athena-chart-animated .chart-point {
    animation: athena-appear var(--athena-duration-slow) var(--athena-ease-out) backwards;
}

.athena-chart-animated .chart-slice {
    transform-box: fill-box;
    transform-origin: center;
    animation: athena-pop var(--athena-duration-slow) var(--athena-ease-out) backwards;
}


/* ------------------------------------------------------------ Widgets
   createWidgetGrid: a CSS grid. The columns, the row height and the gap are classes (wg-cols-12, wg-rh-80, wg-gap-12) and so is the place of every
   widget (wg-x-1, wg-y-1, wg-w-3, wg-h-2), written into a constructed style sheet: no style attribute, so a strict Content-Security-Policy is fine.
   The controls of the edit mode (handle, buttons, resize edges) exist in every widget and are shown only in .is-editable. */

.field[hidden] {
    display: none;
}

/* ---- board: columns of cards that are moved with the mouse, a finger or the keyboard ---- */
.athena-board {
    display: flex;
    align-items: flex-start;
    gap: var(--athena-space-4);
    overflow-x: auto;
    padding-bottom: var(--athena-space-2);
}

.board-column {
    flex: 1 0 15rem;
    max-width: 24rem;
    min-width: 0;
    padding: var(--athena-space-2);
    border-radius: var(--athena-radius);
    background: var(--athena-surface-alt);
    border: var(--athena-border-width) solid var(--athena-line);
}

.board-column.is-collapsed {
    flex: 0 0 11rem;
}

.board-column.is-drop-target {
    border-color: var(--athena-accent);
}

.board-column-header {
    display: flex;
    align-items: center;
    gap: var(--athena-space-1);
    margin-bottom: var(--athena-space-2);
}

.board-column.is-collapsed .board-column-header {
    margin-bottom: 0;
}

.board-column-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--athena-muted);
    overflow-wrap: anywhere;
}

.board-count {
    color: var(--athena-muted);
    font-size: 0.8rem;
}

.board-fold {
    flex: none;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: var(--athena-radius);
    background: transparent;
    color: var(--athena-muted);
    cursor: pointer;
    line-height: 1;
}

.board-fold:hover {
    background: var(--athena-hover);
    color: var(--athena-fg);
}

.board-fold:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent));
}

.board-cards {
    display: flex;
    flex-direction: column;
    gap: var(--athena-space-2);
    min-height: 2.5rem;
}

.board-empty {
    padding: var(--athena-space-2);
    color: var(--athena-muted);
    font-size: 0.85rem;
    text-align: center;
}

.board-card {
    position: relative;
    display: flex;
    gap: var(--athena-space-2);
    padding: var(--athena-space-2) var(--athena-space-3);
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    background: var(--athena-surface);
    color: var(--athena-fg);
    overflow-wrap: anywhere;
    cursor: grab;
    transition: box-shadow var(--athena-duration-fast) var(--athena-ease-standard), border-color var(--athena-duration-fast) var(--athena-ease-standard);
}

.board-card:hover {
    box-shadow: var(--athena-shadow);
}

.board-card:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent));
    outline-offset: 1px;
}

.board-card-body {
    flex: 1;
    min-width: 0;
}

.board-card-title {
    font-weight: 600;
}

.board-card-handle {
    flex: none;
    align-self: stretch;
    width: 0.9rem;
    border-radius: var(--athena-radius);
    background: radial-gradient(circle, var(--athena-line) 1.4px, transparent 1.6px) 0 0 / 6px 6px;
    cursor: grab;
    touch-action: none;
}

.board-card.is-picked {
    border-color: var(--athena-accent);
    box-shadow: var(--athena-shadow);
}

.board-card.is-pending {
    opacity: 0.7;
}

.board-card.is-dragging {
    display: none;
}

.board-card.is-ghost {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--athena-z-overlay);
    margin: 0;
    pointer-events: none;
    box-shadow: var(--athena-shadow);
    border-color: var(--athena-accent);
    cursor: grabbing;
}

.board-placeholder {
    box-sizing: border-box;
    border: var(--athena-border-width) dashed var(--athena-accent);
    border-radius: var(--athena-radius);
    background: var(--athena-hover);
}

.athena-board.is-dragging-card,
.athena-board.is-dragging-card * {
    cursor: grabbing;
    user-select: none;
}

.athena-widget-grid {
    display: grid;
    position: relative;
    align-items: stretch;
}

.widget {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    background: var(--athena-surface);
    color: var(--athena-fg);
    overflow: hidden;
    transition: box-shadow var(--athena-duration-fast) var(--athena-ease-standard), border-color var(--athena-duration-fast) var(--athena-ease-standard);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-bottom: var(--athena-border-width) solid var(--athena-line);
    background: var(--athena-surface-alt);
}

.widget-title {
    font-family: var(--athena-font-heading, inherit);
    text-transform: var(--athena-heading-transform, none);
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.widget-body {
    flex: 1;
    min-height: 0;
    padding: 10px;
    overflow: auto;
}

.widget-note {
    margin: 0;
    color: var(--athena-muted);
}

.widget.is-unknown,
.widget.is-failed {
    border-style: dashed;
}

.widget-handle,
.widget-actions,
.widget-resize {
    display: none;
}

.widget-actions {
    gap: 2px;
}

.widget-handle,
.widget-action {
    padding: 2px 6px;
    border: var(--athena-border-width) solid transparent;
    border-radius: var(--athena-radius);
    background: transparent;
    color: var(--athena-fg);
    font: inherit;
    line-height: 1.2;
    cursor: pointer;
}

.widget-handle:hover,
.widget-action:hover {
    background: var(--athena-hover);
}

.widget-handle:focus-visible,
.widget-action:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus);
    outline-offset: 1px;
}

.widget-handle {
    cursor: grab;
    touch-action: none;
}

.widget-handle[aria-pressed="true"] {
    background: var(--athena-accent);
    color: var(--athena-accent-fg);
}

.is-editable .widget-handle {
    display: inline-block;
}

.is-editable .widget-actions {
    display: flex;
}

.is-editable .widget {
    border-color: var(--athena-border);
}

.is-editable .widget.is-locked .widget-handle,
.is-editable .widget.is-locked .widget-resize {
    display: none;
}

.is-editable .widget.is-locked .widget-title::after {
    content: " 🔒";
}

.widget.is-dragging {
    z-index: 2;
    border-color: var(--athena-accent);
    box-shadow: var(--athena-shadow);
}

.is-editable .widget-resize {
    display: block;
    position: absolute;
    z-index: 1;
    touch-action: none;
}

.widget-resize-n,
.widget-resize-s {
    left: 12px;
    right: 12px;
    height: 8px;
    cursor: ns-resize;
}

.widget-resize-e,
.widget-resize-w {
    top: 12px;
    bottom: 12px;
    width: 8px;
    cursor: ew-resize;
}

.widget-resize-n { top: 0; }
.widget-resize-s { bottom: 0; }
.widget-resize-e { right: 0; }
.widget-resize-w { left: 0; }

.widget-resize-ne,
.widget-resize-nw,
.widget-resize-se,
.widget-resize-sw {
    width: 14px;
    height: 14px;
}

.widget-resize-ne { top: 0; right: 0; cursor: nesw-resize; }
.widget-resize-nw { top: 0; left: 0; cursor: nwse-resize; }
.widget-resize-se { bottom: 0; right: 0; cursor: nwse-resize; }
.widget-resize-sw { bottom: 0; left: 0; cursor: nesw-resize; }

.widget-resize-se::after {
    content: "";
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--athena-muted);
    border-bottom: 2px solid var(--athena-muted);
}

/* A finger needs 44 x 44. The header wraps in a narrow widget, and one large corner replaces the eight thin resize strips (which would
   cover the content and stop the page from scrolling): with moving, it reaches every size and place. */
@media (pointer: coarse) {
    .is-editable .widget-header {
        flex-wrap: wrap;
        gap: 0 4px;
        padding: 2px 4px;
    }

    .is-editable .widget-title {
        flex-basis: 4em;
    }

    .is-editable .widget-handle,
    .is-editable .widget-action {
        min-width: 44px;
        min-height: 44px;
    }

    .is-editable .widget-actions {
        margin-left: auto;
    }

    .is-editable .widget.is-locked .widget-handle {
        display: none;
    }

    .is-editable .widget-resize {
        display: none;
    }

    .is-editable .widget:not(.is-locked) .widget-resize-se {
        display: block;
        width: 44px;
        height: 44px;
    }

    .widget-resize-se::after {
        right: 6px;
        bottom: 6px;
        width: 14px;
        height: 14px;
    }
}

/* where the widget that is being dragged will land */
.widget-placeholder {
    min-width: 0;
    border: 2px dashed var(--athena-accent);
    border-radius: var(--athena-radius);
    background: var(--athena-hover);
    pointer-events: none;
}

/* an empty dashboard has no height: give a widget that is dragged in somewhere to go */
.athena-widget-grid.is-receiving {
    min-height: 160px;
}

.athena-widget-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr));
    gap: var(--athena-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.widget-gallery-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 44px;
    padding: 4px 10px 4px 0;
    border: var(--athena-border-width) solid var(--athena-border);
    border-radius: var(--athena-radius);
    background: var(--athena-surface);
    color: var(--athena-fg);
    font: inherit;
    text-align: start;
    cursor: grab;
    user-select: none;
}

.widget-gallery-item:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus);
    outline-offset: 1px;
}

.widget-gallery-item.is-dragging {
    border-color: var(--athena-accent);
    cursor: grabbing;
}

/* a finger drags here (and scrolls the page everywhere else) */
.widget-gallery-grip {
    display: flex;
    flex: none;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    touch-action: none;
}

.widget-gallery-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-wrap: anywhere;
}

.widget-gallery-description {
    color: var(--athena-muted);
    font-size: 0.85rem;
}

@media (hover: hover) and (pointer: fine) {
    .widget-gallery-item:hover {
        background: var(--athena-hover);
    }
}


/* ------------------------------------------------------------ Code
   highlightCode, generateCodeBlock, createCodeEditor and createDiffView. The colours of the tokens are the --athena-tok-* tokens. Line numbers are CSS counters
   (they are not copied); the editor is a transparent <textarea> over a highlighted <pre> in one scroller, so both must have the same font, padding and tab size. */

.athena-code,
.code-editor-input {
    font: 0.875rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    letter-spacing: normal;
    tab-size: 4;
    white-space: pre;
    overflow-wrap: normal;
}

.athena-code.code-wrap,
.code-editor.code-wrap .code-editor-input {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.athena-code {
    margin: 0;
    padding: 10px 0;
    overflow: auto;
    border-radius: var(--athena-radius);
    background: var(--athena-surface-alt);
    color: var(--athena-fg);
    counter-reset: line;
}

.athena-code code {
    display: block;
    min-width: max-content;
    font: inherit;
}

.athena-code.code-wrap code {
    min-width: 0;
}

.code-line {
    display: block;
    min-height: 1lh;
    padding: 0 12px;
}

.tok-comment { color: var(--athena-tok-comment); }
.tok-string { color: var(--athena-tok-string); }
.tok-number { color: var(--athena-tok-number); }
.tok-keyword { color: var(--athena-tok-keyword); }
.tok-literal { color: var(--athena-tok-literal); }
.tok-function { color: var(--athena-tok-function); }
.tok-type { color: var(--athena-tok-type); }
.tok-property { color: var(--athena-tok-property); }
.tok-tag { color: var(--athena-tok-tag); }
.tok-attribute { color: var(--athena-tok-attribute); }
.tok-variable { color: var(--athena-tok-variable); }
.tok-selector { color: var(--athena-tok-selector); }
.tok-meta { color: var(--athena-tok-meta); }
.tok-entity { color: var(--athena-tok-entity); }
.tok-builtin { color: var(--athena-tok-builtin); }
.tok-operator { color: var(--athena-tok-operator); }
.tok-punctuation { color: var(--athena-tok-punctuation); }
.tok-comment { font-style: italic; }
.tok-tag, .tok-keyword { font-weight: 600; }

.code-digits-1 { --code-gutter: 2ch; }
.code-digits-2 { --code-gutter: 2ch; }
.code-digits-3 { --code-gutter: 3ch; }
.code-digits-4 { --code-gutter: 4ch; }
.code-digits-5 { --code-gutter: 5ch; }
.code-digits-6 { --code-gutter: 6ch; }
.code-digits-7 { --code-gutter: 7ch; }

.athena-code.has-line-numbers .code-line::before {
    content: counter(line);
    counter-increment: line;
    display: inline-block;
    position: sticky;
    left: 0;
    width: var(--code-gutter, 2ch);
    margin-right: 1.5ch;
    text-align: right;
    text-indent: 0;
    color: var(--athena-muted);
    background: var(--athena-surface-alt);
    user-select: none;
}

.athena-code.has-line-numbers.code-wrap .code-line {
    padding-left: calc(12px + var(--code-gutter, 2ch) + 1.5ch);
    text-indent: calc(-1 * (var(--code-gutter, 2ch) + 1.5ch));
}

/* folding: the arrow stands beside the number, a mark after the folded line; the numbers go on after the hidden lines */
.code-editor.has-folding { --code-fold: 2ch; }
.code-editor.has-folding .athena-code.has-line-numbers .code-line::before { content: counter(line) "\2007\2007"; width: calc(var(--code-gutter, 2ch) + var(--code-fold)); }
.code-editor.has-folding .athena-code.has-line-numbers .code-line.is-foldable::before { content: counter(line) "\2007▾"; }
.code-editor.has-folding .athena-code.has-line-numbers .code-line.is-folded::before { content: counter(line) "\2007▸"; }
.code-editor.has-folding .code-line.is-folded::after {
    content: " ⋯";
    color: var(--athena-muted);
    counter-increment: line var(--code-hidden, 0);
}

.code-editor-body { display: flex; min-width: 0; min-height: 0; flex: 1; }
.code-editor-body > .code-editor-scroll { flex: 1; min-width: 0; }

.code-minimap {
    position: relative;
    flex: none;
    width: 80px;
    overflow: hidden;
    border-left: var(--athena-border-width) solid var(--athena-line);
    background: var(--athena-surface-alt);
    cursor: pointer;
    touch-action: none;
}
.code-minimap-canvas { position: absolute; top: 0; left: 0; width: 80px; height: 100%; }
.code-minimap-view {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--code-minimap-top, 0);
    height: var(--code-minimap-size, 0);
    background: color-mix(in srgb, var(--athena-accent) 18%, transparent);
}
.code-editor.has-minimap { container-type: inline-size; }
@container (max-width: 480px) {
    .code-minimap { display: none; }
}

.code-editor-cursors { position: absolute; inset: 0 0 auto 0; height: 0; pointer-events: none; }
.code-editor-cursor {
    position: absolute;
    top: var(--code-cursor-top);
    left: var(--code-cursor-left);
    width: 2px;
    height: 1.2em;
    background: var(--athena-fg);
}
::highlight(athena-code-cursors) { background-color: color-mix(in srgb, var(--athena-accent) 35%, transparent); }

.code-line.is-highlighted {
    background: color-mix(in srgb, var(--athena-accent) 14%, transparent);
}

.code-tab-1 .athena-code,
.code-tab-1 .code-editor-input { tab-size: 1; }
.code-tab-2 .athena-code,
.code-tab-2 .code-editor-input { tab-size: 2; }
.code-tab-3 .athena-code,
.code-tab-3 .code-editor-input { tab-size: 3; }
.code-tab-4 .athena-code,
.code-tab-4 .code-editor-input { tab-size: 4; }
.code-tab-5 .athena-code,
.code-tab-5 .code-editor-input { tab-size: 5; }
.code-tab-6 .athena-code,
.code-tab-6 .code-editor-input { tab-size: 6; }
.code-tab-7 .athena-code,
.code-tab-7 .code-editor-input { tab-size: 7; }
.code-tab-8 .athena-code,
.code-tab-8 .code-editor-input { tab-size: 8; }
.code-tab-9 .athena-code,
.code-tab-9 .code-editor-input { tab-size: 9; }
.code-tab-10 .athena-code,
.code-tab-10 .code-editor-input { tab-size: 10; }
.code-tab-11 .athena-code,
.code-tab-11 .code-editor-input { tab-size: 11; }
.code-tab-12 .athena-code,
.code-tab-12 .code-editor-input { tab-size: 12; }
.code-tab-13 .athena-code,
.code-tab-13 .code-editor-input { tab-size: 13; }
.code-tab-14 .athena-code,
.code-tab-14 .code-editor-input { tab-size: 14; }
.code-tab-15 .athena-code,
.code-tab-15 .code-editor-input { tab-size: 15; }
.code-tab-16 .athena-code,
.code-tab-16 .code-editor-input { tab-size: 16; }

/* A block: the language, a copy button, the code */
.code-block {
    margin: 0 0 1rem;
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    overflow: hidden;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 8px 4px 12px;
    border-bottom: var(--athena-border-width) solid var(--athena-line);
    background: var(--athena-surface);
    color: var(--athena-muted);
    font-size: 0.8rem;
}

.code-block .athena-code {
    border-radius: 0;
}

.code-block-copy,
.code-find-button {
    padding: 2px 8px;
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    background: var(--athena-bg);
    color: var(--athena-fg);
    font: inherit;
    cursor: pointer;
}

.code-block-copy:hover,
.code-find-button:hover {
    background: var(--athena-hover);
}

.code-block-copy:focus-visible,
.code-find-button:focus-visible,
.code-find-input:focus-visible,
.athena-code:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus);
    outline-offset: 1px;
}

/* The editor */
.code-editor {
    position: relative;
    display: flex;
    flex-direction: column;
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    background: var(--athena-surface-alt);
}

.code-editor:focus-within {
    outline: var(--athena-focus-width) solid var(--athena-focus);
    outline-offset: 1px;
}

.code-editor-scroll {
    display: grid;
    grid-template-columns: minmax(100%, max-content);
    grid-template-rows: minmax(100%, auto);
    position: relative;
    min-height: var(--code-editor-min-height, 8rem);
    max-height: var(--code-editor-max-height, 32rem);
    overflow: auto;
    cursor: text;
}

.code-editor.code-wrap .code-editor-scroll {
    grid-template-columns: minmax(0, 100%);
}

.code-editor-highlight {
    grid-area: 1 / 1;
    overflow: visible;
    border-radius: 0;
    pointer-events: none;
}

.code-editor-highlight code {
    min-width: 0;
}

.code-editor-input {
    grid-area: 1 / 1;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    outline: 0;
    resize: none;
    overflow: hidden;
    background: transparent;
    color: transparent;
    caret-color: var(--athena-fg);
}

.code-editor-highlight.has-line-numbers ~ .code-editor-input {
    padding-left: calc(12px + var(--code-gutter, 2ch) + 1.5ch);
}

.code-editor.has-folding .code-editor-highlight.has-line-numbers ~ .code-editor-input {
    padding-left: calc(12px + var(--code-gutter, 2ch) + var(--code-fold) + 1.5ch);
}
.code-editor.has-folding .athena-code.has-line-numbers.code-wrap .code-line {
    padding-left: calc(12px + var(--code-gutter, 2ch) + var(--code-fold) + 1.5ch);
    text-indent: calc(-1 * (var(--code-gutter, 2ch) + var(--code-fold) + 1.5ch));
}

.code-editor-input::selection {
    background: color-mix(in srgb, var(--athena-accent) 35%, transparent);
    color: transparent;
}

.code-editor.is-readonly .code-editor-input {
    cursor: default;
}

.code-editor-highlight.is-plain {
    white-space: pre;
}

.code-line.is-current {
    background: color-mix(in srgb, var(--athena-fg) 7%, transparent);
}

.code-line.is-locked-line {
    background: color-mix(in srgb, var(--athena-muted) 14%, transparent);
}

.code-line.has-locked-text {
    background: color-mix(in srgb, var(--athena-muted) 7%, transparent);
}

.code-line.has-marker {
    text-decoration: underline wavy;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.code-line.marker-error { text-decoration-color: var(--athena-danger); }
.code-line.marker-warning { text-decoration-color: var(--athena-warning); }
.code-line.marker-info { text-decoration-color: var(--athena-info); }
.code-line.marker-error::before { color: var(--athena-danger); font-weight: 700; }
.code-line.marker-warning::before { color: var(--athena-warning); font-weight: 700; }

.code-editor-status {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 10px;
    border-top: var(--athena-border-width) solid var(--athena-line);
    color: var(--athena-muted);
    font-size: 0.8rem;
}

.code-find {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 8px;
    border-bottom: var(--athena-border-width) solid var(--athena-line);
    background: var(--athena-surface);
}

.code-find[hidden],
.code-find-row[hidden] {
    display: none;
}

.code-find-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.code-find-input {
    flex: 1;
    min-width: 8rem;
    padding: 3px 6px;
    border: var(--athena-border-width) solid var(--athena-field-border, var(--athena-line));
    border-radius: var(--athena-radius);
    background: var(--athena-bg);
    color: var(--athena-fg);
    font: inherit;
}

.code-find-input[aria-invalid="true"] {
    border-color: var(--athena-danger);
}

.code-find-button[aria-pressed="true"] {
    background: var(--athena-accent);
    color: var(--athena-accent-fg);
}

.code-find-count {
    min-width: 6ch;
    color: var(--athena-muted);
    font-size: 0.8rem;
}

.code-completions {
    position: absolute;
    top: var(--code-completion-top, 0);
    left: var(--code-completion-left, 0);
    z-index: 5;
    min-width: 12rem;
    max-height: 12rem;
    margin: 0;
    padding: 2px;
    overflow: auto;
    list-style: none;
    border: var(--athena-border-width) solid var(--athena-border);
    border-radius: var(--athena-radius);
    background: var(--athena-bg);
    color: var(--athena-fg);
    box-shadow: var(--athena-shadow);
}

.code-completions[hidden] {
    display: none;
}

.code-completion {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 2px 8px;
    border-radius: var(--athena-radius);
    font: 0.85rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    cursor: pointer;
}

.code-completion-detail {
    color: var(--athena-muted);
}

.code-completion.is-active {
    background: var(--athena-accent);
    color: var(--athena-accent-fg);
}

.code-completion.is-active .code-completion-detail {
    color: inherit;
}

::highlight(athena-code-bracket) {
    background-color: color-mix(in srgb, var(--athena-accent) 40%, transparent);
}

::highlight(athena-code-find) {
    background-color: color-mix(in srgb, var(--athena-warning) 35%, transparent);
}

::highlight(athena-code-find-current) {
    background-color: color-mix(in srgb, var(--athena-warning) 75%, transparent);
}

/* The diff view */
.code-diff {
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    overflow: hidden;
}

.code-diff-header {
    display: flex;
    gap: 12px;
    padding: 4px 12px;
    border-bottom: var(--athena-border-width) solid var(--athena-line);
    background: var(--athena-surface);
    font-size: 0.8rem;
}

.code-diff[data-mode="split"] .code-diff-header {
    display: grid;
    grid-template-columns: auto auto 1fr 1fr;
}

.code-diff-stat.is-added { color: var(--athena-success); }
.code-diff-stat.is-removed { color: var(--athena-danger); }

.code-diff-code {
    border-radius: 0;
    padding: 0;
}

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

.code-diff-body.is-split .code-diff-row {
    grid-template-columns: 1fr 1fr;
}

.code-diff-cell {
    display: grid;
    grid-template-columns: 4ch 2ch 1fr;
    gap: 0 4px;
    padding: 0 8px;
}

.code-diff-cell .code-line {
    padding: 0;
}

.code-diff-cell.is-added { background: color-mix(in srgb, var(--athena-success) 16%, transparent); }
.code-diff-cell.is-removed { background: color-mix(in srgb, var(--athena-danger) 16%, transparent); }
.code-diff-cell.is-empty { background: color-mix(in srgb, var(--athena-muted) 8%, transparent); }

.code-diff-number,
.code-diff-mark {
    color: var(--athena-muted);
    text-align: right;
    user-select: none;
}

.code-diff-mark {
    text-align: center;
}

.code-diff-row.is-skip {
    padding: 2px 12px;
    background: var(--athena-surface);
}

.code-diff-skip {
    padding: 0;
    border: 0;
    background: none;
    color: var(--athena-accent);
    font: inherit;
    cursor: pointer;
}

.code-diff-empty {
    margin: 0;
    padding: 8px 12px;
    color: var(--athena-muted);
}

/* JSON tree: a collapsible view of any JSON value (native details / summary) */
.athena-json-tree {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    color: var(--athena-fg);
}

.athena-jt-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--athena-space-2);
    margin-bottom: var(--athena-space-2);
}

.athena-jt-btn {
    padding: 2px 8px;
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    background: var(--athena-surface);
    color: var(--athena-fg);
    font: inherit;
    cursor: pointer;
}

.athena-jt-btn:hover { background: var(--athena-hover); }
.athena-jt-btn:focus-visible { outline: var(--athena-focus-width) solid var(--athena-focus); outline-offset: 2px; }

.athena-jt-tree details { margin: 2px 0; }
.athena-jt-tree summary { cursor: pointer; padding: 2px 0; }
.athena-jt-children { margin-left: 1rem; padding-left: 0.75rem; border-left: var(--athena-border-width) solid var(--athena-line); }
.athena-jt-row { padding: 2px 0; overflow-wrap: anywhere; }
.athena-jt-key { color: var(--athena-tok-property); }
.athena-jt-string { color: var(--athena-tok-string); }
.athena-jt-number { color: var(--athena-tok-number); }
.athena-jt-boolean { color: var(--athena-tok-literal); }
.athena-jt-null { color: var(--athena-tok-keyword); font-style: italic; }
.athena-jt-brace { color: var(--athena-muted); }
.athena-jt-more { color: var(--athena-muted); font-style: italic; padding: 2px 0; }
.athena-jt-actions { margin-left: var(--athena-space-2); white-space: nowrap; }
.athena-jt-actions .athena-jt-btn { padding: 0 4px; font-size: 0.8em; }
@media (pointer: coarse) {
    .athena-jt-btn,
    .athena-jt-actions .athena-jt-btn { min-width: 44px; min-height: 44px; }
    .athena-jt-tree summary { padding: 11px 0; }
    .athena-jt-actions { display: inline-flex; gap: 4px; vertical-align: middle; }
}
.athena-jt-hit { background: var(--athena-accent); color: var(--athena-accent-fg); border-radius: 2px; }

}

/* ---- ATH-60..69: tones, chips, toolbar, split, copy and secret rows, a collapsible sidebar, a scrolling table, an HTML chart legend ---- */

/* Badge tones: eight colour pairs the application gives its own meaning (the text says it, not the colour) */
.badge-tone-1 {
    background-color: var(--athena-tone-1);
    color: var(--athena-tone-1-fg);
    border-color: transparent;
}

.badge-tone-2 {
    background-color: var(--athena-tone-2);
    color: var(--athena-tone-2-fg);
    border-color: transparent;
}

.badge-tone-3 {
    background-color: var(--athena-tone-3);
    color: var(--athena-tone-3-fg);
    border-color: transparent;
}

.badge-tone-4 {
    background-color: var(--athena-tone-4);
    color: var(--athena-tone-4-fg);
    border-color: transparent;
}

.badge-tone-5 {
    background-color: var(--athena-tone-5);
    color: var(--athena-tone-5-fg);
    border-color: transparent;
}

.badge-tone-6 {
    background-color: var(--athena-tone-6);
    color: var(--athena-tone-6-fg);
    border-color: transparent;
}

.badge-tone-7 {
    background-color: var(--athena-tone-7);
    color: var(--athena-tone-7-fg);
    border-color: transparent;
}

.badge-tone-8 {
    background-color: var(--athena-tone-8);
    color: var(--athena-tone-8-fg);
    border-color: transparent;
}

/* Stat as a link */

a.stat-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.stat-link:hover {
    box-shadow: var(--athena-shadow);
}

.stat-link:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent));
    outline-offset: 2px;
}

/* Chips outside the multi-select: flat, with an optional count, a toggle state and a remove button */

.chip-flat {
    padding: 0;
    background-color: var(--athena-surface-alt);
    color: var(--athena-fg);
    border: var(--athena-border-width) solid var(--athena-line);
}

.chip-flat .chip-main {
    display: inline-flex;
    align-items: center;
    gap: var(--athena-space-1);
    padding: 2px 10px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: inherit;
    font: inherit;
}

.chip-flat button.chip-main {
    cursor: pointer;
}

.chip-flat button.chip-main:hover {
    background-color: var(--athena-hover);
}

.chip-flat .chip-main:focus-visible,
.chip-flat .chip-remove:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent));
    outline-offset: 1px;
}

.chip-count {
    font-weight: 700;
}

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

.chip-flat .chip-remove {
    padding: 0 8px 0 2px;
    align-self: stretch;
    border-radius: 0 999px 999px 0;
}

/* "On" is shown by more than the colour: a tick, a heavier text and a ring */
.chip-flat.is-pressed {
    background-color: var(--athena-accent);
    color: var(--athena-accent-fg);
    border-color: transparent;
    font-weight: 600;
}

.chip-flat.is-pressed .chip-main::before {
    content: "\2713";
}

.chip-flat.chip-tone-1.is-pressed, .chip-flat.chip-tone-2.is-pressed, .chip-flat.chip-tone-3.is-pressed, .chip-flat.chip-tone-4.is-pressed,
.chip-flat.chip-tone-5.is-pressed, .chip-flat.chip-tone-6.is-pressed, .chip-flat.chip-tone-7.is-pressed, .chip-flat.chip-tone-8.is-pressed {
    box-shadow: 0 0 0 2px var(--athena-fg);
}

.chip-tone-1 {
    background-color: var(--athena-tone-1);
    color: var(--athena-tone-1-fg);
    border-color: transparent;
}

.chip-tone-2 {
    background-color: var(--athena-tone-2);
    color: var(--athena-tone-2-fg);
    border-color: transparent;
}

.chip-tone-3 {
    background-color: var(--athena-tone-3);
    color: var(--athena-tone-3-fg);
    border-color: transparent;
}

.chip-tone-4 {
    background-color: var(--athena-tone-4);
    color: var(--athena-tone-4-fg);
    border-color: transparent;
}

.chip-tone-5 {
    background-color: var(--athena-tone-5);
    color: var(--athena-tone-5-fg);
    border-color: transparent;
}

.chip-tone-6 {
    background-color: var(--athena-tone-6);
    color: var(--athena-tone-6-fg);
    border-color: transparent;
}

.chip-tone-7 {
    background-color: var(--athena-tone-7);
    color: var(--athena-tone-7-fg);
    border-color: transparent;
}

.chip-tone-8 {
    background-color: var(--athena-tone-8);
    color: var(--athena-tone-8-fg);
    border-color: transparent;
}

/* Toolbar */

.athena-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--athena-space-2) var(--athena-space-3);
    margin-bottom: var(--athena-space-3);
}

.athena-toolbar-start,
.athena-toolbar-end {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--athena-space-2);
    min-width: 0;
}

.athena-toolbar-end {
    margin-inline-start: auto;
}

.athena-toolbar-end:empty {
    display: none;
}

/* Split: a list and its detail */

.athena-split {
    display: grid;
    grid-template-columns: var(--split-list, minmax(0, 1fr)) var(--split-detail, minmax(0, 1.3fr));
    gap: var(--athena-space-3);
    align-items: start;
}

.athena-split.is-stacked {
    grid-template-columns: minmax(0, 1fr);
}

.athena-split-list,
.athena-split-detail {
    min-width: 0;
}

/* Copy button and a row for a value to copy */

.copy-button {
    min-width: 5rem;
}

.secret-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--athena-space-2);
}

.secret-label {
    font-weight: 600;
}

.secret-value {
    flex: 1 1 14rem;
    min-width: 0;
    padding: 6px 10px;
    border: 1px dashed var(--athena-line);
    border-radius: var(--athena-radius);
    background-color: var(--athena-surface-alt);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
    user-select: all;
}

/* Collapsible sidebar (wide screens only; a phone has the menu button) */

.sidebar-collapse {
    display: none;
}

@media (min-width: 769px) {
    .sidebar-collapse {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        margin: 0 0 var(--athena-space-1) auto;
        padding: 0;
        border: var(--athena-border-width) solid var(--athena-line);
        border-radius: var(--athena-radius);
        background: none;
        color: var(--athena-muted);
        font: inherit;
        cursor: pointer;
    }

    .sidebar-collapse:hover {
        background-color: var(--athena-hover);
        color: var(--athena-fg);
    }

    .sidebar-collapse:focus-visible {
        outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent));
        outline-offset: 1px;
    }

    .sidebar-collapsed {
        width: 3.75rem;
        min-width: 0;
        flex-basis: 3.75rem;
    }

    .sidebar-collapsed .sidebar-collapse {
        margin-inline: auto;
    }

    .sidebar-collapsed .sidebar-link {
        position: relative;
        justify-content: center;
        padding-inline: var(--athena-space-1);
    }

    /* the text stays for screen readers; only a count or badge in the link stays drawn */
    .sidebar-collapsed .sidebar-link > .sidebar-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .sidebar-collapsed .sidebar-icon {
        font-size: 1.15em;
    }

    .sidebar-collapsed .sidebar-link > :not(.sidebar-icon):not(.sidebar-text) {
        position: absolute;
        top: 0;
        right: 0;
        margin: 0;
    }

    .sidebar-collapsed .sidebar-sublist,
    .sidebar-collapsed .sidebar-parent {
        display: none;
    }
}

@media (pointer: coarse) {
    .sidebar-collapse {
        width: 44px;
        height: 44px;
    }
}

/* A table that scrolls sideways in its own frame (option scroll): a shadow shows on the side where more is hidden */

.athena-table-scrollable {
    border: var(--athena-border-width) solid var(--athena-line);
    border-radius: var(--athena-radius);
    background:
        linear-gradient(to right, var(--athena-bg) 30%, transparent) left center / 28px 100% no-repeat local,
        linear-gradient(to left, var(--athena-bg) 30%, transparent) right center / 28px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgb(0 0 0 / 28%), transparent) left center / 10px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgb(0 0 0 / 28%), transparent) right center / 10px 100% no-repeat scroll;
    background-color: var(--athena-bg);
}

.athena-table-scrollable:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent));
    outline-offset: 1px;
}

/* Chart legend next to the drawing (option legend: "html") */

.chart-legend-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--athena-space-1) var(--athena-space-3);
    margin: var(--athena-space-2) 0 0;
    padding: 0;
    list-style: none;
}

.chart-legend-button {
    display: inline-flex;
    align-items: center;
    gap: var(--athena-space-2);
    padding: 2px 4px;
    border: 0;
    border-radius: var(--athena-radius-control, 4px);
    background: none;
    color: var(--athena-fg);
    font: inherit;
    cursor: pointer;
}

.chart-legend-button:hover {
    background-color: var(--athena-hover);
}

.chart-legend-button:focus-visible {
    outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent));
    outline-offset: 1px;
}

.chart-legend-swatch .chart-swatch {
    fill: currentColor;
}

/* a hidden series: the text is struck through, so it is not only the swatch that tells */
.chart-legend-button.is-off {
    color: var(--athena-muted);
    text-decoration: line-through;
}

.chart-legend-button.is-off .chart-legend-swatch {
    opacity: 0.35;
}

@media (pointer: coarse) {
    .chip-flat .chip-main,
    .chip-flat .chip-remove,
    .chart-legend-button {
        min-height: 44px;
    }

    .chip-flat .chip-remove {
        min-width: 44px;
    }
}
