:root {
    --navy: #162447;
    --navy-light: #3b5998;
    --navy-gradient: linear-gradient(135deg, var(--navy), var(--navy-light));
    --text-muted: #6c7586;
    --card-border: #dde3ed;
    --card-shadow: 0 10px 24px rgba(22, 36, 71, 0.06);
    --navy-gradient-3: var(--navy-gradient-3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #eef1f5;
    color: #1f2a44;
    transition: background 0.3s ease, color 0.3s ease;
}

.site-wrapper {
    min-height: 100vh;
}

.top-nav {
    background: #162447;
    color: white;
    padding: 18px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 6px 20px rgba(22, 36, 71, 0.12);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1f4068, #3b5998);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
}

.brand-title {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 2px;
}

.brand-subtitle {
    font-size: 13px;
    color: #c8d0df;
}

.nav-links {
    display: flex;
    gap: 22px;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: 0.2s ease;
}

.nav-links a:hover {
    border-bottom: 2px solid #9fb3d9;
    color: #dfe8f7;
}

.page-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 24px 50px;
}

.page-header {
    margin-bottom: 28px;
}

.section-kicker {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #3b5998;
    margin-bottom: 8px;
}

.custom-table {
    width: 100%;
}

.page-heading {
    font-size: 34px;
    color: #162447;
    margin-bottom: 10px;
}

.page-subheading {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 800px;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    background: white;
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 12px 30px rgba(22, 36, 71, 0.08);
    margin-bottom: 28px;
}

.hero-buttons {
    margin-top: 24px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-button,
.secondary-button {
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
    display: inline-block;
}

.primary-button {
    background: #162447;
    color: white;
}

.primary-button:hover {
    background: #0f1a35;
}

.secondary-button {
    background: #e4e8ef;
    color: #162447;
}

.secondary-button:hover {
    background: #d8dee8;
}

.feature-panel {
    background: linear-gradient(180deg, #f5f7fb, #edf1f7);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #d8deea;
}

.feature-panel h3 {
    color: #162447;
    margin-bottom: 14px;
    font-size: 20px;
}

.feature-panel ul {
    padding-left: 18px;
    color: var(--text-muted);
    line-height: 1.9;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.nav-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    text-decoration: none;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    transition: 0.2s ease;
}

.nav-card:hover {
    transform: translateY(-4px);
}

.nav-card h3 {
    color: #162447;
    margin-bottom: 10px;
    font-size: 20px;
}

.nav-card p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.info-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
}

.info-card h3 {
    color: #162447;
    font-size: 16px;
    margin-bottom: 14px;
}

.big-number {
    font-size: 34px;
    color: #1f4068;
    font-weight: bold;
    margin-bottom: 10px;
}

.info-card span {
    color: var(--text-muted);
    font-size: 14px;
}

.table-card,
.results-panel,
.results-overview-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
}

.table-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 12px;
}

.table-title-row h3,
.results-panel h3 {
    color: #162447;
    font-size: 20px;
}

    .card {
        background: white;
        border-radius: 24px;
        padding: 24px;
        border: 1px solid var(--card-border);
        box-shadow: var(--card-shadow);
    }

    .tool-grid {
        display: grid;
        grid-template-columns: 1.4fr 0.9fr;
        gap: 24px;
    }

    textarea {
        width: 100%;
        min-height: 240px;
        border-radius: 20px;
        border: 1px solid #d8deea;
        padding: 18px 20px;
        font-size: 15px;
        resize: vertical;
        background: #f8fafc;
        color: #22304d;
        font-family: Arial, sans-serif;
    }

    textarea:focus {
        outline: none;
        border-color: #3b5998;
        box-shadow: 0 0 0 4px rgba(59, 89, 152, 0.12);
        background: white;
    }

    .rewrite {
        min-height: 160px;
        padding: 18px;
        background: #f7f9fd;
        border-radius: 18px;
        color: #22304d;
        line-height: 1.7;
        white-space: pre-wrap;
    }

    .suggestion,
    .warning {
        display: block;
        margin-bottom: 16px;
        padding: 16px 18px;
        border-radius: 18px;
        line-height: 1.6;
    }

    .suggestion {
        background: #f5f7fb;
        border: 1px solid #e4e9f4;
    }

    .warning {
        background: #fff6ec;
        border: 1px solid #f4d9b2;
        color: #6c4d14;
    }

    .card h2 {
        margin-bottom: 18px;
    }

    .card button {
        min-width: 160px;
    }

