:root {
    --mks-rc-accent: #6d28d9;
    --mks-rc-accent-dark: #4c1d95;
    --mks-rc-secondary: #2563eb;
    --mks-rc-text: #172033;
    --mks-rc-muted: #59677d;
    --mks-rc-card: #fffefd;
    --mks-rc-bg: #faf9fc;
    --mks-rc-border: #e5e0ee;
    --mks-rc-shadow: 0 8px 24px rgba(38, 28, 68, 0.07);
}

.mks-gre-rc,
.mks-gre-rc-analytics {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(12px, 1.3vw, 18px);
    border-radius: 20px;
    background: var(--mks-rc-bg);
    color: var(--mks-rc-text);
    font-family: Inter, "Noto Sans Devanagari", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15.5px;
    line-height: 1.68;
}

.mks-gre-rc p,
.mks-gre-rc li,
.mks-gre-rc label,
.mks-gre-rc-analytics p,
.mks-gre-rc-analytics li {
    color: var(--mks-rc-text);
    font-size: 1rem;
    line-height: 1.68;
}

.mks-gre-rc p,
.mks-gre-rc ul,
.mks-gre-rc ol {
    margin-top: 0;
    margin-bottom: 11px;
}

.mks-gre-rc li + li {
    margin-top: 5px;
}

.mks-rc-hero,
.mks-rc-analytics-hero {
    margin: 0 0 16px;
    padding: clamp(23px, 2.4vw, 30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 52%, #2563eb 100%);
    box-shadow: 0 10px 28px rgba(76, 29, 149, 0.17);
}

.mks-rc-badge {
    margin-bottom: 10px;
    padding: 6px 11px;
    font-size: 12px;
}

.mks-rc-hero h1,
.mks-rc-analytics-hero h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 3.2vw, 38px);
    line-height: 1.12;
}

.mks-rc-hero p,
.mks-rc-analytics-hero p {
    max-width: 78ch;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15.5px;
    line-height: 1.62;
}

.mks-rc-section,
.mks-rc-card,
.mks-rc-passage,
.mks-rc-question,
.mks-rc-panel,
.mks-rc-stat {
    border-color: var(--mks-rc-border);
    border-radius: 16px;
    background: var(--mks-rc-card);
    box-shadow: var(--mks-rc-shadow);
}

.mks-rc-section,
.mks-rc-card,
.mks-rc-passage,
.mks-rc-question,
.mks-rc-panel {
    margin: 14px 0;
    padding: clamp(16px, 1.8vw, 21px);
}

.mks-rc-section h2,
.mks-rc-card h2,
.mks-rc-passage h2,
.mks-rc-question h2,
.mks-rc-panel h2 {
    margin: 0 0 9px;
    color: var(--mks-rc-accent-dark);
    font-size: clamp(19px, 2vw, 23px);
    line-height: 1.25;
}

.mks-rc-section h3,
.mks-rc-card h3,
.mks-rc-passage h3,
.mks-rc-question h3,
.mks-rc-panel h3 {
    margin: 0 0 7px;
    color: var(--mks-rc-accent);
    font-size: 16.5px;
    line-height: 1.35;
}

.mks-rc-grid,
.mks-rc-grid-3,
.mks-rc-two {
    gap: 12px;
    margin: 13px 0;
}

.mks-rc-grid > .mks-rc-card,
.mks-rc-grid-3 > .mks-rc-card,
.mks-rc-two > .mks-rc-card {
    height: 100%;
    margin: 0;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(38, 28, 68, 0.045);
}

.mks-rc-chip-row {
    gap: 7px;
    margin: 11px 0;
}

.mks-rc-chip {
    padding: 6px 10px;
    border-color: #ddd4ef;
    background: #f4f1fb;
    color: var(--mks-rc-accent-dark);
    font-size: 12px;
}

.mks-rc-tip,
.mks-rc-warning {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 12px;
}

.mks-rc-tip {
    border: 1px solid #ddd4ef;
    border-left: 4px solid var(--mks-rc-accent);
    background: #f4f1fb;
}

