/* -- DESIGN TOKENS (matching vikrammirji.in palette) -- */
:root{
  --navy:#3D3327;
  --navy-mid:#ECE1D2;
  --navy-light:#FBF7F0;
  --gold:#B39269;
  --gold-light:#C7AC8C;
  --cream:#F4ECE1;
  --white:#ffffff;
  --text-dark:#3D3327;
  --text-muted:#8B7E6C;
  --success:#7D9471;
  --warning:#C08A4F;
  --danger:#B66552;
  --info:#7E94A8;
  --border:#DED1BC;
  --card-bg:#FAF5EC;
  --input-bg:#EFE6D8;
  --radius:10px;
  --shadow:0 8px 32px rgba(61,51,39,.15);
}
*{box-sizing:border-box;margin:0;padding:0;}
html{font-size:15px;}
body{
  font-family:'Source Sans 3',sans-serif;
  background:var(--cream);
  color:var(--navy);
  min-height:100vh;
  background-image:
    radial-gradient(ellipse at 10% 20%, rgba(179,146,105,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 80%, rgba(179,146,105,0.05) 0%, transparent 55%);
}

/* -- TOPBAR -- */
#topbar{
  display:flex;align-items:center;justify-content:space-between;
  background:var(--navy-mid);
  border-bottom:2px solid var(--gold);
  padding:12px 24px;
  position:sticky;top:0;z-index:100;
}
#topbar .brand{display:flex;align-items:center;gap:12px;}
#topbar .brand img{width:40px;height:40px;border-radius:50%;border:2px solid var(--gold);}
#topbar .brand-text h1{
  font-family:'Playfair Display',serif;
  font-size:1.1rem;color:var(--gold);line-height:1.1;
}
#topbar .brand-text p{font-size:0.72rem;color:var(--text-muted);letter-spacing:.5px;}
#topbar .nav-right{display:flex;align-items:center;gap:12px;}
#user-label{font-size:0.8rem;color:var(--gold-light);}
#notif-bell{
  position:relative;cursor:pointer;background:none;border:none;
  font-size:1.3rem;color:var(--navy);transition:transform .2s;
}
#notif-bell:hover{transform:scale(1.15);}
#notif-count{
  position:absolute;top:-4px;right:-4px;
  background:var(--danger);color:#fff;
  font-size:0.6rem;border-radius:50%;width:16px;height:16px;
  display:flex;align-items:center;justify-content:center;
  font-weight:700;display:none;
}
#btn-logout{
  padding:6px 14px;border:1px solid var(--gold);border-radius:6px;
  background:transparent;color:var(--gold);cursor:pointer;
  font-size:0.78rem;font-family:'Source Sans 3',sans-serif;
  transition:all .2s;
}
#btn-logout:hover{background:var(--gold);color:var(--navy);}

/* -- AUTH SCREEN -- */
#auth-screen{
  display:flex;align-items:center;justify-content:center;
  min-height:100vh;padding:20px;
}
.auth-card{
  background:var(--card-bg);
  border:1px solid var(--border);
  border-radius:16px;
  padding:40px 36px;
  width:100%;max-width:400px;
  box-shadow:var(--shadow);
  text-align:center;
  animation:fadeUp .5s ease;
}
.auth-logo{width:72px;height:72px;border-radius:50%;border:3px solid var(--gold);margin:0 auto 16px;}
.auth-card h2{
  font-family:'Playfair Display',serif;
  font-size:1.5rem;color:var(--gold);margin-bottom:4px;
}
.auth-card .sub{font-size:0.8rem;color:var(--text-muted);margin-bottom:28px;}
.auth-card label{display:block;text-align:left;font-size:0.8rem;color:var(--text-muted);margin-bottom:5px;}
.auth-card input{
  width:100%;padding:11px 14px;
  background:var(--input-bg);
  border:1px solid var(--border);
  border-radius:8px;color:var(--navy);
  font-family:'Source Sans 3',sans-serif;font-size:0.9rem;
  margin-bottom:16px;outline:none;transition:border .2s;
}
.auth-card input:focus{border-color:var(--gold);}
.btn-primary{
  width:100%;padding:12px;border:none;border-radius:8px;
  background:linear-gradient(135deg,var(--gold),var(--gold-light));
  color:var(--navy);font-weight:700;
  font-family:'Playfair Display',serif;font-size:1rem;
  cursor:pointer;transition:opacity .2s;
}
.btn-primary:hover{opacity:.88;}
#auth-error{color:var(--danger);font-size:0.8rem;margin-top:10px;display:none;}
#auth-tabs{display:flex;gap:0;margin-bottom:24px;border-radius:8px;overflow:hidden;border:1px solid var(--border);}
.auth-tab{
  flex:1;padding:9px;background:transparent;border:none;
  color:var(--text-muted);font-family:'Source Sans 3',sans-serif;font-size:0.85rem;
  cursor:pointer;transition:all .2s;
}
.auth-tab.active{background:var(--gold);color:var(--navy);font-weight:700;}

