/* ==========================================================================
   STANDARDS: /testing-and-standards/ (DIGITAL-353, Figma "Testing and Standards" 20324:9663 and
   "Testing and Standards Mobile" 20335:31369). Layouts standards-hero, -toc, -text, -statement and -list.
   Loaded by inc/standards.php on pages that use them. Desktop first; the tiers follow media.css
   (1025-1500px content zoom band, 1024, 980, 767). Type sizes and logo widths are the design values in CSS px,
   like the rest of the theme; widths are shares of the container, measured on Figma's 1128px content column
   (in the zoom band the container is 1440 CSS px wide, so fixed widths from Figma would come out too narrow).
   ========================================================================== */

:root {
    --standards-cut: clamp(39px, 4.375vw, 84px); /* height of the cut corners of the dark band: 63px at 1440 */
    --standards-gap: 96px;                       /* space between sections */
}

/* --------------------------------------------------------------------------
   Shared type: eyebrow, section heading, rich text
   -------------------------------------------------------------------------- */
.block-standards-eyebrow {
    margin-bottom: 50px;
    color: var(--color-rust);
    font-family: var(--font-bold);
    font-size: 14px;
    letter-spacing: 0.1px;
    line-height: 20px;
}

.block-standards-heading {
    max-width: 94%;
    margin-bottom: 24px;
    font-family: var(--font-regular);
    font-size: 57px;
    letter-spacing: -0.25px;
    line-height: 64px;
    text-wrap: balance;
}

.block-standards-heading--narrow { max-width: 64.7%; }

.block-standards-copy {
    font-family: var(--font-regular);
    font-size: 18px;
    line-height: 24px;
}

.block-standards-copy > * + * { margin-top: 24px; }

.block-standards-copy a,
.block-standards-list__copy p a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.block-standards-copy a:hover,
.block-standards-list__copy p a:hover { color: var(--color-rust); }

.block-standards-copy h3 {
    margin-top: 32px;
    font-family: var(--font-bold);
    font-size: 22px;
    letter-spacing: 0.5px;
    line-height: 28px;
}

.block-standards-copy h3 + * { margin-top: 4px; }

.block-standards-copy ul { list-style: none; }

.block-standards-copy li {
    position: relative;
    padding-left: 30px;
    letter-spacing: 0.5px;
}

.block-standards-copy li + li { margin-top: 16px; }

.block-standards-copy li::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 0;
    width: 12px;
    height: 12px;
    background-color: var(--color-rust);
}

/* --------------------------------------------------------------------------
   standards-hero: title, updated line, animated grid
   -------------------------------------------------------------------------- */
.block-standards-hero .container { padding: 217px 0 130px; }

.block-standards-hero__heading {
    margin-bottom: 24px;
    color: var(--color-ink);
    font-family: var(--font-regular);
    font-size: 87px;
    line-height: 96px;
    text-align: center;
}

.block-standards-hero__updated {
    margin-bottom: 44px;
    color: var(--color-slate);
    font-family: var(--font-medium);
    font-size: 18px;
    line-height: 36px;
    text-align: center;
}

.block-standards-hero__art img { width: 100%; }

/* --------------------------------------------------------------------------
   standards-toc: ruled rows with a down arrow
   -------------------------------------------------------------------------- */
.block-standards-toc .container { padding-bottom: var(--standards-gap); }

.block-standards-toc__list {
    width: 60%;
    min-width: 560px;
    list-style: none;
    border-top: 1px solid var(--color-steel);
}

.block-standards-toc__list li { border-bottom: 1px solid var(--color-steel); }

.block-standards-toc__link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 53px;
    padding: 12px 0 12px 17px;
    color: var(--color-ink);
    font-family: var(--font-bold);
    font-size: 18px;
    letter-spacing: -0.25px;
    line-height: 24px;
}

.block-standards-toc__link::before {
    content: "";
    flex: none;
    width: 16px;
    height: 16px;
    margin-right: 16px;
    background: url("../images/standards/arrow-down.svg") center / contain no-repeat;
}

.block-standards-toc__link:hover { color: var(--color-rust); }

html:has(.block-standards-toc) { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html:has(.block-standards-toc) { scroll-behavior: auto; }
}

/* Anchored sections stop under the sticky header bar. */
.block-standards-text[id],
.block-standards-list[id] { scroll-margin-top: 80px; }

/* --------------------------------------------------------------------------
   standards-text: stacked, or split ("Beyond the Lab")
   -------------------------------------------------------------------------- */
.block-standards-text .container { padding-bottom: var(--standards-gap); }

.block-standards-text__body { color: var(--color-ink); }

.block-standards-text--split .block-standards-text__row {
    display: grid;
    grid-template-columns: 44% 45%;
    column-gap: 7%;
    align-items: start;
}

