/* ==========================================================
   FPLF LAYER 2 – subcategory hub components (Path 2)
   Loaded only on Pages with the post meta _fplf_l2_term (inc/layer2.php),
   after category-cards.css and category-landing.css; every rule is scoped
   to body.fplf-l2. Component rules (selectors on .fplf-l2-* markup) are also
   scoped to body.fplf-l2-host: a non-Layer-2 page that embeds a Layer 2
   component, e.g. the state list on a main category page (inc/layer2.php,
   fplf_l2_is_host()); hero and heading rules for Layer 1 markup are not.
   Shared tokens come from the Layer 1 system (module 09:
   hero, TOC, title, CTA button, FAQ, legal box, final CTA; V3 cards); this
   file adds what the Layer 2 reference design needs on top:
   section rhythm and headings, secondary hero button, state selector,
   document cards with format badges, numbered steps.
   Reference: "Subcategory · Power of Attorney Forms" (FPLF Texas Page
   Prototype). Content width 1140px (category-landing.css); lower editorial
   sections keep the Layer 1 960px column.
========================================================== */

body.fplf-l2, body.fplf-l2-host {
    --fplf-l2-navy: #153a66;
    --fplf-l2-blue: #2f6fdd;
    --fplf-l2-link: #2f73d9;
    --fplf-l2-text: #374151;
    --fplf-l2-muted: #4b5563;
    --fplf-l2-border: #dbe4ee;
    --fplf-l2-tint: #f8fafc;
}


/* ---------- hero ---------- */

body.fplf-l2 .fplf-category-hero-content .fplf-category-title {
    margin-bottom: 16px;
}

body.fplf-l2 .fplf-category-hero-content .fplf-category-intro {
    max-width: 640px;
    color: var(--fplf-l2-text);
}

body.fplf-l2 .fplf-l2-actions,
body.fplf-l2-host .fplf-l2-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 6px;
}

body.fplf-l2 .fplf-l2-actions .fplf-category-cta--secondary,
body.fplf-l2-host .fplf-l2-actions .fplf-category-cta--secondary {
    background: #ffffff !important;
    border-color: var(--fplf-l2-blue) !important;

    color: var(--fplf-l2-navy) !important;
}

body.fplf-l2 .fplf-l2-actions .fplf-category-cta--secondary:hover,
body.fplf-l2-host .fplf-l2-actions .fplf-category-cta--secondary:hover,
body.fplf-l2 .fplf-l2-actions .fplf-category-cta--secondary:focus-visible,
body.fplf-l2-host .fplf-l2-actions .fplf-category-cta--secondary:focus-visible {
    background: #eef4fd !important;
    color: var(--fplf-l2-navy) !important;
}


/* ---------- section rhythm and headings (80px between sections, 56px on mobile) ---------- */

body.fplf-l2 .fplf-category-hero > .fplf-l2-section,
body.fplf-l2-host .fplf-category-hero > .fplf-l2-section {
    padding: 40px 0;

    /* The landing wrapper centres text (Layer 1); Layer 2 sections read left-aligned. */
    text-align: left;
}

body.fplf-l2 .fplf-l2-section-title,
body.fplf-l2-host .fplf-l2-section-title,
body.fplf-l2 .fplf-category-about h2,
body.fplf-l2 .fplf-category-example-content h2,
body.fplf-l2 .fplf-category-faq-inner > h2,
body.fplf-l2 .fplf-category-how-to-inner h2 {
    margin: 0 0 10px;

    color: var(--fplf-l2-navy);

    font-size: 30px;
    line-height: 1.25;
    font-weight: 700;

    text-align: left;
}

body.fplf-l2 .fplf-category-legal-info-inner h2 {
    font-size: 26px;
    line-height: 1.3;
}

body.fplf-l2 .fplf-l2-section-intro,
body.fplf-l2-host .fplf-l2-section-intro {
    max-width: 760px;
    margin: 0 0 24px;

    color: var(--fplf-l2-muted);

    font-size: 15px;
    line-height: 1.6;
}


/* ---------- types: Layer 1 V3 cards, 4 columns (category-cards.css) ---------- */

