/* NIGHT_196 -- THE ANSWER CARD (templates/macros/answer_card.html).
 *
 * Five plain lines and a footer, the first thing on the employer page and the
 * shape of every /scan result and homepage example. The laws it is held to by
 * a geometry check (TVB-6a), not by eye:
 *   * 17px base: every line is read at a phone's comfortable size;
 *   * 44 x 44 px: every link on the card, and the disclosure's summary, is a
 *     full touch target;
 *   * ONE phone screen: on the employer page the whole card -- title to the
 *     "See every number" footer -- sits between the site header and the bottom
 *     navigation at 390 x 844 with the page scrolled to the top.
 * R18: no new hue. Every colour is an existing token; the card is NEUTRAL,
 * never an outcome tint, whatever a line says. */

.answer-card {
    font-size: 17px;
    line-height: 1.38;
    margin-top: 1rem;
    padding: 0.75rem 1rem 0.5rem;
    border: 1px solid var(--tint-neutral-border);
    border-radius: 0.875rem;
    background: var(--tint-neutral-bg);
    color: var(--tint-neutral-text);
}

.answer-card__title {
    margin: 0 0 0.15rem;
    font-size: 1.06em;
    font-weight: 700;
    line-height: 1.3;
}

.answer-card__title-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
}

.answer-card__title-link:hover,
.answer-card__title-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.answer-card__population {
    margin: 0 0 0.35rem;
    font-size: 0.82em;
    color: var(--text-tertiary, var(--tint-neutral-text));
}

.answer-card__lines {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.28rem;
}

.answer-line {
    margin: 0;
    overflow-wrap: anywhere;
}

.answer-line__label {
    font-weight: 700;
}

.answer-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 1rem;
    margin-top: 0.35rem;
}

.answer-card__note {
    margin: 0;
    padding: 0.25rem 0;
    font-size: 0.82em;
    color: var(--text-tertiary, var(--tint-neutral-text));
}

.answer-card__more {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    font-weight: 600;
    color: var(--color-brand-primary);
    text-decoration: none;
}

.answer-card__more:hover,
.answer-card__more:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---- the employer page: the card's footer IS the disclosure's summary (D-3) ----
 * The <details> follows the card; its summary is drawn as the card's last row,
 * so "See every number" reads as the card's footer while staying a native,
 * keyboard- and script-free disclosure. */
.answer-card--page {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding-bottom: 0.35rem;
}

.answer-more {
    margin: 0;
}

.answer-more > .answer-more__toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0 1rem;
    font-size: 17px;
    font-weight: 600;
    color: var(--color-brand-primary);
    border: 1px solid var(--tint-neutral-border);
    border-top: 0;
    border-radius: 0 0 0.875rem 0.875rem;
    background: var(--tint-neutral-bg);
    cursor: pointer;
    list-style: none;
}

.answer-more > .answer-more__toggle::-webkit-details-marker {
    display: none;
}

.answer-more > .answer-more__toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.answer-more__arrow {
    display: inline-block;
    transition: transform 0.15s ease;
}

.answer-more[open] > .answer-more__toggle .answer-more__arrow {
    transform: rotate(90deg);
}

.answer-more__body {
    margin-top: 1.25rem;
}

/* The employer's name row. Below 640px the logo sits BESIDE the name, not above
 * it: stacked, it spent 84px of the phone's first screen before the answer. */
.employer-title-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

@media (max-width: 639px) {
    .employer-title-row .employer-logo--lg {
        width: 3rem;
        height: 3rem;
        border-radius: 0.75rem;
    }
    /* The phone's first screen holds the whole card: the page's top padding and the
     * breadcrumb's gap give back 52px (measured: meta-platforms' card ended 4px
     * above the sticky action bar before this). Phones only. */
    article.employer-detail {
        padding-top: 2.5rem;
    }
    .employer-detail .breadcrumb {
        margin-bottom: 1.25rem;
    }
    /* The name, sized for a phone and bounded (F-P3-3: a 73-character name wrapped to six
     * 30px lines and pushed the card's bottom to y = 884, past the action bar at 711). 22px,
     * at most three lines; the whole name stays in the page's text, the title and the data. */
    .employer-header h1 {
        font-size: 1.375rem;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        overflow: hidden;
        overflow-wrap: anywhere;
    }
    /* The crumb trail and the parent link are one line each, the long name cut with an
     * ellipsis (they wrapped to three rows on a 70-character name, 50-60px the card needs). */
    .employer-detail .employer-breadcrumb {
        flex-wrap: nowrap;
    }
    .employer-detail .employer-breadcrumb > li {
        flex: 0 0 auto;
    }
    .employer-detail .employer-breadcrumb > li:last-child {
        flex: 0 1 auto;
        min-width: 0;
    }
    .employer-detail .employer-breadcrumb > li:last-child > [itemprop="name"] {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .employer-detail .employer-parent-breadcrumb {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-bottom: 0.5rem;
    }
}

@media (min-width: 640px) {
    .employer-title-row {
        gap: 1.25rem;
    }
}

/* /scan (T2): the card leads a result -- the same lines and footer, a tighter box. */
.answer-card--scan {
    margin-top: 0.6rem;
    padding: 0.55rem 0.8rem 0.35rem;
}

/* The homepage (T3): the three example cards, side by side from 900px, stacked below. */
.answer-card-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 900px) {
    .answer-card-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.answer-card--home {
    margin-top: 0;
}


/* NIGHT_196 P5-2 (fixed 2026-10-08) -- THE LINES ARE 17px, NOT ONLY THE CARD.
 * typography.css sets `p, li { font-size: var(--font-size-base) }` (15px), and
 * every answer line is an <li>, so the 17px on `.answer-card` reached the
 * container and not one line of text (measured: li.answer-line 15px in all 94
 * Pass 5 frames). The lines inherit the card's size AND its 1.38 line height:
 * the same rule's relaxed line height (~30px a row at 17px) pushed six long-name
 * cards past the sticky action bar at 390 x 844 (up to 40px). */
/* Only the lines: a broader `.answer-card p` would out-specify the footer's own
 * single-class 0.82em and enlarge the fine print. */
.answer-card li.answer-line {
    font-size: inherit;
    line-height: inherit;
}
