:root {
    color-scheme: light;
    --role-ink: #0f172a;
    --role-muted: #475569;
    --role-border: rgba(15, 23, 42, 0.08);
    --role-panel: rgba(255, 255, 255, 0.86);
    --role-shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
    --role-sky: #0ea5e9;
    --role-emerald: #10b981;
    --role-amber: #f59e0b;
    --role-mint: #14b8a6;
}

body.role-page {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", "Sora", "Segoe UI", sans-serif;
    color: var(--role-ink);
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 45%, #ecfdf3 100%);
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.role-nav {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 3;
    display: flex;
    gap: 0.75rem;
}

.icon-button {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--role-border);
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.icon-button:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 23, 42, 0.18);
    color: #0f172a;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.16);
}

.icon-button:focus-visible {
    outline: 2px solid rgba(14, 165, 233, 0.6);
    outline-offset: 3px;
}

.icon-button--signin {
    border-color: rgba(16, 185, 129, 0.35);
    background: #ecfdf5;
    color: #047857;
}

.icon {
    display: block;
    width: 20px;
    height: 20px;
}

.role-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.bg-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(70px);
    opacity: 0.6;
    animation: float 16s ease-in-out infinite;
}

.bg-orb--sky {
    width: 340px;
    height: 340px;
    background: rgba(56, 189, 248, 0.5);
    top: -120px;
    left: -80px;
    animation-delay: -2s;
}

.bg-orb--mint {
    width: 280px;
    height: 280px;
    background: rgba(16, 185, 129, 0.4);
    top: 90px;
    right: 80px;
    animation-delay: -5s;
}

.bg-orb--amber {
    width: 260px;
    height: 260px;
    background: rgba(245, 158, 11, 0.35);
    bottom: -120px;
    left: 120px;
    animation-delay: -8s;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.14), transparent 30%),
        radial-gradient(circle at 80% 0%, rgba(16, 185, 129, 0.18), transparent 24%),
        radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.12), transparent 24%);
    opacity: 0.9;
}

.role-main {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(2.5rem, 3vw, 4rem) 1.5rem 4.5rem;
}

.role-panel {
    background: var(--role-panel);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: var(--role-shadow);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    animation: fade-up 0.8s ease both;
}

.role-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}

.role-hero__content {
    flex: 1 1 520px;
    min-width: 280px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    background: #ecfdf5;
    color: #047857;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.role-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--role-emerald);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.15);
    animation: pulse 1.8s ease-out infinite;
}

.role-title {
    margin: 1.2rem 0 0;
    font-size: clamp(2.1rem, 1.3rem + 2.6vw, 3.2rem);
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.role-subtitle {
    margin: 1rem 0 0;
    max-width: 40rem;
    color: var(--role-muted);
    font-size: 1.05rem;
}

.role-steps {
    margin-top: 1.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.step-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    min-width: 220px;
}

.step-card--primary {
    background: #0f172a;
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.18);
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(15, 23, 42, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
}

.step-icon .icon {
    width: 18px;
    height: 18px;
}

.step-icon--primary {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.35);
    color: #d1fae5;
}

.step-icon--amber {
    background: #fef3c7;
    border-color: #fde68a;
    color: #d97706;
}

.step-label {
    margin: 0;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #a7f3d0;
}

.step-label--muted {
    color: #94a3b8;
}

.step-text {
    margin: 0.15rem 0 0;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-card {
    flex: 0 1 300px;
    border-radius: 26px;
    padding: 1.6rem;
    background: linear-gradient(135deg, #0f172a 0%, #111827 48%, #0f172a 100%);
    color: #f8fafc;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.25);
    position: relative;
    overflow: hidden;
    animation: fade-up 0.8s ease both;
    animation-delay: 0.1s;
}

.status-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.15), transparent 50%);
    opacity: 0.6;
}

.status-card > * {
    position: relative;
    z-index: 1;
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #e2e8f0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #a7f3d0;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #34d399;
    box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.2);
    animation: pulse 1.8s ease-out infinite;
}

.status-list {
    margin-top: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #f1f5f9;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
}

