@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@500;600&display=swap');

:root {
    --bg: #0d1224;
    --panel: rgba(15, 23, 42, 0.74);
    --card: #0f172a;
    --muted: #cbd5e1;
    --text: #e2e8f0;
    --accent: #38bdf8;
    --accent-2: #f59e0b;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.06);
    --radius: 14px;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    --plasma-blue: rgba(56, 189, 248, 0.11);
    --plasma-blue-soft: rgba(56, 189, 248, 0.08);
    --plasma-purple: rgba(168, 85, 247, 0.11);
    --mcq-correct-border: rgba(56, 189, 248, 0.85);
    --mcq-correct-bg: rgba(56, 189, 248, 0.16);
    --mcq-correct-ring: rgba(56, 189, 248, 0.12);
    --mcq-correct-text: #7dd3fc;
    --mcq-incorrect-border: rgba(236, 72, 153, 0.85);
    --mcq-incorrect-bg: rgba(236, 72, 153, 0.14);
    --mcq-incorrect-ring: rgba(236, 72, 153, 0.12);
    --mcq-incorrect-text: #f9a8d4;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--bg);
    background-image:
        radial-gradient(1200px 720px at 12% -8%, var(--plasma-blue), transparent 72%),
        radial-gradient(
            1360px 820px at 88% -12%,
            rgba(168, 85, 247, 0.14) 0%,
            rgba(168, 85, 247, 0.1) 34%,
            rgba(168, 85, 247, 0.06) 58%,
            rgba(168, 85, 247, 0) 80%
        ),
        radial-gradient(1080px 760px at 28% 52%, var(--plasma-blue-soft), transparent 76%),
        radial-gradient(
            1240px 760px at 76% 74%,
            rgba(168, 85, 247, 0.08) 0%,
            rgba(168, 85, 247, 0.05) 40%,
            rgba(168, 85, 247, 0) 82%
        );
    background-size:
        130% 130%,
        130% 130%,
        140% 140%,
        140% 140%;
    background-position:
        0% 0%,
        100% 0%,
        18% 52%,
        82% 88%;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
    background-attachment: fixed, fixed, fixed, fixed;
    color: var(--text);
    font-family: 'Inter', 'Helvetica Neue', Arial, system-ui, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 900px) {
    body {
        background-attachment: scroll, scroll, scroll, scroll;
        background-size: 160% 160%, 160% 160%, 180% 180%, 180% 180%;
    }
}

h1, h2, h3, h4 {
    font-family: 'Inter', 'Helvetica Neue', Arial, system-ui, sans-serif;
    font-weight: 750;
    margin: 0;
    letter-spacing: -0.015em;
}

p {
    margin: 0;
    color: var(--muted);
}

a {
    color: inherit;
    text-decoration: none;
}

a.link {
    color: #38bdf8;
    text-decoration: underline;
    font-weight: 600;
}

.page {
    width: 100%;
    min-height: 100vh;
}

/* NAV */
.nav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    backdrop-filter: blur(14px);
    background: rgba(13, 18, 36, 0.8);
    border-bottom: 1px solid var(--border);
}

.hero.full-height {
    position: relative;
    overflow: visible;
}

.nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #e2e8f0;
    padding: 8px 10px;
    font-weight: 700;
    cursor: pointer;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, #38bdf8, #ec4899);
    color: #0b1224;
    font-weight: 800;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(14, 165, 233, 0.18);
    letter-spacing: -0.04em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-title {
    color: #e2e8f0;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.view-btn.ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

[data-theme="light"] {
    --bg: #f4f5f8;
    --text: #0f172a;
    --muted: #475569;
    --border: rgba(0, 0, 0, 0.08);
    --card: #ffffff;
    --pill: #0ea5e9;
    --plasma-blue: rgba(56, 189, 248, 0.08);
    --plasma-blue-soft: rgba(56, 189, 248, 0.05);
    --plasma-purple: rgba(168, 85, 247, 0.08);
    --mcq-correct-border: rgba(2, 132, 199, 0.72);
    --mcq-correct-bg: rgba(14, 165, 233, 0.12);
    --mcq-correct-ring: rgba(2, 132, 199, 0.18);
    --mcq-correct-text: #0369a1;
    --mcq-incorrect-border: rgba(190, 24, 93, 0.72);
    --mcq-incorrect-bg: rgba(236, 72, 153, 0.12);
    --mcq-incorrect-ring: rgba(190, 24, 93, 0.16);
    --mcq-incorrect-text: #be185d;
    color: var(--text);
    background: var(--bg);
}

[data-theme="light"] .nav {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--border);
    color: #0f172a;
}

[data-theme="light"] .brand-mark {
    color: #0f172a;
}

[data-theme="light"] .brand,
[data-theme="light"] .brand span,
[data-theme="light"] .nav-title {
    color: #0f172a;
}

[data-theme="light"] .view-btn {
    color: #0f172a;
}

[data-theme="light"] .view-btn.active {
    background: rgba(0, 0, 0, 0.06);
    color: #0f172a;
}

[data-theme="light"] .view-btn.ghost {
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .table-card,
[data-theme="light"] .transcript-card,
[data-theme="light"] .side-card,
[data-theme="light"] .settings-form-card {
    background: var(--card);
    border-color: #e2e8f0;
    color: var(--text);
}

[data-theme="light"] .table-head,
[data-theme="light"] .table-row {
    background: transparent;
    color: #0f172a;
}

[data-theme="light"] .table-head {
    background: rgba(0, 0, 0, 0.06);
    font-weight: 800;
}

[data-theme="light"] .table-row:nth-child(odd) {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .flag.none {
    color: #15803d;
}

[data-theme="light"] .flag.warn {
    color: #b45309;
}

[data-theme="light"] .flag.danger {
    color: #b91c1c;
}

[data-theme="light"] .link {
    color: #0369a1;
}

[data-theme="light"] .filter-input {
    background: #ffffff;
    color: #0f172a;
    border-color: var(--border);
}

[data-theme="light"] .section {
    background: var(--bg);
    color: var(--text);
}

[data-theme="light"] .transcript-meta,
[data-theme="light"] .meta,
[data-theme="light"] .table-note {
    color: #475569;
}

[data-theme="light"] .bubble.ai {
    background: #f1f5f9;
    color: #0f172a;
    border-color: var(--border);
}

[data-theme="light"] .bubble.user {
    background: #e0f2fe;
    color: #0f172a;
    border-color: #bae6fd;
}

[data-theme="light"] .back-to-top {
    background: #ffffff;
    color: #0f172a;
    border-color: var(--border);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a {
    padding: 10px 12px;
    color: var(--muted);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: 0.2s ease;
    font-weight: 600;
}

.nav-links a:hover {
    color: #fff;
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.nav-links a.is-active {
    color: #fff;
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(56, 189, 248, 0.08);
}

.nav-links .pill {
    background: linear-gradient(120deg, #38bdf8, #0ea5e9);
    color: #0b1224;
    border: none;
    padding: 10px 16px;
    box-shadow: 0 12px 32px rgba(56, 189, 248, 0.3);
}

.landing-theme-toggle {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font: inherit;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.landing-theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.12);
    color: #ffffff;
}

/* HERO */
.hero {
    position: relative;
    overflow-x: clip;
    overflow-y: visible;
    padding: 96px 24px 72px;
    animation: fadePage 0.6s ease forwards;
}

.full-height {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orb {
    position: absolute;
    width: 360px;
    height: 360px;
    filter: blur(150px);
    opacity: 0.24;
    z-index: 0;
}

.orb-left {
    background: rgba(14, 165, 233, 0.58);
    left: -120px;
    top: -60px;
}

.orb-right {
    background: rgba(236, 72, 153, 0.54);
    right: -160px;
    bottom: -140px;
    opacity: 0.2;
    filter: blur(170px);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.hero-copy h1 {
    font-size: clamp(2.2rem, 3.6vw, 3.1rem);
    margin: 6px 0 10px;
    line-height: 1.05;
}

.hero .lede {
    font-size: 1.05rem;
    margin-bottom: 26px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    color: #8bd9ff;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.micro-note {
    margin-top: 2px;
    font-size: 0.92rem;
    color: #b7c8de;
}

[data-theme="light"] .micro-note {
    color: #475569;
}

.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cta.primary {
    background: linear-gradient(120deg, #38bdf8, #0ea5e9);
    color: #0b1224;
    box-shadow: 0 18px 46px rgba(56, 189, 248, 0.35);
}

.cta.primary.dark {
    color: #06111f;
}

.cta.ghost {
    border-color: var(--border);
    color: #dbeafe;
    background: transparent;
}

.cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 50px rgba(56, 189, 248, 0.2);
}

.hero-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #e2e8f0;
}

.hero-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(14, 165, 233, 0.08));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    max-width: 100%;
    overflow: hidden; /* prevent child overflow from widening on mobile */
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin-top: 4px;
}

.tiny {
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: #9db2ce;
    text-transform: uppercase;
}

.badge {
    background: rgba(56, 189, 248, 0.16);
    color: #e0f2fe;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.throb {
    animation: throb 1.1s ease-in-out infinite;
}

.badge.throb {
    background: rgba(236, 72, 153, 0.18);
    border-color: rgba(236, 72, 153, 0.5);
    color: #ffe4f1;
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.35);
}
.badge.ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border);
}

.panel-chat,
.experience-chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 220px;
}

.panel-chat {
    height: 240px;
    overflow-y: auto;
    overflow-x: hidden; /* keep wide code from pushing the column */
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
    min-width: 0; /* allow children to shrink within the panel */
    max-width: 100%;
    width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
    align-items: stretch;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.lang-switch label {
    font-size: 0.9rem;
    color: #cbd5e1;
}

.lang-switch select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: #e2e8f0;
    border-radius: 10px;
    padding: 6px 10px;
}

.panel-chat::-webkit-scrollbar {
    width: 8px;
}

.panel-chat::-webkit-scrollbar-track {
    background: transparent;
}

.panel-chat::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
}

.panel-chat::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.24);
}

.thinking .dots,
.mcq-status .dots {
    display: inline-flex;
    gap: 4px;
}

.thinking .dots span,
.mcq-status .dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e5e7eb;
    animation: bounce 1s infinite ease-in-out;
}

.thinking .dots span:nth-child(2),
.mcq-status .dots span:nth-child(2) { animation-delay: 0.15s; }
.thinking .dots span:nth-child(3),
.mcq-status .dots span:nth-child(3) { animation-delay: 0.3s; }

[data-theme="light"] .thinking .dots span,
[data-theme="light"] .mcq-status .dots span {
    background: #0f172a;
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes fadeSlide {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadePage {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bubble {
    padding: 12px 14px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.97rem;
    min-width: 0; /* prevent long code from forcing the chat column wider */
    max-width: 100%;
    overflow-wrap: anywhere;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(6px);
    animation: fadeSlide 0.35s ease forwards;
}

.bubble-text {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.bubble-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.bubble-row .bubble-text {
    flex: 1 1 auto;
    min-width: 0;
}

.bubble-replay-btn {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin-top: 1px;
}

.bubble-replay-btn svg {
    width: 10px;
    height: 10px;
    margin-left: 1px;
}

.bubble-replay-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.45);
}

[data-theme="light"] .bubble-replay-btn {
    border-color: rgba(15, 23, 42, 0.14);
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

.bubble-footer {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.bubble-badges,
.bubble-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bubble-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.bubble-badge.is-repetitive {
    color: #fef3c7;
    background: rgba(217, 119, 6, 0.18);
    border-color: rgba(245, 158, 11, 0.35);
}

.bubble-badge.is-skipped {
    color: #dbeafe;
    background: rgba(14, 165, 233, 0.14);
    border-color: rgba(56, 189, 248, 0.32);
}

.bubble-skip-btn {
    border: 1px solid rgba(248, 250, 252, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.bubble-skip-btn:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.36);
}

.bubble-skip-btn:disabled {
    cursor: wait;
    opacity: 0.7;
}

[data-theme="light"] .bubble-badge.is-repetitive {
    color: #92400e;
    background: rgba(251, 191, 36, 0.18);
    border-color: rgba(217, 119, 6, 0.3);
}

[data-theme="light"] .bubble-badge.is-skipped {
    color: #0f4c81;
    background: rgba(125, 211, 252, 0.22);
    border-color: rgba(14, 165, 233, 0.28);
}

[data-theme="light"] .bubble-skip-btn {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.14);
}

.bubble-audio-wrap {
    margin-top: 8px;
    display: grid;
    gap: 4px;
}

.bubble-audio-native {
    display: none;
}

.bubble-audio-player {
    width: min(340px, 100%);
    max-width: 100%;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 11px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
}

.bubble-audio-play-btn {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.bubble-audio-play-btn svg {
    width: 11px;
    height: 11px;
}

.bubble-audio-seek {
    width: 100%;
    accent-color: #38bdf8;
    margin: 0;
}

.bubble-audio-time {
    font-size: 0.74rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

[data-theme="light"] .bubble-audio-player {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.14);
}

[data-theme="light"] .bubble-audio-play-btn {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.18);
    color: #0f172a;
}

[data-theme="light"] .bubble-audio-time {
    color: #475569;
}

@media (max-width: 640px) {
    .bubble-audio-player {
        width: 100%;
    }
}

.model-answer {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px dashed rgba(148, 163, 184, 0.35);
    font-size: 0.9rem;
    color: #cbd5f5;
}

.model-answer-label {
    font-weight: 700;
    margin-right: 6px;
    color: #e2e8f0;
}

.model-answer.is-hidden {
    display: none !important;
}

[data-theme="light"] .model-answer {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.6);
    color: #334155;
}

[data-theme="light"] .model-answer-label {
    color: #0f172a;
}

.panel-chat > * {
    min-width: 0;
    max-width: 100%;
}

.bubble code,
.bubble code.inline-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Courier New", monospace;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 8px;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    color: #e5e7eb;
    margin: 8px 0 4px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.rating-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
}

.rating-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: #e5e7eb;
}

.rating-scale {
    display: inline-flex;
    gap: 8px;
    font-size: 1.1rem;
    user-select: none;
}

.rating-scale .rating-btn {
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

[data-theme="light"] .rating-scale .rating-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* TABLE / DASHBOARD */
.carousel-nav {
    display: inline-flex;
    gap: 10px;
    margin-bottom: 16px;
}

.dash-tab {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.dash-tab.active {
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.5);
    color: #0f172a;
}

.view-toggle {
    display: flex;
    gap: 16px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
}

.view-btn {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.28));
    color: #e2e8f0;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 22px rgba(14, 165, 233, 0.25);
    min-height: 44px;
    height: 44px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

[data-theme="light"] .view-btn {
    border-color: rgba(14, 165, 233, 0.35);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(56, 189, 248, 0.18));
    color: #0f172a;
    box-shadow: 0 8px 22px rgba(14, 165, 233, 0.18);
    height: 44px;
}
.nav-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.viva-mobile-navbar-controls {
    display: none;
}

@media (min-width: 641px) {
    body.mobile-viva-chat-active .viva-mobile-navbar-controls {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-left: 8px;
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls .viva-theme-toggle-btn {
        display: none !important;
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls .viva-speech-toggle {
        height: 36px;
        padding: 0 8px;
        gap: 7px;
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls .viva-nav-timer,
    body.mobile-viva-chat-active .viva-mobile-navbar-controls [data-early-submit].control-btn {
        height: 36px;
    }
}

.mobile-icon-btn {
    gap: 8px;
}

.mobile-icon-btn .icon {
    display: inline-flex;
    align-items: center;
}

.mobile-icon-btn .label {
    display: none;
}

.nav-user {
    font-size: 0.95rem;
    color: #cbd5e1;
    white-space: nowrap;
}
[data-theme="light"] .nav-user {
    color: #0f172a;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(14, 165, 233, 0.18));
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 8px 22px rgba(14, 165, 233, 0.2);
}
[data-theme="light"] .user-chip {
    border-color: rgba(14, 165, 233, 0.25);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(56, 189, 248, 0.12));
    color: #0f172a;
}
.chip-divider {
    opacity: 0.7;
}

/* Spread nav for title centering */
.nav-spread {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
}

.nav-spread .nav-title {
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.01em;
}

@media (max-width: 768px) {
    .nav,
    .nav.nav-spread {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .nav-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }
    .nav-actions .view-btn,
    .nav-actions .user-chip {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    .user-chip {
        justify-content: center;
    }
    .nav-title {
        width: 100%;
        text-align: left;
    }
}

.dash-view {
    display: none;
}

.dash-view.active {
    display: block;
}

.carousel {
    position: relative;
}

.carousel-pane {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.carousel-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.table-card {
    width: 100%;
    max-width: none;
    margin: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(7, 12, 26, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
    position: relative;
}

.table-head,
.table-row {
    display: grid;
    grid-template-columns: 2fr 1.6fr 1.2fr;
    padding: 14px 16px;
    align-items: center;
    gap: 10px;
}

.table-head {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.table-filter {
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
    cursor: pointer;
}

.table-filter:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.6);
    outline-offset: 2px;
    border-radius: 8px;
}

.filter-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0;
    text-transform: none;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #e0f2fe;
}

.filter-indicator.is-hidden {
    display: none;
}

.filter-indicator-text {
    line-height: 1.05;
}

.filter-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(186, 230, 253, 0.45);
    background: rgba(15, 23, 42, 0.42);
    color: #e0f2fe;
    font-size: 0.62rem;
    line-height: 1;
    font-weight: 700;
}

.table-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #d9e2f1;
    transition: background 0.2s ease, border-color 0.2s ease;
}


.table-row:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
}

