/* CareersHunts — portal layout (structurally distinct from JobsMint Pro) */
@import url('https://fonts.bunny.net/css?family=instrument-sans:400,500,600,700&family=syne:700,800&display=swap');

:root {
    --ch-bg: #f8fafc;
    --ch-bg-2: #ffffff;
    --ch-surface: #ffffff;
    --ch-surface-2: #f1f5f9;
    --ch-line: #e2e8f0;
    --ch-line-strong: #cbd5e1;
    --ch-text: #0f172a;
    --ch-muted: #64748b;
    --ch-accent: #0d9488;
    --ch-accent-hover: #0f766e;
    --ch-accent-2: #4f46e5;
    --ch-warn: #d97706;
    --ch-rail-w: 76px;
    --ch-rail-w-open: 240px;
    --ch-font: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
    --ch-display: "Syne", ui-sans-serif, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.ch-app {
    min-height: 100vh;
    color: var(--ch-text);
    background: var(--ch-bg);
    font-family: var(--ch-font);
}

.ch-app__bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 50% 40% at 80% 0%, rgba(79, 70, 229, .06), transparent),
        radial-gradient(ellipse 40% 30% at 10% 100%, rgba(13, 148, 136, .05), transparent);
}

.ch-app__frame {
    position: relative;
    display: grid;
    grid-template-columns: var(--ch-rail-w) 1fr;
    min-height: 100vh;
}

/* ── Side rail navigation ── */
.ch-rail {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 12px;
    border-right: 1px solid var(--ch-line);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
    box-shadow: 4px 0 24px rgba(15, 23, 42, .04);
}

.ch-rail__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ch-line);
    text-decoration: none;
    color: inherit;
}

.ch-rail__brand .brand-mark {
    width: 42px !important;
    height: 42px !important;
}

.ch-rail__name {
    display: none;
    font-family: var(--ch-display);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: -.02em;
    text-align: center;
    line-height: 1.2;
    color: var(--ch-text);
}

.ch-rail__name span { color: var(--ch-accent); }

.ch-rail__nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 20px;
    overflow-y: auto;
}

.ch-rail__link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--ch-muted) !important;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s, background .2s, border-color .2s;
}

.ch-rail__link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ch-rail__link span { display: none; }

.ch-rail__link:hover,
.ch-rail__link.is-active {
    color: var(--ch-accent-hover) !important;
    background: #f0fdfa;
    border-color: #ccfbf1;
}

.ch-rail__link.is-active {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: var(--ch-accent-hover) !important;
}

.ch-rail__cta {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--ch-line);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.ch-rail__cta .ch-rail__link {
    justify-content: center;
    color: #ffffff !important;
    background: var(--ch-accent);
    border-color: transparent;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.ch-rail__cta .ch-rail__link:hover {
    background: var(--ch-accent-hover);
    color: #ffffff !important;
}

.ch-rail__logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    margin-top: 8px;
    padding: 0 12px;
    border: 1px solid var(--ch-line);
    border-radius: 12px;
    background: #ffffff;
    color: #64748b !important;
    font: inherit;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .2s, background .2s, border-color .2s;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.ch-rail__logout svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ch-rail__logout:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c !important;
}

.ch-rail__logout span { display: none; }

