/* ===================================================================
   ea/submit-form — the segmented choice, the two forms, the success
   state. Ported from concept/mockups/02-site-v1/css/pages/
   submit-service.css sections 5, 6 and 7 plus the responsive rules that
   belong to them.

   WHAT THIS FILE DELIBERATELY DOES NOT CARRY, so nothing owns a rule
   twice. Sections 1 to 4 of the mockup file (the band heading colours
   and the star-arc placement), section 8 (`.ea-next` and `.ea-steps`,
   which the editor composes from core blocks), section 9 (the closing
   band's arc offsets) and their responsive rules all belong to the
   submit page's own stylesheet. `05 §3.4` measured 49 selectors declared
   in two or more page stylesheets, nine of which were two different
   objects, and the rule that follows is that a component's rules live
   with the component. Everything below is inside `.ea-forms`.

   Registered as the handle `ea-submit-form` in ea-submit.php, with
   `ea-content` as its dependency, so the tokens and the primitives are
   already on the page when these rules arrive.

   ONE ADAPTATION, MARKED WHERE IT APPEARS. The segmented control is two
   anchors rather than two buttons, so that the correction form is
   reachable with scripts blocked. Anchors are inline and undecorated by
   default where buttons are neither, so `.ea-seg__btn` gains three
   declarations the mockup did not need. Nothing else changed.
   ==================================================================*/

.ea-forms {
    /* 38rem is 646px, and the 901px two-zone gate is 646 + 48 of gap +
       the aside's 260px floor; the two must stay in step. */
    --ea-form-col: 38rem;
    padding: var(--ea-s7) var(--section-padding-x) var(--ea-s8);
    background: var(--ea-surface);
}

/* -- the segmented control ------------------------------------------
   The border IS the control, so never the decorative --ea-line (01 §3.4).
   Selection is carried by fill AND aria-selected, never colour (01 §11). */
.ea-seg {
    display: flex;
    max-width: var(--ea-form-col);
    margin: 0 0 var(--ea-s7);
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--ea-border-control);
    border-radius: var(--ea-radius-card);
    background: var(--ea-surface);
}
.ea-seg__btn {
    /* The three that the anchor needs and the button did not. */
    display: block;
    text-decoration: none;
    box-sizing: border-box;

    flex: 1 1 50%;
    min-width: 0;
    min-height: 64px;
    padding: var(--ea-s3) var(--ea-s4);
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-family: var(--font-heading);
    text-align: left;
    color: var(--ea-ink-700);
    cursor: pointer;
    transition:
        background var(--transition-fast),
        color var(--transition-fast);
}
.ea-seg__btn:hover {
    background: var(--ea-blue-050);
    color: var(--ea-ink-700);
}
.ea-seg__btn:focus-visible {
    outline: 2px solid var(--ea-blue-700);
    outline-offset: 2px;
}
.ea-seg__label {
    display: block;
    font-size: 1.06rem;
    font-weight: 600;
    line-height: 1.3;
}
.ea-seg__note {
    display: block;
    margin-top: 2px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--ea-ink-500); /* 5.98:1 on white */
}
.ea-seg__btn[aria-selected="true"],
.ea-seg__btn[aria-selected="true"]:hover {
    background: var(--ea-blue-700);
    color: #ffffff;
}
/* rgba white on --ea-blue-700 at 0.86 measures 8.4:1. */
.ea-seg__btn[aria-selected="true"] .ea-seg__note {
    color: rgba(255, 255, 255, 0.86);
}

/* -- the panel ------------------------------------------------------
   The second track's 260px floor and the 901px two-zone gate must stay
   in step: 646 + 48 + 260 needs a 954px rail. */
.ea-panel[hidden] {
    display: none;
}
.ea-panel__cols {
    display: grid;
    grid-template-columns: minmax(0, var(--ea-form-col)) minmax(260px, 1fr);
    gap: var(--ea-s8);
    align-items: start;
}
.ea-panel__main {
    min-width: 0;
}
.ea-aside {
    min-width: 0;
}
/* The head stays ABOVE both columns: inside the main column, `order: -1`
   on the aside puts the criteria card above the H3 it belongs under. */
