@layer tokens, base, layout, components, pages;

@layer components {
  /* A small capital label over a group of things: a rail section, a card's subject. */
  .legend {
    color: var(--ink-soft);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    line-height: 1.3;
    text-transform: uppercase;
  }

  .data {
    font-family: var(--font-data);
    font-size: var(--step--1);
    font-variant-numeric: tabular-nums;
  }

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

  /* For values that stop making sense when broken: a cron expression, a time. */
  .nowrap {
    white-space: nowrap;
  }

  /* Read by screen readers, not shown: a column heading for a column of buttons. */
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .lede {
    max-width: 68ch;
    color: var(--ink-soft);
  }

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

  .icon {
    flex: none;
    width: 1.1em;
    height: 1.1em;
  }

  /* A value with its icon in front: a duration and its clock. */
  .with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    white-space: nowrap;
  }

  .with-icon .icon {
    color: var(--ink-soft);
  }

  /* --- State badges ("lamps") -------------------------------------------- */

  .lamp {
    --lamp: var(--lamp-cancelled);
    --wash: var(--wash-cancelled);
    --lamp-icon: var(--icon-circle);
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.2rem 0.6rem 0.2rem 0.45rem;
    border-radius: var(--radius-control);
    background: var(--wash);
    color: var(--lamp);
    font-size: var(--step--2);
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
  }

  .lamp::before {
    content: "";
    flex: none;
    width: 1.1em;
    height: 1.1em;
    background: currentColor;
    mask: var(--lamp-icon) center / contain no-repeat;
  }

  .lamp--queued { --lamp: var(--lamp-queued); --wash: var(--wash-queued); --lamp-icon: var(--icon-clock); }
  .lamp--running { --lamp: var(--lamp-running); --wash: var(--wash-running); --lamp-icon: var(--icon-spinner); }
  .lamp--waiting { --lamp: var(--lamp-waiting); --wash: var(--wash-waiting); --lamp-icon: var(--icon-pause-circle); }
  .lamp--completed { --lamp: var(--lamp-completed); --wash: var(--wash-completed); --lamp-icon: var(--icon-check-circle); }
  .lamp--failed { --lamp: var(--lamp-failed); --wash: var(--wash-failed); --lamp-icon: var(--icon-cross-circle); }
  .lamp--cancelled { --lamp-icon: var(--icon-stop-circle); }

  .lamp--running::before {
    animation: lamp-turn 1s steps(8) infinite;
  }

  .lamp--large {
    padding: 0.35rem 0.8rem 0.35rem 0.6rem;
    font-size: var(--step-0);
  }

  @keyframes lamp-turn {
    to { rotate: 1turn; }
  }

  /* --- Buttons -------------------------------------------------------- */

  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-weight: 650;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background-color 100ms ease, border-color 100ms ease, translate 80ms ease;
  }

  .button:hover {
    border-color: var(--ink-faint);
    background: var(--well);
  }

  .button:active {
    translate: 0 1px;
    box-shadow: none;
  }

  .button--primary {
    border-color: var(--signal);
    background: var(--signal);
    color: #fff;
    box-shadow: 0 1px 2px rgb(59 69 212 / 0.25), 0 2px 6px rgb(59 69 212 / 0.2);
  }

  .button--primary:hover {
    border-color: var(--signal-deep);
    background: var(--signal-deep);
  }

  .button--danger {
    border-color: color-mix(in srgb, var(--lamp-failed) 45%, var(--surface));
    color: var(--lamp-failed);
  }

  .button--danger:hover {
    border-color: var(--lamp-failed);
    background: var(--wash-failed);
  }

  .button--quiet {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: var(--ink-soft);
  }

  .button--quiet:hover {
    border-color: transparent;
    background: var(--panel-deep);
    color: var(--ink);
  }

  /* A button that is only an icon: square, and named for screen readers. */
  .button--icon {
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
  }

  .button--icon .icon {
    width: 1.15rem;
    height: 1.15rem;
  }

  /* Drawn where a button would be when there is nothing for it to do: the
     arrow to a later run, on the latest. */
  .button.is-idle {
    opacity: 0.4;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
  }

  /* A filter button while its filter is in force. */
  .button.is-set {
    border-color: var(--signal);
    background: var(--signal-wash);
    color: var(--signal-deep);
  }

  /* On the rail a button is a raised panel of the rail's own colour. */
  .rail .button {
    justify-content: flex-start;
    gap: var(--space-3);
    width: 100%;
    padding: 0.6rem var(--space-3);
    border-color: transparent;
    background: var(--rail-raise);
    color: var(--rail-ink);
    box-shadow: none;
  }

  .rail .button:hover {
    border-color: var(--rail-rule);
    background: var(--rail-rule);
    color: #fff;
  }

  .rail .button .icon {
    width: 1.2rem;
    height: 1.2rem;
  }

  .rail .legend {
    color: var(--rail-ink-soft);
    font-weight: 600;
  }

  .button--small {
    padding: 0.35rem 0.7rem;
    font-size: var(--step--1);
  }

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

  form.button_to {
    display: inline-flex;
  }

  @media (max-width: 60rem) {
    .rail .button {
      width: auto;
      padding: 0.35rem 0.7rem;
    }
  }

  /* --- Plates (cards) ---------------------------------------------------- */

  .plate {
    display: grid;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .plate--flush {
    padding: 0;
    gap: 0;
  }

  .plate__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
  }

  .plate--attention {
    border-color: color-mix(in srgb, var(--lamp-waiting) 35%, var(--surface));
    background: var(--wash-waiting);
  }

  .plate--failed {
    border-color: color-mix(in srgb, var(--lamp-failed) 35%, var(--surface));
    background: var(--wash-failed);
  }

  .plate--quiet {
    background: var(--panel);
    box-shadow: none;
  }

  /* --- Notices ----------------------------------------------------------- */

  .notice {
    padding: var(--space-3) var(--space-4);
    border: 1px solid color-mix(in srgb, var(--lamp-completed) 25%, var(--surface));
    border-radius: var(--radius-control);
    background: var(--wash-completed);
  }

  .notice--alert {
    border-color: color-mix(in srgb, var(--lamp-failed) 30%, var(--surface));
    background: var(--wash-failed);
  }

  .notice--waiting {
    border-color: color-mix(in srgb, var(--warn) 30%, var(--surface));
    background: var(--wash-warn);
  }

  /* --- Tables ------------------------------------------------------------ */

  .table-scroll {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--step--1);
  }

  .table th,
  .table td {
    padding: 0.7rem 0.625rem;
    border-bottom: 1px solid var(--rule-soft);
    text-align: left;
    vertical-align: middle;
  }

  .table th:first-child,
  .table td:first-child {
    padding-left: var(--space-4);
  }

  .table thead th {
    padding-block: 0.7rem;
    border-bottom: 1px solid var(--rule);
    background: var(--well);
    color: var(--ink-soft);
    font-weight: 650;
    white-space: nowrap;
  }

  /* A heading that sorts its column when followed. */
  .table thead th a {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    text-decoration: none;
  }

  .table thead th a:hover {
    color: var(--ink);
  }

  .table tbody tr:last-child td {
    border-bottom: 0;
  }

  .table tbody tr:hover {
    background: var(--well);
  }

  .table .numeric {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
  }

  .table tbody .numeric {
    font-weight: 550;
  }

  .table__primary {
    display: block;
    font-weight: 700;
    text-decoration: none;
  }

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

  /* Long text kept to two lines, so every row of a list is a like height. */
  .table__primary--clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }

  /* A cell kept to one line, cut short with an ellipsis when it is too long. */
  .table__clip {
    max-width: clamp(9rem, 16vw, 18rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .table__secondary {
    display: block;
    color: var(--ink-soft);
    font-size: var(--step--2);
  }

  /* A cell holding long text that may wrap: keeps a readable measure when the
     table is squeezed, and lets the table scroll sideways instead. */
  .table__roomy {
    min-width: 14rem;
  }

  /* A narrow last column for a row's menu. */
  .table__actions {
    width: 1%;
    padding-inline: var(--space-2) var(--space-3);
    text-align: right;
    white-space: nowrap;
  }

  .table tr.is-disabled td {
    color: var(--ink-faint);
  }

  /* --- Filters ------------------------------------------------------------ */

  /* A row of filters on the left and a search on the right, above a list. */
  .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
  }

  .toolbar__tools {
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }

  .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .tabs__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-control);
    background: var(--surface);
    font-size: var(--step--1);
    font-weight: 650;
    text-decoration: none;
    box-shadow: var(--shadow);
  }

  .tabs__item:hover {
    border-color: var(--rule-strong);
    background: var(--well);
  }

  .tabs__item[aria-current="true"] {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
  }

  .tabs__count {
    min-width: 1.6em;
    padding: 0 0.4em;
    border-radius: 6px;
    background: var(--panel-deep);
    color: var(--ink-soft);
    font-size: var(--step--2);
    font-variant-numeric: tabular-nums;
    text-align: center;
  }

  .tabs__item[aria-current="true"] .tabs__count {
    background: rgb(255 255 255 / 0.18);
    color: #fff;
  }

  .search {
    position: relative;
    display: block;
  }

  .search > .icon {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    width: 1.05rem;
    height: 1.05rem;
    translate: 0 -50%;
    color: var(--ink-faint);
    pointer-events: none;
  }

  .search > input {
    width: min(17rem, 60vw);
    height: 2.4rem;
    padding: 0 0.75rem 0 2.3rem;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    box-shadow: var(--shadow);
  }

  .search > input::placeholder {
    color: var(--ink-faint);
  }

  .search > input:focus-visible {
    border-color: var(--signal);
    outline: 3px solid var(--signal-wash);
    outline-offset: 0;
  }

  /* --- Tabs of a page, and tabs inside a card ----------------------------- */

  /* The parts of one thing (a run), as tabs along a rule under its title. */
  .pagetabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    border-bottom: 1px solid var(--rule);
  }

  .pagetabs__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: -1px;
    padding: 0.55rem 0.95rem;
    border-bottom: 2px solid transparent;
    border-radius: var(--radius-control) var(--radius-control) 0 0;
    color: var(--ink-soft);
    font-size: var(--step--1);
    font-weight: 650;
    text-decoration: none;
  }

  .pagetabs__item:hover {
    background: var(--panel-deep);
    color: var(--ink);
  }

  .pagetabs__item[aria-current="page"] {
    border-bottom-color: var(--ink);
    background: var(--surface);
    color: var(--ink);
  }

  .subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    border-bottom: 1px solid var(--rule-soft);
  }

  .subtabs__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    margin-bottom: -1px;
    padding: 0.35rem 0.1rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--ink-soft);
    font: inherit;
    font-size: var(--step--1);
    font-weight: 650;
    cursor: pointer;
  }

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

  .subtabs__item[aria-selected="true"] {
    border-bottom-color: var(--signal);
    color: var(--ink);
  }

  .subpanel {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
  }

  /* --- Card furniture ------------------------------------------------------ */

  /* A card's heading, behind its icon; the note is an aside in brackets. */
  .card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
    font-size: var(--step-0);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
  }

  .card-title > .icon {
    width: 1.25em;
    height: 1.25em;
    color: var(--ink-soft);
  }

  .card-title__note {
    color: var(--ink-soft);
    font-size: var(--step--1);
    font-weight: 500;
  }

  /* A word on a wash that says what happened to a thing: a file is new. */
  .pill {
    padding: 0.05rem 0.5rem;
    border-radius: 6px;
    background: var(--panel-deep);
    color: var(--ink-soft);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
  }

  .pill--new {
    background: var(--wash-completed);
    color: var(--lamp-completed);
  }

  .pill--updated {
    background: var(--signal-wash);
    color: var(--signal-deep);
  }

  .pill--moved {
    background: var(--wash-waiting);
    color: var(--lamp-waiting);
  }

  /* A file's name behind its icon, with anything that follows it. */
  .file-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    min-width: 0;
  }

  .file-name > .icon {
    color: var(--signal);
  }

  /* Names against values down a card, the names small and capital. */
  .details {
    display: grid;
    grid-template-columns: minmax(6rem, 8.5rem) minmax(0, 1fr);
    gap: var(--space-3) var(--space-4);
    align-items: baseline;
    font-size: var(--step--1);
  }

  .details dt {
    color: var(--ink-soft);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .details dd {
    overflow-wrap: anywhere;
  }

  /* A table inside a card: no box of its own, and small capital headings. */
  .table-scroll--bare {
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .table--tight th,
  .table--tight td {
    padding: 0.5rem 0.5rem;
  }

  .table--tight th:first-child,
  .table--tight td:first-child {
    padding-left: 0;
  }

  .table--tight thead th {
    padding-block: 0.4rem;
    border-bottom-color: var(--rule-soft);
    background: none;
    font-size: 0.6875rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .table--tight tfoot th,
  .table--tight tfoot td {
    border-top: 1px solid var(--rule);
    border-bottom: 0;
    font-weight: 700;
  }

  .table--tight .table__actions {
    padding-inline: 0;
  }

  .table--tight .table__primary {
    display: inline;
    font-weight: 600;
  }

  /* --- A long text cut short ------------------------------------------------ */

  /*
   * The clamp controller adds is-clamped to a text that runs past its lines
   * (--clamp-lines): the text is cut there and its last line fades into the
   * card, above a "Show more" that brings back the rest.
   */
  .clamp.is-clamped {
    position: relative;
    max-height: calc(var(--clamp-lines, 4) * 1lh);
    overflow: hidden;
  }

  .clamp.is-clamped::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1.5lh;
    background: linear-gradient(to bottom, transparent, var(--surface));
    pointer-events: none;
  }

  .clamp__toggle {
    justify-self: start;
    margin-top: calc(-1 * var(--space-2));
    padding: 0;
    border: 0;
    background: none;
    color: var(--signal);
    font: inherit;
    font-size: var(--step--1);
    font-weight: 650;
    cursor: pointer;
  }

  .clamp__toggle:hover {
    color: var(--signal-deep);
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  /* --- Menus -------------------------------------------------------------- */

  /*
   * A menu opened from a button (the popover attribute): it is drawn above
   * everything and closes when something else is clicked. The menu controller
   * places it under the button that opened it; left alone, the browser puts
   * it in the middle of the window.
   */
  .menu {
    min-width: 11rem;
    padding: var(--space-1);
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-size: var(--step--1);
    text-align: left;
    box-shadow: var(--shadow-raised);
  }

  .menu form {
    display: block;
  }

  .menu__item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.45rem 0.7rem;
    border: 0;
    border-radius: 6px;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 550;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }

  .menu__item:hover {
    background: var(--panel);
  }

  .menu__item--danger {
    color: var(--lamp-failed);
  }

  .menu__item--danger:hover {
    background: var(--wash-failed);
  }

  /* A menu that holds a small form rather than a list of actions. */
  .menu--form {
    width: 17rem;
    padding: var(--space-4);
  }

  .menu--form > form {
    display: grid;
    gap: var(--space-3);
  }

  /* --- Forms -------------------------------------------------------------- */

  .form {
    display: grid;
    gap: var(--space-5);
  }

  .fieldset {
    display: grid;
    gap: var(--space-4);
    margin: 0;
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .fieldset > legend {
    float: left;
    width: 100%;
    padding: 0;
    font-size: var(--step-1);
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .fieldset > legend + * {
    clear: both;
  }

  .field {
    display: grid;
    gap: var(--space-1);
  }

  .field > label,
  .field__label {
    font-weight: 650;
  }

  .field__hint {
    color: var(--ink-soft);
    font-size: var(--step--1);
  }

  .field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: var(--space-4);
  }

  .input,
  .field input[type="text"],
  .field input[type="email"],
  .field input[type="password"],
  .field input[type="number"],
  .field input[type="url"],
  .field input[type="search"],
  .field input[type="file"],
  .field select,
  .field textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
  }

  .field textarea {
    min-height: 7rem;
    resize: vertical;
    line-height: 1.5;
  }

  .field textarea.code,
  .field input.code {
    font-family: var(--font-data);
    font-size: var(--step--1);
  }

  .input:focus-visible,
  .field input:focus-visible,
  .field select:focus-visible,
  .field textarea:focus-visible {
    border-color: var(--signal);
    outline: 3px solid var(--signal-wash);
    outline-offset: 0;
  }

  .field_with_errors {
    display: contents;
  }

  .field_with_errors input,
  .field_with_errors select,
  .field_with_errors textarea {
    border-color: var(--lamp-failed);
  }

  .checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: var(--space-2) var(--space-4);
  }

  .check {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 var(--space-2);
    align-items: start;
    /* In a row with a taller neighbour, the name and its hint stay together. */
    align-content: start;
    padding: var(--space-2);
    border-radius: var(--radius-control);
  }

  .check:has(input:checked) {
    background: var(--signal-wash);
  }

  .check input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0.2rem 0 0;
    accent-color: var(--signal);
  }

  .check__name {
    font-weight: 650;
  }

  .check__hint {
    grid-column: 2;
    color: var(--ink-soft);
    font-size: var(--step--1);
    font-weight: 400;
  }

  /* Something about this choice that will stop it working as expected. */
  .check__warning {
    display: block;
    margin-top: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: 6px;
    background: var(--wash-warn);
    color: var(--ink);
  }

  .form__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
  }

  .errors {
    padding: var(--space-4);
    border: 1px solid color-mix(in srgb, var(--lamp-failed) 35%, var(--surface));
    border-radius: var(--radius-control);
    background: var(--wash-failed);
  }

  .errors ul {
    margin-top: var(--space-2);
    padding-left: 1.1rem;
    list-style: disc;
  }

  /* --- Readouts ------------------------------------------------------------ */

  .readout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-2) var(--space-4);
    align-items: baseline;
  }

  .readout dt {
    color: var(--ink-soft);
    font-size: var(--step--1);
  }

  .readout dd {
    font-size: var(--step--1);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
    overflow-wrap: anywhere;
  }

  /* For prose rather than figures: what an email says, not how many tokens. */
  .readout--wide dd {
    font-size: inherit;
    font-weight: 400;
    text-align: left;
    white-space: pre-wrap;
  }

  .gauge {
    grid-column: 1 / -1;
    height: 5px;
    margin-top: -0.2rem;
    border-radius: 999px;
    background: var(--panel-deep);
    overflow: hidden;
  }

  .gauge__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--signal);
  }

  .gauge--high .gauge__fill {
    background: var(--warn);
  }

  .gauge--full .gauge__fill {
    background: var(--lamp-failed);
  }

  /* --- Wells: verbatim content --------------------------------------------- */

  .well {
    max-height: 26rem;
    padding: var(--space-3) var(--space-4);
    overflow: auto;
    border: 1px solid var(--rule);
    border-radius: var(--radius-control);
    background: var(--well);
    font-family: var(--font-data);
    font-size: var(--step--1);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .well--prose {
    font-family: var(--font-body);
    font-size: var(--step-0);
  }

  /* Shown whole, inside something that already scrolls. */
  .well--open {
    max-height: none;
  }

  .disclosure > summary {
    cursor: pointer;
    color: var(--ink-soft);
    font-size: var(--step--1);
    font-weight: 600;
  }

  .disclosure > summary:hover {
    color: var(--ink);
  }

  .disclosure[open] > summary {
    margin-bottom: var(--space-2);
  }

  .disclosure__body {
    display: grid;
    gap: var(--space-3);
  }

  .tag {
    display: inline-block;
    padding: 0.05rem 0.45rem;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--panel);
    font-family: var(--font-data);
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .tag--warn {
    border-color: color-mix(in srgb, var(--warn) 35%, var(--surface));
    background: var(--wash-warn);
  }

  .empty {
    display: grid;
    gap: var(--space-3);
    justify-items: start;
    padding: var(--space-6) var(--space-5);
    border: 1.5px dashed var(--rule-strong);
    border-radius: var(--radius);
  }

  .pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
  }

  .crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    color: var(--ink-soft);
    font-size: var(--step--1);
  }

  .crumbs > * + *::before {
    content: "/";
    margin-right: 0.4em;
    color: var(--ink-faint);
  }
}