.mks-rc-hero .mks-rc-tip {
    border-color: rgba(255, 255, 255, 0.72);
    border-left-color: #fbbf24;
    background: rgba(255, 255, 255, 0.94);
    color: #35205c;
}

.mks-rc-hero .mks-rc-tip strong {
    color: #4c1d95;
}

.mks-rc-warning {
    border: 1px solid #fed7aa;
    border-left: 4px solid #b45309;
    background: #fffaf0;
}

.mks-rc-passage-text {
    max-width: 82ch;
    color: #2d3b52;
    font-size: 15.5px;
    line-height: 1.76;
}

.mks-rc-question-title {
    margin-bottom: 9px;
    font-size: 16px;
    line-height: 1.45;
}

.mks-rc-options {
    gap: 8px;
    margin: 11px 0;
}

.mks-rc-options label {
    gap: 9px;
    margin: 0;
    padding: 10px 12px;
    border-color: #dde3ee;
    border-radius: 11px;
    background: #f8fafc;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.mks-rc-options label:hover,
.mks-rc-options label:focus-within {
    border-color: #a78bfa;
    background: #f7f5ff;
}

.mks-rc-btn,
.mks-rc-small-btn {
    min-height: 40px;
    margin: 3px 5px 3px 0;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--mks-rc-accent-dark), var(--mks-rc-secondary));
    box-shadow: 0 6px 14px rgba(76, 29, 149, 0.16);
    font-size: 14px;
    line-height: 1.2;
}

.mks-rc-small-btn {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 12.5px;
}

.mks-rc-btn-light {
    border-color: #d9d2e8;
    background: #f5f3fa;
    box-shadow: none;
    color: var(--mks-rc-accent-dark);
}

.mks-rc-btn:focus-visible,
.mks-rc-small-btn:focus-visible,
.mks-rc-options input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 2px;
}

.mks-rc-feedback {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
}

.mks-rc-explanation {
    margin-top: 11px;
    padding: 13px;
    border-color: #c4b5fd;
    border-radius: 12px;
    background: #faf9ff;
    line-height: 1.68;
}

.mks-rc-tools,
.mks-rc-tool-row {
    gap: 7px;
    margin: 13px 0;
}

