.nsdm-course-main {
    --nsdm-green: #165b3a;
    --nsdm-green-dark: #0d442b;
    --nsdm-green-soft: #eef7f1;
    --nsdm-border: #d9e2dc;
    --nsdm-text: #26332c;
    --nsdm-muted: #66746c;
    --nsdm-white: #fff;
    color: var(--nsdm-text);
    padding: 28px 16px 56px;
}

.nsdm-wrap {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.nsdm-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    margin: 0 0 20px;
    color: var(--nsdm-muted);
}

.nsdm-breadcrumb a { color: var(--nsdm-green); text-decoration: none; }
.nsdm-breadcrumb a:hover { text-decoration: underline; }

.nsdm-page-header { margin-bottom: 28px; }
.nsdm-kicker {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--nsdm-green);
}
.nsdm-page-header h1,
.nsdm-course-detail-header h1 {
    margin: 0;
    line-height: 1.2;
}

.nsdm-section { margin: 0 0 34px; }
.nsdm-section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 3px solid var(--nsdm-green);
    padding-bottom: 10px;
    margin-bottom: 0;
}
.nsdm-part-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--nsdm-green);
    margin-bottom: 2px;
}
.nsdm-section-title h2 { margin: 0; font-size: clamp(19px, 2vw, 25px); }
.nsdm-total { font-size: 13px; font-weight: 700; white-space: nowrap; }

.nsdm-table-shell {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--nsdm-border);
    border-radius: 0 0 8px 8px;
    background: var(--nsdm-white);
}

.nsdm-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: fixed !important;
    margin: 0 !important;
    font-size: 14px;
}

.nsdm-table th,
.nsdm-table td {
    border: 1px solid var(--nsdm-border) !important;
    padding: 9px 10px !important;
    vertical-align: middle !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere;
    word-break: normal;
}
.nsdm-table tr > *:first-child { border-left: 0 !important; }
.nsdm-table tr > *:last-child { border-right: 0 !important; }
.nsdm-table tbody tr:last-child td { border-bottom: 0 !important; }

.nsdm-table thead th {
    background: var(--nsdm-green-dark) !important;
    color: var(--nsdm-white) !important;
    font-weight: 700 !important;
    text-align: left;
}
.nsdm-table tbody tr:nth-child(even) td { background: #fafcfb; }
.nsdm-table tbody tr:hover td { background: var(--nsdm-green-soft); }

/* Compact, content-priority widths: small utility columns stay small. */
.nsdm-directory-table .nsdm-col-sno { width: 6%; }
.nsdm-directory-table .nsdm-col-group-name { width: auto; }
.nsdm-directory-table .nsdm-col-count { width: 9%; }
.nsdm-directory-table .nsdm-col-details { width: 12%; }

.nsdm-course-list-table .nsdm-col-sno { width: 6%; }
.nsdm-course-list-table .nsdm-col-code { width: 14%; }
.nsdm-course-list-table .nsdm-col-course-name { width: auto; }
.nsdm-course-list-table .nsdm-col-duration { width: 18%; }

.nsdm-subject-table .nsdm-col-sno { width: 7%; }
.nsdm-subject-table .nsdm-col-subject-code { width: 20%; }
.nsdm-subject-table .nsdm-col-subject-name { width: auto; }

.nsdm-cell-sno,
.nsdm-cell-count,
.nsdm-cell-details,
.nsdm-cell-duration { text-align: center; }
.nsdm-cell-code { font-weight: 700; white-space: normal; }
.nsdm-cell-course-name a,
.nsdm-detail-link {
    color: var(--nsdm-green-dark);
    font-weight: 700;
    text-decoration: none;
}
.nsdm-cell-course-name a:hover,
.nsdm-detail-link:hover { text-decoration: underline; }

.nsdm-group-heading {
    background: var(--nsdm-green-dark);
    color: var(--nsdm-white);
    padding: 13px 16px;
    border-radius: 8px 8px 0 0;
}
.nsdm-group-heading h1 {
    color: inherit !important;
    margin: 0 !important;
    font-size: clamp(16px, 2vw, 21px) !important;
    line-height: 1.3 !important;
}
.nsdm-group-section .nsdm-table-shell { border-radius: 0 0 8px 8px; }
.nsdm-back-row { margin-top: 18px; }
.nsdm-back-link { color: var(--nsdm-green); font-weight: 700; text-decoration: none; }

.nsdm-course-detail-header {
    border-bottom: 3px solid var(--nsdm-green);
    padding-bottom: 18px;
    margin-bottom: 20px;
}
.nsdm-code-chip {
    display: inline-block;
    background: var(--nsdm-green-soft);
    color: var(--nsdm-green-dark);
    border: 1px solid #bcd7c6;
    border-radius: 999px;
    padding: 5px 10px;
    font-weight: 800;
    margin-bottom: 10px;
}

.nsdm-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--nsdm-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}
.nsdm-meta-grid > div {
    padding: 12px 14px;
    border-right: 1px solid var(--nsdm-border);
}
.nsdm-meta-grid > div:last-child { border-right: 0; }
.nsdm-meta-grid span {
    display: block;
    color: var(--nsdm-muted);
    font-size: 12px;
    margin-bottom: 3px;
}
.nsdm-meta-grid strong { display: block; font-size: 14px; }

