/* ==========================================================================
   CLASS 12 ECONOMICS — NOTEBOOK PAPER AESTHETICS
   Authentic Ruled Paper, Margins, Ink Typography & Doodles
   ========================================================================== */

/* Base Paper Surface */
.page-paper {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background-color: #fffef8;
    background-image: 
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 31px,
            rgba(70, 115, 175, 0.22) 32px,
            transparent 33px
        );
    background-size: 100% 32px;
    background-position: 0 45px;
    box-shadow: inset 0 0 40px rgba(90, 60, 30, 0.04);
}

/* Subtle aged paper noise overlay */
.page-paper::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 50% 50%, rgba(180, 150, 100, 0.02) 0%, transparent 80%);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   VERTICAL RED MARGIN LINES
   -------------------------------------------------------------------------- */

.page-left .page-paper::before,
.page-right .page-paper::before,
.flip-front .page-paper::before,
.flip-back .page-paper::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(210, 60, 80, 0.62);
    z-index: 5;
    pointer-events: none;
}

/* Desktop Left Page: red line near left edge, spiral on right edge */
.page-left .page-paper::before,
.flip-back .page-paper::before {
    left: 72px;
}

/* Desktop Right Page: spiral on left edge, red line to the right of spiral */
.page-right .page-paper::before,
.flip-front .page-paper::before {
    left: 48px;
}

/* --------------------------------------------------------------------------
   PUNCHED SPIRAL HOLES (ON INNER EDGES)
   -------------------------------------------------------------------------- */

.spiral-holes {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    padding: 12px 0;
}

.page-left .spiral-holes,
.flip-back .spiral-holes {
    right: -2px;
}

.page-right .spiral-holes,
.flip-front .spiral-holes {
    left: -2px;
}

.spiral-holes i {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1c1917;
    box-shadow: 
        inset 2px 2px 3px rgba(0, 0, 0, 0.8),
        inset -1px -1px 2px rgba(255, 255, 255, 0.2),
        1px 2px 3px rgba(0, 0, 0, 0.35);
}

/* --------------------------------------------------------------------------
   PAGE TOP HEADER (DATE & PAGE NUMBER STAMPS)
   -------------------------------------------------------------------------- */

.page-top-info {
    position: absolute;
    top: 14px;
    left: 96px;
    right: 36px;
    height: 38px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(210, 60, 80, 0.4);
    z-index: 20;
}

.page-right .page-top-info,
.flip-front .page-top-info {
    left: 64px;
    right: 48px;
}

.nb-subject-stamp {
    font-family: 'Caveat', cursive;
    font-size: 17px;
    font-weight: 600;
    color: #1b3565;
    transform: rotate(-0.5deg);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nb-header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nb-date-stamp {
    font-family: 'Patrick Hand', cursive;
    font-size: 14px;
    color: #475569;
    white-space: nowrap;
}

.page-box {
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1.5px solid #233b6e;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.page-box span {
    font-family: 'Outfit', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #475569;
}

.page-box b {
    font-family: 'Caveat', cursive;
    font-size: 17px;
    font-weight: 700;
    color: #b91c1c;
}

/* --------------------------------------------------------------------------
   PAGE MAIN CONTENT CONTAINER
   -------------------------------------------------------------------------- */

.page-content {
    position: absolute;
    top: 60px;
    left: 96px;
    right: 36px;
    bottom: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Patrick Hand', cursive;
    font-size: 20px;
    line-height: 32px; /* Snaps to blue lines */
    color: #172554;
    padding-top: 4px;
    scrollbar-width: none; /* Hide scrollbar for seamless book illusion */
}

.page-content::-webkit-scrollbar {
    display: none;
}

.page-right .page-content,
.flip-front .page-content {
    left: 64px;
    right: 48px;
}

/* --------------------------------------------------------------------------
   AUTHENTIC INK STYLING & HANDWRITING
   -------------------------------------------------------------------------- */

.ink-blue { color: #172554; }
.ink-red  { color: #b91c1c; }
.ink-green{ color: #15803d; }
.ink-dark { color: #1f2937; }

/* Cover Page Layout */
.nb-cover-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4px 10px;
}

.nb-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #1e3a8a;
    background: #e0e7ff;
    border: 1px solid #93c5fd;
    padding: 2px 10px;
    border-radius: 12px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.nb-title {
    font-family: 'Caveat', cursive;
    font-size: clamp(34px, 3.8vw, 48px);
    font-weight: 700;
    color: #172554;
    line-height: 1.05;
    margin-bottom: 4px;
    transform: rotate(-1deg);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.8);
}

.nb-subtitle {
    font-family: 'Kalam', cursive;
    font-size: clamp(18px, 2vw, 24px);
    color: #b91c1c;
    font-weight: 600;
    margin-bottom: 10px;
}

.nb-hand-divider {
    width: 60%;
    height: 2.5px;
    background: #1e3a8a;
    border-radius: 50%;
    margin: 4px auto 14px;
    transform: rotate(-0.5deg);
}

.nb-cover-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px dashed #475569;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 12px;
    text-align: left;
    width: 92%;
    max-width: 420px;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.04);
}

.nb-cover-card p {
    font-size: 17px;
    line-height: 25px;
}

.nb-stamp-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 6px;
}