.table-head,
.table-body-row {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr;
    gap: 14px;
    padding: 14px 8px;
}

.table-body-row:last-child {
    border-bottom: none;
}

.status-badge {
    background: #dce6f7;
    color: #1f4068;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.persona-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.persona-card {
    position: relative;
    background: linear-gradient(145deg, #ffffff, #f7f9fd);
    border-radius: 28px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow:
        0 12px 30px rgba(22, 36, 71, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.7);
    transition: all 0.3s ease;
}

.persona-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 20px 40px rgba(31, 64, 104, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.7);
}

.persona-card::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 160px;
    height: 160px;
    background: linear-gradient(
        135deg,
        rgba(59, 89, 152, 0.16),
        rgba(143, 166, 214, 0.06)
    );
    border-radius: 50%;
}

.persona-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    position: relative;
    z-index: 2;
}

.persona-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--navy-gradient-3);
    box-shadow: 0 10px 20px rgba(31, 64, 104, 0.25);
    position: relative;
}

.persona-icon::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
}

.persona-card h3 {
    font-size: 22px;
    color: #162447;
    font-weight: 700;
}

.persona-description {
    color: #5c6678;
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 22px;
    position: relative;
    z-index: 2;
}

.persona-focus-box {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 22px;
    position: relative;
    z-index: 2;
}

.persona-focus-box::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    width: 5px;
    height: 50px;
    border-radius: 999px;
    background: linear-gradient(180deg, #162447, #5f84d6);
}

.persona-focus-box strong {
    color: #162447;
    font-size: 16px;
}

.persona-focus-box p {
    margin-top: 8px;
    color: #667085;
    line-height: 1.7;
    font-size: 14px;
}