.nsdm-subjects-section > h2 {
    margin: 0 0 14px;
    font-size: clamp(20px, 2vw, 26px);
}
.nsdm-subject-block { margin-bottom: 24px; }
.nsdm-subject-block h3 {
    margin: 0;
    padding: 10px 14px;
    background: var(--nsdm-green-dark);
    color: var(--nsdm-white) !important;
    border-radius: 8px 8px 0 0;
    font-size: 16px;
}
.nsdm-subject-block .nsdm-table-shell { border-radius: 0 0 8px 8px; }
.nsdm-empty-note {
    padding: 16px;
    background: #f7f9f8;
    border: 1px solid var(--nsdm-border);
    border-radius: 8px;
}

.nsdm-course-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: center;
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--nsdm-border);
}
.nsdm-course-nav a {
    color: var(--nsdm-green-dark);
    font-weight: 700;
    text-decoration: none;
}
.nsdm-course-nav a:hover { text-decoration: underline; }
.nsdm-course-nav-center { text-align: center; }
.nsdm-course-nav-next { text-align: right; }

@media (max-width: 780px) {
    .nsdm-course-main { padding: 18px 8px 38px; }
    .nsdm-table { font-size: 12px; }
    .nsdm-table th,
    .nsdm-table td { padding: 7px 5px !important; }

    .nsdm-directory-table .nsdm-col-sno { width: 9%; }
    .nsdm-directory-table .nsdm-col-count { width: 13%; }
    .nsdm-directory-table .nsdm-col-details { width: 18%; }

    .nsdm-course-list-table .nsdm-col-sno { width: 9%; }
    .nsdm-course-list-table .nsdm-col-code { width: 20%; }
    .nsdm-course-list-table .nsdm-col-duration { width: 22%; }

    .nsdm-subject-table .nsdm-col-sno { width: 10%; }
    .nsdm-subject-table .nsdm-col-subject-code { width: 27%; }

    .nsdm-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nsdm-meta-grid > div { border-bottom: 1px solid var(--nsdm-border); }
    .nsdm-meta-grid > div:nth-child(2n) { border-right: 0; }
    .nsdm-meta-grid > div:nth-last-child(-n+2) { border-bottom: 0; }

    .nsdm-course-nav { grid-template-columns: 1fr 1fr; }
    .nsdm-course-nav-center { grid-column: 1 / -1; grid-row: 1; }
}

@media (max-width: 460px) {
    .nsdm-section-title { align-items: flex-start; }
    .nsdm-total { font-size: 11px; }
    .nsdm-table { font-size: 11px; }
    .nsdm-table th,
    .nsdm-table td { padding: 6px 4px !important; }
    .nsdm-course-list-table .nsdm-col-sno { width: 9%; }
    .nsdm-course-list-table .nsdm-col-code { width: 21%; }
    .nsdm-course-list-table .nsdm-col-duration { width: 23%; }
    .nsdm-meta-grid { grid-template-columns: 1fr; }
    .nsdm-meta-grid > div { border-right: 0; border-bottom: 1px solid var(--nsdm-border) !important; }
    .nsdm-meta-grid > div:last-child { border-bottom: 0 !important; }
}

/* v1.1: one-page directory + course screenshot/share tools */
.nsdm-inline-group-section {
    scroll-margin-top: 24px;
    margin-top: 38px;
}
.nsdm-inline-group-section:first-child { margin-top: 18px; }
.nsdm-group-heading h2 {
    color: inherit !important;
    margin: 0 !important;
    font-size: clamp(16px, 2vw, 21px) !important;
    line-height: 1.3 !important;
}
.nsdm-inline-group-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}
.nsdm-inline-group-footer a {
    color: var(--nsdm-green);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.nsdm-course-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}
