/* Shared by the static pages beside the app (guide/, legal/ and 404.html). Colours follow lib/ui/theme/palette.dart. */
@font-face {
  font-family: "Cairo";
  font-weight: 600;
  font-display: swap;
  src: url("assets/assets/fonts/Cairo-SemiBold.ttf") format("truetype");
}
:root {
  --ink: #000714;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.7);
  --accent: #429fc0;
  --hairline: rgba(255, 255, 255, 0.12);
  --outline: rgba(255, 255, 255, 0.28);
  --card: rgba(0, 207, 255, 0.10);
  /* the text column of every page */
  --column: 760px;
}
* { box-sizing: border-box; }
/* room for a scrollbar on every page, scrolling or not, so the column sits in the same place on all of them */
html { background: var(--ink); color-scheme: dark; scrollbar-gutter: stable; }
body {
  margin: 0;
  /* the footer stays at the bottom of the window on short pages */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--text);
  font: 600 17px/1.55 "Cairo", system-ui, sans-serif;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #6cc0de; }
header, main { width: 100%; max-width: var(--column); margin: 0 auto; padding: 0 16px; }
main { flex: 1 0 auto; }
header { display: flex; align-items: center; min-height: 66px; padding-top: 24px; padding-bottom: 8px; }
header img { height: 32px; width: auto; display: block; }
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 20px;
  white-space: nowrap;
}
.button:hover { background: #4fb0d3; color: #fff; }

/* "Open Groove Gym" stays put at the top right of the text column. Once the page scrolls (site.js) it moves out
   beside the column where the window leaves room, and otherwise sits on a small blurred backdrop over the text. */
.open-app {
  position: fixed;
  z-index: 10;
  top: 19px;
  /* the viewport's width without the scrollbar's room, so it lines up with the column */
  right: max(16px, calc((100% - var(--column)) / 2 + 16px));
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.open-app::before {
  content: "";
  position: absolute;
  z-index: -1;
  /* a soft, see-through blur that fades out towards its edges */
  inset: -15px -24px;
  background: rgba(0, 7, 20, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
  mask-image: radial-gradient(closest-side, #000 55%, transparent);
  opacity: 0;
  transition: opacity 300ms ease;
}
.scrolled .open-app::before { opacity: 1; }
@media (min-width: 1200px) {
  .scrolled .open-app { transform: translateX(calc(100% + 32px)); }
  .scrolled .open-app::before { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .open-app, .open-app::before { transition: none; }
}
h1 { font-size: 30px; line-height: 1.2; margin: 32px 0 8px; }
h2 { font-size: 22px; line-height: 1.25; margin: 36px 0 8px; }
p, li { color: var(--text-dim); }
strong { color: var(--text); font-weight: 600; }
ol { padding-left: 1.4em; }
li { margin: 0 0 14px; padding-left: 4px; }
li p { margin: 8px 0 0; }
.lead { font-size: 19px; color: var(--text); }
.card { background: var(--card); border-radius: 20px; padding: 16px 20px; margin: 24px 0; }
.card p { margin: 0; }
.card p + p { margin-top: 12px; }
/* The same footer as the app's (lib/ui/shell/site_footer.dart), at the same sizes on every screen: "Get the app"
   and the guide on the left; a separator, then the other links, the "More apps" menu and the copyright on the
   right; all on one line. The sizes are the app's own (GGFooterMetrics and the type scale, which depend on the
   device class), in its logical pixels times --u, which grows from 1px at 1280 wide to 1.5px at 1920, as the
   app scales its footer up (GGFooterMetrics.scaleFor). site.js sets --footer-u as the app works it out: from the
   whole window's width, which 100vw leaves a scrollbar out of, and times the browser's text size, which scales
   the whole footer, as far as it still fits on one line (GGFooterMetrics.scaleWith). */
footer {
  --u: var(--footer-u, clamp(1px, calc(1px + (100vw - 1280px) / 1280), 1.5px));
  /* a phone (DeviceClass.compact); small phones and tablets or desktops below */
  --small: 12; --strong: 14; /* labelMedium, labelLarge */
  --pad-x: 16; --pad-y: 6; --gap: 12; --link-x: 5; --link-y: 7; --sep-gap: 16; --sep-height: 20; --inset: 24;
  --button-x: 16; --button-y: 5; --menu-l: 11; --menu-r: 9; --menu-y: 4; --menu-gap: 8; --menu-width: 290;
  --xs: 4; --sm: 8; --md: 16; --radius-sm: 8; --radius-md: 14;
  /* always in view: the page scrolls behind it */
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 48px;
  /* less on the right by the scrollbar's width (site.js), so the links sit where they do in the app */
  padding: calc(var(--pad-y) * var(--u))
    max(calc(var(--xs) * var(--u)), calc(var(--pad-x) * var(--u) - var(--footer-gutter, 0px)))
    calc(var(--pad-y) * var(--u) + env(safe-area-inset-bottom)) calc(var(--pad-x) * var(--u));
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--hairline);
  font-size: calc(var(--small) * var(--u));
  /* the app's line height for Cairo at these sizes */
  line-height: 1.4;
  white-space: nowrap;
  container-type: inline-size;
  color: var(--text-dim);
  display: flex;
  align-items: center;
}
@media (max-width: 359.98px), (max-height: 359.98px) {
  footer {
    --small: 10.5; --strong: 12.5;
    --pad-x: 14; --pad-y: 4; --gap: 10; --link-x: 4; --link-y: 6; --sep-gap: 10; --sep-height: 18; --inset: 0;
    --button-x: 14; --button-y: 4; --menu-l: 10; --menu-r: 8; --menu-y: 3; --menu-gap: 6; --menu-width: 270;
    --sm: 7; --md: 14; --radius-sm: 7; --radius-md: 12;
  }
}
@media (min-width: 600px) and (min-height: 600px) {
  footer {
    --small: 14; --strong: 17;
    --pad-x: 20; --pad-y: 8; --gap: 16; --link-x: 6; --link-y: 8; --sep-gap: 24; --sep-height: 22; --inset: 56;
    --button-x: 20; --button-y: 6; --menu-l: 12; --menu-r: 10; --menu-y: 4; --menu-gap: 8; --menu-width: 320;
    --sm: 8; --md: 20; --radius-sm: 10; --radius-md: 16;
  }
}
footer a { text-decoration: none; }
footer .button {
  flex: none;
  font-size: calc(var(--strong) * var(--u));
  padding: calc(var(--button-y) * var(--u)) calc(var(--button-x) * var(--u));
}
footer .guide {
  flex: none;
  margin: 0 calc(var(--sep-gap) * var(--u)) 0 calc(var(--gap) * var(--u));
  padding: calc(var(--link-y) * var(--u)) calc(var(--link-x) * var(--u));
  font-size: calc(var(--strong) * var(--u));
}
/* the other links, with the separator before them, keep to the right */
footer .separator {
  flex: none;
  width: 1px;
  height: calc(var(--sep-height) * var(--u));
  margin: 0 calc(var(--sep-gap) * var(--u)) 0 auto;
  background: var(--hairline);
}
footer .links {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  column-gap: calc(var(--gap) * var(--u));
}
footer .links > a { color: var(--text); padding: calc(var(--link-y) * var(--u)) calc(var(--link-x) * var(--u)); }
footer .links > a:hover { color: var(--accent); }
footer .publisher { display: none; align-items: center; gap: calc(var(--gap) * var(--u) / 2); }
footer .publisher img { height: calc(2 * var(--small) * var(--u)); width: auto; }
/* The menu, as in the app (lib/ui/shell/footer_menu.dart) and on slowlick.app: an outlined button with a chevron
   that opens a card above it, listing the other apps. site.js closes it on a click outside it or Escape. */
footer .more { position: relative; flex: none; }
footer .more summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: calc(var(--xs) * var(--u));
  padding: calc(var(--menu-y) * var(--u)) calc(var(--menu-r) * var(--u)) calc(var(--menu-y) * var(--u))
    calc(var(--menu-l) * var(--u));
  /* drawn inside, so it takes no room, as in the app */
  box-shadow: inset 0 0 0 1px var(--outline);
  border-radius: 999px;
  color: var(--text);
}
footer .more summary::-webkit-details-marker { display: none; }
/* points up, the way the card opens, and down while it is open */
footer .more summary svg {
  width: calc(0.75 * var(--small) * var(--u)); height: calc(0.75 * var(--small) * var(--u));
  fill: none; stroke: var(--text-dim); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 150ms;
}
footer .more[open] summary svg { transform: rotate(180deg); }
footer .more summary:hover, footer .more[open] summary { background: rgba(255, 255, 255, 0.06); }
footer .more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
footer .more-menu {
  position: absolute; right: 0; bottom: calc(100% + var(--menu-gap) * var(--u)); z-index: 1;
  width: min(calc(var(--menu-width) * var(--u)), calc(100vw - var(--md) * 2px));
  display: flex; flex-direction: column;
  padding: calc(var(--xs) * var(--u));
  white-space: normal;
  /* solid: a blur in here wouldn't reach the page through the footer's own blurred backdrop */
  background: var(--ink);
  border: 1px solid var(--outline); border-radius: calc(var(--radius-md) * var(--u));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
footer .more-menu p {
  margin: 0; color: var(--text-dim);
  padding: calc(var(--sm) * var(--u)) calc((var(--sm) + var(--xs)) * var(--u)) calc(var(--xs) * var(--u));
}
footer .more-menu a {
  display: grid; grid-template-columns: 1fr auto; column-gap: calc(var(--sm) * var(--u)); align-items: center;
  padding: calc(var(--sm) * var(--u)) calc((var(--sm) + var(--xs)) * var(--u));
  border-radius: calc(var(--radius-sm) * var(--u));
  color: var(--text-dim);
}
footer .more-menu a b, footer .more-menu .pages a { font-size: calc(var(--strong) * var(--u)); font-weight: 600; color: var(--text); }
footer .more-menu a span { grid-column: 1; }
footer .more-menu a svg {
  grid-column: 2; grid-row: 1 / span 2; width: calc(0.85 * var(--small) * var(--u)); height: calc(0.85 * var(--small) * var(--u));
  fill: none; stroke: var(--text-dim); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
footer .more-menu a:hover { background: rgba(255, 255, 255, 0.06); }
footer .more-menu a:hover b, footer .more-menu .pages a:hover { color: var(--accent); }
footer .more-menu .pages {
  display: flex; flex-direction: column;
  padding-bottom: calc(var(--xs) * var(--u)); margin-bottom: calc(var(--xs) * var(--u));
  border-bottom: 1px solid var(--hairline);
}
/* What fits, as in the app: the support note on desktop windows (Breakpoints.studio); the copyright and room
   before "Get the app" from 640 wide; contact, privacy and licences where there is room for them
   (GGFooterMetrics.linksInlineFrom, by device class), and otherwise in the menu, which is then called "More". */
footer .note, footer .links > .page, footer .more .apps { display: none; }
@media (min-width: 1200px) and (min-height: 640px) {
  footer .note { display: inline; }
}
@media (min-width: 640px) {
  footer .publisher { display: inline-flex; }
  footer .button { margin-left: calc(var(--inset) * var(--u)); }
}
/* measured on the footer, whose content is as wide as the app's beside a scrollbar (site.js evens out the padding,
   keeping at least 4 on the right), so they switch at the app's widths (GGFooterMetrics.linksInlineFrom), or a few
   pixels before them where scrollbars take no room */
@media (max-height: 359.98px) {
  @container (min-width: 627px) {
    footer .links > .page, footer .more .apps { display: inline; }
    footer .more .all, footer .more-menu .pages { display: none; }
  }
}
@media (min-height: 360px) and (max-height: 599.98px) {
  @container (min-width: 685px) {
    footer .links > .page, footer .more .apps { display: inline; }
    footer .more .all, footer .more-menu .pages { display: none; }
  }
}
@media (min-height: 600px) {
  @container (min-width: 860px) {
    footer .links > .page, footer .more .apps { display: inline; }
    footer .more .all, footer .more-menu .pages { display: none; }
  }
}
/* With site.js, as in the app: what shows depends on the room the footer is laid out in, in its own units, which
   a larger text size makes narrower (footer.fit, with .roomy, .inline and .note where they fit) */
footer.fit .note, footer.fit .links > .page, footer.fit .more .apps, footer.fit .publisher { display: none; }
/* only what fits shows, so the links never need a second row, which rounding at some text sizes would start */
footer.fit .links { flex-wrap: nowrap; }
footer.fit .more .all { display: inline; }
footer.fit .more-menu .pages { display: flex; }
footer.fit .button { margin-left: 0; }
footer.fit.roomy .publisher { display: inline-flex; }
footer.fit.roomy .button { margin-left: calc(var(--inset) * var(--u)); }
footer.fit.inline .links > .page, footer.fit.inline .more .apps { display: inline; }
footer.fit.inline .more .all, footer.fit.inline .more-menu .pages { display: none; }
footer.fit.note .note { display: inline; }
@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 26px; }
  header img { height: 26px; }
  .open-app { top: 16px; }
}
@media (max-width: 360px) {
  /* room for the logo and the button side by side */
  header img { height: 22px; }
  .open-app .button { font-size: 14px; padding: 6px 14px; }
}
