header .account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 0;
}

#account-email {
  margin: 0;
  color: var(--white);
  font-size: var(--meta);
  overflow-wrap: anywhere;
}

#sign-out {
  margin-left: 0;
  flex-shrink: 0;
}

/*
 * Sign-in page. It shares the Transcend Studio's family: a navy ground, the
 * logo as supplied on a white plaque with a keppel tab, one white panel with a
 * cut top-right corner, and one pill for the action. Fonts stay the hub's own.
 * Every rule is scoped to the gate, because this stylesheet stays loaded after
 * the hub replaces the page.
 */
body[data-page="gate"] {
  --gate-ink: #1f2a33;
  --gate-soft: #3d4852;
  --gate-hair: #c1ede4;
  --gate-gutter: clamp(16px, 7.5vw, 108px);
  --gate-cut: 28px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--navy);
}

body[data-page="gate"] ::selection {
  background: var(--keppel);
  color: #000;
}

body[data-page="gate"] .gate-wrap {
  width: min(1224px, 100% - 2 * var(--gate-gutter));
  margin-inline: auto;
}

body[data-page="gate"] .gate-header {
  border-bottom: 0;
}

body[data-page="gate"] .gate-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  min-height: 88px;
  padding-block: 14px;
}

body[data-page="gate"] .gate-brand {
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 0;
}

/* The logo file sits on white, as supplied; the keppel tab echoes the panel's cut corner. */
body[data-page="gate"] .gate-plaque {
  position: relative;
  display: block;
  flex: none;
  padding: 14px 26px 14px 22px;
  background: var(--white);
}

body[data-page="gate"] .gate-plaque::after {
  content: "";
  position: absolute;
  top: 0;
  right: -14px;
  width: 14px;
  height: 100%;
  background: var(--keppel);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

body[data-page="gate"] .gate-logo {
  display: block;
  width: 176px;
  height: auto;
}

body[data-page="gate"] .gate-credit {
  margin: 0;
  color: var(--sky);
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

body[data-page="gate"] .gate-surface {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

body[data-page="gate"] .gate-wordmark {
  margin: 0;
  color: var(--white);
  font: 400 36px/1 "Bebas Neue", sans-serif;
  letter-spacing: 0.06em;
}

body[data-page="gate"] .surface-label {
  color: var(--sky);
}

body[data-page="gate"] main {
  flex: 1;
}

body[data-page="gate"] .gate-stage {
  padding-block: clamp(32px, 8vh, 96px) clamp(56px, 12vh, 128px);
}

body[data-page="gate"] .gate-panel {
  max-width: 640px;
  padding: clamp(32px, 4.5vw, 64px);
  background: var(--white);
  color: var(--gate-ink);
  clip-path: polygon(0 0, calc(100% - var(--gate-cut)) 0, 100% var(--gate-cut), 100% 100%, 0 100%);
}

body[data-page="gate"] .gate-panel h1 {
  color: var(--navy);
  font-size: clamp(44px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  white-space: normal;
  text-wrap: balance;
}

/* The Studio's block bar under a heading. */
body[data-page="gate"] .gate-panel h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 8px;
  margin-top: 20px;
  background: var(--keppel);
}

body[data-page="gate"] .gate-lead {
  max-width: 40ch;
  margin: 24px 0 32px;
  font-size: clamp(18px, 1.4vw, 20px);
  line-height: 1.5;
}

body[data-page="gate"] #sign-in {
  margin: 0;
  min-height: 56px;
  padding: 16px 36px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font: 400 24px/1 "Bebas Neue", sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

body[data-page="gate"] #sign-in:disabled {
  cursor: progress;
}

/* White on the navy ground, navy inside the white panel; the skip link keeps its sky ring. */
body[data-page="gate"] :focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

body[data-page="gate"] .gate-panel :focus-visible {
  outline-color: var(--navy);
}

body[data-page="gate"] .skip:focus-visible {
  outline-color: var(--sky);
}

body[data-page="gate"] .gate-studio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 16px;
  margin: 40px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--gate-hair);
  color: var(--gate-soft);
  font-size: 16px;
}

body[data-page="gate"] .gate-studio > span {
  padding-block: 10px;
}

/* workspace.css gives .studio-link its weight, underline offset and hover. */
body[data-page="gate"] .gate-studio .studio-link {
  margin: 0;
  color: var(--navy);
}

#gate-message {
  margin: 16px 0 0;
  font-weight: 700;
}

#gate-message[hidden] {
  display: none;
}

@media (hover: hover) {
  body[data-page="gate"] #sign-in:hover:not(:disabled) {
    background: var(--sky);
    color: var(--navy);
  }
}

@media (max-width: 640px) {
  body[data-page="gate"] {
    --gate-cut: 18px;
  }

  body[data-page="gate"] .gate-bar {
    min-height: 72px;
  }

  body[data-page="gate"] .gate-brand {
    gap: 26px;
  }

  body[data-page="gate"] .gate-plaque {
    padding: 10px 18px 10px 14px;
  }

  body[data-page="gate"] .gate-plaque::after {
    right: -10px;
    width: 10px;
  }

  body[data-page="gate"] .gate-logo {
    width: 132px;
  }

  body[data-page="gate"] .gate-wordmark {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="gate"] #sign-in {
    transition: none;
  }
}
