/* =====================================================================
   Bihar Ancient History — canvas poster design (Ancient Ch 1+)
   Matches the “How We Know Ancient Bihar” board: cream paper, navy ribbon,
   teal Archaeology / orange Literature panels, place-name tables, Remember card.
   ===================================================================== */

body.subject-history {
    --anc-ink: #1a3654;
    --anc-ink-soft: #334155;
    --anc-navy: #1e3a5f;
    --anc-navy-deep: #152a45;
    --anc-teal: #2a6b6b;
    --anc-teal-bg: #e8f3f2;
    --anc-teal-bd: #8bbbb8;
    --anc-orange: #c45c26;
    --anc-orange-bg: #fbf0e8;
    --anc-orange-bd: #e0a882;
    --anc-cream: #f7f3ea;
    --anc-paper: #fbfaf6;
    --anc-line: #c4a574;
    --anc-green: #2f6b3a;
    --anc-green-bg: #eef6ea;
    --anc-tan: #8a5a2b;
    --anc-tan-bg: #f7f0e6;
}

body.subject-history .magazine-sheet,
body.subject-history .module-content.magazine-sheet {
    background:
        radial-gradient(1100px 480px at 50% -8%, rgba(30, 58, 95, .06), transparent 58%),
        linear-gradient(180deg, #ffffff 0%, var(--anc-paper) 42%, var(--anc-cream) 100%);
}

/* ---------- Module ribbon (canvas top bar) ---------- */
body.subject-history .chx.chx-poster .anc-ribbon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(90deg, var(--anc-navy-deep), var(--anc-navy));
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px 10px 16px;
    margin: 0 0 18px;
    box-shadow: 0 8px 20px rgba(21, 42, 69, .18);
}
body.subject-history .chx.chx-poster .anc-ribbon-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.35;
}
body.subject-history .chx.chx-poster .anc-ribbon-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 1rem;
}
body.subject-history .chx.chx-poster .anc-ribbon-tab {
    flex: 0 0 auto;
    background: var(--anc-orange);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 7px 12px;
    border-radius: 8px 8px 8px 2px;
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
    padding-left: 16px;
}

/* ---------- Poster title ---------- */
body.subject-history .chx.chx-poster > h2.chx-poster-title,
body.subject-history .chx > h2:first-child {
    text-align: center;
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: .01em;
    color: var(--anc-ink);
    margin: 4px auto 8px;
    max-width: 34em;
}
body.subject-history .chx:not(.chx-poster) > h2:first-child {
    padding-bottom: 18px;
    position: relative;
}
body.subject-history .chx:not(.chx-poster) > h2:first-child::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 9px;
    height: 9px;
    background: var(--anc-line);
    transform: translateX(-50%) rotate(45deg);
    border-radius: 1px;
    box-shadow:
        -70px 0 0 -3.5px var(--anc-line),
        70px 0 0 -3.5px var(--anc-line),
        -140px 0 0 -4px rgba(196, 165, 116, .55),
        140px 0 0 -4px rgba(196, 165, 116, .55);
}
body.subject-history .chx .chx-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    width: min(420px, 86%);
    height: 14px;
}
body.subject-history .chx .chx-ornament::before,
body.subject-history .chx .chx-ornament::after {
    content: "";
    flex: 1;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--anc-line), transparent);
}
body.subject-history .chx .chx-ornament span {
    width: 9px;
    height: 9px;
    margin: 0 10px;
    background: var(--anc-line);
    transform: rotate(45deg);
    border-radius: 1px;
    box-shadow: 0 0 0 3px rgba(196, 165, 116, .18);
    flex: 0 0 auto;
}
body.subject-history .chx .chx-sub {
    text-align: center;
    color: #64748b;
    font-size: .95rem;
    margin: 0 auto 14px;
    max-width: 40em;
}
body.subject-history .chx.chx-poster > p:not(.chx-sub) {
    text-align: justify;
    hyphens: auto;
    color: var(--anc-ink-soft);
    line-height: 1.65;
}

/* ---------- How We Know board ---------- */
body.subject-history .anc-board.anc-how {
    margin: 22px 0 8px;
    padding: 4px 0 0;
}
body.subject-history .anc-board-title {
    text-align: center;
    font-size: clamp(1.25rem, 2.2vw, 1.7rem);
    font-weight: 800;
    color: var(--anc-ink);
    margin: 8px auto 10px;
    letter-spacing: .01em;
}
body.subject-history .anc-board-lead {
    text-align: center;
    max-width: 42em;
    margin: 0 auto 16px;
    color: var(--anc-ink-soft);
    line-height: 1.55;
    font-size: .98rem;
}

