h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNj YuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

@font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/fraunces-500.ttf") format("truetype");
}

@font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/fraunces-600.ttf") format("truetype");
}

@font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/fraunces-700.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/inter-400.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/inter-500.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/inter-600.ttf") format("truetype");
}

:root {
    --primary-color: #1F4E45;
    --primary-hover: #173D36;
    --primary-light: #E3EFEC;
    --primary-subtle: #F1F6F4;

    --secondary-color: #2C6B5F;
    --secondary-hover: #1F4E45;
    --secondary-light: #E3EFEC;

    --accent-color: #D97A5B;
    --accent-hover: #B85C3F;
    --accent-light: #F5E3DD;
    --gold-color: #E0B24D;
    --gold-light: #FBF1DD;
    --sage-color: #5B8A6B;
    --sage-light: #E6ECE1;

    --action-ask-bg: #FEF3D9;
    --action-ask-icon: #8A5E10;
    --action-explore-bg: #E3EFEC;
    --action-explore-icon: #2C6B5F;
    --action-combined-bg: #F7E3DA;
    --action-combined-icon: #B85C3F;

    /* Semantic colors */
    --success-color: #5B8A6B;
    --success-light: #E6ECE1;
    --warning-color: #B86B18;
    --warning-light: #FFF0D6;
    --error-color: #C64E45;
    --error-light: #FBE7E3;
    --info-color: #356F8A;
    --info-light: #E4F0F4;

    /* Neutral palette */
    --text-primary: #2E2C28;
    --text-secondary: #63605A;
    --text-muted: #63605A;
    --bg-primary: #FAF8F3;
    --bg-secondary: #F3F1EA;
    --bg-tertiary: #F6F4EE;
    --bg-card: #FAF8F3;
    --surface-color: #FAF8F3;
    --background-color: #F3F1EA;
    --border-color: #E2DED3;
    --border-light: #EBE7DD;

    /* Type and interaction */
    --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
    --font-display: "Fraunces", Georgia, serif;
    --font-size-body: 1rem;
    --font-size-small: .875rem;
    --touch-target: 44px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(46, 44, 40, 0.035);
    --shadow-sm: 0 2px 8px rgba(46, 44, 40, 0.045);
    --shadow-md: 0 4px 12px rgba(46, 44, 40, 0.065);
    --shadow-lg: 0 8px 24px rgba(46, 44, 40, 0.085);
    --shadow-xl: 0 16px 48px rgba(46, 44, 40, 0.12);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
    text-wrap: balance;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent-color) 70%, white);
    outline-offset: 3px;
}

/* When the Maya session page is rendered, suppress body scroll so the only
   scroll containers are the chat (inside .maya-canvas-col) and the notebook
   (inside .maya-notebook-wrap). Eliminates the "third scrollbar" the user
   was seeing on wide screens. Uses :has() — supported in all modern browsers. */
body:has(.maya-page) {
    overflow: hidden;
}

/* Login page: same cream, forest and serif theme as Home (#30). The sign-in card comes first in
   the markup so phones see the buttons first; wide screens show the features beside it. */
.login-container {
    position: relative;
    min-height: calc(100dvh - 68px);
    padding: clamp(1.5rem, 5vw, 4rem) 1.25rem;
    overflow: hidden;
    background: var(--bg-secondary);
}

.login-glow {
    position: absolute;
    width: 30rem;
    height: 30rem;
    border-radius: 50%;
    filter: blur(110px);
    opacity: .65;
    pointer-events: none;
}

.login-glow-left { top: -15rem; left: 8%; background: var(--action-ask-bg); }
.login-glow-right { top: -8rem; right: 10%; background: var(--action-combined-bg); }

.login-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas: "features card";
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    max-width: 1050px;
    margin: 0 auto;
}

.login-card {
    grid-area: card;
    padding: 2rem 1.75rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-card);
    box-shadow: 0 16px 40px rgba(29, 37, 31, .08);
}

.login-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-header h1 {
    margin-bottom: .4rem;
    font-size: clamp(1.6rem, 3vw, 2rem);
    line-height: 1.15;
    letter-spacing: -.02em;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
}