.ea-panel__head {
    max-width: var(--ea-measure);
    margin-bottom: var(--ea-s6);
}
/* `.ea-main h3` is (0,1,1) and a bare class (0,1,0), so every heading
   colour here needs `.ea-main` in its selector or silently loses. */
.ea-main .ea-panel__title,
.entry-content .ea-panel__title {
    margin: 0 0 var(--ea-s2);
    font-size: var(--h2-font-size);
    font-weight: 600;
    color: var(--ea-blue-700);
    line-height: 1.32;
}
.ea-panel__title:focus-visible {
    outline: 2px solid var(--ea-blue-700);
    outline-offset: 4px;
}
.ea-panel__lead {
    margin: 0;
}

/* -- the guidance card beside each form -----------------------------*/
.ea-criteria {
    margin: 0;
    padding: var(--ea-s5);
    border: 1px solid var(--ea-line);
    border-radius: var(--ea-radius-card);
    background: var(--ea-blue-050);
}
.ea-main .ea-criteria__title,
.entry-content .ea-criteria__title {
    margin: 0 0 var(--ea-s3);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ea-blue-700); /* 10.24:1 on --ea-blue-050 */
}
.ea-criteria__list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ea-criteria__list li {
    display: flex;
    gap: var(--ea-s3);
    margin-bottom: var(--ea-s3);
    font-size: 0.94rem;
    line-height: 26px;
    color: var(--ea-ink-700);
}
.ea-criteria__list li:last-child {
    margin-bottom: 0;
}
.ea-criteria__list strong {
    color: var(--ea-ink-900);
}
/* The tick is --ea-blue-700, not gold: gold on a light surface is
   1.79:1 and 01 §3.3 rules it out for a meaning-bearing icon. */
/* (0,2,0) AND NOT THE MOCKUP'S (0,1,0). ea-content.css §4 sizes `.ea-ico`
   at 24px, the markup carries both classes, and at equal specificity the
   later rule in the combined bundle wins, which was `.ea-ico`. The ticks
   rendered 24px and read heavier than the copy beside them. */
.ea-ico.ea-criteria__ico {
    width: 20px;
    height: 20px;
    margin-top: 3px;
    color: var(--ea-blue-700);
}

/* ==================================================================
   WHAT THIS SHEET NO LONGER CARRIES

   Everything below the line was the hand-built form's own component set,
   and the client's decision to stand on SureForms Pro left every one of
   them without an element to style. Removed here:

     .ea-alt / .ea-alts__* / .ea-addbtn   the "add another tool" list
     .ea-hp                               the honeypot
     .ea-combo*                           the correction form's combobox
     .ea-choices / .ea-choice             the owner radios
     .ea-pair                             the two contact fields on one row
     .ea-count / .is-near / .is-over      the character counter
     .ea-err                              the field-level error
     .ea-summary* / .ea-formfail*         the error summary and the fail panel
     .ea-prefill*                         the deep link's "we filled this in"
     .ea-actions / .ea-submit             the custom submit row
     .ea-done / __mark / __actions        the custom confirmation panel

   HOW THAT WAS ESTABLISHED, rather than assumed. Every selector in this
   file was run through `document.querySelectorAll` against the delivered
   page in both languages at 1440 and 390, with both panels forced open and
   both confirmations revealed, and then every DEAD selector's base class
   was re-checked on its own — because a probe cannot evaluate `:hover`,
   `:focus-visible`, `::before` or `[hidden]`, and reporting those as dead
   would have deleted live rules. 37 base classes matched no element
   anywhere; those are the ones above.

   WHAT SURVIVED AND IS NOT OBVIOUS. `.ea-form` and its control rules stay:
   the SureForms wrapper is `<div class="ea-form ea-form--srfm">`, so the
   input, select and textarea rules in "THE FORM" below still style the
   SureForms fields, and css/pages/submit-service.css builds on them rather
   than repeating them. `.ea-done__title` and `.ea-done__body` stay for the
   same kind of reason: `ea_submit_srfm_confirmation()` now returns those
   two class names, so the confirmation's typography is still theirs.
   `.ea-privacy` stays and is now printed inside the SureForms form.
   ==================================================================*/