/* ---------- Dual source columns (Archaeology / Literature) ---------- */
body.subject-history .anc-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 18px 0 16px;
}
@media (max-width: 820px) {
    body.subject-history .anc-split { grid-template-columns: 1fr; }
}
body.subject-history .anc-col {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid transparent;
    background: #fff;
    box-shadow: 0 6px 18px rgba(26, 54, 84, .06);
}
body.subject-history .anc-col-arch { border-color: var(--anc-teal-bd); }
body.subject-history .anc-col-lit { border-color: var(--anc-orange-bd); }
body.subject-history .anc-col-h {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #fff;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: .95rem;
}
body.subject-history .anc-col-arch .anc-col-h { background: var(--anc-teal); }
body.subject-history .anc-col-lit .anc-col-h { background: var(--anc-orange); }
body.subject-history .anc-col-h .anc-ico {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: grid;
    place-items: center;
    font-size: 1rem;
}
body.subject-history .anc-col-b {
    padding: 14px 16px 16px;
    background: #fff;
}
body.subject-history .anc-col-arch .anc-col-b { background: linear-gradient(180deg, #fff, var(--anc-teal-bg)); }
body.subject-history .anc-col-lit .anc-col-b { background: linear-gradient(180deg, #fff, var(--anc-orange-bg)); }
body.subject-history .anc-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    align-items: start;
    margin: 0 0 12px;
}
body.subject-history .anc-item:last-child { margin-bottom: 0; }
body.subject-history .anc-item-ico {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .95rem;
    flex: 0 0 auto;
}
body.subject-history .anc-col-arch .anc-item-ico {
    background: #d7ecea;
    color: var(--anc-teal);
}
body.subject-history .anc-col-lit .anc-item-ico {
    background: #f6e2d5;
    color: var(--anc-orange);
}
body.subject-history .anc-item strong {
    color: var(--anc-ink);
    font-weight: 800;
}
body.subject-history .anc-col-b ul {
    margin: 0;
    padding-left: 1.1em;
}
body.subject-history .anc-col-b li {
    margin: 0 0 8px;
    color: var(--anc-ink-soft);
    line-height: 1.45;
}
body.subject-history .anc-col-b li:last-child { margin-bottom: 0; }

/* ---------- Toolkit strip ---------- */
body.subject-history .anc-toolkit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 8px 0 22px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #eef1f4;
    color: var(--anc-ink);
    font-weight: 700;
    text-align: center;
}
body.subject-history .anc-toolkit .anc-teal { color: var(--anc-teal); }
body.subject-history .anc-toolkit .anc-orange { color: var(--anc-orange); }

/* ---------- Colour panels (upgraded boxes) ---------- */
body.subject-history .chx-panel {
    border-radius: 14px;
    overflow: hidden;
    margin: 16px 0;
    border: 1px solid #dbe3ee;
    background: #fff;
    box-shadow: 0 6px 16px rgba(26, 54, 84, .05);
}
body.subject-history .chx-panel-h {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--anc-navy);
}
body.subject-history .chx-panel-h .chx-ico {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.16);
}
body.subject-history .chx-panel-b {
    padding: 14px 16px 16px;
    color: var(--anc-ink-soft);
    line-height: 1.6;
}
body.subject-history .chx-panel-b p { margin: 0 0 10px; }
body.subject-history .chx-panel-b > :last-child { margin-bottom: 0; }
body.subject-history .chx-panel-green .chx-panel-h { background: var(--anc-green); }
body.subject-history .chx-panel-green { border-color: #9fc09a; background: var(--anc-green-bg); }
body.subject-history .chx-panel-blue .chx-panel-h { background: var(--anc-navy); }
body.subject-history .chx-panel-blue { border-color: #9bb6d0; background: #eef4f9; }
body.subject-history .chx-panel-tan .chx-panel-h { background: var(--anc-tan); }
body.subject-history .chx-panel-tan { border-color: #d2b48c; background: var(--anc-tan-bg); }
body.subject-history .chx-panel-teal .chx-panel-h { background: var(--anc-teal); }
body.subject-history .chx-panel-teal { border-color: var(--anc-teal-bd); background: var(--anc-teal-bg); }
body.subject-history .chx-panel-orange .chx-panel-h { background: var(--anc-orange); }
body.subject-history .chx-panel-orange { border-color: var(--anc-orange-bd); background: var(--anc-orange-bg); }

/* Stock boxes → same language */
body.subject-history .chx-box {
    border-radius: 14px;
    overflow: hidden;
    margin: 16px 0;
    border: 1px solid #dbe3ee;
    background: #fff;
}
body.subject-history .chx-box-h {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--anc-navy);
}
body.subject-history .chx-box-h::before {
    content: "📘";
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.16);
}
body.subject-history .chx-def .chx-box-h { background: var(--anc-green); }
body.subject-history .chx-def .chx-box-h::before { content: "🧪"; }
body.subject-history .chx-tip .chx-box-h,
body.subject-history .chx-note .chx-box-h { background: var(--anc-navy); }
body.subject-history .chx-tip .chx-box-h::before { content: "💡"; }
body.subject-history .chx-trap .chx-box-h { background: var(--anc-orange); }
body.subject-history .chx-trap .chx-box-h::before { content: "⚠️"; }
body.subject-history .chx-adv .chx-box-h,
body.subject-history .chx-jee .chx-box-h,
body.subject-history .chx-neet .chx-box-h { background: var(--anc-tan); }
body.subject-history .chx-adv .chx-box-h::before { content: "🏆"; }
body.subject-history .chx-box-b {
    padding: 14px 16px 16px;
    line-height: 1.6;
    color: var(--anc-ink-soft);
}

/* ---------- Compare / place-name tables ---------- */
body.subject-history .chx-compare-wrap,
body.subject-history .anc-table-wrap {
    margin: 18px 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #c5d0e0;
    background: #fff;
    box-shadow: 0 6px 16px rgba(26, 54, 84, .05);
}
body.subject-history .chx-compare-bar,
body.subject-history .anc-table-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: var(--anc-navy);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
body.subject-history .anc-table-bar .anc-table-id {
    background: rgba(255,255,255,.14);
    border-radius: 6px;
    padding: 3px 8px;
}
body.subject-history .chx-compare,
body.subject-history .anc-table-wrap .chx-table,
body.subject-history .anc-table-wrap .chx-compare {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}
body.subject-history .chx-compare th,
body.subject-history .anc-table-wrap th {
    background: var(--anc-navy-deep);
    color: #fff;
    text-align: left;
    padding: 10px 12px;
    font-size: .78rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}
body.subject-history .chx-compare td,
body.subject-history .anc-table-wrap td {
    padding: 11px 12px;
    border-bottom: 1px solid #e5eaf1;
    vertical-align: top;
    color: var(--anc-ink-soft);
}
body.subject-history .chx-compare tr:nth-child(even) td,
body.subject-history .anc-table-wrap tr:nth-child(even) td {
    background: #f7f9fc;
}
body.subject-history .anc-arrow {
    color: var(--anc-green);
    font-weight: 800;
    margin: 0 4px;
}

/* ---------- Place-name layout + Remember card ---------- */
body.subject-history .anc-place-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, .85fr);
    gap: 16px;
    align-items: start;
    margin: 16px 0 8px;
}
@media (max-width: 900px) {
    body.subject-history .anc-place-grid { grid-template-columns: 1fr; }
}
body.subject-history .anc-remember {
    border-radius: 16px;
    border: 1px solid var(--anc-teal-bd);
    background: #fff;
    padding: 16px 16px 18px;
    box-shadow: 0 10px 24px rgba(42, 107, 107, .12);
    position: relative;
}
body.subject-history .anc-remember-h {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--anc-teal);
    font-weight: 800;
    font-size: 1rem;
    margin: 0 0 10px;
}
body.subject-history .anc-remember-h .anc-ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--anc-teal-bg);
    display: grid;
    place-items: center;
}
body.subject-history .anc-remember p {
    margin: 0 0 8px;
    color: var(--anc-ink-soft);
    line-height: 1.5;
}
body.subject-history .anc-remember p:last-child { margin-bottom: 0; }
body.subject-history .anc-remember .anc-brand {
    color: var(--anc-orange);
    font-weight: 800;
}

