/* ====================================================================
   The sign-in surface, drawn in the Continuum design language.

   Every value here is a Continuum token or a length derived from one.
   There is no colour, radius, shadow or font of this product's own: that
   is the point of adopting a design language, and a page that invents
   one grey stops being learnable from any other screen on the estate.

   A TENANT CHANGES THIS FILE'S INPUTS, NEVER THIS FILE. What a tenant
   sets — its colours, its shape, its typeface, its text size — arrives as
   custom properties in a small block the page writes at the top, and
   every rule below reads those. A tenant supplies no selector, no
   declaration and no markup (CTL-024): the page it gets is this one,
   with its values in it.

   What a tenant cannot reach is deliberate and short: the focus ring,
   the structure, the statement of which service is being signed in to,
   and the minimum size of anything a finger has to hit.
   ==================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  /* The tenant's own surface and ink, falling back to the language's. */
  background: var(--kp-bg, var(--paper));
  color: var(--kp-fg, var(--ink));
  font-family: var(--kp-font, var(--sans));
  font-size: var(--kp-text, var(--fs-md));
  line-height: 1.5;
  letter-spacing: -0.011em;
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem 0;
}

/* The card the form sits on: Continuum's raised surface, its radius and its
   elevation. On a phone it fills the width and keeps a 16px gutter. */
main {
  width: min(27rem, 100%);
  margin: 0 1rem;
  padding: 2rem;
  background: var(--kp-raised, var(--raised));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

h1 {
  font-family: var(--kp-display, var(--disp));
  font-size: var(--fs-3xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.35rem;
}

/* What is being asked for. The product's sentence, in the reading ink. */
.what {
  color: var(--kp-fg-2, var(--ink-2));
  margin: 0 0 1.5rem;
}

/* The tenant's own line, under the product's and quieter than it. */
.welcome {
  color: var(--kp-fg-2, var(--ink-2));
  margin: 0 0 1.5rem;
}

label {
  display: block;
  margin: 1rem 0 0.35rem;
  font-size: var(--fs-sm);
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: inherit;
  background: var(--kp-bg, var(--paper-2));
  border: 1px solid var(--line-2);
  border-radius: var(--kp-corner, var(--r-sm));
}

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

/* NOT a configurable setting, in any design: a tenant cannot take away the
   indicator that says where the keyboard is (WCAG 2.4.11). */
:focus-visible {
  outline: 3px solid var(--kp-accent, var(--primary));
  outline-offset: 2px;
}

button {
  margin-top: 1.5rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 600;
  /* Continuum's solid tier: the accent darkened until white text stands on it.
     The registry refuses an accent that does not clear 4.5:1 under white. */
  background: var(--kp-accent, var(--primary-solid));
  color: var(--raised);
  border: 0;
  border-radius: var(--kp-corner, var(--r-sm));
  cursor: pointer;
  transition: filter 0.15s var(--ease);
}

button:hover {
  filter: brightness(1.07);
}

/* Declining is a real choice, so it is a real control — and a quiet one, so it
   does not compete with signing in. The target stays 2.75rem. */
button.decline {
  margin-top: 0.75rem;
  font-weight: 500;
  background: transparent;
  color: var(--kp-fg-2, var(--ink-2));
  border: 1px solid var(--line-2);
}

button.decline:hover {
  filter: none;
  border-color: var(--line-3);
}

/* A notice. Colour is never the only signal: it is a bordered block with a
   sentence in it, and it reads the same to somebody who sees no colour. */
[role='alert'],
[role='status'] {
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--crit);
  border-left-width: 3px;
  border-radius: var(--kp-corner, var(--r-sm));
  background: var(--paper-2);
  color: var(--crit-ink);
  font-size: var(--fs-sm);
}

[role='status'] {
  border-color: var(--info);
  color: var(--ink-2);
}

.logo {
  display: block;
  margin-bottom: 1.25rem;
}

.legal {
  margin-top: 2rem;
  color: var(--kp-fg-2, var(--ink-3));
  font-size: var(--fs-xs);
}

code {
  font-family: var(--mono);
  font-size: var(--fs-xs);
}

@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}
