:root {
    --warn-bg: #fff8e6;
    --warn-border: #e6c34a;
}

@media (prefers-color-scheme: dark) {
    :root {
        --warn-bg: #2a2410;
        --warn-border: #8a742c;
    }
}

.container.analysis {
    max-width: 46em;
}

.analysis a.button {
    color: var(--button-text);
}

.analysis .panel {
    border: 1px solid var(--base-variant);
    border-radius: 6px;
    padding: 0.25em 1em 1em;
    margin: 1em 0;
}

.analysis .panel > h2:first-child {
    margin-top: 0.75em;
}

.analysis .button.secondary,
.analysis a.button.secondary {
    background: var(--base-variant);
    color: var(--text-color-primary);
}

.analysis .button.secondary:hover {
    background: var(--button-secondary-hover);
}

.analysis h2 {
    font-size: 1.1em;
    margin: 1.5em 0 0.5em;
}

#account {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em 0.75em;
    margin: 1em 0;
}

#account .button {
    padding: 6px 16px;
    font-size: 0.9em;
}

.analysis form {
    margin: 1.5em 0;
    display: grid;
    gap: 0.75em;
}

.analysis .field {
    display: grid;
    gap: 0.25em;
}

.analysis label {
    font-weight: 600;
}

.analysis input[type="text"],
.analysis textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 0.5em 0.65em;
    border: 1px solid var(--button-disabled-color);
    border-radius: 6px;
    background: var(--base-color);
    color: var(--text-color-primary);
    font: inherit;
}

.analysis input:focus-visible,
.analysis textarea:focus-visible,
.analysis .button:focus-visible {
    outline: 2px solid var(--text-link-color);
    outline-offset: 1px;
}

.analysis .button {
    width: auto;
    padding: 10px 24px;
    justify-self: start;
}

.analysis .button[disabled] {
    cursor: wait;
}

#status {
    opacity: 0.75;
}

/* Empty status boxes take no space */
#status:empty,
#draft-error:empty,
#pr-status:empty {
    margin: 0;
}

#overview p {
    margin: 0.25em 0;
    overflow-wrap: anywhere;
}

.analysis table {
    border-collapse: collapse;
    margin: 1em 0;
    width: 100%;
}

.analysis th,
.analysis td {
    border-bottom: 1px solid var(--base-variant);
}

.analysis td:nth-child(2),
.analysis td:nth-child(3),
.analysis th:nth-child(2),
.analysis th:nth-child(3) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

#warnings {
    background: var(--warn-bg);
    border: 1px solid var(--warn-border);
    border-radius: 6px;
    padding: 0.25em 1em 0.75em;
    margin: 1em 0;
}

#warnings h2 {
    margin-top: 0.75em;
}

#warnings ul {
    margin: 0;
    padding-left: 1.25em;
}

#warnings li {
    margin: 0.25em 0;
    overflow-wrap: anywhere;
}

#draft-hint,
#draft-notes {
    opacity: 0.75;
    font-size: 0.9em;
    overflow-wrap: anywhere;
}

#draft-hint {
    margin-top: 0;
}

#favicon {
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin-top: 0.75em;
}

#favicon img {
    background: var(--base-variant);
    border: 1px solid var(--button-disabled-color);
    border-radius: 3px;
}

#favicon .button {
    padding: 6px 16px;
    font-size: 0.9em;
}

.analysis textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8em;
    resize: vertical;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    margin-top: 0.5em;
}

#issue-note {
    opacity: 0.75;
    font-size: 0.9em;
}

#draft-error {
    font-size: 0.9em;
    font-weight: 600;
}

#pr-status {
    opacity: 0.75;
    font-size: 0.9em;
    overflow-wrap: anywhere;
}

#pr-link {
    display: inline-block;
    margin-bottom: 0.5em;
}

.footnote {
    margin-top: 2.5em;
    font-size: 0.85em;
    opacity: 0.75;
}
