/* ===================================================================
   The document block styles: one table and six lists.

   Every rule is keyed on the MOCKUP'S class rather than on `is-style-<name>`.
   A block style adds one class and the design's checklist needs two
   (`ea-checklist` plus a modifier), so ea-block-styles.php's render_block
   filter maps the style class onto the mockup's class or class pair and the
   stylesheet stays the one the signed-off pages were measured against.

   The `.ea-table` base is here rather than in a block, because two things draw
   it: core/table with the `ea-table` style, and ea/definition-table.
   ===================================================================*/

/* ==================================================================
   1. THE TABLE (mockup css/parts/ea-document.css)
   ==================================================================*/
.ea-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--ea-s4) 0 var(--ea-s5);
    font-size: 0.94rem;
    line-height: 26px;
}
.ea-table caption {
    text-align: left;
}
.ea-table th,
.ea-table td {
    text-align: left;
    vertical-align: top;
    padding: var(--ea-s4) var(--ea-s4) var(--ea-s4) 0;
    border-bottom: 1px solid var(--ea-line);
}
.ea-table th:last-child,
.ea-table td:last-child {
    padding-right: 0;
}
.ea-table thead th {
    padding-top: 0;
    font-family: var(--font-heading);
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--ea-blue-900);
    border-bottom: 2px solid var(--ea-blue-100);
}
.ea-table tbody th {
    font-weight: 700;
    color: var(--ea-ink-900);
}

/* -- 767 and below: the row becomes a block -------------------------
   06 recommendation 6 asks for ONE collapse keyed on `.ea-table`, and the two
   pages' rules are not in fact the same: the article's value cell takes
   `margin-top: var(--ea-s2)` and `--ea-ink-500`, the methodology table's takes
   `var(--ea-s3)` and no colour change. So the shared half is here and the
   definition table's own difference stays with that block. Merging the two
   outright would have changed a signed-off page.

   `.ea-table--badges` is excluded rather than overridden, because the two
   collapses differ in which elements they reset, not only in values. */
@media (max-width: 767px) {
    .ea-table:not(.ea-table--badges),
    .ea-table:not(.ea-table--badges) tbody,
    .ea-table:not(.ea-table--badges) tr,
    .ea-table:not(.ea-table--badges) th,
    .ea-table:not(.ea-table--badges) td {
        display: block;
        width: auto;
    }
    .ea-table:not(.ea-table--badges) thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .ea-table:not(.ea-table--badges) tr {
        padding: var(--ea-s4) 0;
        border-bottom: 1px solid var(--ea-line);
    }
    .ea-table:not(.ea-table--badges) th,
    .ea-table:not(.ea-table--badges) td {
        padding: 0;
        border: 0;
    }
    .ea-table:not(.ea-table--badges) td {
        margin-top: var(--ea-s2);
        color: var(--ea-ink-500);
    }
}

/* ==================================================================
   2. THE FOUR CHECKLISTS (mockup css/pages/methodology.css §8)
   Each marker is a distinct SHAPE, not only a colour (01 §3.5).
   ==================================================================*/
.ea-checklist {
    margin: 0 0 var(--ea-s5);
    padding: 0;
    list-style: none;
    max-width: var(--ea-measure);
}
.ea-checklist li {
    position: relative;
    padding: 0 0 0 var(--ea-s6);
    margin: 0 0 var(--ea-s3);
}
.ea-checklist li::before {
    position: absolute;
    left: 0;
    top: 6px;
    width: 20px;
    height: 20px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    content: "";
}
/* a tick, in --ea-pos-700 */
.ea-checklist--check li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.6l4 4 8-9' fill='none' stroke='%231c7a4a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* an upward chevron, in --ea-blue-500 */
.ea-checklist--pref li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 12.5l6-6 6 6' fill='none' stroke='%232b5fc4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* a dot, in --ea-blue-500 */
.ea-checklist--dot li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='3.4' fill='%232b5fc4'/%3E%3C/svg%3E");
}
/* a bar, in --ea-warn-700: never red, which 01 §3.5 reserves for form
   validation. */
.ea-checklist--stop li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h12' fill='none' stroke='%238a5a00' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ==================================================================
   3. THE NUMBERED SOURCE LIST (mockup css/pages/methodology.css)
   ==================================================================*/
.ea-sources {
    counter-reset: src;
    list-style: none;
    margin: 0 0 var(--ea-s5);
    padding: 0;
    max-width: var(--ea-measure);
}
.ea-sources li {
    counter-increment: src;
    position: relative;
    padding-left: var(--ea-s7);
    margin-bottom: var(--ea-s4);
}
.ea-sources li::before {
    content: counter(src);
    position: absolute;
    left: 0;
    top: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ea-blue-100);
    color: var(--ea-blue-900);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.82rem;
    line-height: 1;
}
.ea-sec--tint .ea-sources li::before {
    background: var(--ea-surface);
}

/* ==================================================================
   4. THE CHECKS LIST (mockup css/pages/article-single.css)

   04 item 16 calls this an ORDERED list and the signed-off page renders a
   `<ul>` with `li::marker` in --ea-blue-500, which is a bullet. The style is
   registered on core/list, so it follows the block rather than the tag and an
   author gets the same treatment either way.
   ==================================================================*/
.ea-article-steps {
    margin: var(--ea-s4) 0 var(--ea-s5);
    padding: 0 0 0 var(--ea-s5);
    max-width: var(--ea-measure);
}
.ea-article-steps li {
    margin: 0 0 var(--ea-s3);
    padding-left: var(--ea-s2);
}
.ea-article-steps li::marker {
    color: var(--ea-blue-500);
}
.ea-article-steps strong {
    color: var(--ea-ink-900);
}

/* ==================================================================
   5. PROVISIONAL: a subset of css/parts/ea-badge.css

   DELETE THIS SECTION WHEN THE BADGE PART IS PORTED. `.ea-badge` has no owner
   in the deployed tree yet and two things in this phase draw it: ea/callout's
   glyph and ea/definition-row's chip. It is carried here, in ONE place, rather
   than declared in each of those blocks, because a byte-identical second copy
   is exactly how that component once acquired two owners on the methodology
   page. Only the three rules those two blocks need are here; the other eleven
   modifiers are not, and must not be added.
   ==================================================================*/
.ea-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 1px 10px;
    border: 1px solid;
    border-radius: var(--ea-radius-pill);
    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 22px;
    font-weight: 700;
}
.ea-badge--neutral {
    color: var(--ea-ink-700);
    background: var(--ea-surface-muted);
    border-color: var(--ea-line);
}
/* 14px, not the 24px of `.ea-ico`: the pill's line box is 22px and a 24px
   glyph would set the pill's height instead of its type. */
.ea-badge__ico {
    width: 14px;
    height: 14px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
