/* Speed Kit partner portal: sign-in, access request and password pages.
   Brand: Poppins 400/500, blue #0568fd, the Speed Kit neutrals, Lucide icons. */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/poppins-400.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/poppins-500.woff2") format("woff2");
}

:root {
  color-scheme: light;

  --blue-50: #edf7ff;
  --blue-100: #d6edff;
  --blue-200: #b6e0ff;
  --blue-700: #0568fd;
  --blue-800: #094ec4;
  --blue-900: #0e459a;
  --blue-950: #0e2b5d;

  --bg: #ffffff;
  --ink: #282c39;
  --text: #4f5c7a;
  --text-soft: #647393;
  --line: #d4d8e3;
  --field-line: #8391ad;
  --field-line-hover: #647393;
  --field-bg: #ffffff;
  --tint: #f6f7f9;
  --switch-bg: #ecedf2;
  --switch-on: #ffffff;
  --primary: #0568fd;
  --primary-hover: #094ec4;
  --link: #0568fd;
  --focus: rgba(5, 104, 253, 0.28);
  --error: #b42318;
  --error-ink: #912018;
  --error-bg: #fef3f2;
  --error-line: #fecdca;
  --info-ink: #0e459a;
  --info-bg: #edf7ff;
  --info-line: #d6edff;
  --panel-top: #0568fd;
  --panel-mid: #0a52d6;
  --panel-end: #0e2b5d;

  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #10131a;
    --ink: #eef0f5;
    --text: #b8c0d2;
    --text-soft: #98a2b8;
    --line: #2c3345;
    --field-line: #6f7a94;
    --field-line-hover: #98a2b8;
    --field-bg: #161a23;
    --tint: #171b24;
    --switch-bg: #1b202b;
    --switch-on: #2a3140;
    --primary: #0568fd;
    --primary-hover: #0a5ad8;
    --link: #5b9dff;
    --focus: rgba(91, 157, 255, 0.38);
    --error: #ff8a80;
    --error-ink: #ffb4ab;
    --error-bg: #2b1716;
    --error-line: #5c2622;
    --info-ink: #b6e0ff;
    --info-bg: #122038;
    --info-line: #1d3257;
    --panel-top: #0a50cc;
    --panel-mid: #0b3b98;
    --panel-end: #0b2148;
  }
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 0.9fr);
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "main panel"
    "foot panel";
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p,
li {
  text-wrap: pretty;
}

h1,
h2 {
  text-wrap: balance;
}

a {
  color: var(--link);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* A link inside running text is underlined, so it does not rely on color. */
.prose a,
.alert a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

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

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- Page frame ---------- */

.main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 32px 48px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 32px;
  color: var(--ink);
}

.brand img {
  display: block;
  width: auto;
  height: 30px;
}

.brand-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}

.brand-product {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}

.content {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 56px 0 64px;
}

.foot {
  grid-area: foot;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 20px 48px 28px;
  font-size: 13px;
  color: var(--text-soft);
}

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

.foot a {
  color: inherit;
  font-weight: 400;
}

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

/* ---------- Sign in / Request access switch ---------- */

.switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 36px;
  padding: 4px;
  border-radius: 12px;
  background: var(--switch-bg);
}

.switch-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}

a.switch-item:hover {
  color: var(--ink);
  text-decoration: none;
  background: color-mix(in srgb, var(--switch-on) 55%, transparent);
}

.switch-item[aria-current="page"] {
  background: var(--switch-on);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(40, 44, 57, 0.08), 0 0 0 1px rgba(40, 44, 57, 0.05);
}

/* ---------- Headings and text ---------- */

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.03em;
}

h1 {
  font-size: 30px;
  line-height: 1.2;
}

.lede {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

/* Long email addresses and hosts break instead of widening the page. */
.lede,
.alert,
.dest,
.fine {
  overflow-wrap: anywhere;
}

.lede strong,
.prose strong {
  color: var(--ink);
  font-weight: 500;
}

.fine {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 28px;
  font-size: 14px;
}

.back .icon {
  width: 16px;
  height: 16px;
}

/* The app a partner is on the way to, e.g. the Partner Pitch Generator. */
.dest {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin: 16px 0 0;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
}

.dest .icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

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

/* ---------- Forms ---------- */

.stack {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.field {
  display: grid;
  gap: 8px;
}

/* A link on the label's line that comes after the input for the keyboard. */
.field-with-link {
  grid-template-columns: minmax(0, 1fr) auto;
}

.field-with-link > * {
  grid-column: 1 / -1;
}

.field-with-link > label {
  grid-column: 1;
  grid-row: 1;
}

.field-with-link > .field-link {
  grid-column: 2;
  grid-row: 1;
  align-self: baseline;
  font-size: 14px;
}

label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--ink);
  font: 400 16px/1.2 var(--font);
  letter-spacing: -0.01em;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input::placeholder {
  color: var(--text-soft);
  opacity: 1;
}

.input:hover {
  border-color: var(--field-line-hover);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus);
}

