/* Public solution pages (examprep.nivaar.net/solutions/…), Phase 1b.
 * Question pages are the solution documents themselves (their own CSS sets a global reset and the
 * body font), so every rule here is scoped to an nvx- class and sets what it needs explicitly. */
.nvx-top, .nvx-foot, .nvx-qnav, .nvx-prevnext, .nvx-report, .nvx-label, .nvx-kicker, .nvx-h1,
.nvx-qlist, .nvx-notes, .nvx-consent, .nvx-index, .nvx-ad {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  box-sizing: border-box;
}
.nvx-top { background: #1B2D5B; color: #fff; margin: 0 0 18px; }
.nvx-top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1100px; margin: 0 auto; padding: 10px 16px; flex-wrap: wrap; }
.nvx-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.nvx-brand img { height: 26px; display: block; }
.nvx-brand span { color: #5eead4; font-weight: 600; font-size: 1rem; letter-spacing: .02em; }
.nvx-official { color: #fff; font-size: .9rem; text-decoration: none; border: 1px solid rgba(255,255,255,.45);
  border-radius: 6px; padding: 5px 10px; }
.nvx-official:hover { background: rgba(255,255,255,.12); }
.nvx-crumbs { max-width: 1100px; margin: 0 auto; padding: 0 16px 10px; font-size: .85rem; color: #cbd5e1;
  overflow-wrap: anywhere; }
.nvx-crumbs a { color: #e2e8f0; text-decoration: none; }
.nvx-crumbs a:hover { text-decoration: underline; }

.nvx-kicker { margin: 6px 0 2px; color: #475569; font-size: .9rem; }
.nvx-h1 { font-family: 'Rajdhani', 'Inter', system-ui, sans-serif; color: #1B2D5B; font-size: 1.9rem;
  line-height: 1.2; margin: 4px 0 6px; }
.nvx-label { margin: 0 0 14px; font-size: .85rem; color: #0f766e; }

.nvx-qnav ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; }
.nvx-qnav a { display: inline-block; min-width: 2.6em; text-align: center; padding: 6px 8px; border-radius: 6px;
  border: 1px solid #cbd5e1; color: #1B2D5B; text-decoration: none; font-weight: 600; font-size: .9rem; }
.nvx-qnav a:hover { border-color: #0D9488; }
.nvx-qnav a.nvx-cur { background: #1B2D5B; border-color: #1B2D5B; color: #fff; }

.nvx-qlist { margin: 10px 0 18px; padding: 0 0 0 1.4em; }
.nvx-qlist li { margin: 6px 0; }
.nvx-qlist a { color: #1B2D5B; text-decoration: none; }
.nvx-qlist a:hover { text-decoration: underline; }

.nvx-notes { margin: 0 0 18px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; background: #f8fafc; }
.nvx-notes summary { cursor: pointer; font-weight: 600; color: #1B2D5B; }

.nvx-prevnext { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px; }
.nvx-btn { display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid #1B2D5B;
  color: #1B2D5B; text-decoration: none; font-weight: 600; font-size: .95rem; }
.nvx-btn:hover { background: #f1f5f9; }
.nvx-btn-main { background: #0D9488; border-color: #0D9488; color: #fff; }
.nvx-btn-main:hover { background: #0f766e; }

.nvx-report { margin: 8px 0 20px; font-size: .9rem; }
.nvx-report-btn { background: none; border: 0; padding: 0; color: #b45309; text-decoration: underline;
  cursor: pointer; font: inherit; }
.nvx-report form { margin-top: 10px; display: grid; gap: 8px; max-width: 560px; }
.nvx-report textarea, .nvx-report input { width: 100%; font: inherit; padding: 8px; border: 1px solid #cbd5e1;
  border-radius: 6px; }
.nvx-report textarea { min-height: 96px; }
.nvx-report .nvx-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nvx-report small { color: #475569; }

/* Ad slots stay collapsed until an ad actually fills them (no empty boxes). */
.nvx-ad { display: none; margin: 18px 0; min-height: 0; text-align: center; }
.nvx-ad.nvx-on { display: block; }
.nvx-ad.nvx-on::before { content: "Advertisement"; display: block; font-size: .7rem; color: #94a3b8;
  letter-spacing: .05em; text-transform: uppercase; margin-bottom: 4px; }
.nvx-ad.nvx-own::before { content: "From Nivaar"; }
.nvx-house { margin: 0; padding: 14px 16px; border: 1px dashed #0D9488; border-radius: 8px; background: #f0fdfa;
  color: #1B2D5B; font-weight: 600; text-align: center; }

.nvx-foot { max-width: 1100px; margin: 36px auto 0; padding: 18px 16px 28px; border-top: 1px solid #e2e8f0;
  color: #475569; font-size: .82rem; line-height: 1.5; }
.nvx-foot p { margin: 0 0 8px; }
.nvx-foot a { color: #0f766e; }

.nvx-consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1000; max-width: 640px;
  margin: 0 auto; background: #1B2D5B; color: #fff; border-radius: 10px; padding: 14px 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); font-size: .9rem; line-height: 1.45; }
.nvx-consent a { color: #5eead4; }
.nvx-consent .nvx-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.nvx-consent button { font: inherit; border-radius: 6px; padding: 7px 14px; cursor: pointer; border: 1px solid #fff; }
.nvx-consent .nvx-yes { background: #0D9488; border-color: #0D9488; color: #fff; }
.nvx-consent .nvx-no { background: transparent; color: #fff; }

/* Index pages (disciplines / subjects / sittings) use only this stylesheet. */
body.nvx-index { margin: 0; background: #fff; color: #0f172a; }
.nvx-main { max-width: 900px; margin: 0 auto; padding: 0 16px; line-height: 1.55; }
.nvx-list { list-style: none; padding: 0; margin: 16px 0; columns: 2 300px; column-gap: 24px; }
.nvx-list li { break-inside: avoid; margin: 0 0 8px; }
.nvx-list a { color: #1B2D5B; text-decoration: none; font-weight: 500; }
.nvx-list a:hover { text-decoration: underline; }
.nvx-list small { color: #64748b; font-weight: 400; }

/* Wide display maths, tables and diagrams in the solutions scroll inside themselves on small
 * screens instead of making the whole page scroll sideways. */
@media (max-width: 900px) {
  /* position: relative matters: KaTeX's hidden MathML copy is absolutely positioned, and a scroll
     box clips an absolute child only when the box is its containing block. Without it that hidden
     copy still widens the page. */
  .katex-display, table, pre { position: relative; }
  .katex-display { overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
  table { display: block; max-width: 100%; overflow-x: auto; }
  svg { max-width: 100%; height: auto; }
  pre { max-width: 100%; overflow-x: auto; }
}
@media (max-width: 600px) {
  /* a long inline formula cannot wrap: let its paragraph scroll rather than the page */
  p, li { position: relative; overflow-x: auto; overflow-y: hidden; }
}
@media (max-width: 600px) {
  .nvx-h1 { font-size: 1.5rem; }
  .nvx-prevnext .nvx-btn { flex: 1 1 100%; text-align: center; }
}
@media print {
  .nvx-top, .nvx-ad, .nvx-report, .nvx-prevnext, .nvx-consent, .nvx-qnav { display: none !important; }
}
