/* ===================================================================
   /for-managers — the sales page aimed at other LIHTC management
   companies.

   Its own stylesheet, linked from the page rather than appended to
   app.css, so none of it can reach the applicant-facing pages and no
   applicant downloads it. Everything is prefixed fm- and built on the
   fk tokens, so the page moves with the design system instead of
   carrying a second palette.

   The two walkthroughs cycle on CSS keyframes rather than a timer on
   the server: this page is public, and a Blazor circuit ticking once a
   second per visitor is a real cost for decoration. Scene one is the
   resting state, so the page is complete before any animation runs and
   stays complete when prefers-reduced-motion stops it.
   =================================================================== */

.fm-main { max-width: none; }

.fm {
    --fm-seal: var(--fk-teal-dark);
    --fm-rule: var(--fk-rule);
    --fm-soft: var(--fk-surface-sunken);
    display: flex;
    flex-direction: column;
    max-width: 1120px;
    margin-inline: auto;
}

.fm-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fk-muted);
    margin: 0;
}

.fm-eyebrow-sm { font-size: 0.6rem; }
.fm-eyebrow-pending { color: var(--fk-warn-ink-deep); }

.fm-h1 {
    font-family: var(--fk-font-display);
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    line-height: 1.05;
    margin: 0;
    text-wrap: balance;
}

.fm-h2 {
    font-family: var(--fk-font-display);
    font-size: clamp(1.5rem, 3vw, 2.15rem);
    line-height: 1.15;
    margin: 0;
    text-wrap: balance;
}

.fm-h2-sm { font-size: 1.35rem; }

.fm-lede {
    font-size: 1.02rem;
    color: var(--fk-ink-soft);
    max-width: 62ch;
    margin: 0;
}

.fm-section {
    border-top: 1px solid var(--fm-rule);
    padding-block: clamp(36px, 5vw, 62px);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.fm-cta-row { display: flex; flex-wrap: wrap; gap: 10px; }

.fm-btn {
    display: inline-block;
    font-size: 0.94rem;
    font-weight: 600;
    padding: 12px 21px;
    border-radius: var(--fk-radius);
    text-decoration: none;
    border: 1px solid transparent;
    min-height: var(--fk-hit-min);
}

.fm-btn-primary { background: var(--fm-seal); color: var(--fk-surface); }
.fm-btn-secondary { border-color: var(--fm-rule); color: var(--fk-ink); background: var(--fk-surface); }

/* ---------- hero ---------- */
.fm-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(26px, 4vw, 48px);
    align-items: center;
    padding-block: clamp(30px, 4.5vw, 54px);
}

.fm-hero-copy { display: flex; flex-direction: column; gap: 16px; }
.fm-figure { margin: 0; }
.fm-cap { font-size: 0.78rem; color: var(--fk-muted); padding-top: 9px; max-width: 62ch; }

/* ---------- console mock ---------- */
.fm-app {
    background: var(--fk-surface);
    border: 1px solid var(--fm-rule);
    border-radius: var(--fk-radius);
    overflow: hidden;
}

.fm-app-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    background: var(--fm-soft);
    border-bottom: 1px solid var(--fm-rule);
}

.fm-dots { display: flex; gap: 5px; flex: none; }
.fm-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--fm-rule); display: block; }

.fm-addr {
    font-family: var(--fk-font-mono);
    font-size: 0.7rem;
    color: var(--fk-muted);
    background: var(--fk-surface);
    border: 1px solid var(--fm-rule);
    padding: 3px 9px;
    border-radius: var(--fk-radius);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-app-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 11px 13px;
    border-bottom: 1px solid var(--fm-rule);
}

.fm-field {
    font-size: 0.77rem;
    color: var(--fk-muted);
    background: var(--fm-soft);
    border: 1px solid var(--fm-rule);
    padding: 5px 10px;
    border-radius: var(--fk-radius);
}

.fm-field-on { color: var(--fk-ink); background: var(--fk-surface); font-weight: 600; }
.fm-spacer { flex: 1; }

.fm-mini {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 11px;
    border: 1px solid var(--fm-rule);
    border-radius: var(--fk-radius);
    color: var(--fk-ink-soft);
}

.fm-scroll { overflow-x: auto; }

.fm-table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.82rem; }

