@font-face {
  src: url("fonts/MonoLisaText.woff2") format("woff2");
  font-family: MonoLisaText;
  font-weight: 1 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007F;
}

@font-face {
  src: url("fonts/MonoLisaText-Latin1.woff2") format("woff2");
  font-family: MonoLisaText;
  font-weight: 1 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0080-00FF;
}

:root {
  --bg: #ffffff;
  --fg: #111111;
  --fg-muted: #666666;
  --fg-faint: #707070;
  --fg-link: #444444;
  --code: #0085c7;
  --code-10: #b85c00;
  /* The fine print is set in --fg-faint: on white it has to keep a contrast
     of 4.5 to 1, which #707070 does (4.9) and the lighter grey before it did
     not. The lines keep that lighter grey. */
  --line: color-mix(in srgb, #8a8a8a 45%, transparent);

  --gutter: 1.25rem;
  --phone: 8.4rem;

  /* The smallest sizes of running text, of small text and of the fine print. */
  --text-min: 14px;
  --small-min: 13px;
  --fine-min: 12px;

  font-size: clamp(20px, 4vw, 28px);
  scroll-behavior: smooth;
  color-scheme: light;
}

/* The page is dark when the system is, unless the reader has chosen at the
   upper corner: #scheme-light and #scheme-dark are the radio buttons there
   (see page.html), and :has() asks which of them is checked. The colours
   stand four times for that, as plain values, so that a browser without
   :has() still follows the system. */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --fg: #e6e6e6;
    --fg-muted: #9a9a9a;
    --fg-faint: #7f7f7f;
    --line: color-mix(in srgb, #7f7f7f 45%, transparent);
    --fg-link: #c0c0c0;
    --code: #40b3f5;
    --code-10: #ff9e0a;

    color-scheme: dark;
  }
}

