/* Layz site, V3 "Paper Hours". Tokens from Figma Tokens 7556:289 and
   directions.json variants[V3]. Mobile first; designs exist for 390 and 1440, and
   the type scale interpolates between them. Page CSS lives in its own file. */

/* Fonts: variable woff2 (Golos Text wght 400-900, Martian Mono wght 100-800),
   Google subsets kept split so a page downloads only the scripts it shows. */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/golos-text-latin.woff2?v=f8d7109111) 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;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/golos-text-cyrillic.woff2?v=2f175b8fc4) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/golos-text-symbols.woff2?v=e09b5bc314) format('woff2');
  unicode-range: U+2192, U+2248, U+2713;
}
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/assets/fonts/martian-mono-latin.woff2?v=29bf269131) 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;
}
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/assets/fonts/martian-mono-cyrillic.woff2?v=34e826d311) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/assets/fonts/martian-mono-symbols.woff2?v=7be1734974) format('woff2');
  unicode-range: U+2192, U+2248, U+2713;
}
/* Static Bold at wdth 125, digits and ":" only: the Live Activity replica. */
@font-face {
  font-family: 'Google Sans Flex';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/google-sans-flex-digits.woff2?v=245028f287) format('woff2');
  unicode-range: U+0030-003A;
}

:root {
  /* Palette (V3). Use only the pairs in the V3 contrast table. */
  --paper: #F3EEE4;
  --sheet: #FBF8F2;
  --kraft: #E4D5BC;
  --oat: #D8C7A8;
  --ink: #211B15;
  --ink-soft: #5C5246;
  --muted: #73685B;          /* mono meta on paper and sheet only, never on kraft */
  --ember: #D03E22;          /* fills and large figures; white label on it */
  --ember-hover: #B8371D;
  --ember-ink: #A8341A;      /* accent as small text, errors, focus ring */
  --cocoa: #201915;
  --ember-night: #FF6B57;    /* accent on cocoa and in the island replica only */
  --on-cocoa-soft: #B4AC9F;  /* secondary text on cocoa */
  --field: #8C8378;          /* input and chip borders on sheet */
  --hairline: rgb(33 27 21 / 0.12);
  --ink-wash: rgb(33 27 21 / 0.06); /* secondary button hover */
  /* Colours sampled from the plates, for section fills behind them. */
  --plate-hero-wall: #E8D6C5;
  --plate-hero-floor: #DFBD98;
  --plate-night-wall: #221817;
  --plate-night-floor: #403531;
  --phone-body: #1C1A18;
  --phone-rim: #3A3530;

  --focus-ring: var(--ember-ink);

  /* Type */
  --font-sans: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Martian Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-replica: 'Google Sans Flex', 'Martian Mono', ui-monospace, monospace;

  /* size / line height, 390 -> 1440 */
  --fs-h1: clamp(36px, 25.6px + 2.6667vw, 64px);
  --lh-h1: clamp(40px, 29.6px + 2.6667vw, 68px);
  --ls-h1: -0.025em;
  --fs-h2-closing: clamp(34px, 25.83px + 2.0952vw, 56px);
  --lh-h2-closing: clamp(38px, 29.83px + 2.0952vw, 60px);
  --ls-h2-closing: -0.02em;
  --fs-h2: clamp(30px, 24.8px + 1.3333vw, 44px);
  --lh-h2: clamp(34px, 28.8px + 1.3333vw, 48px);
  --ls-h2: -0.015em;
  --fs-h3: clamp(20px, 18.51px + 0.381vw, 24px);
  --lh-h3: clamp(26px, 24.51px + 0.381vw, 30px);
  --ls-h3: -0.005em;
  --fs-lead: clamp(17px, 15.89px + 0.2857vw, 20px);
  --lh-lead: clamp(26px, 24.51px + 0.381vw, 30px);
  --fs-body: clamp(16px, 15.63px + 0.0952vw, 17px);
  --lh-body: clamp(26px, 25.26px + 0.1905vw, 28px);
  --fs-card: 16px;
  --lh-card: 24px;
  --fs-faq: clamp(17px, 15.89px + 0.2857vw, 20px);
  --lh-faq: clamp(24px, 22.51px + 0.381vw, 28px);
  --fs-ui: 15px;
  --lh-ui: 20px;
  --fs-price: clamp(64px, 52.11px + 3.0476vw, 96px);
  --lh-price: clamp(64px, 52.11px + 3.0476vw, 96px);
  --fs-figure: clamp(32px, 29.03px + 0.7619vw, 40px);
  --lh-figure: clamp(36px, 33.03px + 0.7619vw, 44px);
  --fs-meta: 12px;
  --lh-meta: 18px;
  --fs-legal: 13px;
  --lh-legal: 20px;
  --fs-legal-h1: clamp(32px, 26.06px + 1.5238vw, 48px);
  --lh-legal-h1: clamp(36px, 30.06px + 1.5238vw, 52px);
  --ls-legal-h1: -0.02em;
  --fs-legal-body: clamp(16px, 15.63px + 0.0952vw, 17px);
  --lh-legal-body: clamp(28px, 27.26px + 0.1905vw, 30px);
  --fs-replica: clamp(30px, 28.51px + 0.381vw, 34px);
  --lh-replica: clamp(36px, 34.51px + 0.381vw, 40px);

  /* Spacing: 4 px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 64px;
  --space-10: 80px;
  --space-11: 96px;
  --space-12: 128px;
  --section-pad: clamp(80px, 62.17px + 4.5714vw, 128px);

  /* Grid: 390 = 4 col, margin 20, gutter 14; 1440 = 12 col, margin 64, gutter 32, max 1312 */
  --cols: 4;
  --margin: 20px;
  --gutter: 14px;
  --max: 1312px;
  --header-h: 56px;

  --radius-card: 20px;
  --radius-control: 10px; /* buttons, chips, inputs */
  --radius-tile: 12px;    /* QR tile */
  --radius-tag: 8px;

  --shadow-tag: 0 2px 4px rgb(33 27 21 / 0.12);
  --shadow-phone: 0 2px 4px rgb(33 27 21 / 0.12), 0 24px 48px rgb(33 27 21 / 0.14);

  /* The one motion curve: 160 ms for hover/press, 400 ms for entrances. */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 160ms;
  --dur: 400ms;
}

