/* How data acquisition works, on the data acquisition page. The shared .dh rules also serve
   the high density page. Loaded after data-acquisition-2.css. */

.dh-dark { --dh-icon: #fff; --dh-card: rgba(255, 255, 255, 0.05); --dh-line: rgba(255, 255, 255, 0.55); }

.v2-section--blue.dh-night {
    --v2-ground: var(--v2-night);
    background-color: var(--v2-night);
    border-top-color: var(--v2-night);
}

.dh ul,
.dh ol,
.dh dl { list-style: none; margin: 0; padding: 0; }

.dh h3,
.dh h4 { font-family: var(--v2-head-font); font-size: 1rem; font-weight: 700; line-height: 1.3; color: var(--v2-ink); }

.dh p { max-width: none; margin: 4px 0 0; color: var(--v2-ink-soft); font-size: 0.875rem; line-height: 1.4; }

.dh strong { font-family: var(--v2-head-font); line-height: 1.25; color: var(--v2-ink); }

.dh small { display: block; color: var(--v2-ink-soft); font-size: 0.75rem; font-weight: 400; line-height: 1.3; }

.dh img { display: block; height: auto; object-fit: contain; }

.dh .da2-icon { width: 26px; height: 26px; flex: none; color: var(--dh-icon, var(--v2-blue)); }

.dh-n {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-right: 4px;
    background: var(--v2-blue);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    vertical-align: 1px;
}

.dh-dark .dh-n { background: var(--v2-accent); }

.dh-disc {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--v2-accent);
}

.dh .dh-disc .da2-icon { width: 24px; height: 24px; color: #fff; }

/* The three modes. */
.dh .dh-modes { display: grid; gap: 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--dh-line, var(--v2-rule-strong)); }

.dh-modes li { display: flex; gap: 12px; align-items: flex-start; }

.dh .dh-modes h3 { font-size: 0.9375rem; }

/* The path, turning back on itself, with the modes in a side rail. */
.dh8 { display: grid; gap: 24px; }

.dh .dh8__path { display: grid; gap: 32px; }

.dh8__path li { position: relative; padding: 14px; border: 1px solid var(--v2-rule); background: var(--dh-card); }

.dh8__path li + li::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -28px;
    width: 14px;
    height: 24px;
    background: #fff;
    transform: translateX(-50%);
    clip-path: polygon(5px 0, 9px 0, 9px 15px, 100% 15px, 50% 100%, 0 15px, 5px 15px);
}

.dh8__top { display: flex; align-items: center; gap: 12px; }

.dh8 .dh-modes { margin-top: 0; }

@media (min-width: 768px) {
    .dh .dh-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
}

/* The section has to fit one screen under the sticky header. */
@media (min-width: 1100px) {
    .v2 .v2-section.dh-fit { padding-block: 28px; }

    .dh-fit .da2-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 24px; max-width: none; margin-bottom: 20px; }

    .dh-fit .da2-head p { margin-top: 0; font-size: 0.9375rem; }

    .dh .dh-modes { margin-top: 20px; padding-top: 16px; }

    .dh p { font-size: 0.8125rem; line-height: 1.35; }

    /* Option 1: a line from each tile to the next, ending in a head. */

/* The arrow where the routes run into the shared path. */

/* Option 8: three across, a turn at the end of the row, three back. The modes take the rail. */
    .dh8 { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 40px; }

    .dh .dh8__path { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 1fr 1fr; gap: 30px 34px; }

    .dh8__path li:nth-child(4) { grid-area: 2 / 3; }

    .dh8__path li:nth-child(5) { grid-area: 2 / 2; }

    .dh8__path li:nth-child(6) { grid-area: 2 / 1; }

    .dh8__path li:nth-child(n + 2):nth-child(-n + 3)::before {
        left: -29px;
        top: 50%;
        width: 22px;
        height: 14px;
        transform: translateY(-50%);
        clip-path: polygon(0 5px, 14px 5px, 14px 0, 100% 50%, 14px 100%, 14px 9px, 0 9px);
    }

    .dh8__path li:nth-child(n + 5)::before {
        left: auto;
        right: -29px;
        top: 50%;
        width: 22px;
        height: 14px;
        transform: translateY(-50%);
        clip-path: polygon(100% 5px, 8px 5px, 8px 0, 0 50%, 8px 100%, 8px 9px, 100% 9px);
    }

    .dh8 .dh-modes { grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: space-between; padding-top: 0; padding-left: 24px; border-top: 0; border-left: 1px solid var(--dh-line); }

    .dh8 .dh-modes .da2-icon { display: none; }
}

/* A screen scaled to 125 % leaves about 600 px under the header, so short screens pack tighter still. */
@media (min-width: 1100px) and (max-height: 820px) {
    .v2 .v2-section.dh-fit { padding-block: 16px; }

    .dh-fit .da2-head { margin-bottom: 12px; }

    .dh-fit .da2-head p { font-size: 0.875rem; }

    .dh p { font-size: 0.75rem; line-height: 1.3; }

    .dh h3,
    .dh h4 { font-size: 0.9375rem; }

    .dh .da2-icon { width: 22px; height: 22px; }

    .dh-disc { width: 36px; height: 36px; }

    .dh .dh-disc .da2-icon { width: 20px; height: 20px; }

.dh .dh-modes { gap: 20px; margin-top: 12px; padding-top: 10px; }

    .dh8 .dh-modes { gap: 10px; margin-top: 0; padding-top: 0; }

    .dh .dh-modes h3 { font-size: 0.875rem; }

    /* The path, turning back on itself, with the modes in a side rail. */
    .dh .dh8__path { gap: 20px 34px; }

    .dh8__path li { padding: 10px; }
}