:root:has(#scheme-light:checked) {
  --bg: #ffffff;
  --fg: #111111;
  --fg-muted: #666666;
  --fg-faint: #707070;
  --line: color-mix(in srgb, #8a8a8a 45%, transparent);
  --fg-link: #444444;
  --code: #0085c7;
  --code-10: #b85c00;

  color-scheme: light;
}

:root:has(#scheme-dark:checked) {
  --bg: #0f0f0f;
  --fg: #e6e6e6;
  --fg-muted: #9a9a9a;
  --fg-faint: #7f7f7f;
  --line: color-mix(in srgb, #7f7f7f 45%, transparent);
  --fg-link: #c0c0c0;
  --code: #40b3f5;
  --code-10: #ff9e0a;

  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}

html,
body {
  margin: 0;
}

body {
  box-sizing: border-box;
  padding: 3.4rem var(--gutter) 1.6rem;
  background-color: var(--bg);
  color: var(--fg);
  font-family:
    MonoLisaText,
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--fg-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 0.18rem;
  border-radius: 4px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.page {
  width: min(100%, 36rem);
  margin: 0 auto;
}

/* The appearance of the page: as the system has it, light, or dark.

   The choice itself are three radio buttons at the top of the page, which
   are not seen. They are fixed to the window, so that the page does not jump
   to them when one of their labels further down is clicked. What is seen are
   two sets of labels for them: small pictures at the upper corner, across
   from the languages, and words in the part on the dark mode. */

.scheme-inputs {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.scheme-inputs input {
  margin: 0;
}

/* Without :has() the choice could change nothing, so it is not shown. */

.scheme {
  display: none;
}

@supports selector(:has(*)) {
  .scheme {
    display: inline-flex;
  }
}

.scheme {
  gap: 0.2rem;
  padding: 0.15rem;
  border: 1px solid color-mix(in srgb, var(--fg-muted) 55%, transparent);
  border-radius: 8px;
  background-color: var(--bg);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.scheme label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.14rem 0.5rem;
  border-radius: 5px;
  color: var(--fg-muted);
  cursor: pointer;
}

.scheme label:hover {
  color: var(--fg);
}

.scheme svg {
  width: 0.85rem;
  height: 0.85rem;
}

:root:has(#scheme-system:checked) .scheme [for="scheme-system"],
:root:has(#scheme-light:checked) .scheme [for="scheme-light"],
:root:has(#scheme-dark:checked) .scheme [for="scheme-dark"] {
  background-color: var(--fg);
  color: var(--bg);
}

/* Who goes through the page with the keyboard sees at the corner which of
   the three they are on. */

:root:has(#scheme-system:focus-visible) .scheme-corner [for="scheme-system"],
:root:has(#scheme-light:focus-visible) .scheme-corner [for="scheme-light"],
:root:has(#scheme-dark:focus-visible) .scheme-corner [for="scheme-dark"] {
  outline: 2px solid var(--fg);
  outline-offset: 0.12rem;
}

.scheme-corner {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  inset-inline-start: max(1rem, env(safe-area-inset-left));
  z-index: 10;
}

.scheme-corner label {
  padding: 0.2rem 0.32rem;
}

.scheme-words {
  margin-top: 0.8rem;
}

/* Language, at the upper right: a button that opens a menu. The menu is a
   popover, which the browser opens and closes without any script. */

.language {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  inset-inline-end: max(1rem, env(safe-area-inset-right));
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  z-index: 10;
}

.language-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.2rem 0.5rem;
  border: 1px solid color-mix(in srgb, var(--fg-muted) 55%, transparent);
  border-radius: 6px;
  background-color: var(--bg);
  color: var(--fg-muted);
  font: inherit;
  letter-spacing: inherit;
  line-height: 1.4;
  cursor: pointer;
}

.language-button:hover,
.language-button:focus-visible {
  color: var(--fg);
  border-color: var(--fg);
}

.language-button:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 0.18rem;
}

.language-button svg {
  flex: none;
  width: 0.5rem;
  height: 0.3rem;
}

.language-menu {
  position: absolute;
  inset: auto;
  top: calc(max(1rem, env(safe-area-inset-top)) + 1.7rem);
  inset-inline-end: max(1rem, env(safe-area-inset-right));
  box-sizing: border-box;
  min-width: 9.5rem;
  max-height: calc(100dvh - 3.6rem);
  margin: 0;
  padding: 0.25rem;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--fg-muted) 55%, transparent);
  border-radius: 8px;
  background-color: var(--bg);
  color: var(--fg);
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 0.16);
  list-style: none;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.language-menu a {
  display: block;
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  color: var(--fg-link);
  /* All names on the side the page begins on, also a name of the other direction. */
  text-align: match-parent;
  text-decoration: none;
}

.language-menu a:hover,
.language-menu a:focus-visible {
  background-color: color-mix(in srgb, var(--fg) 10%, transparent);
  color: var(--fg);
}

.language-menu [aria-current="page"],
.language-menu [aria-current="page"]:hover {
  background-color: var(--fg);
  color: var(--bg);
}

/* A browser that knows no popover shows the languages as a row of links. */

@supports not selector(:popover-open) {
  .language {
    position: static;
    margin: -2rem 0 1.5rem;
  }

  .language-button {
    display: none;
  }

  .language-menu {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-height: none;
    border: 0;
    box-shadow: none;
  }
}

/* Languages the web font has no letters for. Their text is set in one font of
   the system throughout, so that no word stands in two fonts. */

:lang(cs),
:lang(sk),
:lang(tr),
:lang(uz),
:lang(ru),
:lang(kk),
:lang(vi) {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
}

/* Chinese has no monospace of its own: its characters come from the system,
   the Latin letters and digits between them stay in the web font. */

:lang(zh) {
  font-family:
    MonoLisaText,
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    "Noto Sans SC",
    sans-serif;
}

/* Traditional Chinese, Japanese, Korean and Thai likewise: the characters of
   the system, in the fonts of their own writing, around the web font. */

:lang(zh-Hant) {
  font-family:
    MonoLisaText,
    "PingFang TC",
    "Microsoft JhengHei",
    "Noto Sans CJK TC",
    "Noto Sans TC",
    sans-serif;
}

:lang(ja) {
  font-family:
    MonoLisaText,
    "Hiragino Sans",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    Meiryo,
    "Noto Sans CJK JP",
    "Noto Sans JP",
    sans-serif;
}

:lang(ko) {
  font-family:
    MonoLisaText,
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    "Noto Sans CJK KR",
    "Noto Sans KR",
    sans-serif;
}

:lang(th) {
  font-family:
    MonoLisaText,
    Thonburi,
    "Leelawadee UI",
    "Noto Sans Thai",
    sans-serif;
  /* Thai sets marks above and below its letters: no space between them. */
  letter-spacing: 0 !important;
}

/* Arabic and Chinese are set in fonts that look smaller at the same size
   than the monospace does. */

html:lang(ar) {
  --text-min: 16px;
  --small-min: 15px;
  --fine-min: 13px;

  font-size: clamp(22px, 4.5vw, 31px);
}

html:lang(zh),
html:lang(ja),
html:lang(ko),
html:lang(th) {
  --text-min: 15px;
  --small-min: 14px;
  --fine-min: 13px;
}

/* Arabic is joined writing: no space between its letters, and a font of the
   system for all of the text. Codes keep the monospace. */

:lang(ar) {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    "Noto Sans Arabic",
    "Geeza Pro",
    Tahoma,
    sans-serif;
  letter-spacing: 0 !important;
}

:lang(ar) code {
  font-family:
    MonoLisaText,
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}

/* Top of the page */

.hero {
  text-align: center;
  opacity: 0;
  animation: fade-in 1.2s ease-out forwards;
}

.app-icon {
  width: 4.6rem;
  height: 4.6rem;
  margin: 0 auto 0.5rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.65rem, 10vw, 2.2rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.tagline {
  max-width: 24rem;
  margin: 0.7rem auto 0;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.45;
  color: var(--fg-muted);
  text-wrap: balance;
}

/* What the app costs and what it leaves out, right below its name. */

.promises {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.promises li {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--fg);
  border-radius: 6px;
  color: var(--fg);
}

/* The app is not out yet: said in a box of its own, above the button. */

.preview {
  max-width: 21rem;
  margin: 1.6rem auto 0;
  padding: 0.7rem 0.85rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: max(0.6rem, var(--text-min));
  letter-spacing: 0.03em;
  line-height: 1.55;
  color: var(--fg-muted);
  text-wrap: balance;
}

.preview-label {
  display: block;
  width: fit-content;
  margin: 0 auto 0.5rem;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--fg);
  border-radius: 6px;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--fg);
}

.store {
  margin: 1.7rem 0 0;
}

.preview + .store {
  margin-top: 1.2rem;
}

.store-button {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--fg);
  border-radius: 8px;
  background-color: var(--fg);
  color: var(--bg);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-decoration: none;
  text-wrap: balance;
}

.store-button:hover,
.store-button:focus-visible {
  background-color: transparent;
  color: var(--fg);
}

.platforms {
  margin: 0.8rem 0 0;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.hero .shot {
  margin-top: 2.6rem;
}

/* The page for an address that does not exist: the top of the page alone, in
   the middle of the window. */

.missing {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100dvh - 9rem);
}

.missing-name {
  margin: 0 0 1.2rem;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* Links to the parts of the page */

.contents {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  margin: 2.2rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.contents a {
  display: block;
  padding: 0.22rem 0.4rem;
  border: 1px solid color-mix(in srgb, var(--fg-muted) 55%, transparent);
  border-radius: 6px;
  color: var(--fg-muted);
  text-decoration: none;
}

.contents a:hover,
.contents a:focus-visible {
  color: var(--fg);
  border-color: var(--fg);
}

/* Text */

.section-title {
  margin: 0 0 0.65rem;
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
}

h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-wrap: balance;
}

.feature p,
.plain p,
.steps p {
  margin: 0.7rem 0 0;
  font-size: max(0.6rem, var(--text-min));
  letter-spacing: 0.03em;
  line-height: 1.6;
  color: var(--fg-muted);
}

p.section-title {
  margin: 0 0 0.65rem;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: var(--fg);
}

code {
  font: inherit;
  color: var(--code);
  white-space: nowrap;
}

/* A code of ICD-10 is orange and one of ICD-11 blue, as in the app. The
   orange is a little darker on white than the app's, to be read at this
   size. */

code.icd10 {
  color: var(--code-10);
}

/* Codes and names such as ICD-11 run from left to right in every language. */

code,
.nb {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Names with a hyphen, such as ICD-11, stay on one line. */

.nb {
  white-space: nowrap;
}

/* A feature: its text, and the screenshots that show it */

.feature,
.plain {
  margin-top: 4.6rem;
  scroll-margin-top: 1.5rem;
}

.feature {
  max-width: 24rem;
  margin-inline: auto;
}

.shots {
  display: flex;
  gap: 0.6rem;
  margin: 1.5rem calc(-1 * var(--gutter)) 0;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
}

.shots .shot {
  flex: none;
  width: 11rem;
  scroll-snap-align: start;
}

.shot {
  margin: 0;
}

/* A screenshot that has a dark twin stands in the page with it, and one of
   the two is shown: by the system, or by what the reader chose (see the
   colours at the top). The one not shown is not loaded either, because both
   are loaded lazily. */

.shot .in-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .shot .in-light {
    display: none;
  }

  .shot .in-dark {
    display: block;
  }
}

:root:has(#scheme-light:checked) .shot .in-light {
  display: block;
}

:root:has(#scheme-light:checked) .shot .in-dark {
  display: none;
}

:root:has(#scheme-dark:checked) .shot .in-light {
  display: none;
}

:root:has(#scheme-dark:checked) .shot .in-dark {
  display: block;
}

.feature > .shot {
  margin-top: 1.5rem;
}

/* A screenshot is a button: it opens the same picture, at its full width, in
   a layer over the page. The layer is a popover, which the browser opens and
   closes without any script; a click on the picture there closes it, and so
   does the Escape key.

   The picture of an iPhone is shown whole, as large as the window allows.
   That of an iPad is as tall as the window: where the window is narrower
   than the picture, as on a phone, the picture is moved sideways. */

.zoom-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font: inherit;
  color: inherit;
  position: relative;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

/* A small magnifier at the lower corner says that the picture opens: a
   finger has no pointer that could say so. It is a disc in the colour of the
   page, and on it the sign, cut out of the colour of the text (mask). */

.zoom-open::before,
.zoom-open::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-end: 0;
  box-sizing: border-box;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  pointer-events: none;
}

.zoom-open::before {
  border: 1px solid var(--line);
  background-color: var(--bg);
}

.zoom-open::after {
  background-color: var(--fg-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='4.6'/%3E%3Cpath d='M14.4 14.4 18 18M9 11h4M11 9v4'/%3E%3C/svg%3E") center / 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='4.6'/%3E%3Cpath d='M14.4 14.4 18 18M9 11h4M11 9v4'/%3E%3C/svg%3E") center / 100% no-repeat;
}

.zoom-open:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 0.3rem;
}

.zoom {
  inset: 0;
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: color-mix(in srgb, var(--bg) 94%, transparent);
  color: inherit;
  overflow: auto;
  overscroll-behavior: contain;
}

.zoom::backdrop {
  background-color: transparent;
}

.zoom-close {
  --rim: 0.6rem;

  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: max-content;
  min-width: 100%;
  min-height: 100%;
  margin: 0;
  padding: var(--rim);
  border: 0;
  border-radius: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: zoom-out;
  -webkit-tap-highlight-color: transparent;
}

.zoom-close:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: -4px;
}

