/* ═══════════════════════════════════════════════════════════════════
   agency.css — agency-branded public landing page (/a/{slug})

   Layers on top of public.css, reusing its :root palette. Deliberately
   flatter and quieter than the IRIS portal: this page is a partner
   agency's front door, and their badge should be the loudest thing on it.
   ═══════════════════════════════════════════════════════════════════ */

body.agency-surface {
    background: linear-gradient(180deg, #0d1b33 0%, var(--navy) 55%);
    color: var(--white);
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
}

/* ── Masthead ─────────────────────────────────────────────────────── */
.agency-masthead {
    background: linear-gradient(90deg, rgba(26, 48, 96, .55) 0%, rgba(11, 22, 40, 0) 60%);
    border-bottom: 1px solid var(--border);
    padding: 8px 18px;
    min-height: 44px;
    display: flex;
    align-items: center;
}
.agency-masthead-link { display: inline-flex; align-items: center; text-decoration: none; }
.agency-masthead-logo { height: 30px; width: auto; display: block; }
.agency-masthead-fallback {
    font-size: 14px; font-weight: 800; letter-spacing: .04em;
    color: var(--white); text-decoration: none;
}

/* ── Main column ──────────────────────────────────────────────────── */
.agency-main {
    max-width: 780px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.agency-hero { text-align: center; margin-bottom: 34px; }
.agency-hero-logo {
    max-width: 340px;
    width: 70%;
    height: auto;
    margin: 0 auto 26px;
    display: block;
}
.agency-headline {
    font-size: 25px;
    font-weight: 800;
    color: var(--white);
    margin: 0 0 10px;
    letter-spacing: -.01em;
}
.agency-subheadline {
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    margin: 0;
    opacity: .92;
}

/* ── Action cards ─────────────────────────────────────────────────── */
.agency-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
    align-items: stretch;
}
.agency-card {
    display: flex;
    flex-direction: column;
    background: rgba(17, 32, 64, .55);
    border: 1px solid rgba(200, 168, 75, .45);
    border-radius: 7px;
    padding: 14px 15px 16px;
}
.agency-card-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}
.agency-card-icon { font-size: 13px; }
.agency-card-body { flex: 1 1 auto; }
.agency-card-lead {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.35;
    margin: 0 0 12px;
}
.agency-card-note {
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.4;
    margin: 0;
    opacity: .9;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.agency-btn {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 9px 10px;
    margin-top: 14px;
    border: 1px solid var(--gold-dim);
    transition: filter .12s;
}
.agency-btn-primary {
    background: linear-gradient(180deg, #cbaa54 0%, #a8863a 100%);
    color: #10192b;
}
.agency-btn-primary:hover { filter: brightness(1.08); color: #10192b; }

/* ── TRC entry ────────────────────────────────────────────────────── */
.agency-trc-form { margin-top: auto; }
.agency-trc-input {
    width: 100%;
    background: rgba(11, 22, 40, .75);
    border: 1px solid var(--border-act);
    border-radius: 4px;
    color: var(--white);
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: .04em;
    padding: 7px 9px;
}
.agency-trc-input:focus { outline: none; border-color: var(--gold); }
.agency-trc-input::placeholder { color: var(--muted); }

/* ── Secondary links ──────────────────────────────────────────────── */
.agency-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 26px;
}
.agency-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    background: rgba(17, 32, 64, .45);
    border: 1px solid rgba(200, 168, 75, .40);
    border-radius: 5px;
    padding: 10px 8px;
    transition: background .12s;
}
.agency-link:hover { background: rgba(200, 168, 75, .12); color: var(--white); }
.agency-link-icon { font-size: 13px; }

/* ── Emergency banner ─────────────────────────────────────────────── */
.agency-emergency {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, rgba(42, 74, 127, .35) 0%, rgba(17, 32, 64, .35) 100%);
    border: 1px solid rgba(200, 168, 75, .45);
    border-radius: 7px;
    padding: 13px 18px;
    margin-bottom: 22px;
}
.agency-emergency-icon { font-size: 20px; line-height: 1; }
.agency-emergency strong { color: var(--gold); font-weight: 800; }
.agency-emergency span:last-child { font-size: 14px; font-weight: 600; color: var(--white); }

/* ── Legal ────────────────────────────────────────────────────────── */
.agency-legal { padding: 0 4px; }
.agency-legal-warn {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .01em;
    color: var(--gold);
    line-height: 1.7;
    margin: 0 0 16px;
}
.agency-legal-warn-sub { color: var(--white); }
.agency-legal-text {
    font-size: 11px;
    line-height: 1.7;
    color: var(--muted);
    margin: 0;
    /* Admin-authored text arrives with real newlines; honour them without
       ever letting the string be interpreted as markup. */
    white-space: pre-line;
}

/* ── Narrow viewports ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .agency-cards,
    .agency-links { grid-template-columns: 1fr; }
    .agency-main { padding: 28px 16px 44px; }
    .agency-headline { font-size: 21px; }
    .agency-hero-logo { width: 82%; }
}