/* Desktop: expand rail on hover to show labels (no browser tooltips) */
@media (min-width: 901px) {
    .ch-rail {
        width: var(--ch-rail-w);
        overflow: hidden;
        transition: width .22s ease, box-shadow .22s ease;
        z-index: 20;
    }

    .ch-rail:hover,
    .ch-rail:focus-within {
        width: var(--ch-rail-w-open);
        box-shadow: 8px 0 32px rgba(15, 23, 42, .1);
    }

    .ch-rail:hover .ch-rail__link span,
    .ch-rail:hover .ch-rail__name,
    .ch-rail:hover .ch-rail__logout span,
    .ch-rail:focus-within .ch-rail__link span,
    .ch-rail:focus-within .ch-rail__name,
    .ch-rail:focus-within .ch-rail__logout span {
        display: inline;
    }

    .ch-rail:hover .ch-rail__brand,
    .ch-rail:focus-within .ch-rail__brand {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        padding-left: 4px;
    }

    .ch-rail:hover .ch-rail__name,
    .ch-rail:focus-within .ch-rail__name {
        display: block;
        text-align: left;
    }

    .ch-rail:hover .ch-rail__link,
    .ch-rail:focus-within .ch-rail__link,
    .ch-rail:hover .ch-rail__logout,
    .ch-rail:focus-within .ch-rail__logout {
        justify-content: flex-start;
    }

    .ch-rail:hover .ch-rail__cta .ch-rail__link,
    .ch-rail:focus-within .ch-rail__cta .ch-rail__link {
        justify-content: flex-start;
    }
}

/* ── Main content column ── */
.ch-main-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ch-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ch-line);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.ch-topbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    font-family: var(--ch-display);
    font-weight: 800;
    font-size: .95rem;
}

.ch-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--ch-line);
    border-radius: 10px;
    background: var(--ch-surface);
    color: var(--ch-text);
    cursor: pointer;
}

.ch-main {
    flex: 1;
    padding: 0;
}

.ch-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 28px 80px;
}

.ch-flash {
    margin: 0 28px 0;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .82rem;
    border: 1px solid var(--ch-line);
    background: var(--ch-surface);
}

.ch-flash--success { border-color: #99f6e4; color: #0f766e; background: #f0fdfa; }
.ch-flash--error { border-color: #fecaca; color: #b91c1c; background: #fef2f2; }

/* ── Typography ── */
.ch-kicker {
    margin: 0;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ch-accent);
}

.ch-h1 {
    margin: 12px 0 0;
    font-family: var(--ch-display);
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: .95;
    letter-spacing: -.04em;
}

.ch-lead {
    margin: 18px 0 0;
    max-width: 520px;
    color: var(--ch-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.ch-h2 {
    margin: 0;
    font-family: var(--ch-display);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -.03em;
}

/* ── Command search bar ── */
.ch-command {
    margin-top: 32px;
    padding: 20px;
    border: 1px solid var(--ch-line-strong);
    border-radius: 16px;
    background: var(--ch-surface);
}

.ch-command__title {
    margin: 0 0 14px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ch-muted);
}

.ch-command__row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.ch-command__row .ch-input {
    flex: 1;
    min-width: 0;
}

.ch-command__filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.ch-input,
.ch-public .dash-input {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--ch-line);
    border-radius: 10px;
    background: var(--ch-bg-2);
    color: var(--ch-text);
    font: inherit;
    font-size: .84rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.ch-public textarea.dash-input {
    min-height: 100px;
    padding: 12px 14px;
}

.ch-input:focus,
.ch-public .dash-input:focus {
    border-color: var(--ch-accent);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}

.ch-input::placeholder,
.ch-public .dash-input::placeholder { color: #94a3b8; }

.ch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: 10px;
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s, opacity .15s;
}

.ch-btn:hover { transform: translateY(-1px); }

.ch-btn--solid {
    color: #ffffff !important;
    background: var(--ch-accent);
}

.ch-btn--solid:hover {
    background: var(--ch-accent-hover);
}

.ch-btn--ghost {
    border: 1px solid var(--ch-line-strong);
    color: var(--ch-text) !important;
    background: transparent;
}

.ch-btn--sm {
    min-height: 36px;
    padding: 0 14px;
    font-size: .75rem;
}

/* ── Stat strip (horizontal, not card grid) ── */
.ch-stat-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 40px;
    border: 1px solid var(--ch-line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--ch-surface);
}

.ch-stat-strip__item {
    flex: 1 1 120px;
    padding: 20px 24px;
    border-right: 1px solid var(--ch-line);
    text-decoration: none;
    color: inherit;
    transition: background .2s;
}

.ch-stat-strip__item:last-child { border-right: none; }

.ch-stat-strip__item:hover { background: #f8fafc; }

.ch-stat-strip__val {
    display: block;
    font-family: var(--ch-display);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -.04em;
    color: var(--ch-text);
}

.ch-stat-strip__lbl {
    display: block;
    margin-top: 4px;
    font-size: .7rem;
    color: var(--ch-muted);
}

/* ── Horizontal job rows (not card grid) ── */
.ch-job-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 24px;
    border: 1px solid var(--ch-line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--ch-surface);
}

.ch-job-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--ch-line);
    text-decoration: none;
    color: inherit;
    transition: background .2s;
}