.fm-table th {
    text-align: left;
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fk-muted);
    font-weight: 700;
    padding: 10px 13px;
    border-bottom: 1px solid var(--fm-rule);
    white-space: nowrap;
}

.fm-table td {
    padding: 11px 13px;
    border-bottom: 1px solid var(--fm-rule);
    color: var(--fk-ink-soft);
    vertical-align: middle;
}

.fm-table tr:last-child td { border-bottom: 0; }

.fm-rank { font-family: var(--fk-font-mono); color: var(--fk-ink); font-variant-numeric: tabular-nums; }
.fm-rank small,
.fm-who small { display: block; font-size: 0.66rem; color: var(--fk-muted); }
.fm-rank small { letter-spacing: 0.06em; text-transform: uppercase; }
.fm-who { color: var(--fk-ink); font-weight: 600; }
.fm-who small { font-weight: 400; font-size: 0.73rem; }
.fm-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.fm-pill {
    display: inline-block;
    font-size: 0.71rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.fm-pill-wait { background: var(--fk-teal-wash); color: var(--fk-teal-dark); }
.fm-pill-hold { background: var(--fk-warn-bg-soft); color: var(--fk-warn-ink-deep); }

/* ---------- the two cycling walkthroughs ---------- */
.fm-demo { position: relative; }

.fm-scenes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
}

/* Every scene occupies the same grid cell, so the container is as tall as the
   tallest of them and nothing jumps as they cycle. */
.fm-scenes > .fm-scene { grid-area: 1 / 1; }

.fm-scenes-staff > .fm-scene {
    border: 1px solid var(--fm-rule);
    border-radius: var(--fk-radius);
    background: var(--fk-surface);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fm-scene-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 14px;
    align-items: start;
}

.fm-scene-label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--fk-ink);
}

.fm-n {
    font-family: var(--fk-font-mono);
    font-size: 0.7rem;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--fm-seal);
    color: var(--fk-surface);
    flex: none;
}

.fm-editor {
    border: 1px solid var(--fm-seal);
    border-radius: var(--fk-radius);
    padding: 11px 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-editor-head {
    margin: 0;
    font-size: 0.63rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--fm-seal);
}

.fm-editor-value { margin: 0; font-size: 0.88rem; font-weight: 600; color: var(--fk-ink); }
.fm-editor-reason { margin: 0; font-size: 0.8rem; color: var(--fk-ink-soft); }
.fm-verify { color: var(--fk-teal-dark); }

.fm-entry {
    border: 1px solid var(--fm-rule);
    border-radius: var(--fk-radius);
    background: var(--fm-soft);
    padding: 11px 13px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fm-entry-top { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 11px; align-items: baseline; }

.fm-type {
    font-family: var(--fk-font-mono);
    font-size: 0.76rem;
    padding: 2px 7px;
    background: var(--fk-surface);
    border: 1px solid var(--fm-rule);
    border-radius: var(--fk-radius);
}

.fm-meta { margin: 0; font-size: 0.73rem; color: var(--fk-muted); font-variant-numeric: tabular-nums; }
.fm-why { margin: 0; font-size: 0.83rem; color: var(--fk-ink-soft); }

.fm-hash {
    margin: 0;
    font-family: var(--fk-font-mono);
    font-size: 0.69rem;
    color: var(--fk-muted);
    overflow-x: auto;
    white-space: nowrap;
}

.fm-hash b { color: var(--fk-ink-soft); font-weight: 500; }

/* Four scenes, each visible for its own quarter of the cycle.

   The offsets are negative, not positive. A positive animation-delay leaves an
   element in its un-animated state until the delay elapses, and the
   un-animated state here is opaque — so scenes two, three and four were all
   visible on top of each other from page load until their turn came round. A
   negative delay starts the animation already that far in, so every scene is
   under the animation's control from the first frame.

   The cut is hard rather than a cross-fade: with the scenes stacked in one
   grid cell, any fade leaves a moment where the outgoing one is half gone and
   the incoming one has not arrived, which reads as a flash of empty panel. */
.fm-scenes-staff > .fm-scene { animation: fm-cycle4 16s infinite; }
.fm-scenes-staff > .fm-scene:nth-child(2) { animation-delay: -12s; }
.fm-scenes-staff > .fm-scene:nth-child(3) { animation-delay: -8s; }
.fm-scenes-staff > .fm-scene:nth-child(4) { animation-delay: -4s; }

.fm-scenes-phone > .fm-scene { animation: fm-cycle4 18s infinite; }
.fm-scenes-phone > .fm-scene:nth-child(2) { animation-delay: -13.5s; }
.fm-scenes-phone > .fm-scene:nth-child(3) { animation-delay: -9s; }
.fm-scenes-phone > .fm-scene:nth-child(4) { animation-delay: -4.5s; }

@keyframes fm-cycle4 {
    0% { opacity: 1; visibility: visible; }
    25% { opacity: 1; visibility: visible; }
    25.01% { opacity: 0; visibility: hidden; }
    99.99% { opacity: 0; visibility: hidden; }
    100% { opacity: 1; visibility: visible; }
}

/* ---------- phone ---------- */
.fm-phone {
    width: 100%;
    max-width: 268px;
    margin-inline: auto;
    border: 1px solid var(--fm-rule);
    border-radius: 22px;
    background: var(--fk-surface);
    overflow: hidden;
}

.fm-phone-top { height: 22px; background: var(--fm-soft); border-bottom: 1px solid var(--fm-rule); position: relative; }

.fm-phone-top::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 7px;
    transform: translateX(-50%);
    width: 52px;
    height: 7px;
    border-radius: 99px;
    background: var(--fm-rule);
}

