:root {
    --aio-blue: #1a73e8;
    --aio-blue-hover: #1557b0;
    --aio-blue-soft: #e8f0fe;
    --aio-surface: #ffffff;
    --aio-bg: #f8f9fa;
    --aio-text: #202124;
    --aio-muted: #5f6368;
    --aio-border: #dadce0;
    --aio-border-soft: #e8eaed;
    --aio-user-bubble: #f1f3f4;
    --aio-success-bg: #e6f4ea;
    --aio-success-text: #137333;
    --aio-error-bg: #fce8e6;
    --aio-error-text: #c5221f;
    --aio-radius-card: 12px;
    --aio-radius-control: 8px;
    --aio-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --aio-shadow-card: 0 1px 3px rgba(60, 64, 67, 0.12), 0 1px 2px rgba(60, 64, 67, 0.06);
    --aio-shadow-fab: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px rgba(60, 64, 67, 0.15);
}

* {
    box-sizing: border-box;
}

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

body.aio-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--aio-bg);
    color: var(--aio-text);
    font-family: "Google Sans", "Google Sans Text", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aio-shell {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--aio-surface);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

@media (min-width: 640px) {
    .aio-shell {
        width: 480px;
        height: min(720px, 92vh);
        height: min(720px, 92dvh);
        border: 1px solid var(--aio-border-soft);
        border-radius: var(--aio-radius-card);
        box-shadow: var(--aio-shadow-card);
    }
}

/* Header */
.aio-header {
    flex: 0 0 auto;
    min-height: 64px;
    padding: max(10px, env(safe-area-inset-top)) 16px 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--aio-surface);
    border-bottom: 1px solid var(--aio-border-soft);
}

.aio-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.aio-brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--aio-blue);
    background: var(--aio-surface);
    border: 1px solid var(--aio-border-soft);
    overflow: hidden;
}

.aio-brand-mark img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.aio-brand-copy {
    min-width: 0;
}

.aio-brand-copy h1 {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 500;
    letter-spacing: 0.1px;
    color: var(--aio-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aio-brand-copy p {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.3;
    color: var(--aio-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aio-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}

.aio-icon-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--aio-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s var(--aio-ease), color 0.15s var(--aio-ease);
}

.aio-icon-btn:hover {
    background: var(--aio-bg);
    color: var(--aio-text);
}

.aio-icon-btn:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.45);
    outline-offset: 2px;
}

/* Progress */
.aio-progress-track {
    flex: 0 0 auto;
    height: 4px;
    width: 100%;
    background: var(--aio-border-soft);
    overflow: hidden;
}

.aio-progress-fill {
    height: 100%;
    width: 0;
    background: var(--aio-blue);
    transition: width 0.3s var(--aio-ease);
}

.aio-mode-login .aio-progress-track,
.aio-mode-apply .aio-progress-track,
.aio-mode-menu .aio-progress-track {
    visibility: hidden;
}

/* Body */
.aio-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px 18px 20px;
    background: var(--aio-bg);
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 1;
    transition: opacity 0.2s var(--aio-ease);
    scroll-behavior: smooth;
}

@media (min-width: 640px) {
    .aio-body {
        padding: 32px 24px 24px;
    }
}

/* Messages */
.aio-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    animation: aio-fade-in 0.2s var(--aio-ease) both;
}

.aio-msg-ai {
    justify-content: flex-start;
}

.aio-msg-user {
    justify-content: flex-end;
}

.aio-avatar {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--aio-blue);
    background: var(--aio-blue-soft);
    margin-top: 1px;
}

.aio-avatar svg {
    display: block;
}

.aio-bubble {
    max-width: min(86%, 360px);
    font-size: 15px;
    line-height: 1.55;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.aio-msg-ai .aio-bubble {
    padding: 2px 0;
    color: var(--aio-text);
    background: transparent;
    border: 0;
    border-radius: 0;
}

.aio-msg-user .aio-bubble {
    padding: 10px 15px;
    color: var(--aio-text);
    background: var(--aio-user-bubble);
    border-radius: 18px 18px 4px 18px;
    white-space: pre-wrap;
}

.aio-bubble strong {
    font-weight: 600;
}

.aio-bubble a {
    color: var(--aio-blue);
    text-decoration: none;
}

.aio-bubble a:hover {
    text-decoration: underline;
}

.aio-bubble--notice {
    padding: 12px 16px !important;
    border-radius: 8px !important;
    font-size: 14px;
}

.aio-bubble--error {
    background: var(--aio-error-bg) !important;
    color: var(--aio-error-text) !important;
    border: 1px solid #f5c6c2 !important;
}

.aio-bubble--success {
    background: var(--aio-success-bg) !important;
    color: var(--aio-success-text) !important;
    border: 1px solid #b7dfc2 !important;
    font-weight: 500;
}

.aio-bubble--muted {
    color: var(--aio-muted);
    font-size: 13px;
}

/* Widgets */
.aio-widget {
    width: 100%;
    padding-left: 38px;
    animation: aio-fade-in 0.2s var(--aio-ease) both;
}

.aio-widget--full {
    padding-left: 0;
}

.aio-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

/* =========================================================
   MENU-STATUS-V2 — AI Apply menu: status strip + 2-col grid
   Material 3 red/green status tokens shared with the dashboard.
   ========================================================= */
.aio-status-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-bottom: 4px;
}

