/* trainee screens — the trainee phone app (#/t…). Big tap targets, short text, works at 360 px. */
.t-app { min-height: 100vh; background: var(--bg); font-size: 16px; }
.t-app .t-shell { padding-top: 4px; }
.t-top { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
.t-top .grow { flex: 1; min-width: 0; line-height: 1.25; }
.t-top .grow strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-top .grow small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.t-home-link { display: flex; flex: none; }
.t-out { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 44px; padding: 6px 12px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.t-out:hover { background: rgba(255, 255, 255, .1); }
@media (max-width: 380px) { .t-out span { display: none; } .t-out { padding: 6px 10px; } }

.t-app h1 { font-size: 24px; margin: 0; }
.t-h { display: flex; align-items: center; gap: 8px; font-size: 19px; margin: 0 0 8px; color: var(--ink); }
.t-h svg { color: var(--gold); flex: none; }
.t-hello { font-size: 20px; font-weight: 700; margin: 16px 2px 4px; }
.t-center { text-align: center; }
.t-card h2 { margin-top: 0; }
.t-note { margin: 10px 0 0; font-size: 15px; color: var(--mute); }
.t-note.warn { color: var(--red); font-weight: 600; }
.t-foot { text-align: center; color: var(--mute); font-size: 13px; margin: 18px 8px; }

/* loading */
.t-wait { padding: 60px 0; text-align: center; color: var(--mute); }
.t-spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--chip); border-top-color: var(--gold); margin: 0 auto 10px; animation: tspin 0.9s linear infinite; }
@keyframes tspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .t-spin { animation-duration: 3s; } }

/* login */
.t-login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 28px 16px 24px; gap: 18px;
  background: linear-gradient(180deg, var(--navy) 0, var(--navy) 210px, var(--bg) 210px); }