.fm-scenes-phone > .fm-scene {
    padding: 17px 16px 21px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    min-height: 236px;
}

.fm-input {
    border: 1px solid var(--fm-rule);
    border-radius: var(--fk-radius);
    padding: 7px 9px;
    font-size: 0.77rem;
    color: var(--fk-ink-soft);
}

.fm-input b {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fk-muted);
    font-weight: 700;
}

.fm-phone-btn {
    margin: 0;
    font-size: 0.79rem;
    font-weight: 600;
    text-align: center;
    padding: 9px;
    border: 1px solid var(--fm-rule);
    border-radius: var(--fk-radius);
    color: var(--fk-ink-soft);
}

.fm-phone-btn-on { background: var(--fm-seal); border-color: var(--fm-seal); color: var(--fk-surface); }
.fm-phone-big { margin: 0; font-family: var(--fk-font-display); font-size: 1.3rem; line-height: 1.2; }
.fm-phone-line { margin: 0; font-size: 0.8rem; color: var(--fk-ink-soft); }

.fm-position { margin: 0; font-family: var(--fk-font-display); font-size: 2.5rem; line-height: 1; }
.fm-position span { font-size: 0.95rem; font-family: var(--fk-font-ui); color: var(--fk-muted); }

/* ---------- table of authorities, with what each rule gets ----------
   One panel rather than two sections. The citation and the answer to it were
   split across the page, which made the reader hold a statute in their head
   while they went looking for what was done about it. Side by side, a row is
   readable on its own. */
.fm-panel {
    border: 1px solid var(--fm-rule);
    border-radius: var(--fk-radius);
    background: var(--fk-surface);
    padding: clamp(14px, 2.2vw, 26px);
    display: flex;
    flex-direction: column;
}

.fm-panel-head {
    font-family: var(--fk-font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fm-seal);
    padding-bottom: 9px;
    border-bottom: 3px double var(--fm-rule);
    margin: 22px 0 0;
}

.fm-panel-head:first-child { margin-top: 0; }

.fm-rows { list-style: none; margin: 0; padding: 0; }

.fm-row {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 6px clamp(16px, 2.5vw, 34px);
    padding: 15px 0;
    border-bottom: 1px solid var(--fm-rule);
    align-items: baseline;
}

.fm-row:last-child { border-bottom: 0; }
.fm-row-cite { display: flex; flex-direction: column; gap: 3px; }
.fm-row-does { display: flex; flex-direction: column; gap: 4px; }
.fm-row-does b { font-size: 0.93rem; color: var(--fk-ink); }
.fm-row-does p { margin: 0; font-size: 0.86rem; color: var(--fk-ink-soft); }

.fm-panel-foot {
    margin: 22px 0 0;
    padding-top: 15px;
    border-top: 3px double var(--fm-rule);
    font-size: 0.86rem;
    color: var(--fk-ink-soft);
}

.fm-panel-foot b { color: var(--fk-ink); }