body.fplf-l2 .fplf-l2-types .fplf-l2-section-title,
body.fplf-l2-host .fplf-l2-types .fplf-l2-section-title {
    margin-bottom: 22px;
}


/* ---------- state selector ---------- */

body.fplf-l2 .fplf-l2-states .fplf-l2-section-inner,
body.fplf-l2-host .fplf-l2-states .fplf-l2-section-inner {
    padding: 32px;

    background: var(--fplf-l2-tint);

    border: 1px solid var(--fplf-l2-border);
    border-radius: 12px;
}

body.fplf-l2 ul.fplf-l2-states-list,
body.fplf-l2-host ul.fplf-l2-states-list {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px 18px;

    margin: 0;
    padding: 0;

    list-style: none;
}

body.fplf-l2 ul.fplf-l2-states-list > li,
body.fplf-l2-host ul.fplf-l2-states-list > li {
    margin: 0;
}

body.fplf-l2 ul.fplf-l2-states-list a,
body.fplf-l2-host ul.fplf-l2-states-list a {
    display: flex;
    align-items: center;

    min-height: 40px;
    padding: 8px 10px;

    border-radius: 8px;

    color: var(--fplf-l2-link);

    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;

    text-decoration: none;

    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}

body.fplf-l2 ul.fplf-l2-states-list a:hover,
body.fplf-l2-host ul.fplf-l2-states-list a:hover,
body.fplf-l2 ul.fplf-l2-states-list a:focus-visible,
body.fplf-l2-host ul.fplf-l2-states-list a:focus-visible {
    background: var(--fplf-l2-blue);
    color: #ffffff;
}

body.fplf-l2 ul.fplf-l2-states-list a:focus-visible,
body.fplf-l2-host ul.fplf-l2-states-list a:focus-visible,
body.fplf-l2 .fplf-l2-state-form select:focus-visible,
body.fplf-l2-host .fplf-l2-state-form select:focus-visible,
body.fplf-l2 .fplf-l2-state-form button:focus-visible,
body.fplf-l2-host .fplf-l2-state-form button:focus-visible {
    outline: 3px solid rgba(47, 111, 221, 0.35);
    outline-offset: 2px;
}

/* Quick state select: small screens only (the grid stays below it). */

body.fplf-l2 .fplf-l2-state-form,
body.fplf-l2-host .fplf-l2-state-form {
    display: none;
}

/* Form-ID allowlist select: hidden until layer2-states.js shows it (beats the small-screen display: block). */
body.fplf-l2 .fplf-l2-state-form[hidden],
body.fplf-l2-host .fplf-l2-state-form[hidden] {
    display: none;
}

@media (max-width: 1024px) {
    body.fplf-l2 ul.fplf-l2-states-list,
    body.fplf-l2-host ul.fplf-l2-states-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    body.fplf-l2 .fplf-l2-states .fplf-l2-section-inner,
    body.fplf-l2-host .fplf-l2-states .fplf-l2-section-inner {
        padding: 22px 18px;
    }

    body.fplf-l2 .fplf-l2-state-form,
    body.fplf-l2-host .fplf-l2-state-form {
        display: block;

        margin: 0 0 18px;
        padding-bottom: 18px;

        border-bottom: 1px solid var(--fplf-l2-border);
    }

    body.fplf-l2 .fplf-l2-state-form label,
    body.fplf-l2-host .fplf-l2-state-form label {
        display: block;

        margin-bottom: 8px;

        color: var(--fplf-l2-navy);

        font-size: 15px;
        font-weight: 700;
    }

    body.fplf-l2 .fplf-l2-state-form-row,
    body.fplf-l2-host .fplf-l2-state-form-row {
        display: flex;
        gap: 10px;
    }

    body.fplf-l2 .fplf-l2-state-form select,
    body.fplf-l2-host .fplf-l2-state-form select {
        flex: 1 1 auto;

        min-width: 0;
        min-height: 46px;
        padding: 0 12px;

        background: #ffffff;

        border: 1px solid #c9d6e4;
        border-radius: 6px;

        color: #1f2937;

        font-size: 16px;
    }

    body.fplf-l2 .fplf-l2-state-form button,
    body.fplf-l2-host .fplf-l2-state-form button {
        flex: 0 0 auto;

        min-height: 46px;
        padding: 0 16px;

        background: var(--fplf-l2-blue);

        border: 1px solid var(--fplf-l2-blue);
        border-radius: 6px;

        color: #ffffff;

        font-size: 15px;
        font-weight: 600;

        cursor: pointer;
    }

    body.fplf-l2 ul.fplf-l2-states-list,
    body.fplf-l2-host ul.fplf-l2-states-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px 12px;
    }

    body.fplf-l2 ul.fplf-l2-states-list a,
    body.fplf-l2-host ul.fplf-l2-states-list a {
        min-height: 44px;
    }
}