.status-badge {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.status-highlight {
    color: #a7f3d0;
    font-weight: 600;
}

.status-highlight--sky {
    color: #bae6fd;
}

.role-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.role-card {
    position: relative;
    padding: 1.5rem;
    border-radius: 22px;
    border: 1px solid var(--role-border);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: fade-up 0.8s ease both;
}

.role-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
}

.role-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, var(--accent-glow), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.role-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-border);
    box-shadow: 0 26px 55px rgba(15, 23, 42, 0.16);
}

.role-card:hover::after {
    opacity: 1;
}

.role-card:focus-visible {
    outline: 2px solid rgba(14, 165, 233, 0.6);
    outline-offset: 3px;
}

.role-card--student {
    --accent-1: #0ea5e9;
    --accent-2: #10b981;
    --accent-3: #06b6d4;
    --accent-glow: rgba(14, 165, 233, 0.18);
    --accent-border: rgba(14, 165, 233, 0.25);
    --accent-soft: rgba(14, 165, 233, 0.12);
    --accent-text: #0369a1;
}

.role-card--agency {
    --accent-1: #10b981;
    --accent-2: #14b8a6;
    --accent-3: #0ea5e9;
    --accent-glow: rgba(16, 185, 129, 0.18);
    --accent-border: rgba(16, 185, 129, 0.25);
    --accent-soft: rgba(16, 185, 129, 0.12);
    --accent-text: #047857;
}

.role-card__top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.role-card__title {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.role-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--accent-border);
    background: var(--accent-soft);
    color: var(--accent-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.role-icon .icon {
    width: 24px;
    height: 24px;
}

.role-card__eyebrow {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    color: var(--accent-text);
}

.role-card__title-text {
    margin: 0.35rem 0 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #0f172a;
}

.role-chevron {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.role-card:hover .role-chevron {
    border-color: var(--accent-border);
    color: var(--accent-text);
    background: rgba(255, 255, 255, 0.95);
}

.role-card__body {
    position: relative;
    z-index: 1;
    margin: 1rem 0 0;
    color: var(--role-muted);
    font-size: 0.95rem;
}

.role-card__chips {
    position: relative;
    z-index: 1;
    margin-top: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.role-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--accent-border);
    background: rgba(255, 255, 255, 0.85);
    color: var(--accent-text);
    font-size: 0.75rem;
    font-weight: 600;
}

.role-card--student .role-chip {
    background: rgba(14, 165, 233, 0.12);
}

.role-card--student .role-chip--alt {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #047857;
}

.role-card--agency .role-chip {
    background: rgba(16, 185, 129, 0.12);
}

.role-card--agency .role-chip--alt {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.3);
    color: #0369a1;
}

.role-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(248, 250, 252, 0.75);
    color: var(--role-muted);
    font-size: 0.95rem;
    animation: fade-up 0.8s ease both;
    animation-delay: 0.2s;
}

.role-footer a {
    color: #047857;
    font-weight: 600;
    text-decoration: none;
}

.role-footer a:hover {
    text-decoration: underline;
}

.role-footer__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    font-size: 0.8rem;
    color: #475569;
}

.feature-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.feature-dot--emerald {
    background: var(--role-emerald);
}

.feature-dot--sky {
    background: var(--role-sky);
}

.role-card:nth-child(1) {
    animation-delay: 0.12s;
}

.role-card:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(20px, -25px, 0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.96);
        opacity: 0.8;
    }
    70% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.96);
        opacity: 0.8;
    }
}

@media (max-width: 960px) {
    .role-nav {
        top: 1rem;
        right: 1rem;
    }

    .role-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .status-card {
        width: 100%;
        flex: 1 1 auto;
    }
}

@media (max-width: 640px) {
    .role-steps {
        flex-direction: column;
    }

    .step-card {
        width: 100%;
    }

    .role-footer {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .role-panel,
    .role-card,
    .status-card,
    .role-footer,
    .bg-orb,
    .role-badge__dot,
    .status-dot {
        animation: none;
    }

    .icon-button,
    .role-card,
    .role-chevron {
        transition: none;
    }
}
