:root {
    --bg: #f6f8fc;
    --surface: #ffffff;
    --text: #122034;
    --muted: #667085;
    --primary: #3157ff;
    --primary-dark: #203fd4;
    --secondary: #00a884;
    --danger: #dc3545;
    --warning: #f59e0b;
    --border: #e6eaf2;
    --shadow: 0 18px 50px rgba(18, 32, 52, 0.10);
    --radius: 22px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
main { width: min(1160px, calc(100% - 32px)); margin: 32px auto 64px; }

.navbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; padding: 16px min(42px, 5vw);
    background: rgba(255,255,255,.84); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.08rem; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: white; background: linear-gradient(135deg, var(--primary), var(--secondary)); box-shadow: var(--shadow); }
.nav-links { display: flex; align-items: center; gap: 18px; font-weight: 650; color: #344054; }
.nav-links a:hover { color: var(--primary); }
.nav-toggle { display: none; border: 0; background: var(--surface); border-radius: 12px; padding: 9px 12px; font-size: 1.2rem; }

.hero { display: grid; grid-template-columns: 1.08fr .92fr; gap: 28px; align-items: center; padding: 44px 0 24px; }
.hero-card { position: relative; overflow: hidden; padding: clamp(28px, 5vw, 56px); border-radius: 34px; background: linear-gradient(135deg, #0b1b48, #3157ff 58%, #00a884); color: white; box-shadow: var(--shadow); }
.hero-card::after { display: none; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 900; color: var(--secondary); }
.hero-card .eyebrow { color: #c7fff3; }
h1 { margin: 10px 0 16px; font-size: clamp(2rem, 5vw, 4.4rem); line-height: 1.02; letter-spacing: 0; }
h2 { margin: 0 0 16px; font-size: clamp(1.45rem, 3vw, 2.2rem); line-height: 1.12; letter-spacing: 0; }
h3 { margin: 0 0 10px; font-size: 1.1rem; }
p { color: var(--muted); }
.hero-card p { max-width: 660px; color: rgba(255,255,255,.88); font-size: 1.1rem; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: 0 10px 28px rgba(18,32,52,.06); }
.panel-visual { min-height: 360px; background: linear-gradient(160deg, #fff, #eef3ff); }
.stack { display: grid; gap: 16px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: 0 10px 28px rgba(18,32,52,.055); }
.card:hover { transform: translateY(-2px); transition: .2s ease; }
.stat { padding: 24px; border-radius: var(--radius); background: linear-gradient(135deg, #fff, #f3f6ff); border: 1px solid var(--border); }
.stat strong { display: block; font-size: 2rem; letter-spacing: 0; }
.stat span { color: var(--muted); font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 11px 17px; font-weight: 800; border: 1px solid transparent; cursor: pointer; transition: .18s ease; font-size: .95rem; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 14px 30px rgba(49,87,255,.25); }
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-secondary { background: var(--secondary); color: white; }
.btn-light { background: white; color: #152a54; }
.btn-outline { border-color: var(--border); background: transparent; color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 11px; font-size: .82rem; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.form { display: grid; gap: 15px; }
.form-row { display: grid; gap: 6px; }
label { font-weight: 800; color: #344054; }
input, select, textarea { width: 100%; border: 1px solid #d7deea; border-radius: 14px; padding: 12px 14px; font: inherit; background: white; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(49,87,255,.14); border-color: var(--primary); }
textarea { min-height: 110px; resize: vertical; }
.help { color: var(--muted); font-size: .92rem; margin: 0; }

.auth-shell { min-height: 68vh; display: grid; place-items: center; }
.auth-card { width: min(470px, 100%); }

.badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-weight: 850; font-size: .78rem; }
.badge-blue { background: #e8edff; color: #2449d8; }
.badge-green { background: #e4fbf3; color: #08745d; }
.badge-gold { background: #fff3cd; color: #8a5a00; }
.badge-purple { background: #f1e8ff; color: #6733b3; }
.badge-coral { background: #ffe9e5; color: #b74734; }
.badge-slate { background: #edf2f7; color: #334155; }
.badge-danger { background: #fde8ea; color: #b42335; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: #475467; font-size: .86rem; text-transform: uppercase; letter-spacing: .05em; background: #f8fafc; }
tr:last-child td { border-bottom: 0; }

.flash { width: min(1160px, calc(100% - 32px)); margin: 18px auto; padding: 14px 16px; border-radius: 16px; font-weight: 750; }
.flash-success { background: #e4fbf3; color: #08745d; }
.flash-error { background: #fde8ea; color: #b42335; }
.flash-info { background: #e8edff; color: #2449d8; }

.question { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: #fbfcff; }
.rating { display: flex; gap: 10px; flex-wrap: wrap; }
.rating label { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: white; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.rating input { width: auto; }

.progress { height: 12px; border-radius: 999px; background: #e6eaf2; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: inherit; }

.footer { text-align: center; padding: 28px 16px; color: var(--muted); border-top: 1px solid var(--border); }
.empty { border: 1px dashed #cbd5e1; border-radius: var(--radius); padding: 28px; text-align: center; background: rgba(255,255,255,.65); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 34px 0 16px; }
.section-heading p { margin: 0; }

@media (max-width: 900px) {
    .hero, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .nav-toggle { display: block; }
    .nav-links { display: none; position: absolute; top: 74px; left: 16px; right: 16px; padding: 16px; flex-direction: column; align-items: stretch; background: white; border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
    .nav-links.open { display: flex; }
    .hero-card { border-radius: 26px; }
}

/* Product polish */
:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --text: #101828;
    --muted: #5f6b7a;
    --primary: #2854c5;
    --primary-dark: #1e3f96;
    --secondary: #008f73;
    --accent: #f2a900;
    --coral: #df6248;
    --border: #dce3ee;
    --shadow: 0 16px 36px rgba(16, 24, 40, 0.09);
    --radius: 8px;
}

body {
    background: linear-gradient(180deg, #eef4fb 0, #f8fafc 360px, #f4f7fb 100%);
}

main {
    width: min(1200px, calc(100% - 32px));
}

.navbar {
    background: rgba(255, 255, 255, 0.92);
}

.brand-mark {
    border-radius: 8px;
    background: linear-gradient(135deg, #203f8f, #008f73);
}

h1, h2 {
    letter-spacing: 0;
}

h1 {
    max-width: 820px;
}

p {
    margin-top: 0;
}

.hero {
    align-items: stretch;
}

.hero-premium {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
}

.hero-card {
    border-radius: 18px;
    background: linear-gradient(135deg, #10213f 0%, #2854c5 56%, #008f73 100%);
}

.hero-card::after {
    display: none;
}

.hero-main {
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-main h1 {
    font-size: clamp(2.35rem, 5vw, 4.8rem);
}

.panel,
.card,
.stat,
.table-wrap,
.empty,
.question {
    border-radius: var(--radius);
}

.card:hover,
.category-tile:hover {
    transform: translateY(-3px);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.11);
}

.insight-panel {
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.metric {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
}

.metric strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.metric span {
    color: var(--muted);
    font-weight: 800;
    font-size: .86rem;
}

.path-card {
    padding: 24px;
    border-radius: var(--radius);
    background: #10213f;
    color: white;
}

.path-card .eyebrow,
.path-card p {
    color: #bff4e9;
}

.timeline {
    list-style: none;
    display: grid;
    gap: 18px;
    padding: 0;
    margin: 18px 0 0;
}

.timeline li {
    display: grid;
    gap: 4px;
    padding-left: 18px;
    border-left: 3px solid rgba(255,255,255,.28);
}

.timeline strong {
    color: white;
}

.timeline span {
    color: rgba(255,255,255,.78);
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.category-tile {
    display: grid;
    align-content: space-between;
    gap: 18px;
    min-height: 124px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.category-tile.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(40, 84, 197, .12);
}

.category-tile strong {
    font-size: 1.08rem;
}

.feature-card {
    position: relative;
    min-height: 210px;
}

.feature-card > span {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: #eef4ff;
    color: var(--primary);
    font-weight: 900;
}

.library-hero,
.dashboard-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin: 34px 0 18px;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #eef4ff 58%, #e7faf4 100%);
}

.library-hero h1,
.dashboard-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.04;
}

.library-hero p,
.dashboard-hero p {
    max-width: 760px;
    margin-bottom: 0;
}

.library-summary {
    min-width: 170px;
    padding: 18px;
    border-radius: var(--radius);
    background: #10213f;
    color: white;
    text-align: center;
}

.library-summary strong {
    display: block;
    font-size: 2.6rem;
    line-height: 1;
}

.library-summary span {
    color: rgba(255,255,255,.78);
    font-weight: 800;
}

.filter-panel {
    margin: 20px 0;
}

.compact-strip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin-top: 18px;
}

.compact-strip .category-tile {
    min-height: 94px;
}

.career-grid {
    align-items: stretch;
}

.career-card {
    display: flex;
    min-height: 315px;
    flex-direction: column;
}

.career-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

.career-meta {
    display: grid;
    gap: 10px;
    margin: 12px 0 18px;
}

.career-meta span {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: #f8fafc;
    color: var(--muted);
    font-size: .9rem;
}

.career-meta strong {
    color: var(--text);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.score-card {
    background: linear-gradient(180deg, #fff 0, #f8fafc 100%);
}

.stat {
    background: #fff;
    border-left: 4px solid var(--primary);
}

.stat:nth-child(2n) {
    border-left-color: var(--secondary);
}

.stat:nth-child(3n) {
    border-left-color: var(--accent);
}

.btn {
    border-radius: 10px;
}

.btn-light {
    box-shadow: 0 14px 30px rgba(0,0,0,.15);
}

input,
select,
textarea {
    border-radius: 8px;
}

.badge {
    border-radius: 8px;
}

.section-heading {
    align-items: center;
}

.career-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    margin: 34px 0 18px;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(135deg, #10213f 0%, #2854c5 58%, #008f73 100%);
    color: white;
}

.career-detail-hero h1 {
    margin: 12px 0 14px;
    font-size: clamp(2.25rem, 4.8vw, 4.6rem);
}

.career-detail-hero p {
    max-width: 820px;
    margin: 0;
    color: rgba(255,255,255,.86);
    font-size: 1.08rem;
}

.career-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.detail-stats {
    margin-bottom: 22px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 18px;
    align-items: start;
}

.detail-main h2 {
    margin-top: 8px;
}

.roadmap {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.roadmap-step {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
}

.roadmap-step > span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: #10213f;
    color: white;
    font-weight: 900;
}

.roadmap-step strong {
    display: block;
    margin-bottom: 4px;
}

.roadmap-step p {
    margin: 0;
}

.check-list,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.check-list span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: #eef4ff;
    color: #203f8f;
    font-weight: 800;
    font-size: .9rem;
}

.check-list span::before {
    content: "OK";
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #203f8f;
    color: white;
    font-size: .58rem;
}

.tag-cloud span {
    padding: 8px 10px;
    border-radius: var(--radius);
    background: #e7faf4;
    color: #006c58;
    font-weight: 800;
    font-size: .9rem;
}

.action-card strong {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 14px;
    border-radius: var(--radius);
    background: #10213f;
    color: white;
}

.chat-shell,
.chat-admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.chat-admin-layout {
    grid-template-columns: 320px minmax(0, 1fr);
}

.chat-panel {
    min-height: 560px;
}

.chat-thread {
    display: grid;
    gap: 14px;
    max-height: 620px;
    overflow-y: auto;
    padding: 4px;
}

.chat-message {
    display: flex;
}

.chat-mine {
    justify-content: flex-end;
}

.chat-staff {
    justify-content: flex-start;
}

.chat-bubble {
    width: min(680px, 86%);
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.chat-mine .chat-bubble {
    background: #10213f;
    border-color: #10213f;
    color: white;
}

.chat-bubble p {
    margin: 6px 0 8px;
    color: inherit;
}

.chat-bubble span {
    color: inherit;
    opacity: .68;
    font-size: .78rem;
}

.chat-reply {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.chat-student-list {
    position: sticky;
    top: 92px;
}

.chat-student {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
}

.chat-student.active {
    border-color: var(--primary);
    background: #eef4ff;
}

.chat-student span {
    color: var(--muted);
    font-size: .88rem;
}

.chat-student em {
    justify-self: start;
    padding: 3px 8px;
    border-radius: var(--radius);
    background: #e7faf4;
    color: #006c58;
    font-style: normal;
    font-weight: 900;
    font-size: .75rem;
}

.chat-heading {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 1050px) {
    .hero-premium,
    .category-strip,
    .compact-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hero-premium,
    .category-strip,
    .compact-strip {
        grid-template-columns: 1fr;
    }

    .hero-main,
    .insight-panel {
        min-height: auto;
    }

    .library-hero,
    .dashboard-hero,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .library-summary {
        width: 100%;
        text-align: left;
    }

    .metric-row {
        grid-template-columns: 1fr;
    }

    .career-detail-hero,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .career-actions {
        justify-content: flex-start;
    }

    .chat-shell,
    .chat-admin-layout {
        grid-template-columns: 1fr;
    }

    .chat-student-list {
        position: static;
    }
}

/* Responsive hardening */
html {
    -webkit-text-size-adjust: 100%;
}

img,
svg,
canvas,
video {
    max-width: 100%;
}

body {
    overflow-x: hidden;
}

.brand,
.nav-links a,
.btn,
.badge,
.stat,
.card,
.career-meta span,
.chat-bubble,
td,
th {
    overflow-wrap: anywhere;
}

.nav-toggle {
    min-height: 42px;
    min-width: 64px;
    font-weight: 900;
    color: var(--text);
}

table {
    min-width: 760px;
}

.table-wrap {
    -webkit-overflow-scrolling: touch;
}

.table-wrap::after {
    content: "Swipe sideways to view more";
    display: none;
    padding: 10px 14px;
    color: var(--muted);
    font-size: .82rem;
    border-top: 1px solid var(--border);
}

.stat {
    min-width: 0;
}

.section-heading > *,
.dashboard-hero > *,
.library-hero > *,
.career-detail-hero > * {
    min-width: 0;
}

@media (max-width: 1180px) {
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3,
    .career-grid,
    .feature-grid,
    .score-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compact-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .nav-links {
        gap: 12px;
        font-size: .92rem;
    }
}

@media (max-width: 980px) {
    main {
        width: min(100% - 24px, 860px);
        margin-top: 22px;
    }

    .navbar {
        padding: 12px 16px;
    }

    .brand span:last-child {
        max-width: 48vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 67px;
        left: 12px;
        right: 12px;
        max-height: calc(100vh - 88px);
        overflow-y: auto;
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        background: white;
        border: 1px solid var(--border);
        border-radius: 14px;
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 44px;
        padding: 10px 12px;
        border-radius: var(--radius);
        background: #f8fafc;
    }

    .nav-links .btn {
        width: 100%;
    }

    .hero,
    .hero-premium,
    .detail-layout,
    .chat-shell,
    .chat-admin-layout {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 18px;
    }

    .hero-main,
    .insight-panel,
    .chat-panel {
        min-height: auto;
    }

    .library-hero,
    .dashboard-hero,
    .career-detail-hero,
    .section-heading {
        align-items: stretch;
    }

    .career-detail-hero {
        grid-template-columns: 1fr;
    }

    .career-actions,
    .actions {
        justify-content: flex-start;
    }

    .chat-student-list {
        position: static;
    }
}

@media (max-width: 720px) {
    main {
        width: calc(100% - 20px);
        margin-bottom: 42px;
    }

    h1,
    .hero-main h1,
    .library-hero h1,
    .dashboard-hero h1,
    .career-detail-hero h1 {
        font-size: clamp(1.85rem, 11vw, 2.8rem);
        line-height: 1.08;
    }

    h2 {
        font-size: clamp(1.3rem, 7vw, 1.8rem);
    }

    .hero-card,
    .library-hero,
    .dashboard-hero,
    .career-detail-hero,
    .panel,
    .card,
    .stat,
    .empty {
        padding: 18px;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .career-grid,
    .feature-grid,
    .score-grid,
    .category-strip,
    .compact-strip,
    .metric-row {
        grid-template-columns: 1fr;
    }

    .category-tile,
    .compact-strip .category-tile {
        min-height: auto;
        gap: 10px;
    }

    .career-card {
        min-height: auto;
    }

    .library-summary {
        width: 100%;
        text-align: left;
    }

    .actions,
    .hero-actions,
    .career-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .actions .btn,
    .hero-actions .btn,
    .career-actions .btn,
    .career-actions form,
    button,
    .btn {
        width: 100%;
    }

    .navbar .nav-toggle {
        width: auto;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .rating {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .rating label {
        justify-content: center;
        padding: 9px 6px;
    }

    .roadmap-step {
        grid-template-columns: 1fr;
    }

    .roadmap-step > span {
        width: 38px;
        height: 38px;
    }

    .chat-bubble {
        width: 94%;
    }

    .chat-thread {
        max-height: 58vh;
    }

    .table-wrap::after {
        display: block;
    }

    th,
    td {
        padding: 11px 12px;
    }
}

@media (max-width: 420px) {
    main {
        width: calc(100% - 14px);
    }

    .navbar {
        padding: 10px 8px;
    }

    .brand {
        gap: 8px;
        font-size: .95rem;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .nav-toggle {
        min-width: 58px;
        min-height: 38px;
        padding: 8px;
        font-size: .85rem;
    }

    .hero-card,
    .library-hero,
    .dashboard-hero,
    .career-detail-hero,
    .panel,
    .card,
    .stat,
    .empty,
    .question {
        padding: 14px;
    }

    .stat strong,
    .metric strong,
    .library-summary strong {
        font-size: 1.7rem;
    }

    .badge {
        font-size: .72rem;
    }

    .rating {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .chat-bubble {
        width: 100%;
        padding: 12px;
    }

    table {
        min-width: 680px;
    }
}
