/*
 * Partner location pages.
 *
 * A note on specificity, because it cost a real bug here. `.fapl p` and
 * `.fapl a` are (0,1,1); a bare `.fapl-source` or `.fapl-btn` is (0,1,0) and
 * LOSES to them. The button's white text came out navy on navy -- invisible,
 * and invisible in a way that reading the file does not reveal. Every helper
 * class that sets a colour on a <p> or an <a> is therefore written as
 * `.fapl .fapl-thing` or `.fapl a.fapl-thing`. tests/t-render.php fails the
 * build if a new one is added without that prefix.
 *
 * Everything is scoped under .fapl. The egovt theme sets body text to #245897
 * (a blue) and headings to #202b5d, and theme rules have leaked into blocks
 * like this one before, so every colour here is stated explicitly rather than
 * inherited. Font sizes start at 16px: anything smaller makes iOS zoom the
 * page on tap.
 */

.fapl {
    --fapl-blue: #1e3a5f;
    --fapl-blue-dk: #162c48;
    --fapl-amber: #c8811a;
    --fapl-ink: #1b2534;
    --fapl-muted: #5b6675;
    --fapl-line: #dde3ea;
    --fapl-soft: #f4f7fa;
    color: var(--fapl-ink);
    font-size: 17px;
    line-height: 1.65;
}

.fapl h2 {
    color: var(--fapl-blue);
    font-size: 27px;
    line-height: 1.25;
    margin: 42px 0 14px;
}

.fapl h3 {
    color: var(--fapl-blue-dk);
    font-size: 19px;
    line-height: 1.3;
    margin: 24px 0 8px;
}

.fapl p { color: var(--fapl-ink); margin: 0 0 14px; }
.fapl a { color: var(--fapl-blue); text-decoration: underline; text-underline-offset: 2px; }
.fapl a:hover, .fapl a:focus { color: var(--fapl-amber); }
.fapl strong { color: var(--fapl-blue-dk); font-weight: 700; }

/* ------------------------------------------------------------------- lede */

.fapl-lede {
    background: var(--fapl-soft);
    border: 1px solid var(--fapl-line);
    border-left: 4px solid var(--fapl-blue);
    border-radius: 6px;
    padding: 22px 24px 8px;
    margin: 0 0 26px;
}

.fapl-lede > p:first-child { font-size: 18px; }

.fapl-actions, .fapl-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0 20px;
}

/*
 * `.fapl a` above is (0,1,1) and `.fapl-btn` alone is (0,1,0), so the link
 * colour wins and the button text comes out navy on navy -- invisible, and
 * invisible in a way no source reading reveals. Measured in a browser, fixed
 * by raising the selector rather than by reaching for !important.
 */
.fapl a.fapl-btn, .fapl-btn {
    display: inline-block;
    background: var(--fapl-blue);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    padding: 15px 22px;
    min-height: 48px;
    border-radius: 4px;
    text-decoration: none;
    box-sizing: border-box;
}

.fapl a.fapl-btn:hover, .fapl a.fapl-btn:focus { background: var(--fapl-blue-dk); color: #fff; }

.fapl a.fapl-btn--ghost, .fapl-btn--ghost {
    background: #fff;
    color: var(--fapl-blue);
    border: 1px solid var(--fapl-blue);
}

.fapl a.fapl-btn--ghost:hover, .fapl a.fapl-btn--ghost:focus {
    background: var(--fapl-blue);
    color: #fff;
}

/* ------------------------------------------------------------------ facts */

.fapl-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin: 0 0 30px;
    padding: 0;
}

.fapl-fact {
    background: var(--fapl-blue);
    border-radius: 6px;
    padding: 16px 18px;
}

.fapl-fact dt {
    color: #c7d6e6;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin: 0 0 6px;
}

.fapl-fact dd {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    overflow-wrap: break-word;
}

/* ------------------------------------------------------------------ cards */

.fapl-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px;
    margin: 0 0 10px;
}