.login-btn {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast),
        box-shadow var(--transition-fast), transform var(--transition-fast);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.login-btn:active {
    transform: translateY(0);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Google is the main route: most students pick it (#30). */
.google-btn {
    min-height: 54px;
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    font-size: 1.0625rem;
    font-weight: 700;
}

.google-btn .btn-icon {
    padding: .3rem;
    border-radius: 6px;
    background: white;
}

.google-btn:hover {
    border-color: var(--primary-hover);
    background: var(--primary-hover);
}

.microsoft-btn {
    color: var(--text-secondary);
    font-size: .9375rem;
    font-weight: 500;
}

.microsoft-btn:hover {
    border-color: var(--secondary-color);
    background: var(--primary-subtle);
    color: var(--primary-color);
}

.login-trust {
    display: grid;
    gap: .35rem;
    margin: 1.25rem 0 0;
    padding: .85rem 1rem;
    border-radius: 12px;
    background: var(--sage-light);
    list-style: none;
    color: var(--text-primary);
    font-size: .875rem;
    line-height: 1.4;
}

.login-trust li {
    position: relative;
    padding-left: 1.5rem;
}

.login-trust li::before {
    content: "";
    position: absolute;
    top: .2rem;
    left: .1rem;
    width: .45rem;
    height: .75rem;
    border: solid var(--sage-color);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.login-parents {
    margin-top: .75rem;
    color: var(--text-secondary);
    font-size: .875rem;
    text-align: center;
}

.login-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: .8125rem;
    text-align: center;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: underline;
}

.login-features {
    grid-area: features;
}

.login-features h2 {
    margin-bottom: 1.5rem;
    font-size: clamp(1.75rem, 3.6vw, 2.6rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.04em;
}

.login-features ul {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.login-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg-card) 80%, transparent);
}

.login-feature h3 {
    margin-bottom: .2rem;
    font-size: 1.1rem;
}

.login-feature p {
    color: var(--text-secondary);
    font-size: .9rem;
    line-height: 1.5;
}

.login-feature-icon {
    display: grid;
    flex: 0 0 3rem;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border-radius: 14px;
}

.login-feature-icon svg {
    width: 1.6rem;
    height: 1.6rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-feature-icon.action-ask { color: var(--action-ask-icon); background: var(--action-ask-bg); }
.login-feature-icon.action-explore { color: var(--action-explore-icon); background: var(--action-explore-bg); }
.login-feature-icon.action-combined { color: var(--action-combined-icon); background: var(--action-combined-bg); }

/* The product name in the top bar logo's lettering (Inter, bold, green "u" and "ai"). */
.brand-name {
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-u,
.brand-ai {
    color: var(--primary-color);
}

/* /auth-callback: the same card while the sign-in finishes. */
.login-status-card {
    position: relative;
    z-index: 1;
    max-width: 420px;
    margin: clamp(2rem, 10vh, 6rem) auto 0;
    text-align: center;
}

.login-status-card .loading-spinner {
    margin: .5rem auto 1.25rem;
}

.login-status-card h1 {
    margin-bottom: .35rem;
    font-size: 1.6rem;
}

.login-status-card p {
    color: var(--text-secondary);
}

@media (max-width: 860px) {
    .login-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "card" "features";
        max-width: 480px;
    }

    .login-features h2 {
        font-size: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: .75rem .75rem 2rem;
    }

    .login-card {
        padding: 1.25rem .9rem 1.1rem;
    }

    .microsoft-btn {
        gap: .5rem;
        padding-inline: .75rem;
        font-size: .875rem;
    }

    .login-header {
        margin-bottom: 1rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-trust {
        margin-top: 1rem;
        padding: .7rem .85rem;
    }
}

.loading-container {
    text-align: center;
    margin-top: 1.5rem;
}

.loading-container p {
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* Home Page Styles */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 1rem;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.description {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-secondary);
}

.cta-section {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.cta-section h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Onboarding Styles */
.onboarding-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: width 0.3s ease;
}

.onboarding-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.step h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.step-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary, .btn-secondary, .btn-link {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-link {
    background: transparent;
    color: var(--primary-color);
    padding: 0.5rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
}

.profile-completion {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar-small {
    width: 150px;
    height: 6px;
    background: var(--border-color);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill-small {
    height: 100%;
    background: var(--success-color);
    transition: width 0.3s ease;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: var(--bg-card);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.card-content {
    padding: 1.5rem;
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.career-list {
    margin: 1rem 0;
}

.career-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.match-score {
    color: var(--success-color);
    font-weight: 600;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    background: #fee2e2;
    color: var(--error-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