.viva-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.viva-status-cluster {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.table-row:hover {
    background: rgba(56, 189, 248, 0.06);
    border-color: rgba(56, 189, 248, 0.25);
}

.viva-status {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.viva-status.yes {
    background: #22d3ee;
}

.viva-status.no {
    background: #f87171;
}

.pill.yes,
.pill.no,
.pill.neutral {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid transparent;
    line-height: 1.1;
}

.pill.yes {
    background: rgba(56, 189, 248, 0.16);
    color: #e0f2fe;
    border-color: rgba(56, 189, 248, 0.35);
}

.pill.no {
    background: rgba(248, 113, 113, 0.16);
    color: #fee2e2;
    border-color: rgba(248, 113, 113, 0.35);
}

.pill.neutral {
    background: rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.35);
}

[data-theme="light"] .pill.neutral {
    background: rgba(56, 189, 248, 0.12);
    color: #0f172a;
    border-color: rgba(56, 189, 248, 0.35);
}

[data-theme="light"] .pill.no {
    background: rgba(248, 113, 113, 0.18);
    color: #7f1d1d;
    border-color: rgba(127, 29, 29, 0.35);
}

.link {
    color: #a5d8ff;
    text-decoration: none;
    font-weight: 700;
}

.link.disabled {
    color: #8a9bb5;
    cursor: not-allowed;
}

.noscript-warning {
    margin: 16px auto 0;
    max-width: 1100px;
    border-radius: 12px;
    padding: 12px 16px;
    background: #7f1d1d;
    border: 1px solid #ef4444;
    color: #fee2e2;
    font-weight: 600;
}

[data-theme="light"] .noscript-warning {
    background: #fee2e2;
    color: #7f1d1d;
    border-color: #ef4444;
}

.flag {
    font-weight: 700;
}

.flag-details {
    margin: 0;
}

.flag-details summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.flag-details summary::-webkit-details-marker {
    display: none;
}

.flag-details summary::after {
    content: "▾";
    display: inline-block;
    font-size: 0.75rem;
    opacity: 0.7;
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

.flag-details[open] summary::after {
    transform: rotate(180deg);
}

.flag-details ul {
    margin: 8px 0 0;
    padding-left: 16px;
    display: grid;
    gap: 6px;
    font-weight: 500;
    color: #cbd5e1;
}

[data-theme="light"] .flag-details ul {
    color: #334155;
}

.flag.none {
    color: #c8e6c9;
}

.flag.warn {
    color: #f59e0b;
}

.flag.danger {
    color: #ef4444;
}

.flag.mild {
    color: #f59e0b;
}

.flag.watch {
    color: #fda4af;
}

.table-note {
    color: #9fb5cf;
    margin: 12px auto 0;
    font-size: 0.9rem;
    text-align: center;
}

.table-controls {
    display: flex;
    justify-content: flex-end;
    margin: 6px 0 14px;
}

.table-controls.table-controls-split {
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.table-controls-left,
.table-controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-controls-left {
    flex: 1;
}

.table-controls-right {
    justify-content: flex-end;
    flex: 1;
}

.table-controls-right .mobile-filter-only {
    display: none;
}

.invite-details {
    display: grid;
    gap: 10px;
}

.invite-details summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: #e5e7eb;
}

.invite-details summary::-webkit-details-marker {
    display: none;
}

.invite-details summary::after {
    content: "+";
    margin-left: 8px;
    font-weight: 600;
    color: #94a3b8;
}

.invite-details[open] summary::after {
    content: "-";
}

.filter-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 240px;
    outline: none;
}

.filter-input::placeholder {
    color: #94a3b8;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-2px);
}

.transcript-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    min-width: 0;
    max-width: 100%;
}

.transcript-head {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 6px;
}

.transcript-head .name-row {
    display: flex;
    justify-content: flex-end;
}

.transcript-head .transcript-select {
    min-width: 240px;
}

.name-row {
    margin-bottom: 8px;
}

.transcript-select {
    width: 100%;
    min-width: 0;
}

.transcript-head h4 {
    margin: 4px 0 0;
}

.transcript-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.icon-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.icon-btn.icon-only {
    padding: 6px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.transcript-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #cfd8e3;
    font-size: 0.95rem;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.transcript-chat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-height: 320px;
    overflow-y: auto;
}

.transcript-files {
    margin-top: 12px;
    min-width: 0;
    max-width: 100%;
}

.transcript-files .file-chip {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.transcript-files .file-chip-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transcript-chat .bubble {
    opacity: 1;
    transform: none;
    animation: none;
}

.msg-flag {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.78rem;
    padding: 4px 6px;
    border-radius: 8px;
    background: rgba(248, 113, 113, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fee2e2;
}

.transcript-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.link.ghost-link {
    color: #e5e7eb;
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 8px;
}

.divider {
    border: 0;
    border-top: 1px solid var(--border);
    opacity: 0.6;
    width: 100%;
    margin: 24px 0 0;
}

.transcript-layout {
    display: grid;
    gap: 14px;
    grid-template-columns: 2fr 1fr;
    align-items: start;
    min-width: 0;
}

.transcript-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.event-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    gap: 8px;
    color: #dbeafe;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.dot.ok {
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.dot.warn {
    background: #f59e0b;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.12);
}

.dot.danger {
    background: #ef4444;
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.12);
}

.feedback-block {
    margin-top: 6px;
    color: #e5e7eb;
    display: grid;
    gap: 6px;
}

.feedback-block strong {
    color: #c7d2fe;
}

[data-theme="light"] .feedback-block {
    color: #0f172a;
}

[data-theme="light"] .feedback-block strong {
    color: #1d4ed8;
}

.feedback-form .settings-row textarea {
    min-height: 120px;
}

.feedback-form [data-teacher-feedback-input] {
    margin-bottom: 8px;
}

.feedback-form [data-knowledge-flag-input] {
    margin-bottom: 8px;
}

.identity-check-list {
    display: grid;
    gap: 10px;
}

.identity-check-item {
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.identity-check-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.identity-status-pill {
    margin: 0;
    padding: 5px 10px;
    font-size: 0.72rem;
}

.identity-check-thumb-link {
    display: grid;
    gap: 6px;
}

.identity-check-thumb {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.55);
}

[data-theme="light"] .identity-check-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .identity-check-thumb {
    background: #ffffff;
    border-color: #cbd5e1;
}

@media (max-width: 900px) {
    .transcript-layout {
        grid-template-columns: 1fr;
    }

    .viva-history-layout.show-feedback {
        grid-template-columns: 1fr;
    }

    .table-head,
    .table-row {
        grid-template-columns: 1.4fr 1.2fr 1fr;
        font-size: 0.9rem;
    }

    .transcript-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .transcript-head {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .transcript-head-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .name-row {
        gap: 6px;
        justify-content: stretch;
    }
    .transcript-select {
        min-height: 48px;
        font-size: 1rem;
    }

    .settings-row.split {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .settings-grid.max-two {
        grid-template-columns: 1fr;
    }
}

/* FEATURES SECTION */
.features-section {
    border: none;
    border-radius: 0;
    padding: 80px 24px;
    margin: 0 auto;
    background: transparent;
    box-shadow: none;
}

.feature-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.feature-group {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    background:
        radial-gradient(460px 180px at 10% 0%, rgba(34, 211, 238, 0.08), transparent 64%),
        rgba(255, 255, 255, 0.03);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.feature-group::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 35%);
    opacity: 0.55;
}

.feature-group:hover {
    transform: translateY(-2px);
}

.feature-group h3 {
    margin: 0;
}

.feature-card-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.feature-card-kicker {
    margin: 0 0 4px;
    color: #9fb5cf;
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.feature-chip-list {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: #dbeafe;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.2;
    padding: 7px 11px;
    white-space: nowrap;
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.feature-chip:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.07);
}

.feature-group-learning {
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.06), 0 10px 22px rgba(34, 211, 238, 0.08);
}

.feature-group-learning:hover {
    border-color: rgba(34, 211, 238, 0.52);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.08), 0 14px 28px rgba(34, 211, 238, 0.12);
}

.feature-group-learning .feature-group-label {
    color: #67e8f9;
}

.feature-group-learning h3 {
    color: #d8fbff;
}

.feature-group-learning .feature-chip {
    border-color: rgba(34, 211, 238, 0.26);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.04);
}

.feature-group-assessment {
    border-color: rgba(244, 114, 182, 0.34);
    background:
        radial-gradient(460px 180px at 10% 0%, rgba(244, 114, 182, 0.08), transparent 64%),
        rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.06), 0 10px 22px rgba(244, 114, 182, 0.08);
}

.feature-group-assessment:hover {
    border-color: rgba(244, 114, 182, 0.5);
    box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.08), 0 14px 28px rgba(244, 114, 182, 0.12);
}

.feature-group-assessment .feature-group-label {
    color: #f9a8d4;
}

.feature-group-assessment h3 {
    color: #ffe8f4;
}

.feature-group-assessment .feature-chip {
    border-color: rgba(244, 114, 182, 0.26);
    box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.04);
}

.feature-control-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 22px;
    align-items: center;
    margin-top: 18px;
    padding: 24px;
    border: 1px solid rgba(56, 189, 248, 0.26);
    border-radius: 20px;
    background:
        radial-gradient(520px 220px at 0% 0%, rgba(34, 211, 238, 0.12), transparent 66%),
        radial-gradient(420px 180px at 100% 100%, rgba(59, 130, 246, 0.1), transparent 70%),
        rgba(8, 19, 38, 0.52);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.06), 0 18px 40px rgba(2, 8, 23, 0.18);
}

.feature-control-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 34%, rgba(34, 211, 238, 0.05));
    opacity: 0.7;
}

.feature-control-panel > * {
    position: relative;
    z-index: 1;
}

.feature-control-panel h3 {
    margin: 0 0 10px;
    color: #e0f7ff;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.feature-control-panel p {
    max-width: 720px;
    margin: 0;
    color: #c7d2e4;
    line-height: 1.7;
}

.feature-control-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
}

.feature-control-list li {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 12px;
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    color: #dff7ff;
    font-size: 0.9rem;
    font-weight: 700;
}

[data-theme="light"] .features-section {
    background: transparent;
}

[data-theme="light"] .feature-group {
    background: rgba(248, 250, 252, 0.8);
}

[data-theme="light"] .feature-chip {
    background: rgba(255, 255, 255, 0.74);
    color: #334155;
    border-color: rgba(148, 163, 184, 0.38);
}

[data-theme="light"] .feature-card-kicker {
    color: #64748b;
}

[data-theme="light"] .feature-group-learning .feature-group-label {
    color: #0e7490;
}

[data-theme="light"] .feature-group-learning h3 {
    color: #0f172a;
}

[data-theme="light"] .feature-group-assessment .feature-group-label {
    color: #be185d;
}

[data-theme="light"] .feature-group-assessment h3 {
    color: #0f172a;
}

[data-theme="light"] .feature-control-panel {
    background: rgba(248, 250, 252, 0.84);
}

[data-theme="light"] .feature-control-panel h3 {
    color: #0f172a;
}

[data-theme="light"] .feature-control-panel p {
    color: #475569;
}

[data-theme="light"] .feature-control-list li {
    background: rgba(255, 255, 255, 0.74);
    color: #0f172a;
    border-color: rgba(14, 116, 144, 0.22);
}

@media (max-width: 900px) {
    .features-section {
        padding: 72px 20px 62px;
    }

    .feature-groups {
        grid-template-columns: 1fr;
    }

    .feature-group {
        padding: 18px;
    }

    .feature-chip {
        white-space: normal;
    }

    .feature-control-panel {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .feature-control-list {
        grid-template-columns: 1fr;
    }

}
    .transcript-meta {
        flex-direction: column;
        align-items: end;
    }

    .transcript-head {
        align-items: stretch;
    }

    .settings-row.split {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }


.section.spotlight#dashboard {
    margin-top: 40px;
}
.bubble.ai {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
}

.bubble.user {
    align-self: flex-end;
    background: rgba(14, 165, 233, 0.16);
    border: 1px solid rgba(14, 165, 233, 0.4);
    color: #e0f2fe;
}

.bubble.user.alt {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.36);
}

.bubble.system {
    background: rgba(234, 179, 8, 0.14);
    border: 1px dashed rgba(234, 179, 8, 0.5);
    color: #facc15;
    font-style: italic;
}

.msg-ts {
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.8rem;
    padding-left: 8px;
}

.key-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
    color: #cfd8e3;
    font-size: 0.95rem;
}

.key-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.transcript-key {
    margin-top: 12px;
    max-width: 620px;
}

.subhead {
    text-align: center;
    margin: 28px auto 18px;
}

.panel-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-top: 6px;
    gap: 12px;
}

.simulation-note {
    color: #9fb5cf;
    font-size: 0.9rem;
    margin: 6px 0 10px;
}

.controls {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.controls-inner {
    display: inline-flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.control-btn {
    padding: 8px 12px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #dbeafe;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.8rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.control-btn.primary {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    border-color: rgba(255, 255, 255, 0.12);
    color: #0b1224;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.25);
}

.start-viva-row {
    margin-top: 10px;
}

.start-viva-cta {
    width: 100%;
    justify-content: center;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    background: linear-gradient(135deg, #db2777, #f472b6);
    color: #fff5f8;
    border-color: rgba(219, 39, 119, 0.7);
    box-shadow: 0 10px 24px rgba(219, 39, 119, 0.35);
    animation: throb 1.4s ease-in-out infinite;
    transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.start-viva-cta:hover {
    background: linear-gradient(135deg, #e11d87, #f472b6);
}

.start-viva-cta:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    animation: none;
    box-shadow: none;
}

[data-theme="light"] .start-viva-cta {
    color: #fff5f8;
    box-shadow: 0 10px 24px rgba(219, 39, 119, 0.25);
}

.control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
}

.control-btn.start-viva-cta:hover {
    background: linear-gradient(135deg, #38bdf8, #60a5fa);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 12px 26px rgba(56, 189, 248, 0.35);
}

.control-btn.ghost {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .control-btn {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}

[data-theme="light"] .view-btn {
    color: #0f172a;
}

[data-theme="light"] .view-btn.active {
    background: rgba(0, 0, 0, 0.06);
    color: #0f172a;
}

[data-theme="light"] .view-btn.ghost {
    border-color: rgba(0, 0, 0, 0.12);
}

.throb-btn {
    /* Match the MachinaViva brand gradient */
    background: linear-gradient(140deg, #38bdf8, #ec4899);
    color: #0b1224;
    box-shadow: 0 10px 22px rgba(56, 189, 248, 0.22);
    animation: throb 1.8s infinite ease-in-out;
}

.throb-btn:hover {
    background: linear-gradient(140deg, #50cffd, #ff69b4);
    box-shadow: 0 14px 28px rgba(56, 189, 248, 0.26);
    border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="light"] .control-btn.primary {
    color: #0f172a;
}

[data-theme="light"] .throb-btn {
    color: #0b1224;
    border-color: rgba(56, 189, 248, 0.2);
    box-shadow: 0 10px 22px rgba(56, 189, 248, 0.18);
}

[data-theme="light"] .control-btn.throb-btn {
    background: linear-gradient(140deg, #66d8ff, #f29bc6);
    color: #0b1224;
}

[data-theme="light"] .control-btn.throb-btn:hover {
    background: linear-gradient(140deg, #7de2ff, #ffb3d6);
}

.meta {
    font-size: 0.9rem;
    color: #9fb5cf;
}

.ghost-btn {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 10px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-shell {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 0;
}

.input-shell :is(input, textarea) {
    flex: 1;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 0.95rem;
    outline: none;
    font: inherit;
    width: 100%;
}

[data-theme="light"] .input-shell :is(input, textarea) {
    color: #0f172a;
}

.input-shell :is(input, textarea)::placeholder {
    color: #94a3b8;
}

[data-theme="light"] .input-shell :is(input, textarea)::placeholder {
    color: #475569;
}

.input-shell textarea {
    resize: none;
    overflow-y: hidden;
    min-height: 1.35em;
    line-height: 1.35;
}

.viva-audio-stream {
    display: none;
    width: 100%;
    min-height: 24px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #bae6fd;
}

.viva-audio-stream-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #7dd3fc;
    white-space: nowrap;
}

.viva-audio-stream-bars {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    max-width: 180px;
    justify-content: flex-end;
}

.viva-audio-stream-bars span {
    width: 4px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #38bdf8, #f472b6);
    opacity: 0.78;
    transform-origin: center bottom;
    --voice-level: 0.35;
    transform: scaleY(var(--voice-level));
    transition: transform 90ms linear, opacity 90ms linear;
}

.viva-input.is-audio-recording .input-shell textarea {
    display: none;
}

.viva-input.is-audio-recording .input-shell {
    align-items: center;
}

.viva-input.is-audio-recording .viva-audio-stream {
    display: inline-flex;
}

.viva-input.is-audio-transcribing .input-shell textarea:disabled {
    opacity: 1;
}

.viva-input.is-audio-transcribing .input-shell.disabled {
    opacity: 1;
}

[data-theme="light"] .viva-audio-stream-label {
    color: #0369a1;
}

.input-shell.disabled,
.input-shell :is(input, textarea):disabled {
    opacity: 0.4;
}

.input-shell.disabled .input-caret {
    display: none;
}

.disabled :is(input, textarea) {
    cursor: not-allowed;
}

.input-caret {
    width: 10px;
    height: 18px;
    border-left: 2px solid transparent;
}

.send-btn {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.send-btn.is-submitting {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.send-btn .btn-spinner {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: buttonSpin 0.7s linear infinite;
}

.viva-send-btn {
    min-width: 96px;
}

.viva-send-btn .send-btn-icon {
    display: none;
}

.send-btn.throb {
    background: linear-gradient(120deg, #ec4899, #f472b6);
    color: #0b1224;
    border-color: rgba(236, 72, 153, 0.6);
    cursor: pointer;
}

[data-theme="light"] .send-btn.submit-mode,
.send-btn.submit-mode {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: #0b1224;
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 10px 24px rgba(236, 72, 153, 0.35);
    animation: throb 1.4s ease-in-out infinite;
    cursor: pointer;
}

[data-theme="light"] .send-btn.submit-mode.is-submitting,
.send-btn.submit-mode.is-submitting {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: #0b1224;
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 10px 24px rgba(236, 72, 153, 0.35);
    animation: none;
    cursor: progress;
}

[data-theme="light"] .send-btn {
    background: #f8fafc;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .send-btn:disabled {
    background: #e2e8f0;
    color: #475569;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: none;
}

.send-btn:disabled {
    cursor: not-allowed;
}

[data-theme="light"] .send-btn.submit-mode.is-submitting:disabled,
.send-btn.submit-mode.is-submitting:disabled {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: #0b1224;
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 10px 24px rgba(236, 72, 153, 0.35);
    cursor: progress;
}

/* Loader state */
.loader-row {
    display: none !important; /* hide footer loader; loader bubble is shown in chat instead */
}

.loader-dots {
    display: inline-flex;
    gap: 4px;
}

.loader-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f9a8d4;
    animation: pulse 1.1s infinite ease-in-out;
}

.loader-dots span:nth-child(2) { animation-delay: 0.14s; }
.loader-dots span:nth-child(3) { animation-delay: 0.28s; }

.loader-text {
    color: #e8ecf5;
    letter-spacing: 0.01em;
}

.fade-out {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

@keyframes throb {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.28); }
    50% { transform: scale(1); box-shadow: 0 0 0 12px rgba(236, 72, 153, 0.12); }
}

@keyframes pulse {
    0%, 100% { transform: scale(0.8); opacity: 0.6; }
    50% { transform: scale(1); opacity: 1; }
}

@keyframes buttonSpin {
    to { transform: rotate(360deg); }
}

@keyframes blink {
    to { visibility: hidden; }
}

/* SECTIONS */
.section {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-head {
    max-width: 860px;
    margin: 0 auto 40px;
    text-align: center;
}

.section-head.compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    text-align: left;
    max-width: none;
    margin-bottom: 18px;
}

.section-head.compact h2 {
    margin: 0;
}

.section-head h2 {
    margin: 8px 0 8px;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-head .lede {
    color: var(--muted);
    margin: 0 auto;
}

.dash-compact {
    padding: 10px 12px;

}

.alt {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.spotlight {
    border: none;
    border-radius: 0;
    padding: 80px 24px;
    margin: 0 auto;
    background: transparent;
    box-shadow: none;
}

.flow-grid,
.pillar-grid,
.trust-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.flow-card,
.pillar-card,
.trust-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: left;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    height: 100%;
}

.flow-streams {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: stretch;
}

.flow-stream {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
}

.flow-label {
    color: #9fb5cf;
    margin-bottom: 8px;
}

.flow-label.student {
    color: #67e8f9;
}

.flow-label.teacher {
    color: #f9a8d4;
}

.flow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    grid-auto-rows: 1fr;
    flex: 1;
}

.flow-stream:nth-child(1) .flow-card {
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.08), rgba(14, 165, 233, 0.02));
    border-color: rgba(14, 165, 233, 0.25);
}

.flow-stream:nth-child(2) .flow-card {
    background: linear-gradient(145deg, rgba(236, 72, 153, 0.08), rgba(236, 72, 153, 0.02));
    border-color: rgba(236, 72, 153, 0.25);
}

@media (max-width: 900px) {
    .flow-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.flow-card h3,
.pillar-card h3,
.trust-card h3 {
    margin: 8px 0 10px;
    color: #e5e7eb;
}

.step {
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.1em;
    font-size: 0.85rem;
}

.pillar-grid {
    margin-top: 24px;
}

/* USE CASES */
#use-cases .use-case-card,
#demos .demo-scenario-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

#use-cases .use-case-card::before,
#demos .demo-scenario-card::before {
    content: "";
    position: absolute;
    inset: -20% 35% auto -25%;
    height: 140px;
    border-radius: 999px;
    filter: blur(22px);
    opacity: 0.32;
    pointer-events: none;
}

#use-cases .use-case-card:hover,
#demos .demo-scenario-card:hover {
    transform: translateY(-2px);
}

#use-cases .use-case-card.glow-green,
#demos .demo-scenario-card.demo-scenario-formative {
    border-color: rgba(74, 222, 128, 0.34);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(74, 222, 128, 0.12);
}

#use-cases .use-case-card.glow-green::before,
#demos .demo-scenario-card.demo-scenario-formative::before {
    background: radial-gradient(circle at 30% 40%, rgba(74, 222, 128, 0.5), rgba(74, 222, 128, 0));
}

#use-cases .use-case-card.glow-amber,
#demos .demo-scenario-card.demo-scenario-revision {
    border-color: rgba(251, 191, 36, 0.34);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(251, 191, 36, 0.12);
}

#use-cases .use-case-card.glow-amber::before,
#demos .demo-scenario-card.demo-scenario-revision::before {
    background: radial-gradient(circle at 30% 40%, rgba(251, 191, 36, 0.48), rgba(251, 191, 36, 0));
}

#use-cases .use-case-card.glow-pink,
#demos .demo-scenario-card.demo-scenario-verification {
    border-color: rgba(244, 114, 182, 0.34);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(244, 114, 182, 0.12);
}

#use-cases .use-case-card.glow-pink::before,
#demos .demo-scenario-card.demo-scenario-verification::before {
    background: radial-gradient(circle at 30% 40%, rgba(244, 114, 182, 0.48), rgba(244, 114, 182, 0));
}

[data-theme="light"] #use-cases .use-case-card,
[data-theme="light"] #demos .demo-scenario-card {
    background: #ffffff;
}

