/* Public notes: shared chrome + one design for every note page (.note-content). */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.notes-body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Noto Sans Devanagari', sans-serif;
  line-height: 1.6;
  color: #1e293b;
  background: #f8fafc;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: #1d4ed8; }

/* ---------- Common header / footer ---------- */
.notes-header {
  position: sticky; top: 0; z-index: 100;
  background: #1e3a5f; color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.notes-header-inner {
  max-width: 1100px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.notes-brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 16px; }
.notes-brand img { border-radius: 6px; background: #fff; }
.notes-brand b { color: #fde047; }
.notes-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.notes-nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 13.5px; }
.notes-nav a:hover { text-decoration: underline; }
.notes-nav .notes-nav-cta { background: #16a34a; padding: 6px 12px; border-radius: 8px; }
.notes-nav .notes-nav-cta:hover { background: #15803d; text-decoration: none; }

.notes-crumbs { max-width: 1100px; margin: 0 auto; padding: 10px 16px 0; font-size: 12.5px; color: #64748b; }
.notes-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.notes-crumbs li + li::before { content: "›"; margin-right: 4px; color: #94a3b8; }
.notes-crumbs a { color: #475569; text-decoration: none; }
.notes-crumbs a:hover { text-decoration: underline; }

.notes-main { flex: 1 0 auto; width: 100%; max-width: 1100px; margin: 0 auto; padding: 16px; }
.notes-crumbs { width: 100%; }

.notes-footer { border-top: 1px solid #e2e8f0; background: #fff; margin-top: 32px; }
.notes-footer-inner { max-width: 1100px; margin: 0 auto; padding: 20px 16px; text-align: center; font-size: 13px; color: #64748b; }
.notes-footer-inner p { margin: 4px 0; }
.notes-footer-disclaimer { font-size: 12px; }
.notes-footer-links a { color: #2563eb; text-decoration: none; }

/* ---------- Notes list / note home ---------- */
.notes-hero {
  background: linear-gradient(135deg, #1e3a5f, #0f172a); color: #fff;
  padding: 24px 28px; border-radius: 14px; margin-bottom: 20px; border-left: 8px solid #16a34a;
}
.notes-hero h1 { margin: 0 0 8px; font-size: 26px; }
.notes-hero p { margin: 0; opacity: .92; max-width: 860px; }
.notes-empty { color: #64748b; }

.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.notes-card {
  display: flex; flex-direction: column; gap: 8px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px 20px;
  color: inherit; text-decoration: none; box-shadow: 0 4px 6px -1px rgba(0,0,0,.05);
  transition: transform .15s, box-shadow .15s;
}
.notes-card:hover { transform: translateY(-2px); box-shadow: 0 12px 20px -5px rgba(0,0,0,.1); }
.notes-card h2 { margin: 0; font-size: 18px; color: #1e3a5f; }
.notes-card p { margin: 0; font-size: 13px; color: #475569; }
.notes-card-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #64748b; }
.notes-card-cta { margin-top: auto; font-weight: 600; color: #1e3a5f; }
.notes-card-langs { display: flex; flex-wrap: wrap; gap: 6px; }
.notes-lang-badge {
  font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  background: #e0f2fe; color: #075985; border: 1px solid #bae6fd;
}

.notes-lang {
  position: fixed; right: 14px; bottom: 14px; z-index: 90;
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: #fff; border: 1px solid #cbd5e1; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(15,23,42,.18);
  max-width: calc(100vw - 28px);
}
.notes-lang-icon { font-size: 15px; padding: 0 4px 0 6px; }
.notes-lang a {
  font-size: 13px; font-weight: 600; line-height: 1; padding: 8px 12px; border-radius: 999px;
  color: #1e3a5f; text-decoration: none; white-space: nowrap;
}
.notes-lang a:hover { background: #f1f5f9; }
.notes-lang a.is-current { background: #1e3a5f; color: #fff; }
.notes-lang.is-loading { opacity: .7; }
.notes-lang.is-loading a:not(.is-current) { pointer-events: none; }
body.notes-body:has(.notes-lang) .notes-footer { padding-bottom: 72px; }

.notes-toc { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px 22px; margin-top: 24px; }
.notes-toc h2 { margin: 0 0 10px; font-size: 18px; color: #1e3a5f; }
.notes-toc-list { margin: 0; padding-left: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 18px; }
.notes-toc-list a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #1e293b; padding: 6px 8px; border-radius: 8px; }
.notes-toc-list a:hover { background: #f1f5f9; }
.notes-toc-list ol { list-style: none; padding-left: 36px; margin: 0; }
.notes-code {
  display: inline-block; min-width: 28px; text-align: center;
  background: #1e3a5f; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px;
}
.notes-source { font-size: 12px; color: #64748b; margin: 14px 0 0; text-align: center; }

/* ---------- Page chrome ---------- */
.notes-page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12.5px; color: #64748b; margin-bottom: 12px; }
.notes-page-meta a { color: #1e3a5f; font-weight: 600; text-decoration: none; }
.notes-verified { color: #15803d; font-weight: 600; }

.notes-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin-top: 28px; }
.notes-pager a {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 14px;
  text-decoration: none; color: #1e293b; display: flex; flex-direction: column; gap: 2px;
}
.notes-pager a:hover { border-color: #94a3b8; }
.notes-pager small { color: #64748b; font-size: 11.5px; }
.notes-pager span { font-weight: 600; font-size: 13px; }
.notes-pager-next { text-align: right; }
.notes-pager-home { justify-content: center; font-weight: 600; white-space: nowrap; }

/* ---------- Note content (shared design for all agent-written pages) ---------- */
.note-content { font-size: 13.5px; overflow-wrap: break-word; }
.note-content .container { max-width: none; margin: 0; padding: 0; }
.note-content h4 { color: #0f172a; margin: 16px 0 8px; font-size: 14.5px; }
.note-content table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12.5px; }
.note-content th { background: #f1f5f9; border: 1px solid #cbd5e1; padding: 8px 10px; text-align: left; font-weight: 600; }
.note-content td { border: 1px solid #cbd5e1; padding: 7px 10px; vertical-align: top; }
.note-content code { background: #f1f5f9; border-radius: 4px; padding: 0 4px; font-size: 12.5px; overflow-wrap: anywhere; }
.note-content svg { max-width: 100%; height: auto; }

.note-content .header-banner,
.note-content .hero {
  background: linear-gradient(135deg, #1e3a5f, #0f172a); color: #fff;
  padding: 22px 26px; border-radius: 12px; margin-bottom: 20px; border-left: 6px solid #16a34a;
}
.note-content .header-banner h1,
.note-content .hero h1 { margin: 0 0 6px; font-size: 23px; font-weight: 700; }
.note-content .header-banner p,
.note-content .hero p { margin: 0; font-size: 13.5px; opacity: .92; max-width: 860px; }
.note-content .badge {
  display: inline-block; background: #16a34a; color: #fff;
  padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; margin: 0 6px 8px 0;
}

.note-content .quick-jump { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; }
.note-content .quick-jump b { font-size: 13px; color: #1e3a5f; display: block; margin-bottom: 8px; }
.note-content .quick-jump a {
  display: inline-block; background: #f1f5f9; color: #334155; padding: 4px 10px; border-radius: 6px;
  font-size: 12px; text-decoration: none; margin: 0 4px 6px 0; border: 1px solid #cbd5e1;
}
.note-content .quick-jump a:hover { background: #e2e8f0; color: #0f172a; }
.note-content .quick-jump a.hot { background: #fef3c7; border-color: #f59e0b; }

.note-content .topic-card {
  border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px 22px; margin-bottom: 24px;
  background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.02); scroll-margin-top: 70px;
}
.note-content .topic-card h2 { margin: 0 0 12px; font-size: 18px; color: #1e3a5f; border-bottom: 2px solid #f1f5f9; padding-bottom: 8px; }
.note-content .part-title { background: #1e3a5f; color: #fff; border-radius: 10px; padding: 10px 16px; margin: 28px 0 16px; font-size: 16px; font-weight: 700; }
.note-content .min-read { font-size: 12px; font-weight: normal; color: #64748b; }

.note-content .trap-box,
.note-content .trick-box,
.note-content .concept-box,
.note-content .info-box,
.note-content .note-box,
.note-content .formula-box,
.note-content .example-box,
.note-content .mp-box,
.note-content .alert { border-radius: 6px; padding: 10px 14px; margin: 12px 0; font-size: 13px; }
.note-content .trap-box { background: #fffbeb; border-left: 4px solid #f59e0b; }
.note-content .trap-box b { color: #b45309; }
.note-content .trick-box { background: #eff6ff; border-left: 4px solid #2563eb; }
.note-content .trick-box b { color: #1d4ed8; }
.note-content .concept-box,
.note-content .info-box,
.note-content .note-box { background: #eff6ff; border-left: 4px solid #2563eb; }
.note-content .concept-box b.head { color: #1d4ed8; }
.note-content .formula-box { background: #eff6ff; border-left: 4px solid #2563eb; color: #1e40af; }
.note-content .example-box { background: #f5f3ff; border-left: 4px solid #7c3aed; }
.note-content .example-box b.ex { color: #5b21b6; }
.note-content .mp-box,
.note-content .alert { background: #f0fdf4; border-left: 4px solid #16a34a; }
.note-content .mp-box b.head { color: #15803d; }
.note-content .trap-box ul,
.note-content .trick-box ul,
.note-content .note-box ul,
.note-content .info-box ul { margin: 6px 0 0; padding-left: 18px; }
.note-content .info-box h2 { margin: 0 0 10px; font-size: 18px; color: #1e3a5f; }

.note-content .ex-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 10px 14px; margin: 10px 0; font-size: 13px; }
.note-content .ex-box .ex-q { font-weight: 600; color: #14532d; margin-bottom: 4px; }
.note-content .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre;
  background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px 12px;
  font-size: 12.5px; line-height: 1.45; overflow-x: auto; margin: 8px 0;
}
.note-content .fig { text-align: center; margin: 10px 0; }
.note-content .fig .cap { font-size: 12px; color: #475569; margin-top: 4px; }
.note-content .big { font-size: 20px; font-weight: 700; letter-spacing: 2px; }
.note-content .flip-x { display: inline-block; transform: scaleX(-1); }
.note-content .flip-y { display: inline-block; transform: scaleY(-1); }
.note-content .ok { color: #15803d; font-weight: 600; }
.note-content .bad { color: #b91c1c; font-weight: 600; text-decoration: line-through; }
.note-content .cols2 { columns: 2; column-gap: 26px; }
.note-content .cols3 { columns: 3; column-gap: 22px; }
.note-content .cols2 li,
.note-content .cols3 li { break-inside: avoid; }

/* PYQ + practice blocks */
.note-content .pyq-section { background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 10px; padding: 14px 16px; margin-top: 16px; }
.note-content .pyq-section.practice,
.note-content .practice-section,
.note-content .prac-section { background: #faf5ff; border: 1px dashed #a78bfa; border-radius: 10px; padding: 14px 16px; margin-top: 16px; }
.note-content .pyq-title { font-weight: 700; color: #1e3a5f; font-size: 13.5px; margin-bottom: 12px; }
.note-content .pyq-item { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.note-content .pyq-q { font-weight: 600; color: #0f172a; margin-bottom: 8px; font-size: 13.5px; }
.note-content .pyq-q .hi { display: block; font-weight: 500; color: #334155; margin-top: 2px; }
.note-content .pyq-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 8px 0; font-size: 12.5px; color: #334155; }
.note-content .pyq-options > * { min-width: 0; overflow-wrap: anywhere; }
.note-content .pyq-ans { background: #f0fdf4; border-left: 4px solid #16a34a; padding: 8px 12px; font-size: 12.5px; color: #14532d; margin-top: 8px; border-radius: 0 6px 6px 0; }
.note-content .src,
.note-content .pyq-src,
.note-content .tag-prac {
  display: inline-block; font-size: 11px; font-weight: 600; color: #1d4ed8; background: #dbeafe;
  border-radius: 4px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; text-wrap: balance;
}
.note-content .tag-prac { color: #3730a3; background: #e0e7ff; margin: 0 4px 0 0; }
.note-content .src.pr,
.note-content .src.prac,
.note-content .prac-src { color: #6d28d9; background: #f5f3ff; }

/* Note home (index) cards inside intro content */
.note-content .section-title {
  font-size: 19px; font-weight: 700; color: #1e3a5f; margin: 30px 0 14px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-bottom: 2px solid #cbd5e1; padding-bottom: 8px;
}
.note-content .section-title span { font-size: 13px; font-weight: 500; color: #64748b; margin-left: auto; }
.note-content .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 12px; }
.note-content .subject-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px;
  display: flex; flex-direction: column; box-shadow: 0 4px 6px -1px rgba(0,0,0,.05);
}
.note-content .card-header { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.note-content .card-icon {
  font-size: 28px; background: #f8fafc; border: 1px solid #e2e8f0; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center; border-radius: 10px; flex-shrink: 0;
}
.note-content .card-title-group h3 { margin: 0 0 4px; font-size: 17px; color: #1e3a5f; }
.note-content .card-title-group p { margin: 0; font-size: 12.5px; color: #64748b; line-height: 1.45; }
.note-content .stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.note-content .stat { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; }
.note-content .stat-pyq { background: #e0e7ff; color: #3730a3; }
.note-content .stat-old { background: #fef3c7; color: #92400e; }
.note-content .stat-prac { background: #ede9fe; color: #6d28d9; }
.note-content .card-actions { margin-top: auto; }
.note-content .btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 14px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; text-decoration: none; background: #1e3a5f; color: #fff;
}
.note-content .btn:hover { background: #0f172a; }
.note-content .plan-box { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px 22px; margin-top: 8px; font-size: 14px; }

@media (max-width: 640px) {
  .notes-main { padding: 12px; }
  .notes-nav a:not(.notes-nav-cta) { display: none; }
  .notes-hero, .note-content .header-banner, .note-content .hero { padding: 18px; }
  .note-content .topic-card { padding: 14px; }
  .note-content table {
    display: block; overflow-x: auto; font-size: 12px; --tbl-bg: #fff;
    background:
      linear-gradient(to right, var(--tbl-bg) 30%, transparent) 0 0 / 28px 100% no-repeat local,
      linear-gradient(to left, var(--tbl-bg) 30%, transparent) 100% 0 / 28px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(15,23,42,.18), transparent) 0 0 / 12px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(15,23,42,.18), transparent) 100% 0 / 12px 100% no-repeat scroll;
  }
  .note-content :is(.info-box, .note-box, .concept-box) table { --tbl-bg: #eff6ff; }
  .note-content :is(.mp-box, .alert) table { --tbl-bg: #f0fdf4; }
  .note-content th, .note-content td { padding: 6px 7px; }
  .note-content .pyq-options { grid-template-columns: 1fr; }
  .note-content .cols2, .note-content .cols3 { columns: 1; }
  .notes-pager { grid-template-columns: 1fr 1fr; }
  .notes-pager-home { grid-column: 1 / -1; order: -1; }
  .notes-lang { right: 10px; bottom: 10px; }
  .notes-lang a { font-size: 12.5px; padding: 8px 10px; }
}

.sf-ad { margin: 24px auto 8px; min-height: 100px; text-align: center; overflow: hidden; }
.sf-ad[hidden] { display: none; }
.sf-ad-label { display: block; font-size: 11px; color: #94a3b8; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }

@media print {
  .notes-header, .notes-crumbs, .notes-footer, .notes-pager, .notes-page-meta, .notes-lang, .note-content .quick-jump, .sf-ad { display: none !important; }
  body.notes-body { background: #fff; font-size: 12px; }
  .notes-main { max-width: none; padding: 0; }
  .note-content .topic-card { border: none; box-shadow: none; padding: 0; }
  .note-content .pyq-item { page-break-inside: avoid; }
}