.nsdm-course-heading-content { min-width: 0; }
.nsdm-course-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 2px;
}
.nsdm-action-button {
    appearance: none;
    border: 1px solid var(--nsdm-green);
    border-radius: 7px;
    background: var(--nsdm-white);
    color: var(--nsdm-green-dark);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    padding: 10px 12px;
    white-space: nowrap;
}
.nsdm-action-button:hover { background: var(--nsdm-green-soft); }
.nsdm-action-button:disabled { cursor: wait; opacity: .6; }
.nsdm-whatsapp-button {
    background: var(--nsdm-green-dark);
    color: var(--nsdm-white);
}
.nsdm-whatsapp-button:hover {
    background: var(--nsdm-green);
    color: var(--nsdm-white);
}
.nsdm-action-status {
    min-height: 18px;
    margin: 8px 0 0;
    color: var(--nsdm-muted);
    font-size: 12px;
}

@media (max-width: 780px) {
    .nsdm-course-heading-row { display: block; }
    .nsdm-course-actions {
        justify-content: flex-start;
        margin-top: 16px;
    }
    .nsdm-action-button { font-size: 12px; }
}

@media print {
    .nsdm-course-actions,
    .nsdm-action-status { display: none !important; }
}


/* v1.1.2 visual refinement: richer NSDM course tables and actions */
.nsdm-course-main {
    --nsdm-part1: #0b4f9c;
    --nsdm-part1-dark: #083b75;
    --nsdm-part1-soft: #eef6ff;
    --nsdm-part2: #087f5b;
    --nsdm-part2-dark: #056146;
    --nsdm-part2-soft: #edfbf5;
    --nsdm-part3: #6d28a8;
    --nsdm-part3-dark: #541b86;
    --nsdm-part3-soft: #f7f0fc;
    --nsdm-orange: #d76b00;
    --nsdm-orange-dark: #ad5400;
    --nsdm-whatsapp: #168f4d;
    --nsdm-whatsapp-dark: #0f713c;
}

/* Course directory intro */
.nsdm-page-header {
    padding: 18px 20px;
    border: 1px solid #dce7e1;
    border-left: 5px solid var(--nsdm-green);
    border-radius: 10px;
    background: linear-gradient(90deg, #f5fbf7 0%, #ffffff 72%);
}

/* Give each main Part its own visual identity. */
.nsdm-part-i .nsdm-section-title { border-bottom-color: var(--nsdm-part1); }
.nsdm-part-i .nsdm-part-label { color: var(--nsdm-part1); }
.nsdm-part-i .nsdm-directory-table thead th,
.nsdm-part-i.nsdm-group-section .nsdm-course-list-table thead th,
.nsdm-part-i.nsdm-group-section .nsdm-group-heading {
    background: var(--nsdm-part1-dark) !important;
}
.nsdm-part-i .nsdm-directory-table tbody tr:hover td,
.nsdm-part-i.nsdm-group-section .nsdm-course-list-table tbody tr:hover td {
    background: var(--nsdm-part1-soft) !important;
}

.nsdm-part-ii .nsdm-section-title { border-bottom-color: var(--nsdm-part2); }
.nsdm-part-ii .nsdm-part-label { color: var(--nsdm-part2); }
.nsdm-part-ii .nsdm-directory-table thead th,
.nsdm-part-ii.nsdm-group-section .nsdm-course-list-table thead th,
.nsdm-part-ii.nsdm-group-section .nsdm-group-heading {
    background: var(--nsdm-part2-dark) !important;
}
.nsdm-part-ii .nsdm-directory-table tbody tr:hover td,
.nsdm-part-ii.nsdm-group-section .nsdm-course-list-table tbody tr:hover td {
    background: var(--nsdm-part2-soft) !important;
}

.nsdm-part-iii .nsdm-section-title { border-bottom-color: var(--nsdm-part3); }
.nsdm-part-iii .nsdm-part-label { color: var(--nsdm-part3); }
.nsdm-part-iii .nsdm-directory-table thead th,
.nsdm-part-iii.nsdm-group-section .nsdm-course-list-table thead th,
.nsdm-part-iii.nsdm-group-section .nsdm-group-heading {
    background: var(--nsdm-part3-dark) !important;
}
.nsdm-part-iii .nsdm-directory-table tbody tr:hover td,
.nsdm-part-iii.nsdm-group-section .nsdm-course-list-table tbody tr:hover td {
    background: var(--nsdm-part3-soft) !important;
}

/* Directory Details links: compact coloured buttons instead of plain text. */
.nsdm-detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 6px 10px;
    border-radius: 6px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
    box-shadow: 0 1px 2px rgba(0,0,0,.10);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.nsdm-part-i .nsdm-detail-link { background: var(--nsdm-part1); }
.nsdm-part-ii .nsdm-detail-link { background: var(--nsdm-part2); }
.nsdm-part-iii .nsdm-detail-link { background: var(--nsdm-part3); }
.nsdm-detail-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,.14);
    filter: brightness(.94);
}