/* ==================================================================
   THE FORM
   ==================================================================*/
.ea-form {
    max-width: var(--ea-form-col);
}

/* -- the two markers and the hint, both still drawn -----------------
   PUT BACK AFTER A FAILED CUT, and the failure is worth recording. The
   sweep that removed the custom form's components took these with the
   honeypot and `.ea-field`, because they sat in the same run of the file.
   They are not dead: `.srfm-block-label` carries `.ea-tag` from
   `ea_submit_tag()` through `ea_submit_srfm_tag_markup()` (17 elements on
   the page), and css/pages/submit-service.css styles `.srfm-description`
   and `.ea-hint` as one selector, so `.ea-hint` owns the font metrics of
   every SureForms field description.

   The landmark check caught it: removing them measured the form 19px
   shorter at 1440 and 20px at 390 in both languages, with the repeater's
   label 12px wider and 2px taller. `.ea-field` and `.ea-field--set` are NOT
   restored; those two matched no element and their removal is part of the
   zero-delta result. */

/* Both required and optional are marked. */
.ea-tag {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--ea-ink-500); /* 5.98:1 on white */
}
.ea-tag--req {
    color: var(--ea-blue-700); /* 10.86:1 */
    font-weight: 700;
}
.ea-tag[hidden] {
    display: none;
}

.ea-hint {
    margin: 0 0 var(--ea-s2);
    font-size: 0.88rem;
    line-height: 24px;
    color: var(--ea-ink-500);
}

/* -- the controls ---------------------------------------------------
   1rem is 17px, which clears the 16px threshold below which iOS zooms a
   focused field; 48px min-height clears 01 §11's 44px at every width. */
.ea-form input[type="text"],
.ea-form input[type="url"],
.ea-form input[type="email"],
.ea-form select,
.ea-form textarea {
    display: block;
    width: 100%;
    /* BLOCKSY PINS A HEIGHT ON EVERY CONTROL AND THIS IS THE RESET.
       Its own `select, textarea, input:is([type=url], ...)` rule declares
       `height: var(--has-height, var(--theme-form-field-height, 40px))`
       and `form textarea { --theme-form-field-height: 170px }`, so the
       `min-height` below never decided anything: both textareas measured
       170px whatever their `rows` said, and the error state's 2px border
       could not grow an input from 48px to the mockup's 50px. Every
       selector in this list is at least (0,1,1) against Blocksy's, so
       `auto` wins on specificity and the box goes back to being padding
       plus line-height plus border, which is what the mockup measured. */
    height: auto;
    min-height: 48px;
    padding: 11px var(--ea-s3);
    border: 1px solid var(--ea-border-control); /* 3.4:1 on white */
    border-radius: var(--ea-radius-card);
    background: var(--ea-surface);
    font-family: var(--font-body);
    font-size: 1rem; /* 17px */
    line-height: 24px;
    color: var(--ea-ink-900);
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}
.ea-form textarea {
    min-height: 112px;
    resize: vertical;
}
.ea-form select {
    /* Only the box is styled, so the native control keeps its own keyboard
       and screen-reader behaviour. */
    padding-right: var(--ea-s2);
}
/* (0,2,1) AND NOT THE MOCKUP'S (0,1,0). Blocksy's own placeholder rule
   lists `input:is([type=url], [type=text], ...)::placeholder`, which is
   (0,1,1), so it beat this one for INPUTS while losing to it for
   `textarea::placeholder` at (0,0,1). The two placeholders on one form
   therefore did not match each other: "example.com" rendered ink-900 at
   0.7 opacity and read like a typed value, while the textarea beside it
   was correctly ink-300. The section class is what raises this above
   Blocksy rather than tying with it. */
