/* ==========================================================================
   GFC v2 - core design system
   Tokens + shared components, per the Gray /sc/ style guide.
   ========================================================================== */

:root {
    /* Brand */
    --g-blue:      #009cdb;
    --g-dark-blue: #1b2845;
    --g-red:       #e21636;
    --g-yellow:    #fbbf16;

    /* Accent */
    --accent:       var(--g-blue);
    --accent-hover: #0082b8;
    --accent-soft:  #e3f4fc;
    --ring:         rgba(0, 156, 219, .22);

    /* Navy */
    --navy:       var(--g-dark-blue);
    --navy-hover: #2a3a5e;

    /* Status */
    --danger:       var(--g-red);
    --danger-soft:  #fdecef;
    --warning:      var(--g-yellow);
    --warning-soft: #fef5db;
    --warning-ink:  #946d00;
    --success:      #1e9e6a;
    --success-soft: #e3f6ee;

    /* Surfaces & neutrals */
    --surface:       #ffffff;
    --bg:            #f3f5f9;
    --hover:         #f4f6fa;
    --sunken:        #f6f8fb;
    --border-light:  #eef0f5;
    --border:        #e3e7ef;
    --border-strong: #d2d7e2;

    /* Shape - site-wide cap */
    --radius: 4px;

    /* Text */
    --text:        #2a3447;
    --text-strong: var(--navy);
    --text-muted:  #5e6678;
    --text-faint:  #99a1b3;

    --topbar-h: 56px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
}

.gfc [hidden], body [hidden] { display: none !important; }

img { max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --------------------------------------------------------------- topbar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
}

.topbar__logo { display: inline-flex; align-items: center; }
.topbar__logo img { max-height: 38px; max-width: 200px; display: block; }
.topbar__spacer { flex: 1; }
.topbar__actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }

.topbar__burger {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: transparent; color: var(--text-strong);
    border-radius: var(--radius); cursor: pointer; flex: 0 0 auto;
}
.topbar__burger:hover { background: var(--hover); }
.topbar__burger svg { width: 22px; height: 22px; }

/* --------------------------------------------------------------- buttons */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-family: inherit;
    font-size: .8rem; font-weight: 600; cursor: pointer; white-space: nowrap;
    padding: 8px 14px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    text-decoration: none;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn svg { width: 14px; height: 14px; flex: 0 0 auto; }

.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }

.btn--navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-hover); }

.btn--success { background: var(--success); border-color: var(--success); color: #fff; }
.btn--success:hover { background: var(--success); filter: brightness(.94); color: #fff; }

.btn--danger { color: var(--danger); border-color: var(--danger-soft); }
.btn--danger:hover { background: var(--danger-soft); }

.btn--danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger-solid:hover { background: var(--danger); border-color: var(--danger); color: #fff; filter: brightness(.92); }

.btn--soft-success { background: var(--success-soft); border-color: var(--success-soft); color: var(--success); }
.btn--soft-success:hover { background: var(--success-soft); filter: brightness(.97); }

.btn--soft-danger { background: var(--danger-soft); border-color: var(--danger-soft); color: var(--danger); }
.btn--soft-danger:hover { background: var(--danger-soft); filter: brightness(.97); }

.btn:disabled, .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

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

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: 0 0 20px 0 rgba(76, 87, 125, .05);
}

.card__head { margin-bottom: 18px; }
.card__title { margin: 0; font-size: 1.15rem; font-weight: 600; color: var(--text-strong); }
.card__subtitle { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); line-height: 1.55; }

/* ----------------------------------------------------------------- forms */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label {
    font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--text-muted);
}
.field__label .req { color: var(--danger); margin-left: 2px; }
.field__hint { font-size: .74rem; color: var(--text-faint); }

.input {
    width: 100%; font: inherit; font-size: .86rem; padding: 9px 12px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); color: var(--text);
}
.input--sunken { background: var(--sunken); }
.input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--ring); background: var(--surface);
}
.input::placeholder { color: var(--text-faint); }
textarea.input { resize: vertical; min-height: 84px; }

