
    /* Base Figma-inspired Light Mode Canvas */
    body {
      font-family: system-ui, -apple-system, sans-serif;
      background-color: #F8FAFC;
      color: #0F172A;
    }

    /* Subtle hairline scrollbars */
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }
    ::-webkit-scrollbar-track {
      background: transparent;
    }
    ::-webkit-scrollbar-thumb {
      background: rgba(148, 163, 184, 0.4);
      border-radius: 9999px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: rgba(100, 116, 139, 0.6);
    }

    .no-scrollbar::-webkit-scrollbar { display: none; }
    .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

    /* Highlighted phrases inside solution text */
    mark.solution-highlight {
      background-color: rgba(254, 240, 138, 0.65);
      color: #0F172A;
      border-bottom: 2px solid #F59E0B;
      border-radius: 3px;
      padding: 0 2px;
      cursor: pointer;
      transition: background-color 150ms ease;
    }
    mark.solution-highlight:hover {
      background-color: rgba(253, 224, 71, 0.85);
    }

    /* Micro-animations */
    @keyframes fadeSlideUp {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .animate-reveal {
      animation: fadeSlideUp 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes tooltipPop {
      from { opacity: 0; transform: translate(-50%, -90%) scale(0.95); }
      to { opacity: 1; transform: translate(-50%, -100%) scale(1); }
    }
    .tooltip-pop {
      animation: tooltipPop 130ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    /* Drag-over visual state */
    .dropzone-active {
      border-color: #4F46E5 !important;
      background-color: #EEF2FF !important;
    }

    /* Clean Print / PDF Revision Sheet CSS */
    @media print {
      body {
        background: #FFFFFF !important;
        color: #0F172A !important;
      }
      header,
      #mobile-nav,
      #highlight-tooltip,
      #toast-container,
      #confirm-modal,
      #merge-modal,
      #nav-drawer-modal,
      #window-drop-overlay,
      .no-print {
        display: none !important;
      }
      #view-practice,
      #view-recall,
      #view-import {
        display: none !important;
      }
      #view-notes {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
      }
      .print-only-header {
        display: block !important;
        margin-bottom: 18px;
        padding-bottom: 10px;
        border-bottom: 2px solid #0F172A;
      }
      .vault-card {
        break-inside: avoid;
        border: 1px solid #CBD5E1 !important;
        box-shadow: none !important;
        margin-bottom: 14px !important;
        padding: 14px !important;
      }
      .vault-bullet {
        background: #FFFBEB !important;
        border-left: 3px solid #D97706 !important;
      }
      textarea.vault-takeaway {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        resize: none !important;
      }
    }
  /* Pro controls intentionally use static local CSS for offline usability. */
.pro-toolbar{display:flex;gap:.55rem;flex-wrap:wrap;align-items:center;background:white;border:1px solid #e2e8f0;border-radius:14px;padding:10px 12px;margin-bottom:12px;font-size:13px;color:#334155}.pro-toolbar label{display:flex;align-items:center;gap:5px}.pro-btn{border:1px solid #cbd5e1;border-radius:8px;padding:7px 11px;font-size:12px;font-weight:600;background:white;color:#334155;cursor:pointer;line-height:1.3}.pro-btn:hover,.pro-btn[aria-pressed=true]{background:#eef2ff;border-color:#a5b4fc;color:#4338ca}.pro-btn.primary{background:#4f46e5;color:white;border-color:#4f46e5}.pro-btn.danger{color:#be123c}.pro-btn:disabled{opacity:.45;cursor:not-allowed}.pro-pill{background:#eef2ff;color:#4338ca;border-radius:5px;padding:3px 6px;font-weight:800;font-size:10px}.pro-muted{font-size:12px;color:#64748b;line-height:1.5}.pro-toolbar .pro-muted{margin-left:auto}.pro-field{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:600;margin:10px 0}.pro-field input,.pro-field textarea,.pro-field select,.pro-toolbar select,.pro-toolbar input,.pro-dialog input[type=number],.pro-edit-row textarea{border:1px solid #cbd5e1;border-radius:8px;padding:8px;background:#f8fafc;color:#0f172a;font:inherit;min-width:0}.pro-dialog{width:min(720px,calc(100% - 24px));max-height:90vh;margin:auto;overflow:auto;background:white;color:#0f172a;border:1px solid #cbd5e1;border-radius:18px;box-shadow:0 20px 80px #0f172a44;padding:0}.pro-dialog::backdrop{background:#0f172a77}.pro-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;background:white;border-bottom:1px solid #e2e8f0;position:sticky;top:0;z-index:2}.pro-dialog h2{font-size:19px;font-weight:700}.pro-dialog h3{font-size:15px;font-weight:700;margin:18px 0 8px}.pro-dialog #pro-dialog-body{padding:18px 20px}.pro-dialog p{line-height:1.55}.pro-edit-row{display:flex;align-items:start;gap:8px;margin:8px 0}.pro-edit-row textarea{flex:1;resize:vertical}.pro-section{padding:12px;border:1px solid #e2e8f0;border-radius:10px;margin:8px 0;font-size:13px}.pro-section summary{cursor:pointer;font-weight:600}.pro-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;align-items:center}.pro-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}.pro-kpis>div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:12px;display:grid;gap:5px}.pro-kpis strong{font-size:22px;color:#4338ca}.pro-kpis small{font-size:11px;color:#64748b}.pro-statrow{display:flex;justify-content:space-between;gap:6px;flex-wrap:wrap;padding:8px 0;border-bottom:1px solid #e2e8f0;font-size:12px}.pro-statrow span:first-child{flex:1}.pro-bar{height:5px;width:100%;border-radius:5px;background:#e2e8f0;overflow:hidden}.pro-bar i{display:block;height:100%;background:#6366f1}.pro-tags{font-size:11px;font-weight:600;color:#4338ca}.pro-choice-list{display:grid;gap:8px}.pro-choice-list .pro-btn{text-align:left;padding:12px}.pro-undo{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);z-index:9999;color:white;background:#0f172a;padding:10px 14px;border-radius:10px;display:flex;gap:12px;align-items:center;box-shadow:0 10px 30px #0003}.pro-undo[hidden]{display:none}.pro-struck{text-decoration:line-through;opacity:.45}.pro-eliminate{margin-top:10px}.pro-dialog .pro-btn:focus-visible,.pro-toolbar .pro-btn:focus-visible{outline:2px solid #6366f1;outline-offset:2px}
@media print{.pro-toolbar,.pro-undo,.pro-dialog,.pro-btn{display:none!important}}@media(max-width:600px){.pro-toolbar .pro-muted{margin-left:0;flex-basis:100%}.pro-dialog #pro-dialog-body{padding:12px}.pro-dialog>header{padding:12px}}

.print-takeaway{white-space:pre-wrap;font-size:12px;line-height:1.5}

.pro-chapter-heading{grid-column:1/-1;font-size:16px;font-weight:700;padding:10px 0;border-bottom:1px solid #e2e8f0}.pro-vault-pagination{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:12px;padding:12px}

#cloud-account { padding: .8rem 1rem; display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; background: white; color: #172439; }
#cloud-account button { background: #4338ca; color: white; padding: .65rem 1rem; border-radius: .5rem; font-weight: 600; }
#cloud-account button:empty { display: none; }