[data-theme="light"] #use-cases .use-case-card.glow-green,
[data-theme="light"] #demos .demo-scenario-card.demo-scenario-formative {
    border-color: rgba(22, 163, 74, 0.32);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(22, 163, 74, 0.1);
}

[data-theme="light"] #use-cases .use-case-card.glow-amber,
[data-theme="light"] #demos .demo-scenario-card.demo-scenario-revision {
    border-color: rgba(217, 119, 6, 0.34);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(217, 119, 6, 0.1);
}

[data-theme="light"] #use-cases .use-case-card.glow-pink,
[data-theme="light"] #demos .demo-scenario-card.demo-scenario-verification {
    border-color: rgba(219, 39, 119, 0.34);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(219, 39, 119, 0.1);
}

.challenge-grid .pillar-card {
    position: relative;
    overflow: hidden;
}

.icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.challenge-grid .pillar-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.challenge-grid .pillar-card .muted {
    color: #9fb5cf;
    margin-top: 6px;
}

/* WHY SECTION */
.why-section {
    position: relative;
    background: transparent;
    padding-top: 104px;
    padding-bottom: 78px;
}

.why-grid {
    position: relative;
    padding-left: 30px;
    gap: 20px;
}

.why-grid::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.75), rgba(96, 165, 250, 0.72), rgba(244, 114, 182, 0.78));
}

.why-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 22px 16px;
    border: 1px solid var(--border);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.why-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.why-card::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: rgba(14, 165, 233, 0.35);
    box-shadow: 0 0 0 6px rgba(14, 165, 233, 0.12);
}

.why-card h3 {
    margin: 0;
}

.why-card > p {
    max-width: 34ch;
    line-height: 1.56;
}

.why-kicker {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b7c9dd;
    font-weight: 700;
}

.why-outcome {
    margin: 0;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.35;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #eff6ff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 14px 28px rgba(2, 6, 23, 0.3);
    transform: translateY(0);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    text-wrap: balance;
}

.why-card:hover {
    transform: translateY(-2px);
}

.why-item:hover .why-outcome {
    transform: translateY(-1px);
}

.why-outcome-thinking {
    border-color: rgba(34, 211, 238, 0.58);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.26), rgba(34, 211, 238, 0.08));
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.25), 0 16px 30px rgba(6, 182, 212, 0.24);
}

.why-outcome-evidence {
    border-color: rgba(96, 165, 250, 0.56);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.26), rgba(96, 165, 250, 0.08));
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.22), 0 16px 30px rgba(59, 130, 246, 0.22);
}

.why-outcome-approach {
    border-color: rgba(244, 114, 182, 0.56);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.26), rgba(244, 114, 182, 0.08));
    box-shadow: 0 0 0 1px rgba(244, 114, 182, 0.22), 0 16px 30px rgba(236, 72, 153, 0.22);
}

.why-card-thinking {
    border-color: rgba(34, 211, 238, 0.44);
    box-shadow: 0 12px 26px rgba(34, 211, 238, 0.14);
}

.why-card-thinking::before {
    background: rgba(34, 211, 238, 0.42);
    box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.16);
}

.why-card-thinking:hover {
    border-color: rgba(34, 211, 238, 0.7);
    box-shadow: 0 16px 30px rgba(34, 211, 238, 0.2);
}

.why-card-evidence {
    border-color: rgba(96, 165, 250, 0.42);
    box-shadow: 0 12px 26px rgba(96, 165, 250, 0.14);
}

.why-card-evidence::before {
    background: rgba(96, 165, 250, 0.4);
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.15);
}

.why-card-evidence:hover {
    border-color: rgba(96, 165, 250, 0.68);
    box-shadow: 0 16px 30px rgba(96, 165, 250, 0.2);
}

.why-card-approach {
    border-color: rgba(244, 114, 182, 0.42);
    box-shadow: 0 12px 26px rgba(244, 114, 182, 0.14);
}

.why-card-approach::before {
    background: rgba(244, 114, 182, 0.4);
    box-shadow: 0 0 0 6px rgba(244, 114, 182, 0.15);
}

.why-card-approach:hover {
    border-color: rgba(244, 114, 182, 0.68);
    box-shadow: 0 16px 30px rgba(244, 114, 182, 0.2);
}

[data-theme="light"] .why-section {
    background: transparent;
}

[data-theme="light"] .why-grid::before {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.6), rgba(59, 130, 246, 0.56), rgba(236, 72, 153, 0.58));
}

[data-theme="light"] .why-kicker {
    color: #334155;
}

[data-theme="light"] .why-outcome {
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 10px 22px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .why-outcome-thinking {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(34, 211, 238, 0.06));
    border-color: rgba(8, 145, 178, 0.44);
}

[data-theme="light"] .why-outcome-evidence {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(96, 165, 250, 0.06));
    border-color: rgba(37, 99, 235, 0.42);
}

[data-theme="light"] .why-outcome-approach {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(244, 114, 182, 0.06));
    border-color: rgba(219, 39, 119, 0.42);
}

@media (max-width: 900px) {
    .why-section {
        padding-top: 86px;
        padding-bottom: 64px;
    }

    .why-grid {
        padding-left: 0;
    }

    .why-grid::before {
        display: none;
    }

    .why-card::before {
        display: none;
    }

    .why-card > p {
        max-width: none;
    }
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 20px;
    align-items: stretch;
}

.price-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
}

.price-card.highlight {
    border-color: rgba(246, 96, 164, 0.6);
    box-shadow: 0 14px 32px rgba(246, 96, 164, 0.25);
}

.price-top h3 {
    font-size: 2rem;
    margin: 2px 0;
}

.price-sub {
    color: #9fb5cf;
    margin: 0;
}

.price-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.price-points li {
    color: #dbeafe;
    font-size: 0.95rem;
}

.price-card .cta {
    margin-top: auto;
    align-self: flex-start;
}

.price-footnote {
    margin-top: 12px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.logo-strip {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    padding: 12px 0;
    position: relative;
}

.logo-track {
    display: flex;
    gap: 24px;
    align-items: center;
    animation: logo-marquee 28s linear infinite;
    padding-left: 12px;
}

.logo-card {
    flex: 0 0 auto;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
}

.logo-img {
    max-height: 70px;
    max-width: 140px;
    object-fit: contain;
}

@keyframes logo-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.price-compare {
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px;
}

.price-compare ul {
    list-style: disc;
    padding-left: 18px;
    margin: 6px 0 0;
    color: #cbd5e1;
}

/* CONTACT */
.contact-section {
    border: none;
    border-radius: 0;
    padding: 80px 24px;
    margin: 0 auto;
    background: transparent;
    box-shadow: none;
}

.contact-shell {
    max-width: 880px;
    margin: 0 auto;
}

.contact-form {
    border: 1px solid rgba(56, 189, 248, 0.34);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.1), 0 16px 40px rgba(0, 0, 0, 0.28);
    padding: 22px;
    display: grid;
    gap: 14px;
}

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

.contact-field {
    min-width: 0;
}

.contact-field-full {
    grid-column: 1 / -1;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(56, 189, 248, 0.26);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.64);
    color: #f8fafc;
    padding: 11px 13px;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.contact-field textarea {
    min-height: 142px;
    resize: vertical;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
    color: #9fb5cf;
}

.contact-field select:invalid {
    color: #9fb5cf;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.72);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
    background: rgba(15, 23, 42, 0.76);
}

.contact-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #dbeafe;
    font-size: 0.94rem;
}

.contact-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0ea5e9;
    margin: 0;
}

.contact-actions {
    display: flex;
    justify-content: flex-end;
}

.contact-feedback {
    margin: 0;
    color: #bfdbfe;
    font-size: 0.95rem;
}

[data-theme="light"] .contact-section {
    background: transparent;
    box-shadow: none;
}

[data-theme="light"] .contact-form {
    border-color: rgba(14, 165, 233, 0.34);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.12), 0 14px 34px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .contact-field input,
[data-theme="light"] .contact-field select,
[data-theme="light"] .contact-field textarea {
    border-color: rgba(148, 163, 184, 0.5);
    background: #ffffff;
    color: #0f172a;
}

[data-theme="light"] .contact-field input::placeholder,
[data-theme="light"] .contact-field textarea::placeholder {
    color: #64748b;
}

[data-theme="light"] .contact-field select:invalid {
    color: #64748b;
}

[data-theme="light"] .contact-field input:focus,
[data-theme="light"] .contact-field select:focus,
[data-theme="light"] .contact-field textarea:focus {
    border-color: rgba(14, 165, 233, 0.6);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
    background: #ffffff;
}

[data-theme="light"] .contact-checkbox {
    color: #334155;
}

[data-theme="light"] .contact-feedback {
    color: #1d4ed8;
}

@media (max-width: 900px) {
    .contact-section {
        padding: 72px 20px 62px;
    }

    .contact-form {
        padding: 16px;
        border-radius: 14px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .contact-field-full {
        grid-column: auto;
    }

    .contact-actions .cta {
        width: 100%;
        justify-content: center;
    }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 12, 23, 0.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 40;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: #0b1727;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    max-width: 720px;
    width: 100%;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-close {
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

.modal-sub {
    color: #9fb5cf;
    margin-top: 6px;
}

.modal-form,
.modal-success {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-success {
    display: none;
}

.modal-success.visible {
    display: flex;
}

.modal-overlay.holiday .modal {
    max-width: 520px;
}

.modal-overlay.holiday.open {
    display: flex;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-row.split {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.modal-form label span {
    display: block;
    color: #cbd5e1;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    color: #e2e8f0;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

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

.form-note {
    color: #94a3b8;
    font-size: 0.9rem;
}

.modal-success p {
    color: #e2e8f0;
    margin: 0;
}

.floating-cta {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 45;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(8, 20, 38, 0.9)),
        radial-gradient(220px 100px at 8% 0%, rgba(56, 189, 248, 0.2), transparent 70%);
    color: #e0f2fe;
    border: 1px solid rgba(56, 189, 248, 0.34);
    border-radius: 14px;
    padding: 14px 18px;
    font-weight: 780;
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.42), 0 0 0 1px rgba(56, 189, 248, 0.08);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.96);
    min-width: 226px;
    max-width: min(92vw, 310px);
    text-align: left;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.floating-cta:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.56);
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.48), 0 0 0 1px rgba(56, 189, 248, 0.16), 0 0 28px rgba(56, 189, 248, 0.16);
}

.floating-cta:active {
    transform: translateY(0);
}

.floating-cta.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    animation: pop-in 0.58s cubic-bezier(0.2, 1.12, 0.25, 1);
}

.floating-cta small {
    display: block;
    font-weight: 600;
    font-size: 0.78rem;
    color: #9bdaf8;
    opacity: 0.92;
    margin-top: 2px;
}

.floating-cta-close {
    position: absolute;
    right: 10px;
    top: 8px;
    font-size: 1.1rem;
    color: rgba(6, 17, 31, 0.7);
    cursor: pointer;
    padding: 4px;
}

.floating-cta.hidden {
    display: none;
}

@media (max-width: 640px) {
    .floating-cta {
        left: 12px;
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        min-width: 0;
        border-radius: 12px;
        padding: 13px 15px;
    }
}

@keyframes pop-in {
    0% { transform: translateY(14px) scale(0.94); opacity: 0; }
    64% { transform: translateY(-3px) scale(1.02); opacity: 1; }
    84% { transform: translateY(1px) scale(0.995); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* EXPERIENCE */
.experience {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: stretch;
}

.experience-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(14, 165, 233, 0.06));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.experience-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.experience-foot {
    margin-top: 16px;
    display: grid;
    gap: 8px;
}

.meta-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.1);
}

.experience-list {
    display: grid;
    gap: 12px;
}

.list-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.pill {
    display: inline-block;
    background: rgba(56, 189, 248, 0.14);
    color: #e0f2fe;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-bottom: 6px;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

#demos .use-case-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.demo-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.demo-chip-row .pill {
    margin-bottom: 0;
    font-size: 0.78rem;
    padding: 4px 10px;
}

.demo-scenario-label {
    margin: 0;
    color: #9fb5cf;
}

.demo-scenario-title {
    margin: 2px 0 2px;
    font-size: 1.02rem;
}

.demo-scenario-copy {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: #b9c8dc;
}

[data-theme="light"] .demo-scenario-copy {
    color: #475569;
}

/* TRUST */
.trust-grid {
    margin-top: 14px;
}

/* CTA */
.cta {
    text-align: left;
}

.cta-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px;
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    border-radius: 22px;
    color: #03101f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 25px 60px rgba(56, 189, 248, 0.45);
}

.cta-inner h2 {
    color: #03101f;
    margin: 4px 0 10px;
}

.cta-inner .lede {
    color: #072031;
}

.cta-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cta.light,
.cta .light {
    color: #dceeff;
}

.cta .ghost.light {
    border-color: rgba(3, 16, 31, 0.2);
    color: #072031;
    background: rgba(255, 255, 255, 0.16);
}

