/* =============================================
   REVISION NOTES — Page Styles
   Only loaded on single-revision_note pages
============================================= */

/* ── Header Band ── */
.header-band {
  background-color: var(--brand-green-light);
  width: 100%;
  padding: 56px 24px 40px;
  text-align: center;
}
.header-band-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 13px;
  color: var(--grey-500);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: var(--grey-500);
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--brand-green);
}
.breadcrumb strong {
  color: var(--brand-green);
  font-weight: 600;
}

/* ── Subject Pill ── */
.subject-pill {
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 24px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pill-maths            { background-color: var(--subject-maths); }
.pill-physics          { background-color: var(--subject-physics); }
.pill-chemistry        { background-color: var(--subject-chemistry); }
.pill-biology          { background-color: var(--subject-biology); }
.pill-further          { background-color: var(--subject-further-maths); }
.pill-combined         { background-color: #FF6B35; }

/* ── Header Title & Meta ── */
.header-title {
  font-size: 38px;
  font-weight: 700;
  color: var(--grey-900);
  margin-bottom: 16px;
  line-height: 1.2;
}
.header-meta {
  font-size: 14px;
  color: var(--grey-500);
  margin-bottom: 32px;
}

/* ── Header Action Buttons ── */
.header-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.btn-practice {
  background-color: var(--brand-green);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-practice:hover {
  opacity: 0.9;
}
.btn-download {
  background-color: var(--white);
  color: var(--grey-700);
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 30px;
  border: 1px solid var(--grey-200);
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-download:hover {
  border-color: var(--grey-400);
}

/* ── Content Zone (2-column grid) ── */
.content-zone {
  max-width: 1024px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
}

/* ── TOC Sidebar ── */
.toc-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}
.toc-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--grey-500);
  font-weight: 700;
  margin-bottom: 24px;
}
.toc-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-left: 2px solid var(--grey-200);
}
.toc-list a {
  font-size: 15px;
  font-weight: 500;
  color: var(--grey-700);
  padding-left: 20px;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.toc-list a:hover {
  color: var(--brand-green);
}
.toc-list a.active {
  color: var(--brand-green);
  font-weight: 700;
  border-left-color: var(--brand-green);
}

/* ── Mobile TOC ── */
.mobile-toc {
  display: none;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  position: sticky;
  top: 80px;
  z-index: 100;
  margin-bottom: 32px;
  flex-direction: column;
}
.mobile-toc-toggle {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--grey-900);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.mobile-toc-content {
  display: none;
  border-top: 1px solid var(--grey-200);
  padding: 16px;
  flex-direction: column;
  gap: 12px;
}
.mobile-toc-content.open {
  display: flex;
}
.mobile-toc-content a {
  font-size: 14px;
  color: var(--grey-700);
}
.mobile-toc-content a.active {
  color: var(--brand-green);
  font-weight: 600;
}

/* ── Notes Column ── */
.notes-col {
  max-width: 660px;
}
.notes-col section {
  margin-bottom: 48px;
  scroll-margin-top: 90px;
}
.notes-col h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--grey-900);
  border-left: 4px solid var(--brand-green);
  padding-left: 12px;
  margin-bottom: 24px;
  line-height: 1.3;
}
.notes-col p {
  margin-bottom: 20px;
  color: var(--grey-700);
  line-height: 1.8;
}
.notes-col ul {
  list-style-type: disc;
  padding-left: 24px;
  margin-bottom: 24px;
}
.notes-col li {
  margin-bottom: 8px;
  color: var(--grey-700);
  line-height: 1.8;
}
.notes-col li::marker {
  color: var(--brand-green);
}
.notes-col strong {
  color: var(--grey-900);
  font-weight: 600;
}