.mks-rc-complete-box {
    margin: 16px 0;
    padding: 14px;
    border-color: #ddd4ef;
    border-radius: 14px;
    background: linear-gradient(135deg, #f4f1fb, #eff6ff);
}

.mks-rc-stat-grid {
    gap: 11px;
    margin: 13px 0;
}

.mks-rc-stat {
    padding: 14px;
}

.mks-rc-stat strong {
    font-size: 28px;
}

.mks-rc-progress {
    height: 11px;
    background: #e9e7ef;
}

.mks-rc-list-item,
.mks-rc-module-row {
    margin-bottom: 8px;
    padding: 11px 12px;
    border-color: #e0e5ee;
    border-radius: 11px;
    background: #f8fafc;
}

@media (max-width: 900px) {
    .mks-rc-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .mks-gre-rc,
    .mks-gre-rc-analytics {
        padding: 9px;
        border-radius: 14px;
        font-size: 15px;
    }

    .mks-rc-hero,
    .mks-rc-analytics-hero {
        padding: 20px 17px;
        border-radius: 16px;
    }

    .mks-rc-hero h1,
    .mks-rc-analytics-hero h2 {
        font-size: 26px;
    }

    .mks-rc-section,
    .mks-rc-card,
    .mks-rc-passage,
    .mks-rc-question,
    .mks-rc-panel {
        padding: 14px;
        border-radius: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mks-gre-rc *,
    .mks-gre-rc *::before,
    .mks-gre-rc *::after {
        transition-duration: 0.01ms !important;
    }
}

/* Compact dashboard layer. Higher specificity intentionally wins over the
   legacy inline compatibility styles without changing existing shortcodes. */
html body .mks-gre-dashboard-page,
html body .mks-gre-rc-dash,
html body .mks-gre-rc-admin {
    color: var(--mks-rc-text) !important;
    font-family: Inter, "Noto Sans Devanagari", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-hero {
    margin: 0 0 16px !important;
    padding: 23px 26px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, #4c1d95, #6d28d9 58%, #2563eb) !important;
    box-shadow: 0 9px 24px rgba(76, 29, 149, 0.16) !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-hero h1 {
    margin: 0 0 7px !important;
    font-size: clamp(27px, 3vw, 34px) !important;
    line-height: 1.14 !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-hero p {
    max-width: 78ch !important;
    font-size: 15px !important;
    line-height: 1.58 !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-badge {
    margin-bottom: 9px !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-section,
html body .mks-gre-rc-dash,
html body .mks-gre-rc-admin {
    margin: 14px 0 !important;
    padding: 17px !important;
    border-color: var(--mks-rc-border) !important;
    border-radius: 15px !important;
    background: var(--mks-rc-card) !important;
    box-shadow: var(--mks-rc-shadow) !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-section h2,
html body .mks-gre-rc-dash h2,
html body .mks-gre-rc-admin h1,
html body .mks-gre-rc-admin h2 {
    margin: 0 0 8px !important;
    color: var(--mks-rc-accent-dark) !important;
    font-size: 22px !important;
    line-height: 1.25 !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-grid {
    gap: 11px !important;
    margin-top: 12px !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-stat-grid,
html body .mks-dash-cards,
html body .mks-admin-cards {
    gap: 11px !important;
    margin: 12px 0 !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-stat,
html body .mks-dash-card,
html body .mks-admin-card {
    padding: 13px !important;
    border-color: #e1dced !important;
    border-radius: 12px !important;
    background: #f8f6fc !important;
    box-shadow: 0 4px 12px rgba(38, 28, 68, 0.05) !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-stat strong,
html body .mks-dash-card strong,
html body .mks-admin-card h2 {
    margin-bottom: 5px !important;
    color: var(--mks-rc-accent) !important;
    font-size: 26px !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-section-link {
    width: 100% !important;
    padding: 13px !important;
    border: 1px solid #e1dced !important;
    border-radius: 12px !important;
    background: #faf9fc !important;
    color: var(--mks-rc-text) !important;
    cursor: pointer !important;
    font: inherit !important;
    text-align: left !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-section-link:hover,
html body .mks-gre-dashboard-page .mks-gre-dash-section-link:focus-visible {
    border-color: #a78bfa !important;
    background: #f4f1fb !important;
    transform: none !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-section-link strong {
    color: var(--mks-rc-accent-dark) !important;
    font-size: 15px !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-unit-card {
    padding: 13px !important;
    border-color: #e1dced !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(38, 28, 68, 0.045) !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-unit-card h3 {
    margin: 3px 0 6px !important;
    font-size: 16px !important;
    line-height: 1.32 !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-unit-card p {
    margin-bottom: 9px !important;
    font-size: 12.5px !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-unit-no {
    margin-bottom: 6px !important;
    padding: 4px 8px !important;
    font-size: 11.5px !important;
}

html body .mks-gre-dashboard-page .mks-gre-dash-btn {
    min-height: 34px !important;
    padding: 7px 11px !important;
    border: 1px solid transparent !important;
    border-radius: 9px !important;
    background: var(--mks-rc-accent-dark) !important;
    color: #fff !important;
    cursor: pointer !important;
    font: inherit !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
}

html body .mks-dash-table th,
html body .mks-dash-table td,
html body .mks-gre-rc-admin table.widefat th,
html body .mks-gre-rc-admin table.widefat td,
html body .mks-gre-map-table th,
html body .mks-gre-map-table td {
    padding: 9px 10px !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
}

html body .mks-dash-note,
html body .mks-gre-note {
    margin-top: 12px !important;
    padding: 11px 12px !important;
    border-radius: 10px !important;
    background: #f4f1fb !important;
}

@media (max-width: 620px) {
    html body .mks-gre-dashboard-page .mks-gre-dash-hero {
        padding: 19px 16px !important;
        border-radius: 15px !important;
    }

    html body .mks-gre-dashboard-page .mks-gre-dash-hero h1 {
        font-size: 25px !important;
    }

    html body .mks-gre-dashboard-page .mks-gre-dash-section,
    html body .mks-gre-rc-dash,
    html body .mks-gre-rc-admin {
        padding: 13px !important;
    }
}

/* Course-embedded lessons and dashboards should use the full frame. The small
   inner padding preserves reading comfort without the large blank gutter. */
body.gre-lms-course-embed-body {
    background: var(--mks-rc-bg) !important;
}

body.gre-lms-course-embed-body .mks-gre-rc,
body.gre-lms-course-embed-body .mks-gre-rc-analytics,
body.gre-lms-course-embed-body .mks-gre-dashboard-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 8px !important;
    border-radius: 0 !important;
}

body.gre-lms-course-embed-body .mks-rc-hero,
body.gre-lms-course-embed-body .mks-gre-dash-hero {
    margin-top: 0 !important;
}

/* RC Course #5639: compact, even-type, eye-comfort parent navigation. */
body.postid-5639 .gre-course-page--tabbed {
    --gre-course-purple: #6d28d9;
    --gre-course-purple-dark: #4c1d95;
    --gre-course-line: #e2e5ee;
    background: #f7f8fc;
}

body.postid-5639 .gre-course-tab-shell {
    grid-template-columns: 312px minmax(0, 1fr);
}

body.postid-5639 .gre-course-tab-sidebar,
body.postid-5639 .gre-course-tab-menu {
    background: #f7f8fc;
}

body.postid-5639 .gre-course-tab-progress {
    min-height: 68px;
    padding: 11px 16px;
    background: linear-gradient(115deg, #4c1d95, #6d28d9 58%, #315ee7);
}

body.postid-5639 .gre-course-tab-progress h2 {
    font-size: 20px;
    line-height: 1.2;
}

body.postid-5639 .gre-course-progress-unit {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 11px;
    font-size: 13px;
}

body.postid-5639 .gre-course-tab-group-title {
    min-height: 56px;
    padding: 11px 15px;
    background: #2f174e;
    font-size: 14px;
}

body.postid-5639 .gre-course-tab-group-title span:last-child {
    max-width: 175px;
    font-size: 11.5px;
    line-height: 1.25;
    text-align: right;
    white-space: normal;
}

body.postid-5639 .gre-course-tab-list {
    padding: 8px 8px 12px;
    background: #f4f6fb;
    scrollbar-color: #b9a8e6 #edf0f6;
}

body.postid-5639 .gre-course-tab-topic-heading {
    min-height: 40px;
    margin-bottom: 4px;
    padding: 8px 11px;
    border-radius: 10px;
    background: linear-gradient(135deg, #52209b, #6d28d9 60%, #315ee7);
    color: #ffffff;
    font-size: 13.5px;
}

body.postid-5639 .gre-course-tab-subtopic-heading {
    min-height: 34px;
    margin: 4px 0 4px 10px;
    padding: 7px 9px;
    border-color: #d8cdf0;
    border-radius: 9px;
    background: #eeeafd;
    color: #352052;
    font-size: 13px;
}

body.postid-5639 .gre-course-tab-button {
    grid-template-columns: 22px minmax(0, 1fr) 18px;
    gap: 8px;
    width: calc(100% - 20px);
    min-height: 43px;
    margin: 0 0 4px 20px;
    padding: 7px 10px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(32, 22, 52, 0.04);
}

body.postid-5639 .gre-course-tab-button:hover {
    transform: none;
}

body.postid-5639 .gre-course-tab-title {
    color: #222b3a;
    font-size: 14px;
    font-weight: 760;
    line-height: 1.28;
    -webkit-line-clamp: 2;
}

body.postid-5639 .gre-course-tab-icon {
    font-size: 14px;
}

body.postid-5639 .gre-course-tab-status {
    width: 18px;
    height: 18px;
}

body.postid-5639 .gre-course-tab-main {
    background: #fbfbfd;
}

@media (max-width: 900px) {
    body.postid-5639 .gre-course-tab-shell {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    body.gre-lms-course-embed-body .mks-gre-rc,
    body.gre-lms-course-embed-body .mks-gre-rc-analytics,
    body.gre-lms-course-embed-body .mks-gre-dashboard-page {
        padding: 5px !important;
    }

    body.postid-5639 .gre-course-tab-progress h2 {
        font-size: 18px;
    }
}