.ch-job-row:last-child { border-bottom: none; }

.ch-job-row:hover { background: #f0fdfa; }

.ch-job-row__mark {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(129, 140, 248, .12);
    color: var(--ch-accent-2);
    font-size: .85rem;
    font-weight: 800;
}

.ch-job-row__title {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
    color: var(--ch-text);
}

.ch-job-row__meta {
    margin: 4px 0 0;
    font-size: .75rem;
    color: var(--ch-muted);
}

.ch-job-row__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.ch-tag {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .02em;
    background: #f8fafc;
    color: var(--ch-muted);
    border: 1px solid var(--ch-line);
}

.ch-tag--live { color: var(--ch-accent-hover); border-color: #99f6e4; background: #f0fdfa; }

/* ── Section blocks ── */
.ch-block {
    margin-top: 56px;
}

.ch-block__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.ch-link {
    color: var(--ch-accent) !important;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
}

.ch-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ch-pill {
    display: inline-flex;
    padding: 8px 14px;
    border: 1px solid var(--ch-line);
    border-radius: 8px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--ch-muted) !important;
    text-decoration: none;
    transition: border-color .2s, color .2s;
}

.ch-pill:hover {
    border-color: var(--ch-accent);
    color: var(--ch-accent) !important;
}

/* ── Split browse layout ── */
.ch-browse {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}

.ch-filter-panel {
    position: sticky;
    top: 24px;
    padding: 20px;
    border: 1px solid var(--ch-line);
    border-radius: 14px;
    background: var(--ch-surface);
}

.ch-filter-panel h2 {
    margin: 0 0 16px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ch-muted);
}

.ch-filter-panel .ch-field {
    margin-bottom: 14px;
}

.ch-filter-panel label,
.ch-public .dash-label {
    display: block;
    margin-bottom: 6px;
    font-size: .68rem;
    font-weight: 700;
    color: var(--ch-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.ch-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: .8rem;
    color: var(--ch-muted);
}

.ch-results-head strong { color: var(--ch-text); }

/* ── Job detail: stacked editorial ── */
.ch-detail-hero {
    padding: 40px 0 32px;
    border-bottom: 1px solid var(--ch-line);
}

.ch-detail-hero__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
}

.ch-detail-mark {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(129, 140, 248, .15);
    font-family: var(--ch-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ch-accent-2);
}

.ch-detail-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    padding-top: 32px;
    align-items: start;
}

.ch-prose {
    color: #b8bfd4;
    font-size: .9rem;
    line-height: 1.75;
}

.ch-prose h1, .ch-prose h2, .ch-prose h3 { color: var(--ch-text); margin: 1.2em 0 .5em; }
.ch-prose p { margin: .6em 0; }
.ch-prose ul, .ch-prose ol { margin: .6em 0 .6em 1.2em; }

.ch-spec {
    padding: 22px;
    border: 1px solid var(--ch-line);
    border-radius: 14px;
    background: var(--ch-surface);
    position: sticky;
    top: 24px;
}

.ch-spec dl { margin: 0; }

.ch-spec > dl > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ch-line);
    font-size: .78rem;
}

.ch-spec dt { color: var(--ch-muted); margin: 0; }
.ch-spec dd { margin: 0; font-weight: 600; text-align: right; color: var(--ch-text); }
.ch-spec a { color: var(--ch-accent) !important; text-decoration: none; }

