:root {
      --background: hsl(150 24% 98%);
      --foreground: hsl(155 35% 12%);
      --card: hsl(0 0% 100%);
      --primary: hsl(155 100% 23%);
      --primary-rgb: 0, 102, 62;
      --primary-foreground: hsl(0 0% 100%);
      --secondary: hsl(150 28% 95%);
      --muted-foreground: hsl(144 15% 42%);
      --accent: hsl(45 92% 47%);
      --accent-foreground: hsl(155 35% 12%);
      --border: hsl(150 22% 86%);
      --ring: hsl(155 100% 23%);
      --glass-card: rgba(255, 255, 255, 0.76);
      --glass-card-strong: rgba(255, 255, 255, 0.92);
      --shadow-card-hover: 0 30px 80px -46px hsl(155 100% 23% / 0.62), 0 16px 42px -30px rgba(var(--primary-rgb), 0.48);
    }
    .mcq-card {
      position: relative;
      background: var(--glass-card-strong);
      border: 1px solid var(--border);
      border-radius: 1.25rem;
      box-shadow: 0 18px 56px -48px hsl(155 35% 12% / 0.55);
      padding: 1.1rem 2.8rem 1.1rem 1.1rem;
      transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    }
    .scenario-mcq-card {
      border-left: 4px solid hsl(155 100% 28%);
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 253, 244, 0.45) 100%);
    }
    .dark .scenario-mcq-card {
      border-left: 4px solid hsl(155 80% 40%);
      background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(6, 78, 59, 0.15) 100%);
    }
    .scenario-badge-strip {
      transition: all 0.2s ease;
    }
    /* Premium Scenario Reading Typography */
    .passage-content {
      font-family: 'Manrope', 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      color: #1e293b;
      letter-spacing: -0.011em;
    }
    .dark .passage-content {
      color: #f1f5f9;
    }
    .scenario-lead-text {
      font-size: 0.975rem;
      line-height: 1.82;
      font-weight: 500;
      color: #334155;
      margin-bottom: 0.75rem;
    }
    .dark .scenario-lead-text {
      color: #e2e8f0;
    }
    .scenario-rules-list {
      display: flex;
      flex-direction: column;
      gap: 0.6rem;
      margin-top: 0.75rem;
      margin-bottom: 0.75rem;
      padding-left: 0;
      list-style: none;
    }
    .scenario-rule-item {
      display: flex;
      align-items: flex-start;
      gap: 0.75rem;
      padding: 0.75rem 1rem;
      border-radius: 0.85rem;
      background: rgba(255, 255, 255, 0.95);
      border: 1px solid rgba(16, 185, 129, 0.2);
      box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.04);
      font-size: 0.935rem;
      line-height: 1.68;
      font-weight: 500;
      color: #1e293b;
      transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    }
    .dark .scenario-rule-item {
      background: rgba(30, 41, 59, 0.92);
      border-color: rgba(16, 185, 129, 0.25);
      color: #f1f5f9;
    }
    .scenario-rule-item:hover {
      border-color: rgba(16, 185, 129, 0.45);
      transform: translateX(2px);
      box-shadow: 0 4px 12px -3px rgba(16, 185, 129, 0.12);
    }
    .scenario-bullet-icon {
      flex-shrink: 0;
      width: 1.35rem;
      height: 1.35rem;
      border-radius: 0.45rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      font-weight: 800;
      margin-top: 0.15rem;
    }
    /* Fail-Safe 2-Column Desktop Grid/Flex Layout for MCQs & Sidebar */
    .mcqs-layout-container {
      display: flex;
      flex-direction: column;
      gap: 2rem;
    }
    @media (min-width: 1024px) {
      .mcqs-layout-container {
        flex-direction: row !important;
        align-items: flex-start !important;
      }
      .mcqs-layout-main {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        max-width: calc(100% - 22rem) !important;
      }
      .mcqs-layout-sidebar {
        width: 20rem !important; /* 320px */
        flex-shrink: 0 !important;
        position: sticky;
        top: 5.5rem;
      }
    }
    .bookmark-btn-top {
        position: absolute;
        top: 1.3rem;
        right: 1.3rem;
        color: var(--muted-foreground);
        background: transparent;
        border: none;
        cursor: pointer;
        transition: color 0.2s ease, transform 0.15s ease;
        z-index: 10;
    }
    .bookmark-btn-top:hover {
        color: var(--primary);
        transform: scale(1.1);
    }
    .bookmark-btn-top.active {
        color: #eab308 !important; /* Yellow-500 */
    }
    mark.search-highlight {
        background-color: rgba(254, 240, 138, 0.6); /* Tailwind yellow-200/60 */
        color: inherit;
        font-weight: inherit;
        border-radius: 0.125rem;
        padding: 0 0.125rem;
    }
    #session-progress-bar {
        transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mcq-card:hover {
      border-color: rgba(var(--primary-rgb), 0.32);
      box-shadow: var(--shadow-card-hover);
      transform: translateY(-1px);
    }

    .mcq-number {
      align-items: center;
      background: var(--primary);
      border-radius: 0.75rem;
      color: var(--primary-foreground);
      display: inline-flex;
      flex-shrink: 0;
      font-size: 0.9rem;
      font-weight: 900;
      height: 2.25rem;
      justify-content: center;
      min-width: 2.25rem;
      padding: 0 0.65rem;
    }

    .mcq-question {
      color: var(--foreground);
      font-size: 1rem;
      font-weight: 850;
      line-height: 1.6;
    }

    .answer-options {
      display: grid;
      gap: 0.7rem;
      margin-top: 1rem;
    }

    .answer-option {
      align-items: center;
      background: rgba(255, 255, 255, 0.58);
      border: 1px solid var(--border);
      border-radius: 0.85rem;
      color: var(--foreground);
      cursor: pointer;
      display: flex;
      gap: 0.75rem;
      justify-content: space-between;
      min-height: 3rem;
      padding: 0.75rem 0.85rem;
      transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    }

    html.dark .answer-option {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.1);
    }

    .answer-option:hover {
      background: var(--card);
      border-color: rgba(var(--primary-rgb), 0.28);
    }

    .answer-option:focus-visible {
      outline: 3px solid rgba(var(--primary-rgb), 0.22);
      outline-offset: 2px;
    }

    .answer-option.is-correct {
      background: rgba(34, 197, 94, 0.14);
      border-color: rgba(22, 163, 74, 0.58);
      box-shadow: 0 10px 28px -22px rgba(22, 163, 74, 0.8);
      color: #14532d;
    }

    .answer-option.is-wrong {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(220, 38, 38, 0.48);
      color: #7f1d1d;
    }

    .answer-option.is-selected {
      transform: translateY(-1px);
    }

    .answer-option.is-pending {
      background: rgba(var(--primary-rgb), 0.08);
      border-color: rgba(var(--primary-rgb), 0.35);
      transform: translateY(-1px);
      animation: mcq-checking 0.7s ease infinite alternate;
    }

    @keyframes mcq-checking {
      from { border-color: rgba(var(--primary-rgb), 0.25); }
      to   { border-color: rgba(var(--primary-rgb), 0.6); }
    }

    .answer-option.is-selected.is-correct {
      box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16), 0 14px 34px -26px rgba(22, 163, 74, 0.85);
    }

    .answer-option.is-selected.is-wrong {
      box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14), 0 14px 34px -26px rgba(220, 38, 38, 0.78);
    }

    .answer-options.has-attempt .answer-option:not(.is-selected) {
      opacity: 0.88;
    }

    .answer-options.is-checking .answer-option:not(.is-pending) {
      opacity: 0.55;
      pointer-events: none;
    }

    html.dark .answer-option.is-correct {
      background: rgba(34, 197, 94, 0.18);
      border-color: rgba(34, 197, 94, 0.62);
      color: #bbf7d0;
    }

    html.dark .answer-option.is-wrong {
      background: rgba(239, 68, 68, 0.16);
      border-color: rgba(248, 113, 113, 0.58);
      color: #fecaca;
    }

    .answer-option.is-correct .option-key {
      background: #16a34a;
      color: #fff;
    }

    .answer-option.is-wrong .option-key {
      background: #dc2626;
      color: #fff;
    }

    /* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
       PREMIUM VISUAL MCQ CHOICE TILES (1:1 Ratio & Instrument Stage)
    â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

    /* The visual grid wrapper - Mobile First */
    .visual-nvr-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.625rem;
      margin-top: 1rem;
      width: 100%;
    }

    @media (min-width: 640px) {
      .visual-nvr-grid {
        gap: 0.875rem;
        margin-top: 1.25rem;
      }
    }

    @media (min-width: 1024px) {
      .visual-nvr-grid.is-compact-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }
    }

    /* Each tile card â€” Mobile-first 1:1 square canvas prevents crushing on small viewports */
    .nvr-tile {
      position: relative;
      aspect-ratio: 1 / 1;
      min-height: 135px;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      background: #ffffff;
      border: 1.5px solid #e2e8f0;
      border-radius: 0.875rem;
      cursor: pointer;
      overflow: hidden;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      user-select: none;
      -webkit-tap-highlight-color: transparent;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }

    /* Strict override against generic .answer-option padding/gap contamination */
    .nvr-tile.answer-option {
      padding: 0 !important;
      gap: 0 !important;
      min-height: 135px !important;
      justify-content: flex-start !important;
      align-items: stretch !important;
    }

    @media (min-width: 640px) {
      .nvr-tile, .nvr-tile.answer-option {
        min-height: 155px !important;
        border-radius: 1rem;
      }
    }

    @media (min-width: 1024px) {
      .nvr-tile, .nvr-tile.answer-option {
        aspect-ratio: 4 / 3;
        min-height: 150px !important;
      }
    }

    .nvr-tile:active {
      transform: scale(0.98);
    }

    html.dark .nvr-tile {
      background: #0b1329;
      border-color: #1e293b;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    }

    .nvr-tile:hover {
      border-color: rgba(var(--primary-rgb), 0.6);
      box-shadow: 0 8px 24px -6px rgba(var(--primary-rgb), 0.2);
      transform: translateY(-2px);
    }

    html.dark .nvr-tile:hover {
      border-color: rgba(var(--primary-rgb), 0.7);
      box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.6);
      background: #0f172a;
    }

    /* Option key badge strip at top */
    .nvr-tile-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.3rem 0.55rem;
      background: #f8fafc;
      border-bottom: 1px solid #edf2f7;
      flex-shrink: 0;
    }

    html.dark .nvr-tile-header {
      background: #111c38;
      border-bottom-color: #1e293b;
    }

    .nvr-option-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.35rem;
      height: 1.35rem;
      border-radius: 0.45rem;
      background: rgba(var(--primary-rgb), 0.12);
      color: var(--primary);
      font-size: 0.68rem;
      font-weight: 800;
      letter-spacing: 0.02em;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      flex-shrink: 0;
      transition: all 0.2s ease;
    }

    html.dark .nvr-option-badge {
      background: rgba(var(--primary-rgb), 0.2);
      color: #34d399;
    }

    /* The actual image area â€” fills remaining 1:1 square canvas */
    .nvr-tile-img-area {
      flex: 1 1 auto;
      min-height: 90px;
      height: 100%;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #ffffff;
      padding: clamp(0.25rem, 1.2vw, 0.55rem);
      position: relative;
      overflow: hidden;
    }

    html.dark .nvr-tile-img-area {
      background: #0b1329;
    }

    .nvr-tile-img-area img {
      display: block;
      width: 100%;
      height: 100%;
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      margin: auto;
      transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      shape-rendering: geometricPrecision;
      text-rendering: geometricPrecision;
      image-rendering: -webkit-optimize-contrast;
    }

    html.dark .nvr-tile-img-area img {
      filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
      border-radius: 0.5rem;
    }

    .nvr-tile:hover .nvr-tile-img-area img {
      transform: scale(1.05);
    }

    @media (max-width: 639px) {
      .mcq-card > .flex.items-start {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.5rem !important;
      }

      .mcq-card > .flex.items-start > .mcq-number {
        align-self: flex-start;
      }

      .mcq-card > .flex.items-start > .flex-1 {
        width: 100% !important;
        min-width: 0 !important;
      }
    }

    @media (max-width: 480px) {
      .mcq-card {
        border-radius: 1rem;
        padding: 0.85rem;
        box-shadow: 0 14px 36px -30px hsl(155 35% 12% / 0.55);
      }

      .mcq-card:hover {
        transform: none;
      }

      .bookmark-btn-top {
        top: 0.95rem;
        right: 0.9rem;
      }

      .mcq-number {
        border-radius: 0.65rem;
        font-size: 0.85rem;
        height: 2.1rem;
        min-width: 2.1rem;
        padding: 0 0.55rem;
      }

      .mcq-question {
        font-size: 0.98rem;
        line-height: 1.38;
        padding-right: 1.35rem;
      }

      .visual-nvr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.625rem;
        margin-top: 0.75rem;
        width: 100% !important;
      }

      .nvr-tile,
      .nvr-tile.answer-option {
        aspect-ratio: 1 / 1 !important;
        min-height: 115px !important;
        border-radius: 0.75rem;
      }

      .nvr-tile-header {
        padding: 0.25rem 0.45rem;
      }

      .nvr-tile-img-area {
        min-height: 70px;
        padding: 0.35rem;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .nvr-tile-img-area img {
        transform: none !important;
        object-fit: contain !important;
        max-width: 100% !important;
        max-height: 100% !important;
        width: 100% !important;
        height: 100% !important;
      }

      .nvr-svg-tile svg {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        height: auto !important;
        object-fit: contain;
      }
    }

    @media (max-width: 399px) {
      .visual-nvr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.5rem !important;
        margin-top: 0.6rem !important;
        width: 100% !important;
      }

      .nvr-tile,
      .nvr-tile.answer-option {
        aspect-ratio: 1 / 1 !important;
        min-height: 90px !important;
        border-radius: 0.625rem !important;
      }

      .nvr-tile-header {
        padding: 0.2rem 0.35rem !important;
      }

      .nvr-tile-img-area {
        min-height: 55px !important;
        padding: 0.2rem !important;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .nvr-tile-img-area img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        transform: none !important;
      }

      .nvr-svg-tile svg {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain;
      }

      .nvr-tile-label {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.4rem !important;
      }

      .nvr-problem-figure {
        margin-top: 0.5rem !important;
        border-radius: 0.75rem !important;
      }

      .nvr-problem-figure-header {
        padding: 0.35rem 0.6rem !important;
      }

      .nvr-problem-figure-body {
        min-height: 6rem !important;
        padding: 0.4rem !important;
      }

      .nvr-problem-figure-body img {
        max-height: clamp(130px, 42vw, 180px) !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
      }

      .nvr-svg-wrapper {
        min-height: 6rem !important;
        padding: 0.4rem !important;
      }

      .nvr-svg-wrapper svg {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 180px !important;
        height: auto !important;
        object-fit: contain;
      }

      .nvr-figure-series {
        padding: 0.6rem 0.75rem !important;
        gap: 0.5rem !important;
      }

      .nvr-figure-cell-img {
        width: clamp(62px, 18vw, 80px) !important;
        height: clamp(62px, 18vw, 80px) !important;
        border-radius: 0.6rem !important;
      }

      .nvr-figure-cell-num {
        font-size: 0.6rem !important;
      }
    }

    /* Optional text label beneath the image */
    .nvr-tile-label {
      padding: 0.25rem 0.6rem;
      font-size: 0.72rem;
      font-weight: 700;
      color: #64748b;
      text-align: center;
      background: #f8fafc;
      border-top: 1px solid #f1f5f9;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex-shrink: 0;
    }

    html.dark .nvr-tile-label {
      background: #111c38;
      border-top-color: #1e293b;
      color: #94a3b8;
    }

    /* â”€â”€ State: selected / checked â”€â”€ */
    .nvr-tile.is-selected {
      border-color: rgba(var(--primary-rgb), 0.85);
      box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2), 0 8px 20px -6px rgba(var(--primary-rgb), 0.25);
      transform: translateY(-1px);
    }

    .nvr-tile.is-selected .nvr-tile-header {
      background: rgba(var(--primary-rgb), 0.08);
    }

    /* â”€â”€ State: pending (checking animation) â”€â”€ */
    .nvr-tile.is-pending {
      animation: nvr-checking 0.65s ease infinite alternate;
    }

    @keyframes nvr-checking {
      from { border-color: rgba(var(--primary-rgb), 0.3); }
      to   { border-color: rgba(var(--primary-rgb), 0.85); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25); }
    }

    /* â”€â”€ State: correct â”€â”€ */
    .nvr-tile.is-correct {
      border-color: #10b981 !important;
      box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 10px 25px -5px rgba(16, 185, 129, 0.35) !important;
      background: #ffffff;
    }

    html.dark .nvr-tile.is-correct {
      background: #064e3b/30;
      border-color: #10b981 !important;
    }

    .nvr-tile.is-correct .nvr-tile-header {
      background: rgba(16, 185, 129, 0.12);
      border-bottom-color: rgba(16, 185, 129, 0.2);
    }

    .nvr-tile.is-correct .nvr-option-badge {
      background: #10b981;
      color: #ffffff;
      box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
    }

    .nvr-tile.is-correct .nvr-tile-img-area {
      background: rgba(240, 253, 244, 0.6);
    }

    html.dark .nvr-tile.is-correct .nvr-tile-img-area {
      background: rgba(6, 78, 59, 0.2);
    }

    /* â”€â”€ State: wrong â”€â”€ */
    .nvr-tile.is-wrong {
      border-color: #ef4444 !important;
      box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2), 0 10px 25px -5px rgba(239, 68, 68, 0.3) !important;
    }

    html.dark .nvr-tile.is-wrong {
      background: #7f1d1d/30;
      border-color: #ef4444 !important;
    }

    .nvr-tile.is-wrong .nvr-tile-header {
      background: rgba(239, 68, 68, 0.1);
      border-bottom-color: rgba(239, 68, 68, 0.2);
    }

    .nvr-tile.is-wrong .nvr-option-badge {
      background: #ef4444;
      color: #ffffff;
      box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    }

    .nvr-tile.is-wrong .nvr-tile-img-area {
      background: rgba(254, 242, 242, 0.6);
    }

    html.dark .nvr-tile.is-wrong .nvr-tile-img-area {
      background: rgba(127, 29, 29, 0.2);
    }

    /* Dimming un-selected after attempt */
    .visual-nvr-grid.has-attempt .nvr-tile:not(.is-selected):not(.is-correct) {
      opacity: 0.45;
      filter: grayscale(0.15);
    }

    .visual-nvr-grid.is-checking .nvr-tile:not(.is-pending) {
      opacity: 0.4;
      pointer-events: none;
    }

    /* â”€â”€ Option status icon (top-right of header) â”€â”€ */
    .nvr-status-icon {
      font-size: 0.95rem;
      opacity: 0;
      transform: scale(0.7);
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nvr-status-icon.show-icon {
      opacity: 1;
      transform: scale(1);
    }
    .nvr-status-icon.correct { color: #10b981; }
    .nvr-status-icon.wrong   { color: #ef4444; }

    /* â•â• Problem Figure Container: Psychometric Instrument Stage â•â• */
    .nvr-problem-figure {
      margin-top: 1rem;
      border: 1.5px solid #e2e8f0;
      border-radius: 1.125rem;
      overflow: hidden;
      background: #ffffff;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    html.dark .nvr-problem-figure {
      border-color: #1e293b;
      background: #0b1329;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    .nvr-problem-figure:hover {
      border-color: #cbd5e1;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    }

    html.dark .nvr-problem-figure:hover {
      border-color: #334155;
    }

    .nvr-problem-figure-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.55rem 1rem;
      background: #f8fafc;
      border-bottom: 1px solid #edf2f7;
    }

    html.dark .nvr-problem-figure-header {
      background: #111c38;
      border-bottom-color: #1e293b;
    }

    /* Technical grid stage backdrop */
    .nvr-problem-figure-body {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #f8fafc;
      background-image: 
        linear-gradient(rgba(226, 232, 240, 0.6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(226, 232, 240, 0.6) 1px, transparent 1px);
      background-size: 20px 20px;
      padding: clamp(1rem, 2.5vw, 1.75rem);
      min-height: 150px;
    }

    html.dark .nvr-problem-figure-body {
      background-color: #080e1e;
      background-image: 
        linear-gradient(rgba(30, 41, 59, 0.65) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 41, 59, 0.65) 1px, transparent 1px);
      background-size: 20px 20px;
    }

    /* Technical alignment corner ticks */
    .nvr-problem-figure-body::before,
    .nvr-problem-figure-body::after {
      content: "";
      position: absolute;
      width: 14px;
      height: 14px;
      pointer-events: none;
      transition: border-color 0.2s ease;
    }

    .nvr-problem-figure-body::before {
      top: 10px;
      left: 10px;
      border-top: 2px solid #cbd5e1;
      border-left: 2px solid #cbd5e1;
    }

    .nvr-problem-figure-body::after {
      bottom: 10px;
      right: 10px;
      border-bottom: 2px solid #cbd5e1;
      border-right: 2px solid #cbd5e1;
    }

    html.dark .nvr-problem-figure-body::before,
    html.dark .nvr-problem-figure-body::after {
      border-color: #334155;
    }

    .nvr-problem-figure-body img {
      max-height: clamp(180px, 32vw, 300px);
            width: 100%;
      max-width: 100%;
      object-fit: contain;
      cursor: zoom-in;
      transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
      shape-rendering: geometricPrecision;
      text-rendering: geometricPrecision;
      image-rendering: -webkit-optimize-contrast;
      z-index: 1;
    }

    html.dark .nvr-problem-figure-body img {
      filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
      border-radius: 0.625rem;
    }

    @media (max-width: 480px) {
      .nvr-problem-figure {
        margin-top: 0.65rem;
        border-radius: 0.85rem;
        width: 100% !important;
      }

      .nvr-problem-figure-header {
        padding: 0.4rem 0.75rem;
      }

      .nvr-problem-figure-body {
        min-height: 7.5rem;
        padding: 0.5rem;
      }

      .nvr-problem-figure-body img {
        max-height: clamp(170px, 48vw, 240px) !important;
                width: 100% !important;
        max-width: 100% !important;
        object-fit: contain !important;
      }

      .nvr-svg-wrapper {
        min-height: 7.5rem;
        padding: 0.5rem;
      }

      .nvr-svg-wrapper svg {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 220px !important;
        height: auto !important;
        object-fit: contain;
      }
    }

    .nvr-problem-figure-body img:hover {
      transform: scale(1.025);
    }

    .img-fallback-active img { display: none !important; }
    .img-fallback-active .img-fallback-placeholder { display: flex !important; }
    .nvr-svg-wrapper {
      width: 100%;
      min-height: 150px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
        .nvr-svg-wrapper svg {
      width: min(100%, 420px);
      max-width: 100%;
      max-height: 100%;
      height: auto;
      display: block;
      margin: auto;
    }
    @media (max-width: 480px) {
      .nvr-svg-wrapper svg {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 200px !important;
        height: auto !important;
      }
    }
    .nvr-svg-tile {
      width: 100%;
      height: 100%;
      min-height: 85px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0.2rem;
    }
    .nvr-svg-tile svg {
      width: 100%;
      height: 100%;
      max-width: 100%;
      max-height: 100%;
      min-height: 70px;
      display: block;
      margin: auto;
    }

    /* Problem Figure Series (horizontal scroll strip) */
    .nvr-figure-series {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 1rem 1.25rem;
      overflow-x: auto;
      background: #f8fafc;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
    }

    html.dark .nvr-figure-series {
      background: #090f21;
    }

    .nvr-figure-series::-webkit-scrollbar {
      height: 4px;
    }
    .nvr-figure-series::-webkit-scrollbar-thumb {
      background: #cbd5e1;
      border-radius: 4px;
    }
    html.dark .nvr-figure-series::-webkit-scrollbar-thumb {
      background: #334155;
    }

    .nvr-figure-cell {
      display: flex;
      flex-direction: column;
      align-items: center;
      flex-shrink: 0;
    }

    .nvr-figure-cell-img {
      display: flex;
      align-items: center;
      justify-content: center;
      width: clamp(74px, 14vw, 92px);
      height: clamp(74px, 14vw, 92px);
      background: #ffffff;
      border: 1.5px solid #e2e8f0;
      border-radius: 0.75rem;
      overflow: hidden;
      cursor: zoom-in;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }

    html.dark .nvr-figure-cell-img {
      background: #111c38;
      border-color: #1e293b;
    }

    .nvr-figure-cell-img:hover {
      border-color: rgba(var(--primary-rgb), 0.5);
      box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
      transform: translateY(-2px) scale(1.03);
    }

    .nvr-figure-cell-img img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      padding: 0.35rem;
    }

    .nvr-figure-cell-num {
      font-size: 0.68rem;
      font-weight: 750;
      color: #94a3b8;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      margin-top: 0.35rem;
      letter-spacing: 0.02em;
    }

    .nvr-figure-arrow {
      color: #94a3b8;
      font-size: 0.75rem;
      flex-shrink: 0;
      opacity: 0.6;
    }

    /* â”€â”€ Question missing mark cell â”€â”€ */
    .nvr-figure-cell-img.is-missing {
      background: #f1f5f9;
      border: 2px dashed #94a3b8;
      font-size: 1.35rem;
      font-weight: 900;
      color: var(--primary);
      cursor: default;
    }

    html.dark .nvr-figure-cell-img.is-missing {
      background: #0f172a;
      border-color: #334155;
      color: #34d399;
    }




    .option-text {
      flex: 1;
      font-size: 0.92rem;
      font-weight: 720;
      line-height: 1.45;
      min-width: 0;
    }

    .option-key {
      align-items: center;
      background: rgba(var(--primary-rgb), 0.1);
      border-radius: 0.65rem;
      color: var(--primary);
      display: inline-flex;
      flex-shrink: 0;
      font-size: 0.78rem;
      font-weight: 900;
      height: 1.75rem;
      justify-content: center;
      width: 1.75rem;
    }

    .option-icon {
      flex-shrink: 0;
      font-size: 1.05rem;
      opacity: 0;
      transform: translateX(4px);
      transition: opacity 0.18s ease, transform 0.18s ease;
      width: 1.25rem;
    }

    .option-icon.show-icon {
      opacity: 1;
      transform: translateX(0);
    }

    .option-icon.correct { color: #16a34a; }
    .option-icon.wrong { color: #dc2626; }

    .mcq-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.65rem;
      margin-top: 1rem;
    }

    .mcq-action {
      align-items: center;
      border: 1px solid var(--border);
      border-radius: 999px;
      color: var(--foreground);
      display: inline-flex;
      font-size: 0.8rem;
      font-weight: 850;
      gap: 0.45rem;
      min-height: 2.35rem;
      padding: 0.58rem 0.9rem;
      transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    }

    .mcq-action.primary {
      background: var(--primary);
      border-color: var(--primary);
      color: var(--primary-foreground);
    }

    .mcq-action.warning {
      --cat-accent: rgb(220 38 38);
      color: rgb(220 38 38);
    }

    .mcq-action:hover {
      background: var(--card);
      border-color: rgba(var(--primary-rgb), 0.34);
      color: var(--primary);
      transform: translateY(-1px);
    }

    .mcq-action.primary:hover {
      background: var(--primary);
      color: var(--primary-foreground);
      opacity: 0.92;
    }

    @media (max-width: 480px) {
      .mcq-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
        margin-top: 0.7rem;
      }

      .mcq-action {
        font-size: 0.74rem;
        gap: 0.3rem;
        justify-content: center;
        min-height: 2.2rem;
        padding: 0.48rem 0.55rem;
        white-space: nowrap;
      }

      .mcq-action.primary {
        grid-column: 1 / -1;
        font-size: 0.8rem;
        min-height: 2.55rem;
      }
    }

    .answer-box {
      background: #f0fdf4;
      border: 1.5px solid rgba(16, 185, 129, 0.28);
      border-radius: 14px;
      color: var(--foreground, #0f172a);
      font-size: 0.88rem;
      line-height: 1.6;
      margin-top: 1rem;
      padding: 1rem 1.25rem;
      box-shadow: 0 2px 6px rgba(16, 185, 129, 0.04);
      transition: all 0.2s ease;
    }

    .answer-box.is-correct-attempt {
      background: #f0fdf4;
      border-color: rgba(16, 185, 129, 0.4);
    }

    .answer-box.is-wrong-attempt {
      background: #fff7ed;
      border-color: rgba(249, 115, 22, 0.35);
    }

    html.dark .answer-box {
      background: rgba(16, 185, 129, 0.07);
      border-color: rgba(16, 185, 129, 0.25);
    }

    html.dark .answer-box.is-wrong-attempt {
      background: rgba(249, 115, 22, 0.08);
      border-color: rgba(249, 115, 22, 0.3);
    }

    .answer-box-header {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding-bottom: 0.65rem;
      margin-bottom: 0.65rem;
      border-bottom: 1px solid rgba(16, 185, 129, 0.18);
    }

    .answer-box.is-wrong-attempt .answer-box-header {
      border-bottom-color: rgba(249, 115, 22, 0.18);
    }

    .answer-key-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      font-size: 0.84rem;
      font-weight: 700;
      color: #065f46;
    }

    html.dark .answer-key-badge {
      color: #34d399;
    }

    .answer-key-badge strong {
      font-weight: 850;
      color: #047857;
    }

    html.dark .answer-key-badge strong {
      color: #6ee7b7;
    }

    .answer-verified-tag {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      font-size: 0.7rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #059669;
      background: rgba(16, 185, 129, 0.12);
      padding: 0.2rem 0.6rem;
      border-radius: 999px;
    }

    html.dark .answer-verified-tag {
      color: #34d399;
      background: rgba(16, 185, 129, 0.18);
    }

    .explanation-container {
      font-size: 0.88rem;
      color: #334155;
      line-height: 1.65;
    }

    html.dark .explanation-container {
      color: #cbd5e1;
    }

    /* Explanation Formatted Elements */
    .exp-title-banner {
      font-size: 0.8rem;
      font-weight: 850;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #047857;
      margin-bottom: 0.6rem;
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    html.dark .exp-title-banner {
      color: #34d399;
    }

    .exp-step-list {
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
      margin: 0.4rem 0 0;
    }

    .exp-step-item {
      display: flex;
      align-items: flex-start;
      gap: 0.6rem;
      background: rgba(255, 255, 255, 0.75);
      border: 1px solid rgba(16, 185, 129, 0.15);
      border-radius: 10px;
      padding: 0.6rem 0.85rem;
      transition: background 0.15s;
    }

    html.dark .exp-step-item {
      background: rgba(15, 23, 42, 0.4);
      border-color: rgba(255, 255, 255, 0.08);
    }

    .exp-step-num {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 1.5rem;
      height: 1.5rem;
      border-radius: 999px;
      background: #059669;
      color: #ffffff;
      font-size: 0.72rem;
      font-weight: 900;
      flex-shrink: 0;
      margin-top: 0.1rem;
    }

    .exp-step-content {
      flex: 1;
      font-size: 0.86rem;
      line-height: 1.55;
      color: #334155;
    }

    html.dark .exp-step-content {
      color: #e2e8f0;
    }

    .exp-step-heading {
      font-weight: 800;
      color: #0f172a;
      display: inline;
      margin-right: 0.35rem;
    }

    html.dark .exp-step-heading {
      color: #f8fafc;
    }

    .exp-paragraph {
      margin-bottom: 0.5rem;
      line-height: 1.6;
    }

    .exp-paragraph:last-child {
      margin-bottom: 0;
    }

    .answer-feedback {
      align-items: center;
      border-radius: 999px;
      display: none;
      font-size: 0.78rem;
      font-weight: 900;
      gap: 0.4rem;
      margin-bottom: 0.75rem;
      padding: 0.45rem 0.7rem;
      width: max-content;
    }

    .answer-feedback.show {
      display: inline-flex;
    }

    .answer-feedback.correct {
      background: rgba(34, 197, 94, 0.14);
      color: #15803d;
    }

    .answer-feedback.wrong {
      background: rgba(249, 115, 22, 0.14);
      color: #c2410c;
    }

    .answer-label {
      color: var(--primary);
      font-weight: 900;
    }

    .pagination-shell nav {
      display: flex;
      justify-content: center;
    }

    .pagination-shell .pagination {
      align-items: center;
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      justify-content: center;
      margin: 0;
      padding: 0;
    }

    .pagination-shell a,
    .pagination-shell span {
      border-radius: 0.75rem !important;
      font-weight: 800;
    }

    .notes-section {
      background: #f0fdf4;
      border: 2px solid #22c55e;
      border-radius: 0.9rem;
      color: #374151;
      margin-bottom: 2rem;
      padding: 1.35rem;
    }

    html.dark .notes-section {
      background: rgba(16, 185, 129, 0.1);
      border-color: rgba(34, 197, 94, 0.45);
      color: var(--foreground);
    }

    .notes-section h3 {
      align-items: center;
      color: #065f46;
      display: flex;
      font-size: 1.18rem;
      font-weight: 900;
      gap: 0.5rem;
      margin-bottom: 0.85rem;
    }

    .notes-title-row {
      align-items: center;
      display: flex;
      gap: 1rem;
      justify-content: space-between;
      margin-bottom: 0.85rem;
    }

    .notes-title-row h3 {
      margin-bottom: 0;
    }

    .notes-edit-link {
      align-items: center;
      background: linear-gradient(135deg, #10b981, #059669);
      border: 0;
      border-radius: 999px;
      color: #fff;
      cursor: pointer;
      display: inline-flex;
      flex-shrink: 0;
      font-size: 0.76rem;
      font-weight: 900;
      gap: 0.35rem;
      padding: 0.45rem 0.75rem;
      text-decoration: none;
    }

    .notes-edit-link:hover {
      color: #fff;
      transform: translateY(-1px);
    }

    .notes-admin-actions {
      align-items: center;
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem;
      justify-content: flex-end;
    }

    .notes-full-editor-link {
      align-items: center;
      border: 1px solid rgba(5, 150, 105, 0.28);
      border-radius: 999px;
      color: #047857;
      display: inline-flex;
      flex-shrink: 0;
      font-size: 0.74rem;
      font-weight: 900;
      gap: 0.35rem;
      padding: 0.4rem 0.7rem;
      text-decoration: none;
    }

    .notes-full-editor-link:hover {
      color: #065f46;
      border-color: rgba(5, 150, 105, 0.5);
    }

    .inline-notes-panel {
      background: rgba(255, 255, 255, 0.72);
      border: 1px solid rgba(16, 185, 129, 0.22);
      border-radius: 0.85rem;
      margin: 0.8rem 0 1rem;
      padding: 0.75rem;
    }

    html.dark .inline-notes-panel {
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(16, 185, 129, 0.28);
    }

    .inline-notes-toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem;
    }

    .inline-notes-toolbar button,
    .inline-notes-toolbar select,
    .inline-notes-actions button {
      align-items: center;
      background: #fff;
      border: 1px solid rgba(15, 118, 110, 0.22);
      border-radius: 0.58rem;
      color: #064e3b;
      cursor: pointer;
      display: inline-flex;
      font-size: 0.78rem;
      font-weight: 900;
      gap: 0.35rem;
      min-height: 2.15rem;
      padding: 0.45rem 0.65rem;
    }

    .inline-notes-toolbar select {
      max-width: 8.5rem;
    }

    .inline-notes-toolbar button:hover,
    .inline-notes-toolbar select:hover,
    .inline-notes-actions button:hover {
      border-color: #10b981;
      color: #047857;
    }

    .inline-notes-actions {
      align-items: center;
      display: flex;
      flex-wrap: wrap;
      gap: 0.55rem;
      justify-content: space-between;
      margin-top: 0.65rem;
    }

    .inline-notes-actions .save-notes-button {
      background: linear-gradient(135deg, #10b981, #059669);
      border-color: transparent;
      color: #fff;
    }

    .inline-notes-actions .cancel-notes-button {
      background: #f8fafc;
      color: #475569;
    }

    .inline-notes-status {
      color: #047857;
      font-size: 0.78rem;
      font-weight: 900;
    }

    .notes-section.is-collapsed [data-notes-content] { display: none; }
    .notes-collapse-button {
      align-items: center;
      background: transparent;
      border: 1px solid rgba(5, 150, 105, 0.25);
      border-radius: 999px;
      color: #047857;
      cursor: pointer;
      display: inline-flex;
      font-size: .74rem;
      font-weight: 900;
      gap: .4rem;
      padding: .4rem .72rem;
    }
    .notes-collapse-button:disabled { cursor: not-allowed; opacity: .45; }
    .deep-dive-card {
      background: linear-gradient(135deg, rgba(5, 150, 105, .08), rgba(16, 185, 129, .04));
      border: 1px solid rgba(5, 150, 105, .22);
      border-radius: .9rem;
      margin-top: 1.15rem;
      padding: 1rem 1.1rem;
    }
    .deep-dive-card a { display: inline-flex; gap: .45rem; margin-top: .5rem; }

    .hub-content.is-inline-editing {
      background: #fff;
      border: 2px dashed rgba(16, 185, 129, 0.45);
      border-radius: 0.85rem;
      min-height: 12rem;
      outline: none;
      padding: 1rem;
    }

    .hub-content.is-inline-editing:focus {
      border-style: solid;
      box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
    }

    html.dark .notes-section h3 {
      color: var(--primary);
    }

    .notes-section h4 {
      color: #065f46;
      font-size: 1.02rem;
      font-weight: 900;
      margin-bottom: 0.55rem;
      margin-top: 1rem;
    }

    html.dark .notes-section h4 {
      color: var(--foreground);
    }

    .notes-section p,
    .notes-section ul {
      font-size: 0.94rem;
      font-weight: 560;
      line-height: 1.75;
      margin-bottom: 0.9rem;
    }

    .notes-section ul {
      list-style-type: disc;
      padding-left: 1.35rem;
    }

    .notes-section li + li {
      margin-top: 0.35rem;
    }

    .notes-section .hub-content h2,
    .notes-section .hub-content h3,
    .notes-section .hub-content h4 {
      color: #065f46;
      font-weight: 900;
      margin: 1rem 0 0.55rem;
    }

    .notes-section .hub-content blockquote,
    .notes-section .hub-content .notes-callout {
      background: rgba(16, 185, 129, 0.12);
      border-left: 4px solid #10b981;
      border-radius: 0.75rem;
      color: #065f46;
      font-weight: 700;
      margin: 0.95rem 0;
      padding: 0.85rem 1rem;
    }

    .notes-section .hub-content .notes-callout.warning {
      background: rgba(245, 158, 11, 0.14);
      border-left-color: #f59e0b;
      color: #78350f;
    }

    .notes-section .hub-content table {
      border-collapse: collapse;
      margin: 1rem 0;
      width: 100%;
    }

    .notes-section .hub-content th,
    .notes-section .hub-content td {
      border: 1px solid rgba(15, 118, 110, 0.18);
      padding: 0.65rem;
      text-align: left;
      vertical-align: top;
    }

    .notes-section .hub-content th {
      background: rgba(16, 185, 129, 0.14);
      color: #065f46;
      font-weight: 900;
    }

    .notes-section .hub-content figure.notes-image,
    .notes-section .hub-content figure {
      margin: 1rem 0;
    }

    .notes-section .hub-content img {
      border: 1px solid rgba(15, 118, 110, 0.14);
      border-radius: 0.85rem;
      box-shadow: 0 14px 32px -28px rgba(15, 23, 42, 0.7);
      display: block;
      height: auto;
      max-width: 100%;
    }

    .notes-section .hub-content figcaption {
      color: var(--muted-foreground);
      font-size: 0.8rem;
      font-weight: 750;
      line-height: 1.5;
      margin-top: 0.45rem;
      text-align: center;
    }

    .notes-section .hub-content pre {
      background: #0f172a;
      border-radius: 0.75rem;
      color: #e5e7eb;
      overflow-x: auto;
      padding: 0.9rem;
      white-space: pre-wrap;
    }

    .notes-section .hub-content a {
      color: #047857;
      font-weight: 800;
      text-decoration: underline;
    }