@media (min-width: 768px) {
  :root {
    --cols: 12;
    --margin: 40px;
    --gutter: 24px;
  }
}

@media (min-width: 960px) {
  :root {
    --header-h: 72px;
    --fs-meta: 13px;
    --lh-meta: 20px;
    --ls-h1: -0.03em;
    --ls-h2-closing: -0.025em;
    --ls-h2: -0.02em;
    --ls-h3: -0.01em;
    --ls-legal-h1: -0.025em;
  }
}

@media (min-width: 1200px) {
  :root {
    --margin: 64px;
    --gutter: 32px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip; /* floor strips bleed to the page edge */
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

main:focus {
  outline: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* Long Russian words («конфиденциальности») outgrow a 320 px column. */
:lang(ru) :is(h1, h2, h3) {
  hyphens: auto;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

img,
svg,
video,
canvas,
picture {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

::selection {
  background: var(--kraft);
  color: var(--ink);
}

/* Typography: element defaults plus utility classes for the other tokens. */
h1,
.t-h1 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
}

.t-h2-closing {
  font-weight: 600;
  font-size: var(--fs-h2-closing);
  line-height: var(--lh-h2-closing);
  letter-spacing: var(--ls-h2-closing);
}

h2,
.t-h2 {
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
}

h3,
.t-h3 {
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
}

.t-lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--ink-soft);
}

.t-body {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.t-card {
  font-size: var(--fs-card);
  line-height: var(--lh-card);
}

.t-faq {
  font-weight: 500;
  font-size: var(--fs-faq);
  line-height: var(--lh-faq);
}

.t-ui {
  font-weight: 500;
  font-size: var(--fs-ui);
  line-height: var(--lh-ui);
}

.t-legal {
  font-size: var(--fs-legal);
  line-height: var(--lh-legal);
}

.t-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
}

.t-figure {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-figure);
  line-height: var(--lh-figure);
  font-variant-numeric: tabular-nums;
}

.t-price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-price);
  line-height: var(--lh-price);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.t-replica {
  font-family: var(--font-replica);
  font-weight: 700;
  font-size: var(--fs-replica);
  line-height: var(--lh-replica);
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
}

/* Links: underlined by default because ember-ink and ink-soft differ by only 1.15. */
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--dur-fast) var(--ease);
}

@media (hover: hover) {
  a:hover {
    color: var(--ember-ink);
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-control);
  background: var(--sheet);
  color: var(--ink);
  font-weight: 500;
  font-size: var(--fs-ui);
  line-height: var(--lh-ui);
  text-decoration: none;
  box-shadow: var(--shadow-tag);
  transform: translateY(calc(-100% - var(--space-4)));
}

.skip-link:focus {
  transform: none;
}

/* Layout */
.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--margin));
  margin-inline: auto;
  padding-inline: var(--margin);
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
}

/* Cocoa surfaces (closing band, 404) switch the focus ring to the night accent. */
.surface-cocoa {
  --focus-ring: var(--ember-night);
  background: var(--cocoa);
  color: var(--paper);
}

