/* Two-step sign-in (js/twostep.js). Uses the institute's colour through the shared variables. */
.ts-card { max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.ts-card.wide { max-width: 880px; }
.ts-card h1 { margin: 0; }
.ts-card .lead { margin: 0; }
.ts-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.ts-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-fill, var(--brand)); color: var(--brand-fill-ink, var(--brand-ink)); font-weight: 800; }
.ts-eyebrow { margin: 4px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--brand-text, var(--brand)); }
.ts-setup { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 28px; align-items: start; }
.ts-steps { list-style: none; counter-reset: ts; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.ts-steps > li { counter-increment: ts; position: relative; padding-left: 44px; display: flex; flex-direction: column; gap: 6px; }
.ts-steps > li::before { content: counter(ts); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand-fill, var(--brand)) 14%, #fff); color: var(--brand-text, var(--brand)); font-weight: 800; font-size: 14px; }
.ts-steps > li > span { color: var(--ink-2); line-height: 1.5; }
.ts-key { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ts-key code { font: 600 16px/1.4 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .06em; background: #F8FAFA; border: 1px solid var(--rule); border-radius: 10px; padding: 6px 10px; word-break: break-all; color: var(--ink); }
.ts-qr { margin: 0; padding: 16px; border: 1px solid var(--rule); border-radius: 18px; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.ts-qr img { width: 200px; height: 200px; display: block; }
.ts-qr figcaption { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; word-break: break-word; }
.ts-cells { display: flex; gap: 8px; align-items: center; }
.ts-gap { width: 6px; }
.ts-cell { width: 48px !important; height: 58px; padding: 0 !important; box-sizing: border-box; text-align: center; font: 600 24px "IBM Plex Mono", ui-monospace, monospace;
  border-radius: 12px; border: 2px solid var(--control-line, #667085); background: #fff; color: var(--ink); }
.ts-cell:focus { border-color: var(--brand-fill, var(--brand)); outline: 3px solid color-mix(in srgb, var(--brand-fill, var(--brand)) 35%, transparent); outline-offset: 1px; }
.ts-cells.bad .ts-cell { border-color: var(--danger, #B42318); }
.ts-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.ts-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ts-ok { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; color: #027A48; }
.ts-ok svg { fill: none; stroke: currentColor; stroke-width: 2.5; }
.ts-codes { list-style: none; margin: 0; padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; background: #F8FAFA; border-radius: 16px; counter-reset: c; }
.ts-codes li { counter-increment: c; display: flex; gap: 10px; align-items: baseline; }
.ts-codes li::before { content: counter(c) "."; width: 22px; text-align: right; color: var(--ink-2); font-size: 13px; }
.ts-codes code { font: 600 18px "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .05em; color: var(--ink); }
.ts-tick { display: flex; gap: 10px; align-items: center; margin: 0; }
.ts-tick input { width: 18px; height: 18px; }
.ts-lost, .ts-links { margin: 0; }
.ts-backup { font-size: 20px !important; letter-spacing: .08em; max-width: 220px; }
.ts-field { display: flex; flex-direction: column; gap: 6px; }
.ts-field label { font-weight: 600; }
.ts-card form { display: flex; flex-direction: column; gap: 12px; }
.ts-over { position: fixed; inset: 0; z-index: 70; overflow: auto; background: var(--page, #F8FAFA); }
.ts-over .auth { min-height: 100%; }
.ts-dialog { width: min(540px, 100%); }
.ts-dialog p { margin: 0; line-height: 1.5; }
.ts-panel { display: flex; flex-direction: column; gap: 16px; }
.ts-panel .panel { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.ts-panel h2 { margin: 0; }
.ts-panel .muted { margin: 4px 0 0; line-height: 1.5; }
.ts-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ts-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ts-stat { background: #F8FAFA; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.ts-stat span { font-size: 13px; color: var(--ink-2); }
.ts-stat b { font-size: 17px; color: var(--ink); }
.ts-off { color: var(--danger, #B42318) !important; border-color: #D9928A !important; }
.ts-req { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule-2); cursor: pointer; }
.ts-req > span { display: flex; flex-direction: column; gap: 2px; }
.ts-switch { appearance: none; -webkit-appearance: none; width: 48px !important; min-width: 48px; height: 28px; border-radius: 999px; background: #D0D5DD; position: relative; flex: none; cursor: pointer; padding: 0 !important; margin: 0; border: 0 !important; transition: background .15s; }
.ts-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.ts-switch:checked { background: var(--brand-fill, var(--brand)); }
.ts-switch:checked::after { transform: translateX(20px); }
.ts-switch:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-fill, var(--brand)) 45%, transparent); outline-offset: 2px; }
.ts-sum:not([hidden]) { display: flex !important; flex-direction: row !important; align-items: center; gap: 14px; }
.ts-sum svg { fill: none; stroke: var(--brand-text, var(--brand)); stroke-width: 2; flex: none; }
.ts-toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 90; background: var(--night, #101828); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.ts-toast.on { opacity: 1; transform: translate(-50%, 0); }
.ts-toast.bad { background: #8F1D13; }
@media (max-width: 760px) {
  .ts-setup { grid-template-columns: 1fr; }
  .ts-qr { order: -1; }
  .ts-stats { grid-template-columns: 1fr; }
  .ts-codes { grid-template-columns: 1fr; }
  .ts-cell { width: 42px !important; height: 52px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .ts-toast, .ts-switch, .ts-switch::after { transition: none; } }
/* the institute's split sign-in layout (branding.js) isn't used for these screens */
.auth.ts-auth[data-split] { grid-template-columns: minmax(0, 1fr) !important; place-items: center; }
.auth.ts-auth .bd-pane { display: none !important; }
.auth.ts-auth[data-split] .auth-card.ts-card { max-width: 520px; background: var(--surface); border: 1px solid var(--rule); border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); padding: 36px 32px; }
.auth.ts-auth[data-split] .auth-card.ts-card.wide { max-width: 880px; }
.ts-field label { margin: 0; }
@media (max-width: 480px) {
  .ts-card, .auth.ts-auth[data-split] .auth-card.ts-card { padding: 24px 18px; }
  .ts-steps > li { padding-left: 38px; }
  .ts-cells { gap: 6px; } .ts-gap { width: 2px; }
  .ts-cell { width: 38px !important; height: 50px; font-size: 20px; border-radius: 10px; }
  .ts-actions .btn { flex: 1 1 auto; }
}
