/*
 * bright-sphere.com
 *
 * The color tokens below are the app's tokens from mobile/src/theme.ts, and
 * the two RELATIONSHIPS that file protects hold here too: the wordmark and
 * the primary action are the same yellow, and the lighter green stays
 * lighter than the Sign In green. A website that is a slightly different
 * yellow from the app it belongs to is the first thing anybody notices and
 * the last thing anybody reports.
 *
 * No webfont. The system stack renders instantly, matches the device the
 * reader already trusts, and needs no request to a font service — which the
 * Content-Security-Policy in site/_headers forbids anyway, for the reason
 * written there.
 */

:root {
  --yellow: #ffc400;
  --yellow-deep: #e09b00;
  --on-yellow: #1a1a1a;
  --green: #138a3e;
  --green-light: #27a25b;
  --green-wash: #eef7ee;

  /*
   * COOL NEUTRALS. These were warm, faintly green grays, and warm gray is
   * the strongest "software from 2004" signal a page can send — it is
   * what beige became. Shifting the ramp a few degrees toward blue costs
   * nothing, changes no layout, and is most of the difference between a
   * page that looks dated and one that does not.
   */
  --text: #0b0d12;
  --text-secondary: #434a58;
  --text-muted: #6a7180;

  --surface: #ffffff;
  --surface-raised: #f7f8fa;
  --surface-sunken: #f1f3f7;
  --border: #dfe3eb;
  --border-subtle: #e9ecf2;

  --notice-bg: #fff6e5;
  --notice-text: #6b4100;
  --notice-accent: #b06f00;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --gutter: 20px;
  --measure: 68ch;
  --wide: 1120px;

  /* Soft and wide rather than tight and dark. A hard drop shadow is the
     most dated effect available. */
  --shadow: 0 1px 2px rgb(11 13 18 / 4%), 0 10px 30px -14px rgb(11 13 18 / 14%);
  --shadow-lifted: 0 2px 4px rgb(11 13 18 / 5%), 0 24px 56px -24px rgb(11 13 18 / 22%);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --on-yellow: #1a1a1a;
    --green: #35c173;
    --green-light: #4fd68a;
    --green-wash: #14241a;

    --text: #f2f4f8;
    --text-secondary: #c0c6d2;
    --text-muted: #949cab;

    --surface: #0b0d12;
    --surface-raised: #141821;
    --surface-sunken: #11141b;
    --border: #272d3a;
    --border-subtle: #1e232e;

    --notice-bg: #241c0a;
    --notice-text: #f2d9a3;
    --notice-accent: #ffc85c;

    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px -12px rgb(0 0 0 / 60%);
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  /* Figures in a payments context are counted, not typed. */
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------- focus */

/*
 * One visible focus style everywhere, and it is never removed. Somebody
 * navigating this site by keyboard has to be able to see where they are, and
 * a payments company is the last place to make that person guess.
 */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 12px 18px;
  background: var(--yellow);
  color: var(--on-yellow);
  font-weight: 650;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip:focus {
  left: 0;
}

/* -------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 20px var(--gutter);
  /* The header stays with the reader. On a long legal document that is
     the difference between "where am I" and a visible way back. */
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

/*
 * The logo is a photograph on a white background, so it is masked to a
 * circle. The sphere is round and centered with margin around it, which
 * means the mask only ever clips white — and it means the mark works on a
 * dark surface without needing a second, transparent copy of the file.
 */
.mark {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}

.wordmark-text {
  font-size: 25px;
  font-weight: 780;
  letter-spacing: -0.03em;
  /* Ink, not yellow. Yellow type on white fails contrast; the mark beside
     it carries the color, which is both readable and more confident. */
  color: var(--text);
}

.masthead-nav {
  display: flex;
  gap: 8px;
}

.masthead-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 560;
  transition: background-color 140ms ease, color 140ms ease;
}

.masthead-nav a:hover {
  background: var(--surface-raised);
  color: var(--text);
}

/* The way in. It is the only filled control in the header, because it is
   the only one that leads somewhere other than a document. */
.masthead-cta {
  background: var(--green);
  color: #fff !important;
  font-weight: 640;
}

.masthead-cta:hover {
  background: var(--green);
  color: #fff !important;
  filter: brightness(1.08);
}

