/* assets/translate.css — Translate (/translate). Its own design: THE SQUARED SCHOOL EXERCISE BOOK ("katakli daftar"):
   a blue squared page with a red margin line, the student writes in blue ballpoint ink, the teacher marks it with a red
   pen — a circled grade (5 · 4 · 3 · 2), the fixes written above the words, a short handwritten note.
   22 Nov 2026 — the owner's picks from the design canvas: 1B Today's page · 2A Notebook tabs · 3A Grid page · 4A Red pen
   on the page + the four bars of 4C · 5B Building blocks on 5A's squared paper · 6C Teacher note · 7A Report card;
   and the challenge room (a link for a group, a live ranking, a podium).
   ROWS (owner: "make the rows of the paper be adjusted to texts rows"): --row is the size of one square AND the height of
   one line of text on the paper. Everything on the paper is a whole number of rows tall (line-height, margins, the answer
   box), and borders are drawn with box-shadow (which takes no space), so every line of writing sits on a line of the paper.
   To make the squares bigger or smaller, change --row (and the phone's value at the bottom). Night mode: html.dark. */
/* The handwriting (Caveat Bold, SIL Open Font License 1.1): assets/hh-hand.css has only the small letters; these two
   small files (12 KB + 2 KB, loaded only when a capital, digit or punctuation mark is drawn by hand) add capitals, digits
   and punctuation, so "Today · 23 November" and the circled grades are all in the same hand. */
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/caveat-tr-caps.woff2) format('woff2');
             unicode-range: U+0021-0060, U+007B-007E, U+00B7, U+2014, U+2018-201D, U+2026; }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/caveat-tr-caps-ext.woff2) format('woff2');
             unicode-range: U+00C7, U+00D6, U+00DC, U+011E, U+015E, U+0130; }
.tr { --page: #EEF2F8; --paper: #fff; --grid: rgba(66, 116, 204, .16); --ink: #1B2336; --mute: #566078; --line: #D6DEEA;
      --pen: #2246B6; --red: #C42433; --margin: #EC8C8C; --ok: #0F7F55; --okbg: #E2F4EC; --amb: #8A5800; --ambbg: #FFF3D9;
      --green: #1E6B3A; --greenbg: #E3F1E8; --gold: #FFD54A; --sticky: #FFF2A8; --stickyink: #5A4300; --q: #F6F1E4;
      --g-topic: #2246B6; --g-grammar: #0F7F55; --g-vocab: #B76A00; --g-task2: #1E6B3A;
      --r-topic: #2246B6; --r-explain: #7A4BC2; --r-example: #8A5800; --r-result: #1E6B3A;
      --row: 32px; --hand: Caveat, "Segoe Print", "Comic Sans MS", cursive;
      max-width: 1100px; margin: 0 auto; padding: 22px 18px 90px; color: var(--ink); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
html.dark .tr { --page: #0E131E; --paper: #151C2B; --grid: rgba(140, 170, 235, .11); --ink: #E7ECF6; --mute: #9EA8BE; --line: #27314A;
      --pen: #93ABFF; --red: #FF7482; --margin: #7E3843; --ok: #45D6A5; --okbg: #12352B; --amb: #F2B54B; --ambbg: #3A2D12;
      --green: #6FD49A; --greenbg: #143224; --sticky: #4A4220; --stickyink: #FFE9A0; --q: #2A2618;
      --g-topic: #93ABFF; --g-grammar: #45D6A5; --g-vocab: #F2B54B; --g-task2: #6FD49A;
      --r-topic: #93ABFF; --r-explain: #C3A5F5; --r-example: #F2B54B; --r-result: #6FD49A; }
body.cp-body:has(.tr) { background: var(--tr-page, #EEF2F8); }
html.dark body.cp-body:has(.tr) { --tr-page: #0E131E; }
.tr h1, .tr h2 { margin: 0; font-weight: 800; letter-spacing: -.02em; }
.tr a { color: inherit; }
.tr button { font: inherit; color: inherit; cursor: pointer; }
.tr button:focus-visible, .tr a:focus-visible, .tr textarea:focus-visible, .tr select:focus-visible, .tr input:focus-visible + i, .tr input[type="radio"]:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }
.tr [hidden] { display: none !important; }
.tr .ic { flex: none; }
.tr-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tr-hand { font-family: var(--hand); font-weight: 700; color: var(--red); margin: 0; }
.tr-hand.tr-pen { color: var(--pen); }

/* ── BUTTONS ── */
.tr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 0;
          background: var(--pen); color: #fff !important; font-weight: 700; font-size: 16px; text-decoration: none; line-height: 1.2; }
html.dark .tr-btn { color: #0E131E !important; }
.tr-btn.ghost { background: var(--paper); color: var(--ink) !important; box-shadow: inset 0 0 0 1.5px var(--line); }
.tr-btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.tr-btn.wait { opacity: .7; cursor: progress; }
.tr-btn:disabled { opacity: .6; }
.tr-btn kbd { font: 500 11px/1 Inter, sans-serif; opacity: .7; }
.tr-wide { width: 100%; }
.tr-link { border: 0; background: none; padding: 0 6px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }

/* ── THE SQUARED PAPER: the squares are --row big; the red margin line on the left ── */
.tr-paper { position: relative; border-radius: 6px; padding: var(--row) 20px var(--row) 70px;
            background-color: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
            background-size: var(--row) var(--row); background-position: 0 -1px;
            box-shadow: 0 1px 0 var(--line), 0 22px 46px -28px rgba(20, 40, 90, .45); }
.tr-paper::before { content: ''; position: absolute; left: 52px; top: 0; bottom: 0; width: 2px; background: var(--margin); }
.tr-paper p, .tr-paper ul, .tr-paper ol, .tr-paper h2 { margin: 0; }

/* ═══════════════ THE LIST: today's page (1B) and the notebook tabs (2A) ═══════════════ */
.tr-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tr-top h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1; }
.tr-flame { display: inline-flex; align-items: center; gap: 5px; font-size: 15px; font-weight: 800; color: var(--mute); }
.tr-flame.on { color: var(--red); }
.tr-lede { margin: 8px 0 22px; font-size: 17px; line-height: 1.5; color: var(--mute); max-width: 52ch; }
.tr-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.tr-col { display: grid; gap: 18px; min-width: 0; }
.tr-today { display: grid; gap: 12px; }
.tr-today-p { line-height: var(--row); }
.tr-today-p h2 { font-size: 28px; line-height: var(--row); font-weight: 700; letter-spacing: 0; }
.tr-todo { list-style: none; padding: 0; }
.tr-todo li { display: flex; align-items: center; gap: 10px; min-height: var(--row); font-size: 16px; line-height: var(--row); }
.tr-todo a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 4px; }
.tr-todo .tr-box { width: 20px; height: 20px; flex: none; border-radius: 5px; box-shadow: inset 0 0 0 2px var(--mute); display: grid; place-items: center; color: #fff; }
.tr-todo li.done .tr-box { background: var(--ok); box-shadow: none; }
.tr-todo li.done > span:not(.tr-box) { color: var(--mute); text-decoration: line-through; text-decoration-color: var(--ok); }
.tr-today-n { font-size: 24px; line-height: var(--row); }
.tr-mini { margin: 0; font-size: 14px; color: var(--mute); }
.tr-mini b { color: var(--ink); }
.tr-mini a { color: var(--pen); font-weight: 600; }

.tr-chs { background: var(--paper); border-radius: 14px; padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 10px; }
.tr-chs-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tr-chs-h h2 { font-size: 18px; display: inline-flex; align-items: center; gap: 8px; }
.tr-chs-h h2 .ic { color: var(--amb); }
.tr-chs-e { margin: 0; font-size: 14px; color: var(--mute); line-height: 1.5; }
.tr-chs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tr-chs-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 12px; border-radius: 10px; text-decoration: none; background: var(--ambbg); }
.tr-chs-list li.ended a { background: var(--page); }
.tr-chs-list b { font-size: 15px; }
.tr-chs-list span { grid-column: 1; font-size: 13px; color: var(--mute); }
.tr-chs-list em { grid-row: 1 / 3; grid-column: 2; font-style: normal; font-weight: 800; font-size: 14px; color: var(--pen); }

.tr-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tr-tabs::-webkit-scrollbar { display: none; }
.tr-tabs button { flex: none; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--paper); font-weight: 700; font-size: 14px; white-space: nowrap; }
.tr-tabs button[aria-selected="true"] { background: var(--pen); box-shadow: none; color: #fff; }
html.dark .tr-tabs button[aria-selected="true"] { color: #0E131E; }
.tr-tabnote { margin: -8px 0 0; font-size: 14px; color: var(--mute); }
.tr-filters { display: grid; gap: 6px; }
.tr-f { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-f button { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 0; background: transparent; font-size: 13px; font-weight: 600; color: var(--mute); }
.tr-f button.on { background: var(--ink); color: var(--paper); }
.tr-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.tr-card { position: relative; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line), inset 4px 0 0 var(--g); --g: var(--g-topic); }
.tr-card[data-grp="grammar"] { --g: var(--g-grammar); } .tr-card[data-grp="vocab"] { --g: var(--g-vocab); } .tr-card[data-grp="task2"] { --g: var(--g-task2); }
.tr-card:hover { box-shadow: inset 0 0 0 1.5px var(--g), inset 4px 0 0 var(--g); }
.tr-card-a { display: grid; gap: 6px; padding: 12px 14px 12px 18px; text-decoration: none; }
.tr a.tr-card-a, .tr a.tr-card-a:hover { color: var(--ink); }
.tr-card-t { font-size: 16px; line-height: 1.3; padding-right: 70px; }
.tr-card-m { font-size: 13px; color: var(--mute); }
.tr-card-bar { height: 6px; border-radius: 3px; background: var(--page); overflow: hidden; display: block; }
.tr-card-bar i { display: block; height: 100%; border-radius: 3px; background: var(--ok); }
.tr-card-f { font-size: 13px; color: var(--mute); }
.tr-card-f .ok { color: var(--ok); }
.tr-card-hw { font-style: normal; color: #fff; background: var(--red); padding: 1px 7px; border-radius: 999px; font-size: 11px; margin-left: 4px; }
.tr-card-tm { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
              box-shadow: inset 0 0 0 1.5px var(--red); color: var(--red) !important; text-decoration: none; background: var(--paper); }
.tr-card-tm:hover { background: var(--red); color: #fff !important; }
.tr-none { grid-column: 1 / -1; color: var(--mute); }

.tr-board { background: var(--paper); border-radius: 14px; padding: 16px; box-shadow: inset 0 0 0 1px var(--line); position: sticky; top: 84px; }
.tr-board h2 { font-size: 18px; margin-bottom: 10px; }
.tr-board ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tr-board li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; font-size: 14px; }
.tr-board li.me { background: var(--okbg); }
.tr-board .r { width: 22px; font-weight: 800; color: var(--mute); text-align: center; }
.tr-board li:nth-child(-n+3) .r { color: var(--red); }
.tr-board .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-board b { color: var(--pen); }
.tr-board-e, .tr-board-k, .tr-board-me { font-size: 13px; color: var(--mute); margin: 10px 0 0; line-height: 1.45; }
.tr-board-me { color: var(--ink); font-weight: 700; }

/* ═══════════════ ONE SET: the squared page (3A) ═══════════════ */
.tr-play, .tr-ch { max-width: 780px; }
.tr-bar { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; font-size: 14px; }
.tr-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 700; color: var(--mute) !important; text-decoration: none; }
.tr-bar-ch { color: var(--pen) !important; }
.tr-pos { margin-left: auto; font-weight: 800; font-size: 15px; }
.tr-ph { margin: 8px 0 12px; }
.tr-ph h1 { font-size: clamp(24px, 4.4vw, 34px); line-height: 1.15; }
.tr-ph p { margin: 6px 0 0; color: var(--mute); font-size: 14px; }
.tr-tm-tag { color: var(--red); }
.tr-draft { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--amb); background: var(--ambbg); padding: 4px 10px; border-radius: 8px; }
/* the progress line: one piece per item */
.tr-dots { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; }
.tr-dots li { flex: 1; min-width: 0; }
.tr-dots button, .tr-dots span { display: block; width: 100%; padding: 8px 0; border: 0; background: none; }
.tr-dots i { display: block; height: 7px; border-radius: 4px; background: var(--line); }
.tr-dots .mid i { background: var(--gold); } .tr-dots .ok i { background: var(--ok); } .tr-dots .now i { background: var(--pen); }
.tr-hw { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--ambbg); font-size: 15px; }
.tr-q { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--q); color: var(--ink); }
.tr-q summary { cursor: pointer; font-weight: 700; font-size: 14px; min-height: 28px; }
.tr-q p { margin: 6px 0 2px; font-size: 15px; line-height: 1.5; }

/* the exercise on the paper: every line one --row tall */
.tr-sheet { display: block; line-height: var(--row); }
.tr-lab { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; min-height: var(--row); font-size: 13px; font-weight: 700; color: var(--mute); line-height: var(--row); }
.tr-lab small { margin-left: auto; font-weight: 500; }
.tr-role { color: #fff; background: var(--r, var(--green)); padding: 0 9px; border-radius: 999px; font-size: 12px; line-height: 22px; }
.tr-role[data-role="topic"], .tr-role[data-role="paraphrase"], .tr-role[data-role="thesis"] { --r: var(--r-topic); }
.tr-role[data-role="explain"] { --r: var(--r-explain); } .tr-role[data-role="example"] { --r: var(--r-example); } .tr-role[data-role="result"], .tr-role[data-role="sum"], .tr-role[data-role="rec"] { --r: var(--r-result); }
html.dark .tr-role { color: #0E131E; }
.tr-fromset { font-weight: 500; }
.tr-sw { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; font-weight: 600; cursor: pointer; min-height: var(--row); }
.tr-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tr-sw i { width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.tr-sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); transition: transform .15s; }
.tr-sw input:checked + i { background: var(--pen); }
.tr-sw input:checked + i::after { transform: translateX(14px); }
.tr-clock { display: inline-flex; align-items: center; gap: 5px; font: 800 15px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); padding: 4px 9px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--paper); }
.tr-clock.low { color: #fff; background: var(--red); box-shadow: none; }
.tr-text { font-size: 20px; line-height: var(--row); font-weight: 600; white-space: pre-line; }
/* the "Use:" target: one row tall (two rows when the target is long), so the lines below stay on the paper's lines */
.tr-use { display: inline-block; max-width: 100%; box-sizing: border-box; margin: 0 !important; padding: 0 10px; border-radius: 8px; font-size: 14px; line-height: var(--row); color: var(--green); background: var(--greenbg); box-shadow: inset 0 0 0 1.5px var(--green); }
.tr-use .ic { vertical-align: -3px; margin-right: 4px; }
.tr-hintlist { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 6px; }
.tr-hintlist li { font-size: 14px; line-height: 24px; margin: 4px 0; background: var(--ambbg); padding: 0 9px; border-radius: 7px; }
.tr-hintlist b { color: var(--amb); margin-right: 4px; }
/* the answer: blue ink written on the paper's lines (the box grows a whole row at a time — assets/translate.js TRKit.fit) */
.tr-sheet textarea { display: block; width: 100%; box-sizing: border-box; height: calc(var(--row) * 3); min-height: calc(var(--row) * 3); resize: none; overflow: hidden;
                     margin: 0; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line);
                     color: var(--pen); font: 500 18px/var(--row) Inter, system-ui, sans-serif; caret-color: var(--pen); }