.block-standards-text--split .block-standards-heading { margin-bottom: 18px; }

.block-standards-text__art {
    width: 91.5%;
    max-width: 412px; /* Evan, DIGITAL-350, 19 Nov 2026: keep the 1280px size on larger screens */
}

@media (max-width: 1500px) {
    .block-standards-text__art { max-width: 515px; } /* 412px on screen inside the 0.8 zoom band */
}

.block-standards-text__art img { width: 100%; }

/* --------------------------------------------------------------------------
   standards-statement: rust bar + large light sentence, or the quote
   -------------------------------------------------------------------------- */
.block-standards-statement__text {
    margin: 0;
    color: var(--color-ink);
    font-family: var(--font-light);
}

.block-standards-statement--rule .container { padding-bottom: 170px; }

.block-standards-statement--rule .block-standards-statement__row {
    max-width: 96.6%;
    padding-top: 31px;
    border-top: 4px solid var(--color-rust);
}

.block-standards-statement--rule .block-standards-statement__text {
    font-size: 45px;
    letter-spacing: -0.25px;
    line-height: 64px;
}

.block-standards-statement--quote .container { padding-bottom: 86px; }

.block-standards-statement--quote .block-standards-statement__row {
    display: grid;
    grid-template-columns: 15% 64%;
    column-gap: 13%;
    align-items: center;
    padding: 50px 0 53px;
    border-top: 1px solid var(--color-rust);
    border-bottom: 1px solid var(--color-rust);
}

.block-standards-statement__mark img { width: 169px; }

.block-standards-statement--quote .block-standards-statement__text {
    font-size: 36px;
    letter-spacing: -0.25px;
    line-height: 58px;
}

/* --------------------------------------------------------------------------
   standards-list: logo column beside name and text; dark band with cut corners
   -------------------------------------------------------------------------- */
.block-standards-list .container { padding-bottom: var(--standards-gap); }

.block-standards-list--light { color: var(--color-ink); }

.block-standards-list--light .container { padding-top: 150px; }

.block-standards-list--dark {
    padding: var(--standards-cut) 0;
    background-color: var(--color-ink);
    color: var(--color-cream);
    /* Figma: a raised tab at the top left (up to 52.6% of the width), a lowered tab at the bottom right (from 27.5%),
       each with a 45 degree edge. The cut-away corners show the cream page behind. */
    clip-path: polygon(
        0 0,
        calc(52.6% - var(--standards-cut)) 0,
        52.6% var(--standards-cut),
        100% var(--standards-cut),
        100% 100%,
        calc(27.5% + var(--standards-cut)) 100%,
        27.5% calc(100% - var(--standards-cut)),
        0 calc(100% - var(--standards-cut))
    );
}

.block-standards-list--dark .container { padding: 74px 0 var(--standards-gap); }

.block-standards-list__intro { max-width: 94%; }

.block-standards-list__items {
    display: grid;
    row-gap: 34px;
    margin-top: 64px;
    list-style: none;
}

.block-standards-list--dark .block-standards-list__items {
    row-gap: 26px;
    margin-top: 31px;
}

.block-standards-list__item {
    display: grid;
    grid-template-columns: 128px minmax(0, 83%);
    column-gap: 38px;
    align-items: center;
}

.block-standards-list--dark .block-standards-list__item { grid-template-columns: 128px minmax(0, 76%); }

.block-standards-list__logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.block-standards-list__logo-text {
    padding-left: 5px; /* the 5px letter spacing after the last letter, so the word sits centred */
    color: var(--color-ink);
    font-family: var(--font-bold);
    font-size: 41.69px;
    letter-spacing: 5px;
    line-height: 22px;
}

.block-standards-list--dark .block-standards-list__logo-text { color: var(--color-steel); }

.block-standards-list__name {
    margin-bottom: 10px; /* room under the underline before the text (Evan, DIGITAL-350, 19 Nov 2026) */
    font-family: var(--font-bold);
    font-size: 22px;
    letter-spacing: 0.5px;
    line-height: 28px;
}