.input[aria-invalid="true"] {
  border-color: var(--error);
}

.input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--error) 22%, transparent);
}

.input[readonly] {
  border-color: var(--line);
  background: var(--tint);
  color: var(--text);
}

.input[readonly]:hover {
  border-color: var(--line);
}

.input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 60px var(--field-bg) inset;
  -webkit-text-fill-color: var(--ink);
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-right: 52px;
}

.reveal {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.reveal:hover {
  color: var(--ink);
  background: var(--tint);
}

.reveal .icon {
  width: 20px;
  height: 20px;
}

.reveal .when-shown,
.reveal[aria-pressed="true"] .when-hidden {
  display: none;
}

.reveal[aria-pressed="true"] .when-shown {
  display: block;
}

.hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-soft);
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  color: var(--error);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.field-error .icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

/* The honeypot field: invisible for people, filled in by bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* The sign-in form waits, dimmed, until the IAP flow asks for it. */
form[inert] .field,
form[inert] .divider,
form[inert] .idp-list {
  opacity: 0.5;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  overflow-wrap: anywhere;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 500 15px/1.25 var(--font);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  border-color: var(--field-line);
  background: var(--bg);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--field-line-hover);
  background: var(--tint);
}

.btn[aria-busy="true"],
.btn:disabled {
  cursor: progress;
}

.btn[aria-busy="true"]:active {
  transform: none;
}

.btn-primary[aria-busy="true"] {
  background: var(--primary-hover);
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.spinner {
  width: 18px;
  height: 18px;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* ---------- Sign-in providers ---------- */

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-soft);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.idp-list {
  display: grid;
  gap: 12px;
}

/* One button per provider, all the same size. Each keeps its brand's rules:
   the provider's own logo, unchanged, "Sign in with ..." (the one wording that
   Google, Microsoft, Apple and LinkedIn all allow), and the colors and font
   from its guidelines. The buttons stay white in the dark scheme too: Apple
   wants its white button on dark backgrounds, and Google's G on white. */
.btn-idp {
  position: relative;
  padding-inline: 52px;
  border-color: var(--idp-line);
  background: #ffffff;
  color: var(--idp-ink);
  font: 500 14px/20px var(--idp-font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  letter-spacing: normal;
}

.btn-idp:hover {
  background: #f2f2f2;
}

.btn-idp:disabled:not([aria-busy="true"]) {
  opacity: 0.6;
}

/* The logos share one column on the left, so they line up. */
.btn-idp svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 20px;
  height: 20px;
  translate: 0 -50%;
}

/* Google: #747775 stroke, #1f1f1f text, Google Sans Medium 14/20. */
.btn-idp[data-provider="google.com"] {
  --idp-line: #747775;
  --idp-ink: #1f1f1f;
  --idp-font: "Google Sans", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Microsoft: #8c8c8c border, #5e5e5e text, Segoe UI Semibold. */
.btn-idp[data-provider="microsoft.com"] {
  --idp-line: #8c8c8c;
  --idp-ink: #5e5e5e;
  --idp-font: "Segoe UI Semibold", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Apple: white with a black outline on light backgrounds, black logo and
   title in the system font. */
.btn-idp[data-provider="apple.com"] {
  --idp-line: #000000;
  --idp-ink: #000000;
}

/* LinkedIn: the [in] logo in LinkedIn blue on white, at least 21px tall. */
.btn-idp[data-provider="linkedin.com"],
.btn-idp[data-provider="oidc.linkedin"] {
  --idp-line: #8c8c8c;
  --idp-ink: rgba(0, 0, 0, 0.9);
}

.btn-idp[data-provider="linkedin.com"] svg,
.btn-idp[data-provider="oidc.linkedin"] svg {
  left: 15.5px;
  width: 21px;
  height: 21px;
}

/* On a dark background Apple asks for its white button without the outline. */
@media (prefers-color-scheme: dark) {
  .btn-idp[data-provider="apple.com"] {
    --idp-line: #ffffff;
  }
}

/* ---------- Messages ---------- */

.alert {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.alert p {
  margin: 0;
}

.alert p + p {
  margin-top: 4px;
}

.alert strong {
  display: block;
  font-weight: 500;
}

.alert .icon {
  margin-top: 1px;
}

.alert a {
  color: inherit;
  font-weight: 500;
}

/* A message or heading that gets focus for screen readers is not a control. */
.alert[tabindex="-1"]:focus,
h1[tabindex="-1"]:focus {
  outline: none;
}

.alert-error {
  background: var(--error-bg);
  box-shadow: inset 0 0 0 1px var(--error-line);
  color: var(--error-ink);
}

.alert-info {
  background: var(--info-bg);
  box-shadow: inset 0 0 0 1px var(--info-line);
  color: var(--info-ink);
}

.stack > .alert {
  margin-bottom: -4px;
}

.content > .alert {
  margin-top: 24px;
}

/* A status page: an icon above the heading, then actions. */
.badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 0 24px;
  border-radius: 16px;
  background: var(--info-bg);
  box-shadow: inset 0 0 0 1px var(--info-line);
  color: var(--primary);
}

.badge .icon {
  width: 26px;
  height: 26px;
}

.actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 28px;
}

/* A thin bar at the top while gcip-iap talks to IAP. */
.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: 3px;
  overflow: hidden;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
}

.progress::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  background: var(--primary);
  animation: progress 1.1s ease-in-out infinite;
}