/* Buttons: primary = ember with a white label; secondary = 1 px ink outline. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-5);
  border: 0;
  border-radius: var(--radius-control);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

/* Keeps a 44 px tall hit area on the 32 and 36 px buttons. */
.btn::after {
  content: '';
  position: absolute;
  inset: min(0px, calc((100% - 44px) / 2)) 0;
}

.btn:active {
  transform: scale(0.98);
}

.btn--l {
  min-height: 48px;
  padding: 0 var(--space-5);
  font-size: 16px;
  line-height: 24px;
}

.btn--m {
  min-height: 36px;
  padding: 0 var(--space-4);
  font-size: 15px;
  line-height: 20px;
}

.btn--s {
  min-height: 32px;
  padding: 0 14px;
  font-size: 15px;
  line-height: 20px;
}

.btn--primary {
  background: var(--ember);
  color: #fff;
}

.btn--secondary {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

@media (hover: hover) {
  .btn--primary:hover {
    background: var(--ember-hover);
    color: #fff;
  }

  .btn--secondary:hover {
    background: var(--ink-wash);
    color: var(--ink);
  }
}

/* App Store badge link: official artwork, sized by height only. The 40 px badge gets a
   44 px tall hit area, as .btn does. */
.badge {
  position: relative;
  display: inline-block;
  flex: none;
  border-radius: 8px;
}

.badge::after {
  content: '';
  position: absolute;
  inset: min(0px, calc((100% - 44px) / 2)) 0;
}

.badge img {
  width: auto;
  height: 40px;
}

/* Phone mockup: flat frame, radius 15% of the width, island pill, standing 4 px
   into a 12 px floor strip. Set the width with --device-w; stretch the strip
   toward a page edge with --floor-left / --floor-right (or the bleed modifiers). */
.device {
  --device-w: 242px;
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  width: var(--device-w);
  max-width: 100%;
  padding-bottom: 8px;
}

@media (min-width: 960px) {
  .device {
    --device-w: 303px;
  }
}

.phone {
  position: relative;
  z-index: 1;
  padding: 3.8cqi;
  border-radius: 15cqi;
  background: var(--phone-body);
  box-shadow: inset 0 0 0 1.5px var(--phone-rim), var(--shadow-phone);
}

.phone__screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1320 / 2868;
  border-radius: 11.55cqi;
  background: #000;
}

.phone__screen > picture {
  height: 100%;
}

.phone__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone__screen::after {
  content: '';
  position: absolute;
  top: 2.97cqi;
  left: 50%;
  width: 26.4cqi;
  height: 7.92cqi;
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}

.device__floor {
  position: absolute;
  z-index: 0;
  bottom: 0;
  left: var(--floor-left, 0px);
  right: var(--floor-right, 0px);
  height: 12px;
  background: var(--floor, var(--kraft));
}

.device--bleed-left {
  --floor-left: -100vw;
}

.device--bleed-right {
  --floor-right: -100vw;
}

.device--bleed {
  --floor-left: -100vw;
  --floor-right: -100vw;
}

.device--oat {
  --floor: var(--oat);
}

/* Header: 56 px mobile, 72 px from 960. On the home page it starts transparent over
   the hero wall; site.js pins it and adds .is-scrolled (paper + hairline). Without
   JS it scrolls away with the hero instead of covering text. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  box-shadow: inset 0 -1px 0 var(--hairline);
  transition: background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.site-header--overlay {
  position: absolute;
  inset: 0 0 auto;
  background: transparent;
  box-shadow: none;
}

.js .site-header--overlay {
  position: fixed;
}

.site-header--overlay.is-scrolled {
  background: var(--paper);
  box-shadow: inset 0 -1px 0 var(--hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--margin));
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--margin);
}

.site-header a {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  margin-right: auto;
  font-weight: 600;
  font-size: 18px;
  line-height: 22px;
}

.brand__icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.site-nav {
  display: none;
}

.site-nav ul {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}

.site-nav a {
  position: relative;
  display: block;
  padding-block: var(--space-3);
  font-weight: 500;
  font-size: var(--fs-ui);
  line-height: var(--lh-ui);
}

/* Short labels ("FAQ", «Цена») get a 44 px wide hit area without moving the text. */
.site-nav a::after,
.site-footer__links a::after {
  content: '';
  position: absolute;
  inset: 0 min(0px, calc((100% - 44px) / 2));
}

/* Current page: underlined, as on Support 1440 (7566:382) and the Privacy and
   Terms footers (7826:1039, 7828:1018). */