/* ---------- document cards (general forms) ---------- */

/* Opt-in [fplf_l2_forms width="editorial"]: the section uses the Layer 1 editorial column of About / FAQ /
   Legal (centred 960px from 1120px, category-landing.css + module 09); below 1120px every section already
   shares the content width. The card grid is unchanged, so a single card keeps its column width. */

@media (min-width: 1120px) {
    body.fplf-l2 .fplf-l2-section--editorial > .fplf-l2-section-inner,
    body.fplf-l2-host .fplf-l2-section--editorial > .fplf-l2-section-inner {
        max-width: 960px;
        margin-right: auto;
        margin-left: auto;
    }
}

body.fplf-l2 ul.fplf-l2-docs,
body.fplf-l2-host ul.fplf-l2-docs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;

    margin: 0;
    padding: 0;

    list-style: none;
}

body.fplf-l2 .fplf-l2-doc,
body.fplf-l2-host .fplf-l2-doc {
    position: relative;

    display: flex;
    flex-direction: column;
    gap: 8px;

    min-width: 0;
    margin: 0;
    padding: 18px 20px;

    background: #ffffff;

    border: 1px solid var(--fplf-l2-border);
    border-radius: 12px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

body.fplf-l2 .fplf-l2-doc:hover,
body.fplf-l2-host .fplf-l2-doc:hover,
body.fplf-l2 .fplf-l2-doc:focus-within,
body.fplf-l2-host .fplf-l2-doc:focus-within {
    transform: translateY(-2px);

    border-color: #b8cbe0;

    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

body.fplf-l2 .fplf-l2-doc-title,
body.fplf-l2-host .fplf-l2-doc-title {
    margin: 0;

    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
}

body.fplf-l2 .fplf-l2-doc-title a,
body.fplf-l2-host .fplf-l2-doc-title a {
    color: var(--fplf-l2-navy);
    text-decoration: none;
}

/* Whole card is the link target; the title stays the accessible name. */

body.fplf-l2 .fplf-l2-doc-title a::after,
body.fplf-l2-host .fplf-l2-doc-title a::after {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: 12px;
}

body.fplf-l2 .fplf-l2-doc-title a:focus-visible,
body.fplf-l2-host .fplf-l2-doc-title a:focus-visible {
    outline: none;
}

body.fplf-l2 .fplf-l2-doc-title a:focus-visible::after,
body.fplf-l2-host .fplf-l2-doc-title a:focus-visible::after {
    outline: 3px solid rgba(47, 111, 221, 0.35);
    outline-offset: 2px;
}

body.fplf-l2 .fplf-l2-doc-note,
body.fplf-l2-host .fplf-l2-doc-note {
    margin: 0;

    color: var(--fplf-l2-muted);

    font-size: 14px;
    line-height: 1.5;
}

body.fplf-l2 .fplf-l2-doc-meta,
body.fplf-l2-host .fplf-l2-doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin: auto 0 0;
    padding-top: 4px;
}

body.fplf-l2 .fplf-l2-badge,
body.fplf-l2-host .fplf-l2-badge,
body.fplf-l2 .fplf-l2-format,
body.fplf-l2-host .fplf-l2-format {
    display: inline-block;

    padding: 2px 9px;

    border-radius: 999px;

    font-size: 12px;
    line-height: 1.5;
}

body.fplf-l2 .fplf-l2-badge,
body.fplf-l2-host .fplf-l2-badge {
    border: 1px solid #9fb0c4;

    color: #35516f;

    font-weight: 600;
}

body.fplf-l2 .fplf-l2-format,
body.fplf-l2-host .fplf-l2-format {
    background: #f1f5f9;

    border: 1px solid #f1f5f9;

    color: #334155;

    font-weight: 700;
}

body.fplf-l2 .fplf-l2-notice,
body.fplf-l2-host .fplf-l2-notice {
    max-width: 760px;
    margin: -8px 0 20px;

    color: var(--fplf-l2-muted);

    font-size: 15px;
    line-height: 1.6;
}

@media (max-width: 1024px) {
    body.fplf-l2 ul.fplf-l2-docs,
    body.fplf-l2-host ul.fplf-l2-docs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    body.fplf-l2 ul.fplf-l2-docs,
    body.fplf-l2-host ul.fplf-l2-docs {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}


/* ---------- How to Use: numbered steps ---------- */

body.fplf-l2 ol.fplf-l2-steps,
body.fplf-l2-host ol.fplf-l2-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;

    margin: 20px 0 0;
    padding: 0;

    list-style: none;

    counter-reset: fplf-l2-step;
}

body.fplf-l2 ol.fplf-l2-steps > li,
body.fplf-l2-host ol.fplf-l2-steps > li {
    margin: 0;
    padding: 16px 18px;

    background: var(--fplf-l2-tint);

    border: 1px solid var(--fplf-l2-border);
    border-radius: 12px;

    color: var(--fplf-l2-text);

    font-size: 15px;
    line-height: 1.55;

    counter-increment: fplf-l2-step;
}

body.fplf-l2 ol.fplf-l2-steps > li::before,
body.fplf-l2-host ol.fplf-l2-steps > li::before {
    content: "Step " counter(fplf-l2-step);

    display: block;

    margin-bottom: 6px;

    color: var(--fplf-l2-blue);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.fplf-l2 ol.fplf-l2-steps > li strong,
body.fplf-l2-host ol.fplf-l2-steps > li strong {
    display: block;

    margin-bottom: 4px;

    color: var(--fplf-l2-navy);

    font-size: 16px;
}


/* ---------- mobile ---------- */

@media (max-width: 767px) {
    body.fplf-l2 .fplf-category-hero > .fplf-l2-section,
    body.fplf-l2-host .fplf-category-hero > .fplf-l2-section {
        padding: 28px 0;
    }

    body.fplf-l2 .fplf-l2-section-title,
    body.fplf-l2-host .fplf-l2-section-title,
    body.fplf-l2 .fplf-category-about h2,
    body.fplf-l2 .fplf-category-example-content h2,
    body.fplf-l2 .fplf-category-faq-inner > h2,
    body.fplf-l2 .fplf-category-how-to-inner h2 {
        font-size: 25px;
    }

    body.fplf-l2 .fplf-category-legal-info-inner h2 {
        font-size: 23px;
    }

    body.fplf-l2 .fplf-l2-actions .fplf-category-cta,
    body.fplf-l2-host .fplf-l2-actions .fplf-category-cta {
        flex: 1 1 100%;
    }

    body.fplf-l2 ol.fplf-l2-steps,
    body.fplf-l2-host ol.fplf-l2-steps {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.fplf-l2 .fplf-l2-doc,
    body.fplf-l2-host .fplf-l2-doc,
    body.fplf-l2 ul.fplf-l2-states-list a,
    body.fplf-l2-host ul.fplf-l2-states-list a {
        transition: none;
    }
}


/* ---------- How to Use: timeline variant (ol.fplf-l2-steps.fplf-l2-timeline) ----------
   Same list markup as the step cards (<li><strong>Title</strong> text</li>), opted in per Page
   by the manifest (how_to.layout = "timeline"). Numbered circles joined by a line: one row
   with any number of steps from 1024px, a compact vertical timeline below. */

body.fplf-l2 ol.fplf-l2-steps.fplf-l2-timeline,
body.fplf-l2-host ol.fplf-l2-steps.fplf-l2-timeline {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0 24px;

    margin-top: 28px;
}

body.fplf-l2 ol.fplf-l2-steps.fplf-l2-timeline > li,
body.fplf-l2-host ol.fplf-l2-steps.fplf-l2-timeline > li {
    position: relative;

    padding: 0;

    background: none;
    border: 0;
    border-radius: 0;
}

body.fplf-l2 ol.fplf-l2-steps.fplf-l2-timeline > li::before,
body.fplf-l2-host ol.fplf-l2-steps.fplf-l2-timeline > li::before {
    content: counter(fplf-l2-step);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    margin-bottom: 14px;

    background: var(--fplf-l2-navy);
    border-radius: 50%;

    color: #fff;

    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}

body.fplf-l2 ol.fplf-l2-steps.fplf-l2-timeline > li:not(:last-child)::after,
body.fplf-l2-host ol.fplf-l2-steps.fplf-l2-timeline > li:not(:last-child)::after {
    content: "";

    position: absolute;
    top: 17px;
    left: 46px;
    right: -14px;

    height: 2px;

    background: var(--fplf-l2-border);
}

body.fplf-l2 ol.fplf-l2-steps.fplf-l2-timeline > li strong,
body.fplf-l2-host ol.fplf-l2-steps.fplf-l2-timeline > li strong {
    margin-bottom: 6px;

    line-height: 1.35;
}

@media (max-width: 1023px) {
    body.fplf-l2 ol.fplf-l2-steps.fplf-l2-timeline,
    body.fplf-l2-host ol.fplf-l2-steps.fplf-l2-timeline {
        grid-auto-flow: row;
        grid-auto-columns: auto;
        gap: 0;

        margin-top: 24px;
    }

    body.fplf-l2 ol.fplf-l2-steps.fplf-l2-timeline > li,
    body.fplf-l2-host ol.fplf-l2-steps.fplf-l2-timeline > li {
        min-height: 36px;
        padding: 6px 0 22px 52px;
    }

    body.fplf-l2 ol.fplf-l2-steps.fplf-l2-timeline > li:last-child,
    body.fplf-l2-host ol.fplf-l2-steps.fplf-l2-timeline > li:last-child {
        padding-bottom: 0;
    }

    body.fplf-l2 ol.fplf-l2-steps.fplf-l2-timeline > li::before,
    body.fplf-l2-host ol.fplf-l2-steps.fplf-l2-timeline > li::before {
        position: absolute;
        top: 0;
        left: 0;

        margin: 0;
    }

    body.fplf-l2 ol.fplf-l2-steps.fplf-l2-timeline > li:not(:last-child)::after,
    body.fplf-l2-host ol.fplf-l2-steps.fplf-l2-timeline > li:not(:last-child)::after {
        top: 42px;
        bottom: 6px;
        left: 17px;
        right: auto;

        width: 2px;
        height: auto;
    }

    body.fplf-l2 ol.fplf-l2-steps.fplf-l2-timeline > li strong,
    body.fplf-l2-host ol.fplf-l2-steps.fplf-l2-timeline > li strong {
        margin-bottom: 2px;
    }
}

/* ---------- document rows ([fplf_l2_forms layout="rows"], state landing pages) ----------
   One row per document: document mark | title + badge, note, format line | View form, PDF, Word.
   Reference: "State page · Texas Power of Attorney Forms" (FPLF Texas Page Prototype). Below 768px
   the buttons move under the text and share the row width. */
body.fplf-l2 ul.fplf-l2-rows,
body.fplf-l2-host ul.fplf-l2-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
body.fplf-l2 .fplf-l2-row,
body.fplf-l2-host .fplf-l2-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 20px;
    margin: 0;
    padding: 20px 22px;
    background: #ffffff;
    border: 1px solid var(--fplf-l2-border);
    border-radius: 12px;
}
body.fplf-l2 .fplf-l2-row-icon,
body.fplf-l2-host .fplf-l2-row-icon {
    box-sizing: border-box;
    width: 40px;
    height: 50px;
    padding: 11px 8px;
    background: repeating-linear-gradient(to bottom, #c9d5e3 0 2px, transparent 2px 8px) content-box, var(--fplf-l2-tint);
    border: 1px solid var(--fplf-l2-border);
    border-radius: 4px;
}
body.fplf-l2 .fplf-l2-row-body,
body.fplf-l2-host .fplf-l2-row-body {
    min-width: 0;
}
body.fplf-l2 .fplf-l2-row-head,
body.fplf-l2-host .fplf-l2-row-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}
body.fplf-l2 .fplf-l2-row-title,
body.fplf-l2-host .fplf-l2-row-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
}
body.fplf-l2 .fplf-l2-row-title a,
body.fplf-l2-host .fplf-l2-row-title a {
    color: var(--fplf-l2-navy);
    text-decoration: none;
}
body.fplf-l2 .fplf-l2-row-title a:hover,
body.fplf-l2-host .fplf-l2-row-title a:hover {
    text-decoration: underline;
}
body.fplf-l2 .fplf-l2-badge--state,
body.fplf-l2-host .fplf-l2-badge--state {
    background: var(--fplf-l2-navy);
    border-color: var(--fplf-l2-navy);
    color: #ffffff;
}
body.fplf-l2 .fplf-l2-row .fplf-l2-doc-note,
body.fplf-l2-host .fplf-l2-row .fplf-l2-doc-note {
    margin-top: 6px;
}
body.fplf-l2 .fplf-l2-row-format,
body.fplf-l2-host .fplf-l2-row-format {
    margin: 4px 0 0;
    color: var(--fplf-l2-muted);
    font-size: 13px;
    line-height: 1.5;
}
body.fplf-l2 .fplf-l2-row-actions,
body.fplf-l2-host .fplf-l2-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
body.fplf-l2 .fplf-l2-btn,
body.fplf-l2-host .fplf-l2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    background: #ffffff;
    border: 1px solid #c9d6e4;
    border-radius: 6px;
    color: var(--fplf-l2-navy);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease;
}
body.fplf-l2 .fplf-l2-btn:hover,
body.fplf-l2-host .fplf-l2-btn:hover {
    background: #eef4fd;
    border-color: var(--fplf-l2-blue);
    color: var(--fplf-l2-navy);
}
body.fplf-l2 .fplf-l2-btn--primary,
body.fplf-l2-host .fplf-l2-btn--primary {
    background: var(--fplf-l2-blue);
    border-color: var(--fplf-l2-blue);
    color: #ffffff;
}
body.fplf-l2 .fplf-l2-btn--primary:hover,
body.fplf-l2-host .fplf-l2-btn--primary:hover {
    background: #2559b8;
    border-color: #2559b8;
    color: #ffffff;
}
body.fplf-l2 .fplf-l2-btn:focus-visible,
body.fplf-l2-host .fplf-l2-btn:focus-visible,
body.fplf-l2 .fplf-l2-row-title a:focus-visible,
body.fplf-l2-host .fplf-l2-row-title a:focus-visible,
body.fplf-l2 .fplf-l2-switch-all:focus-visible,
body.fplf-l2-host .fplf-l2-switch-all:focus-visible {
    outline: 3px solid rgba(47, 111, 221, 0.35);
    outline-offset: 2px;
}
@media (max-width: 767px) {
    body.fplf-l2 .fplf-l2-row,
    body.fplf-l2-host .fplf-l2-row {
        grid-template-columns: 32px minmax(0, 1fr);
        align-items: start;
        gap: 0 14px;
        padding: 18px 16px;
    }
    body.fplf-l2 .fplf-l2-row-icon,
    body.fplf-l2-host .fplf-l2-row-icon {
        width: 32px;
        height: 40px;
        padding: 8px 6px;
        background-image: repeating-linear-gradient(to bottom, #c9d5e3 0 2px, transparent 2px 7px);
    }
    body.fplf-l2 .fplf-l2-row-title,
    body.fplf-l2-host .fplf-l2-row-title {
        font-size: 16px;
    }
    body.fplf-l2 .fplf-l2-row-actions,
    body.fplf-l2-host .fplf-l2-row-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
        margin-top: 14px;
    }
    body.fplf-l2 .fplf-l2-btn,
    body.fplf-l2-host .fplf-l2-btn {
        flex: 1 1 0;
        min-height: 44px;
        padding: 0 12px;
    }
    body.fplf-l2 .fplf-l2-btn--primary,
    body.fplf-l2-host .fplf-l2-btn--primary {
        flex-grow: 2;
    }
}