/* -- MAIN APP -- */
#app{display:none;}
.container{max-width:960px;margin:0 auto;padding:24px 16px;}

/* -- TABS -- */
.page-tabs{display:flex;gap:4px;margin-bottom:24px;background:var(--card-bg);padding:5px;border-radius:12px;border:1px solid var(--border);}
.page-tab{
  flex:1;padding:9px 8px;text-align:center;border:none;border-radius:8px;
  background:transparent;color:var(--text-muted);
  font-family:'Source Sans 3',sans-serif;font-size:0.8rem;cursor:pointer;transition:all .2s;
}
.page-tab.active{background:var(--navy-light);color:var(--gold);font-weight:600;}

/* -- SECTION TITLES -- */
.sec-title{
  font-family:'Playfair Display',serif;
  font-size:1.3rem;color:var(--gold);margin-bottom:4px;
}
.sec-sub{font-size:0.8rem;color:var(--text-muted);margin-bottom:18px;}

/* -- CARDS -- */
.card{
  background:var(--card-bg);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:20px;margin-bottom:14px;
  box-shadow:0 2px 12px rgba(61,51,39,0.1);
  animation:fadeUp .3s ease;
}
.card-row{display:flex;gap:14px;flex-wrap:wrap;}
.card-row .card{flex:1;min-width:160px;text-align:center;}