/* ── Key Formula Box ── */
.key-formula-box {
  background: var(--brand-green-light);
  border-top: 4px solid var(--brand-green);
  border-radius: 12px;
  padding: 32px 24px;
  margin: 32px 0;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.kfb-math {
  font-size: 26px;
  color: var(--grey-900);
}
.kfb-math .katex {
  font-size: 1.15em;
  margin: 0;
}

/* ── Step Rows ── */
.step-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}
.step-circle {
  width: 34px;
  height: 34px;
  background: var(--brand-green);
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-content {
  flex: 1;
  padding-top: 4px;
  color: var(--grey-700);
  line-height: 1.8;
}

/* ── Example Cards ── */
.example-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-top: 4px solid var(--grey-900);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.example-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.example-icon {
  width: 22px;
  height: 22px;
  background: #FDE68A;
  border-radius: 50%;
  display: block;
}
.example-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--grey-900);
}
.example-prob {
  font-size: 16px;
  font-weight: 600;
  color: var(--grey-900);
  margin-bottom: 20px;
}
.example-divider {
  height: 1px;
  background: var(--grey-200);
  margin-bottom: 24px;
}
.example-soln-lbl {
  font-size: 13px;
  font-weight: 700;
  color: #64748B;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.example-card p {
  margin-bottom: 16px;
  font-size: 16px;
  color: var(--grey-900);
  line-height: 1.6;
}
.example-card .step-row {
  margin-bottom: 16px;
}
.example-card .step-content {
  color: var(--grey-900);
  line-height: 1.6;
}
.example-card .final-answer {
  font-weight: 600;
  color: var(--grey-900);
  margin-top: 24px;
  margin-bottom: 0;
}

/* ── FAQ Accordion ── */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 16px;
  color: var(--grey-900);
  background: var(--off-white);
  border: none;
  outline: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.faq-answer {
  padding: 0 20px 16px;
  font-size: 15px;
  color: var(--grey-700);
  display: none;
}
.faq-item.active .faq-answer {
  display: block;
  border-top: 1px solid var(--grey-200);
  padding-top: 16px;
}

/* ── Inline CTA ── */
.inline-cta {
  background: var(--brand-green-light);
  border-radius: 12px;
  border-left: 4px solid var(--brand-green);
  padding: 20px 24px;
  max-width: 660px;
  margin: 48px 0;
}
.inline-cta h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--grey-900);
  margin-bottom: 4px;
}
.inline-cta p {
  font-size: 14px;
  color: var(--grey-500);
  margin-bottom: 12px;
}
.inline-cta a {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-green);
}

/* ── Practice CTA ── */
.practice-cta {
  margin-top: 48px;
  border-top: 2px dashed var(--grey-200);
  padding-top: 48px;
  text-align: center;
  margin-bottom: 48px;
}
.practice-cta-h3 {
  font-size: 26px;
  font-weight: 700;
  color: var(--grey-900);
  margin-bottom: 12px;
}
.practice-cta p {
  font-size: 16px;
  color: var(--grey-700);
  margin-bottom: 24px;
}
.practice-cta .btn-practice {
  display: inline-block;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 30px;
  background: var(--brand-green);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.practice-cta .btn-practice:hover {
  opacity: 0.9;
}

/* ── Topic Navigation Cards ── */
.topic-nav {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}
.topic-nav-card {
  flex: 1;
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.topic-nav-card:hover {
  border-color: var(--brand-green);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.08);
}
.topic-nav-label {
  font-size: 13px;
  font-weight: 700;
  color: #64748B;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.topic-nav-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--grey-900);
}
.nav-prev {
  align-items: flex-start;
  text-align: left;
}
.nav-next {
  align-items: flex-end;
  text-align: right;
}

/* ── Tutor Section ── */
.tutor-bg {
  background: var(--off-white);
  padding: 80px 24px;
  border-bottom: none;
}
.tutor-inner {
  max-width: 860px;
  margin: 0 auto;
}
.tutor-text {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
  color: var(--grey-900);
  letter-spacing: -0.5px;
  border-left: none;
  padding-left: 0;
}
.tutor-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.tutor-profile {
  display: flex;
  align-items: center;
  gap: 24px;
}
.tutor-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}
.tutor-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tutor-info strong {
  font-size: 18px;
  color: var(--grey-900);
  line-height: 1.2;
}
.tutor-role {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-green);
}
.tutor-desc {
  font-size: 15px;
  color: var(--grey-700);
}
.tutor-btn {
  background: var(--brand-green);
  color: var(--white);
  border-radius: 30px;
  font-size: 15px;
  padding: 14px 28px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.tutor-btn:hover {
  opacity: 0.9;
}
.tutor-explore {
  text-align: center;
}
.tutor-explore a {
  font-size: 15px;
  color: #64748B;
  font-weight: 600;
  transition: color 0.2s;
}
.tutor-explore a:hover {
  color: var(--grey-900);
}

/* ── Final CTA Section ── */
.cta-bg {
  background: var(--grey-900);
  padding: 80px 24px;
  text-align: center;
  color: var(--white);
  border: none;
}
.cta-h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--white);
  border: none;
  padding: 0;
}
.cta-desc {
  font-size: 16px;
  color: #E2E8F0;
  max-width: 520px;
  margin: 0 auto 32px;
}
.cta-btn {
  background: var(--brand-green);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s;
}
.cta-btn:hover {
  opacity: 0.9;
}