.zoom img {
  width: auto;
  max-width: calc(100vw - 2 * var(--rim));
  height: auto;
  max-height: calc(100vh - 2 * var(--rim));
  max-height: calc(100dvh - 2 * var(--rim));
}

.shot.ipad .zoom img {
  max-width: none;
  height: calc(100vh - 2 * var(--rim));
  height: calc(100dvh - 2 * var(--rim));
}

/* A browser that knows no popover shows the pictures as they were. */

@supports not selector(:popover-open) {
  .zoom {
    display: none;
  }

  .zoom-open {
    cursor: auto;
  }
}

/* Screenshots without a device around them get a rim in the shape of the display.
   A screenshot that brings its own device frame loses the class "bare". */

.shot.bare img {
  box-sizing: border-box;
  border: 1px solid var(--line);
}

.shot.iphone.bare img {
  border-radius: 15.4% / 7.1%;
}

.shot.ipad.bare img {
  border-radius: 1.7% / 2.3%;
}

/* A screenshot with its dark twin laid over it and a slider between the two:
   light on the left of the slider, dark on the right.

   No script moves anything. The slider is a range input that covers the
   screen, with an invisible thumb as tall as the picture. The thumb is an
   anchor (anchor-name), and the left edge of the dark picture and the line
   that marks it are positioned at its middle. A browser that cannot tie
   anything to the thumb leaves both in the middle of the picture. */