.tr-sheet textarea:focus { box-shadow: inset 0 0 0 2px var(--pen); outline: none; }
.tr-sheet textarea.done { box-shadow: none; }
.tr-sheet textarea::placeholder { color: var(--mute); opacity: .7; }
.tr-play[data-len="para"] .tr-sheet textarea, .tr-play[data-len="short"] .tr-sheet textarea, .tr-ch[data-len="para"] .tr-sheet textarea { height: calc(var(--row) * 7); min-height: calc(var(--row) * 7); }

/* the teacher's red pen (4A): the circled grade, the fixes above the words, the note, the mistakes, the four bars (4C) */
.tr-mark { margin-top: var(--row); }
.tr-mk-h { display: flex; align-items: center; gap: 14px; height: calc(var(--row) * 2); }
.tr-grade { width: 54px; height: 54px; flex: none; border-radius: 50%; display: grid; place-items: center; transform: rotate(-9deg); color: var(--red); box-shadow: inset 0 0 0 3px var(--red); animation: trPen .45s ease-out both; }
.tr-grade b { font: 700 36px/1 var(--hand); }
.tr-grade.g5, .tr-grade.g4 { --red: var(--ok); }
.tr-mk-t { display: flex; flex-direction: column; line-height: 1.1; }
.tr-verdict { font: 700 30px/1 var(--hand); color: var(--red); }
.tr-grade.g5 + .tr-mk-t .tr-verdict, .tr-grade.g4 + .tr-mk-t .tr-verdict { color: var(--ok); }
.tr-score { font-size: 13px; color: var(--mute); margin-top: 4px; }
.tr-mine { font-size: 18px; line-height: var(--row); color: var(--pen); }
.tr-mine .fix { white-space: nowrap; }
.tr-mine .fix s { text-decoration-color: var(--red); text-decoration-thickness: 2px; color: var(--mute); }
/* design 4A: the fix written by hand right after the crossed-out words */
.tr-mine .fix ins { margin-left: 4px; text-decoration: none; color: var(--red); font: 700 22px/1 var(--hand); }
.tr-note { font: 700 24px/var(--row) var(--hand); color: var(--red); }
.tr-errs { list-style: none; padding: 0; }
.tr-errs li { font-size: 15px; line-height: var(--row); }
.tr-errs s { color: var(--mute); text-decoration-color: var(--red); }
.tr-errs b { color: var(--red); }
.tr-errs span { color: var(--mute); font-size: 14px; }
.tr-type { font-style: normal; font-size: 12px; font-weight: 700; color: var(--mute); background: var(--page); padding: 2px 8px; border-radius: 999px; }
.tr-meters { margin-top: var(--row); }
.tr-meter { display: grid; grid-template-columns: 150px minmax(0, 1fr) 46px; align-items: center; gap: 12px; height: var(--row); font-size: 14px; }
.tr-meter span { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-meter i { display: block; height: 8px; border-radius: 4px; background: var(--page); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.tr-meter u { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.tr-meter.mid u { background: #D99A1E; } .tr-meter.low u { background: var(--red); }
.tr-meter b { text-align: right; color: var(--mute); font-size: 13px; }
.tr-row { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 0 10px; font-size: 16px; line-height: var(--row); }
.tr-row span { font-size: 13px; font-weight: 700; color: var(--mute); }
.tr-row b { font-weight: 600; }
.tr-mark .tr-row:first-of-type, #tr-better { margin-top: var(--row); }
#tr-model b, #tr-rv-model { color: var(--ok); }
.tr-reveal { margin-top: var(--row); }
.tr-rv-k { font-size: 13px; color: var(--amb); }
@keyframes trPen { from { opacity: 0; transform: rotate(-30deg) scale(1.4); } to { opacity: 1; transform: rotate(-9deg) scale(1); } }

/* outside the paper: the Band 7 version, the points, the buttons */
.tr-b7 { margin-top: 14px; display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--green); }
.tr-b7 > span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--green); }
.tr-b7 > b { font-weight: 500; font-size: 17px; line-height: 1.55; }
.tr-b7 > small { font-size: 13px; color: var(--mute); }
.tr-b7 > small:empty { display: none; }
.tr-gain { margin: 10px 0 0; font-size: 15px; font-weight: 700; color: var(--pen); }
.tr-acts { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.tr-acts .tr-link { margin-right: auto; }
.tr-msg { margin: 8px 0 0; min-height: 1.2em; font-size: 14px; color: var(--mute); text-align: right; }
.tr-acts-k { margin: 2px 0 0; font-size: 12px; color: var(--mute); text-align: right; }

/* ═══════════════ BUILD A PARAGRAPH: blocks on the squared paper (5B on 5A) ═══════════════ */
.tr-grow { line-height: var(--row); }
.tr-grow h2 { font-size: 18px; line-height: var(--row); }
.tr-blocks { list-style: none; padding: 0; }
.tr-block { margin-top: var(--row); padding: 0 12px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--rc); --rc: var(--line); }
.tr-block .r { display: block; font-size: 12px; font-weight: 800; color: var(--rc); line-height: var(--row); }
.tr-block .t { display: block; font-size: 16px; line-height: var(--row); color: var(--pen); }
.tr-block .t.e { color: var(--mute); }
.tr-block.todo { box-shadow: none; background-image: linear-gradient(90deg, var(--line) 50%, transparent 50%), linear-gradient(90deg, var(--line) 50%, transparent 50%), linear-gradient(var(--line) 50%, transparent 50%), linear-gradient(var(--line) 50%, transparent 50%);
                 background-size: 10px 1.5px, 10px 1.5px, 1.5px 10px, 1.5px 10px; background-position: 0 0, 0 100%, 0 0, 100% 0; background-repeat: repeat-x, repeat-x, repeat-y, repeat-y; }
.tr-block[data-role="topic"], .tr-now[data-role="topic"] { --rc: var(--r-topic); } .tr-block[data-role="explain"], .tr-now[data-role="explain"] { --rc: var(--r-explain); }
.tr-block[data-role="example"], .tr-now[data-role="example"] { --rc: var(--r-example); } .tr-block[data-role="result"], .tr-now[data-role="result"] { --rc: var(--r-result); }
.tr-block[data-role="paraphrase"], .tr-block[data-role="thesis"], .tr-now[data-role="paraphrase"], .tr-now[data-role="thesis"] { --rc: var(--r-topic); }
.tr-block[data-role="sum"], .tr-block[data-role="rec"], .tr-now[data-role="sum"], .tr-now[data-role="rec"] { --rc: var(--r-result); }
.tr-block.todo .r { color: var(--mute); }
.tr-now { margin-top: var(--row); padding: 0 12px var(--row); border-radius: 8px; box-shadow: inset 0 0 0 2.5px var(--rc, var(--pen)); background: color-mix(in srgb, var(--paper) 70%, transparent); }
.tr-now .tr-b7, .tr-now .tr-acts, .tr-now .tr-msg, .tr-now .tr-acts-k, .tr-now .tr-gain { line-height: 1.4; }
.tr-grow > #tr-pcheck { margin-top: var(--row); }
/* the whole paragraph: the teacher's sticky note (6C) */
.tr-pdone { display: grid; gap: 14px; }
.tr .tr-pdone-p { padding-bottom: calc(var(--row) * 3); }   /* room for the circled grade under the last line */
.tr-pdone-t { font-size: 17px; line-height: var(--row); color: var(--pen); }
.tr-pdone-p .tr-grade { position: absolute; right: 18px; bottom: 16px; width: 60px; height: 60px; }
.tr-sticky { background: var(--sticky); padding: 14px 18px; transform: rotate(-1deg); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); display: grid; gap: 2px; }
.tr-sticky p { margin: 0; font: 700 23px/1.25 var(--hand); color: var(--stickyink); }
.tr-pdone-k { margin: 0; font-size: 13px; color: var(--mute); line-height: 1.5; }
.tr-pb7 { background: var(--paper); border-radius: 12px; padding: 10px 14px; box-shadow: inset 0 0 0 1.5px var(--green); }
.tr-pb7 summary { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 800; color: var(--green); min-height: 32px; }
.tr-pb7 p { margin: 6px 0 2px; font-size: 16px; line-height: 1.6; }