.nb-stamp {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: #b91c1c;
    border: 2px solid #b91c1c;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.8px;
    transform: rotate(-3deg);
    box-shadow: 1px 2px 4px rgba(185, 28, 28, 0.15);
}

.nb-stamp.verified {
    color: #15803d;
    border-color: #15803d;
    font-size: 13px;
    padding: 5px 14px;
    transform: rotate(-1.5deg);
}

.nb-signed {
    font-family: 'Caveat', cursive;
    font-size: 19px;
    color: #1e3a8a;
    transform: rotate(2deg);
}

.nb-tap-hint {
    margin-top: 10px;
    font-family: 'Kalam', cursive;
    font-size: 15px;
    color: #b91c1c;
}

/* Headings on standard pages */
.nb-heading {
    font-family: 'Caveat', cursive;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
    transform: rotate(-0.5deg);
    border-bottom: 2px solid currentColor;
    display: inline-block;
    padding-bottom: 2px;
}

.nb-note-lead {
    font-size: 17px;
    color: #475569;
    margin-bottom: 10px;
}

.nb-paragraph {
    margin-bottom: 12px;
    font-size: 19px;
}

/* Ruled List for Index / Table of Contents */
.nb-ruled-list {
    list-style-position: inside;
    margin-bottom: 12px;
}

.nb-ruled-list li {
    font-size: 17px;
    line-height: 28px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dashed rgba(70, 115, 175, 0.3);
    padding: 0 2px;
    white-space: nowrap;
}

.nb-dots {
    flex: 1;
    border-bottom: 1px dotted rgba(70, 115, 175, 0.5);
    margin: 0 8px;
}

