/* centomail "Airmail" look (docs/design): ultramarine, postal yellow, airmail red, Bricolage Grotesque.
   Cards, fields and buttons as in the console and admin (apps/webmail styles/tokens.css): thin
   borders, no offset shadow. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/bricolage-latin.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/bricolage-latin-ext.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f6f4ff;
  --card: #ffffff;
  --text: #16134f;
  --muted: #55517f;
  --border: #b9b2e3;
  --line: #dcd7f3;
  --accent: #2a2ad8;
  --accent-text: #ffffff;
  --ink: #13106b;
  --yellow: #ffd23f;
  --danger-bg: #fde7e5;
  --danger: #b3261e;
  --notice-bg: #fff1bd;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0b26;
    --card: #141136;
    --text: #ecebff;
    --muted: #aba7d8;
    --border: #3e397f;
    --line: #2a265e;
    --accent: #9a9aff;
    --accent-text: #0d0b26;
    --ink: #050416;
    --danger-bg: #3a1d1b;
    --danger: #ff9a8f;
    --notice-bg: #2b2650;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 4px;
  background: repeating-linear-gradient(
    -45deg,
    #e5322d 0 12px,
    transparent 12px 16px,
    #2a2ad8 16px 28px,
    transparent 28px 32px
  );
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  background: var(--bg);
  color: var(--text);
  font:
    16px / 1.5 "Bricolage Grotesque",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.04),
    0 8px 24px rgb(19 16 107 / 0.06);
}

.card.wide {
  max-width: 640px;
}

.brand {
  margin: 0 0 12px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand b {
  padding: 0 5px;
  margin-right: 1px;
  border-radius: 6px;
  background: var(--yellow);
  color: #13106b;
}

h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

h2 {
  font-size: 1.1rem;
  margin: 0 0 8px;
}

section {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

label {
  display: block;
  font-weight: 600;
  margin: 12px 0 4px;
}

input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
}

label.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
}

label.check input {
  width: auto;
  margin-top: 4px;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

button {
  margin-top: 16px;
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--accent);
}

button.link {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  text-decoration: underline;
}

form.inline button {
  width: auto;
}

.actions {
  display: flex;
  gap: 12px;
}

.actions > button {
  flex: 1 1 0;
}

/* A choice with a title and an explanation under it (consent "send as you"). */
label.option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 20px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 400;
  cursor: pointer;
}

label.option:has(input:checked) {
  border-color: var(--accent);
}

label.option input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  padding: 0;
  accent-color: var(--accent);
}

label.option b {
  display: block;
  font-weight: 600;
}

label.option small {
  display: block;
  font-size: 0.9rem;
  margin-top: 2px;
}

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

.muted,
.hint,
small {
  color: var(--muted);
}

.hint {
  font-size: 0.9rem;
  margin: 4px 0 0;
}

.alert {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 8px;
}

.notice {
  background: var(--notice-bg);
  padding: 10px 12px;
  border-radius: 8px;
}

.sep {
  text-align: center;
  color: var(--muted);
  margin: 16px 0 0;
}

.list,
.scopes {
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.scopes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  column-gap: 24px;
  margin: 8px 0 0;
}

.scopes li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.scopes code {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.qr img {
  width: 200px;
  height: 200px;
  background: #fff;
  padding: 8px;
}

pre {
  white-space: pre-wrap;
  font-size: 1rem;
}

[hidden] {
  display: none;
}