.ea-forms .ea-form ::placeholder {
    color: var(--ea-ink-300); /* placeholders are exempt from AA */
    opacity: 1;
}
.ea-form input:hover,
.ea-form select:hover,
.ea-form textarea:hover {
    border-color: var(--ea-ink-500);
}
/* The border darkens as well as the outline, so focus survives a
   forced-colours mode that drops the shadow (01 §11). */
.ea-form input:focus-visible,
.ea-form select:focus-visible,
.ea-form textarea:focus-visible {
    outline: 2px solid var(--ea-blue-700);
    outline-offset: 2px;
    border-color: var(--ea-blue-700);
}

/* -- Kenntnisnahme, not consent -------------------------------------
   No checkbox, nothing to tick, nothing gated on it. */
.ea-privacy {
    margin: var(--ea-s6) 0 var(--ea-s5);
    padding-top: var(--ea-s5);
    border-top: 1px solid var(--ea-line);
    font-size: 0.94rem;
    line-height: 26px;
    color: var(--ea-ink-700);
}

/* ==================================================================
   THE CONFIRMATION'S TYPOGRAPHY, AND ONLY THAT

   The panel itself — `.ea-done`, its 56px tick badge and its "suggest
   another" action row — belonged to the custom form and is gone. These two
   rules stay because `ea_submit_srfm_confirmation()` returns
   `<span class="ea-done__title">` and `<span class="ea-done__body">`, so
   they are what sets the type inside SureForms' success box. The box's own
   border, ground and badge live in css/pages/submit-service.css, beside the
   other `.ea-form--srfm` rules.
   ==================================================================*/

/* Ink-900 on --ea-pos-100 measures 14.0:1; a fourth green element turns
   the confirmation into a colour field. */
.ea-main .ea-done__title,
.entry-content .ea-done__title {
    margin: 0 0 var(--ea-s2);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ea-ink-900);
}
.ea-main .ea-done__body,
.entry-content .ea-done__body {
    max-width: 30em;
    /* `0 auto var(--ea-s6)` in the mockup, where a "suggest another service"
       button followed. Nothing follows it now, and the bottom margin measured
       32px of dead space inside the box. */
    margin: 0 auto;
    color: var(--ea-ink-700); /* 10.9:1 on --ea-pos-100 */
}
/* ==================================================================
   RESPONSIVE
   Fit is checked at each breakpoint AND one pixel above it (01 §6.6).
   ==================================================================*/

/* -- above 900px: the guidance rail sticks ---------------------------
   901px is the rail's 260px floor, not where it first fits. The cap makes
   the rail a scroll container, and view.js gives it a tabindex while it
   overflows. */
@media (min-width: 901px) {
    .ea-aside {
        position: sticky;
        /* `--ea-header-height` AND NOT THE MOCKUP'S `--header-height`.
           ea-content.css §0a states the reason in full: Blocksy shadows
           `--header-height` on `<body>` and the value it shadows in is
           the DECLARED 120px while the bar RENDERS 80px, so the card
           parked 144px down where the mockup puts it at 104px and its
           cap was 40px shorter than the space it had. ea-custom.css §2's
           `--ea-header-height` carries the rendered number, with its
           70px step below 768. */
        top: calc(var(--ea-header-height) + var(--ea-s5));
        max-height: calc(100vh - var(--ea-header-height) - var(--ea-s7));
        overflow-y: auto;
    }
    .ea-aside:focus-visible {
        outline: 2px solid var(--ea-blue-700);
        outline-offset: 2px;
    }
}

/* -- above 1024px: the same cap on the segmented control -------------*/
@media (min-width: 1025px) {
    .ea-seg {
        max-width: min(var(--ea-form-col), calc(100% - 324px));
    }
}