/* Highlight boxes */
.nb-highlight-box {
    margin: 16px 0;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 19px;
    line-height: 28px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.nb-highlight-box.green {
    background: rgba(220, 252, 231, 0.7);
    border-left: 4px solid #15803d;
    color: #14532d;
}

.nb-highlight-box.red {
    background: rgba(254, 226, 226, 0.7);
    border-left: 4px solid #b91c1c;
    color: #7f1d1d;
}

.nb-highlight-box.green .nb-box-tag {
    background: #15803d;
    color: #ffffff !important;
}

.nb-highlight-box.red .nb-box-tag {
    background: #b91c1c;
    color: #ffffff !important;
}

.nb-box-tag {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-block;
}

/* Formula Callout Boxes */
.nb-formula-box {
    margin: 16px 0;
    padding: 14px 20px;
    background: #fffdf0;
    border: 2px solid #b91c1c;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px; /* Organic hand-drawn rectangle */
    text-align: center;
    box-shadow: 2px 4px 12px rgba(185, 28, 28, 0.08);
}

.nb-formula-box.alt {
    border-color: #1b3565;
    background: #f8fafc;
}

.formula-label {
    font-family: 'Kalam', cursive;
    font-size: 15px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.formula-math {
    font-family: 'Caveat', cursive;
    font-size: 34px;
    font-weight: 700;
    color: #b91c1c;
    line-height: 1.2;
}

.nb-formula-box.alt .formula-math {
    color: #1b3565;
}

.formula-subtext {
    font-size: 16px;
    color: #475569;
    margin-top: 4px;
}

/* Tip with simulated Washi Tape */
.nb-tip-tape {
    position: relative;
    background: #fefce8;
    border: 1px solid #fef08a;
    padding: 14px 18px;
    border-radius: 4px;
    margin-top: 24px;
    box-shadow: 1px 3px 8px rgba(0,0,0,0.06);
}

.tape-strip {
    position: absolute;
    top: -10px;
    left: 40%;
    width: 70px;
    height: 18px;
    background: rgba(254, 240, 138, 0.7);
    border: 1px dashed rgba(202, 138, 4, 0.4);
    transform: rotate(-3deg);
}

/* Sticky Note Annotations */
.nb-sticky-note {
    position: relative;
    background: #fef9c3;
    border: 1px solid #fde047;
    padding: 14px 18px;
    border-radius: 2px;
    margin-top: 16px;
    transform: rotate(1.5deg);
    box-shadow: 2px 6px 12px rgba(0,0,0,0.1);
    color: #713f12;
}

.sticky-pin {
    position: absolute;
    top: -12px;
    left: calc(50% - 10px);
    font-size: 20px;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}

/* Sketch Diagrams */
.nb-sketch-diagram {
    background: rgba(255, 255, 255, 0.75);
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    margin: 12px 0;
}

.handwritten-svg {
    width: 100%;
    max-height: 150px;
}

/* Interactive Test Card */
.nb-interactive-card {
    background: #f0fdf4;
    border: 2px dashed #16a34a;
    border-radius: 8px;
    padding: 14px;
    margin: 14px 0;
}

.card-tag {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: #15803d;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.nb-calc-test {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.test-counter-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nb-pill-btn {
    font-family: 'Kalam', cursive;
    font-size: 16px;
    font-weight: 700;
    background: #1b3565;
    color: #ffffff;
    border: none;
    padding: 4px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.nb-pill-btn:hover {
    transform: scale(1.08);
}

.test-display {
    font-family: 'Caveat', cursive;
    font-size: 26px;
    font-weight: 700;
    color: #b91c1c;
    min-width: 70px;
    text-align: center;
}

/* Checklist */
.nb-checklist {
    list-style: none;
    margin: 14px 0;
}

.nb-checklist li {
    font-size: 19px;
    line-height: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chk-box {
    color: #15803d;
    font-size: 20px;
}

/* ==========================================================================
   BOARD EXAM EDUCATIONAL COMPONENTS & FLOWCHARTS
   ========================================================================== */

.nb-block {
    margin-bottom: 14px;
}

/* Interactive TOC items with smooth hover */
.nb-interactive-toc .toc-item {
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.nb-interactive-toc .toc-item:hover {
    transform: translateX(6px);
    background: rgba(30, 58, 138, 0.05);
}

.nb-interactive-toc .toc-item:hover .toc-title {
    color: #b91c1c;
    text-decoration: underline;
}

/* Two-Sector Flowchart Card */
.nb-flowchart-card {
    background: #fbfdf9;
    border: 1.5px dashed #1e3a8a;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 12px 0;
    text-align: center;
}

.flow-title {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.flow-branches {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.flow-node {
    flex: 1;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(30, 58, 138, 0.25);
    border-radius: 6px;
    padding: 6px 10px;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.flow-node b {
    display: block;
    font-size: 16px;
    margin-bottom: 2px;
}

.flow-node span {
    font-size: 13px;
    line-height: 18px;
    color: #475569;
    display: block;
}

.flow-arrow {
    font-size: 24px;
    font-weight: 700;
    color: #b91c1c;
    line-height: 1;
}

/* Handwritten Economics Tables */
.nb-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1.5px solid #1e3a8a;
    border-radius: 6px;
    overflow: hidden;
}

.nb-table th {
    background: #eef2ff;
    color: #1e3a8a;
    font-weight: 700;
    padding: 6px 10px;
    text-align: center;
    border-bottom: 1.5px solid #1e3a8a;
    font-size: 15px;
}

.nb-table td {
    padding: 4px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(70, 115, 175, 0.2);
    font-family: 'Patrick Hand', cursive;
}

.nb-table tr:last-child td {
    border-bottom: none;
}

.nb-table tr:hover {
    background: rgba(238, 242, 255, 0.4);
}

/* Bullet notes & lists */
.nb-bullet-notes, .nb-sub-list {
    margin-left: 20px;
    font-size: 16px;
    line-height: 24px;
}

.nb-bullet-notes li, .nb-sub-list li {
    margin-bottom: 6px;
}

/* Interactive AD Stepper Box */
.nb-calc-interactive-box {
    background: #f0fdf4;
    border: 2px dashed #15803d;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 16px;
}

.calc-row label {
    color: #14532d;
    font-weight: 600;
}

.stepper-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-btn {
    width: 28px;
    height: 28px;
    background: #15803d;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}

.calc-btn:hover {
    transform: scale(1.15);
    background: #166534;
}

.calc-val {
    font-family: 'Caveat', cursive;
    font-size: 22px;
    font-weight: 700;
    color: #15803d;
    min-width: 65px;
    text-align: center;
}

.calc-result-ribbon {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1.5px dashed rgba(21, 128, 61, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-formula {
    font-size: 16px;
    color: #475569;
    display: flex;
    gap: 6px;
}

.result-total {
    font-size: 18px;
}

.result-total b {
    font-family: 'Caveat', cursive;
    font-size: 26px;
    margin-left: 4px;
}

/* Board Quiz Card ("TRY IT") */
.nb-quiz-card {
    background: #fffbeb;
    border: 2px dashed #d97706;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
}

.quiz-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: #b45309;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

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

.rupee-symbol {
    font-size: 20px;
    font-weight: 700;
    color: #1b3565;
}

.nb-quiz-input {
    width: 110px;
    font-family: 'Caveat', cursive;
    font-size: 22px;
    font-weight: 700;
    padding: 4px 10px;
    border: 2px solid #2563eb;
    border-radius: 6px;
    background: #ffffff;
    color: #1e3a8a;
    outline: none;
}

.nb-quiz-input:focus {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}

.quiz-unit {
    font-size: 18px;
    font-weight: 600;
    color: #1b3565;
}

.nb-check-btn {
    font-family: 'Kalam', cursive;
    font-size: 16px;
    font-weight: 700;
    background: #b91c1c;
    color: #ffffff;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    box-shadow: 0 3px 6px rgba(185, 28, 28, 0.2);
}

.nb-check-btn:hover {
    transform: scale(1.06);
    background: #991b1b;
}

.quiz-feedback-box {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 16px;
    line-height: 22px;
    animation: popIn 0.25s ease-out;
}

.quiz-feedback-box.correct {
    background: #dcfce7;
    border-left: 4px solid #15803d;
    color: #14532d;
}

.quiz-feedback-box.incorrect {
    background: #fee2e2;
    border-left: 4px solid #b91c1c;
    color: #7f1d1d;
}

.quiz-feedback-box.warning {
    background: #fef3c7;
    border-left: 4px solid #d97706;
    color: #92400e;
}

.feedback-title {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 4px;
}

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

/* ==========================================================================
   INTERACTIVE WIDGET ENHANCEMENTS: SLIDERS, TOGGLES, POLICY & ACCORDIONS
   ========================================================================== */

/* Handwritten Sliders */
.nb-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.nb-slider-row label {
    font-size: 15px;
    font-weight: 600;
    color: #1b3565;
    min-width: 130px;
}

.nb-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 4px;
    background: #cbd5e1;
    outline: none;
}

.nb-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #15803d;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
    transition: transform 0.15s ease;
}

.nb-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    background: #166534;
}

/* Toggle Button Groups (Policy / State switcher) */
.calc-toggle-group {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.calc-toggle-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border: 1.5px solid #94a3b8;
    background: #ffffff;
    color: #475569;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.calc-toggle-btn:hover {
    border-color: #2563eb;
    color: #1e3a8a;
}

.calc-toggle-btn.active {
    background: #1e3a8a;
    border-color: #1e3a8a;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
}

/* Policy Card */
.policy-result-card {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 8px;
}

.policy-tool-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.policy-action-badge {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.policy-action-badge.red {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

.policy-action-badge.green {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #4ade80;
}

.policy-mechanism-text {
    font-size: 15px;
    line-height: 22px;
    color: #1e293b;
    margin: 4px 0 0 0;
}

/* Table Total Row Highlight */
.table-total-row td {
    background: rgba(254, 240, 138, 0.45) !important;
    font-weight: 700;
    border-top: 2px solid #b91c1c;
}

/* Model Answer Accordion */
.concept-accordion-btn {
    font-family: 'Kalam', cursive;
    font-size: 14px;
    font-weight: 700;
    color: #2563eb;
    background: none;
    border: 1px dashed #2563eb;
    padding: 4px 12px;
    border-radius: 14px;
    cursor: pointer;
    margin: 6px 0;
    transition: background 0.15s ease;
}

.concept-accordion-btn:hover {
    background: rgba(37, 99, 235, 0.08);
}

.concept-accordion-box {
    background: #f0fdf4;
    border-left: 3px solid #16a34a;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 15px;
    line-height: 22px;
    color: #14532d;
    margin-top: 6px;
    animation: popIn 0.2s ease-out;
}

/* Custom Styled Select */
.nb-select-box {
    font-family: 'Kalam', cursive;
    font-size: 15px;
    padding: 4px 8px;
    border: 1.5px solid #2563eb;
    border-radius: 6px;
    background: #ffffff;
    color: #1e3a8a;
    outline: none;
}

/* ==========================================================================
   HANDWRITTEN BOARD EXAM DIAGRAMS & INTERACTIVE SVG GRAPHS
   ========================================================================== */

.nb-diagram-card {
    background: #fffefb;
    border: 1.5px solid rgba(217, 119, 6, 0.45);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 8px 0;
    box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.diagram-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 6px;
    border-bottom: 1px dashed rgba(217, 119, 6, 0.35);
    padding-bottom: 4px;
    gap: 6px;
}

.diagram-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #b45309;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #fde68a;
    white-space: normal;
}

.diagram-subtext {
    font-size: 12px;
    color: #475569;
    font-weight: 600;
    font-style: italic;
    text-align: right;
}

.nb-graph-svg {
    width: 100%;
    height: auto;
    max-height: 230px;
    display: block;
    margin: 2px auto;
    overflow: hidden;
}

.diagram-legend {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    font-size: 12px;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #334155;
}

.legend-line {
    display: inline-block;
    width: 16px;
    height: 3px;
    border-radius: 2px;
}

.legend-line.red { background: #b91c1c; }
.legend-line.blue { background: #1e40af; }
.legend-line.amber { background: #d97706; }
.legend-line.teal { background: #0f766e; }
.legend-line.grey { background: #64748b; border-top: 1px dashed #64748b; height: 1px; }

/* Interactive Graph Container */
.interactive-graph-box {
    background: #f8fafc;
    border: 1.5px solid #94a3b8;
    border-radius: 6px;
    padding: 6px;
    margin: 6px 0;
}