/* കാലവും ക്രിയയും — Tenses & verbs lab (js/views/verbs.js). Uses Muttam's tokens from app.css. */
.verbs-home, .verbs-page {
  --vb-plum: #6D4C9F; --vb-plum-soft: #EFE8F8;
  --vb-past: var(--vb-plum); --vb-past-soft: var(--vb-plum-soft);
  --vb-pres: var(--teal); --vb-pres-soft: var(--teal-soft);
  --vb-fut: var(--gold-deep); --vb-fut-soft: var(--gold-soft);
  display: grid; gap: 18px; min-width: 0;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.verbs-home, .verbs-page) { --vb-plum: #C3A8F0; --vb-plum-soft: #2C2440; } }
:root[data-theme="dark"] :is(.verbs-home, .verbs-page) { --vb-plum: #C3A8F0; --vb-plum-soft: #2C2440; }
.verbs-home .ml, .verbs-page .ml { font-family: var(--f-ml); }
.vb-crumbs { margin: 0; }
.vb-block { min-width: 0; }
.vb-block .sec-title { margin-bottom: 12px; }
.vb-en { color: var(--ink-2); font: 500 .88rem/1.45 var(--f-ui); }
.vb-k { font: 700 .82rem/1.4 var(--f-ui); color: var(--ink-2); }
.vb-lede { color: var(--ink-2); margin: -6px 0 14px; }
.vb-src { display: flex; align-items: flex-start; gap: 6px; margin: 12px 0 0; font-size: .84rem; color: var(--ink-3); }
.vb-src .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.vb-src a { color: var(--teal); }
.vb-def { margin: 6px 0 0; line-height: 1.6; }
.vb-def .ml { font-size: 1rem; }
.vb-note { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--gold-soft); line-height: 1.6; }
.vb-note > .icon { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--gold-deep); }
.vb-gold { background: var(--gold-soft); color: var(--gold-deep); }

/* The ending: a soft highlight plus a thick underline so it never relies on colour alone */
mark.vb-mk { background: var(--gold-soft); color: inherit; border-bottom: 3px solid var(--marigold); border-radius: 4px; padding: 0 1px; }
mark.vb-time { background: var(--teal-soft); color: var(--teal-deep); border-radius: 6px; padding: 0 .25em; font-weight: 700; box-shadow: inset 0 -2px 0 var(--teal); }