@keyframes progress {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(250%);
  }
}

/* ---------- The access path (right-hand panel) ---------- */

.panel {
  grid-area: panel;
  padding: 16px 16px 16px 0;
}

.panel-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  min-height: 560px;
  padding: 64px clamp(40px, 6vw, 88px);
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(74, 180, 255, 0.34), rgba(74, 180, 255, 0) 60%),
    radial-gradient(70% 60% at 0% 100%, rgba(14, 43, 93, 0.85), rgba(14, 43, 93, 0) 70%),
    linear-gradient(160deg, var(--panel-top) 0%, var(--panel-mid) 42%, var(--panel-end) 100%);
  color: #ffffff;
}

/* The Speed Kit mark, large and faint, cut off by the panel's corner. */
.panel-inner::after {
  content: "";
  position: absolute;
  top: -72px;
  right: -72px;
  width: 300px;
  height: 300px;
  background: #ffffff;
  opacity: 0.08;
  /* The mark fades out towards the panel, so the tile has no hard edge. */
  -webkit-mask:
    url("/assets/mark.svg") center / contain no-repeat,
    radial-gradient(circle at 78% 22%, #000 28%, transparent 72%);
  -webkit-mask-composite: source-in;
  mask:
    url("/assets/mark.svg") center / contain no-repeat,
    radial-gradient(circle at 78% 22%, #000 28%, transparent 72%);
  mask-composite: intersect;
  pointer-events: none;
}

.panel-copy {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel h2 {
  color: #ffffff;
  font-size: 32px;
  line-height: 1.2;
}

.panel-lede {
  margin: 14px 0 0;
  color: #e3f1ff;
  font-size: 15px;
  line-height: 1.6;
}

.path {
  display: grid;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.path li {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 18px;
  padding-bottom: 26px;
}

.path li:last-child {
  padding-bottom: 0;
}

/* The line from one step to the next. */
.path li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 46px;
  bottom: 6px;
  left: 19px;
  width: 2px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.24);
}

.node {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.node > span {
  display: grid;
  place-items: center;
}

.node .icon {
  display: block;
  width: 20px;
  height: 20px;
}

.node > .check {
  display: none;
}

.step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  margin: 8px 0 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.step-text {
  margin: 3px 0 0;
  color: #e3f1ff;
  font-size: 14px;
  line-height: 1.5;
}

.now,
.state {
  display: none;
}

.now {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0;
}

/* data-current names the step the partner is at. Earlier steps are done. */
[data-current="request"] [data-step="request"] .node,
[data-current="review"] [data-step="review"] .node,
[data-current="password"] [data-step="password"] .node,
[data-current="signin"] [data-step="signin"] .node {
  background: #ffffff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.16);
  color: var(--blue-700);
}

[data-current="request"] [data-step="request"] .now,
[data-current="review"] [data-step="review"] .now,
[data-current="password"] [data-step="password"] .now,
[data-current="signin"] [data-step="signin"] .now,
[data-current="request"] [data-step="request"] .state-now,
[data-current="review"] [data-step="review"] .state-now,
[data-current="password"] [data-step="password"] .state-now,
[data-current="signin"] [data-step="signin"] .state-now {
  display: inline;
}

[data-current="review"] [data-step="request"] .node,
[data-current="password"] :is([data-step="request"], [data-step="review"]) .node,
[data-current="signin"] :is([data-step="request"], [data-step="review"], [data-step="password"]) .node {
  background: #ffffff;
  box-shadow: none;
  color: var(--blue-700);
}

[data-current="review"] [data-step="request"] .node > .step-icon,
[data-current="password"] :is([data-step="request"], [data-step="review"]) .node > .step-icon,
[data-current="signin"] :is([data-step="request"], [data-step="review"], [data-step="password"]) .node > .step-icon {
  display: none;
}

[data-current="review"] [data-step="request"] .node > .check,
[data-current="password"] :is([data-step="request"], [data-step="review"]) .node > .check,
[data-current="signin"] :is([data-step="request"], [data-step="review"], [data-step="password"]) .node > .check {
  display: grid;
}

[data-current="review"] [data-step="request"] .state-done,
[data-current="password"] :is([data-step="request"], [data-step="review"]) .state-done,
[data-current="signin"] :is([data-step="request"], [data-step="review"], [data-step="password"]) .state-done {
  display: inline;
}

[data-current="review"] [data-step="request"]::before,
[data-current="password"] :is([data-step="request"], [data-step="review"])::before,
[data-current="signin"] :is([data-step="request"], [data-step="review"], [data-step="password"])::before {
  background: rgba(255, 255, 255, 0.7);
}

/* ---------- Narrow screens ---------- */

@media (max-width: 959px) {
  body {
    display: block;
  }

  .main {
    padding: 20px 20px 0;
  }

  .brand img {
    height: 28px;
  }

  .content {
    max-width: 480px;
    margin: 0 auto;
    padding: 36px 0 44px;
  }

  h1 {
    font-size: 27px;
  }

  .panel {
    padding: 0 12px;
  }

  .panel-inner {
    min-height: 0;
    padding: 36px 24px 36px;
    border-radius: 20px;
    /* A narrow panel puts its text right under the highlight, so keep it soft. */
    background:
      radial-gradient(80% 35% at 100% 0%, rgba(74, 180, 255, 0.18), rgba(74, 180, 255, 0) 70%),
      linear-gradient(170deg, var(--panel-mid) 0%, var(--panel-end) 100%);
  }

  .panel-inner::after {
    display: none;
  }

  .panel h2 {
    font-size: 24px;
  }

  .path {
    margin-top: 28px;
  }

  .foot {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 20px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner,
  .progress::before {
    animation-duration: 2.4s;
  }

  * {
    transition: none !important;
  }
}

/* The message box of the login page sits above the step heading. */
#message {
  margin-bottom: 20px;
}

/* The loading screen of the login page (templates/login.html). It covers
   the page until login.js shows a step. The ring shows after a short delay,
   so a fast load does not flash. */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 28px;
  padding: 24px;
  background: var(--bg);
  color: var(--text-soft);
  text-align: center;
}

.loading-screen p {
  margin: 0;
  font-size: 15px;
}

.loading-ring {
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-screen > * {
  opacity: 0;
  animation: loading-in 0.3s ease-out 0.25s forwards;
}

.loading-screen > .loading-ring {
  animation: loading-in 0.3s ease-out 0.25s forwards, spin 0.8s linear infinite;
}

@keyframes loading-in {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-screen > * {
    animation: none;
    opacity: 1;
  }

  .loading-screen > .loading-ring {
    animation: spin 2.4s linear infinite;
  }
}

/* A signed-in partner sees no access path: the page takes the full width. */
body.is-signed-in {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "main"
    "foot";
}

body.is-signed-in .panel {
  display: none;
}

/* "Your apps" on the start page: the apps this browser opened before. */
.recent-apps {
  margin-top: 36px;
}

.recent-apps h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.recent-apps ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recent-apps a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease-out, background-color 0.15s ease-out;
}

.recent-apps a:hover {
  border-color: var(--primary);
  background: var(--tint);
}

.recent-apps a span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.recent-apps .icon {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--primary);
}