.fm-cite {
    font-family: var(--fk-font-display);
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    line-height: 1.2;
    color: var(--fk-ink);
    font-variant-numeric: tabular-nums;
    margin: 0;
    flex: none;
    max-width: 100%;
}

.fm-cite-line { font-size: 0.95rem; color: var(--fk-ink-soft); }
.fm-auth-what { margin: 0; font-size: 0.83rem; color: var(--fk-muted); }
.fm-soon .fm-cite { color: var(--fk-muted); }
.fm-soon .fm-row-does b { color: var(--fk-muted); }

.fm-soon .fm-auth-what::after {
    content: " · In build";
    color: var(--fk-warn-ink-deep);
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ---------- pairs, laws, brands, tiers ---------- */
.fm-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: clamp(22px, 3.5vw, 42px);
    align-items: center;
}

.fm-pair-copy { display: flex; flex-direction: column; gap: 10px; }
.fm-pair-copy p { margin: 0; font-size: 0.95rem; color: var(--fk-ink-soft); max-width: 58ch; }

.fm-brands { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 13px; }

.fm-brand {
    border: 1px solid var(--fm-rule);
    border-radius: var(--fk-radius);
    overflow: hidden;
    background: var(--fm-b-paper);
    color: var(--fm-b-ink);
}

.fm-brand-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 13px;
    background: var(--fm-b-accent);
    color: #fff;
}

.fm-brand-mark {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex: none;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    font-family: var(--fk-font-display);
    font-size: 0.78rem;
}

.fm-brand-name { font-family: var(--fk-font-display); font-size: 0.95rem; line-height: 1.1; }
.fm-brand-body { padding: 13px; display: flex; flex-direction: column; gap: 9px; }
.fm-brand-h { margin: 0; font-family: var(--fk-font-display); font-size: 1.1rem; line-height: 1.15; }

.fm-brand-input {
    border: 1px solid var(--fm-b-rule);
    border-radius: var(--fk-radius);
    padding: 6px 8px;
    font-size: 0.69rem;
    color: var(--fm-b-muted);
}

.fm-brand-cta {
    background: var(--fm-b-accent);
    color: #fff;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px;
    border-radius: var(--fk-radius);
}

.fm-brand-foot { font-size: 0.59rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fm-b-muted); }

.fm-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 17px; }

.fm-tier {
    border: 1px solid var(--fm-rule);
    border-radius: var(--fk-radius);
    background: var(--fk-surface);
    padding: 21px;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.fm-tier-on { border-color: var(--fm-seal); }
.fm-tier-name { margin: 0; font-family: var(--fk-font-display); font-size: 1.3rem; }
.fm-tier-note { margin: 0; font-size: 0.79rem; color: var(--fk-muted); }
.fm-price { margin: 0; display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.fm-price b { font-size: 2rem; font-weight: 600; }
.fm-price span { font-size: 0.8rem; color: var(--fk-muted); }
.fm-tier ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.fm-tier li { font-size: 0.87rem; color: var(--fk-ink-soft); padding-left: 18px; position: relative; }

.fm-tier li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 1px;
    background: var(--fm-seal);
}

.fm-included {
    margin: 0;
    border: 1px solid var(--fm-rule);
    border-left: 3px solid var(--fk-teal-dark);
    border-radius: var(--fk-radius);
    background: var(--fk-surface);
    padding: 15px 17px;
    font-size: 0.9rem;
    color: var(--fk-ink-soft);
}

.fm-included b { color: var(--fk-ink); }

/* ---------- setup fee, what every plan includes, rates ---------- */
.fm-setup {
    border: 2px solid var(--fm-seal);
    border-radius: var(--fk-radius);
    padding: 19px 21px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.fm-setup-fig { flex: none; }

.fm-setup-price {
    margin: 2px 0 0;
    font-family: var(--fk-font-display);
    font-size: 2.1rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.fm-setup-copy { margin: 0; flex: 1 1 320px; font-size: 0.89rem; color: var(--fk-ink-soft); }

.fm-ticks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 9px clamp(20px, 3vw, 36px);
}

.fm-ticks li {
    font-size: 0.87rem;
    line-height: 1.45;
    color: var(--fk-ink-soft);
    padding-left: 19px;
    position: relative;
}

.fm-ticks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--fm-seal);
}

.fm-rates { min-width: 420px; }

.fm-rates caption {
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fk-muted);
    padding-bottom: 9px;
}

