/* Trytest login — mobile-first; desktop is a full-bleed split composition */
:root {
  --tt-ink: #0b1220;
  --tt-muted: #5b6b7c;
  --tt-line: #e2e8f0;
  --tt-surface: #ffffff;
  --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-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.tt-login-aside {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

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

.tt-login-brand__mark {
  color: var(--tt-brand);
  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-lede,
.tt-login-perks,
.tt-login-stage-foot {
  display: none;
}

.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__title,
.tt-login-panel__sub {
  display: none;
}

.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;
  }
}

/*
 * Desktop: edge-to-edge composition
 * Left = visual plane (brand + art)
 * Right = quiet sign-in surface
 * Not a centered mobile card floating in empty space.
 */
@media (min-width: 960px) {
  html.tt-login,
  html.tt-login body {
    overflow: hidden;
    max-height: none;
    height: 100%;
  }

  body.tt-login-body {
    display: block;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #f8fafc;
    overflow: hidden;
  }

  body.tt-login-body::before {
    display: none;
  }

  .tt-login-shell {
    width: 100%;
    max-width: none;
    max-height: none;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 28rem);
    align-items: stretch;
  }

  .tt-login-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 4vw, 3.25rem) clamp(2rem, 4vw, 3.5rem);
    overflow: hidden;
    background:
      radial-gradient(90% 70% at 18% 12%, rgba(96, 165, 250, 0.35) 0%, transparent 55%),
      radial-gradient(70% 55% at 88% 88%, rgba(37, 99, 235, 0.22) 0%, transparent 50%),
      linear-gradient(160deg, #0b1f3a 0%, #123968 42%, #1d4ed8 100%);
    color: #fff;
    animation: tt-stage-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .tt-login-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 40% 40%, #000 10%, transparent 75%);
  }

  .tt-login-stage::after {
    content: "";
    position: absolute;
    width: 28rem;
    height: 28rem;
    right: -8rem;
    top: -10rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.35) 0%, transparent 70%);
    pointer-events: none;
  }

  .tt-login-brand {
    position: relative;
    z-index: 1;
    text-align: left;
  }

  .tt-login-brand__mark {
    font-size: clamp(2.5rem, 3.6vw, 3.35rem);
    color: #fff;
    gap: 0.6rem;
  }

  .tt-login-brand__mark svg path {
    fill: #93c5fd;
    stroke: #93c5fd;
  }

  .tt-login-brand__tag {
    display: none;
  }

  .tt-login-lede {
    display: block;
    position: relative;
    z-index: 1;
    margin: 1rem 0 0;
    max-width: 22rem;
    font-size: clamp(1.05rem, 1.35vw, 1.25rem);
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -0.02em;
    color: rgba(226, 232, 240, 0.92);
  }

  .tt-login-hero {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    margin: 1.5rem 0 0;
    max-height: none;
    align-items: flex-end;
    justify-content: flex-start;
    min-height: 0;
  }

  .tt-login-hero picture,
  .tt-login-hero img {
    max-height: min(58vh, 460px);
    width: auto;
    max-width: min(100%, 36rem);
    object-position: left bottom;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.28));
    animation: tt-hero-float 5.5s ease-in-out infinite;
  }

  .tt-login-perks {
    display: none;
  }

  .tt-login-stage-foot {
    display: block;
    position: relative;
    z-index: 1;
    margin: 1.25rem 0 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.7);
  }

  .tt-login-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 4vw, 3.5rem) clamp(1.75rem, 3.5vw, 3rem);
    background:
      linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-left: 1px solid #e8eef5;
    animation: tt-aside-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
  }

  .tt-login-panel {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    max-width: 22rem;
    width: 100%;
  }

  .tt-login-panel__title {
    display: block;
    margin: 0;
    font-size: clamp(1.7rem, 2.2vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--tt-ink);
  }

  .tt-login-panel__sub {
    display: block;
    margin: 0.45rem 0 1.45rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--tt-muted);
  }

  .tt-login-panel__hint {
    justify-content: flex-start;
    text-align: left;
    margin-bottom: 1rem;
    padding: 0.65rem 0.8rem;
    border-radius: 0.75rem;
    background: #eff6ff;
    color: #1e40af;
    font-weight: 600;
  }

  .tt-login-form {
    gap: 0.85rem;
  }

  .tt-login-field__icon {
    color: #64748b;
  }

  .tt-login-input,
  .tt-login-select {
    border-color: #d5dee8;
    border-radius: 0.95rem;
    padding: 0.95rem 1rem 0.95rem 2.65rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  }

  .tt-login-input:focus,
  .tt-login-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
  }

  .tt-login-btn {
    margin-top: 0.25rem;
    border-radius: 0.95rem;
    padding: 1rem 1.1rem;
    font-size: 0.95rem;
    box-shadow: 0 10px 24px rgba(29, 78, 216, 0.22);
    transition:
      background 0.15s ease,
      transform 0.18s ease,
      box-shadow 0.18s ease;
  }

  .tt-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(29, 78, 216, 0.3);
  }

  .tt-login-btn:active {
    transform: translateY(0);
  }

  .tt-login-meta {
    justify-content: flex-start;
    margin-top: 1.1rem;
  }

  .tt-login-who {
    text-align: left;
    margin-bottom: 0.65rem;
    font-size: 0.88rem;
  }

  .tt-login-check {
    justify-content: flex-start;
  }

  .tt-login-foot {
    margin-top: 2rem;
    text-align: left;
    color: #94a3b8;
  }

  .tt-login-passonly {
    width: min(100%, 28rem);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
  }

  .tt-login-passonly__card {
    border: 0;
    border-radius: 1.35rem;
    padding: 2.75rem 2rem 2rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  }
}

@media (min-width: 1280px) {
  .tt-login-shell {
    grid-template-columns: minmax(0, 1.25fr) minmax(24rem, 30rem);
  }

  .tt-login-stage {
    padding-left: clamp(2.5rem, 5vw, 4.5rem);
  }

  .tt-login-hero picture,
  .tt-login-hero img {
    max-height: min(62vh, 520px);
  }
}

@keyframes tt-stage-in {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes tt-aside-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes tt-hero-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

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

  .tt-login-stage,
  .tt-login-aside,
  .tt-login-hero picture,
  .tt-login-hero img {
    animation: none;
  }

  .tt-login-btn:hover {
    transform: none;
  }
}