.compare {
  /* Where the screen lies in the picture of the device, and how wide the
     invisible thumb is that a finger takes hold of. */
  --screen-x: 4.13%;
  --screen-y: 5.13%;
  --grip: 2.2rem;

  position: relative;
  container-type: inline-size;
  anchor-scope: --compare;
}

.compare.bare {
  --screen-x: 0%;
  --screen-y: 0%;
}

.compare-range {
  position: absolute;
  z-index: 2;
  top: 0;
  left: calc(var(--screen-x) - var(--grip) / 2);
  box-sizing: border-box;
  width: calc(100% - 2 * var(--screen-x) + var(--grip));
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  /* Light stays on the left in a page that is read from right to left. */
  direction: ltr;
  cursor: ew-resize;
  /* A finger that moves up or down scrolls the page as anywhere else. */
  touch-action: pan-y;
  outline: none;
}

.compare-range::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent;
}

.compare-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--grip);
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  /* Safari draws a thumb of glass even so. It is hidden; its place still
     counts for the anchor. */
  opacity: 0;
  anchor-name: --compare;
}

.compare-range::-moz-range-track {
  height: 100%;
  background: transparent;
}

.compare-range::-moz-range-thumb {
  width: var(--grip);
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  anchor-name: --compare;
}

.compare-dark {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 50%;
  left: anchor(--compare center, 50%);
  overflow: hidden;
  pointer-events: none;
}