.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--radius) 0 0 var(--radius); }
.input-group__addon {
    display: inline-flex; align-items: center; padding: 0 12px;
    border: 1px solid var(--border); border-left: 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--sunken); color: var(--text-faint);
}
.input-group__addon svg { width: 15px; height: 15px; }

input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

@media (hover: none) and (pointer: coarse) {
    .input, .sel__trigger { font-size: 16px; }
}

/* ---------------------------------------------------------- custom select */

.sel { position: relative; min-width: 0; }
.sel select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.sel__trigger {
    width: 100%; display: flex; align-items: center; gap: 8px;
    font: inherit; font-size: .86rem; text-align: left;
    padding: 9px 12px; cursor: pointer;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); color: var(--text); min-height: 38px;
}
.sel__trigger:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--ring);
}
.sel__value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel__value.is-placeholder { color: var(--text-faint); }
.sel__chevron { flex: 0 0 auto; color: var(--text-faint); transition: transform .15s ease; }
.sel__chevron svg { width: 14px; height: 14px; display: block; }
.sel.is-open .sel__chevron { transform: rotate(180deg); }
.sel__count {
    font-size: .72rem; font-weight: 700; color: var(--text-muted);
    background: var(--sunken); border: 1px solid var(--border-light);
    padding: 1px 8px; border-radius: 999px; flex: 0 0 auto;
}

