@font-face {
  font-family: "Inter Tight";
  src: url("fonts/InterTight.9358bbade2f2.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Medium.bb3f07028aee.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #121212;
  --paper: #f4f1ec;
  --rec: #e5322d;
  --haze: #6e6a66;
  --frame: #2b2a29;
  --muted: #b4aea7;
  --corner: rgba(244, 241, 236, 0.55);
  --axis: clamp(24px, 8vw, 160px);
  --edge: max(20px, env(safe-area-inset-top));
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 18px/1.55 "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul,
fieldset,
blockquote {
  margin: 0;
  padding: 0;
}

a {
  color: var(--paper);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

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

img {
  display: block;
}

/* The viewfinder corners: the frame of the viewport and the frame of the paid block. */
.corners {
  background:
    linear-gradient(var(--corner), var(--corner)) top left / 28px 1.5px no-repeat,
    linear-gradient(var(--corner), var(--corner)) top left / 1.5px 28px no-repeat,
    linear-gradient(var(--corner), var(--corner)) top right / 28px 1.5px no-repeat,
    linear-gradient(var(--corner), var(--corner)) top right / 1.5px 28px no-repeat,
    linear-gradient(var(--corner), var(--corner)) bottom left / 28px 1.5px no-repeat,
    linear-gradient(var(--corner), var(--corner)) bottom left / 1.5px 28px no-repeat,
    linear-gradient(var(--corner), var(--corner)) bottom right / 28px 1.5px no-repeat,
    linear-gradient(var(--corner), var(--corner)) bottom right / 1.5px 28px no-repeat;
}

.frame {
  position: fixed;
  inset: var(--edge) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  z-index: 50;
  pointer-events: none;
}

/* The numbers and REC belong to the first screen and scroll away with it. */
.counts,
.rec {
  position: absolute;
  top: calc(var(--edge) + 14px);
  z-index: 60;
  margin: 0;
  background: var(--ink);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.counts {
  left: calc(max(20px, env(safe-area-inset-left)) + 14px);
  max-width: calc(100vw - 190px);
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  font-variant-numeric: tabular-nums;
}

.count {
  white-space: nowrap;
}

/* A number that rolls its digits: a column of 0 to 9 and 0 again, moved by transform only. */
.odo {
  display: inline-block;
  white-space: nowrap;
}

.digit {
  display: inline-block;
  height: 1.3em;
  overflow: hidden;
  vertical-align: top;
}

.digit__col {
  display: flex;
  flex-direction: column;
  transition: transform 500ms var(--ease);
  will-change: transform;
}

.digit__col span {
  height: 1.3em;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.rec {
  right: calc(max(20px, env(safe-area-inset-right)) + 14px);
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 500;
  white-space: nowrap;
}

.rec__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rec);
}

.rec__time {
  font-variant-numeric: tabular-nums;
}

section {
  padding: clamp(72px, 12vh, 140px) var(--axis) 0;
}

h2 {
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 560;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 22px;
  font-weight: 560;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

small,
.small {
  font-size: 15px;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  padding-top: 0;
  overflow: hidden;
}

.hero__text {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: clamp(48px, 7vh, 96px) 0 clamp(36px, 6vh, 72px);
}

.brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 4vh, 40px);
}

.quiet {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 15px;
  text-decoration-color: var(--haze);
}

.quiet:hover {
  color: var(--paper);
}

h1 {
  font-size: clamp(44px, 7vw, 92px);
  font-weight: 560;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 52ch;
  margin-top: 20px;
  color: var(--muted);
}

.focus {
  margin-top: 28px;
}

.focus__form {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}

.focus__form fieldset:last-child {
  flex-basis: 100%;
}

fieldset {
  min-width: 0;
  border: 0;
}

legend,
.field label {
  display: block;
  padding: 0;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 15px;
}

.part {
  white-space: nowrap;
}

.short {
  display: none;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toggle,
.input {
  min-height: 44px;
  border: 1px solid var(--frame);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 16px;
}

.toggle {
  padding: 0 18px;
  cursor: pointer;
  transition:
    background-color 200ms var(--ease),
    color 200ms var(--ease);
}

.toggle[aria-pressed="true"] {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.input {
  width: 7em;
  padding: 0 14px;
}

.input::placeholder {
  color: var(--haze);
}

.result {
  min-height: 3.1em;
  margin-top: 14px;
  max-width: 44ch;
  font-size: 15px;
  color: var(--muted);
}

.cta {
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 560;
  text-decoration: none;
}

.cta--pair {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button--quiet {
  border: 1px solid var(--frame);
  background: transparent;
  color: var(--paper);
  font-weight: 500;
  transition: border-color 200ms var(--ease);
}

.button--quiet:hover {
  border-color: var(--paper);
}

.button:focus-visible {
  outline-color: var(--paper);
  outline-offset: 4px;
}

/* The stream of role lines: on the right of the hero, a band under the controls on a phone. */
.stream {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 1;
  width: 46vw;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
}

.stream__track {
  animation: drift 75s linear infinite;
  will-change: transform;
}

.stream:hover .stream__track {
  animation-play-state: paused;
}

.stream__list {
  min-height: 100svh;
  padding: 0 var(--axis) 0 2vw;
  list-style: none;
}

@keyframes drift {
  to {
    transform: translateY(-50%);
  }
}

.line {
  position: relative;
  margin: 0 0 0.7em;
  padding-left: 0.7em;
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--paper);
  transition:
    filter 700ms var(--ease),
    color 700ms var(--ease),
    opacity 700ms var(--ease);
}

.line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.28em;
  height: 0.28em;
  border-radius: 50%;
  background: var(--rec);
  opacity: 0;
  transition: opacity 700ms var(--ease);
}

@media (scripting: enabled) {
  .line {
    filter: blur(5px);
    color: var(--haze);
    opacity: 0.55;
  }

  .line.is-focus {
    filter: blur(0);
    color: var(--paper);
    opacity: 1;
  }

  .line.is-focus::before {
    opacity: 1;
  }
}

@media (scripting: none) {
  .focus {
    display: none;
  }
}

@media (max-width: 419px) {
  .long {
    display: none;
  }

  .short {
    display: inline;
  }
}

@media (max-width: 767px) {
  /* On a phone only the top corners stay, over the first screen: fixed or bottom ones covered the text. */
  .frame {
    position: absolute;
    bottom: auto;
    height: 40px;
    background:
      linear-gradient(var(--corner), var(--corner)) top left / 28px 1.5px no-repeat,
      linear-gradient(var(--corner), var(--corner)) top left / 1.5px 28px no-repeat,
      linear-gradient(var(--corner), var(--corner)) top right / 28px 1.5px no-repeat,
      linear-gradient(var(--corner), var(--corner)) top right / 1.5px 28px no-repeat;
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 88px var(--axis) 24px;
  }

  .brandrow {
    width: 100%;
    margin-bottom: 4px;
  }

  .brand img {
    width: auto;
    height: 36px;
  }

  h1 {
    font-size: clamp(38px, 9.8vw, 56px);
  }

  .lead {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.5;
  }

  legend,
  .field label {
    margin-bottom: 4px;
    font-size: 14px;
  }

  .toggle {
    padding: 0 12px;
    font-size: 15px;
  }

  .input {
    width: 5.5em;
  }

  .hero__text,
  .focus {
    display: contents;
  }

  .focus__form {
    gap: 10px 16px;
    margin-top: 18px;
  }

  .stream {
    position: relative;
    inset: auto;
    order: 1;
    flex: none;
    width: 100%;
    height: 170px;
    margin-top: 14px;
  }

  .stream__list {
    min-height: 170px;
    padding: 0;
  }

  .result {
    order: 2;
    min-height: 0;
    margin-top: 8px;
  }

  .cta {
    order: 3;
    margin-top: 12px;
  }

  .cta--pair {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .cta--pair .button {
    min-height: 44px;
  }
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 48px;
  max-width: 1080px;
  margin-top: 56px;
  border-top: 1px solid var(--frame);
  list-style: none;
}

.steps li {
  position: relative;
  padding-top: 28px;
}

.steps li::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 1px;
  height: 11px;
  background: var(--paper);
}

.steps__n {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.steps p {
  max-width: 34ch;
  margin-top: 10px;
  color: var(--muted);
}

/* One idea per paragraph: a second line of a step is a paragraph of its own. */
.steps p + p {
  margin-top: 8px;
}

/* The sample card, drawn as a message of the Telegram dark theme: the text and the buttons of the
   real card of the bot (tests/test_site.py keeps the markup equal to the card builder). */
.sample {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 24px 48px;
}

.tg {
  width: min(100%, 420px);
  font-size: 16px;
  line-height: 1.4;
}

.tg__bubble {
  padding: 8px 14px 10px;
  border-radius: 16px 16px 16px 4px;
  background: #182533;
  color: #e9eef3;
}

.tg__p + .tg__p {
  margin-top: 10px;
}

.tg__quote {
  margin: 4px 0 0;
  padding-left: 10px;
  border-left: 2px solid #6ab2f2;
  color: #c4ced8;
  font-size: 15px;
}

.tg__keys {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.tg__row {
  display: flex;
  gap: 4px;
}

.tg__key {
  flex: 1;
  padding: 9px 6px;
  border-radius: 6px;
  background: #223244;
  color: #e9eef3;
  font-size: 15px;
  text-align: center;
}

.tg__key--primary {
  background: #2b5278;
}

.caption {
  max-width: 30ch;
  color: var(--muted);
  font-size: 15px;
}

/* The cabinet */
.cabinet {
  max-width: 70ch;
}

.plain {
  margin-top: 28px;
  list-style: none;
}

.plain li {
  padding: 10px 0;
  color: var(--muted);
}

.cabinet__link {
  margin-top: 12px;
}

/* Plans */
.plans {
  max-width: 1080px;
}

.free {
  max-width: 60ch;
  margin-top: 40px;
}

.free .perks {
  margin-top: 12px;
}

.paid {
  max-width: 64ch;
  margin-top: 56px;
  padding: 40px clamp(24px, 4vw, 48px);
}

.paid > p {
  margin-top: 14px;
}

/* The price is the key fact of the block: bigger than the other headings. */
.paid h3 {
  font-size: clamp(26px, 3.4vw, 32px);
}

.paid .paid__lead {
  font-weight: 560;
}

.paid > p:not(.paid__lead):not(.trial):not(.terms):not(.cta) {
  color: var(--muted);
}

.perks {
  margin-top: 24px;
}

.perks div {
  padding: 12px 0;
  border-top: 1px solid var(--frame);
}

.perks dt {
  font-weight: 560;
}

.perks dd {
  color: var(--muted);
}

.paid .trial {
  margin-top: 24px;
  font-size: 22px;
  font-weight: 560;
}

.paid .terms {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

/* Questions */
.faq {
  max-width: 800px;
}

.faq h2 {
  margin-bottom: 32px;
}

details {
  border-top: 1px solid var(--frame);
}

details:last-of-type {
  border-bottom: 1px solid var(--frame);
}

summary {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 8px 0;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "+";
  width: 1.4em;
  color: var(--muted);
}

details[open] summary::before {
  content: "−";
}

details p,
details ul {
  max-width: 60ch;
  padding-left: 1.4em;
  color: var(--muted);
}

details p + p,
details ul {
  margin-top: 8px;
}

details ul {
  margin-left: 0;
  padding-left: 2.6em;
}

/* The last line of an answer leaves room before the next question. */
details > :last-child {
  margin-bottom: 20px;
}

details > p:first-of-type {
  margin-top: 0;
}

code {
  color: var(--paper);
  font-family: inherit;
}

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 40px;
  padding: clamp(72px, 12vh, 140px) var(--axis) calc(48px + env(safe-area-inset-bottom));
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
}

.foot__links a,
.foot__links button,
.foot__mark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.foot__links a,
.foot__links button {
  font-size: 15px;
}

/* The link that opens the choice about the counter is a button that looks like its neighbours. */
.foot__links button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper);
  font-family: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.foot__copy {
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 899px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 36px 0;
    border-top: 0;
    border-left: 1px solid var(--frame);
  }

  .steps li {
    padding: 0 0 0 28px;
  }

  .steps li::before {
    top: 12px;
    left: -6px;
    width: 11px;
    height: 1px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 17px;
  }

  .toggle {
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stream__track {
    animation: none;
  }

  .line,
  .line::before,
  .toggle,
  .digit__col {
    transition: none;
  }
}

/* Search pages: the landing's look, calmer. The newest role is the one in focus (its red dot, the
   paper colour); the others rest in --muted and come into colour under the pointer. */
.search {
  max-width: 900px;
  padding: clamp(64px, 10vh, 112px) var(--axis) 0;
}

.search .brandrow {
  margin-bottom: 8px;
}

.search h1 {
  margin-top: 16px;
  font-size: clamp(30px, 5vw, 56px);
  overflow-wrap: break-word;
}

.search h2 {
  font-size: 18px;
  font-weight: 560;
  letter-spacing: 0;
}

.crumbs {
  color: var(--muted);
  font-size: 15px;
}

.crumbs a {
  color: var(--muted);
}

.total {
  margin-top: 32px;
  color: var(--paper);
  font-size: 18px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}

.search .lead + .lead {
  margin-top: 8px;
}

.roles {
  margin-top: 8px;
  list-style: none;
}

.role {
  position: relative;
  padding: 10px 0 10px 0.9em;
  border-top: 1px solid var(--frame);
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 500;
  line-height: 1.25;
  transition: color 200ms var(--ease);
}

.role::before {
  content: "";
  position: absolute;
  top: 1.05em;
  left: 0;
  width: 0.28em;
  height: 0.28em;
  border-radius: 50%;
  background: var(--rec);
  opacity: 0;
}

.role:first-child {
  color: var(--paper);
}

.role:first-child::before {
  opacity: 1;
}

.role:hover {
  color: var(--paper);
}

.role__date {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.thin {
  max-width: 52ch;
  margin-top: 24px;
  color: var(--muted);
}

.thin + .thin {
  margin-top: 4px;
}

.more,
.places {
  margin-top: 40px;
}

/* Sections of a search page sit apart: a line over each. */
.more {
  padding-top: 24px;
  border-top: 1px solid var(--frame);
}

.more h2,
.place h2 {
  margin-bottom: 4px;
}

.place {
  margin-bottom: 28px;
}

.place h2 a {
  font-size: 22px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  list-style: none;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 16px;
}

.quiet-list {
  color: var(--muted);
  font-size: 15px;
}

.quiet-list a {
  color: var(--muted);
}

.n {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.search .cta {
  margin-top: 40px;
}

.search .cta--pair {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.search .cta--pair .button {
  min-height: 44px;
}

@media (min-width: 768px) {
  .search .cta--pair {
    flex-direction: row;
  }

  .search .cta--pair .button {
    min-height: 52px;
  }
}

/* Data block of a listing page: label → value rows (the .perks rows), a line under the last. */
.facts {
  max-width: 60ch;
  margin-top: 16px;
}

.facts div:last-child {
  border-bottom: 1px solid var(--frame);
}

@media (min-width: 768px) {
  .facts div {
    display: grid;
    grid-template-columns: 12em 1fr;
    gap: 0 16px;
  }
}

/* Questions of a listing page, written from its numbers. */
.search .faq {
  margin-top: 40px;
  padding: 24px 0 0;
  border-top: 1px solid var(--frame);
}

.search .faq h2 {
  margin-bottom: 8px;
}

/* Pay by city and kind: a real table, shown as a block per city of label → value rows (a matrix of
   up to eleven kinds does not fit a column of text); the kinds with too little data are left out. */
.paytable {
  max-width: 44ch;
  margin-top: 24px;
}

.paytable thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.paytable table,
.paytable tbody,
.paytable tr,
.paytable th,
.paytable td {
  display: block;
}

.paytable tbody th {
  padding: 20px 0 4px;
  border-top: 1px solid var(--frame);
  font-size: 22px;
  font-weight: 560;
  text-align: left;
}

.paytable td {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 16px;
  padding: 6px 0;
}

.paytable td::before {
  content: attr(data-label);
  grid-row: 1 / 3;
  color: var(--muted);
}

.paytable .pay {
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.paytable .n {
  text-align: right;
}

.paytable .na {
  display: none;
}

/* ===== Guides (/gid/): reading pages in the look of the search pages ===== */
.guide .updated {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

/* A section is a block with a line over it; the questions and the final call are blocks too. */
.guide .text,
.guide .faq {
  margin-top: 40px;
  padding: 24px 0 0;
  border-top: 1px solid var(--frame);
}

.guide .text > h2,
.guide .faq > h2 {
  margin-bottom: 0;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 560;
  line-height: 1.2;
}

.guide .text > * + * {
  margin-top: 12px;
}

.guide summary::before {
  flex: none;
}

.guide .faq > details:first-of-type {
  margin-top: 16px;
}

.guide .text > p {
  max-width: 52ch;
}

.guide .points,
.guide .order {
  max-width: 52ch;
  padding-left: 1.3em;
}

.guide .points li,
.guide .order li {
  padding-left: 4px;
}

.guide .points li + li,
.guide .order li + li {
  margin-top: 8px;
}

.guide .points li::marker,
.guide .order li::marker {
  color: var(--muted);
}

/* Label → value rows: the label in paper, the value in muted under it. */
.guide .rows {
  max-width: 56ch;
}

.guide .rows div {
  padding: 12px 0;
  border-top: 1px solid var(--frame);
}

.guide .rows div:last-child {
  border-bottom: 1px solid var(--frame);
}

.guide dt {
  font-weight: 560;
}

.guide dd {
  color: var(--muted);
}

.guide .guides {
  margin-top: 24px;
  list-style: none;
}

.guide .guides li {
  padding: 16px 0;
  border-top: 1px solid var(--frame);
}

.guide .guides a {
  font-size: 22px;
  font-weight: 560;
  line-height: 1.25;
}

.guide .guides p {
  max-width: 52ch;
  margin-top: 4px;
  color: var(--muted);
}

@media (min-width: 768px) {
  .guide .rows div {
    display: grid;
    grid-template-columns: 11em 1fr;
    gap: 0 16px;
  }
}
