/* SVT lessons: additions to maths.css. */
.mx-svt { --sv-green: #2f7d32; --sv-green-soft: #e8f5e9; --sv-earth: #8d5a2b; --sv-earth-soft: #f6ede4; }
.mx-svt .pc-eyebrow { color: #9fe8b4; }

/* Sorting: the item takes the whole first line. */
.mx-svt .mx-classify__row { grid-template-columns: 1fr; }
.mx-svt .mx-classify__n { font-size: 17px; font-weight: 700; }
.mx-svt .mx-classify__b .mx-cand { min-width: 0; font-size: 15px; }

/* Ordering. */
.sv-order { list-style: none; counter-reset: sv; margin: 8px 0 12px; padding: 0; display: grid; gap: 8px; }
.sv-order__item { counter-increment: sv; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--pc-line); border-radius: 12px; background: #fff; }
.sv-order__item::before { content: counter(sv); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--pc-teal-soft); color: #08766d; font-weight: 800; }
.sv-order__t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sv-order__btns { display: flex; gap: 6px; flex: none; }
.sv-order__mv { min-width: 44px; min-height: 44px; padding: 0; font-size: 18px; }
.sv-order__item.is-good { border-color: var(--pc-good); background: var(--pc-good-soft); }
.sv-order__item.is-bad { border-color: var(--pc-bad); background: var(--pc-bad-soft); }

/* Dichotomous key. */
.sv-key__path { margin: 0 0 10px; padding-left: 22px; color: var(--pc-muted); font-size: 15px; }
.sv-key__path:empty { display: none; }
.sv-key__q { margin: 0 0 8px; font-weight: 800; font-size: 18px; }
.sv-key__res { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--sv-green-soft); color: #1b4d1e; font-size: 17px; }
.sv-key__stage .mx-row { gap: 8px; }
.sv-key__stage .mx-cand { text-align: left; }

/* Drawings. */
.sv-svg { max-height: 460px; }
.sv-arc { fill: none; stroke: #c7d2dd; stroke-width: 10; }
.sv-arc--n { stroke: #9fd3f7; }
.sv-arc--2n { stroke: #f6b7a8; }
.sv-node { cursor: pointer; outline: none; }
.sv-node__box { fill: #fff; stroke: #8aa0b5; stroke-width: 1.5; }
.sv-node--n { fill: #eaf6ff; stroke: #2b78b8; }
.sv-node--2n { fill: #fff0ec; stroke: #c24a2c; }
.sv-node.is-sel .sv-node__box, .sv-node:focus-visible .sv-node__box { stroke-width: 3.5; stroke: var(--pc-navy); }
.sv-node__t { font-size: 13px; font-weight: 700; fill: #142033; text-anchor: middle; }
.sv-svg.is-narrow .sv-node__t { font-size: 15px; }
.sv-svg.is-narrow .sv-node__p { font-size: 13px; }
.sv-svg.is-narrow .sv-ev__lab { font-size: 13px; }
.sv-svg.is-narrow .sv-center { font-size: 16px; }
.sv-node__p { font-size: 12px; font-weight: 800; fill: #5a6b80; text-anchor: middle; }
.sv-ev { stroke: #fff; stroke-width: 2; }
.sv-ev--m { fill: #6d4fd6; } .sv-ev--f { fill: #b45309; }
.sv-ev__lab { font-size: 12px; font-weight: 800; text-anchor: middle; }
.sv-ev__lab.sv-ev--m { fill: #6d4fd6; stroke: none; } .sv-ev__lab.sv-ev--f { fill: #b45309; stroke: none; }
.sv-center { font-size: 15px; font-weight: 800; fill: #0b2447; text-anchor: middle; }
.sv-center--s { font-size: 12px; font-weight: 600; fill: #5a6b80; }
.sv-tri { fill: none; stroke: #142033; stroke-width: 2; }
.sv-tri__lab { font-size: 13px; font-weight: 700; fill: #5a6b80; text-anchor: middle; }
.sv-bar { fill: #3b82c4; }
.sv-dry { fill: #fde9c8; }
.sv-lab--P { fill: #1d5f99; }
.sv-lab--T { fill: #b42318; }
.sv-lvl { stroke: #fff; stroke-width: 2; }
.sv-lvl--0 { fill: #4caf50; } .sv-lvl--1 { fill: #8bc34a; } .sv-lvl--2 { fill: #ffb74d; } .sv-lvl--3 { fill: #ef8354; } .sv-lvl--4 { fill: #d1495b; }
.sv-lvl__t { font-size: 13px; font-weight: 800; fill: #142033; text-anchor: middle; }
.sv-lvl__v { font-size: 12px; font-weight: 700; fill: #142033; text-anchor: middle; }

/* Figures drawn in the lesson text. */
.sv-fig { margin: 18px 0; }
.sv-fig svg { display: block; width: 100%; height: auto; max-height: 440px; background: #fff; border: 1px solid var(--pc-line); border-radius: 12px; }
.sv-fig figcaption { margin-top: 6px; font-size: 14px; color: var(--pc-muted); }
.sv-fig text { font-family: inherit; }

/* Tables of data. */
.mx-svt .sv-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.mx-svt .sv-wrap { overflow-x: auto; }
.mx-svt .sv-table th, .mx-svt .sv-table td { padding: 8px 10px; border: 1px solid var(--pc-line); text-align: left; vertical-align: top; }
.mx-svt .sv-table th { background: #f3f7fa; }

/* Realistic SVT lesson figures */
.pc-fig--photo { margin: 1.25rem 0; padding: 0; border-radius: 14px; overflow: hidden; background: var(--pc-surface, #fff); border: 1px solid var(--pc-border, rgba(15,23,42,.1)); box-shadow: 0 8px 24px rgba(15,23,42,.08); }
.pc-fig--photo img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: cover; }
.pc-fig--photo figcaption { padding: .75rem 1rem; font-size: .92rem; line-height: 1.45; color: var(--pc-muted, #475569); border-top: 1px solid var(--pc-border, rgba(15,23,42,.08)); }

/* SVT curve legends, interactive highlights, and Presentation Mode scaling */
.sv-legend { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; margin: .5rem 0 .25rem; font-size: .88rem; color: var(--pc-muted, #475569); }
.sv-legend__item { display: inline-flex; align-items: center; gap: .4rem; }
.sv-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sv-dot--p { background: #0ea5e9; }
.sv-dot--t { background: #ef4444; border-radius: 50%; }
.sv-dot--dry { background: rgba(245, 158, 11, .35); border: 1px solid #f59e0b; }
.sv-bar.is-sel { stroke: #0f172a; stroke-width: 2; filter: brightness(1.1); }
.pc-show .mx-widget { max-width: 920px; margin-inline: auto; }