.fapl-card {
    background: #fff;
    border: 1px solid var(--fapl-line);
    border-top: 3px solid var(--fapl-amber);
    border-radius: 6px;
    padding: 20px 22px;
}

.fapl-card h3 { margin-top: 0; }

.fapl .fapl-card__price {
    color: var(--fapl-blue);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
}

.fapl .fapl-card__body { font-size: 16px; color: var(--fapl-muted); }
.fapl .fapl-card__note { font-size: 15px; color: var(--fapl-muted); font-style: italic; }
.fapl-card ul { margin: 0 0 14px; padding-left: 20px; }
.fapl-card li { font-size: 16px; margin-bottom: 6px; color: var(--fapl-ink); }
.fapl .fapl-card__link { margin: 0; font-weight: 600; }

/* --------------------------------------------------- rules, partner, steps */

.fapl-rules, .fapl-partner ul { padding-left: 22px; margin: 0 0 16px; }
.fapl-rules li, .fapl-partner li { margin-bottom: 10px; }

.fapl .fapl-source { font-size: 15px; color: var(--fapl-muted); }

.fapl-partner {
    background: var(--fapl-soft);
    border: 1px solid var(--fapl-line);
    border-radius: 6px;
    padding: 20px 24px 6px;
    margin: 0 0 20px;
}

.fapl .fapl-partner__summary { font-size: 18px; }

.fapl .fapl-partner__note {
    font-size: 15px;
    color: var(--fapl-muted);
    border-top: 1px solid var(--fapl-line);
    padding-top: 12px;
}

.fapl-steps {
    counter-reset: fapl;
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.fapl-steps li {
    counter-increment: fapl;
    position: relative;
    padding: 0 0 18px 52px;
    min-height: 40px;
}

.fapl-steps li::before {
    content: counter(fapl);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--fapl-blue);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    line-height: 36px;
    text-align: center;
}

.fapl-steps li strong { display: block; color: var(--fapl-blue-dk); margin-bottom: 4px; }
.fapl-steps li span { display: block; color: var(--fapl-ink); font-size: 16px; }

/* ------------------------------------------------------------------ table */

.fapl-tablewrap { overflow-x: auto; margin: 0 0 14px; }

.fapl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    background: #fff;
}

.fapl-table th, .fapl-table td {
    border: 1px solid var(--fapl-line);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    color: var(--fapl-ink);
}

.fapl-table thead th {
    background: var(--fapl-blue);
    color: #fff;
    font-size: 14px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

/* The theme uppercases <th>. That is fine for the three column headings and
   shouty on a six-row stub column, so the row headers are reset. */
.fapl .fapl-table tbody th {
    background: var(--fapl-soft);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}
/* (0,2,0): `.fapl-table td` already sets a colour at (0,1,1). */
.fapl .fapl-table__price { font-weight: 700; color: var(--fapl-blue); white-space: nowrap; }

.fapl .fapl-fineprint, .fapl .fapl-disclaimer { font-size: 15px; color: var(--fapl-muted); }

.fapl .fapl-disclaimer {
    border-top: 1px solid var(--fapl-line);
    padding-top: 16px;
    margin-top: 34px;
}

/* ------------------------------------------------------------------ areas */

.fapl-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.fapl-areas li {
    background: var(--fapl-soft);
    border: 1px solid var(--fapl-line);
    border-radius: 999px;
    color: var(--fapl-ink);
    font-size: 15px;
    padding: 6px 14px;
}

/* -------------------------------------------------------------- faq, next */

.fapl-faq h3 { color: var(--fapl-blue); }
.fapl-faq p { font-size: 16px; }

.fapl-next { margin: 0 0 20px; padding-left: 22px; }
.fapl-next li { margin-bottom: 8px; font-weight: 600; }

@media (max-width: 600px) {
    .fapl h2 { font-size: 23px; }
    .fapl-lede { padding: 18px 16px 6px; }
    .fapl-partner { padding: 16px 16px 4px; }
    .fapl-card { padding: 16px 18px; }
    .fapl-btn { width: 100%; text-align: center; }
}