.fm-num-col { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.fm-terms { margin: 0; font-size: 0.79rem; color: var(--fk-muted); max-width: 76ch; }

.fm-band {
    border: 1px solid var(--fm-rule);
    border-left: 3px solid var(--fk-warn-ink-deep);
    border-radius: var(--fk-radius);
    background: var(--fk-surface);
    padding: clamp(17px, 2.5vw, 25px);
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.fm-band p { margin: 0; font-size: 0.93rem; color: var(--fk-ink-soft); max-width: 62ch; }
.fm-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.fm-chips span {
    font-family: var(--fk-font-mono);
    font-size: 0.73rem;
    padding: 4px 9px;
    border: 1px dashed var(--fm-rule);
    border-radius: var(--fk-radius);
    color: var(--fk-muted);
}

@media (max-width: 880px) {
    .fm-hero,
    .fm-pair,
    .fm-scene-body,
    .fm-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .fm-scenes > .fm-scene { animation: none; }

    /* With the cycle stopped every scene would stack in the one grid cell, so
       all but the first are taken out rather than left overlapping. */
    .fm-scenes > .fm-scene:not(:first-child) { display: none; }
}

/* ---------- fifty states, one at a time, without a line of script ----------
   A hidden radio per state, a label per radio, and one :has() rule per state
   deciding which panel is shown. The page is statically rendered and public;
   opening a Blazor circuit for every anonymous visitor to move between tabs
   would be a running cost for a stylesheet's worth of behaviour.

   The reveal rules below are generated from the state table, so a state can
   never be added to the page and left without a way to reach it. */

.fm-states-lede {
    margin: 12px 0 0;
    font-size: 0.86rem;
    color: var(--fk-ink-soft);
    max-width: 62ch;
}

/* Off-screen rather than display:none, which would take the group out of the
   tab order and with it the arrow-key navigation a radio group gets free. */
.fm-state-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.fm-state-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 16px 0 0;
    padding-bottom: 16px;
    border-bottom: 3px double var(--fm-rule);
}

.fm-state-tab {
    font-family: var(--fk-font-ui);
    font-size: 0.76rem;
    line-height: 1;
    padding: 7px 10px;
    border: 1px solid var(--fm-rule);
    border-radius: 999px;
    color: var(--fk-ink-soft);
    cursor: pointer;
    user-select: none;
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.fm-state-tab:hover {
    border-color: var(--fm-seal);
    color: var(--fk-ink);
}

.fm-state-radio:checked + .fm-state-tab {
    background: var(--fm-seal);
    border-color: var(--fm-seal);
    color: var(--fk-surface);
    font-weight: 700;
}

.fm-state-radio:focus-visible + .fm-state-tab {
    outline: 2px solid var(--fm-seal);
    outline-offset: 2px;
}

.fm-state-panel { display: none; }

.fm-state-head {
    font-family: var(--fk-font-display);
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.1;
    margin: 18px 0 0;
    color: var(--fk-ink);
}

.fm-state-agency {
    margin: 4px 0 6px;
    font-size: 0.83rem;
    color: var(--fk-muted);
}

.fm-state-agency b {
    color: var(--fk-ink-soft);
    font-weight: 600;
}

.fm-state-foot b { color: var(--fk-ink); }

.fm-states:has(#fm-state-ak:checked) .fm-state-panel-ak { display: block; }
.fm-states:has(#fm-state-al:checked) .fm-state-panel-al { display: block; }
.fm-states:has(#fm-state-ar:checked) .fm-state-panel-ar { display: block; }
.fm-states:has(#fm-state-az:checked) .fm-state-panel-az { display: block; }
.fm-states:has(#fm-state-ca:checked) .fm-state-panel-ca { display: block; }
.fm-states:has(#fm-state-co:checked) .fm-state-panel-co { display: block; }
.fm-states:has(#fm-state-ct:checked) .fm-state-panel-ct { display: block; }
.fm-states:has(#fm-state-de:checked) .fm-state-panel-de { display: block; }
.fm-states:has(#fm-state-fl:checked) .fm-state-panel-fl { display: block; }
.fm-states:has(#fm-state-ga:checked) .fm-state-panel-ga { display: block; }
.fm-states:has(#fm-state-hi:checked) .fm-state-panel-hi { display: block; }
.fm-states:has(#fm-state-ia:checked) .fm-state-panel-ia { display: block; }
.fm-states:has(#fm-state-id:checked) .fm-state-panel-id { display: block; }
.fm-states:has(#fm-state-il:checked) .fm-state-panel-il { display: block; }
.fm-states:has(#fm-state-in:checked) .fm-state-panel-in { display: block; }
.fm-states:has(#fm-state-ks:checked) .fm-state-panel-ks { display: block; }
.fm-states:has(#fm-state-ky:checked) .fm-state-panel-ky { display: block; }
.fm-states:has(#fm-state-la:checked) .fm-state-panel-la { display: block; }
.fm-states:has(#fm-state-ma:checked) .fm-state-panel-ma { display: block; }
.fm-states:has(#fm-state-md:checked) .fm-state-panel-md { display: block; }
.fm-states:has(#fm-state-me:checked) .fm-state-panel-me { display: block; }
.fm-states:has(#fm-state-mi:checked) .fm-state-panel-mi { display: block; }
.fm-states:has(#fm-state-mn:checked) .fm-state-panel-mn { display: block; }
.fm-states:has(#fm-state-mo:checked) .fm-state-panel-mo { display: block; }
.fm-states:has(#fm-state-ms:checked) .fm-state-panel-ms { display: block; }
.fm-states:has(#fm-state-mt:checked) .fm-state-panel-mt { display: block; }
.fm-states:has(#fm-state-nc:checked) .fm-state-panel-nc { display: block; }
.fm-states:has(#fm-state-nd:checked) .fm-state-panel-nd { display: block; }
.fm-states:has(#fm-state-ne:checked) .fm-state-panel-ne { display: block; }
.fm-states:has(#fm-state-nh:checked) .fm-state-panel-nh { display: block; }
.fm-states:has(#fm-state-nj:checked) .fm-state-panel-nj { display: block; }
.fm-states:has(#fm-state-nm:checked) .fm-state-panel-nm { display: block; }
.fm-states:has(#fm-state-nv:checked) .fm-state-panel-nv { display: block; }
.fm-states:has(#fm-state-ny:checked) .fm-state-panel-ny { display: block; }
.fm-states:has(#fm-state-oh:checked) .fm-state-panel-oh { display: block; }
.fm-states:has(#fm-state-ok:checked) .fm-state-panel-ok { display: block; }
.fm-states:has(#fm-state-or:checked) .fm-state-panel-or { display: block; }
.fm-states:has(#fm-state-pa:checked) .fm-state-panel-pa { display: block; }
.fm-states:has(#fm-state-ri:checked) .fm-state-panel-ri { display: block; }
.fm-states:has(#fm-state-sc:checked) .fm-state-panel-sc { display: block; }
.fm-states:has(#fm-state-sd:checked) .fm-state-panel-sd { display: block; }
.fm-states:has(#fm-state-tn:checked) .fm-state-panel-tn { display: block; }
.fm-states:has(#fm-state-tx:checked) .fm-state-panel-tx { display: block; }
.fm-states:has(#fm-state-ut:checked) .fm-state-panel-ut { display: block; }
.fm-states:has(#fm-state-va:checked) .fm-state-panel-va { display: block; }
.fm-states:has(#fm-state-vt:checked) .fm-state-panel-vt { display: block; }
.fm-states:has(#fm-state-wa:checked) .fm-state-panel-wa { display: block; }
.fm-states:has(#fm-state-wi:checked) .fm-state-panel-wi { display: block; }
.fm-states:has(#fm-state-wv:checked) .fm-state-panel-wv { display: block; }
.fm-states:has(#fm-state-wy:checked) .fm-state-panel-wy { display: block; }

/* Without :has() every panel would stay hidden and the section would render as
   fifty labels over blank space. Stacked is worse to read than tabbed; it is
   not worse than empty. */
@supports not (selector(:has(*))) {
    .fm-state-picker { display: none; }
    .fm-state-panel { display: block; }
}

@media (max-width: 560px) {
    .fm-state-tab { font-size: 0.72rem; padding: 6px 8px; }

    /* Fifty chips wrap to about fourteen rows on a phone, which puts the panel
       they select most of a screen below them. Capped and scrolled, the answer
       stays in view while the directory is still reachable. */
    .fm-state-picker {
        max-height: 13rem;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

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