/* Trytest login — self-contained (no Tailwind CDN) for lighter concurrent load */
:root {
  --tt-ink: #0f172a;
  --tt-muted: #64748b;
  --tt-line: #e2e8f0;
  --tt-surface: #ffffff;
  --tt-sky: #dbeafe;
  --tt-sky-deep: #bfdbfe;
  --tt-brand: #1d4ed8;
  --tt-brand-press: #1e40af;
  --tt-ok: #059669;
  --tt-ok-press: #047857;
  --tt-danger-bg: #fef2f2;
  --tt-danger: #991b1b;
  --tt-ok-bg: #ecfdf5;
  --tt-ok-ink: #065f46;
  --tt-radius: 1.25rem;
  --tt-focus: 0 0 0 3px rgba(37, 99, 235, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html.tt-login,
html.tt-login body {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.tt-login-body {
  margin: 0;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--tt-ink);
  background:
    radial-gradient(120% 80% at 50% -10%, #eff6ff 0%, transparent 55%),
    radial-gradient(90% 60% at 100% 100%, #dbeafe 0%, transparent 45%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100vw;
  overflow: hidden;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

.tt-login-shell {
  width: min(100%, 26rem);
  margin: 0 auto;
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
}

.tt-login-brand {
  text-align: center;
  flex-shrink: 0;
}

.tt-login-brand__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: clamp(1.65rem, 6.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--tt-ink);
}

.tt-login-brand__mark svg {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

.tt-login-brand__tag {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--tt-muted);
}

.tt-login-hero {
  flex: 0 1 auto;
  min-height: 0;
  margin: 0.65rem -0.35rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: min(38vh, 240px);
}

.tt-login-hero picture,
.tt-login-hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(38vh, 240px);
  object-fit: contain;
  object-position: center bottom;
}

.tt-login-panel {
  flex-shrink: 0;
  margin-top: 0.35rem;
  background: var(--tt-surface);
  border: 1px solid var(--tt-line);
  border-radius: var(--tt-radius);
  padding: 1rem 1rem 1.1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.tt-login-panel__hint {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--tt-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.tt-login-alert {
  margin: 0 0 0.75rem;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.4;
  word-break: break-word;
}

.tt-login-alert--error {
  background: var(--tt-danger-bg);
  color: var(--tt-danger);
}

.tt-login-alert--ok {
  background: var(--tt-ok-bg);
  color: var(--tt-ok-ink);
}

.tt-login-form {
  display: grid;
  gap: 0.65rem;
}

.tt-login-field {
  position: relative;
}

.tt-login-field__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
  pointer-events: none;
}

.tt-login-input,
.tt-login-select {
  width: 100%;
  min-width: 0;
  appearance: none;
  border: 1px solid #cbd5e1;
  border-radius: 0.85rem;
  background: #fff;
  color: var(--tt-ink);
  font: inherit;
  font-size: 0.9375rem;
  padding: 0.8rem 0.9rem 0.8rem 2.5rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tt-login-select {
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath stroke='%2494a3b8' stroke-linecap='round' stroke-width='1.5' d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}

.tt-login-input::placeholder {
  color: #cbd5e1;
}

.tt-login-input:focus,
.tt-login-select:focus {
  border-color: #60a5fa;
  box-shadow: var(--tt-focus);
}

.tt-login-input--pin {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.35rem;
  letter-spacing: 0.35em;
  padding-left: 2.5rem;
  padding-right: 0.9rem;
}

.tt-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  border: 0;
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: var(--tt-brand);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.12s ease;
}

.tt-login-btn:active {
  transform: scale(0.985);
}

.tt-login-btn:hover {
  background: var(--tt-brand-press);
}

.tt-login-btn--ok {
  background: var(--tt-ok);
}

.tt-login-btn--ok:hover {
  background: var(--tt-ok-press);
}

.tt-login-meta {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--tt-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  justify-content: center;
  align-items: center;
}

.tt-login-meta a {
  color: var(--tt-brand);
  text-decoration: none;
  font-weight: 600;
}

.tt-login-meta a:hover {
  text-decoration: underline;
}

.tt-login-who {
  margin: 0 0 0.15rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--tt-muted);
}

.tt-login-who strong {
  color: var(--tt-ink);
  font-weight: 700;
}

.tt-login-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--tt-muted);
  cursor: pointer;
  user-select: none;
}

.tt-login-check input {
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--tt-brand);
}

.tt-login-foot {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  flex-shrink: 0;
}

.tt-login-passonly {
  width: min(100%, 26rem);
  margin: 0 auto;
  padding: 1rem;
  text-align: center;
}

.tt-login-passonly__card {
  background: var(--tt-surface);
  border: 1px solid var(--tt-line);
  border-radius: var(--tt-radius);
  padding: 2.5rem 1.5rem 1.75rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.tt-login-passonly__label {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #94a3b8;
}

.tt-login-passonly__code {
  margin: 1.75rem 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(2.5rem, 12vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--tt-ink);
}

.tt-login-passonly__card .tt-login-btn {
  margin-top: 2rem;
}

@media (min-height: 760px) {
  .tt-login-hero {
    max-height: min(42vh, 280px);
  }
  .tt-login-hero picture,
  .tt-login-hero img {
    max-height: min(42vh, 280px);
  }
}

@media (max-height: 640px) {
  .tt-login-hero {
    max-height: 28vh;
    margin-top: 0.35rem;
  }
  .tt-login-hero picture,
  .tt-login-hero img {
    max-height: 28vh;
  }
  .tt-login-brand__mark {
    font-size: 1.45rem;
  }
  .tt-login-panel {
    padding: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tt-login-btn,
  .tt-login-input,
  .tt-login-select {
    transition: none;
  }
}