/* ------------------------------------------------------------- main */

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) 72px;
}

section {
  margin: 0 auto 64px;
}

h1,
h2,
h3 {
  line-height: 1.22;
  letter-spacing: -0.021em;
  text-wrap: balance;
}

h1 {
  /* Tracking tightens as the size grows. System faces are drawn for body
     text and look loose when scaled up; this is what makes a heading read
     as set rather than merely enlarged. */
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem);
  font-weight: 760;
  letter-spacing: -0.033em;
  line-height: 1.07;
  margin: 0 0 22px;
  max-width: 22ch;
}

h2 {
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem);
  font-weight: 720;
  letter-spacing: -0.024em;
  margin: 0 0 14px;
}

h3 {
  font-size: 1.15rem;
  font-weight: 660;
  margin: 0 0 8px;
}

p {
  margin: 0 0 18px;
  max-width: var(--measure);
}

a {
  color: var(--green);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2.5px;
}

a:hover {
  color: var(--text);
}

strong {
  font-weight: 650;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.12em 0.38em;
  border-radius: 5px;
  background: var(--surface-sunken);
  overflow-wrap: anywhere;
}

hr {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: 40px 0;
}

/* -------------------------------------------------------------- hero */

/*
 * A single soft glow behind the hero, in the brand yellow at very low
 * opacity.
 *
 * WHY ONE AND NOT A PATTERN. The temptation with a "modern" refresh is
 * mesh gradients, grids and floating orbs, and on a payments site all of
 * that reads as a crypto launch page. One diffuse light source behind the
 * headline gives the section depth and says nothing else. It is also
 * pure CSS — no image, no request, nothing for the Content-Security-Policy
 * to have an opinion about.
 */
.hero {
  position: relative;
  padding: 44px 0 16px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -22%;
  left: -14%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 196 0 / 16%), transparent 68%);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero::before {
    background: radial-gradient(circle, rgb(255 196 0 / 11%), transparent 68%);
  }
}

.eyebrow {
  display: inline-block;
  margin: 0 0 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--notice-bg);
  color: var(--notice-text);
  font-size: 13px;
  font-weight: 680;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.lede {
  font-size: clamp(1.08rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.6;
  letter-spacing: -0.011em;
  color: var(--text-secondary);
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-note {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 58ch;
}

/*
 * 48px minimum height, the same floor the app's Button component holds, for
 * the same reason: a target smaller than that is a target people miss, and
 * they blame themselves rather than the button.
 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: var(--radius);
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.012em;
  text-decoration: none;
  transition: transform 140ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 180ms ease,
    filter 140ms ease, background-color 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--yellow);
  color: var(--on-yellow);
  /* A shadow the color of the thing casting it, which is the difference
     between a button sitting on the page and one pasted onto it. */
  box-shadow: 0 8px 20px -8px rgb(224 155 0 / 55%);
}

.button-primary:hover {
  filter: brightness(0.95);
  color: var(--on-yellow);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--border);
}

.button-secondary:hover {
  background: var(--surface-raised);
  color: var(--text);
}

/* ------------------------------------------------------------ notice */

.notice {
  padding: 28px 26px 12px;
  border-radius: var(--radius-lg);
  background: var(--notice-bg);
  color: var(--notice-text);
  border-left: 4px solid var(--notice-accent);
}

.notice h2 {
  color: var(--notice-text);
}

.notice p {
  color: inherit;
}

.section-lede {
  color: var(--text-secondary);
  font-size: 1.06rem;
  margin-bottom: 30px;
}

/* ----------------------------------------------------------- pillars */

.pillar-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 680px) {
  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pillar {
  padding: 26px 24px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 180ms ease;
}

.pillar:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.pillar h3 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}

.pillar p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
}

/* Icons drawn from primitives in-repo, per the no-icon-dependency rule. */
.pillar-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: var(--green-wash);
}

.pillar-mark svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pillar-mark svg .solid {
  fill: var(--green);
  stroke: none;
}

/* ------------------------------------------------------------ thesis */

.thesis {
  padding: 34px 30px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
}

.aside {
  margin-top: 26px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 16px;
  color: var(--text-secondary);
  max-width: none;
}

/* ----------------------------------------------------------- posture */

.posture-list {
  display: grid;
  gap: 14px;
  margin: 0 0 26px;
}

