/*
 * Web pages served by the API (core/templates/core/page.html): the design tokens of
 * docs/design/tokens.md, in the style of the signup screens of the prototype (22).
 * The fonts are served from here, never from Google: no visitor's address goes to a third
 * party. Syne and Plus Jakarta Sans, variable, Latin subset (French accents, «», €, ’), from
 * the Fontsource 5.3.0 packages, SIL Open Font License (fonts/OFL-*.txt).
 */

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/syne-latin-wght-normal.559e8363d74f.woff2") format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-wght-normal.7660bd9909fb.woff2") format("woff2");
}

:root {
  --background: #f7f6f8;
  --foreground: #1f1825;
  --card: #ffffff;
  --primary: #884dcb;
  --primary-foreground: #ffffff;
  --primary-soft: rgb(136 77 203 / 10%);
  --muted-foreground: #6b6076;
  --destructive: #ef4343;
  --destructive-soft: rgb(239 67 67 / 10%);
  --border: #e3e0e6;
  --ring: #884dcb;
  --radius-lg: 16px;
  --radius-3xl: 24px;
  --font-heading: "Syne", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px 16px 48px;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

.page-header,
.card {
  max-width: 440px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 24px;
}

.wordmark {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wordmark span {
  color: var(--primary);
}

.card {
  padding: 32px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-3xl);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);
}

.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
  color: var(--primary);
}

.icon-error {
  background: var(--destructive-soft);
  color: var(--destructive);
}

.icon svg {
  width: 28px;
  height: 28px;
}

h1 {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

h1:focus {
  outline: none;
}

p {
  margin: 0 0 16px;
}

.muted {
  color: var(--muted-foreground);
}

.email {
  display: block;
  font-weight: 600;
  color: var(--foreground);
  overflow-wrap: anywhere;
}

.label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.field {
  position: relative;
}

.field-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  display: flex;
  color: var(--muted-foreground);
  transform: translateY(-50%);
  pointer-events: none;
}

.field-icon svg {
  width: 20px;
  height: 20px;
}

.input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px 12px 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  color: var(--foreground);
  font: 400 1rem/1.5 var(--font-body);
}

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

.input[aria-invalid="true"]:focus-visible {
  outline-color: var(--destructive);
}

.hint {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.hint li + li,
.errors li + li {
  margin-top: 4px;
}

/* The destructive red reaches 3.8:1 on white, under the AA contrast of spec §11 for text: the
   message keeps the text colour and the red marks it, as it marks the field. */
.errors {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.errors li {
  padding-left: 10px;
  border-left: 3px solid var(--destructive);
}

.button {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: var(--primary-foreground);
  font: 600 1rem/1.5 var(--font-body);
  cursor: pointer;
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.button:focus-visible,
.input:focus-visible,
.document a:focus-visible,
.document summary:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Long documents (legal pages, help centre, D-111): a wider column for reading, titles of
   sections, lists, links and the questions of the FAQ, opened without any script. */
.document .page-header,
.document .card {
  max-width: 720px;
}

.document h2 {
  margin: 32px 0 12px;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.document ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.document li + li {
  margin-top: 6px;
}

.document a {
  color: var(--primary);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.updated,
.faq {
  margin-bottom: 24px;
}

.faq details {
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.faq summary {
  padding: 16px;
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
}

.faq details > :not(summary) {
  margin: 0;
  padding: 0 16px 16px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}