.site-nav a[aria-current='page'],
.site-footer__links a[aria-current='page'] {
  text-decoration-line: underline;
}

.site-header__actions {
  display: flex;
  align-items: center;
}

/* Mobile Download: 32 px button inside a 117 x 44 hit area (Figma 7563:305). */
.site-header__download {
  min-height: 32px;
  margin-left: var(--space-1);
  padding: 0 14px;
}

.site-header__download::after {
  inset: -6px -12px -6px -4px;
}

/* Language switch: EN · RU, active ink, the other ink-soft (muted fails on the hero wall). */
.lang-switch {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-soft);
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
}

.lang-switch a[aria-current='page'] {
  color: var(--ink);
}

/* Hidden text needs no webfont: in Martian Mono, " Русский" would fetch the Cyrillic file on every EN page. */
.lang-switch .visually-hidden {
  font-family: system-ui, sans-serif;
}

.lang-switch__dot {
  width: 10px;
  text-align: center;
}

@media (min-width: 960px) {
  .brand {
    gap: 10px;
    font-size: 20px;
    line-height: 24px;
  }

  .brand__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  /* 64 px, twice the nav's own gaps, so EN · RU and Download read as a separate group. */
  .site-nav {
    display: block;
    flex: none;
    padding-right: var(--space-9);
  }

  .site-header__actions {
    gap: var(--space-5);
  }

  .site-header__download {
    min-height: 36px;
    margin-left: 0;
    padding: 0 var(--space-4);
  }

  .site-header__download::after {
    inset: -4px 0;
  }

  /* Desktop "EN · RU" sets tight as in Figma; the 44 px targets overlap the gaps. */
  .lang-switch a {
    position: relative;
    min-width: 0;
    min-height: 0;
  }

  .lang-switch a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }

  .lang-switch__dot {
    width: auto;
    padding-inline: 1ch;
  }
}

/* From 1280 the nav starts at column 7, as in Home 1440. Where it does not fit there
   (below about 1340 in EN, 1420 in RU), the brand column gives way, not the 64 px gap. */
@media (min-width: 1280px) {
  .brand {
    flex: 0 1 calc(50% + var(--gutter) / 2);
    margin-right: 0;
  }

  .site-nav {
    margin-right: auto;
  }
}

/* Footer: Figma 7561:310 (1440) and 7565:445 (390). */
.site-footer {
  background: var(--paper);
  box-shadow: inset 0 1px 0 var(--hairline);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--margin));
  margin-inline: auto;
  padding: 33px var(--margin) var(--space-6); /* Figma counts the 1 px hairline in the 390 layout */
}

.site-footer__row {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.site-footer__app {
  display: grid;
  grid-template-columns: 24px auto;
  justify-content: start;
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
}

.site-footer__icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.site-footer__name {
  font-weight: 500;
  font-size: 15px;
  line-height: 20px;
}

.site-footer__req {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.site-footer__links ul {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  row-gap: var(--space-1);
  list-style: none;
}

.site-footer__links a {
  position: relative;
  display: block;
  padding-block: var(--space-3);
  font-weight: 500;
  font-size: 15px;
  line-height: 20px;
  text-decoration: none;
}

.site-footer__end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Tap targets bleed into the margin so "EN" lines up with the text above. */
.lang-switch--footer {
  margin: -2px 0 -2px -12.5px;
}

.site-footer__legal {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
}

.site-footer__legal > span:not(.site-footer__sep) {
  display: block;
}

.site-footer__sep {
  display: none;
}

@media (min-width: 960px) {
  .site-footer__inner {
    gap: var(--space-5);
    padding: var(--space-7) var(--margin) 20px;
  }

  .site-footer__row {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
    row-gap: var(--space-3);
  }

  .site-footer__app {
    grid-template-columns: 24px auto auto;
    column-gap: var(--space-3);
  }

  .site-footer__req {
    grid-column: auto;
  }

  .site-footer__links {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .site-footer__links ul {
    column-gap: var(--space-5);
  }

  .site-footer__link--nav {
    display: none;
  }

  .site-footer__end {
    justify-content: flex-end;
    gap: var(--space-5);
  }

  .lang-switch--footer {
    margin: 0;
  }

  .site-footer__legal > span:not(.site-footer__sep) {
    display: inline;
  }

  .site-footer__sep {
    display: inline;
  }
}

/* One row from 1280, as in Home 1440. The Russian links are too long for one row
   (no RU footer frame exists), so RU keeps the two-row layout. */
@media (min-width: 1280px) {
  .site-footer__row:lang(en) {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    height: 40px;
  }

  .site-footer__row:lang(en) .site-footer__links a {
    margin-block: calc(-1 * var(--space-3));
  }
}

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