/* The dark picture keeps the place and the size of the light one, however
   narrow the part of it is that shows. */

.compare-dark img {
  position: absolute;
  top: 0;
  right: 0;
  width: 100cqw;
  max-width: none;
  height: auto;
}

.compare-handle {
  position: absolute;
  top: var(--screen-y);
  bottom: var(--screen-y);
  left: 50%;
  left: anchor(--compare center, 50%);
  width: 0;
  pointer-events: none;
}

/* The line between light and dark, and a knob in the middle of it. */

.compare-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background-color: #ffffff;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.28);
}

.compare-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 1.5rem;
  height: 1.5rem;
  margin: -0.75rem 0 0 -0.75rem;
  border-radius: 50%;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 7.5 5 12l4.5 4.5M14.5 7.5 19 12l-4.5 4.5' fill='none' stroke='%23333' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.28), 0 0.15rem 0.5rem rgb(0 0 0 / 0.3);
}

.compare-range:focus-visible ~ .compare-handle::after {
  outline: 2px solid var(--fg);
  outline-offset: 0.15rem;
}

@media (min-width: 700px) {
  .shots {
    margin-inline: 0;
    padding: 0;
    overflow-x: visible;
  }

  .shots .shot {
    width: var(--phone);
  }
}

@media (min-width: 1040px) {
  .feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1.8rem;
    align-items: center;
    max-width: none;
  }

  .feature-text {
    max-width: 22rem;
  }

  .shots {
    margin-top: 0;
  }

  .feature > .shot {
    grid-column: 1 / -1;
    margin-top: 1.8rem;
  }

  .feature.turned {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .feature.turned .feature-text {
    order: 2;
    justify-self: end;
  }

  .feature.turned > .shot {
    order: 3;
  }
}

/* Smaller things, in boxes */

.plain {
  max-width: 24rem;
  margin-inline: auto;
}

.plain.broad {
  max-width: none;
}

/* Two lists side by side: the languages of the app, and beside them the
   classifications with their flags */

