/* The account site's pages (sign-in, delete, pay) in the Mac app's own look:
   its neutral greys, blue and corners (src/memory/memory.css and
   light-theme.css), its system font, light and dark by the system's
   appearance. */

:root {
  --ink: rgb(0 0 0 / 0.85);
  /* The app's secondary grey is 0.5; 0.6 keeps small print above 4.5:1. */
  --ink-soft: rgb(0 0 0 / 0.6);
  --ink-faint: rgb(0 0 0 / 0.3);
  --paper: #fff;
  --stone: #fafafa;
  --hairline: rgb(0 0 0 / 0.1);
  --edge: rgb(0 0 0 / 0.08);
  --fill: rgb(120 120 128 / 0.08);
  --fill-strong: rgb(120 120 128 / 0.16);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.025), 0 6px 18px -10px rgb(0 0 0 / 0.08);
  /* Links, and the blue of the one main press. */
  --ocean: #0066cc;
  --button: #0071e3;
  --on-button: #fff;
  --problem: #d70015;
  --problem-fill: rgb(217 45 32 / 0.1);
  --danger: #d92d20;
  --on-danger: #fff;
  --font:
    -apple-system, BlinkMacSystemFont, 'SF Pro Text', Inter,
    'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  --font-display:
    -apple-system, BlinkMacSystemFont, 'SF Pro Display', Inter,
    'Segoe UI Variable Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: rgb(255 255 255 / 0.85);
    --ink-soft: rgb(255 255 255 / 0.55);
    --ink-faint: rgb(255 255 255 / 0.28);
    --paper: #1e1e1e;
    --stone: #141414;
    --hairline: rgb(255 255 255 / 0.1);
    --edge: rgb(255 255 255 / 0.08);
    --fill: rgb(255 255 255 / 0.06);
    --fill-strong: rgb(255 255 255 / 0.11);
    --shadow: none;
    --ocean: #3a9bff;
    --problem: #ff6961;
    --problem-fill: rgb(255 105 97 / 0.16);
    --danger: #ff6961;
    --on-danger: #141414;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  /* the card, and under it the footer when it shows, together in the middle */
  align-content: center;
  gap: 18px;
  padding: 24px 16px;
  background: var(--stone);
  color: var(--ink);
  font: 14px/1.45 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* A card, as the app's are: no line of its own but a hairline of edge, and a
   soft shadow on a light page. */
.card {
  width: 100%;
  max-width: 400px;
  background: var(--paper);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px var(--edge),
    var(--shadow);
  padding: 32px 28px 28px;
}

.logo {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 11px;
  margin-bottom: 20px;
}

h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 8px;
}

p {
  margin: 0 0 14px;
}

.lead {
  color: var(--ink-soft);
}

.lead strong {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 4px 0 6px;
}

input {
  display: block;
  width: 100%;
  height: 42px;
  font: inherit;
  font-size: 15px;
  letter-spacing: inherit;
  color: var(--ink);
  background: var(--fill);
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  margin-bottom: 16px;
  transition: background-color 160ms ease;
}

input::placeholder {
  color: var(--ink-faint);
}

/* No line around a field, in focus either: its fill steps up. */
input:focus {
  outline: 0;
  background: var(--fill-strong);
}

.digits {
  font-size: 22px;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

button {
  font: inherit;
  cursor: pointer;
}

.primary {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--button);
  color: var(--on-button);
  font-weight: 500;
}

.primary:disabled {
  opacity: 0.55;
  cursor: progress;
}

/* The one button that cannot be undone (delete.html). */
.danger {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--danger);
  color: var(--on-danger);
  font-weight: 500;
}

.danger:disabled {
  opacity: 0.55;
  cursor: progress;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.quiet {
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--ocean);
  font-size: 13px;
}

.quiet:disabled {
  color: var(--ink-soft);
  cursor: default;
}

.fine {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.problem {
  margin: 16px 0 0;
  color: var(--problem);
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--ocean);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--button);
  outline-offset: 3px;
  border-radius: 6px;
}

/* The company and its legal pages, under the card (every page). */
.legal {
  width: 100%;
  max-width: 400px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: var(--ink-soft);
}

.legal p {
  margin: 0 0 6px;
}

.legal a + a {
  margin-left: 14px;
}

/* Under the sign-in form: what signing in agrees to. */
.fine + .agree {
  margin-top: 8px;
}