.ch-spec a.ch-btn--solid {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.ch-notice {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    font-size: .8rem;
}

.ch-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--ch-muted);
}

.ch-empty h3 { margin: 0 0 8px; color: var(--ch-text); font-size: 1.1rem; }

/* ── Jobseeker: stepped form ── */
.ch-form-page {
    max-width: 720px;
}

.ch-step {
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--ch-line);
}

.ch-step:last-of-type { border-bottom: none; }

.ch-step__num {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #ecfdf5;
    color: var(--ch-accent-hover);
    font-size: .7rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.ch-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ch-field { margin-bottom: 14px; }

.ch-public .dash-error { color: #dc2626; font-size: .72rem; margin-top: 6px; }
.ch-public .dash-hint { color: var(--ch-muted); font-size: .72rem; line-height: 1.6; }

.ch-public [x-data^="jobg8Lookup"] > label {
    display: block;
    margin-bottom: 6px;
    font-size: .68rem;
    font-weight: 700;
    color: var(--ch-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.ch-public [x-data^="jobg8Lookup"] > input[type="text"] {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--ch-line);
    border-radius: 10px;
    background: var(--ch-bg-2);
    color: var(--ch-text);
    font-size: .84rem;
}

.ch-public [x-data^="jobg8Lookup"] > ul {
    border: 1px solid var(--ch-line-strong);
    border-radius: 10px;
    background: var(--ch-surface-2);
    box-shadow: 0 16px 40px rgba(0,0,0,.4);
}

.ch-public [x-data^="jobg8Lookup"] > ul button {
    color: var(--ch-muted);
    background: transparent;
}

.ch-public [x-data^="jobg8Lookup"] > ul button:hover {
    color: var(--ch-text);
    background: #f0fdfa;
}

.ch-public [x-data^="jobg8Lookup"] > div span.rounded-full {
    border-color: #99f6e4;
    color: var(--ch-accent-hover);
    background: #ecfdf5;
}

.ch-pagination { margin-top: 24px; }

.ch-public nav[role="navigation"] a,
.ch-public nav[role="navigation"] span {
    border-color: var(--ch-line) !important;
    background: var(--ch-surface) !important;
    color: var(--ch-muted) !important;
}

/* ── Footer minimal bar ── */
.ch-foot {
    padding: 20px 28px;
    border-top: 1px solid var(--ch-line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: .7rem;
    color: var(--ch-muted);
}

.ch-foot a { color: var(--ch-muted) !important; text-decoration: none; }
.ch-foot a:hover { color: var(--ch-accent) !important; }

/* ── Brand logo in rail context ── */
.brand-logo__text {
    font-family: var(--ch-display);
    font-weight: 800;
    color: var(--ch-text);
}

.brand-logo__accent { color: var(--ch-accent); }

.ch-reveal {
    opacity: 1;
    transform: none;
    transition: opacity .6s ease, transform .6s ease;
}

.ch-reveal.ch-reveal--animate {
    opacity: 0;
    transform: translateY(16px);
}

.ch-reveal.ch-reveal--animate.is-visible { opacity: 1; transform: none; }

/* ── CareersHunts access screen ── */
.ch-auth-page {
    min-height: 100vh;
    margin: 0;
    color: var(--ch-text);
    background: var(--ch-bg);
    font-family: var(--ch-font);
}

.ch-access {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.ch-access::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(15, 23, 42, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .03) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

.ch-access__glow {
    position: fixed;
    top: -20rem;
    left: 50%;
    width: 60rem;
    height: 38rem;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 70, 229, .08), transparent 65%);
    transform: translateX(-50%);
}

.ch-access__nav {
    position: relative;
    z-index: 2;
    width: min(100% - 40px, 1120px);
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--ch-line);
}

.ch-access__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ch-text) !important;
    font-family: var(--ch-display);
    font-size: .95rem;
    font-weight: 800;
    text-decoration: none;
}

.ch-access__brand span span { color: var(--ch-accent); }