/* ═══════════════ THE REPORT CARD (7A) ═══════════════ */
.tr-end { text-align: center; display: grid; gap: 14px; justify-items: center; }
.tr-end-k { font-size: 40px; color: var(--pen); }
.tr-end h2 { font-size: 22px; }
.tr-report { width: 100%; box-sizing: border-box; }
.tr-report { position: relative; border-radius: 6px; padding: var(--row) 18px var(--row) 58px; background-color: var(--paper);
             background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: var(--row) var(--row);
             box-shadow: 0 1px 0 var(--line), 0 22px 46px -28px rgba(20, 40, 90, .45); }
.tr-report::before { content: ''; position: absolute; left: 42px; top: 0; bottom: 0; width: 2px; background: var(--margin); }
.tr-cards-g { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 10px; }
.tr-cards-g li { display: grid; justify-items: center; gap: 2px; }
.tr-cards-g small { font-size: 12px; color: var(--mute); }
.tr-grade.sm { width: 44px; height: 44px; } .tr-grade.sm b { font-size: 28px; }
.tr-grade.none { --red: var(--line); color: var(--mute); }
.tr-end-n { display: flex; justify-content: center; gap: 26px; width: 100%; }
.tr-end-n b { display: block; font-size: 26px; color: var(--pen); }
.tr-end-n div:first-child b { color: var(--ok); }
.tr-end-n small { color: var(--mute); font-size: 13px; }
.tr-end-b { display: grid; gap: 10px; width: 100%; max-width: 460px; }
.tr-rules { margin: 26px 0 0; font-size: 13px; color: var(--mute); line-height: 1.5; }

