/* V1 — Refined current. Today's portal layout re-rooted in the FEA brand
   (navy/orange/cream, GT-style type). Scoped under .v1-root per PORTING.md. */

@font-face {
    font-family: 'Poppins';
    src: url('../shared/fonts/Poppins-600.woff2') format('woff2');
    font-weight: 600;
}
@font-face {
    font-family: 'Poppins';
    src: url('../shared/fonts/Poppins-700.woff2') format('woff2');
    font-weight: 700;
}
@font-face {
    font-family: 'Inter';
    src: url('../shared/fonts/Inter-Variable.woff2') format('woff2');
    font-weight: 100 900;
}

.v1-root {
    --brand-navy: #1f487e;
    --brand-navy-deep: #153155;
    --brand-navy-ink: #102541;
    --brand-orange: #f27046;
    --brand-orange-text: #cd3d0e;
    --brand-cream: #f8f7f4;
    --brand-line: #e0e0e0;
    --font-display: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    font-family: var(--font-body);
    color: var(--brand-navy);
    font-size: 16px;
    line-height: 1.4;
    max-width: 72rem;
    margin: 0 auto;
    padding: 1rem;
}

/* ---- Grid view ---- */

.v1-root .directory-header h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.375rem;
    line-height: 1.1;
    margin: 0.5rem 0 0.75rem;
}

.v1-root .filter-group {
    display: inline-flex;
    border: 1px solid var(--brand-navy);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.v1-root .filter-btn {
    appearance: none;
    border: 0;
    background: #ffffff;
    color: var(--brand-navy);
    font: inherit;
    font-size: 0.875rem;
    padding: 0.4rem 1rem;
    cursor: pointer;
}

.v1-root .filter-btn + .filter-btn {
    border-left: 1px solid var(--brand-navy);
}

.v1-root .filter-btn.is-active {
    background: var(--brand-navy);
    color: #ffffff;
}

.v1-root .card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: stretch;
}

@media (min-width: 48em) {
    .v1-root .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.v1-root .candidate-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid var(--brand-line);
    border-radius: 6px;
    padding: 1rem;
}

.v1-root .candidate-card:focus-visible {
    outline: 2px solid var(--brand-orange);
    outline-offset: 2px;
}

/* Card header: photo + facts row */
.v1-root .card-head {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.v1-root .photo-wrap {
    position: relative;
    flex: 0 0 auto;
    width: 9rem;
    height: 9rem;
    border-radius: 5px;
    overflow: hidden;
    background: var(--brand-cream);
}

.v1-root .photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 40%;
}

.v1-root .photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-line);
}

.v1-root .photo-placeholder svg {
    width: 3rem;
    height: 3rem;
}

.v1-root .card-head-text {
    min-width: 0;
}

.v1-root .card-head-text h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.25;
    margin: 0;
}

.v1-root .ref-line {
    font-size: 0.8125rem;
    color: var(--brand-navy);
    opacity: 0.8;
    margin: 0.1rem 0 0.25rem;
}

.v1-root .card-head-text p,
.v1-root .accent-lines p {
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0.125rem 0;
}

.v1-root .accent {
    font-weight: 700;
}

.v1-root .inline-accent {
    margin-left: 0.35rem;
}

.v1-root .row-label {
    font-weight: 700;
}

.v1-root .accent-lines {
    margin-top: 0.5rem;
}

.v1-root .worker-note {
    text-wrap: pretty;
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0.5rem 0 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.v1-root .card-actions {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.v1-root .read-more-link {
    color: var(--brand-orange-text);
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
}

.v1-root .read-more-link:hover,
.v1-root .read-more-link:focus {
    text-decoration: underline;
}

.v1-root .enquire-btn {
    appearance: none;
    background: #ffffff;
    border: 1px solid var(--brand-orange-text);
    color: var(--brand-orange-text);
    border-radius: 5px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
}

.v1-root .enquire-btn:hover {
    background: var(--brand-orange-text);
    color: #ffffff;
}

.v1-root .load-more-row {
    text-align: center;
    padding: 1rem 0;
}

.v1-root .load-more-btn,
.v1-root .nav-btn {
    appearance: none;
    background: #ffffff;
    border: 1px solid var(--brand-navy);
    color: var(--brand-navy);
    border-radius: 5px;
    font: inherit;
    font-size: 0.875rem;
    padding: 0.4rem 1rem;
    cursor: pointer;
}

.v1-root .nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.v1-root .empty-state,
.v1-root .detail-not-found {
    padding: 2rem 0;
    opacity: 0.7;
}

/* ---- Detail view ---- */

.v1-root .detail-view {
    max-width: 56rem;
    margin: 0 auto;
}

.v1-root .detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.v1-root .prev-next-group {
    display: inline-flex;
    gap: 0.25rem;
}

.v1-root .detail-card {
    background: #ffffff;
    border: 1px solid var(--brand-line);
    border-radius: 6px;
    padding: 1.5rem;
}

.v1-root .detail-card .photo-wrap {
    width: 12rem;
    height: 12rem;
}

.v1-root .detail-card .card-head-text p {
    font-size: 1rem;
}

.v1-root .detail-section {
    margin-top: 1.5rem;
}

.v1-root .section-title {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-navy-deep);
    margin: 0 0 0.25rem;
}

.v1-root .detail-body {
    text-wrap: pretty;
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0.125rem 0;
}

.v1-root .pre-wrap {
    white-space: pre-wrap;
}

.v1-root .detail-card .card-actions {
    margin-top: 1.5rem;
    padding-top: 0;
}

.v1-root .detail-card .enquire-btn {
    width: 100%;
    background: var(--brand-orange-text);
    border-color: var(--brand-orange-text);
    color: #ffffff;
    padding: 0.6rem 1rem;
}

.v1-root .detail-card .enquire-btn:hover {
    background: var(--brand-navy-ink);
    border-color: var(--brand-navy-ink);
}

/* Phones: photo stacks above the facts */
@media (max-width: 47.99em) {
    .v1-root .card-head {
        flex-direction: column;
    }

    .v1-root .card-head .photo-wrap {
        width: 100%;
        height: 12rem;
    }

    .v1-root .card-head .photo-wrap.no-photo {
        display: none;
    }

    .v1-root .detail-card .card-head .photo-wrap {
        width: 100%;
        height: 14rem;
    }
}

/* Enquiry modal styles live in shared/shell.css (demo stub, not judged design) */

/* Browser surfaces: selection from the palette; icons optically aligned */
.v1-root ::selection {
    background: var(--brand-orange);
    color: #ffffff;
}

.v1-root .nav-btn .icon,
.v1-root .read-more-link .icon {
    vertical-align: -0.15em;
}
