/* DIAR-6B.2-R3.1.3 — canonical navigation and investigation route closure */
.diar-context-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: -2px 0 18px;
    padding: 8px;
    border: 1px solid #dbe7ed;
    border-radius: 18px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 8px 26px rgba(31,67,92,.06);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}
.diar-context-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #456473;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.diar-context-nav a:hover {
    border-color: #d7e4eb;
    background: #f4f8fa;
    color: #173e58;
}
.diar-context-nav a.active {
    border-color: #7b4ee7;
    background: linear-gradient(135deg,#6e3bd4,#8c61ef);
    color: #fff;
    box-shadow: 0 8px 20px rgba(111,62,214,.18);
}
.diar-context-nav .diar-context-home {
    color: #0c857a;
}
.page-diar-investigations .diar-investigations-page,
.page-diar-investigation .diar-case-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}
.page-diar-investigations .diar-investigation-hero,
.page-diar-investigation .case-hero {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(250px,320px);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.page-diar-investigations .hero-safety,
.page-diar-investigation .risk-panel {
    width: auto;
    min-width: 0;
    max-width: 100%;
}
.page-diar-investigations .investigation-guide {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 12px;
    min-width: 0;
}
.page-diar-investigations .investigation-guide article {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #dce8eb;
    border-radius: 17px;
    background: #fff;
}
.page-diar-investigations .investigation-guide article b {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e6f4f2;
    color: #087b70;
}
.page-diar-investigations .investigation-guide article div,
.page-diar-investigations .investigation-guide article strong,
.page-diar-investigations .investigation-guide article span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.page-diar-investigations .investigation-guide article span {
    display: block;
    margin-top: 5px;
    color: #687f8a;
    line-height: 1.5;
}
.page-diar-investigations .diar-filter-panel {
    grid-template-columns: repeat(4,minmax(0,1fr));
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.page-diar-investigations .diar-filter-panel .search-field {
    grid-column: span 2;
}
.page-diar-investigations .queue-table-wrap,
.page-diar-investigation .members-table-wrap,
.page-diar-investigation .source-reference-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
}
.page-diar-investigations .diar-queue-card,
.page-diar-investigation .case-card {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.page-diar-investigation .case-breadcrumb {
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 2px;
}
.page-diar-investigation .diar-route-return {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid #cfe0e6;
    border-radius: 11px;
    background: #fff;
}
.page-diar-investigation .case-layout {
    min-width: 0;
}
@media (max-width: 1280px) {
    .page-diar-investigations .diar-investigation-hero,
    .page-diar-investigation .case-hero {
        grid-template-columns: 1fr;
    }
    .page-diar-investigations .investigation-guide {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .page-diar-investigations .diar-filter-panel {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}
@media (max-width: 820px) {
    .diar-context-nav {
        margin-inline: 0;
        border-radius: 14px;
    }
    .page-diar-investigations .investigation-guide,
    .page-diar-investigations .diar-filter-panel {
        grid-template-columns: 1fr;
    }
    .page-diar-investigations .diar-filter-panel .search-field {
        grid-column: auto;
    }
}