.aio-status-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: default;
}

button.aio-status-pill { cursor: pointer; }

.aio-status-pill__label { font-weight: 600; opacity: 0.85; }
.aio-status-pill strong { font-weight: 800; }

.aio-status-pill--profile {
    background: #e8f0fe;
    border-color: #1a73e8;
    color: #174ea6;
}

.aio-status-pill--red {
    background: #fce8e6;
    border-color: #f6c4bf;
    color: #a50e0e;
}

.aio-status-pill--green {
    background: #e6f4ea;
    border-color: #a8dab5;
    color: #137333;
}

/* 2-column quick links (Dashboard / View profile / Ask / Site links) */
.aio-chips--grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.aio-chips--grid .aio-chip {
    justify-content: center;
    text-align: center;
    font-size: 13px;
    padding: 10px 12px;
}

@media (max-width: 480px) {
    .aio-status-strip { grid-template-columns: 1fr; }
    .aio-chips--grid { grid-template-columns: 1fr; }
}


.aio-chip {
    min-height: 40px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--aio-border);
    background: var(--aio-surface);
    color: var(--aio-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s var(--aio-ease), border-color 0.15s var(--aio-ease), transform 0.15s var(--aio-ease);
    text-align: left;
    text-decoration: none;
}

.aio-chip:hover {
    background: var(--aio-bg);
    transform: scale(1.02);
}

.aio-chip:active {
    transform: scale(0.98);
}

.aio-chip:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.4);
    outline-offset: 2px;
}

.aio-chip.is-selected {
    background: var(--aio-blue);
    border-color: var(--aio-blue);
    color: #ffffff;
}

.aio-chip--primary {
    background: var(--aio-blue);
    border-color: var(--aio-blue);
    color: #ffffff;
}

.aio-chip--primary:hover {
    background: var(--aio-blue-hover);
    border-color: var(--aio-blue-hover);
}

.aio-chip--ghost {
    color: var(--aio-blue);
    border-color: transparent;
    background: transparent;
    padding-left: 12px;
    padding-right: 12px;
}

.aio-chip--ghost:hover {
    background: var(--aio-blue-soft);
}

.aio-chip--google {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.aio-chip--google svg {
    flex: 0 0 18px;
}

.aio-chip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.aio-inline-link {
    border: 0;
    background: transparent;
    color: var(--aio-blue);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 0;
    cursor: pointer;
    text-decoration: none;
}

.aio-inline-link:hover {
    text-decoration: underline;
}

/* Cards */
.aio-card {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--aio-border-soft);
    border-radius: var(--aio-radius-card);
    background: var(--aio-surface);
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.04);
}

.aio-card-title {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--aio-text);
}

.aio-card-sub {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--aio-muted);
}

.aio-card-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
    font-size: 13px;
    line-height: 1.45;
}

.aio-card-row dt {
    color: var(--aio-muted);
    flex: 0 0 auto;
}

.aio-card-row dd {
    margin: 0;
    color: var(--aio-text);
    text-align: right;
    font-weight: 500;
}

.aio-card-divider {
    height: 1px;
    background: var(--aio-border-soft);
    margin: 10px 0;
}

/* Location result */
.aio-location-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--aio-radius-card);
    background: var(--aio-blue-soft);
    border: 1px solid #d2e3fc;
    width: 100%;
}

.aio-location-pin {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--aio-blue);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.aio-location-copy {
    min-width: 0;
}

.aio-location-copy strong {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    color: #174ea6;
}

.aio-location-copy span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.4;
    color: #3c4043;
}

/* Job summary */
.aio-job-card {
    width: 100%;
    border: 1px solid var(--aio-border-soft);
    border-radius: var(--aio-radius-card);
    background: var(--aio-surface);
    overflow: hidden;
}

.aio-job-head {
    padding: 14px 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    border-bottom: 1px solid var(--aio-border-soft);
}

.aio-job-head h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--aio-text);
}

.aio-job-head p {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--aio-muted);
}

.aio-job-body {
    padding: 10px 16px 12px;
}