/* ── Section Full (shared by tutor & CTA) ── */
.section-full {
  width: 100%;
  border-top: 1px solid var(--grey-200);
  padding: 64px 24px;
  margin-bottom: 0;
}
.section-inner {
  margin: 0 auto;
}

/* ── Video Embed ── */
.mer-video-section {
  margin: 0 0 48px 0;
}
.mer-video-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--grey-900);
  margin-bottom: 16px;
  border-left: 4px solid var(--brand-green);
  padding-left: 12px;
}
.mer-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--grey-100);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.mer-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

/* ── Image Block ── */
.mer-image-block {
  margin: 32px 0;
  text-align: center;
}
.mer-image-block img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--grey-200);
}
.mer-image-caption {
  font-size: 14px;
  color: var(--grey-500);
  margin-top: 12px;
  font-style: italic;
}

/* ── Definition Box ── */
.mer-definition-box {
  background: var(--off-white);
  border-left: 4px solid var(--brand-green);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 24px 0;
}
.mer-definition-term {
  font-size: 16px;
  font-weight: 700;
  color: var(--grey-900);
  margin-bottom: 8px;
}
.mer-definition-text {
  font-size: 15px;
  color: var(--grey-700);
  line-height: 1.7;
}

/* ── Warning Box ── */
.mer-warning-box {
  background: #FEF3C7;
  border-left: 4px solid #F59E0B;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.mer-warning-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.mer-warning-content {
  font-size: 15px;
  color: var(--grey-700);
  line-height: 1.6;
}

/* ── Tip Box ── */
.mer-tip-box {
  background: var(--brand-green-light);
  border-left: 4px solid var(--brand-green);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.mer-tip-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.mer-tip-content {
  font-size: 15px;
  color: var(--grey-700);
  line-height: 1.6;
}

/* ── Table ── */
.mer-table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 8px;
  border: 1px solid var(--grey-200);
}
.mer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.mer-table th {
  background: var(--off-white);
  font-weight: 600;
  color: var(--grey-900);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--grey-200);
}
.mer-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--grey-200);
  color: var(--grey-700);
}
.mer-table tr:last-child td {
  border-bottom: none;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1024px) {
  .toc-sidebar {
    display: none;
  }
  .mobile-toc {
    display: flex;
  }
  .content-zone {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }
}

@media (max-width: 768px) {
  .header-band {
    padding: 40px 16px 32px;
  }
  .header-title {
    font-size: 28px;
  }
  .header-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-practice,
  .btn-download {
    width: 100%;
    text-align: center;
  }
  .notes-col h2 {
    font-size: 20px;
  }
  .tutor-card {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
  .tutor-profile {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .tutor-btn {
    width: 100%;
    text-align: center;
  }
  .topic-nav {
    flex-direction: column;
    gap: 12px;
  }
  .cta-h2 {
    font-size: 26px;
  }
  .practice-cta-h3 {
    font-size: 22px;
  }
  .example-card {
    padding: 20px;
  }
  .key-formula-box {
    padding: 24px 16px;
  }
  .kfb-math {
    font-size: 20px;
  }
}

@media (max-width: 375px) {
  .header-title {
    font-size: 24px;
  }
  .content-zone {
    padding: 24px 16px;
  }
}