/* More defined tables without increasing row height. */
.nsdm-table-shell {
    box-shadow: 0 2px 9px rgba(28, 54, 40, .055);
}
.nsdm-table thead th {
    letter-spacing: .015em;
}
.nsdm-directory-table .nsdm-cell-name,
.nsdm-course-list-table .nsdm-cell-course-name {
    font-weight: 600;
}
.nsdm-cell-count {
    font-weight: 800;
}
.nsdm-cell-course-name a {
    text-decoration: none !important;
    transition: color .15s ease;
}
.nsdm-part-i .nsdm-cell-course-name a { color: var(--nsdm-part1-dark); }
.nsdm-part-ii .nsdm-cell-course-name a { color: var(--nsdm-part2-dark); }
.nsdm-part-iii .nsdm-cell-course-name a { color: var(--nsdm-part3-dark); }
.nsdm-cell-course-name a:hover { text-decoration: underline !important; }

/* Group title bars are stronger but remain compact. */
.nsdm-group-heading {
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.18);
}
.nsdm-inline-group-footer a {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    border-radius: 6px;
    background: #f2f6f4;
    color: var(--nsdm-green-dark);
}
.nsdm-inline-group-footer a:hover { background: #e7f0eb; }

/* Individual course page */
.nsdm-course-detail-header {
    border-bottom-color: var(--nsdm-part1);
}
.nsdm-code-chip {
    background: #edf5ff;
    color: var(--nsdm-part1-dark);
    border-color: #bdd5ef;
}
.nsdm-meta-grid {
    box-shadow: 0 2px 10px rgba(28,54,40,.045);
}
.nsdm-meta-grid > div:nth-child(1) { border-top: 3px solid var(--nsdm-part1); }
.nsdm-meta-grid > div:nth-child(2) { border-top: 3px solid var(--nsdm-orange); }
.nsdm-meta-grid > div:nth-child(3) { border-top: 3px solid var(--nsdm-part2); }
.nsdm-meta-grid > div:nth-child(4) { border-top: 3px solid var(--nsdm-part3); }

/* Subject tables use a blue title band + green column band for easier scanning. */
.nsdm-subject-block h3 {
    background: var(--nsdm-part1-dark) !important;
}
.nsdm-subject-table thead th {
    background: var(--nsdm-part2-dark) !important;
}
.nsdm-subject-table tbody tr:hover td {
    background: #f0faf6 !important;
}

/* Action buttons */
.nsdm-action-button {
    border: 0;
    border-radius: 7px;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,.12);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.nsdm-action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 9px rgba(0,0,0,.16);
    color: #fff;
}
.nsdm-screenshot-button {
    background: var(--nsdm-orange);
    color: #fff;
}
.nsdm-screenshot-button:hover { background: var(--nsdm-orange-dark); }
.nsdm-whatsapp-button {
    background: var(--nsdm-whatsapp);
    color: #fff;
}
.nsdm-whatsapp-button:hover { background: var(--nsdm-whatsapp-dark); }

/* Bottom course navigation becomes button-like without becoming bulky. */
.nsdm-course-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #cddbd3;
    border-radius: 7px;
    background: #f7faf8;
    color: var(--nsdm-green-dark);
    text-decoration: none !important;
}
.nsdm-course-nav a:hover {
    background: var(--nsdm-green-soft);
    border-color: #a9c8b6;
}

@media (max-width: 780px) {
    .nsdm-page-header { padding: 14px 15px; }
    .nsdm-detail-link { min-width: 0; padding: 5px 7px; font-size: 11px; }
    .nsdm-meta-grid > div { border-top-width: 3px; }
}