.aio-job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.aio-tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--aio-bg);
    color: var(--aio-muted);
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
}

/* Cover letter preview */
.aio-preview {
    width: 100%;
    padding: 16px;
    border-radius: var(--aio-radius-card);
    background: #fbfbfb;
    border: 1px solid var(--aio-border-soft);
    font-size: 14px;
    line-height: 1.65;
    color: var(--aio-text);
    white-space: pre-wrap;
}

.aio-edit-box {
    width: 100%;
    margin-top: 12px;
}

.aio-textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    padding: 12px 14px;
    border: 1px solid var(--aio-border);
    border-radius: var(--aio-radius-control);
    background: var(--aio-surface);
    color: var(--aio-text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.55;
    outline: none;
}

.aio-textarea:focus {
    border-color: var(--aio-blue);
    box-shadow: 0 0 0 1px var(--aio-blue);
}

/* Success */
.aio-success-card {
    width: 100%;
    padding: 22px 20px;
    border-radius: var(--aio-radius-card);
    background: var(--aio-success-bg);
    border: 1px solid #b7dfc2;
    text-align: center;
}

.aio-success-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--aio-success-text);
    display: flex;
    align-items: center;
    justify-content: center;
}

.aio-success-card h3 {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--aio-success-text);
}

.aio-success-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #1e6b34;
}

.aio-success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

/* Typing indicator */
.aio-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    padding: 2px 0;
}

.aio-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--aio-blue);
    animation: aio-dot 1.4s infinite both;
}

.aio-typing span:nth-child(2) {
    animation-delay: 0.16s;
}

.aio-typing span:nth-child(3) {
    animation-delay: 0.32s;
}

/* Footer */
.aio-footer {
    flex: 0 0 auto;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    background: var(--aio-surface);
    border-top: 1px solid var(--aio-border-soft);
}

.aio-footer.is-hidden {
    display: none;
}

.aio-composer {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.aio-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    padding: 0 18px;
    border-radius: 24px;
    border: 1px solid var(--aio-border);
    background: var(--aio-bg);
    color: var(--aio-text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.3;
    outline: none;
    transition: background-color 0.15s var(--aio-ease), border-color 0.15s var(--aio-ease), box-shadow 0.15s var(--aio-ease);
}

.aio-input::placeholder {
    color: #80868b;
}

.aio-input:focus {
    background: var(--aio-surface);
    border-color: var(--aio-blue);
    box-shadow: 0 0 0 1px var(--aio-blue);
}

.aio-input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.aio-send {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--aio-blue);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s var(--aio-ease), transform 0.1s var(--aio-ease);
}

.aio-send:hover {
    background: var(--aio-blue-hover);
}

.aio-send:active {
    transform: scale(0.95);
}

.aio-send:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.45);
    outline-offset: 2px;
}

.aio-send:disabled {
    background: #9aa0a6;
    cursor: not-allowed;
}

.aio-send.is-loading svg {
    display: none;
}

.aio-send.is-loading::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    animation: aio-spin 0.8s linear infinite;
}

.aio-footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 6px 0;
    min-height: 20px;
}

.aio-forgot {
    color: var(--aio-muted);
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}

.aio-forgot:hover {
    color: var(--aio-blue);
    text-decoration: underline;
}

.aio-disclaimer {
    color: #80868b;
    font-size: 11px;
    line-height: 1.3;
    text-align: right;
}

.aio-mode-profile .aio-forgot,
.aio-mode-apply .aio-forgot,
.aio-mode-menu .aio-forgot {
    display: none;
}

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

/* Separate Google-blue launcher. The existing AI widget is intentionally untouched. */
.aio-fab {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: #1a73e8;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px rgba(60, 64, 67, 0.15);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 9999;
    font-size: 24px;
}

.aio-fab:hover {
    background: #1557b0;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 8px 16px rgba(60, 64, 67, 0.2);
}

.aio-fab:active {
    transform: translateY(-50%) scale(0.98);
}

.aio-fab:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.5);
    outline-offset: 3px;
}

.aio-fab__tip {
    position: absolute;
    left: 68px;
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    padding: 6px 10px;
    border-radius: 4px;
    background: #202124;
    color: #ffffff;
    font-family: "Google Sans", Roboto, Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s var(--aio-ease), transform 0.15s var(--aio-ease);
}

.aio-fab:hover .aio-fab__tip,
.aio-fab:focus-visible .aio-fab__tip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 640px) {
    .aio-fab {
        width: 48px;
        height: 48px;
        left: 12px;
        font-size: 20px;
    }

    .aio-fab__tip {
        display: none;
    }
}