.columns {
  display: grid;
  grid-template-columns: fit-content(50%) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 1.6rem;
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

/* The two headings share a row, so that the lists begin on one line even
   where a heading takes two. */

.columns > div {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  align-content: start;
}

.columns h3 {
  margin: 0 0 0.5rem;
  font-size: max(0.6rem, var(--text-min));
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.4;
  color: var(--fg);
}

.names {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: max(0.6rem, var(--text-min));
  letter-spacing: 0.03em;
  line-height: 1.6;
  color: var(--fg-muted);
}

.editions li + li {
  margin-top: 0.55rem;
}

.edition,
.edition-language {
  display: block;
}

.edition-language {
  font-size: max(0.5rem, var(--small-min));
  line-height: 1.5;
  color: var(--fg-faint);
}

/* The flags stay with one another, as high as a capital letter. A thin rim
   keeps a white field from running into the page. */

.flags {
  white-space: nowrap;
}

.flags img {
  display: inline-block;
  width: auto;
  height: 0.72em;
  vertical-align: -0.04em;
  border-radius: 1px;
  box-shadow: 0 0 0 1px var(--line);
}

.plain.broad > .section-title,
.plain.broad > h2 {
  text-align: center;
}

/* Text in a broad part keeps the width of the other text. */

.plain.broad > p:not(.section-title) {
  max-width: 24rem;
  margin-inline: auto;
}

.plain.broad > .cards + p {
  margin-top: 1.3rem;
}

.cards,
.steps {
  display: grid;
  gap: 0.55rem;
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
}

.cards li,
.steps li {
  padding: 0.65rem 0.85rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card-name {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  line-height: 1.35;
  color: var(--fg-link);
}

.card-text {
  display: block;
  margin-top: 0.3rem;
  font-size: max(0.5rem, var(--small-min));
  letter-spacing: 0.03em;
  line-height: 1.5;
  color: var(--fg-muted);
}

.steps {
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps .card-name::before {
  content: counter(step) "  ";
  white-space: pre;
  color: var(--fg-faint);
}

@media (min-width: 700px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1040px) {
  .cards {
    grid-template-columns: 1fr 1fr 1fr;
  }

  /* Four boxes stand two by two. */

  .cards.pairs {
    grid-template-columns: 1fr 1fr;
  }
}

.closing {
  margin-top: 4.6rem;
  text-align: center;
}

.closing-note {
  display: block;
  margin-bottom: 0.9rem;
  font-size: max(0.6rem, var(--text-min));
  letter-spacing: 0.03em;
  line-height: 1.55;
  color: var(--fg-muted);
}

/* Foot of the page */

footer {
  max-width: 24rem;
  margin: 4.6rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: max(0.45rem, var(--fine-min));
  letter-spacing: 0.03em;
  line-height: 1.6;
  color: var(--fg-faint);
}

footer p {
  margin: 0 0 0.7rem;
}

footer a {
  color: inherit;
}

/* The link to the privacy policy, last at the foot of the page, a little
   clearer than the notes above it. */

.footer-privacy a {
  color: var(--fg-muted);
}

/* The points of the part on privacy on the start page are set as the
   lists of the privacy policy. */

.points {
  text-align: start;
}

/* The privacy policy: a page of plain text under the icon of the app. Its
   parts follow one another closer than the parts of the start page. */

.policy-head h1 {
  font-size: clamp(1.4rem, 8vw, 1.8rem);
}

.policy-date,
.policy-binding {
  max-width: 24rem;
  margin: 0.7rem auto 0;
  font-size: max(0.5rem, var(--fine-min));
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--fg-muted);
}

.policy-binding {
  margin-top: 0.3rem;
}

.policy-binding a {
  color: inherit;
}

.plain.policy {
  margin-top: 2.6rem;
}

.points,
.policy ul {
  margin: 0.7rem 0 0;
  padding-inline-start: 1.1rem;
  font-size: max(0.6rem, var(--text-min));
  letter-spacing: 0.03em;
  line-height: 1.6;
  color: var(--fg-muted);
}

.points li + li,
.policy li + li {
  margin-top: 0.35rem;
}

.policy a,
.policy-back a {
  color: inherit;
}

/* An address in the legal notice: line below line, a little apart. */

.policy .address {
  line-height: 1.6;
}

/* It is written from the left in every language, and stands at the side
   where the page's own text begins. */

[dir="rtl"] .policy .address {
  text-align: right;
}

.policy-back {
  max-width: 24rem;
  margin: 3rem auto 0;
  font-size: max(0.6rem, var(--text-min));
  letter-spacing: 0.03em;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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