/* -- 1024px and below ------------------------------------------------*/
@media (max-width: 1024px) {
    .ea-panel__cols {
        gap: var(--ea-s7);
    }
    /* Never wider than the form it switches to: 308px is the 48px gap plus
       the aside's 260px floor, the same arithmetic as the grid. */
    .ea-seg {
        max-width: min(var(--ea-form-col), calc(100% - 308px));
    }
}

/* -- 900px and below -------------------------------------------------*/
@media (max-width: 900px) {
    .ea-panel__cols {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--ea-s6);
    }
    .ea-seg {
        max-width: var(--ea-form-col);
    }
    .ea-aside {
        order: -1;
        max-width: var(--ea-form-col);
    }
}

/* -- 768px and below -------------------------------------------------
   The segmented control keeps its two columns: at 320px each segment is
   still 145px, and stacking pushes the first field 68px further down. */
@media (max-width: 768px) {
    .ea-forms {
        padding-block: var(--ea-s6) var(--ea-s7);
    }
    .ea-seg {
        margin-bottom: var(--ea-s6);
    }
    .ea-seg__btn {
        min-height: 56px;
        padding: var(--ea-s2) var(--ea-s3);
    }
    .ea-seg__label {
        font-size: 1rem;
    }
    .ea-seg__note {
        font-size: 0.76rem;
    }
    .ea-criteria {
        padding: var(--ea-s4);
    }
}

/* -- 600px and below -------------------------------------------------
   At 601px each half of the pair is 129px, narrower than a typed email. */
@media (max-width: 600px) {
    /* THE FORM-TYPE SWITCH STACKS, and this is a design decision rather than a
       port (client feedback 2026-09-07, item S3).

       THE MOCKUP HAS THE SAME PROBLEM, so there was nothing to copy. Measured
       2026-09-07 against http://localhost:8899/02-site-v1/submit-service.html
       and the live page, both at 390 and at 360: the two are identical to the
       tenth of a pixel. At 390 the control is 339x104 with two 162.5x94 halves;
       at 360 it is 309x126.1 with two 147.5x116.1 halves whose label alone runs
       to three lines. That is the client's "squeezed, and very tall": the
       control grows in the one direction a phone has least of, because the text
       is being forced through a 147px column.

       600px is the portal's own one-column gate on this form, where `.ea-pair`
       drops to a single column and `.ea-actions .ea-btn` goes full width in the
       same block. The switch now follows the same rule instead of being the one
       two-up element left on a phone, so no new breakpoint and no new
       vocabulary enter the design. Everything else about the control is
       unchanged: the same border, the same 4px inset and gap, the same filled
       selected state, the same radius.

       The label and the note each get the full column, so both fit on one line
       and the note stops being three words wide. `min-height` drops to 52px
       because two clean lines no longer need 56, and `align-content: center`
       keeps a wrapped label centred in its row rather than top-aligned. */
    .ea-seg {
        flex-direction: column;
    }
    .ea-seg__btn {
        flex: 0 0 auto;
        min-height: 52px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* THE ONE-COLUMN GATE'S OTHER FIVE RULES WENT WITH THE CUSTOM FORM.
       They narrowed `.ea-pair` to one column, let the alternatives row wrap at
       320px, took `.ea-actions .ea-btn` full width and tightened `.ea-done`'s
       padding. css/pages/submit-service.css restates the first three against
       the SureForms markup in its own `max-width: 600px` block
       (`.srfm-block-width-50`, `.srfm-submit-container .wp-block-button`,
       `.srfm-submit-button`) and the fourth against `.srfm-success-box`, so
       the behaviour is unchanged and is declared once, where the elements are.
       That is why removing them here measured a zero-pixel difference. */
}

/* -- 420px and below -------------------------------------------------*/
@media (max-width: 420px) {
    .ea-seg__note {
        font-size: 0.72rem;
        line-height: 1.3;
    }
}
