.brief-page {
    max-width: 1000px;
    padding-top: 28px;
}

.brief-page-heading {
    display: grid;
    gap: 6px;
    margin: 20px 0;
    overflow-wrap: anywhere;
}

.brief-page-heading h1 {
    font-size: clamp(24px, 5vw, 32px);
}

.brief-page-heading p,
.brief-archive-entry small,
.brief-popup-heading time,
.brief-summary,
.brief-empty {
    color: var(--sub);
}

.brief-edition-heading {
    grid-template-columns: 1fr auto;
    align-items: start;
}

.brief-archive {
    overflow: hidden;
}

.brief-archive-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    overflow-wrap: anywhere;
}

.brief-archive-entry:last-child {
    border-bottom: 0;
}

.brief-archive-entry:hover {
    background: var(--soft);
    text-decoration: none;
}

.brief-archive-entry small {
    display: block;
    margin-top: 4px;
}

.brief-section-title {
    margin: 20px 0 8px;
    font-size: 17px;
}

.brief-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--sub);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.brief-badge .icon {
    width: 12px;
    height: 12px;
}

.brief-badge-pending {
    background: var(--orange-bg);
    color: var(--orange);
}

.brief-badge-green {
    background: var(--green-bg);
    color: var(--green);
}

.brief-badge-blue {
    background: var(--blue-bg);
    color: var(--blue);
}

.brief-badge-red {
    background: var(--red-bg);
    color: var(--red);
}

.brief-remark {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
}

.brief-remark-heading {
    display: flex;
    justify-content: space-between;
    gap: 8px 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.brief-remark-heading h3 {
    font-size: 14px;
}

.brief-summary {
    margin-top: 6px;
    line-height: 1.55;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.brief-empty {
    padding: 15px 18px;
}

.brief-reference,
.brief-choices,
.brief-popup-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 8px;
}

.brief-reference:empty {
    display: none;
}

.brief-reference {
    font-size: 12px;
}

.brief-choice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
}

.brief-choice::before {
    content: '';
    display: block;
    width: 11px;
    height: 11px;
    border: 1px solid var(--blue);
    border-radius: 2px;
}

.brief-choice:hover {
    background: var(--blue-bg);
    color: var(--blue);
    text-decoration: none;
}

.brief-choice:focus-visible,
.brief-archive-entry:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: -2px;
}

.brief-popup {
    box-sizing: border-box;
    width: min(650px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: clamp(16px, 4vw, 28px);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
    box-shadow: var(--shadow);
    overflow: auto;
    overscroll-behavior: contain;
}

.brief-popup::backdrop {
    background: rgb(12 25 46 / 56%);
}

.brief-popup-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.brief-popup-heading p {
    color: var(--blue);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
}

.brief-popup-heading h2 {
    margin: 5px 0;
    overflow-wrap: anywhere;
}

.brief-popup-links {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.view-tabs .brief-nav {
    color: var(--blue);
}

@media (max-width: 520px) {
    .brief-edition-heading {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .view-tabs:has(.brief-nav) {
        flex-wrap: wrap;
    }
}