/* Toggles and grade switch (own classes) */
.vb-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 48px; padding: 6px 14px; border-radius: var(--r-pill); border: 2px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 1rem var(--f-ui); cursor: pointer; }
.vb-toggle .icon { width: 18px; height: 18px; }
.vb-toggle[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.vb-toggle[aria-pressed="true"] .vb-en { color: inherit; }
.vb-toggle:focus-visible, .vb-mode:focus-visible, .vb-cell:focus-visible, .vb-form:focus-visible, .vb-say:focus-visible, .vb-pron-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.vb-grades { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; position: relative; }
.vb-grades-label { font-weight: 700; color: var(--ink-2); }
.vb-mine { color: var(--gold-deep); margin-left: 2px; }
.vb-toggle[aria-pressed="true"] .vb-mine { color: inherit; }

/* Home: practice cards */
.vb-modes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.vb-mode { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; height: 100%; padding: 14px 16px; border-radius: var(--r-lg); border: 2px solid var(--line); background: linear-gradient(135deg, var(--h1, var(--surface-2)), var(--surface) 70%); color: var(--ink); text-decoration: none; }
.vb-mode:hover { border-color: var(--h2, var(--teal)); }
.vb-mode > .icon { width: 20px; height: 20px; color: var(--hi, var(--teal)); }
.vb-mode-emoji { font-size: 2.2rem; line-height: 1; }
.vb-mode-text { display: grid; gap: 2px; min-width: 0; }
.vb-mode-text > .ml { font: 800 1.2rem/1.4 var(--f-display); color: var(--hi, var(--teal-deep)); }
.vb-mode-text > .en { font-weight: 700; color: var(--ink-2); font-size: .9rem; }
.vb-mode-about { font-size: .88rem; color: var(--ink-2); line-height: 1.45; }
.vb-mode .chip { justify-self: start; margin-top: 6px; }

.vb-tense-grid, .vb-place-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.vb-tense-card, .vb-place, .vb-paal { padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); border-top: 6px solid var(--vb-c, var(--line-2)); min-width: 0; }
.vb-tense-card.is-past { --vb-c: var(--vb-past); } .vb-tense-card.is-pres { --vb-c: var(--vb-pres); } .vb-tense-card.is-fut { --vb-c: var(--vb-fut); }
.vb-place.is-uttama { --vb-c: var(--red); } .vb-place.is-madhyama { --vb-c: var(--teal); } .vb-place.is-prathama { --vb-c: var(--leaf); }
.vb-tense-card h3, .vb-place h3, .vb-paal h4 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1.25rem; margin: 0; }
.vb-paal h4 { font-size: 1.12rem; }
.vb-tense-card h3 .ml, .vb-place h3 .ml, .vb-paal h4 .ml { color: var(--teal-deep); }
.vb-times { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; }
.vb-chip { min-height: 44px; padding: 0 .9em; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: 700 1rem/1 var(--f-ml); cursor: pointer; }
.vb-chip:hover { border-color: var(--teal); }
.vb-markers { margin: 10px 0 0; }
.vb-markers mark { font-size: 1.05rem; }
.vb-eqs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; font-size: 1.02rem; }
.vb-say { min-height: 44px; padding: 0 .35em; border: 0; border-radius: 10px; background: none; color: var(--teal-deep); font: 700 1.05rem/1.3 var(--f-ml); text-decoration: underline dotted var(--line-2); text-underline-offset: 4px; cursor: pointer; }
.vb-say:hover { background: var(--teal-soft); }
.vb-pron { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.vb-pron-btn { width: 100%; min-height: 64px; display: grid; gap: 1px; justify-items: start; text-align: left; padding: 8px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; }
.vb-pron-btn:hover { border-color: var(--teal); }
.vb-pron-btn .ml { font: 700 1.15rem/1.35 var(--f-display); color: var(--teal-deep); }
.vb-end { font: 700 .9rem/1.3 var(--f-ml); color: var(--leaf); }

/* One verb for everyone */
.vb-same { padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); display: grid; gap: 10px; min-width: 0; }
.vb-same p { margin: 0; }
.vb-same-ml { font-size: 1.08rem; font-weight: 700; line-height: 1.7; }
.vb-same-tbl { border-collapse: collapse; width: 100%; max-width: 520px; }
.vb-same-tbl th, .vb-same-tbl td { padding: 2px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.vb-same-tbl th .ml { font: 700 1.1rem var(--f-display); color: var(--teal-deep); }
.vb-same-ok { color: var(--leaf); width: 36px; }
.vb-same-ok .icon { width: 20px; height: 20px; }

/* Gender & number */
.vb-paals { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.vb-paal { --vb-c: var(--leaf); }
.vb-paal-ex { margin: 6px 0 0; }
.vb-pairs, .vb-plurals { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.vb-plurals { display: grid; gap: 4px; }
.vb-pairs li, .vb-plurals li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.vb-pairs li { padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); }

/* Verb table */
.vb-lab { display: grid; gap: 16px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.vb-table-wrap { display: grid; gap: 14px; min-width: 0; }
.vb-lab > *, .vb-book { min-width: 0; }
.vb-pickbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.vb-pick { display: grid; gap: 4px; flex: 1 1 240px; min-width: 0; }
.vb-select { width: 100%; min-height: 48px; padding: 0 12px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: 600 1.05rem var(--f-ml); }
.vb-pick-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.vb-pick-btns .btn { min-height: 44px; }
.vb-verb-card { padding: 16px 18px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--gold-soft), var(--surface) 70%); border: 1px solid var(--line); }
.vb-verb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.vb-verb { display: flex; align-items: center; gap: 10px; font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); margin: 0; }
.vb-verb .ml { color: var(--red); }
.vb-verb-en { font-weight: 700; color: var(--ink-2); margin: 0; }

