/*
 * What the app thinks it knows: who is signed in, what they are allowed to do,
 * what it is talking to, and what it has kept on this device.
 *
 * This is the page somebody opens when the app is behaving in a way they do not
 * understand, so nothing here is summarised or tidied away — it shows what it
 * was told, exactly, and says where each part of it came from.
 */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-block: var(--space-2);
}

.topbar-inner > h1 {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.narrow-only {
    display: none;
}

@media (max-width: 34rem) {
    .topbar-inner > h1 {
        font-size: var(--text-xl);
    }

    .wide-only {
        display: none;
    }

    .narrow-only {
        display: inline;
    }
}

main {
    padding-bottom: var(--space-7);
}

section > h2 {
    font-size: var(--text-lg);
}

/* NAME AND VALUE */

/* Side by side while there is room for the widest name, and stacked once there
   is not: a two-column grid on a phone turns a list of values into a staircase
   one character wide. */
dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-2) var(--space-5);
    margin: 0;
}

dt {
    font-weight: 600;
    color: var(--text-2);
}

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

@media (max-width: 34rem) {
    dl {
        grid-template-columns: 1fr;
        gap: var(--space-1);
    }

    dd {
        margin-bottom: var(--space-2);
    }
}

/* A value that is not there is not the same as one that is empty, and reads
   differently. */
.absent {
    color: var(--danger);
    font-style: italic;
}

.present {
    color: var(--brand);
    font-weight: 600;
}

/* WHAT IT WAS TOLD, WORD FOR WORD */

pre {
    margin: 0;
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    background-color: var(--surface-1);
    color: var(--text-1);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    overflow-x: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* The one section that is only ever there when something has gone wrong. */
#failure-section {
    border-color: var(--danger);
}

#failure-section > h2 {
    color: var(--danger);
}
