/* ═══════════════════════════════════════════════
   NCERT solutions: light, colourful, student-friendly.
   Built on the site's tokens (Inter, blue primary, slate neutrals) with the
   same accent colours the site uses elsewhere (violet, amber, rose, teal).
   Readability first: 18px body, 1.7 line-height, ~68ch measure, AA contrast
   (text on tints uses the -dark shade), 44px tap targets, meaning is never
   carried by colour alone (labels and ✓/✗ symbols accompany every colour).
═══════════════════════════════════════════════ */

/* ── Colour themes: one per question group / card ── */
.nc-t-0 { --t: #2563eb; --t-dark: #1d4ed8; --t-tint: #eff6ff; --t-line: #bfdbfe; }
.nc-t-1 { --t: #7c3aed; --t-dark: #6d28d9; --t-tint: #f5f3ff; --t-line: #ddd6fe; }
.nc-t-2 { --t: #d97706; --t-dark: #b45309; --t-tint: #fffbeb; --t-line: #fde68a; }
.nc-t-3 { --t: #e11d48; --t-dark: #be123c; --t-tint: #fff1f2; --t-line: #fecdd3; }
.nc-t-4 { --t: #0d9488; --t-dark: #0f766e; --t-tint: #f0fdfa; --t-line: #99f6e4; }
.nc-t-5 { --t: #4f46e5; --t-dark: #4338ca; --t-tint: #eef2ff; --t-line: #c7d2fe; }

.nc-page {
    --ncert-ink: #0f172a;
    --ncert-muted: #475569;
    --ncert-stroke: #64748b;
    --ncert-accent: #2563eb;
    --nc-link: #1d4ed8;
    --nc-bg: #f8fafc;
    --nc-surface: #ffffff;
    --nc-line: #e2e8f0;
    --nc-good: #15803d;
    --nc-good-tint: #f0fdf4;
    --nc-good-line: #bbf7d0;
    --nc-bad: #b91c1c;
    --nc-bad-tint: #fff1f2;
    --nc-bad-line: #fecdd3;
    background: var(--nc-bg);
    color: var(--ncert-ink);
    font-family: Inter, 'Segoe UI', 'Noto Sans Math', 'Noto Sans Symbols 2', 'Apple Symbols', system-ui, sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    padding-bottom: 72px;
}
.nc-wrap { max-width: 800px; margin-inline: auto; padding-inline: 16px; }
.nc-page a { color: var(--nc-link); text-decoration: underline; text-underline-offset: 3px; }
.nc-page a:hover { color: var(--primary-dk); }
.nc-page a:focus-visible, .nc-page button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.nc-page h1, .nc-page h2, .nc-page h3, .nc-page h4 { color: var(--ncert-ink); text-wrap: balance; line-height: 1.25; margin: 0; font-weight: 800; }
.nc-page sup { font-size: .72em; line-height: 0; }

/* ── Hero: light, colourful ── */
.nc-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(120deg, #eff6ff 0%, #f5f3ff 48%, #fff1f2 100%);
    border-bottom: 1px solid var(--nc-line); padding: 34px 0 30px;
}
.nc-blob { position: absolute; border-radius: 50%; pointer-events: none; opacity: .55; }
.nc-blob-a { width: 220px; height: 220px; right: -60px; top: -80px; background: #ddd6fe; }
.nc-blob-b { width: 150px; height: 150px; right: 120px; bottom: -90px; background: #fde68a; }
.nc-hero-inner { position: relative; }
.nc-eyebrow {
    display: inline-block; background: #fff; border: 1px solid var(--t-line, #bfdbfe); border-radius: 999px;
    padding: 3px 14px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: var(--nc-link); margin: 0 0 12px;
}
.nc-hero h1 { font-size: clamp(1.7rem, 5.2vw, 2.5rem); letter-spacing: -.01em; }
.nc-lede { color: #334155; font-size: 1.1rem; max-width: 62ch; margin: 14px 0 0; }
.nc-meta { color: var(--ncert-muted); font-size: .95rem; margin: 10px 0 0; }
.nc-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 20px 0 0; }
.nc-stat {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--t-line);
    border-top: 4px solid var(--t); border-radius: 12px; padding: 8px 16px; min-width: 110px; max-width: 220px;
}
.nc-stat b { font-size: 1.5rem; line-height: 1.2; color: var(--t-dark); font-weight: 800; }
.nc-stat span { font-size: .85rem; color: var(--ncert-muted); line-height: 1.3; }

/* ── Progress card (shown by JS) ── */
.nc-progress { margin: 22px 0 0; background: #fff; border: 1px solid var(--nc-line); border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 4px rgba(15,23,42,.05); }
.nc-progress[hidden], .nc-done[hidden], .nc-celebrate[hidden] { display: none; }
.nc-progress-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.nc-progress-title i { color: #7c3aed; margin-right: 6px; }
.nc-progress-count { font-weight: 700; color: var(--ncert-muted); }
.nc-bar { height: 12px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.nc-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #2563eb, #7c3aed, #e11d48); transition: width .35s ease; }
.nc-celebrate { margin: 10px 0 0; font-weight: 700; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 12px; }
.nc-reset { background: none; border: 0; color: var(--ncert-muted); font-size: .85rem; text-decoration: underline; padding: 8px 0 0; cursor: pointer; }

/* ── Jump-to-question ── */
.nc-toc { margin: 24px 0; }
.nc-toc-label { display: block; font-size: .85rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ncert-muted); margin-bottom: 8px; }
.nc-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nc-toc a {
    display: inline-flex; align-items: center; justify-content: center; position: relative;
    min-width: 46px; min-height: 46px; padding: 0 12px; background: #fff; border: 2px solid var(--nc-line);
    border-radius: 12px; font-weight: 800; text-decoration: none; color: var(--ncert-ink);
}
.nc-toc a.nc-v-true { background: var(--nc-good-tint); border-color: var(--nc-good-line); color: #14532d; }
.nc-toc a.nc-v-false { background: var(--nc-bad-tint); border-color: var(--nc-bad-line); color: #881337; }
.nc-toc a.nc-v-other { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.nc-toc a:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(15,23,42,.12); }
.nc-toc a.is-done::after { content: "\2713"; position: absolute; top: -8px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: #16a34a; color: #fff; font-size: .75rem; line-height: 20px; text-align: center; }
.nc-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; color: var(--ncert-muted); margin: 10px 0 0; }
.nc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.nc-dot-true { background: #16a34a; } .nc-dot-false { background: #e11d48; } .nc-dot-other { background: #2563eb; }

/* ── Section headings ── */
.nc-h2 { font-size: 1.55rem; margin: 44px 0 14px; display: flex; align-items: center; gap: 10px; }
.nc-h2 i { color: #7c3aed; font-size: 1.2rem; }
.nc-group {
    display: flex; align-items: center; gap: 12px; margin: 48px 0 6px; padding: 10px 14px;
    background: var(--t-tint); border: 1px solid var(--t-line); border-left: 6px solid var(--t);
    border-radius: 12px; font-size: 1.25rem; color: var(--t-dark);
}
.nc-group-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: var(--t-dark); color: #fff; flex: none; }
.nc-page .nc-group { color: var(--t-dark); }

/* ── Cards ── */
.nc-panel, .nc-q, .nc-glance .nc-table-wrap { background: var(--nc-surface); border: 1px solid var(--nc-line); border-radius: 16px; box-shadow: 0 2px 8px rgba(15,23,42,.06); min-width: 0; }
.nc-panel { padding: 22px 20px; margin-top: 8px; display: grid; gap: 18px; border-top: 5px solid #7c3aed; }
.nc-panel h2 { font-size: 1.4rem; }
.nc-panel h2 i { color: #f59e0b; margin-right: 6px; }

/* ── Question card ── */
.nc-q { margin-block: 22px; scroll-margin-top: 84px; overflow: hidden; border-top: 6px solid var(--t); }
.nc-q-head { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px 14px; background: linear-gradient(180deg, var(--t-tint), #fff); }
.nc-q-num { flex: none; background: var(--t-dark); color: #fff; font-weight: 800; border-radius: 12px; padding: 6px 12px; font-size: 1.05rem; min-width: 52px; text-align: center; box-shadow: 0 2px 6px rgba(15,23,42,.18); }
.nc-q-title { min-width: 0; flex: 1; }
.nc-q-title h3 { font-size: 1.3rem; margin-bottom: 8px; }
.nc-verdicts { display: flex; gap: 6px; flex-wrap: wrap; }
.nc-q-body { padding: 4px 20px 6px; }
.nc-q-foot { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 20px 16px; border-top: 1px dashed var(--nc-line); background: #fafbfd; }
.nc-q-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .95rem; }
.nc-done {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; cursor: pointer;
    background: #fff; border: 2px solid var(--t); color: var(--t-dark); border-radius: 999px; font-weight: 800; font-size: .95rem;
}
.nc-done:hover { background: var(--t-tint); }
.nc-done[aria-pressed="true"] { background: #16a34a; border-color: #16a34a; color: #fff; }
.nc-q.is-done { box-shadow: 0 0 0 3px #bbf7d0, 0 2px 8px rgba(15,23,42,.06); }

/* ── Chips: text + symbol, never colour alone ── */
.nc-chip { display: inline-block; font-size: .85rem; font-weight: 800; border-radius: 999px; padding: 2px 12px; line-height: 1.6; white-space: nowrap; }
.nc-chip-good { background: var(--nc-good-tint); color: var(--nc-good); border: 1px solid var(--nc-good-line); }
.nc-chip-good::before { content: "\2713\00a0"; }
.nc-chip-bad { background: var(--nc-bad-tint); color: var(--nc-bad); border: 1px solid var(--nc-bad-line); }
.nc-chip-bad::before { content: "\2717\00a0"; }
.nc-chip-neutral { background: #eff6ff; color: var(--nc-link); border: 1px solid #bfdbfe; }
.nc-chip-star { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ── Prose ── */
.nc-q p, .nc-panel p { margin: 10px 0; max-width: 68ch; }
.nc-q ol, .nc-q ul { margin: 10px 0; padding-left: 1.4rem; max-width: 68ch; }
.nc-q li { margin-block: 6px; }
.nc-q li::marker { color: var(--t-dark); font-weight: 800; }
.nc-sub { font-size: 1.15rem; margin: 26px 0 8px; color: var(--t-dark); }
.nc-sub::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--t); margin-right: 8px; }

/* ── Statement pair: P and Q avatars ── */
.nc-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 12px 0 16px; }
.nc-pair-card { display: flex; gap: 12px; align-items: flex-start; border-radius: 14px; padding: 14px 16px; min-width: 0; border: 2px solid; }
.nc-pair-p { background: #eff6ff; border-color: #bfdbfe; }
.nc-pair-q { background: #f5f3ff; border-color: #ddd6fe; }
.nc-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.nc-pair-p .nc-avatar { background: #1d4ed8; } .nc-pair-q .nc-avatar { background: #6d28d9; }
.nc-pair-label { display: block; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 800; color: var(--ncert-muted); margin-bottom: 2px; }

/* ── Steps ── */
.nc-step { margin: 16px 0; padding: 12px 14px 8px; border-radius: 14px; border: 1px solid var(--nc-line); background: #f8fafc; border-left: 6px solid #94a3b8; }
.nc-step-good { background: var(--nc-good-tint); border-color: var(--nc-good-line); border-left-color: #16a34a; }
.nc-step-bad { background: var(--nc-bad-tint); border-color: var(--nc-bad-line); border-left-color: #e11d48; }
.nc-step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 2px; }
.nc-step-mark { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #64748b; color: #fff; font-size: .8rem; flex: none; }
.nc-step-good .nc-step-mark { background: #15803d; } .nc-step-bad .nc-step-mark { background: #be123c; }
.nc-step-label { font-weight: 800; font-size: 1.05rem; color: var(--ncert-ink); }
.nc-step-body { min-width: 0; }
.nc-step .nc-fig, .nc-step .nc-table-wrap { background: #fff; }

/* ── Equation, conclusion ── */
.nc-eq { position: relative; background: #f5f3ff; border: 1px solid #ddd6fe; border-left: 5px solid #7c3aed; border-radius: 10px; padding: 12px 16px 12px 44px; margin: 12px 0; text-align: center; font-size: 1.15rem; overflow-x: auto; }
.nc-eq-tag { position: absolute; left: 12px; top: 10px; color: #6d28d9; font-style: italic; font-weight: 800; }
.nc-concl { display: flex; gap: 10px; align-items: flex-start; background: linear-gradient(90deg, #dcfce7, #f0fdf4); border: 1px solid var(--nc-good-line); border-left: 6px solid #16a34a; color: #14532d; border-radius: 12px; padding: 12px 16px; margin: 18px 0 10px; font-weight: 700; max-width: none !important; }
.nc-concl i { color: #16a34a; font-size: 1.2rem; margin-top: 4px; }

/* ── Method panel ── */
.nc-grid4 { list-style: none; padding: 0 !important; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; counter-reset: ncstep; }
.nc-grid4 li { counter-increment: ncstep; background: var(--t-tint); border: 1px solid var(--t-line); border-radius: 12px; padding: 12px 14px; font-size: 1rem; margin: 0; }
.nc-grid4 li::before { content: counter(ncstep); display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--t-dark); color: #fff; font-weight: 800; align-items: center; justify-content: center; margin-bottom: 6px; font-size: .9rem; }
.nc-grid4 b { display: block; font-weight: 800; margin-bottom: 2px; color: var(--t-dark); }
.nc-defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; font-size: 1rem; }
.nc-defs p { margin: 0; background: var(--t-tint); border: 1px solid var(--t-line); border-radius: 12px; padding: 10px 14px; }
.nc-defs strong { color: var(--t-dark); }

/* ── Tables ── */
.nc-table-wrap { overflow-x: auto; border: 1px solid var(--nc-line); border-radius: 12px; background: var(--nc-surface); margin-block: 14px; }
.nc-table-wrap:focus-visible, .nc-fig-scroll:focus-visible { outline: 3px solid var(--primary); }
.nc-page table { border-collapse: collapse; width: 100%; font-size: 1rem; min-width: 520px; }
.nc-page th, .nc-page td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--nc-line); vertical-align: top; }
.nc-page thead th { font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: linear-gradient(90deg, #1d4ed8, #6d28d9); border-bottom: 0; }
.nc-page tbody tr:nth-child(even) { background: #f8fafc; }
.nc-page tbody tr:hover { background: #eff6ff; }
.nc-page tr:last-child td, .nc-page tr:last-child th { border-bottom: 0; }
.nc-rowhead { background: none !important; color: var(--ncert-ink) !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 1rem !important; }
.nc-glance .nc-table-wrap { border-top: 5px solid #e11d48; }

/* ── Figures ── */
.nc-fig { margin: 16px 0; border: 1px solid var(--t-line, var(--nc-line)); border-radius: 12px; background: #fff; padding: 0 8px 4px; overflow: hidden; }
.nc-fig-tag { display: inline-block; margin: 0 0 4px -8px; padding: 3px 12px; font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: var(--t-tint, #eff6ff); color: var(--t-dark, #1d4ed8); border-radius: 0 0 10px 0; }
.nc-fig-scroll { overflow-x: auto; }
.nc-dia { display: block; width: 100%; min-width: 560px; height: auto; font-family: Inter, 'Segoe UI', 'Noto Sans Math', 'Apple Symbols', system-ui, sans-serif; }
.nc-fig-hint { display: none; font-size: .9rem; color: var(--ncert-muted); padding: 2px 6px 0; margin: 0; }
.nc-fig figcaption { font-size: .95rem; color: var(--ncert-muted); padding: 4px 6px 8px; }

/* ── Prev / next, credit ── */
.nc-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 40px; }
.nc-nav a { display: block; padding: 14px 16px; border: 2px solid #ddd6fe; border-radius: 14px; background: #fff; text-decoration: none; min-height: 44px; font-weight: 700; }
.nc-nav a:hover { border-color: #7c3aed; background: #f5f3ff; }
.nc-nav small { display: block; color: #6d28d9; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.nc-nav .nc-next { text-align: right; }
.nc-credit { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--nc-line); font-size: .95rem; color: var(--ncert-muted); }

/* ── Hubs ── */
.nc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 22px 0; padding: 0; list-style: none; }
.nc-card { position: relative; background: var(--nc-surface); border: 1px solid var(--t-line); border-top: 6px solid var(--t); border-radius: 14px; padding: 16px 18px; height: 100%; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.nc-card:hover { box-shadow: 0 6px 16px rgba(15,23,42,.1); }
.nc-card-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--t-dark); color: #fff; font-weight: 800; margin-bottom: 8px; }
.nc-card h3, .nc-card h2 { font-size: 1.15rem; }
.nc-card p { margin: 6px 0 0; font-size: 1rem; color: var(--ncert-muted); }
.nc-card a.nc-card-link { text-decoration: none; display: block; }
.nc-card a.nc-card-link:hover h3, .nc-card a.nc-card-link:hover h2 { text-decoration: underline; }
.nc-list { padding-left: 1.2rem; }
.nc-list li { margin-block: 8px; }

@media (max-width: 640px) { .nc-fig-hint { display: block; } }
@media (max-width: 575px) {
    .nc-page { font-size: 1.0625rem; }
    .nc-q-head { padding: 14px 14px 10px; gap: 10px; }
    .nc-q-body { padding: 2px 14px 4px; }
    .nc-q-foot { padding: 10px 14px 14px; }
    .nc-panel { padding: 18px 14px; }
    .nc-q-num { min-width: 46px; padding: 5px 8px; font-size: 1rem; }
    .nc-group { font-size: 1.1rem; padding: 8px 10px; }
    .nc-nav .nc-next { text-align: left; }
    .nc-stat { min-width: 96px; padding: 6px 12px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { .nc-bar span, .nc-toc a { transition: none; } .nc-toc a:hover { transform: none; } }

/* ── "How to answer" diagram: swap picture + step flow ── */
.nc-swap { margin: 0; }
.nc-swap-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.nc-swap-card { border-radius: 14px; border: 2px solid; padding: 12px 16px; text-align: center; }
.nc-swap-p { background: #eff6ff; border-color: #93c5fd; }
.nc-swap-q { background: #f5f3ff; border-color: #c4b5fd; }
.nc-swap-label { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ncert-muted); }
.nc-swap-text { display: block; font-size: 1.25rem; font-weight: 800; }
.nc-swap-text strong { display: inline-block; min-width: 1.6em; border-radius: 8px; padding: 0 6px; color: #fff; }
.nc-swap-p strong:first-of-type { background: #1d4ed8; }
.nc-swap-p strong:last-of-type { background: #6d28d9; }
.nc-swap-q strong:first-of-type { background: #6d28d9; }
.nc-swap-q strong:last-of-type { background: #1d4ed8; }
.nc-swap-mid { display: flex; flex-direction: column; align-items: center; color: #be123c; font-size: 1.4rem; line-height: 1.1; }
.nc-swap-mid small { font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.nc-swap figcaption { text-align: center; color: var(--ncert-muted); font-size: .95rem; margin-top: 8px; }

.nc-flow { list-style: none; margin: 4px 0 0; padding: 0 !important; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; counter-reset: none; }
.nc-flow-step { position: relative; background: var(--t-tint); border: 2px solid var(--t-line); border-top: 6px solid var(--t); border-radius: 14px; padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 1rem; margin: 0 !important; }
.nc-flow-step::before { content: none !important; }
.nc-flow-num { align-self: flex-start; width: 30px; height: 30px; border-radius: 50%; background: var(--t-dark); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.nc-flow-title { font-weight: 800; color: var(--t-dark); font-size: 1.05rem; line-height: 1.3; }
.nc-flow-text { color: var(--ncert-ink); }
.nc-flow-step:not(:last-child)::after { content: "\2192"; position: absolute; right: -27px; top: 30px; width: 24px; text-align: center; color: #7c3aed; font-weight: 800; font-size: 1.4rem; line-height: 1; }
.nc-flow-branches { list-style: none; margin: 4px 0 0 !important; padding: 0 !important; display: grid; gap: 6px; }
.nc-flow-b { margin: 0 !important; border-radius: 10px; padding: 6px 10px; font-size: .95rem; line-height: 1.4; border: 1px solid; }
.nc-flow-b-good { background: var(--nc-good-tint); border-color: var(--nc-good-line); color: #14532d; }
.nc-flow-b-good strong::before { content: "\2713\00a0"; }
.nc-flow-b-bad { background: var(--nc-bad-tint); border-color: var(--nc-bad-line); color: #881337; }
.nc-flow-b-bad strong::before { content: "\2717\00a0"; }
@media (max-width: 880px) {
    .nc-flow { grid-template-columns: repeat(2, 1fr); }
    .nc-flow-step:nth-child(2n)::after { content: none; }
    .nc-flow-step:nth-child(2n+1):not(:last-child)::after { content: "\2192"; }
}
@media (max-width: 575px) {
    .nc-flow { grid-template-columns: 1fr; gap: 34px; }
    .nc-flow-step:not(:last-child)::after, .nc-flow-step:nth-child(2n+1):not(:last-child)::after { content: "\2193"; right: auto; left: 50%; top: auto; bottom: -32px; margin-left: -12px; }
    .nc-flow-step:nth-child(2n)::after { content: "\2193"; }
    .nc-swap-row { grid-template-columns: 1fr; }
    .nc-swap-mid { flex-direction: row; gap: 8px; justify-content: center; }
    .nc-swap-mid i { transform: rotate(90deg); }
}

/* Stacked fractions: numerator over denominator */
.nc-frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .2em; line-height: 1.35; }
.nc-frac .nc-num { padding: 0 .35em .12em; border-bottom: 2px solid currentColor; }
.nc-frac .nc-den { padding: .12em .35em 0; }

/* Raster images cropped from the book */
.nc-fig-img img { display: block; max-width: 100%; height: auto; margin: 4px auto; border-radius: 6px; }
@media (max-width: 640px) { .nc-fig-img img { max-width: none; width: 620px; } }

/* Accordion: one question open at a time (added by ncert.js) */
.nc-acc .nc-q-head { cursor: pointer; position: relative; padding-right: 56px; }
.nc-acc .nc-q-head:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.nc-q-chev { position: absolute; right: 18px; top: 22px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--t-dark, #1d4ed8); border: 1px solid var(--t-line, var(--nc-line)); transition: transform .2s; }
.nc-q.is-collapsed { margin-block: 12px; }
.nc-q.is-collapsed .nc-q-head { background: #fff; }
.nc-q.is-collapsed .nc-q-chev { transform: rotate(-90deg); }
.nc-q.is-collapsed .nc-q-body, .nc-q.is-collapsed .nc-q-foot { display: none; }
@media (prefers-reduced-motion: reduce) { .nc-q-chev { transition: none; } }
@media (max-width: 640px) { .nc-q-chev { top: 16px; right: 12px; } .nc-acc .nc-q-head { padding-right: 48px; } }

/* Question statement used as the card heading */
.nc-q-title h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.5; margin-bottom: 8px; text-wrap: pretty; }
.nc-q.is-collapsed .nc-q-title h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 0; }

/* Related-solution links at the bottom of each exercise */
.nc-nav-ch { display: block; font-size: .85rem; font-weight: 500; opacity: .85; margin-top: 2px; }
.nc-related { margin-block: 22px; }
.nc-related .nc-h2 { font-size: 1.1rem; margin-bottom: 10px; }
.nc-chiplist { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nc-chip-link { display: inline-block; padding: 8px 14px; border: 1px solid var(--nc-line); border-radius: 999px; background: #fff; font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--primary); }
a.nc-chip-link:hover, a.nc-chip-link:focus-visible { background: #eff6ff; text-decoration: underline; }
.nc-chip-link.is-current { background: var(--primary); color: #fff; border-color: var(--primary); }

.nc-q-label { display: block; font-size: .76rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--t-dark, #1d4ed8); margin-bottom: 4px; }

/* Links to the chapter and book near the top of an exercise page */
.nc-toplinks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 8px; font-size: .95rem; font-weight: 600; }
.nc-toplinks a { text-decoration: none; }
.nc-toplinks a:hover, .nc-toplinks a:focus-visible { text-decoration: underline; }
.nc-toplinks-seq { flex-basis: 100%; }
/* Chapter overview box */
.nc-keynotes { background: #fffbeb; border: 1px solid #fde68a; border-left: 6px solid #f59e0b; border-radius: 12px; padding: 14px 18px; margin: 8px 0 22px; }
.nc-keynotes .nc-h2 { font-size: 1.1rem; margin-bottom: 8px; }
.nc-keynotes ul { margin: 0; padding-left: 1.2rem; }
.nc-keynotes li { margin-block: 6px; max-width: 70ch; }
/* Sticky chapter/exercise index on wide screens only */
.nc-side { display: none; }
@media (min-width: 1500px) {
  .nc-side { display: block; position: fixed; left: 20px; top: 116px; width: 270px; max-height: calc(100vh - 140px); overflow-y: auto; background: #fff; border: 1px solid var(--nc-line); border-radius: 14px; padding: 12px 14px; font-size: .88rem; z-index: 5; }
  .nc-side-h { font-weight: 800; margin: 0 0 8px; }
  .nc-side details { border-top: 1px solid var(--nc-line); padding: 6px 0; }
  .nc-side summary { cursor: pointer; font-weight: 700; }
  .nc-side ul { list-style: none; padding-left: 8px; margin: 6px 0 2px; }
  .nc-side li { margin-block: 3px; }
  .nc-side a { text-decoration: none; }
  .nc-side a:hover { text-decoration: underline; }
  .nc-side .is-current { font-weight: 800; color: var(--primary); }
}
