/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Colours, radii and fonts come from the app's own tokens.css, so the site looks like Golub itself. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  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: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  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{
  --wrap: 72rem;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html{
  scroll-padding-top: 5rem;
}

body{
  display: flex;
  flex-direction: column;
  min-block-size: 100vh;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 15px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* pictures only pick the file; the img inside is what gets laid out */
picture{
  display: contents;
}

img{
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

a{
  color: var(--color-link);
  text-decoration: none;
}
a:hover{
  text-decoration: underline;
}

:focus-visible{
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4{
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h1{
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}
h2{
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
}
h3{
  font-size: 1rem;
  letter-spacing: -0.01em;
}
h4{
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-block: 1rem 0.35rem;
}
p{
  margin: 0 0 1em;
}

code{
  font: 0.86em var(--mono);
  padding: 0.12em 0.4em;
  border-radius: 0.4rem;
  background: var(--color-input-bg);
}

.muted{
  color: var(--color-text-muted);
}

[hidden]{
  display: none !important;
}

.wrap{
  inline-size: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
}
.narrow{
  --wrap: 46rem;
}

.skip{
  position: absolute;
  inset-inline-start: -999px;
}
.skip:focus{
  inset-inline-start: 0.75rem;
  inset-block-start: 0.75rem;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface-raised);
  border-radius: var(--radius);
}

/* the app's own button, input and icon styles */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  font: inherit;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.btn:hover{
  background: var(--color-hover);
  text-decoration: none;
}
.btn-primary{
  color: var(--color-primary-text);
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-primary:hover{
  background: var(--color-primary-hover);
}
.btn-lg{
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
}
.btn-icon{
  padding: 0;
  inline-size: 2.25rem;
  block-size: 2.25rem;
}
.icon{
  inline-size: 1rem;
  block-size: 1rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* header, laid out like the app's page header */
.top{
  position: sticky;
  inset-block-start: 0;
  z-index: 30;
  background: var(--color-bg);
  border-block-end: 1px solid var(--color-border);
}
/* a 4px band in the mascot's colours above the header, one colour after another */
.top::before{
  content: '';
  display: block;
  block-size: 4px;
  /* the colours meet on a slant, like the strokes of a slash */
  background: linear-gradient(
    135deg,
    #00add8 0 20%,
    #34d399 20% 40%,
    #a78bfa 40% 60%,
    #f97316 60% 80%,
    #facc15 80% 100%
  );
}
.top-inner{
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-block-size: 3.75rem;
}
.brand{
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-text);
}
.brand:hover{
  text-decoration: none;
}
.brand img{
  border-radius: 0.45rem;
}
.logo{
  flex: none;
  overflow: visible;
}
/* the head turns and the pupil follows the pointer; main.js sets the two variables */
.logo-head{
  transform-box: view-box;
  transform-origin: 38px 30px;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.2s ease-out;
}
.logo-pupil{
  transform: translate(var(--px, 0px), var(--py, 0px));
  transition: transform 0.12s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .logo-head,
  .logo-pupil{
    transition: none;
  }
}

/* nav links look like folders in the sidebar: grey on hover, filled when open */
.nav{
  display: flex;
  gap: 0.15rem;
}
/* each menu item takes a colour from the band above the header: a line on hover, a darker one when open */
.nav a{
  --c: #00add8;
  --c-dark: #0089ab;
  position: relative;
  padding: 0.4rem 0.7rem;
  color: var(--color-text);
  border-radius: var(--radius);
  font-weight: 450;
}
.nav a:nth-child(4n + 2){
  --c: #34d399;
  --c-dark: #059669;
}
.nav a:nth-child(4n + 3){
  --c: #a78bfa;
  --c-dark: #7c3aed;
}
.nav a:nth-child(4n + 4){
  --c: #f97316;
  --c-dark: #c2410c;
}
.nav a::after{
  content: '';
  position: absolute;
  inset-inline: 0.7rem;
  inset-block-end: 0;
  block-size: 2px;
  background: var(--c);
  transform: skewX(-30deg) scaleX(0);
  transition: transform 0.15s ease;
}
.nav a:hover{
  text-decoration: none;
}
.nav a:hover::after{
  transform: skewX(-30deg) scaleX(1);
}
.nav a[aria-current='page']{
  font-weight: 600;
}
.nav a[aria-current='page']::after{
  background: var(--c-dark);
  transform: skewX(-30deg) scaleX(1);
}
.top-end{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: auto;
}
.gh{
  padding-inline: 0.7rem;
  min-block-size: 2.25rem;
}
.gh svg{
  inline-size: 1.05rem;
  block-size: 1.05rem;
  fill: currentColor;
}
.stars{
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.stars::before{
  content: '★ ';
  color: var(--color-text-muted);
}
.menu-btn{
  display: none;
}

.lead{
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-inline-size: 38rem;
  margin-block-end: 1.75rem;
}
.actions{
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.note{
  margin-block-start: 0.9rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* screenshots sit in a frame like an app window */
.frame{
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}
.frame img{
  inline-size: 100%;
}

/* screenshot slider */
.slider{
  margin-block-start: 2.75rem;
}
.slides{
  display: block;
  aspect-ratio: 1440 / 900;
}
.slides img{
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  animation: fade 0.35s ease;
}
@keyframes fade {
  from {
    opacity: 0.4;
  }
}
.slider-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block-start: 1rem;
}
.slider-tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}
.slider-tabs button{
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.slider-tabs button:hover{
  background: var(--color-hover);
  color: var(--color-text);
}
.slider-tabs button[aria-selected='true']{
  background: var(--color-selected);
  color: var(--color-text);
  font-weight: 600;
}
.slider-arrows{
  display: flex;
  gap: 0.4rem;
}

.faq details:first-child{
  border-block-start: 1px solid var(--color-border);
}
.faq summary{
  padding-block: 0.9rem;
  font-weight: 500;
}
.faq summary::after{
  inset-block-start: 1.15rem;
}
.faq details[open] summary::after{
  inset-block-start: 1.4rem;
}

/* program names in the benchmark table carry their logos */
.app{
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--color-text);
}
.app img{
  inline-size: 1.25rem;
  block-size: 1.25rem;
  padding: 1px;
  border-radius: 0.3rem;
  background: #fff;
  box-shadow: 0 0 0 1px var(--color-border);
}
/* other clients' logos stay grey so Golub's is the only one in colour */
.app img[src^='/logos/']{
  filter: grayscale(1);
  opacity: 0.55;
}

/* the figures band under the home hero, shared with the about page */
.b-stats{
  background: var(--color-surface);
  border-block-end: 1px solid var(--color-border);
}
.b-stats-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.b-stats-grid > *{
  display: grid;
  gap: 0.15rem;
  padding: 1.75rem 0.75rem;
  text-align: center;
}
.b-stats-grid > * + *{
  border-inline-start: 1px solid var(--color-border);
}
.b-stats strong{
  font-size: 2rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.b-stats span{
  color: var(--color-text-muted);
  font-size: 0.92rem;
}
@media (max-width: 640px) {
  .b-stats-grid{
    grid-template-columns: 1fr 1fr;
  }
  .b-stats-grid > :nth-child(3){
    border-inline-start: 0;
  }
  .b-stats-grid > :nth-child(n + 3){
    border-block-start: 1px solid var(--color-border);
  }
}

/* figures that link somewhere get the hover grey of the app's rows */
a.b-stat{
  color: var(--color-text);
  transition: background-color 0.15s ease;
}
a.b-stat:hover{
  background: var(--color-hover);
  text-decoration: none;
}
.b-stat strong{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.b-stat strong img,
.b-stat strong svg{
  inline-size: 1.6rem;
  block-size: 1.6rem;
}

/* sections alternate between the page and the sidebar grey */
.section{
  padding-block: 4.5rem;
}
.section.alt{
  border-block-start: 1px solid var(--color-border);
}
.section-head{
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 2rem;
}
.section-head p,
.intro{
  margin: 0;
  max-inline-size: 40rem;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}
.more{
  white-space: nowrap;
  font-weight: 500;
}

/* the wave lines from the home page hero, behind an inner page's header */
.waves{
  position: relative;
  overflow: clip;
  isolation: isolate;
}
.waves::before{
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url(/images/hero-waves.svg) center 55% / 100% auto no-repeat;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme='system'] .waves::before{
    filter: invert(1);
    opacity: 0.6;
  }
}
:root[data-theme='dark'] .waves::before{
  filter: invert(1);
  opacity: 0.6;
}

/* page header for inner pages */
/* every inner page header has the same height, with or without a description, and the title in the same place */
.page-head{
  display: grid;
  align-content: start;
  min-block-size: 11rem;
  padding-block: 2.5rem;
  border-block-end: 1px solid var(--color-border);
}
@media (max-width: 640px) {
  .page-head{
    min-block-size: 17rem;
  }
}
.page-head h1{
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}
.page-head p{
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1.1rem;
}
/* where a docs page sits: Home > Documentation > Administrators > Installation */
.crumbs{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.crumbs a{
  color: var(--color-text-muted);
}
.crumbs a:hover{
  color: var(--color-text);
}
.crumbs .icon{
  inline-size: 0.8rem;
  block-size: 0.8rem;
  opacity: 0.6;
}
[dir="rtl"] .crumbs .icon{
  transform: scaleX(-1);
}
.crumbs [aria-current]{
  color: var(--color-text);
}

.split{
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3.5rem;
  align-items: start;
}
.split.even{
  grid-template-columns: 1fr 1fr;
}

.checklist{
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
}
.checklist li{
  display: flex;
  gap: 0.75rem;
  padding: 0.95rem 1.2rem;
  color: var(--color-text-muted);
}
.checklist li + li{
  border-block-start: 1px solid var(--color-border);
}
.checklist li::before{
  content: '';
  flex: none;
  inline-size: 1rem;
  block-size: 1rem;
  margin-block-start: 0.2rem;
  background: var(--color-text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.checklist strong{
  color: var(--color-text);
  font-weight: 600;
}

ul.plain{
  margin: 0 0 1.25rem;
  padding-inline-start: 1.1rem;
  color: var(--color-text-muted);
}
ul.plain li{
  margin-block-end: 0.3rem;
}
ul.plain strong{
  color: var(--color-text);
  font-weight: 600;
}

/* tables */
.table-wrap{
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
}
table{
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}
th,
td{
  padding: 0.8rem 1.1rem;
  text-align: start;
  border-block-end: 1px solid var(--color-border);
  font-variant-numeric: tabular-nums;
  vertical-align: top;
}
tbody tr:last-child > *{
  border-block-end: 0;
}
thead th{
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface);
}
tbody th{
  font-weight: 500;
}
.num td{
  text-align: end;
}
.num thead th:not(:first-child){
  text-align: end;
}
.best{
  font-weight: 600;
}
.num th:nth-child(2),
.num td:nth-child(2){
  background: var(--color-surface);
}
.fine{
  margin-block-start: 0.8rem;
  font-size: 0.825rem;
  color: var(--color-text-muted);
}
.meter{
  display: inline-block;
  inline-size: 6rem;
  block-size: 0.4rem;
  margin-inline-end: 0.4rem;
  vertical-align: middle;
  border-radius: 999px;
  background: var(--color-hover);
  overflow: hidden;
}
.meter span{
  display: block;
  block-size: 100%;
  inline-size: var(--pct);
  background: var(--color-text);
}

/* comparison tables: a quiet mark in front of yes, partly and no */
/* the two clients get equal columns, whatever their text */
table.compare{
  table-layout: fixed;
}
table.compare thead th:first-child{
  inline-size: 34%;
}
/* the Golub column is tinted in the logo's colour, top to bottom */
table.compare th:nth-child(2),
table.compare td:nth-child(2){
  background: color-mix(in srgb, #00add8 9%, transparent);
}
table.compare thead th:nth-child(2){
  color: var(--color-text);
}
table.compare td:nth-child(2){
  font-weight: 500;
}
.compare .yes::before,
.compare .some::before,
.compare .no::before{
  display: inline-block;
  inline-size: 1.1rem;
  font-weight: 700;
}
.compare .yes::before{
  content: '✓';
  color: var(--color-success);
}
.compare .some::before{
  content: '◐';
  color: var(--color-text-muted);
}
.compare .no::before{
  content: '–';
  color: var(--color-text-muted);
}
.compare .no{
  color: var(--color-text-muted);
}

/* technology names with their logos, each on a small white tile so dark and yellow logos read in both themes */
.tech{
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.1rem 0.75rem 0.1rem 0;
}
.tech img{
  inline-size: 1.35rem;
  block-size: 1.35rem;
  padding: 0.2rem;
  border-radius: 0.35rem;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--color-border);
}

/* numbered steps for a how-to */
ol.steps{
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
ol.steps li{
  position: relative;
  padding: 0.9rem 1.1rem 0.9rem 3.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text-muted);
  counter-increment: step;
}
ol.steps li::before{
  content: counter(step);
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: 0.85rem;
  display: grid;
  place-items: center;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary-text);
  background: var(--color-primary);
}
ol.steps strong{
  color: var(--color-text);
}

/* code, on the input grey like the app's fields */
.code{
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}
.code-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.6rem 0.5rem 1rem;
  font: 0.8rem var(--mono);
  color: var(--color-text-muted);
  border-block-end: 1px solid var(--color-border);
}
.code-bar .btn{
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
}
.code pre{
  margin: 0;
  padding: 1rem 1.1rem 1.2rem;
  overflow-x: auto;
  font: 0.85rem/1.65 var(--mono);
}
.code pre code{
  padding: 0;
  background: none;
  font-size: inherit;
}
.code + .code{
  margin-block-start: 1rem;
}

.release{
  margin-block-end: 1.25rem;
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.release header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.release h3{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  margin: 0;
}
.release h3 a{
  color: var(--color-text);
}
.release time{
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.release ul{
  margin: 0;
  padding-inline-start: 1.1rem;
}
.release li{
  margin-block-end: 0.2rem;
}
.latest{
  padding: 0.1rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  background: #00add8;
  border-radius: 999px;
}
.release-links{
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* cards for links on the support, download and contribute pages, in the style of the home page's feature cards */
.cards{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
}
.card{
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a.card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.card h3{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 1.05rem;
}
.card h3 .icon{
  inline-size: 1.75rem;
  block-size: 1.75rem;
  padding: 0.35rem;
  border-radius: 0.5rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}
.card p{
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.925rem;
}
@media (prefers-reduced-motion: reduce) {
  .card{
    transition: none;
  }
}

/* prose pages */
.prose h2{
  margin-block-start: 2.75rem;
}
.prose h2:first-child{
  margin-block-start: 0;
}
.prose > p,
.prose > ul{
  color: var(--color-text-muted);
}
.prose > ul{
  padding-inline-start: 1.1rem;
}

.toc{
  position: sticky;
  inset-block-start: 5.5rem;
  align-self: start;
  align-content: start;
  display: grid;
  gap: 0.1rem;
  font-size: 0.9rem;
}
.toc a{
  padding: 0.35rem 0.7rem;
  color: var(--color-text-muted);
  border-radius: var(--radius);
}
.toc a:hover{
  background: var(--color-hover);
  color: var(--color-text);
  text-decoration: none;
}
.with-toc{
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 3rem;
}

/* documentation: a sidebar like the app's folder list, the page beside it, and on long pages its sections on the right */
.docs{
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.docs.has-toc{
  grid-template-columns: 14rem minmax(0, 1fr) 12rem;
}
.docs-side{
  position: sticky;
  inset-block-start: 5.5rem;
  display: grid;
  gap: 1rem;
}
.docs-side .docs-nav{
  position: static;
}
.docs-search{
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 0.7rem;
  border-radius: var(--radius);
  background: var(--color-input-bg);
  color: var(--color-text-muted);
}
.docs-search input{
  inline-size: 100%;
  padding-block: 0.55rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--color-text);
  background: none;
  border: 0;
  outline: none;
}
.docs-search:focus-within{
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}
.docs-results{
  position: absolute;
  inset-inline: 0;
  inset-block-start: calc(100% + 0.4rem);
  z-index: 20;
  display: grid;
  gap: 0.1rem;
  inline-size: max(100%, 22rem);
  max-block-size: 24rem;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface-raised);
  box-shadow: var(--shadow);
}
.docs-results a{
  display: grid;
  padding: 0.5rem 0.6rem;
  border-radius: 0.5rem;
  color: var(--color-text);
  font-size: 0.875rem;
}
.docs-results a:hover,
.docs-results a[aria-selected='true']{
  background: var(--color-hover);
  text-decoration: none;
}
.docs-results small{
  color: var(--color-text-muted);
}
.docs-results mark{
  background: color-mix(in srgb, #facc15 45%, transparent);
  color: inherit;
  border-radius: 2px;
}
.docs-results p{
  margin: 0;
  padding: 0.5rem 0.6rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.doc-toc{
  position: sticky;
  inset-block-start: 5.5rem;
  display: grid;
  gap: 0.1rem;
  font-size: 0.85rem;
}
.doc-toc h2{
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--color-text-muted);
}
.doc-toc a{
  padding: 0.25rem 0.5rem;
  border-inline-start: 2px solid var(--color-border);
  color: var(--color-text-muted);
}
.doc-toc a.l3{
  padding-inline-start: 1.25rem;
}
.doc-toc a:hover,
.doc-toc a[aria-current='true']{
  color: var(--color-text);
  border-inline-start-color: var(--color-text);
  text-decoration: none;
}
.doc-pager{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-block-start: 3rem;
}
.doc-pager a{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  font-weight: 600;
}
.doc-pager a:hover{
  background: var(--color-hover);
  text-decoration: none;
}
.doc-pager .next{
  justify-content: flex-end;
  text-align: end;
  grid-column: 2;
}
.doc-pager span{
  display: grid;
}
.doc-pager small{
  font-weight: 400;
  color: var(--color-text-muted);
}
.doc pre{
  position: relative;
}
.doc .copy-code{
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-end: 0.5rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.doc pre:hover .copy-code,
.doc .copy-code:focus-visible{
  opacity: 1;
}
@media (hover: none) {
  .doc .copy-code{
    opacity: 1;
  }
}
@media (max-width: 1280px) {
  .docs.has-toc{
    grid-template-columns: 14rem minmax(0, 1fr);
  }
  .doc-toc{
    display: none;
  }
}
.docs-nav{
  position: sticky;
  inset-block-start: 5.5rem;
  display: grid;
  gap: 0.1rem;
  font-size: 0.925rem;
}
.docs-nav a{
  padding: 0.35rem 0.7rem;
  color: var(--color-text);
  border-radius: var(--radius);
}
.docs-nav a:hover{
  background: var(--color-hover);
  text-decoration: none;
}
.docs-nav a[aria-current='page']{
  background: var(--color-selected);
  font-weight: 600;
}
.docs-group{
  display: grid;
  gap: 0.1rem;
  margin-block-start: 1rem;
}
.docs-group h2{
  margin: 0 0 0.25rem;
  padding-inline: 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--color-text-muted);
}
.doc{
  max-inline-size: 48rem;
}
.doc h2{
  margin-block-start: 2.5rem;
  font-size: 1.4rem;
}
.doc h3{
  margin-block-start: 1.75rem;
  font-size: 1.1rem;
}
.doc > p,
.doc li{
  color: var(--color-text);
}
.doc ul,
.doc ol{
  padding-inline-start: 1.25rem;
}
.doc li + li{
  margin-block-start: 0.3rem;
}
.doc img{
  margin-block: 1rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.doc pre{
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  font: 0.85rem/1.65 var(--mono);
}
.doc pre code{
  padding: 0;
  background: none;
  font-size: inherit;
}
.doc .table-wrap{
  margin-block: 1rem 1.5rem;
}
.doc blockquote{
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-inline-start: 3px solid var(--color-border);
  color: var(--color-text-muted);
}
.doc-edit{
  margin-block-start: 3rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--color-border);
}

/* how it works */
.flow{
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin-block: 1.5rem 0.5rem;
}
.flow-box{
  padding: 1rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  text-align: center;
}
.flow-box strong{
  display: block;
}
.flow-box span{
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.flow-box.main{
  border-color: var(--color-text);
}
.flow-arrow{
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.3;
}

/* screenshots page */
.tabs{
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--color-hover);
  margin-block-end: 2rem;
}
.tabs button{
  padding: 0.4rem 1rem;
  font: inherit;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.tabs button[aria-selected='true']{
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}
.gallery{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.75rem;
}
.gallery.phones{
  grid-template-columns: repeat(4, 1fr);
}
.gallery.tablets{
  grid-template-columns: minmax(0, 28rem);
  justify-content: center;
}
.gallery figure{
  margin: 0;
}
.gallery button{
  display: block;
  inline-size: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.gallery figcaption{
  margin-block-start: 0.7rem;
  font-size: 0.9rem;
}
.gallery figcaption strong{
  display: block;
  font-weight: 600;
}
.gallery figcaption span{
  color: var(--color-text-muted);
}

dialog.lightbox{
  max-inline-size: min(96vw, 1500px);
  max-block-size: 94vh;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-raised);
  color: var(--color-text);
  box-shadow: var(--shadow);
}
dialog.lightbox::backdrop{
  background: rgb(0 0 0 / 0.6);
}
dialog.lightbox img{
  max-block-size: calc(94vh - 3rem);
  inline-size: auto;
  margin-inline: auto;
}
.lightbox-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* faq */
details{
  border-block-end: 1px solid var(--color-border);
}
summary{
  position: relative;
  padding: 1.1rem 2rem 1.1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker{
  display: none;
}
summary::after{
  content: '';
  position: absolute;
  inset-inline-end: 0.25rem;
  inset-block-start: 1.35rem;
  inline-size: 0.55rem;
  block-size: 0.55rem;
  border-inline-end: 1.5px solid var(--color-text-muted);
  border-block-end: 1.5px solid var(--color-text-muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
details[open] summary::after{
  transform: rotate(-135deg);
  inset-block-start: 1.6rem;
}
details p{
  color: var(--color-text-muted);
  margin-block-end: 1.25rem;
}

/* the page fills the window, so a short page keeps its footer at the bottom */
main{
  flex: 1;
}
main:has(.notfound){
  display: flex;
  flex-direction: column;
}
.notfound{
  flex: 1;
  display: grid;
  align-content: center;
}

.cta{
  padding-block: 4.5rem;
  text-align: center;
}
.cta img{
  margin: 0 auto 1rem;
}
.cta p{
  color: var(--color-text-muted);
  margin-block-end: 1.5rem;
}
.cta .actions{
  justify-content: center;
}

/* the full license text */
.license-text {
  max-inline-size: 48rem;
  margin-block-start: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  font-size: 0.8125rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---- home page ---- */
/* the key words of a heading, underlined in a colour of the band above the header */
.b-mark {
  --c: #00add8;
  background: linear-gradient(var(--c), var(--c)) 0 100% / 100% 0.12em no-repeat;
  padding-block-end: 0.04em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
/* home: a software site in the figma.com / x.ai mould. One dark hero carrying the product, one light effect, quiet hover motion. */
.b-hero {
  --ink: var(--color-text);
  --ink-muted: var(--color-text-muted);
  position: relative;
  overflow: clip;
  padding-block: 5.5rem 0;
  background: var(--color-bg);
  color: var(--ink);
  isolation: isolate;
  border-block-end: 1px solid var(--color-border);
}
/* soft wave lines behind the hero; in the dark theme they are turned into light lines on dark */
.b-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url(/images/hero-waves-flow.svg) center 12rem / 100% auto no-repeat;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme='system'] .b-hero::before {
    filter: invert(1);
    opacity: 0.6;
  }
}
:root[data-theme='dark'] .b-hero::before {
  filter: invert(1);
  opacity: 0.6;
}
.b-hero h1 {
  font-size: clamp(2.2rem, 4.25vw, 3.4rem);
  letter-spacing: -0.045em;
  text-wrap: balance;
  margin-block-end: 1.25rem;
}
/* a soft, see-through backing keeps the text readable over the moving envelopes; the negative margin keeps it aligned with the title */
.b-hero .lead {
  color: var(--ink-muted);
  font-size: 1.2rem;
  max-inline-size: 46rem;
  padding: 0.35rem 0.75rem;
  margin-inline-start: -0.75rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--color-bg) 30%, transparent);
  backdrop-filter: blur(2px);
}
.b-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
}
.b-facts {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
  text-align: end;
}
.b-image {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  color: var(--ink);
  font-weight: 500;
}
.b-image:hover {
  text-decoration: underline;
}
.b-facts strong {
  color: var(--ink);
  font-weight: 600;
}
.b-stage {
  margin-block-start: 3.5rem;
  animation: b-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes b-rise {
  from {
    opacity: 0;
    transform: translateY(2.5rem);
  }
}
.b-stage .slides {
  border-block-end: 0;
  border-end-start-radius: 0;
  border-end-end-radius: 0;
  box-shadow: 0 -12px 40px rgb(0 0 0 / 0.08);
}
/* the screenshot and the tabs share one grid cell; the tabs stick to the bottom of the window until they rest 2.5rem above the screenshot's foot */
.b-stage {
  display: grid;
  margin-block-end: 0;
}
.b-stage > * {
  grid-area: 1 / 1;
}
.b-stage .slider-bar {
  position: sticky;
  inset-block-end: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  align-self: end;
  justify-content: center;
  margin: 0 0 2.5rem;
  pointer-events: none;
}
.b-stage .slider-tabs {
  pointer-events: auto;
}
.b-stage {
  position: relative;
}
.b-stage .slider-tabs {
  padding: 0.25rem;
  border-radius: 999px;
  background: rgb(13 13 13 / 0.72);
  backdrop-filter: blur(10px);
}
.b-stage .slider-tabs button {
  color: rgb(255 255 255 / 0.8);
  border-radius: 999px;
}
.b-stage .slider-tabs button:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}
.b-stage .slider-tabs button[aria-selected='true'] {
  color: #0d0d0d;
  background: #ffffff;
}
/* each tab has a colour of the band above the header; the open one is underlined like the menu,
   and while the slider plays the line fills up until the next screenshot */
.b-stage .slider-tabs button {
  --c: #00add8;
  position: relative;
}
.b-stage .slider-tabs button:nth-child(5n + 2) {
  --c: #34d399;
}
.b-stage .slider-tabs button:nth-child(5n + 3) {
  --c: #a78bfa;
}
.b-stage .slider-tabs button:nth-child(5n + 4) {
  --c: #f97316;
}
.b-stage .slider-tabs button:nth-child(5n + 5) {
  --c: #facc15;
}
.b-stage .slider-tabs button::after {
  content: '';
  position: absolute;
  inset-inline: 0.75rem;
  inset-block-end: 0.2rem;
  block-size: 2px;
  background: var(--c);
  transform: skewX(-30deg) scaleX(0);
  transform-origin: left;
  transition: transform 0.15s ease;
}
[dir='rtl'] .b-stage .slider-tabs button::after {
  transform-origin: right;
}
.b-stage .slider-tabs button:hover::after,
.b-stage .slider-tabs button[aria-selected='true']::after {
  transform: skewX(-30deg) scaleX(1);
}
.slider.playing .slider-tabs button[aria-selected='true']::after {
  animation: b-tab-fill var(--slide-time, 6s) linear both;
}
.slider.paused .slider-tabs button[aria-selected='true']::after {
  animation-play-state: paused;
}
@keyframes b-tab-fill {
  from {
    transform: skewX(-30deg) scaleX(0);
  }
}
.b-stage .slider-arrows {
  display: none;
}
/* the mascot peeks out from behind the screenshot and walks into the middle of the empty margin when clicked.
   The lane is that margin; it clips the mascot, so it seems to step out from behind the picture. */
.b-stage .slider-bar {
  position: sticky;
}
.b-lane {
  position: absolute;
  inset-inline-start: 100%;
  inset-block-end: -1rem;
  inline-size: calc((100vw - 100%) / 2);
  block-size: 8rem;
  overflow: hidden;
  pointer-events: none;
}
.b-mascot {
  position: absolute;
  inset-block-end: 0.5rem;
  /* it starts out peeking from behind the screenshot; a click brings it out */
  inset-inline-start: -3.75rem;
  inline-size: 6rem;
  block-size: 6rem;
  filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.2));
  pointer-events: auto;
  cursor: pointer;
  animation:
    b-walk 0.9s cubic-bezier(0.3, 0.6, 0.4, 1) 0.8s both,
    b-step 0.225s ease-in-out 0.8s 4 alternate;
}
/* a second hiding place behind the left edge of the screenshot; the mascot runs there after a few rounds */
.b-lane-left {
  inset-inline-start: auto;
  inset-inline-end: 100%;
}
.b-mascot-left {
  inset-inline-start: auto;
  inset-inline-end: -6.5rem;
  transform: scaleX(-1);
  animation: none;
}
@keyframes b-walk {
  from {
    inset-inline-start: -6.5rem;
  }
}
/* the eye blinks twice every three seconds, from the first steps on, also while it peeks */
.b-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: b-blink 3s ease-in-out 1s infinite;
}
@keyframes b-blink {
  0%, 6%, 10%, 12%, 16%, 100% {
    transform: scaleY(1);
  }
  8%, 14% {
    transform: scaleY(0.1);
  }
}
@keyframes b-step {
  from {
    transform: translateY(0) rotate(-3deg);
  }
  to {
    transform: translateY(-5px) rotate(3deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .b-mascot,
  .b-eye {
    animation: none;
  }
}
/* below this width the margin beside the screenshot is too narrow for it */
@media (max-width: 1399px) {
  .b-lane {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .b-stage {
    animation: none;
  }
}

.b-section {
  padding-block: 6rem;
}
.b-section h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.035em;
  max-inline-size: 22ch;
}
.b-sub {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-inline-size: 52rem;
  margin-block-end: 3rem;
}

.b-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.b-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a.b-card {
  color: inherit;
  text-decoration: none;
}
.b-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
/* on hover a card gets a line in one of the colours of the band above the header, like the menu */
.b-card {
  --c: #00add8;
  position: relative;
  overflow: hidden;
}
.b-card:nth-child(5n + 2) {
  --c: #34d399;
}
.b-card:nth-child(5n + 3) {
  --c: #a78bfa;
}
.b-card:nth-child(5n + 4) {
  --c: #f97316;
}
.b-card:nth-child(5n + 5) {
  --c: #facc15;
}
.b-card::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  block-size: 3px;
  background: var(--c);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
[dir="rtl"] .b-card::after {
  transform-origin: right;
}
.b-card:hover::after {
  transform: scaleX(1);
}
.b-card h3 {
  font-size: 1.15rem;
  margin: 0;
}
.b-card p {
  margin: 0;
  color: var(--color-text-muted);
}
.b-ui {
  display: grid;
  gap: 0.5rem;
  min-block-size: 9.5rem;
  align-content: center;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  background: var(--color-bg);
  font-size: 0.85rem;
}
.b-notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-notice-border);
  border-radius: var(--radius);
  background: var(--color-notice);
}
.b-notice .btn {
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
}
.b-muted {
  color: var(--color-text-muted);
}
.b-chips,
.b-attach {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.b-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-input-border);
}
.b-chip.on {
  color: var(--color-primary-text);
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.b-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  background: var(--color-input-bg);
}
.b-sig {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--color-success) 12%, transparent);
  color: var(--color-success);
  font-weight: 500;
}
.b-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
}
.b-row > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.b-row .dot {
  margin: 0;
}
.b-toast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  color: var(--color-primary-text);
  background: var(--color-primary);
  box-shadow: var(--shadow);
}
.b-indent {
  padding-inline-start: 1rem;
  font-size: 0.8rem;
}
.b-pop {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface-raised);
  box-shadow: var(--shadow);
}
.b-pop .icon {
  color: var(--color-text-muted);
}
.b-themes {
  display: inline-flex;
  justify-self: start;
  padding: 2px;
  border-radius: 999px;
  background: var(--color-hover);
}
.b-themes span {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  color: var(--color-text-muted);
}
.b-themes .on {
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}
.b-swatches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.b-sw {
  padding: 0.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  border: 1px solid var(--color-border);
}
.b-sw.light {
  background: #ffffff;
  color: #0d0d0d;
}
.b-sw.dark {
  background: #171717;
  color: #ececec;
}
.b-mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  overflow: hidden;
  white-space: nowrap;
}
.b-logo {
  display: grid;
  place-items: center;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  border-radius: 0.4rem;
  background: #7c3aed;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
}
.b-swatch {
  inline-size: 1rem;
  block-size: 1rem;
  border-radius: 50%;
  background: #7c3aed;
}
.b-brand-btn {
  justify-self: start;
  color: #ffffff;
  background: #7c3aed;
  border-color: #7c3aed;
}
.b-swipe {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-success);
}
.b-swipe-action {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0.8rem;
  display: flex;
  align-items: center;
  color: #ffffff;
  font-weight: 600;
}
.b-swipe-row {
  position: relative;
  display: grid;
  padding: 0.5rem 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  animation: b-swipe 3.2s ease-in-out infinite;
}
@keyframes b-swipe {
  0%, 20% {
    transform: translateX(0);
  }
  50%, 75% {
    transform: translateX(5.5rem);
  }
  100% {
    transform: translateX(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .b-swipe-row {
    animation: none;
  }
}
.b-faq-grid {
  align-items: start;
}
.b-faq .faq details:first-child {
  border-block-start: 1px solid var(--color-border);
}
.b-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 4rem;
  align-items: center;
}
/* the claim stays in view while the four charts scroll past it */
.b-bench {
  align-items: start;
}
.b-bench-text,
.b-faq-text {
  position: sticky;
  inset-block-start: 6rem;
}
.b-bench .bars {
  gap: 3rem;
}
.b-big {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 0 0 0.5rem;
}
/* the benchmark number grows in each time it changes, and the heading fades over */
.b-big {
  transform-origin: left bottom;
  font-variant-numeric: tabular-nums;
}
.b-big.grow {
  animation: b-grow 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes b-grow {
  from {
    transform: scale(0.55);
    opacity: 0.2;
  }
}
.b-say {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.b-say.out {
  opacity: 0;
  transform: translateY(0.5rem);
}
.b-say.in .b-mark {
  animation: b-draw 0.6s 0.15s ease-out both;
}
@keyframes b-draw {
  from {
    background-size: 0 0.12em;
  }
}
.b-bench .bars figure {
  transition: opacity 0.3s ease;
}
.b-bench.live .bars figure:not(.on) {
  opacity: 0.4;
}
@media (prefers-reduced-motion: reduce) {
  .b-big.grow,
  .b-say.in .b-mark {
    animation: none;
  }
}
@media (max-width: 640px) {
  .b-cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .b-bench-text,
  .b-faq-text {
    position: static;
  }
  .b-top,
  .b-split {
    grid-template-columns: 1fr;
  }
  .b-facts {
    text-align: start;
  }
  .b-cards {
    grid-template-columns: 1fr 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .b-hero::before {
    background-image: url(/images/hero-waves.svg);
  }
}

/* the closing call to the live demo, on every page above the footer */
.b-end{
  overflow: clip;
  padding-block: 3.5rem;
  background: #00384a;
  color: #ffffff;
}
.b-end-inner{
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 3rem;
}
.b-end-title{
  margin: 0 0 2.25rem;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: #ffffff;
}
.b-end-title span{
  color: #7fd8ee;
  white-space: nowrap;
}
/* the lead-in is smaller, so "a better webmail." fits on one line */
.b-end-title small{
  display: block;
  margin-block-end: 0.12em;
  font-size: 0.6em;
  letter-spacing: -0.04em;
}
.b-end-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}
.b-end-btn{
  color: #00384a;
  background: #ffffff;
  border-color: #ffffff;
}
.b-end-btn:hover{
  background: #e6f7fb;
}
.b-end-btn .icon{
  transition: transform 0.15s ease;
}
.b-end-btn:hover .icon{
  transform: translateX(3px);
}
.b-end-link{
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.b-end-note{
  margin: 1.25rem 0 0;
  color: rgb(255 255 255 / 0.75);
}
.b-end :focus-visible{
  outline-color: #ffffff;
}
/* screenshots of the app fanned out like a hand of cards beside the call; they spread a little on hover */
.b-end-stack{
  position: relative;
  display: block;
  aspect-ratio: 1440 / 1050;
  margin-inline-end: calc(-1 * (100vw - 100%) / 4);
}
.b-end-stack img{
  position: absolute;
  inline-size: 78%;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.4);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.b-end-stack .s1{
  inset-block-start: 0;
  inset-inline-end: 0;
  transform: rotate(7deg);
  opacity: 0.85;
}
.b-end-stack .s2{
  inset-block-start: 6%;
  inset-inline-end: 6%;
  transform: rotate(2deg);
}
.b-end-stack .s3{
  inset-block-start: 14%;
  inset-inline-end: 12%;
  transform: rotate(-3deg);
}
.b-end-stack .s4{
  inline-size: 20%;
  inset-block-end: 0;
  inset-inline-start: 0;
  border-radius: 1.25rem;
  transform: rotate(-8deg);
}
.b-end-stack:hover .s1{
  transform: rotate(10deg) translate(3%, -3%);
}
.b-end-stack:hover .s2{
  transform: rotate(4deg) translate(1%, -2%);
}
.b-end-stack:hover .s3{
  transform: rotate(-4deg) translate(-1%, 1%);
}
.b-end-stack:hover .s4{
  transform: rotate(-12deg) translate(-6%, 2%);
}
@media (max-width: 900px) {
  .b-end-stack{
    margin-inline-end: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .b-end-stack img{
    transition: none;
  }
}
@media (max-width: 900px) {
  .b-end-inner{
    grid-template-columns: 1fr;
  }
}

/* footer, on the sidebar grey */
.foot{
  background: var(--color-surface);
  font-size: 0.9rem;
}
/* the same band of colours as above the header closes the page */
.foot::before{
  content: '';
  display: block;
  block-size: 4px;
  background: linear-gradient(
    135deg,
    #00add8 0 20%,
    #34d399 20% 40%,
    #a78bfa 40% 60%,
    #f97316 60% 80%,
    #facc15 80% 100%
  );
}
.foot-grid{
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-block: 3rem 2rem;
}
.foot-about p{
  margin-block: 0.75rem 1rem;
  max-inline-size: 22rem;
  color: var(--color-text-muted);
}
.foot nav{
  display: grid;
  align-content: start;
  gap: 0.45rem;
}
.foot nav h2{
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0;
}
.foot nav a{
  color: var(--color-text);
}
/* links that leave the site get a small arrow pointing out */
.foot nav a[href^="http"]::after{
  content: "";
  display: inline-block;
  inline-size: 0.7em;
  block-size: 0.7em;
  margin-inline-start: 0.3em;
  background: currentColor;
  opacity: 0.55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2.5h5.5V8M9.5 2.5 2.5 9.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2.5h5.5V8M9.5 2.5 2.5 9.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
[dir="rtl"] .foot nav a[href^="http"]::after{
  transform: scaleX(-1);
}
.foot-bottom{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.1rem;
  border-block-start: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.825rem;
}

/* theme switch, the same control as at the bottom of the app's sidebar */
.themes{
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--color-hover);
}
.themes button{
  display: grid;
  place-items: center;
  inline-size: 1.85rem;
  block-size: 1.65rem;
  padding: 0;
  color: var(--color-text-muted);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.themes button[aria-checked='true']{
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}

@media (max-width: 1080px) {
  .nav{
    display: none;
    position: absolute;
    inset-inline: 0;
    inset-block-start: 100%;
    flex-direction: column;
    padding: 0.75rem 1.25rem 1rem;
    background: var(--color-bg);
    border-block-end: 1px solid var(--color-border);
    box-shadow: var(--shadow);
  }
  .nav.open{
    display: flex;
  }
  .nav a{
    padding: 0.6rem 0.75rem;
  }
  .menu-btn{
    display: inline-flex;
  }
  .with-toc,
  .docs,
  .docs.has-toc{
    grid-template-columns: 1fr;
  }
  .docs-nav,
  .docs-side{
    position: static;
  }
  .toc{
    display: none;
  }
}

@media (max-width: 900px) {
  .split,
  .split.even{
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .gallery.phones{
    grid-template-columns: repeat(2, 1fr);
  }
  .foot-grid{
    grid-template-columns: 1fr 1fr;
  }
  .foot-about{
    grid-column: 1 / -1;
  }
  .flow{
    grid-template-columns: 1fr;
  }
  .flow-arrow{
    transform: none;
  }
}

@media (max-width: 640px) {
  .section{
    padding-block: 3.25rem;
  }
  .demo-btn{
    display: none;
  }
  
  .gallery{
    grid-template-columns: 1fr;
  }
  .section-head{
    display: block;
  }
  .section-head .more{
    display: inline-block;
    margin-block-start: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *{
    transition: none !important;
  }
}

.count{
  min-inline-size: 1.4rem;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  color: var(--color-badge-text);
  background: var(--color-badge);
  border-radius: 999px;
}
.dot{
  grid-column: 1;
  inline-size: 0.5rem;
  block-size: 0.5rem;
  margin-block-start: 0.5rem;
  border-radius: 50%;
  background: var(--color-accent);
}

/* benchmark bars, each figure on its own linear scale */
.bars{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
.bars figure{
  margin: 0;
}
.bars figcaption{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 0.9rem;
  font-weight: 600;
}
.bars figcaption span{
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.bars ul{
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bars li{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 0.75rem;
  align-items: center;
}
.bars .bar{
  grid-column: 1 / -1;
  grid-row: 2;
  block-size: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(to right, var(--color-text-muted) var(--v), var(--color-hover) var(--v));
  opacity: 0.55;
}
.bars li.us .bar{
  background: linear-gradient(to right, #00add8 max(var(--v), 0.5rem), var(--color-hover) max(var(--v), 0.5rem));
  opacity: 1;
}
.bars b{
  font-weight: 500;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.bars li.us b{
  font-weight: 700;
}

@media (max-width: 900px) {
  .bars{
    grid-template-columns: 1fr;
  }
}