/* ---------- compact state switcher ([fplf_l2_states layout="select"]) ----------
   Heading and intro on the left, select + View forms + All states on the right (stacked below 900px).
   The select is visible at every width here (the grid variant shows its select on small screens only). */
body.fplf-l2 .fplf-l2-states--switch .fplf-l2-section-inner,
body.fplf-l2-host .fplf-l2-states--switch .fplf-l2-section-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
    align-items: center;
    gap: 4px 32px;
    padding: 26px 28px;
}
body.fplf-l2 .fplf-l2-states--switch .fplf-l2-section-title,
body.fplf-l2-host .fplf-l2-states--switch .fplf-l2-section-title {
    grid-column: 1;
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
}
body.fplf-l2 .fplf-l2-states--switch .fplf-l2-section-intro,
body.fplf-l2-host .fplf-l2-states--switch .fplf-l2-section-intro {
    grid-column: 1;
    margin: 0;
}
body.fplf-l2 .fplf-l2-switch,
body.fplf-l2-host .fplf-l2-switch {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
body.fplf-l2 .fplf-l2-switch .fplf-l2-state-form--switch,
body.fplf-l2-host .fplf-l2-switch .fplf-l2-state-form--switch {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
body.fplf-l2 .fplf-l2-switch .fplf-l2-state-form--switch[hidden],
body.fplf-l2-host .fplf-l2-switch .fplf-l2-state-form--switch[hidden] {
    display: none;
}
body.fplf-l2 .fplf-l2-switch .fplf-l2-state-form-row,
body.fplf-l2-host .fplf-l2-switch .fplf-l2-state-form-row {
    display: flex;
    gap: 10px;
}
body.fplf-l2 .fplf-l2-switch select,
body.fplf-l2-host .fplf-l2-switch select {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #c9d6e4;
    border-radius: 6px;
    color: #1f2937;
    font-size: 16px;
}
body.fplf-l2 .fplf-l2-switch button,
body.fplf-l2-host .fplf-l2-switch button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 16px;
    background: var(--fplf-l2-blue);
    border: 1px solid var(--fplf-l2-blue);
    border-radius: 6px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
body.fplf-l2 .fplf-l2-switch-all,
body.fplf-l2-host .fplf-l2-switch-all {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    background: #ffffff;
    border: 1px solid var(--fplf-l2-blue);
    border-radius: 6px;
    color: var(--fplf-l2-navy);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
body.fplf-l2 .fplf-l2-switch-all:hover,
body.fplf-l2-host .fplf-l2-switch-all:hover {
    background: #eef4fd;
    color: var(--fplf-l2-navy);
}
@media (max-width: 899px) {
    body.fplf-l2 .fplf-l2-states--switch .fplf-l2-section-inner,
    body.fplf-l2-host .fplf-l2-states--switch .fplf-l2-section-inner {
        grid-template-columns: minmax(0, 1fr);
    }
    body.fplf-l2 .fplf-l2-switch,
    body.fplf-l2-host .fplf-l2-switch {
        grid-column: 1;
        grid-row: auto;
        margin-top: 14px;
    }
}
@media (max-width: 479px) {
    body.fplf-l2 .fplf-l2-states--switch .fplf-l2-section-inner,
    body.fplf-l2-host .fplf-l2-states--switch .fplf-l2-section-inner {
        padding: 22px 18px;
    }
    body.fplf-l2 .fplf-l2-switch,
    body.fplf-l2-host .fplf-l2-switch {
        flex-direction: column;
        align-items: stretch;
    }
    body.fplf-l2 .fplf-l2-switch-all,
    body.fplf-l2-host .fplf-l2-switch-all {
        justify-content: center;
    }
}

/* ---------- state landing pages (body.fplf-l2-state): the general-forms notice as a callout ---------- */
body.fplf-l2-state .fplf-l2-notice {
    position: relative;
    max-width: none;
    margin: 0 0 20px;
    padding: 14px 18px 14px 46px;
    background: #fffbeb;
    border: 1px solid #f5d98b;
    border-radius: 8px;
    color: #7a4b0b;
    font-size: 14px;
}
body.fplf-l2-state .fplf-l2-notice::before {
    content: "!";
    position: absolute;
    top: 15px;
    left: 16px;
    width: 18px;
    height: 18px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
}
@media (prefers-reduced-motion: reduce) {
    body.fplf-l2 .fplf-l2-btn,
    body.fplf-l2-host .fplf-l2-btn {
        transition: none;
    }
}


/* ---------- Will Forms 9794 / Bill of Sale 9798: state list first (client request 2026-11-10) ----------
   The state list directly below the hero container takes the category cards' former place: the same distance from the
   hero (the cards' GenerateBlocks margin-top 30px + their top padding 56 / 48 / 40 px, module 09). The cards follow at the
   regular section rhythm (80 px, 56 px on phones): their 30px margin is dropped and the list's bottom padding makes up the
   rest, so the cards' own box - and its background ellipse - keeps its size. Inert while the list sits below the cards. */
body.fplf-l2-host .fplf-category-hero > .fplf-category-hero-inner + .fplf-l2-states {
    margin-top: 30px;
    padding-top: 56px;
    padding-bottom: 24px;
}
body.fplf-l2-host .fplf-category-hero > .fplf-l2-states + .fplf-category-popular {
    margin-top: 0;
}
@media (max-width: 1024px) {
    body.fplf-l2-host .fplf-category-hero > .fplf-category-hero-inner + .fplf-l2-states {
        padding-top: 48px;
        padding-bottom: 32px;
    }
}
@media (max-width: 767px) {
    body.fplf-l2-host .fplf-category-hero > .fplf-category-hero-inner + .fplf-l2-states {
        padding-top: 40px;
        padding-bottom: 16px;
    }
}


/* ---------- universal state navigation (client request 2026-11-11) ----------
   [fplf_l2_states pages="all"] on Personal 9540, Will Forms 9794, Bill of Sale 9798: all 51 states in two groups, "with
   state-specific forms" and "without state-specific forms yet" (heading with count, optional note, the regular state grid;
   the select gets one optgroup each). Category + state view (/state/{state}/{category}/, body.fplf-tax-archive): its
   notices use the state landing pages' callout. Inert without the group / view markup. */
body.fplf-l2 .fplf-l2-states-group + .fplf-l2-states-group,
body.fplf-l2-host .fplf-l2-states-group + .fplf-l2-states-group {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--fplf-l2-border);
}
body.fplf-l2 .fplf-l2-states-group-title,
body.fplf-l2-host .fplf-l2-states-group-title {
    margin: 0 0 10px;
    color: var(--fplf-l2-navy);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}
body.fplf-l2 .fplf-l2-states-group-count,
body.fplf-l2-host .fplf-l2-states-group-count {
    color: var(--fplf-l2-muted);
    font-weight: 600;
}
body.fplf-l2 .fplf-l2-states-group-note,
body.fplf-l2-host .fplf-l2-states-group-note {
    max-width: 760px;
    margin: -4px 0 12px;
    color: var(--fplf-l2-muted);
    font-size: 15px;
    line-height: 1.55;
}
body.fplf-tax-archive #forms .fplf-l2-notice {
    position: relative;
    max-width: none;
    margin: 0 0 16px;
    padding: 14px 18px 14px 46px;
    background: #fffbeb;
    border: 1px solid #f5d98b;
    border-radius: 8px;
    color: #7a4b0b;
    font-size: 14px;
}
body.fplf-tax-archive #forms .fplf-l2-notice::before {
    content: "!";
    position: absolute;
    top: 15px;
    left: 16px;
    width: 18px;
    height: 18px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
}
@media (max-width: 767px) {
    body.fplf-l2 .fplf-l2-states-group + .fplf-l2-states-group,
    body.fplf-l2-host .fplf-l2-states-group + .fplf-l2-states-group {
        margin-top: 18px;
        padding-top: 18px;
    }
    body.fplf-l2 .fplf-l2-states-group-title,
    body.fplf-l2-host .fplf-l2-states-group-title {
        font-size: 16px;
    }
}
