/*
 * Styling matched to the published DCF page on Hwb: Arial stack, #1f1f1f body
 * text, #0360a6 accordion headings, #215b57 element bands on #efefef, #e5e5e5
 * rules, 320px progression step columns.
 */

:root {
    --ink: #1f1f1f;
    --ink-muted: #737373;
    --link: #0360a6;
    --element: #215b57;
    --band: #efefef;
    --rule: #e5e5e5;
    --brand: #c73333;
    --column: 320px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, "Nimbus Sans L", sans-serif;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--ink);
    background: #fff;
}

a {
    color: var(--link);
}

:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 0;
    box-shadow: 0 0 0 5px var(--ink);
}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    position: static;
    display: inline-block;
    padding: 0.75rem 1rem;
    background: #ffbf47;
    color: var(--ink);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.wrap {
    max-width: 76rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Masthead */

.masthead {
    background: var(--brand);
    color: #fff;
}

.masthead .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
}

.wordmark {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
    text-decoration: none;
}

.wordmark span {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}

.lang-switch {
    color: #fff;
    font-weight: 700;
    text-underline-offset: 0.2em;
}

/* Page heading */

.page-head {
    padding: 2.5rem 0 1.5rem;
}

.page-head h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 2.875rem);
    line-height: 1.1;
}

.part-of {
    margin: 0;
    font-size: 0.875rem;
    color: var(--ink-muted);
}

.part-of strong {
    display: block;
    color: var(--ink);
}

/* Toolbar */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--rule);
}

.step-filter {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.step-filter label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 700;
}

.step-filter select {
    font: inherit;
    padding: 0.55rem 0.6rem;
    border: 2px solid var(--ink);
    background: #fff;
    color: inherit;
}

.step-filter button {
    font: inherit;
    font-weight: 700;
    padding: 0.55rem 1.1rem;
    border: 2px solid var(--link);
    background: var(--link);
    color: #fff;
    cursor: pointer;
}

.step-filter button:hover {
    background: #024b83;
    border-color: #024b83;
}

.accordion-controls {
    display: flex;
    gap: 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
}

.accordion-controls button {
    font: inherit;
    padding: 0.4rem 0;
    border: 0;
    background: none;
    color: var(--ink-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.accordion-controls button:hover {
    color: var(--ink);
}

/* Strand accordions */

.strand {
    border-bottom: 1px solid var(--rule);
}

.strand > summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--link);
    cursor: pointer;
    list-style: none;
}

.strand > summary::-webkit-details-marker {
    display: none;
}

.chevron {
    flex: none;
    width: 0.6rem;
    height: 0.9rem;
    fill: var(--ink);
    transition: transform 150ms ease;
}

.strand[open] > summary .chevron {
    transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
    .chevron {
        transition: none;
    }
}

.strand__intro {
    max-width: 60rem;
    margin: 0 0 1.5rem;
}

.strand__intro p {
    margin: 0 0 1rem;
}

.strand__body {
    padding-bottom: 2rem;
}

/* Framework table */

.scroller {
    position: relative;
}

.scroller__hint {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--ink-muted);
}

.scroller__hint[hidden] {
    display: none;
}

.scroller__hint button {
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    background: var(--link);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.scroller__hint button:hover {
    background: #024b83;
}

.scroller__viewport {
    overflow-x: auto;
    scrollbar-color: var(--link) var(--band);
}

table.framework {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

table.framework thead th {
    width: var(--column);
    min-width: var(--column);
    padding: 1.25rem 1.7rem 1.25rem 0;
    text-align: left;
    vertical-align: bottom;
    font-size: 1.25rem;
    border-bottom: 2px solid var(--rule);
}

table.framework .element-row th {
    padding: 1.3rem 0 1.05rem 0.95rem;
    text-align: left;
    font-size: 1.3125rem;
    color: var(--element);
    background: var(--band);
    border-bottom: 1px solid var(--rule);
}

/* Keep the element name in view while the statements scroll sideways. */
table.framework .element-row th span {
    position: sticky;
    left: 0.95rem;
    display: inline-block;
}

table.framework td {
    padding: 0.9rem 1.7rem 0.9rem 0;
    vertical-align: top;
    font-size: 1.125rem;
    border-bottom: 1px solid var(--rule);
}

table.framework td p {
    margin: 0;
}

table.framework td p + ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

table.framework td li + li {
    margin-top: 0.35rem;
}

table.framework em {
    font-style: italic;
}

/* Footer */

.page-foot {
    margin-top: 3rem;
    padding: 2rem 0 3rem;
    border-top: 4px solid var(--brand);
    font-size: 0.875rem;
    color: var(--ink-muted);
}

.page-foot p {
    max-width: 48rem;
    margin: 0 0 0.5rem;
}

@media (max-width: 40rem) {
    :root {
        --column: 17rem;
    }

    .toolbar {
        align-items: stretch;
    }
}
