:root {
    --bg: #f6f4f1;
    --card: #ffffff;
    --text: #1f2328;
    --muted: #6b6f76;
    --border: #e4e0da;
    --primary: #b4232a;
    --primary-dark: #8f1b21;
    --primary-soft: #fbeceb;
    --ok: #1a7f4b;
    --ok-soft: #e6f4ec;
    --warn: #9a6200;
    --warn-soft: #fff4dc;
    --error: #b42318;
    --error-soft: #fdecea;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
}

a { color: var(--primary); }
code { background: #f1eee9; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* Thanh trên cùng */
.topbar {
    display: flex; align-items: center; gap: 16px;
    padding: 10px 20px; background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff; border-radius: 8px;
    padding: 2px 8px; font-weight: 700; letter-spacing: 1px;
}
.brand-mark.big { font-size: 22px; padding: 6px 14px; margin-bottom: 12px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
    padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap;
}
.brand, .who { white-space: nowrap; }
.nav { min-width: 0; overflow-x: auto; }
@media (max-width: 1280px) {
    .brand span:not(.brand-mark) { display: none; }
    .who .badge { display: none; }
}
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.logout { margin: 0; }
.who { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.badge.badge-admin { background: var(--primary-soft); color: var(--primary); }

/* Tài khoản */
.user-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.user-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.user-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.user-table tr.is-off td { opacity: .55; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-form input, .inline-form select { width: auto; padding: 5px 8px; font-size: 13px; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.kb-readonly { white-space: pre-wrap; margin: 0; font: inherit; }

/* Thẻ con Kiến thức / Câu mẫu */
.subtabs { display: inline-flex; gap: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.subtabs a { padding: 6px 14px; border-radius: 7px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.subtabs a.active { background: var(--primary); color: #fff; }
.example-item { display: flex; flex-direction: column; gap: 8px; }
.example-q { margin: 0; }

/* Lưu câu mẫu ở trang soạn trả lời */
.option-actions { display: flex; gap: 6px; }
.star-editor { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.btn-star.saved { color: var(--ok); border-color: var(--ok); }

/* Lớp học */
.section-title { margin: 20px 0 10px; }
.class-card { padding: 14px 18px; }
.class-card.is-past { opacity: .7; }
.class-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.class-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; }
.class-edit { margin-top: 10px; }
.class-edit[open] summary { margin-bottom: 12px; }
.class-form { margin-top: 4px; }
.past-classes { margin-top: 20px; }
.past-classes > summary { font-weight: 600; margin-bottom: 10px; }

/* Bổ sung kiến thức */
.interview-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.iv-intro p { max-width: 720px; }
.iv-messages { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; word-break: break-word; }
.bubble-assistant { background: var(--bg); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble-user { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.proposal { border: 1px dashed var(--primary); background: #fffdfb; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.proposal-head { font-size: 13px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .3px; }
.iv-form { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.small-title { font-size: 14px; margin: 14px 0 6px; }
.gap-list { margin: 0 0 10px; padding-left: 18px; font-size: 14px; }
.ok-text { color: var(--ok); font-weight: 600; }
.error-text { color: var(--error); }

.container { max-width: 1280px; margin: 0 auto; padding: 20px 24px 40px; }

.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px;
}

/* Form */
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: #3b3f45; }
label.inline { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; }
input[type=text], input[type=password], input[type=url], input[type=number], select, textarea {
    width: 100%; font: inherit; color: var(--text);
    border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: #fff;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.narrow { max-width: 420px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
details summary { cursor: pointer; color: var(--muted); font-size: 14px; }
details[open] summary { margin-bottom: 8px; }

.btn {
    font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
    border: 1px solid var(--border); background: #fff; color: var(--text);
    padding: 8px 16px; border-radius: 8px; white-space: nowrap;
}
.btn:hover { background: var(--bg); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-danger-ghost { border-color: transparent; background: transparent; color: var(--error); }
.btn-danger-ghost:hover { background: var(--error-soft); }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-error { background: var(--error-soft); color: var(--error); }
.alert ul { margin: 6px 0; padding-left: 20px; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

/* Đăng nhập */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; text-align: center; padding: 32px; }
.auth-card form { text-align: left; margin-top: 18px; }

/* Trang soạn trả lời */
.chat-grid { display: grid; grid-template-columns: minmax(360px, 5fr) 7fr; gap: 16px; align-items: start; }
.chat-grid .card { margin-bottom: 16px; }
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.empty { color: var(--muted); padding: 36px 0; text-align: center; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 24px 0; }
.spinner {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--border); border-top-color: var(--primary);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.options { display: flex; flex-direction: column; gap: 12px; }
.option { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #fffdfb; }
.option-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.option-type { font-size: 13px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .4px; }
.option-text { white-space: pre-wrap; word-break: break-word; }
.btn-copy.copied { background: var(--ok); border-color: var(--ok); color: #fff; }
.note { margin-top: 12px; padding: 10px 14px; border-left: 3px solid var(--primary); background: var(--bg); border-radius: 0 8px 8px 0; font-size: 14px; }

.refine { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { font: inherit; font-size: 13px; cursor: pointer; border: 1px solid var(--border); background: #fff; border-radius: 99px; padding: 4px 12px; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.refine-row { display: flex; gap: 8px; }

.history { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.history-item {
    font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px;
    border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 8px 12px;
}
.history-item:hover { border-color: var(--primary); }
.history-text { font-size: 14px; }

/* Kho kiến thức */
.page-head { margin-bottom: 16px; }
.page-head p { max-width: 820px; margin: 4px 0 10px; }
.stats { display: flex; gap: 8px; }
.add-card summary { display: inline-block; list-style: none; color: #fff; }
.add-card summary::-webkit-details-marker { display: none; }
.add-card[open] summary { margin-bottom: 14px; }
.kb-item.is-off { opacity: .6; }
.kb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
input.kb-title { font-weight: 700; font-size: 16px; border-color: transparent; padding-left: 0; }
input.kb-title:hover, input.kb-title:focus { border-color: var(--border); padding-left: 10px; }
.badge { white-space: nowrap; }
.kb-foot { display: flex; align-items: center; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.sort-input { width: 80px !important; }
.spacer { flex: 1; }

/* Cài đặt */
.key-list { display: flex; flex-direction: column; gap: 10px; }
.key-item { display: flex; gap: 16px; align-items: center; justify-content: space-between; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.key-item.is-active { border-color: var(--ok); background: #fbfefc; }
.key-title { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.key-actions { display: flex; gap: 6px; align-items: center; }
.key-actions form { margin: 0; }
.key-test.ok { color: var(--ok); }
.key-test.error { color: var(--error); }

/* Học tập */
.study-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.study-answer { display: flex; flex-direction: column; gap: 6px; align-self: flex-start; max-width: 85%; }
.study-answer .bubble { max-width: 100%; }
.study-sources { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.source-chip { font-size: 12px; background: var(--primary-soft); color: var(--primary); border-radius: 99px; padding: 2px 10px; }
.study-note { font-style: italic; }
.study-mine { display: flex; flex-direction: column; gap: 6px; max-height: 560px; overflow-y: auto; }
.study-mine-item { border-bottom: 1px solid var(--border); padding: 6px 0; font-size: 14px; }
.study-mine-item summary { cursor: pointer; }
.study-mine-item pre { margin-top: 6px; }
.deck-progress { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; }
.deck-progress-item { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px solid var(--border); padding: 4px 0; }
.deck-progress-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-slides { display: flex; flex-direction: column; gap: 10px; max-height: 600px; overflow-y: auto; }
.deck-slide { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.deck-slide-no { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.card-highlight { border-color: var(--ok); background: #fbfefc; }
.nowrap { white-space: nowrap; }
.input-short { width: 90px !important; }
.row2.align-start { align-items: start; margin-bottom: 16px; }
.row2.align-start > .card { margin-bottom: 0; }
.deck-filter { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.deck-filter input { max-width: 360px; }
.deck-filter select { width: auto; }
.note-list { display: flex; flex-direction: column; gap: 8px; }
.note-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.note-item.is-off { opacity: .6; }
.note-item summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.note-item[open] summary { margin-bottom: 10px; }
.note-edit { margin-bottom: 8px; }
.source-chip.source-note { background: var(--ok-soft); color: var(--ok); }

/* ===== Trang Hỏi bài: phong cách "trợ lý AI" (chỉ áp dụng trong .study-ai) ===== */
.study-ai {
    --ai-violet: #7c3aed;
    --ai-blue: #2563eb;
    --ai-cyan: #06b6d4;
    --ai-grad: linear-gradient(135deg, #7c3aed 0%, #2563eb 55%, #06b6d4 100%);
    --ai-ink: #0f172a;
    --ai-soft: #eef2ff;
    --ai-line: rgba(99, 102, 241, .22);
}
.ai-hero {
    position: relative; overflow: hidden; border-radius: 18px; padding: 22px 26px; margin-bottom: 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    background: #0b1026; color: #e8ecff;
    box-shadow: 0 12px 40px rgba(37, 99, 235, .22);
}
.ai-hero-glow {
    position: absolute; inset: -40%; pointer-events: none;
    background:
        radial-gradient(circle at 20% 30%, rgba(124, 58, 237, .55), transparent 40%),
        radial-gradient(circle at 75% 20%, rgba(6, 182, 212, .45), transparent 38%),
        radial-gradient(circle at 60% 90%, rgba(37, 99, 235, .45), transparent 40%);
    animation: ai-drift 14s ease-in-out infinite alternate;
}
.ai-hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
    background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
}
@keyframes ai-drift { from { transform: translate(-3%, -2%) rotate(0deg); } to { transform: translate(3%, 2%) rotate(8deg); } }
.ai-hero-main, .ai-hero-side { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.ai-hero-side { flex-wrap: wrap; justify-content: flex-end; }
.ai-logo {
    width: 54px; height: 54px; border-radius: 16px; flex: none; display: grid; place-items: center;
    background: var(--ai-grad); font-weight: 800; font-size: 18px; color: #fff; letter-spacing: .5px;
    box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 0 28px rgba(124, 58, 237, .8);
    animation: ai-pulse 3s ease-in-out infinite;
}
@keyframes ai-pulse { 50% { box-shadow: 0 0 0 3px rgba(255,255,255,.18), 0 0 42px rgba(6, 182, 212, .9); } }
.ai-title { margin: 0; font-size: 22px; color: #fff; }
.ai-title-grad { background: linear-gradient(90deg, #a78bfa, #60a5fa, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-sub { margin: 4px 0 0; font-size: 13.5px; color: #b9c2e6; max-width: 620px; }
.ai-sub strong { color: #fff; }
.ai-pill {
    display: inline-flex; flex-direction: row; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 600;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #e8ecff;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ai-pill.is-empty { background: rgba(251, 191, 36, .2); border-color: rgba(251, 191, 36, .6); color: #fde68a; }
.study-ai .ai-level select {
    width: auto; padding: 3px 8px; border-radius: 8px; font-weight: 700; font-size: 13px;
    background: rgba(15, 23, 42, .6); color: #fff; border: 1px solid rgba(255,255,255,.3);
}
.study-ai .ai-level select option { color: #0f172a; background: #fff; }
.ai-level.is-saved { border-color: #34d399; box-shadow: 0 0 16px rgba(52, 211, 153, .6); }

.ai-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.ai-chat {
    position: relative; border-radius: 18px; padding: 20px; min-height: 460px; display: flex; flex-direction: column;
    background:
        radial-gradient(circle at 100% 0%, rgba(6, 182, 212, .08), transparent 35%),
        radial-gradient(circle at 0% 100%, rgba(124, 58, 237, .08), transparent 40%),
        #fff;
    border: 1px solid var(--ai-line);
    box-shadow: 0 8px 30px rgba(15, 23, 42, .06);
}
.ai-welcome { text-align: center; padding: 26px 10px 8px; }
.ai-welcome[hidden] { display: none; }
.ai-welcome h3 { margin: 10px 0 4px; font-size: 20px; color: var(--ai-ink); }
.ai-welcome-icon {
    width: 48px; height: 48px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #fff;
    background: var(--ai-grad); box-shadow: 0 0 26px rgba(124, 58, 237, .45);
}
.ai-suggest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px auto 6px; max-width: 640px; }
.ai-suggest-item {
    font: inherit; font-size: 14px; text-align: left; cursor: pointer; padding: 12px 14px; border-radius: 12px; color: var(--ai-ink);
    border: 1px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, rgba(124,58,237,.45), rgba(6,182,212,.45)) border-box;
    transition: transform .15s ease, box-shadow .15s ease;
}
.ai-suggest-item span { color: var(--ai-violet); }
.ai-suggest-item:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37, 99, 235, .15); }

.ai-messages { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.study-ai .bubble { max-width: 82%; padding: 12px 16px; border-radius: 16px; white-space: pre-wrap; word-break: break-word; line-height: 1.6; }
.study-ai .bubble-user {
    align-self: flex-end; color: #fff; background: var(--ai-grad); border-bottom-right-radius: 4px;
    box-shadow: 0 6px 18px rgba(37, 99, 235, .25);
}
.study-ai .study-answer { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; row-gap: 6px; max-width: 90%; align-self: flex-start; }
.study-ai .study-answer > :not(.ai-avatar) { grid-column: 2; }
.study-ai .study-answer .bubble { max-width: 100%; }
.study-ai .bubble-assistant {
    background: #fff; color: var(--ai-ink); border: 1px solid var(--ai-line); border-top-left-radius: 4px;
    box-shadow: 0 4px 18px rgba(99, 102, 241, .1);
}
.ai-avatar {
    grid-row: 1 / span 3; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
    background: var(--ai-grad); color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 0 14px rgba(124, 58, 237, .45);
}
.study-ai .study-sources { gap: 6px; }
.study-ai .source-chip { background: var(--ai-soft); color: #4338ca; border: 1px solid rgba(99, 102, 241, .25); }
.study-ai .source-chip.source-note { background: #ecfdf5; color: #047857; border-color: rgba(16, 185, 129, .35); }

.ai-typing { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.ai-typing[hidden] { display: none; }
.ai-typing-bubble { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--ai-soft); color: #4338ca; font-size: 14px; }
.ai-dots { display: inline-flex; gap: 4px; }
.ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ai-grad); animation: ai-dot 1.2s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .15s; }
.ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

.ai-composer { margin-top: 16px; }
.ai-input-wrap {
    display: flex; align-items: flex-end; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 16px;
    border: 1px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, rgba(124,58,237,.4), rgba(6,182,212,.4)) border-box;
    transition: box-shadow .2s ease;
}
.ai-input-wrap:focus-within { box-shadow: 0 0 0 4px rgba(99, 102, 241, .15), 0 0 24px rgba(6, 182, 212, .25); }
.study-ai .ai-input-wrap textarea { border: 0; outline: none; padding: 6px 0; resize: none; background: transparent; box-shadow: none; }
.ai-send {
    flex: none; width: 44px; height: 44px; border-radius: 12px; border: 0; cursor: pointer; font-size: 17px; color: #fff;
    background: var(--ai-grad); box-shadow: 0 6px 18px rgba(37, 99, 235, .35); transition: transform .15s ease, filter .15s ease;
}
.ai-send:hover:not(:disabled) { transform: translateY(-1px) scale(1.04); filter: brightness(1.1); }
.ai-send:disabled { opacity: .45; cursor: default; box-shadow: none; }
.ai-composer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.ai-link { font: inherit; font-size: 13px; border: 0; background: none; cursor: pointer; color: var(--ai-blue); font-weight: 600; }
.ai-link:hover { color: var(--ai-violet); }

.ai-side { display: flex; flex-direction: column; gap: 16px; }
.ai-side-card { border-radius: 16px; padding: 16px 18px; background: #fff; border: 1px solid var(--ai-line); }
.ai-side-card h3 { margin: 0 0 10px; font-size: 15px; color: var(--ai-ink); }
.ai-tips { margin: 0; padding-left: 18px; font-size: 13.5px; color: #475569; display: flex; flex-direction: column; gap: 6px; }
.ai-tips em { color: #4338ca; font-style: normal; font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
    .ai-hero-glow, .ai-logo, .ai-dots i { animation: none; }
}