/* ---------- Figures ---------- */
body.subject-history .chx-fig {
    margin: 18px 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #d5dee9;
    background: #fff;
}
body.subject-history .chx-fig-bar {
    padding: 8px 12px;
    background: var(--anc-navy);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
body.subject-history .chx-fig .chx-svg { display: block; width: 100%; height: auto; }

/* ---------- Landscape footer accent ---------- */
body.subject-history .chx.chx-poster::after {
    content: "";
    display: block;
    height: 28px;
    margin: 22px -4px -8px;
    opacity: .55;
    background:
        radial-gradient(18px 10px at 12% 70%, #cbd5e1 40%, transparent 42%),
        radial-gradient(22px 12px at 28% 78%, #94a3b8 38%, transparent 42%),
        radial-gradient(16px 9px at 48% 72%, #cbd5e1 40%, transparent 42%),
        radial-gradient(24px 13px at 70% 80%, #94a3b8 36%, transparent 42%),
        radial-gradient(18px 10px at 88% 74%, #cbd5e1 40%, transparent 42%),
        linear-gradient(180deg, transparent 40%, rgba(148, 163, 184, .25) 100%);
}

/* ---------- "How We Know Ancient Bihar" board: lesson column + mobile ---------- */
body.subject-history .study-lesson .anc-place-grid { grid-template-columns: 1fr; }
/* Board text follows the site's justified style (hyphenated to avoid gaps); tables stay left-aligned */
body.subject-history .concept-block .anc-board p,
body.subject-history .concept-block .anc-board .anc-item > div { text-align: justify !important; text-justify: inter-word; -webkit-hyphens: auto; hyphens: auto; }
body.subject-history .concept-block .anc-board td { text-align: left !important; }
body.subject-history .concept-block .anc-board p.anc-board-lead { text-align: center !important; }
body.subject-history .anc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
body.subject-history .anc-toolkit { flex-wrap: wrap; row-gap: 4px; }
body.subject-history .anc-col { display: flex; flex-direction: column; }
body.subject-history .anc-col-b { flex: 1 1 auto; }
body.subject-history .anc-toolkit .anc-eq { white-space: nowrap; }
body.subject-history .anc-place-table td:first-child { font-weight: 700; color: var(--anc-ink); }
body.subject-history .anc-col-b > .anc-item > div { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 600px) {
    body.subject-history .anc-board.anc-how { margin: 16px 0 6px; }
    body.subject-history .anc-board-title { font-size: 1.2rem; margin-bottom: 6px; }
    body.subject-history .anc-board-lead { font-size: .92rem; margin-bottom: 12px; }
    body.subject-history .anc-split { gap: 12px; margin: 12px 0; }
    body.subject-history .anc-col-h { padding: 10px 12px; font-size: .85rem; }
    body.subject-history .anc-col-h .anc-ico { width: 28px; height: 28px; font-size: .9rem; }
    body.subject-history .anc-col-b { padding: 12px; }
    body.subject-history .anc-item { grid-template-columns: 30px 1fr; gap: 8px; margin-bottom: 10px; font-size: .92rem; line-height: 1.45; }
    body.subject-history .anc-item-ico { width: 30px; height: 30px; font-size: .85rem; }
    body.subject-history .anc-toolkit { gap: 6px 8px; padding: 10px 12px; font-size: .92rem; margin: 6px 0 16px; }

    /* Place-name table → stacked cards */
    body.subject-history .anc-table-wrap { overflow: hidden; }
    body.subject-history .anc-place-table thead { display: none; }
    body.subject-history .anc-place-table,
    body.subject-history .anc-place-table tbody,
    body.subject-history .anc-place-table tr,
    body.subject-history .anc-place-table td { display: block; width: 100%; }
    body.subject-history .anc-place-table tr { padding: 10px 12px; border-bottom: 1px solid #e5eaf1; }
    body.subject-history .anc-place-table tr:last-child { border-bottom: 0; }
    body.subject-history .anc-place-table tr:nth-child(even) { background: #f7f9fc; }
    body.subject-history .anc-table-wrap .anc-place-table td,
    body.subject-history .anc-table-wrap .anc-place-table tr:nth-child(even) td { padding: 2px 0; border: 0; background: transparent; }
    body.subject-history .anc-place-table td::before {
        content: attr(data-label);
        display: block;
        font-size: .68rem;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: #64748b;
    }
    body.subject-history .anc-place-table td:first-child::before { display: none; }
    body.subject-history .anc-place-table td:first-child { font-size: 1rem; padding-bottom: 4px; }
    body.subject-history .anc-place-table td:nth-child(2),
    body.subject-history .anc-place-table td:nth-child(3) { display: inline-block; width: 50%; vertical-align: top; padding-right: 8px; }
    body.subject-history .anc-remember { padding: 14px; }
}

/* =====================================================================
   Virtual-classroom lesson blocks (vc-*) — Ancient Ch 1 Mod 1+
   ===================================================================== */
body.subject-history .vc {
    --vc-purple: #5b3f8c;
    --vc-purple-bg: #f3effa;
    --vc-red: #b4372f;
    --vc-red-bg: #fdf0ee;
    --vc-ok: #2f6b3a;
}
/* Paragraphs and list items are justified like the rest of the site; hyphenation keeps word gaps small.
   Tables, answer options and short label text stay left-aligned. */
body.subject-history .concept-block .vc p,
body.subject-history .concept-block .vc li {
    text-align: justify !important; text-justify: inter-word;
    -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word;
}
body.subject-history .concept-block .vc td,
body.subject-history .concept-block .vc .vc-opts li,
body.subject-history .concept-block .vc .vc-levels li,
body.subject-history .concept-block .vc p.vc-sub-h,
body.subject-history .concept-block .vc p.vc-big,
body.subject-history .concept-block .vc p.vc-model-h,
body.subject-history .concept-block .vc p.vc-model-note { text-align: left !important; }

/* Level chips */
body.subject-history .vc-levels {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
    margin: 4px 0 16px; padding: 0; list-style: none;
}
body.subject-history .vc-levels li {
    font-size: .74rem; font-weight: 800; letter-spacing: .03em;
    padding: 5px 10px; border-radius: 999px;
    border: 1px solid #d5dee9; color: #64748b; background: #fff;
}
body.subject-history .vc-levels li.is-on { background: var(--anc-navy); border-color: var(--anc-navy); color: #fff; }
body.subject-history .vc-levels li.is-on::before { content: "✓ "; }

/* Generic card */
body.subject-history .vc-card {
    border-radius: 14px; margin: 16px 0; padding: 14px 16px;
    background: #fff; border: 1px solid #dbe3ee;
    box-shadow: 0 6px 16px rgba(26, 54, 84, .05);
}
body.subject-history .vc-card > :last-child { margin-bottom: 0; }
body.subject-history .vc-h {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 10px; font-size: .8rem; font-weight: 800;
    letter-spacing: .05em; text-transform: uppercase; color: var(--anc-navy);
}
body.subject-history .vc-h .vc-ico {
    width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
    display: grid; place-items: center; font-size: .95rem; background: #eef1f4;
}
body.subject-history .vc-goals { border-left: 5px solid var(--anc-navy); }
body.subject-history .vc-goals ol { margin: 0; padding-left: 1.3em; }
body.subject-history .vc-goals li { margin: 0 0 6px; line-height: 1.5; color: var(--anc-ink-soft); }
body.subject-history .vc-warm { background: #fff8e8; border-color: #ecd49a; }
body.subject-history .vc-warm .vc-h { color: #8a5a00; }
body.subject-history .vc-warm .vc-q { font-weight: 700; color: var(--anc-ink); margin: 0 0 8px; }

/* Teacher steps */
body.subject-history .vc-step {
    margin: 18px 0; border-radius: 14px; overflow: hidden;
    border: 1px solid #c5d0e0; background: #fff;
    box-shadow: 0 6px 16px rgba(26, 54, 84, .05);
}
body.subject-history .vc-step-h {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; background: var(--anc-navy); color: #fff;
}
body.subject-history .vc-step-n {
    flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center; background: var(--anc-orange);
    font-weight: 800; font-size: .9rem;
}
body.subject-history .vc-step-t { font-weight: 800; font-size: .98rem; line-height: 1.3; }
body.subject-history .vc-step-b { padding: 14px 16px 16px; color: var(--anc-ink-soft); line-height: 1.6; }
body.subject-history .vc-step-b > :last-child { margin-bottom: 0; }
body.subject-history .vc-step-b ul { padding-left: 1.2em; margin: 0 0 10px; }
body.subject-history .vc-step-b li { margin: 0 0 6px; }

/* Teacher speech bubble */
body.subject-history .vc-say {
    display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: start;
    margin: 0 0 12px;
}
body.subject-history .vc-say-ava {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: var(--anc-teal-bg); font-size: 1.15rem; border: 1px solid var(--anc-teal-bd);
}
body.subject-history .vc-say-bubble {
    position: relative; background: var(--anc-teal-bg); border: 1px solid var(--anc-teal-bd);
    border-radius: 4px 14px 14px 14px; padding: 10px 12px; color: var(--anc-ink); font-style: italic;
}
body.subject-history .vc-say-bubble p { margin: 0; }

/* Key fact strip */
body.subject-history .vc-key {
    margin: 10px 0; padding: 10px 12px; border-radius: 10px;
    background: var(--anc-orange-bg); border: 1px dashed var(--anc-orange-bd); color: var(--anc-ink);
}
body.subject-history .vc-key strong:first-child { color: var(--anc-orange); }

/* Reveal (details) */
body.subject-history .vc-reveal {
    margin: 10px 0 0; border-radius: 10px; border: 1px solid #c9d6e6; background: #f5f8fc; overflow: hidden;
}
body.subject-history .vc-reveal > summary {
    cursor: pointer; list-style: none; padding: 9px 12px;
    font-weight: 700; font-size: .9rem; color: var(--anc-navy);
    display: flex; align-items: flex-start; gap: 8px;
}
body.subject-history .vc-reveal > summary::-webkit-details-marker { display: none; }
body.subject-history .vc-reveal > summary::before {
    content: "▸"; flex: 0 0 auto; transition: transform .15s ease; color: var(--anc-orange);
}
body.subject-history .vc-reveal[open] > summary::before { transform: rotate(90deg); }
body.subject-history .vc-reveal > summary .vc-tag {
    flex: 0 0 auto; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: #fff; background: var(--anc-teal); border-radius: 6px; padding: 2px 7px; margin-top: 1px;
}
body.subject-history .vc-reveal > .vc-ans {
    padding: 10px 12px 12px; border-top: 1px solid #dbe3ee; background: #fff; color: var(--anc-ink-soft); line-height: 1.55;
}
body.subject-history .vc-reveal > .vc-ans > :last-child { margin-bottom: 0; }
body.subject-history .vc-reveal > .vc-ans ul,
body.subject-history .vc-reveal > .vc-ans ol { padding-left: 1.2em; margin: 6px 0; }
body.subject-history .vc-opts { list-style: none; padding: 0 !important; margin: 4px 0 0 !important; display: grid; gap: 4px; }
body.subject-history .vc-q-body { padding: 0 12px 4px 30px; color: var(--anc-ink); }
body.subject-history .vc-q-body p { margin: 0 0 6px; }

/* Memory hook */
body.subject-history .vc-hook { background: var(--vc-purple-bg); border-color: #cbbbe6; }
body.subject-history .vc-hook .vc-h { color: var(--vc-purple); }
body.subject-history .vc-hook .vc-h .vc-ico { background: #e4dbf3; }
body.subject-history .vc-hook .vc-big {
    font-size: 1.15rem; font-weight: 800; color: var(--vc-purple); letter-spacing: .02em; margin: 0 0 8px;
}

/* Traps */
body.subject-history .vc-traps { background: var(--vc-red-bg); border-color: #e9b4ae; }
body.subject-history .vc-traps .vc-h { color: var(--vc-red); }
body.subject-history .vc-traps .vc-h .vc-ico { background: #f7d9d5; }
body.subject-history .vc-trap {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 8px;
}
body.subject-history .vc-trap:last-child { margin-bottom: 0; }
body.subject-history .vc-wrong,
body.subject-history .vc-right {
    border-radius: 10px; padding: 8px 10px; font-size: .92rem; line-height: 1.45; background: #fff;
}
body.subject-history .vc-wrong { border: 1px solid #e9b4ae; color: #7a2a24; }
body.subject-history .vc-right { border: 1px solid #9fc09a; color: #1f4a28; }
body.subject-history .vc-wrong::before { content: "✗ "; font-weight: 800; color: var(--vc-red); }
body.subject-history .vc-right::before { content: "✓ "; font-weight: 800; color: var(--vc-ok); }

/* Timeline */
body.subject-history .vc-timeline { list-style: none; margin: 0 !important; padding: 0 0 0 18px !important; position: relative; }
body.subject-history .vc-timeline::before {
    content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--anc-line);
}
body.subject-history .vc-timeline li { position: relative; margin: 0 0 12px !important; padding-left: 10px; }
body.subject-history .vc-timeline li::before {
    content: ""; position: absolute; left: -17px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
    background: #fff; border: 3px solid var(--anc-orange);
}
body.subject-history .vc-when {
    display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .03em;
    color: #fff; background: var(--anc-navy); border-radius: 6px; padding: 2px 8px; margin: 0 0 3px;
}

/* Cause → effect chain */
body.subject-history .vc-chain { display: grid; gap: 8px; margin: 6px 0 10px; }
body.subject-history .vc-link {
    display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1.4fr); gap: 6px; align-items: center;
}
body.subject-history .vc-cause, body.subject-history .vc-effect {
    border-radius: 10px; padding: 8px 10px; font-size: .92rem; line-height: 1.4;
}
body.subject-history .vc-cause { background: var(--anc-teal-bg); border: 1px solid var(--anc-teal-bd); color: var(--anc-ink); font-weight: 700; }
body.subject-history .vc-effect { background: var(--anc-green-bg); border: 1px solid #9fc09a; color: var(--anc-ink-soft); }
body.subject-history .vc-arrow { text-align: center; color: var(--anc-orange); font-weight: 800; }

/* Exam corner */
body.subject-history .vc-exam {
    margin: 22px 0 16px; border-radius: 16px; overflow: hidden;
    border: 2px solid var(--anc-navy); background: #fff;
}
body.subject-history .vc-exam-h {
    padding: 12px 16px; background: linear-gradient(90deg, var(--anc-navy-deep), var(--anc-navy));
    color: #fff; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: .9rem;
    display: flex; align-items: center; gap: 10px;
}
body.subject-history .vc-exam-b { padding: 6px 14px 14px; }
body.subject-history .vc-lvl { margin: 14px 0 0; }
body.subject-history .vc-lvl-h {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px; color: #fff; margin: 0 0 4px;
}
body.subject-history .vc-lvl-school .vc-lvl-h { background: var(--anc-green); }
body.subject-history .vc-lvl-plus2 .vc-lvl-h { background: var(--anc-teal); }
body.subject-history .vc-lvl-bpsc .vc-lvl-h { background: var(--anc-orange); }
body.subject-history .vc-lvl-upsc .vc-lvl-h { background: var(--vc-purple); }
body.subject-history .vc-tip {
    margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #eef4f9; border: 1px solid #9bb6d0;
    color: var(--anc-ink); font-size: .92rem;
}

/* Exit ticket + recap */
body.subject-history .vc-exit { border-left: 5px solid var(--anc-green); background: var(--anc-green-bg); border-color: #9fc09a; }
body.subject-history .vc-exit .vc-h { color: var(--anc-green); }
body.subject-history .vc-exit ul { list-style: none; margin: 0; padding: 0; }
body.subject-history .vc-exit li { margin: 0 0 6px; padding-left: 26px; position: relative; color: var(--anc-ink); }
body.subject-history .vc-exit li::before { content: "☐"; position: absolute; left: 2px; top: -1px; font-size: 1.05rem; color: var(--anc-green); }
body.subject-history .vc-recap { background: linear-gradient(180deg, #fff, var(--anc-cream)); border-color: var(--anc-line); }
body.subject-history .vc-recap ol { margin: 0; padding-left: 1.3em; }
body.subject-history .vc-recap li { margin: 0 0 6px; color: var(--anc-ink); }

@media (max-width: 600px) {
    body.subject-history .vc-card { padding: 12px; }
    body.subject-history .vc-step-b { padding: 12px; }
    body.subject-history .vc-step-t { font-size: .92rem; }
    body.subject-history .vc-say { grid-template-columns: 32px 1fr; gap: 8px; }
    body.subject-history .vc-say-ava { width: 32px; height: 32px; font-size: 1rem; }
    body.subject-history .vc-trap { grid-template-columns: 1fr; gap: 4px; }
    body.subject-history .vc-link { grid-template-columns: 1fr; gap: 2px; }
    body.subject-history .vc-arrow { font-size: 0; line-height: 1; height: 14px; }
    body.subject-history .vc-arrow::before { content: "↓"; font-size: 1rem; }
    /* Lesson tables → stacked cards */
    body.subject-history .vc .chx-compare-wrap { overflow: hidden; }
    body.subject-history .vc .vc-table thead { display: none; }
    body.subject-history .vc .vc-table,
    body.subject-history .vc .vc-table tbody,
    body.subject-history .vc .vc-table tr,
    body.subject-history .vc .vc-table td { display: block; width: 100%; }
    body.subject-history .vc .vc-table tr { padding: 10px 12px; border-bottom: 1px solid #e5eaf1; }
    body.subject-history .vc .vc-table tr:last-child { border-bottom: 0; }
    body.subject-history .vc .vc-table tr:nth-child(even) { background: #f7f9fc; }
    body.subject-history .vc .chx-compare-wrap .vc-table td,
    body.subject-history .vc .chx-compare-wrap .vc-table tr:nth-child(even) td { padding: 2px 0; border: 0; background: transparent; }
    body.subject-history .vc .vc-table td::before {
        content: attr(data-label); display: block; font-size: .68rem; font-weight: 800;
        letter-spacing: .04em; text-transform: uppercase; color: #64748b;
    }
    body.subject-history .vc .vc-table td:first-child { font-weight: 800; color: var(--anc-ink); font-size: 1rem; padding-bottom: 4px; }
    body.subject-history .vc .vc-table td:first-child::before { display: none; }
    body.subject-history .vc-exam-b { padding: 4px 10px 12px; }
    body.subject-history .vc-q-body { padding-left: 12px; }
}
body.subject-history .vc .vc-tag {
    display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: #fff; background: var(--anc-teal); border-radius: 6px; padding: 2px 7px; vertical-align: middle;
}
body.subject-history .vc-opts li { margin: 0 !important; line-height: 1.45; }
body.subject-history .vc-opts li.vc-opt {
    padding: 6px 10px; border: 1px solid #dbe3ee; border-radius: 8px; background: #fff;
}
body.subject-history .vc-opts li.vc-opt:first-of-type { margin-top: 4px !important; }

/* ---- deeper classroom pieces ---- */
body.subject-history .vc-meta {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 0 0 14px;
}
body.subject-history .vc-meta-i {
    background: #fff; border: 1px solid #dbe3ee; border-radius: 10px; padding: 8px 10px;
}
body.subject-history .vc-meta-l {
    display: block; font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #64748b;
}
body.subject-history .vc-meta-v { display: block; font-weight: 700; color: var(--anc-ink); font-size: .9rem; line-height: 1.35; }
body.subject-history .vc-example {
    margin: 12px 0; padding: 12px 14px; border-radius: 12px;
    background: #fffdf5; border: 1px solid #e8d9a8; border-left: 5px solid #c99a2e;
}
body.subject-history .vc-example-h { font-weight: 800; color: #7a5a10; margin: 0 0 6px; font-size: .9rem; }
body.subject-history .vc-example > :last-child { margin-bottom: 0; }
body.subject-history .vc-example ol, body.subject-history .vc-example ul { padding-left: 1.2em; margin: 4px 0 6px; }
body.subject-history .vc-deep {
    margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--vc-purple-bg); border: 1px solid #cbbbe6;
}
body.subject-history .vc-deep-h { font-weight: 800; color: var(--vc-purple); font-size: .9rem; margin: 0 0 4px; }
body.subject-history .vc-deep-q { margin: 0 0 6px; color: var(--anc-ink); font-weight: 600; }
body.subject-history .vc-doubts { background: #f8fafc; }
body.subject-history .vc-doubt { margin: 0 0 12px; }
body.subject-history .vc-doubt:last-child { margin-bottom: 0; }
body.subject-history .vc-doubt-q, body.subject-history .vc-doubt-a {
    padding: 9px 12px; border-radius: 12px; line-height: 1.5; font-size: .95rem;
}
body.subject-history .vc-doubt-q { background: #fff; border: 1px solid #dbe3ee; color: var(--anc-ink); margin: 0 18% 6px 0; border-radius: 12px 12px 12px 4px; }
body.subject-history .vc-doubt-a { background: var(--anc-teal-bg); border: 1px solid var(--anc-teal-bd); color: var(--anc-ink-soft); margin: 0 0 0 10%; border-radius: 12px 12px 4px 12px; }
body.subject-history .vc-who { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #64748b; margin: 0 0 2px; }
body.subject-history .vc-hw { border-left: 5px solid #c99a2e; }
body.subject-history .vc-hw ol, body.subject-history .vc-src ul { margin: 0; padding-left: 1.3em; }
body.subject-history .vc-hw li, body.subject-history .vc-src li { margin: 0 0 6px; color: var(--anc-ink-soft); line-height: 1.5; }
body.subject-history .vc-src { background: #f8fafc; font-size: .92rem; }
body.subject-history .vc-sub-h { font-weight: 800; color: var(--anc-navy); margin: 14px 0 6px; font-size: .95rem; }
@media (max-width: 600px) {
    body.subject-history .vc-meta { grid-template-columns: 1fr 1fr; }
    body.subject-history .vc-doubt-q { margin-right: 6%; }
    body.subject-history .vc-doubt-a { margin-left: 4%; }
}
body.subject-history .vc-doubt-q > :last-child, body.subject-history .vc-doubt-a > :last-child { margin-bottom: 0; }
body.subject-history .vc-model { border-left: 4px solid var(--vc-purple); padding: 2px 0 2px 12px; }
body.subject-history .vc-model-h { font-weight: 800; color: var(--vc-purple); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 6px !important; }
body.subject-history .vc-model p { margin: 0 0 8px; line-height: 1.6; }
body.subject-history .vc-model-note { font-size: .82rem; color: #64748b; font-style: italic; }
@media (max-width: 600px) { body.subject-history .vc-arrow { display: block; text-align: center; } }

/* ---------- Phone layout for history lesson pages ---------- */
@media (max-width: 600px) {
    /* reclaim width lost to three nested paddings */
    body.subject-history main.content-area { padding-left: 4px !important; padding-right: 4px !important; }
    body.subject-history .module-content.magazine-sheet { padding-left: 8px !important; padding-right: 8px !important; }
    body.subject-history .study-lesson { padding-left: 10px !important; padding-right: 10px !important; }
    /* toolbar: wrap instead of hiding PDF and voice controls off-screen */
    /* theme.css forces a one-line scrolling strip with `body .magazine-sheet .tts-controls.function-list`; outrank it */
    body.subject-history .magazine-sheet .tts-controls.function-list { flex-flow: row wrap !important; overflow-x: visible; row-gap: 6px; }
    body.subject-history .magazine-sheet .tts-controls.function-list > * { flex: 1 1 auto; }
    body.subject-history .magazine-sheet .tts-controls.function-list > div:empty { display: none; }
    body.subject-history .magazine-sheet .tts-controls .voice-selector { flex: 1 1 100%; min-width: 0; }
    /* ribbon: let the title use the full width, tab drops below */
    body.subject-history .chx.chx-poster .anc-ribbon { flex-wrap: wrap; padding: 9px 12px; row-gap: 8px; }
    body.subject-history .chx.chx-poster .anc-ribbon-title { flex: 1 1 100%; font-size: .68rem; }
    body.subject-history .chx.chx-poster .anc-ribbon-tab { font-size: .66rem; padding: 5px 10px 5px 14px; }
    body.subject-history .chx.chx-poster > h2.chx-poster-title { font-size: 1.2rem; }
    /* inner cards a little tighter so text gets the room */
    body.subject-history .vc-step-b, body.subject-history .chx-panel-b, body.subject-history .anc-col-b { padding-left: 10px; padding-right: 10px; }
    body.subject-history .vc-exam-b { padding-left: 8px; padding-right: 8px; }
}
/* Devanagari should not be split with hyphens */
html[lang="hi"] body.subject-history .concept-block .vc p,
html[lang="hi"] body.subject-history .concept-block .vc li,
html[lang="hi"] body.subject-history .concept-block .anc-board p,
html[lang="hi"] body.subject-history .concept-block .anc-board .anc-item > div { -webkit-hyphens: manual; hyphens: manual; }
