
/* ===== Pharmacy OSCE Atlas — enhancement layer (v2, corrected) ===== */

/* ---------- entrance animation for main content ---------- */
@keyframes faIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#mainContent.fa-anim-in { animation: faIn .32s cubic-bezier(.22,.61,.36,1) both; }
#mainContent.fa-anim-in > * { animation: faIn .42s cubic-bezier(.22,.61,.36,1) both; }
#mainContent.fa-anim-in > *:nth-child(2){ animation-delay:.03s } 
#mainContent.fa-anim-in > *:nth-child(3){ animation-delay:.06s }
#mainContent.fa-anim-in > *:nth-child(4){ animation-delay:.09s }
#mainContent.fa-anim-in > *:nth-child(n+5){ animation-delay:.12s }
@media (prefers-reduced-motion: reduce) {
  #mainContent.fa-anim-in, #mainContent.fa-anim-in > * { animation: none !important; }
}

/* ---------- accordion sidebar ---------- */
#sb-items.fa-hidden { display: none !important; }

#fa-sb-tools { padding: 6px 10px 10px; }
#fa-sb-filter {
  width: 100%; box-sizing: border-box; padding: 9px 12px; font: inherit; font-size: 13px;
  color: var(--tx); background: var(--bg3); border: 1px solid var(--bdr);
  border-radius: 9px; outline: none; transition: border-color .15s, box-shadow .15s;
}
#fa-sb-filter::placeholder { color: var(--tx3); }
#fa-sb-filter:focus { border-color: var(--ac); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 20%, transparent); }
.fa-sb-btns { display: flex; gap: 6px; margin-top: 7px; }
.fa-sb-btns button {
  flex: 1; padding: 6px 8px; font: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--tx2); background: var(--bg3); border: 1px solid var(--bdr); border-radius: 8px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.fa-sb-btns button:hover { color: var(--ac); border-color: var(--ac); }

#fa-acc { padding: 0 8px 20px; }
.fa-cat { margin-bottom: 3px; }
.fa-cat-head {
  display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box;
  padding: 9px 10px; font: inherit; font-size: 13px; font-weight: 600; text-align: left;
  color: var(--tx); background: transparent; border: 0; border-radius: 9px; cursor: pointer;
  transition: background .14s;
}
.fa-cat-head:hover { background: var(--bg3); }
.fa-cat.fa-open > .fa-cat-head { background: var(--bg3); color: var(--ac); }
.fa-cat-chev { margin-left: auto; flex: 0 0 auto; transition: transform .2s, background .15s; opacity: .55; font-size: 12px; padding: 8px 10px; margin-right: -6px; border-radius: 8px; cursor: pointer; } .fa-cat-chev:hover { opacity: 1; background: rgba(0,0,0,.07); }
.fa-cat.fa-open > .fa-cat-head .fa-cat-chev { transform: rotate(90deg); opacity: 1; }
.fa-cat-count {
  flex: 0 0 auto; min-width: 20px; text-align: center; padding: 1px 7px; font-size: 11px; font-weight: 700;
  color: var(--tx3); background: var(--bg4); border-radius: 20px;
}
.fa-cat.fa-open > .fa-cat-head .fa-cat-count { color: #fff; background: var(--ac); }
.fa-cat-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; }

.fa-cat-panel { overflow: hidden; max-height: 0; transition: max-height .28s ease; }
.fa-cat.fa-open > .fa-cat-panel { max-height: 4000px; }
.fa-cat-inner { padding: 2px 0 8px; }

.fa-sub-head {
  padding: 8px 12px 4px 14px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--tx3);
}
.fa-topic {
  display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box;
  padding: 7px 12px 7px 22px; font: inherit; font-size: 12.5px; line-height: 1.35; text-align: left;
  color: var(--tx2); background: transparent; border: 0; border-left: 2px solid transparent;
  cursor: pointer; transition: background .13s, color .13s, border-color .13s;
}
.fa-topic:hover { background: var(--bg3); color: var(--ac); }
.fa-topic.fa-active { color: var(--ac); border-left-color: var(--ac); background: color-mix(in srgb, var(--ac) 9%, transparent); font-weight: 600; }
.fa-topic-txt { flex: 1 1 auto; }
.fa-topic-tick { flex: 0 0 auto; font-size: 11px; color: var(--gn); opacity: 0; }
.fa-topic.fa-done .fa-topic-tick { opacity: 1; }
.fa-no-match { padding: 14px 16px; font-size: 12.5px; color: var(--tx3); font-style: italic; }

/* ---------- daily tip ribbon ---------- */
#fa-tip {
  position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 14px auto 4px;
  max-width: 1120px; padding: 13px 44px 13px 15px; box-sizing: border-box;
  background: linear-gradient(120deg, color-mix(in srgb, var(--ac) 12%, var(--bg2)), var(--bg2));
  border: 1px solid color-mix(in srgb, var(--ac) 32%, var(--bdr)); border-left: 4px solid var(--ac);
  border-radius: 12px; box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.08));
}
.fa-tip-badge {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; margin-top: 1px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--ac); border-radius: 20px; white-space: nowrap;
}
.fa-tip-body { flex: 1 1 auto; font-size: 13.5px; line-height: 1.5; color: var(--tx); }
.fa-tip-body b { color: var(--ac); font-weight: 700; }
.fa-tip-act { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; }
.fa-tip-act button {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0;
  font-size: 13px; color: var(--tx3); background: transparent; border: 0; border-radius: 7px; cursor: pointer;
  transition: color .15s, background .15s;
}
.fa-tip-act button:hover { color: var(--ac); background: var(--bg3); }
@media (max-width: 640px) {
  #fa-tip { flex-direction: column; gap: 7px; padding: 12px 40px 12px 13px; margin: 10px 10px 2px; }
  .fa-tip-body { font-size: 13px; }
}

/* ---------- lightweight topic title treatment ("hero") ---------- */
#mainContent .tp-title {
  position: relative; padding-left: 15px; margin-bottom: 4px;
}
#mainContent .tp-title::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 4px;
  background: linear-gradient(180deg, var(--ac), var(--ach, var(--ac)));
}

/* ---------- credit (single author) ---------- */
.fa-credit { margin: 30px auto 6px; max-width: 640px; padding: 22px 18px; text-align: center; }
.fa-credit-made { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--tx3); }
.fa-credit-name {
  margin: 7px 0 5px; font-family: var(--serif, Georgia, serif); font-size: 25px; font-weight: 600; line-height: 1.15;
  color: var(--tx);
  background: linear-gradient(120deg, var(--ac), var(--ach, var(--ac)));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.fa-credit-sub { font-size: 12.5px; color: var(--tx3); }

/* ---------- touch niceties ---------- */
@media (hover: none) {
  .fa-cat-head, .fa-topic { padding-top: 10px; padding-bottom: 10px; }
}
