.tsu .tsu-actions{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.tsu .tsu-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}.tsu label{font-size:14px;font-weight:600;color:var(--tst-ink)}.tsu input[type=number],.tsu input[type=text]{width:100%;min-height:46px;padding:10px 12px;margin-top:6px;border:1px solid var(--tst-line);border-radius:8px;background:var(--tst-card);color:var(--tst-ink);font:400 16px/1.5 system-ui,sans-serif}.tsu-formula{font-size:14px;color:var(--tst-muted)}.tsu .tsu-status{max-width:none;margin-top:14px!important}.tsu .tsu-space-pad{width:100%;min-height:120px;margin:16px 0;font-size:clamp(18px,3vw,26px);background:var(--tst-card);color:var(--tst-ink);border:2px solid var(--tst-accent)}.tsu button:disabled{opacity:.55;cursor:default;filter:none}.tsu .tsu-prompt{height:auto;min-height:150px;max-height:270px;font-size:var(--tsu-size,22px)}.tsu .tsu-practice-input{font-size:var(--tsu-size,22px)}.tsu .tsu-prompt span.good{color:var(--tst-good);background:var(--tst-mark)}.tsu .tsu-prompt span.bad{color:var(--tst-bad);background:var(--tst-error);text-decoration:underline}.tsu .tsu-prompt span.current{border-bottom:3px solid var(--tst-accent)}.tsu-key-area{padding:18px 12px;background:var(--tst-card);border:2px solid var(--tst-line);border-radius:12px;margin:18px 0}.tsu-key-area:focus{border-color:var(--tst-accent)}.tsu-key-diagram{display:grid;gap:5px;margin:18px 0}.tsu-key-row{display:flex;gap:4px}.tsu-key{display:flex;align-items:center;justify-content:center;flex:1 1 0;min-width:0;min-height:36px;padding:4px 1px;font:500 clamp(9px,1.5vw,13px)/1.3 ui-monospace,monospace;border:1px solid var(--tst-line);border-radius:5px;background:var(--tst-bg);color:var(--tst-ink);overflow:hidden}.tsu-key[data-wide]{flex-grow:1.7}.tsu-key[data-code=Space]{flex-grow:6}.tsu-key.checked{background:var(--tst-mark);border-color:var(--tst-accent);box-shadow:inset 0 -3px var(--tst-accent)}.tsu-key.pressed{background:var(--tst-accent);color:var(--tst-card);transform:translateY(1px)}.tsu-key-last{font-size:15px;font-weight:600}.tsu .tst-stats strong{font-size:clamp(21px,3vw,30px)}.tsu-summary:focus{outline:2px solid var(--tst-accent)}
@media(max-width:650px){.tsu .tsu-form-grid{gap:12px}.tsu .tsu-actions button{flex:1 1 120px}.tsu-key-area{padding:12px 7px}.tsu-key-row{gap:2px}.tsu-key{border-radius:3px;font-size:8px;min-height:28px}}
/* Certificate setup follows the site theme; the certificate is always white and navy. */
.tst .ts-cert-setup{margin:20px 0 24px;padding:22px;border:1px solid var(--tst-line);border-radius:12px;background:var(--tst-card);min-width:0}
.tst .ts-cert-name-label{display:block;font-size:15px;font-weight:650;color:var(--tst-ink)}
.tst .ts-cert-name-pre{box-sizing:border-box;display:block;width:100%;max-width:100%;min-width:0;min-height:48px;margin:8px 0;padding:12px 14px;border:1px solid var(--tst-line);border-radius:8px;background:var(--tst-bg);color:var(--tst-ink);font:400 16px/1.5 system-ui,sans-serif}
.tst .ts-cert-name-pre:focus-visible{outline:2px solid var(--tst-accent);outline-offset:3px}
.tst .ts-cert-name-pre[aria-invalid=true]{border-color:var(--tst-bad)}
.tst .ts-cert-name-pre[readonly]{border-style:dashed}
.tst .ts-cert-setup .tst-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:16px;margin:20px 0}
.tst .ts-cert-setup .tst-settings>label{min-width:0;max-width:100%}
.tst .ts-cert-setup select{width:100%;min-width:0;max-width:100%}
.tst .ts-cert-start,.tst .ts-cert-actions button{min-height:46px;white-space:normal;line-height:1.4}
.tst .ts-cert-start:disabled{opacity:.75;cursor:default}
.tst .ts-cert-validation{margin:14px 0 0;color:var(--tst-bad);font-weight:550}
.tst .tst-input:disabled{cursor:not-allowed;opacity:.65}
.ts-certificate-controls{margin-top:24px;padding-top:22px;border-top:1px solid var(--tst-line)}
.ts-cert-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
.tst .ts-cert-actions button{margin:0}
.tst .ts-cert-actions .ts-cert-print{background:var(--tst-card);color:var(--tst-ink);border:1px solid var(--tst-line)}
.tst .ts-cert-actions button:disabled{opacity:.55;cursor:default}
.tst .ts-certificate-preview{margin:20px 0;min-width:0;max-width:100%;scroll-margin-top:24px}
.tst .ts-certificate{display:block;width:100%;max-width:100%;margin:0;padding:0;border:0;background:#fff;line-height:0;box-shadow:0 4px 20px rgb(0 0 0 / 6%)}
.tst .ts-cert-art{display:block;width:100%;max-width:100%;height:auto;margin:0;border:0;border-radius:0}
.ts-cert-print-sheet{display:none}
@media(max-width:600px){.tst .ts-cert-setup{padding:16px}.tst .ts-cert-start{width:100%}.ts-cert-actions button{flex:1 1 160px}}
@media(max-width:380px){.tst .ts-cert-setup .tst-settings{grid-template-columns:minmax(0,1fr);gap:12px}}
@media print{
 @page{size:A4 landscape;margin:8mm}
 body.ts-print-certificate{margin:0!important;padding:0!important;background:#fff!important}
 body.ts-print-certificate> :not(.ts-cert-print-sheet){display:none!important}
 body.ts-print-certificate>.ts-cert-print-sheet{display:block!important;width:100%;margin:0;padding:0;break-inside:avoid;page-break-inside:avoid}
 body.ts-print-certificate .ts-cert-print-sheet img{display:block;width:270mm;max-width:100%;height:auto;margin:0 auto;padding:0;border:0;print-color-adjust:exact;-webkit-print-color-adjust:exact}
}
