/* The opportunity board (jobs:opportunities:list), plain CSS, linked by opportunities/list.html.
   The board turns dark only for a signed-in Creative inside the app's dark Desk
   (ticket fa3238e1): its Tailwind utilities follow the night variables; rules
   that need more sit here under html[data-theme="dark"].

   The Job Finder tile between the board's listings (ticket b2a14ea4, 2026-11-23).
   opportunities/partials/job_finder_tile.html; linked by opportunities/list.html.
   Plain CSS on purpose (no Tailwind rebuild). The light terracotta ground and the
   FILLED terracotta button are reserved for our own feature tiles: listing cards use
   outline elements only, and a partner card never looks like this. */

.jf-board-tile {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 100%;
    padding: 2.25rem 1.5rem 1.75rem;
    border: 1px solid rgba(180, 80, 44, .32);
    border-radius: 1rem; /* the listing cards' rounded-2xl */
    background: #F3E9E6;
    text-align: center;
    color: #493657;
}
.jf-board-tile__close {
    position: absolute;
    top: .375rem;
    right: .375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #8A6A60;
    cursor: pointer;
}
.jf-board-tile__close svg { width: 1rem; height: 1rem; }
.jf-board-tile__close:hover { color: #493657; background: rgba(180, 80, 44, .1); }
.jf-board-tile__close:focus-visible,
.jf-board-tile__btn:focus-visible { outline: 2px solid rgba(180, 80, 44, .7); outline-offset: 2px; }
.jf-board-tile__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid rgba(180, 80, 44, .25);
    color: #B4502C;
}
.jf-board-tile__icon svg { width: 2rem; height: 2rem; }
.jf-board-tile__label {
    margin: 0 0 .375rem;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #B4502C;
}
.jf-board-tile__title {
    margin: 0 0 .5rem;
    font-size: 1.0625rem;
    line-height: 1.4rem;
    font-weight: 700;
    color: #493657;
}
.jf-board-tile__text {
    max-width: 22rem;
    margin: 0 0 1.25rem;
    font-size: .875rem;
    line-height: 1.35rem;
    color: #5E5068;
}
.jf-board-tile__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 1.5rem;
    border: 0;
    border-radius: 9999px;
    background: #B4502C; /* terracotta, white label 5:1 */
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease;
}
.jf-board-tile__btn:hover { background: #9C4424; color: #fff; text-decoration: none; }
.jf-board-tile__btn[disabled] { opacity: .7; cursor: progress; }
.jf-board-tile__hint {
    margin: .625rem 0 0;
    font-size: 12px;
    line-height: 1rem;
    color: #776981;
}
@media (max-width: 639px) {
    .jf-board-tile { padding: 2rem 1.25rem 1.5rem; }
    .jf-board-tile__btn { min-height: 44px; }
    .jf-board-tile__close { width: 44px; height: 44px; top: .125rem; right: .125rem; }
}
@media (prefers-reduced-motion: reduce) {
    .jf-board-tile__btn { transition: none; }
}

/* Night (a signed-in Creative inside the app's dark Desk, ticket fa3238e1). */
html[data-theme="dark"] .jf-board-tile { background: rgba(233, 122, 48, .1); border-color: rgba(233, 122, 48, .38); color: #ECEBEF; }
html[data-theme="dark"] .jf-board-tile__icon { background: #18181C; border-color: rgba(233, 122, 48, .4); color: #F0A06B; }
html[data-theme="dark"] .jf-board-tile__label { color: #F0A06B; }
html[data-theme="dark"] .jf-board-tile__title { color: #ECEBEF; }
html[data-theme="dark"] .jf-board-tile__text { color: #CFC8D6; }
html[data-theme="dark"] .jf-board-tile__hint,
html[data-theme="dark"] .jf-board-tile__close { color: #A79DB0; }
html[data-theme="dark"] .jf-board-tile__close:hover { color: #ECEBEF; background: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .jf-board-tile__btn { background: #C65A33; }
html[data-theme="dark"] .jf-board-tile__btn:hover { background: #D8693F; }

/* ── Special tiles take a listing card's height (ticket d52ff20f) ─────────────
   From two columns up a special tile sits in a row with listing cards. Round 34
   measured the Job Finder tile at 371px beside 250px cards: it stretched its row.
   Now the tile is compact AND — where the browser knows container queries — takes
   no part in sizing the row at all (size containment): it is exactly as tall as the
   listing cards beside it and asks its own height what fits. In a low row the Job
   Finder icon goes first, then the body text shortens (4 → 3 → 2 lines, with an
   ellipsis); the label, the title, the button, the app tile's claim and the price /
   sign-up line always stay. `min-height` is what that smallest set needs, so a row
   of very short cards grows a little rather than a tile losing more. Phones (one
   column) keep the roomy tile with every word. */
@media (min-width: 640px) {
    .jf-board-tile { padding: 1.125rem 1.25rem .875rem; }
    .jf-board-tile__icon { width: 2rem; height: 2rem; margin-bottom: .375rem; flex: 0 0 auto; }
    .jf-board-tile__icon svg { width: 1.125rem; height: 1.125rem; }
    .jf-board-tile__label { margin-bottom: .25rem; }
    .jf-board-tile__title { margin-bottom: .375rem; font-size: 1rem; line-height: 1.3rem; }
    .jf-board-tile__text { margin-bottom: .75rem; font-size: .8125rem; line-height: 1.2rem; }
    .jf-board-tile__btn { min-height: 36px; flex: 0 0 auto; }
    .jf-board-tile__hint { margin-top: .375rem; }
}
/* ── The visitor's app banner and app tile (ticket d52ff20f) ──────────────────
   opportunities/partials/app_banner.html + app_tile.html; the "closed" mark on <html> comes
   from static/js/board-app-elements.js. Visitors only, so there is no night variant: the
   board turns dark for a signed-in Creative alone, who never gets these. */

/* ✕ or a store click: every app element is gone for this page view. */
html[data-board-app-closed] [data-board-app] { display: none !important; }

/* Always there for a visitor (ticket 4f21e80d; until then only on arrival from outside). */
.app-board-banner {
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: .75rem 1rem;
    max-width: 48rem; /* the count line's max-w-3xl below sm */
    margin: -.25rem auto 1.25rem;
    padding: .625rem 2.75rem .625rem 1rem;
    border: 1px solid rgba(11, 11, 14, .12);
    border-radius: 1rem;
    background: #F4F1F6;
    color: #2B2233;
}
@media (min-width: 640px) {
    .app-board-banner { max-width: none; }
}
.app-board-banner__copy { flex: 1 1 auto; min-width: 0; margin: 0; font-size: .8125rem; line-height: 1.25rem; color: #5E5068; }
.app-board-banner__new {
    display: inline-block;
    margin-right: .375rem;
    padding: 0 .5rem;
    border-radius: 9999px;
    background: #17131C;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.125rem;
    text-transform: uppercase;
    vertical-align: 1px;
}
.app-board-banner__title { margin-right: .25rem; font-weight: 700; color: #2B2233; }
.app-board-banner__free { font-weight: 600; color: #2B2233; }
.app-board-banner__btn,
.app-board-tile__btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 1.25rem;
    border-radius: 9999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease;
}
.app-board-banner__btn { background: #17131C; color: #fff; }
.app-board-banner__btn:hover { background: #38303F; color: #fff; text-decoration: none; }
.app-board-banner__close,
.app-board-tile__close {
    position: absolute;
    top: .25rem;
    right: .25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    cursor: pointer;
}
.app-board-banner__close { top: 50%; transform: translateY(-50%); color: #776981; }
.app-board-banner__close:hover { color: #2B2233; background: rgba(11, 11, 14, .06); }
.app-board-banner__close svg,
.app-board-tile__close svg { width: 1rem; height: 1rem; }
.app-board-banner__btn:focus-visible,
.app-board-banner__close:focus-visible { outline: 2px solid rgba(23, 19, 28, .7); outline-offset: 2px; }

.app-board-tile {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 100%;
    padding: 1.5rem 1.25rem 1.25rem;
    border: 1px solid #17131C;
    border-radius: 1rem; /* the listing cards' rounded-2xl */
    background: #17131C; /* ink: this tile's ground alone */
    text-align: center;
    color: #fff;
}
.app-board-tile__close { color: #A79DB0; }
.app-board-tile__close:hover { color: #fff; background: rgba(255, 255, 255, .1); }
/* The drawn phone: beside the label from two columns up, above it on a phone. */
.app-board-tile__phone { flex: 0 0 auto; width: 1rem; height: 1.4rem; color: #fff; }
.app-board-tile__dot { fill: #F0A06B; }
.app-board-tile__label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin: 0 0 .375rem;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1rem;
    text-transform: uppercase;
    color: #F0A06B;
}
.app-board-tile__title { margin: 0 0 .5rem; font-size: 1rem; line-height: 1.3rem; font-weight: 700; color: #fff; }
.app-board-tile__text { max-width: 22rem; margin: 0 0 .375rem; font-size: .8125rem; line-height: 1.2rem; color: #D8D2DE; }
.app-board-tile__claim { max-width: 22rem; margin: 0 0 .875rem; font-size: .8125rem; line-height: 1.2rem; font-weight: 600; color: #fff; }
.app-board-tile__btn { background: #fff; color: #17131C; }
@media (min-width: 640px) {
    .app-board-tile { padding: 1.25rem 1.25rem 1.125rem; }
    .app-board-tile__claim { margin-bottom: .75rem; }
}
@media (max-width: 639px) {
    .app-board-banner { flex-wrap: wrap; padding: .75rem 2.75rem .75rem 1rem; }
    .app-board-banner__close { top: .125rem; right: .125rem; transform: none; width: 44px; height: 44px; }
    .app-board-banner__btn { min-height: 44px; }
    .app-board-tile { padding: 2rem 1.25rem 1.5rem; }
    .app-board-tile__label { flex-direction: column; gap: .625rem; }
    .app-board-tile__phone { width: 2rem; height: 2.8rem; }
    .app-board-tile__text, .app-board-tile__claim { font-size: .875rem; line-height: 1.35rem; }
    .app-board-tile__btn { min-height: 44px; }
    .app-board-tile__close { width: 44px; height: 44px; top: .125rem; right: .125rem; }
}
@media (prefers-reduced-motion: reduce) {
    .app-board-banner__btn, .app-board-tile__btn { transition: none; }
}

/* Row-height fit of both special tiles (explained at "Special tiles take a listing
   card's height" above). Last in the file: it must win over each tile's own min-height. */
@supports (container-type: size) {
    @media (min-width: 640px) {
        .jf-board-tile,
        .app-board-tile { container-type: size; overflow: hidden; }
        .jf-board-tile { min-height: 13.25rem; }
        .app-board-tile { min-height: 15.5rem; }
        .jf-board-tile > *,
        .app-board-tile > * { flex-shrink: 0; }
        /* The body text is the one part that gives way (a safety net under the steps below). */
        .jf-board-tile__text,
        .app-board-tile__text { flex-shrink: 1; min-height: 0; overflow: hidden; }

        /* Heights and widths here are the tile's CONTENT box (its padding is not counted).
           A narrow tile (two columns, a small desktop) has a two-line title: its steps come
           first, a wide tile's own numbers (one-line title) after. */
        @container (max-height: 320px) {
            .jf-board-tile__icon { display: none; }
            .jf-board-tile__text,
            .app-board-tile__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
        }
        @container (max-height: 265px) {
            .app-board-tile__text { -webkit-line-clamp: 3; }
        }
        @container (max-height: 246px) {
            .app-board-tile__text { -webkit-line-clamp: 2; }
        }
        @container (max-height: 236px) {
            .jf-board-tile__text { -webkit-line-clamp: 3; }
        }
        @container (max-height: 196px) {
            .jf-board-tile__text { -webkit-line-clamp: 2; }
        }
        @container (min-width: 293px) and (min-height: 214px) {
            .jf-board-tile__icon { display: inline-flex; }
        }
        @container (min-width: 293px) and (min-height: 176px) and (max-height: 232px) {
            .jf-board-tile__text { -webkit-line-clamp: 3; }
        }
        @container (min-width: 293px) and (min-height: 226px) and (max-height: 320px) {
            .app-board-tile__text { -webkit-line-clamp: 4; }
        }
        @container (min-width: 293px) and (min-height: 207px) and (max-height: 225px) {
            .app-board-tile__text { -webkit-line-clamp: 3; }
        }
    }
    /* Two narrow columns: titles run to three lines, the least set needs a little more. */
    @media (min-width: 640px) and (max-width: 767px) {
        .jf-board-tile { min-height: 14.5rem; }
        .app-board-tile { min-height: 17rem; }
    }
}

/* ── Own tiles under an EMPTY result (ticket 4f21e80d) ─────────────────────────
   The Job Finder tile and the app tile follow their audience, not the listing count:
   with no listing to sit between they stand under the empty state. */
.board-empty-specials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin: 0 auto 2.5rem;
}
.board-empty-specials > * { flex: 0 1 22rem; min-width: 0; }
@media (min-width: 640px) {
    /* No listing card beside them to give the row its height (the tiles take none themselves). */
    .board-empty-specials > * { height: 17rem; }
}

/* ── A visitor's LOCKED filters (ticket 4f21e80d) ──────────────────────────────
   Search, location, Type, sub-roles and Saved are shown, dimmed, with a padlock; each
   is a LINK to the sign-up (keyboard reachable). Visitors only, so no night variant
   (the board turns dark for a signed-in Creative alone). */
.board-lock {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    min-width: 0;
    border: 1px dashed #C9C2D0;
    border-radius: 9999px;
    background: #F7F5F8;
    color: #776981;
    font-size: .875rem;
    line-height: 1.25rem;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}
.board-lock:hover { border-color: #D85A30; color: #493657; text-decoration: none; }
.board-lock:focus-visible { outline: 2px solid rgba(216, 90, 48, .7); outline-offset: 2px; }
.board-lock__icon { flex: 0 0 auto; width: .875rem; height: .875rem; color: #9A8FA3; }
.board-lock:hover .board-lock__icon { color: #D85A30; }
.board-lock__lead { flex: 0 0 auto; width: 1rem; height: 1rem; color: #B7AEC0; }
.board-lock__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.board-lock--field { padding: .625rem .875rem; min-height: 42px; box-sizing: border-box; }
.board-lock--pill { padding: .5rem 1rem; font-weight: 500; }
.board-lock--chip { padding: .375rem .875rem; font-size: .75rem; line-height: 1rem; font-weight: 500; }
@media (min-width: 640px) {
    .board-lock--location { flex: 0 0 200px; max-width: 200px; }
}
.board-lock-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    font-size: .75rem;
    line-height: 1rem;
    color: #776981;
}
.board-lock-note a { color: #493657; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.board-lock-note a:hover { color: #D85A30; }
@media (prefers-reduced-motion: reduce) {
    .board-lock { transition: none; }
}

/* ── The listing page: detail cells vs. actions (ticket e4679a6a) ──────────────
   opportunities/detail.html. THE PAGE'S RULE: filled without a border = information,
   with a border = action. A detail cell (location, project dates, fee, Apply by, level,
   Original listing — whatever the listing has) is a quiet filled tag like the tags above
   the title: no border, no shadow, a little smaller than the buttons; its icon keeps
   `text-tp-orange` (and so a white-label accent). The actions keep their bordered pills
   and stand further away, as their own block. */
.opp-detail-cell {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    max-width: 100%;
    min-width: 0;
    padding: .25rem .75rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(73, 54, 87, .07);
    box-shadow: none;
    text-decoration: none;
}
.opp-detail-cell .text-sm { font-size: .8125rem; line-height: 1.25rem; min-width: 0; overflow-wrap: anywhere; }
.opp-detail-cell > svg { flex: 0 0 auto; }
/* "Original listing ↗" is information that leads somewhere: still filled, never bordered. */
.opp-detail-cell--link { cursor: pointer; transition: background-color .15s ease; }
.opp-detail-cell--link:hover { background: rgba(216, 90, 48, .14); text-decoration: none; }
.opp-detail-cell--link:focus-visible { outline: 2px solid rgba(216, 90, 48, .7); outline-offset: 2px; }
/* A white-label page has its own ground (any colour, light or dark): the cell keeps a light fill. */
[data-wl] .opp-detail-cell { background: rgba(255, 255, 255, .6); }
[data-wl] .opp-detail-cell--link:hover { background: rgba(255, 255, 255, .85); }
.opp-detail-actions { margin-top: 3.75rem; }
@media (max-width: 639px) {
    .opp-detail-actions { margin-top: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .opp-detail-cell--link { transition: none; }
}