.t-login-head { text-align: center; color: #fff; }
.t-login-logo { width: 104px; height: 104px; border-radius: 50%; background: #fff; padding: 6px; object-fit: contain; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.t-login-head h1 { font-size: 28px; margin: 8px 0 0; color: #fff; }
.t-login-head p { margin: 2px 0 0; color: var(--gold-light); font-size: 15px; }
.t-login .login-card { padding: 22px 18px; }
.t-login-card input { font-size: 18px; padding: 12px 14px; min-height: 50px; }
.t-login-card .btn.big { min-height: 54px; font-size: 17px; }
.t-staff-link { color: var(--mute); font-size: 14px; padding: 10px; }

/* progress */
.t-prog-row { display: flex; align-items: center; gap: 16px; }
.t-prog-bars { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.t-pl-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; margin-bottom: 4px; }
.t-pl-top strong { white-space: nowrap; }
.t-pl .bar { height: 10px; }
.t-pl.low .bar span { background: var(--red); }
.t-pl.low .t-pl-top strong { color: var(--red); }
.t-progress .ring-text small { max-width: 64px; }
@media (max-width: 360px) { .t-prog-row { flex-direction: column; align-items: stretch; } .t-prog-row .ring { align-self: center; } }

/* tests list */
.t-tests .t-test { padding: 12px 0; }
.t-test .grow { flex: 1; min-width: 0; }
.t-test strong { display: block; font-size: 16.5px; }
.t-test-title { display: block; font-size: 14px; color: var(--ink); opacity: .85; overflow-wrap: anywhere; }
.t-test small { display: block; color: var(--mute); font-size: 13.5px; }
.t-test-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--navy-soft); color: var(--navy); }
.t-test-ic.mod { background: var(--gold-soft); color: #8a6420; }
@media (prefers-color-scheme: dark) { .t-test-ic { color: #c9cdf7; } .t-test-ic.mod { color: var(--gold-light); } }
.t-test:not(.can) { opacity: .75; }
.t-start { min-height: 48px; min-width: 84px; justify-content: center; font-size: 16px; flex: none; }
.t-done { display: inline-flex; align-items: center; gap: 4px; color: var(--leaf); font-weight: 700; font-size: 14px; flex: none; }

/* day */
.t-day-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.t-day-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.t-day-top strong { font-size: 16px; overflow-wrap: anywhere; }
.t-goal { margin: 2px 0 0; font-size: 15px; }
.t-hometask { display: flex; gap: 8px; align-items: flex-start; background: var(--gold-soft); border-radius: 10px; padding: 8px 10px; margin-top: 4px; font-size: 15px; }
.t-hometask svg { flex: none; margin-top: 2px; color: var(--gold); }
.t-mark { flex: none; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.t-mark.P { background: var(--leaf-soft); color: var(--leaf); }
.t-mark.A { background: var(--red-soft); color: var(--red); }
.t-mark.L { background: var(--gold-soft); color: #7a5718; }
@media (prefers-color-scheme: dark) { .t-mark.P { color: #bfe3cc; } .t-mark.A { color: #ffd9de; } .t-mark.L { color: var(--gold-light); } }

/* notices */
.t-notice { border-left: 4px solid var(--line-strong); padding: 6px 0 6px 12px; margin: 10px 0; }
.t-notice.important { border-left-color: var(--gold); }
.t-notice.urgent { border-left-color: var(--red); }
.t-notice p { margin: 2px 0; font-size: 15px; }
.t-notice small { color: var(--mute); }

/* certificate */
.t-cert-ok { text-align: center; background: linear-gradient(140deg, var(--navy-deep), var(--navy)); color: #fff; border: 0; padding: 22px 16px; }
.t-cert-ok h2 { color: #fff; font-size: 22px; margin: 6px 0 2px; }
.t-cert-ok p { margin: 0 0 14px; color: rgba(255, 255, 255, .85); }
.t-cert-ok small { display: block; margin-top: 10px; color: var(--gold-light); }
.t-cert-ic { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: rgba(240, 207, 122, .2); color: var(--gold-light); }
.t-cert-btn { background: var(--gold); color: #1b1d2e; min-height: 56px; font-size: 18px; text-decoration: none; }
.t-cert-btn:hover { background: var(--gold-light); }
.t-cert-wait { box-shadow: inset 4px 0 0 var(--gold), var(--shadow); }
.t-cert-wait p { margin: 0; }
.t-more { display: inline-block; margin-top: 8px; font-weight: 600; padding: 6px 0; }
.t-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.t-step { display: flex; gap: 12px; align-items: center; }
.t-step strong { display: block; } .t-step small { color: var(--mute); font-size: 14px; }
.t-step-ic { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px solid var(--line-strong); }
.t-step.ok .t-step-ic { background: var(--leaf); border-color: var(--leaf); color: #fff; }

/* links */
.t-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.t-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 88px; padding: 12px; text-align: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; }
.t-link svg { color: var(--navy); }
@media (prefers-color-scheme: dark) { .t-link svg { color: #c9cdf7; } }
.t-link.gold { background: var(--gold-soft); border-color: var(--gold); }
.t-link.gold svg { color: var(--gold); }
.t-link:active { transform: scale(.98); }

/* page title row */
.t-title-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; }
.t-back { min-height: 44px; flex: none; }
.t-sum { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 6px; }
.t-sum strong { display: block; font-size: 26px; line-height: 1.1; }
.t-sum small { color: var(--mute); font-size: 13px; }
.t-day { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0; }
.t-day.Held { box-shadow: inset 4px 0 0 var(--leaf), var(--shadow); }
.t-day.Cancelled { opacity: .6; }
.t-day.today { outline: 2px solid var(--gold); }
.t-day-date { width: 46px; flex: none; text-align: center; background: var(--chip); border-radius: 10px; padding: 6px 0; line-height: 1.1; }
.t-day-date strong { display: block; font-size: 20px; } .t-day-date small { font-size: 12px; color: var(--mute); }

/* feedback */
.t-stars { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.t-star { width: 54px; height: 54px; font-size: 34px; line-height: 1; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--line-strong); cursor: pointer; padding: 0; }
.t-star.on { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
@media (max-width: 360px) { .t-star { width: 48px; height: 48px; font-size: 30px; } }
.t-star-word { text-align: center; margin: 4px 0 0; font-weight: 700; color: var(--mute); }
.t-app textarea { font-size: 16px; }
.t-big-ic { width: 72px; height: 72px; border-radius: 50%; margin: 8px auto 4px; display: grid; place-items: center; background: var(--leaf-soft); color: var(--leaf); }
.t-big-ic.bad { background: var(--red-soft); color: var(--red); }
.t-center .btn.big { margin-top: 10px; text-decoration: none; }

/* test taking */
.t-test-head { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; }
.t-test-head .grow { flex: 1; min-width: 0; }
.t-test-head strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.t-test-head small { color: var(--mute); font-size: 13px; }
.t-leave { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--paper);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; flex: none; }
.t-qcount { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 6px; }
.t-qcount span { font-weight: 800; font-size: 17px; color: var(--navy); }
@media (prefers-color-scheme: dark) { .t-qcount span { color: #c9cdf7; } }
.t-qcount small { color: var(--mute); font-size: 14px; }
.t-test-area > .bar { height: 10px; }
.t-q { font-size: 20px; line-height: 1.4; margin: 16px 2px 8px; overflow-wrap: anywhere; }
.t-opts .qa-opt { align-items: center; min-height: 60px; padding: 12px 14px; margin: 10px 0; font-size: 17px; border-width: 2px; -webkit-tap-highlight-color: transparent; }
.t-opts .qa-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.t-opts .qa-opt:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.t-letter { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--chip); color: var(--ink); }
.qa-opt.on .t-letter { background: var(--navy); color: #fff; }
.t-opt-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.t-nav { display: flex; gap: 10px; margin-top: 18px; }
.t-navbtn { flex: 1; justify-content: center; min-height: 54px; font-size: 17px; }
.t-arrow { font-size: 24px; line-height: 1; margin-left: 2px; }
.t-linkbtn { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--navy); font: inherit; font-weight: 600; text-decoration: underline; padding: 10px; cursor: pointer; }
@media (prefers-color-scheme: dark) { .t-linkbtn { color: #b9bef5; } }
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; margin: 14px 0; }
.t-qnum { min-height: 52px; border-radius: 12px; font: inherit; font-weight: 800; font-size: 17px; cursor: pointer; border: 2px solid; }
.t-qnum.ok { background: var(--leaf-soft); border-color: var(--leaf); color: var(--leaf); }
.t-qnum.miss { background: var(--red-soft); border-color: var(--red); color: var(--red); }
@media (prefers-color-scheme: dark) { .t-qnum.ok { color: #bfe3cc; } .t-qnum.miss { color: #ffd9de; } }
.t-ask { font-weight: 700; font-size: 17px; margin: 0 0 10px; }
.t-choices { display: flex; flex-direction: column; gap: 8px; }
.t-choice { min-height: 52px; text-align: left; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line-strong); background: var(--paper); color: var(--ink); font: inherit; font-size: 16.5px; cursor: pointer; }
.t-choice.on { border-color: var(--navy); background: var(--navy-soft); font-weight: 700; }
.t-submit { min-height: 58px; font-size: 18px; margin-top: 8px; }
.t-result { padding: 24px 16px; }
.t-result .ring { margin: 4px auto; }
.t-result .ring-text strong { font-size: 28px; }
.t-score { font-size: 26px; font-weight: 800; margin: 8px 0 0; }
.t-score small { font-size: 16px; font-weight: 500; color: var(--mute); }
.t-word { font-size: 24px; margin: 4px 0; }
.t-result.good .t-word { color: var(--leaf); } .t-result.mid .t-word { color: #a07422; } .t-result.low .t-word { color: var(--red); }
.t-result.good .ring-fill { stroke: var(--leaf); } .t-result.low .ring-fill { stroke: var(--red); }
@media (prefers-color-scheme: dark) { .t-result.good .t-word { color: #9fd8b4; } .t-result.mid .t-word { color: var(--gold-light); } .t-result.low .t-word { color: #ff9aa6; } }

/* ---- features from the RS Test App: Listen, review list, modules, badges, e-mail, WhatsApp share ---- */
.t-ids { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 2px 6px; font-size: 13.5px; color: var(--mute); }
.t-ids span { overflow-wrap: anywhere; }

/* Listen */
.t-listen { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; min-width: 132px; padding: 8px 18px;
  font-size: 17px; font-weight: 700; border-radius: 14px; border: 2px solid var(--navy); color: var(--navy); background: var(--paper); margin: 2px 0 4px; }
.t-listen svg { flex: none; }
.t-listen.on { background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .t-listen { border-color: #b9bef5; color: #c9cdf7; } .t-listen.on { background: #b9bef5; color: #11163d; } }

/* review list */
.t-rv-tip { margin: 10px 2px 0; }
.t-review { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.t-rv { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 12px; text-align: left; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 2px solid var(--line-strong); border-radius: 14px; font: inherit; -webkit-tap-highlight-color: transparent; }
.t-rv:active { transform: scale(.99); }
.t-rv.miss { border-color: var(--red); background: var(--red-soft); }
.t-rv-no { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; background: var(--leaf-soft); color: var(--leaf); }
.t-rv.miss .t-rv-no { background: var(--red); color: #fff; }
.t-rv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.t-rv-q { font-size: 14px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.t-rv-a { font-size: 16px; display: flex; align-items: flex-start; gap: 6px; overflow-wrap: anywhere; min-width: 0; }
.t-rv-a.miss { color: var(--red); }
.t-rv-letter { flex: none; min-width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--navy); color: #fff; }
.t-rv-go { flex: none; font-size: 26px; line-height: 1; color: var(--mute); }
@media (prefers-color-scheme: dark) { .t-rv-no { color: #bfe3cc; } .t-rv-a.miss { color: #ffb3bd; } }

/* My modules */
.t-h-count { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--mute); font-family: inherit; }
.t-mods { display: flex; flex-direction: column; gap: 12px; }
.t-mod { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.t-mod.earned { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.t-mod-top { display: flex; align-items: center; gap: 10px; }
.t-mod-top .grow { flex: 1; min-width: 0; }
.t-mod-top strong { display: block; font-size: 16px; }
.t-mod-title { display: block; font-size: 14px; color: var(--ink); opacity: .85; overflow-wrap: anywhere; }
.t-mod-no { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--navy-soft); color: var(--navy); }
@media (prefers-color-scheme: dark) { .t-mod-no { color: #c9cdf7; } }
.t-mod-ok { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 700; color: #8a6420; background: var(--gold-soft); border-radius: 999px; padding: 4px 10px; }
@media (prefers-color-scheme: dark) { .t-mod-ok { color: var(--gold-light); } }
.t-mod-tests { display: flex; flex-wrap: wrap; gap: 6px; }
.t-st { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; padding: 4px 10px; border-radius: 999px; background: var(--chip); color: var(--mute); }
.t-st b { color: var(--ink); }
.t-st.done { background: var(--leaf-soft); color: var(--leaf); }
.t-st.done b { color: var(--leaf); }
@media (prefers-color-scheme: dark) { .t-st.done, .t-st.done b { color: #bfe3cc; } }
.t-mod-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--mute); }
.t-mod-meta span { display: inline-flex; align-items: center; gap: 5px; }
.t-mod-meta svg { flex: none; }
.t-mod-assess.done b { color: var(--leaf); }
.t-mod-assess.open b { color: #8a6420; }
@media (prefers-color-scheme: dark) { .t-mod-assess.done b { color: #9fd8b4; } .t-mod-assess.open b { color: var(--gold-light); } }

/* My badges */
.t-badge-tip { margin: 0 0 10px; }
.t-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.t-badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: 14px; border: 1px solid var(--line); min-width: 0; }
.t-badge strong { font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere; }
.t-badge small { font-size: 13px; color: var(--mute); }
.t-badge-medal { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px; }
.t-badge.earned { background: var(--gold-soft); border-color: var(--gold); }
.t-badge.earned .t-badge-medal { background: linear-gradient(145deg, var(--gold-light), var(--gold)); color: #3b2a08; box-shadow: 0 3px 10px rgba(194, 154, 69, .45); }
.t-badge.earned small { color: #8a6420; font-weight: 700; }
.t-badge.locked { background: var(--chip); }
.t-badge.locked .t-badge-medal { background: var(--paper); border: 2px dashed var(--line-strong); color: var(--mute); }
.t-badge.locked strong { color: var(--mute); }
.t-badge-no { font-size: 22px; font-weight: 800; }
@media (prefers-color-scheme: dark) { .t-badge.earned small { color: var(--gold-light); } }

/* My e-mail */
.t-email-why { margin: 0 0 6px; font-size: 15px; }
.t-email-now { margin: 0 0 10px; font-size: 15px; overflow-wrap: anywhere; }
.t-email-row { display: flex; flex-wrap: wrap; gap: 8px; }
.t-email-row input { flex: 1 1 200px; min-width: 0; min-height: 50px; font-size: 17px; padding: 10px 12px; }
.t-email-btn { flex: 1 0 auto; min-height: 50px; font-size: 16px; justify-content: center; }
.t-email-msg:not(:empty) { margin-top: 10px; }

/* certificate: two buttons */
.t-cert-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.t-cert-actions .btn { width: 100%; max-width: 320px; justify-content: center; }
.t-wa-btn { background: #1f8a4c; color: #fff; min-height: 56px; font-size: 18px; text-decoration: none; border: 0; }
.t-wa-btn:hover { background: #18733f; }
/* modules as tap-to-open rows */
.t-mods { gap: 8px; }
.t-mod { padding: 0; gap: 0; }
.t-mod > summary { list-style: none; cursor: pointer; min-height: 60px; padding: 10px 12px; -webkit-tap-highlight-color: transparent; }
.t-mod > summary::-webkit-details-marker { display: none; }
.t-mod > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 14px; }
.t-mod[open] > summary { border-bottom: 1px solid var(--line); }
.t-mod > :not(summary) { margin: 10px 12px 0; }
.t-mod > :last-child { margin-bottom: 12px; }
.t-mod-sum { display: block; font-size: 13.5px; color: var(--mute); }
.t-mod-chev { flex: none; font-size: 24px; line-height: 1; color: var(--mute); transition: transform .15s; }
.t-mod[open] .t-mod-chev { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .t-mod-chev { transition: none; } }
.t-badges { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.t-badge { padding: 10px 6px; }
.t-badge strong { font-size: 13px; }
.t-badge small { font-size: 12px; }
.t-badge-medal { width: 48px; height: 48px; }
.t-badge { padding: 10px 4px; }
.t-badge strong { font-size: 12.5px; overflow-wrap: normal; word-break: normal; hyphens: auto; -webkit-hyphens: auto; max-width: 100%; }