/* FOOTER */
.footer {
    padding: 40px 24px 50px;
    text-align: center;
    color: #9fb5cf;
    font-size: 0.95rem;
    border-top: 1px solid var(--border);
    margin-top: 50px;
}

.fade {
    opacity: 0;
    transition: opacity 0.8s ease;
}

@media (max-width: 768px) {
    .nav {
        position: sticky;
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 12px;
        align-items: center;
        min-height: 48px;
    }

    .nav .brand {
        align-items: center;
        gap: 8px;
        line-height: 1;
    }

    .nav .brand-mark {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 0.82rem;
    }

    .nav .brand span:not(.brand-mark) {
        display: inline-flex;
        align-items: center;
        line-height: 1;
        font-size: 0.94rem;
    }

    .nav .nav-toggle {
        min-height: 32px;
        padding: 6px 9px;
        line-height: 1;
    }

    .nav.nav-landing {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .nav.nav-landing .nav-toggle {
        margin-left: auto;
    }

    .nav.nav-with-menu {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px;
    }

    .nav.nav-with-menu .nav-toggle {
        margin-left: auto;
    }

    .nav.nav-with-menu [data-nav-links] {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 0 4px;
        border-top: 1px solid var(--border);
        display: none;
    }

    .nav.nav-with-menu [data-nav-links].open {
        display: flex;
    }

    .nav.nav-with-menu.nav-with-timer [data-nav-links] {
        display: none;
        border-top: none;
        padding: 0;
    }

    .nav.nav-with-menu.nav-with-timer [data-nav-links] > :not(.viva-nav-timer) {
        display: none;
    }

    .nav.nav-with-menu.nav-with-timer [data-nav-links].open {
        display: flex;
        border-top: 1px solid var(--border);
        padding: 8px 0 4px;
    }

    .nav.nav-with-menu.nav-with-timer [data-nav-links].open > :not(.viva-nav-timer) {
        display: flex;
        width: 100%;
        justify-content: center;
    }

    .table-controls.table-controls-split {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .table-controls {
        margin-bottom: 6px;
    }

    .table-controls-left,
    .table-controls-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .table-controls-left {
        justify-content: center;
    }

    .table-controls-right {
        justify-content: flex-start;
    }

    .mobile-icon-btn {
        min-width: 44px;
        padding: 10px;
        justify-content: center;
    }

    .mobile-icon-btn .icon {
        display: inline-flex;
        align-items: center;
    }

    .mobile-icon-btn .label {
        display: none;
    }

    .nav.nav-with-menu .brand {
        order: 1;
    }

    .nav.nav-with-menu .nav-toggle {
        order: 2;
    }

    .nav.nav-with-menu .nav-title {
        order: 3;
        width: 100%;
    }

    .nav.nav-with-menu [data-nav-links] {
        order: 4;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 0 4px;
        border-top: 1px solid var(--border);
        display: none;
    }

    .nav.nav-landing .nav-links {
        align-items: flex-end;
        text-align: right;
    }

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

    .hero {
        padding-top: 70px;
    }

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

    .cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .controls {
        justify-content: center;
    }
}
.settings-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.settings-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.settings-card h3 {
    margin: 0 0 10px;
}

.settings-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
    color: #dbeafe;
}

.settings-form-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 26px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    display: grid;
    gap: 14px;
    min-width: 0;
}

.settings-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-card-description {
    margin: -2px 0 2px;
}

.viva-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    --viva-head-control-height: 36px;
}
.viva-floating-actions {
    --viva-head-control-height: 34px;
    --viva-floating-control-width: 144px;
    --viva-floating-offset: 28px;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 64px + var(--viva-floating-offset));
    right: var(--viva-floating-offset);
    z-index: 29;
    display: inline-grid;
    align-items: stretch;
    justify-items: stretch;
    gap: 7px;
    width: var(--viva-floating-control-width);
    max-width: calc(100vw - 28px);
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(13, 18, 36, 0.64);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(14px);
    overflow: hidden;
}
[data-theme="light"] .viva-floating-actions {
    background: rgba(248, 250, 252, 0.78);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}
.viva-head-actions .viva-nav-timer,
.viva-floating-actions .viva-nav-timer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--viva-head-control-height);
    margin-right: 0;
}
.viva-floating-actions .viva-nav-timer {
    width: 100%;
    min-width: 0;
    padding: 0 10px;
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.26);
    box-shadow: none;
}
.viva-speech-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: var(--viva-head-control-height);
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
}
.viva-floating-actions .viva-speech-toggle {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .viva-floating-actions .viva-speech-toggle {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}
.viva-speech-toggle .meta {
    margin: 0;
    white-space: nowrap;
    font-size: 0.82rem;
}
.speech-toggle-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}
.speech-toggle-icon svg {
    width: 16px;
    height: 16px;
}
.viva-speech-settings-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 999px;
}
.viva-theme-toggle-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    font-size: 0.88rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.viva-theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .viva-theme-toggle-btn {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.1);
    color: #0f172a;
}
[data-theme="light"] .viva-theme-toggle-btn:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.35);
}
.viva-speech-settings-btn svg {
    width: 17px;
    height: 17px;
}
.viva-speech-settings-btn:hover {
    border: none;
}
.viva-head-actions .viva-speech-select {
    min-width: 170px;
    height: 38px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.82);
    color: #e2e8f0;
    font-size: 0.86rem;
}
[data-theme="light"] .viva-head-actions .viva-speech-select {
    background: #ffffff;
    color: #0f172a;
}
.viva-head-actions .viva-speech-select[data-speech-speed] {
    min-width: 150px;
}
.viva-head-actions .viva-device-select {
    min-width: 190px;
}
.viva-head-actions .device-status-line {
    width: 100%;
    text-align: right;
    min-height: 1.2em;
}
.viva-speech-toggle .switch {
    width: 44px;
    height: 22px;
}
.viva-head-actions [data-early-submit].control-btn,
.viva-floating-actions [data-early-submit].control-btn {
    height: var(--viva-head-control-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.viva-floating-actions [data-early-submit].control-btn {
    width: 100%;
    min-width: 0;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
[data-theme="light"] .viva-floating-actions [data-early-submit].control-btn {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.1);
}
.viva-speech-toggle .switch input:disabled + .slider {
    opacity: 0.6;
    cursor: not-allowed;
}
.viva-head-actions .viva-speech-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
@media (max-width: 768px) {
    .viva-floating-actions {
        --viva-head-control-height: 32px;
        --viva-floating-control-width: 128px;
        --viva-floating-offset: 14px;
        top: calc(env(safe-area-inset-top, 0px) + 76px + var(--viva-floating-offset));
        right: var(--viva-floating-offset);
        gap: 5px;
        max-width: calc(100vw - 20px);
        padding: 4px;
        border-radius: 11px;
    }
    .viva-floating-actions .viva-speech-toggle {
        gap: 6px;
        padding: 0 6px;
    }
    .viva-floating-actions .viva-speech-toggle .meta {
        font-size: 0.76rem;
    }
    .viva-floating-actions .viva-speech-settings-btn {
        width: 28px;
        height: 28px;
    }
    .viva-floating-actions .viva-speech-settings-btn svg {
        width: 15px;
        height: 15px;
    }
    .viva-floating-actions .viva-nav-timer {
        padding: 0 8px;
        font-size: 0.78rem;
    }
    .viva-floating-actions [data-early-submit].control-btn {
        padding: 0 8px;
        font-size: 0.76rem;
    }
}
@media (max-width: 430px) {
    .viva-floating-actions {
        --viva-floating-control-width: 116px;
        --viva-floating-offset: 12px;
        top: calc(env(safe-area-inset-top, 0px) + 76px + var(--viva-floating-offset));
        right: var(--viva-floating-offset);
    }
}
.speech-settings-dialog {
    max-width: 560px;
}
.speech-settings-body {
    display: grid;
    gap: 10px;
}
.speech-settings-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}
.speech-settings-body .settings-row label {
    color: #e2e8f0;
}
.speech-settings-body .viva-speech-select {
    width: 100%;
    min-width: 0;
}
.speech-meter-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.speech-mic-meter-wrap {
    margin-top: 8px;
}
.speech-meter-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    opacity: 0.95;
}
.speech-meter-icon svg {
    width: 16px;
    height: 16px;
}
.speech-test-meter {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(56, 189, 248, 0.12);
    overflow: hidden;
}
.speech-test-meter span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--accent);
    transition: width 0.08s linear;
}
.speech-test-meter.is-active span {
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.38);
}
.speech-meter-row {
    gap: 8px;
    margin-top: 4px;
}
.speech-test-status {
    min-height: 1.2em;
}
.speech-mic-status {
    min-height: 1.2em;
}
.speech-device-status {
    min-height: 1.2em;
}
[data-theme="light"] .speech-settings-body .settings-row label {
    color: #0f172a;
}

.settings-row {
    display: grid;
    gap: 6px;
}

.settings-row.split {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.settings-row label {
    font-weight: 700;
    color: #e5e7eb;
}

.settings-row input,
.settings-row select,
.settings-row textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95rem;
}

.settings-row textarea {
    resize: vertical;
    min-height: 150px;
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: #e5e7eb;
}

.consent-row input {
    margin-top: 4px;
}

.consent-row label {
    font-weight: 500;
    color: #e5e7eb;
}

.settings-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    align-items: start;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.settings-grid > * {
    min-width: 0;
}

.settings-grid.max-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teacher-settings-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.teacher-settings-layout .settings-column {
    display: grid;
    gap: 16px;
    align-content: start;
    min-width: 0;
}

.teacher-settings-layout .settings-column-main,
.teacher-settings-layout .settings-column-side {
    grid-column: 1;
}

.settings-icon-rail {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(8, 14, 32, 0.62);
    backdrop-filter: blur(4px);
    z-index: 35;
}

.dash-view[data-view-pane="settings"].active .settings-icon-rail {
    display: flex;
}

.settings-icon-link {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.65);
    color: #a9c0dc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.settings-icon-link:hover {
    border-color: rgba(56, 189, 248, 0.5);
    color: #d7edff;
    background: rgba(17, 44, 78, 0.72);
}

.settings-icon-link:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.6);
    outline-offset: 2px;
}

.settings-grid.single-column {
    grid-template-columns: 1fr;
}

.terms-content {
    display: grid;
    gap: 14px;
    color: #cbd5e1;
    line-height: 1.6;
}

.terms-content h4 {
    margin: 0;
    color: #f8fafc;
}

.terms-content ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

[data-theme="light"] .terms-content {
    color: #0f172a;
}

[data-theme="light"] .terms-content h4 {
    color: #0f172a;
}

.policy-table {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: grid;
    gap: 0;
    background: rgba(15, 23, 42, 0.35);
}

.policy-row {
    display: grid;
    grid-template-columns: 140px 140px 1fr;
    gap: 12px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
}

.policy-row:first-child {
    border-top: none;
}

.policy-head {
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
    color: #f8fafc;
}

[data-theme="light"] .policy-table {
    background: #ffffff;
}

[data-theme="light"] .policy-head {
    color: #0f172a;
    background: #f1f5f9;
}

@media (max-width: 720px) {
    .policy-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .settings-grid.max-two {
        grid-template-columns: 1fr;
    }

    .teacher-settings-layout {
        grid-template-columns: 1fr;
    }

    .teacher-settings-layout .settings-column-main,
    .teacher-settings-layout .settings-column-side {
        grid-column: 1;
    }

    .settings-icon-rail {
        right: 10px;
        gap: 6px;
        padding: 6px;
        border-radius: 12px;
        background: rgba(8, 14, 32, 0.5);
    }

    .settings-icon-link {
        width: 30px;
        height: 30px;
        border-radius: 9px;
    }

    .table-card {
        overflow-x: auto;
    }
}
.settings-grid.max-two .settings-actions {
    grid-column: 1 / -1;
}

.settings-grid.single-column {
    grid-template-columns: 1fr;
}

.settings-title {
    margin: 0;
    font-size: 1.05rem;
    color: #e5e7eb;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.settings-title-icon {
    width: 24px;
    height: 24px;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.32);
    background: rgba(56, 189, 248, 0.1);
    color: #8fd6ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#settings-overview,
#settings-files,
#settings-viva,
#settings-tone,
#settings-history {
    scroll-margin-top: 96px;
}

.settings-actions.tight {
    margin: 0;
}

.settings-card-head .control-btn {
    margin-left: auto;
}

.assignment-info-toggle {
    min-width: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.assignment-info-toggle::before {
    content: "v";
    font-size: 0.72rem;
    line-height: 1;
}

[data-assignment-info-card].is-collapsed .assignment-info-toggle::before {
    content: ">";
}

.save-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: rgba(14, 165, 233, 0.9);
    color: #0b1224;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 50;
}

.save-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.save-confirm {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: min(380px, calc(100vw - 28px));
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.38);
    background: linear-gradient(145deg, rgba(8, 18, 45, 0.96), rgba(18, 34, 72, 0.92));
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.48);
    display: none;
    gap: 12px;
    z-index: 55;
}

.save-confirm.show {
    display: grid;
}

.save-confirm-copy {
    color: #dbeafe;
    font-size: 0.92rem;
    line-height: 1.4;
}

.save-confirm .control-btn {
    width: 100%;
}

.save-confirm .control-btn.primary {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    border-color: rgba(56, 189, 248, 0.55);
    color: #eff6ff;
}

.save-confirm .control-btn.primary:hover {
    background: linear-gradient(135deg, #0ea5e9, #1d4ed8);
    border-color: rgba(56, 189, 248, 0.7);
    color: #ffffff;
}

[data-theme="light"] .save-confirm {
    background: linear-gradient(145deg, #f8fbff, #edf5ff);
    border-color: rgba(2, 132, 199, 0.35);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

[data-theme="light"] .save-confirm-copy {
    color: #0f172a;
}

[data-theme="light"] .save-confirm .control-btn.primary {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    border-color: rgba(2, 132, 199, 0.45);
    color: #f8fafc;
}

[data-theme="light"] .save-confirm .control-btn.primary:hover {
    background: linear-gradient(135deg, #0369a1, #1d4ed8);
    border-color: rgba(2, 132, 199, 0.6);
    color: #ffffff;
}

.preview-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 50;
}

.preview-modal.show {
    display: flex;
}

.identity-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 10px 12px 0;
    overflow: hidden;
    overscroll-behavior: contain;
    z-index: 70;
}

.identity-modal.show {
    display: flex;
}

html.identity-modal-open,
body.identity-modal-open {
    overflow: hidden;
}

.identity-modal-dialog {
    width: min(620px, 100%);
    display: grid;
    gap: clamp(8px, 1.2vh, 12px);
    padding: 14px 16px calc(146px + env(safe-area-inset-bottom));
    margin: 0 auto;
    max-height: calc(100dvh - 10px);
    overflow: hidden;
    justify-items: center;
    text-align: center;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    scrollbar-width: none;
}

.identity-modal::-webkit-scrollbar,
.identity-modal-dialog::-webkit-scrollbar {
    display: none;
}

.identity-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    width: 100%;
    text-align: center;
}

.identity-camera-wrap {
    width: min(100%, min(290px, 32dvh));
    aspect-ratio: 1 / 1;
    height: auto;
    max-height: min(32dvh, 290px);
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(15, 23, 42, 0.85));
}

.identity-camera-wrap video,
.identity-camera-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.identity-camera-wrap video {
    object-fit: cover;
}

.identity-camera-wrap img {
    object-fit: contain;
}

.identity-contact-sheet {
    background: #08101d;
}

.identity-primary-instruction,
.identity-secondary-instruction,
.identity-capture-progress-label,
.identity-timeout,
.identity-processing,
.identity-modal [data-identity-status] {
    width: min(100%, 460px);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    color: #dbeafe;
}

.identity-primary-instruction {
    font-size: clamp(1rem, 0.96rem + 0.22vw, 1.12rem);
    font-weight: 800;
    color: #f8fafc;
}

.identity-secondary-instruction {
    margin-top: -4px;
    font-size: 0.96rem;
    font-weight: 700;
}

.identity-capture-progress-label {
    margin-top: 0;
    font-weight: 700;
}

.identity-capture-progress {
    width: min(100%, 290px);
    height: 9px;
    margin: 0 auto;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.identity-capture-progress-fill {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #0ea5e9;
    transform-origin: left center;
}

.identity-timeout {
    font-weight: 700;
    color: #bae6fd;
}

.identity-timeout.is-warning {
    color: #fca5a5;
}

.identity-processing {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.18);
}

.identity-processing-dots {
    gap: 6px;
}

.identity-processing-dots span {
    width: 10px;
    height: 10px;
    background: #38bdf8;
}

.identity-processing-text {
    font-weight: 700;
    color: #dbeafe;
}

.identity-modal .settings-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    margin: 0;
    padding: 16px max(16px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.98) 22%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.identity-modal .settings-actions .control-btn {
    width: min(100%, 680px);
}

.identity-modal [data-identity-capture].control-btn {
    min-height: 64px;
    padding: 18px 22px;
    border-radius: 16px;
    font-size: 1.12rem;
    font-weight: 800;
    background: #0ea5e9;
    border-color: rgba(56, 189, 248, 0.5);
    color: #eff6ff;
    box-shadow: 0 16px 34px rgba(14, 165, 233, 0.28);
    animation: throb 1.4s ease-in-out infinite;
    transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.identity-modal [data-identity-capture].control-btn:hover {
    background: #0284c7;
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.32);
}

.identity-modal [data-identity-dismiss].control-btn {
    min-height: 50px;
    padding: 12px 18px;
    font-size: 0.98rem;
}

[data-theme="light"] .identity-modal-dialog {
    background: #ffffff;
    border-color: #dbe4f0;
}

[data-theme="light"] .identity-camera-wrap {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), #f8fafc);
    border-color: #dbe4f0;
}

[data-theme="light"] .identity-primary-instruction,
[data-theme="light"] .identity-secondary-instruction,
[data-theme="light"] .identity-capture-progress-label,
[data-theme="light"] .identity-processing,
[data-theme="light"] .identity-modal [data-identity-status] {
    color: #0f172a;
}

