/* Auth pages in the landing's language.
   The component tokens and buttons come from tsl.css; everything here is the
   two-column auth shell around them. Scoped under .a-root so the app's other
   pages keep their own styling. */

html, body { margin: 0; padding: 0; }
html, body { background: #ffffff; }
html.tsl-dark, html.tsl-dark body { background: #0b0c0f; }

.a-root {
  /* the cobalt palette normally arrives as inline vars on the landing's root;
     the auth shell declares the same stops so the mosaics and accents match */
  --tsl-c0: #1b36f2;
  --tsl-c1: #4f6bff;
  --tsl-c2: #a3b2ff;
  --tsl-c3: #eceeff;
  --tsl-accent: #2f4dff;
  --tsl-on-accent: #ffffff;
  min-height: 100svh;
}

.a-frame {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--tsl-line);
  border-right: 1px solid var(--tsl-line);
}

.a-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
}

/* ------------------------------------------------------------------ left */

.a-main {
  display: flex;
  flex-direction: column;
  padding: 22px var(--tsl-gut) 26px;
  min-width: 0;
}

.a-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
}

.a-brand {
  color: var(--tsl-ink);
  text-decoration: none;
}

.a-brand .tsl-mark {
  color: var(--tsl-accent);
}

.a-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12.5px;
  color: var(--tsl-soft);
}

.a-nav > a:not(.tsl-btn) {
  transition: color 0.2s;
}

.a-nav > a:not(.tsl-btn):hover {
  color: var(--tsl-ink);
}

.a-top-cta {
  height: 34px;
  padding: 0 14px;
  font-size: 10.5px;
}

.a-theme {
  border: 1px solid var(--tsl-line2);
  border-radius: 2px;
  color: var(--tsl-soft);
}

.a-form {
  margin: auto 0;
  padding: 44px 0 36px;
  width: 100%;
  max-width: 404px;
}

.a-h1 {
  margin-top: 16px;
  font-family: var(--tsl-serif);
  font-weight: 400;
  font-size: clamp(30px, 3.1vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 15ch;
}

.a-lede {
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--tsl-soft);
  max-width: 42ch;
}

.a-form form {
  margin-top: 26px;
}

.a-field {
  margin-bottom: 14px;
}

.a-label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--tsl-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tsl-muted);
}

.a-inputwrap {
  position: relative;
}

.a-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--tsl-line2);
  border-radius: 2px;
  background: var(--tsl-card);
  font: inherit;
  font-size: 14px;
  color: var(--tsl-ink);
  outline: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.a-input::placeholder {
  color: var(--tsl-faint);
}

.a-input:focus {
  border-color: var(--tsl-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tsl-accent) 18%, transparent);
}

.a-input[aria-invalid="true"] {
  border-color: #e5484d;
}

.a-inputwrap:has(.a-reveal) .a-input {
  padding-right: 58px;
}

.a-reveal {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 8px;
  font-family: var(--tsl-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tsl-muted);
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
}

.a-reveal:hover {
  color: var(--tsl-ink);
  background: var(--tsl-panel);
}

.a-hint {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--tsl-muted);
}

.a-hint a {
  color: var(--tsl-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.a-forgot {
  margin: -2px 0 0;
  text-align: right;
  font-size: 12px;
}

.a-submit {
  margin-top: 20px;
}

.a-btn-block {
  width: 100%;
  height: 44px;
}

.a-alt {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--tsl-line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--tsl-muted);
}

.a-alt a {
  color: var(--tsl-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.a-demo {
  margin-top: 16px;
}

.a-fine {
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--tsl-faint);
  text-align: center;
}

.a-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--tsl-line);
  font-size: 11.5px;
  color: var(--tsl-faint);
}

.a-foot-links {
  display: flex;
  gap: 14px;
}

.a-foot a:hover {
  color: var(--tsl-ink);
}

/* flash messages (shared partial keeps its .flash classes) */
.a-root .flash {
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid var(--tsl-line2);
  border-left: 2px solid var(--tsl-accent);
  border-radius: 2px;
  background: var(--tsl-panel);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--tsl-soft);
}

.a-root .flash.error {
  border-left-color: #e5484d;
}

.a-root .flash.ok,
.a-root .flash.success {
  border-left-color: #2f9e6e;
}

/* ----------------------------------------------------------------- right */

.a-aside {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--tsl-c1);
  border-left: 1px solid var(--tsl-line);
  display: grid;
  place-items: center;
  padding: 48px 36px;
}

.a-mosaic {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* keep the copy over the art readable where the silk texture goes light */
.a-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 14, 60, 0.1) 0%, rgba(8, 14, 60, 0.34) 100%);
}

.a-mosaic canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.a-aside-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 372px;
  display: grid;
  gap: 16px;
}

.a-aside-kicker {
  font-family: var(--tsl-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  align-items: center;
  gap: 8px;
}

.a-aside-kicker::before {
  content: "";
  width: 16px;
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
}

.a-proof {
  background: var(--tsl-card);
  border-radius: 8px;
  padding: 16px 16px 14px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.22), 0 30px 60px -24px rgba(12, 20, 80, 0.55);
}

.a-proof .tsl-card-head {
  padding-bottom: 10px;
  margin-bottom: 6px;
}

.a-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--tsl-line);
  font-size: 12px;
}

.a-row:last-of-type {
  border-bottom: 0;
}

.a-dom {
  font-family: var(--tsl-mono);
  font-size: 11px;
  color: var(--tsl-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a-why {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--tsl-muted);
}

.a-tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: 10px;
  font-family: var(--tsl-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--tsl-panel);
  color: var(--tsl-soft);
}

.a-tag[data-tone="hot"] {
  background: color-mix(in srgb, var(--tsl-accent) 14%, transparent);
  color: var(--tsl-accent);
}

.a-proof-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--tsl-line);
}

.a-proof-foot b {
  display: block;
  font-family: var(--tsl-serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
}

.a-proof-foot span {
  display: block;
  margin-top: 4px;
  font-family: var(--tsl-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tsl-muted);
}

.a-aside-note {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 2px rgba(10, 20, 70, 0.3);
}

.a-aside-tag {
  font-family: var(--tsl-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

/* ----------------------------------------------------------------- mobile */

@media (max-width: 1023px) {
  .a-frame {
    border-left: 0;
    border-right: 0;
    min-height: 100svh;
  }

  .a-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .a-aside {
    order: -1;
    border-left: 0;
    border-bottom: 1px solid var(--tsl-line);
    min-height: 148px;
    padding: 0;
    display: block;
  }

  .a-aside-inner {
    display: none;
  }

  .a-main {
    padding: 16px 20px 22px;
  }

  .a-form {
    padding: 34px 0 28px;
    max-width: none;
  }

  .a-h1 {
    max-width: 18ch;
  }

  .a-nav {
    gap: 12px;
    font-size: 12px;
  }

  .a-nav > a:not(.tsl-btn) {
    display: none;
  }

  .a-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .a-top-cta {
    height: 32px;
    padding: 0 10px;
    font-size: 10px;
  }

  .a-brand {
    font-size: 18px;
  }
}

.a-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.a-code {
  font-family: var(--tsl-mono);
  font-size: 18px;
  letter-spacing: 0.3em;
  text-align: center;
  height: 52px;
}

@media (max-width: 560px) {
  .a-row2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