.posture-list > div {
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
}

.posture-list dt {
  font-weight: 680;
  margin-bottom: 6px;
}

.posture-list dd {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  max-width: var(--measure);
}

/* ----------------------------------------------------- inner pages */

.page-head {
  padding: 28px 0 8px;
}

.page.centerd main {
  min-height: 48vh;
}

.support-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .support-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.support-card {
  padding: 24px 22px 8px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
}

.support-card h2 {
  font-size: 1.14rem;
  font-weight: 670;
}

.support-card p {
  font-size: 16px;
  color: var(--text-secondary);
}

.contact {
  font-weight: 620;
  overflow-wrap: anywhere;
}

/* A thing that is coming, marked as coming. Never styled as if it were here. */
.pending {
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: var(--notice-bg);
  color: var(--notice-text);
  font-size: 15.5px;
  max-width: none;
}

.plain-list,
.doc-links {
  padding-left: 1.2em;
  margin: 0 0 18px;
  max-width: var(--measure);
  color: var(--text-secondary);
}

.plain-list li,
.doc-links li {
  margin-bottom: 9px;
}

/* ------------------------------------------------- the policy itself */

/*
 * A legal document is laid out to be READ ALL THE WAY THROUGH, which is a
 * different job from a marketing page. Narrower measure, more air between
 * sections, and a table of contents that sticks on a wide screen so a reader
 * twelve sections deep still knows the shape of what they are in.
 */
.document main {
  max-width: 1000px;
}

@media (min-width: 1000px) {
  .document main {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 52px;
    align-items: start;
  }
}

.toc {
  margin-bottom: 36px;
  padding: 18px 18px 6px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  font-size: 14.5px;
}

@media (min-width: 1000px) {
  .toc {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    margin-bottom: 0;
  }
}

.toc h2 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li {
  margin-bottom: 7px;
}

.toc a {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  padding: 2px 0;
}

.toc a:hover {
  color: var(--green);
  text-decoration: underline;
}

.prose {
  min-width: 0;
}

.prose h1 {
  font-size: clamp(1.85rem, 1.4rem + 1.9vw, 2.5rem);
  max-width: none;
}

.prose h2 {
  margin-top: 48px;
  padding-top: 8px;
  scroll-margin-top: 20px;
}

.prose h3 {
  margin-top: 32px;
  font-size: 1.08rem;
  color: var(--text);
  scroll-margin-top: 20px;
}

.prose ul,
.prose ol {
  max-width: var(--measure);
  padding-left: 1.25em;
  margin: 0 0 18px;
}

.prose li {
  margin-bottom: 10px;
}

.prose blockquote {
  margin: 24px 0;
  padding: 18px 20px 2px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--green-light);
  background: var(--green-wash);
}

.prose blockquote p:last-child {
  margin-bottom: 16px;
}

/* A wide table scrolls inside its own box. The page itself never scrolls
 * sideways — a horizontal scrollbar on a whole document is how a reader
 * loses their place and stops reading. */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 540px;
  font-size: 15.5px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: var(--surface-raised);
  font-weight: 660;
  font-size: 14px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* ------------------------------------------------------------ footer */

.footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-sunken);
  padding: 34px 0 46px;
}

.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin-bottom: 18px;
}

.footer-nav a {
  padding: 8px 12px;
  margin-left: -12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 550;
}

.footer-nav a + a {
  margin-left: 0;
}

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

.footer-legal {
  font-size: 14.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  max-width: none;
}

.footer-note {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 78ch;
  margin: 0;
}

/* ------------------------------------------------------------- print */

/*
 * Privacy policies get printed — by the person reviewing one, and by the
 * lawyer they hand it to. The navigation, the table of contents and the
 * buttons are not part of the document, so they do not print.
 */
@media print {
  .masthead-nav,
  .toc,
  .skip,
  .hero-actions,
  .footer-nav {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .document main {
    display: block;
    max-width: none;
  }

  .prose h2,
  .prose h3 {
    break-after: avoid;
  }

  .table-scroll,
  table,
  .prose blockquote,
  .prose li {
    break-inside: avoid;
  }

  a {
    color: #000;
  }

  /* A printed policy with invisible links is a printed policy somebody has
   * to come back to the screen for. */
  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    word-break: break-all;
  }
}
