/*
 * The public pages: home, support, privacy, terms. Not the task pane -
 * taskpane.css dresses a 330px panel inside Outlook, and these are
 * pages read in a browser by someone deciding whether to trust this.
 *
 * The brand is the indigo the icon is drawn in. Everything else is
 * neutral, so the one colour means something wherever it appears.
 */

:root {
  color-scheme: light dark;

  --brand: #4338ca;
  --brand-soft: #eef2ff;
  --ink: #16151c;
  --muted: #5c5a68;
  --line: #e4e3ea;
  --ground: #ffffff;
  --page: #fbfbfd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #a5b4fc;
    --brand-soft: #1e1b3a;
    --ink: #f4f4f7;
    --muted: #a3a1ae;
    --line: #34323f;
    --ground: #1c1b23;
    --page: #131219;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.62 "Segoe UI", -apple-system, BlinkMacSystemFont,
    system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* One language at a time, decided in the head before anything paints. */
html[data-lang="en"] [lang="fr"],
html[data-lang="fr"] [lang="en"] {
  display: none;
}

/* ---------- chrome ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.top nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: 14px;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
}

.top nav a:hover,
.top nav a[aria-current="page"] {
  color: var(--ink);
}

.lang-switch {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ground);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.lang-switch:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ---------- layout ---------- */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

h1 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.018em;
}

.lede {
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

h2 {
  margin: 34px 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

h2:first-of-type {
  margin-top: 0;
}

p {
  margin: 0 0 14px;
}

a {
  color: var(--brand);
  text-underline-offset: 2px;
}

code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--ground);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

/* A claim worth stopping on. */
.pull {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  background: var(--brand-soft);
}

.pull p:last-child {
  margin-bottom: 0;
}

/* A permission and what it is for, one per line, scannable. */
.perms {
  margin: 0 0 14px;
  padding-left: 20px;
  list-style: none;
}

.perms li {
  margin-bottom: 7px;
  text-indent: -20px;
}

.perms li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 15px 3px 0;
  border-radius: 50%;
  background: var(--brand);
}

.steps {
  margin: 0 0 14px;
  padding-left: 22px;
}

.steps li {
  margin-bottom: 8px;
}

/*
 * An address whose whole job is to be pasted into another window.
 * Clickable so it can be checked, copyable so it need not be
 * retyped, and wrapping rather than overflowing on a phone.
 */
.url-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
}

.url-row a {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ground);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.copy {
  flex: 0 0 auto;
  padding: 7px 13px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.copy:hover {
  background: var(--brand-soft);
}

/* Says what to do when the admin centre will not take a URL. */
.fallback {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.cta {
  display: inline-block;
  margin: 8px 0 4px;
  padding: 11px 20px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.cta:hover {
  filter: brightness(1.08);
}

/*
 * Visible focus, on everything that takes it. A site that cannot
 * be walked through with a keyboard is not finished, whatever it
 * looks like - and :focus-visible shows the ring to someone
 * tabbing without putting one round every mouse click.
 */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Straight to the content, past a nav repeated on every page. */
.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 20;
  padding: 9px 14px;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 26px 24px 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer a {
  color: var(--muted);
}

@media (max-width: 560px) {
  h1 {
    font-size: 30px;
  }

  main {
    padding: 36px 20px 72px;
  }

  .top nav {
    gap: 12px;
    font-size: 13px;
  }
}
