/* Pre-hydration + auth-resolving shell (linked from index.html; mirrors AppBootShell). */

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

html, body {
  margin: 0;
  padding: 0;
}

.tc-boot-seo {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tc-boot-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    180deg,
    oklch(0.96 0.02 180) 0%,
    oklch(1 0 0) 42%,
    oklch(0.98 0.04 55) 100%
  );
  color: oklch(0.145 0 0);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
}

html.dark .tc-boot-page {
  background: linear-gradient(
    180deg,
    oklch(0.2 0.03 180) 0%,
    oklch(0.145 0 0) 42%,
    oklch(0.18 0.04 55) 100%
  );
  color: oklch(0.985 0 0);
}

.tc-boot-page__inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.tc-boot {
  width: 100%;
  max-width: 32rem;
  text-align: center;
}

.tc-boot__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
  padding: 1.75rem 1.5rem 1.75rem;
  border-radius: 1.25rem;
  background: oklch(0.13 0 0);
  color: oklch(0.985 0 0);
  box-shadow:
    0 24px 48px -12px oklch(0 0 0 / 0.35),
    0 0 0 1px oklch(1 0 0 / 0.06);
}

html.dark .tc-boot__card {
  box-shadow:
    0 24px 48px -12px oklch(0 0 0 / 0.55),
    0 0 0 1px oklch(1 0 0 / 0.08);
}

@media (min-width: 640px) {
  .tc-boot__card {
    max-width: 28rem;
    padding: 2rem 2rem 2rem;
    border-radius: 1.5rem;
  }
}

.tc-boot__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

/* Wordmark for dark surfaces — always inside the boot card. */
.tc-boot__card .tc-boot__logo--light {
  display: none;
}

.tc-boot__card .tc-boot__logo--dark {
  display: block;
}

.tc-boot__logo {
  display: block;
  height: 4rem;
  width: auto;
  max-width: min(380px, 88vw);
  object-fit: contain;
}

html.dark .tc-boot__logo--light {
  display: none;
}

.tc-boot__logo--dark {
  display: none;
}

html.dark .tc-boot__logo--dark {
  display: block;
}

.tc-boot__loader-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  min-height: 5.75rem;
}

/* MatrixLoader is a single flex child after hydration — keep 2rem internal gap. */
.tc-boot__loader-row > .flex-row {
  gap: 2rem;
}

/* Pre-hydration matrix placeholder — matches MatrixLoader size="md" (92×92). */
.tc-boot__matrix-fallback {
  display: grid;
  grid-template-columns: repeat(5, 16px);
  gap: 3px;
  width: 92px;
  height: 92px;
  flex-shrink: 0;
}

.tc-boot__matrix-fallback span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background: #261c00;
}

/* Pre-hydration: outer ring lit (matches MatrixLoader initial frame). */
.tc-boot__matrix-fallback span:nth-child(-n + 5),
.tc-boot__matrix-fallback span:nth-child(6),
.tc-boot__matrix-fallback span:nth-child(10),
.tc-boot__matrix-fallback span:nth-child(11),
.tc-boot__matrix-fallback span:nth-child(15),
.tc-boot__matrix-fallback span:nth-child(16),
.tc-boot__matrix-fallback span:nth-child(20),
.tc-boot__matrix-fallback span:nth-child(n + 21) {
  background: #ffb900;
  animation: tc-boot-pulse 1.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes tc-boot-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.tc-boot__loader-text-fallback {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.025em;
  color: oklch(0.985 0 0 / 0.9);
  animation: tc-boot-pulse 1.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