[data-theme="light"] .identity-primary-instruction {
    color: #020617;
}

[data-theme="light"] .identity-timeout {
    color: #0369a1;
}

[data-theme="light"] .identity-capture-progress {
    background: rgba(203, 213, 225, 0.65);
    border-color: #dbe4f0;
}

[data-theme="light"] .identity-processing {
    background: rgba(219, 234, 254, 0.72);
    border-color: rgba(59, 130, 246, 0.16);
}

[data-theme="light"] .identity-processing-text {
    color: #0f172a;
}

[data-theme="light"] .identity-modal [data-identity-capture].control-btn {
    color: #eff6ff;
    box-shadow: 0 16px 34px rgba(14, 165, 233, 0.22);
}

[data-theme="light"] .identity-contact-sheet {
    background: #e2e8f0;
}

[data-theme="light"] .identity-modal .settings-actions {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 24%);
    border-top-color: #dbe4f0;
}

@media (max-height: 820px) {
    .identity-modal {
        padding: 8px 10px 0;
    }
    .identity-modal-dialog {
        gap: 8px;
        padding: 12px 14px calc(138px + env(safe-area-inset-bottom));
        max-height: calc(100dvh - 8px);
    }
    .identity-camera-wrap {
        width: min(100%, min(230px, 24dvh));
        max-height: min(24dvh, 230px);
    }
    .identity-camera-wrap video,
    .identity-camera-wrap img {
        height: 100%;
    }
    .identity-modal .settings-actions {
        margin: 0 -14px -14px;
        padding: 12px 14px 14px;
    }
}

.preview-dialog {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border);
    border-radius: 14px;
    max-width: 700px;
    width: 100%;
    max-height: 70vh;
    overflow: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    padding: 14px;
    color: #e2e8f0;
}

.preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 700;
}

.preview-body pre {
    white-space: pre-wrap;
    color: #e2e8f0;
    font-family: "Inter", system-ui, sans-serif;
}

[data-theme="light"] .preview-dialog {
    background: #ffffff;
    color: #0f172a;
}

[data-theme="light"] .preview-body pre {
    color: #0f172a;
}

.viva-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 60;
}

.viva-dialog {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border);
    border-radius: 14px;
    max-width: 640px;
    width: 100%;
    padding: 18px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
    color: #e2e8f0;
}

[data-theme="light"] .viva-dialog {
    background: #ffffff;
    color: #0f172a;
}

.viva-chat {
    min-height: 320px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
}

[data-theme="light"] .viva-chat {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.viva-wrap .settings-grid {
    align-items: start;
}
[data-theme="light"] .preview-dialog {
    background: #ffffff;
    color: #0f172a;
}

[data-theme="light"] .preview-body pre {
    color: #0f172a;
}

.viva-action {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.viva-chat-card {
    background: transparent;
    border: none;
    border-radius: 14px;
    padding: 0;
    box-shadow: none;
}

[data-theme="light"] .viva-chat-card {
    background: transparent;
    border: none;
    box-shadow: none;
}

.viva-chat-wrap {
    min-width: 0;
    max-width: 100%;
}

.viva-history-layout {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
    align-items: start;
    min-width: 0;
}

.viva-history-layout.show-feedback {
    grid-template-columns: 2fr 1fr;
}

.viva-history-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

@media (max-width: 900px) {
    .viva-history-layout.show-feedback {
        grid-template-columns: 1fr;
    }
}

.viva-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.viva-chat-window {
    min-height: 370px;
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: anywhere;
    contain: paint;
}

.panel-chat.viva-chat-window {
    height: auto;
}

[data-theme="light"] .viva-chat-window {
    background: rgba(15, 23, 42, 0.02);
}

.mcq-panel {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

[data-theme="light"] .mcq-panel {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.mcq-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 640px) {
    .mcq-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .mcq-head .meta,
    .mcq-head .mcq-status {
        width: 100%;
    }
}

.mcq-title {
    margin: 0;
    font-size: 1rem;
}

.mcq-question {
    font-size: 1rem;
    line-height: 1.4;
}

.mcq-options {
    display: grid;
    gap: 8px;
}

.mcq-option {
    text-align: left;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    color: inherit;
    cursor: pointer;
}

[data-theme="light"] .mcq-option {
    background: #ffffff;
    border-color: #e2e8f0;
}

.mcq-option.selected {
    border-color: rgba(56, 189, 248, 0.8);
    background: rgba(56, 189, 248, 0.15);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.15);
}

[data-theme="light"] .mcq-option.selected {
    border-color: rgba(14, 165, 233, 0.7);
    background: rgba(14, 165, 233, 0.12);
}

.mcq-option.is-correct {
    border-color: var(--mcq-correct-border);
    background: var(--mcq-correct-bg);
    box-shadow: 0 0 0 1px var(--mcq-correct-ring);
    color: var(--mcq-correct-text);
}

.mcq-option.is-incorrect {
    border-color: var(--mcq-incorrect-border);
    background: var(--mcq-incorrect-bg);
    box-shadow: 0 0 0 1px var(--mcq-incorrect-ring);
    color: var(--mcq-incorrect-text);
}

.mcq-instant-feedback {
    min-height: 20px;
}

.mcq-instant-feedback.is-correct {
    color: var(--mcq-correct-text);
}

.mcq-instant-feedback.is-incorrect {
    color: var(--mcq-incorrect-text);
}

.mcq-actions {
    display: flex;
    justify-content: flex-end;
}

.mcq-details summary {
    cursor: pointer;
    list-style: none;
}

.mcq-details summary::-webkit-details-marker {
    display: none;
}

.mcq-details summary::after {
    content: "+";
    float: right;
    opacity: 0.6;
}

.mcq-details[open] summary::after {
    content: "-";
}


.mcq-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.mcq-result-item {
    border-top: 1px solid var(--border);
    padding-top: 8px;
}

.mcq-result-question {
    font-size: 0.95rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mcq-result-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mcq-result-icon svg {
    width: 14px;
    height: 14px;
}

.mcq-result-icon.is-correct {
    color: var(--mcq-correct-text);
    opacity: 0.9;
}

.mcq-result-icon.is-wrong {
    color: var(--mcq-incorrect-text);
    opacity: 0.9;
}

.viva-input {
    margin-top: 16px;
    align-items: stretch;
    flex-wrap: wrap;
    position: relative;
}

.viva-input .input-shell,
.viva-input .viva-send-btn,
.viva-input .viva-audio-toggle {
    min-height: 44px;
    box-sizing: border-box;
}

.viva-input .viva-audio-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 220px;
    min-width: 220px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    padding-top: 0;
    padding-bottom: 0;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.viva-audio-toggle-icon {
    display: none;
}

.viva-audio-toggle-icon svg {
    width: 18px;
    height: 18px;
}

.viva-input .viva-audio-toggle:hover {
    transform: none;
}

@media (min-width: 641px) {
    .viva-input .viva-send-btn,
    .viva-input .viva-audio-toggle {
        height: 44px;
        min-height: 44px;
        max-height: 44px;
        align-self: flex-end;
    }
}

.tutor-bar-shell,
.coverage-bar-shell {
    flex: 0 0 100%;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.12), rgba(15, 23, 42, 0.36));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px rgba(14, 165, 233, 0.1);
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.coverage-bar-shell {
    border-color: rgba(34, 197, 94, 0.28);
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.1), rgba(15, 23, 42, 0.34));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px rgba(34, 197, 94, 0.08);
}

.tutor-bar-head,
.coverage-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.tutor-bar-label,
.tutor-bar-status,
.coverage-bar-label,
.coverage-bar-status {
    font-size: 0.83rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #cbd5f5;
}

.tutor-bar-status {
    color: #93c5fd;
}

.coverage-bar-status {
    color: #86efac;
}

.tutor-bar-track,
.coverage-bar-track {
    position: relative;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(8, 47, 73, 0.55);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.12);
    overflow: hidden;
}

.coverage-bar-track {
    background: rgba(20, 83, 45, 0.52);
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.12);
}

.tutor-bar-fill,
.coverage-bar-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.34);
    transition: width 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.coverage-bar-fill {
    background: linear-gradient(90deg, #22c55e, #84cc16);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.3);
}

.coverage-bar-shell.is-complete {
    border-color: rgba(132, 204, 22, 0.5);
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.18);
}

.coverage-bar-threshold {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 2px;
    border-radius: 999px;
    background: #f8fafc;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.28), 0 0 12px rgba(248, 250, 252, 0.32);
    transform: translateX(-50%);
}

.tutor-bar-center {
    display: none;
}

.tutor-bar-shell.is-aligned {
    border-color: rgba(236, 72, 153, 0.56);
    box-shadow: 0 10px 24px rgba(236, 72, 153, 0.24);
    animation: throb 1.4s ease-in-out infinite;
}

.tutor-bar-shell.is-aligned .tutor-bar-fill {
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.38);
}

.tutor-bar-shell.is-aligned .tutor-bar-status {
    color: #f9a8d4 !important;
}

[data-theme="light"] .tutor-bar-shell,
[data-theme="light"] .coverage-bar-shell {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.9), rgba(248, 250, 252, 0.96));
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 24px rgba(37, 99, 235, 0.08);
}

[data-theme="light"] .coverage-bar-shell {
    background: linear-gradient(145deg, rgba(220, 252, 231, 0.9), rgba(248, 250, 252, 0.96));
    border-color: rgba(22, 163, 74, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 24px rgba(22, 163, 74, 0.08);
}

[data-theme="light"] .tutor-bar-label,
[data-theme="light"] .coverage-bar-label {
    color: #334155;
}

[data-theme="light"] .tutor-bar-status {
    color: #2563eb;
}

[data-theme="light"] .coverage-bar-status {
    color: #15803d;
}

[data-theme="light"] .tutor-bar-track,
[data-theme="light"] .coverage-bar-track {
    background: rgba(191, 219, 254, 0.7);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

[data-theme="light"] .coverage-bar-track {
    background: rgba(187, 247, 208, 0.72);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.14);
}

[data-theme="light"] .coverage-bar-threshold {
    background: #166534;
    box-shadow: 0 0 0 1px rgba(248, 250, 252, 0.9), 0 0 10px rgba(22, 101, 52, 0.18);
}

[data-theme="light"] .tutor-bar-shell.is-aligned {
    border-color: rgba(236, 72, 153, 0.48);
    box-shadow: 0 10px 24px rgba(236, 72, 153, 0.18);
}

.viva-audio-panel {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.viva-audio-player {
    display: block;
    width: 100%;
    max-width: 460px;
    height: 36px;
}

.viva-audio-status {
    min-height: 1.2em;
}

.viva-audio-toggle.is-recording {
    border-color: rgba(239, 68, 68, 0.55);
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

[data-theme="light"] .viva-audio-toggle.is-recording {
    border-color: rgba(220, 38, 38, 0.45);
    background: rgba(220, 38, 38, 0.14);
    color: #7f1d1d;
}

.viva-nav-timer.is-hidden {
    display: none;
}

.viva-nav-timer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #e0f2fe;
}

[data-theme="light"] .viva-nav-timer {
    color: #0f172a;
    background: rgba(14, 165, 233, 0.18);
    border-color: rgba(14, 165, 233, 0.35);
}

.nav.viva-active {
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.18), 0 12px 32px rgba(236, 72, 153, 0.12);
    animation: vivaGlow 1.7s ease-in-out infinite;
}

@keyframes vivaGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.15), 0 10px 28px rgba(236, 72, 153, 0.12); }
    50% { box-shadow: 0 0 0 6px rgba(236, 72, 153, 0.09), 0 16px 38px rgba(236, 72, 153, 0.15); }
}

.is-hidden {
    display: none !important;
}

[data-viva-chat-card] {
    grid-column: auto;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    width: 100%;
}
[data-viva-chat-card].is-history {
    grid-column: 1 / -1;
}
.is-history .viva-chat-window {
    max-height: 65vh;
}
.settings-grid.single-column [data-viva-chat-card] {
    grid-column: 1 / -1;
}

.layout-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 8px 10px;
    min-width: 34px;
}

.layout-icon {
    width: 22px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 4px;
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.layout-icon::after {
    content: "";
    position: absolute;
    border-radius: 2px;
}

.layout-columns::before,
.layout-columns::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 4px;
    height: 10px;
    transform: translateY(-50%);
    background: currentColor;
    border-radius: 2px;
}

.layout-columns::before {
    left: 4px;
}

.layout-columns::after {
    right: 4px;
}

.layout-rows::after {
    width: 14px;
    height: 4px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: currentColor;
    border-radius: 3px;
    box-shadow: 0 8px 0 currentColor, 0 -8px 0 currentColor;
}

@media (max-width: 820px) {
    .layout-toggle-btn {
        display: none;
    }
}

.resource-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 0.9rem;
    margin: 10px 28px;
}

.tracking-table {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tracking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.tracking-item.tracking-item-stack {
    flex-direction: column;
    align-items: stretch;
}

.tracking-item.tracking-item-stack > :last-child {
    width: 100%;
}

.tracking-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tracking-item-subfield {
    display: grid;
    gap: 6px;
}
.tracking-item.is-disabled {
    opacity: 0.55;
    cursor: default;
}
.tracking-item.is-disabled input,
.tracking-item.is-disabled select,
.tracking-item.is-disabled textarea {
    pointer-events: none;
}

.tracking-label {
    font-weight: 700;
    color: #e5e7eb;
}

[data-theme="light"] .settings-title {
    color: #0f172a;
}

[data-theme="light"] .tracking-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .tracking-label {
    color: #0f172a;
}

[data-theme="light"] .meta,
[data-theme="light"] .table-note {
    color: #475569;
}

[data-theme="light"] .control-btn {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}

[data-theme="light"] .view-btn {
    color: #0f172a;
}

[data-theme="light"] .view-btn.active {
    background: rgba(0, 0, 0, 0.06);
    color: #0f172a;
}

[data-theme="light"] .view-btn.ghost {
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .settings-row label {
    color: #0f172a;
}

[data-theme="light"] .settings-row input,
[data-theme="light"] .settings-row select,
[data-theme="light"] .settings-row textarea {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

[data-theme="light"] .consent-row,
[data-theme="light"] .consent-row label {
    color: #0f172a;
}

.resource-table {
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    color: #e5e7eb;
}

.resource-head,
.resource-row {
    display: grid;
    grid-template-columns: 2fr 1fr 0.8fr;
    padding: 10px 12px;
    align-items: center;
}

.resource-head {
    background: rgba(255, 255, 255, 0.06);
    font-weight: 700;
}

.resource-row {
    border-top: 1px solid var(--border);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    min-width: 44px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(148, 163, 184, 0.28);
    transition: .2s;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.32);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 2px;
    background-color: #94a3b8;
    transition: .2s;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.switch input:checked + .slider {
    background-color: rgba(56, 189, 248, 0.25);
    border-color: rgba(56, 189, 248, 0.45);
}

.switch input:checked + .slider:before {
    transform: translateX(18px);
    background-color: #0ea5e9;
}
.settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.settings-history {
    display: grid;
    gap: 12px;
}

.history-entry .meta {
    margin-bottom: 6px;
}

.history-list {
    margin: 0;
    padding-left: 18px;
}

.history-label {
    font-weight: 700;
}

.history-details summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: #e2e8f0;
}

.history-details summary::-webkit-details-marker {
    display: none;
}

.history-details summary::after {
    content: "▾";
    margin-left: 8px;
    font-size: 0.85rem;
    opacity: 0.7;
}

.history-details[open] summary::after {
    content: "▴";
}

.settings-details summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.settings-details summary::-webkit-details-marker {
    display: none;
}

.settings-details summary::after {
    content: "▾";
    margin-left: 8px;
    font-size: 0.85rem;
    opacity: 0.7;
}

.settings-details[open] summary::after {
    content: "▴";
}

.settings-actions .view-btn {
    flex: 1 1 100%;
    justify-content: center;
    text-align: center;
}

.upload-hint {
    margin: 8px 0 4px;
    color: #cfd8e3;
    font-size: 0.95rem;
}

.attempt-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.attempt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.attempt-row:last-child {
    border-bottom: none;
}

.attempt-actions {
    display: inline-flex;
    gap: 10px;
}

.attempt-more-toggle {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.12);
    color: #cdefff;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.attempt-more-toggle:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.5);
    color: #e6f6ff;
}

.attempt-more-toggle:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.65);
    outline-offset: 2px;
}

[data-theme="light"] .attempt-more-toggle {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(2, 132, 199, 0.35);
    color: #0c4a6e;
}

[data-theme="light"] .attempt-more-toggle:hover {
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(2, 132, 199, 0.48);
    color: #075985;
}

