/* Public forms: the free assessment page, the contact form and every dropdown on the public site.
   Loaded after site.css and tgselect.css. Colours come from the site variables, so Brand settings still apply. */

/* ---------- dropdown skin (Telegram style, matched to the site) ---------- */
.tgs, .tgs-pop { --g: var(--primary); --bd: #D9D2BE; }
select.tg-native { min-height: 0 !important; }
.tgs-btn { min-height: 52px; padding: 12px 16px; border: 1.5px solid #D9D2BE; border-radius: 12px; background: #fff; font-size: 1rem; text-align: start; transition: border-color .18s, box-shadow .2s, background .18s, transform .15s; }
.tgs-btn:hover { border-color: color-mix(in srgb, var(--primary) 38%, #D9D2BE); }
.tgs-btn:active { transform: scale(.995); }
.tgs-btn:focus-visible, .tgs.open .tgs-btn { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
.tgs.bad .tgs-btn { border-color: #A12B2B; box-shadow: 0 0 0 4px rgba(161, 43, 43, .1); }
.tgs-val.ph { color: #8B8F86; }
.tgs-chev { width: 20px; height: 20px; color: var(--primary); opacity: .7; }
.tgs-pop { background: color-mix(in srgb, var(--surface) 96%, transparent); border: 1px solid var(--border); border-radius: 16px; padding: 8px; box-shadow: 0 24px 56px -12px rgba(28, 45, 36, .32), 0 2px 10px rgba(28, 45, 36, .08); }
.tgs-opt { padding: 12px 14px; border-radius: 11px; font-size: 1rem; }
.tgs-opt.hl { background: var(--accent-soft); }
.tgs-opt.sel { color: var(--primary); }
.tgs-opt .rp { background: color-mix(in srgb, var(--primary) 16%, transparent); }
.tgs-pop.sheet { background: var(--surface); }
.tgs-pop.sheet::before { background: #D9D2BE; }
.tgs-sheet-title { display: none; }
.tgs-pop.sheet .tgs-sheet-title { display: block; padding: 2px 14px 12px; font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; color: var(--primary); border-bottom: 1px solid var(--border); margin-bottom: 8px; }
[dir="rtl"] .tgs-btn { text-align: right; }

/* ---------- hero ---------- */
.assess-hero { padding: 52px 0 30px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 70%, var(--bg)) 0%, var(--bg) 100%); border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.assess-hero h1 { max-width: 18ch; }
.assess-hero .lead { max-width: 56ch; margin-bottom: 1.4rem; }
.fx-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.fx-chips li { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px 8px 10px; font-size: .88rem; font-weight: 500; color: var(--primary); box-shadow: 0 1px 2px rgba(28, 45, 36, .04); }
.fx-chips svg { width: 18px; height: 18px; flex: none; padding: 3px; border-radius: 50%; background: var(--primary); color: #fff; }
[dir="rtl"] .fx-chips li { padding: 8px 10px 8px 14px; }

/* ---------- layout ---------- */
.assess { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.assess-main { min-width: 0; }
.assess-side { position: sticky; top: 96px; display: grid; gap: 16px; }
.assess .form-wrap { max-width: none; }
@media (max-width: 900px) {
  .assess { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .assess-side { position: static; order: -1; }
}

/* ---------- the form card ---------- */
.form-card.fx { padding: 0; overflow: hidden; border-radius: 20px; border-color: color-mix(in srgb, var(--border) 85%, var(--primary)); box-shadow: 0 24px 50px -30px rgba(28, 45, 36, .35); animation: fx-in .5s var(--ease, ease) both; }
.fx-prog { display: flex; align-items: center; gap: 14px; padding: 16px 30px; background: color-mix(in srgb, var(--accent-soft) 55%, #fff); border-bottom: 1px solid var(--border); }
.fx-prog .lab { font-size: .8rem; font-weight: 600; color: var(--primary); white-space: nowrap; letter-spacing: .01em; }
.fx-track { flex: 1; height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--primary) 12%, #fff); overflow: hidden; }
.fx-fill { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 70%, var(--accent))); transition: width .5s cubic-bezier(.22, 1, .36, 1); }
.fx-sec { padding: 26px 30px 8px; }
.fx-sec + .fx-sec { border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.fx-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.fx-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .86rem; font-weight: 700; background: var(--primary); color: #fff; transition: background .3s; }
.fx-sec.done .fx-num { background: var(--accent); color: var(--primary-ink); }
.fx-head h3 { margin: 0; font-size: 1.22rem; }
.fx-head p { margin: 0; font-size: .84rem; color: var(--muted); line-height: 1.35; }
.fx-foot { padding: 8px 30px 28px; }
@media (max-width: 560px) { .fx-sec { padding: 22px 18px 4px; } .fx-foot { padding: 6px 18px 22px; } .fx-prog { padding: 14px 18px; } }

/* fields */
.form-card.fx .field { margin-bottom: 20px; }
.form-card.fx .field label, .form-card.fx .field .lbl { font-size: .9rem; margin-bottom: 7px; letter-spacing: .005em; }
.form-card.fx input[type=text], .form-card.fx input[type=email], .form-card.fx input[type=tel], .form-card.fx textarea { min-height: 52px; border-radius: 12px; padding: 13px 16px; font-size: 1rem; border: 1.5px solid #D9D2BE; transition: border-color .18s, box-shadow .2s; }
.form-card.fx input::placeholder, .form-card.fx textarea::placeholder { color: #8B8F86; }
.form-card.fx input:hover, .form-card.fx textarea:hover { border-color: color-mix(in srgb, var(--primary) 38%, #D9D2BE); }
.form-card.fx input:focus, .form-card.fx textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
.form-card.fx input.invalid, .form-card.fx textarea.invalid { border-color: #A12B2B; box-shadow: 0 0 0 4px rgba(161, 43, 43, .08); }
.form-card.fx textarea { min-height: 128px; line-height: 1.55; }
.fx-count { text-align: end; font-size: .76rem; color: var(--muted); margin-top: 4px; }
.form-card.fx .field .hint { margin-top: 6px; }
.form-card.fx .field .err:not(:empty) { display: block; margin-top: 8px; padding: 8px 12px; border-radius: 9px; background: #FBECEC; border: 1px solid #EBC4C4; color: #7A1F1F; font-size: .84rem; animation: fx-err .28s ease both; }
.fx-note { display: flex; gap: 10px; align-items: flex-start; margin: -6px 0 20px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--accent-soft) 60%, #fff); border: 1px solid var(--border); font-size: .86rem; color: var(--primary); }
.fx-note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

/* consent */
.fx-consent { margin-bottom: 18px; }
.fx-consent .check { padding: 14px 16px; border: 1.5px solid #D9D2BE; border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .18s, background .18s, box-shadow .2s; align-items: center; }
.fx-consent .check:hover { border-color: color-mix(in srgb, var(--primary) 38%, #D9D2BE); }
.fx-consent .check:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, #fff); }
.fx-consent .check:has(input:focus-visible) { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
.fx-consent .check input { appearance: none; -webkit-appearance: none; margin: 0; width: 24px; height: 24px; flex: none; border-radius: 7px; border: 2px solid #B9B29B; background: #fff; display: grid; place-items: center; cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.fx-consent .check input::after { content: ""; width: 11px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .2s cubic-bezier(.2, 1.4, .4, 1); }
.fx-consent .check input:checked { background: var(--primary); border-color: var(--primary); }
.fx-consent .check input:checked::after { transform: rotate(-45deg) scale(1); }
.fx-consent .check input:active { transform: scale(.92); }

/* submit */
.btn.fx-submit { width: 100%; min-height: 58px; font-size: 1.04rem; border-radius: 14px; gap: 10px; position: relative; letter-spacing: .005em; }
.btn.fx-submit svg { width: 20px; height: 20px; transition: transform .25s var(--ease, ease); }
.btn.fx-submit:hover svg { transform: translateX(4px); }
[dir="rtl"] .btn.fx-submit svg { transform: scaleX(-1); }
[dir="rtl"] .btn.fx-submit:hover svg { transform: scaleX(-1) translateX(4px); }
.btn.fx-submit.is-busy { pointer-events: none; }
.btn.fx-submit.is-busy svg { display: none; }
.btn.fx-submit.is-busy::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: fx-spin .7s linear infinite; }
.fx-fine { margin: 14px 0 0; text-align: center; font-size: .84rem; color: var(--muted); }

/* side column */
.fx-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; }
.fx-card h3 { font-size: 1.15rem; margin-bottom: 14px; }
.fx-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.fx-steps li { position: relative; padding-inline-start: 44px; padding-bottom: 18px; counter-increment: s; }
.fx-steps li:last-child { padding-bottom: 0; }
.fx-steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 700; color: var(--primary); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border)); }
.fx-steps li::after { content: ""; position: absolute; inset-inline-start: 14.5px; top: 34px; bottom: 4px; width: 1px; background: var(--border); }
.fx-steps li:last-child::after { display: none; }
.fx-steps .tt { display: block; font-weight: 600; color: var(--primary); font-size: .95rem; line-height: 1.3; }
.fx-steps .dd { display: block; font-size: .86rem; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.fx-card.wa p { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.fx-card.wa .btn { width: 100%; }
.fx-card.priv { font-size: .86rem; color: var(--muted); background: transparent; border-style: dashed; }
.fx-card.priv a { font-weight: 600; }
@media (max-width: 900px) {
  .fx-card.priv { display: none; }
  .fx-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .fx-steps li { padding: 0; text-align: center; }
  .fx-steps li::before { position: static; margin: 0 auto 8px; }
  .fx-steps li::after { display: none; }
  .fx-steps .dd { display: none; }
  .fx-card { padding: 16px; }
  .fx-card h3 { font-size: 1rem; margin-bottom: 12px; }
}

/* success */
.form-card.success-card.fx-done { padding: 44px 28px 36px; border-radius: 22px; animation: fx-in .5s var(--ease, ease) both; }
.fx-done .tick { width: 76px; height: 76px; background: color-mix(in srgb, var(--primary) 10%, #fff); color: var(--primary); box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 6%, transparent); }
.fx-done .tick svg { width: 38px; height: 38px; }
.fx-done .tick path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: fx-draw .6s .25s ease forwards; }
.fx-done h2 { margin-bottom: .4em; }
.fx-done > p { max-width: 46ch; margin-inline: auto; }
.fx-ref { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 4px 0 8px; }
.fx-copy { font: inherit; font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--primary); cursor: pointer; transition: background .15s, border-color .15s; }
.fx-copy:hover { background: var(--accent-soft); }
.fx-next { text-align: start; list-style: none; margin: 22px auto 6px; padding: 18px 20px; max-width: 440px; border-radius: 14px; background: color-mix(in srgb, var(--accent-soft) 55%, #fff); border: 1px solid var(--border); display: grid; gap: 10px; font-size: .92rem; }
.fx-next li { display: flex; gap: 10px; align-items: flex-start; }
.fx-next svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--primary); }

/* contact page uses the same card language */
.form-card.fx-plain { border-radius: 20px; padding: 28px 30px; box-shadow: 0 24px 50px -34px rgba(28, 45, 36, .35); }
.form-card.fx-plain input[type=text], .form-card.fx-plain input[type=email], .form-card.fx-plain input[type=tel], .form-card.fx-plain textarea { min-height: 52px; border-radius: 12px; padding: 13px 16px; }
.form-card.fx-plain textarea { min-height: 150px; }
.form-card.fx-plain .btn[type=submit] { width: 100%; min-height: 56px; border-radius: 14px; font-size: 1.02rem; }

@keyframes fx-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fx-err { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .form-card.fx, .fx-done, .fx-fill, .fx-done .tick path, .form-card.fx .field .err:not(:empty) { animation: none !important; transition: none !important; } .fx-done .tick path { stroke-dashoffset: 0; } }
.assess.solo { grid-template-columns: minmax(0, 1fr); }
.form-card.fx .fx-consent label.check { display: flex; margin: 0; font-weight: 400; color: var(--text); }
.fx-chips-top { margin-bottom: 22px; }
main[data-page="assessment"] .page-hero { background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 70%, var(--bg)) 0%, var(--bg) 100%); padding: 52px 0 30px; }
main[data-page="assessment"] .page-hero .lead { max-width: 56ch; }
@media (max-width: 900px) { .fx-chips-top { gap: 8px; } .fx-chips li { font-size: .8rem; padding: 6px 12px 6px 8px; } }
main[data-page="assessment"] .page-hero + .section, main[data-page="assessment"] [data-sec] + .section { padding-top: 26px; } main[data-page="assessment"] .page-hero { padding-bottom: 8px; }

/* ---------- teacher application ---------- */
.fx-chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-chip { display: inline-flex; cursor: pointer; }
.fx-chip input { position: absolute; opacity: 0; pointer-events: none; }
.fx-chip span { display: inline-block; padding: 9px 15px; border: 1.5px solid #D9D2BE; border-radius: 999px; background: #fff; font-size: .93rem; transition: border-color .15s, background .15s, color .15s; user-select: none; }
.fx-chip:hover span { border-color: color-mix(in srgb, var(--primary) 40%, #D9D2BE); }
.fx-chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.fx-chip input:focus-visible + span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.fx-qual { position: relative; display: grid; grid-template-columns: 1.6fr 1.3fr 1.3fr 90px; gap: 0 12px; padding: 14px 44px 0 14px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--accent-soft) 35%, #fff); }
.fx-qual .field { margin-bottom: 14px; min-width: 0; }
.fx-qual label { font-size: .82rem; }
.fx-qual .fx-x, .fx-files button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1.4rem; line-height: 1; border-radius: 8px; width: 32px; height: 32px; }
.fx-qual .fx-x { position: absolute; top: 8px; inset-inline-end: 8px; }
.fx-qual .fx-x:hover, .fx-files button:hover { background: #F3E3E0; color: #8E3425; }
@media (max-width: 720px) { .fx-qual { grid-template-columns: 1fr 1fr; } .fx-qual .field:nth-child(2) { grid-column: span 2; } }
@media (max-width: 460px) { .fx-qual { grid-template-columns: 1fr; padding-inline-end: 40px; } .fx-qual .field:nth-child(2) { grid-column: auto; } }
.fx-drop { display: flex; align-items: center; gap: 0; padding: 18px 18px; border: 1.5px dashed #BDB59B; border-radius: 14px; background: #fff; cursor: pointer; color: var(--muted); font-weight: 400 !important; transition: border-color .15s, background .15s; }
.fx-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fx-drop svg { width: 26px; height: 26px; flex: none; color: var(--primary); margin-inline-end: 12px; } .fx-drop b { margin-inline-end: .35em; }
.fx-drop b { color: var(--primary); }
.fx-drop:hover, .fx-drop.over, .fx-drop:focus-within { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 4%, #fff); }
.fx-files { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.fx-files li { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: .9rem; }
.fx-files .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-files .sz { color: var(--muted); font-size: .8rem; }
.fx-count { direction: ltr; }
