/* Schemes (zv-*) and trainers (zt-*) for zno.if.ua grammar articles. Palette follows quiz.css / the avani theme. */

/* ---------- table of contents ---------- */
.zno-toc { margin: 1.4em 0 1.6em; padding: .9em 1.1em .7em; border-left: 4px solid #0067ac; background: #f6f9fc; border-radius: 0 8px 8px 0; }
.zno-toc__title { margin: 0 0 .4em; font-weight: 700; color: #004d80; }
.zno-toc ol { margin: 0; padding-left: 1.3em; }
.zno-toc li { margin: .15em 0; }
.zno-toc a { color: #0067ac; text-decoration: none; }
.zno-toc a:hover { text-decoration: underline; }
.entry-content h2[id] { scroll-margin-top: 90px; }

/* ---------- scheme base ---------- */
.zv-wrap { margin: 1.5em 0; }
.zv { margin: 0; padding: 1em; border: 1px solid #d6e3ee; border-radius: 10px; background: #f6f9fc; color: #222; line-height: 1.45; }
.zv + .zv { margin-top: 1em; }
.zv__title { margin: 0 0 .8em; font-weight: 700; color: #004d80; text-align: center; font-size: 1.05em; }
.zv__note { margin: .8em 0 0; font-size: .92em; color: #555; }
.zv__note:first-child { margin-top: 0; }
.zv b.hl, .zv .hl { color: #c0392b; font-weight: 700; }
.zv table { width: 100%; margin: 0; border-collapse: collapse; background: #fff; font-size: .95em; }
.zv th, .zv td { padding: .45em .6em; border: 1px solid #c9d6e2; vertical-align: top; text-align: left; }
.zv th { background: #eef5fb; color: #004d80; }
.zv-tags { display: flex; flex-wrap: wrap; gap: .35em; margin: 0; padding: 0; list-style: none; }
.zv-tags > li { margin: 0; padding: .15em .6em; border-radius: 999px; background: #fff; border: 1px solid #c9d6e2; font-size: .92em; }

/* decision diagram */
.zv-flow__start { width: fit-content; max-width: 100%; margin: 0 auto; padding: .55em 1.1em; border: 2px solid #0067ac; border-radius: 999px; background: #fff; font-weight: 700; color: #004d80; text-align: center; }
.zv-flow__paths { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5em, 1fr)); gap: .7em; margin: 1.6em 0 0; padding: 0; list-style: none; }
.zv-flow__paths::before { content: ""; position: absolute; left: 50%; top: -1.6em; height: 1.6em; border-left: 2px solid #0067ac; }
.zv-flow__path { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35em; margin: 0; padding: .7em .6em .8em; border: 1px solid #c9d6e2; border-radius: 8px; background: #fff; text-align: center; }
.zv-flow__if { font-size: .92em; color: #333; }
.zv-flow__then { display: inline-flex; align-items: center; justify-content: center; min-width: 2.4em; height: 2.4em; padding: 0 .5em; border-radius: 999px; background: #0067ac; color: #fff; font-weight: 700; font-size: 1.15em; }
.zv-flow__ex { font-size: .9em; color: #555; font-style: italic; }
.zv-flow__path--alt .zv-flow__then { background: #2e8540; }
.zv-flow__path--warn .zv-flow__then { background: #c25e00; }

/* formulas: г ж з + -ськ- → -зьк- */
.zv-formula__row { display: flex; flex-wrap: wrap; align-items: center; gap: .4em .5em; padding: .6em .7em; border: 1px solid #c9d6e2; border-radius: 8px; background: #fff; }
.zv-formula__row + .zv-formula__row { margin-top: .55em; }
.zv-k { display: inline-block; padding: .2em .55em; border-radius: 6px; background: #eef5fb; border: 1px solid #b9cfe2; font-weight: 700; color: #004d80; letter-spacing: .03em; }
.zv-k--suf { background: #e7f4ea; border-color: #a9d3b2; color: #1f6b30; }
.zv-k--res { background: #fff3e6; border-color: #f0c08a; color: #a14d00; }
.zv-op { font-weight: 700; color: #777; }
.zv-formula__ex { flex: 1 1 12em; font-size: .93em; color: #333; }
.zv-formula__ex i, .zv-formula__ex em { color: #555; }

/* word chains (словотвірний ланцюжок) */
.zv-chain__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: .3em .2em; padding: .9em .6em .6em; border: 1px solid #c9d6e2; border-radius: 8px; background: #fff; }
.zv-chain__row + .zv-chain__row { margin-top: .6em; }
.zv-chain__w { font-size: 1.25em; letter-spacing: .02em; }
.zv-chain__a { display: inline-flex; flex-direction: column; align-items: center; min-width: 3.2em; color: #0067ac; font-weight: 700; }
.zv-chain__a::after { content: "→"; font-size: 1.3em; line-height: 1; }
.zv-chain__a small { font-size: .72em; font-weight: 600; color: #2e8540; white-space: nowrap; }
.zv-chain__cap { flex-basis: 100%; margin: .3em 0 0; font-size: .9em; color: #555; text-align: center; }

/* morpheme marks: prefix ⌐, root ◠, suffix ∧, ending ▭, stem bracket */
.zm { display: inline-flex; align-items: flex-end; padding: .55em .05em .5em; line-height: 1.2; white-space: nowrap; }
.zm-b { display: inline-flex; align-items: flex-end; padding-bottom: .45em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpolyline points='1,0 1,9 99,9 99,0' fill='none' stroke='%23555' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") bottom / 100% .4em no-repeat; }
.zm-p, .zm-r, .zm-s, .zm-x { display: inline-block; padding: .5em .04em 0; background-repeat: no-repeat; background-position: top; background-size: 100% .5em; }
.zm-p { color: #6b3fa0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpolyline points='2,1 98,1 98,10' fill='none' stroke='%236b3fa0' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
.zm-r { color: #0067ac; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M2 10 Q50 -8 98 10' fill='none' stroke='%230067ac' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
.zm-s { color: #1f7a35; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpolyline points='4,10 50,1 96,10' fill='none' stroke='%231f7a35' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
.zm-x { color: #8a5a00; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpolyline points='2,10 2,1 98,1' fill='none' stroke='%238a5a00' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
.zm-e { display: inline-block; margin-left: 2px; padding: 0 .12em; border: 2px solid #c25e00; color: #a14d00; line-height: 1.05; }
.zm-e.zm-0 { min-width: .75em; min-height: 1.05em; padding: 0; }
.zv-legend { display: flex; flex-wrap: wrap; gap: .3em 1em; justify-content: center; margin: .8em 0 0; padding: 0; list-style: none; font-size: .9em; color: #444; }
.zv-legend li { margin: 0; display: inline-flex; align-items: flex-end; gap: .35em; }

/* timeline (часи дієслова): <div class="zv-timeline__track"> past zone, present zone (--now, with <i class="zv-timeline__now">зараз</i>), future zone */
.zv-timeline__track { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; align-items: stretch; padding-top: 2.1em; }
.zv-timeline__track::before { content: ""; position: absolute; left: 0; right: .6em; top: .95em; border-top: 3px solid #0067ac; }
.zv-timeline__track::after { content: ""; position: absolute; right: 0; top: .5em; border: .5em solid transparent; border-left: .75em solid #0067ac; border-right: 0; }
.zv-timeline__zone { position: relative; padding: .6em .55em; border: 1px solid #c9d6e2; border-radius: 8px; background: #fff; font-size: .93em; }
.zv-timeline__zone > b { display: block; color: #004d80; }
.zv-timeline__zone > span { display: block; margin: .15em 0 .4em; color: #555; font-size: .9em; }
.zv-timeline__zone ul { margin: 0; padding: 0; list-style: none; }
.zv-timeline__zone li { margin: .15em 0; font-style: italic; }
.zv-timeline__zone--now { border-color: #e2a29b; background: #fff8f7; }
.zv-timeline__now { position: absolute; left: 50%; top: -2.35em; transform: translateX(-50%); padding: .05em .5em; border-radius: 999px; background: #c0392b; color: #fff; font-size: .78em; font-style: normal; font-weight: 700; white-space: nowrap; }
.zv-timeline__zone--now::before { content: ""; position: absolute; left: 50%; top: -1.05em; width: .75em; height: .75em; margin-left: -.375em; border-radius: 50%; background: #c0392b; box-shadow: 0 0 0 3px #fff; }
@media (max-width: 560px) {
  .zv-timeline__track { grid-template-columns: 1fr; padding-top: 0; }
  .zv-timeline__track::before, .zv-timeline__track::after, .zv-timeline__zone--now::before { display: none; }
  .zv-timeline__now { position: static; transform: none; display: inline-block; margin-bottom: .3em; }
}

/* pronunciation: written → spoken */
.zv-say { display: grid; gap: .45em; }
.zv-say__row { display: grid; grid-template-columns: minmax(6em, 1fr) auto minmax(7em, 1fr) minmax(9em, 1.4fr); align-items: center; gap: .5em; padding: .5em .7em; border: 1px solid #c9d6e2; border-radius: 8px; background: #fff; }
.zv-say__w { font-size: 1.15em; }
.zv-say__arr { color: #0067ac; font-weight: 700; }
.zv-say__t { font-size: 1.1em; font-family: "Noto Sans", "Segoe UI", Arial, sans-serif; color: #004d80; }
.zv-say__r { font-size: .88em; color: #555; }
.zv-say b { color: #c0392b; }
@media (max-width: 560px) {
  .zv-say__row { grid-template-columns: auto auto 1fr; }
  .zv-say__r { grid-column: 1 / -1; }
}

/* letters ↔ sounds (фонетичний розбір); school colours: vowels red, hard consonants blue, soft green */
.zv-lsm { display: flex; flex-wrap: wrap; justify-content: center; gap: .35em; }
.zv-lsm__col { display: flex; flex-direction: column; align-items: center; gap: .3em; min-width: 2.2em; }
.zv-lsm__letter { font-size: 1.35em; font-weight: 700; color: #333; }
.zv-lsm__sound { display: inline-flex; gap: 2px; }
.zv-s { display: inline-flex; align-items: center; justify-content: center; min-width: 1.9em; height: 1.9em; padding: 0 .25em; border-radius: 5px; color: #fff; font-weight: 700; font-size: .95em; }
.zv-s--v { background: #c0392b; }
.zv-s--h { background: #1f5fa8; }
.zv-s--s { background: #2e8540; }
.zv-s--hs { background: linear-gradient(135deg, #1f5fa8 50%, #2e8540 50%); }
.zv-s--none { background: #fff; color: #999; border: 1px dashed #bbb; }
.zv-lsm + .zv__note { text-align: center; }

/* word passport (морфологічний розбір) */
.zv-passport__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4em .8em; margin-bottom: .7em; }
.zv-passport__word { font-size: 1.45em; font-weight: 700; color: #004d80; }
.zv-passport__pos { padding: .15em .7em; border-radius: 999px; background: #0067ac; color: #fff; font-size: .9em; font-weight: 700; }
.zv-passport__ctx { flex-basis: 100%; color: #555; font-size: .93em; font-style: italic; }
.zv-passport__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(13em, 1fr)); gap: .7em; }
.zv-passport__cols > div { padding: .6em .7em; border: 1px solid #c9d6e2; border-radius: 8px; background: #fff; }
.zv-passport__h { margin: 0 0 .45em; font-weight: 700; font-size: .92em; color: #004d80; text-transform: uppercase; letter-spacing: .03em; }
.zv-passport__cols .zv-passport__var .zv-passport__h { color: #a14d00; }
.zv-passport__var .zv-tags > li { border-color: #f0c08a; background: #fff8f0; }

/* numbered steps */
.zv-steps { counter-reset: zvstep; list-style: none; padding: 1em 1em .6em; }
.zv-steps > li { position: relative; margin: 0 0 .7em; padding: .1em 0 0 2.6em; min-height: 2em; }
.zv-steps > li::before { counter-increment: zvstep; content: counter(zvstep); position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; width: 1.85em; height: 1.85em; border-radius: 50%; background: #0067ac; color: #fff; font-weight: 700; font-size: .95em; }

/* right / wrong */
.zv-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(13em, 1fr)); gap: .7em; }
.zv-compare__col { padding: .6em .8em; border-radius: 8px; background: #fff; border: 1px solid #c9d6e2; }
.zv-compare__col ul { margin: 0; padding-left: 1.1em; }
.zv-compare__col li { margin: .2em 0; }
.zv-compare__h { margin: 0 0 .35em; font-weight: 700; }
.zv-compare__col--ok { border-color: #a9d3b2; }
.zv-compare__col--ok .zv-compare__h { color: #2e8540; }
.zv-compare__col--ok .zv-compare__h::before { content: "✓ "; }
.zv-compare__col--bad { border-color: #e7b3ad; }
.zv-compare__col--bad .zv-compare__h { color: #c0392b; }
.zv-compare__col--bad .zv-compare__h::before { content: "✗ "; }
.zv-compare__col--bad li { text-decoration: line-through; text-decoration-color: rgba(192, 57, 43, .55); }

/* cards grid */
.zv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12em, 1fr)); gap: .6em; margin: 0; padding: 0; list-style: none; }
.zv-grid > li, .zv-card { margin: 0; padding: .7em .8em; border: 1px solid #c9d6e2; border-radius: 8px; background: #fff; }
.zv-card__big { display: block; margin-bottom: .2em; font-size: 1.35em; font-weight: 700; color: #004d80; }
.zv-grid > li > b:first-child { color: #004d80; }

/* ---------- trainers ---------- */
.zt { margin: 1.6em 0; padding: 1.1em 1.1em .9em; border: 2px solid #0067ac; border-radius: 12px; background: #fff; color: #222; }
.zt__title { margin: 0 0 .25em; font-size: 1.15em; color: #004d80; }
.zt__title::before { content: "Тренажер"; display: inline-block; margin-right: .5em; padding: .1em .55em; border-radius: 999px; background: #0067ac; color: #fff; font-size: .7em; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: .15em; }
.zt__intro { margin: 0 0 .8em; color: #444; }
.zt__bar { display: none; }
.zt.is-interactive .zt__bar { display: block; margin: 0 0 .9em; }
.zt__progress { height: 6px; border-radius: 999px; background: #e3ecf4; overflow: hidden; }
.zt__progress span { display: block; width: 0; height: 100%; background: #2e8540; transition: width .3s ease; }
.zt__status { margin: .35em 0 0; font-size: .88em; color: #555; }
.zt__items { margin: 0; padding-left: 1.3em; }
.zt.is-interactive .zt__items { padding-left: 0; list-style: none; }
.zt__item { margin: 0 0 1.2em; }
.zt.is-interactive .zt__item { margin: 0; }
.zt__text { margin: 0 0 .7em; font-size: 1.12em; line-height: 1.5; }
.zt__gap { display: inline-block; min-width: 2.6em; padding: 0 .35em; border-bottom: 2px dashed #0067ac; color: #0067ac; text-align: center; font-weight: 700; }
.zt__gap.is-filled.is-right { border-bottom-style: solid; border-color: #2e8540; color: #2e8540; background: #e7f4ea; }
.zt__gap.is-filled.is-wrong { border-bottom-style: solid; border-color: #2e8540; color: #2e8540; background: #fff3e6; }
.zt__opts { display: flex; flex-wrap: wrap; gap: .5em; margin: 0 0 .5em; }
.zt__opt, .zt__chip, .zt__btn, .zt__check, .zt__bucket-btn {
  font: inherit; text-transform: none; letter-spacing: normal; line-height: 1.3; box-shadow: none; cursor: pointer;
}
.zt__opt { min-width: 3.2em; min-height: 44px; padding: .45em .9em; border: 2px solid #c9d6e2; border-radius: 8px; background: #fff; color: #222; font-size: 1.05em; font-weight: 600; }
.zt__opt:disabled { cursor: default; }
.zt .zt__opt:hover, .zt .zt__opt:focus { border-color: #c9d6e2; background-color: #fff; color: #222; outline: none; }
.zt.is-interactive .zt__item:not(.is-done) .zt__opt:hover,
.zt.is-interactive .zt__item:not(.is-done) .zt__opt:focus-visible { border-color: #e0a800; background-color: #fff3bf; color: #222; outline: none; }
.zt .zt__opt.is-correct, .zt .zt__opt.is-correct:hover, .zt .zt__opt.is-correct:focus { border-color: #2e8540; background-color: #e7f4ea; color: #1f6b30; }
.zt .zt__opt.is-chosen-wrong, .zt .zt__opt.is-chosen-wrong:hover, .zt .zt__opt.is-chosen-wrong:focus { border-color: #c0392b; background-color: #fbeceb; color: #a8322a; }
.zt__explain { margin: .2em 0 0; font-size: .97em; color: #333; }
.zt__explain summary { cursor: pointer; color: #0067ac; }
.zt__explain p { margin: .4em 0 0; padding: .55em .7em; border-radius: 6px; background: #f6f9fc; }
.zt.is-interactive .zt__item:not(.is-done) .zt__explain { display: none; }
.zt__item.is-right .zt__explain p { background: #e7f4ea; }
.zt__item.is-wrong .zt__explain p { background: #fff3e6; }
.zt__item.is-right .zt__explain summary::after { content: " — правильно ✓"; color: #2e8540; font-weight: 700; }
.zt__item.is-wrong .zt__explain summary::after { content: " — помилка"; color: #c0392b; font-weight: 700; }
.zt__nav { display: flex; justify-content: flex-end; margin-top: .6em; }
.zt__btn, .zt__check { display: inline-block; min-height: 44px; padding: .5em 1.1em; border: 2px solid #0067ac; border-radius: 8px; background: #0067ac; color: #fff; font-weight: 700; }
.zt .zt__btn:hover, .zt .zt__btn:focus, .zt .zt__check:hover, .zt .zt__check:focus { background-color: #004d80; border-color: #004d80; color: #fff; }
.zt__check:disabled { opacity: .45; cursor: default; }
.zt__done { margin-top: .9em; padding: .9em 1em; border-radius: 8px; background: #f6f9fc; border: 1px solid #d6e3ee; text-align: center; }
.zt__done p { margin: .2em 0; }
.zt__score { font-size: 1.2em; }

/* sort */
.zt__hint { margin: 0 0 .6em; font-size: .92em; color: #555; }
.zt__pool { display: flex; flex-wrap: wrap; gap: .45em; min-height: 2.4em; margin: 0 0 .7em; padding: .6em; border: 1px dashed #b9cfe2; border-radius: 8px; background: #f6f9fc; }
.zt__chip { min-height: 40px; padding: .35em .8em; border: 2px solid #b9cfe2; border-radius: 999px; background: #fff; color: #222; font-size: 1.02em; font-weight: 600; }
.zt__chip:disabled { cursor: default; }
.zt .zt__chip:hover, .zt .zt__chip:focus { border-color: #b9cfe2; background-color: #fff; color: #222; outline: none; }
.zt.is-interactive .zt__chip:hover, .zt.is-interactive .zt__chip:focus-visible { border-color: #e0a800; background-color: #fff3bf; color: #222; }
.zt .zt__chip.is-selected, .zt .zt__chip.is-selected:hover, .zt .zt__chip.is-selected:focus { border-color: #0067ac; background-color: #0067ac; color: #fff; transform: translateY(-2px); box-shadow: 0 3px 8px rgba(0, 77, 128, .25); }
.zt__chip.is-wrong { animation: zt-shake .4s; border-color: #c0392b; }
.zt__feedback { min-height: 1.4em; margin: 0 0 .6em; font-size: .97em; }
.zt__feedback.is-right { color: #1f6b30; }
.zt__feedback.is-wrong { color: #a8322a; }
.zt__buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5em, 1fr)); gap: .6em; }
.zt__bucket { display: flex; flex-direction: column; border: 2px solid #c9d6e2; border-radius: 10px; background: #fff; overflow: hidden; }
.zt__bucket-btn { display: flex; flex-direction: column; align-items: center; gap: .1em; width: 100%; min-height: 48px; padding: .5em; border: 0; border-bottom: 1px solid #d6e3ee; background: #eef5fb; color: #004d80; font-weight: 700; }
.zt__bucket-btn:disabled { cursor: default; }
.zt .zt__bucket-btn:hover, .zt .zt__bucket-btn:focus { background-color: #eef5fb; color: #004d80; outline: none; }
.zt .zt__bucket.is-target .zt__bucket-btn:hover, .zt .zt__bucket.is-target .zt__bucket-btn:focus-visible { background-color: #fff3bf; color: #004d80; }
.zt__bucket-hint { font-size: .8em; font-weight: 400; color: #555; }
.zt__bucket.is-target { border-color: #0067ac; }
.zt .zt__bucket.is-target .zt__bucket-btn { background-color: #dcebf7; }
.zt__bucket.is-shake { animation: zt-shake .4s; border-color: #c0392b; }
.zt__bucket-list { display: flex; flex-wrap: wrap; gap: .3em; min-height: 2.6em; margin: 0; padding: .5em; list-style: none; }
.zt__placed { margin: 0; padding: .15em .6em; border-radius: 999px; font-weight: 600; font-size: .95em; }
.zt__placed.is-right { background: #e7f4ea; color: #1f6b30; }
.zt__placed.is-wrong { background: #fff3e6; color: #a14d00; box-shadow: inset 0 0 0 1px #f0c08a; }
.zt--timeline .zt__buckets { position: relative; padding-top: 1.2em; }
.zt--timeline .zt__buckets::before { content: ""; position: absolute; left: 0; right: 0; top: .45em; border-top: 3px solid #0067ac; }
.zt--timeline .zt__buckets::after { content: "→"; position: absolute; right: -.1em; top: -.35em; color: #0067ac; font-size: 1.2em; font-weight: 700; }
.zt__key { margin-top: .8em; font-size: .93em; }
.zt__key summary { cursor: pointer; color: #0067ac; }
.zt__key table { margin-top: .4em; width: 100%; border-collapse: collapse; }
.zt__key td { padding: .3em .45em; border: 1px solid #d6e3ee; vertical-align: top; }
.zt.is-interactive .zt__key { display: none; }

/* order */
.zt__chain { display: flex; flex-wrap: wrap; align-items: center; gap: .35em; min-height: 2.6em; margin: 0 0 .6em; padding: .45em .6em; border: 2px solid #d6e3ee; border-radius: 8px; background: #fff; }
.zt:not(.is-interactive) .zt__chain { display: none; }
.zt__link { padding: .2em .65em; border-radius: 6px; background: #eef5fb; color: #004d80; font-weight: 700; font-size: 1.05em; }
.zt__arrow { color: #0067ac; font-weight: 700; }
.zt__item.is-right .zt__chain { border-color: #2e8540; }
.zt__item.is-wrong .zt__chain { border-color: #f0c08a; }

/* parse */
.zt__word { padding: 0 .25em; border-radius: 4px; background: #fff1a8; color: inherit; font-weight: 700; }
.zt__fields { display: grid; gap: .55em; margin: 0 0 .7em; }
.zt__field { display: grid; grid-template-columns: minmax(7.5em, 10em) 1fr; align-items: center; gap: .3em .6em; padding: .4em .5em; border-radius: 8px; background: #f6f9fc; }
.zt__label { font-weight: 700; font-size: .93em; color: #004d80; }
.zt__seg { display: flex; flex-wrap: wrap; gap: .3em; }
.zt__seg .zt__opt { min-width: 0; min-height: 40px; padding: .3em .7em; font-size: .95em; }
.zt .zt__seg .zt__opt[aria-pressed="true"], .zt.is-interactive .zt__item:not(.is-done) .zt__seg .zt__opt[aria-pressed="true"]:hover, .zt.is-interactive .zt__item:not(.is-done) .zt__seg .zt__opt[aria-pressed="true"]:focus { border-color: #0067ac; background-color: #0067ac; color: #fff; }
.zt__right { display: none; grid-column: 2; font-size: .9em; color: #1f6b30; }
.zt:not(.is-interactive) .zt__right { display: block; }
.zt:not(.is-interactive) .zt__right::before { content: "Відповідь: "; color: #555; }
.zt__field.is-right { background: #e7f4ea; }
.zt__field.is-wrong { background: #fbeceb; }
.zt__field.is-wrong .zt__right { display: block; }
.zt__field.is-wrong .zt__right::before { content: "Правильно: "; color: #555; }
.zt .zt__field.is-wrong .zt__opt[aria-pressed="true"], .zt .zt__field.is-wrong .zt__opt[aria-pressed="true"]:hover, .zt .zt__field.is-wrong .zt__opt[aria-pressed="true"]:focus { background-color: #c0392b; border-color: #c0392b; color: #fff; }
.zt .zt__field.is-right .zt__opt[aria-pressed="true"], .zt .zt__field.is-right .zt__opt[aria-pressed="true"]:hover, .zt .zt__field.is-right .zt__opt[aria-pressed="true"]:focus { background-color: #2e8540; border-color: #2e8540; color: #fff; }
@media (max-width: 520px) { .zt__field { grid-template-columns: 1fr; } .zt__right { grid-column: 1; } }

/* cards */
.zt__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5em, 1fr)); gap: .6em; margin: 0; padding: 0; list-style: none; }
.zt__cards > li { margin: 0; }
.zt__card { position: relative; display: block; width: 100%; min-height: 6.2em; padding: 0; border: 0; background: none; perspective: 700px; font: inherit; text-transform: none; letter-spacing: normal; box-shadow: none; cursor: pointer; }
.zt__face { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25em; min-height: 6.2em; padding: .5em; border: 2px solid #c9d6e2; border-radius: 10px; background: #fff; color: #222; font-size: 1.15em; font-weight: 600; text-align: center; line-height: 1.25; backface-visibility: hidden; transition: transform .45s ease; }
.zt__back { position: absolute; inset: 0; transform: rotateY(180deg); border-color: #0067ac; background: #eef5fb; color: #004d80; }
.zt__back small { font-size: .72em; font-weight: 400; color: #444; }
.zt .zt__card:hover, .zt .zt__card:focus { background: none; color: inherit; outline: none; }
.zt.is-interactive .zt__card:hover .zt__front, .zt.is-interactive .zt__card:focus-visible .zt__front { border-color: #e0a800; background-color: #fff3bf; }
.zt__card[aria-pressed="true"] .zt__front { transform: rotateY(180deg); }
.zt__card[aria-pressed="true"] .zt__back { transform: rotateY(360deg); }
.zt__front::after { content: "натисни"; font-size: .62em; font-weight: 400; color: #888; }
.zt:not(.is-interactive) .zt__back { position: static; transform: none; margin-top: .3em; }
.zt:not(.is-interactive) .zt__front::after { content: none; }
.zt--cards .zt__title::before { content: "Картки"; }

@keyframes zt-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) {
  .zt__face, .zt__progress span { transition: none; }
  .zt__chip.is-wrong, .zt__bucket.is-shake { animation: none; }
}
@media (max-width: 600px) {
  .zt { padding: .9em .75em .75em; margin-left: -.25em; margin-right: -.25em; }
  .zv { padding: .8em .65em; }
}

/* right / wrong cells in tables, source line */
.zv td.zv-bad { color: #a8322a; text-decoration: line-through; text-decoration-color: rgba(192, 57, 43, .5); }
.zv td.zv-ok { color: #1f6b30; font-weight: 600; }
.zno-source { margin-top: 2em; padding-top: .8em; border-top: 1px solid #e3ecf4; font-size: .88em; color: #666; }
/* the theme styles buttons with display:inline-block, which would override the hidden attribute */
.zt [hidden], .zt[hidden], .zv [hidden] { display: none !important; }
@media (max-width: 560px) {
  .zv-flow__paths { grid-template-columns: 1fr; gap: .45em; }
  .zv-flow__path { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "then if" "then ex"; align-items: center; gap: .1em .7em; padding: .55em .7em; text-align: left; }
  .zv-flow__then { grid-area: then; }
  .zv-flow__if { grid-area: if; }
  .zv-flow__ex { grid-area: ex; }
}
@media (max-width: 560px) {
  .zt__buckets { grid-template-columns: repeat(auto-fit, minmax(5.8em, 1fr)); gap: .4em; }
  .zt__bucket-btn { padding: .45em .3em; }
}

/* decision ladder: ordered checks, "ні ↓" between steps */
.zv-ladder__list { counter-reset: zvl; list-style: none; margin: 0; padding: 0; }
.zv-ladder__list > li { position: relative; display: grid; grid-template-columns: 1fr auto; gap: .15em .8em; align-items: center; margin: 0; padding: .6em .8em .6em 3em; border: 1px solid #c9d6e2; border-radius: 8px; background: #fff; }
.zv-ladder__list > li::before { counter-increment: zvl; content: counter(zvl); position: absolute; left: .75em; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 1.75em; height: 1.75em; border-radius: 50%; background: #004d80; color: #fff; font-weight: 700; font-size: .9em; }
.zv-ladder__list > li + li { margin-top: 1.7em; }
.zv-ladder__list > li + li::after { content: "ні ↓"; position: absolute; left: 1.05em; top: -1.5em; font-size: .8em; font-weight: 700; color: #777; }
.zv-ladder__q { grid-column: 1; font-weight: 600; }
.zv-ladder__ex { grid-column: 1; font-size: .9em; color: #555; }
.zv-ladder__ex i { color: #333; }
.zv-ladder__a { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; min-width: 2.6em; height: 2.6em; padding: 0 .55em; border-radius: 999px; background: #0067ac; color: #fff; font-weight: 700; font-size: 1.1em; white-space: nowrap; }
.zv-ladder__a--alt { background: #2e8540; }
.zv-ladder__a--warn { background: #c25e00; }
.zv-ladder__a--two { background: linear-gradient(90deg, #0067ac 50%, #2e8540 50%); }
.zv-ladder__list > li.zv-ladder__extra { margin-top: 1em; border-style: dashed; }
.zv-ladder__list > li.zv-ladder__extra::after { content: none; }
.zv-ladder__list > li.zv-ladder__extra::before { content: "!"; background: #c25e00; }

/* The theme fixes the table layout (equal columns); on these pages let columns follow their content. */
.entry-content table, .zv table { table-layout: auto; }
/* long words in narrow table cells: hyphenate (lang="uk") instead of overflowing the phone screen */
.entry-content td, .entry-content th, .zv td, .zv th { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.zv-wrap { max-width: 100%; overflow-x: auto; }
.zv-ladder__list > li.zv-ladder__extra::before { counter-increment: none; }