.card-actions {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.card-actions .secondary-button {
    background: linear-gradient(135deg, #edf2fb, #dbe5f5);
    border-radius: 999px;
    padding: 11px 18px;
    border: none;
    transition: 0.25s ease;
    font-weight: 600;
}

.card-actions .secondary-button:hover {
    background: var(--navy-gradient);
    color: white;
    transform: translateY(-2px);
}

.results-overview-card {
    display: flex;
    align-items: center;
    gap: 22px;
}

.score-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--navy-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 10px 24px rgba(22, 36, 71, 0.16);
}

.results-title {
    color: #162447;
    font-size: 22px;
    margin-bottom: 8px;
}

.results-subtitle {
    color: var(--text-muted);
    font-size: 15px;
}

.progress-row {
    display: grid;
    grid-template-columns: 180px 1fr 70px;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
    background: #f6f8fc;
    border-radius: 18px;
    padding: 16px;
}

.progress-label,
.progress-score {
    color: #22304d;
    font-size: 14px;
}

.progress-track {
    height: 14px;
    background: #e4e9f2;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #162447, #4f73ba, #8aa5df);
    border-radius: 999px;
}

.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.styled-list {
    padding-left: 18px;
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 14px;
}

.button-small {
    padding: 10px 16px;
    font-size: 13px;
}

@media (max-width: 980px) {
    .hero-card,
    .quick-links-grid,
    .stats-grid,
    .persona-grid,
    .two-column-grid {
        grid-template-columns: 1fr;
    }

    .top-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .table-head,
    .table-body-row,
    .progress-row {
        grid-template-columns: 1fr;
    }

    .results-overview-card {
        flex-direction: column;
        align-items: flex-start;
    }
}
.question-form {
    margin-top: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.form-group label {
    margin-bottom: 8px;
    color: #162447;
    font-weight: 600;
    font-size: 14px;
}

.form-group select {
    padding: 12px;
    border: 1px solid #d4dce8;
    border-radius: 10px;
    background: #f8fafc;
    color: #22304d;
    font-size: 14px;
}

.form-group select:focus {
    outline: none;
    border-color: #3b5998;
}

@media (max-width: 980px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}
.language-toggle {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.language-toggle select {
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid #ccd3df;
    background: #f8fafc;
}

.message-box {
    background: #f4f7fb;
    border-radius: 10px;
    padding: 14px;
    margin: 10px 0 18px;
    color: #22304d;
    line-height: 1.6;
}

.message-box.highlight {
    background: #e8eef9;
    border-left: 4px solid #1f4068;
}
.risk-alert {
    border-radius: 22px;
    padding: 22px;
    margin-top: 12px;
    border-left: 6px solid;
}

.risk-alert p {
    margin-top: 10px;
    color: #22304d;
    line-height: 1.6;
}

.risk-badge {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 6px;
}

.risk-high {
    background: #fdeaea;
    border-color: #c0392b;
}

.risk-high .risk-badge {
    background: #c0392b;
    color: white;
}

.risk-moderate {
    background: #fff4e5;
    border-color: #d68910;
}

.risk-moderate .risk-badge {
    background: #d68910;
    color: white;
}

.risk-low {
    background: #eaf7ee;
    border-color: #2e8b57;
}

.risk-low .risk-badge {
    background: #2e8b57;
    color: white;
}
.table-container {
    width: 100%;
    margin-top: 10px;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr;
    padding: 14px 16px;
    font-weight: bold;
    color: var(--text-muted);
    border-bottom: 1px solid #e2e7f0;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr;
    padding: 16px;
    align-items: center;
    border-bottom: 1px solid #edf1f7;
    background: white;
    border-radius: 10px;
    margin-bottom: 8px;
    box-shadow: 0 4px 10px rgba(22, 36, 71, 0.05);
}

.table-row:hover {
    background: #f8fafc;
}

.status-pill {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    background: #dce6f7;
    color: #1f4068;
}

.form-group input,
.form-group textarea {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #d8deea;
    background: #f8fafc;
    font-size: 14px;
    color: #22304d;
}

.form-group textarea {
    resize: vertical;
}

.edit-persona-card {
    background: linear-gradient(145deg, #ffffff, #f7f9fd);
    border-radius: 28px;
    padding: 34px;
    border: 1px solid var(--card-border);
    box-shadow: 0 14px 34px rgba(22, 36, 71, 0.08);
    max-width: 900px;
}

.edit-persona-card .form-group {
    margin-bottom: 22px;
}

.edit-persona-card label {
    color: #162447;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 15px;
}

.edit-persona-card input,
.edit-persona-card textarea {
    width: 100%;
    padding: 15px 16px;
    border-radius: 16px;
    border: 1px solid #d8deea;
    background: #f8fafc;
    color: #22304d;
    font-size: 15px;
    font-family: Arial, sans-serif;
    outline: none;
    transition: 0.2s ease;
}

.edit-persona-card input:focus,
.edit-persona-card textarea:focus {
    border-color: #3b5998;
    box-shadow: 0 0 0 4px rgba(59, 89, 152, 0.12);
    background: white;
}

.edit-persona-actions {
    display: flex;
    gap: 14px;
    margin-top: 8px;
}

.edit-persona-actions .primary-button,
.edit-persona-actions .secondary-button {
    border-radius: 999px;
    font-weight: 700;
}

.modern-home-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, #ffffff, #f7f9fd);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow:
        0 18px 40px rgba(22, 36, 71, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

.modern-home-hero::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(59, 89, 152, 0.08);
    top: -120px;
    right: -120px;
}

.modern-home-hero .page-heading {
    font-size: 48px;
    line-height: 1.05;
    letter-spacing: -1.5px;
    max-width: 700px;
    font-weight: 800;
}

.modern-home-hero .page-subheading {
    font-size: 16px;
    line-height: 1.9;
    max-width: 650px;
}

.modern-home-hero .hero-buttons {
    margin-top: 28px;
}

.modern-home-hero .primary-button,
.modern-home-hero .secondary-button {
    padding: 14px 22px;
    border-radius: 14px;
    font-weight: 700;
    transition: 0.25s ease;
}

.modern-home-hero .primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(22, 36, 71, 0.18);
}

.modern-home-hero .secondary-button:hover {
    transform: translateY(-2px);
}

.modern-feature-panel {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background:
        linear-gradient(145deg, #f7f9fd, #eef3fb);
    border: 1px solid var(--card-border);
    padding: 30px;
}

.modern-feature-panel::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(59, 89, 152, 0.08);
    top: -70px;
    right: -70px;
}

.modern-feature-panel h3 {
    position: relative;
    z-index: 2;
    font-size: 24px;
    margin-bottom: 20px;
}

.modern-feature-panel ul {
    position: relative;
    z-index: 2;
}

.modern-feature-panel li {
    margin-bottom: 12px;
}

.modern-nav-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background:
        linear-gradient(145deg, #ffffff, #f7f9fd);
    padding: 30px;
    transition: 0.3s ease;
}

.modern-nav-card::before {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    background: rgba(59, 89, 152, 0.06);
    border-radius: 50%;
    top: -70px;
    right: -70px;
}

.modern-nav-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 24px 40px rgba(22, 36, 71, 0.12);
}

.modern-nav-card h3 {
    position: relative;
    z-index: 2;
    font-size: 24px;
    margin-bottom: 14px;
}

.modern-nav-card p {
    position: relative;
    z-index: 2;
    line-height: 1.8;
    font-size: 15px;
}

/* MODERN RESULTS PAGE UPGRADES */

.modern-results-overview {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    padding: 34px;
    background: linear-gradient(145deg, #ffffff, #f7f9fd);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow:
        0 18px 40px rgba(22, 36, 71, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

.modern-results-overview::before {
    content: "";
    position: absolute;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: rgba(59, 89, 152, 0.08);
    top: -100px;
    right: -90px;
}

.modern-results-overview .score-circle {
    width: 112px;
    height: 112px;
    font-size: 34px;
    border-radius: 32px;
    background: var(--navy-gradient-3);
    position: relative;
    z-index: 2;
}

.modern-results-overview .results-title,
.modern-results-overview .results-subtitle {
    position: relative;
    z-index: 2;
}

.modern-results-overview .results-title {
    font-size: 28px;
    font-weight: 800;
}

.modern-results-panel {
    border-radius: 28px;
    padding: 30px;
    background: linear-gradient(145deg, #ffffff, #f8fafd);
    box-shadow:
        0 14px 34px rgba(22, 36, 71, 0.07),
        inset 0 1px 0 rgba(255,255,255,0.75);
}

.modern-results-panel h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 14px;
}

.modern-results-panel .message-box {
    border-radius: 18px;
    padding: 18px;
    background: #f4f7fb;
}

.modern-results-panel .message-box.highlight {
    background: #e9effa;
    border-left: 5px solid #3b5998;
}

.modern-two-column .modern-results-panel {
    min-height: 260px;
}

.styled-list li {
    margin-bottom: 10px;
}

.teacher-review-top,
.modern-results-panel .card-actions {
    margin-top: 18px;
}

.modern-results-panel .primary-button,
.modern-results-panel .secondary-button {
    border-radius: 999px;
    font-weight: 700;
}

@media (max-width: 980px) {
    .modern-results-overview {
        align-items: flex-start;
    }

    .modern-results-overview .score-circle {
        width: 96px;
        height: 96px;
    }
}

/* BIG RESULTS REDESIGN */

.results-hero {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 36px;
    align-items: center;
    background: linear-gradient(145deg, #ffffff, #f7f9fd);
    border-radius: 34px;
    padding: 40px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(22, 36, 71, 0.08);
}

.results-hero::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    background: rgba(59, 89, 152, 0.08);
    border-radius: 50%;
    top: -120px;
    right: -100px;
}

.results-score-section {
    position: relative;
    z-index: 2;
    text-align: center;
}

.large-score-circle {
    width: 160px;
    height: 160px;
    border-radius: 40px;
    background: var(--navy-gradient-3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    font-weight: 800;
    margin: auto;
    box-shadow: 0 20px 36px rgba(22, 36, 71, 0.18);
}

.score-label {
    margin-top: 18px;
    color: #667085;
    font-weight: 700;
}

.results-hero-content {
    position: relative;
    z-index: 2;
}

.results-hero-title {
    font-size: 42px;
    line-height: 1.05;
    color: #162447;
    margin-bottom: 16px;
    font-weight: 800;
}

.results-hero-subtitle {
    color: #667085;
    line-height: 1.9;
    max-width: 760px;
    margin-bottom: 24px;
    font-size: 16px;
}

.results-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    margin-bottom: 24px;
}

.comparison-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comparison-section label {
    display: block;
    margin-bottom: 10px;
    color: #162447;
    font-weight: 700;
}

.modern-language-toggle {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modern-language-toggle select {
    width: 100%;
}

.results-panel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.results-panel-top span {
    color: var(--text-muted);
    font-size: 14px;
}

.modern-progress-card {
    background: #f7f9fd;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 18px;
}

.modern-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 700;
    color: #22304d;
}

.modern-progress-track {
    height: 14px;
    background: #dfe6f2;
    border-radius: 999px;
    overflow: hidden;
}

.modern-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #162447, #4f73ba, #8ba6e0);
    transition: width 1s ease;
}

.teacher-review-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

@media (max-width: 980px) {

    .results-hero,
    .results-grid,
    .teacher-review-section {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .results-hero-title {
        font-size: 34px;
    }

    .large-score-circle {
        width: 130px;
        height: 130px;
        font-size: 42px;
    }
}

/* JAVASCRIPT NOTIFICATIONS */

.custom-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: var(--navy-gradient);
    color: white;
    padding: 16px 22px;
    border-radius: 18px;
    font-weight: 600;
    box-shadow: 0 14px 30px rgba(22, 36, 71, 0.25);
    opacity: 0;
    transform: translateY(-20px);
    transition: 0.3s ease;
    z-index: 9999;
}

.custom-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* =======================
   THEME SYSTEM (FIXED)
======================= */

/* DARK MODE */
/* =========================
   COMPLETE DARK MODE FIX
========================= */

/* Main background */
body.dark {
    background: #0f172a;
    color: #f8fafc;
}

/* Wrapper */
body.dark .site-wrapper {
    background: #0f172a;
}

/* Navbar */
body.dark .top-nav {
    background: #020617 !important;
    border-bottom: 1px solid #1e293b;
}

/* Cards */
body.dark .info-card,
body.dark .table-card,
body.dark .hero-card,
body.dark .card,
body.dark .persona-card,
body.dark .nav-card,
body.dark .modern-results-panel,
body.dark .results-panel,
body.dark .results-overview-card {
    background: #111827 !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

/* General headings */
body.dark h1,
body.dark h2,
body.dark h3,
body.dark .page-heading,
body.dark .results-title,
body.dark .brand-title {
    color: #ffffff !important;
}

/* Paragraphs */
body.dark p,
body.dark .page-subheading,
body.dark .results-subtitle,
body.dark .brand-subtitle {
    color: #cbd5e1 !important;
}

/* Navigation links */
body.dark .nav-links a {
    color: #e2e8f0 !important;
}

body.dark .nav-links a:hover {
    color: #ffffff !important;
}

/* Inputs */
body.dark input,
body.dark textarea,
body.dark select {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid #475569 !important;
}

/* Buttons */
body.dark .primary-button {
    background: #4f46e5 !important;
    color: white !important;
}

body.dark .secondary-button {
    background: #334155 !important;
    color: #f8fafc !important;
}

/* =========================
   RECENT EVALUATIONS FIX
========================= */

/* Table headings */
body.dark .table-header {
    color: #94a3b8 !important;
}

/* White rows */
body.dark .table-row {
    background: #ffffff !important;
    border: 1px solid #e5e7eb;
}

/* Dark text inside rows */
body.dark .table-row > div {
    color: #111827 !important;
    font-weight: 600;
}

/* Status pill */
body.dark .status-pill {
    background: #dce6f7 !important;
    color: #102a56 !important;
    font-weight: 700;
}

/* =========================
   RESULTS PAGE
========================= */

body.dark .message-box {
    background: #1e293b !important;
    color: #f8fafc !important;
}

body.dark .message-box.highlight {
    background: #1e3a5f !important;
}

/* Risk alerts */
body.dark .risk-alert p {
    color: #f8fafc !important;
}

/* Progress cards */
body.dark .modern-progress-card,
body.dark .progress-row {
    background: #1e293b !important;
}

body.dark .progress-label,
body.dark .progress-score {
    color: #f8fafc !important;
}

body.dark .progress-track,
body.dark .modern-progress-track {
    background: #334155 !important;
}

/* =========================
   PERSONAS PAGE
========================= */

body.dark .persona-description {
    color: #cbd5e1 !important;
}

/* =========================
   SETTINGS PAGE
========================= */

body.dark .form-group label {
    color: #f8fafc !important;
}

/* =========================
   TABLES
========================= */

body.dark .table-head {
    color: #94a3b8 !important;
}

body.dark .table-body-row {
    color: #f8fafc !important;
    border-color: #334155 !important;
}

/* =========================
   SCORE CIRCLES
========================= */

body.dark .score-circle,
body.dark .large-score-circle {
    background: linear-gradient(
        135deg,
        #312e81,
        #4338ca,
        #6366f1
    ) !important;
}

/* =========================
   HOVER STATES
========================= */

body.dark .table-row:hover {
    background: #f3f4f6 !important;
}

body.dark .nav-card:hover,
body.dark .persona-card:hover {
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

/* =========================
   RESPONSIVE FIXES
========================= */

@media (max-width: 980px) {

    body.dark .table-row {
        background: #ffffff !important;
    }

    body.dark .table-row > div {
        color: #111827 !important;
    }
}
/* Fix Key Focus text in dark mode */
body.dark .persona-focus-box strong {
    color: #ffffff !important;
    font-weight: 800;
}

body.dark .persona-focus-box p {
    color: #e5e7eb !important;
}

body.dark .persona-focus-box {
    background: #1e293b !important;
    border: 1px solid #475569 !important;
}
/* =========================
   RESULTS PAGE — ISSUE CARDS
   (resultsRender.js output: issue-card, change-row, tag,
   arrow, reason-box, context-box, actions, btn-copy,
   empty-state, raw-toggle, persona-badge)
========================= */

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.persona-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--navy-gradient);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(22, 36, 71, 0.2);
}

.header .persona-description {
    max-width: 680px;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.65;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.report-section {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 26px 30px;
    box-shadow: var(--card-shadow);
}

.persona-focus-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 28px;
    margin-bottom: 4px;
    border-radius: 16px;
    background: linear-gradient(120deg, #162447, #294d83);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(22, 36, 71, 0.16);
}

.persona-focus-mark {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
}

.persona-focus-copy h2 {
    margin: 4px 0 5px;
    color: #ffffff;
    font-size: 24px;
}

.persona-focus-copy p {
    max-width: 760px;
    color: #dbe7f7;
    line-height: 1.55;
}

.report-eyebrow {
    color: #a9c6ec;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.report-section h2 {
    margin: 0;
    color: #162447;
    font-size: 20px;
}

.section-number {
    color: #3b5998;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.report-item + .report-item {
    margin-top: 16px;
}

.report-item p {
    color: var(--text-muted);
    line-height: 1.6;
}

.issue-card {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-left: 5px solid #d99a3b;
    border-radius: 18px;
    padding: 24px 26px;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rule-card {
    border-left-color: #4f73ba;
}

.warning-tag {
    background: #fff4d6;
    color: #8a5a00;
    font-weight: 700;
}

.word-count {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.ai-tag {
    position: absolute;
    top: 14px;
    right: 16px;
    padding: 4px 7px;
    border-radius: 5px;
    background: #e7eef9;
    color: #31588f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.7px;
}

.issue-card:hover {
    box-shadow: 0 16px 32px rgba(22, 36, 71, 0.1);
    transform: translateY(-2px);
}

.change-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.tag {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    font-family: "Courier New", monospace;
}

.tag.old {
    background: #fdeaea;
    color: #a33b2c;
    text-decoration: line-through;
    text-decoration-color: rgba(163, 59, 44, 0.4);
}

.tag.new {
    background: #e9f7ef;
    color: #1e7d4e;
    font-weight: 700;
}

.arrow {
    color: var(--text-muted);
    font-size: 18px;
    font-weight: bold;
}

.reason-box {
    background: #f5f7fb;
    border: 1px solid #e4e9f4;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    color: #22304d;
    line-height: 1.6;
    font-size: 14px;
}

.reason-box strong {
    color: #162447;
}

.context-box {
    background: #f8fafc;
    border: 1px solid #e4e9f4;
    border-radius: 14px;
    padding: 14px 16px;
    color: #4a5468;
    line-height: 1.8;
    font-size: 14px;
    margin-bottom: 18px;
}

.context-box strong {
    display: block;
    margin-bottom: 6px;
    color: #162447;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.context-box mark {
    background: #fde68a;
    color: #4a3600;
    border-radius: 4px;
    padding: 1px 3px;
}

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

.btn {
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-copy {
    background: #162447;
    color: #ffffff;
}

.btn-copy:hover {
    background: #0f1a35;
}

.btn-copy.copied {
    background: #1e7d4e;
}

.empty-state {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 60px 24px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.empty-state h2 {
    color: #162447;
    font-size: 22px;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 15px;
}

.raw-toggle {
    margin-top: 8px;
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: var(--card-shadow);
}

.raw-toggle summary {
    cursor: pointer;
    font-weight: 700;
    color: #162447;
    font-size: 14px;
    list-style: none;
}

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

.raw-toggle summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s ease;
}

.raw-toggle[open] summary::before {
    transform: rotate(90deg);
}

.raw-toggle pre#rawOutput {
    margin-top: 14px;
    background: #0f172a;
    color: #d1d9e6;
    padding: 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 980px) {
    .change-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .arrow {
        transform: rotate(90deg);
    }
}

/* Dark mode */
body.dark .issue-card,
body.dark .empty-state,
body.dark .raw-toggle,
body.dark .report-section {
    background: #111827 !important;
    border-color: #1e293b !important;
}

body.dark .reason-box,
body.dark .context-box {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark .reason-box strong,
body.dark .context-box strong,
body.dark .raw-toggle summary,
body.dark .empty-state h2 {
    color: #ffffff !important;
}

body.dark .empty-state p {
    color: #94a3b8 !important;
}

body.dark .tag.old {
    background: rgba(163, 59, 44, 0.25) !important;
    color: #fca5a5 !important;
}

body.dark .tag.new {
    background: rgba(30, 125, 78, 0.25) !important;
    color: #86efac !important;
}

body.dark .context-box mark {
    background: #b45309 !important;
    color: #fff7ed !important;
}

body.dark .raw-toggle pre#rawOutput {
    background: #020617 !important;
    color: #cbd5e1 !important;
}

body.dark .report-section h2 {
    color: #ffffff;
}

body.dark .section-number {
    color: #a9c6ec;
}

body.dark .header .persona-description {
    color: #aebbd0;
}

@media (max-width: 640px) {
    .persona-focus-panel {
        align-items: flex-start;
        padding: 22px;
    }

    .persona-focus-copy h2 {
        font-size: 21px;
    }

    .report-section {
        padding: 22px 20px;
    }
}

body.dark .ai-tag {
    background: #263b5d;
    color: #c5dcff;
}

body.dark .warning-tag {
    background: rgba(180, 83, 9, 0.25) !important;
    color: #fcd38a !important;
}

#disclaimer {
	color: #b30000;
}