/* =====================================================================
   Agriculture Ch 4A / 4B — virtual-classroom lesson design
   Same canvas pattern as Ancient Bihar Ch 1–2 (navy ribbon, cream paper,
   teal / orange panels), scoped to .agv so it cannot affect other pages.
   ===================================================================== */
.agv {
    --ink: #1a3654; --ink-soft: #334155; --muted: #64748b;
    --navy: #1e3a5f; --navy-deep: #152a45;
    --teal: #2a6b6b; --teal-bg: #e8f3f2; --teal-bd: #8bbbb8;
    --orange: #c45c26; --orange-bg: #fbf0e8; --orange-bd: #e0a882;
    --green: #2f6b3a; --green-bg: #eef6ea; --green-bd: #9cc39f;
    --red: #b42318; --red-bg: #fdf0ee; --red-bd: #f0b4ab;
    --gold: #b7791f; --gold-bg: #fdf6e3; --gold-bd: #e6c77f;
    --paper: #fbfaf6; --cream: #f7f3ea; --line: #c4a574; --card: #ffffff; --bd: #e4ddd0;
    color: var(--ink-soft);
    line-height: 1.65;
    font-size: 1rem;
}
.agv * { box-sizing: border-box; }
.agv p { margin: 0 0 .7em; }
.agv strong { color: var(--ink); }

/* ribbon + title */
.agv .anc-ribbon { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(90deg, var(--navy-deep), var(--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); }
.agv .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; }
.agv .anc-ribbon-ico { width: 30px; height: 30px; border-radius: 8px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; font-size: 1.05rem; flex: none; }
.agv .anc-ribbon-tab { flex: none; font-size: .66rem; font-weight: 800; letter-spacing: .1em; background: #fff; color: var(--navy); border-radius: 999px; padding: 4px 10px; }
.agv .chx-poster-title { font-size: clamp(1.25rem, 2.6vw, 1.7rem); line-height: 1.25; color: var(--navy); margin: 4px 0 6px; font-weight: 800; letter-spacing: -.01em; }
.agv .chx-ornament { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; }
.agv .chx-ornament span { display: block; height: 3px; width: 84px; border-radius: 3px; background: linear-gradient(90deg, var(--orange), var(--line)); }
.agv .chx-sub { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }

/* level chips + meta */
.agv .vc-levels { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 12px; }
.agv .vc-levels li { font-size: .74rem; font-weight: 800; letter-spacing: .03em; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--bd); color: var(--muted); background: #fff; }
.agv .vc-levels li.is-on { background: var(--teal); border-color: var(--teal); color: #fff; }
.agv .vc-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 0 0 16px; }
.agv .vc-meta-i { background: var(--cream); border: 1px solid var(--bd); border-radius: 10px; padding: 8px 11px; }
.agv .vc-meta-l { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); }
.agv .vc-meta-v { display: block; font-size: .86rem; color: var(--ink); font-weight: 600; line-height: 1.4; }

