.risk-overview {
    padding: 14px;
}

.read-only-identifier {
    min-height: 39px;
    padding: 7px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 5px;
    background: #f2f4f7;
    color: #344054;
    cursor: not-allowed;
}

.read-only-identifier strong {
    margin-right: 8px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.read-only-identifier span {
    color: var(--muted);
    font-size: 12px;
}

.risk-key-grid,
.risk-secondary-grid {
    display: grid;
    gap: 12px;
}

.risk-key-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 12px;
}

.risk-secondary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.risk-key,
.risk-secondary-item {
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    padding: 10px 12px;
    white-space: pre-line;
}

.risk-key {
    border-left: 4px solid var(--brand);
    min-height: 86px;
}

.risk-key h2,
.risk-secondary-item strong {
    display: block;
    margin: 0 0 5px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--muted);
}

.actions-card {
    border-top: 4px solid var(--accent);
    padding: 14px;
}

.actions-card h2 {
    margin-bottom: 4px;
}

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

.compact-table .control-title {
    min-width: 210px;
    white-space: normal;
}

.badge.missing_online_check,
.badge.missing_ock {
    background: #fee4e2;
    color: var(--danger);
}

.badge.missing_any_check {
    background: #fef0c7;
    color: var(--warn);
}

.badge.undefined {
    background: #e4e7ec;
    color: #344054;
}

.badge.urgent {
    background: #fee4e2;
    color: var(--danger);
}

.badge.low_prio {
    background: #e0f2fe;
    color: #075985;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.badge.strategy {
    margin: 1px 4px 1px 0;
}

details.editor-card > summary,
details.control-picker > summary,
details.assessment-panel > summary,
details.action-panel > summary {
    cursor: pointer;
    font-weight: 700;
}

details.editor-card[open] > summary,
details.control-picker[open] > summary,
details.assessment-panel[open] > summary,
details.action-panel[open] > summary {
    margin-bottom: 14px;
}

details.editor-card > .card {
    border: 0;
    box-shadow: none;
    padding: 14px 0 0;
    margin: 0;
}

details.control-picker {
    margin-top: 12px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.assessment-panel > summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.assessment-summary {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.assessment-section {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px;
}

.control-overview {
    display: grid;
    grid-template-columns: minmax(280px, 1.35fr) minmax(360px, 1fr);
    gap: 16px;
    padding: 14px;
}

.control-description {
    border-left: 4px solid var(--brand);
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
}

.control-description h2 {
    margin-bottom: 5px;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
}

.control-description p {
    margin: 0 0 6px;
}

.control-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.control-facts > div {
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    text-transform: capitalize;
}

.control-facts strong,
.risk-short-description .muted {
    display: block;
}

.control-facts strong {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.control-risks {
    padding: 14px;
}

.risk-short-description {
    min-width: 320px;
    max-width: 520px;
}

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

.span-2 {
    grid-column: span 2;
}

.compact-form .field {
    margin-bottom: 8px;
}

.compact-form textarea {
    min-height: 66px;
}

.control-editor form,
.action-panel form {
    padding-top: 2px;
}

.verification-grid form + form {
    border-left: 1px solid var(--line);
    padding-left: 16px;
}

.description-section {
    padding: 14px;
}

.description-section h2 {
    margin-bottom: 10px;
}

.description-overview {
    border-top: 4px solid var(--brand);
}

.description-grid textarea {
    min-height: 96px;
}

.controls-library td {
    vertical-align: top;
}

.control-library-title {
    min-width: 230px;
    white-space: normal;
}

.control-library-description {
    min-width: 330px;
    max-width: 520px;
}

details.quick-edit {
    min-width: 90px;
}

details.quick-edit > summary {
    cursor: pointer;
    color: #175cd3;
    font-weight: 700;
}

details.quick-edit[open] {
    min-width: 380px;
}

details.quick-edit form {
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 6px;
}

@media(max-width:800px) {
    .risk-key-grid,
    .risk-secondary-grid,
    .grid-3,
    .control-overview,
    .control-facts {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

    .assessment-panel > summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .verification-grid form + form {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 16px 0 0;
    }
}