/* ═══════════════ CHALLENGES ═══════════════ */
.tr-ch-code { margin-left: auto; font-size: 14px; color: var(--mute); }
.tr-ch-code b { font: 800 16px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em; color: var(--ink); }
.tr-ch-head { margin: 6px 0 18px; display: grid; gap: 4px; }
.tr-ch-head .tr-hand { font-size: 34px; transform: rotate(-2deg); transform-origin: left; }
.tr-ch-head h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.12; }
.tr-ch-sub { margin: 2px 0 0; font-size: 15px; color: var(--mute); line-height: 1.5; }
.tr-ch-state { justify-self: start; margin: 8px 0 0; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; background: var(--okbg); color: var(--ok); }
.tr-ch-state[data-s="lobby"] { background: var(--ambbg); color: var(--amb); } .tr-ch-state[data-s="ended"] { background: var(--page); color: var(--mute); }
.tr-ch-share, .tr-ch-lobby, .tr-ch-board, .tr-ch-host, .tr-ch-none { background: var(--paper); border-radius: 14px; padding: 16px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 14px; }
.tr-ch-share h2, .tr-ch-board h2 { font-size: 18px; }
.tr-ch-share p { margin: 4px 0 12px; font-size: 14px; color: var(--mute); }
.tr-ch-link { display: flex; gap: 8px; flex-wrap: wrap; }
.tr-ch-link input { flex: 1 1 220px; min-width: 0; min-height: 48px; border-radius: 12px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); padding: 0 12px; font: 500 15px Inter, sans-serif; background: var(--page); color: var(--ink); }
.tr-ch-wait { margin: 0 0 10px; font-weight: 700; }
.tr-ch-players { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tr-ch-players li { padding: 6px 12px; border-radius: 999px; background: var(--page); font-size: 14px; font-weight: 600; animation: trIn .3s ease-out both; }
.tr-ch-players li.me { background: var(--okbg); color: var(--ok); }
.tr-ch-go { display: flex; gap: 10px; flex-wrap: wrap; }
.tr-ch-go .tr-btn { flex: 1 1 220px; min-height: 54px; font-size: 17px; }
.tr-ch-rules { margin: 12px 0 0; font-size: 13px; color: var(--mute); line-height: 1.5; }
.tr-ch-game { margin-bottom: 14px; }
.tr-ch-hud { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; font-weight: 800; }
.tr-ch-hud #trc-pos { color: var(--mute); font-size: 15px; }
.tr-ch-hud #trc-total { margin-left: auto; font-size: 30px; color: var(--pen); letter-spacing: -.02em; }
.tr-ch-hud #trc-total::after { content: ' points'; font-size: 13px; color: var(--mute); font-weight: 600; letter-spacing: 0; }
.tr-ch-rank { padding: 4px 10px; border-radius: 999px; background: var(--gold); color: #3A2A00; font-size: 14px; }
.tr-ch-burst { margin: 10px 0 0; text-align: center; font-weight: 800; font-size: 17px; color: var(--amb); }
.tr-ch-burst.pop { animation: trPop .5s ease-out both; }
.tr-ch-board ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.tr-ch-board li { display: grid; grid-template-columns: 32px minmax(0, 1fr) 70px 48px; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border-radius: 10px; font-size: 15px; }
.tr-ch-board li.me { background: var(--okbg); }
.tr-ch-board li.e { display: block; color: var(--mute); }
.tr-ch-board .r { font-weight: 800; color: var(--mute); text-align: center; font-size: 16px; }
.tr-ch-board .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tr-ch-board .n em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--mute); }
.tr-ch-board .d { height: 6px; border-radius: 3px; background: var(--page); overflow: hidden; }
.tr-ch-board .d i { display: block; height: 100%; background: var(--pen); }
.tr-ch-board b { text-align: right; color: var(--pen); font-size: 16px; }
.tr-ch-me { margin: 12px 0 0; font-weight: 700; font-size: 15px; }
.tr-ch-host { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tr-ch-host .tr-sw { margin-left: 0; }
.tr-ch-after { display: grid; gap: 10px; max-width: 460px; margin: 0 auto 14px; }
/* the final: the podium rises once (the one moment that moves on its own), then the best sentence */
.tr-ch-final { text-align: center; margin-bottom: 14px; }
.tr-ch-final .tr-hand { font-size: 38px; }
.tr-ch-final h2 { font-size: 22px; }
.tr-podium { list-style: none; margin: 18px 0 0; padding: 0; display: flex; justify-content: center; align-items: flex-end; gap: 8px; min-height: 230px; }
.tr-podium li { flex: 0 1 140px; display: grid; justify-items: center; gap: 2px; }
.tr-podium .m { font-size: 32px; line-height: 1; }
.tr-podium b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-podium small { font-size: 13px; color: var(--mute); }
.tr-podium i { display: grid; place-items: center; width: 100%; margin-top: 6px; border-radius: 10px 10px 0 0; font: 700 44px/1 var(--hand); font-style: normal; color: #fff;
               transform-origin: bottom; animation: trRise .7s cubic-bezier(.2, .8, .3, 1.15) both; animation-delay: calc(var(--d) * .35s); }
.tr-podium .p1 i { height: 130px; background: var(--ok); } .tr-podium .p2 i { height: 96px; background: var(--pen); } .tr-podium .p3 i { height: 70px; background: var(--amb); }
html.dark .tr-podium i { color: #0E131E; }
.tr-podium li.me b { color: var(--ok); }
.tr-podium li.e { flex-basis: auto; color: var(--mute); }
.tr-ch-best { margin: 18px auto 0; max-width: 560px; text-align: left; display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--green); }
.tr-ch-best span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--green); }
.tr-ch-best .src { margin: 0; font-size: 14px; color: var(--mute); }
.tr-ch-best b { font-size: 17px; font-weight: 500; line-height: 1.5; color: var(--pen); }
.tr-ch-best small { font-size: 13px; color: var(--mute); }
.tr-ch-none h1 { font-size: 24px; } .tr-ch-none p { color: var(--mute); }
@keyframes trRise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes trPop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes trIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* making a challenge */
.tr-chnew { max-width: 640px; }
.tr-form { display: grid; gap: 18px; background: var(--paper); border-radius: 14px; padding: 18px; box-shadow: inset 0 0 0 1px var(--line); }
.tr-fl { display: grid; gap: 6px; }
.tr-fl > span, .tr-fs legend { font-size: 14px; font-weight: 800; }
.tr-fl select { min-height: 48px; border-radius: 12px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); padding: 0 12px; font: 500 15px Inter, sans-serif; background: var(--page); color: var(--ink); max-width: 100%; }
.tr-fs { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tr-fs legend { margin-bottom: 6px; padding: 0; }
.tr-fs label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 15px; font-weight: 600; cursor: pointer; }
.tr-fs label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--pen); background: color-mix(in srgb, var(--pen) 8%, transparent); }
.tr-fs label small { color: var(--mute); font-weight: 500; }
.tr-fs input { accent-color: var(--pen); width: 18px; height: 18px; margin: 0; }
.tr-fs-col { flex-direction: column; }
.tr-fs-col label { align-items: flex-start; padding: 12px 14px; }
.tr-fs-col label span { display: grid; gap: 2px; font-weight: 500; font-size: 14px; color: var(--mute); line-height: 1.4; }
.tr-fs-col label b { font-size: 15px; color: var(--ink); }
.tr-fl-sw { margin-left: 0; font-size: 15px; }
.tr-fk { margin: -10px 0 0; font-size: 13px; color: var(--mute); }
.tr-form .tr-msg { text-align: left; }

@media (prefers-reduced-motion: reduce) { .tr-grade, .tr-podium i, .tr-ch-burst.pop, .tr-ch-players li { animation: none; } }

/* ── PHONE ── */
@media (max-width: 860px) {
  .tr-wrap { grid-template-columns: 1fr; }
  .tr-board { position: static; }
}
@media (max-width: 560px) {
  .tr { --row: 30px; padding: 14px 12px 90px; }
  .tr-paper { padding: var(--row) 12px var(--row) 44px; }
  .tr-paper::before { left: 32px; }
  .tr-lede { font-size: 15px; margin-bottom: 16px; }
  .tr-today-p h2 { font-size: 26px; }
  .tr-todo li { font-size: 15px; }
  .tr-shelf { grid-template-columns: 1fr; }
  .tr-f { flex-wrap: nowrap; overflow-x: auto; margin-right: -12px; padding-right: 12px; scrollbar-width: none; }
  .tr-f button { flex: none; }
  .tr-text { font-size: 18px; }
  .tr-sheet textarea { font-size: 17px; }
  .tr-mine { font-size: 17px; }
  .tr-row { grid-template-columns: 1fr; }
  .tr-meter { grid-template-columns: 132px minmax(0, 1fr) 38px; gap: 6px; font-size: 13px; }
  .tr-acts { position: sticky; bottom: 64px; z-index: 3; background: var(--paper); margin: 14px -12px 0; padding: 10px 12px; box-shadow: 0 -1px 0 var(--line); }
  .tr-acts .tr-btn { flex: 1; padding: 0 12px; }
  .tr-acts .tr-link { flex: none; }
  .tr-btn kbd { display: none; }
  .tr-msg, .tr-acts-k { text-align: left; }
  .tr-now { margin-left: -6px; margin-right: -6px; padding-left: 8px; padding-right: 8px; }
  .tr-now .tr-acts { position: static; margin: 14px 0 0; padding: 0; box-shadow: none; background: none; }
  .tr-end-n { gap: 14px; }
  .tr-ch-board li { grid-template-columns: 28px minmax(0, 1fr) 48px 42px; gap: 8px; }
  .tr-podium { gap: 6px; } .tr-podium .m { font-size: 26px; }
}

