@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./work-sans-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;
}

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./work-sans-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;
}

/*
 * Privacy, Support, Terms and the 404 page, drawn in the home page's design: its violet
 * brand scale, Work Sans, a white page under a lavender band, pill buttons, and the same
 * header and footer.
 *
 * They stay plain HTML with no script and no inline style, which is what their CSP in
 * _headers promises, so nothing here can come from Mantine. The values are copied from
 * src/theme.ts and Mantine's default grays; change one there and change it here. Light
 * only, like the home page, which forces its colour scheme.
 */
:root {
  --brand-0: #f4f1fe;
  --brand-1: #ede9fe;
  --brand-2: #d9d0fb;
  --brand-4: #b9a7f5;
  --brand-7: #5b3fc4;
  --brand-8: #4a32a3;
  --ink: #18181b;
  --gray-0: #f8f9fa;
  --gray-2: #e9ecef;
  --gray-7: #495057;
  --gray-8: #343a40;
  --rose: #e5486f;
  --mint: #2bb39a;
  --amber: #f2a93b;
  /* Mantine's lg container is 1140px including 16px of padding each side, so its content,
     which is what the home page lines up to, is 1108px. */
  --container: 1108px;
  --measure: 44rem;
  color-scheme: light;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Work Sans", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

h1,
h2 {
  text-wrap: balance;
}

svg {
  display: block;
}

a {
  color: var(--brand-7);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-8);
}

:focus-visible {
  outline: 3px solid var(--brand-7);
  outline-offset: 3px;
  border-radius: 6px;
}

[id] {
  scroll-margin-top: 88px;
}

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transform: translateY(-200%);
}

/* The shadow only while it is on screen: parked above the page it bled into the corner. */
.skip:focus {
  transform: none;
  box-shadow: 0 12px 32px rgba(35, 31, 61, 0.12);
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin-inline: auto;
}

/* Header: the home page's sticky, frosted bar. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--gray-2);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-7);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.brand:hover {
  color: var(--brand-7);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--gray-8);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--brand-7);
}

/* Under Mantine's sm breakpoint the home page folds its links into a drawer. With no
   script there is no drawer, so the links go and the one action stays. */
@media (max-width: 47.99em) {
  .nav-link {
    display: none;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--brand-7);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  background: var(--brand-8);
  color: #fff;
}

.button-lg {
  height: 42px;
  padding: 0 22px;
  font-size: 1rem;
}

/* The band at the top: title, date, and the three help pages as tabs. */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 44px;
  text-align: center;
  background: linear-gradient(180deg, var(--brand-0) 0%, #fff 100%);
}

/* Moru on a page-level message, above its heading. An illustration, never the brand. */
.page-mascot {
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto 8px;
}

/* Two confetti pieces from the home page's set, drawn in CSS so the policy's
   style-src 'self' still holds. Decoration only; hidden from nothing because they
   are not elements. */
.page-hero::before,
.page-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.page-hero::before {
  top: 44px;
  left: max(24px, calc(50% - 470px));
  width: 26px;
  height: 26px;
  border: 5px solid var(--mint);
  border-radius: 50%;
}

.page-hero::after {
  top: 120px;
  right: max(28px, calc(50% - 460px));
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: -64px -58px 0 -2px var(--amber);
}

/* On a phone the line under the title fills the width, and the dots would land on it. */
@media (max-width: 47.99em) {
  .page-hero::after {
    top: 28px;
    right: 28px;
  }
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.meta {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--gray-7);
  font-size: 1.125rem;
}

.page-tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 28px;
  padding: 4px;
  border: 1px solid var(--gray-2);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(35, 31, 61, 0.05), 0 8px 24px rgba(35, 31, 61, 0.05);
}

.page-tabs a {
  padding: 7px 18px;
  border-radius: 999px;
  color: var(--gray-7);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.page-tabs a:hover {
  color: var(--brand-7);
}

.page-tabs a[aria-current="page"] {
  background: var(--brand-7);
  color: #fff;
}

/* The document itself. */
.page {
  width: min(calc(100% - 32px), var(--measure));
  margin: 0 auto;
  padding: 20px 0 104px;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.toc a {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-0);
  color: var(--brand-8);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.toc a:hover {
  background: var(--brand-1);
}

.page h2 {
  margin: 44px 0 10px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.page h3 {
  margin: 24px 0 6px;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

.page p,
.page li {
  color: var(--gray-8);
}

.page p {
  margin: 0 0 14px;
}

.page ul,
.page ol {
  margin: 0 0 14px;
  padding-left: 1.25rem;
}

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

.page li::marker {
  color: var(--brand-4);
}

.page strong {
  color: var(--ink);
  font-weight: 600;
}

.note {
  margin-top: 44px;
  padding: 24px 26px;
  border: 1px solid var(--brand-1);
  border-radius: 18px;
  background: var(--brand-0);
}

.page .note h2 {
  margin-top: 0;
}

.page .note p:last-child {
  margin-bottom: 0;
}

/* The fixed safety answer, quoted where a page repeats it. */
.quote {
  margin: 0 0 14px;
  padding: 14px 18px;
  border-left: 4px solid var(--brand-4);
  border-radius: 0 14px 14px 0;
  background: var(--gray-0);
  color: var(--gray-8);
}

/* 404: Moru and a title, centred in the height the header and footer leave, so on a tall
   enough screen the whole page fits without scrolling. The body is already a 100dvh column
   with main taking the rest; this carries that height down to the section. The padding is
   even so the centring is not pulled toward the top. */
.lost-main {
  display: flex;
}

.lost {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 32px 0;
  text-align: center;
}

.lost h1 {
  margin-bottom: 8px;
}

.lost .meta {
  margin-bottom: 28px;
}

/* Footer: the home page's, column for column. */
.site-footer {
  padding: 64px 0 48px;
  border-top: 1px solid var(--gray-2);
  background: var(--gray-0);
}

.footer-layout {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer-about {
  display: grid;
  gap: 12px;
  max-width: 400px;
}

.footer-about p,
.footer-column a {
  margin: 0;
  color: var(--gray-7);
  font-size: 0.875rem;
  line-height: 1.55;
}

.footer-columns {
  display: flex;
  gap: 72px;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.footer-column a {
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--brand-7);
  text-decoration: underline;
}
