/* ===========================================================================
   Welcome

   The signed-out front door: the sign-in button, and the other apps. It shares
   the app's tokens rather than having a look of its own, so the theme someone
   chose survives signing out and the first thing they see after signing in is
   the same surface in the same colours.
   ======================================================================== */
/* The base sheet already paints the paper and sets the type; this only stops
   a short page leaving the ground colour half-drawn. */
.welcome-page {
  min-height: 100%;
}

.welcome {
  max-width: 460px;
  margin: 0 auto;
  padding: 8vh 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.welcome__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 30px 26px;
  text-align: center;
  box-shadow: var(--shadow-pop);
}

.welcome__logo {
  display: block;
  width: 100%;
  max-width: 168px;
  height: auto;
  margin: 0 auto 22px;
}

/* Same three-state theme switch as the rail's wordmark: light by default,
   dark under the media query unless light was chosen explicitly, and the
   stamped choice winning over both. */
.welcome__logo--dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .welcome__logo--light { display: none; }
  :root:not([data-theme='light']) .welcome__logo--dark { display: block; }
}

:root[data-theme='dark'] .welcome__logo--light { display: none; }
:root[data-theme='dark'] .welcome__logo--dark { display: block; }
:root[data-theme='light'] .welcome__logo--light { display: block; }
:root[data-theme='light'] .welcome__logo--dark { display: none; }

/* The text wordmark is the fallback for a missing asset, so it is hidden
   until welcome.js says the images did not load. */
.welcome__wordmark {
  display: none;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.welcome.is-textonly .welcome__wordmark {
  display: block;
}

/* Only shown after a sign-out, so it must read as information rather than as
   a warning — nothing has gone wrong. */
.welcome__bye {
  margin: 0 0 20px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
}

.welcome__title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.welcome__lede {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.55;
}

.welcome__signin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.12s var(--ease), transform 0.12s var(--ease);
}

.welcome__signin:hover {
  opacity: 0.9;
}

.welcome__signin:active {
  transform: translateY(1px);
}

.welcome__signin:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Microsoft's mark keeps its own colours in both themes — it is their brand,
   not ours, and a recoloured one stops being the reassurance it is there for. */
.welcome__ms {
  width: 16px;
  height: 16px;
  flex: none;
}

.welcome__hint {
  margin: 16px 0 0;
  color: var(--ink-faint);
  font-size: 11.5px;
  line-height: 1.6;
}

.welcome__hint strong {
  color: var(--ink-soft);
  font-weight: 500;
}

.welcome__more-title {
  margin: 0 0 10px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.welcome__apps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.welcome__app {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.12s var(--ease), background 0.12s var(--ease);
}

.welcome__app:hover {
  border-color: var(--line-strong);
  background: var(--surface-sunk);
}

.welcome__app:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.welcome__app-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.welcome__app-icon svg {
  width: 19px;
  height: 19px;
}

.welcome__app-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.welcome__app-name {
  font-size: 13.5px;
  font-weight: 500;
}

.welcome__app-blurb {
  color: var(--ink-faint);
  font-size: 11.5px;
}

.welcome__app-arrow {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--ink-faint);
  transition: transform 0.12s var(--ease);
}

.welcome__app-arrow svg {
  width: 16px;
  height: 16px;
}

.welcome__app:hover .welcome__app-arrow {
  transform: translateX(2px);
  color: var(--accent);
}

.welcome__foot {
  margin: 12px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 460px) {
  .welcome {
    padding: 4vh 14px 32px;
  }
  .welcome__card {
    padding: 26px 20px 22px;
  }
}