.submission-table-wrap {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

[data-theme="light"] .submission-table-wrap {
    border-color: rgba(15, 23, 42, 0.08);
    background: #ffffff;
}

.submission-table-header,
.submission-row {
    display: grid;
    grid-template-columns: 2fr 0.9fr 0.9fr;
    gap: 12px;
    padding: 12px 14px;
}

.submission-table-header {
    font-weight: 700;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .submission-table-header {
    color: #0f172a;
    background: #f8fafc;
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

.submission-table-body .submission-row {
    align-items: center;
}

.submission-table-body .submission-row.row-alt {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .submission-table-body .submission-row.row-alt {
    background: #f8fafc;
}

.upload-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-inline input[type="file"] {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
}

.upload-inline button {
    flex: 1 0 auto;
    min-height: 44px;
}

.resource-upload-progress {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.resource-upload-progress-track {
    width: 100%;
    max-width: 360px;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    overflow: hidden;
}

.resource-upload-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #22d3ee);
    transition: width 120ms linear;
}

[data-theme="light"] .resource-upload-progress-track {
    background: rgba(148, 163, 184, 0.34);
}

[data-theme="light"] .resource-upload-progress-fill {
    background: linear-gradient(90deg, #0284c7, #06b6d4);
}

.upload-hint {
    color: #fca5a5;
    margin-top: 6px;
}

.upload-hint.is-warning {
    color: #fcd34d;
}

[data-theme="light"] .upload-hint {
    color: #b91c1c;
}

[data-theme="light"] .upload-hint.is-warning {
    color: #92400e;
}

.file-chip {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

[data-theme="light"] .file-chip {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
}

.file-chip-name {
    font-weight: 700;
    margin-right: 10px;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-chip-name-link {
    display: none;
}

.viva-files {
    margin-top: 16px;
    display: block;
}

.viva-files .file-chip {
    flex-wrap: wrap;
}

.file-chip-warning {
    width: 100%;
    margin-top: 2px;
    color: #cbd5e1;
}

[data-theme="light"] .file-chip-warning {
    color: #475569;
}

.description-box {
    min-height: 120px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    white-space: pre-line;
}

[data-theme="light"] .description-box {
    border-color: rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

.unlimited-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.submission-cell.file-name {
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="light"] .submission-cell.file-name {
    color: #0f172a;
}

.submission-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.slider-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.slider-toggle input {
    display: none;
}

.slider-track {
    width: 44px;
    min-width: 44px;
    height: 22px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    position: relative;
    transition: background 0.2s ease;
    border: 1px solid rgba(148, 163, 184, 0.32);
}

[data-theme="light"] .slider-track {
    background: #e2e8f0;
    border-color: rgba(15, 23, 42, 0.08);
}

.slider-thumb {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slider-toggle input:checked + .slider-track {
    background: rgba(56, 189, 248, 0.25);
    border-color: rgba(56, 189, 248, 0.45);
}

.slider-toggle input:checked + .slider-track .slider-thumb {
    background: linear-gradient(135deg, #38bdf8, #ec4899);
    transform: translateX(20px);
    box-shadow: 0 6px 14px rgba(56, 189, 248, 0.35);
}

.icon-btn.danger {
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #fca5a5;
    padding: 6px 10px;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

[data-theme="light"] .icon-btn.danger {
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.3);
}

/* -----------------------------------------
   Standalone shell
----------------------------------------- */
.standalone-shell {
    max-width: none;
    margin: 0 auto;
    display: grid;
    gap: 22px;
    padding: 0;
}

.standalone-narrow {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .standalone-narrow {
        min-width: 500px;
    }
}

.standalone-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    width: 100%;
}

.signup-hint {
    margin-top: 16px;
}

.center-text {
    text-align: center;
}

.hidden-row {
    visibility: hidden;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.standalone-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.standalone-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.assignment-create-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 55;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    border-color: rgba(56, 189, 248, 0.9);
    color: #0b1224;
    opacity: 1;
    min-height: 52px;
    height: 52px;
    padding: 12px 24px;
    font-size: 1rem;
    box-shadow: 0 14px 32px rgba(14, 165, 233, 0.35);
}

[data-theme="light"] .assignment-create-fab {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    border-color: rgba(14, 165, 233, 0.95);
    color: #0b1224;
    opacity: 1;
    box-shadow: 0 12px 26px rgba(14, 165, 233, 0.24);
}

.standalone-muted {
    color: #94a3b8;
}

[data-theme="light"] .standalone-muted {
    color: #475569;
}

.monospace {
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.95rem;
}

.inline-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.inline-actions form {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.inline-actions .pill,
.inline-actions .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    line-height: 1;
}

.assignment-action-btn {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 6px;
    border-radius: 10px;
    margin: 0;
    box-sizing: border-box;
}

.magic-link-copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.assignment-row-link {
    cursor: pointer;
}

.assignment-row-link:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.7);
    outline-offset: -2px;
}

.assignment-row-title {
    font-weight: 700;
    line-height: 1.35;
    color: inherit;
}

.assignment-row-enrollment {
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.page-with-footer {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-with-footer .section {
    flex: 1 0 auto;
}

.section.dash-compact {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 10px;
    border-top: none;
}

@media (min-width: 1024px) {
    .section.dash-compact {
        width: 80%;
    }
}

.page-with-footer .footer {
    flex-shrink: 0;
    margin-top: 0;
}

.table-head.cols-3,
.table-row.cols-3 {
    grid-template-columns: 2fr 1.2fr 1fr;
}

.table-head.cols-4,
.table-row.cols-4 {
    grid-template-columns: 1.8fr 1.2fr 1.1fr 1fr;
}

.table-head.cols-5,
.table-row.cols-5 {
    grid-template-columns: 1.6fr 1.1fr 0.8fr 1.1fr 1fr;
}

.table-head.cols-7,
.table-row.cols-7 {
    grid-template-columns: 1.2fr 1fr 0.9fr 0.8fr 0.9fr 1.5fr 0.8fr;
}

.table-head.cols-2,
.table-row.cols-2 {
    grid-template-columns: 3fr 1fr;
}

.status-line {
    min-height: 18px;
    color: #9fb5cf;
}
.status-line[data-tone="success"] {
    color: #38bdf8;
}
.status-line[data-tone="error"] {
    color: #f87171;
}

/* Shared picker cards */
.preset-preview-card,
.picker-preview-card {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.45);
}

.preset-preview-head,
.preset-option-head,
.picker-preview-head,
.picker-option-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.picker-preview-head {
    align-items: stretch;
}

.preset-preview-title,
.picker-preview-title {
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.picker-preview-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
    width: 100%;
}

.picker-preview-label {
    font-weight: 600;
    color: #cbd5e1;
    grid-column: 1 / -1;
}

.picker-preview-body {
    margin-top: 12px;
}

.picker-preview-body .picker-preview-copy {
    margin-top: 8px;
}

.preset-preview-copy,
.preset-option-summary,
.preset-option-description,
.picker-preview-copy,
.picker-option-summary,
.picker-option-description {
    margin: 10px 0 0;
}

.preset-compare-btn,
.picker-compare-btn {
    flex: 0 0 auto;
    width: auto;
}

.picker-preview-control .picker-compare-btn {
    grid-column: 2;
    margin: 0;
    align-self: end;
}

.preset-dialog,
.picker-dialog {
    max-width: 860px;
}

.preset-modal-grid,
.picker-modal-grid {
    gap: 14px;
}

.preset-option-card,
.picker-option-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.preset-option-card.is-selected,
.picker-option-card.is-selected {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2);
}

[data-theme="light"] .preset-preview-card,
[data-theme="light"] .picker-preview-card {
    background: rgba(248, 250, 252, 0.9);
    border-color: rgba(148, 163, 184, 0.35);
}

[data-theme="light"] .preset-preview-title,
[data-theme="light"] .picker-preview-title {
    color: #0f172a;
}

/* Invite modal */
.invite-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 60;
}
.invite-modal.open {
    display: flex;
}
.invite-dialog {
    background: #0f172a;
    border-radius: 18px;
    padding: 20px;
    width: 90%;
    max-width: 780px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.invite-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.invite-head h3 {
    margin: 0;
}

@media (max-width: 640px) {
    .standalone-header {
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .standalone-header > div {
        width: 100%;
    }

    .assignment-create-fab {
        right: 14px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        width: calc(100% - 28px);
    }

    .identity-modal {
        padding: 12px;
    }
    .identity-modal-dialog {
        gap: 8px;
        padding: 12px 12px calc(146px + env(safe-area-inset-bottom));
    }
    .identity-modal .settings-actions {
        bottom: 0;
        margin: 0;
        padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
        flex-direction: column;
        align-items: center;
    }
    .identity-modal .settings-actions .control-btn {
        width: 100%;
    }
    .identity-modal [data-identity-capture].control-btn {
        min-height: 72px;
        font-size: 1.16rem;
    }
    .identity-camera-wrap {
        width: min(100%, min(220px, 24dvh));
        max-height: min(24dvh, 220px);
    }
    .preset-preview-head,
    .preset-option-head,
    .picker-preview-head,
    .picker-option-head {
        flex-direction: column;
        align-items: stretch;
    }
    .picker-preview-control {
        grid-template-columns: 1fr;
    }
    .picker-preview-control .picker-compare-btn {
        grid-column: 1;
        width: 100%;
        align-self: stretch;
    }
    .preset-compare-btn,
    .picker-compare-btn {
        width: 100%;
    }
    .mcq-panel .mcq-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .mcq-panel .mcq-head > div {
        width: 100%;
    }
    .mcq-panel .mcq-status {
        align-self: flex-start;
    }
    .table-head {
        display: none;
    }
    .table-controls-right .mobile-filter-only {
        display: inline-flex;
        min-width: 0;
        flex: 1 1 0;
        width: 100%;
        order: 2;
        padding: 8px 10px;
        border-radius: 10px;
        border: 1px solid rgba(56, 189, 248, 0.25);
        background: rgba(10, 19, 44, 0.65);
        color: #dbe8f8;
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
    .table-controls-right {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .table-controls-right .filter-input {
        order: 1;
        flex: 0 0 100%;
        width: 100%;
    }
    .settings-icon-rail {
        right: 8px;
        top: auto;
        bottom: calc(72px + env(safe-area-inset-bottom));
        transform: none;
        padding: 5px;
        gap: 5px;
        border-radius: 10px;
        opacity: 0.84;
    }
    .settings-icon-link {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
    .settings-title-icon {
        width: 22px;
        height: 22px;
    }
    .transcript-back {
        display: none;
    }
    .table-card {
        background: transparent;
        border: none;
        box-shadow: none;
        overflow: visible;
        display: grid;
        gap: 12px;
    }
    .table-row {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "student"
            "viva"
            "mcq"
            "alignment"
            "flag";
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
    }
    .table-row > [data-label]::before {
        display: none;
    }
    .table-row[data-student-row] > [data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: #8fa6c2;
    }
    .table-row[data-student-row] {
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 14px;
        margin-top: 0;
        padding: 14px 14px 12px;
        gap: 12px;
    }
    .table-row.cols-5[data-student-row] {
        margin-top: 0;
    }
    .table-row[data-student-row] .student-cell {
        display: block;
        font-weight: 600;
        line-height: 1.35;
    }
    .table-row[data-student-row] .student-cell::before {
        margin-bottom: 8px;
    }
    .table-row[data-student-row] .viva-cell:not(.student-cell),
    .table-row[data-student-row] .flag {
        display: flex;
        width: 100%;
        padding: 8px 10px;
        border-radius: 10px;
        background: rgba(15, 23, 42, 0.35);
        border: 1px solid rgba(148, 163, 184, 0.16);
    }
    .table-row[data-student-row] .viva-cell:not(.student-cell):not(.mcq-cell) {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
    }
    .table-row[data-student-row] .viva-cell[data-label="Viva"]::before {
        grid-column: 1 / -1;
        margin-bottom: 2px;
    }
    .table-row[data-student-row] .viva-cell:not(.student-cell):not(.mcq-cell) .link,
    .table-row[data-student-row] .viva-cell:not(.student-cell):not(.mcq-cell) .pill,
    .table-row[data-student-row] .viva-cell:not(.student-cell):not(.mcq-cell) .viva-status-cluster {
        margin: 0;
        justify-self: start;
    }
    .table-row[data-student-row] .viva-cell:not(.student-cell):not(.mcq-cell) .meta {
        justify-self: end;
        white-space: nowrap;
    }
    .table-row[data-student-row] .mcq-cell {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    .table-row[data-student-row] .flag {
        display: block;
    }
    .table-row[data-student-row] .flag.none {
        color: #b8dcb8;
    }
    .table-row[data-student-row] .flag-details {
        width: 100%;
    }
    .table-row[data-student-row] .flag-details summary {
        width: 100%;
    }
    .assignment-row-link > [data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        font-size: 0.74rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #8fa6c2;
    }
    .magic-link-row > [data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        font-size: 0.74rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #8fa6c2;
    }
    .assignment-row-link .inline-actions {
        justify-content: flex-start;
    }
    .assignment-list-card {
        background: transparent;
        border: none;
        box-shadow: none;
        overflow: visible;
        display: grid;
        gap: 12px;
    }
    .assignment-list-card .table-row.assignment-row-link {
        grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-areas:
            "title actions"
            "created created"
            "completed completed";
        align-items: start;
        gap: 10px 12px;
        margin: 0;
        padding: 16px;
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 18px;
        background:
            linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(8, 15, 31, 0.94)),
            radial-gradient(420px 180px at 0% 0%, rgba(56, 189, 248, 0.12), transparent 68%);
        box-shadow: 0 12px 28px rgba(2, 8, 23, 0.22);
    }
    .assignment-list-card .table-row.assignment-row-link:nth-child(odd) {
        background:
            linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(8, 15, 31, 0.94)),
            radial-gradient(420px 180px at 0% 0%, rgba(56, 189, 248, 0.12), transparent 68%);
    }
    .assignment-list-card .table-row.assignment-row-link:hover {
        background:
            linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(8, 15, 31, 0.98)),
            radial-gradient(420px 180px at 0% 0%, rgba(56, 189, 248, 0.16), transparent 68%);
        border-color: rgba(56, 189, 248, 0.3);
    }
    .assignment-list-card .assignment-row-main {
        grid-area: title;
        min-width: 0;
    }
    .assignment-list-card .assignment-row-main::before,
    .assignment-list-card .assignment-row-actions::before {
        display: none;
    }
    .assignment-list-card .assignment-row-title {
        font-size: 1rem;
        line-height: 1.35;
        letter-spacing: -0.01em;
    }
    .assignment-list-card .assignment-row-enrollment {
        margin-top: 8px;
        padding: 5px 10px;
        border-radius: 999px;
        background: rgba(56, 189, 248, 0.12);
        border: 1px solid rgba(56, 189, 248, 0.22);
        color: #dbeafe;
        font-size: 0.82rem;
        font-weight: 700;
    }
    .assignment-list-card .assignment-row-created,
    .assignment-list-card .assignment-row-completed {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.32);
        border: 1px solid rgba(148, 163, 184, 0.14);
        color: #cbd5e1;
        font-size: 0.86rem;
    }
    .assignment-list-card .assignment-row-created {
        grid-area: created;
    }
    .assignment-list-card .assignment-row-completed {
        grid-area: completed;
    }
    .assignment-list-card .assignment-row-created::before,
    .assignment-list-card .assignment-row-completed::before {
        margin: 0;
        min-width: 0;
        font-size: 0.68rem;
        letter-spacing: 0.08em;
        color: #93c5fd;
    }
    .assignment-list-card .assignment-row-actions {
        grid-area: actions;
        justify-content: flex-end;
        align-items: flex-start;
        align-self: start;
        gap: 6px;
    }
    .assignment-list-card .assignment-action-btn {
        width: 40px;
        height: 40px;
        min-height: 40px;
        border-radius: 12px;
    }
    .table-controls-left {
        gap: 8px;
    }
    .table-controls-right .filter-input {
        width: 100%;
        min-width: 0;
    }
    .table-row .viva-status {
        margin-right: 6px;
    }
    .table-row .student-cell {
        grid-area: student;
    }
    .table-row .viva-cell:not(.student-cell):not(.mcq-cell) {
        grid-area: viva;
        width: 100%;
    }
    .table-row .viva-cell.mcq-cell {
        grid-area: mcq;
        width: 100%;
    }
    .table-row .flag {
        grid-area: flag;
    }
    .table-row .alignment-flag {
        grid-area: alignment;
    }
    .table-note {
        margin: 10px 0 0;
    }
    .section.dash-compact {
        padding-left: 4px;
        padding-right: 4px;
    }
    #dashboard.section.dash-compact {
        padding-left: 8px;
        padding-right: 8px;
    }
    body.mobile-viva-chat-active {
        --mobile-viva-topbar-height: 58px;
        --mobile-viva-composer-clearance: 78px;
        overflow: hidden;
    }
    body.mobile-viva-chat-active .nav.nav-with-menu.nav-with-timer {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 80;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
        padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 8px;
        min-height: calc(env(safe-area-inset-top, 0px) + var(--mobile-viva-topbar-height));
    }
    body.mobile-viva-chat-active .nav.nav-with-menu.nav-with-timer .brand {
        display: none !important;
    }
    body.mobile-viva-chat-active .nav.nav-with-menu.nav-with-timer .nav-toggle,
    body.mobile-viva-chat-active .nav.nav-with-menu.nav-with-timer [data-nav-links],
    body.mobile-viva-chat-active .nav.nav-with-menu.nav-with-timer .nav-actions {
        display: none !important;
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls {
        display: inline-grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, max-content);
        align-items: center;
        justify-content: end;
        order: 1;
        gap: 6px;
        margin-left: auto;
        min-width: 0;
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls .viva-speech-toggle {
        height: 34px;
        min-width: 116px;
        padding: 0 8px;
        gap: 7px;
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls .viva-speech-toggle .switch {
        width: 38px;
        min-width: 38px;
        height: 20px;
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls .viva-speech-toggle .slider:before {
        width: 14px;
        height: 14px;
        left: 3px;
        bottom: 2px;
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls .viva-speech-toggle .switch input:checked + .slider:before {
        transform: translateX(17px);
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls .viva-speech-settings-btn {
        width: 28px;
        height: 28px;
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls .viva-theme-toggle-btn {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 0.84rem;
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls .speech-toggle-icon {
        width: 15px;
        height: 15px;
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls .speech-toggle-icon svg {
        width: 14px;
        height: 14px;
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls .viva-nav-timer {
        height: 34px;
        min-width: 66px;
        padding: 0 6px;
        font-size: 0.78rem;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
        box-shadow: none;
    }
    body.mobile-viva-chat-active .viva-mobile-navbar-controls [data-early-submit].control-btn {
        height: 34px;
        padding: 0 8px;
        font-size: 0.76rem;
        white-space: nowrap;
        box-shadow: none;
    }
    [data-theme="light"] body.mobile-viva-chat-active .viva-mobile-navbar-controls .viva-speech-toggle {
        background: rgba(15, 23, 42, 0.04);
        border-color: rgba(15, 23, 42, 0.1);
    }
    body.mobile-viva-chat-active .standalone-header,
    body.mobile-viva-chat-active .settings-grid.single-column > .settings-form-card:not([data-viva-chat-card]) {
        display: none !important;
    }
    body.mobile-viva-chat-active .section.dash-compact {
        height: 100dvh;
        overflow: hidden;
        padding-top: calc(env(safe-area-inset-top, 0px) + var(--mobile-viva-topbar-height) + 2px);
        padding-bottom: 0;
    }
    body.mobile-viva-chat-active .settings-grid.single-column {
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }
    [data-viva-chat-card] {
        margin-inline: -2px;
        padding: 12px 8px calc(var(--mobile-viva-composer-clearance, 78px) + env(safe-area-inset-bottom));
        gap: 10px;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    body.mobile-viva-chat-active [data-viva-chat-card] {
        height: 100%;
        min-height: 0;
        overflow: hidden;
        grid-template-rows: auto minmax(0, 1fr);
    }
    [data-viva-chat-card] > .settings-card-head {
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 0;
    }
    [data-viva-chat-card] > .settings-card-head .settings-title {
        display: none;
    }
    [data-viva-chat-card] .viva-head-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }
    .viva-chat-card {
        display: grid;
        gap: 10px;
    }
    body.mobile-viva-chat-active .viva-chat-card {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }
    body.mobile-viva-chat-active.mobile-mcq-active .section.dash-compact {
        padding-top: calc(env(safe-area-inset-top, 0px) + var(--mobile-viva-topbar-height) + 2px);
    }
    body.mobile-viva-chat-active.mobile-mcq-active [data-viva-chat-card] {
        padding-top: 2px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
    body.mobile-viva-chat-active.mobile-mcq-active .viva-chat-card {
        height: 100%;
        min-height: 0;
    }
    body.mobile-viva-chat-active.mobile-mcq-active .mcq-panel {
        position: relative;
        margin: 0;
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr) auto auto;
        gap: 10px;
        padding: 14px 12px calc(74px + env(safe-area-inset-bottom));
        overflow: hidden;
    }
    body.mobile-viva-chat-active.mobile-mcq-active .mcq-options {
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        align-content: start;
        align-items: start;
        grid-auto-rows: max-content;
        gap: 4px;
        padding-right: 2px;
    }
    body.mobile-viva-chat-active.mobile-mcq-active .mcq-option {
        padding: 4px 8px;
        border-radius: 8px;
        font-size: 0.88rem;
        line-height: 1.2;
        min-height: 75px;
        height: auto;
        align-self: start;
        border-width: 1px;
        box-shadow: none;
    }
    body.mobile-viva-chat-active.mobile-mcq-active .mcq-option.selected,
    body.mobile-viva-chat-active.mobile-mcq-active .mcq-option.is-correct,
    body.mobile-viva-chat-active.mobile-mcq-active .mcq-option.is-incorrect {
        padding: 4px 8px;
        min-height: 75px;
        border-width: 1px;
        box-shadow: none;
    }
    body.mobile-viva-chat-active.mobile-mcq-active .mcq-actions {
        position: absolute;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 2;
    }
    body.mobile-viva-chat-active.mobile-mcq-active .mcq-actions .control-btn {
        min-width: 92px;
    }
    body.mobile-viva-chat-active .viva-history-layout {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }
    body.mobile-viva-chat-active .viva-chat-wrap {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }
    .viva-chat-window {
        height: calc(100dvh - 262px - env(safe-area-inset-bottom));
        min-height: 0;
        max-height: calc(100dvh - 262px - env(safe-area-inset-bottom));
        padding: 4px 2px;
        scroll-padding-bottom: calc(var(--mobile-viva-composer-clearance, 78px) + env(safe-area-inset-bottom) + 10px);
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        gap: 8px;
    }
    body.mobile-viva-chat-active .viva-chat-window {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
    }
    [data-theme="light"] .viva-chat-window {
        background: transparent;
    }
    .viva-chat-window .bubble {
        padding: 10px 11px;
        border-radius: 11px;
        font-size: 0.94rem;
        line-height: 1.45;
    }
    .viva-chat-window .bubble.ai {
        border-color: rgba(148, 163, 184, 0.18);
    }
    .viva-chat-window .bubble.user {
        max-width: 92%;
    }
    .viva-input {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 48px;
        align-items: stretch;
        gap: 8px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(8px + env(safe-area-inset-bottom) + var(--viva-keyboard-offset, 0px));
        z-index: 35;
        margin-top: 0;
        width: 100%;
        padding: 0 8px;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }
    [data-theme="light"] .viva-input {
        background: transparent;
        border: none;
        box-shadow: none;
    }
    .viva-input .tutor-bar-shell,
    .viva-input .coverage-bar-shell {
        grid-column: 1 / -1;
        justify-self: stretch;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-bottom: 0;
        padding: 7px 9px;
        border-radius: 10px;
        border-color: rgba(56, 189, 248, 0.16);
        background: rgba(14, 165, 233, 0.06);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }
    .viva-input .coverage-bar-shell {
        border-color: rgba(34, 197, 94, 0.16);
        background: rgba(34, 197, 94, 0.06);
    }
    [data-theme="light"] .viva-input .tutor-bar-shell,
    [data-theme="light"] .viva-input .coverage-bar-shell {
        background: rgba(14, 165, 233, 0.05);
        border-color: rgba(37, 99, 235, 0.12);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    }
    [data-theme="light"] .viva-input .coverage-bar-shell {
        background: rgba(34, 197, 94, 0.06);
        border-color: rgba(22, 163, 74, 0.12);
    }
    .viva-input .tutor-bar-head,
    .viva-input .coverage-bar-head {
        display: none;
    }
    .viva-input .tutor-bar-track,
    .viva-input .coverage-bar-track {
        height: 6px;
        background: rgba(8, 47, 73, 0.38);
    }
    .viva-input .tutor-bar-fill,
    .viva-input .coverage-bar-fill {
        box-shadow: none;
    }
    .viva-input .coverage-bar-threshold {
        top: -1px;
        bottom: -1px;
    }
    .viva-input .tutor-bar-shell.is-aligned {
        border-color: rgba(236, 72, 153, 0.28);
        box-shadow: none;
        animation: none;
    }
    .viva-input .input-shell {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        padding: 9px 10px;
        align-items: flex-start;
    }
    .viva-input .input-shell textarea {
        line-height: 1.35;
        max-height: 132px;
    }
    .viva-input .viva-send-btn {
        grid-column: 2;
        grid-row: 2;
        width: 74px;
        min-width: 0;
        min-height: 46px;
        height: 46px;
        max-height: 46px;
        padding: 0;
        border-radius: 14px;
        align-self: end;
        justify-self: end;
    }
    .viva-input .viva-audio-toggle {
        grid-column: 2;
        grid-row: 2;
        width: 48px;
        min-width: 0;
        min-height: 46px;
        height: 46px;
        max-height: 46px;
        padding: 0;
        border-radius: 14px;
        align-self: end;
        justify-self: end;
    }
    body.mobile-viva-chat-active .viva-input .viva-send-btn {
        display: none;
    }
    body.mobile-viva-chat-active .viva-input .viva-audio-toggle {
        display: inline-flex;
    }
    body.mobile-viva-chat-active .viva-input.mobile-has-text .viva-send-btn {
        display: inline-flex;
    }
    body.mobile-viva-chat-active .viva-input.mobile-has-text .viva-audio-toggle {
        display: none !important;
    }
    body.mobile-viva-chat-active .viva-input.mobile-submit-mode {
        grid-template-columns: minmax(0, 1fr) 96px;
    }
    body.mobile-viva-chat-active .viva-input.mobile-submit-mode .viva-send-btn {
        display: inline-flex;
        width: 96px;
        padding: 0 10px;
    }
    body.mobile-viva-chat-active .viva-input.mobile-submit-mode .viva-audio-toggle {
        display: none !important;
    }
    body.mobile-viva-chat-active .viva-input .viva-send-btn {
        align-items: center;
        justify-content: center;
        width: 48px;
        background: rgba(255, 255, 255, 0.02);
        border-color: rgba(255, 255, 255, 0.08);
        color: #dbeafe;
        box-shadow: none;
    }
    body.mobile-viva-chat-active .viva-input .viva-send-btn .send-btn-text {
        display: none;
    }
    body.mobile-viva-chat-active .viva-input .viva-send-btn .send-btn-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    body.mobile-viva-chat-active .viva-input .viva-send-btn .send-btn-icon svg {
        width: 20px;
        height: 20px;
    }
    body.mobile-viva-chat-active .viva-input.mobile-submit-mode .viva-send-btn.submit-mode,
    [data-theme="light"] body.mobile-viva-chat-active .viva-input.mobile-submit-mode .viva-send-btn.submit-mode {
        background: linear-gradient(135deg, #ec4899, #f472b6);
        color: #0b1224;
        border-color: rgba(236, 72, 153, 0.6);
        box-shadow: 0 10px 24px rgba(236, 72, 153, 0.35);
        animation: throb 1.4s ease-in-out infinite;
    }
    body.mobile-viva-chat-active .viva-input.mobile-submit-mode .viva-send-btn.submit-mode.is-submitting,
    [data-theme="light"] body.mobile-viva-chat-active .viva-input.mobile-submit-mode .viva-send-btn.submit-mode.is-submitting {
        animation: none;
    }
    body.mobile-viva-chat-active .viva-input .viva-send-btn.is-submitting {
        gap: 0;
        justify-content: center;
        align-items: center;
    }
    body.mobile-viva-chat-active .viva-input .viva-send-btn.is-submitting .btn-spinner {
        width: 18px;
        height: 18px;
        border-width: 2.5px;
        border-color: currentColor currentColor transparent currentColor;
    }
    [data-theme="light"] body.mobile-viva-chat-active .viva-input .viva-send-btn {
        background: #e2e8f0;
        border-color: #cbd5e1;
        color: #0f172a;
        box-shadow: none;
    }
    .viva-input .viva-audio-toggle-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .viva-input .viva-audio-toggle-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .viva-input .viva-audio-toggle-icon svg {
        width: 20px;
        height: 20px;
    }
    .viva-audio-panel,
    .viva-files {
        display: none !important;
    }
    .viva-audio-player {
        max-width: none;
    }
    .file-chip-name {
        max-width: 100%;
    }
    .viva-files .file-chip-name {
        display: none;
    }
    .viva-files {
        min-width: 0;
    }
    .viva-files .file-chip {
        width: 100%;
        min-width: 0;
    }
    .viva-files .file-chip-name-link {
        display: block;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: bottom;
        flex: 1 1 auto;
        min-width: 0;
    }
    .viva-files .file-preview:not(.file-chip-name-link) {
        display: none;
    }
    .submission-cell.file-name .file-name-text,
    .submission-cell.file-name .preview-text-link {
        display: none;
    }
    .submission-cell.file-name .file-chip-name-link {
        display: inline-block;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: bottom;
    }
}

@media (max-width: 460px) {
    .submission-table-header {
        display: none;
    }
    .submission-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .submission-cell {
        width: 100%;
    }
    .submission-cell.file-name {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .submission-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .viva-files .file-chip {
        display: block;
        max-width: 100%;
    }
}

@media (max-width: 720px) {
    .blog-card.has-media {
        display: block;
    }
    .blog-card.has-media .blog-card-media {
        aspect-ratio: auto;
        height: 0;
        padding-top: 100%;
        max-height: none;
        width: 100%;
        position: relative;
    }
    .blog-card.has-media .blog-card-media img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .blog-card.has-media .blog-card-body {
        padding: 16px 18px 20px;
    }
}

/* BLOG */
.blog-hero {
    padding-top: 72px;
}

.blog-grid {
    padding-top: 0;
}

.blog-card-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.blog-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100%;
}

.blog-card.has-media {
    grid-template-columns: 220px 1fr;
    grid-template-rows: 1fr;
    align-items: stretch;
    column-gap: 18px;
}

.blog-card-media {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.85);
    max-height: 180px;
}

.blog-card.has-media .blog-card-media {
    grid-column: 1;
    max-height: none;
    height: 100%;
    width: 100%;
}

.blog-card.has-media .blog-card-body {
    grid-column: 2;
    padding: 18px 20px;
    min-width: 0;
}

.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-body {
    padding: 20px;
    display: grid;
    gap: 12px;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.blog-card-title {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.35;
}

.blog-card-subtitle {
    margin: -6px 0 0;
    color: #9fb1c9;
    font-size: 0.98rem;
    line-height: 1.5;
}

.blog-card-title a {
    color: #e2e8f0;
    text-decoration: none;
}

.blog-card-title a:hover {
    color: #7dd3fc;
}

.blog-card-excerpt {
    margin: 0;
    color: #cbd5e1;
}

.article-wrap {
    max-width: 860px;
    margin: 0 auto;
    display: grid;
    gap: 28px;
}

.article-hero h1 {
    margin-top: 10px;
}

.article-subtitle {
    margin: 6px 0 0;
    color: #a5b4fc;
    font-size: 1.05rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #94a3b8;
    font-size: 0.95rem;
}

.article-cover {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.article-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.article-body {
    color: #e2e8f0;
    font-size: 1.02rem;
    line-height: 1.75;
    display: grid;
    gap: 16px;
}

.article-body p {
    margin: 0;
}

.article-footer {
    padding-bottom: 60px;
}

[data-theme="light"] .blog-card {
    background: #ffffff;
}

[data-theme="light"] .blog-card-title a {
    color: #0f172a;
}

[data-theme="light"] .blog-card-excerpt,
[data-theme="light"] .blog-meta,
[data-theme="light"] .article-meta {
    color: #475569;
}

[data-theme="light"] .blog-card-subtitle {
    color: #4b5563;
}

[data-theme="light"] .article-subtitle {
    color: #312e81;
}

[data-theme="light"] .article-body {
    color: #0f172a;
}

@media (max-width: 720px) {
    .blog-card.has-media {
        display: block;
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        column-gap: 0;
    }
    .blog-card.has-media .blog-card-media {
        height: 0;
        padding-top: 50%;
        max-height: none;
        width: 100%;
        position: relative;
    }
    .blog-card.has-media .blog-card-media img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .blog-card.has-media .blog-card-body {
        padding: 16px 18px 20px;
    }
}

.demo-tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 30, 0.6);
    z-index: 1800;
    display: none;
}

.demo-tour-overlay.show {
    display: block;
}

.demo-tour-card {
    position: fixed;
    max-width: 360px;
    width: calc(100vw - 24px);
    background: var(--panel-bg, #0f172a);
    border: 1px solid var(--line, rgba(148, 163, 184, 0.35));
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 24px 40px rgba(2, 6, 23, 0.4);
    z-index: 1810;
}

.demo-tour-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.demo-tour-head strong {
    font-size: 0.95rem;
}

.demo-tour-head span {
    color: var(--muted, #94a3b8);
    font-size: 0.8rem;
}

.demo-tour-body {
    margin: 0 0 12px;
    color: var(--text, #e2e8f0);
    line-height: 1.45;
    font-size: 0.9rem;
}

.demo-tour-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.demo-tour-highlight {
    position: relative;
    z-index: 1820 !important;
    outline: 3px solid rgba(56, 189, 248, 0.95);
    box-shadow: 0 0 0 8px rgba(56, 189, 248, 0.24);
    border-radius: 10px;
}

/* -----------------------------------------
   Light Theme Polish (Accessibility)
----------------------------------------- */
[data-theme="light"] {
    --bg: #eef3f9;
    --text: #0f172a;
    --muted: #526277;
    --card: #ffffff;
    --border: rgba(15, 23, 42, 0.16);
    --light-border-soft: #c9d5e2;
    --light-border-strong: #7b8da3;
    --light-surface-subtle: #f8fbff;
    --light-surface-muted: #f2f6fc;
    --light-ring: #0284c7;
}

[data-theme="light"] body {
    background-color: var(--bg);
    background-image:
        radial-gradient(1200px 780px at 12% -10%, rgba(14, 165, 233, 0.1), transparent 70%),
        radial-gradient(1200px 720px at 88% -14%, rgba(96, 165, 250, 0.12), transparent 74%),
        linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
    color: var(--text);
}

[data-theme="light"] .section {
    background: transparent;
}

[data-theme="light"] .nav {
    background: rgba(255, 255, 255, 0.94);
    border-color: var(--light-border-soft);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .nav-toggle {
    background: var(--light-surface-subtle);
    border-color: var(--light-border-strong);
    color: #0f172a;
}

[data-theme="light"] .footer {
    color: var(--muted);
    border-top-color: var(--light-border-soft);
}

[data-theme="light"] .table-card,
[data-theme="light"] .transcript-card,
[data-theme="light"] .side-card,
[data-theme="light"] .settings-form-card,
[data-theme="light"] .submission-table-wrap,
[data-theme="light"] .resource-table,
[data-theme="light"] .preview-dialog,
[data-theme="light"] .viva-dialog {
    background: #ffffff;
    border-color: var(--light-border-soft);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .table-head,
[data-theme="light"] .submission-table-header,
[data-theme="light"] .resource-head {
    background: #f3f8ff;
    color: #0b1325;
}

[data-theme="light"] .table-row,
[data-theme="light"] .submission-row,
[data-theme="light"] .resource-row {
    color: #1e293b;
    border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .table-row:nth-child(odd),
[data-theme="light"] .submission-table-body .submission-row.row-alt {
    background: var(--light-surface-subtle);
}

[data-theme="light"] .table-row:hover,
[data-theme="light"] .submission-table-body .submission-row:hover,
[data-theme="light"] .resource-row:hover {
    background: #eaf4ff;
}

[data-theme="light"] .settings-icon-rail {
    background: rgba(255, 255, 255, 0.96);
    border-color: var(--light-border-soft);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .settings-icon-link {
    background: var(--light-surface-subtle);
    border-color: var(--light-border-strong);
    color: #334155;
}

[data-theme="light"] .settings-icon-link:hover {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0c4a6e;
}

[data-theme="light"] .view-btn {
    border-color: #7b8da3;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(56, 189, 248, 0.22));
    color: #0f172a;
    box-shadow: 0 7px 18px rgba(14, 116, 144, 0.16);
}

[data-theme="light"] .view-btn.active {
    background: #0ea5e9;
    border-color: #0284c7;
    color: #052238;
}

[data-theme="light"] .view-btn.ghost {
    background: #ffffff;
    border-color: #7b8da3;
    color: #0f172a;
    box-shadow: none;
}

[data-theme="light"] .view-btn.ghost:hover {
    background: #eff6ff;
    border-color: #0284c7;
    color: #0c4a6e;
}

[data-theme="light"] .control-btn {
    background: var(--light-surface-subtle);
    border-color: #7b8da3;
    color: #0f172a;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .control-btn:hover {
    background: #eef6ff;
    border-color: #0284c7;
    box-shadow: 0 9px 20px rgba(14, 116, 144, 0.16);
}

[data-theme="light"] .control-btn:disabled {
    background: #e6edf6;
    color: #64748b;
    border-color: #a7b6c8;
    box-shadow: none;
}

[data-theme="light"] .start-viva-cta {
    background: linear-gradient(135deg, #db2777, #f472b6);
    color: #fff5f8;
    border-color: rgba(219, 39, 119, 0.7);
    box-shadow: 0 10px 24px rgba(219, 39, 119, 0.25);
}

[data-theme="light"] .control-btn.start-viva-cta:hover {
    background: linear-gradient(135deg, #e11d87, #f472b6);
    border-color: rgba(219, 39, 119, 0.8);
    box-shadow: 0 12px 26px rgba(219, 39, 119, 0.28);
}

[data-theme="light"] .start-viva-cta:disabled {
    opacity: 0.55;
    box-shadow: none;
}

[data-theme="light"] .control-btn.primary,
[data-theme="light"] .save-confirm .control-btn.primary,
[data-theme="light"] .identity-modal [data-identity-capture].control-btn {
    color: #06243b;
}

[data-theme="light"] [data-view-pane="dashboard"] .table-filter {
    padding: 8px 10px;
    border: 1px solid #9fb4c8;
    border-radius: 12px;
    background: #f8fbff;
    color: #0c4a6e;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] [data-view-pane="dashboard"] .table-filter:hover {
    background: #eff6ff;
    border-color: #0284c7;
    color: #075985;
}

[data-theme="light"] [data-view-pane="dashboard"] .table-filter[aria-pressed="true"] {
    background: #dbeafe;
    border-color: #0284c7;
    color: #0c4a6e;
    box-shadow: 0 6px 14px rgba(2, 132, 199, 0.12);
}

[data-theme="light"] .filter-indicator {
    background: #e0f2fe;
    border-color: rgba(2, 132, 199, 0.55);
    color: #0c4a6e;
}

[data-theme="light"] .filter-clear {
    border-color: rgba(2, 132, 199, 0.45);
    background: #f8fbff;
    color: #075985;
}

[data-theme="light"] .filter-input {
    background: #ffffff;
    border-color: #7b8da3;
    color: #0f172a;
}

[data-theme="light"] .filter-input::placeholder {
    color: #526277;
}

[data-theme="light"] .standalone-header .standalone-muted,
[data-theme="light"] [data-view-pane="dashboard"] .table-note {
    color: #334155;
}

[data-theme="light"] [data-student-row] .meta {
    color: #334155;
}

[data-theme="light"] [data-student-row] .link.disabled {
    color: #334155;
}

[data-theme="light"] [data-student-row] .flag-details ul {
    color: #1e293b;
}

[data-theme="light"] [data-student-row] .flag-details summary::after {
    color: #334155;
    opacity: 0.9;
}

[data-theme="light"] [data-student-row] .viva-status.warn {
    background: #d97706;
}

[data-theme="light"] [data-student-row] .viva-cell:not(.student-cell) .meta,
[data-theme="light"] [data-student-row] .alignment-flag,
[data-theme="light"] [data-student-row] .flag:not(.none):not(.warn):not(.danger) {
    color: #334155;
}

[data-theme="light"] [data-student-row] .pill.neutral {
    background: #e0f2fe;
    border-color: rgba(2, 132, 199, 0.28);
    color: #075985;
}

[data-theme="light"] .input-shell {
    background: #ffffff;
    border-color: #7b8da3;
}

[data-theme="light"] .settings-row input,
[data-theme="light"] .settings-row select,
[data-theme="light"] .settings-row textarea {
    border-color: #7b8da3;
    background: #ffffff;
    color: #0f172a;
}

[data-theme="light"] .settings-row input::placeholder,
[data-theme="light"] .settings-row textarea::placeholder {
    color: #526277;
}

[data-theme="light"] :is(input, select, textarea):disabled {
    background: #e6edf6;
    color: #64748b;
    border-color: #a7b6c8;
}

[data-theme="light"] .settings-details summary,
[data-theme="light"] .history-details summary,
[data-theme="light"] .invite-details summary,
[data-theme="light"] .tracking-label {
    color: #0f172a;
}

[data-theme="light"] .settings-details summary::after,
[data-theme="light"] .history-details summary::after,
[data-theme="light"] .invite-details summary::after {
    color: #526277;
}

[data-theme="light"] .resource-pill,
[data-theme="light"] .event-list,
[data-theme="light"] .key-list,
[data-theme="light"] .msg-ts,
[data-theme="light"] .link.ghost-link {
    color: #334155;
}

[data-theme="light"] .resource-pill,
[data-theme="light"] .link.ghost-link {
    border-color: #7b8da3;
    background: #f8fbff;
}

[data-theme="light"] .bubble.ai {
    background: #f8fbff;
    border-color: var(--light-border-soft);
    color: #0f172a;
}

[data-theme="light"] .bubble.user {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0b334d;
}

[data-theme="light"] .bubble.system {
    background: #fff7dd;
    border-color: #d4a439;
    color: #7c4a03;
}

[data-theme="light"] .switch .slider {
    background: #d6e0eb;
    border-color: #7b8da3;
}

[data-theme="light"] .switch .slider:before {
    background: #475569;
}

[data-theme="light"] .switch input:checked + .slider {
    background: #d9f2ff;
    border-color: #0284c7;
}

[data-theme="light"] .switch input:checked + .slider:before {
    background: #0284c7;
}

[data-theme="light"] .switch input:disabled + .slider {
    opacity: 0.55;
    cursor: not-allowed;
}

[data-theme="light"] .switch input:focus-visible + .slider {
    outline: 3px solid rgba(2, 132, 199, 0.42);
    outline-offset: 2px;
}

[data-theme="light"] :where(
    a,
    button,
    input,
    select,
    textarea,
    summary,
    [role="button"],
    [tabindex]:not([tabindex="-1"])
):focus-visible {
    outline: 3px solid rgba(2, 132, 199, 0.42);
    outline-offset: 2px;
}

[data-theme="light"] a.link {
    color: #075985;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
}

[data-theme="light"] a.link:hover {
    color: #0c4a6e;
}

/* Landing light theme */
[data-theme="light"] .nav.nav-landing {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(148, 163, 184, 0.42);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .brand-mark {
    background: linear-gradient(140deg, #22d3ee, #f472b6);
    box-shadow: 0 16px 34px rgba(14, 116, 144, 0.18), 0 0 24px rgba(236, 72, 153, 0.12);
}

[data-theme="light"] .nav-links a {
    color: #334155;
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.is-active {
    color: #075985;
    border-color: rgba(14, 116, 144, 0.24);
    background: rgba(14, 165, 233, 0.1);
}

[data-theme="light"] .nav-links .pill {
    background: linear-gradient(135deg, #075985, #0e7490);
    color: #ffffff;
    border: 1px solid rgba(14, 116, 144, 0.42);
    box-shadow: 0 12px 26px rgba(14, 116, 144, 0.22), 0 0 0 1px rgba(236, 72, 153, 0.08);
}

[data-theme="light"] .view-btn.active {
    background: linear-gradient(135deg, #075985, #0e7490);
    border-color: rgba(14, 116, 144, 0.56);
    color: #ffffff;
}

[data-theme="light"] .landing-theme-toggle {
    background: #ffffff;
    border-color: #9aa9bb;
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .landing-theme-toggle:hover {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0c4a6e;
}

[data-theme="light"] .hero.full-height {
    background:
        radial-gradient(680px 360px at 14% 16%, rgba(14, 165, 233, 0.16), transparent 72%),
        radial-gradient(720px 420px at 88% 70%, rgba(236, 72, 153, 0.12), transparent 76%);
}

[data-theme="light"] .orb-left {
    background: rgba(34, 211, 238, 0.34);
    opacity: 0.2;
}

[data-theme="light"] .orb-right {
    background: rgba(236, 72, 153, 0.34);
    opacity: 0.18;
}

[data-theme="light"] .hero-copy h1,
[data-theme="light"] .section-head h2,
[data-theme="light"] .flow-card h3,
[data-theme="light"] .pillar-card h3,
[data-theme="light"] .trust-card h3,
[data-theme="light"] .price-top h3 {
    color: #0f172a;
}

[data-theme="light"] .hero .lede,
[data-theme="light"] .section-head .lede,
[data-theme="light"] .flow-card p,
[data-theme="light"] .pillar-card p,
[data-theme="light"] .trust-card p,
[data-theme="light"] .price-sub,
[data-theme="light"] .price-footnote,
[data-theme="light"] .price-compare ul {
    color: #475569;
}

[data-theme="light"] .eyebrow,
[data-theme="light"] .step {
    color: #0369a1;
}

[data-theme="light"] .cta.ghost {
    border-color: rgba(15, 23, 42, 0.2);
    color: #0f172a;
    background: rgba(255, 255, 255, 0.72);
}

[data-theme="light"] .cta.primary,
[data-theme="light"] .control-btn.primary:not(.start-viva-cta) {
    background: linear-gradient(135deg, #075985, #0e7490);
    border-color: rgba(14, 116, 144, 0.5);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(14, 116, 144, 0.24), 0 0 0 1px rgba(236, 72, 153, 0.08);
}

[data-theme="light"] .cta.primary:hover,
[data-theme="light"] .control-btn.primary:not(.start-viva-cta):hover {
    background: linear-gradient(135deg, #0c4a6e, #0f766e);
    box-shadow: 0 16px 34px rgba(14, 116, 144, 0.28), 0 0 0 1px rgba(236, 72, 153, 0.14);
}

[data-theme="light"] .hero-tags span,
[data-theme="light"] .flow-card,
[data-theme="light"] .pillar-card,
[data-theme="light"] .trust-card,
[data-theme="light"] .price-card,
[data-theme="light"] .price-compare {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(148, 163, 184, 0.36);
    color: #0f172a;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .hero-panel {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 255, 0.88)),
        radial-gradient(460px 220px at 0% 0%, rgba(14, 165, 233, 0.1), transparent 68%);
    border-color: rgba(148, 163, 184, 0.38);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

[data-theme="light"] .panel-header h3 {
    color: #0f172a;
}

[data-theme="light"] .tiny,
[data-theme="light"] .simulation-note,
[data-theme="light"] .loader-text,
[data-theme="light"] .lang-switch label {
    color: #475569;
}

[data-theme="light"] .badge {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #075985;
}

[data-theme="light"] .badge.throb {
    background: #fce7f3;
    border-color: rgba(219, 39, 119, 0.38);
    color: #9d174d;
    box-shadow: 0 12px 26px rgba(219, 39, 119, 0.2);
}

[data-theme="light"] .panel-chat {
    scrollbar-color: rgba(14, 116, 144, 0.32) transparent;
}

[data-theme="light"] .panel-chat::-webkit-scrollbar-thumb {
    background: rgba(14, 116, 144, 0.28);
}

[data-theme="light"] .panel-chat::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 116, 144, 0.42);
}

[data-theme="light"] .lang-switch select {
    background: #ffffff;
    border-color: #9aa9bb;
    color: #0f172a;
}

[data-theme="light"] .feature-group {
    background:
        linear-gradient(145deg, rgba(236, 254, 255, 0.96), rgba(255, 255, 255, 0.9) 58%, rgba(240, 249, 255, 0.92)),
        radial-gradient(460px 180px at 10% 0%, rgba(14, 165, 233, 0.18), transparent 64%),
        radial-gradient(360px 160px at 100% 100%, rgba(34, 211, 238, 0.12), transparent 72%),
        rgba(255, 255, 255, 0.9);
    border-color: rgba(14, 116, 144, 0.24);
    box-shadow: 0 16px 34px rgba(14, 116, 144, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .feature-group-assessment {
    background:
        linear-gradient(145deg, rgba(253, 242, 248, 0.96), rgba(255, 255, 255, 0.9) 58%, rgba(255, 241, 242, 0.9)),
        radial-gradient(460px 180px at 10% 0%, rgba(236, 72, 153, 0.18), transparent 64%),
        radial-gradient(360px 160px at 100% 100%, rgba(244, 114, 182, 0.12), transparent 72%),
        rgba(255, 255, 255, 0.9);
    border-color: rgba(219, 39, 119, 0.26);
    box-shadow: 0 16px 34px rgba(190, 24, 93, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .feature-card-kicker,
[data-theme="light"] .why-kicker {
    color: #334155;
}

[data-theme="light"] .feature-chip,
[data-theme="light"] .feature-control-list li {
    background: #f8fbff;
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.46);
}

[data-theme="light"] .feature-group-learning .feature-chip {
    background: #cffafe;
    border-color: rgba(8, 145, 178, 0.34);
    color: #164e63;
}

[data-theme="light"] .feature-group-assessment .feature-chip {
    background: #fce7f3;
    border-color: rgba(219, 39, 119, 0.3);
    color: #9d174d;
}

[data-theme="light"] .feature-control-panel {
    background:
        radial-gradient(520px 220px at 0% 0%, rgba(14, 165, 233, 0.1), transparent 66%),
        radial-gradient(420px 180px at 100% 100%, rgba(59, 130, 246, 0.08), transparent 70%),
        rgba(255, 255, 255, 0.92);
    border-color: rgba(14, 116, 144, 0.24);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .contact-form {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.92)),
        radial-gradient(620px 220px at 0% 0%, rgba(14, 165, 233, 0.08), transparent 68%);
}

@media (max-width: 640px) {
    [data-theme="light"] .assignment-list-card {
        background: transparent;
        border: none;
        box-shadow: none;
    }

    [data-theme="light"] .assignment-list-card .table-row.assignment-row-link,
    [data-theme="light"] .assignment-list-card .table-row.assignment-row-link:nth-child(odd) {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.94)),
            radial-gradient(360px 180px at 0% 0%, rgba(14, 165, 233, 0.08), transparent 68%);
        border-color: rgba(148, 163, 184, 0.28);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }

    [data-theme="light"] .assignment-list-card .table-row.assignment-row-link:hover {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(239, 246, 255, 0.98)),
            radial-gradient(360px 180px at 0% 0%, rgba(14, 165, 233, 0.12), transparent 68%);
        border-color: rgba(14, 165, 233, 0.34);
    }

    [data-theme="light"] .assignment-list-card .assignment-row-enrollment {
        background: #e0f2fe;
        border-color: rgba(14, 165, 233, 0.22);
        color: #075985;
    }

    [data-theme="light"] .assignment-list-card .assignment-row-actions .assignment-action-btn {
        background: #ffffff;
        border-color: rgba(14, 116, 144, 0.3);
        color: #075985;
        box-shadow: 0 8px 18px rgba(14, 116, 144, 0.12);
    }

    [data-theme="light"] .assignment-list-card .assignment-row-actions .assignment-action-btn:hover {
        background: #eff6ff;
        border-color: #0284c7;
        color: #0c4a6e;
    }

    [data-theme="light"] .assignment-list-card .assignment-row-actions .assignment-action-btn.danger {
        background: #fff1f2;
        border-color: rgba(185, 28, 28, 0.24);
        color: #b91c1c;
        box-shadow: 0 8px 18px rgba(185, 28, 28, 0.08);
    }

    [data-theme="light"] .assignment-list-card .assignment-row-created,
    [data-theme="light"] .assignment-list-card .assignment-row-completed {
        background: rgba(248, 250, 252, 0.98);
        border-color: rgba(148, 163, 184, 0.2);
        color: #334155;
    }

    [data-theme="light"] .assignment-list-card .assignment-row-created::before,
    [data-theme="light"] .assignment-list-card .assignment-row-completed::before {
        color: #0369a1;
    }
}

[data-theme="light"] .assignment-create-fab {
    background: #075985;
    border-color: #0c4a6e;
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(2, 132, 199, 0.26);
}

[data-theme="light"] .assignment-create-fab:hover {
    background: #0c4a6e;
    border-color: #083344;
    color: #ffffff;
    box-shadow: 0 18px 38px rgba(2, 132, 199, 0.3);
}

[data-theme="light"] .assignment-create-fab:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.35);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    [data-theme="light"] .table-controls-right .mobile-filter-only {
        background: #f8fbff;
        border-color: #9fb4c8;
        color: #0c4a6e;
        box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
    }

    [data-theme="light"] .table-controls-right .mobile-filter-only:hover {
        background: #eff6ff;
        border-color: #0284c7;
        color: #075985;
    }

    [data-theme="light"] .table-controls-right .mobile-filter-only[aria-pressed="true"] {
        background: #dbeafe;
        border-color: #0284c7;
        color: #0c4a6e;
        box-shadow: 0 8px 18px rgba(2, 132, 199, 0.12);
    }

    [data-theme="light"] .table-row[data-student-row] {
        border-color: rgba(148, 163, 184, 0.3);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.95)),
            radial-gradient(360px 180px at 0% 0%, rgba(14, 165, 233, 0.08), transparent 68%);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }

    [data-theme="light"] .table-row[data-student-row] > [data-label]::before {
        color: #0369a1;
    }

    [data-theme="light"] .table-row[data-student-row] .viva-cell:not(.student-cell),
    [data-theme="light"] .table-row[data-student-row] .flag {
        background: rgba(248, 250, 252, 0.98);
        border-color: rgba(148, 163, 184, 0.22);
        color: #1e293b;
    }

    [data-theme="light"] .table-row[data-student-row] .viva-cell:not(.student-cell):not(.mcq-cell) .meta {
        color: #334155;
    }
}