/* ── 23 Nov 2026 ("the perfect Translate"): the comparison with the model, read first, report a problem, the whole text,
   the level step-up, the daily goal, the race of the day, search and topics, the progress map, teams and the teacher view.
   Everything on the paper keeps the rows of the squares (line-height var(--row)). ── */
.tr-diff small { grid-column: 2; font-size: 12px; line-height: var(--row); color: var(--mute); }
.tr-diff mark { background: var(--ambbg); color: var(--amb); border-radius: 3px; padding: 0 2px; box-shadow: inset 0 -2px 0 var(--amb); }
.tr-read { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: var(--row) 0 0; line-height: var(--row); }
.tr-read p { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.tr-read p b { font-variant-numeric: tabular-nums; color: var(--pen); min-width: 4.5em; }
.tr-read p.low b { color: var(--red); }
.tr-para-k { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--greenbg); color: var(--green); font-size: 14px; font-weight: 600; }
.tr-rep { margin: 12px 0 0; font-size: 14px; color: var(--mute); }
.tr-rep summary { cursor: pointer; width: max-content; max-width: 100%; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; line-height: 32px; }
.tr-rep-f { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tr-rep-f select, .tr-rep-f input { min-height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; padding: 0 10px; }
.tr-rep-f input { flex: 1 1 220px; min-width: 0; }
.tr-rep-m { margin: 6px 0 0; font-weight: 600; color: var(--ink); }
.tr-step { margin: 0; max-width: 560px; text-align: center; font-size: 15px; line-height: 1.6; }
.tr-step a, .tr-gain a { color: var(--pen); font-weight: 700; }
.tr-whole { width: 100%; max-width: 900px; text-align: left; background: var(--paper); border-radius: 14px; padding: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.tr-whole h3 { margin: 0 0 10px; font-size: 18px; }
.tr-whole h4 { margin: 0 0 6px; font-size: 13px; color: var(--mute); text-transform: none; }
.tr-whole-g { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tr-whole p { margin: 0 0 10px; font-size: 15px; line-height: 1.6; }
.tr-whole p.e { color: var(--mute); font-style: italic; }
.tr-whole-m { margin-top: 12px !important; }
.tr-whole-mine p { color: var(--pen); }
.tr-goal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: var(--row); line-height: 1.2; font-size: 13px; color: var(--mute); }
.tr-goal button { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--page); font-size: 13px; font-weight: 600; color: var(--mute); }
.tr-goal button[aria-pressed="true"] { background: var(--pen); color: #fff; }
html.dark .tr-goal button[aria-pressed="true"] { color: #0E131E; }
.tr-race-c { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; text-decoration: none;
             background: linear-gradient(100deg, #FFE7A3, #FFD0B0); color: #3A2400 !important; }
html.dark .tr-race-c { background: linear-gradient(100deg, #4A3A12, #4A2A1E); color: #FFE9C2 !important; }
.tr-race-i { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .55); color: var(--red); }
.tr-race-c b { display: block; font-size: 16px; }
.tr-race-c small { display: block; font-size: 13px; opacity: .85; }
.tr-race-c em { font-style: normal; font-weight: 800; font-size: 14px; white-space: nowrap; }
.tr-find { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-search { flex: 1 1 240px; }
.tr-search input, .tr-topic select { width: 100%; min-height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; padding: 0 12px; }
.tr-topic { flex: 0 1 220px; }
.tr-map-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 14px; }
.tr-map-t { background: var(--paper); border-radius: 14px; padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--line); }
.tr-map-t.b-gold { box-shadow: inset 0 0 0 2px #D4A21A; }
.tr-map-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tr-map-h h2 { font-size: 17px; }
.tr-map-n { margin: 2px 0 8px; font-size: 13px; color: var(--mute); }
.tr-map-t ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tr-map-t a, .tr-map-t a:visited { color: var(--ink); }
.tr-map-t a { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 36px; padding: 2px 6px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.tr-map-t a:hover { background: var(--page); }
.tr-map-t .tr-box { width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 2px var(--line); display: grid; place-items: center; color: #fff; }
.tr-map-t li.ok .tr-box { background: var(--ok); box-shadow: none; }
.tr-map-t li.mid .tr-box { box-shadow: inset 0 0 0 2px var(--amb); }
.tr-map-t small { color: var(--mute); font-variant-numeric: tabular-nums; }
.tr-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.tr-badge.b-gold { background: #FFE38A; color: #5A4300; } .tr-badge.b-silver { background: #E3E8F0; color: #3A4458; } .tr-badge.b-bronze { background: #F3D2B4; color: #6A3A12; }
.tr-teams { display: grid; gap: 8px; margin-bottom: 12px; }
.tr-team { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr) 44px; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--page); }
.tr-team.me { box-shadow: inset 0 0 0 2px currentColor; }
.tr-team span { font-weight: 800; }
.tr-team i { height: 10px; border-radius: 5px; background: var(--paper); overflow: hidden; }
.tr-team u { display: block; height: 100%; }
.tr-team b { text-align: right; font-size: 18px; }
.tr-team small { grid-column: 1 / -1; font-size: 12px; color: var(--mute); }
.tr-team.t1 { color: #2246B6; } .tr-team.t1 u { background: #2246B6; }
.tr-team.t2 { color: #C42433; } .tr-team.t2 u { background: #C42433; }
html.dark .tr-team.t1 { color: #93ABFF; } html.dark .tr-team.t1 u { background: #93ABFF; }
html.dark .tr-team.t2 { color: #FF7482; } html.dark .tr-team.t2 u { background: #FF7482; }
.tr-ch-board .n em.tm { margin-left: 4px; }
.tr-ch-board li.t1 .n em.tm { color: #2246B6; } .tr-ch-board li.t2 .n em.tm { color: #C42433; }
html.dark .tr-ch-board li.t1 .n em.tm { color: #93ABFF; } html.dark .tr-ch-board li.t2 .n em.tm { color: #FF7482; }
.tr-ch-review { background: var(--paper); border-radius: 14px; padding: 16px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 14px; display: grid; gap: 10px; }
.tr-ch-review h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.tr-rv-types { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--ambbg); font-size: 14px; }
.tr-rv-it { border-top: 1px solid var(--line); padding: 8px 0; }
.tr-rv-it summary { cursor: pointer; font-size: 15px; line-height: 1.5; }
.tr-rv-it summary em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--mute); margin-left: 6px; }
.tr-rv-model { margin: 6px 0; font-size: 14px; color: var(--green); }
.tr-rv-it ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tr-rv-it li { display: grid; grid-template-columns: 36px 110px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 14px; padding: 4px 6px; border-radius: 8px; }
.tr-rv-it li b { text-align: center; border-radius: 6px; padding: 1px 0; }
.tr-rv-it li.ok b { background: var(--okbg); color: var(--ok); } .tr-rv-it li.mid b { background: var(--ambbg); color: var(--amb); } .tr-rv-it li.low b { background: #FBE3E5; color: var(--red); }
html.dark .tr-rv-it li.low b { background: #3A1A1F; }
.tr-rv-it li span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-rv-it li q { quotes: none; }
.tr-rv-it li.e { display: block; color: var(--mute); }
@media (max-width: 640px) {
  .tr-whole-g { grid-template-columns: 1fr; }
  .tr-race-c { grid-template-columns: auto minmax(0, 1fr); }
  .tr-race-c em { grid-column: 2; }
  .tr-rv-it li { grid-template-columns: 34px minmax(0, 1fr); }
  .tr-rv-it li q { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .tr-team u { transition: none; } }

/* ══ audit 4 (23 Nov 2026): WHOLE TEXTS · THE LIBRARY · THE CHALLENGE BUILDER ═══════════════════════════════════════
   Owner: "Why only one sentence translations visible there … whole essays … longer article texts … As a teacher I should be
   able to choose whatever thing I want to challenge my group. The cards of texts below of hero section is too illogical and
   disorganized … It should be a section that train interpreters and translators." */

/* the links under the hero: straight to a shelf */
.tr-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -6px 0 20px; font-size: 14px; color: var(--mute); }
.tr-jump a, .tr-jump a:visited { flex: none; min-height: 38px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); text-decoration: none; font-weight: 700; color: var(--ink) !important; }
.tr-jump a:first-of-type, .tr-jump a:first-of-type:visited { background: var(--pen); color: #fff !important; box-shadow: none; }
html.dark .tr-jump a:first-of-type, html.dark .tr-jump a:first-of-type:visited { color: #0E131E !important; }

/* challenges on the list page: the finished ones folded away */
.tr-chs-old summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; font-size: 14px; font-weight: 700; color: var(--mute); }
.tr-chs-old ul { margin-top: 6px; }

/* THE LIBRARY: a direction, then a shelf for each kind of text. One colour per kind (the stripe of its cards):
   essays = the teacher's red, articles = pen blue, paragraphs = green, sentences = amber. */
.tr-lib { display: grid; gap: 14px; min-width: 0; scroll-margin-top: 80px; }
.tr-lib-h h2 { font-size: 26px; }
.tr-lib-h p { margin: 4px 0 0; font-size: 14px; color: var(--mute); }
.tr-dirs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.tr-dirs button { min-height: 48px; border: 0; border-radius: 10px; background: transparent; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 4px 8px; padding: 4px 8px; flex-wrap: wrap; line-height: 1.2; }
.tr-dirs button small { font-weight: 700; font-size: 12px; color: var(--mute); background: var(--page); padding: 2px 8px; border-radius: 999px; }
.tr-dirs button[aria-selected="true"] { background: var(--pen); color: #fff; }
.tr-dirs button[aria-selected="true"] small { background: rgba(255, 255, 255, .22); color: inherit; }
html.dark .tr-dirs button[aria-selected="true"] { color: #0E131E; }
.tr-lvsel { flex: 0 1 140px; }
.tr-sh { display: grid; gap: 10px; padding-top: 8px; min-width: 0; scroll-margin-top: 80px; --g: var(--pen); }
.tr-sh[data-kind="essay"], .tr-card[data-kind="essay"] { --g: var(--red); }
.tr-sh[data-kind="article"], .tr-card[data-kind="article"] { --g: var(--pen); }
.tr-sh[data-kind="para"], .tr-card[data-kind="para"] { --g: var(--green); }
.tr-sh[data-kind="sent"], .tr-card[data-kind="sent"] { --g: var(--amb); }
.tr-sh-h { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: baseline; gap: 2px 10px; padding-left: 12px; box-shadow: inset 4px 0 0 var(--g); }
.tr-sh-h h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.tr-sh-n { font-size: 13px; font-weight: 700; color: var(--mute); }
.tr-sh-d { display: none; justify-self: end; font-size: 12px; font-weight: 700; color: var(--mute); }
.tr-lib.searching .tr-sh-d { display: block; }
.tr-sh-h p { grid-column: 1 / -1; margin: 0; font-size: 14px; line-height: 1.5; color: var(--mute); max-width: 68ch; }
.tr-sh-more { justify-self: start; min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; font-size: 14px; color: var(--pen); }
/* the cards: what kind of text · its title · level, size, topic · progress · the ways to do it */
.tr-card { display: grid; grid-template-rows: 1fr auto; }
.tr-card-a { padding: 12px 14px 10px 18px; gap: 5px; align-content: start; }
.tr-card-k { font-size: 12px; font-weight: 800; color: var(--g); }
.tr-card-t { padding-right: 0; font-size: 17px; }
.tr-card-x { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px 18px; }
.tr-card-x a, .tr-card-x a:visited { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; background: var(--page); color: var(--ink) !important; }
.tr-card-x a:hover { background: var(--g); color: #fff !important; }
html.dark .tr-card-x a:hover { color: #0E131E !important; }

/* A WHOLE TEXT: the source paragraph by paragraph, each with its own box (assets/translate.js TRKit.segs) */
.tr-play[data-len="full"], .tr-ch[data-len="full"] { max-width: 1000px; }
.tr-segs { display: grid; gap: var(--row); }
.tr-seg { display: grid; min-width: 0; }
.tr-seg-s { font-size: 17px; line-height: var(--row); font-weight: 500; }
.tr-seg-n { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 800; line-height: 1; vertical-align: 2px; }
@media (min-width: 900px) {
  .tr-play[data-len="full"] .tr-seg, .tr-ch[data-len="full"] .tr-seg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; align-items: start; }
}
/* its marking: the note, the four bars, what was left out, the mistakes, your text with the red pen, then the model beside the source */
.tr-mark.full { display: flex; flex-direction: column; }
.tr-mark.full > .tr-mk-h { order: 0; } .tr-mark.full > .tr-good { order: 1; } .tr-mark.full > .tr-note { order: 2; } .tr-mark.full > .tr-meters { order: 3; }
.tr-mark.full > .tr-miss { order: 4; } .tr-mark.full > .tr-errs { order: 5; } .tr-mark.full > .tr-mine { order: 6; } .tr-mark.full > .tr-cmp { order: 7; }
.tr-good { font-size: 15px; line-height: var(--row); font-weight: 600; color: var(--ok); }
.tr-miss { list-style: none; padding: 0 12px; margin-top: var(--row) !important; border-radius: 10px; background: var(--ambbg); }
.tr-miss li { font-size: 15px; line-height: var(--row); }
.tr-miss li.h { font-size: 13px; font-weight: 800; color: var(--amb); }
.tr-mark.full .tr-errs, .tr-mark.full .tr-mine, .tr-cmp { margin-top: var(--row); }
.tr-mark.full .tr-mine { white-space: pre-line; font-size: 16px; }
.tr-mark.full .tr-mine .fix { white-space: normal; }
.tr-mine-h { display: block; font-size: 13px; font-weight: 800; color: var(--mute); }
.tr-cmp h3 { margin: 0; font-size: 13px; font-weight: 800; color: var(--mute); line-height: var(--row); }
.tr-cmp-r { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; padding: 8px 0; border-top: 1px dashed var(--line); }
.tr-cmp-r p { font-size: 15px; line-height: 1.6; }
.tr-cmp-r .s { color: var(--mute); }
.tr-cmp-r .m { color: var(--green); font-weight: 500; }
.tr-reveal.full .tr-row { grid-template-columns: 1fr; }
.tr-reveal.full b { white-space: pre-line; font-weight: 500; font-size: 15px; line-height: 1.6; color: var(--green); }
.tr-full-tag { color: var(--pen); }

/* THE CHALLENGE BUILDER: 1 the text · 2 what they translate · 3 the time · 4 how they play */
.tr-chnew { max-width: 760px; }
.tr-form, .tr-fl, .tr-fs { min-width: 0; }
.tr-fl select { width: 100%; min-width: 0; box-sizing: border-box; }
.tr-bstep { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.tr-bstep + .tr-bstep { padding-top: 16px; border-top: 1px solid var(--line); }
.tr-bstep legend { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 10px; font-size: 18px; font-weight: 800; }
.tr-bstep legend b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-size: 14px; }
.tr-bstep .tr-fk { margin: 0; }
.tr-pk-f { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.tr-pk-f .tr-pk-q { grid-column: 1 / -1; }
.tr-pk-f select, .tr-pk-f input, .tr-own input { width: 100%; min-width: 0; min-height: 46px; box-sizing: border-box; border-radius: 12px; border: 1.5px solid var(--line); background: var(--page); color: var(--ink); font: 500 15px Inter, system-ui, sans-serif; padding: 0 12px; }
.tr-pk { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 4px; padding: 4px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line); }
.tr-pk-i { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.tr-pk-i:has(input:checked) { background: color-mix(in srgb, var(--pen) 10%, transparent); box-shadow: inset 0 0 0 2px var(--pen); }
.tr-pk-i input, .tr-pt input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--pen); }
.tr-pk-i b { display: block; font-size: 15px; line-height: 1.3; }
.tr-pk-i small { display: block; font-size: 13px; line-height: 1.45; color: var(--mute); }
.tr-pk-i em { font-style: normal; font-weight: 700; color: var(--amb); }
.tr-pt-b { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tr-pt-b span { margin-left: auto; font-size: 13px; color: var(--mute); }
.tr-pt { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 380px; overflow-y: auto; overscroll-behavior: contain; }
.tr-pt label { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 8px 10px; border-radius: 9px; background: var(--page); cursor: pointer; font-size: 14px; line-height: 1.45; }
.tr-pt label:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--pen); }
.tr-pt small { color: var(--mute); white-space: nowrap; }
.tr-pt em { font-style: normal; font-weight: 700; color: var(--green); }
.tr-own { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 10px; }
.tr-own label { display: grid; gap: 4px; width: 96px; font-size: 13px; font-weight: 700; color: var(--mute); }
.tr-own span { padding-bottom: 13px; font-size: 13px; color: var(--mute); }

@media (max-width: 700px) {
  .tr-cmp-r { grid-template-columns: 1fr; gap: 4px; }
  .tr-cmp-r .s { font-size: 14px; }
}
@media (max-width: 560px) {
  .tr-dirs button { font-size: 13px; min-height: 56px; flex-direction: column; }
  .tr-lib-h h2 { font-size: 22px; }
  .tr-sh-h h3 { font-size: 18px; }
  .tr-seg-s { font-size: 16px; }
  .tr-topic, .tr-lvsel { flex: 1 1 130px; }
  .tr-jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 16px 0; padding-right: 12px; }
  .tr-jump::-webkit-scrollbar { display: none; }
  .tr-jump span { display: none; }
}

/* ══ THE NOTEBOOK, BROUGHT TO LIFE (the owner's pick E, 23 Nov 2026) ═══════════════════════════════════════════════════
   One look for the whole section, by day and by night: squared paper, pen-blue handwriting, the teacher's red, index cards
   with a pen drawing of each text (includes/translate_doodles.php), a sticker for the streak, a stamp for the grade, a sticky
   note for the race. Every colour is a variable from the top of this file, so night mode follows by itself. */
.tr { --tape: #FFE066; --stickerink: #fff; }
html.dark .tr { --tape: #7A6A1E; --stickerink: #2A0A0E; }
@keyframes trDraw { 0% { stroke-dashoffset: 330; } 45%, 100% { stroke-dashoffset: 0; } }
@keyframes trWobble { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(-3deg); } }
@keyframes trThunk { 0%, 72%, 100% { transform: rotate(-12deg) scale(1); } 82% { transform: rotate(-12deg) scale(1.18); } }
@keyframes trSway { 0%, 100% { transform: rotate(1deg); } 50% { transform: rotate(-.8deg); } }
@keyframes trScribble { 50% { transform: translate(3px, -2px) rotate(4deg); } }
/* the ink of each kind of text: essays red, articles pen blue, paragraphs green, sentences amber (--kb / --kc: its index tab) */
.tr [data-kind="essay"] { --g: var(--red); --kb: #F8D5D8; --kc: #7A0F1A; }
.tr [data-kind="article"] { --g: var(--pen); --kb: #C9D6F5; --kc: #142A6B; }
.tr [data-kind="para"] { --g: var(--green); --kb: #BFEBD3; --kc: #0B4A31; }
.tr [data-kind="sent"] { --g: var(--amb); --kb: #FFE9A8; --kc: #5A3A00; }
html.dark .tr [data-kind="essay"] { --kb: #3A1A1F; --kc: #FFB3BB; }
html.dark .tr [data-kind="article"] { --kb: #1C2A55; --kc: #C5D2FF; }
html.dark .tr [data-kind="para"] { --kb: #143224; --kc: #A6E8C4; }
html.dark .tr [data-kind="sent"] { --kb: #3A2D12; --kc: #F6D48A; }
/* the pen drawings: the part with class "mv" moves a little */
.tr-dd { flex: none; color: var(--g, var(--pen)); }
.tr-dd .mv { transform-box: fill-box; transform-origin: center; animation: trScribble 2.6s ease-in-out infinite; }

/* the notebook page of the list */
.tr-book { position: relative; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-content: start; padding: 36px 30px 34px 66px; border-radius: 10px;
           background-color: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
           background-size: 24px 24px; background-position: 0 -1px; box-shadow: 0 1px 0 var(--line), 0 22px 46px -28px rgba(20, 40, 90, .45); }
.tr-book::before { content: ''; position: absolute; left: 46px; top: 0; bottom: 0; width: 2px; background: var(--margin); }
.tr-tape { position: absolute; left: 40%; top: -10px; width: 124px; height: 26px; background: var(--tape); opacity: .85; transform: rotate(-3deg); }
.tr-nb-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tr.tr-nb .tr-nb-top h1 { font: 700 clamp(58px, 11vw, 88px)/.9 var(--hand); color: var(--pen); letter-spacing: 0; }
.tr-nb-u { display: block; width: min(250px, 62vw); height: 16px; color: var(--red); }
.tr-nb-u path { stroke-dasharray: 330; animation: trDraw 4s ease-in-out infinite; }
.tr-nb-lede { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--mute); max-width: 44ch; }
.tr-sticker { flex: none; width: 86px; height: 86px; border-radius: 50%; background: var(--red); color: var(--stickerink); display: flex; flex-direction: column; align-items: center; justify-content: center;
              text-align: center; font: 700 30px/.9 var(--hand); transform: rotate(-6deg); animation: trWobble 3s ease-in-out infinite; }   /* the transform = the still look on weak phones (html.lk-lite) and with "reduce motion" */
.tr-sticker small { font: 700 11px/1.2 Inter, system-ui, sans-serif; }
/* today's text, pinned */
.tr-pin { display: grid; gap: 12px; padding: 16px; border-radius: 6px; background: var(--paper); border: 2px solid var(--ink); transform: rotate(-.7deg); }
.tr-pin-h { display: flex; align-items: center; gap: 14px; }
.tr-pin-k { display: block; font: 700 27px/1 var(--hand); color: var(--red); }
.tr-pin-t { display: block; margin-top: 2px; font-size: 22px; line-height: 1.15; font-weight: 800; }
.tr-pin-m { margin: 0; font-size: 14px; font-weight: 600; color: var(--mute); }
.tr-pin .tr-btn { justify-self: start; min-width: 220px; }
/* the race: a sticky note */
.tr-nb .tr-race-c, html.dark .tr-nb .tr-race-c { grid-template-columns: minmax(0, 1fr) auto; padding: 16px; border-radius: 2px; background: var(--sticky); color: var(--stickyink) !important;
              box-shadow: 0 10px 16px -12px rgba(0, 0, 0, .5); transform: rotate(.6deg); animation: trSway 5s ease-in-out infinite; }
.tr-nb .tr-race-c b { font: 700 30px/1 var(--hand); }
.tr-nb .tr-race-c small { margin-top: 2px; opacity: 1; font-weight: 600; }
.tr-nb .tr-race-c em { grid-column: auto; padding: 9px 16px; border-radius: 10px; background: var(--stickyink); color: var(--sticky); }
.tr-nb .tr-chs { padding: 16px 0 0; border-radius: 0; background: transparent; box-shadow: none; border-top: 2px dashed var(--line); }
.tr-nb .tr-chs-h h2, .tr-nb .tr-lib-h h2, .tr-nb .tr-board h2 { font: 700 38px/1 var(--hand); color: var(--pen); letter-spacing: 0; }
/* the library: a direction, index tabs, index cards */
.tr-nb .tr-lib { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 16px; border-top: 2px dashed var(--line); }
.tr-nb .tr-dirs { border: 2px solid var(--ink); border-radius: 12px; box-shadow: none; }
.tr-kinds { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; align-items: end; border-bottom: 3px solid var(--ink); }
.tr-kinds button { min-height: 46px; padding: 4px 2px; border: 0; border-radius: 12px 12px 0 0; background: var(--kb); color: var(--kc); font: 700 13px/1.2 Inter, system-ui, sans-serif;
                   display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tr-kinds button small { font-size: 12px; font-weight: 700; }
.tr-kinds button[aria-selected="true"] { min-height: 56px; background: var(--g); color: var(--paper); }
.tr-kind-k { margin: 0; font: 700 22px/1.2 var(--hand); color: var(--mute); }
.tr-nb .tr-search input, .tr-nb .tr-topic select { border: 2px solid var(--ink); border-radius: 10px; }
.tr-nb .tr-shelf { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px 14px; padding-top: 10px; }
.tr-nb .tr-card { border-radius: 6px; background: var(--paper); border: 2px solid var(--ink); box-shadow: none; transition: transform .15s, box-shadow .15s; }
.tr-nb .tr-card:nth-child(odd) { transform: rotate(-.6deg); } .tr-nb .tr-card:nth-child(even) { transform: rotate(.6deg); }
.tr-nb .tr-card:hover, .tr-nb .tr-card:focus-within { transform: rotate(0); box-shadow: 5px 5px 0 var(--g); }
.tr-nb .tr-card-a { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px 14px 10px; }
.tr-card-b { display: grid; gap: 4px; min-width: 0; }
.tr-nb .tr-card-k { font: 700 22px/1 var(--hand); color: var(--g); }
.tr-nb .tr-card-t { font-size: 18px; line-height: 1.2; font-weight: 800; }
.tr-nb .tr-card-f { font-weight: 600; color: var(--ink); }
.tr-nb .tr-card-x { padding: 0 14px 12px; }
.tr-nb .tr-card-x a, .tr-nb .tr-card-x a:visited { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.tr-stamp { position: absolute; right: 10px; top: -16px; width: 54px; height: 54px; box-sizing: border-box; border-radius: 50%; border: 4px solid var(--ok); color: var(--ok); background: var(--paper);
            display: grid; place-items: center; font: 700 38px/1 var(--hand); transform: rotate(-12deg); animation: trThunk 3.4s ease-in-out infinite; }
.tr-stamp.g3, .tr-stamp.g2 { border-color: var(--red); color: var(--red); }
.tr-nb .tr-card:has(.tr-stamp) .tr-card-k { padding-right: 50px; }
.tr-nb .tr-sh-more { box-shadow: none; border: 2px solid var(--pen); border-radius: 12px; }
.tr-nb .tr-board { border-radius: 6px; box-shadow: none; border: 2px solid var(--ink); background-color: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px); background-size: 100% 32px; }
.tr-nb .tr-btn.ghost, .tr-nbp .tr-btn.ghost { box-shadow: inset 0 0 0 2px var(--ink); }

/* the writing page in the same notebook: the drawing, the kind in red handwriting, the title in pen, a sticky note for the question, tape on the paper */
.tr-ph-h { display: flex; align-items: center; gap: 14px; }
.tr-ph-k { display: block; font: 700 24px/1 var(--hand); color: var(--red); }
.tr.tr-nbp .tr-ph h1 { font: 700 clamp(40px, 8vw, 58px)/.95 var(--hand); color: var(--pen); letter-spacing: 0; }
.tr-nbp .tr-para-k { padding: 0; background: transparent; color: var(--green); font: 700 21px/1.25 var(--hand); }
.tr-nbp .tr-q { border-radius: 2px; background: var(--sticky); color: var(--stickyink); transform: rotate(-.5deg); box-shadow: 0 10px 16px -12px rgba(0, 0, 0, .5); }
.tr-nbp .tr-paper { margin-top: 20px; }
.tr-nbp .tr-paper::after { content: ''; position: absolute; left: 42%; top: -11px; width: 116px; height: 24px; background: var(--tape); opacity: .85; transform: rotate(-3deg); }

@media (max-width: 560px) {
  .tr-book { padding: 30px 14px 26px 30px; gap: 20px; }
  .tr-book::before { left: 18px; }
  .tr-sticker { width: 74px; height: 74px; font-size: 26px; }
  .tr-pin .tr-btn { justify-self: stretch; min-width: 0; }
  .tr-pin-h .tr-dd { width: 68px; height: 68px; }
  .tr-pin-k { font-size: 24px; }
  .tr-kinds button { font-size: 12px; }
  .tr-ph-h .tr-dd { width: 56px; height: 56px; }
  .tr-nb .tr-chs-h h2, .tr-nb .tr-lib-h h2, .tr-nb .tr-board h2 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) { .tr-dd .mv, .tr-nb-u path, .tr-sticker, .tr-stamp, .tr-nb .tr-race-c { animation: none; } .tr-nb .tr-card { transition: none; } }
/* the site's own button rule comes later in the page and wins at equal weight, so these name the notebook page first */
.tr.tr-nb .tr-kinds button { font: 700 13px/1.2 Inter, system-ui, sans-serif; }
.tr.tr-nb .tr-kinds button small { font-size: 12px; }
.tr.tr-nb .tr-dirs button { font: 700 14px/1.2 Inter, system-ui, sans-serif; }
.tr.tr-nb .tr-sh-more { font: 700 14px/1 Inter, system-ui, sans-serif; }
@media (max-width: 560px) { .tr.tr-nb .tr-kinds button { font-size: 12px; letter-spacing: -.01em; } .tr.tr-nb .tr-dirs button { font-size: 13px; } }

/* ── 23 Nov 2026: THE TEACHER'S VIEW OF A CHALLENGE — every student's text, ranked (assets/translate-ch.js) ── */
.tr-rvx-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-rvx-bar button { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: 600 14px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.tr-rvx-bar button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tr-rvx-it { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.tr-rvx-it h3 { margin: 0; font-size: 16.5px; }
.tr-rvx-it h3 em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--mute); margin-left: 6px; }
.tr-rvx-src { font-size: 14.5px; }
.tr-rvx-src summary, .tr-rvx-a details summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--mute); }
.tr-rvx-src p { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.55; }
.tr-rvx-src.mo p { color: var(--green); }
.tr-rvx-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tr-rvx-a { --k: var(--mute); padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); border-left: 6px solid var(--k); background: var(--paper); }
.tr-rvx-a.ok { --k: var(--ok); } .tr-rvx-a.mid { --k: var(--amb); } .tr-rvx-a.low { --k: var(--red); }
.tr-rvx-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tr-rvx-h i { font-style: normal; font-weight: 800; min-width: 20px; color: var(--mute); }
.tr-rvx-h i:empty { display: none; }
.tr-rvx-h b { min-width: 42px; padding: 3px 6px; border-radius: 8px; background: var(--k); color: #fff; font-size: 15px; text-align: center; }
.tr-rvx-h span { font-weight: 700; font-size: 15px; }
.tr-rvx-h small { font-size: 13px; color: var(--mute); }
.tr-rvx-t { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.6; }
.tr-rvx-e { margin: 0; font-size: 14.5px; color: var(--mute); }
@media print {
  html.tr-print-rv body * { visibility: hidden; }
  html.tr-print-rv #trc-review, html.tr-print-rv #trc-review * { visibility: visible; }
  html.tr-print-rv #trc-review { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; }
  html.tr-print-rv .tr-rvx-bar { display: none; }
  html.tr-print-rv .tr-rvx-a { break-inside: avoid; }
}

/* ── THE CORRECTION in a challenge (23 Nov 2026, owner: "after the submission the chance should be given to correct") ──
   .tr-mark.hint = the first red pen: only WHERE the mistakes are (a wavy red line), no fixes. .tr-fix = the "Now correct it" note. */
.tr-mark.hint .tr-mine .fix { white-space: normal; }
.tr-mark.hint .tr-mine .fix s { color: var(--pen); text-decoration: underline wavy var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tr-mark.hint .tr-mine .fix ins { display: none; }
.tr-errs u { text-decoration: underline wavy var(--red); text-underline-offset: 3px; }
.tr-fix { margin: 14px 0 0; padding: 14px 16px 12px; border: 2px dashed var(--red); border-radius: 14px; background: color-mix(in srgb, var(--red) 6%, transparent); }
.tr-fix.in { animation: trFixIn .45s ease-out both; }
@keyframes trFixIn { from { opacity: 0; transform: translateY(10px) rotate(-.6deg); } to { opacity: 1; transform: none; } }
.tr-fix .tr-hand { margin: 0; color: var(--red); }
.tr-fix-t { margin: 4px 0 0; font-size: 15px; line-height: 1.5; }
.tr-fix-b { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 16px; margin-top: 12px; }
.tr-fix .tr-msg { margin: 8px 0 0; min-height: 0; }
@media (max-width: 560px) { .tr-fix-b { flex-direction: column-reverse; align-items: stretch; } .tr-fix-b .tr-btn { justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .tr-fix.in { animation: none; } }
html.lk-lite .tr-fix.in { animation: none; }
/* the teacher's view: the mistakes of the first text, and the corrected text under it */
.tr-rvx-t .fix s { color: var(--mute); text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.tr-rvx-t .fix ins { margin-left: 3px; text-decoration: none; color: var(--red); font-weight: 700; }
.tr-rvx-c { list-style: none; margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--red); font-size: 14px; line-height: 1.55; }
.tr-rvx-c s { color: var(--mute); text-decoration-color: var(--red); } .tr-rvx-c b { color: var(--red); } .tr-rvx-c span { color: var(--mute); }
.tr-rvx-f { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; font-size: 14px; background: color-mix(in srgb, var(--pen) 6%, transparent); }
.tr-rvx-f > b { display: block; font-size: 13px; }
.tr-rvx-f.ok > b { color: var(--ok, #1c7c4a); } .tr-rvx-f.mid > b { color: var(--amb); } .tr-rvx-f.low > b { color: var(--red); }
.tr-rvx-f.no, .tr-rvx-f.wait { color: var(--mute); font-style: italic; }
.tr-rvx-f .tr-rvx-t { margin-top: 4px; }
.tr-rvx-h b u { text-decoration: none; font-weight: 700; opacity: .8; }
html.tr-print-rv .tr-rvx-c, html.tr-print-rv .tr-rvx-f { break-inside: avoid; }

/* ── 26 Nov 2026: "My language" (Özbekça, Русский, Тоҷикӣ …) above the direction tabs; the row scrolls sideways on a phone ── */
.tr-langs { display: grid; gap: 6px; min-width: 0; }
.tr-langs-k { font: 700 20px/1.1 var(--hand); color: var(--mute); }
.tr-langs-row { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.tr-langs-row button { flex: 0 0 auto; scroll-snap-align: start; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
                       font: 700 15px/1 Inter, system-ui, sans-serif; cursor: pointer; transition: transform .15s, background .15s; }
.tr-langs-row button:hover { transform: translateY(-2px) rotate(-1deg); }
.tr-langs-row button[aria-pressed="true"] { background: var(--pen); border-color: var(--pen); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
html.dark .tr-langs-row button[aria-pressed="true"] { color: #0E131E; }
.tr-dirs button[hidden] { display: none; }