.ch-access__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ch-muted) !important;
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none;
}

.ch-access__back:hover { color: var(--ch-accent) !important; }

.ch-access__main {
    position: relative;
    z-index: 1;
    width: min(100% - 40px, 1120px);
    min-height: calc(100vh - 138px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 440px) minmax(300px, 1fr);
    gap: clamp(50px, 9vw, 130px);
    align-items: center;
    padding: 58px 0 78px;
}

.ch-access__panel {
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid var(--ch-line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .08);
}

.ch-access__label {
    margin: 0 0 9px;
    color: var(--ch-accent);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.ch-access__title {
    margin: 0;
    color: var(--ch-text);
    font-family: var(--ch-display);
    font-size: clamp(1.8rem, 4vw, 2.35rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
}

.ch-access__subtitle {
    margin: 12px 0 0;
    color: var(--ch-muted);
    font-size: .82rem;
    line-height: 1.65;
}

.ch-access-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.ch-access-field {
    min-width: 0;
}

.ch-access-field .dash-label {
    display: block;
    margin: 0 0 7px;
    color: var(--ch-muted);
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ch-access-field .dash-input {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--ch-line);
    border-radius: 10px;
    color: var(--ch-text);
    background: #ffffff;
    font-family: var(--ch-font);
    font-size: .85rem;
    outline: none;
}

.ch-access-field .dash-input:focus {
    border-color: var(--ch-accent);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .1);
}

.ch-access-field .dash-input::placeholder { color: #94a3b8; }

.ch-access .jmp-password-field {
    position: relative;
    width: 100%;
}

.ch-access .jmp-password-field__input { padding-right: 46px !important; }

.ch-access .jmp-password-field__toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: var(--ch-muted);
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.ch-access .jmp-password-field__icon { width: 18px; height: 18px; }

.ch-access__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 34px;
}

.ch-access__remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ch-muted);
    font-size: .75rem;
    cursor: pointer;
}

.ch-access__remember input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--ch-accent);
}

.ch-access .ui-btn-primary {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    background: var(--ch-accent);
    font-family: var(--ch-font);
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s, background .15s;
}

.ch-access .ui-btn-primary:hover {
    background: var(--ch-accent-hover);
    transform: translateY(-1px);
}

.ch-access__aside {
    min-width: 0;
}

.ch-access__aside-label {
    margin: 0;
    color: var(--ch-muted);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.ch-access__headline {
    max-width: 560px;
    margin: 16px 0 0;
    font-family: var(--ch-display);
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    font-weight: 800;
    line-height: .94;
    letter-spacing: -.055em;
}

.ch-access__headline span { color: var(--ch-accent); }

.ch-access__copy {
    max-width: 470px;
    margin: 20px 0 0;
    color: var(--ch-muted);
    font-size: .9rem;
    line-height: 1.75;
}

.ch-access__preview {
    margin-top: 34px;
    border: 1px solid var(--ch-line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--ch-surface);
}

.ch-access__preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ch-line);
    color: var(--ch-muted);
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ch-access__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ch-accent);
}

.ch-access__live::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ch-accent);
    box-shadow: 0 0 10px var(--ch-accent);
}

.ch-access__preview-row {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
}

.ch-access__preview-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--ch-accent-2);
    background: rgba(129, 140, 248, .12);
    font-size: .72rem;
    font-weight: 800;
}

.ch-access__preview-title {
    margin: 0;
    color: var(--ch-text);
    font-size: .78rem;
    font-weight: 700;
}

.ch-access__preview-meta {
    margin: 3px 0 0;
    color: var(--ch-muted);
    font-size: .66rem;
}

.ch-access__preview-tag {
    padding: 5px 8px;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    color: var(--ch-accent-hover);
    font-size: .6rem;
    font-weight: 700;
    background: #f0fdfa;
}