/* cards */
.agv .vc-card { background: var(--card); border: 1px solid var(--bd); border-left: 5px solid var(--navy); border-radius: 12px; padding: 12px 15px; margin: 0 0 14px; box-shadow: 0 6px 16px -14px rgba(21, 42, 69, .5); }
.agv .vc-h { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--navy); margin: 0 0 8px; font-size: .98rem; }
.agv .vc-ico { font-size: 1.1rem; }
.agv .vc-card ol, .agv .vc-card ul { margin: 0; padding-left: 1.25em; }
.agv .vc-card li { margin: 3px 0; }
.agv .vc-goals { border-left-color: var(--teal); background: linear-gradient(180deg, #fff, var(--teal-bg)); }
.agv .vc-warm { border-left-color: var(--gold); background: linear-gradient(180deg, #fff, var(--gold-bg)); }
.agv .vc-q { font-weight: 600; color: var(--ink); }
.agv .vc-hook { border-left-color: var(--orange); background: var(--orange-bg); }
.agv .vc-big { font-size: 1.12rem; font-weight: 800; color: var(--orange); margin: 0 0 4px; }
.agv .vc-doubts { border-left-color: var(--teal); }
.agv .vc-traps { border-left-color: var(--red); }
.agv .vc-hw { border-left-color: var(--tan, #8a5a2b); }
.agv .vc-exit { border-left-color: var(--green); background: var(--green-bg); }
.agv .vc-exit ul { list-style: none; padding-left: 0; }
.agv .vc-exit li::before { content: "☐ "; color: var(--green); font-weight: 800; }
.agv .vc-recap { border-left-color: var(--navy); background: var(--cream); }
.agv .vc-src { border-left-color: var(--muted); font-size: .9rem; }
.agv .vc-pyqs { border-left-color: var(--orange); }
.agv .vc-pyqlist { font-weight: 700; color: var(--orange); word-spacing: 2px; margin: 0; }
.agv .vc-small { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }

/* reveal */
.agv details.vc-reveal { border: 1px dashed var(--teal-bd); border-radius: 10px; background: #fff; margin: 8px 0; }
.agv details.vc-reveal > summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; font-weight: 700; color: var(--teal); }
.agv details.vc-reveal > summary::-webkit-details-marker { display: none; }
.agv details.vc-reveal > summary::before { content: "▸"; transition: transform .15s; }
.agv details.vc-reveal[open] > summary::before { transform: rotate(90deg); }
.agv .vc-ans { padding: 2px 14px 10px 30px; color: var(--ink); }
.agv .vc-tag { flex: none; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--orange); border-radius: 6px; padding: 3px 7px; margin-top: 1px; }

/* steps */
.agv .vc-step { border: 1px solid var(--bd); border-radius: 14px; background: var(--paper); margin: 0 0 16px; overflow: hidden; }
.agv .vc-step-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: linear-gradient(90deg, var(--teal-bg), #fff); border-bottom: 1px solid var(--bd); }
.agv .vc-step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.agv .vc-step-t { font-weight: 800; color: var(--navy); font-size: 1.02rem; }
.agv .vc-step-b { padding: 12px 15px 6px; }
.agv .vc-say { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; }
.agv .vc-say-ava { font-size: 1.6rem; line-height: 1; flex: none; }
.agv .vc-say-bubble { position: relative; background: #fff; border: 1px solid var(--teal-bd); border-radius: 4px 14px 14px 14px; padding: 8px 12px; color: var(--ink); font-style: italic; }
.agv .vc-say-bubble p { margin: 0; }
.agv .vc-key { background: var(--gold-bg); border: 1px solid var(--gold-bd); border-radius: 10px; padding: 9px 12px; margin: 10px 0; color: var(--ink); }
.agv .vc-pyq { font-size: .84rem; font-weight: 700; color: var(--orange); background: var(--orange-bg); border-radius: 8px; padding: 5px 10px; display: inline-block; margin: 6px 0 4px; }

/* chain */
.agv .vc-chain { display: grid; gap: 8px; margin: 8px 0 12px; }
.agv .vc-link { display: grid; grid-template-columns: minmax(110px, 170px) 26px 1fr; align-items: center; gap: 6px; }
.agv .vc-cause { background: var(--navy); color: #fff; font-weight: 800; border-radius: 9px; padding: 8px 10px; font-size: .9rem; text-align: center; }
.agv .vc-arrow { text-align: center; color: var(--orange); font-weight: 800; font-size: 1.2rem; }
.agv .vc-effect { background: #fff; border: 1px solid var(--bd); border-radius: 9px; padding: 8px 11px; font-size: .94rem; }

/* tables */
.agv .chx-compare-wrap { margin: 10px 0 14px; border: 1px solid var(--bd); border-radius: 12px; overflow: hidden; background: #fff; }
.agv .chx-compare-bar { background: var(--navy); color: #fff; font-weight: 800; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; padding: 7px 12px; }
.agv .vc-tscroll { overflow-x: auto; }
.agv table.vc-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.agv table.vc-table th { background: var(--cream); color: var(--navy); text-align: left; padding: 8px 10px; font-weight: 800; border-bottom: 2px solid var(--line); }
.agv table.vc-table td { padding: 7px 10px; border-top: 1px solid #efe9dd; vertical-align: top; }
.agv table.vc-table tbody tr:nth-child(even) td { background: #fcfbf7; }
.agv .vc-tnote { font-size: .78rem; color: var(--muted); margin: 0; padding: 6px 12px 8px; border-top: 1px solid #efe9dd; }

/* figures */
.agv .chx-fig { margin: 12px 0 16px; border: 1px solid var(--bd); border-radius: 14px; background: #fff; padding: 0 0 8px; overflow: hidden; }
.agv .chx-fig-bar { background: var(--cream); color: var(--navy); font-weight: 800; font-size: .74rem; letter-spacing: .08em; padding: 7px 12px; border-bottom: 1px solid var(--bd); }
.agv .chx-svg { display: block; width: 100%; height: auto; max-width: 760px; margin: 8px auto 0; }
.agv .chx-fig figcaption { font-size: .82rem; color: var(--muted); font-style: italic; padding: 4px 12px 0; }

/* stats */
.agv .vc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 10px 0 12px; }
.agv .vc-stat { background: #fff; border: 1px solid var(--bd); border-top: 4px solid var(--orange); border-radius: 10px; padding: 9px 11px; }
.agv .vc-stat:nth-child(2n) { border-top-color: var(--teal); }
.agv .vc-stat-v { font-size: 1.35rem; font-weight: 800; color: var(--navy); line-height: 1.15; }
.agv .vc-stat-l { font-size: .82rem; font-weight: 700; color: var(--ink); }
.agv .vc-stat-n { font-size: .72rem; color: var(--muted); }

/* example / deep */
.agv .vc-example { background: var(--teal-bg); border: 1px solid var(--teal-bd); border-radius: 12px; padding: 9px 13px; margin: 10px 0; }
.agv .vc-example-h { font-weight: 800; color: var(--teal); margin-bottom: 4px; }
.agv .vc-example ul { margin: 0; padding-left: 1.2em; }
.agv .vc-deep { border: 1px solid #d9cfee; background: #f7f3fd; border-radius: 12px; padding: 9px 13px; margin: 10px 0; }
.agv .vc-deep-h { font-weight: 800; color: #5b3a8a; }
.agv .vc-deep-q { font-weight: 600; color: var(--ink); margin: 4px 0; }

/* doubts / traps */
.agv .vc-doubt { border-top: 1px dashed var(--bd); padding: 8px 0; }
.agv .vc-doubt:first-of-type { border-top: 0; }
.agv .vc-doubt-q { font-weight: 700; color: var(--ink); }
.agv .vc-doubt-a { margin-top: 4px; padding-left: 12px; border-left: 3px solid var(--teal-bd); }
.agv .vc-doubt-a p { margin: 2px 0 0; }
.agv .vc-who { display: inline-block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 6px; }
.agv .vc-trap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0; }
.agv .vc-wrong, .agv .vc-right { border-radius: 9px; padding: 7px 10px; font-size: .92rem; }
.agv .vc-wrong { background: var(--red-bg); border: 1px solid var(--red-bd); color: #7a1d14; }
.agv .vc-wrong::before { content: "✘ "; font-weight: 800; }
.agv .vc-right { background: var(--green-bg); border: 1px solid var(--green-bd); color: #1f4d27; }
.agv .vc-right::before { content: "✔ "; font-weight: 800; }

/* practice ladder */
.agv .vc-exam { border: 2px solid var(--navy); border-radius: 14px; margin: 0 0 16px; overflow: hidden; }
.agv .vc-exam-h { background: var(--navy); color: #fff; font-weight: 800; padding: 9px 14px; display: flex; gap: 8px; }
.agv .vc-exam-b { padding: 10px 12px; background: #fff; }
.agv .vc-lvl { border-radius: 10px; padding: 8px 10px; margin: 0 0 10px; }
.agv .vc-lvl-h { display: inline-block; font-weight: 800; font-size: .8rem; margin-bottom: 2px; }
.agv .vc-lvl-school { background: var(--teal-bg); } .agv .vc-lvl-school .vc-lvl-h { color: var(--teal); }
.agv .vc-lvl-plus2 { background: var(--gold-bg); } .agv .vc-lvl-plus2 .vc-lvl-h { color: var(--gold); }
.agv .vc-lvl-bpsc { background: var(--orange-bg); } .agv .vc-lvl-bpsc .vc-lvl-h { color: var(--orange); }
.agv .vc-lvl-upsc { background: #eef2f8; } .agv .vc-lvl-upsc .vc-lvl-h { color: var(--navy); }
.agv .vc-model { background: #fff; border: 1px solid var(--bd); border-radius: 10px; padding: 8px 12px; }
.agv .vc-model-h { font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.agv .vc-tip { background: var(--gold-bg); border: 1px solid var(--gold-bd); border-radius: 10px; padding: 8px 12px; color: var(--ink); }

/* flip tiles */
.agv .vc-flips { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 12px; }
.agv details.vc-flip { border-radius: 12px; background: var(--navy); color: #fff; min-height: 74px; cursor: pointer; }
.agv details.vc-flip > summary { list-style: none; padding: 12px; font-weight: 800; text-align: center; }
.agv details.vc-flip > summary::-webkit-details-marker { display: none; }
.agv details.vc-flip > summary::after { content: "tap to flip"; display: block; font-size: .64rem; font-weight: 600; opacity: .7; letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; }
.agv details.vc-flip[open] { background: var(--orange-bg); color: var(--ink); border: 1px solid var(--orange-bd); }
.agv details.vc-flip[open] > summary { color: var(--orange); padding-bottom: 2px; }
.agv details.vc-flip[open] > summary::after { content: ""; }
.agv details.vc-flip > div { padding: 0 12px 12px; font-size: .9rem; text-align: center; }

/* calculator */
.agv .vc-calc { border: 2px solid var(--teal); border-radius: 14px; background: #fff; padding: 10px 13px; margin: 12px 0; }
.agv .vc-calc-h { font-weight: 800; color: var(--teal); margin-bottom: 8px; }
.agv .vc-calc-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.agv .vc-calc label { display: grid; gap: 3px; font-size: .8rem; font-weight: 700; color: var(--ink); }
.agv .vc-calc input { font: inherit; font-size: 1rem; padding: 7px 9px; border: 1px solid var(--teal-bd); border-radius: 8px; width: 100%; background: var(--teal-bg); color: var(--ink); }
.agv .vc-calc-out { margin-top: 9px; font-size: 1.05rem; font-weight: 800; color: var(--navy); background: var(--cream); border-radius: 9px; padding: 8px 11px; min-height: 2.2em; }
.agv .vc-calc-n { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }

/* sorter game */
.agv .vc-sorter { border: 2px solid var(--orange); border-radius: 14px; background: #fff; padding: 10px 13px; margin: 12px 0; }
.agv .vc-sorter-h { font-weight: 800; color: var(--orange); margin-bottom: 6px; }
.agv .vc-sorter ol { margin: 0; padding-left: 1.4em; }
.agv .vc-sorter li { margin: 5px 0; }
.agv .vc-sorter li > span:first-child { display: inline-block; min-width: 60%; }
.agv .vc-sorter li { background: var(--orange-bg); border: 1px solid var(--orange-bd); border-radius: 9px; padding: 6px 8px; display: list-item; }
.agv .vc-sort-b { float: right; }
.agv .vc-sort-b button, .agv .vc-btn { font: inherit; border: 1px solid var(--orange-bd); background: #fff; color: var(--orange); border-radius: 7px; padding: 2px 8px; margin-left: 4px; cursor: pointer; font-weight: 800; }
.agv .vc-btn { padding: 6px 12px; background: var(--orange); color: #fff; border-color: var(--orange); }
.agv .vc-sorter-f { margin-top: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.agv .vc-sorter-r { font-weight: 800; }
.agv .vc-sorter-n { font-size: .88rem; color: var(--ink); background: var(--cream); border-radius: 8px; padding: 6px 10px; margin: 8px 0 0; }

/* MCQ chips (question panel) */
.pyq-chip { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .03em; color: #fff; background: #c45c26; border-radius: 6px; padding: 2px 8px; margin-bottom: 4px; }
.pyq-chip.added { background: #2a6b6b; }

@media (max-width: 640px) {
    .agv .vc-link { grid-template-columns: 1fr; }
    .agv .vc-arrow { transform: rotate(90deg); }
    .agv .vc-trap { grid-template-columns: 1fr; }
    .agv .anc-ribbon { flex-wrap: wrap; }
    .agv table.vc-table { font-size: .84rem; }
}
@media print {
    .agv .vc-step, .agv .vc-card, .agv .chx-fig { break-inside: avoid; }
    .agv details > :not(summary) { display: block !important; }
}