.block-standards-list__name a {
    text-decoration: underline;
    text-decoration-color: var(--color-rust);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.block-standards-list__name a:hover { color: var(--color-rust); }

.block-standards-list__copy p {
    font-family: var(--font-regular);
    font-size: 18px;
    line-height: 24px;
}

.block-standards-list__more {
    margin-top: 40px;
    text-align: center;
}

.block-standards-list__more-btn {
    min-height: 44px;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    background-color: var(--color-rust);
    color: var(--color-cream);
    font-family: var(--font-bold);
    font-size: 18px;
    letter-spacing: 0.1px;
    line-height: 20px;
}

.block-standards-list__more-btn:hover { background-color: var(--color-rust-dark); }

/* ==========================================================================
   Tiers
   ========================================================================== */

/* No zoom from 1024 down: the type steps down instead. */
@media (max-width: 1024px) {
    .block-standards-hero .container { padding: 160px 0 96px; }
    .block-standards-hero__heading { font-size: 68px; line-height: 76px; }
    .block-standards-heading { font-size: 45px; line-height: 52px; }
    .block-standards-statement--rule .block-standards-statement__text { font-size: 36px; line-height: 52px; }
    .block-standards-statement--quote .block-standards-statement__row {
        grid-template-columns: 120px minmax(0, 1fr);
        column-gap: 60px;
    }
    .block-standards-statement__mark img { width: 120px; }
    .block-standards-statement--quote .block-standards-statement__text { font-size: 30px; line-height: 44px; }
    .block-standards-list--light .container { padding-top: 120px; }
    .block-standards-list__item,
    .block-standards-list--dark .block-standards-list__item { grid-template-columns: 128px minmax(0, 1fr); }
}

/* Tablets: the split section stacks. */
@media (max-width: 980px) {
    .block-standards-heading--narrow { max-width: none; }
    .block-standards-toc__list { width: 100%; min-width: 0; }
    .block-standards-text--split .block-standards-text__row { display: block; }
    .block-standards-text__art {
        width: 60%;
        max-width: 451px;
        margin-bottom: 40px;
    }
}

/* Phones (Figma mobile frame, 430 wide). */
@media (max-width: 767px) {
    :root { --standards-gap: 96px; }

    .block-standards-hero .container,
    .block-standards-toc .container,
    .block-standards-text .container,
    .block-standards-statement .container,
    .block-standards-list .container {
        width: 100%;
        padding-right: 23px;
        padding-left: 23px;
    }

    /* The header overlays the hero on phones: the title starts 43px under it, as in the mobile frame (55px nav, title
       at 98px); it sat 8px under the 90px header (Evan, DIGITAL-350, 19 Nov 2026). */
    .block-standards-hero .container { padding-top: calc(var(--roc-header-h, 90px) + 43px); padding-bottom: 90px; }
    .block-standards-hero__heading {
        margin-bottom: 4px;
        font-family: var(--font-medium);
        font-size: 55px;
        letter-spacing: 0.45px;
        line-height: 1.1;
    }
    .block-standards-hero__updated { margin-bottom: 23px; }

    .block-standards-toc,
    .block-standards-text__art { display: none; }

    .block-standards-eyebrow { margin-bottom: 40px; }
    .block-standards-heading,
    .block-standards-heading--narrow {
        max-width: none;
        text-wrap: pretty; /* the mobile frame breaks the headings as plain wrapping does, not balanced */
        font-family: var(--font-medium);
        font-size: 36px;
        letter-spacing: 0.45px;
        line-height: 41.5px;
    }

    .block-standards-statement--rule .container { padding-bottom: 96px; }
    .block-standards-statement--rule .block-standards-statement__row {
        padding-top: 40px;
        border-top-width: 1px;
    }
    .block-standards-statement--rule .block-standards-statement__text,
    .block-standards-statement--quote .block-standards-statement__text {
        font-size: 30px;
        letter-spacing: 0;
        line-height: 37.5px;
    }

    .block-standards-statement--quote .container { padding-bottom: 60px; }
    .block-standards-statement--quote .block-standards-statement__row {
        display: block;
        padding: 40px 0;
    }
    .block-standards-statement__mark { margin-bottom: 40px; }
    .block-standards-statement__mark img { width: 109px; }

    .block-standards-list--dark .container { padding-top: 40px; padding-bottom: 60px; }
    .block-standards-list--light .container { padding-top: 60px; }

    .block-standards-list__items,
    .block-standards-list--dark .block-standards-list__items {
        row-gap: 40px;
        margin-top: 40px;
    }
    .block-standards-list__item,
    .block-standards-list--dark .block-standards-list__item { display: block; }
    .block-standards-list__logo {
        justify-content: flex-start;
        margin-bottom: 24px;
        zoom: 0.75;
    }
    .block-standards-list__logo-text { padding-left: 0; }
    .block-standards-list__logo:empty,
    .block-standards-list--phone-no-logos .block-standards-list__logo { display: none; }
    .block-standards-list__name {
        font-family: var(--font-black);
        font-size: 18px;
        letter-spacing: 0;
        line-height: 22.5px;
    }

    .block-standards-list__items.is-folded .is-phone-folded { display: none; }
}

/* Above phones the whole list always shows. */
@media (min-width: 768px) {
    .block-standards-list__more { display: none; }
}