.ch-access__footer {
    position: relative;
    z-index: 2;
    width: min(100% - 40px, 1120px);
    margin: 0 auto;
    padding: 19px 0;
    border-top: 1px solid var(--ch-line);
    color: var(--ch-muted);
    font-size: .67rem;
}

.ch-access .dash-error,
.ch-access .text-red-600 {
    margin-top: 6px;
    color: #dc2626 !important;
    font-size: .72rem;
}

.ch-access__alert {
    margin: 18px 0 0;
    padding: 11px 13px;
    border: 1px solid #fecaca;
    border-radius: 9px;
    color: #b91c1c;
    background: #fef2f2;
    font-size: .75rem;
}

@media (max-width: 820px) {
    .ch-access__main {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 48px;
        padding-top: 38px;
    }

    .ch-access__aside {
        grid-row: 1;
    }

    .ch-access__panel {
        grid-row: 2;
    }

    .ch-access__headline {
        font-size: clamp(2.2rem, 12vw, 3.6rem);
    }
}

@media (max-width: 520px) {
    .ch-access__nav,
    .ch-access__main,
    .ch-access__footer {
        width: min(100% - 24px, 1120px);
    }

    .ch-access__main { padding-top: 28px; }
    .ch-access__panel { padding: 22px 17px; }
    .ch-access__preview-row { grid-template-columns: 36px 1fr; }
    .ch-access__preview-tag { display: none; }
}

/* ── Mobile: rail becomes drawer ── */
@media (max-width: 900px) {
    .ch-app__frame {
        grid-template-columns: 1fr;
    }

    .ch-rail {
        position: fixed;
        z-index: 101;
        left: 0;
        top: 0;
        height: 100vh;
        height: 100dvh;
        width: min(280px, 88vw);
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 8px 0 40px rgba(15, 23, 42, .12);
        pointer-events: auto;
    }

    .ch-rail.is-open { transform: translateX(0); }

    .ch-rail__link span,
    .ch-rail__name,
    .ch-rail__logout span { display: inline; }

    .ch-rail__link {
        justify-content: flex-start;
        pointer-events: auto;
        touch-action: manipulation;
    }

    .ch-rail__brand { flex-direction: row; align-items: center; }

    .ch-rail__cta .ch-rail__link { justify-content: flex-start; }

    .ch-rail__logout { justify-content: flex-start; }

    .ch-topbar { display: flex; }

    .ch-rail-backdrop {
        position: fixed;
        inset: 0;
        z-index: 100;
        background: rgba(15, 23, 42, .25);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .25s, visibility .25s;
    }

    .ch-rail-backdrop.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.ch-rail-open { overflow: hidden; }

    body.ch-rail-open .ch-app__frame {
        position: relative;
        z-index: 101;
    }

    .ch-page { padding: 20px 16px 60px; }

    .ch-browse { grid-template-columns: 1fr; }

    .ch-filter-panel { position: static; }

    .ch-detail-body { grid-template-columns: 1fr; }

    .ch-spec { position: static; }

    .ch-job-row {
        grid-template-columns: 40px 1fr;
    }

    .ch-job-row__tags {
        grid-column: 1 / -1;
        justify-content: flex-start;
        margin-top: 8px;
    }

    .ch-command__row { flex-direction: column; }

    .ch-form-grid { grid-template-columns: 1fr; }

    .ch-stat-strip__item { border-right: none; border-bottom: 1px solid var(--ch-line); }
    .ch-stat-strip__item:last-child { border-bottom: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ch-reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* User portal + public pages on phones */
@media (max-width: 767px) {
    .ch-public .dash-page.user-page .admin-hero { padding: 1rem; }
    .ch-public .dash-page.user-page .admin-hero__title { font-size: 1.35rem; }
    .ch-public .dash-page .dash-filter-row { gap: 0.5rem; }
    .ch-public .dash-page form.jmp-card { flex-direction: column; align-items: stretch !important; }
    .ch-foot {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px;
    }
    .ch-command__filters { grid-template-columns: 1fr; }
    .ch-block__head { flex-direction: column; align-items: flex-start; }
}