/* -- FORM -- */
.form-row{display:flex;gap:12px;flex-wrap:wrap;}
.form-group{flex:1;min-width:160px;}
.form-group label{display:block;font-size:0.78rem;color:var(--text-muted);margin-bottom:5px;}
.form-group input,.form-group select,.form-group textarea{
  width:100%;padding:9px 12px;
  background:var(--input-bg);border:1px solid var(--border);
  border-radius:7px;color:var(--navy);
  font-family:'Source Sans 3',sans-serif;font-size:0.88rem;outline:none;transition:border .2s;
}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:var(--gold);}
.form-group select option{background:var(--navy-mid);}
.form-group textarea{resize:vertical;min-height:70px;}
.btn{
  padding:9px 20px;border-radius:7px;border:none;cursor:pointer;
  font-family:'Source Sans 3',sans-serif;font-size:0.85rem;font-weight:600;
  transition:all .2s;
}
.btn-gold{background:var(--gold);color:var(--navy);}
.btn-gold:hover{background:var(--gold-light);}
.btn-ghost{background:transparent;border:1px solid var(--border);color:var(--navy);}
.btn-ghost:hover{border-color:var(--gold);color:var(--gold);}
.btn-danger{background:var(--danger);color:#fff;}
.btn-success{background:var(--success);color:#fff;}
.btn-sm{padding:5px 12px;font-size:0.78rem;}

/* -- BADGE -- */
.badge{
  display:inline-block;padding:2px 9px;border-radius:20px;
  font-size:0.7rem;font-weight:700;letter-spacing:.4px;
}
.badge-overdue{background:rgba(231,76,60,.2);color:#e74c3c;border:1px solid #e74c3c55;}
.badge-today{background:rgba(243,156,18,.2);color:#f39c12;border:1px solid #f39c1255;}
.badge-upcoming{background:rgba(52,152,219,.2);color:#3498db;border:1px solid #3498db55;}
.badge-done{background:rgba(46,204,113,.2);color:#2ecc71;border:1px solid #2ecc7155;}
.badge-subject{background:rgba(179,146,105,.15);color:var(--gold-light);border:1px solid #b3926944;font-size:0.68rem;}

/* -- TOPIC ROW -- */
.topic-item{
  display:flex;align-items:flex-start;gap:12px;padding:14px 0;
  border-bottom:1px solid rgba(61,51,39,0.05);
}
.topic-item:last-child{border-bottom:none;}
.topic-meta{flex:1;}
.topic-meta h3{font-size:0.95rem;color:var(--navy);font-weight:600;margin-bottom:3px;}
.topic-meta .tmeta{font-size:0.75rem;color:var(--text-muted);}
.topic-revisions{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px;}
.rev-chip{
  font-size:0.68rem;padding:2px 8px;border-radius:20px;
  border:1px solid;white-space:nowrap;
}
.rev-chip.done{border-color:#2ecc7155;color:#2ecc71;background:rgba(46,204,113,.1);}
.rev-chip.pending-over{border-color:#e74c3c55;color:#e74c3c;background:rgba(231,76,60,.1);}
.rev-chip.pending-today{border-color:#f39c1255;color:#f39c12;background:rgba(243,156,18,.1);}
.rev-chip.pending-future{border-color:#7593a644;color:#a8a6a3;background:transparent;}

/* -- REVISION INTERVALS -- */
.interval-legend{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px;}
.interval-pill{
  padding:4px 12px;border-radius:20px;font-size:0.73rem;
  background:rgba(179,146,105,.1);border:1px solid var(--gold);color:var(--gold-light);
}

/* -- STAT CARD -- */
.stat-num{font-family:'Playfair Display',serif;font-size:2rem;color:var(--gold);font-weight:700;}
.stat-lbl{font-size:0.75rem;color:var(--text-muted);margin-top:2px;}

/* -- NOTIFICATION PANEL -- */
#notif-panel{
  position:fixed;top:66px;right:16px;width:320px;max-height:70vh;overflow-y:auto;
  background:var(--card-bg);border:1px solid var(--border);border-radius:12px;
  box-shadow:var(--shadow);z-index:200;display:none;
  animation:fadeUp .2s ease;
}
#notif-panel h3{
  padding:14px 16px;font-family:'Playfair Display',serif;
  font-size:1rem;color:var(--gold);border-bottom:1px solid var(--border);
  position:sticky;top:0;background:var(--card-bg);
}
.notif-item{padding:12px 16px;border-bottom:1px solid rgba(61,51,39,0.04);cursor:pointer;}
.notif-item:hover{background:rgba(179,146,105,.05);}
.notif-item .ni-top{display:flex;justify-content:space-between;align-items:center;gap:8px;}
.notif-item .ni-title{font-size:0.85rem;font-weight:600;color:var(--navy);}
.notif-item .ni-sub{font-size:0.75rem;color:var(--text-muted);margin-top:3px;}
.notif-empty{padding:24px;text-align:center;color:var(--text-muted);font-size:0.85rem;}

/* -- PROGRESS BAR -- */
.prog-bar{height:6px;background:var(--border);border-radius:3px;overflow:hidden;margin-top:6px;}
.prog-fill{height:100%;background:linear-gradient(90deg,var(--gold),var(--gold-light));border-radius:3px;transition:width .4s;}

/* -- ANIMATIONS -- */
@keyframes fadeUp{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:translateY(0);}}
@keyframes pulse{0%,100%{opacity:1;}50%{opacity:.6;}}
.pulse{animation:pulse 2s infinite;}

/* -- MODAL -- */
.modal-overlay{
  display:none;position:fixed;inset:0;background:rgba(61,51,39,.5);z-index:300;
  align-items:center;justify-content:center;padding:20px;
}
.modal-overlay.open{display:flex;}
.modal{
  background:var(--card-bg);border:1px solid var(--border);
  border-radius:14px;padding:28px;width:100%;max-width:480px;
  box-shadow:var(--shadow);animation:fadeUp .25s ease;
}
.modal h3{font-family:'Playfair Display',serif;color:var(--gold);margin-bottom:16px;}

/* -- EMPTY STATE -- */
.empty{text-align:center;padding:40px 20px;color:var(--text-muted);}
.empty .ei{font-size:2.5rem;margin-bottom:10px;}
.empty p{font-size:0.85rem;}

/* -- SYLLABUS PAGE -- */
.imp-critical{background:rgba(231,76,60,.18);color:#ff6b6b;border:1px solid #e74c3c66;padding:2px 8px;border-radius:20px;font-size:0.68rem;font-weight:700;white-space:nowrap;}
.imp-high{background:rgba(243,156,18,.18);color:#f39c12;border:1px solid #f39c1266;padding:2px 8px;border-radius:20px;font-size:0.68rem;font-weight:700;white-space:nowrap;}
.imp-medium{background:rgba(52,152,219,.18);color:#5dade2;border:1px solid #3498db66;padding:2px 8px;border-radius:20px;font-size:0.68rem;font-weight:700;white-space:nowrap;}
.imp-low{background:rgba(127,140,141,.18);color:#95a5a6;border:1px solid #7f8c8d55;padding:2px 8px;border-radius:20px;font-size:0.68rem;font-weight:700;white-space:nowrap;}

.syl-subject-block{margin-bottom:14px;border:1px solid var(--border);border-radius:12px;overflow:hidden;}
.syl-subject-header{
  display:flex;align-items:center;gap:12px;
  padding:14px 18px;cursor:pointer;
  background:var(--card-bg);
  transition:background .2s;
  user-select:none;
}
.syl-subject-header:hover{background:#F0E7D8;}
.syl-subject-dot{width:13px;height:13px;border-radius:50%;flex-shrink:0;}
.syl-subject-title{flex:1;font-weight:700;font-size:0.95rem;color:var(--navy);}
.syl-subject-meta{font-size:0.75rem;color:var(--text-muted);}
.syl-chevron{color:var(--gold);font-size:0.9rem;transition:transform .25s;}
.syl-chevron.open{transform:rotate(180deg);}
.syl-topic-list{display:none;border-top:1px solid var(--border);}
.syl-topic-list.open{display:block;}
.syl-topic-row{
  display:flex;align-items:center;gap:10px;
  padding:10px 18px;border-bottom:1px solid rgba(61,51,39,0.04);
  transition:background .15s;
}
.syl-topic-row:last-child{border-bottom:none;}
.syl-topic-row:hover{background:rgba(179,146,105,.05);}
.syl-topic-name{flex:1;font-size:0.87rem;color:var(--navy);}
.syl-topic-unit{font-size:0.72rem;color:var(--text-muted);margin-top:2px;}
.syl-add-btn{
  padding:4px 12px;border-radius:6px;border:1px solid var(--gold);
  background:transparent;color:var(--gold);font-size:0.72rem;
  cursor:pointer;white-space:nowrap;transition:all .2s;font-family:'Source Sans 3',sans-serif;
}
.syl-add-btn:hover{background:var(--gold);color:var(--navy);}
.syl-add-btn.added{border-color:#2ecc71;color:#2ecc71;cursor:default;}
.syl-filter-bar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px;align-items:center;}
.syl-filter-bar input{
  flex:1;min-width:150px;padding:8px 12px;
  background:var(--input-bg);border:1px solid var(--border);
  border-radius:7px;color:var(--navy);font-family:inherit;outline:none;font-size:0.85rem;
}
.syl-filter-bar input:focus{border-color:var(--gold);}
.imp-filter-btn{
  padding:5px 12px;border-radius:20px;border:1px solid var(--border);
  background:transparent;color:var(--text-muted);
  font-size:0.75rem;cursor:pointer;font-family:'Source Sans 3',sans-serif;transition:all .2s;
}
.imp-filter-btn.active{border-color:var(--gold);color:var(--gold);background:rgba(179,146,105,.1);}

/* -- RESPONSIVE -- */
@media(max-width:600px){
  .form-row{flex-direction:column;}
  .card-row{flex-direction:column;}
  #topbar .brand-text p{display:none;}
  .page-tab{font-size:0.68rem;padding:7px 3px;}
}

/* ------------------------------------------
   MCQ PAGE
------------------------------------------ */
.mcq-filter-bar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:12px;}
.mcq-filter-bar select{
  padding:8px 12px;background:var(--input-bg);border:1px solid var(--border);
  border-radius:7px;color:var(--navy);font-family:'Source Sans 3',sans-serif;
  font-size:0.85rem;outline:none;transition:border .2s;
}
.mcq-filter-bar select:focus{border-color:var(--gold);}
.type-filter-btn{
  padding:5px 12px;border-radius:20px;border:1px solid var(--border);
  background:transparent;color:var(--text-muted);font-size:0.75rem;
  cursor:pointer;font-family:'Source Sans 3',sans-serif;transition:all .2s;
}
.type-filter-btn.active{border-color:var(--gold);color:var(--gold);background:rgba(179,146,105,.1);}
.mcq-score-bar{
  display:flex;justify-content:space-between;align-items:center;
  background:var(--card-bg);border:1px solid var(--border);border-radius:10px;
  padding:10px 16px;margin-bottom:14px;font-size:0.85rem;color:var(--text-muted);
}
.mcq-card{
  background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);
  padding:22px;box-shadow:var(--shadow);animation:fadeUp .3s ease;
}
.mcq-card-header{
  display:flex;justify-content:space-between;align-items:flex-start;
  margin-bottom:10px;flex-wrap:wrap;gap:6px;
}
.mcq-type-badge{
  display:inline-block;padding:2px 9px;border-radius:20px;
  font-size:0.7rem;font-weight:700;letter-spacing:.3px;border:1px solid;
}
.mcq-topic-tag{font-size:0.75rem;color:var(--gold);margin-bottom:12px;font-weight:600;}
.mcq-question{font-size:0.95rem;color:var(--navy);line-height:1.75;margin-bottom:18px;}
.mcq-question code{
  background:rgba(179,146,105,.12);color:var(--gold-light);
  padding:1px 6px;border-radius:4px;font-size:0.9em;
}
.mcq-options{display:flex;flex-direction:column;gap:8px;margin-bottom:14px;}
.mcq-option{
  display:flex;align-items:center;gap:10px;padding:11px 14px;
  background:var(--input-bg);border:1px solid var(--border);border-radius:8px;
  cursor:pointer;transition:all .2s;font-size:0.88rem;color:var(--navy);
}
.mcq-option:hover:not(.mcq-correct):not(.mcq-wrong):not(.mcq-dimmed){
  border-color:var(--gold);background:rgba(179,146,105,.06);
}
.mcq-option.mcq-correct{border-color:#2ecc71;background:rgba(46,204,113,.12);color:#2ecc71;cursor:default;}
.mcq-option.mcq-wrong{border-color:#e74c3c;background:rgba(231,76,60,.10);color:#e74c3c;cursor:default;}
.mcq-option.mcq-dimmed{opacity:.4;cursor:default;}
.opt-letter{
  width:24px;height:24px;border-radius:50%;background:rgba(61,51,39,.08);
  display:flex;align-items:center;justify-content:center;
  font-size:0.75rem;font-weight:700;flex-shrink:0;
}
.mcq-option.mcq-correct .opt-letter{background:rgba(46,204,113,.3);}
.mcq-option.mcq-wrong   .opt-letter{background:rgba(231,76,60,.3);}
.opt-text{flex:1;}
.opt-tick{color:#2ecc71;font-weight:700;font-size:1.1rem;margin-left:auto;}
.opt-cross{color:#e74c3c;font-weight:700;font-size:1.1rem;margin-left:auto;}
.mcq-result{
  text-align:center;padding:10px 14px;border-radius:8px;
  font-weight:600;font-size:0.9rem;margin:10px 0;
}
.result-correct{background:rgba(46,204,113,.15);color:#2ecc71;border:1px solid #2ecc7155;}
.result-wrong{background:rgba(231,76,60,.12);color:#e74c3c;border:1px solid #e74c3c55;}
.result-peeked{background:rgba(179,146,105,.1);color:var(--gold);border:1px solid var(--gold)44;}
.mcq-explanation{
  margin-top:14px;padding:16px;background:rgba(239,230,216,.55);
  border:1px solid rgba(179,146,105,.22);border-radius:10px;animation:fadeUp .3s ease;
}
.exp-header{font-family:'Playfair Display',serif;color:var(--gold);font-size:1rem;margin-bottom:10px;}
.exp-correct{
  font-size:0.85rem;color:var(--navy);line-height:1.68;padding:10px 12px;
  background:rgba(46,204,113,.08);border-radius:7px;margin-bottom:10px;
  border-left:3px solid #2ecc71;
}
.exp-correct code{background:rgba(179,146,105,.15);color:var(--gold-light);padding:1px 6px;border-radius:4px;}
.mcq-formula{
  background:rgba(179,146,105,.07);border:1px solid rgba(179,146,105,.25);
  border-radius:7px;padding:9px 12px;margin:10px 0;
}
.exp-wrong-list{margin:10px 0;}
.exp-wrong-item{
  font-size:0.82rem;color:var(--text-muted);padding:6px 0;
  border-bottom:1px solid rgba(61,51,39,.04);line-height:1.5;
}
.exp-wrong-item:last-child{border-bottom:none;}
.exp-tip{
  font-size:0.82rem;color:var(--gold-light);line-height:1.58;
  padding:10px 12px;background:rgba(179,146,105,.07);border-radius:7px;margin-top:10px;
}
.mcq-nav-area{
  display:flex;align-items:center;justify-content:space-between;
  margin-top:14px;gap:10px;
}

/* ------------------------------------------
   NOTES PAGE
------------------------------------------ */
#notes-topic-select{
  width:100%;padding:10px 14px;background:var(--input-bg);
  border:1px solid var(--border);border-radius:8px;color:var(--navy);
  font-family:'Source Sans 3',sans-serif;font-size:0.9rem;
  outline:none;margin-bottom:18px;transition:border .2s;
}
#notes-topic-select:focus{border-color:var(--gold);}
.notes-block{
  background:var(--card-bg);border:1px solid var(--border);
  border-radius:var(--radius);padding:18px 20px;margin-bottom:14px;animation:fadeUp .3s ease;
}
.notes-section-title{
  font-family:'Playfair Display',serif;font-size:1rem;color:var(--gold);
  margin-bottom:14px;border-bottom:1px solid var(--border);padding-bottom:8px;
}
.notes-formula-table{width:100%;border-collapse:collapse;font-size:0.83rem;}
.notes-formula-table th{
  text-align:left;color:var(--text-muted);font-size:0.72rem;font-weight:600;
  letter-spacing:.4px;text-transform:uppercase;padding:6px 8px;border-bottom:1px solid var(--border);
}
.notes-formula-table td{
  padding:9px 8px;vertical-align:top;border-bottom:1px solid rgba(61,51,39,.04);
  color:var(--navy);line-height:1.5;
}
.notes-formula-table tr:last-child td{border-bottom:none;}
.notes-formula-table code{
  background:rgba(179,146,105,.12);color:var(--gold-light);
  padding:2px 7px;border-radius:4px;font-size:0.85rem;
  word-break:break-word;
}
.notes-tested-item{
  display:flex;gap:10px;align-items:flex-start;padding:9px 0;
  border-bottom:1px solid rgba(61,51,39,.04);font-size:0.85rem;
  color:var(--navy);line-height:1.55;
}
.notes-tested-item:last-child{border-bottom:none;}
.notes-tested-num{
  width:22px;height:22px;border-radius:50%;background:var(--gold);
  color:var(--navy);font-size:0.72rem;font-weight:700;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px;
}
.notes-trap-box{
  background:rgba(231,76,60,.07);border:1px solid rgba(231,76,60,.28);
  border-radius:var(--radius);padding:16px 20px;margin-bottom:14px;animation:fadeUp .3s ease;
}

/* -- RESPONSIVE additions -- */
@media(max-width:600px){

  /* Notes � formula table ? stacked cards */
  .notes-block{padding:14px 12px;}
  .notes-section-title{font-size:0.92rem;padding-bottom:7px;margin-bottom:10px;}

  .notes-formula-table thead{display:none;}
  .notes-formula-table,
  .notes-formula-table tbody,
  .notes-formula-table tr,
  .notes-formula-table td{display:block;width:100%;}
  .notes-formula-table tr{
    padding:10px 0;
    border-bottom:1px solid rgba(61,51,39,.07);
  }
  .notes-formula-table tr:last-child{border-bottom:none;}
  .notes-formula-table td{padding:2px 0;border:none;}
  /* Hide the # column on mobile */
  .notes-formula-table td:first-child{display:none;}
  /* Formula name � bold label */
  .notes-formula-table td:nth-child(2){
    font-size:0.82rem;font-weight:600;color:var(--navy);margin-bottom:4px;
  }
  /* Expression � code block, allow wrap */
  .notes-formula-table td:nth-child(3) code{
    display:block;white-space:normal;word-break:break-word;
    font-size:0.8rem;padding:5px 8px;margin-top:2px;line-height:1.5;
  }
  /* Note column � smaller muted text */
  .notes-formula-table td:nth-child(4){
    font-size:0.73rem;color:var(--text-muted);margin-top:2px;
  }

  /* Trap box */
  .notes-trap-box{padding:12px 12px;}

  /* Tested items */
  .notes-tested-item{font-size:0.82rem;padding:7px 0;}

  /* MCQ */
  .mcq-filter-bar{gap:6px;}
  .mcq-question{font-size:0.88rem;line-height:1.6;}
  .mcq-option{font-size:0.82rem;padding:9px 10px;}
  .mcq-card{padding:16px 14px;}
  .exp-correct,.exp-tip{font-size:0.8rem;}
  .mcq-explanation{padding:12px;}
}
