/* Server-rendered pages: login, invite, setup, join, and the legal documents.
 *
 * A file rather than a <style> block because the CSP has no 'unsafe-inline'
 * (MIGRATION_PLAN §3.3). Deliberately undesigned — S5 owns the design system,
 * and anything opinionated written here would only have to be unpicked. The
 * bar is: legible on a phone, works without JavaScript, respects dark mode,
 * and has visible focus rings. */

:root {
  color-scheme: light dark;
  --ss-line: color-mix(in srgb, currentColor 18%, transparent);
  --ss-muted: color-mix(in srgb, currentColor 65%, transparent);
}

body {
  margin: 0 auto;
  padding: 2rem 1.25rem 6rem;
  max-width: 42rem;
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

h2 {
  font-size: 1.15rem;
  margin-top: 2.25rem;
}

a {
  color: inherit;
}

code {
  font-size: 0.9em;
  word-break: break-all;
}

hr {
  border: 0;
  border-top: 1px solid var(--ss-line);
  margin: 2.5rem 0;
}

footer {
  margin-top: 3rem;
  font-size: 0.875rem;
  opacity: 0.7;
}

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

label {
  display: block;
  margin-top: 1.25rem;
  font-weight: 600;
}

.hint {
  display: block;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--ss-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 0.375rem;
  padding: 0.625rem 0.75rem;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--ss-line);
  border-radius: 6px;
  box-sizing: border-box;
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

button,
.button {
  display: inline-block;
  margin-top: 1.5rem;
  /* 44 px at the default font size: the touch target SPEC and the design
   * brief both settle on, and the one thing here worth getting right early. */
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  font: inherit;
  color: inherit;
  text-decoration: none;
  text-align: center;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 6px;
  cursor: pointer;
}

.button-block {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Notices ---------------------------------------------------------------- */

.notice {
  margin: 1.5rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ss-line);
  border-left-width: 4px;
  border-radius: 4px;
}

/* Colour is doubled up with the border weight and the wording, never the only
 * signal. Same rule the design brief sets for credit and debit. */
.notice-error {
  border-left-color: #c0392b;
}

.notice-success {
  border-left-color: #1e8449;
}

.divider {
  margin: 2rem 0 0;
  text-align: center;
  color: var(--ss-muted);
  font-size: 0.875rem;
}

.session-list {
  padding-left: 1.25rem;
}

.session-list li {
  margin-bottom: 0.75rem;
}