.vb-three { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.vb-tcard { padding: 12px 14px; border-radius: var(--r-lg); background: var(--vb-cs, var(--surface)); border: 1px solid var(--line); border-top: 6px solid var(--vb-c, var(--line-2)); display: grid; gap: 6px; align-content: start; min-width: 0; }
.vb-tcard.is-past { --vb-c: var(--vb-past); --vb-cs: color-mix(in srgb, var(--vb-past-soft) 60%, var(--surface)); }
.vb-tcard.is-pres { --vb-c: var(--vb-pres); --vb-cs: color-mix(in srgb, var(--vb-pres-soft) 60%, var(--surface)); }
.vb-tcard.is-fut { --vb-c: var(--vb-fut); --vb-cs: color-mix(in srgb, var(--vb-fut-soft) 60%, var(--surface)); }
.vb-tcard p { margin: 0; }
.vb-tcard-h .ml { font: 800 1.1rem var(--f-display); }
.vb-tcard-ex .vb-say { font-size: .98rem; text-align: left; }
.vb-form { min-height: 48px; padding: 4px 10px; border: 2px solid transparent; border-radius: 12px; background: none; color: var(--ink); font: 700 1.25rem/1.5 var(--f-ml); cursor: pointer; text-align: left; overflow-wrap: anywhere; max-width: 100%; }
.vb-tcard .vb-form { font-size: 1.6rem; padding-left: 0; }
.vb-form:hover { border-color: var(--teal); background: var(--teal-soft); }
.vb-extra { padding: 12px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.vb-extra h3 { font-size: 1.1rem; margin: 0 0 6px; } .vb-extra h3 .ml { color: var(--teal-deep); }
.vb-extra-row { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: flex-start; }
.vb-lab-item { display: grid; gap: 0; min-width: 0; }
.vb-lab-item .vb-form { font-size: 1.12rem; padding-left: 0; }
.vb-alts { display: flex; flex-wrap: wrap; gap: 0 10px; }

.vb-persons { padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; min-width: 0; }
.vb-persons-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.vb-persons-head h3 { margin: 0; font-size: 1.15rem; }
.vb-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.vb-seg .vb-toggle { font-size: .9rem; padding: 4px 12px; }
.vb-tbl-scroll { max-width: 100%; overflow-x: auto; }
.vb-tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.vb-tbl th, .vb-tbl td { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.vb-tbl thead th { padding: 8px 10px; background: var(--surface-2); font-size: 1rem; }
.vb-tbl thead th .vb-en, .vb-tbl tbody th .vb-en { display: block; font-size: .78rem; }
.vb-tbl tbody th { padding-left: 12px; white-space: nowrap; }
.vb-tbl tbody th .ml { font: 700 1.1rem/1.3 var(--f-display); color: var(--teal-deep); }
.vb-tbl tr:last-child td, .vb-tbl tr:last-child th { border-bottom: 0; }
.vb-cell { width: 100%; min-height: 48px; display: grid; justify-items: start; align-content: center; padding: 6px 8px; border: 2px solid transparent; border-radius: 12px; background: none; color: var(--ink); font: 700 1.15rem/1.4 var(--f-ml); cursor: pointer; text-align: left; }
.vb-cell:hover { border-color: var(--teal); background: var(--teal-soft); }
.vb-cell-form { overflow-wrap: anywhere; }

.vb-book { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); padding: 4px 16px 12px; }
.vb-book summary { display: flex; align-items: center; gap: 8px; min-height: 48px; font-weight: 700; cursor: pointer; }
.vb-book summary .ml { color: var(--teal-deep); }
.vb-classes { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 480px; }
.vb-classes th, .vb-classes td { padding: 6px 10px; border: 1px solid var(--line); text-align: left; vertical-align: middle; }
.vb-classes thead th { background: var(--surface-2); }
.vb-classes tbody th { font: 700 1.1rem var(--f-ml); white-space: nowrap; }
.vb-classes .vb-say { min-height: 36px; font-size: 1rem; }
.vb-classes tr.is-this { background: var(--gold-soft); outline: 3px solid var(--marigold); outline-offset: -3px; }
.vb-classes tr.is-this th::after { content: ' ◀'; color: var(--gold-deep); }
.vb-notes { margin: 12px 0; padding-left: 1.2em; display: grid; gap: 8px; line-height: 1.6; }

/* Drills */
.vb-drill { display: grid; gap: 14px; min-width: 0; }
.vb-drill-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.vb-q { display: grid; gap: 14px; min-width: 0; }
.vb-ask { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); min-width: 0; }
.vb-ask .quiz-ml { font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem); }
.vb-ask .quiz-ml .vb-en { font-size: .95rem; font-weight: 600; }
.vb-sentence { margin: 0; font-size: 1.3rem; font-weight: 600; line-height: 1.9; overflow-wrap: anywhere; }
.vb-big { margin: 0; font: 800 2rem/1.4 var(--f-display); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vb-target { color: var(--red); border-bottom: 3px solid var(--marigold); }
.vb-subj { padding: 0 .25em; border-radius: 6px; background: var(--teal-soft); color: var(--teal-deep); font-weight: 700; }
.vb-subj.is-new { background: var(--gold-soft); color: var(--gold-deep); box-shadow: inset 0 -2px 0 var(--marigold); }
.vb-blank { display: inline-block; min-width: 4.5em; border-bottom: 3px dashed var(--ink-3); color: transparent; }
.vb-arrow { margin: 0; color: var(--ink-2); font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.vb-root { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vb-opts.is-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.vb-opts .quiz-opt-ml { overflow-wrap: anywhere; }
.vb-type { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.vb-type-label { flex-basis: 100%; font-weight: 700; }
.vb-input { flex: 1 1 220px; min-height: 52px; padding: 8px 12px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--surface); color: var(--ink); font: 700 1.25rem var(--f-ml); }
.vb-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.vb-input.is-right { border-color: var(--leaf); background: var(--leaf-soft); }
.vb-input.is-wrong { border-color: var(--red); background: var(--red-soft); }
.vb-type > .vb-en { flex-basis: 100%; margin: 0; }
.feedback.vb-fb { display: grid; gap: 6px; justify-items: start; text-align: left; }
.feedback.vb-fb:empty { display: none; }
.vb-fb-head { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-weight: 700; }
.vb-why { display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); line-height: 1.6; font-weight: 500; }
.vb-why p { margin: 0; }
.vb-full { margin: 0; font-size: 1.15rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vb-next { justify-self: start; }
.vb-other { display: flex; flex-wrap: wrap; gap: 8px; }

:root[data-contrast="high"] :is(.vb-toggle, .vb-mode, .vb-tcard, .vb-pron-btn) { border-color: var(--ink-2); }
@media (max-width: 520px) {
  .vb-sentence { font-size: 1.15rem; }
  .vb-tcard .vb-form { font-size: 1.35rem; }
  .vb-mode { grid-template-columns: auto 1fr; }
  .vb-mode > .icon { display: none; }
}