/* Animations */
@keyframes aio-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes aio-dot {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.9); }
    40% { opacity: 1; transform: scale(1); }
}

@keyframes aio-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   Google-Style FAB (Left Center) — AI Onboarding
   ============================================================ */
.ai-onb-float-btn {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1a73e8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px rgba(60, 64, 67, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    cursor: pointer;
    border: none;
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
}

.ai-onb-float-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 8px 16px rgba(60, 64, 67, 0.2);
}

.ai-onb-float-btn:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.5);
    outline-offset: 3px;
}

.ai-onb-float-btn:active {
    transform: translateY(-50%) scale(0.98);
}

@media (max-width: 640px) {
    .ai-onb-float-btn {
        width: 48px;
        height: 48px;
        left: 12px;
    }
    .ai-onb-float-btn span {
        font-size: 20px !important;
    }
}

/* Google-style coloured action pills */
.aio-chip--success {
    background: #188038;
    border-color: #188038;
    color: #ffffff;
}

.aio-chip--success:hover {
    background: #137333;
    border-color: #137333;
}

.aio-chip--danger {
    background: #ffffff;
    border-color: #d93025;
    color: #d93025;
}

.aio-chip--danger:hover {
    background: #fce8e6;
    border-color: #d93025;
}

/* Teacher support link pills */
.aio-chip--link {
    color: #1557b0;
    background: #e8f0fe;
    border-color: #d2e3fc;
    font-weight: 500;
}

.aio-chip--link:hover {
    background: #d2e3fc;
    border-color: #aecbfa;
}

.aio-link-groups {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.aio-link-group h4 {
    margin: 0 0 7px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: var(--aio-muted);
    text-transform: uppercase;
}

/* ============================================================
   MENU BUTTON — top-left "back to main menu"
   ============================================================ */
.aio-menu-btn {
    color: var(--aio-blue);
}

.aio-menu-btn:hover {
    background: var(--aio-blue-soft);
    color: var(--aio-blue-hover);
}

/* ============================================================
   COMPOSER — send button always on the RIGHT
   ============================================================ */
.aio-composer {
    flex-direction: row;
    direction: ltr;
}

/* ============================================================
   PHOTO UPLOAD (B #15)
   ============================================================ */
.aio-photo-card {
    width: 100%;
    padding: 16px;
    border: 1px dashed var(--aio-border);
    border-radius: var(--aio-radius-card);
    background: var(--aio-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.aio-photo-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--aio-bg);
    border: 2px solid var(--aio-border-soft);
}

.aio-photo-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--aio-blue-soft);
    color: var(--aio-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.aio-photo-copy {
    font-size: 13px;
    line-height: 1.45;
    color: var(--aio-muted);
}

.aio-photo-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

/* ============================================================
   COVER LETTER PREVIEW (D #7) — shown before submitting
   ============================================================ */
.aio-cover-card {
    width: 100%;
    border: 1px solid #d2e3fc;
    border-radius: var(--aio-radius-card);
    background: #f8fbff;
    overflow: hidden;
}

.aio-cover-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: #174ea6;
    text-transform: uppercase;
}

.aio-cover-body {
    padding: 10px 16px 16px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--aio-text);
    white-space: pre-wrap;
}

.aio-cover-meta {
    padding: 0 16px 14px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--aio-muted);
}

/* ============================================================
   PROFILE SUMMARY / PUBLISH (B end)
   ============================================================ */
.aio-summary-card {
    width: 100%;
    padding: 18px;
    border: 1px solid var(--aio-border-soft);
    border-radius: var(--aio-radius-card);
    background: var(--aio-surface);
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.04);
}

.aio-summary-card h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--aio-text);
}

.aio-meter {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: var(--aio-border-soft);
    overflow: hidden;
    margin: 8px 0 6px;
}

.aio-meter-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--aio-blue);
    transition: width 0.3s var(--aio-ease);
}

.aio-meter-label {
    font-size: 12px;
    color: var(--aio-muted);
}

/* ============================================================
   CHIP VARIANTS for AI-generated suggestions
   ============================================================ */
.aio-chip--ai {
    background: #f3e8fd;
    border-color: #e0c8fb;
    color: #6b21a8;
    font-weight: 500;
}

.aio-chip--ai:hover {
    background: #e9d5ff;
    border-color: #d8b4fe;
}

/* ============================================================
   ASSIGNED CLASS FEEDBACK (E)
   ============================================================ */
.aio-class-card {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--aio-border-soft);
    border-radius: var(--aio-radius-card);
    background: var(--aio-surface);
}

.aio-class-card h4 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--aio-text);
}

.aio-class-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--aio-muted);
}

.aio-class-card + .aio-class-card {
    margin-top: 8px;
}

.aio-feedback-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