.sel__panel {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(76, 87, 125, .18);
    display: none;
}
.sel.is-open .sel__panel { display: block; }
.sel__search { padding: 8px; border-bottom: 1px solid var(--border-light); }
.sel__options { max-height: 240px; overflow-y: auto; padding: 6px; margin: 0; list-style: none; }
.sel__option {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 11px; border-radius: var(--radius);
    font-size: .85rem; cursor: pointer;
}
.sel__option:hover, .sel__option.is-highlighted { background: var(--hover); }
.sel__option.is-selected { color: var(--accent); font-weight: 600; }
.sel__option .box {
    width: 14px; height: 14px; flex: 0 0 auto;
    border: 1px solid var(--border-strong); border-radius: 3px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface);
}
.sel__option.is-selected .box { background: var(--accent); border-color: var(--accent); }
.sel__option.is-selected .box::after {
    content: ''; width: 8px; height: 4px;
    border-left: 2px solid #fff; border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}
.sel__empty { padding: 12px; font-size: .8rem; color: var(--text-faint); text-align: center; }

/* ----------------------------------------------------------------- pills */

.status {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius);
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--ok      { background: var(--success-soft); color: var(--success); }
.status--pending { background: var(--warning-soft); color: var(--warning-ink); }
.status--bad     { background: var(--danger-soft);  color: var(--danger); }
.status--info    { background: var(--accent-soft);  color: var(--accent); }

/* ---------------------------------------------------------------- dialogs */

.dlg-overlay {
    position: fixed; inset: 0; z-index: 1000000;
    background: rgba(27, 40, 69, .45);
    backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; transition: opacity .16s ease;
}
.dlg-overlay.is-visible { opacity: 1; }

.dlg {
    width: 100%; max-width: 420px;
    background: var(--surface); border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(27, 40, 69, .32);
    padding: 28px 26px 24px; text-align: center;
    transform: translateY(8px) scale(.97);
    transition: transform .18s ease;
}
.dlg-overlay.is-visible .dlg { transform: none; }

.dlg__icon {
    width: 56px; height: 56px; margin: 0 auto 14px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.dlg__icon svg { width: 26px; height: 26px; }
.dlg__icon--success { background: var(--success-soft); color: var(--success); }
.dlg__icon--warning { background: var(--warning-soft); color: var(--warning-ink); }
.dlg__icon--danger  { background: var(--danger-soft);  color: var(--danger); }
.dlg__icon--info    { background: var(--accent-soft);  color: var(--accent); }
.dlg__icon--question{ background: var(--accent-soft);  color: var(--accent); }

.dlg__title { margin: 0 0 8px; font-size: 1.15rem; font-weight: 600; color: var(--text-strong); }
.dlg__text { margin: 0; font-size: .9rem; color: var(--text-muted); line-height: 1.55; }
.dlg__text ul { list-style: none; text-align: left; margin: 12px 0 0; padding: 0; }
.dlg__text ul li {
    background: var(--danger-soft); color: var(--danger);
    border-radius: var(--radius); margin: 8px 0; padding: 5px 10px;
    font-weight: 500; font-size: .82rem;
}
.dlg__text ul li.missing-item { cursor: pointer; }
.dlg__text ul li.missing-item:hover { background: var(--danger); color: #fff; }
.dlg__buttons { display: flex; justify-content: center; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.dlg__buttons .btn { min-width: 96px; padding: 9px 18px; }
.dlg__footer {
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-light);
    font-size: .78rem; color: var(--text-muted);
}

/* ----------------------------------------------------------------- modals */

.modal-overlay {
    position: fixed; inset: 0; z-index: 1300;
    background: rgba(15, 20, 35, .62);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; transition: opacity .16s ease;
}
.modal-overlay.is-visible { opacity: 1; }

.modal {
    width: 460px; max-width: calc(100vw - 32px); max-height: 84vh;
    display: flex; flex-direction: column;
    background: var(--surface); border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 20px 60px rgba(16, 24, 40, .3);
    transform: translateY(8px) scale(.97);
    transition: transform .18s ease;
}
.modal-overlay.is-visible .modal { transform: none; }
.modal--wide { width: 560px; }

.modal__head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 15px 18px; border-bottom: 1px solid var(--border-light);
}
.modal__head h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text-strong); }
.modal__x {
    width: 28px; height: 28px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: transparent; color: var(--text-muted);
    border-radius: var(--radius); cursor: pointer;
}
.modal__x:hover { background: var(--danger-soft); color: var(--danger); }
.modal__x svg { width: 15px; height: 15px; }
.modal__body { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal__foot {
    display: flex; align-items: center; justify-content: flex-end; gap: 8px;
    /* ⚠ 12px TOP, 13px bottom — deliberate, not a typo. The 1px `border-top`
       sits inside the box, so symmetric padding leaves the button one pixel
       below the optical centre of the footer. */
    padding: 12px 18px 13px; border-top: 1px solid var(--border-light);
}

/* A footer with a secondary escape hatch on the left and the primary action on
   the right — "Already have a profile?" opposite "Continue". Falls back to a
   centred stack on a narrow phone rather than squeezing both onto one line. */
.modal__foot--split { justify-content: space-between; }
@media (max-width: 460px) {
    .modal__foot--split { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
    .modal__foot--split .btn { width: 100%; justify-content: center; }
}

/* A button that reads as a link. Not an <a>: it performs an action rather than
   going anywhere, and a hrefless anchor is not keyboard-focusable. */
.linkish {
    background: none; border: 0; padding: 0;
    font: inherit; font-size: .82rem; font-weight: 600;
    color: var(--accent); cursor: pointer; text-align: left;
}
.linkish:hover { text-decoration: underline; }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* The 6-digit code field: wide tracking so the digits are easy to check
   against the email, and a size that does not zoom on iOS (>=16px). */
.input--code {
    font-size: 24px; font-weight: 700; letter-spacing: 10px;
    text-align: center; font-variant-numeric: tabular-nums;
}

/* "Update" / "View or delete" after a successful code. */
.access-choice { display: flex; flex-direction: column; gap: 9px; }
.access-choice .btn { width: 100%; justify-content: center; }
.modal__subtitle { margin: -6px 0 0; font-size: .82rem; color: var(--text-muted); line-height: 1.5; }

body.modal-open { overflow: hidden; }

/* ----------------------------------------------------------------- toasts */

.toast-stack {
    position: fixed; right: 16px; bottom: 16px; z-index: 1400;
    display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast {
    display: flex; align-items: center; gap: 9px; max-width: 360px;
    background: var(--navy); color: #fff; padding: 10px 15px; border-radius: var(--radius);
    font-size: .82rem; line-height: 1.35;
    box-shadow: 0 10px 28px rgba(27, 40, 69, .28);
    border-left: 3px solid transparent;
    opacity: 0; transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: none; }
.toast--success { border-left-color: var(--success); }
.toast--danger  { border-left-color: var(--danger); }
.toast--info    { border-left-color: var(--accent); }
.toast svg { width: 15px; height: 15px; flex: 0 0 auto; }
.toast--success svg { color: #62d6a4; }
.toast--danger svg  { color: #ff7b8f; }
.toast--info svg    { color: #5cc6f0; }

/* ----------------------------------------------------------------- drawer */

.drawer-scrim {
    position: fixed; inset: 0; z-index: 125;
    background: rgba(27, 40, 69, .45);
    opacity: 0; transition: opacity .2s ease;
}
.drawer-scrim.is-visible { opacity: 1; }

.drawer {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 130;
    width: min(330px, 86vw);
    background: var(--surface); border-right: 1px solid var(--border);
    transform: translateX(-100%); transition: transform .2s ease;
    display: flex; flex-direction: column;
}
.drawer.is-open { transform: none; box-shadow: 12px 0 36px rgba(76, 87, 125, .16); }
.drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(180deg, var(--sunken), transparent);
}
.drawer__title {
    font-size: .72rem; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-muted);
}
.drawer__body { flex: 1; overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.drawer__link {
    display: block; padding: 11px 13px; border-radius: var(--radius);
    font-size: .88rem; color: var(--text-muted); text-decoration: none;
}
.drawer__link:hover { background: var(--hover); color: var(--accent); text-decoration: none; }

/* ----------------------------------------------------------------- upload */

.dz {
    border: 1px dashed var(--border-strong); border-radius: var(--radius);
    background: var(--sunken);
    padding: 36px 16px; text-align: center; cursor: pointer;
    position: relative;
}
.dz:hover { background: var(--hover); }
.dz:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.dz.is-dragover { border-color: var(--accent); background: var(--accent-soft); border-style: solid; }
.dz__icon { color: var(--text-faint); margin-bottom: 10px; }
.dz__icon svg { width: 34px; height: 34px; }
.dz__title { font-size: .95rem; font-weight: 600; color: var(--text-strong); margin: 0 0 4px; }
.dz__desc { font-size: .78rem; color: var(--text-muted); margin: 0; }
.dz input[type="file"] {
    position: absolute; width: 1px; height: 1px;
    clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden;
}

.dz-progress { margin-top: 14px; }
.dz-progress__label { font-size: .74rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.dz-progress__track { height: 5px; background: var(--border-light); border-radius: 999px; overflow: hidden; }
.dz-progress__fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .18s ease; }

.dz-done {
    border: 1px dashed var(--border-strong); border-radius: var(--radius);
    background: var(--surface);
    padding: 22px 16px; text-align: center;
}
.dz-done__preview {
    width: 132px; height: 132px; margin: 0 auto 12px;
    border-radius: var(--radius); background-size: cover; background-position: center;
    border: 1px solid var(--border-light); background-color: var(--sunken);
}
.dz-done__icon { color: var(--text-muted); margin-bottom: 8px; }
.dz-done__icon svg { width: 40px; height: 40px; }
.dz-done__status {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600; color: var(--success); margin-bottom: 5px;
}
.dz-done__status svg { width: 14px; height: 14px; }
.dz-done__name { font-size: .82rem; color: var(--text-muted); word-break: break-word; margin: 0 0 10px; }
.dz__cancel, .dz-done__again {
    font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    background: none; border: 0; cursor: pointer; padding: 4px 6px; font-family: inherit;
}
.dz__cancel { color: var(--danger); }
.dz-done__again { color: var(--text-muted); }
.dz__cancel:hover, .dz-done__again:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ misc */

.footer {
    margin-top: auto;
    padding: 18px 24px; text-align: center;
    font-size: .78rem; color: var(--text-faint);
}
.footer strong { color: var(--text-muted); font-weight: 600; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.hp-field { position: absolute; left: -9999px; top: -9999px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
/* ==========================================================================
   Uploader — see app/Views/partials/uploader.php
   Used by the submission form (sections F + G) AND the landing page's
   "Contact Gray Media Recruiting" modal, which is why it lives in core.
   One component, five states, switched by [data-state] on .up.
   ========================================================================== */

.up {
    position: relative;
    display: flex; gap: 20px; align-items: flex-start;
    padding: 22px; max-width: 720px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface);
    transition: border-color .15s ease, background .15s ease;
}
.up:hover { border-color: var(--border-strong); }
.up.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.up__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* --- the media slot: avatar for a photo, file badge for a document ------- */
.up__media {
    position: relative; flex: none;
    width: 96px; height: 96px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--sunken); border: 1px dashed var(--border-strong);
    overflow: hidden;
}
.up--file .up__media { border-radius: var(--radius); width: 76px; height: 92px; }
.up__ph { color: var(--text-faint); display: grid; place-items: center; }
.up__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.up__ext {
    position: absolute; left: 0; right: 0; bottom: 10px; text-align: center;
    font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--accent); display: none;
}
.up[data-state="uploading"] .up__img,
.up[data-state="processing"] .up__img,
.up[data-state="done"] .up__img,
.up[data-state="error"] .up__img { display: block; }
.up--file[data-state="uploading"] .up__ext,
.up--file[data-state="processing"] .up__ext,
.up--file[data-state="done"] .up__ext { display: block; }
.up[data-state="done"] .up__media { border-style: solid; border-color: var(--success); }
.up[data-state="error"] .up__media { border-style: solid; border-color: var(--danger); }
.up[data-state="error"] .up__img { filter: grayscale(1); opacity: .6; }

/* the progress ring rides the media slot while bytes are moving */
.up__ring { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px);
    transform: rotate(-90deg); display: none; }
.up--file .up__ring { display: none !important; }
.up[data-state="uploading"] .up__ring { display: block; }
.up__ring-bg, .up__ring-fg { fill: none; stroke-width: 3; }
.up__ring-bg { stroke: rgba(255,255,255,.65); }
.up__ring-fg {
    stroke: var(--accent); stroke-linecap: round;
    stroke-dasharray: 125.6; stroke-dashoffset: 125.6;
    transition: stroke-dashoffset .2s ease;
}

/* --- panes --------------------------------------------------------------- */
.up__body { flex: 1; min-width: 0; }
.up__pane { display: none; }
.up[data-state="idle"]       .up__pane--idle,
.up[data-state="uploading"]  .up__pane--busy,
.up[data-state="processing"] .up__pane--busy,
.up[data-state="done"]       .up__pane--done,
.up[data-state="error"]      .up__pane--error { display: block; }

.up__title { margin: 0 0 3px; font-size: 1rem; font-weight: 700; color: var(--text-strong); }
.up__hint  { margin: 0 0 10px; font-size: .82rem; color: var(--text-muted); line-height: 1.45; }

.up__rules { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.up__rules li { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; color: var(--text-muted); }
.up__rules svg { color: var(--success); flex: none; }

.up__prereq {
    display: flex; align-items: center; gap: 7px; margin: 0 0 12px;
    padding: 8px 11px; border-radius: var(--radius);
    background: var(--warning-soft); color: var(--warning-ink);
    font-size: .78rem; font-weight: 600;
}
.up__prereq svg { flex: none; }

.up__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.up__pick { display: inline-flex; align-items: center; gap: 7px; }
.up__or { font-size: .78rem; color: var(--text-faint); }
/* A blocked uploader still shows its button — greyed, with the reason above
   it — rather than hiding the action and leaving people hunting for it. */
.up.is-blocked .up__pick { opacity: .5; }
.up.is-blocked .up__media { opacity: .6; }

/* --- uploading / processing ---------------------------------------------- */
.up__fname {
    margin: 0 0 9px; font-size: .85rem; font-weight: 600; color: var(--text-strong);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.up__fname--done { font-weight: 500; color: var(--text-muted); font-size: .8rem; margin-bottom: 12px; }
.up__bar { height: 6px; border-radius: 999px; background: var(--border-light); overflow: hidden; }
.up__fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width .2s ease; }
.up[data-state="processing"] .up__fill {
    width: 100% !important;
    background: linear-gradient(90deg, var(--accent) 25%, var(--accent-soft) 50%, var(--accent) 75%);
    background-size: 200% 100%;
    animation: up-shimmer 1.1s linear infinite;
}
@keyframes up-shimmer { to { background-position: -200% 0; } }

.up__step { margin: 9px 0 0; font-size: .78rem; color: var(--text-muted); }
.up__step b { color: var(--text-strong); }
.up__step-proc { display: none; }
.up[data-state="processing"] .up__step-up { display: none; }
.up[data-state="processing"] .up__step-proc { display: inline; }

.up__link {
    border: 0; background: none; padding: 0; cursor: pointer;
    font: inherit; font-size: .78rem; font-weight: 600; color: var(--text-muted);
}
.up__link:hover { text-decoration: underline; color: var(--danger); }
.up__cancel { margin-top: 10px; }

/* --- done ---------------------------------------------------------------- */
.up__ok, .up__bad { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: .9rem; font-weight: 700; }
.up__ok  { color: var(--success); }
.up__bad { color: var(--danger); }
.up__ok svg, .up__bad svg { flex: none; }
.up__tip { margin: 0 0 13px; font-size: .8rem; color: var(--text-muted); line-height: 1.45; }

/* --- drop overlay -------------------------------------------------------- */
.up__drop {
    position: absolute; inset: 0; display: none; place-items: center;
    border-radius: var(--radius); background: rgba(227, 244, 252, .92);
    border: 1px dashed var(--accent);
    font-size: .85rem; font-weight: 700; color: var(--accent);
}
.up__drop span { display: inline-flex; align-items: center; gap: 8px; }
.up.is-dragover .up__drop { display: grid; }

@media (max-width: 640px) {
    .up { flex-direction: column; align-items: center; text-align: center; padding: 18px; }
    .up__actions, .up__rules, .up__ok, .up__bad, .up__prereq { justify-content: center; }
    .up__body { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .up__fill, .up__ring-fg { transition: none; }
    .up[data-state="processing"] .up__fill { animation-duration: 2.4s; }
}

/* --- compact: one bordered row, for a modal ------------------------------
   ⚠ The first attempt here just stripped the card's border inside a modal.
   That was worse, not tidier: with no boundary the icon, heading, rules and
   button read as four loose things dropped between the LinkedIn field and the
   reCAPTCHA. A field needs an edge. This is the same component and the same
   markup, laid out as a single contained row that matches the inputs above it
   and the reCAPTCHA box below. */
.up--compact {
    align-items: center; gap: 12px;
    padding: 11px 13px;
    border: 1px dashed var(--border-strong);
    background: var(--sunken);
}
.up--compact:hover { border-color: var(--accent); background: var(--hover); }
.up--compact.is-dragover { border-style: solid; }

.up--compact .up__media { width: 36px; height: 36px; border: 0; background: none; border-radius: var(--radius); }
.up--compact .up__media svg { width: 20px; height: 20px; }
.up--compact .up__ph { color: var(--text-faint); }
.up--compact .up__ext { display: none !important; }
.up--compact[data-state="done"] .up__media { border: 0; }
.up--compact[data-state="error"] .up__media { border: 0; color: var(--danger); }
.up--compact[data-state="error"] .up__ph { color: var(--danger); }

/* Title on row 1, one meta line on row 2, the action pinned right across both.
   ⚠ EXPLICIT grid areas, not auto-placement. The first version left the rows
   to `grid-column: 1` + auto rows and they collapsed to 3.5px/9.5px, drawing
   the progress bar straight through the filename. Naming every cell costs a
   few lines and cannot do that. */
.up--compact .up__pane {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center; column-gap: 12px; row-gap: 3px;
}
.up--compact[data-state="idle"]       .up__pane--idle,
.up--compact[data-state="uploading"]  .up__pane--busy,
.up--compact[data-state="processing"] .up__pane--busy,
.up--compact[data-state="done"]       .up__pane--done,
.up--compact[data-state="error"]      .up__pane--error { display: grid; }

/* idle / done / error share one shape: heading, meta, action */
.up--compact .up__pane--idle,
.up--compact .up__pane--done,
.up--compact .up__pane--error { grid-template-areas: "title action" "meta action"; }
.up--compact .up__title,
.up--compact .up__ok,
.up--compact .up__bad     { grid-area: title; margin: 0; font-size: .85rem; }
.up--compact .up__rules,
.up--compact .up__tip,
.up--compact .up__fname--done { grid-area: meta; margin: 0; }
.up--compact .up__actions { grid-area: action; margin: 0; gap: 9px; }

/* busy is its own shape: name + percentage, bar across the full width */
.up--compact .up__pane--busy { grid-template-areas: "name pct" "bar bar"; }
.up--compact .up__pane--busy .up__fname { grid-area: name; margin: 0; font-size: .82rem; }
.up--compact .up__pane--busy .up__step  { grid-area: pct;  margin: 0; justify-self: end; white-space: nowrap; }
.up--compact .up__pane--busy .up__bar   { grid-area: bar;  margin: 0; }

.up--compact .up__hint { display: none; }          /* the rules carry the facts */
.up--compact .up__rules { gap: 0; font-size: .74rem; }
.up--compact .up__rules svg { display: none; }      /* ticks are noise at this size */
/* the separator LEADS the next item, so it wraps with it instead of dangling
   at the end of a line */
.up--compact .up__rules li + li::before { content: '·'; margin: 0 8px; color: var(--border-strong); }
.up--compact .up__tip { font-size: .74rem; }
.up--compact .up__fname--done { font-size: .74rem; }
.up--compact .up__pick { padding: 7px 12px; font-size: .76rem; }
.up--compact .up__again { padding: 6px 11px; font-size: .75rem; }
.up--compact .up__or { display: none; }             /* the whole row is the drop target */
.up--compact .up__step { font-size: .78rem; font-weight: 700; color: var(--text-strong); }

/* No Cancel here: the progress belongs to the FORM submit, and aborting it
   would burn the reCAPTCHA on a message that never arrived. Offering a button
   that cannot do the thing is worse than offering none. */
.up--compact .up__cancel { display: none; }
.up--compact .up__ring { display: none !important; }

/* ⚠ The base .up stacks and centres below 640px. A compact uploader must NOT
   follow it — it is one row by design, and centring a 36px icon above two
   lines of text looks like a mistake. Keep the row; only the action drops. */
@media (max-width: 640px) {
    .up--compact { flex-direction: row; align-items: center; text-align: left; }
    .up--compact .up__actions, .up--compact .up__rules, .up--compact .up__ok,
    .up--compact .up__bad, .up--compact .up__prereq { justify-content: flex-start; }
}
@media (max-width: 560px) {
    .up--compact { align-items: flex-start; }
    .up--compact .up__pane--idle,
    .up--compact .up__pane--done,
    .up--compact .up__pane--error {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "title" "meta" "action";
    }
    .up--compact .up__actions { margin-top: 9px; }
}
